codex-workflow-v2 2.0.0-beta.2 → 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/dist/src/alpha6/adoption.js +13 -3
- package/dist/src/alpha6/adoption.js.map +1 -1
- package/dist/src/alpha6/handoff.d.ts +21 -0
- package/dist/src/alpha6/handoff.js +100 -19
- package/dist/src/alpha6/handoff.js.map +1 -1
- package/dist/src/alpha6/milestone.d.ts +2 -0
- package/dist/src/alpha6/milestone.js +15 -0
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/plan-risk.d.ts +1 -0
- package/dist/src/alpha6/plan-risk.js +6 -0
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/cli.js +188 -65
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +111 -5
- package/dist/src/contracts.js +1 -1
- package/dist/src/credential-output.d.ts +10 -0
- package/dist/src/credential-output.js +73 -0
- package/dist/src/credential-output.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
- package/dist/src/lifecycle/canonical-hash.js +24 -0
- package/dist/src/lifecycle/canonical-hash.js.map +1 -0
- package/dist/src/lifecycle/catalog.d.ts +26 -0
- package/dist/src/lifecycle/catalog.js +208 -0
- package/dist/src/lifecycle/catalog.js.map +1 -0
- package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
- package/dist/src/lifecycle/compiler-inspection.js +29 -0
- package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
- package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
- package/dist/src/lifecycle/core-static-readiness.js +130 -0
- package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
- package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
- package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
- package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js +534 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
- package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
- package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
- package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
- package/dist/src/lifecycle/corrective-replan.js +548 -0
- package/dist/src/lifecycle/corrective-replan.js.map +1 -0
- package/dist/src/lifecycle/evaluator.d.ts +2 -0
- package/dist/src/lifecycle/evaluator.js +35 -0
- package/dist/src/lifecycle/evaluator.js.map +1 -0
- package/dist/src/lifecycle/fingerprint.d.ts +31 -0
- package/dist/src/lifecycle/fingerprint.js +388 -0
- package/dist/src/lifecycle/fingerprint.js.map +1 -0
- package/dist/src/lifecycle/immutable.d.ts +1 -0
- package/dist/src/lifecycle/immutable.js +10 -0
- package/dist/src/lifecycle/immutable.js.map +1 -0
- package/dist/src/lifecycle/implementation-table.d.ts +29 -0
- package/dist/src/lifecycle/implementation-table.js +87 -0
- package/dist/src/lifecycle/implementation-table.js.map +1 -0
- package/dist/src/lifecycle/index.d.ts +4 -0
- package/dist/src/lifecycle/index.js +5 -0
- package/dist/src/lifecycle/index.js.map +1 -0
- package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
- package/dist/src/lifecycle/schema-artifact.js +214 -0
- package/dist/src/lifecycle/schema-artifact.js.map +1 -0
- package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
- package/dist/src/lifecycle/semantic-registry.js +489 -0
- package/dist/src/lifecycle/semantic-registry.js.map +1 -0
- package/dist/src/lifecycle/types.d.ts +718 -0
- package/dist/src/lifecycle/types.js +4 -0
- package/dist/src/lifecycle/types.js.map +1 -0
- package/dist/src/observation.d.ts +20 -0
- package/dist/src/observation.js +171 -0
- package/dist/src/observation.js.map +1 -0
- package/dist/src/state/corrective-replan-executor.d.ts +64 -0
- package/dist/src/state/corrective-replan-executor.js +598 -0
- package/dist/src/state/corrective-replan-executor.js.map +1 -0
- package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
- package/dist/src/state/corrective-replan-public-schema.js +43 -0
- package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
- package/dist/src/state/corrective-replan-public.d.ts +95 -0
- package/dist/src/state/corrective-replan-public.js +618 -0
- package/dist/src/state/corrective-replan-public.js.map +1 -0
- package/dist/src/state/corrective-replan-transaction.d.ts +158 -0
- package/dist/src/state/corrective-replan-transaction.js +723 -0
- package/dist/src/state/corrective-replan-transaction.js.map +1 -0
- package/dist/src/state/corrective-yield-executor.d.ts +31 -0
- package/dist/src/state/corrective-yield-executor.js +236 -0
- package/dist/src/state/corrective-yield-executor.js.map +1 -0
- package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
- package/dist/src/state/corrective-yield-transaction.js +591 -0
- package/dist/src/state/corrective-yield-transaction.js.map +1 -0
- package/dist/src/state/lock.d.ts +75 -3
- package/dist/src/state/lock.js +582 -30
- package/dist/src/state/lock.js.map +1 -1
- package/dist/src/state/store.d.ts +3 -0
- package/dist/src/state/store.js +65 -12
- package/dist/src/state/store.js.map +1 -1
- package/dist/src/transition-core.d.ts +67 -0
- package/dist/src/transition-core.js +318 -0
- package/dist/src/transition-core.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflow.d.ts +34 -22
- package/dist/src/workflow.js +486 -141
- package/dist/src/workflow.js.map +1 -1
- package/docs/lifecycle/state-machine-stabilization.md +641 -0
- package/docs/release.md +4 -2
- package/docs/updating-existing-project.md +9 -0
- package/package.json +4 -1
- package/schemas/adoption-posture-event.schema.json +1 -1
- package/schemas/context-envelope.schema.json +1 -1
- package/schemas/corrective-replan-credentials.private.schema.json +98 -0
- package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
- package/schemas/corrective-replan-public.schema.json +142 -0
- package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
- package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
- package/schemas/remediation-event.schema.json +11 -1
- package/schemas/task-handoff-event.schema.json +1 -1
- package/schemas/transition-definition.schema.json +2609 -0
- package/schemas/transition-payloads.schema.json +140 -0
|
@@ -0,0 +1,718 @@
|
|
|
1
|
+
import type { MilestoneStatus, StepStatus, TaskStatus, WorkflowRole } from '../contracts.js';
|
|
2
|
+
export declare const LIFECYCLE_EPOCH: 2;
|
|
3
|
+
export declare const TRANSITION_DEFINITION_FORMAT_VERSION: 4;
|
|
4
|
+
export declare const TRANSITION_CATALOG_FORMAT_VERSION: 4;
|
|
5
|
+
export type TransitionId = `task.${string}` | `milestone.${string}` | `project.${string}` | `discovery.${string}`;
|
|
6
|
+
export type GuardId = `${string}.${string}`;
|
|
7
|
+
export type EffectId = `effect.${string}`;
|
|
8
|
+
export type PostconditionId = `postcondition.${string}`;
|
|
9
|
+
export type RaceId = `race.${string}`;
|
|
10
|
+
export type RevalidationId = `revalidation.${string}`;
|
|
11
|
+
export type JournalPhaseId = `journal-phase.${string}`;
|
|
12
|
+
export type RecoveryStepId = `recovery-step.${string}`;
|
|
13
|
+
export type LimitationId = `limitation.${string}`;
|
|
14
|
+
export type EvidenceId = `evidence.${string}`;
|
|
15
|
+
export type ReadinessRuleId = `readiness.${string}`;
|
|
16
|
+
export type InputId = `input.${string}`;
|
|
17
|
+
export type SchemaId = `schema.${string}`;
|
|
18
|
+
export type ProjectionId = `projection.${string}`;
|
|
19
|
+
export type ProjectionFieldId = `field.${string}`;
|
|
20
|
+
export type HashPolicyId = `hash-policy.${string}`;
|
|
21
|
+
export type IdentityId = `identity.${string}`;
|
|
22
|
+
export type IdentityComparatorId = `identity-comparator.${string}`;
|
|
23
|
+
export type PrincipalBasisId = `principal-basis.${string}`;
|
|
24
|
+
export type CapabilityId = `capability.${string}`;
|
|
25
|
+
export type CredentialPolicyId = `credential-policy.${string}`;
|
|
26
|
+
export type CredentialVerifierId = `credential-verifier.${string}`;
|
|
27
|
+
export type ClockId = `clock.${string}`;
|
|
28
|
+
export type DelegationPolicyId = `delegation.${string}`;
|
|
29
|
+
export type OwnershipPolicyId = `ownership.${string}`;
|
|
30
|
+
export type GuardEvaluatorId = `guard-evaluator.${string}`;
|
|
31
|
+
export type EffectAdapterId = `effect-adapter.${string}`;
|
|
32
|
+
export type ResourceId = `resource.${string}`;
|
|
33
|
+
export type LockPolicyId = `lock-policy.${string}`;
|
|
34
|
+
export type ExecutionKeyPolicyId = `execution-key-policy.${string}`;
|
|
35
|
+
export type JournalSchemaId = `journal-schema.${string}`;
|
|
36
|
+
export type JournalAdapterId = `journal-adapter.${string}`;
|
|
37
|
+
export type RecoveryAdapterId = `recovery-adapter.${string}`;
|
|
38
|
+
export type ReadbackAdapterId = `readback-adapter.${string}`;
|
|
39
|
+
export type ReleaseProfileId = `release-profile.${string}`;
|
|
40
|
+
export type CoverageProfileId = `coverage-profile.${string}`;
|
|
41
|
+
export type CoverageProducerId = `coverage-producer.${string}`;
|
|
42
|
+
export type SemanticRuleId = `semantic-rule.${string}`;
|
|
43
|
+
export type SemanticObligationId = `obligation.${string}`;
|
|
44
|
+
export interface RegisteredRef<TId extends string> {
|
|
45
|
+
readonly id: TId;
|
|
46
|
+
readonly version: number;
|
|
47
|
+
}
|
|
48
|
+
export type RegisteredInputRef = RegisteredRef<InputId>;
|
|
49
|
+
export type RegisteredSchemaRef = RegisteredRef<SchemaId>;
|
|
50
|
+
export type RegisteredProjectionRef = RegisteredRef<ProjectionId>;
|
|
51
|
+
export type RegisteredHashPolicyRef = RegisteredRef<HashPolicyId>;
|
|
52
|
+
export type RegisteredIdentityRef = RegisteredRef<IdentityId>;
|
|
53
|
+
export type RegisteredIdentityComparatorRef = RegisteredRef<IdentityComparatorId>;
|
|
54
|
+
export type RegisteredPrincipalBasisRef = RegisteredRef<PrincipalBasisId>;
|
|
55
|
+
export type RegisteredCapabilityRef = RegisteredRef<CapabilityId>;
|
|
56
|
+
export type RegisteredCredentialPolicyRef = RegisteredRef<CredentialPolicyId>;
|
|
57
|
+
export type RegisteredCredentialVerifierRef = RegisteredRef<CredentialVerifierId>;
|
|
58
|
+
export type RegisteredClockRef = RegisteredRef<ClockId>;
|
|
59
|
+
export type RegisteredDelegationPolicyRef = RegisteredRef<DelegationPolicyId>;
|
|
60
|
+
export type RegisteredOwnershipPolicyRef = RegisteredRef<OwnershipPolicyId>;
|
|
61
|
+
export type RegisteredGuardEvaluatorRef = RegisteredRef<GuardEvaluatorId>;
|
|
62
|
+
export type RegisteredEffectAdapterRef = RegisteredRef<EffectAdapterId>;
|
|
63
|
+
export type RegisteredResourceRef = RegisteredRef<ResourceId>;
|
|
64
|
+
export type RegisteredLockPolicyRef = RegisteredRef<LockPolicyId>;
|
|
65
|
+
export type RegisteredExecutionKeyPolicyRef = RegisteredRef<ExecutionKeyPolicyId>;
|
|
66
|
+
export type RegisteredJournalSchemaRef = RegisteredRef<JournalSchemaId>;
|
|
67
|
+
export type RegisteredJournalAdapterRef = RegisteredRef<JournalAdapterId>;
|
|
68
|
+
export type RegisteredRecoveryAdapterRef = RegisteredRef<RecoveryAdapterId>;
|
|
69
|
+
export type RegisteredReadbackAdapterRef = RegisteredRef<ReadbackAdapterId>;
|
|
70
|
+
export type RegisteredReleaseProfileRef = RegisteredRef<ReleaseProfileId>;
|
|
71
|
+
export type RegisteredCoverageProfileRef = RegisteredRef<CoverageProfileId>;
|
|
72
|
+
export type RegisteredCoverageProducerRef = RegisteredRef<CoverageProducerId>;
|
|
73
|
+
export type RegisteredLimitationRef = RegisteredRef<LimitationId>;
|
|
74
|
+
export type RegisteredSemanticRuleRef = RegisteredRef<SemanticRuleId>;
|
|
75
|
+
export interface ProjectionSliceRef {
|
|
76
|
+
readonly projection: RegisteredProjectionRef;
|
|
77
|
+
readonly fieldIds: readonly ProjectionFieldId[];
|
|
78
|
+
}
|
|
79
|
+
export interface ProjectionFieldRef {
|
|
80
|
+
readonly projection: RegisteredProjectionRef;
|
|
81
|
+
readonly fieldId: ProjectionFieldId;
|
|
82
|
+
}
|
|
83
|
+
export type LifecycleEntity = 'project' | 'project-memory' | 'discovery' | 'task' | 'milestone' | 'step';
|
|
84
|
+
export type LifecycleScope = 'repository' | 'project' | 'entity' | 'task-step';
|
|
85
|
+
export type NavigationKind = 'executable' | 'choice' | 'human-gate' | 'wait' | 'repair' | 'blocked';
|
|
86
|
+
export type NavigationMode = 'exact' | 'advisory';
|
|
87
|
+
export type TransitionEvaluationPhase = 'availability' | 'execution';
|
|
88
|
+
export type TransitionGuardPhase = TransitionEvaluationPhase;
|
|
89
|
+
export type TransitionGuardStage = 'observation' | 'authority' | 'candidate';
|
|
90
|
+
export type TransitionGuardReasonClass = 'lifecycle-blocker' | 'authority-blocker' | 'candidate-blocker' | 'external-race' | 'integrity-failure';
|
|
91
|
+
export type LifecycleRole = WorkflowRole | 'human-principal' | 'plan-validator' | 'milestone-coordinator' | 'delegate-coordinator' | 'c1-claimant' | 'corrective-auditor' | 'workflow-core' | 'update-migration-operator';
|
|
92
|
+
export type PrincipalKind = 'human' | 'workflow-core' | 'delegation-grant' | 'update-operator';
|
|
93
|
+
export type ExecutionBoundary = 'human' | 'coordinator' | 'worker' | 'reviewer' | 'auditor' | 'workflow-core' | 'update-operator';
|
|
94
|
+
export interface TransitionCommandContract {
|
|
95
|
+
readonly command: string;
|
|
96
|
+
readonly noun: string;
|
|
97
|
+
readonly action: string;
|
|
98
|
+
}
|
|
99
|
+
export interface RegisteredInputRequirement {
|
|
100
|
+
readonly input: RegisteredInputRef;
|
|
101
|
+
readonly phase: TransitionEvaluationPhase;
|
|
102
|
+
readonly required: boolean;
|
|
103
|
+
readonly sensitivity: 'public' | 'sensitive';
|
|
104
|
+
}
|
|
105
|
+
export interface RegisteredOutputRequirement {
|
|
106
|
+
readonly outputId: `output.${string}`;
|
|
107
|
+
readonly channel: 'navigation' | 'result' | 'credential-receipt';
|
|
108
|
+
readonly sensitivity: 'public' | 'redacted' | 'issuance-only' | 'internal';
|
|
109
|
+
readonly required: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface TransitionSourcePosture {
|
|
112
|
+
readonly taskStatuses: readonly TaskStatus[];
|
|
113
|
+
readonly milestoneStatuses: readonly MilestoneStatus[];
|
|
114
|
+
readonly stepStatuses: readonly StepStatus[];
|
|
115
|
+
readonly correctivePostures: readonly string[];
|
|
116
|
+
}
|
|
117
|
+
export interface TransitionGuardMetadata {
|
|
118
|
+
readonly guardId: GuardId;
|
|
119
|
+
readonly semanticVersion: number;
|
|
120
|
+
readonly phase: TransitionGuardPhase;
|
|
121
|
+
readonly stage: TransitionGuardStage;
|
|
122
|
+
readonly reasonClass: TransitionGuardReasonClass;
|
|
123
|
+
readonly evaluator: RegisteredGuardEvaluatorRef;
|
|
124
|
+
readonly reads: readonly ProjectionSliceRef[];
|
|
125
|
+
readonly requiredInputs: readonly RegisteredInputRef[];
|
|
126
|
+
readonly description: string;
|
|
127
|
+
}
|
|
128
|
+
export interface TransitionActorContract {
|
|
129
|
+
readonly identity: RegisteredIdentityRef;
|
|
130
|
+
readonly principalBasis: RegisteredPrincipalBasisRef;
|
|
131
|
+
readonly required: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface TransitionPrincipalContract {
|
|
134
|
+
readonly identity: RegisteredIdentityRef;
|
|
135
|
+
readonly principalBasis: RegisteredPrincipalBasisRef;
|
|
136
|
+
readonly issuer: RegisteredIdentityRef;
|
|
137
|
+
readonly allowedKinds: readonly PrincipalKind[];
|
|
138
|
+
}
|
|
139
|
+
export interface TransitionCapabilityRequirement {
|
|
140
|
+
readonly capability: RegisteredCapabilityRef;
|
|
141
|
+
readonly source: 'catalog' | 'principal' | 'credential' | 'state';
|
|
142
|
+
readonly required: boolean;
|
|
143
|
+
}
|
|
144
|
+
export interface TransitionIdentityGuardEnforcement {
|
|
145
|
+
readonly kind: 'guard';
|
|
146
|
+
readonly guardId: GuardId;
|
|
147
|
+
readonly evaluator: RegisteredGuardEvaluatorRef;
|
|
148
|
+
}
|
|
149
|
+
export interface TransitionIdentityCredentialEnforcement {
|
|
150
|
+
readonly kind: 'credential-verifier';
|
|
151
|
+
readonly verifier: RegisteredCredentialVerifierRef;
|
|
152
|
+
}
|
|
153
|
+
export interface TransitionIdentityAttestationEnforcement {
|
|
154
|
+
readonly kind: 'attestation';
|
|
155
|
+
readonly input: RegisteredInputRef;
|
|
156
|
+
readonly verifier: RegisteredCredentialVerifierRef;
|
|
157
|
+
}
|
|
158
|
+
export type TransitionIdentityEnforcement = TransitionIdentityGuardEnforcement | TransitionIdentityCredentialEnforcement | TransitionIdentityAttestationEnforcement;
|
|
159
|
+
export interface TransitionSeparationOfDutyConstraint {
|
|
160
|
+
readonly constraintId: `sod.${string}`;
|
|
161
|
+
readonly left: RegisteredIdentityRef;
|
|
162
|
+
readonly right: RegisteredIdentityRef;
|
|
163
|
+
readonly relation: 'distinct' | 'same';
|
|
164
|
+
readonly missingIdentity: 'block' | 'integrity-failure';
|
|
165
|
+
readonly comparator: RegisteredIdentityComparatorRef;
|
|
166
|
+
readonly enforcement: TransitionIdentityEnforcement;
|
|
167
|
+
}
|
|
168
|
+
export interface TransitionForbiddenCombination {
|
|
169
|
+
readonly constraintId: `forbidden.${string}`;
|
|
170
|
+
readonly subjects: readonly RegisteredIdentityRef[];
|
|
171
|
+
readonly rule: 'cannot-authorize' | 'cannot-coexist' | 'cannot-delegate' | 'cannot-preserve';
|
|
172
|
+
readonly missingIdentity: 'block' | 'integrity-failure';
|
|
173
|
+
readonly comparator: RegisteredIdentityComparatorRef;
|
|
174
|
+
readonly enforcement: TransitionIdentityEnforcement;
|
|
175
|
+
}
|
|
176
|
+
export interface RegisteredAuthorityContract {
|
|
177
|
+
readonly eligibleRoles: readonly LifecycleRole[];
|
|
178
|
+
readonly actor: TransitionActorContract;
|
|
179
|
+
readonly principal: TransitionPrincipalContract;
|
|
180
|
+
readonly capabilities: readonly TransitionCapabilityRequirement[];
|
|
181
|
+
readonly credentials: readonly RegisteredCredentialPolicyRef[];
|
|
182
|
+
readonly delegation: RegisteredDelegationPolicyRef;
|
|
183
|
+
readonly ownership: RegisteredOwnershipPolicyRef;
|
|
184
|
+
readonly executionBoundaries: readonly ExecutionBoundary[];
|
|
185
|
+
readonly separationOfDuty: readonly TransitionSeparationOfDutyConstraint[];
|
|
186
|
+
readonly forbiddenCombinations: readonly TransitionForbiddenCombination[];
|
|
187
|
+
}
|
|
188
|
+
export interface TransitionStatusEffect<TStatus extends string> {
|
|
189
|
+
readonly from: readonly TStatus[];
|
|
190
|
+
readonly to: TStatus | 'input-dependent' | 'preserved';
|
|
191
|
+
}
|
|
192
|
+
export interface TransitionSupersessionContract {
|
|
193
|
+
readonly executionAuthorization: 'preserve' | 'supersede-approved' | 'invalidate';
|
|
194
|
+
readonly finalAcceptance: 'preserve' | 'supersede-approved' | 'invalidate';
|
|
195
|
+
readonly delegationGrants: 'preserve' | 'supersede' | 'invalidate';
|
|
196
|
+
readonly c1Claim: 'preserve' | 'supersede' | 'invalidate';
|
|
197
|
+
readonly writerLease: 'preserve' | 'release' | 'invalidate';
|
|
198
|
+
}
|
|
199
|
+
export type EffectCondition = {
|
|
200
|
+
readonly kind: 'input-present';
|
|
201
|
+
readonly input: RegisteredInputRef;
|
|
202
|
+
} | {
|
|
203
|
+
readonly kind: 'guard-passed';
|
|
204
|
+
readonly guardId: GuardId;
|
|
205
|
+
};
|
|
206
|
+
export interface TransitionEffectNode {
|
|
207
|
+
readonly effectId: EffectId;
|
|
208
|
+
readonly ordinal: number;
|
|
209
|
+
readonly adapter: RegisteredEffectAdapterRef;
|
|
210
|
+
readonly resource: RegisteredResourceRef;
|
|
211
|
+
readonly operation: 'stage' | 'write' | 'append' | 'publish' | 'replace' | 'delete' | 'preserve';
|
|
212
|
+
readonly conditions: readonly EffectCondition[];
|
|
213
|
+
readonly dependsOn: readonly EffectId[];
|
|
214
|
+
}
|
|
215
|
+
export interface TransitionPostcondition {
|
|
216
|
+
readonly postconditionId: PostconditionId;
|
|
217
|
+
readonly assertion: 'hash-equals' | 'revision-advanced' | 'status-equals' | 'event-appended' | 'path-absent';
|
|
218
|
+
readonly reads: readonly ProjectionSliceRef[];
|
|
219
|
+
readonly effectNodeIds: readonly EffectId[];
|
|
220
|
+
}
|
|
221
|
+
export interface OrderedEffectGraph {
|
|
222
|
+
readonly graphId: `effect-graph.${string}`;
|
|
223
|
+
readonly graphVersion: number;
|
|
224
|
+
readonly taskStatus: TransitionStatusEffect<TaskStatus>;
|
|
225
|
+
readonly milestoneStatus: TransitionStatusEffect<MilestoneStatus>;
|
|
226
|
+
readonly stepStatus: TransitionStatusEffect<StepStatus>;
|
|
227
|
+
readonly supersession: TransitionSupersessionContract;
|
|
228
|
+
readonly orderedNodes: readonly TransitionEffectNode[];
|
|
229
|
+
readonly postconditions: readonly TransitionPostcondition[];
|
|
230
|
+
}
|
|
231
|
+
export interface TransitionRevalidation {
|
|
232
|
+
readonly revalidationId: RevalidationId;
|
|
233
|
+
readonly ordinal: number;
|
|
234
|
+
readonly raceId: RaceId;
|
|
235
|
+
readonly guardId: GuardId;
|
|
236
|
+
readonly evaluator: RegisteredGuardEvaluatorRef;
|
|
237
|
+
readonly reads: readonly ProjectionSliceRef[];
|
|
238
|
+
readonly underLock: boolean;
|
|
239
|
+
}
|
|
240
|
+
export interface AdmissionBoundaryContract {
|
|
241
|
+
readonly lock: {
|
|
242
|
+
readonly policy: RegisteredLockPolicyRef;
|
|
243
|
+
readonly scope: ProjectionSliceRef;
|
|
244
|
+
};
|
|
245
|
+
readonly orderedRevalidations: readonly TransitionRevalidation[];
|
|
246
|
+
readonly firstEffectAfterRevalidation: true;
|
|
247
|
+
readonly release: 'finally-after-readback';
|
|
248
|
+
}
|
|
249
|
+
export interface RegisteredRacePrecondition {
|
|
250
|
+
readonly raceId: RaceId;
|
|
251
|
+
readonly reasonClass: 'external-race' | 'integrity-failure';
|
|
252
|
+
readonly guardId: GuardId;
|
|
253
|
+
readonly revalidationId: RevalidationId;
|
|
254
|
+
readonly reads: readonly ProjectionSliceRef[];
|
|
255
|
+
readonly allowedFailureCodes: readonly ('STATE_CONFLICT' | 'GIT_PRECONDITION_FAILED' | 'CREDENTIAL_EXPIRED' | 'STATE_CORRUPT')[];
|
|
256
|
+
}
|
|
257
|
+
export interface TransitionExecutionKeyContract {
|
|
258
|
+
readonly policy: RegisteredExecutionKeyPolicyRef;
|
|
259
|
+
readonly fields: readonly ProjectionFieldRef[];
|
|
260
|
+
readonly hashPolicy: RegisteredHashPolicyRef;
|
|
261
|
+
}
|
|
262
|
+
export interface TransitionReplayContract {
|
|
263
|
+
readonly identicalCompleted: 'return-recorded-result' | 'reject';
|
|
264
|
+
readonly identicalInProgress: 'resume-journal' | 'reject';
|
|
265
|
+
readonly conflicting: 'reject-state-conflict' | 'reject-transition-blocked';
|
|
266
|
+
}
|
|
267
|
+
export interface TransitionJournalPhase {
|
|
268
|
+
readonly phaseId: JournalPhaseId;
|
|
269
|
+
readonly ordinal: number;
|
|
270
|
+
readonly allowedNextPhaseIds: readonly JournalPhaseId[];
|
|
271
|
+
readonly terminal: boolean;
|
|
272
|
+
readonly durable: boolean;
|
|
273
|
+
readonly effectNodeIds: readonly EffectId[];
|
|
274
|
+
readonly digestFields: readonly ProjectionFieldRef[];
|
|
275
|
+
}
|
|
276
|
+
export type TransitionJournalContract = {
|
|
277
|
+
readonly mode: 'none';
|
|
278
|
+
} | {
|
|
279
|
+
readonly mode: 'required';
|
|
280
|
+
readonly schema: RegisteredJournalSchemaRef;
|
|
281
|
+
readonly adapter: RegisteredJournalAdapterRef;
|
|
282
|
+
readonly digestPolicy: RegisteredHashPolicyRef;
|
|
283
|
+
readonly orderedPhases: readonly TransitionJournalPhase[];
|
|
284
|
+
};
|
|
285
|
+
export interface TransitionRecoveryStep {
|
|
286
|
+
readonly stepId: RecoveryStepId;
|
|
287
|
+
readonly ordinal: number;
|
|
288
|
+
readonly fromPhaseId: JournalPhaseId;
|
|
289
|
+
readonly toPhaseId: JournalPhaseId;
|
|
290
|
+
}
|
|
291
|
+
export type TransitionRecoveryContract = {
|
|
292
|
+
readonly mode: 'manual-integrity-stop';
|
|
293
|
+
readonly fromPhaseIds: readonly JournalPhaseId[];
|
|
294
|
+
} | {
|
|
295
|
+
readonly mode: 'automatic-roll-forward' | 'automatic-roll-back';
|
|
296
|
+
readonly trigger: 'explicit-repair';
|
|
297
|
+
readonly adapter: RegisteredRecoveryAdapterRef;
|
|
298
|
+
readonly fromPhaseIds: readonly JournalPhaseId[];
|
|
299
|
+
readonly orderedSteps: readonly TransitionRecoveryStep[];
|
|
300
|
+
};
|
|
301
|
+
export interface TransitionReadbackContract {
|
|
302
|
+
readonly adapter: RegisteredReadbackAdapterRef;
|
|
303
|
+
readonly wiring: 'invoked-post-effect' | 'available-unwired';
|
|
304
|
+
readonly checkpoints: {
|
|
305
|
+
readonly preCompletion: 'domain-readback';
|
|
306
|
+
readonly postTerminal: 'terminal-readback';
|
|
307
|
+
};
|
|
308
|
+
readonly projection: RegisteredProjectionRef;
|
|
309
|
+
readonly postconditionIds: readonly PostconditionId[];
|
|
310
|
+
readonly resultDigestPolicy: RegisteredHashPolicyRef;
|
|
311
|
+
}
|
|
312
|
+
export interface ExecutionReliabilityContract {
|
|
313
|
+
readonly classification: 'read-only' | 'single-write' | 'journaled-multi-write' | 'non-transactional-multi-write';
|
|
314
|
+
readonly nonMutatingFailureGuarantee: 'all-guards-before-effects' | 'best-effort' | 'not-applicable';
|
|
315
|
+
readonly executionKey: TransitionExecutionKeyContract;
|
|
316
|
+
readonly replay: TransitionReplayContract;
|
|
317
|
+
readonly journal: TransitionJournalContract;
|
|
318
|
+
readonly recovery: TransitionRecoveryContract;
|
|
319
|
+
readonly readback: TransitionReadbackContract;
|
|
320
|
+
}
|
|
321
|
+
export interface TransitionNavigationMetadata {
|
|
322
|
+
readonly kind: NavigationKind;
|
|
323
|
+
readonly mode: NavigationMode;
|
|
324
|
+
readonly priority: number;
|
|
325
|
+
}
|
|
326
|
+
export interface TransitionEvidenceReference {
|
|
327
|
+
readonly evidenceId: EvidenceId;
|
|
328
|
+
readonly sha256: string;
|
|
329
|
+
}
|
|
330
|
+
export interface TransitionReadinessManifest {
|
|
331
|
+
readonly developmentStage: 'partial' | 'candidate' | 'withdrawn';
|
|
332
|
+
readonly releaseProfile: RegisteredReleaseProfileRef;
|
|
333
|
+
readonly coverageProfile: RegisteredCoverageProfileRef;
|
|
334
|
+
readonly limitations: readonly RegisteredLimitationRef[];
|
|
335
|
+
readonly evidence: readonly TransitionEvidenceReference[];
|
|
336
|
+
}
|
|
337
|
+
export interface TransitionTraceability {
|
|
338
|
+
readonly defectIds: readonly string[];
|
|
339
|
+
readonly invariantIds: readonly string[];
|
|
340
|
+
readonly positiveEvidence: readonly string[];
|
|
341
|
+
readonly hostileEvidence: readonly string[];
|
|
342
|
+
}
|
|
343
|
+
export interface TransitionDocumentation {
|
|
344
|
+
readonly summary: string;
|
|
345
|
+
}
|
|
346
|
+
export interface TransitionDefinitionMetadata {
|
|
347
|
+
readonly definitionFormatVersion: typeof TRANSITION_DEFINITION_FORMAT_VERSION;
|
|
348
|
+
readonly transitionId: TransitionId;
|
|
349
|
+
readonly guardNamespace: GuardId;
|
|
350
|
+
readonly lifecycleEpoch: typeof LIFECYCLE_EPOCH;
|
|
351
|
+
readonly entity: LifecycleEntity;
|
|
352
|
+
readonly scope: LifecycleScope;
|
|
353
|
+
readonly command: TransitionCommandContract;
|
|
354
|
+
readonly sourcePosture: TransitionSourcePosture;
|
|
355
|
+
readonly inputContract: readonly RegisteredInputRequirement[];
|
|
356
|
+
readonly snapshotContract: RegisteredProjectionRef;
|
|
357
|
+
readonly bindingContract: RegisteredProjectionRef;
|
|
358
|
+
readonly outputContract: readonly RegisteredOutputRequirement[];
|
|
359
|
+
readonly guards: readonly TransitionGuardMetadata[];
|
|
360
|
+
readonly authority: RegisteredAuthorityContract;
|
|
361
|
+
readonly effects: OrderedEffectGraph;
|
|
362
|
+
readonly admissionBoundary: AdmissionBoundaryContract;
|
|
363
|
+
readonly atomicity: ExecutionReliabilityContract;
|
|
364
|
+
readonly racePreconditions: readonly RegisteredRacePrecondition[];
|
|
365
|
+
readonly navigation: TransitionNavigationMetadata;
|
|
366
|
+
readonly executorAdapter: RegisteredEffectAdapterRef;
|
|
367
|
+
readonly readinessManifest: TransitionReadinessManifest;
|
|
368
|
+
readonly traceability: TransitionTraceability;
|
|
369
|
+
readonly documentation: TransitionDocumentation;
|
|
370
|
+
}
|
|
371
|
+
export interface TransitionGuardResult {
|
|
372
|
+
readonly guardId: GuardId;
|
|
373
|
+
readonly status: 'passed' | 'failed' | 'pending';
|
|
374
|
+
readonly passed: boolean;
|
|
375
|
+
readonly reasonCode: string;
|
|
376
|
+
readonly message: string;
|
|
377
|
+
}
|
|
378
|
+
export interface TransitionGuard<TSnapshot, TBindings> {
|
|
379
|
+
readonly metadata: TransitionGuardMetadata;
|
|
380
|
+
evaluate(snapshot: Readonly<TSnapshot>, bindings: Readonly<TBindings>): TransitionGuardResult;
|
|
381
|
+
}
|
|
382
|
+
export interface ExecutableTransitionDefinition<TSnapshot, TBindings> {
|
|
383
|
+
readonly metadata: TransitionDefinitionMetadata;
|
|
384
|
+
readonly runtimeSemanticFingerprint: string;
|
|
385
|
+
/** @deprecated Protocol-v1 compatibility alias. Must equal runtimeSemanticFingerprint. */
|
|
386
|
+
readonly semanticFingerprint: string;
|
|
387
|
+
readonly definitionManifestHash: string;
|
|
388
|
+
readonly guards: readonly TransitionGuard<TSnapshot, TBindings>[];
|
|
389
|
+
}
|
|
390
|
+
export interface TransitionEvaluation<TBindings> {
|
|
391
|
+
readonly transitionId: TransitionId;
|
|
392
|
+
/** @deprecated Protocol-v1 compatibility alias for runtimeSemanticFingerprint. */
|
|
393
|
+
readonly semanticFingerprint: string;
|
|
394
|
+
readonly phase: TransitionEvaluationPhase;
|
|
395
|
+
readonly allowed: boolean;
|
|
396
|
+
readonly bindings: Readonly<TBindings>;
|
|
397
|
+
readonly guardResults: readonly TransitionGuardResult[];
|
|
398
|
+
readonly blockingGuardIds: readonly GuardId[];
|
|
399
|
+
readonly pendingGuardIds: readonly GuardId[];
|
|
400
|
+
}
|
|
401
|
+
export interface ExecutableTransitionNavigation<TBindings> {
|
|
402
|
+
readonly kind: 'executable';
|
|
403
|
+
readonly transitionId: TransitionId;
|
|
404
|
+
readonly semanticFingerprint: string;
|
|
405
|
+
readonly command: string;
|
|
406
|
+
readonly bindings: Readonly<TBindings>;
|
|
407
|
+
readonly evaluationPhase: 'availability';
|
|
408
|
+
readonly pendingInputGuardIds: readonly GuardId[];
|
|
409
|
+
}
|
|
410
|
+
export interface HumanGateTransitionNavigation<TBindings> {
|
|
411
|
+
readonly kind: 'human-gate';
|
|
412
|
+
readonly transitionId: TransitionId;
|
|
413
|
+
readonly semanticFingerprint: string;
|
|
414
|
+
readonly command: string;
|
|
415
|
+
readonly bindings: Readonly<TBindings>;
|
|
416
|
+
readonly evaluationPhase: 'availability';
|
|
417
|
+
readonly pendingInputGuardIds: readonly GuardId[];
|
|
418
|
+
}
|
|
419
|
+
export interface BlockedTransitionNavigation {
|
|
420
|
+
readonly kind: 'blocked';
|
|
421
|
+
readonly transitionId: TransitionId;
|
|
422
|
+
readonly semanticFingerprint: string;
|
|
423
|
+
readonly command: string;
|
|
424
|
+
readonly blockingGuardIds: readonly GuardId[];
|
|
425
|
+
readonly pendingInputGuardIds: readonly GuardId[];
|
|
426
|
+
readonly reasonCode: string;
|
|
427
|
+
}
|
|
428
|
+
export interface SerializedTransitionDefinition extends TransitionDefinitionMetadata {
|
|
429
|
+
readonly runtimeSemanticFingerprint: string;
|
|
430
|
+
/** @deprecated Protocol-v1 compatibility alias. */
|
|
431
|
+
readonly semanticFingerprint: string;
|
|
432
|
+
readonly definitionManifestHash: string;
|
|
433
|
+
}
|
|
434
|
+
export type CoverageEvidenceKind = 'guard-positive' | 'guard-negative' | 'conditional-effect-true' | 'conditional-effect-false' | 'replay-identical-completed' | 'replay-identical-in-progress' | 'replay-conflicting' | 'journal-phase' | 'recovery-phase' | 'postcondition';
|
|
435
|
+
export interface VersionedRegistryEntry<TId extends string> {
|
|
436
|
+
readonly id: TId;
|
|
437
|
+
readonly version: number;
|
|
438
|
+
readonly description: string;
|
|
439
|
+
}
|
|
440
|
+
export interface SchemaRegistryEntry extends VersionedRegistryEntry<SchemaId> {
|
|
441
|
+
readonly valueKind: 'string' | 'integer' | 'object' | 'array';
|
|
442
|
+
}
|
|
443
|
+
export interface ProjectionRegistryEntry extends VersionedRegistryEntry<ProjectionId> {
|
|
444
|
+
readonly schema: RegisteredSchemaRef;
|
|
445
|
+
readonly fieldIds: readonly ProjectionFieldId[];
|
|
446
|
+
}
|
|
447
|
+
export interface InputRegistryEntry extends VersionedRegistryEntry<InputId> {
|
|
448
|
+
readonly source: 'binding' | 'operator-input' | 'credential';
|
|
449
|
+
readonly cliName: string;
|
|
450
|
+
readonly schema: RegisteredSchemaRef;
|
|
451
|
+
readonly projection: RegisteredProjectionRef;
|
|
452
|
+
readonly hashPolicy: RegisteredHashPolicyRef | null;
|
|
453
|
+
}
|
|
454
|
+
export interface HashPolicyRegistryEntry extends VersionedRegistryEntry<HashPolicyId> {
|
|
455
|
+
readonly algorithm: 'sha256';
|
|
456
|
+
readonly canonicalization: 'raw-bytes' | 'canonical-json' | 'normalized-identity';
|
|
457
|
+
}
|
|
458
|
+
export interface IdentityRegistryEntry extends VersionedRegistryEntry<IdentityId> {
|
|
459
|
+
readonly provider: {
|
|
460
|
+
readonly kind: 'projection';
|
|
461
|
+
readonly field: ProjectionFieldRef;
|
|
462
|
+
} | {
|
|
463
|
+
readonly kind: 'workflow-core';
|
|
464
|
+
} | {
|
|
465
|
+
readonly kind: 'unbound';
|
|
466
|
+
};
|
|
467
|
+
readonly normalization: RegisteredHashPolicyRef | null;
|
|
468
|
+
}
|
|
469
|
+
export interface IdentityComparatorRegistryEntry extends VersionedRegistryEntry<IdentityComparatorId> {
|
|
470
|
+
readonly transitionId: TransitionId;
|
|
471
|
+
readonly constraintId: `sod.${string}` | `forbidden.${string}`;
|
|
472
|
+
readonly operands: readonly RegisteredIdentityRef[];
|
|
473
|
+
readonly relation: 'distinct' | 'same' | 'cannot-authorize' | 'cannot-coexist' | 'cannot-delegate' | 'cannot-preserve';
|
|
474
|
+
readonly missingIdentity: 'block' | 'integrity-failure';
|
|
475
|
+
}
|
|
476
|
+
export interface PrincipalBasisRegistryEntry extends VersionedRegistryEntry<PrincipalBasisId> {
|
|
477
|
+
readonly principalKind: PrincipalKind;
|
|
478
|
+
readonly authoritySource: 'human-confirmation' | 'workflow-core-derived';
|
|
479
|
+
}
|
|
480
|
+
export interface CapabilityRegistryEntry extends VersionedRegistryEntry<CapabilityId> {
|
|
481
|
+
readonly transitionId: TransitionId;
|
|
482
|
+
readonly issuer: RegisteredIdentityRef;
|
|
483
|
+
readonly scope: RegisteredProjectionRef;
|
|
484
|
+
readonly exactCandidateBound: boolean;
|
|
485
|
+
}
|
|
486
|
+
export interface CredentialPolicyRegistryEntry extends VersionedRegistryEntry<CredentialPolicyId> {
|
|
487
|
+
readonly credentialKind: 'transition-binding' | 'execution-receipt';
|
|
488
|
+
readonly schema: RegisteredSchemaRef;
|
|
489
|
+
readonly verifier: RegisteredCredentialVerifierRef;
|
|
490
|
+
readonly issuer: RegisteredIdentityRef;
|
|
491
|
+
readonly presentation: {
|
|
492
|
+
readonly mode: 'explicit-input';
|
|
493
|
+
readonly input: RegisteredInputRef;
|
|
494
|
+
} | {
|
|
495
|
+
readonly mode: 'navigation-binding';
|
|
496
|
+
} | {
|
|
497
|
+
readonly mode: 'none';
|
|
498
|
+
};
|
|
499
|
+
readonly validity: {
|
|
500
|
+
readonly mode: 'bounded-ttl';
|
|
501
|
+
readonly clock: RegisteredClockRef;
|
|
502
|
+
readonly maxTtlMs: number;
|
|
503
|
+
readonly skewMs: number;
|
|
504
|
+
readonly expiryFailureCode: 'CREDENTIAL_EXPIRED';
|
|
505
|
+
} | {
|
|
506
|
+
readonly mode: 'non-expiring';
|
|
507
|
+
};
|
|
508
|
+
readonly replay: {
|
|
509
|
+
readonly mode: 'execution-key-bound';
|
|
510
|
+
readonly executionKeyPolicy: RegisteredExecutionKeyPolicyRef;
|
|
511
|
+
} | {
|
|
512
|
+
readonly mode: 'single-use';
|
|
513
|
+
} | {
|
|
514
|
+
readonly mode: 'unrestricted';
|
|
515
|
+
};
|
|
516
|
+
readonly binding: ProjectionSliceRef;
|
|
517
|
+
}
|
|
518
|
+
export interface CredentialVerifierRegistryEntry extends VersionedRegistryEntry<CredentialVerifierId> {
|
|
519
|
+
readonly verifierKind: 'none' | 'state-bound-sha256';
|
|
520
|
+
}
|
|
521
|
+
export interface ClockRegistryEntry extends VersionedRegistryEntry<ClockId> {
|
|
522
|
+
readonly clockKind: 'workflow-core-utc';
|
|
523
|
+
}
|
|
524
|
+
export interface DelegationPolicyRegistryEntry extends VersionedRegistryEntry<DelegationPolicyId> {
|
|
525
|
+
readonly mode: 'forbidden' | 'allowed-exact' | 'required-exact';
|
|
526
|
+
readonly scopeBound: boolean;
|
|
527
|
+
readonly expiryRequired: boolean;
|
|
528
|
+
readonly redelegationAllowed: boolean;
|
|
529
|
+
}
|
|
530
|
+
export interface OwnershipPolicyRegistryEntry extends VersionedRegistryEntry<OwnershipPolicyId> {
|
|
531
|
+
readonly c1Ownership: 'unchecked' | 'forbidden' | 'required';
|
|
532
|
+
readonly writerLease: 'unchecked' | 'forbidden' | 'required';
|
|
533
|
+
readonly ownerBinding: 'none' | 'actor' | 'principal';
|
|
534
|
+
}
|
|
535
|
+
export interface GuardEvaluatorRegistryEntry extends VersionedRegistryEntry<GuardEvaluatorId> {
|
|
536
|
+
readonly transitionId: TransitionId;
|
|
537
|
+
readonly guardId: GuardId;
|
|
538
|
+
readonly snapshot: RegisteredProjectionRef;
|
|
539
|
+
readonly binding: RegisteredProjectionRef;
|
|
540
|
+
readonly allowedInputs: readonly RegisteredInputRef[];
|
|
541
|
+
}
|
|
542
|
+
export interface EffectAdapterRegistryEntry extends VersionedRegistryEntry<EffectAdapterId> {
|
|
543
|
+
readonly adapterKind: 'legacy-set-task-plan' | 'journaled-corrective-replan';
|
|
544
|
+
}
|
|
545
|
+
export interface ResourceRegistryEntry extends VersionedRegistryEntry<ResourceId> {
|
|
546
|
+
readonly resourceKind: 'artifact-stage' | 'artifact' | 'task-state' | 'sidecar' | 'journal';
|
|
547
|
+
}
|
|
548
|
+
export interface LockPolicyRegistryEntry extends VersionedRegistryEntry<LockPolicyId> {
|
|
549
|
+
readonly lockKind: 'none' | 'exclusive-task';
|
|
550
|
+
readonly scope: ProjectionSliceRef | null;
|
|
551
|
+
}
|
|
552
|
+
export interface ExecutionKeyPolicyRegistryEntry extends VersionedRegistryEntry<ExecutionKeyPolicyId> {
|
|
553
|
+
readonly requiredFields: readonly ProjectionFieldRef[];
|
|
554
|
+
}
|
|
555
|
+
export interface JournalSchemaRegistryEntry extends VersionedRegistryEntry<JournalSchemaId> {
|
|
556
|
+
readonly schema: RegisteredSchemaRef;
|
|
557
|
+
}
|
|
558
|
+
export interface JournalAdapterRegistryEntry extends VersionedRegistryEntry<JournalAdapterId> {
|
|
559
|
+
readonly compatibleEffectAdapters: readonly RegisteredEffectAdapterRef[];
|
|
560
|
+
}
|
|
561
|
+
export interface RecoveryAdapterRegistryEntry extends VersionedRegistryEntry<RecoveryAdapterId> {
|
|
562
|
+
readonly compatibleJournalAdapters: readonly RegisteredJournalAdapterRef[];
|
|
563
|
+
}
|
|
564
|
+
export interface ReadbackAdapterRegistryEntry extends VersionedRegistryEntry<ReadbackAdapterId> {
|
|
565
|
+
readonly compatibleEffectAdapters: readonly RegisteredEffectAdapterRef[];
|
|
566
|
+
readonly wiring: 'invoked-post-effect' | 'available-unwired';
|
|
567
|
+
readonly implementationResult: 'raw-task-state' | 'projected-readback';
|
|
568
|
+
readonly validationProjection: RegisteredProjectionRef;
|
|
569
|
+
readonly projectionWiring: 'invoked' | 'unimplemented';
|
|
570
|
+
}
|
|
571
|
+
export interface LimitationRegistryEntry extends VersionedRegistryEntry<LimitationId> {
|
|
572
|
+
readonly disposition: 'unresolved' | 'accepted';
|
|
573
|
+
}
|
|
574
|
+
export interface ReleaseProfileRegistryEntry extends VersionedRegistryEntry<ReleaseProfileId> {
|
|
575
|
+
readonly coverageProfile: RegisteredCoverageProfileRef;
|
|
576
|
+
readonly allowedLimitations: readonly RegisteredLimitationRef[];
|
|
577
|
+
readonly requiredRules: readonly RegisteredSemanticRuleRef[];
|
|
578
|
+
readonly requireExactAuthority: boolean;
|
|
579
|
+
readonly requireExclusiveLockForMutation: boolean;
|
|
580
|
+
readonly requireJournalForMultiWrite: boolean;
|
|
581
|
+
}
|
|
582
|
+
export interface CoverageProfileRegistryEntry extends VersionedRegistryEntry<CoverageProfileId> {
|
|
583
|
+
readonly requiredEvidenceKinds: readonly CoverageEvidenceKind[];
|
|
584
|
+
}
|
|
585
|
+
export interface CoverageProducerRegistryEntry extends VersionedRegistryEntry<CoverageProducerId> {
|
|
586
|
+
readonly producerKind: 'node-test';
|
|
587
|
+
}
|
|
588
|
+
export interface SemanticRuleRegistryEntry extends VersionedRegistryEntry<SemanticRuleId> {
|
|
589
|
+
readonly obligationIds: readonly SemanticObligationId[];
|
|
590
|
+
}
|
|
591
|
+
export interface SemanticRegistry {
|
|
592
|
+
readonly inputs: readonly InputRegistryEntry[];
|
|
593
|
+
readonly schemas: readonly SchemaRegistryEntry[];
|
|
594
|
+
readonly projections: readonly ProjectionRegistryEntry[];
|
|
595
|
+
readonly hashPolicies: readonly HashPolicyRegistryEntry[];
|
|
596
|
+
readonly identities: readonly IdentityRegistryEntry[];
|
|
597
|
+
readonly identityComparators: readonly IdentityComparatorRegistryEntry[];
|
|
598
|
+
readonly principalBases: readonly PrincipalBasisRegistryEntry[];
|
|
599
|
+
readonly capabilities: readonly CapabilityRegistryEntry[];
|
|
600
|
+
readonly credentialPolicies: readonly CredentialPolicyRegistryEntry[];
|
|
601
|
+
readonly credentialVerifiers: readonly CredentialVerifierRegistryEntry[];
|
|
602
|
+
readonly clocks: readonly ClockRegistryEntry[];
|
|
603
|
+
readonly delegationPolicies: readonly DelegationPolicyRegistryEntry[];
|
|
604
|
+
readonly ownershipPolicies: readonly OwnershipPolicyRegistryEntry[];
|
|
605
|
+
readonly guardEvaluators: readonly GuardEvaluatorRegistryEntry[];
|
|
606
|
+
readonly effectAdapters: readonly EffectAdapterRegistryEntry[];
|
|
607
|
+
readonly resources: readonly ResourceRegistryEntry[];
|
|
608
|
+
readonly lockPolicies: readonly LockPolicyRegistryEntry[];
|
|
609
|
+
readonly executionKeyPolicies: readonly ExecutionKeyPolicyRegistryEntry[];
|
|
610
|
+
readonly journalSchemas: readonly JournalSchemaRegistryEntry[];
|
|
611
|
+
readonly journalAdapters: readonly JournalAdapterRegistryEntry[];
|
|
612
|
+
readonly recoveryAdapters: readonly RecoveryAdapterRegistryEntry[];
|
|
613
|
+
readonly readbackAdapters: readonly ReadbackAdapterRegistryEntry[];
|
|
614
|
+
readonly limitations: readonly LimitationRegistryEntry[];
|
|
615
|
+
readonly releaseProfiles: readonly ReleaseProfileRegistryEntry[];
|
|
616
|
+
readonly coverageProfiles: readonly CoverageProfileRegistryEntry[];
|
|
617
|
+
readonly coverageProducers: readonly CoverageProducerRegistryEntry[];
|
|
618
|
+
readonly semanticRules: readonly SemanticRuleRegistryEntry[];
|
|
619
|
+
readonly readinessRuleIds: readonly ReadinessRuleId[];
|
|
620
|
+
}
|
|
621
|
+
export interface CompilerDiagnostic {
|
|
622
|
+
readonly diagnosticId: `compiler.${string}` | `core.${string}`;
|
|
623
|
+
readonly path: string;
|
|
624
|
+
readonly ref?: string;
|
|
625
|
+
readonly message: string;
|
|
626
|
+
}
|
|
627
|
+
export interface ExecutableSemanticBinding extends RegisteredRef<string> {
|
|
628
|
+
readonly semanticId: `implementation.${string}`;
|
|
629
|
+
readonly semanticVersion: number;
|
|
630
|
+
readonly wiring?: 'invoked' | 'available-unwired';
|
|
631
|
+
readonly implementationResult?: 'raw-task-state' | 'projected-readback';
|
|
632
|
+
readonly projectionWiring?: 'invoked' | 'unimplemented';
|
|
633
|
+
readonly evaluate?: (...arguments_: readonly unknown[]) => unknown;
|
|
634
|
+
readonly execute?: (...arguments_: readonly unknown[]) => unknown;
|
|
635
|
+
readonly compare?: (...arguments_: readonly unknown[]) => unknown;
|
|
636
|
+
readonly verify?: (...arguments_: readonly unknown[]) => unknown;
|
|
637
|
+
readonly hash?: (...arguments_: readonly unknown[]) => unknown;
|
|
638
|
+
readonly validate?: (...arguments_: readonly unknown[]) => unknown;
|
|
639
|
+
}
|
|
640
|
+
export interface CoreReleaseRuleContext {
|
|
641
|
+
readonly transition: Readonly<Record<string, unknown>>;
|
|
642
|
+
readonly registry: Readonly<Record<string, readonly Readonly<Record<string, unknown>>[]>>;
|
|
643
|
+
readonly policy: Readonly<Record<string, unknown>>;
|
|
644
|
+
}
|
|
645
|
+
export interface CoreReleaseRuleBinding extends RegisteredSemanticRuleRef {
|
|
646
|
+
readonly implementationId: `implementation.${string}`;
|
|
647
|
+
readonly implementationVersion: number;
|
|
648
|
+
readonly callable: (context: CoreReleaseRuleContext) => readonly string[];
|
|
649
|
+
}
|
|
650
|
+
export interface TransitionSchemaArtifact {
|
|
651
|
+
readonly documentSha256: string;
|
|
652
|
+
readonly vocabularySha256: string;
|
|
653
|
+
}
|
|
654
|
+
export interface PayloadSchemaArtifactBinding extends RegisteredSchemaRef {
|
|
655
|
+
readonly implementationId: `implementation.${string}`;
|
|
656
|
+
readonly implementationVersion: number;
|
|
657
|
+
readonly documentSha256: string;
|
|
658
|
+
readonly schemaPointer: string;
|
|
659
|
+
readonly subschemaSha256: string;
|
|
660
|
+
readonly document: unknown;
|
|
661
|
+
}
|
|
662
|
+
export interface PayloadSchemaValidatorBinding extends RegisteredSchemaRef {
|
|
663
|
+
readonly implementationId: `implementation.${string}`;
|
|
664
|
+
readonly implementationVersion: number;
|
|
665
|
+
readonly artifactSha256: string;
|
|
666
|
+
readonly subschemaSha256: string;
|
|
667
|
+
readonly callable: (raw: unknown) => boolean;
|
|
668
|
+
}
|
|
669
|
+
export interface StaticTransitionReadinessEntry {
|
|
670
|
+
readonly transitionId: TransitionId;
|
|
671
|
+
readonly blockers: readonly string[];
|
|
672
|
+
}
|
|
673
|
+
export interface StaticReadinessReport {
|
|
674
|
+
readonly staticReady: boolean;
|
|
675
|
+
readonly catalogBlockers: readonly string[];
|
|
676
|
+
readonly transitions: readonly StaticTransitionReadinessEntry[];
|
|
677
|
+
readonly reportHash: string;
|
|
678
|
+
}
|
|
679
|
+
export interface CoreCompilerProvenance {
|
|
680
|
+
readonly compilerId: string;
|
|
681
|
+
readonly compilerVersion: string;
|
|
682
|
+
readonly compilerBuildSha256: string;
|
|
683
|
+
readonly definitionFormatVersion: number;
|
|
684
|
+
readonly lifecycleEpoch: number;
|
|
685
|
+
readonly rawCatalogSha256: string;
|
|
686
|
+
readonly runtimeCatalogHash: string;
|
|
687
|
+
readonly staticCatalogHash: string;
|
|
688
|
+
readonly semanticRegistryClosureSha256: string;
|
|
689
|
+
readonly executableRegistryClosureSha256: string;
|
|
690
|
+
readonly transitionSchemaArtifactSha256: string;
|
|
691
|
+
readonly transitionSchemaVocabularySha256: string;
|
|
692
|
+
readonly transitionSchemaValidatorSha256: string;
|
|
693
|
+
readonly payloadSchemaClosureSha256: string;
|
|
694
|
+
readonly officialProfileSha256: string;
|
|
695
|
+
readonly ruleSetSha256: string;
|
|
696
|
+
readonly canonicalOrderSha256: string;
|
|
697
|
+
readonly irSha256: string;
|
|
698
|
+
}
|
|
699
|
+
export interface CoreCompiledTransitionView {
|
|
700
|
+
readonly transitionId: TransitionId;
|
|
701
|
+
readonly runtimeSemanticFingerprint: string;
|
|
702
|
+
readonly definitionManifestHash: string;
|
|
703
|
+
}
|
|
704
|
+
export interface CoreCompiledCatalogHandle {
|
|
705
|
+
readonly kind: 'core-compiled-transition-catalog';
|
|
706
|
+
readonly provenance: CoreCompilerProvenance;
|
|
707
|
+
readonly transitions: readonly CoreCompiledTransitionView[];
|
|
708
|
+
}
|
|
709
|
+
export type CoreCatalogCompileResult = {
|
|
710
|
+
readonly ok: true;
|
|
711
|
+
readonly catalog: CoreCompiledCatalogHandle;
|
|
712
|
+
readonly diagnostics: readonly [];
|
|
713
|
+
readonly diagnosticsHash: string;
|
|
714
|
+
} | {
|
|
715
|
+
readonly ok: false;
|
|
716
|
+
readonly diagnostics: readonly CompilerDiagnostic[];
|
|
717
|
+
readonly diagnosticsHash: string;
|
|
718
|
+
};
|