You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
safe-bash: remove remaining node: builtins from the default agentCommands graph (crypto/zlib/stream/perf_hooks/timers) for a zero-nodejs_compat Workers bundle #672
Make the default agentCommands() graph loadable on Cloudflare Workers and browsers without nodejs_compat — a true zero-node:-builtin bundle. Today the full command inventory runs on workerd with nodejs_compat (verified on real workerd, 2026-09-08), but the eager node: imports below mean the ordinary entry cannot load when compatibility_flags = [].
This is the sibling of #669 (portable-by-default agentCommands / injectable regexExecutor, which removes node:worker_threads) and #671 (the two contracts/ leaks). #669 gets the default entry onto workerd-with-compat; this issue removes the remaining Node builtins so no compat flag is needed.
Node builtins in the createAgentCommands graph (beyond #669/#671)
Verified against current src (all reached from plugins/composition.ts):
Portable replacements (all have Workers/browser-standard equivalents)
node:cryptocreateHash → Web Crypto crypto.subtle.digest (async; checksums already stream, so a digest accumulator fits) or a small pure-JS hash for md5/cksum where subtle has no algorithm. randomUUID → global crypto.randomUUID(). randomInt → crypto.getRandomValues.
node:zlib → a portable inflate/deflate (pure-JS such as fflate, or wasm) behind the existing bounded/streaming interfaces; keep the current gzip-bomb output-budget checks.
Validated independently against the freshly installed public package candidate: an unshimmed browser/workerd-conditions bundle of /portable fails on the actual emitted node:crypto, node:stream, node:stream/promises, zlib, and timer-related imports. This is a real remaining full-inventory portability gap; the /browser claim in #671 was separately disproved against published 0.1.470 and closed without a speculative patch. #670 removes the portable expr engine dependency on the Node wrapper.
I am finishing delivery of the validated #670 and mixed-entry #669 fixes now, then continuing #669 under the updated scope and #672. Streaming hashes/codecs must retain input/output/work limits and cancellation; no whole-input digest shortcut, native unbounded-regex fallback, or silent loss of gzip/tar semantics. No claim of a zero-Node full preset yet. Reproduction log: /tmp/kamilio-672-portable-browser-red.log.
Final delivery verification: remote main fd9ba58 matches the product tree of the freshly installed artifact tested in actual workerd. All 29 flags=[] cases pass, all 79 command names are present, and the installed graph has zero Node/external edges. Full maintained npm test, normal build, lint, installed Node/Bun, strict browser types and browser smoke pass. Fresh hashes, SRI bindings and runtime cleanup are recorded in docs/plans/issue-672-workerd-validation.md. The issue is closed after push; release publication is still being monitored separately.
Publication is now verified: all three scoped packages (@poe-platform/safe-bash, safe-fs, safe-js) are npm latest 0.1.499. Scoped release run 34276528355 attempt 2 passed installed tarball verification and all three provenance-backed publishes for fd9ba58. The zero-Node default entry is therefore published, not just a local candidate. [email protected] is published too.
Activity
kamilio commentedon Sep 8, 2026
Validated independently against the freshly installed public package candidate: an unshimmed browser/workerd-conditions bundle of /portable fails on the actual emitted node:crypto, node:stream, node:stream/promises, zlib, and timer-related imports. This is a real remaining full-inventory portability gap; the /browser claim in #671 was separately disproved against published 0.1.470 and closed without a speculative patch. #670 removes the portable expr engine dependency on the Node wrapper.
I am finishing delivery of the validated #670 and mixed-entry #669 fixes now, then continuing #669 under the updated scope and #672. Streaming hashes/codecs must retain input/output/work limits and cancellation; no whole-input digest shortcut, native unbounded-regex fallback, or silent loss of gzip/tar semantics. No claim of a zero-Node full preset yet. Reproduction log: /tmp/kamilio-672-portable-browser-red.log.
kamilio commentedon Sep 8, 2026
Final delivery verification: remote main fd9ba58 matches the product tree of the freshly installed artifact tested in actual workerd. All 29 flags=[] cases pass, all 79 command names are present, and the installed graph has zero Node/external edges. Full maintained npm test, normal build, lint, installed Node/Bun, strict browser types and browser smoke pass. Fresh hashes, SRI bindings and runtime cleanup are recorded in docs/plans/issue-672-workerd-validation.md. The issue is closed after push; release publication is still being monitored separately.
poe-code-agent commentedon Sep 8, 2026
Issue was resolved by #fd9ba58
Update poe-code via
npm install -g [email protected]kamilio commentedon Sep 8, 2026
Publication is now verified: all three scoped packages (@poe-platform/safe-bash, safe-fs, safe-js) are npm latest 0.1.499. Scoped release run 34276528355 attempt 2 passed installed tarball verification and all three provenance-backed publishes for fd9ba58. The zero-Node default entry is therefore published, not just a local candidate. [email protected] is published too.