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,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://codex-workflow.local/schemas/transition-payloads.schema.json",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"taskId": { "type": "string", "minLength": 1 },
|
|
6
|
+
"expectedRevision": { "type": "integer", "minimum": 0 },
|
|
7
|
+
"nonEmptyString": { "type": "string", "minLength": 1 },
|
|
8
|
+
"stringArray": { "type": "array", "items": { "type": "string" } },
|
|
9
|
+
"taskPlanInput": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["objective", "requirements", "acceptance", "risks", "knowledgeImpact", "knowledgeImpactReason", "knowledgeTargets", "knowledgeMapRevision", "knowledgeMapHash", "graphUse", "steps"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"objective": { "$ref": "#/$defs/nonEmptyString" },
|
|
14
|
+
"requirements": { "$ref": "#/$defs/stringArray" },
|
|
15
|
+
"acceptance": { "$ref": "#/$defs/stringArray" },
|
|
16
|
+
"risks": { "$ref": "#/$defs/stringArray" },
|
|
17
|
+
"knowledgeImpact": { "enum": ["none", "update", "create", "retire"] },
|
|
18
|
+
"knowledgeImpactReason": { "type": "string" },
|
|
19
|
+
"knowledgeTargets": { "type": "array", "items": { "$ref": "#/$defs/knowledgeTarget" } },
|
|
20
|
+
"knowledgeMapRevision": { "type": "integer", "minimum": 0 },
|
|
21
|
+
"knowledgeMapHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
22
|
+
"graphUse": { "enum": ["code-aware", "not-applicable"] },
|
|
23
|
+
"steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/planStep" } }
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
},
|
|
27
|
+
"knowledgeTarget": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["category", "path", "reason", "requirementIds"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"category": { "enum": ["agent-guidance", "onboarding", "architecture", "decisions", "commands", "ownership", "testing", "operations", "domain"] },
|
|
32
|
+
"path": { "$ref": "#/$defs/nonEmptyString" },
|
|
33
|
+
"reason": { "$ref": "#/$defs/nonEmptyString" },
|
|
34
|
+
"requirementIds": { "$ref": "#/$defs/stringArray" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
},
|
|
38
|
+
"planStep": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["id", "title", "objective", "requirements", "dependencies", "expectedOutputs", "allowedWrites", "forbiddenScope", "checks"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
43
|
+
"title": { "$ref": "#/$defs/nonEmptyString" },
|
|
44
|
+
"objective": { "$ref": "#/$defs/nonEmptyString" },
|
|
45
|
+
"requirements": { "$ref": "#/$defs/stringArray" },
|
|
46
|
+
"dependencies": { "$ref": "#/$defs/stringArray" },
|
|
47
|
+
"expectedOutputs": { "$ref": "#/$defs/stringArray" },
|
|
48
|
+
"allowedWrites": { "$ref": "#/$defs/stringArray" },
|
|
49
|
+
"forbiddenScope": { "$ref": "#/$defs/stringArray" },
|
|
50
|
+
"checks": { "$ref": "#/$defs/stringArray" }
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
},
|
|
54
|
+
"planRiskAuditInput": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["summary", "decision", "splitRationale", "stepClassifications"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"summary": { "$ref": "#/$defs/nonEmptyString" },
|
|
59
|
+
"decision": { "enum": ["approved", "approved-with-rationale", "split-required", "stop-escalate"] },
|
|
60
|
+
"splitRationale": { "type": ["string", "null"] },
|
|
61
|
+
"stepClassifications": { "type": "array", "items": { "$ref": "#/$defs/riskStepClassification" } }
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
},
|
|
65
|
+
"riskStepClassification": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["stepId", "categories", "reviewRequired", "failureModes", "requiredEvidence"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"stepId": { "$ref": "#/$defs/nonEmptyString" },
|
|
70
|
+
"categories": { "type": "array", "uniqueItems": true, "items": { "enum": ["migration", "concurrency", "restart-replay", "crash-window", "external-provider", "runtime-composition", "security-boundary", "auth-secrets", "irreversible-execution"] } },
|
|
71
|
+
"reviewRequired": { "type": "boolean" },
|
|
72
|
+
"failureModes": { "$ref": "#/$defs/stringArray" },
|
|
73
|
+
"requiredEvidence": { "$ref": "#/$defs/stringArray" },
|
|
74
|
+
"proofObligations": { "type": "array", "items": { "$ref": "#/$defs/riskProofObligation" } }
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
78
|
+
"riskProofObligation": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": ["failureMode", "counterexample", "expectedResult", "evidence"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"failureMode": { "$ref": "#/$defs/nonEmptyString" },
|
|
83
|
+
"counterexample": { "$ref": "#/$defs/nonEmptyString" },
|
|
84
|
+
"expectedResult": { "$ref": "#/$defs/nonEmptyString" },
|
|
85
|
+
"evidence": { "$ref": "#/$defs/nonEmptyString" }
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"correctiveReplanSnapshot": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["taskId", "taskRevision", "taskStatus", "currentPlanHash", "stepId", "stepStatus", "inProgressStepIds", "remediationAttemptCount", "correctivePosture", "correctiveDecision", "candidatePlanHash", "candidateStepIds", "actorRoleEligible", "c1ClaimAbsent", "writerLeaseAbsent", "planValidationPassed", "receiptValid", "riskAuditPassed"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"taskId": { "$ref": "#/$defs/taskId" },
|
|
94
|
+
"taskRevision": { "$ref": "#/$defs/expectedRevision" },
|
|
95
|
+
"taskStatus": { "type": "string" },
|
|
96
|
+
"currentPlanHash": { "type": ["string", "null"] },
|
|
97
|
+
"stepId": { "type": "string", "minLength": 1 },
|
|
98
|
+
"stepStatus": { "type": ["string", "null"] },
|
|
99
|
+
"inProgressStepIds": { "type": "array", "items": { "type": "string" } },
|
|
100
|
+
"remediationAttemptCount": { "type": "integer", "minimum": 0 },
|
|
101
|
+
"correctivePosture": { "type": "string" },
|
|
102
|
+
"correctiveDecision": { "type": ["object", "null"] },
|
|
103
|
+
"candidatePlanHash": { "type": ["string", "null"] },
|
|
104
|
+
"candidateStepIds": { "type": ["array", "null"], "items": { "type": "string" } }
|
|
105
|
+
,"actorRoleEligible": { "type": "boolean" }
|
|
106
|
+
,"c1ClaimAbsent": { "type": "boolean" }
|
|
107
|
+
,"writerLeaseAbsent": { "type": "boolean" }
|
|
108
|
+
,"planValidationPassed": { "type": "boolean" }
|
|
109
|
+
,"receiptValid": { "type": "boolean" }
|
|
110
|
+
,"riskAuditPassed": { "type": "boolean" }
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
},
|
|
114
|
+
"correctiveReplanBindings": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": ["taskId", "expectedRevision", "currentPlanHash", "stepId", "correctiveDecisionEventId"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"taskId": { "$ref": "#/$defs/taskId" },
|
|
119
|
+
"expectedRevision": { "$ref": "#/$defs/expectedRevision" },
|
|
120
|
+
"currentPlanHash": { "type": "string", "minLength": 1 },
|
|
121
|
+
"stepId": { "type": "string", "minLength": 1 },
|
|
122
|
+
"correctiveDecisionEventId": { "type": "string", "minLength": 1 },
|
|
123
|
+
"candidatePlanHash": { "type": "string", "minLength": 1 },
|
|
124
|
+
"candidateStepIds": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
},
|
|
128
|
+
"taskStateReadback": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": ["id", "revision", "status", "planHash"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"id": { "$ref": "#/$defs/taskId" },
|
|
133
|
+
"revision": { "$ref": "#/$defs/expectedRevision" },
|
|
134
|
+
"status": { "type": "string" },
|
|
135
|
+
"planHash": { "type": ["string", "null"] }
|
|
136
|
+
},
|
|
137
|
+
"additionalProperties": true
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|