import { ContentItem } from '../../content/content.type'; /** Authored state entry inside a request-type definition (translator D1). */ export interface PeopleRequestTypeStateDef { key: string; kind: 'initial' | 'terminal' | 'regular'; businessMeaning?: string; availableActionRefs?: string[]; /** Reactions — definition fields (FR-010s): on_entry[] / await[] / sla. */ onEntry?: unknown[]; await?: unknown[]; sla?: unknown; [key: string]: unknown; } /** Authored action entry (S1–S14 chain vocabulary). */ export interface PeopleRequestTypeActionDef { key: string; intent?: string; invocationScope?: 'User-callable' | 'System-only'; permissionRef?: string; actorRuleRef?: string | null; validatorRefs?: string[]; requiredInputEvidence?: string[]; executor?: Record | null; stateChanges?: Record; [key: string]: unknown; } /** The authored definition tree — one frozen world per version (RT-21). */ export interface PeopleRequestTypeDefinition { contentFields?: unknown[]; processOutcomes?: Array<{ outcomeKey: string; name?: string; businessMeaning?: string; }>; states: PeopleRequestTypeStateDef[]; actions: PeopleRequestTypeActionDef[]; validators?: unknown[]; outcomeSpawns?: unknown[]; supportingConfig?: Record; [key: string]: unknown; } /** Catalogue finding from validate/publish (CS/AC/VA/SP/RC series). */ export interface PeopleDefinitionFinding { id?: string; severity?: string; message?: string; [key: string]: unknown; } export interface PeopleDefinitionValidationResult { passed?: boolean; checkedAt?: string; findings?: PeopleDefinitionFinding[]; [key: string]: unknown; } /** `request_type` row payload (registry §3.19). */ export interface PeopleRequestTypeData { /** snake_case `^[a-z][a-z0-9_]*$` — becomes the generated CT name. */ typeKey: string; /** Owning process_type; null = standalone lane (spine §7.5). */ ownerTypeKey?: string | null; sotType?: string; /** Empty in the interim (drift D-5) — the publisher stamps it. */ sotRef?: { repo?: string; artifactPath?: string; revision?: string; } | Record; /** Canonical hash of the definition — stamped at publish. */ version?: string | null; canonicalHash?: string | null; definition: PeopleRequestTypeDefinition; validationResult?: PeopleDefinitionValidationResult; /** Last safe-test trace (scenario → S1–S14 steps, simulated capabilities). */ sandbox?: Record; /** Publish products for the FEAT-015 generated-pack install path. */ generated?: Record; verify?: { badge?: 'GREEN' | 'DRIFT'; checkedAt?: string; } | Record; /** Derived count of in-flight requests pinned to this version (RT-21). */ activePins?: number; state: 'draft' | 'validated' | 'published' | 'superseded' | 'decommissioned'; } export type PeopleRequestType = ContentItem; /** `registered_capability` row payload — the 9-field contract (registry §3.20). */ export interface PeopleRegisteredCapabilityData { capabilityKey: string; /** `"module:function"` PROCESSOR of the owning pack/domain (importlib dispatch). */ providerRef: string; /** Target object family, e.g. `m365_mailbox`. */ targetType: string; /** Operation verb. */ operation: string; inputContract: Record; outputContract: Record; /** Contexts allowed to invoke (`request:`); empty = unrestricted (AC-09). */ allowedContexts?: string[]; /** false ⇒ Safe Test runs simulated + flagged. */ supportsTestMode?: boolean; /** `required` ⇒ re-invocation after executor failure must be safe (US10 TC3). */ idempotencyRequirement?: 'none' | 'required'; state: 'draft' | 'published' | 'superseded'; } export type PeopleRegisteredCapability = ContentItem; /** Cross-domain automation action — ONLY spawn | capability | notify (SP-14). */ export interface PeopleGlueRuleAction { kind: 'spawn' | 'capability' | 'notify'; target: string; inputBindings?: Record; [key: string]: unknown; } /** `glue_rule` row payload (registry §3.24). P9 sync product — never hand-authored. */ export interface PeopleGlueRuleData { /** Grammar `glue...` — ordinal from `orderKey` (GEN-10). */ ruleKey: string; /** uuid of the owning `policy` registry row. */ policyRef: string; /** Git path of the owning artifact — empty interim (Option A, drift D-5). */ artifactRef?: string | null; /** Policy canonical-hash version this handle was synced from (verify walks it). */ sourceVersion?: string | null; domain?: string; trigger: { type: 'domain_event' | 'external_signal' | 'cron'; params: Record; }; /** ONE-layer side-effect-free predicate (RC-02 whitelist DSL). */ guard?: Record | null; actions: PeopleGlueRuleAction[]; orderKey?: number; /** Display mirror of state — the handler reads the STATE (D3). */ enabled?: boolean; /** Default `rule_event` — spawn keys on `(ruleKey, event_id)` (RC-10). */ idempotencyScope?: string; lastInvokedAt?: string | null; disabledAt?: string | null; disabledReason?: string | null; tombstonedAt?: string | null; state: 'draft' | 'published' | 'disabled' | 'superseded' | 'removed'; /** Last verify badge (GREEN/DRIFT/STALE) — written by `verify_glue_rule`, * mirrors the policy `verify.badge` shape (api_references §5e). */ verify?: { badge?: string; checkedAt?: string | null; provenance?: string[]; } | null; } export type PeopleGlueRule = ContentItem; /** Authored phase entry inside a process definition (PC-04 linear). */ export interface PeopleProcessPhaseDef { name: string; /** Resolves in the same repo's composition policy (PC-08). */ entryRuleRef?: string | null; manual?: boolean; [key: string]: unknown; } /** Terminal status → success/partial/fail + business label (PC-04). */ export interface PeopleProcessOverallOutcomes extends Record { } /** The authored process tree — the FEAT-014 twin of the 010/011 trees. */ export interface PeopleProcessDefinition { typeKey?: string; name?: string; phases?: PeopleProcessPhaseDef[]; overallOutcomes?: PeopleProcessOverallOutcomes; subjectType?: string; compositionPolicyKey?: string | null; artifactTypes?: string[]; compositionEntries?: Array>; [key: string]: unknown; } /** Validate/publish finding (PC-01..08 + SP-13 series). */ export interface PeopleProcessFinding { id?: string; severity?: 'block' | 'warn' | string; path?: string; message?: string; [key: string]: unknown; } /** * `process_type` row payload (registry §4.6) — T1 definition holder. * Lifecycle: draft → validated → published → superseded → decommissioned. */ export interface PeopleProcessTypeData { /** snake_case `^[a-z][a-z0-9_]*$` — feeds the rule-key grammar. */ typeKey: string; name?: string; /** Owning process repo URL+branch; empty interim (row-plane). */ repoRef?: string | null; artifactPath?: string | null; sotType?: string; sotRef?: { repo?: string; path?: string; revision?: string; } | Record; /** Canonical-hash version stamp — set at publish. */ version?: string | null; canonicalHash?: string | null; manifestRef?: string | null; /** INTERIM authored tree until the publisher stamps SOT pointers. */ artifact?: PeopleProcessDefinition; phases?: PeopleProcessPhaseDef[]; overallOutcomes?: PeopleProcessOverallOutcomes; subjectType?: string; compositionPolicyKey?: string | null; artifactTypes?: string[]; /** Derived read-only — instances currently pinning this version. */ activePins?: string[]; validationResult?: { passed?: boolean; checkedAt?: string; findings?: PeopleProcessFinding[]; }; verify?: { badge?: 'GREEN' | 'DRIFT' | 'STALE'; checkedAt?: string; reason?: string; } & Record; generated?: Record; state: 'draft' | 'validated' | 'published' | 'superseded' | 'decommissioned'; } export type PeopleProcessType = ContentItem; /** One spawned-request slot in the `process_instance` registry (D2). */ export interface PeopleSpawnedRequestSlot { typeKey?: string; slot?: string; requestUuid?: string; requestState?: string; holder?: boolean; pinnedVersion?: string; phase?: string; waitTerminal?: boolean; [key: string]: unknown; } /** RT-21 snapshot pins frozen at start — handlers read ONLY this. */ export interface PeopleProcessSnapshot { typeSha?: string; phases?: PeopleProcessPhaseDef[]; overallOutcomes?: PeopleProcessOverallOutcomes; subjectType?: string; spawnSets?: Record>>; policy?: { policyRef?: string; policySha?: string; policyKey?: string; compositionEntries?: Array>; versions?: Record; } & Record; [key: string]: unknown; } /** US5 completion record — written once at completed. */ export interface PeopleCompletionRecord { overallOutcome?: 'success' | 'partial' | 'fail' | string; completedAt?: string; subjectRef?: string; requests?: Array<{ uuid?: string; typeKey?: string; slot?: string; terminalState?: string; outcome?: string; }>; artifacts?: Array>; [key: string]: unknown; } /** US6 cancellation — everything produced is LISTED, never dropped. */ export interface PeopleProcessCancellation { at?: string; by?: string; reason?: string | null; producedListing?: Array>; propagatedToRequests?: number; [key: string]: unknown; } /** D4 phase-hold bookkeeping — a FIELD, not a state machine. */ export interface PeopleProcessHold { phase?: string; failedSlots?: string[]; reason?: string; detectedAt?: string; [key: string]: unknown; } /** * `process_instance` row payload (registry §4.8) — the generic runtime * ledger. Lifecycle: draft → processing → completed | failed | cancelled; * `degraded` is a flag, phase transitions are NEVER invocable (RT-19). */ export interface PeopleProcessInstanceData { typeKey?: string; /** uuid of the published process_type row pinned at start. */ processTypeRef: string; subjectRef: string; snapshot?: PeopleProcessSnapshot; currentPhase?: string | null; spawnedRequests?: PeopleSpawnedRequestSlot[]; degraded?: boolean; hold?: PeopleProcessHold; completionRecord?: PeopleCompletionRecord; cancellation?: PeopleProcessCancellation; deferDecisions?: Record; startedAt?: string | null; completedAt?: string | null; state: 'draft' | 'processing' | 'completed' | 'failed' | 'cancelled'; } export type PeopleProcessInstance = ContentItem; //# sourceMappingURL=ct.types.d.ts.map