Skip to content

feat: 新增 step-context-archive 插件(上下文归档与召回,声明式) - #1

Merged
Neriah-Ado merged 8 commits into
Neriah-Ado:mainfrom
uos1231234:feat/step-context-archive
Sep 27, 2026
Merged

Neriah-Ado merged 8 commits into
Neriah-Ado:mainfrom
uos1231234:feat/step-context-archive

Conversation

@uos1231234

@uos1231234 uos1231234 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

这个 PR 做什么

新增一个声明式插件 step-context-archive:长会话的上下文归档与召回。

  • /archive —— 把已完成任务块的原文写入 .stepcode/context-archive/stamp-<id>.md,对话中只保留一行带三点摘要(目标 / 关键决策 / 是否完成)的 #STAMP 索引,并在结尾明确汇报各任务是否完成;
  • /recall <stamp> —— 按索引取回原文并基于原文回答(摘要只作导航,可能失真);
  • skills/context-archive —— #STAMP 语义、三点摘要协议、召回纪律、适用与不适用边界。

要解决的问题:长会话里早期任务的大段细节(报错堆栈、命令输出、被改动的完整代码)持续占用窗口,
但当下用不到、将来可能要引用。本插件把它们移出对话、留下可检索的索引,需要时再取回。

遵循本仓库规范

  • 声明式形态(step.plugin.json + commands/ + skills/),不含 entry / hooks / lspServers(符合 C1 / C2);
  • plugins/step-context-archive/plugin.yaml 为该插件唯一事实源,任务 ID 前缀 SCA-;
  • 已登记 .step-plugin/marketplace.json 与 roadmap.json,并更新根 README 索引表;
  • 提交为 Conventional Commits,尾部附任务 ID(3 个原子提交对应 SCA-100-1 ~ 3)。

验证

node tests/validate.mjs
→ PASS=209  FAIL=0     (其中 14 项属于本插件:清单规范、禁止字段、资源存在性、marketplace 源有效性)

待完成 / 请维护者裁量

  • SCA-100-4(真实项目验证 ≥2 个非玩具仓库)尚未完成,因此 status 定为 in-progress、未标 done;
  • 本插件为社区贡献(作者 @uos1231234)。如需调整命名、优先级,
    或希望把它从 roadmap 的 12 项计划中单列,请直接改,我这边配合;
  • 声明式形态的局限已在插件 README 中写明:归档时机依赖模型判断,缺少代码级强制。

许可

  • 本 PR 提交的内容(清单、命令文本、技能提示词):按本仓库 MIT 授权。
  • 作者另有一个独立的代码版实现(自动触发、有界投影、算法去重,TypeScript):
    uos1231234/step-context-archive,
    采用其自身许可 agent-shell License v1.0
    —— 并非 MIT(源自 PolyForm Small Business License 1.0.0,另加商用条款)。
    不在本 PR 范围内、也未复制任何代码进来。

Note

2026-10-01 更正 —— 本节原表述已作废,请以本块为准。

原第 1 条写「本 PR 提交的内容按本仓库 MIT 授权」。已不成立:
本仓库根 LICENSE 现在是 AGPL-3.0-only(根 README「## License」节亦已标 AGPL-3.0-only),
本 PR 提交的清单 / 命令文本 / 技能提示词随仓库一并按 AGPL-3.0-only 提供。

原第 2 条写「参考实现采用其自身许可 agent-shell License v1.0(源自 PolyForm Small Business
License 1.0.0,另加商用条款)」——这一条是张冠李戴,现予撤回:agent-shell 是另一个
项目(uos1231234/agent-shell),不是本插件的参考实现,它的许可与本插件无关;本 PR 也不含
其任何代码。

本插件自己的代码仓库是 uos1231234/step-context-archive,
其许可历史为:自 v0.6.0 起 AGPL-3.0-only(与本仓库集合许可对齐),
≤ v0.5.2 为 MIT(著作权人后续另行许可,不构成追溯冲突)。
更早那条以「agent-shell License v1.0」描述本插件的记录(同 PR 合并后被写进
plugins/step-context-archive/plugin.yaml 的 changelog)同样作废,以本块为准。

@uos1231234

Copy link
Copy Markdown
Contributor Author

补充:一个影响本仓库全部声明式插件的上游限制(已实测确认)

在做 SCA-100-4(真实项目验证)时,我发现一个与插件质量无关、但影响本仓库所有声明式插件的问题,先同步过来供你判断。

结论

当前 Step Code(v0.1.1)不会加载已安装插件的 commands/ 与 skills/。
/plugin install 实际只交付 mcpServers 与 provision;Markdown 资源不会变成斜杠命令或技能。

实测证据(本地 TUI,非推测)

  1. /plugin marketplace add <本仓库> → Added marketplace '…'.;
    /plugin install step-context-archive → 打印 Installed … to ~/.stepcode/plugins/step-context-archive.,
    文件确实落地(7 个文件,含 commands/archive.md、commands/recall.md、skills/context-archive/SKILL.md);
  2. 输入 / → 命令面板正常,列出 65 个命令(面板本身没问题);
  3. 输入 /arch(对应 commands/archive.md)→ 面板零命中;
  4. /reload 后复测 → 仍零命中;
  5. 完全重启 step 进程后再测 → 仍零命中(排除"需要重启")。

源码侧的对应证据(Step-Code,2026-09-24 快照)

  • packages/coding-agent/src/core/resource-loader.ts:命令只来自 extension.commands
    (即扩展通过 API 注册的命令),没有从插件目录读取 commands/*.md 的通道;
  • packages/coding-agent/src/step/plugins.ts:skills / agents / commands 只出现在清单解析与校验路径;
    listInstalledStepPlugins / loadAvailablePlugins 只被 /plugin 这个 UI 自身调用,未接入资源加载器;
    该文件中的诊断代码亦明确提示:"Executable plugin entries are recorded but not loaded by the Step marketplace facade."
  • 技能发现目录为 ~/.stepcode/agent/skills/、<项目>/.stepcode/skills/、~/.agents/skills/ 及 settings 的 skills 数组
    —— 不含插件安装目录(对比:/rec 能列出 skill:lark-attendance,说明技能通道本身是活的)。

因此

  • 本仓库的声明式插件(/commit、/test 等)在当前版本同样不会生效。
    可考虑:README 加一句提示,或把需要"可执行"的部分改走 MCP(mcpServers 那条路是通的,与 AGENTS.md 的 C1 也一致);
  • 我这边 SCA-100-4 按原定义暂时无法完成——不是插件问题,而是宿主缺装载通道,
    故 status 继续保留 in-progress、不标 done;
  • 我不会改动本仓库的核心结构,也不会动你的插件,只把发现同步过来,方向由你定。

我这边的自查

本插件的功能层其实走的是扩展形态(TypeScript 扩展 + pi.registerCommand / registerTool),
那条路是可用的;提交到本仓库的只是声明式那一份(清单 + 命令文本 + 提示词),
它更像"协议与文档",受上述限制影响。若你希望本仓库里这份也能生效,
我可以在不改动你核心代码的前提下,补一条"技能放置路径"的说明(例如放进 ~/.stepcode/agent/skills/)。

(本轮验证全部为本地命令与源码阅读,未产生模型调用。)

@uos1231234

Copy link
Copy Markdown
Contributor Author

补充一条后续修正:本插件在自有仓库的许可署名已本地化。

原先参考实现仓库的 LICENSE 与本 PR 提到的 agent-shell 项目逐字节相同(同一 SHA256),其中的 Copyright / Required Notice 两行指向 agent-shell——顺着本插件 README 的许可链接点过去,会落到另一个项目的署名上,链条不自洽。已修正:

  • 两处署名行改为指向本项目(uos1231234/step-context-archive@d555a52);
  • 许可名 agent-shell License v1.0 保持不变(那是许可文本的名字,不是项目的名字),并在许可文本后注明文本出处;
  • README 许可段补全适用范围(个人/非商业免费;不足 45 人且上年营收 ≤2,000 万人民币免费;超出需商务许可)、联系方式与署名要求;
  • package.json 补 "license": "SEE LICENSE IN LICENSE"(自定义许可无 SPDX 标识符)。

本 PR 提交的声明式内容仍按本仓库 MIT 授权,与上述改动无关。

@uos1231234

Copy link
Copy Markdown
Contributor Author

已同步上游 main(当时落后 50 个提交),并修好合并冲突,本 PR 现在可以干净合入了。合并过程中发现一个上游 main 自身的问题,同步给你:

同步结果

  • 合并提交:fc0793a,父提交之一是 e4620e4(上游 main 尖端),当前 behind upstream = 0;
  • 冲突 3 个文件,均为"双方各加条目"型,已按双方全保留解决:
    • .step-plugin/marketplace.json:上游 5 个新插件源 + 本插件的 step-context-archive,现共 8 个条目;
    • README.md 索引表:同样双方全留(step-test-guard 取上游的 v1.3.0);
    • roadmap.json:git 自动合并,双方增量都在(上游 7 个插件升到 done / v1.3.0,本插件仍 in-progress / 1.0.0)。

一个需要你修的问题:node tests/validate.mjs 在上游 main 上跑不起来

tests/validate.mjs L831 有:

const { parseDevLog } = await import('./lib/dev-log.mjs');

但 tests/lib/dev-log.mjs 在 main 的任何提交里都不存在(git log --diff-filter=A -- tests/lib/dev-log.mjs 为空,git ls-tree -r upstream/main tests/lib/ 的 12 个文件里也没有它)。所以现在执行:

node tests/validate.mjs
→ 打印 517 项 PASS 后崩溃,exit 1
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../tests/lib/dev-log.mjs'

看起来是 step-fe-kit 那批提交引入了对 parseDevLog 的引用,但文件漏提交了。我没有替你补这个文件(不知道 parseDevLog 的预期签名/语义,不想瞎写),你补上后应该就恢复。

本 PR 的检查结果(崩溃前)

517 项 PASS 里,属于本插件的 21 项全部通过:14 项清单/marketplace/roadmap 规范(id 安全名、version 语义化、无 entry/hooks/lspServers、资源存在、source 有效)+ 7 项 git 历史 Conventional Commits 校验(含本次合并提交)。

(只读同步 + 冲突解决,未改动你的核心代码。)

@Neriah-Ado
Neriah-Ado merged commit c039372 into Neriah-Ado:main Sep 27, 2026
@Neriah-Ado

Copy link
Copy Markdown
Owner

@uos1231234 感谢这份高质量的社区贡献——PR #1 已合并进 main(merge commit c039372),插件本体几乎原样合入。评审结论:声明式形态合规、无安全风险(只写默认目录、不覆盖、召回只读、零依赖零网络)、诚实标注未完成项。

合并时与合并后的维护调整,同步给你:

  1. roadmap.json 冲突:合入前 main 又落地了 5 个插件(api-forge ~ marketplace-cc,均 done/v1.3.0),按「保留上游 12 条 done + 追加本插件条目」解决。
  2. 版本口径:按 AGENTS.md §3.4(版本全部任务 done 才更新 latest_version),roadmap 的 latest_version 暂置空、README 版本徽章改为 in-progress——待 SCA-100-4(≥2 个真实项目验证)完成后随 v1.0.0 发布回填。
  3. 门禁接入:为 /archive、/recall 补了 ARCHIVE-RULES / RECALL-RULES JSON 规则块(与仓库其他插件的单一事实源模式一致),validate.mjs 新增 §31 检查区;§9 自举一致性检查也接入了本插件,CHANGELOG 已按仓库惯例由 tests/bootstrap-changelog.mjs 从 git 历史重新自举(你手写版本的内容语义已保留在提交历史中)。
  4. 两处小修:#STAMP 索引行从绝对路径改为项目相对路径(跨机器/移动仓库仍可解析);退化 id(b 前缀短 id)在文档中明确为 12 位小写十六进制主格式的显式例外。

另外三件事:

  • 你报告的 main 门禁崩溃(tests/lib/dev-log.mjs 漏提交)当时属实,已在 8d3dfef 修复;你实测反馈的宿主未加载插件 commands/skills 的问题,已如实写入插件 README 与 risks。
  • 仓库新增了 GitHub Actions 门禁工作流(validate.yml,ubuntu + windows 双平台跑 node tests/validate.mjs)。它第一次运行就抓到一个真问题:windows 检出 CRLF 导致 §9 自举比对假失败,已修复(§9 比对归一化 + .gitattributes 统一 LF)。
  • 发布说明预发布版已挂出:docs/releases/step-context-archive-v1.0.0.md。

SCA-100-4 完成后随时可以走 v1.0.0 发布流程(roadmap/README 回填 → 自举 CHANGELOG → 打 step-context-archive-v1.0.0 标签 → 发布说明定稿)。欢迎继续贡献!

@uos1231234

Copy link
Copy Markdown
Contributor Author

@Neriah-Ado 更新 SCA-100-4 的状态:真实项目验证已完成,供你按 §3.4 流程回写并决定是否走 v1.0.0 发布。

项目 1|Atlas Sync 长程任务(deepswe-eval agent-shell-long-horizon 副本,step-3.7-flash):压缩接管在 run 中途正常触发,fromHook: true,tokensBefore: 228691;产出 7 个归档块 / 1067 KB 原文,7 条 #STAMP 索引行全部指向真实存在的项目相对路径,抽查确认内容是块原文而非摘要;压缩后模型在不再读取文件的前提下答出了 30 个文件之前埋设的早期事实。

项目 2|Effect HttpApi SSE(deepswe-eval repos/effect-sse-httpapi-streaming 副本,Effect-TS/effect 的一部分,2240 文件 TypeScript monorepo):真实工程任务,模型自装依赖、改动 7 个文件、3 个测试全部通过。165 个归档块 / 1032.2 KB;索引与原文逐条比对 0 缺失、0 字节数不符、0 预览与原文首行不符,165/165 为块原文;无摘要与原文冲突。

过程中踩到一个可能对后续所有扩展作者都有用的点,如实同步给你:session_before_compact 在压缩被宿主中止时仍会被触发,但此时 signal.aborted 为真,且 session_compact_failed 的报错来自宿主自己的摘要步骤(Compaction failed: Summarization failed: The operation was aborted.,fromExtension=no)。更关键的是——中止时扩展的异步钩子不会被等待,我们第一版用 await 写盘,369 条 branchEntries 全部丢失;而且处理器里先调 ctx.getContextUsage() 会因会话并发拆卸而抛异常,若无 try/catch 会静默吞掉后续全部逻辑。我们最终的处置是:把不依赖 ctx 的同步归档前置到最前,并额外在归档目录维护一份 INDEX.md 磁盘索引,保证压缩被中止时「原文已落盘、可召回清单也在盘上」。这段代码在我们自己的仓库(MIT),你若写扩展型插件可以直接参考。

想请你判断:按 §3.4「版本全部任务 done 才更新 latest_version」,SCA-100-4 是否可以置 done?以及 v1.0.0 发布流程要不要现在就走。你觉得哪里需要我补数据或复现步骤,随时说。

@uos1231234

Copy link
Copy Markdown
Contributor Author

@Neriah-Ado 一次性把 SCA-100-4 的可核查数据补齐:全量 165 条逐条对照 + 一份可在你任一项目上复算的校验脚本。同时更正上一条评论里一处已过时的许可表述。

1. 许可表述更正

上一条我写「这段代码在我们自己的仓库(MIT)」——发出时属实。此后我方 step-context-archive 已跟随本集合协议切到 AGPL-3.0-only(0e0ce9f,LICENSE 换成 gnu.org 官方原文)。你点链接看到的是 AGPL,不是 MIT。声明式那一份仍随本集合,无变化。

2. 补 acceptance 第三条

plugin.yaml 的 acceptance 有三条,上一条只覆盖了前两条。第三条「除 .stepcode/context-archive/ 外不产生其他文件副作用」的实测:

  • 项目根下 scratchpad / .vscode / .changeset / patches 经 git ls-files 确认均为仓库原生追踪内容(分别 2 / 2 / 9 / 2 个追踪文件);node_modules 为模型自装依赖,非扩展写入;
  • 扩展的唯一产物是 .stepcode/,其下只有 context-archive/,166 个文件全部为 .md(165 个 stamp-*.md + 1 个 INDEX.md),无其他文件类型;
  • 代码侧交叉验证:全仓仅 2 个写入点(writeStampSync 与 INDEX.md 重建),均指向归档根。

顺带一个与 risks 第 4 条相关的实测确认:git check-ignore .stepcode 无命中,即归档目录不会被自动忽略,git status 会显示 ?? .stepcode/。这正是 risks 已写明「需自行加入 .gitignore」的情形,此处只作确认,不需要本仓库改动。

3. 全量逐条对照

项目:effect-sse-httpapi-streaming(Effect-TS/effect 的一部分,2240 文件 TypeScript monorepo),本轮数据全部由脚本从磁盘重算,未复用先前结论。

全量对比清单(SCA-100-4 逐条核对)

  • 索引行数:165;磁盘 stamp-*.md 数量:165;
  • 索引声明字节合计 = 磁盘实测字节合计 = 1,056,973 字节(1032.2 KB);
  • 索引有而磁盘无:0;磁盘有而索引无:0;重复 stamp:0;
  • 索引字节数 ≠ 磁盘实测字节数:0;
  • INDEX.md「原文首行」列 ≠ 文件真实首行前缀:0;
  • 含三点摘要标记或 #STAMP 头(即疑似摘要而非原文)的块:0;
  • 首行角色分布:assistant 158 / user 7(2 类,全部为会话条目形态);
  • 清单聚合校验值(对 stamp:diskBytes:firstLineSha256 逐行拼接后取 sha256):
    a07a27366af2aaec687be83b1b4e621c459dc0920a4073670cdcb782366402cd
展开全量 165 条逐条对照(索引字节 / 磁盘字节 / 首行哈希 / 原文首行)
# stamp 索引字节 磁盘字节 一致 首行角色 首行 sha256(16) 原文首行(截断)
1 023072e3a20b 1124 1124 ✓ assistant 9e5f9add44a332cf assistant: {"type":"thinking","thinking":"There are several type errors.
2 03123e01fbc0 750 750 ✓ assistant 041e63f710ed8664 assistant: {"type":"thinking","thinking":"The user wants me to:\n1. Read
3 049b4dac9225 11 11 ✓ assistant f3dd2259bfbb469f assistant:
4 06ad5ad95a67 885 885 ✓ assistant 4843bc23bdd9e1fa assistant: {"type":"thinking","thinking":"有语法错误。让我检查 HttpApiClient.ts
5 07156edb2a14 8886 8886 ✓ assistant a477c07d3929752f assistant: {"type":"thinking","thinking":"I see that `HttpClientResponse
6 0973aaa9faaa 8069 8069 ✓ assistant 5bfdd948a4d18a50 assistant: {"type":"thinking","thinking":"Let me also check the diff to
7 0c94f86d4c63 20197 20197 ✓ assistant 3df2d26b70140778 assistant: {"type":"thinking","thinking":"Now I have all the information
8 0d0e55bd0775 2494 2494 ✓ assistant 7f3d1db85b5f00b7 assistant: {"type":"thinking","thinking":"现在我需要修改 handlerToRoute,添加对请求
9 0d3d62ab3ff5 4912 4912 ✓ assistant dfb61898c1a33fdd assistant: {"type":"thinking","thinking":"很好,所有修改都已经完成。让我再运行一次完整的测试,确保没有
10 0da384e087d7 2273 2273 ✓ assistant e8d75f4904f2fee6 assistant: {"type":"thinking","thinking":"The diff looks good. Now let m
11 121f8f70025b 616 616 ✓ assistant 3e6eaccd0b5829ca assistant: {"type":"thinking","thinking":"Let me now complete the task b
12 12a81a53cdf1 661 661 ✓ assistant dd59c8af4b9248ec assistant: {"type":"thinking","thinking":"All tests pass. Let me now upd
13 13bc9002082f 832 832 ✓ assistant 4e362849a6d5403a assistant: {"type":"thinking","thinking":"Good, I added the SSE annotati
14 1678ac5abd49 2472 2472 ✓ assistant e6e7090c221f69a4 assistant: {"type":"thinking","thinking":"让我搜索 export type 在 `HttpApiE
15 169d038183aa 2473 2473 ✓ assistant 84c6a1011ebce87e assistant: {"type":"thinking","thinking":"Good, HttpApiSchema is alrea
16 19e1a9c7cbc7 1892 1892 ✓ assistant c33199d76b5e512a assistant: {"type":"thinking","thinking":"TypeScript is installed. Let m
17 1bf7a23231e2 27881 27881 ✓ assistant c9fa5eb272113446 assistant: {"type":"thinking","thinking":"Now let me read the remaining
18 1d2c6643dc08 2891 2891 ✓ assistant dcbac04378f8d2ad assistant: {"type":"thinking","thinking":"很好,所有测试都通过了。现在让我总结一下本轮的工作。\n\n
19 1eae4e3ec969 1348 1348 ✓ assistant 6baad61b166c92ec assistant: {"type":"thinking","thinking":"Let me now write the design an
20 1f198a8c07d9 990 990 ✓ assistant ae0ed6e00a83f7d4 assistant: {"type":"thinking","thinking":"现在让我运行测试看看请求端 SSE 的类型是否正确","th
21 1f39d57ab987 3578 3578 ✓ assistant 5f238402185f0de6 assistant: {"type":"thinking","thinking":"看来有重复的代码。让我修复这个问题,删除重复的部分。\n\n
22 20815ea93621 117766 117766 ✓ assistant 1dabdd3686a7c8d7 assistant: {"type":"thinking","thinking":"用户要求我做两件事:\n1. 读 .stepcode/con
23 219dccd57b4e 593 593 ✓ assistant 535fbd883b60f759 assistant: {"type":"thinking","thinking":"The dependencies aren't fully
24 22198c50519a 1624 1624 ✓ assistant c271f23ed2dd88b6 assistant: {"type":"thinking","thinking":"All relevant tests pass. Now l
25 22c385a5de74 4619 4619 ✓ assistant 1edb389a59fa179a assistant: {"type":"thinking","thinking":"All existing tests pass. Let m
26 2301c07268ce 15769 15769 ✓ assistant b7ddf8a240b9fafd assistant: {"type":"thinking","thinking":"用户要求继续完成任务,接下来需要做三件事:\n\n1. 补齐
27 249f447366eb 1390 1390 ✓ assistant 3d321da32e3498c2 assistant: {"type":"thinking","thinking":"The user is waiting for me to
28 253017d12aa6 1839 1839 ✓ assistant 662b95dc105c41b0 assistant: {"type":"thinking","thinking":"Good progress! One test passed
29 2a1d62793f28 781 781 ✓ assistant 74cda2d0d6c937ac assistant: {"type":"thinking","thinking":"Let me find the actual test fi
30 2b2c6a7b82cb 87922 87922 ✓ assistant 571ea7d4b37d6ee7 assistant: {"type":"thinking","thinking":"I found the relevant HttpApi f
31 2c293fe171d1 1495 1495 ✓ assistant 891fb3333bf13c18 assistant: {"type":"thinking","thinking":"No node_modules. Let me check
32 2c474169b1f9 1178 1178 ✓ assistant 92c2022fa3b45b40 assistant: {"type":"thinking","thinking":"让我读取 HttpApiClient.ts 中的 `Me
33 2caffd87dd4a 30876 30876 ✓ assistant 01534d21d85ee46e assistant: {"type":"thinking","thinking":"Let me now look at the existin
34 2dbf6b3d0887 1879 1879 ✓ assistant cf6fe3491b88e51d assistant: {"type":"thinking","thinking":"Now I need to add the `extract
35 2e58b1a8f018 1268 1268 ✓ assistant 79015362dc3198bf assistant: {"type":"thinking","thinking":"Now I need to add the `encodeS
36 2f9f063ad4b0 571 571 ✓ assistant 7a63c82da7f6323d assistant: {"type":"thinking","thinking":"No node_modules anywhere. Let
37 30c5cf2def70 712 712 ✓ assistant 2492d5121eb660ca assistant: {"type":"thinking","thinking":"I need to change `import type
38 3511b8507f63 1002 1002 ✓ assistant ff94660f12a0a991 assistant: {"type":"thinking","thinking":"All OpenApi tests pass. Let me
39 3811f934d4ec 3145 3145 ✓ assistant eb1b92dd9700ab96 assistant: {"type":"thinking","thinking":"Now I have a good understandin
40 38d8e6fa90cd 588 588 ✓ assistant 1705e131d5e49733 assistant: {"type":"thinking","thinking":"让我完成任务并汇总结果","thinkingSignatur
41 39780bf75e82 2238 2238 ✓ assistant 0044aeb70e94ebee assistant: {"type":"thinking","thinking":"好的,现在我需要修改 `HttpApiEndpoint.ts
42 3a869805f224 756 756 ✓ assistant 250273b3f36046dc assistant: {"type":"thinking","thinking":"The user wants me to:\n1. Read
43 3b55c0cb837d 329 329 ✓ assistant 9a0b440ebc989113 assistant: {"type":"thinking","thinking":"让我搜索 Method 类型","thinkingSig
44 40bfd7c09a34 1694 1694 ✓ assistant 1eb92b3100e0ae32 assistant: {"type":"thinking","thinking":"Now let me fix the other issue
45 42400aaceb62 2073 2073 ✓ assistant ef0ac741e0106370 assistant: {"type":"thinking","thinking":"看起来有重复的代码。第 71-84 行是原始的 `expor
46 48a39384eb10 1266 1266 ✓ assistant fbdf1d76dcf6e8f6 assistant: {"type":"thinking","thinking":"Now let me proceed to Phase 4
47 4b17bd5ce166 3662 3662 ✓ assistant 27582a41e34ddb63 assistant: {"type":"thinking","thinking":"Let me see the rest of the dif
48 4b4c775e2e60 5055 5055 ✓ assistant 1008ddb46aa69e1f assistant: {"type":"thinking","thinking":"I see the decodeSseResponse
49 4dd7b27cfbed 987 987 ✓ assistant 083b6a01c577149c assistant: {"type":"thinking","thinking":"The tsc command is not found
50 4f1f65f70b4c 5535 5535 ✓ assistant 92e8821af4516a35 assistant: {"type":"thinking","thinking":"Now I need to add the SSE deco
51 4fb0aa98921b 722 722 ✓ assistant 8d88b26f346596b3 assistant: {"type":"thinking","thinking":"Let me now create tasks for th
52 546734a99c1e 893 893 ✓ assistant 24eb0b04494e5983 assistant: {"type":"thinking","thinking":"The install failed because bet
53 54a271e8e8ea 446 446 ✓ assistant fe0e8c6488d8600f assistant: {"type":"thinking","thinking":"看起来 docs 目录使用 Jekyll 的 "Just
54 572dada69316 683 683 ✓ assistant 6818e371dceb0ccd assistant: {"type":"thinking","thinking":"The user wants me to complete
55 57692975d627 20352 20352 ✓ assistant a167261f9f505cf8 assistant: {"type":"thinking","thinking":"Now let me read the AGENTS.md
56 58249588ec3a 1498 1498 ✓ assistant f01f15efc3a79863 assistant: {"type":"thinking","thinking":"让我重新读取 HttpApiEndpoint.ts 的
57 5a749ff68b6d 297 297 ✓ assistant 100e8bec70328a71 assistant: {"type":"thinking","thinking":"让我","thinkingSignature":"reaso
58 5b2fa37b7871 1304 1304 ✓ assistant 258b86b480e51557 assistant: {"type":"thinking","thinking":"Let me now proceed to Phase 3
59 60c8fd2ce9c7 1134 1134 ✓ assistant ba558307eb6b46e2 assistant: {"type":"thinking","thinking":"The type checker is having iss
60 61073ee8b182 16735 16735 ✓ assistant 0c24d4685d9e4ff0 assistant: {"type":"thinking","thinking":"Now I have a good understandin
61 61b67b4cbd4b 55711 55711 ✓ assistant 487ef2d1aa843220 assistant: {"type":"thinking","thinking":"用户要求我:\n1. 逐个 read packages/pl
62 62354042c3a6 5266 5266 ✓ assistant 8d05ddac9327a33e assistant: {"type":"thinking","thinking":"很好,测试通过了。现在我需要添加对请求端 SSE 的测试。\
63 6241b03eb2b6 8606 8606 ✓ assistant 136e1fcb75434400 assistant: {"type":"thinking","thinking":"Let me now implement the chang
64 62505074f40d 768 768 ✓ assistant 653e2d6ef98e048e assistant: {"type":"thinking","thinking":"I need to fix the test file -
65 62fb7053c2d7 1169 1169 ✓ assistant 4b9506c8fa54cf28 assistant: {"type":"thinking","thinking":"让我重新检查 HttpApiClient.ts 中的 `
66 65bdffcff565 1268 1268 ✓ assistant 805ec0fbd6d787db assistant: {"type":"thinking","thinking":"Let me run a few more tests to
67 67cceb35303e 8150 8150 ✓ assistant 4ecde66bd9a9925c assistant: {"type":"thinking","thinking":"The tsconfig.src.json has a
68 69a7fba0abee 632 632 ✓ user 90f6eac1416cf72f user: 请完成三件具体工作:
69 69ab2f2ccffb 551 551 ✓ assistant 4f593c296108caf1 assistant: {"type":"thinking","thinking":"很好,所有测试都通过了。现在我需要创建 SSE 使用文档。\
70 6a1ebfd1e19a 5969 5969 ✓ assistant 60e8b0f5442d6abb assistant: {"type":"thinking","thinking":"Let me now write the design do
71 73ec7ced64b9 25102 25102 ✓ assistant 9e022ba7a555e72d assistant: {"type":"thinking","thinking":"Now let me also look at the ex
72 7400c933955f 17826 17826 ✓ assistant fa9106f4182f64c7 assistant: {"type":"thinking","thinking":"Let me start by understanding
73 74399c75b345 1612 1612 ✓ assistant 644a09623e8bcd87 assistant: {"type":"thinking","thinking":"现在我需要修改 handlerToRoute 中的 pa
74 7479964e6a81 1667 1667 ✓ assistant f14051be145f0940 assistant: {"type":"thinking","thinking":"Now I need to add the SSE anno
75 751f9f7ab902 50813 50813 ✓ assistant 30d8b91b53bf05e5 assistant: {"type":"thinking","thinking":"I got a good overview of the m
76 75905b6d02b8 440 440 ✓ assistant 6d09a6486da6e4c8 assistant: {"type":"thinking","thinking":"Let me check the platform pack
77 75da3885b585 6573 6573 ✓ assistant 5c4300b00ce2aa5c assistant: {"type":"thinking","thinking":"pnpm is available but there ar
78 75eb29c3c8f4 39991 39991 ✓ assistant 091012757386a540 assistant: {"type":"thinking","thinking":"Let me now read some more file
79 778b896e2ba3 4949 4949 ✓ assistant 62b212ed30e4aad3 assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiBuilder.ts 中的
80 78d761e92ae9 784 784 ✓ user 44c695286538e6ac user: 任务(分四阶段,请全部做完,不要跳阶段):
81 79b6e526c797 10296 10296 ✓ assistant 925df567bd844c88 assistant: {"type":"thinking","thinking":"I see - ast.value is of type
82 7a8458529237 528 528 ✓ user 1895868f6e60af38 user: 继续这个任务,接下来做三件事:
83 7a86382bed5b 20034 20034 ✓ assistant 87d847d26050c522 assistant: {"type":"thinking","thinking":"Now let me also check the rema
84 7fa873a777ce 2620 2620 ✓ assistant 26339f90c4bd2ea4 assistant: {"type":"thinking","thinking":"Now let me create a test file
85 807a89c9bd10 1147 1147 ✓ assistant 850ea14269c3d9c8 assistant: {"type":"thinking","thinking":"Now let me fix the `OpenApi.ts
86 81cd250ac152 1404 1404 ✓ assistant 88bfc7330589c0e5 assistant: {"type":"thinking","thinking":"Now I need to add the `decodeS
87 81f1838b3b0c 1533 1533 ✓ assistant ac88b02a42a620e9 assistant: {"type":"thinking","thinking":"让我在 HttpApiClient.ts 中添加 `en
88 820885e679f3 6901 6901 ✓ assistant d67d3a0d596805a1 assistant: {"type":"thinking","thinking":"The only failures are in `Http
89 82192651f174 1675 1675 ✓ assistant b8098486ac1e558e assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiClient.ts,添加对
90 8376f319814d 303 303 ✓ user 9dcfe0eac1f7219a user: 继续做两件事:
91 83a589793cfe 505 505 ✓ user 13932966d4cf017b user: 做一次代码审计:逐个 read packages/platform/src 下所有与 HttpApi 相关的源文件(HttpApi.
92 853ea9d8e18e 482 482 ✓ assistant 5ada0feef59d0202 assistant: {"type":"thinking","thinking":"The npx is running a fake tsc.
93 8686817e13d5 9223 9223 ✓ assistant 7a5ae71de865c633 assistant: {"type":"thinking","thinking":"Let me now look at the existin
94 87665d779a41 19037 19037 ✓ assistant 1dd8f4891522032a assistant: {"type":"thinking","thinking":"I need to modify the `onEndpoi
95 8800b47b003e 6797 6797 ✓ assistant 25df5e3375c703f5 assistant: {"type":"thinking","thinking":"Now let me provide the final s
96 89b3e0ec2a7d 1011 1011 ✓ assistant 5abfeca98820f6b1 assistant: {"type":"thinking","thinking":"The tests pass. Now let me run
97 89c9e5057ae4 478 478 ✓ assistant 2195f3938a1a4259 assistant: {"type":"thinking","thinking":"No node_modules. Let me try in
98 8b1dee22ac55 6905 6905 ✓ assistant 04bd2d83b069b776 assistant: {"type":"thinking","thinking":"Now I need to modify `HttpApiB
99 8c2e575a8ac9 1172 1172 ✓ assistant 823c9eea885dae1e assistant: {"type":"thinking","thinking":"Let me also check the existing
100 8fade75255ec 1009 1009 ✓ assistant 098cb3674ff9bb63 assistant: {"type":"thinking","thinking":"失败的 4 个测试都是 `HttpClient.test.t
101 944a73367b57 32684 32684 ✓ assistant b54ccb44cb13c29a assistant: {"type":"thinking","thinking":"Let me now look at the Multipa
102 961157f2b927 4546 4546 ✓ assistant 355f0f60f2f1d492 assistant: {"type":"thinking","thinking":"The server handler test has a
103 97ef682ec570 327 327 ✓ user 13290d57f254082c user: 继续。两件事:
104 9a9f6dc54d26 2445 2445 ✓ assistant e018bce3db0976e7 assistant: {"type":"thinking","thinking":"Let me add the `extractSseSche
105 9cd97df460af 3324 3324 ✓ assistant 08a0856826589ac0 assistant: {"type":"thinking","thinking":"Vitest is installed but not li
106 9ce7438cf5c1 5345 5345 ✓ assistant 77e535346302255a assistant: {"type":"thinking","thinking":"好的,extractAnnotations 已经包含了
107 9ced88671855 842 842 ✓ assistant 9413d4c766c5d8e2 assistant: {"type":"thinking","thinking":"Let me try running the check u
108 9e8ae0b18621 6980 6980 ✓ assistant ae163b649af85d2c assistant: {"type":"thinking","thinking":"只有 docs/index.md。看来文档结构还不完整。
109 9f8f43d02426 481 481 ✓ assistant cf9769d9eb6cbb55 assistant: {"type":"thinking","thinking":"Method 类型不在 `HttpApiEndpoint
110 9fcadc965aed 17111 17111 ✓ assistant 1c0c122a74816eb8 assistant: {"type":"thinking","thinking":"Now I need to modify `handlerT
111 a282ec9294ae 4003 4003 ✓ assistant 9f9b724b05068923 assistant: {"type":"thinking","thinking":"The edit didn't match because
112 a5c07e3452c1 1550 1550 ✓ assistant 1cd3a15f0d16bcf4 assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiSchema.ts,确保
113 a6e6f8d46cdb 2459 2459 ✓ assistant 46f30848e6f6a446 assistant: {"type":"thinking","thinking":"I need to modify `processRespo
114 a7f8670b2869 2653 2653 ✓ assistant c5adaa59ddd6ff9f assistant: {"type":"thinking","thinking":"Good, I fixed the duplicate. N
115 aa58be8fae62 406 406 ✓ assistant 6ba58bbc54ec7342 assistant: {"type":"thinking","thinking":"TypeScript is installed but no
116 aac8af906c9b 4523 4523 ✓ assistant f2e62ab1c9190b10 assistant: {"type":"thinking","thinking":"Now I need to add the SSE enco
117 aacd08861709 3352 3352 ✓ assistant 34629a0e3fa862fb assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiClient.ts,添加对
118 ab4393d135ff 1177 1177 ✓ assistant 21b0f550e732e59c assistant: {"type":"thinking","thinking":"I need to add imports for `Str
119 ab6bd598d9dc 11 11 ✓ assistant f3dd2259bfbb469f assistant:
120 ac411234e0e9 1652 1652 ✓ assistant e87af066d3ba0f97 assistant: {"type":"thinking","thinking":"Now I need to modify `OpenApi.
121 b7fe2794506a 1869 1869 ✓ assistant 7a658bd07d33e767 assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiClient.ts 中的
122 b9665ada2e84 1644 1644 ✓ assistant 740744eb1edda925 assistant: {"type":"thinking","thinking":"看起来 export type Method 这行在错误
123 b9965113bd65 574 574 ✓ assistant 14e5f276b4bc472e assistant: {"type":"thinking","thinking":"TypeScript isn't installed. Le
124 bcd7b20eb101 2034 2034 ✓ assistant 6e91221e971a64ac assistant: {"type":"thinking","thinking":"The user wants me to complete
125 bfa1adaa3a94 2722 2722 ✓ assistant e96d51c201104b5b assistant: {"type":"thinking","thinking":"Let me run the updated test to
126 c01ab93ca5b3 2810 2810 ✓ assistant fd0382d8d008adf3 assistant: {"type":"thinking","thinking":"Good. Now let me modify `HttpA
127 c24a1ecf56ba 619 619 ✓ assistant 71d47e2c03047434 assistant: {"type":"thinking","thinking":"Now let me run the type check
128 c279047c153f 14402 14402 ✓ assistant 7a52a282403234d8 assistant: {"type":"thinking","thinking":"好的,现在我需要修改 `HttpApiEndpoint.ts
129 c27f7f861381 2592 2592 ✓ assistant 08fe91893ad8db10 assistant: {"type":"thinking","thinking":"I need to update the Success
130 c4c5bd3610f1 11944 11944 ✓ assistant c414d72f83d80637 assistant: {"type":"thinking","thinking":"OK, so HttpClientResponse ha
131 c7a0dcf7e844 3387 3387 ✓ assistant ecea8367f7bbc55c assistant: {"type":"thinking","thinking":"Oops, that edit replaced the w
132 c9e90030e693 1749 1749 ✓ assistant 42f2f804206dec2a assistant: {"type":"thinking","thinking":"Now let me run the test again
133 d2021034209a 68399 68399 ✓ assistant b8d03efdff730f86 assistant: {"type":"thinking","thinking":"用户要求:\n1. 逐个 read packages/pla
134 d21ac593a8f7 1829 1829 ✓ assistant 93ce40e6dd2039ce assistant: {"type":"thinking","thinking":"好的,我已经创建了文档。现在让我运行所有相关的测试,确保没有
135 d5009821fc8f 473 473 ✓ assistant 5a3ea2d9e0ed98d9 assistant: {"type":"thinking","thinking":"It seems like TypeScript isn't
136 d57b128ae089 1910 1910 ✓ assistant 81c52b9d831bb93b assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiEndpoint.ts 的
137 d5fce927ae04 4272 4272 ✓ assistant 71603b88be40a78c assistant: {"type":"thinking","thinking":"好的,所有任务都完成了。让我给出最终总结","thinkin
138 d61e3cd2faf8 2047 2047 ✓ assistant f2155336d2bad76e assistant: {"type":"thinking","thinking":"Good, Brand is already impor
139 d7d2be6bab14 11 11 ✓ assistant f3dd2259bfbb469f assistant:
140 d91f739f0f1b 490 490 ✓ assistant 883a8b4da6bb27b0 assistant: {"type":"thinking","thinking":"The environment doesn't have n
141 d95db5575795 538 538 ✓ assistant 38c1bd268986530b assistant: {"type":"thinking","thinking":"docs 目录只有 _config.yml 和 `ind
142 d980b500c4c5 973 973 ✓ assistant d6d159981c025863 assistant: {"type":"thinking","thinking":"Now let me run the test again
143 e098f972cad4 3035 3035 ✓ assistant 56423b3c1d6e11d2 assistant: {"type":"thinking","thinking":"让我搜索 export type Method 或 `e
144 e11d9603eb63 1838 1838 ✓ assistant b108e45e570174d7 assistant: {"type":"thinking","thinking":"Good, the server-side code is
145 e372331e2bdd 1825 1825 ✓ assistant 3ad9321efd77e1ac assistant: {"type":"thinking","thinking":"让我尝试用更简单的搜索词来找到这个类型定义","thinki
146 e4435eb4d9cf 2225 2225 ✓ assistant 1439e0a36a9900d9 assistant: {"type":"thinking","thinking":"Oops, I accidentally replaced
147 e481643d118c 2568 2568 ✓ assistant 717f72db9b068510 assistant: {"type":"thinking","thinking":"Let me add the `decodeSseRespo
148 e4cb60d93e40 981 981 ✓ assistant 9dda7c8e27c8a533 assistant: {"type":"thinking","thinking":"I need to add `import * as Str
149 e51549b2aae8 2834 2834 ✓ assistant 40e8e07e3211c7d1 assistant: {"type":"thinking","thinking":"Now let me fix the `decodeSseR
150 e98fea85ba9e 8770 8770 ✓ assistant abe60a9436a91d6e assistant: {"type":"thinking","thinking":"用户要求我完成三件具体工作:\n1. 重新 read 所有改
151 ea7bb8483285 2446 2446 ✓ assistant 38c37d63c86884a1 assistant: {"type":"thinking","thinking":"The type check errors are abou
152 eac3d927ff81 11 11 ✓ assistant f3dd2259bfbb469f assistant:
153 eb1c116bd684 308 308 ✓ assistant bfac9ac24298c7a4 assistant: {"type":"thinking","thinking":"docs 目录不存在。让我检查一下 docs 目录","th
154 ed5bafcef85d 911 911 ✓ assistant 4fc81f59dddc7e78 assistant: {"type":"thinking","thinking":"Now let me prepare the final s
155 ef6cd01ab9af 3681 3681 ✓ assistant 83f2ef493071120d assistant: {"type":"thinking","thinking":"好的,现在我需要修改 HttpApiBuilder.ts
156 f1d385223528 20940 20940 ✓ assistant f488200fbfead6b6 assistant: {"type":"thinking","thinking":"I now have a good understandin
157 f21c4f701972 2440 2440 ✓ assistant 5dc3a1a37650100f assistant: {"type":"thinking","thinking":"现在我需要修改 HttpApiClient.ts 中的
158 f434ba08c08a 792 792 ✓ assistant 98ecde1143ccbb43 assistant: {"type":"thinking","thinking":"Vitest isn't available. Let me
159 f46fcaf68b3e 473 473 ✓ user ef106fbfe9a3d694 user: 继续工作,两件事:
160 f4d71426196f 962 962 ✓ assistant 3a77b4309559fd94 assistant: {"type":"thinking","thinking":"Now let me run the type checke
161 f6697da9f46d 985 985 ✓ assistant b715f6c8a7e8254a assistant: {"type":"thinking","thinking":"好的,现在让我运行测试看看是否修复了语法","thinkin
162 f74d0ef77f95 1231 1231 ✓ assistant 8667fa58b7017753 assistant: {"type":"thinking","thinking":"看来搜索匹配有问题。让我尝试用更短的搜索词","thinki
163 f7cc4fd953e0 1146 1146 ✓ assistant 59e854e6e565736b assistant: {"type":"thinking","thinking":"现在我需要修改响应端 SSE 的检测变量名,从 `isSse
164 fd1ffaf816a7 2087 2087 ✓ assistant 78193a6dc6701a40 assistant: {"type":"thinking","thinking":"看起来有重复的代码。第 71-84 行是原始定义的一部分,但
165 ff4161e5ceff 2507 2507 ✓ assistant 8be5fdef7ac51505 assistant: {"type":"thinking","thinking":"好的,测试文件没有变化。现在让我运行测试看看代码是否能工作。

4. 校验脚本

上面每一行都能用这份脚本在你的任一项目上独立复算。无第三方依赖,Node 18+:

// 校验 .stepcode/context-archive 的 INDEX.md 索引与磁盘文件是否成对一致。
// 用法:node verify-archive.mjs [项目根目录]   (默认当前目录)
import { readFileSync, readdirSync } from "node:fs";
import { createHash } from "node:crypto";
import path from "node:path";

const ARCH = path.resolve(process.argv[2] ?? ".", ".stepcode/context-archive");

const rows = readFileSync(path.join(ARCH, "INDEX.md"), "utf8")
  .split(/\r?\n/)
  .filter((l) => l.startsWith("| `"))
  .map((l) => {
    const p = l.replace(/^\|\s*/, "").replace(/\s*\|\s*$/, "").split(" | ");
    return {
      stamp: p[0].replace(/`/g, ""),
      file: path.basename(p[1].replace(/`/g, "")),
      bytes: +p[2],
      preview: p.slice(3).join(" | ").trim(),
    };
  });

const disk = new Set(
  readdirSync(ARCH).filter((f) => /^stamp-[0-9a-f]+\.md$/.test(f))
);

let missing = 0, byteBad = 0, firstLineBad = 0, total = 0;
const parts = [];
for (const r of rows) {
  if (!disk.has(r.file)) { missing++; continue; }
  const buf = readFileSync(path.join(ARCH, r.file));
  const firstLine = buf.toString("utf8").split(/\r?\n/)[0];
  total += buf.length;
  if (buf.length !== r.bytes) byteBad++;
  if (!firstLine.trimStart().startsWith(r.preview)) firstLineBad++;
  const h16 = createHash("sha256").update(firstLine).digest("hex").slice(0, 16);
  parts.push(`${r.stamp}:${buf.length}:${h16}`);
}
const orphan = [...disk].filter((f) => !rows.some((r) => r.file === f));

console.log({
  indexRows: rows.length,
  stampFiles: disk.size,
  missingFromDisk: missing,
  orphanOnDisk: orphan.length,
  byteMismatch: byteBad,
  firstLineMismatch: firstLineBad,
  totalBytes: total,
});
console.log(
  "manifest sha256:",
  createHash("sha256").update(parts.join("\n")).digest("hex")
);

在本项目上运行的实际输出:

{
  indexRows: 165,
  stampFiles: 165,
  missingFromDisk: 0,
  orphanOnDisk: 0,
  byteMismatch: 0,
  firstLineMismatch: 0,
  totalBytes: 1056973
}
manifest sha256: a07a27366af2aaec687be83b1b4e621c459dc0920a4073670cdcb782366402cd

5. 两个项目的触发方式不同(这点需要说清楚)

  • 项目 1(Atlas Sync) 走的是压缩接管:session_before_compact 事件自动触发归档;
  • 项目 2(Effect HttpApi SSE) 走的是模型显式执行 /archive 再 /recall。

必须说明的差异:压缩接管来自我方那个独立的 TypeScript 扩展(自动触发、有界投影、算法去重),本仓库里这份声明式插件没有这个能力——risks 第 2 条已写明「声明式实现依赖模型自觉执行,缺少代码级强制(无法在压缩前自动拦截)」。在当前宿主下,插件的 commands/ / skills/ 又尚未被加载(risks 第 1 条),所以项目 2 那条 /archive → /recall 链路是我用同一套归档协议与文件格式手工执行后验证协议本身,不是验证宿主已加载本插件。

换句话说:这份数据验证的是归档协议与产物格式的正确性(索引成对、路径可解析、原文未被摘要污染、召回不凭记忆),不是「宿主已能加载并运行本插件」——后者受宿主装载通道限制,与本插件质量无关。这一点我不含糊过去。

6. 请求

SCA-100-4 是否可以置 done、v1.0.0 何时发布,仍由你按 §3.4 判断。若你想复核,上面的 165 条清单加这份脚本足以独立验证;需要原始会话记录、逐条比对的 CSV,或可复现的复现步骤,我随时补。

@uos1231234

Copy link
Copy Markdown
Contributor Author

@Neriah-Ado 想请你帮个忙,不方便直接说就好。

我在给官方 Step Code 修一个 bug:插件清单里内联声明的 stdio MCP server 拿不到工作目录,相对 args(如 server/index.mjs)会被解析到 step 进程自己的目录而不是插件根。你仓库里 6 个 MCP 插件都是这个写法,当前宿主下应该都起不来;而且失败时 TUI 会把"路径错"报成 'node' is not installed,归因是错的。

代码和测试都做好了,但官方仓库现在限制只有协作者能提 PR。我已经在他们 #204 下面留了完整 patch 和 git am 应用方式(实跑验证过,两个 commit 能干净落地)。

想问你:知不知道联系官方的途径? 不需要担保或背书,多问一条路而已;觉得不方便完全没关系。

@Neriah-Ado

Copy link
Copy Markdown
Owner

@uos1231234 SCA-100-4 的数据我们完整核了一遍,结论:按 §3.4 置 done,v1.0.0 已发布。分四部分回复。

1. SCA-100-4 审查结论与 v1.0.0 发布

  • 判定依据:两个真实项目、全链路、全量逐条可复算——165/165 索引↔磁盘对齐、0 缺失 / 0 字节不符 / 0 首行不符、聚合 sha256、零依赖校验脚本;第三条验收(无越界文件副作用)有 git ls-files 与代码写入点的交叉验证。数据质量足以核销,不需要你补任何东西。
  • 你先行标注的诚实备注(项目 2 是按同一协议手工执行,验证的是协议与产物格式、不是宿主装载通道)原样保留进了 plugin.yaml 任务上下文与发布说明——这正是这份数据值得采信的原因之一。
  • 发布已完成:roadmap latest_version / README 徽章 / plugin.yaml 三处回填,validate §31 诚实守卫同步翻转为 done 态(现在断言 done、回填、徽章,与状态同进退),CHANGELOG 重新自举,标签 step-context-archive-v1.0.0 已建 GitHub Release,发布说明定稿。门禁 751 PASS,CI 双平台绿。
  • 顺带修复一个遗留问题:a461a6d(许可切换)动过插件 README 但未重新自举 CHANGELOG,那次推送后 CI 双平台红——你 9/27 报门禁缺文件之后,门禁又一次抓到真漂移,这次是我们自己犯的,已随本次发布修复。
  • 许可口径确认:本集合 a461a6d 先切 AGPL-3.0-only,你的仓库 0e0ce9f 跟随——你评论里「跟随本集合协议」的说法属实,声明式内容随集合分发不变。

另外,你 10/1 的审计修复提交(五个真缺陷)我们读了。其中两条对所有扩展作者都有用:turn_end 不再调 ctx.compact(宿主 compact() 首行即 await this.abort(),而 turn_end 发射于 run 进行中,调用会掐断用户当前轮次);归档全失败时交回 undefined(宿主拿到 compaction 就完全跳过自己的 LLM 摘要,此时只交回协议头会让此前全部历史只剩百余字)。后一条不读宿主源码根本想不到,已在我们这边记档。

2. 两个宿主问题:上游均已修复

  • bda152e074(9/29):装载已安装插件的 skills/ / commands/(经 resources_discover,重载生效,项目根受 trust 门控)——对应你 9/26 报告的第一个问题;
  • be4d5f4d81 + 0903f1f772(9/30):内联 stdio MCP server 的工作目录锚定到插件根,并修复路径包含判定的 .. 旁路——#204 里维护者注明后者「采用了你提出的方案」。

对本仓库的影响已核实:6 个 MCP 插件的清单逐个查过,全是 {"command":"node","args":["server/index.mjs"]} 写法,修复前宿主上确实起不来,修复后恢复;相关 README / risks 已更新为「≥ 2026-09-30 构建可用」的口径。你对自己那条「TUI 报成 'node' is not installed」的修正(实际是 MCP error -32000: Connection closed)我们对照了源码:isMissingExecutable 只匹配 ENOENT / errno -2,该路径在此场景不可达——修正正确。这种发出去之后主动复核并纠错的习惯,比一次说对更让人放心。

3. 向官方仓提交代码的要求(AI 提交同样适用)

你想继续给官方提代码,这些是 stepfun-ai/Step-Code 仓库规范(AGENTS.md / CONTRIBUTING.md / docs/open-source-status.md)里与 AI 提交直接相关的要求,中文整理版见我们 fork 的 agents-universal-guide.md:

四条铁律:

  1. 提交署名:commit 的 author / committer 必须保持你本人验证过的 GitHub 身份;绝不添加 Co-authored-by: Claude / Anthropic / 其他 AI 客户端署名 trailer,commit message 里不为 AI 署名(产品文档里提及 AI 产品没问题)。提交 / amend 前检查并清掉。
  2. 最小内核:能做成插件 / 扩展 / skill 的功能不要进核心;core 膨胀的 PR 会被拒;扩展挂载点需要先讨论再动手。
  3. 理解你的代码:解释不了改动做什么、如何与系统交互的 PR 会被关闭。AI 写代码可以,未经审查的 AI slop 不行。
  4. 公共边界:不引入私有 CI / 发布路径、私有主机名、对象存储 SDK、凭据(check:public-boundary 会扫描)。

PR 前门禁:npm run check(biome + 15 项架构 / 边界检查 + tsgo --noEmit + browser smoke)与 ./test.sh(非 LLM 测试,无需 API key)全过;环境 Node ≥ 22.19、pnpm 9.x workspaces。

Issue 纪律(对你尤其重要):官方仓禁止批量 / 自动化开 issue,账号会被永久封禁;必须用 issue 模板、短而具体。你目前「一条线程 + 完整 patch + compare 链接」的密度正处在纪律允许的一侧,保持即可。

4. 联系官方的途径

如实回答:我们没有什么官方特殊渠道可给。但你实际上已经走通了——#204 里维护者次日凌晨回应、采纳你的方案、修复合入 main 并公开致谢。在「PR 仅限协作者」的限制下(你实测的 CreatePullRequest 被拒与我们看到的现象一致),issue 评论附完整 patch + compare 链接就是当前有效通道,你的 #204 已经是成功案例。若后续要开新线程,沿用同一密度:一条线程一个问题、可复现证据齐全、不并行多开。

v1.0.0 之后 roadmap 上已无待办项,欢迎继续以任何形态贡献——声明式新插件、扩展实现,或继续给上游找 bug(看起来你很擅长后者)。

@uos1231234

Copy link
Copy Markdown
Contributor Author

@Neriah-Ado 谢谢!

最受益的一点是:你把我那条「②是手工执行、验证的是协议不是宿主装载通道」的备注原样留在 plugin.yaml 里了。这比夸我有用得多——它说明诚实标出来的不足是会被当作可信度的一部分,而不是被顺手抹平。

「发出去之后主动复核并纠错,比一次说对更让人放心」这句我也收下了。

给上游找 bug 不敢当。我更愿意如实说:我只是习惯把每条发现都做成能复现的最小实验,能被复现的才算数。后面还会继续。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants