The Web UI and messaging channels now read and write Archie's runtime settings through one versioned, audited control-plane API hosted on the State Store's existing gRPC server: catalog, query, command, watch. Each feature owns its resource, validation and commands; storage only writes versions and audit records. Workflows move with it. Definitions become portable YAML compiled through a closed, typed step registry and stored as a control-plane resource, so the yaegi interpretation paths (internal/gate, wfeval, wfextract, gateeval, gateextract, skillbuild) are deleted rather than carried. The UI process reads definitions as data: the JSON projection lives in internal/domain/workflow/task so a dashboard decodes the stored collection without linking the workflow engine, which cmd/archie-ui's deletion gate forbids. Shipped definitions ride the catalog descriptor rather than a bespoke REST route, keeping the API to its four operations. archie-messaging gains -state-store-target/-state-store-token and reads channel settings from the database, failing closed when the State Store is unreachable: the database is authoritative for those settings.
26 lines
1.5 KiB
Go
26 lines
1.5 KiB
Go
package controlplane
|
|
|
|
import pb "github.com/samcharles93/archie-core/internal/contracts/controlplane/v1"
|
|
|
|
const (
|
|
objectSchema = `{"type":"object"}`
|
|
arraySchema = `{"type":"array"}`
|
|
)
|
|
|
|
func builtinDefinitions() []Definition {
|
|
definitions := []Definition{workflowDefinition(), workflowDefinitionsDefinition(), personaDefinition(), scheduleDefinition()}
|
|
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"},
|
|
}
|
|
}
|