Files
archie/internal/infrastructure/controlplanestore/definitions.go
T
sam 41f44c43a1 feat(workflow): issue routing is a control-plane setting edited in the dashboard (#1959)
Label to workflow rules and a default workflow are the intake-routes
resource: ordered, case-insensitive, first rule wins, seeded with bug to
tdd, feature to feasibility, default triage. A write naming an undefined
workflow or an empty label is refused. The daemon reads it through the
workflow definitions client when pinning a task and at intake.

The kind indirection only carried this routing, so it is removed: the
per-kind NATS subjects (every consumer already bound archie.task.>) are
one subject, the envelope and playbook triggers lose their kind, and
x-intake-routes is dropped. The dashboard gets an Issue routing page
under Automation; the trigger card reads the same setting.
2026-11-13 20:28:52 +11:00

25 lines
2.0 KiB
Go

package controlplanestore
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/infrastructure/controlplanestore/schema.go).
func builtinDefinitions(steps workflow.StepRegistry, types map[string]workflow.StepType) []Definition {
definitions := []Definition{taskPolicyDefinition(), workflowDefinition(), workflowDefinitionsDefinition(steps, types), workflowDraftsDefinition(), workflowEnablementDefinition(), intakeRoutesDefinition(), curatorDefinition(), soulDefinition(), agentProfileDefinition(), playbooksDefinition(), skillsDefinition(), credentialBindingsDefinition(), identityGrantsDefinition(), orgModelPolicyDefinition(), forgeConnectionsDefinition()}
definitions = append(definitions, modelDefinitions()...)
definitions = append(definitions, operationalDefinitions()...)
return definitions
}
func domainManagedDescriptors() []*pb.ResourceDescriptor {
return []*pb.ResourceDescriptor{
{Kind: "identities", Title: "Identities", ApplyMode: "domain-managed", QueryService: "state.v1.IdentityService/ListIdentities,GetIdentity", CommandService: "state.v1.IdentityService/CreateIdentity,RenameIdentity,SuspendIdentity,ReactivateIdentity,RetireIdentity"},
{Kind: "capture-events", Title: "Captured events", ApplyMode: "domain-managed", QueryService: "state.v1.CaptureService/StreamCaptures", CommandService: "state.v1.CaptureService/InsertCapture"},
{Kind: "capture-mappings", Title: "Capture mappings", ApplyMode: "domain-managed", QueryService: "state.v1.MappingService/ListMappings", CommandService: "state.v1.MappingService/InsertMapping,UpdateMapping,DeleteMapping"},
{Kind: "capture-bindings", Title: "Capture bindings", ApplyMode: "domain-managed", QueryService: "state.v1.BindingService/ListBindings", CommandService: "state.v1.BindingService/InsertBinding,UpdateBinding,DeleteBinding"},
}
}