Skip to content

feat(workspacedeps): immutable remote definitions, script runner and discovery - #1135

Draft
sheepbox8646 wants to merge 6 commits into
workspace-deps/00-docsfrom
workspace-deps/01-core
Draft

feat(workspacedeps): immutable remote definitions, script runner and discovery#1135
sheepbox8646 wants to merge 6 commits into
workspace-deps/00-docsfrom
workspace-deps/01-core

Conversation

@sheepbox8646

@sheepbox8646 sheepbox8646 commented Sep 2, 2026

Copy link
Copy Markdown
Member

新增 workspace 依赖执行与发现基础设施,并移除 Memoh 内嵌的五个生产配方。catalog 接收 Supermarket 的不可变 release/artifact,验证 revision、manifest 投影、脚本摘要、压缩包路径和大小,以及图标摘要;仓库中的发布样本仅用于测试。

包含 bridge CloseSend/reset hook、stdin 脚本 runner、平台探测、image/managed/PATH 来源发现和缓存。发现缓存绑定目录摘要;state.json 保存当前与上一版本的发布来源和 entrypoints。配方与 ShellCheck 由 supermarket#20 维护。

栈第 2/6 层:#1132 → 本 PR → #1137。此层独立通过 workspacedeps/catalog 与 cmd 包测试;跨仓库发布样本覆盖损坏数据、归档边界和不可变快照。

⚠️ No human QA — this PR has not been verified by a human yet. Remove this line once a human confirms the happy path.

@sheepbox8646 sheepbox8646 changed the title workspace deps/01 core feat(workspacedeps): core — bridge CloseSend, dependency catalog, runner and discovery Sep 2, 2026
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch 2 times, most recently from 9191043 to 9010b53 Compare September 3, 2026 09:32
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 9010b53 to 2a0ac1c Compare September 3, 2026 09:44
@sheepbox8646 sheepbox8646 changed the title feat(workspacedeps): core — bridge CloseSend, dependency catalog, runner and discovery feat(workspacedeps): core — bridge CloseSend, dependency catalog with runtime overlays, runner and discovery Sep 3, 2026
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 264291c to 3f09ffb Compare September 6, 2026 08:17
sheepbox8646 and others added 5 commits September 7, 2026 23:40
CloseSend half-closes the exec stream so a process fed over stdin sees EOF
while its output keeps streaming; Close still cancels. The bridge pool's
seven eviction sites now go through Manager.resetBridge, which notifies
OnBridgeReset subscribers so per-container caches can invalidate in one
place. Tests run against the real in-process bridgesvc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
Adds internal/workspacedeps/catalog: an embedded catalog of workspace
dependencies (node, python, uv from the image; codex and claude-code as
managed agent CLIs) with strict manifest decoding, validation, script
lookup and a manifest digest. Agent entries are pinned and a test in
cmd/internal/core asserts the pins equal the runtime protocol snapshots.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
…nd cache

The runner feeds catalog scripts to `exec sh -s` over the bridge exec
stream with a prelude that neutralises stdin, takes a per-dependency lock
and switches `current` atomically; results come back through a temp file
so stdout/stderr stay pure log streams. Discovery probes every dependency
in one exec (state.json, toolkit fallback, PATH copy, --version or the
optional version script) and the cache holds per-(bot,target) snapshots
that invalidate on bridge reset. Tests run scripts through the real
in-process bridgesvc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
… to the catalog

Agent CLIs are no longer pinned to the server's protocol snapshot: the
codex and claude-code manifests drop version.pin, install resolves the
latest upstream release by default (or MEMOH_DEP_VERSION when set), and
every dependency gains a check-update script. node, python and uv keep the
image copy as their baseline but now ship install/update/remove scripts
(LTS Node from nodejs.org, CPython via uv, uv from its releases) so a
managed overlay can be installed over the image copy; the manifest model
gains HasImageBaseline/Installable and lets an image-sourced dependency
carry scripts. The catalog-vs-protocol pin test goes away with the pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from 3f09ffb to dc29cc2 Compare September 7, 2026 15:45
@sheepbox8646 sheepbox8646 changed the title feat(workspacedeps): core — bridge CloseSend, dependency catalog with runtime overlays, runner and discovery feat(workspacedeps): immutable remote definitions, script runner and discovery Sep 7, 2026
…npm 11

npm 11 skips a global package's install scripts unless they are allowed
explicitly, so Claude Code's postinstall was silently skipped and the log
filled with allowScripts warnings. Pass --allow-scripts for the package
when npm is 11 or newer; npm 10 keeps its default behaviour.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
@sheepbox8646
sheepbox8646 force-pushed the workspace-deps/01-core branch from dc29cc2 to 2abd8f9 Compare September 7, 2026 15:58
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.

1 participant