instar 1.2.57 → 1.2.58

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqQH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiqDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAoyLtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsQH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiqDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0zLtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -91,6 +91,7 @@ import { pickupGitSyncMessages } from '../messaging/GitSyncTransport.js';
91
91
  import { DeliveryRetryManager } from '../messaging/DeliveryRetryManager.js';
92
92
  import { SpawnRequestManager } from '../messaging/SpawnRequestManager.js';
93
93
  import { ThreadlineRouter } from '../threadline/ThreadlineRouter.js';
94
+ import { resolveThreadlineMcpEntry } from '../threadline/mcpEntry.js';
94
95
  import { ThreadResumeMap } from '../threadline/ThreadResumeMap.js';
95
96
  import { ListenerSessionManager } from '../threadline/ListenerSessionManager.js';
96
97
  import { SystemReviewer } from '../monitoring/SystemReviewer.js';
@@ -2116,7 +2117,17 @@ export async function startServer(options) {
2116
2117
  console.log(pc.yellow(` Git sync setup: ${err instanceof Error ? err.message : String(err)}`));
2117
2118
  }
2118
2119
  }
2119
- const sessionManager = new SessionManager(config.sessions, state);
2120
+ // Per-agent Codex threadline MCP override. Codex reads a SHARED
2121
+ // ~/.codex/config.toml whose [mcp_servers."threadline"] is last-writer-wins
2122
+ // across every codex agent on the machine — so a codex worker could load a
2123
+ // DIFFERENT agent's threadline identity and its threadline_send would be
2124
+ // misaddressed. Pin this agent's own entry per-spawn (the launch builders
2125
+ // emit `-c mcp_servers.threadline.*`). Only when threadline is configured;
2126
+ // ignored by non-codex launches. See CODEX-MULTIAGENT-THREADLINE-SPEC.
2127
+ const codexThreadlineMcp = config.threadline
2128
+ ? resolveThreadlineMcpEntry(config.sessions.projectDir, config.stateDir, config.projectName)
2129
+ : undefined;
2130
+ const sessionManager = new SessionManager(codexThreadlineMcp ? { ...config.sessions, codexThreadlineMcp } : config.sessions, state);
2120
2131
  // Input Guard is constructed later (after sharedIntelligence is available)
2121
2132
  // so the topic coherence reviewer can route through the IntelligenceProvider
2122
2133
  // abstraction instead of calling Anthropic directly.
@@ -5970,6 +5981,12 @@ export async function startServer(options) {
5970
5981
  // §4.5: honor SpawnRequestManager's provenance tag so drain-spawned
5971
5982
  // sessions are distinguishable from inline-spawned ones in logs/stream.
5972
5983
  triggeredBy: opts?.triggeredBy ?? 'spawn-request',
5984
+ // This is the Threadline inbound-reply spawn: the worker must call
5985
+ // the threadline_send MCP tool to reply, which a codex worker can only
5986
+ // do under full bypass (codex cancels MCP calls in any sandbox). Jobs
5987
+ // do NOT set this and stay sandboxed. Bounded: Threadline only accepts
5988
+ // messages from trusted agents.
5989
+ codexAllowMcpTools: true,
5973
5990
  });
5974
5991
  return session.id;
5975
5992
  },
@@ -6160,6 +6177,9 @@ export async function startServer(options) {
6160
6177
  minIqsBand: pipeConfig?.minIqsBand ?? 70,
6161
6178
  framework: pipeFramework,
6162
6179
  binaryPath: pipeBinaryPath,
6180
+ // Same per-agent codex threadline MCP override as SessionManager, so a
6181
+ // codex pipe-reply worker uses THIS agent's threadline MCP.
6182
+ ...(codexThreadlineMcp ? { codexThreadlineMcp } : {}),
6163
6183
  });
6164
6184
  console.log(pc.dim(` Pipe sessions: enabled (model: ${pipeConfig?.model ?? 'sonnet'}, max: ${pipeConfig?.maxConcurrent ?? 5})`));
6165
6185
  }