feat(workflow): extract daemon-free v3 runtime - #749
Merged
Conversation
added 2 commits
July 31, 2026 13:11
Expose a strict botmux-workflow-core package with portable agent, gate, host action, resume, loop, branch, and revisit contracts while preserving Botmux daemon adapters. Co-Authored-By: Riff
Preserve both the upstream unit suite and the portable workflow-core package contract check. Co-Authored-By: Riff
原 assertNoBotmuxRuntimeAdapters 是黑名单式校验:只拦枚举出的 daemon 路径。 盲区——将来新增一个 daemon-only 模块被 value import(非 import type)打进 bundle 时,它是 first-party 躲过三方检查、不在黑名单、且其 .d.ts 会被 pruneTypeDeclarations 先删掉从而躲过 assertTypeBoundary,最终静默进包。 改为白名单 assertBundleInputsAllowed:非包内 façade 的每个 src/ bundle input 必须在已核实的 daemon-free 清单里,否则构建失败。新增可移植模块须 显式加入清单(这次人工复核正是目的)。 同时给 esbuild 固定 absWorkingDir=repoRoot,使 metafile input key 不随 调用 CWD 变化(pnpm workflow-core:build 从 repoRoot、npm prepare 从包目录 两条路径),保证白名单键稳定。 验证:workflow-core:test 全绿(含 npm tarball ESM/CJS/types smoke);主仓 pnpm build 绿;负向测试注入 worker-fence 的 value import 被 guard 拦下。
deepcoldy
approved these changes
Aug 5, 2026
deepcoldy
left a comment
Owner
There was a problem hiding this comment.
架构抽取审查通过:runtime→shared-node-runtime 搬迁行为等价(逐字核对,仅空白/变量名差异)、AttemptLeaseProvider 契约与两个实现的 fail-closed 语义正确、portable-* 快照层 TOCTOU 加固到位、发布脚本幂等且 fail-closed。
should-fix 已修:打包 daemon 泄漏 guard 从黑名单改为白名单,并修掉随之发现的 CWD 敏感问题。
验证:pnpm build 绿、workflow-core:test 绿(含 ESM/CJS/types tarball smoke)、v3+相关套件全绿、负向测试确认 guard 能拦截 daemon-only value import、已并入最新 master 无冲突且合并后套件仍绿、CI 全绿。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Botmux Desktop needs fixed and agent-planned workflows without requiring the Botmux daemon. This change makes the existing v3 semantics reusable while preserving the daemon integration.
Validation
Downstream