@zoisythe/codex-codeintel 0.10.0 → 0.10.1

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.
@@ -1,13 +1,13 @@
1
- # Codex 原生 Hook 宿主验收
1
+ # Codex native Hook host acceptance
2
2
 
3
- 该步骤需要支持 async command Hook、SubagentStop.agent_id 和 Interrupt 的当前 Codex 宿主。先构建交付 bundle、审阅 hooks/hooks.json,再由用户通过 /hooks 重新审阅;在新会话运行。不要复制、修改信任记录或使用绕过 Hook 信任的参数。保留原有自动诊断/门禁选择;需要启用测试模式时只使用用户已经授权的隔离测试配置。
3
+ Use a current Codex host supporting asynchronous command Hooks, `SubagentStop.agent_id` and Interrupt. Build the delivered bundle, inspect `hooks/hooks.json`, then have the user review the definitions through `/hooks` and start a new session. Preserve Hook trust records and existing automatic-diagnostic/gate choices. Use only an already-authorized isolated test configuration when enabling test feedback.
4
4
 
5
- 记录宿主版本、插件 bundle SHA-256、六个已审阅事件、测试工作区和运行时间;不要保存凭据或未经筛选的用户 transcript。
5
+ Record the host version, bundle SHA-256, six reviewed events, test workspace and run time. Keep credentials and unfiltered user transcripts out of the record.
6
6
 
7
- 1. 在隔离 TypeScript 或 Biome fixture 使用 Bash 读取文件,确认没有启动检查;分别通过 Bash 写入、apply_patch 和 mcp__lsp__apply 修改源码,核对宿主实际投递的规范工具名与 tool_use_id。八个只读 MCP 工具不能触发写分析,rename/format/actions 只预览。
8
- 2. 使用缓慢检查器让 PostToolUse 持续运行,确认原工具结果立即可用,后台结果经宿主原生 async 投递。普通 Stop 应在 1.5 秒内结束,等待后台结果不超过 300 ms,pending 留存;注意宿主只在安全点追加异步上下文,不自动创建新 turn。
9
- 3. 由用户明确授权两个测试子代理,各修改不同文件并并行结束,主任务同时 Stop。核对显式 agent_id 的独立反馈和 shared 标记,子代理不得收到其他代理交付或 decision:block。仅主任务在已启用的全局门禁下,可对当前可靠新增错误每 turn 请求一次续跑。
10
- 4. 正在等待后台结果时使用宿主中断操作,捕获真实 Interrupt 事件。确认中断迅速完成,明确归属的旧等待被解除,其他代理仍可领取结果;共享 LSP 和进行中的 MCP 写入未被中断。结束会话后迟到结果不得重新出现。
11
- 5. 触发 resume、clear、fork 和 compact;前三者按会话语义复用或重建,compact 不重新发现基线。每条反馈最多 2 KiB、五条关键诊断;缓存 diagnostics 可查看详情。核对 stdout 成功写出才 ACK,重试允许使用相同 deliveryId。
7
+ 1. In an isolated TypeScript or Biome fixture, read a file through Bash and confirm that no check starts. Modify source through Bash, apply_patch and mcp__lsp__apply, checking the canonical tool names and tool_use_id delivered by the host. The nine read-only MCP tools must not trigger write analysis; rename, format and actions only produce previews.
8
+ 2. Use a slow checker to keep PostToolUse running. Confirm that the original tool result is available immediately and the host delivers background results through native async context. Ordinary Stop should finish within 1.5 seconds, wait at most 300 ms for background results and retain pending work. The host appends async context at safe points; it does not automatically create a new turn.
9
+ 3. Have the user explicitly authorize two test subagents, each editing a different file and ending in parallel while the main task also stops. Verify independent feedback for explicit agent_id values and shared labels. A subagent must not receive another agent's delivery or decision:block. Only the main task, with an existing global gate enabled, may request one continuation per turn for reliable newly introduced errors.
10
+ 4. Interrupt the host while waiting for background results and capture the real Interrupt event. Confirm prompt interruption, release of the interrupted actor's old waits, and continued delivery to other actors. Shared LSP processes and in-progress MCP writes must remain available. Late results must not reappear after the session ends.
11
+ 5. Exercise resume, clear, fork and compact. The first three reuse or rebuild state according to session semantics; compact must not rediscover baselines. Each feedback message contains at most 2 KiB and five key diagnostics; cached diagnostics provide details. Verify that ACK follows a successful stdout write and retries may reuse the same deliveryId.
12
12
 
13
- 仓库中的 hook-flow、automatic-e2e、background-hooks-e2e 测试验证实际服务/CLI、竞态、输出预算、ACK 和取消;它们直接输入 Hook JSON,不证明宿主 matcher、原生 async 调度或真实 agent_id/Interrupt 投递正确。未完成上述宿主步骤时必须在验收记录中明确标为待验收。Linux/macOS/Windows CI 验证 bundle 行为,不需要本机 Rust。
13
+ The repository's hook-flow, automatic-e2e and background-hooks-e2e tests exercise the actual service/CLI, races, output budgets, ACK and cancellation. They supply Hook JSON directly, so they do not establish correct host matching, native async scheduling or real agent_id/Interrupt delivery. Mark host acceptance as pending in the acceptance record until the steps above are completed. Linux/macOS/Windows CI verifies bundle behavior without requiring local Rust.
@@ -0,0 +1,81 @@
1
+ # Local Rust and MATLAB LSP acceptance
2
+
3
+ Verify real MCP behavior through the delivered `dist/cli.js` on a machine with the tools installed:
4
+
5
+ ```sh
6
+ npm run build
7
+ REAL_TOOLS=1 npm run test:local
8
+ ```
9
+
10
+ The suites run sequentially. You can also run `npm run test:rust` or `npm run test:matlab` separately. Every entry requires `REAL_TOOLS=1` for real acceptance; it skips by default and fails on missing prerequisites when enabled. `npm test` includes both suites with the same switch. Rust CI explicitly enables it; MATLAB acceptance uses the local installation and license.
11
+
12
+ `npm run ci` runs type checking, Biome, the build and `npm test` sequentially on the current platform and Node version. Setting `REAL_TOOLS=1` includes real-tool acceptance in this entry as well.
13
+
14
+ ## Tool requirements
15
+
16
+ Rust requires `rustc`, `cargo` and `rust-analyzer` on PATH, plus rustfmt in the toolchain's `bin` directory located through `rustc --print sysroot`. Both Rustup-managed and standalone toolchains are supported. Fixtures use offline Cargo workspaces and local path dependencies. Target calls in integration tests sit outside `assert_eq!` macros, so reference and rename acceptance does not depend on standard-library macro expansion through rust-src.
17
+
18
+ MATLAB uses the [MathWorks MATLAB-language-server](https://github.com/mathworks/MATLAB-language-server) and requires MATLAB R2021b or later with a working license. Tests discover an installed server under `~/.vscode/extensions/mathworks.language-matlab-*` and MATLAB on PATH. Override paths with these variables:
19
+
20
+ | Variable | Meaning |
21
+ | --- | --- |
22
+ | `REAL_TOOLS` | Set to `1` to enable real-tool acceptance; skipped by default |
23
+ | `CODEX_LSP_MATLAB_SERVER` | Absolute path to the official server's `out/index.js` |
24
+ | `CODEX_LSP_MATLAB_INSTALL_PATH` | MATLAB installation root, such as `C:/Program Files/MATLAB/R2026b` |
25
+ | `CODEX_LSP_RUST_ARTIFACTS` | Directory for final Rust fixtures and MCP records |
26
+ | `CODEX_LSP_MATLAB_ARTIFACTS` | Directory for MATLAB tool paths, server version, fixtures and MCP records |
27
+ | `CODEX_LSP_ARTIFACTS` | Directory for per-response MCP JSONL traces, including in-progress checks |
28
+
29
+ The MATLAB LSP starts a separate local analysis process. Tests close fixture services and remove temporary workspaces on completion. Configuration and caches are isolated from the user's `CODEX_HOME`, and automatic feedback stays off.
30
+
31
+ ## Coverage
32
+
33
+ | Server | Accepted behavior |
34
+ | --- | --- |
35
+ | Rust | Passive status, diagnostics and repair updates, symbol/anchor targeting, references, calls, completion, composite inspection and candidate test association, rename, rustfmt, Code Action previews and apply, plan conflicts and single use, Cargo workspace checks |
36
+ | MATLAB | Passive status, warmup, positioned syntax diagnostics and repairs, symbols, anchor-based definitions, references, completion, explicit unsupported call hierarchy, local-variable rename, formatting, read-only previews, single-use apply and conflict rejection |
37
+
38
+ Both suites verify edits through MCP previews and apply. MATLAB is outside the built-in plan-diagnostic simulation providers; its rename and format cases verify edit plans, writes and real post-write diagnostics.
39
+
40
+ MATLAB diagnostics lack document versions, so an initial empty report remains pending. Acceptance first confirms a real error, then verifies clearing after repair. References and rename target identifiers through `@@` anchors; formatting checks MATLAB indentation.
41
+
42
+ ## Custom MATLAB configuration
43
+
44
+ Configure the same server in the project's `.codex/lsp-client.json`:
45
+
46
+ ```json
47
+ {
48
+ "schemaVersion": 1,
49
+ "lsp": {
50
+ "matlab": {
51
+ "command": ["node", "/absolute/path/to/MATLAB-language-server/out/index.js", "--stdio"],
52
+ "extensions": [".m"],
53
+ "languageId": "matlab",
54
+ "settings": {
55
+ "MATLAB": {
56
+ "installPath": "/absolute/path/to/MATLAB",
57
+ "matlabConnectionTiming": "onStart",
58
+ "indexWorkspace": false,
59
+ "telemetry": false,
60
+ "maxFileSizeForAnalysis": 0,
61
+ "signIn": false
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ `settings` serves configuration requests and configuration-change notifications, including dotted section names such as `MATLAB.installPath`. `languageId` changes only this server's document language; omitting it preserves the existing extension mapping.
70
+
71
+ Example trace capture in PowerShell:
72
+
73
+ ```powershell
74
+ $env:REAL_TOOLS = "1"
75
+ $env:CODEX_LSP_RUST_ARTIFACTS = Join-Path $PWD "test-results/local-lsp/rust"
76
+ $env:CODEX_LSP_MATLAB_ARTIFACTS = Join-Path $PWD "test-results/local-lsp/matlab"
77
+ $env:CODEX_LSP_ARTIFACTS = Join-Path $PWD "test-results/local-lsp/mcp"
78
+ npm run test:local
79
+ ```
80
+
81
+ Records include fixture source and local tool paths and are stored under the Git-ignored `test-results/` directory.
package/docs/usage.md CHANGED
@@ -1,218 +1,264 @@
1
- # Codex CodeIntel 使用指南
1
+ # Codex CodeIntel usage guide
2
2
 
3
- 本文对应 **0.10.0**。插件提供九个 MCP 工具,Hooks 与 MCP 共享本地 LSP、项目检查和诊断缓存。运行要求 Node.js >=22.12.0;交付 bundle 不需要安装运行时依赖。
3
+ This guide covers **0.10.1**. Development uses Node 26 LTS and the repository's npm 12.2.1; the CLI is codeintel. The plugin provides ten MCP tools, with Hooks and MCP sharing local LSP services, project checks and diagnostic caches. Runtime requirements are Node.js 24.20.0+ on 24.x or 26.13.0+ on 26.x. The delivered bundle needs no runtime dependency installation.
4
4
 
5
- ## 安装与首次使用
5
+ ## Installation and first use
6
6
 
7
7
  ```sh
8
8
  codex plugin marketplace add https://github.com/zoisythe/codex-codeintel
9
9
  codex plugin add codex-codeintel@codex-codeintel
10
10
  ```
11
11
 
12
- 开启新会话并通过 `/hooks` 检查 Hook 定义。使用 setupLSP(`$setup-lsp`)配置、安装或修复所需工具。普通编码中能力缺失只需报告一次并继续其他工作。
12
+ Start a new session and review Hook definitions through `/hooks`. Use setupLSP (`$setup-lsp`) to configure, install or repair tools. During ordinary coding, report a missing capability once and continue other work.
13
13
 
14
14
  <a id="configuration"></a>
15
- ## 配置位置与覆盖规则
16
15
 
17
- 读取 `$CODEX_HOME/lsp-client.json`(默认 `~/.codex/lsp-client.json`)和项目的 `.codex/lsp-client.json`。优先级为内置、全局、项目;两者都使用 `schemaVersion:1`。同一语言的 LSP 对象整体替换;exclude/projectChecks 数组整体替换。
16
+ ## Configuration locations and precedence
17
+
18
+ Read `$CODEX_HOME/lsp-client.json` (default `~/.codex/lsp-client.json`) and the project's `.codex/lsp-client.json`. Precedence is built-ins < global < project; both files use `schemaVersion: 1`. Each language's LSP entry replaces the previous entry wholesale, as do the exclude/projectChecks arrays.
18
19
 
19
20
  ```json
20
21
  {
21
- "schemaVersion":1,
22
- "projectChecks":"auto",
23
- "lsp":{"python":"ty","typescript":"typescript","go":"gopls","cpp":"clangd","rust":"rust"},
24
- "lint":{"javascript":"auto","python":"auto"},
25
- "automaticDiagnostics":{"postToolUse":"off","stop":"off"}
22
+ "schemaVersion": 1,
23
+ "projectChecks": "auto",
24
+ "lsp": {"python":"ty","typescript":"typescript","go":"gopls","cpp":"clangd","rust":"rust"},
25
+ "lint": {"javascript":"auto","python":"auto"},
26
+ "automaticDiagnostics": {"postToolUse":"off","stop":"off"}
26
27
  }
27
28
  ```
28
29
 
29
- | 字段 | 含义 |
30
+ | Field | Meaning |
30
31
  | --- | --- |
31
- | lsp | 语言到内置名称、false 或自定义 command/extensions/env/initialization 对象的映射 |
32
- | lint.javascript | auto、biome、eslint、off |
33
- | lint.python | auto、ruff、off |
34
- | formatting | tabSize(1–16)、insertSpaces |
35
- | exclude | 相对路径正向 glob;不接受绝对路径、反斜线、否定或 .. |
36
- | projectChecks | auto 或显式检查数组;数组替换自动发现结果 |
37
- | automaticDiagnostics | postToolUse=delta/off,stop=errors/off;默认均 off |
38
- | stopGate | 只有用户全局配置可设 introduced-errors;默认 off |
32
+ | lsp | Map languages to built-in names, false, or custom command/extensions/env/initialization/settings/languageId objects |
33
+ | lint.javascript | auto, biome, eslint, off |
34
+ | lint.python | auto, ruff, off |
35
+ | formatting | tabSize (1–16), insertSpaces |
36
+ | exclude | Relative forward-slash globs; absolute paths, backslashes, negation and .. are rejected |
37
+ | projectChecks | auto or an explicit array of checks; the array replaces automatic discovery |
38
+ | automaticDiagnostics | postToolUse=delta/off, stop=errors/off; both default to off |
39
+ | stopGate | introduced-errors is accepted only in the user's global configuration; defaults to off |
39
40
 
40
- 本地工具优先,显式命令失败不回退到下载版本。Python ty 与 Ruff 独立;lint=off 不会禁用显式格式化。TypeScript 默认使用传统 language server,原生 TypeScript 7 可选择 tsc。Go 使用 gopls;C/C++ 和 Rust 使用现有本地工具链。
41
+ Local tools take precedence. A failing explicit command does not fall back to a downloaded version. Python ty and Ruff work independently; lint=off leaves explicit formatting available. TypeScript defaults to the traditional language server; native TypeScript 7 can select tsc. Go uses gopls, while C/C++ and Rust reuse installed local toolchains.
41
42
 
42
- 配置损坏不阻断编辑。status、缓存读取仍可用;可定位的语言/检查配置错误只影响相关能力。status 不启动 LSP、不下载工具,unverified 不代表已经成功启动。目录信任记录不控制插件执行。
43
+ Malformed configuration does not block editing. status and cached reads remain available; localized language/check errors affect only the relevant capabilities. status starts no LSP process and downloads no tools; unverified does not establish successful startup. Directory trust records do not control plugin execution.
43
44
 
44
- ## 九个 MCP 工具
45
+ ## Ten MCP tools
45
46
 
46
- 所有调用使用绝对 workspace。位置为 **1-based、UTF-16 列**。位置操作接受以下一种定位方式:
47
+ Every call uses an absolute workspace. Positions are **1-based, with UTF-16 columns**. Position-based operations accept one locator:
47
48
 
48
- - line/column;
49
- - symbol,例如 Class.method;重载索引由 symbols 结果提供;
50
- - pattern,例如 function @@greet,以 @@ 标记光标。
49
+ - line/column;
50
+ - symbol, such as Class.method; overload indexes come from symbols results;
51
+ - pattern, such as function @@greet, with @@ marking the cursor.
51
52
 
52
- 重名或多个锚点匹配返回候选,插件不会猜测。工作区符号搜索仍使用 navigate 的 operation=symbols 和 query;path 用于选择语言服务器。
53
+ Ambiguous names or multiple anchor matches return candidates. Workspace symbol search uses navigate with operation=symbols and query; path selects the language server.
53
54
 
54
- | 工具 | 用途 |
55
+ | Tool | Purpose |
55
56
  | --- | --- |
56
- | check | 项目 CLI 检查;active 启动任务,cached 读取 job,跟随 next |
57
- | diagnostics | 显式路径、turn/session 的 LSP、lint 或 both 检查;active/cached |
58
- | status | 工具、配置、能力、失败和任务状态;refresh 重新验证 |
59
- | navigate | 原子语义查询及 outline |
60
- | rename | 只读重命名计划 |
61
- | format | 只读格式化计划 |
62
- | inspect | symbol 组合探索或 impact 影响分析 |
63
- | actions | list/explain/preview 修复动作 |
64
- | apply | 消费既有计划并顺序写入;唯一源码写入口 |
65
-
66
- ### 项目检查与诊断
57
+ | check | Project CLI checks; active starts a job, cached reads it; follow next |
58
+ | diagnostics | LSP, lint or both for explicit paths or turn/session scope; active/cached |
59
+ | status | Tools, configuration, capabilities, failures and job state; refresh revalidates |
60
+ | warmup | Explicitly initialize local LSP services without diagnostic baselines or downloads |
61
+ | navigate | Atomic semantic queries and outlines |
62
+ | rename | Read-only rename plans |
63
+ | format | Read-only formatting plans |
64
+ | inspect | Composite symbol exploration or impact analysis |
65
+ | actions | List, explain or preview fixes |
66
+ | apply | Consume an existing plan and write sequentially; the only source writer |
67
+
68
+ ### Project checks and diagnostics
69
+
70
+ Call check with:
67
71
 
68
72
  ```json
69
73
  {"workspace":"/project","run":"active"}
70
74
  ```
71
75
 
72
- 使用 check。任务未完成时跟随返回的 next;state=running/failed/stale 不能证明项目无错误。CLI 也可使用 `codex-codeintel check <workspace>`。
76
+ Follow the returned next until the job finishes; state=running/failed/stale is not a clean result. The CLI also supports `codeintel check <workspace>`.
73
77
 
74
- diagnostics 示例:
78
+ Example diagnostics call:
75
79
 
76
80
  ```json
77
81
  {"workspace":"/project","paths":["src/main.ts"],"source":"both","run":"active","severity":"error"}
78
82
  ```
79
83
 
80
- scope 可为 paths、turn、session;多会话时必须提供 session。路径诊断不能用省略路径或 "." 代替全项目检查,应使用 check。rule/severity 只筛选展示,不改变实际检查、基线或缓存;失败和 pending 状态不会被过滤隐藏。
84
+ scope accepts paths, turn or session; provide session when multiple sessions exist. Use check for whole-project checks; omitting diagnostic paths or passing "." does not replace it. rule/severity filter display only, leaving checks, baselines and caches unchanged. Failures and pending states remain visible.
81
85
 
82
- 默认诊断保留位置、规则、严重性、消息和已知修复可用性。修复编辑、完整文档及工具原始信息不会随每次诊断发送。统计按规则/文件汇总;归因仅使用可靠的既有 checker 基线,缺失时为 unattributed。不同规则、检查器与覆盖范围不能相互替代基线。
86
+ Diagnostics retain positions, rules, severity, messages and known fix availability. They omit full edits, documentation and raw tool payloads by default. Counts group by rule/file. Attribution uses reliable existing checker baselines and is unattributed when no baseline exists. Rules, checkers and coverage sets cannot substitute for one another's baselines.
83
87
 
84
- projectChecks 的每项包含 name、cwd、command、parser、coverage;相对命令/coverage 均相对 cwd。支持 parser:tsc、ty、go、cargo、ruff、eslint、biome、sarif、json。自定义 json 为:
88
+ Each projectChecks entry contains name, cwd, command, parser and coverage; relative commands and coverage resolve from cwd. Supported parsers are tsc, ty, go, cargo, ruff, eslint, biome, sarif and json. Custom json output has this shape:
85
89
 
86
90
  ```json
87
91
  {"diagnostics":[{"path":"src/a.ts","line":1,"column":1,"severity":"error","source":"rule","message":"problem"}]}
88
92
  ```
89
93
 
90
- 自动发现支持根 tsconfig、ty、Go module、Cargo workspace 和匹配的 lint 配置。TypeScript references/多包、特殊 features、自定义语言及 C/C++ CLI 检查应显式配置。命令必须只检查,不修改源码、自动修复或安装依赖。示例见 [docs/examples](examples/)。
94
+ Automatic discovery supports root tsconfig, ty, Go modules, Cargo workspaces and matching lint configurations. Configure TypeScript references/multiple packages, special features, custom languages and C/C++ CLI checks explicitly. Commands must check without modifying source, applying fixes or installing dependencies. See [configuration examples](examples/).
95
+
96
+ Go auto checking runs go vet -mod=readonly -json ./... and uses go list to identify actual Go/Test inputs. Files excluded by build tags/platform or belonging to other modules do not count as covered. Automatic checking disables Go toolchain/module downloads; prepare dependencies and environments beforehand. Missing tools or package-discovery failures remain unavailable/failed.
91
97
 
92
- Go 自动检查使用 go vet -mod=readonly -json ./...,由 go list 确认实际 Go/Test 输入,不把 build tags、平台排除或其他 module 的文件算作覆盖。自动检查禁止 Go 工具链/模块下载;需要的环境和依赖应先准备好。缺失工具或包发现失败为 unavailable/failed,不能返回干净结果。
98
+ ### Explicit warmup
93
99
 
94
- ### 导航与组合分析
100
+ MCP warmup accepts an absolute workspace and optional path/paths. The CLI is `codeintel warmup <workspace> [--path relative-path]`, with repeatable --path. Without files, it selects at most two languages by workspace file counts and initializes one representative file per language. Explicit files are deduplicated by actual server/root, up to 200 files.
95
101
 
96
- navigate 支持 definition、declaration、references、symbols、prepare_rename、hover、typeDefinition、implementation、signatureHelp、incoming、outgoing、supertypes、subtypes、completion。
102
+ Warmup has a 20-second total budget, supports cancellation and returns per-item initialized/reused/unsupported/pending/failed states and timings. It initializes installed tools without diagnostics or downloads and works with automatic feedback off. status, including refresh=true, remains passive.
103
+
104
+ ### Navigation and composite analysis
105
+
106
+ navigate supports definition, declaration, references, symbols, prepare_rename, hover, typeDefinition, implementation, signatureHelp, incoming, outgoing, supertypes, subtypes and completion.
97
107
 
98
108
  ```json
99
109
  {"workspace":"/project","path":"src/main.ts","operation":"symbols"}
100
110
  ```
101
111
 
102
- outline 默认只展示顶层;传入 symbol 展开该节点的直接成员。成员过多会分页,不再因一个大 class 超限而返回空列表。关系查询返回直接关系;进一步展开需重新定位对应符号。服务器不支持时明确返回 unsupported。
112
+ Outlines show top-level nodes by default. Keep navigate's operation="symbols" and pass symbol to expand a node's immediate members. Large member lists paginate instead of returning an empty list for an oversized class. Relationship queries return direct relationships; locate the next symbol to expand further. Unsupported server capabilities return unsupported explicitly.
113
+
114
+ Use inspect with operation="symbol" for a symbol overview. The source parameter belongs to inspect; set it to true when source text is needed:
103
115
 
104
116
  ```json
105
117
  {"workspace":"/project","path":"src/main.ts","operation":"symbol","symbol":"greet","source":true}
106
118
  ```
107
119
 
108
- 使用 inspect 聚合签名/文档、定义、引用摘要和调用关系;source 默认省略。operation=impact 接收明确 path/paths 或定位符,汇总顶层类型/函数及类型成员的引用,排除局部变量、字段噪声。symbols 可指定文件内的符号路径集合,逐项保留歧义或失败;调用方来自调用层级,普通引用单独统计。transitive=true 最多追加一层,预算不足明确 partial。各子查询独立报告失败。
120
+ inspect combines signatures/documentation, definitions, reference summaries and call relationships; source is omitted by default. operation=impact accepts explicit path/paths or a locator, collecting references to top-level types/functions and type members while excluding local-variable and field noise. symbols can select symbol paths within files, preserving ambiguity or failures per item. Callers come from call hierarchy; ordinary references are counted separately. transitive=true adds at most one layer and reports partial when the budget is exhausted. Each subquery reports failures independently.
109
121
 
110
- 候选测试仅依据文件命名和符号引用,不是运行时覆盖证明。零引用不证明可安全删除;没有并发安全或死代码自动裁决。
122
+ Candidate tests are based on filenames and symbol references; they do not establish runtime coverage. Zero references does not prove safe deletion. The tool does not automatically decide concurrency safety or dead code.
111
123
 
112
- ### lint 与 LSP 修复
124
+ ### Lint and LSP fixes
125
+
126
+ Call actions with:
113
127
 
114
128
  ```json
115
129
  {"workspace":"/project","path":"src/main.py","operation":"list","source":"lint"}
116
130
  ```
117
131
 
118
- 使用 actions。source=lint/lsp/both,默认 both。list 返回动作 id、标题、来源、适用性和不可用原因,不默认返回全部编辑。
132
+ source accepts lint/lsp/both and defaults to both. list returns action IDs, titles, origins, applicability and unavailability reasons, omitting full edits by default.
119
133
 
120
- explain 接收 path 和 rule。返回当前安装工具可确认的规则说明、文档和有效设置;details=true 按需展开。工具未提供配置来源或忽略原因时明确为 unknown,不猜测。
134
+ explain takes path and rule and returns documentation and effective settings confirmed by the installed tool. details=true expands information on demand. Missing configuration provenance or ignore reasons remain unknown.
121
135
 
122
- preview 传入选定 ids,或在明确文件范围内批量生成计划:
136
+ preview takes selected ids or creates a batch plan within an explicit file scope:
123
137
 
124
138
  ```json
125
139
  {"workspace":"/project","operation":"preview","ids":["action-id"]}
126
140
  ```
127
141
 
128
- 批量默认只选择工具明确标记 safe 的动作。unsafe、unknown 和 suggestions 需显式选择;ESLint fixable 不会被重标成 safe。Ruff/ESLint 保留逐诊断编辑,Biome 通过 stdin 生成文件级修复;按 rule 预览时仅处理当前诊断已确认启用的规则,不通过筛选开启原本关闭的规则。
142
+ Batch selection includes only actions explicitly marked safe by their vendor. Select unsafe, unknown and suggestion actions explicitly; ESLint fixable does not mean safe. Ruff/ESLint retain per-diagnostic edits; Biome generates file-level fixes through stdin. A rule-scoped preview uses rules confirmed enabled by current diagnostics without enabling disabled rules.
129
143
 
130
- LSP 动作可 resolve 后生成纯文本计划。带 command、disabled 或创建/删除/移动文件的动作标为 unsupported,不执行其命令,也不部分应用。lint 修复不会顺带调用 formatter、添加抑制注释或修改配置。
144
+ LSP actions can resolve into text-only plans. Actions with command, disabled status or file creation/deletion/move operations are unsupported; their commands never execute and the action is not partially applied. Lint fixes do not run a formatter, add suppression comments or change configuration.
131
145
 
132
- ### 编辑计划与 apply
146
+ ### Edit plans and apply
133
147
 
134
- rename 示例:
148
+ Example rename arguments:
135
149
 
136
150
  ```json
137
151
  {"workspace":"/project","path":"src/main.ts","symbol":"greet","newName":"welcome"}
138
152
  ```
139
153
 
140
- format 示例:
154
+ Example format arguments:
141
155
 
142
156
  ```json
143
157
  {"workspace":"/project","paths":["src/main.ts"]}
144
158
  ```
145
159
 
146
- 两者都只生成 plan、文件摘要和 diff,不写入。随后:
160
+ Both return a plan, file summaries and a diff without writing. Then call apply with:
147
161
 
148
162
  ```json
149
163
  {"workspace":"/project","plan":"returned-plan-id"}
150
164
  ```
151
165
 
152
- 调用 apply。对已授权修改可连续执行预览与应用,无需新增人工批准步骤。计划只描述文本修改;它不包含内存类型模拟,也不保证构建或测试成功。
166
+ Preview and apply an already-authorized edit consecutively without another manual approval step. Text plans preview diagnostic changes using configured local language/checking tools by default. validate=false skips simulation. actions accepts validate/validationPaths only with operation=preview; validate=false cannot be combined with validationPaths. Simulation leaves apply authorization and write rules unchanged and does not guarantee a successful build or test run.
167
+
168
+ Plans live in bounded workspace-service memory for a fixed 30 minutes; reads and pagination do not renew them. Responses include createdAt, expiresAt and storage=memory. Limits are 16 plans and 32 MiB of total before/after content. Nonempty valid plans prevent the normal five-minute service idle exit but do not keep LSP subprocesses alive indefinitely. Capacity eviction, explicit refresh or service restart can invalidate plans earlier. apply's planFailure distinguishes consumed, expired, evicted, unavailable, stale and conflict; unknown IDs after restart report unavailable. Source, configuration, tool or request-environment changes invalidate plans. Application preflights every target, rejecting conflicts, boundary escapes, changed symlinks or overlapping edits, then rechecks and writes each file sequentially.
153
169
 
154
- 计划存在工作区服务的有界内存中,服务重启即失效。源文件、配置、工具或请求环境变化会使计划失效。应用先预检所有目标,冲突、越界、符号链接变化或重叠编辑会拒绝;之后逐文件确认并写入。
170
+ Plans are consumed when application starts and cannot be replayed. Cancellation/failure returns paths actually modified; multi-file application does not promise atomic rollback. Post-write diagnostic failures are supplementary status, not a reason to apply the same plan again. Generate a new plan for subsequent edits.
155
171
 
156
- 计划进入应用后被消费,不能重放。取消/失败返回实际修改路径;多文件操作不承诺原子回滚。写后诊断失败是补充状态,不能因此再次应用同一个计划。需要继续操作时重新生成计划。
172
+ ### Multi-tool diagnostic previews
157
173
 
158
- ## 分页与返回信息
174
+ Providers include Python ty and Ruff, traditional/native TypeScript including project-enabled checkJs, Biome/ESLint, Go/gopls and C/C++ clangd. Tools follow existing project configuration; disabled capabilities stay disabled and missing tools are not downloaded. Unsupported servers/scopes return unsupported explicitly. ESLint project/projectService type-aware rules are not simulated; the TypeScript provider supplies type checking.
159
175
 
160
- 默认最多 20 项,详情页约 8 KiB,结构化输出也受预算控制。文本仅作短摘要。始终跟随 next 提供的完整参数;不要自行计算 offset、复制旧 revision 或拼接游标。
176
+ A preview accepts up to 20 existing changed files plus up to 20 unchanged callers/dependencies in validationPaths, with at most 2 MiB of combined before/after content across all files. Additional files participate in diagnostics and plan identity checks without being formatted or written. They are an explicit scope, not automatically inferred complete impact coverage.
161
177
 
162
- 大型嵌套值拆成 items 中的字段片段:field 使用 result["key"][index] 表示原输出路径;value 保存完整小值,part/text 保存按序文本分段。路径中带点或斜线的键使用带引号的下标,避免歧义。源码、diff 和大 outline 可以完整续取,不静默丢失。底层项目任务或诊断批次仍需继续时,最后一页的 next 转交对应任务的后续参数。
178
+ A language scope spanning multiple LSP projects returns unsupported; split it by project. Separate server instances are not assumed to share every overlay. Ruff/ESLint stdin checks cover file-level rules; custom rules reading other files still see their original on-disk content, and the relevant check reports this limitation.
163
179
 
164
- 查询游标绑定查询、快照、配置及工具;apply 的后续页绑定已发生的执行记录,因此后续源码修改不妨碍读完 modifiedPaths。失效时重新发起原查询;不要用不同的过滤条件复用旧游标。页面中的 partial/failed/pending 信息必须保留,分页完成不代表底层分析已完成。
180
+ ```json
181
+ {"workspace":"/project","path":"values.py","symbol":"value","newName":"new_value","validationPaths":["use.py"]}
182
+ ```
165
183
 
166
- ## 自动 Hook 反馈
184
+ rename/format/actions preview validation returns aggregate state, paths, introduced/resolved findings and per-tool/project checks. Each check includes provider, state, paths, findings, limitations and failure reasons. errorsIntroduced/errorsResolved/netDelta count errors only. Aggregate counts sum provider observations, so providers may report the same issue. netDelta can be zero after resolving one old error and introducing another; inspect the actual findings.
167
185
 
168
- 自动反馈默认关闭,保留现有 automaticDiagnostics 和全局 stopGate 选择,不增加配置项。需要支持原生异步 command Hook 和 Interrupt 的当前 Codex 宿主;没有旧宿主兼容执行模式。Hooks 不调用 apply,不自动修复或格式化源码。
186
+ Aggregate state is complete only when all enabled checks within the requested scope finish fully. Partial success returns state=partial with successful findings and null aggregate counts; successful per-check counts remain available. Unselected dependencies, builds and runtime behavior remain outside the guarantee.
169
187
 
170
- | 事件 | 处理方式 |
171
- |---|---|
172
- | SessionStart | 同步入口预算 500 ms,保存修改前快照并登记基线任务,不等待项目检查。仅 startup/resume/clear/fork;compact 不重复发现。resume 复用有效状态,其余建立新 epoch。 |
173
- | PostToolUse | 原生 async,仅匹配 Bash、apply_patch、mcp__lsp__apply。内部总预算 310 秒,宿主 timeout 330 秒;原工具结果不受影响。已知只读 shell 只领取完成的反馈,不启动服务或检查。 |
174
- | Stop | 普通反馈总预算 1.5 秒,最多等待结果 300 ms;变化发现和检查可在后台继续。显式全局门禁开启时保留 44 秒总预算。 |
175
- | SubagentStop | 独立代理反馈,总预算 1.5 秒,始终不能请求续跑。 |
176
- | SessionEnd | 内部预算 1.6 秒、宿主 3 秒,取消任务并以 epoch 失效旧交付。 |
177
- | Interrupt | 内部预算 1 秒、宿主 3 秒,解除等待、取消明确属于被中断轮次的自动任务;身份不明保留 pending,不终止共享 LSP 或 MCP 写入。 |
188
+ ty/native TS prefer pull diagnostics. Traditional TypeScript uses ordered read-only synchronous tsserver diagnostics to avoid treating unversioned async pushes as fresh. gopls enables pull and waits for matching-version push when pull output is unavailable. clangd requires a current-version push. Every provider installs all changes before collecting diagnostics. Simulation content stays separate from shared LSP services, caches and Hook baselines.
178
189
 
179
- 只有明确 agent_id 的事件属于子代理,不从 transcript 猜测。工作区版本、LSP 和缓存共享,代理任务等待、轮次、反馈记录分别保存;归属不明的结果标记 shared,由主任务 Stop 汇总。MCP 的 session 仍表示共享会话。SubagentStop 不消费主任务或其他代理的反馈。
190
+ Biome stdin lacks usable structured lint reports, and clangd header references cannot rely solely on other documents' unsaved content, so both use isolated temporary project copies. Snapshots discover at most 2,000 files and copy at most 32 MiB, mapping local compilation databases/paths and reusing installed dependencies and readable generated headers. After workspace files are selected, Biome disables snapshot VCS discovery while respecting file includes and rules; incomplete selected-file processing returns unknown. Missing headers or unusable C/C++ baseline flags also return unknown.
180
191
 
181
- 只有主任务 Stop 在用户全局 stopGate=introduced-errors 时,才可为可靠、覆盖且新鲜的新增错误请求每 turn 最多一次修复。缺少修改前基线、未知、失败、pending、stale 不阻断。setupLSP 不自动启用门禁。SessionStart 的 additionalContext 可供模型读取;Stop/SubagentStop 普通输出是 UI 摘要,不能据此声称模型已经读取。
192
+ Simulation has a 30-second total budget, 10 seconds per LSP project and at most four concurrent groups. Completion, cancellation or failure closes isolated servers and removes temporary copies; abrupt process/system termination may leave temporary files. Simulation failures, timeouts or missing capabilities retain the text plan with unconfirmed counts set to null; user cancellation follows normal cancellation semantics. Changes to workspace or additional-file identities reject an old preview.
182
193
 
183
- 写事件按 session epoch、明确代理及 tool_use_id 幂等登记;没有 ID 时不猜测重复。合并窗口 200 ms,连续变化最长延后 1 秒,以当前内容哈希确认快照。apply 的完整 modifiedPaths(含部分写入)用于范围提示;分页、未知或不完整结果回退文件变化发现。分析身份和快照相同时复用 apply 写后的诊断。
194
+ ## Pagination and response information
184
195
 
185
- 每条自动反馈最多 2 KiB UTF-8、五条关键诊断,报告 introduced/resolved/unattributed/pending 数量;同一状态去重,每代理每 turn 总量最多 8 KiB,并为收尾摘要预留空间。详情使用现有 diagnostics(run=cached, scope=session) 并提供共享 session。内部 hook_wait 仅长轮询已登记任务,单次最多 20 秒,不新增 MCP 工具。
196
+ Pages default to 20 items and about 8 KiB of detail, with structured output also budgeted. Text is a short summary. Follow the complete returned next arguments; do not calculate offsets, copy old revisions or construct cursors manually.
186
197
 
187
- deliveryId、sourceTurn 和内容快照随交付保留,发送前复核新鲜度。ACK 仅表示 stdout 成功写出,ACK 失败可使用同一 ID 重发;不保证模型层恰好一次接收。没有证明建立于修改前的检查始终未归因。
198
+ Large nested values become field fragments in items. field uses result["key"][index] to identify the original output path; value preserves a complete small value, while part/text provides ordered text segments. Keys containing dots or slashes use quoted subscripts. Source, diffs and large outlines remain fully retrievable. When an underlying project job or diagnostic batch needs more work, the final page's next forwards its continuation arguments.
188
199
 
189
- 本版升级内部元数据格式,不迁移旧交付记录。更新后通过 /hooks 重新审阅定义,并在新会话使用;插件不修改信任记录或用户配置。真实宿主验收按 [Hooks 验收步骤](testing/hooks-host.md) 执行,CLI JSON 测试不能替代宿主原生异步、路由和 Interrupt 检查。
200
+ Query cursors bind the query, snapshot, configuration and tools. apply continuation pages bind the completed execution record, so later source edits do not prevent reading all modifiedPaths. Restart the original query after cursor invalidation; changed filters require a new cursor. Preserve partial/failed/pending information: completed pagination does not imply completed analysis.
190
201
 
191
- ## 排查问题
202
+ ## Automatic Hook feedback
203
+
204
+ Automatic feedback defaults to off. Preserve existing automaticDiagnostics and global stopGate choices. A current Codex host with native async command Hooks and Interrupt is required; there is no legacy-host execution mode. Hooks never call apply, fix source or format it.
205
+
206
+ | Event | Behavior |
207
+ | --- | --- |
208
+ | SessionStart | Synchronous entry budget: 500 ms. Capture a pre-edit snapshot and register a baseline job without waiting for project checks. Handles startup/resume/clear/fork; compact skips rediscovery. resume reuses valid state; the others create a new epoch. |
209
+ | PostToolUse | Native async, matching only Bash, apply_patch and mcp__lsp__apply. Internal total budget: 310 seconds; host timeout: 330 seconds. The original tool result stays available. Known shell reads collect completed feedback without starting a service or check. |
210
+ | Stop | Ordinary feedback budget: 1.5 seconds, including at most 300 ms waiting for results. Discovery/checks may continue in the background. An explicitly enabled global gate retains a 44-second total budget. |
211
+ | SubagentStop | Independent actor feedback, with a 1.5-second total budget; never requests continuation. |
212
+ | SessionEnd | Internal budget: 1.6 seconds; host timeout: 3 seconds. Cancel tasks and invalidate old deliveries through the epoch. |
213
+ | Interrupt | Internal budget: 1 second; host timeout: 3 seconds. Release waits and cancel automatic work explicitly owned by the interrupted turn. Unknown ownership retains pending work; shared LSP processes and MCP writes continue. |
192
214
 
193
- 用 status 配合代表性 path 查看工具选择与能力;修复后 refresh=true。现有命令启动失败不选择下载替代品。Windows 的 Path/PATH 在请求环境中统一规范化;显式空 PATH 仍然有效。
215
+ Only explicit agent_id marks a subagent; ownership is never guessed from transcripts. Workspace versions, LSP services and caches are shared, while actor waits, turns and feedback records remain separate. Unknown ownership is marked shared and summarized by the main Stop. MCP session still denotes the shared session. SubagentStop cannot consume another actor's feedback.
194
216
 
195
- 依赖安装、构建/链接与测试仍需项目自己的命令。check 完成只代表指定检查完成。
217
+ Only main Stop with the user's global stopGate=introduced-errors may request at most one repair pass per turn for reliable, covered and fresh introduced errors. Missing pre-edit baselines, unknown, failed, pending and stale results do not block. setupLSP never enables the gate automatically. SessionStart additionalContext can reach the model; ordinary Stop/SubagentStop output is a UI summary and does not prove model receipt.
196
218
 
197
- ### 独立 Rust CI
219
+ Write events register idempotently by session epoch, explicit actor and tool_use_id; missing IDs are not guessed to be duplicates. Changes coalesce over 200 ms, with continuous changes delayed at most one second, and snapshots are confirmed by current content hashes. apply's complete modifiedPaths, including partial writes, hints the scope; paged, unknown or incomplete results fall back to change discovery. Matching analysis identities and snapshots reuse apply's post-write diagnostics.
198
220
 
199
- `.github/workflows/rust.yml` 独立运行于 Linux 和 Windows,固定 Rust 1.99.1 及配套的 rust-analyzer、rust-src、rustfmt。工具只安装到 CI runner,本机日常开发和默认 `npm test` 不要求 Rust。
221
+ Each feedback message is limited to 2 KiB UTF-8 and five key diagnostics, reporting introduced/resolved/unattributed/pending counts. Identical states are deduplicated. Each actor/turn has an 8 KiB total budget with room reserved for ending summaries. Use diagnostics(run=cached, scope=session) with the shared session for details. Internal hook_wait only long-polls registered work, at most 20 seconds per call; it adds no MCP tool.
200
222
 
201
- `npm run test:rust` 是需要已准备工具链的真实验收入口;缺少工具会失败,不会跳过。用例通过已交付 bundle 验证诊断及修复后的更新、符号/锚点定位、引用和调用、组合探索与候选测试关联、重命名/格式化/Code Action 的预览与 apply,以及 Cargo 工作区检查。fixture 只依赖本地 path crate,预先生成 lockfile,检查期间禁用依赖下载。
223
+ Deliveries retain deliveryId, sourceTurn and the content snapshot and recheck freshness before sending. ACK means successful stdout output; ACK failure may resend the same ID and does not guarantee exactly-once model receipt. Checks without a proven pre-edit baseline remain unattributed. Completed background pre-edit baselines are saved before check reports completion, survive service restarts and cannot repopulate ended sessions.
202
224
 
203
- CI 保留工具版本、测试日志及 MCP/fixture 记录为 `rust-<os>` artifact,保留 14 天。日志成功上传不代表验收通过,应以对应 job 的结果为准。新入口与历史多语言 `test:real` 的 Rust 开关独立。
225
+ The 0.10 upgrade changes internal metadata without migrating old deliveries. Review definitions through /hooks after updating and use a new session; the plugin leaves trust records and user configuration untouched. Follow [native host acceptance](testing/hooks-host.md): direct CLI JSON tests cannot establish native async scheduling, routing or Interrupt delivery.
226
+
227
+ ## Troubleshooting
228
+
229
+ Use status with representative paths to inspect tool selection and capabilities, then refresh=true after repairs. A failing installed command is not replaced with a downloaded alternative. Windows Path/PATH keys are normalized in request environments; an explicitly empty PATH remains meaningful.
230
+
231
+ Dependency installation, compilation/linking and tests still use the project's own commands. A complete check establishes completion of its configured checks only.
232
+
233
+ ### Independent Rust CI
234
+
235
+ `.github/workflows/rust.yml` runs independently on Linux and Windows with Rust 1.99.1 and matching rust-analyzer, rust-src and rustfmt. Tools are installed only on CI runners; ordinary development and default npm test do not require Rust.
236
+
237
+ `npm run test:rust` uses the same REAL_TOOLS=1 switch as Python and other real-tool cases. It skips by default and fails on missing tools when enabled. Rust CI enables the switch and verifies the delivered bundle's diagnostics and repair updates, symbol/anchor targeting, references and calls, composite inspection and candidate test association, rename/format/Code Action previews and apply, and Cargo workspace checks. Fixtures use local path crates, pregenerated lockfiles and disabled dependency downloads during checking.
238
+
239
+ CI retains tool versions, test logs and MCP/fixture records in rust-<os> artifacts for 14 days. Artifact upload success does not establish acceptance; use the corresponding job conclusion. This entry is independent of the legacy test:real Rust opt-in.
240
+
241
+ ### Local Rust and MATLAB LSP acceptance
242
+
243
+ npm test registers Rust and MATLAB MCP acceptance sequentially through test:local; both skip unless REAL_TOOLS=1. With that switch, run npm run test:local or select npm run test:rust / npm run test:matlab. Tests use dist/cli.js, so build after source changes. Missing prerequisites fail enabled suites.
244
+
245
+ MATLAB acceptance discovers the official server under ~/.vscode/extensions/mathworks.language-matlab-* and MATLAB on PATH. Override the server's out/index.js with CODEX_LSP_MATLAB_SERVER or the installation root with CODEX_LSP_MATLAB_INSTALL_PATH. Acceptance starts a separate local MATLAB analysis process and needs a working license. Default npm test and existing CI require no MATLAB installation. See [local LSP acceptance](testing/local-lsp.md) for configuration, coverage and records.
246
+
247
+ Custom LSP settings supplies section-keyed workspace/configuration responses and configuration-change notifications. languageId explicitly sets didOpen's document language, such as matlab for MATLAB. Omitting it preserves the extension mapping, including the default Objective-C language ID for .m.
204
248
 
205
249
  <a id="limits"></a>
206
- ## 范围限制与本地数据
207
250
 
208
- 发现预算 10,000 文件,单文件读取预算 1 MiB,paths 最多 200 项。影响分析每次最多处理 200 个符号、追加一层时最多 100 个间接节点;超限明确 partial。组合查询和编辑计划需要完整的工作区快照;超出发现或单文件预算时明确拒绝,需缩小 workspace 或配置 exclude。项目检查预算五分钟。
251
+ ## Scope limits and local data
252
+
253
+ Discovery is limited to 10,000 files, individual reads to 1 MiB and paths to 200 entries. Impact analysis handles at most 200 symbols and 100 additional indirect nodes for one transitive layer, returning partial when exceeded. Composite queries and edit plans require a complete workspace snapshot; exceeding discovery/read limits rejects the operation. Narrow workspace or configure exclude. Project checks have a five-minute budget.
209
254
 
210
- 无遥测。源码、诊断基线和未解决问题留在私有本地缓存。计划与动作在服务内存中,工作区服务空闲约五分钟退出。不同用户、workspace、CODEX_HOME 和 bundle 隔离;停止服务后可清理 CODEX_LSP_CACHE。
255
+ No telemetry. Source, diagnostic baselines and unresolved findings stay in private local caches. Plans/actions stay in service memory, and an idle workspace service normally exits after about five minutes. Different users, workspaces, CODEX_HOME values and bundles are isolated. Stop the service before clearing CODEX_LSP_CACHE.
211
256
 
212
257
  <a id="upgrade"></a>
213
- ## 从 0.9 升级
214
258
 
215
- | 移除的旧名 | 新名 |
259
+ ## Upgrading from 0.9
260
+
261
+ | Removed name | Replacement |
216
262
  | --- | --- |
217
263
  | check_project | check |
218
264
  | check_diagnostics / lsp_diagnostics | diagnostics |
@@ -221,6 +267,6 @@ CI 保留工具版本、测试日志及 MCP/fixture 记录为 `rust-<os>` artifa
221
267
  | lsp_rename | rename → apply |
222
268
  | lsp_format | format → apply |
223
269
 
224
- 旧名只返回迁移提示,不执行,也不保留隐藏调用别名。更新提示词、Skills 和调用脚本,并启动新会话。
270
+ Old names return migration guidance without executing and have no hidden aliases. Update prompts, Skills and calling scripts, then start a new session.
225
271
 
226
- rename/format 的含义发生变化:它们是只读计划工具;apply 是唯一源码写入口。配置仍使用 schemaVersion:1,不需要重新创建全局配置。保留既有 automatic-off 和全局门禁选择;重新审阅 Hook 定义。
272
+ rename/format now produce read-only plans; apply is the only source writer. Configuration still uses schemaVersion: 1, so existing global configuration can be retained. Preserve automatic-off and global gate choices and review Hook definitions again.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@zoisythe/codex-codeintel",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Codex code intelligence with LSP/lint diagnostics, symbol navigation, rename, formatting, and automatic Hooks.",
5
5
  "type": "module",
6
- "packageManager": "npm@11.12.1",
6
+ "packageManager": "npm@12.2.1",
7
7
  "license": "MIT",
8
8
  "homepage": "https://github.com/zoisythe/codex-codeintel",
9
9
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "diagnostics"
23
23
  ],
24
24
  "bin": {
25
- "codex-codeintel": "./dist/cli.js"
25
+ "codeintel": "./dist/cli.js"
26
26
  },
27
27
  "files": [
28
28
  "dist",
@@ -36,25 +36,30 @@
36
36
  "CHANGELOG.md",
37
37
  "docs/usage.md",
38
38
  "docs/testing/hooks-host.md",
39
+ "docs/testing/local-lsp.md",
39
40
  "docs/examples/*.json"
40
41
  ],
41
42
  "scripts": {
42
43
  "build": "node scripts/build.mjs",
43
- "test": "node ./node_modules/vitest/vitest.mjs --run && npm run test:install && npm run test:typescript && npm run test:features",
44
+ "ci": "npm run check && npm test",
45
+ "test": "node scripts/prepare-features.mjs && node ./node_modules/vitest/vitest.mjs --run && npm run test:install && npm run test:typescript && npm run test:features && npm run test:local",
44
46
  "test:watch": "node ./node_modules/vitest/vitest.mjs",
45
- "typecheck": "node ./node_modules/typescript/bin/tsc --noEmit",
47
+ "typecheck": "node ./node_modules/typescript/bin/tsc --noEmit && node ./node_modules/typescript/bin/tsc --project tsconfig.test-js.json",
46
48
  "lint": "node ./node_modules/@biomejs/biome/bin/biome check src test scripts",
47
49
  "lint:fix": "node ./node_modules/@biomejs/biome/bin/biome check --write src test scripts",
48
- "check": "node ./node_modules/typescript/bin/tsc --noEmit && node ./node_modules/@biomejs/biome/bin/biome check src test scripts && node scripts/build.mjs",
50
+ "check": "npm run typecheck && node ./node_modules/@biomejs/biome/bin/biome check src test scripts && node scripts/build.mjs",
49
51
  "test:install": "node --test test/install-smoke.test.mjs test/runtime-e2e.test.mjs test/resolution-e2e.test.mjs test/diagnostic-e2e.test.mjs test/trust-e2e.test.mjs test/automatic-e2e.test.mjs test/background-hooks-e2e.test.mjs",
50
52
  "test:typescript": "node --test test/typescript-native-e2e.test.mjs",
51
- "test:real": "node --test test/three-language-e2e.test.mjs test/temporary-e2e.test.mjs test/automatic-real-e2e.test.mjs test/setup-profile-e2e.test.mjs",
53
+ "test:real": "node scripts/prepare-features.mjs && node --test test/three-language-e2e.test.mjs test/temporary-e2e.test.mjs test/automatic-real-e2e.test.mjs test/setup-profile-e2e.test.mjs",
52
54
  "test:features": "node scripts/prepare-features.mjs && node --test test/features-e2e.test.mjs",
53
- "test:rust": "node --test test/rust-e2e.test.mjs"
55
+ "test:rust": "node --test test/rust-e2e.test.mjs",
56
+ "test:matlab": "node --test test/matlab-e2e.test.mjs",
57
+ "test:local": "node --test --test-concurrency=1 test/rust-e2e.test.mjs test/matlab-e2e.test.mjs",
58
+ "test:features:ci": "node scripts/prepare-features.mjs && node scripts/real-tools-ci.mjs test"
54
59
  },
55
60
  "devDependencies": {
56
61
  "@biomejs/biome": "2.5.12",
57
- "@types/node": "^22.12.0",
62
+ "@types/node": "^24.0.0",
58
63
  "esbuild": "0.28.2",
59
64
  "eslint": "9.39.4",
60
65
  "smol-toml": "1.7.0",
@@ -64,7 +69,7 @@
64
69
  "vitest": "^5.0.0"
65
70
  },
66
71
  "engines": {
67
- "node": ">=22.12.0"
72
+ "node": "^24.20.0 || ^26.13.0"
68
73
  },
69
74
  "author": "zoisythe"
70
75
  }