Skip to content

feat(workflow): extract daemon-free v3 runtime - #749

Merged
deepcoldy merged 4 commits into
masterfrom
codex/workflow-shared-runtime
Aug 5, 2026
Merged

feat(workflow): extract daemon-free v3 runtime#749
deepcoldy merged 4 commits into
masterfrom
codex/workflow-shared-runtime

Conversation

@sensuossss

@sensuossss sensuossss commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • extract the Botmux v3 workflow engine into a daemon-free workflow-core package
  • expose portable agent, gate, host action, branch, loop, revisit, resume, artifact, and final-output contracts
  • keep daemon adapters on top of the shared runtime and add package build/pack/publish tooling
  • run both the upstream unit suite and the workflow-core package contract smoke in CI

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

  • pnpm@9.5.0 workflow-core:test
  • npm tarball ESM/CJS/types smoke passed

Downstream

滕鹏飞 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
@sensuossss
sensuossss requested a review from deepcoldy as a code owner August 5, 2026 12:26
原 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 deepcoldy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

架构抽取审查通过: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 全绿。

@deepcoldy
deepcoldy merged commit e8b28ae into master Aug 5, 2026
5 of 6 checks passed
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