Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/469-env-precedence-followup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"agent-bundle": patch
---

Make the operator `.env` layer of an installed pack follow the documented `manifest env < .env < .env.local < process.env` order and reach plugin code before it evaluates. A host merges a stdio server's manifest `env` block into the child environment, so the emitted MCP entry now carries that block as build-time literals and `applyOperatorEnv` (new `manifestEnv` option on `agent-bundle/launch-env`) treats a variable still holding its manifest default as unset — the file overrides it, while an exported variable still wins; an operator export equal to the default reads as the default, and a value carrying a path token (`AGENT_BUNDLE_PLUGIN_ROOT`) is always kept. The layer is now the first import of every emitted stdio entry, hook wrapper, and artifact CLI `bin/<name>.mjs` rather than a statement after the consumer imports, so a `process.env` read at the top level of a server, handler, route, provider, or state module sees the composed environment; the build marks generated modules side-effectful so a consumer `"sideEffects": false` cannot drop the import. In the emitted stdio entry that first import is a prelude that also installs the console guard, so stdout written at module scope by server modules — `console.log` or `process.stdout.write` — is redirected to stderr before the protocol stream opens, and `redirectConsoleToStderr` from `agent-bundle/mcp-entry` now returns the guard already installed instead of stacking a second one; a wrapper a server module installs over `process.stdout.write` at module scope is discarded when the protocol stream opens, with one stderr warning naming it. `AGENT_BUNDLE_ENV_FILE=none` still disables the layer entirely. Host manifests are unchanged. (#554)
5 changes: 5 additions & 0 deletions .changeset/node26-transform-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"agent-bundle": patch
---

Run plain `.ts` scripts through `runScript` (`agent-bundle/test`) on Node 26: the child process gets `--experimental-transform-types` only where the running Node accepts it (Node 22 and 24) and `--strip-types` on Node 26, which removed the transform flag and only strips types; the flag is always named on the command line, so an inherited `NODE_OPTIONS=--no-strip-types` cannot switch TypeScript loading off. Previously every plain-script dispatch on Node 26 exited with code 9 (`node: bad option: --experimental-transform-types`) before the script ran; TypeScript-only syntax such as `enum` in a plain script now fails on Node 26 exactly as it does under `node file.ts`. (#554)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ website/docs/*/reference/hosts.md
website/docs/*/reference/events.md
website/docs/*/reference/notices.md
website/docs/*/reference/diagnostics.md
.superpowers/

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading