codex-workflow-v2 2.0.0-beta.4 → 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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/src/alpha6/handoff.d.ts +2 -0
  3. package/dist/src/alpha6/handoff.js +124 -12
  4. package/dist/src/alpha6/handoff.js.map +1 -1
  5. package/dist/src/alpha6/plan-risk.js +9 -7
  6. package/dist/src/alpha6/plan-risk.js.map +1 -1
  7. package/dist/src/alpha6/review.d.ts +1 -0
  8. package/dist/src/alpha6/review.js +9 -0
  9. package/dist/src/alpha6/review.js.map +1 -1
  10. package/dist/src/cli.js +72 -9
  11. package/dist/src/cli.js.map +1 -1
  12. package/dist/src/contracts.d.ts +1 -1
  13. package/dist/src/lifecycle/corrective-replan-credential-core.js +31 -2
  14. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -1
  15. package/dist/src/reviewer.d.ts +39 -1
  16. package/dist/src/reviewer.js +179 -43
  17. package/dist/src/reviewer.js.map +1 -1
  18. package/dist/src/state/corrective-replan-executor.js +15 -5
  19. package/dist/src/state/corrective-replan-executor.js.map +1 -1
  20. package/dist/src/state/corrective-replan-public.js +53 -6
  21. package/dist/src/state/corrective-replan-public.js.map +1 -1
  22. package/dist/src/state/corrective-replan-transaction.d.ts +2 -0
  23. package/dist/src/state/corrective-replan-transaction.js +11 -4
  24. package/dist/src/state/corrective-replan-transaction.js.map +1 -1
  25. package/dist/src/state/lock.d.ts +1 -0
  26. package/dist/src/state/lock.js +29 -0
  27. package/dist/src/state/lock.js.map +1 -1
  28. package/dist/src/version.d.ts +1 -1
  29. package/dist/src/version.js +1 -1
  30. package/dist/src/workflow.d.ts +28 -3
  31. package/dist/src/workflow.js +407 -43
  32. package/dist/src/workflow.js.map +1 -1
  33. package/docs/release.md +3 -1
  34. package/package.json +1 -1
  35. package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +36 -0
  36. package/schemas/task-handoff-event.schema.json +1 -1
package/docs/release.md CHANGED
@@ -22,7 +22,7 @@ The downstream smoke packs the actual tarball, installs it into an empty tempora
22
22
  runs the packaged CLI handshake, and proves installation created none of `.codex`, `.tasks`,
23
23
  `.increments`, or `.memory-bank` in that project.
24
24
 
25
- For beta.4, the release gate also relies on `npm run release:check` to fail if:
25
+ For beta.5, the release gate also relies on `npm run release:check` to fail if:
26
26
 
27
27
  - canonical entity schema 2 shapes drift;
28
28
  - protocol 2 is not the active public contract, or intact protocol-1 adoption evidence stops being readable through the bounded compatibility window;
@@ -35,6 +35,8 @@ For beta.4, the release gate also relies on `npm run release:check` to fail if:
35
35
  - truthful initial-assembly navigation capability is absent from the packaged surface.
36
36
  - corrective-yield/replan protocol-v2 commands, closed schemas, Human gate, retained journals,
37
37
  explicit recovery, or dual-readback capabilities are absent from the packaged surface.
38
+ - scoped Task navigation, credential replacement recovery, or sealed external Task/Step review
39
+ commands are absent from the packaged surface.
38
40
 
39
41
  The separate lifecycle transcript validator fails if the real-agent log contains a mutation that
40
42
  bypasses failed `status`/`next`, an unadvertised or failed mutation, an unresolved syntax-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflow-v2",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.5",
4
4
  "description": "Requirements-first Codex development workflow with local state and explicit Git ownership.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -79,6 +79,12 @@ wait for its terminal success, and only then run `next`; never launch the checkp
79
79
  parallel or in one parallel tool batch. If either fails, stop; do not
80
80
  describe the reverse-membership gap as expected and invoke a direct closing command.
81
81
 
82
+ When `next` includes `milestoneCancellationOption`, treat it as an advertised alternative only
83
+ when the user has explicitly requested cancellation or supersession of that exact Milestone.
84
+ Use the returned Milestone ID and expected revision verbatim, require a substantive user-supplied
85
+ reason, and preserve every historical Task and sidecar. Absence of this option means cancellation
86
+ is not currently navigable; do not invoke `milestone cancel` directly.
87
+
82
88
  When `next` includes `gitMutationPolicy`, obtain bounded permission for that exact Git-writing
83
89
  transition before the first call. Do not probe and retry after a `.git/index.lock` failure.
84
90
  For `task start`, the policy applies only when choosing `--workspace-owner local`; for
@@ -104,6 +110,13 @@ exact invocation syntax is not already available from `next` and this protocol.
104
110
  `requiredOptions` and `optionalOptions`; when `exactOptionContractAvailable=false`, consult the
105
111
  packaged protocol instead of guessing. Help never replaces a fresh `next` before mutation.
106
112
 
113
+ When two or more Tasks are actionable, a dedicated Task chat may call `next --task <exact Task ID>`
114
+ after the repository `status` checkpoint. The selector is read-only routing, not authorization: the
115
+ response must name that same Task and all ordinary milestone, observation, adoption, Knowledge, and
116
+ credential gates still apply. Omit `--task` for repository-level coordination. If Core reports that
117
+ the selected Task is missing or not actionable, stop rather than falling back to another Task or
118
+ invoking a direct mutation.
119
+
107
120
  ## Product Or Workflow Graph Refresh
108
121
 
109
122
  1. Run `graph refresh-request --kind product|workflow --mode moderate`.
@@ -171,6 +184,10 @@ changes, grant issuance, and grant expansion are never delegated by `delegated-a
171
184
  For an entire Milestone, prefer one bounded `milestone autonomy-prepare` gate after the complete
172
185
  initial membership Plan exists. Show principal, delegate, expiry, semantic-scope hash, policy
173
186
  hash, and `MAC-*` code, then stop. A later exact approval permits `milestone autonomy-grant`.
187
+ Use the delegated path only when the same `next` response exposes
188
+ `milestoneAuthorizationOptions[].action = "milestone autonomy-prepare"` and the user explicitly
189
+ requested delegated Milestone operation; otherwise follow the ordinary `milestone authorize`
190
+ human gate.
174
191
  The resulting grant covers the existing Task/Milestone approval transitions and the Project
175
192
  Memory approval portion of an atomic Task context refresh for the same Milestone. Besides
176
193
  content-only drift, Core may accept exact supporting-source additions predeclared by the current
@@ -184,6 +201,25 @@ After two failed Task reviews, follow `next.correctivePlanGate`: obtain a distin
184
201
  corrective Auditor result and pass it through `--corrective-audit-file`. Do not continue for
185
202
  replan, split, or stop decisions.
186
203
 
204
+ When `next.strictStepReview.recommendedMode` is `external-sealed`, do not launch the nested local
205
+ reviewer from inside a Codex App sandbox. Run the advertised read-only `task step-review-packet`,
206
+ create a separate user-visible reviewer chat for that exact packet, and require one closed
207
+ `ReviewInput` JSON result bound to its reviewed commit. The reviewer must not modify repository or
208
+ Workflow state. Then run only the advertised `task step-review-record` with the unchanged packet
209
+ and repository-seal hashes, the separate reviewer thread ID, the lifecycle actor from `next`, and
210
+ the active writer token when required. Never author the independent review in the Worker or
211
+ Delivery Coordinator chat, never alter the packet, and never treat an unverified local reviewer
212
+ launch as a semantic remediation failure. If Core reports the seal changed, discard the review and
213
+ stop; do not regenerate evidence against a moving checkout.
214
+
215
+ When `next.strictTaskReview.recommendedMode` is `external-sealed`, apply the same isolation rule to
216
+ the final submitted-Task review. Run the advertised read-only `task review-packet`, send the exact
217
+ packet to a separate user-visible Independent Reviewer chat, and accept only a closed `ReviewInput`
218
+ bound to the unchanged packet and repository-seal hashes. Record it only through the advertised
219
+ `task review-sealed-record`, using the lifecycle actor from `next` and the active writer token when
220
+ required. Do not call `task review-launch` from inside a Codex App sandbox, do not use the Worker or
221
+ Delivery Coordinator as reviewer, and discard the result if a fresh packet changes either hash.
222
+
187
223
  When `next` returns a derived C1 Worker or corrective Auditor actor, use that exact actor without
188
224
  asking the user to name one. Derivation removes a routing pause; handoff claim, writer lease,
189
225
  strict review, and auditor-independence checks remain mandatory.
@@ -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", "yield", "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 },