The system org sets each org's allowed models and whether it may add its own providers (org-model-policy); an org with no entry may use nothing. An org's aliases and providers are checked against that policy on save and filtered by it at resolution. Tasks get their org's providers, keyed by the org's credential binding through the egress proxy. Org Settings gains a Models tab; instance Models gains Org access.
26 lines
2.0 KiB
Go
26 lines
2.0 KiB
Go
package controlplane
|
|
|
|
import (
|
|
pb "github.com/samcharles93/archie-core/internal/contracts/controlplane/v1"
|
|
"github.com/samcharles93/archie-core/internal/domain/workflow"
|
|
)
|
|
|
|
// Schemas are not declared here: each Definition names its document type, and
|
|
// Definition.Descriptor derives the JSON Schema from it (internal/app/controlplane/schema.go).
|
|
func builtinDefinitions(steps workflow.StepRegistry, settings map[string]any) []Definition {
|
|
definitions := []Definition{taskPolicyDefinition(), workflowDefinition(), workflowDefinitionsDefinition(steps, settings), workflowEnablementDefinition(), personaDefinition(), curatorDefinition(), soulDefinition(), scheduleDefinition(), agentProfileDefinition(), playbooksDefinition(), skillsDefinition(), credentialBindingsDefinition(), identityGrantsDefinition(), reviewSettingsDefinition(), orgModelPolicyDefinition()}
|
|
definitions = append(definitions, modelDefinitions()...)
|
|
definitions = append(definitions, operationalDefinitions()...)
|
|
return definitions
|
|
}
|
|
|
|
func domainManagedDescriptors() []*pb.ResourceDescriptor {
|
|
const stateService = "state.v1.StateStoreService"
|
|
return []*pb.ResourceDescriptor{
|
|
{Kind: "identities", Title: "Identities", ApplyMode: "domain-managed", QueryService: stateService + "/ListIdentities,GetIdentity", CommandService: stateService + "/CreateIdentity,RenameIdentity,SuspendIdentity,ReactivateIdentity,RetireIdentity"},
|
|
{Kind: "capture-events", Title: "Captured events", ApplyMode: "domain-managed", QueryService: stateService + "/StreamCaptures", CommandService: stateService + "/InsertCapture"},
|
|
{Kind: "capture-mappings", Title: "Capture mappings", ApplyMode: "domain-managed", QueryService: stateService + "/ListMappings", CommandService: stateService + "/InsertMapping,UpdateMapping,DeleteMapping"},
|
|
{Kind: "capture-bindings", Title: "Capture bindings", ApplyMode: "domain-managed", QueryService: stateService + "/ListBindings", CommandService: stateService + "/InsertBinding,UpdateBinding,DeleteBinding"},
|
|
}
|
|
}
|