Schedules leave the schedules control-plane resource for State Store tables behind a ScheduleService contract. A run is claimed per schedule slot, missed slots fire once, the next run stays on the schedule's grid, cron is read in the schedule-settings time zone, and failed runs are recorded and advance. Three failures in a row raise a schedule.failing alert. A fired run records a schedule-fired capture. Run history is pruned by age and count. Removes the chat and spawn-task runners, the dangerous-payload guard and the old schedules settings page.
25 lines
2.0 KiB
Go
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, settings map[string]any) []Definition {
|
|
definitions := []Definition{taskPolicyDefinition(), workflowDefinition(), workflowDefinitionsDefinition(steps, settings), workflowDraftsDefinition(), workflowEnablementDefinition(), 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"},
|
|
}
|
|
}
|