Changeset 0.38.1 (#234)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-25 11:13:12 +00:00
committed by xcaliber
parent 10acadc9d0
commit 6943c91f40
30 changed files with 2410 additions and 10 deletions

View File

@@ -0,0 +1,24 @@
package models
// ── Extension Connections (v0.38.1) ──────────────────
// ExtConnection represents a scoped credential/endpoint configuration
// for extensions that integrate with external services. Same scope
// hierarchy as ProviderConfig: global → team → personal.
type ExtConnection struct {
BaseModel
Type string `json:"type" db:"type"`
PackageID string `json:"package_id" db:"package_id"`
Scope string `json:"scope" db:"scope"`
OwnerID string `json:"owner_id" db:"owner_id"`
Name string `json:"name" db:"name"`
Config JSONMap `json:"config" db:"config"`
IsActive bool `json:"is_active" db:"is_active"`
}
// ExtConnectionPatch carries partial updates. Nil fields are skipped.
type ExtConnectionPatch struct {
Name *string `json:"name,omitempty"`
Config JSONMap `json:"config,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
}

View File

@@ -35,6 +35,7 @@ const (
ExtPermProviderComplete = "provider.complete" // v0.29.1: LLM completion calls
ExtPermFormValidate = "forms.validate" // v0.29.3: form validation hooks
ExtPermWorkflowAccess = "workflow.access" // v0.30.2: workflow definition + stage data access
ExtPermConnectionsRead = "connections.read" // v0.38.1: extension connection resolution
)
// ValidExtensionPermissions is the set of recognized permission keys.
@@ -48,6 +49,7 @@ var ValidExtensionPermissions = map[string]bool{
ExtPermProviderComplete: true,
ExtPermFormValidate: true,
ExtPermWorkflowAccess: true,
ExtPermConnectionsRead: true,
}
// ── Extension Permission Model ───────────────