dev-flow-codex 0.5.0 → 0.5.2

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 CHANGED
@@ -1,196 +1,189 @@
1
1
  # dev-flow-codex
2
2
 
3
- `dev-flow-codex` 是 Codex CLI 的 explicit-only Dev Flow Adapter。package 包含一个 Codex
4
- Plugin、一个 `dev-flow` Skill、一份 local STDIO MCP 声明、method-profile reference 和一个
5
- `darwin-arm64` Core executable。它不保存 Task、process cursor、transition table 或 recovery
6
- classification。
3
+ [中文](https://github.com/Innocent-children/dev-flow/blob/main/packages/codex/README.md) |
4
+ [English](https://github.com/Innocent-children/dev-flow/blob/main/docs/CODEX_en.md)
7
5
 
8
- ## 安装与发布身份
6
+ `dev-flow-codex` 把 Dev Flow 状态图接入 Codex CLI。package 包含 Codex Plugin、显式 Skill、
7
+ local STDIO MCP 配置和 macOS arm64 Core executable;Task、节点、流转和 Recovery 仍由 bundled
8
+ Go Core 独自管理。
9
9
 
10
- 当前 package、plugin 和 bundled Core 版本是 `0.4.0`。Feature 009 发布已完成的 Feature 008
11
- graph runtime;历史 `0.3.0` 包、Tag、Release 与证据保持冻结。
10
+ ## 支持范围
12
11
 
13
- 标准安装和显式注册入口是:
12
+ | 项目 | 当前支持 |
13
+ | --- | --- |
14
+ | Package | `dev-flow-codex@0.5.1` |
15
+ | Bundled Core | `0.5.0` |
16
+ | Platform | macOS arm64 |
17
+ | Node.js | `>=24` |
18
+ | Codex | `>=0.147.0` |
19
+ | Release | [codex-v0.5.1](https://github.com/Innocent-children/dev-flow/releases/tag/codex-v0.5.1) |
20
+
21
+ `0.5.1` 的 normal release 已通过 registry package 安装、package/Core identity、setup、Core
22
+ handshake、remove、uninstall 和 repository-unchanged 门禁。上表记录已经验证的精确公开版本;
23
+ 下面的安装命令使用 npm `latest` dist-tag 获取当前最新稳定 package。
24
+
25
+ ## 安装
14
26
 
15
27
  ```bash
16
- npm install -g dev-flow-codex@0.4.0
28
+ npm install -g dev-flow-codex@latest
17
29
  dev-flow-codex setup
30
+ dev-flow-codex --version
18
31
  ```
19
32
 
20
- 精确 npm tarball、standalone Core、manifest、checksums、实际 Codex 版本和最终 Journey 结果以
21
- GitHub Release `v0.4.0`registry 回读证据为准。
33
+ npm 全局安装只负责把 package `dev-flow-codex` launcher 放到 `PATH`。`setup` 是独立步骤:
34
+ 它验证平台、package 内容、bundled CoreCodex 兼容版本,然后注册 Plugin、marketplace 与 MCP,
35
+ 并在写入后回读 ownership。`--version` 同时输出实际 package 和 bundled Core 版本。
22
36
 
23
- 当前公开支持 native macOS arm64、Node.js `>=24` 和 Codex
24
- `>=0.147.0 <0.148.0`。没有 Linux、Windows、Intel Mac、Rosetta 或 DeepSeek 产品支持声明。
37
+ ## 命令参考
25
38
 
26
- ## Closed package
39
+ `dev-flow-codex` 的生产 CLI 只接受下表中的命令;未知参数会在执行任何注册操作前失败。
27
40
 
28
- 生产 package 内容由 `package.json.files` 和本地 builder 共同关闭:
41
+ | 命令 | 说明 |
42
+ | --- | --- |
43
+ | `npm install -g dev-flow-codex@latest` | 安装 npm `latest` 指向的 package,并把 launcher 全局加入 `PATH`;不会自动注册 Codex Plugin。 |
44
+ | `dev-flow-codex setup` | 校验 package、Core 和 Codex 版本,注册 marketplace、Plugin 与 MCP,并回读最终状态。重复执行会验证现有 ownership,兼容 package 升级也通过该命令完成。 |
45
+ | `dev-flow-codex setup --json` | 与 `setup` 行为相同,但只输出机器可读 JSON:`operation`、`status`、`changed` 和 `receipt_path`。 |
46
+ | `dev-flow-codex --version` | 输出 `dev-flow-codex <package-version> (core <core-version>)`,用于确认实际安装身份。 |
47
+ | `dev-flow-codex remove` | 删除该 package 拥有的 Plugin、marketplace 注册和 receipt;保留 Task data、未知相邻文件和目标 Git 仓库。 |
48
+ | `dev-flow-codex remove --json` | 与 `remove` 行为相同,并输出机器可读 JSON;`next_step` 提示随后执行全局 npm 卸载。 |
49
+ | `npm uninstall -g dev-flow-codex` | 在 `remove` 完成后卸载全局 package。单独执行不会先清理 Codex 注册。 |
50
+ | `dev-flow-codex mcp` | **内部 Host 命令。** Plugin 的 MCP 配置调用它来设置数据目录和 admission instructions,再启动 packaged Core 的 `mcp --stdio`;正常用户不应手工运行。 |
29
51
 
30
- ```text
31
- .agents/plugins/marketplace.json
32
- LICENSE
33
- README.md
34
- bin/dev-flow-codex.mjs
35
- lib/lifecycle.mjs
36
- lib/paths.mjs
37
- package.json
38
- plugin/.codex-plugin/plugin.json
39
- plugin/.mcp.json
40
- plugin/skills/dev-flow/SKILL.md
41
- plugin/skills/dev-flow/agents/openai.yaml
42
- plugin/skills/dev-flow/references/method-profiles.md
43
- plugin/skills/dev-flow/references/node-payloads.md
44
- runtime/darwin-arm64/dev-flow
45
- ```
52
+ 当前 CLI 不提供 `help`、`update`、`uninstall` 或其他隐式子命令。更新到当前最新版本时执行:
46
53
 
47
- Artifact 不包含 tests、fixtures、specs、source tree、`.git`、`node_modules`、用户数据、构建日志
48
- 或绝对路径。package 没有 production npm dependency 和 install/update/uninstall lifecycle hook;
49
- 安装文件与显式 Codex 注册是两个操作。
54
+ ```bash
55
+ npm install -g dev-flow-codex@latest
56
+ dev-flow-codex setup
57
+ ```
50
58
 
51
- ## Local package build
59
+ 完整的 Codex、DeepSeek、Core MCP 命令目录见
60
+ [命令参考](../../docs/COMMANDS.md)。
52
61
 
53
- 在干净、已提交的 source commit 上,把最终验收制品构建到仓库外的空目录:
62
+ ## 开始一个 Task
54
63
 
55
- ```bash
56
- ARTIFACT_ROOT="${TMPDIR:-/tmp}/dev-flow-local-artifacts"
57
- mkdir -p "$ARTIFACT_ROOT"
58
- SOURCE_COMMIT="$(git rev-parse HEAD)"
64
+ 在当前 Git 仓库中,用唯一的精确 selector 描述工作:
59
65
 
60
- pnpm --dir packages/codex run build:local \
61
- --output "$ARTIFACT_ROOT" \
62
- --final \
63
- --source-commit "$SOURCE_COMMIT" \
64
- --report "$ARTIFACT_ROOT/artifact-evidence.json"
66
+ ```text
67
+ $dev-flow-codex:dev-flow Fix idempotency in the order-creation endpoint and run targeted tests.
65
68
  ```
66
69
 
67
- `--final` 表示 builder clean-source/identity verification 模式;公开 Release 由 standalone
68
- 一键发布命令产生。
69
- Builder 要求输出目录已经存在、没有 `.tgz`,source tree 干净且 HEAD 等于 `--source-commit`;
70
- 它验证 package/Core/plugin version identity、platform、detached runtime executable 和 closed pack
71
- contents,并输出 SHA-256 evidence。制品与 evidence JSON 均保留在仓库外。
70
+ 这不是 shell 命令。新 Task `REQUIREMENTS` 开始,默认使用 `plain` profile;也可以在同一请求
71
+ 中明确选择 `spec-kit` 或 `openspec`。Task 创建后 profile 保持不变。
72
72
 
73
- 本地构建只生成和检查制品,不执行 setup/remove、不修改真实 Codex 配置、不启动 native Journey。
73
+ Core 会持续返回:
74
74
 
75
- ## Explicit invocation boundary
75
+ - 当前 node、purpose、entry/completion conditions;
76
+ - 当前 revision、action identity 和 repository binding;
77
+ - `allowed_effects`、`required_evidence` 和 verification budget;
78
+ - method profile 对应的 semantic steps;
79
+ - 全部合法 transitions、guard、destination 与 reason rule。
76
80
 
77
- Skill metadata 设置 `policy.allow_implicit_invocation: false`。唯一精确 selector 是:
81
+ Codex 完成当前节点工作后,只提交 live Action 允许的 `transition_id` closed payload。
78
82
 
79
- ```text
80
- $dev-flow-codex:dev-flow
81
- ```
83
+ ## 显式调用边界
82
84
 
83
- Skill resource/base name `dev-flow`,installed Skill full name 是 `dev-flow-codex:dev-flow`,
84
- only exact explicit selector 是 `$dev-flow-codex:dev-flow`。bare `$dev-flow` is not an alias and
85
- does not select this Skill;wrong plugin namespace、wrong Skill base name 或 missing selector 也不会
86
- 选择它。ordinary prompt 必须产生 zero Dev Flow calls。non-exact selectors must not complete a task-bearing operation;
87
- This does not disable ordinary Codex repository tools. The package does not make or claim selector-bound MCP visibility or authorization。
88
-
89
- 被接纳的请求必须只涉及一个现有 Git repository,并先调用 `dev_flow_server_info({})`。当前
90
- source-local Contract 0.2 handshake 必须返回:
85
+ Skill metadata 设置 `policy.allow_implicit_invocation: false`,因此只有下面这个精确 selector 可以
86
+ 进入 Dev Flow:
91
87
 
92
88
  ```text
93
- schema_version = 2
94
- core_limits_version = 0.2
95
- process = standard-development@1
96
- method_profiles = plain, spec-kit, openspec
97
- exact six-tool catalog
89
+ $dev-flow-codex:dev-flow
98
90
  ```
99
91
 
100
- 不完整、不同版本或不同顺序的 catalog 会停止请求。公开工具为:
92
+ 相关名称与边界如下:
101
93
 
102
- ```text
103
- dev_flow_server_info
104
- dev_flow_open_task
105
- dev_flow_get_task
106
- dev_flow_get_next_action
107
- dev_flow_apply_action
108
- dev_flow_cancel_task
109
- ```
94
+ - Skill resource/base name 是 `dev-flow`;
95
+ - 安装后的 Skill full name 是 `dev-flow-codex:dev-flow`;
96
+ - `$dev-flow` 不是别名,不会选择该 Skill;
97
+ - plugin namespace 错误、Skill base name 错误或缺少 selector 都不会选择该 Skill;
98
+ - 普通提示词必须产生零次 Dev Flow 调用;
99
+ - 非精确 selector 不得完成任何携带 Task 的操作。
110
100
 
111
- ## Graph task method profiles
101
+ 这项边界不限制 Codex 的普通仓库工具,也不声称 MCP 的可见性或授权与 selector 绑定;它只约束
102
+ 当前 Skill 是否可以发起 Dev Flow 调用。
112
103
 
113
- 新任务从 `REQUIREMENTS` 开始,Core 返回完整 node contract、semantic method steps 和全部合法
114
- transitions。Codex 只提交 Core 返回的 `transition_id` closed node payload;destination、guard、
115
- current node completion 都由 Core 决定。
104
+ 通过 admission 后,`dev_flow_server_info({})` 必须是第一次 Dev Flow 调用。安装内容、bundled
105
+ Core、Codex 兼容性和注册 ownership 已由 `dev-flow-codex setup` 验证;每次 Task 启动只静默确认
106
+ Core ready、`standard-development`、definition digest、method profiles 与六个工具的闭合集合,
107
+ 成功后立即打开或恢复 Task。正常启动不向用户逐项展示版本、摘要、profile 或工具目录;只有失败
108
+ 时才报告具体阻塞项和一个可执行的恢复步骤。工具和 method profile 的返回顺序不影响兼容性。
116
109
 
117
- Task 创建时选择一个 immutable profile:
110
+ | MCP 工具 | 作用 |
111
+ | --- | --- |
112
+ | `dev_flow_server_info` | 读取 Core identity、能力、process、method profile 和工具目录;有效 admission 后必须首先调用。 |
113
+ | `dev_flow_open_task` | 为当前 canonical repository 创建新 Task,或恢复其现有 Task。 |
114
+ | `dev_flow_get_task` | 读取持久化 Task;可附带 operation probe 获取 Recovery assessment。 |
115
+ | `dev_flow_get_next_action` | 读取当前节点的权威 Action、验证预算、method steps 和全部合法 transition。 |
116
+ | `dev_flow_apply_action` | 使用当前 revision、Action identity、repository binding 和 closed payload 应用一次 Core 声明的 transition。 |
117
+ | `dev_flow_cancel_task` | 使用当前 revision 和明确 reason 取消一个非终态 Task。 |
118
118
 
119
- ```text
120
- plain
121
- spec-kit
122
- openspec
123
- ```
119
+ ## 理解审查与 Recovery
124
120
 
125
- 三种 profile 使用同一状态图。Adapter 按当前 Action 渲染实际存在的 capability 和预期 artifact。
126
- capability unavailable unknown 时,它明确报告缺失,并呈现合同定义的 plain-equivalent work;
127
- 只有等价工作实际完成时才提交 `plain_fallback` method evidence。command、checkbox、sync、archive
128
- 或 artifact 自身不会推进 Core。
121
+ `TEST` 通过后,Task 进入 `COMPREHENSION_REVIEW`。Codex 解释当前行为、设计与维护风险,开发者
122
+ 给出明确 verdict。复杂实现进入 `REFACTOR`;仓库发生变化后必须重新回到 `TEST`。
129
123
 
130
- `TEST` 成功后必须进入 `COMPREHENSION_REVIEW`。Codex 向开发者解释当前行为、复杂度和维护
131
- 风险,并取得明确 verdict;AI/static evidence 不能替代用户确认。复杂代码进入 `REFACTOR`,
132
- repository-changing refactor 只能回到 `TEST`。
124
+ 每次 mutation 前,Adapter 保留 request/operation ID、source cursor、revision、action、
125
+ repository binding 和原始 payload。结果缺失、取消、截断、损坏或 transport failure 时,Adapter
126
+ 先读取 Core,再遵循五分类 Recovery 和 advice;它不自行判断 retry safety 或 destination。
133
127
 
134
- ## Read-before-retry
128
+ ## 数据目录
135
129
 
136
- 每次 mutation 前,Adapter 保留完整 operation identity:request/operation ID、process、source
137
- cursor、revision、action、issuance binding 和原始 closed payload。结果缺失、取消、损坏、截断或
138
- transport failure 时不得盲目重试,也不得重建缺失的 probe。
130
+ 默认数据目录由 package lifecycle 管理,也可以设置:
139
131
 
140
- Adapter 使用 `dev_flow_get_task` 或 `dev_flow_get_next_action` 提交原 operation probe,并只遵循
141
- Core 返回的五分类 Assessment 和 advice。Probe 零写入;只有显式 recovery apply 可以完成一次
142
- Core-derived transition 或创建一次 blocker。Adapter 不判断 classification、retry safety、resume
143
- node 或 destination。
132
+ ```bash
133
+ export DEV_FLOW_DATA_DIR="/absolute/path/to/existing-directory"
134
+ ```
144
135
 
145
- ## Schema 1 unsupported guidance
136
+ 显式目录必须已经存在、可用且可 canonicalize。setup、remove npm uninstall 都保留 Task data
137
+ 与未知相邻文件,也不会修改目标 Git 仓库。
146
138
 
147
- Graph package 只支持 fresh Schema 2、snapshot-v2 和精确 `standard-development@1`。遇到 Schema
148
- 1/pre-graph data Core 返回 `SCHEMA_UNSUPPORTED`,且不 decode、migrate、rename、truncate、
149
- delete 或 reset 旧数据。不要重复启动或自动清理。
139
+ 当前 Core 只读取当前 SQLite Schema。检测到不兼容或 pre-graph data 时返回
140
+ `SCHEMA_UNSUPPORTED` 并保持零写入。请选择新的数据目录,或在 Core 外部手工归档、改名或删除
141
+ 旧目录。
150
142
 
151
- 用户必须明确选择一个新的绝对、canonical、usable `DEV_FLOW_DATA_DIR`,或在 Core 外部手工
152
- archive/rename/delete 旧目录,再启动 graph Core。错误信息不回显私有数据库路径。
143
+ ## 移除
153
144
 
154
- ## Setup、remove retained data
145
+ 先删除 Codex 注册,再卸载全局 npm package:
155
146
 
156
- `0.4.0` package 文件安装仍与 Codex 注册分离:只有 `dev-flow-codex setup` 可以创建经 ownership
157
- 和 read-back 验证的注册,只有 `dev-flow-codex remove` 可以删除该产品拥有的注册。
147
+ ```bash
148
+ dev-flow-codex remove
149
+ npm uninstall -g dev-flow-codex
150
+ ```
158
151
 
159
- setup/update/remove/uninstall 均保留 Core task data 和未知相邻文件,不会修改目标 repository 或
160
- Git。remove 应先证明 plugin/marketplace absence,再单独执行 package-manager uninstall。重新安装
161
- 兼容的 graph artifact 可以从同一 Schema 2 数据目录恢复任务;没有任何 Schema 1 reader 或
162
- conversion path。
152
+ 需要机器可读结果时使用:
163
153
 
164
- ## Closed node payload construction
154
+ ```bash
155
+ dev-flow-codex remove --json
156
+ ```
165
157
 
166
- 打包 Skill 在每次普通 apply 前同时读取 live Action、`dev_flow_apply_action` `inputSchema`
167
- `plugin/skills/dev-flow/references/node-payloads.md` 的对应标记模板。该 reference 覆盖
168
- REQUIREMENTS、DESIGN、TASKS、IMPLEMENT、TEST、COMPREHENSION_REVIEW 的复杂度/通过分支、
169
- REFACTOR、DELIVERY 和 BLOCKED resolution,并由真实 MCP validator、workflow decoder 和 payload
170
- validator 提取验证。它只提供构造指引,不保存游标、复制 transition authority 或替代 Core。
158
+ 重新安装兼容 package 并再次运行 `setup` 后,可以从保留的当前数据目录继续 Task。
171
159
 
172
- `required_evidence` ArtifactReference role 不同;`repository_observation` 不得作为 artifact
173
- role。无真实 process artifact 时使用空 `artifacts`,同时保留完整 branch wrapper、当前 baseline/
174
- record/evidence identity 和精确 MethodEvidence。Core `INVALID_ARGUMENT` 会停止该 mutation,不会
175
- 触发候选 payload 试探或自动重试。
160
+ ## Package 内容
176
161
 
177
- 对于 apply/cancel,Result Envelope `request_id` caller mutation `request_id` 相同,并与成功
178
- 提交后的 `LastOperation.operation_id`/TaskEvent identity 对齐。没有 caller request ID 的 read/open/
179
- info 工具继续使用 Core 生成的本地 transport identity
162
+ 生产 package `package.json.files` 关闭,只包含 Plugin、Skill、MCP 配置、lifecycle library、
163
+ license 和一个 darwin-arm64 Core。它不包含 source tree、tests、fixtures、specs、`.git`、
164
+ `node_modules`、用户数据、构建日志或绝对路径,也没有 install/uninstall hook
180
165
 
181
- ## Deterministic validation
166
+ ## 维护者入口
182
167
 
183
- 完整 package-local 测试入口为:
168
+ Package-local 验证:
184
169
 
185
170
  ```bash
186
171
  pnpm --dir packages/codex test
187
172
  ```
188
173
 
189
- 它覆盖 package contract、Skill contract、lifecycle、journey harness、parser/evidence 以及已有
190
- launcher/runtime tests。fixture、simulated Harness 和 static contract 证据不属于 native Codex
191
- evidence,也不证明 package 已公开发布。
174
+ Source-local 最终制品构建:
175
+
176
+ ```bash
177
+ ARTIFACT_ROOT="${TMPDIR:-/tmp}/dev-flow-codex-artifacts"
178
+ mkdir -p "$ARTIFACT_ROOT"
179
+ SOURCE_COMMIT="$(git rev-parse HEAD)"
180
+
181
+ pnpm --dir packages/codex run build:local \
182
+ --output "$ARTIFACT_ROOT" \
183
+ --final \
184
+ --source-commit "$SOURCE_COMMIT" \
185
+ --report "$ARTIFACT_ROOT/artifact-evidence.json"
186
+ ```
192
187
 
193
- Feature 008 source-local acceptance 已完成。Attempt 3 提供真实 native Codex graph-flow
194
- evidence;独立的 no-Codex deterministic lifecycle 使用同一精确 artifact 证明 setup、remove、
195
- npm uninstall、data retention、相同 artifact reinstall 和同一 lifecycle Task terminal reopen。
196
- 两类 evidence 保持不同标签,且都不构成 registry package 或公开发布证明。
188
+ 构建输出必须位于仓库外。公开发布使用根目录的 standalone release command,见
189
+ [`release/codex/README.md`](../../release/codex/README.md)。
@@ -16,7 +16,7 @@ import {
16
16
  } from "../lib/paths.mjs";
17
17
 
18
18
  const FORWARDED_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
19
- const NPM_UNINSTALL_HANDOFF = "Run npm uninstall dev-flow-codex separately after deregistration.";
19
+ const NPM_UNINSTALL_HANDOFF = "Run npm uninstall -g dev-flow-codex separately after deregistration.";
20
20
  const CODEX_MCP_INSTRUCTIONS_ENVIRONMENT = "DEV_FLOW_CODEX_MCP_INSTRUCTIONS";
21
21
  const CODEX_MCP_INSTRUCTIONS = [
22
22
  "Dev Flow for Codex is explicit-only.",
@@ -58,9 +58,6 @@ export async function runCLI(arguments_, dependencies = {}) {
58
58
  environment,
59
59
  currentDirectory: paths.packageRoot,
60
60
  });
61
- if (coreVersion !== packageVersion) {
62
- throw new Error(`package version ${packageVersion} does not match Core version ${coreVersion}`);
63
- }
64
61
  stdout.write(`dev-flow-codex ${packageVersion} (core ${coreVersion})\n`);
65
62
  return { code: 0, signal: null };
66
63
  }
package/lib/lifecycle.mjs CHANGED
@@ -20,7 +20,7 @@ import { containedPath } from "./paths.mjs";
20
20
 
21
21
  const execFile = promisify(execFileCallback);
22
22
 
23
- export const CODEX_COMPATIBILITY_RANGE = ">=0.147.0 <0.148.0";
23
+ export const CODEX_COMPATIBILITY_RANGE = ">=0.147.0";
24
24
  export const MARKETPLACE_NAME = "dev-flow-local";
25
25
  export const PLUGIN_NAME = "dev-flow-codex";
26
26
  export const PLUGIN_SELECTOR = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;
@@ -293,9 +293,6 @@ async function preflightSetup({ paths, packageVersion, codexExecutable, environm
293
293
  environment,
294
294
  currentDirectory: paths.packageRoot,
295
295
  });
296
- if (coreVersion !== packageVersion) {
297
- throw new Error(`packaged Core version ${coreVersion} does not match package version ${packageVersion}`);
298
- }
299
296
  const codexVersion = await inspectCodexVersion(codexExecutable, {
300
297
  environment,
301
298
  currentDirectory: paths.packageRoot,
@@ -473,7 +470,6 @@ function assertRegistrationAbsent(state, paths) {
473
470
  function assertRemovalReceipt(receipt, paths, packageVersion) {
474
471
  const matches =
475
472
  receipt.product.version === packageVersion &&
476
- receipt.product.core_version === packageVersion &&
477
473
  receipt.registration.marketplace_name === MARKETPLACE_NAME &&
478
474
  receipt.registration.marketplace_root === paths.marketplaceRoot &&
479
475
  receipt.registration.plugin_name === PLUGIN_NAME &&
@@ -739,7 +735,6 @@ function createReceipt({
739
735
  installedAt,
740
736
  }) {
741
737
  return validateReceipt({
742
- schema_version: 3,
743
738
  product: {
744
739
  name: PLUGIN_NAME,
745
740
  version: packageVersion,
@@ -822,29 +817,26 @@ async function readJSON(path, label) {
822
817
  }
823
818
 
824
819
  export function versionSatisfiesRange(version, range = CODEX_COMPATIBILITY_RANGE) {
825
- const match = /^>=(\S+)\s+<(\S+)$/.exec(range);
820
+ const match = /^>=(\S+)$/.exec(range);
826
821
  if (!match) throw new Error(`unsupported compatibility range ${JSON.stringify(range)}`);
827
822
  const candidate = parseSemver(version, "Codex version");
828
823
  const minimum = parseSemver(match[1], "compatibility minimum");
829
- const maximum = parseSemver(match[2], "compatibility maximum");
830
- return compareSemver(candidate, minimum) >= 0 && compareSemver(candidate, maximum) < 0;
824
+ return compareSemver(candidate, minimum) >= 0;
831
825
  }
832
826
 
833
827
  export function validateReceipt(receipt, { compatibilityRange = CODEX_COMPATIBILITY_RANGE } = {}) {
834
828
  assertObject(receipt, "registration receipt");
835
829
  assertExactKeys(
836
830
  receipt,
837
- ["schema_version", "product", "host", "registration", "paths", "resource_digests", "installed_at"],
831
+ ["product", "host", "registration", "paths", "resource_digests", "installed_at"],
838
832
  "registration receipt",
839
833
  );
840
- if (receipt.schema_version !== 3) throw new Error("registration receipt schema_version must equal 3");
841
834
 
842
835
  assertObject(receipt.product, "product");
843
836
  assertExactKeys(receipt.product, ["name", "version", "core_version", "codex_compatibility"], "product");
844
837
  assertEqual(receipt.product.name, "dev-flow-codex", "product.name");
845
838
  parseSemver(receipt.product.version, "product.version");
846
839
  parseSemver(receipt.product.core_version, "product.core_version");
847
- assertEqual(receipt.product.core_version, receipt.product.version, "product Core version");
848
840
  assertEqual(receipt.product.codex_compatibility, compatibilityRange, "product compatibility range");
849
841
 
850
842
  assertObject(receipt.host, "host");
@@ -1005,7 +997,6 @@ function assertCompatibleReceiptUpgrade(previousReceipt, currentReceipt) {
1005
997
 
1006
998
  function upgradeOwnershipProjection(receipt) {
1007
999
  return {
1008
- schema_version: receipt.schema_version,
1009
1000
  product: {
1010
1001
  name: receipt.product.name,
1011
1002
  codex_compatibility: receipt.product.codex_compatibility,
@@ -1022,7 +1013,6 @@ function upgradeOwnershipProjection(receipt) {
1022
1013
 
1023
1014
  function ownershipProjection(receipt) {
1024
1015
  return {
1025
- schema_version: receipt.schema_version,
1026
1016
  product: receipt.product,
1027
1017
  host: receipt.host,
1028
1018
  registration: receipt.registration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-flow-codex",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "private": false,
5
5
  "description": "Explicit-only Dev Flow integration for Codex CLI.",
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-flow-codex",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Explicit-only Dev Flow integration for Codex CLI.",
5
5
  "author": {
6
6
  "name": "Dev Flow"
@@ -5,10 +5,10 @@ description: "Explicit-only Dev Flow entry point for Codex. Use only when the cu
5
5
 
6
6
  # Dev Flow
7
7
 
8
- This Skill is the Contract 0.2 Codex adapter for the shared Dev Flow Core. Core owns task state,
8
+ This Skill is the current Core contract Codex adapter for the shared Dev Flow Core. Core owns task state,
9
9
  current node, legal transitions, destinations, recovery, blockers, and terminal outcomes. The Skill
10
- admits one explicit request, presents a complete Core Action, renders method work, and forwards one
11
- closed result without keeping adapter state.
10
+ admits one explicit request, silently validates normal startup results, renders method work, and
11
+ forwards one closed result without keeping adapter state.
12
12
 
13
13
  ## Admission gate
14
14
 
@@ -38,20 +38,23 @@ If admission fails, explain the missing precondition and stop before Skill-owned
38
38
  not complete a task-bearing call or create adapter state. Host-exposed read-only or Core-rejected
39
39
  calls are not activation and must be reported honestly.
40
40
 
41
+ Successful admission is internal startup work. Do not narrate the selector, Git-root, repository,
42
+ profile-default, or authorization checklist; continue directly to the compatibility handshake.
43
+
41
44
  ## Compatibility handshake
42
45
 
43
46
  Only after admission passes, call `dev_flow_server_info({})`; it must be the first Dev Flow tool
44
47
  call. Require one complete structured result proving:
45
48
 
46
- - product is exactly `dev-flow`, and Core version equals the packaged product version;
47
- - `schema_version` is exactly `2` and `core_limits_version` is exactly `0.2`;
49
+ - product is exactly `dev-flow`, and Core version is present and canonical. Core and the Codex
50
+ package are independently versioned products, so their versions are not required to be equal;
48
51
  - transport is exactly `stdio`, health is exactly `ready`, and the supported host set contains
49
52
  `codex`;
50
- - `supported_processes` contains exactly one closed `standard-development@1` entry:
51
- `process_id` is `standard-development`, `process_version` is `1`, `definition_digest` is present
52
- and canonical, and `new_task_supported` is exactly `true`;
53
- - `method_profiles` is exactly `plain`, `spec-kit`, `openspec` in that order;
54
- - the tool catalog contains exactly these six raw names, in this order:
53
+ - `supported_processes` contains exactly one closed `standard-development` entry:
54
+ `process_id` is `standard-development`, `definition_digest` is present and canonical, and
55
+ `new_task_supported` is exactly `true`;
56
+ - `method_profiles` contains exactly `plain`, `spec-kit`, and `openspec`, regardless of order;
57
+ - the tool catalog contains exactly these six raw names, regardless of order:
55
58
 
56
59
  1. `dev_flow_server_info`
57
60
  2. `dev_flow_open_task`
@@ -60,10 +63,17 @@ call. Require one complete structured result proving:
60
63
  5. `dev_flow_apply_action`
61
64
  6. `dev_flow_cancel_task`
62
65
 
63
- Any other schema, unsupported process version, absent process digest, false new-task support,
64
- incomplete method-profile set, missing/additional/reordered tool, or incomplete, truncated, malformed,
65
- or incompatible result fails the handshake. Stop without task discovery or undocumented probing. Do
66
- not inspect local source or an installed binary, and do not start a second MCP server to bypass a
66
+ Package resources, the bundled Core executable and version, Codex compatibility, and registration
67
+ ownership are setup-time checks owned by `dev-flow-codex setup`; do not repeat them by inspecting the
68
+ installed package or executable during each Skill invocation.
69
+
70
+ An unsupported process, absent process digest, false new-task support, incomplete method-profile set,
71
+ missing or additional tool, or incomplete, truncated, malformed, or incompatible result fails the
72
+ handshake. On success, do not display or explain the handshake checklist, versions, process digest,
73
+ profiles, or tool catalog; continue immediately to task discovery. On failure, report only the
74
+ specific blocking condition and one actionable next step. For installation or compatibility failures,
75
+ direct the user to rerun `dev-flow-codex setup`. Stop without task discovery or undocumented probing.
76
+ Do not inspect local source or an installed binary, and do not start a second MCP server to bypass a
67
77
  failed handshake.
68
78
 
69
79
  ## Task discovery
@@ -111,12 +121,14 @@ Use this exact `new_task` JSON shape, changing only values derived from the admi
111
121
 
112
122
  Ask before opening only when a material request, initial-bound, verification, or profile choice
113
123
  cannot be derived without changing user intent. Let Core decide whether a compatible intent creates
114
- or resumes a task. Report an ownership or contract conflict unchanged in meaning and stop.
124
+ or resumes a task. Report an ownership or contract conflict unchanged in meaning and stop. After a
125
+ successful open, give at most one concise status containing the Task identity, revision, and current
126
+ node, then begin the node's substantive repository work without reciting startup checks.
115
127
 
116
128
  ## Governed action loop
117
129
 
118
130
  The inseparable Action fields are exactly `task_id`, `revision`, `action_id`, `action_kind`,
119
- `process_id`, `process_version`, `process_definition_digest`, `current_node`, `node_purpose`,
131
+ `process_id`, `process_definition_digest`, `current_node`, `node_purpose`,
120
132
  `entry_conditions`, `completion_conditions`, `allowed_effects`, `required_evidence`,
121
133
  `method_profile`, `method_steps`, `available_transitions`, `payload_contract`, `guidance`,
122
134
  `repository_binding_digest`, and `issued_at`.
@@ -130,11 +142,11 @@ For an active task, perform each iteration in this order:
130
142
  allowed effects, required evidence, method profile, method steps, available transitions, payload
131
143
  schema/contract, guidance, repository-binding digest, and issued time as one inseparable Core
132
144
  result. Stop if any field is absent, malformed, or truncated.
133
- 3. Present the current node, purpose, entry and completion conditions, allowed effects, required
134
- evidence, immutable method profile, every method step, and all `available_transitions`. For every
135
- returned transition show its identifier, Core-returned destination for visibility, description or
136
- `when` selection condition, guard identifier, and reason rule. Do not reduce this to one
137
- recommended next step.
145
+ 3. Validate the complete Action internally. During normal work, give only a concise current-node
146
+ status and proceed; do not dump entry conditions, completion conditions, allowed effects, required
147
+ evidence, method steps, payload details, or all `available_transitions`. Surface a contract field
148
+ only when it requires a user decision, limits requested authority, or explains a blocker. Keep the
149
+ complete Action bound for transition selection and forwarding even when it is not displayed.
138
150
  4. Stop when the complete result reports a blocker or terminal outcome.
139
151
  5. Render and perform each current method operation under the allowed effects, repository
140
152
  instructions, verification budget, and current user authority.
@@ -247,7 +259,6 @@ Map every mutation top-level field from the same fresh Action:
247
259
  - `fresh_action.action_id` -> top-level `action_id`;
248
260
  - `fresh_action.action_kind` -> top-level `action_kind`;
249
261
  - `fresh_action.process_id` -> top-level `process_id`;
250
- - `fresh_action.process_version` -> top-level `process_version`;
251
262
  - `fresh_action.process_definition_digest` -> top-level `process_definition_digest`;
252
263
  - `fresh_action.current_node` -> top-level `source_cursor`;
253
264
  - `fresh_action.repository_binding_digest` -> top-level `repository_binding_digest`;
@@ -262,7 +273,6 @@ apply_arguments = {
262
273
  "action_id": fresh_action.action_id,
263
274
  "action_kind": fresh_action.action_kind,
264
275
  "process_id": fresh_action.process_id,
265
- "process_version": fresh_action.process_version,
266
276
  "process_definition_digest": fresh_action.process_definition_digest,
267
277
  "source_cursor": fresh_action.current_node,
268
278
  "repository_binding_digest": fresh_action.repository_binding_digest,
@@ -312,7 +322,7 @@ transport-failed instead of returning one complete structured result. Do not imm
312
322
  `dev_flow_apply_action` and do not infer the result from repository state or worktree contents.
313
323
 
314
324
  Before calling `dev_flow_apply_action`, retain the original `request_id`, `task_id`, `process_id`,
315
- `process_version`, `process_definition_digest`, `source_cursor`, `revision`, `action_id`,
325
+ `process_definition_digest`, `source_cursor`, `revision`, `action_id`,
316
326
  `action_kind`, `repository_binding_digest`, and exact closed `payload` from the same fresh action and
317
327
  the same apply dispatch. Never derive or reconstruct them from an incomplete response or partial
318
328
  output.
@@ -324,7 +334,6 @@ When all required original identity values are retained, construct exactly this
324
334
  {
325
335
  "operation_id": "<original apply request_id>",
326
336
  "process_id": "standard-development",
327
- "process_version": 1,
328
337
  "process_definition_digest": "<original process definition digest>",
329
338
  "source_cursor": "<original source cursor>",
330
339
  "expected_revision": 3,
@@ -1,6 +1,6 @@
1
1
  # Codex Method Profile Rendering Reference
2
2
 
3
- This is the closed Codex Host-rendering reference for Core Contract 0.2 semantic method steps. Read
3
+ This is the closed Codex Host-rendering reference for current Core contract semantic method steps. Read
4
4
  it only after Core returns a complete current Action. It explains how Codex may perform the work; it
5
5
  is not a process definition or a second task cursor.
6
6
 
@@ -1,4 +1,4 @@
1
- # Core Contract 0.2 Node Payload Construction
1
+ # current Core contract Node Payload Construction
2
2
 
3
3
  This reference helps the Codex Adapter construct the one closed payload branch returned by the
4
4
  current Core Action. It is not a process definition, transition table, cursor, or authority. The
Binary file