codex-workflow-v2 2.0.0-beta.2 → 2.0.0-beta.5
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 +23 -0
- package/dist/src/alpha6/handoff.js +221 -28
- 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 +15 -7
- package/dist/src/alpha6/plan-risk.js.map +1 -1
- package/dist/src/alpha6/review.d.ts +1 -0
- package/dist/src/alpha6/review.js +9 -0
- package/dist/src/alpha6/review.js.map +1 -1
- package/dist/src/cli.js +253 -67
- 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 +563 -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/reviewer.d.ts +39 -1
- package/dist/src/reviewer.js +179 -43
- package/dist/src/reviewer.js.map +1 -1
- package/dist/src/state/corrective-replan-executor.d.ts +64 -0
- package/dist/src/state/corrective-replan-executor.js +608 -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 +665 -0
- package/dist/src/state/corrective-replan-public.js.map +1 -0
- package/dist/src/state/corrective-replan-transaction.d.ts +160 -0
- package/dist/src/state/corrective-replan-transaction.js +730 -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 +76 -3
- package/dist/src/state/lock.js +611 -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 +62 -25
- package/dist/src/workflow.js +892 -183
- package/dist/src/workflow.js.map +1 -1
- package/docs/lifecycle/state-machine-stabilization.md +641 -0
- package/docs/release.md +6 -2
- package/docs/updating-existing-project.md +9 -0
- package/package.json +4 -1
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +36 -0
- 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,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "codex-workflow://schemas/private/corrective-yield-task-transaction/v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion", "kind", "transactionId", "projectId", "taskId", "transitionId",
|
|
8
|
+
"taskStateSha256", "actor", "writerLeaseTokenSha256", "writerLeaseContentSha256",
|
|
9
|
+
"writerLeaseExpiresAt", "admittedAt", "intentSha256", "phase", "phaseRevision",
|
|
10
|
+
"nextTargetOrdinal", "handoffTarget", "phaseHistory", "completedResult", "updatedAt"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": { "const": 1 },
|
|
14
|
+
"kind": { "const": "corrective-yield-task-transaction" },
|
|
15
|
+
"transactionId": { "$ref": "#/$defs/hash" },
|
|
16
|
+
"projectId": { "type": "string", "pattern": "^[a-f0-9]{24}$" },
|
|
17
|
+
"taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
18
|
+
"transitionId": { "const": "task.coordination.corrective-yield" },
|
|
19
|
+
"taskStateSha256": { "$ref": "#/$defs/hash" },
|
|
20
|
+
"actor": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
21
|
+
"writerLeaseTokenSha256": { "$ref": "#/$defs/hash" },
|
|
22
|
+
"writerLeaseContentSha256": { "$ref": "#/$defs/hash" },
|
|
23
|
+
"writerLeaseExpiresAt": { "type": "string", "format": "date-time" },
|
|
24
|
+
"admittedAt": { "type": "string", "format": "date-time" },
|
|
25
|
+
"intentSha256": { "$ref": "#/$defs/hash" },
|
|
26
|
+
"phase": { "enum": ["intent", "applying", "published-pending-readback", "completed"] },
|
|
27
|
+
"phaseRevision": { "type": "integer", "minimum": 1, "maximum": 16 },
|
|
28
|
+
"nextTargetOrdinal": { "type": "integer", "minimum": 0, "maximum": 2 },
|
|
29
|
+
"handoffTarget": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["targetId", "ordinal", "relativePath", "preimage", "postimage", "previousEventHash", "resultEventHash"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"targetId": { "const": "handoff-event" },
|
|
35
|
+
"ordinal": { "const": 0 },
|
|
36
|
+
"relativePath": { "const": "handoffs.jsonl" },
|
|
37
|
+
"preimage": { "$ref": "#/$defs/snapshot" },
|
|
38
|
+
"postimage": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["contentSha256", "byteLength", "contentPath"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"contentSha256": { "$ref": "#/$defs/hash" },
|
|
44
|
+
"byteLength": { "type": "integer", "minimum": 1, "maximum": 1048576 },
|
|
45
|
+
"contentPath": { "const": "targets/0.bin" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"previousEventHash": { "$ref": "#/$defs/nullableHash" },
|
|
49
|
+
"resultEventHash": { "$ref": "#/$defs/hash" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"phaseHistory": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"minItems": 1,
|
|
55
|
+
"maxItems": 16,
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": ["sequence", "phase", "nextTargetOrdinal", "recordedAt", "previousEntryHash", "entryHash"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"sequence": { "type": "integer", "minimum": 0, "maximum": 15 },
|
|
62
|
+
"phase": { "enum": ["intent", "applying", "published-pending-readback", "completed"] },
|
|
63
|
+
"nextTargetOrdinal": { "type": "integer", "minimum": 0, "maximum": 2 },
|
|
64
|
+
"recordedAt": { "type": "string", "format": "date-time" },
|
|
65
|
+
"previousEntryHash": { "$ref": "#/$defs/nullableHash" },
|
|
66
|
+
"entryHash": { "$ref": "#/$defs/hash" }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"completedResult": {
|
|
71
|
+
"oneOf": [
|
|
72
|
+
{ "type": "null" },
|
|
73
|
+
{
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["resultSha256"],
|
|
77
|
+
"properties": { "resultSha256": { "$ref": "#/$defs/hash" } }
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
82
|
+
},
|
|
83
|
+
"$defs": {
|
|
84
|
+
"hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
85
|
+
"nullableHash": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
|
|
86
|
+
"snapshot": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["exists", "contentSha256", "byteLength", "contentPath"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"exists": { "type": "boolean" },
|
|
92
|
+
"contentSha256": { "$ref": "#/$defs/nullableHash" },
|
|
93
|
+
"byteLength": { "type": "integer", "minimum": 0, "maximum": 1048576 },
|
|
94
|
+
"contentPath": { "type": ["string", "null"], "enum": ["preimages/0.bin", null] }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -44,7 +44,17 @@
|
|
|
44
44
|
"taskId": { "type": "string", "pattern": "^TASK-[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
45
45
|
"stepId": { "type": "string", "pattern": "^STEP-[0-9]{3}(?:-[A-Z0-9-]+)?$" },
|
|
46
46
|
"guardedRiskCategory": {
|
|
47
|
-
"enum": [
|
|
47
|
+
"enum": [
|
|
48
|
+
"migration",
|
|
49
|
+
"concurrency",
|
|
50
|
+
"restart-replay",
|
|
51
|
+
"crash-window",
|
|
52
|
+
"external-provider",
|
|
53
|
+
"runtime-composition",
|
|
54
|
+
"security-boundary",
|
|
55
|
+
"auth-secrets",
|
|
56
|
+
"irreversible-execution"
|
|
57
|
+
]
|
|
48
58
|
},
|
|
49
59
|
"hash64": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
50
60
|
"nullableHash64": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"grantId": { "type": ["string", "null"], "minLength": 1 },
|
|
51
51
|
"claimTokenHash": { "$ref": "#/$defs/hash64" },
|
|
52
52
|
"expiresAt": { "type": "string", "format": "date-time" },
|
|
53
|
-
"eventType": { "enum": ["handoff", "claim", "handback"] },
|
|
53
|
+
"eventType": { "enum": ["handoff", "claim", "credential-replace", "yield", "handback"] },
|
|
54
54
|
"coordinationLevel": { "const": "C1" },
|
|
55
55
|
"actor": { "type": "string", "minLength": 1 },
|
|
56
56
|
"targetActor": { "type": ["string", "null"], "minLength": 1 },
|