@subshell-ai/plugin-codex 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -4
- package/dist/index.js +18 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -676,7 +676,8 @@ declare const manifest: SubshellManifest;
|
|
|
676
676
|
* (a user may put it in their own preset flags — that is their call).
|
|
677
677
|
*
|
|
678
678
|
* subshell MCP is wired automatically WITHOUT touching user state: every
|
|
679
|
-
* launch carries `-c mcp_servers.subshell.command
|
|
679
|
+
* launch carries `-c mcp_servers.subshell.command=…`,
|
|
680
|
+
* `-c mcp_servers.subshell.args=…` and `-c mcp_servers.subshell.env_vars=…`
|
|
680
681
|
* config overrides (dotted path, value parsed as TOML — verified against the
|
|
681
682
|
* real binary), which codex merges over ~/.codex/config.toml for that run
|
|
682
683
|
* only. The subagent monitoring hooks ride the same mechanism as
|
|
@@ -684,9 +685,9 @@ declare const manifest: SubshellManifest;
|
|
|
684
685
|
* `hooks.*` table is REPLACED for the duration of a subshell-launched run —
|
|
685
686
|
* the documented limitation, same shape as claude-code's; nothing on disk
|
|
686
687
|
* changes. No config file the harness must read, no CODEX_HOME redirect (that
|
|
687
|
-
* dir holds the user's auth.json). The spawned `subshell mcp` child
|
|
688
|
-
*
|
|
689
|
-
*
|
|
688
|
+
* dir holds the user's auth.json). The spawned `subshell mcp` child needs the
|
|
689
|
+
* pane's SUBSHELL_* identity, and Codex filters a child's environment, so the
|
|
690
|
+
* env_vars override re-forwards those names (never values) at each launch.
|
|
690
691
|
* (Flags/values verified against @openai/codex 2026-09 help output.)
|
|
691
692
|
*
|
|
692
693
|
* Identity, detection and install guidance live in this package's
|
package/dist/index.js
CHANGED
|
@@ -285,7 +285,7 @@ function validateGenericPreset(preset) {
|
|
|
285
285
|
const parsed = parseManifest({
|
|
286
286
|
name: "@subshell-ai/plugin-codex",
|
|
287
287
|
description: "Codex harness plugin for Subshell",
|
|
288
|
-
version: "1.0.
|
|
288
|
+
version: "1.0.2",
|
|
289
289
|
license: "Apache-2.0",
|
|
290
290
|
type: "module",
|
|
291
291
|
main: "dist/index.js",
|
|
@@ -348,6 +348,14 @@ if ("error" in parsed) throw new Error(`@subshell-ai/plugin-codex has an invalid
|
|
|
348
348
|
const manifest = parsed;
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region src/index.ts
|
|
351
|
+
const MCP_ENV_VARS = [
|
|
352
|
+
"SUBSHELL_API_KEY",
|
|
353
|
+
"SUBSHELL_BASE_URL",
|
|
354
|
+
"SUBSHELL_ID",
|
|
355
|
+
"SUBSHELL_NAME",
|
|
356
|
+
"SUBSHELL_DATA_DIR",
|
|
357
|
+
"SUBSHELL_SERVER_DATA_DIR"
|
|
358
|
+
];
|
|
351
359
|
/** Known Codex settings, applied as per-invocation CLI flags. */
|
|
352
360
|
const CODEX_SETTINGS_FIELDS = [
|
|
353
361
|
{
|
|
@@ -417,7 +425,8 @@ function tomlStringArray(values) {
|
|
|
417
425
|
* (a user may put it in their own preset flags — that is their call).
|
|
418
426
|
*
|
|
419
427
|
* subshell MCP is wired automatically WITHOUT touching user state: every
|
|
420
|
-
* launch carries `-c mcp_servers.subshell.command
|
|
428
|
+
* launch carries `-c mcp_servers.subshell.command=…`,
|
|
429
|
+
* `-c mcp_servers.subshell.args=…` and `-c mcp_servers.subshell.env_vars=…`
|
|
421
430
|
* config overrides (dotted path, value parsed as TOML — verified against the
|
|
422
431
|
* real binary), which codex merges over ~/.codex/config.toml for that run
|
|
423
432
|
* only. The subagent monitoring hooks ride the same mechanism as
|
|
@@ -425,9 +434,9 @@ function tomlStringArray(values) {
|
|
|
425
434
|
* `hooks.*` table is REPLACED for the duration of a subshell-launched run —
|
|
426
435
|
* the documented limitation, same shape as claude-code's; nothing on disk
|
|
427
436
|
* changes. No config file the harness must read, no CODEX_HOME redirect (that
|
|
428
|
-
* dir holds the user's auth.json). The spawned `subshell mcp` child
|
|
429
|
-
*
|
|
430
|
-
*
|
|
437
|
+
* dir holds the user's auth.json). The spawned `subshell mcp` child needs the
|
|
438
|
+
* pane's SUBSHELL_* identity, and Codex filters a child's environment, so the
|
|
439
|
+
* env_vars override re-forwards those names (never values) at each launch.
|
|
431
440
|
* (Flags/values verified against @openai/codex 2026-09 help output.)
|
|
432
441
|
*
|
|
433
442
|
* Identity, detection and install guidance live in this package's
|
|
@@ -491,13 +500,16 @@ const createPlugin = (host) => ({
|
|
|
491
500
|
`[mcp_servers.${MCP_SERVER_NAME}]`,
|
|
492
501
|
`command = ${tomlString(launch.command)}`,
|
|
493
502
|
`args = ${tomlStringArray(launch.args)}`,
|
|
503
|
+
`env_vars = ${tomlStringArray(MCP_ENV_VARS)}`,
|
|
494
504
|
""
|
|
495
505
|
].join("\n"),
|
|
496
506
|
args: [
|
|
497
507
|
"-c",
|
|
498
508
|
`mcp_servers.${MCP_SERVER_NAME}.command=${tomlString(launch.command)}`,
|
|
499
509
|
"-c",
|
|
500
|
-
`mcp_servers.${MCP_SERVER_NAME}.args=${tomlStringArray(launch.args)}
|
|
510
|
+
`mcp_servers.${MCP_SERVER_NAME}.args=${tomlStringArray(launch.args)}`,
|
|
511
|
+
"-c",
|
|
512
|
+
`mcp_servers.${MCP_SERVER_NAME}.env_vars=${tomlStringArray(MCP_ENV_VARS)}`
|
|
501
513
|
],
|
|
502
514
|
env: void 0
|
|
503
515
|
};
|