@sideboard-ai/core 0.1.205 → 0.1.206
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/agents/cursor-runner.js +1 -1
- package/dist/{agents-67K4BQFJ.js → agents-5SDF6KCI.js} +4 -4
- package/dist/{agents-BVOJNHV6.js → agents-UW2BUEDH.js} +5 -5
- package/dist/{chunk-KZ7PI7FE.js → chunk-4YXOCLJU.js} +5 -0
- package/dist/{chunk-WF33LOP4.js → chunk-64L62EZY.js} +21 -9
- package/dist/{chunk-QUW5D62C.js → chunk-6F2L3NTL.js} +1 -1
- package/dist/{chunk-DFUES6QU.js → chunk-ARR4OGLY.js} +1 -0
- package/dist/{chunk-INNLWYXW.js → chunk-DWGEBZ3C.js} +1 -0
- package/dist/{chunk-WVATAIF4.js → chunk-EJX62RSX.js} +1 -1
- package/dist/{chunk-YOSTWSNC.js → chunk-FX3P25X2.js} +17 -10
- package/dist/{chunk-VIPA75ZA.js → chunk-GD2WKFFA.js} +2 -2
- package/dist/{chunk-FO45DMJ5.js → chunk-IQEBC3LD.js} +41 -21
- package/dist/{chunk-5SMS6QTO.js → chunk-R7QI3O74.js} +2 -2
- package/dist/{chunk-ULZLWQBS.js → chunk-SCIMSW7C.js} +39 -19
- package/dist/{coordinator-prompt-WEPXXLLX.js → coordinator-prompt-6Q5NDWOC.js} +3 -3
- package/dist/{coordinator-prompt-NPT555BO.js → coordinator-prompt-EWHEK24X.js} +3 -3
- package/dist/{global-workspace-NSILADOM.js → global-workspace-2GMALKKE.js} +3 -3
- package/dist/{global-workspace-2I2T7FL5.js → global-workspace-KHSZZKIH.js} +3 -3
- package/dist/index.cjs +43 -12
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -6
- package/dist/mcp/run-stdio.cjs +43 -12
- package/dist/mcp/run-stdio.js +5 -5
- package/dist/{orchestrator-CMAVNELS.js → orchestrator-NXZ5NDAM.js} +6 -6
- package/dist/{orchestrator-I7GFXLHF.js → orchestrator-WIL5WFBL.js} +5 -5
- package/dist/{thread-store-ZGVWPVHP.js → thread-store-LS2T6RVH.js} +1 -1
- package/dist/{thread-store-2SS5V5CN.js → thread-store-XGYWXR2P.js} +1 -1
- package/dist/{workspaces-BOC6M7BW.js → workspaces-4CBMCP6N.js} +3 -3
- package/dist/{workspaces-RFGZBUAR.js → workspaces-6RGWGUFK.js} +3 -3
- package/dist/{worktree-G3ZLM4DC.js → worktree-2U7SZBO2.js} +2 -2
- package/dist/{worktree-WSUQMMK4.js → worktree-SPH7Q2S6.js} +2 -2
- package/package.json +1 -1
|
@@ -37,13 +37,14 @@ import {
|
|
|
37
37
|
pushTurnStderr,
|
|
38
38
|
resolveQuotaFallbackAgent,
|
|
39
39
|
shouldFeedErrorBackToAgent,
|
|
40
|
+
shouldRetryCodexPluginIsolate,
|
|
40
41
|
shouldRetryFailedAgentTurn,
|
|
41
42
|
stripBrightsyNdjsonNoise,
|
|
42
43
|
sumUsageList,
|
|
43
44
|
summarizeTurnStderr,
|
|
44
45
|
toolDescription,
|
|
45
46
|
turnFailChatText
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-64L62EZY.js";
|
|
47
48
|
import {
|
|
48
49
|
SLACK_REPLY_FORMATTING,
|
|
49
50
|
addWorkspace,
|
|
@@ -66,7 +67,7 @@ import {
|
|
|
66
67
|
stageAbsolutePathsAsAttachments,
|
|
67
68
|
stageBuffersAsAttachments,
|
|
68
69
|
syncWorkspacesFromThreads
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-R7QI3O74.js";
|
|
70
71
|
import {
|
|
71
72
|
addPrStackLayer,
|
|
72
73
|
allocateTeamName,
|
|
@@ -116,7 +117,7 @@ import {
|
|
|
116
117
|
worktreeDisplayLabelForGroup,
|
|
117
118
|
worktreeNameFromPath,
|
|
118
119
|
worktreeSlugForTicket
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-6F2L3NTL.js";
|
|
120
121
|
import {
|
|
121
122
|
ATTACHMENTS_DIR,
|
|
122
123
|
DETACHED_JOBS_DIR,
|
|
@@ -134,7 +135,7 @@ import {
|
|
|
134
135
|
updateThread,
|
|
135
136
|
withThreadLock,
|
|
136
137
|
writeThread
|
|
137
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-DWGEBZ3C.js";
|
|
138
139
|
import {
|
|
139
140
|
ensureWorktreeSideboardIgnored
|
|
140
141
|
} from "./chunk-SYFVUF2C.js";
|
|
@@ -408,7 +409,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
408
409
|
await continueOnReply(threadId, prompt);
|
|
409
410
|
return;
|
|
410
411
|
}
|
|
411
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
412
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-WIL5WFBL.js");
|
|
412
413
|
await getOrchestrator2().send(threadId, prompt);
|
|
413
414
|
} catch {
|
|
414
415
|
}
|
|
@@ -801,9 +802,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
801
802
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
802
803
|
);
|
|
803
804
|
}
|
|
804
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
805
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-KHSZZKIH.js");
|
|
805
806
|
if (isGlobalThread2(thread)) {
|
|
806
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
807
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-EWHEK24X.js");
|
|
807
808
|
ensureGlobalCoordinatorCwd2(
|
|
808
809
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
809
810
|
);
|
|
@@ -4223,7 +4224,7 @@ async function adoptThread(input) {
|
|
|
4223
4224
|
messages: input.messages ?? []
|
|
4224
4225
|
});
|
|
4225
4226
|
writeThread(thread);
|
|
4226
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4227
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-6RGWGUFK.js");
|
|
4227
4228
|
await ensureWorkspace2(repoPath);
|
|
4228
4229
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
|
|
4229
4230
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6601,7 +6602,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6601
6602
|
${prompt}`;
|
|
6602
6603
|
}
|
|
6603
6604
|
async function defaultDeps() {
|
|
6604
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6605
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-WIL5WFBL.js");
|
|
6605
6606
|
const orch = getOrchestrator2();
|
|
6606
6607
|
return {
|
|
6607
6608
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7571,7 +7572,12 @@ var Orchestrator = class {
|
|
|
7571
7572
|
const stderrTail = [];
|
|
7572
7573
|
const handle = await spawnAgentTurn(
|
|
7573
7574
|
fresh,
|
|
7574
|
-
{
|
|
7575
|
+
{
|
|
7576
|
+
cachedPrefix,
|
|
7577
|
+
prompt: agentPrompt,
|
|
7578
|
+
systemPrompt: turnReminders,
|
|
7579
|
+
isolateCodexPlugins: fresh.isolateCodexPlugins === true
|
|
7580
|
+
},
|
|
7575
7581
|
(event) => {
|
|
7576
7582
|
this.emit({ type: "turn_output", threadId, event });
|
|
7577
7583
|
noteTurnLiveEvent(threadId, event);
|
|
@@ -7645,10 +7651,19 @@ var Orchestrator = class {
|
|
|
7645
7651
|
}
|
|
7646
7652
|
let lastStderr = summarizeTurnStderr(stderrTail);
|
|
7647
7653
|
let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
|
|
7648
|
-
|
|
7654
|
+
const liveThread = this.requireThread(threadId);
|
|
7655
|
+
const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
|
|
7656
|
+
alreadyIsolated: liveThread.isolateCodexPlugins === true
|
|
7657
|
+
});
|
|
7658
|
+
if (isolateCodexPluginRetry) {
|
|
7659
|
+
updateThread(threadId, { isolateCodexPlugins: true });
|
|
7660
|
+
}
|
|
7661
|
+
if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && (isolateCodexPluginRetry || shouldRetryFailedAgentTurn(detail, {
|
|
7649
7662
|
hasSession: Boolean(this.requireThread(threadId).sessionId)
|
|
7650
|
-
})) {
|
|
7651
|
-
|
|
7663
|
+
}))) {
|
|
7664
|
+
if (!isolateCodexPluginRetry) {
|
|
7665
|
+
updateThread(threadId, { sessionId: null });
|
|
7666
|
+
}
|
|
7652
7667
|
try {
|
|
7653
7668
|
const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
|
|
7654
7669
|
const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
|
|
@@ -7657,7 +7672,7 @@ var Orchestrator = class {
|
|
|
7657
7672
|
}
|
|
7658
7673
|
} catch {
|
|
7659
7674
|
}
|
|
7660
|
-
const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
7675
|
+
const retryNote = isolateCodexPluginRetry ? "Codex plugin/MCP failed \u2014 continuing without that vendor plugin (Settings \u2192 Connectors + HTTP API)" : looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
7661
7676
|
pushTurnStderr(stderrTail, retryNote);
|
|
7662
7677
|
this.emit({
|
|
7663
7678
|
type: "turn_output",
|
|
@@ -7681,7 +7696,12 @@ var Orchestrator = class {
|
|
|
7681
7696
|
].filter(Boolean).join("\n\n---\n\n");
|
|
7682
7697
|
const retryHandle = await spawnAgentTurn(
|
|
7683
7698
|
retryThread,
|
|
7684
|
-
{
|
|
7699
|
+
{
|
|
7700
|
+
cachedPrefix: retryPrefix,
|
|
7701
|
+
prompt: agentPrompt,
|
|
7702
|
+
systemPrompt: turnReminders,
|
|
7703
|
+
isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
|
|
7704
|
+
},
|
|
7685
7705
|
(event) => {
|
|
7686
7706
|
this.emit({ type: "turn_output", threadId, event });
|
|
7687
7707
|
if (event.type === "session_id") {
|
|
@@ -8752,7 +8772,7 @@ var Orchestrator = class {
|
|
|
8752
8772
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
8753
8773
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8754
8774
|
try {
|
|
8755
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8775
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-6RGWGUFK.js");
|
|
8756
8776
|
await ensureWorkspace2(thread.repoPath);
|
|
8757
8777
|
} catch {
|
|
8758
8778
|
}
|
|
@@ -8806,7 +8826,7 @@ var Orchestrator = class {
|
|
|
8806
8826
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8807
8827
|
);
|
|
8808
8828
|
}
|
|
8809
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
8829
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-SPH7Q2S6.js");
|
|
8810
8830
|
const slug = thread.worktreePath.split("/").pop();
|
|
8811
8831
|
const dest = thread.worktreePath;
|
|
8812
8832
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -8916,7 +8936,7 @@ async function startOrchestration(opts) {
|
|
|
8916
8936
|
sourceRef: "default",
|
|
8917
8937
|
...createOpts
|
|
8918
8938
|
}).catch(async () => {
|
|
8919
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
8939
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-SPH7Q2S6.js");
|
|
8920
8940
|
const repo = await resolveRepoRoot2(repoPath);
|
|
8921
8941
|
const def = await resolveDefaultBranch2(repo);
|
|
8922
8942
|
return orch.createThread({
|
|
@@ -8926,7 +8946,7 @@ async function startOrchestration(opts) {
|
|
|
8926
8946
|
repoPath: repo
|
|
8927
8947
|
});
|
|
8928
8948
|
});
|
|
8929
|
-
const { updateThread: upd } = await import("./thread-store-
|
|
8949
|
+
const { updateThread: upd } = await import("./thread-store-LS2T6RVH.js");
|
|
8930
8950
|
const updated = upd(thread.id, {
|
|
8931
8951
|
sourceType: "orchestration",
|
|
8932
8952
|
sourceRef: goal
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-GD2WKFFA.js";
|
|
11
|
+
import "./chunk-EJX62RSX.js";
|
|
12
12
|
import "./chunk-6K64FJDD.js";
|
|
13
13
|
import "./chunk-QQKDGPUI.js";
|
|
14
14
|
import "./chunk-QFBBUFD4.js";
|
|
15
15
|
import "./chunk-4TR3HZFT.js";
|
|
16
16
|
import "./chunk-WDRMZKVB.js";
|
|
17
17
|
import "./chunk-JT7R45JB.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ARR4OGLY.js";
|
|
19
19
|
import "./chunk-77WWLBCI.js";
|
|
20
20
|
import "./chunk-WFUDY6PC.js";
|
|
21
21
|
import "./chunk-UFHNSFAS.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-R7QI3O74.js";
|
|
13
|
+
import "./chunk-6F2L3NTL.js";
|
|
14
14
|
import "./chunk-D6JWYJ4P.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-DWGEBZ3C.js";
|
|
16
16
|
import "./chunk-SYFVUF2C.js";
|
|
17
17
|
import "./chunk-FNQNJOHY.js";
|
|
18
18
|
import "./chunk-X743YN5Y.js";
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-GD2WKFFA.js";
|
|
19
|
+
import "./chunk-EJX62RSX.js";
|
|
20
20
|
import "./chunk-6K64FJDD.js";
|
|
21
21
|
import "./chunk-QQKDGPUI.js";
|
|
22
22
|
import "./chunk-QFBBUFD4.js";
|
|
23
23
|
import "./chunk-4TR3HZFT.js";
|
|
24
24
|
import "./chunk-WDRMZKVB.js";
|
|
25
25
|
import "./chunk-JT7R45JB.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-ARR4OGLY.js";
|
|
27
27
|
import "./chunk-77WWLBCI.js";
|
|
28
28
|
import {
|
|
29
29
|
globalAgentCwd
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-R7QI3O74.js";
|
|
21
|
+
import "./chunk-6F2L3NTL.js";
|
|
22
22
|
import "./chunk-D6JWYJ4P.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-DWGEBZ3C.js";
|
|
24
24
|
import "./chunk-SYFVUF2C.js";
|
|
25
25
|
import "./chunk-FNQNJOHY.js";
|
|
26
26
|
import "./chunk-X743YN5Y.js";
|
package/dist/index.cjs
CHANGED
|
@@ -2848,6 +2848,7 @@ function normalizeThread(raw) {
|
|
|
2848
2848
|
effort: resolveThreadEffort(raw),
|
|
2849
2849
|
fast: Boolean(raw.fast),
|
|
2850
2850
|
planMode: Boolean(raw.planMode),
|
|
2851
|
+
isolateCodexPlugins: raw.isolateCodexPlugins === true ? true : void 0,
|
|
2851
2852
|
autonomy: raw.autonomy ?? "default",
|
|
2852
2853
|
lastError: raw.lastError ?? null,
|
|
2853
2854
|
agentPid: raw.agentPid ?? null,
|
|
@@ -3358,6 +3359,10 @@ function turnFailChatText(opts) {
|
|
|
3358
3359
|
|
|
3359
3360
|
${fail6}`;
|
|
3360
3361
|
}
|
|
3362
|
+
function shouldRetryCodexPluginIsolate(detail, opts) {
|
|
3363
|
+
if (opts?.alreadyIsolated) return false;
|
|
3364
|
+
return looksLikeCodexMcpError(detail);
|
|
3365
|
+
}
|
|
3361
3366
|
function looksLikeCodexMcpError(text7) {
|
|
3362
3367
|
const t = text7.trim().toLowerCase();
|
|
3363
3368
|
if (!t) return false;
|
|
@@ -10877,13 +10882,18 @@ function normalizeTurnInput(input) {
|
|
|
10877
10882
|
return {
|
|
10878
10883
|
prompt: input.prompt,
|
|
10879
10884
|
cachedPrefix: input.cachedPrefix?.trim() || void 0,
|
|
10880
|
-
systemPrompt: input.systemPrompt?.trim() || void 0
|
|
10885
|
+
systemPrompt: input.systemPrompt?.trim() || void 0,
|
|
10886
|
+
...input.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
|
|
10881
10887
|
};
|
|
10882
10888
|
}
|
|
10883
10889
|
function dropCachedPrefixOnResume(input, sessionId) {
|
|
10884
10890
|
const turn = normalizeTurnInput(input);
|
|
10885
10891
|
if (sessionId) {
|
|
10886
|
-
return
|
|
10892
|
+
return {
|
|
10893
|
+
prompt: turn.prompt,
|
|
10894
|
+
...turn.systemPrompt ? { systemPrompt: turn.systemPrompt } : {},
|
|
10895
|
+
...turn.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
|
|
10896
|
+
};
|
|
10887
10897
|
}
|
|
10888
10898
|
return turn;
|
|
10889
10899
|
}
|
|
@@ -12909,9 +12919,7 @@ function toCodexUnattendedAppsArgs() {
|
|
|
12909
12919
|
"-c",
|
|
12910
12920
|
"apps.posthog.enabled=false",
|
|
12911
12921
|
"-c",
|
|
12912
|
-
"features.plugins=false"
|
|
12913
|
-
"-c",
|
|
12914
|
-
"mcp_servers.posthog.enabled=false"
|
|
12922
|
+
"features.plugins=false"
|
|
12915
12923
|
];
|
|
12916
12924
|
}
|
|
12917
12925
|
var import_node_fs32, import_node_os11, import_node_path33, import_smol_toml2;
|
|
@@ -13108,8 +13116,12 @@ var init_codex = __esm({
|
|
|
13108
13116
|
}),
|
|
13109
13117
|
orchestratorThreadId: isOrchestrator ? thread.id : null
|
|
13110
13118
|
});
|
|
13119
|
+
const isolatePlugins = isOrchestrator || Boolean(thread.isolateCodexPlugins) || Boolean(normalizeTurnInput(input).isolateCodexPlugins);
|
|
13111
13120
|
const mcpOverrides = [
|
|
13112
|
-
|
|
13121
|
+
// Worktree first try keeps plugins (Claude connectors). Coordinators
|
|
13122
|
+
// isolate. After a fatal plugin MCP, the orchestrator retries with
|
|
13123
|
+
// isolateCodexPlugins so the turn continues. Never invent mcp_servers.posthog.
|
|
13124
|
+
...isolatePlugins ? toCodexUnattendedAppsArgs() : [],
|
|
13113
13125
|
...toCodexMcpConfigArgs(injected2),
|
|
13114
13126
|
...isOrchestrator ? toCodexDisableUserMcpArgs(
|
|
13115
13127
|
userMcpNamesToDisable({
|
|
@@ -23371,7 +23383,12 @@ var init_orchestrator = __esm({
|
|
|
23371
23383
|
const stderrTail = [];
|
|
23372
23384
|
const handle = await spawnAgentTurn(
|
|
23373
23385
|
fresh,
|
|
23374
|
-
{
|
|
23386
|
+
{
|
|
23387
|
+
cachedPrefix,
|
|
23388
|
+
prompt: agentPrompt,
|
|
23389
|
+
systemPrompt: turnReminders,
|
|
23390
|
+
isolateCodexPlugins: fresh.isolateCodexPlugins === true
|
|
23391
|
+
},
|
|
23375
23392
|
(event) => {
|
|
23376
23393
|
this.emit({ type: "turn_output", threadId, event });
|
|
23377
23394
|
noteTurnLiveEvent(threadId, event);
|
|
@@ -23445,10 +23462,19 @@ var init_orchestrator = __esm({
|
|
|
23445
23462
|
}
|
|
23446
23463
|
let lastStderr = summarizeTurnStderr(stderrTail);
|
|
23447
23464
|
let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
|
|
23448
|
-
|
|
23465
|
+
const liveThread = this.requireThread(threadId);
|
|
23466
|
+
const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
|
|
23467
|
+
alreadyIsolated: liveThread.isolateCodexPlugins === true
|
|
23468
|
+
});
|
|
23469
|
+
if (isolateCodexPluginRetry) {
|
|
23470
|
+
updateThread(threadId, { isolateCodexPlugins: true });
|
|
23471
|
+
}
|
|
23472
|
+
if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && (isolateCodexPluginRetry || shouldRetryFailedAgentTurn(detail, {
|
|
23449
23473
|
hasSession: Boolean(this.requireThread(threadId).sessionId)
|
|
23450
|
-
})) {
|
|
23451
|
-
|
|
23474
|
+
}))) {
|
|
23475
|
+
if (!isolateCodexPluginRetry) {
|
|
23476
|
+
updateThread(threadId, { sessionId: null });
|
|
23477
|
+
}
|
|
23452
23478
|
try {
|
|
23453
23479
|
const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
|
|
23454
23480
|
const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
|
|
@@ -23457,7 +23483,7 @@ var init_orchestrator = __esm({
|
|
|
23457
23483
|
}
|
|
23458
23484
|
} catch {
|
|
23459
23485
|
}
|
|
23460
|
-
const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
23486
|
+
const retryNote = isolateCodexPluginRetry ? "Codex plugin/MCP failed \u2014 continuing without that vendor plugin (Settings \u2192 Connectors + HTTP API)" : looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
23461
23487
|
pushTurnStderr(stderrTail, retryNote);
|
|
23462
23488
|
this.emit({
|
|
23463
23489
|
type: "turn_output",
|
|
@@ -23481,7 +23507,12 @@ var init_orchestrator = __esm({
|
|
|
23481
23507
|
].filter(Boolean).join("\n\n---\n\n");
|
|
23482
23508
|
const retryHandle = await spawnAgentTurn(
|
|
23483
23509
|
retryThread,
|
|
23484
|
-
{
|
|
23510
|
+
{
|
|
23511
|
+
cachedPrefix: retryPrefix,
|
|
23512
|
+
prompt: agentPrompt,
|
|
23513
|
+
systemPrompt: turnReminders,
|
|
23514
|
+
isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
|
|
23515
|
+
},
|
|
23485
23516
|
(event) => {
|
|
23486
23517
|
this.emit({ type: "turn_output", threadId, event });
|
|
23487
23518
|
if (event.type === "session_id") {
|
package/dist/index.d.cts
CHANGED
|
@@ -128,6 +128,12 @@ interface Thread {
|
|
|
128
128
|
fast: boolean;
|
|
129
129
|
/** Plan-only turns — analyze and plan without editing files (Conductor-style). */
|
|
130
130
|
planMode: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* After a Codex plugin/App MCP kills `codex exec` (AuthRequired / invalid
|
|
133
|
+
* transport), later turns isolate Apps/plugins so the same fatal error
|
|
134
|
+
* cannot loop. Worktree first tries with plugins on.
|
|
135
|
+
*/
|
|
136
|
+
isolateCodexPlugins?: boolean;
|
|
131
137
|
sessionId: string | null;
|
|
132
138
|
autonomy: Autonomy;
|
|
133
139
|
sourceIsFork: boolean;
|
|
@@ -3034,6 +3040,11 @@ interface AgentTurnInput {
|
|
|
3034
3040
|
* already carries the full playbook in `cachedPrefix`.
|
|
3035
3041
|
*/
|
|
3036
3042
|
systemPrompt?: string;
|
|
3043
|
+
/**
|
|
3044
|
+
* Codex: disable ChatGPT Apps / plugins for this exec (after a fatal
|
|
3045
|
+
* plugin MCP). Coordinators also isolate via `isOrchestratorThread`.
|
|
3046
|
+
*/
|
|
3047
|
+
isolateCodexPlugins?: boolean;
|
|
3037
3048
|
}
|
|
3038
3049
|
declare function normalizeTurnInput(input: string | AgentTurnInput): Required<Pick<AgentTurnInput, 'prompt'>> & AgentTurnInput;
|
|
3039
3050
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,12 @@ interface Thread {
|
|
|
128
128
|
fast: boolean;
|
|
129
129
|
/** Plan-only turns — analyze and plan without editing files (Conductor-style). */
|
|
130
130
|
planMode: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* After a Codex plugin/App MCP kills `codex exec` (AuthRequired / invalid
|
|
133
|
+
* transport), later turns isolate Apps/plugins so the same fatal error
|
|
134
|
+
* cannot loop. Worktree first tries with plugins on.
|
|
135
|
+
*/
|
|
136
|
+
isolateCodexPlugins?: boolean;
|
|
131
137
|
sessionId: string | null;
|
|
132
138
|
autonomy: Autonomy;
|
|
133
139
|
sourceIsFork: boolean;
|
|
@@ -3034,6 +3040,11 @@ interface AgentTurnInput {
|
|
|
3034
3040
|
* already carries the full playbook in `cachedPrefix`.
|
|
3035
3041
|
*/
|
|
3036
3042
|
systemPrompt?: string;
|
|
3043
|
+
/**
|
|
3044
|
+
* Codex: disable ChatGPT Apps / plugins for this exec (after a fatal
|
|
3045
|
+
* plugin MCP). Coordinators also isolate via `isOrchestratorThread`.
|
|
3046
|
+
*/
|
|
3047
|
+
isolateCodexPlugins?: boolean;
|
|
3037
3048
|
}
|
|
3038
3049
|
declare function normalizeTurnInput(input: string | AgentTurnInput): Required<Pick<AgentTurnInput, 'prompt'>> & AgentTurnInput;
|
|
3039
3050
|
/**
|
package/dist/index.js
CHANGED
|
@@ -304,7 +304,7 @@ import {
|
|
|
304
304
|
worktreeCleanupSettings,
|
|
305
305
|
wrapReviewSkillMarkdown,
|
|
306
306
|
writeWorktreeFile
|
|
307
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-IQEBC3LD.js";
|
|
308
308
|
import {
|
|
309
309
|
LEGACY_PLAN_FILE_REL,
|
|
310
310
|
PLAN_FILE_NAME,
|
|
@@ -424,7 +424,7 @@ import {
|
|
|
424
424
|
withEventParentId,
|
|
425
425
|
withEventsParentId,
|
|
426
426
|
writeInjectedMcpConfig
|
|
427
|
-
} from "./chunk-
|
|
427
|
+
} from "./chunk-FX3P25X2.js";
|
|
428
428
|
import {
|
|
429
429
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
430
430
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -467,7 +467,7 @@ import {
|
|
|
467
467
|
stageBuffersAsAttachments,
|
|
468
468
|
syncWorkspacesFromThreads,
|
|
469
469
|
takenTeamSlugsForOrchestration
|
|
470
|
-
} from "./chunk-
|
|
470
|
+
} from "./chunk-GD2WKFFA.js";
|
|
471
471
|
import {
|
|
472
472
|
FAMOUS_SOCCER_TEAMS,
|
|
473
473
|
GITHUB_PR_BODY_MAX_CHARS,
|
|
@@ -565,7 +565,7 @@ import {
|
|
|
565
565
|
worktreeDisplayLabelForGroup,
|
|
566
566
|
worktreeNameFromPath,
|
|
567
567
|
worktreeSlugForTicket
|
|
568
|
-
} from "./chunk-
|
|
568
|
+
} from "./chunk-EJX62RSX.js";
|
|
569
569
|
import {
|
|
570
570
|
ATTACHMENTS_DIR,
|
|
571
571
|
CLI_DIR,
|
|
@@ -611,7 +611,7 @@ import {
|
|
|
611
611
|
trustSystemCertificates,
|
|
612
612
|
turnCostUsdFromCursorUsage,
|
|
613
613
|
withMaxOldSpaceSize
|
|
614
|
-
} from "./chunk-
|
|
614
|
+
} from "./chunk-4YXOCLJU.js";
|
|
615
615
|
import {
|
|
616
616
|
FOLLOW_UP_BEHAVIORS,
|
|
617
617
|
GITHUB_GIT_AUTH_MODES,
|
|
@@ -745,7 +745,7 @@ import {
|
|
|
745
745
|
updateThread,
|
|
746
746
|
withThreadLock,
|
|
747
747
|
writeThread
|
|
748
|
-
} from "./chunk-
|
|
748
|
+
} from "./chunk-ARR4OGLY.js";
|
|
749
749
|
import {
|
|
750
750
|
THINKING_EFFORTS,
|
|
751
751
|
isThinkingEffort,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -836,6 +836,7 @@ function normalizeThread(raw) {
|
|
|
836
836
|
effort: resolveThreadEffort(raw),
|
|
837
837
|
fast: Boolean(raw.fast),
|
|
838
838
|
planMode: Boolean(raw.planMode),
|
|
839
|
+
isolateCodexPlugins: raw.isolateCodexPlugins === true ? true : void 0,
|
|
839
840
|
autonomy: raw.autonomy ?? "default",
|
|
840
841
|
lastError: raw.lastError ?? null,
|
|
841
842
|
agentPid: raw.agentPid ?? null,
|
|
@@ -1852,6 +1853,10 @@ function turnFailChatText(opts) {
|
|
|
1852
1853
|
|
|
1853
1854
|
${fail6}`;
|
|
1854
1855
|
}
|
|
1856
|
+
function shouldRetryCodexPluginIsolate(detail, opts) {
|
|
1857
|
+
if (opts?.alreadyIsolated) return false;
|
|
1858
|
+
return looksLikeCodexMcpError(detail);
|
|
1859
|
+
}
|
|
1855
1860
|
function looksLikeCodexMcpError(text7) {
|
|
1856
1861
|
const t = text7.trim().toLowerCase();
|
|
1857
1862
|
if (!t) return false;
|
|
@@ -8852,13 +8857,18 @@ function normalizeTurnInput(input) {
|
|
|
8852
8857
|
return {
|
|
8853
8858
|
prompt: input.prompt,
|
|
8854
8859
|
cachedPrefix: input.cachedPrefix?.trim() || void 0,
|
|
8855
|
-
systemPrompt: input.systemPrompt?.trim() || void 0
|
|
8860
|
+
systemPrompt: input.systemPrompt?.trim() || void 0,
|
|
8861
|
+
...input.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
|
|
8856
8862
|
};
|
|
8857
8863
|
}
|
|
8858
8864
|
function dropCachedPrefixOnResume(input, sessionId) {
|
|
8859
8865
|
const turn = normalizeTurnInput(input);
|
|
8860
8866
|
if (sessionId) {
|
|
8861
|
-
return
|
|
8867
|
+
return {
|
|
8868
|
+
prompt: turn.prompt,
|
|
8869
|
+
...turn.systemPrompt ? { systemPrompt: turn.systemPrompt } : {},
|
|
8870
|
+
...turn.isolateCodexPlugins ? { isolateCodexPlugins: true } : {}
|
|
8871
|
+
};
|
|
8862
8872
|
}
|
|
8863
8873
|
return turn;
|
|
8864
8874
|
}
|
|
@@ -11063,9 +11073,7 @@ function toCodexUnattendedAppsArgs() {
|
|
|
11063
11073
|
"-c",
|
|
11064
11074
|
"apps.posthog.enabled=false",
|
|
11065
11075
|
"-c",
|
|
11066
|
-
"features.plugins=false"
|
|
11067
|
-
"-c",
|
|
11068
|
-
"mcp_servers.posthog.enabled=false"
|
|
11076
|
+
"features.plugins=false"
|
|
11069
11077
|
];
|
|
11070
11078
|
}
|
|
11071
11079
|
var import_node_fs28, import_node_os11, import_node_path29, import_smol_toml2;
|
|
@@ -11262,8 +11270,12 @@ var init_codex = __esm({
|
|
|
11262
11270
|
}),
|
|
11263
11271
|
orchestratorThreadId: isOrchestrator ? thread.id : null
|
|
11264
11272
|
});
|
|
11273
|
+
const isolatePlugins = isOrchestrator || Boolean(thread.isolateCodexPlugins) || Boolean(normalizeTurnInput(input).isolateCodexPlugins);
|
|
11265
11274
|
const mcpOverrides = [
|
|
11266
|
-
|
|
11275
|
+
// Worktree first try keeps plugins (Claude connectors). Coordinators
|
|
11276
|
+
// isolate. After a fatal plugin MCP, the orchestrator retries with
|
|
11277
|
+
// isolateCodexPlugins so the turn continues. Never invent mcp_servers.posthog.
|
|
11278
|
+
...isolatePlugins ? toCodexUnattendedAppsArgs() : [],
|
|
11267
11279
|
...toCodexMcpConfigArgs(injected2),
|
|
11268
11280
|
...isOrchestrator ? toCodexDisableUserMcpArgs(
|
|
11269
11281
|
userMcpNamesToDisable({
|
|
@@ -21599,7 +21611,12 @@ var init_orchestrator = __esm({
|
|
|
21599
21611
|
const stderrTail = [];
|
|
21600
21612
|
const handle = await spawnAgentTurn(
|
|
21601
21613
|
fresh,
|
|
21602
|
-
{
|
|
21614
|
+
{
|
|
21615
|
+
cachedPrefix,
|
|
21616
|
+
prompt: agentPrompt,
|
|
21617
|
+
systemPrompt: turnReminders,
|
|
21618
|
+
isolateCodexPlugins: fresh.isolateCodexPlugins === true
|
|
21619
|
+
},
|
|
21603
21620
|
(event) => {
|
|
21604
21621
|
this.emit({ type: "turn_output", threadId, event });
|
|
21605
21622
|
noteTurnLiveEvent(threadId, event);
|
|
@@ -21673,10 +21690,19 @@ var init_orchestrator = __esm({
|
|
|
21673
21690
|
}
|
|
21674
21691
|
let lastStderr = summarizeTurnStderr(stderrTail);
|
|
21675
21692
|
let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
|
|
21676
|
-
|
|
21693
|
+
const liveThread = this.requireThread(threadId);
|
|
21694
|
+
const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
|
|
21695
|
+
alreadyIsolated: liveThread.isolateCodexPlugins === true
|
|
21696
|
+
});
|
|
21697
|
+
if (isolateCodexPluginRetry) {
|
|
21698
|
+
updateThread(threadId, { isolateCodexPlugins: true });
|
|
21699
|
+
}
|
|
21700
|
+
if (exitCode !== 0 && !assistantText && parts.length === 0 && !this.stoppedTurns.has(threadId) && (isolateCodexPluginRetry || shouldRetryFailedAgentTurn(detail, {
|
|
21677
21701
|
hasSession: Boolean(this.requireThread(threadId).sessionId)
|
|
21678
|
-
})) {
|
|
21679
|
-
|
|
21702
|
+
}))) {
|
|
21703
|
+
if (!isolateCodexPluginRetry) {
|
|
21704
|
+
updateThread(threadId, { sessionId: null });
|
|
21705
|
+
}
|
|
21680
21706
|
try {
|
|
21681
21707
|
const gitDirs = await resolveGitDirsForLockRecovery(thread.worktreePath);
|
|
21682
21708
|
const clearedLocks = clearStaleIndexLocks(gitDirs, 2e3);
|
|
@@ -21685,7 +21711,7 @@ var init_orchestrator = __esm({
|
|
|
21685
21711
|
}
|
|
21686
21712
|
} catch {
|
|
21687
21713
|
}
|
|
21688
|
-
const retryNote = looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
21714
|
+
const retryNote = isolateCodexPluginRetry ? "Codex plugin/MCP failed \u2014 continuing without that vendor plugin (Settings \u2192 Connectors + HTTP API)" : looksLikeInvalidAgentSession(detail) ? "Agent session missing \u2014 starting a fresh session" : looksLikeV8Oom(detail) ? "Agent ran out of memory \u2014 starting a fresh session" : "Agent runner crashed \u2014 restarting Node once";
|
|
21689
21715
|
pushTurnStderr(stderrTail, retryNote);
|
|
21690
21716
|
this.emit({
|
|
21691
21717
|
type: "turn_output",
|
|
@@ -21709,7 +21735,12 @@ var init_orchestrator = __esm({
|
|
|
21709
21735
|
].filter(Boolean).join("\n\n---\n\n");
|
|
21710
21736
|
const retryHandle = await spawnAgentTurn(
|
|
21711
21737
|
retryThread,
|
|
21712
|
-
{
|
|
21738
|
+
{
|
|
21739
|
+
cachedPrefix: retryPrefix,
|
|
21740
|
+
prompt: agentPrompt,
|
|
21741
|
+
systemPrompt: turnReminders,
|
|
21742
|
+
isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
|
|
21743
|
+
},
|
|
21713
21744
|
(event) => {
|
|
21714
21745
|
this.emit({ type: "turn_output", threadId, event });
|
|
21715
21746
|
if (event.type === "session_id") {
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
syncBoardPins,
|
|
51
51
|
updateSchedule,
|
|
52
52
|
waitForDetachedJob
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-SCIMSW7C.js";
|
|
54
54
|
import "../chunk-JFOPOMK7.js";
|
|
55
55
|
import "../chunk-YWI3IBP2.js";
|
|
56
56
|
import {
|
|
@@ -61,12 +61,12 @@ import {
|
|
|
61
61
|
materializeSystemCaBundle,
|
|
62
62
|
sideboardMcpProfile,
|
|
63
63
|
trustSystemCertificates
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-64L62EZY.js";
|
|
65
65
|
import {
|
|
66
66
|
GLOBAL_WORKSPACE_ID,
|
|
67
67
|
isCloudCoordinatorThread,
|
|
68
68
|
listWorkspaces
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-R7QI3O74.js";
|
|
70
70
|
import "../chunk-3OHR73VK.js";
|
|
71
71
|
import "../chunk-Y4MIXGPA.js";
|
|
72
72
|
import "../chunk-3K257PCS.js";
|
|
@@ -84,9 +84,9 @@ import {
|
|
|
84
84
|
resolveListPrsOptions,
|
|
85
85
|
resolveRepoRoot,
|
|
86
86
|
warmGithubAgentAuth
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-6F2L3NTL.js";
|
|
88
88
|
import "../chunk-D6JWYJ4P.js";
|
|
89
|
-
import "../chunk-
|
|
89
|
+
import "../chunk-DWGEBZ3C.js";
|
|
90
90
|
import "../chunk-SYFVUF2C.js";
|
|
91
91
|
import {
|
|
92
92
|
gh,
|
|
@@ -7,24 +7,24 @@ import {
|
|
|
7
7
|
resolveSendFollowUp,
|
|
8
8
|
startOrchestration,
|
|
9
9
|
waitForPidExit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IQEBC3LD.js";
|
|
11
11
|
import "./chunk-DJU54RYW.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FX3P25X2.js";
|
|
13
|
+
import "./chunk-GD2WKFFA.js";
|
|
14
|
+
import "./chunk-EJX62RSX.js";
|
|
15
15
|
import "./chunk-6K64FJDD.js";
|
|
16
16
|
import "./chunk-QQKDGPUI.js";
|
|
17
17
|
import "./chunk-SALM35KD.js";
|
|
18
18
|
import "./chunk-AN3THU7F.js";
|
|
19
19
|
import "./chunk-N7WZ6NIN.js";
|
|
20
20
|
import "./chunk-AXQ4ZWHK.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-4YXOCLJU.js";
|
|
22
22
|
import "./chunk-QFBBUFD4.js";
|
|
23
23
|
import "./chunk-4TR3HZFT.js";
|
|
24
24
|
import "./chunk-WDRMZKVB.js";
|
|
25
25
|
import "./chunk-4TYXWPAJ.js";
|
|
26
26
|
import "./chunk-JT7R45JB.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-ARR4OGLY.js";
|
|
28
28
|
import "./chunk-77WWLBCI.js";
|
|
29
29
|
import "./chunk-WFUDY6PC.js";
|
|
30
30
|
import "./chunk-UFHNSFAS.js";
|