@oisincoveney/pipeline 1.16.0 → 1.16.1

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.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { PipelineConfigError, loadPipelineConfig, tryLoadPipelineConfig } from "./config.js";
3
- import { configureGatewayHosts, localGatewayStatus, renderGatewayConfig, runGatewayDoctor, startLocalGateway } from "./mcp/gateway.js";
4
3
  import { compileWorkflowPlan } from "./workflow-planner.js";
5
4
  import { formatInstallCommandsResult, installCommands, parseCommandHost } from "./install-commands.js";
5
+ import { configureGatewayHosts, localGatewayStatus, renderGatewayConfig, runGatewayDoctor, startLocalGateway } from "./mcp/gateway.js";
6
6
  import { createOrchestratorLaunchPlan, createRunnerLaunchPlan } from "./runner.js";
7
7
  import { formatConfigError, runPipelineFromConfig } from "./pipeline-runtime.js";
8
8
  import { runKubernetesRunnerJob } from "./kubernetes-runner.js";
@@ -1,6 +1,5 @@
1
1
  import { resolveFileReference } from "./path-refs.js";
2
2
  import { loadPipelineConfig } from "./config.js";
3
- import { codexNativeMcpConfig } from "./mcp/native-config.js";
4
3
  import { compileWorkflowPlan } from "./workflow-planner.js";
5
4
  import { existsSync, readFileSync } from "node:fs";
6
5
  import { basename, dirname, join, relative } from "node:path";
@@ -407,7 +406,6 @@ function codexTomlAgentDefinition(config, cwd, id, profile) {
407
406
  };
408
407
  const skillConfig = codexSkillConfig(config, cwd, profile);
409
408
  const agentConfig = {
410
- name: id,
411
409
  description: profile.description ?? id,
412
410
  ...profileWithResolvedModel.model ? { model: profileWithResolvedModel.model } : {},
413
411
  ...profile.filesystem?.mode ? { sandbox_mode: profile.filesystem.mode } : {},
@@ -424,7 +422,6 @@ function codexTomlAgentDefinition(config, cwd, id, profile) {
424
422
  "",
425
423
  codexAgentInstructions(cwd, profile)
426
424
  ].join("\n"),
427
- ...codexNativeMcpConfig(config, profile),
428
425
  skills: { config: skillConfig }
429
426
  };
430
427
  const mcpConfig = "mcp_servers" in agentConfig ? agentConfig : {
@@ -5,7 +5,7 @@ import { execa } from "execa";
5
5
  //#region src/mcp/gateway.ts
6
6
  const PIPELINE_GATEWAY_SERVER_ID = "pipeline-gateway";
7
7
  const DEFAULT_LOCAL_GATEWAY_URL = "http://127.0.0.1:4483/mcp";
8
- const LEGACY_CODEX_MCP_RE = /\[mcp_servers\.(?!pipeline-gateway\])/;
8
+ const LEGACY_CODEX_MCP_RE = /\[mcp_servers\./;
9
9
  const LEGACY_OPENCODE_MCP_RE = /"mcp"\s*:\s*{(?!\s*"pipeline-gateway")/s;
10
10
  const LEGACY_PIPELINE_MCP_RE = /path:\s*\.mcp\.json|uvx\s+mcpm|mcpm\s+run/;
11
11
  var PipelineMcpGatewayError = class extends Error {
@@ -53,9 +53,11 @@ function renderGatewayConfig(config) {
53
53
  function renderCodexGatewayConfig(config) {
54
54
  const gateway = configuredGateway(config);
55
55
  return [
56
- "[mcp_servers.pipeline-gateway]",
57
- `url = ${JSON.stringify(gatewayUrl(gateway))}`,
58
- `bearer_token_env_var = ${JSON.stringify(gateway.token_env)}`,
56
+ "# Generated by @oisincoveney/pipeline.",
57
+ "# Codex pipeline runs receive MCP gateway config through runtime launch args.",
58
+ "# Persistent Codex MCP config is intentionally left empty to avoid startup-time MCP fan-out.",
59
+ `# gateway_url = ${JSON.stringify(gatewayUrl(gateway))}`,
60
+ `# token_env = ${JSON.stringify(gateway.token_env)}`,
59
61
  ""
60
62
  ].join("\n");
61
63
  }
@@ -94,4 +94,4 @@ function tomlKey(key) {
94
94
  return TOML_BARE_KEY_PATTERN.test(key) ? key : JSON.stringify(key);
95
95
  }
96
96
  //#endregion
97
- export { buildMcpLaunchPlan, isRemoteMcpServer, tomlValue };
97
+ export { buildMcpLaunchPlan, tomlValue };
@@ -86,4 +86,6 @@ Use an off-the-shelf aggregator when possible:
86
86
  Use `pipe mcp gateway doctor` to check required environment variables, gateway
87
87
  health, local ToolHive availability for local mode, and legacy direct MCP
88
88
  entries. Use `pipe mcp gateway configure-host` to rewrite project or global
89
- Codex/OpenCode host config to gateway-only with a backup.
89
+ host config with a backup. For Codex, this removes persistent MCP entries and
90
+ leaves gateway metadata as comments because the runtime injects the gateway
91
+ with `--config` only for pipeline-launched agents.
@@ -412,12 +412,17 @@ pipe mcp gateway local-status
412
412
  pipe mcp gateway local-start
413
413
  ```
414
414
 
415
- `configure-host` rewrites Codex/OpenCode config to the gateway-only shape:
415
+ `configure-host` removes persistent Codex MCP config and records the gateway
416
+ metadata as comments. Codex pipeline runs receive the gateway through runtime
417
+ launch arguments so ordinary Codex sessions do not start pipeline MCP clients at
418
+ startup:
416
419
 
417
420
  ```toml
418
- [mcp_servers.pipeline-gateway]
419
- url = "https://gateway.example/mcp"
420
- bearer_token_env_var = "PIPELINE_MCP_GATEWAY_TOKEN"
421
+ # Generated by @oisincoveney/pipeline.
422
+ # Codex pipeline runs receive MCP gateway config through runtime launch args.
423
+ # Persistent Codex MCP config is intentionally left empty to avoid startup-time MCP fan-out.
424
+ # gateway_url = "https://gateway.example/mcp"
425
+ # token_env = "PIPELINE_MCP_GATEWAY_TOKEN"
421
426
  ```
422
427
 
423
428
  OpenCode receives:
package/package.json CHANGED
@@ -99,7 +99,7 @@
99
99
  "prepack": "bun run build:cli"
100
100
  },
101
101
  "type": "module",
102
- "version": "1.16.0",
102
+ "version": "1.16.1",
103
103
  "description": "Config-driven multi-agent pipeline runner for repository work",
104
104
  "main": "./dist/index.js",
105
105
  "types": "./dist/index.d.ts",
@@ -1,21 +0,0 @@
1
- import { gatewayServerForProfile } from "./gateway.js";
2
- import { isRemoteMcpServer } from "./launch-plan.js";
3
- //#region src/mcp/native-config.ts
4
- function codexNativeMcpConfig(config, profile) {
5
- const mcpServers = Object.fromEntries(Object.entries(gatewayServerForProfile(config, profile)).map(([id, server]) => [id, codexNativeMcpServerConfig(server)]));
6
- return Object.keys(mcpServers).length > 0 ? { mcp_servers: mcpServers } : {};
7
- }
8
- function codexNativeMcpServerConfig(server) {
9
- if (isRemoteMcpServer(server)) return {
10
- ...server.bearer_token_env_var ? { bearer_token_env_var: server.bearer_token_env_var } : {},
11
- ...server.headers ? { http_headers: server.headers } : {},
12
- url: server.url
13
- };
14
- return {
15
- ...server.args ? { args: server.args } : {},
16
- command: server.command,
17
- ...server.env ? { env: server.env } : {}
18
- };
19
- }
20
- //#endregion
21
- export { codexNativeMcpConfig };