@sideboard-ai/core 0.1.206 → 0.1.208
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/{abletime-TONBQP4O.js → abletime-I4IYZBKU.js} +4 -4
- package/dist/{abletime-S3UHQZVW.js → abletime-UWSSLXH3.js} +4 -4
- package/dist/{abletime-oauth-SD4SZY5U.js → abletime-oauth-C3BQXKW3.js} +5 -3
- package/dist/{abletime-oauth-AVCEO2DY.js → abletime-oauth-UZHPB3W2.js} +14 -4
- package/dist/{abletime-rest-J2OBB4VA.js → abletime-rest-5YPPEOKK.js} +3 -3
- package/dist/{abletime-rest-6ODSXV7G.js → abletime-rest-HYNYDYK3.js} +3 -3
- package/dist/agents/cursor-runner.js +1 -1
- package/dist/{agents-UW2BUEDH.js → agents-CCS5IEBV.js} +6 -6
- package/dist/{agents-5SDF6KCI.js → agents-QHQXR55O.js} +5 -5
- package/dist/{app-settings-YEPF46IJ.js → app-settings-GJ6KDYEF.js} +1 -1
- package/dist/{app-settings-LGHMNHSP.js → app-settings-R2KNCT37.js} +1 -1
- package/dist/{chunk-X743YN5Y.js → chunk-4EGK47WV.js} +1 -0
- package/dist/{chunk-6Q7DFVDQ.js → chunk-6J4OQ6TF.js} +14 -4
- package/dist/{chunk-FO2NTJ7L.js → chunk-6YZLSZLK.js} +3 -3
- package/dist/{chunk-ARR4OGLY.js → chunk-7DKX5JLT.js} +2 -0
- package/dist/{chunk-64L62EZY.js → chunk-7PEIIN7P.js} +30 -5
- package/dist/{chunk-FX3P25X2.js → chunk-A6SOSLUV.js} +32 -5
- package/dist/{chunk-IQEBC3LD.js → chunk-C5MNMITQ.js} +95 -35
- package/dist/{chunk-SCIMSW7C.js → chunk-C6ZNQV5W.js} +91 -33
- package/dist/{chunk-R7QI3O74.js → chunk-DNTPX6HV.js} +3 -3
- package/dist/{chunk-CYLDJWRK.js → chunk-F4LZUEIO.js} +37 -7
- package/dist/{chunk-GD2WKFFA.js → chunk-HA4EZKFY.js} +3 -3
- package/dist/{chunk-4YXOCLJU.js → chunk-JZHRZ3DR.js} +1 -1
- package/dist/{chunk-6F2L3NTL.js → chunk-NJ2CCLV6.js} +2 -2
- package/dist/{chunk-EJX62RSX.js → chunk-OP6CFVTB.js} +2 -2
- package/dist/{chunk-3K257PCS.js → chunk-TEDEVD4O.js} +37 -7
- package/dist/{chunk-QAVWH2RQ.js → chunk-W6X4GZJG.js} +3 -3
- package/dist/{chunk-SGUVAK66.js → chunk-WXWJ5MJ4.js} +5 -5
- package/dist/{chunk-W6VM36YO.js → chunk-X45BV4VX.js} +5 -5
- package/dist/{chunk-QFBBUFD4.js → chunk-Y4CF7LHH.js} +1 -0
- package/dist/{chunk-DWGEBZ3C.js → chunk-ZHCB4CKR.js} +2 -0
- package/dist/{coordinator-prompt-EWHEK24X.js → coordinator-prompt-TUHB6ZFA.js} +4 -4
- package/dist/{coordinator-prompt-6Q5NDWOC.js → coordinator-prompt-WOTJQMD5.js} +4 -4
- package/dist/{global-workspace-2GMALKKE.js → global-workspace-5UUUNA4A.js} +4 -4
- package/dist/{global-workspace-KHSZZKIH.js → global-workspace-V6G2KH2V.js} +4 -4
- package/dist/index.cjs +164 -20
- package/dist/index.d.cts +39 -4
- package/dist/index.d.ts +39 -4
- package/dist/index.js +26 -13
- package/dist/mcp/run-stdio.cjs +150 -20
- package/dist/mcp/run-stdio.js +11 -11
- package/dist/{orchestrator-WIL5WFBL.js → orchestrator-4IGHVRAF.js} +6 -6
- package/dist/{orchestrator-NXZ5NDAM.js → orchestrator-D4AQNF25.js} +7 -7
- package/dist/{thread-store-XGYWXR2P.js → thread-store-ESZYZSVC.js} +1 -1
- package/dist/{thread-store-LS2T6RVH.js → thread-store-FMWDFAO5.js} +1 -1
- package/dist/{workspaces-6RGWGUFK.js → workspaces-CLNANACI.js} +4 -4
- package/dist/{workspaces-4CBMCP6N.js → workspaces-PZ36M7EQ.js} +4 -4
- package/dist/{worktree-SPH7Q2S6.js → worktree-JKTM47K5.js} +3 -3
- package/dist/{worktree-2U7SZBO2.js → worktree-NC4XQNQI.js} +3 -3
- package/package.json +1 -1
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -841,6 +841,7 @@ function normalizeThread(raw) {
|
|
|
841
841
|
lastError: raw.lastError ?? null,
|
|
842
842
|
agentPid: raw.agentPid ?? null,
|
|
843
843
|
attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
|
|
844
|
+
pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
|
|
844
845
|
prTitle: raw.prTitle ?? null,
|
|
845
846
|
prState: raw.prState ?? null,
|
|
846
847
|
prIsDraft: Boolean(raw.prIsDraft),
|
|
@@ -883,6 +884,7 @@ function createEmptyThread(partial) {
|
|
|
883
884
|
userSetTitle: partial.userSetTitle ?? false,
|
|
884
885
|
messages: partial.messages ?? [],
|
|
885
886
|
attachments: partial.attachments ?? [],
|
|
887
|
+
pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
|
|
886
888
|
createdAt: ts,
|
|
887
889
|
updatedAt: ts,
|
|
888
890
|
title: partial.title,
|
|
@@ -1869,7 +1871,7 @@ function looksLikeCodexMcpError(text7) {
|
|
|
1869
1871
|
if (/\brmcp\b/.test(t) && /fatal|quit|transport|error|died|kill|auth/.test(t)) {
|
|
1870
1872
|
return true;
|
|
1871
1873
|
}
|
|
1872
|
-
return /
|
|
1874
|
+
return /invalid transport in mcp_servers/.test(t);
|
|
1873
1875
|
}
|
|
1874
1876
|
function shouldFeedErrorBackToAgent(opts) {
|
|
1875
1877
|
const detail = opts.detail.trim();
|
|
@@ -4799,6 +4801,7 @@ function disconnectAbleTimeConnection() {
|
|
|
4799
4801
|
delete integrations.abletimeRefreshToken;
|
|
4800
4802
|
delete integrations.abletimeTokenExpiresAt;
|
|
4801
4803
|
delete integrations.abletimeViewerName;
|
|
4804
|
+
delete integrations.abletimeHost;
|
|
4802
4805
|
return saveAppSettings({ ...current, integrations });
|
|
4803
4806
|
}
|
|
4804
4807
|
function getIssueSource(settings = loadAppSettings()) {
|
|
@@ -9507,6 +9510,28 @@ function clipThinkingForStore(text7, max = THINKING_PART_MAX_CHARS) {
|
|
|
9507
9510
|
const marker = "\u2026(earlier thinking trimmed)\n";
|
|
9508
9511
|
return marker + text7.slice(text7.length - Math.max(1, max - marker.length));
|
|
9509
9512
|
}
|
|
9513
|
+
function clipEventTail(text7, max) {
|
|
9514
|
+
if (text7.length <= max) return text7;
|
|
9515
|
+
const marker = "\u2026(truncated)\n";
|
|
9516
|
+
return marker + text7.slice(text7.length - Math.max(1, max - marker.length));
|
|
9517
|
+
}
|
|
9518
|
+
function clipAgentEventForPaint(event) {
|
|
9519
|
+
if (event.type === "tool_result" && event.content) {
|
|
9520
|
+
const content = clipToolResultForStore(event.content);
|
|
9521
|
+
if (content === event.content) return event;
|
|
9522
|
+
return { ...event, content };
|
|
9523
|
+
}
|
|
9524
|
+
if (event.type === "thinking" && event.data.length > THINKING_PART_MAX_CHARS) {
|
|
9525
|
+
return { ...event, data: clipThinkingForStore(event.data) };
|
|
9526
|
+
}
|
|
9527
|
+
if (event.type === "stdout" && event.data.length > STDOUT_EVENT_MAX_CHARS) {
|
|
9528
|
+
return { ...event, data: clipEventTail(event.data, STDOUT_EVENT_MAX_CHARS) };
|
|
9529
|
+
}
|
|
9530
|
+
if (event.type === "stderr" && event.data.length > STDERR_EVENT_MAX_CHARS) {
|
|
9531
|
+
return { ...event, data: clipEventTail(event.data, STDERR_EVENT_MAX_CHARS) };
|
|
9532
|
+
}
|
|
9533
|
+
return event;
|
|
9534
|
+
}
|
|
9510
9535
|
function withPartTimes(next, prev) {
|
|
9511
9536
|
const now = Date.now();
|
|
9512
9537
|
const startedAt = prev && typeof prev.startedAt === "number" ? prev.startedAt : now;
|
|
@@ -9722,13 +9747,15 @@ function normalizeParseResult(parsed) {
|
|
|
9722
9747
|
if (!parsed) return [];
|
|
9723
9748
|
return Array.isArray(parsed) ? parsed : [parsed];
|
|
9724
9749
|
}
|
|
9725
|
-
var CHAT_DETAIL_MAX, THINKING_PART_MAX_CHARS;
|
|
9750
|
+
var CHAT_DETAIL_MAX, THINKING_PART_MAX_CHARS, STDOUT_EVENT_MAX_CHARS, STDERR_EVENT_MAX_CHARS;
|
|
9726
9751
|
var init_message_parts = __esm({
|
|
9727
9752
|
"src/agents/message-parts.ts"() {
|
|
9728
9753
|
"use strict";
|
|
9729
9754
|
init_error_detail();
|
|
9730
9755
|
CHAT_DETAIL_MAX = 72;
|
|
9731
9756
|
THINKING_PART_MAX_CHARS = 64e3;
|
|
9757
|
+
STDOUT_EVENT_MAX_CHARS = 16e3;
|
|
9758
|
+
STDERR_EVENT_MAX_CHARS = 4e3;
|
|
9732
9759
|
}
|
|
9733
9760
|
});
|
|
9734
9761
|
|
|
@@ -12788,6 +12815,24 @@ var init_agent_git_actions = __esm({
|
|
|
12788
12815
|
function normalizePrState(state) {
|
|
12789
12816
|
return (state ?? "").trim().toUpperCase();
|
|
12790
12817
|
}
|
|
12818
|
+
function samePrIdentity(a, b) {
|
|
12819
|
+
const left = (a ?? "").trim().replace(/\/+$/, "");
|
|
12820
|
+
const right = (b ?? "").trim().replace(/\/+$/, "");
|
|
12821
|
+
if (!left || !right) return false;
|
|
12822
|
+
if (left === right) return true;
|
|
12823
|
+
const ln = left.match(/\/pull\/(\d+)/i)?.[1];
|
|
12824
|
+
const rn = right.match(/\/pull\/(\d+)/i)?.[1];
|
|
12825
|
+
return Boolean(ln && rn && ln === rn);
|
|
12826
|
+
}
|
|
12827
|
+
function shouldPersistFetchedPrMeta(opts) {
|
|
12828
|
+
const meta = opts.metaUrl?.trim() || "";
|
|
12829
|
+
if (!meta) return false;
|
|
12830
|
+
const head = opts.headPrUrl?.trim() || "";
|
|
12831
|
+
if (head) return samePrIdentity(meta, head);
|
|
12832
|
+
const live = opts.livePrUrl?.trim() || "";
|
|
12833
|
+
if (live) return samePrIdentity(meta, live);
|
|
12834
|
+
return true;
|
|
12835
|
+
}
|
|
12791
12836
|
function sameLoginList(a, b) {
|
|
12792
12837
|
const left = [...a ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
|
|
12793
12838
|
const right = [...b ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
|
|
@@ -15512,6 +15557,7 @@ __export(abletime_oauth_exports, {
|
|
|
15512
15557
|
hasBakedAbleTimeOAuth: () => hasBakedAbleTimeOAuth,
|
|
15513
15558
|
isAbleTimeOAuthCancelled: () => isAbleTimeOAuthCancelled,
|
|
15514
15559
|
parseAbleTimeOAuthCallbackUrl: () => parseAbleTimeOAuthCallbackUrl,
|
|
15560
|
+
resolveAbleTimeOAuthHost: () => resolveAbleTimeOAuthHost,
|
|
15515
15561
|
startAbleTimeOAuth: () => startAbleTimeOAuth
|
|
15516
15562
|
});
|
|
15517
15563
|
function ableTimeOAuthRedirectUri() {
|
|
@@ -15563,6 +15609,12 @@ function ableTimeOAuthClientId() {
|
|
|
15563
15609
|
function ableTimeOAuthResource(host) {
|
|
15564
15610
|
return `${normalizeAbleTimeHost(host)}/api/public/v2/mcp`;
|
|
15565
15611
|
}
|
|
15612
|
+
function resolveAbleTimeOAuthHost(requested, saved) {
|
|
15613
|
+
const fromRequest = requested?.trim();
|
|
15614
|
+
if (fromRequest) return fromRequest;
|
|
15615
|
+
const fromSaved = saved?.trim();
|
|
15616
|
+
return fromSaved || void 0;
|
|
15617
|
+
}
|
|
15566
15618
|
function createAbleTimePkce() {
|
|
15567
15619
|
const verifier = (0, import_node_crypto9.randomBytes)(32).toString("base64url");
|
|
15568
15620
|
const challenge = (0, import_node_crypto9.createHash)("sha256").update(verifier).digest("base64url");
|
|
@@ -15666,7 +15718,10 @@ async function startAbleTimeOAuth(opts) {
|
|
|
15666
15718
|
`AbleTime browser sign-in needs a Client ID Metadata Document URL. Host ${BAKED_ABLETIME_OAUTH_CLIENT_ID} (see site/oauth/abletime-client.json), or set SIDEBOARD_ABLETIME_OAUTH_CLIENT_ID.`
|
|
15667
15719
|
);
|
|
15668
15720
|
}
|
|
15669
|
-
const host =
|
|
15721
|
+
const host = resolveAbleTimeOAuthHost(
|
|
15722
|
+
opts?.host,
|
|
15723
|
+
loadAppSettings().integrations.abletimeHost
|
|
15724
|
+
);
|
|
15670
15725
|
const state = (0, import_node_crypto9.randomBytes)(16).toString("hex");
|
|
15671
15726
|
const pkce = createAbleTimePkce();
|
|
15672
15727
|
const authorizeUrl = ableTimeOAuthAuthorizeUrl(clientId, state, pkce.challenge, host);
|
|
@@ -15942,6 +15997,7 @@ function restTaskToRaw(raw, users) {
|
|
|
15942
15997
|
description: textFromAbleTimeDoc(rec.description) || asString(rec.descriptionSanitized),
|
|
15943
15998
|
projectId: asString(rec.projectId),
|
|
15944
15999
|
categoryId: asString(rec.projectCategoryId) || asString(rec.categoryId),
|
|
16000
|
+
parentId: asString(rec.parentTaskId) || asString(rec.parentId),
|
|
15945
16001
|
tags: rec.tags,
|
|
15946
16002
|
comments,
|
|
15947
16003
|
createdAt: asString(rec.dateCreated) || asString(rec.createdAt),
|
|
@@ -16032,6 +16088,19 @@ function firstStringArg(args, keys) {
|
|
|
16032
16088
|
}
|
|
16033
16089
|
return "";
|
|
16034
16090
|
}
|
|
16091
|
+
function isNoneToken(value) {
|
|
16092
|
+
return value.trim().toLowerCase() === "none";
|
|
16093
|
+
}
|
|
16094
|
+
function findRestProject(projects, projectId) {
|
|
16095
|
+
const wanted = projectId.trim().toLowerCase();
|
|
16096
|
+
return projects.find(
|
|
16097
|
+
(item) => asString(item.id).toLowerCase() === wanted || asString(item.name).toLowerCase() === wanted
|
|
16098
|
+
) ?? null;
|
|
16099
|
+
}
|
|
16100
|
+
async function resolveRestParentTaskId(parent, opts) {
|
|
16101
|
+
if (isNoneToken(parent)) return null;
|
|
16102
|
+
return resolveTaskId(parent, opts);
|
|
16103
|
+
}
|
|
16035
16104
|
async function callAbleTimeRestTool(name, args = {}, opts) {
|
|
16036
16105
|
const token = normalizeAbleTimeCredential(opts?.token ?? getAbleTimeAccessToken() ?? "");
|
|
16037
16106
|
if (!token) {
|
|
@@ -16077,9 +16146,7 @@ async function callAbleTimeRestTool(name, args = {}, opts) {
|
|
|
16077
16146
|
const projectId = firstStringArg(args, ["project_id", "projectId", "project"]);
|
|
16078
16147
|
if (!projectId) throw new Error("AbleTime project is required");
|
|
16079
16148
|
const projects = await listProjectsRaw(requestOpts);
|
|
16080
|
-
const project = projects
|
|
16081
|
-
(item) => String(item.id).toLowerCase() === projectId.toLowerCase() || String(item.name).toLowerCase() === projectId.toLowerCase()
|
|
16082
|
-
) ?? projects[0];
|
|
16149
|
+
const project = findRestProject(projects, projectId) ?? projects[0];
|
|
16083
16150
|
if (!project) throw new Error("AbleTime has no projects to create a task in");
|
|
16084
16151
|
const categories = asList(project.categories);
|
|
16085
16152
|
const wantedCategory = firstStringArg(args, ["category_id", "categoryId", "category"]);
|
|
@@ -16087,13 +16154,16 @@ async function callAbleTimeRestTool(name, args = {}, opts) {
|
|
|
16087
16154
|
if (!item || !wantedCategory) return false;
|
|
16088
16155
|
return asString(item.id).toLowerCase() === wantedCategory.toLowerCase() || asString(item.name).toLowerCase() === wantedCategory.toLowerCase();
|
|
16089
16156
|
}) ?? asRecord4(categories[0]);
|
|
16157
|
+
const parentArg = firstStringArg(args, ["parent", "parent_id", "parentId", "related_task_id"]);
|
|
16158
|
+
const parentTaskId = parentArg ? await resolveRestParentTaskId(parentArg, requestOpts) : void 0;
|
|
16090
16159
|
const created = await abletimeRestRequest("/tasks", {
|
|
16091
16160
|
...requestOpts,
|
|
16092
16161
|
method: "POST",
|
|
16093
16162
|
body: {
|
|
16094
|
-
projectId: project.id,
|
|
16163
|
+
projectId: asString(project.id),
|
|
16095
16164
|
projectCategoryId: category ? asString(category.id) : void 0,
|
|
16096
|
-
title
|
|
16165
|
+
title,
|
|
16166
|
+
...parentTaskId ? { parentTaskId } : {}
|
|
16097
16167
|
}
|
|
16098
16168
|
});
|
|
16099
16169
|
const state = firstStringArg(args, ["state"]);
|
|
@@ -16126,6 +16196,21 @@ async function callAbleTimeRestTool(name, args = {}, opts) {
|
|
|
16126
16196
|
if (args.tags !== void 0 || args.labels !== void 0) {
|
|
16127
16197
|
patch.tags = args.tags ?? args.labels ?? args.tag_names;
|
|
16128
16198
|
}
|
|
16199
|
+
const projectArg = firstStringArg(args, ["project", "project_id", "projectId"]);
|
|
16200
|
+
if (projectArg) {
|
|
16201
|
+
if (isNoneToken(projectArg)) {
|
|
16202
|
+
throw new Error("AbleTime tasks stay in a project \u2014 pass a project name or id");
|
|
16203
|
+
}
|
|
16204
|
+
const projects = await listProjectsRaw(requestOpts);
|
|
16205
|
+
const project = findRestProject(projects, projectArg);
|
|
16206
|
+
const nextProjectId = project ? asString(project.id) : "";
|
|
16207
|
+
if (!nextProjectId) throw new Error(`AbleTime project not found: ${projectArg}`);
|
|
16208
|
+
patch.projectId = nextProjectId;
|
|
16209
|
+
}
|
|
16210
|
+
const parentArg = firstStringArg(args, ["parent", "parent_id", "parentId", "related_task_id"]);
|
|
16211
|
+
if (parentArg) {
|
|
16212
|
+
patch.parentTaskId = await resolveRestParentTaskId(parentArg, requestOpts);
|
|
16213
|
+
}
|
|
16129
16214
|
if (Object.keys(patch).length > 0) {
|
|
16130
16215
|
await abletimeRestRequest(`/tasks/${encodeURIComponent(id)}`, {
|
|
16131
16216
|
...requestOpts,
|
|
@@ -19415,6 +19500,33 @@ var init_expand = __esm({
|
|
|
19415
19500
|
}
|
|
19416
19501
|
});
|
|
19417
19502
|
|
|
19503
|
+
// src/composer/consume-attachments.ts
|
|
19504
|
+
function consumeComposerAttachments(thread) {
|
|
19505
|
+
if (thread.attachments.length === 0) {
|
|
19506
|
+
return {
|
|
19507
|
+
attachments: [],
|
|
19508
|
+
pendingTurnAttachments: thread.pendingTurnAttachments ?? []
|
|
19509
|
+
};
|
|
19510
|
+
}
|
|
19511
|
+
return {
|
|
19512
|
+
attachments: [],
|
|
19513
|
+
pendingTurnAttachments: [
|
|
19514
|
+
...thread.pendingTurnAttachments ?? [],
|
|
19515
|
+
...thread.attachments
|
|
19516
|
+
]
|
|
19517
|
+
};
|
|
19518
|
+
}
|
|
19519
|
+
function takePendingTurnAttachments(thread) {
|
|
19520
|
+
const pending = thread.pendingTurnAttachments ?? [];
|
|
19521
|
+
if (pending.length === 0 && thread.attachments.length === 0) return [];
|
|
19522
|
+
return [...pending, ...thread.attachments];
|
|
19523
|
+
}
|
|
19524
|
+
var init_consume_attachments = __esm({
|
|
19525
|
+
"src/composer/consume-attachments.ts"() {
|
|
19526
|
+
"use strict";
|
|
19527
|
+
}
|
|
19528
|
+
});
|
|
19529
|
+
|
|
19418
19530
|
// src/skills/detached-job-path.ts
|
|
19419
19531
|
function detachedJobScriptIn(dir) {
|
|
19420
19532
|
for (const name of DETACHED_JOB_FILENAMES) {
|
|
@@ -20760,6 +20872,7 @@ var init_orchestrator = __esm({
|
|
|
20760
20872
|
init_diff();
|
|
20761
20873
|
init_discover();
|
|
20762
20874
|
init_expand();
|
|
20875
|
+
init_consume_attachments();
|
|
20763
20876
|
init_stage_files();
|
|
20764
20877
|
init_context_compact();
|
|
20765
20878
|
init_instructions();
|
|
@@ -21264,6 +21377,11 @@ var init_orchestrator = __esm({
|
|
|
21264
21377
|
const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id) || current.status === "running";
|
|
21265
21378
|
shouldSteer = followUp === "steer" && (inFlight || current.queue.length > 0);
|
|
21266
21379
|
const patch = { queue };
|
|
21380
|
+
if (current.attachments.length > 0) {
|
|
21381
|
+
const consumed = consumeComposerAttachments(current);
|
|
21382
|
+
patch.attachments = consumed.attachments;
|
|
21383
|
+
patch.pendingTurnAttachments = consumed.pendingTurnAttachments;
|
|
21384
|
+
}
|
|
21267
21385
|
if (!inFlight) patch.status = "queued";
|
|
21268
21386
|
const pid = current.agentPid;
|
|
21269
21387
|
if (typeof pid === "number" && pid > 0 && !isPidAlive(pid)) {
|
|
@@ -21444,7 +21562,8 @@ var init_orchestrator = __esm({
|
|
|
21444
21562
|
thread = this.requireThread(threadId);
|
|
21445
21563
|
}
|
|
21446
21564
|
const autoContinue = isJobContinuePrompt(prompt) || prompt.trim().startsWith("The previous agent process ended before it finished.");
|
|
21447
|
-
const
|
|
21565
|
+
const parked = takePendingTurnAttachments(thread);
|
|
21566
|
+
const sentAttachments = !autoContinue && parked.length > 0 ? parked : void 0;
|
|
21448
21567
|
appendMessage(threadId, {
|
|
21449
21568
|
role: "user",
|
|
21450
21569
|
text: prompt,
|
|
@@ -21511,8 +21630,8 @@ var init_orchestrator = __esm({
|
|
|
21511
21630
|
slackReplyContext,
|
|
21512
21631
|
expandedPrompt
|
|
21513
21632
|
].filter(Boolean).join("\n\n");
|
|
21514
|
-
if (!autoContinue &&
|
|
21515
|
-
updateThread(threadId, { attachments: [] });
|
|
21633
|
+
if (!autoContinue && sentAttachments) {
|
|
21634
|
+
updateThread(threadId, { attachments: [], pendingTurnAttachments: [] });
|
|
21516
21635
|
}
|
|
21517
21636
|
const adapter = getAdapter(thread.agent);
|
|
21518
21637
|
const resolved = await adapter.resolveSessionId(thread.worktreePath, thread.sessionId);
|
|
@@ -21618,8 +21737,9 @@ var init_orchestrator = __esm({
|
|
|
21618
21737
|
isolateCodexPlugins: fresh.isolateCodexPlugins === true
|
|
21619
21738
|
},
|
|
21620
21739
|
(event) => {
|
|
21621
|
-
|
|
21622
|
-
|
|
21740
|
+
const paint = clipAgentEventForPaint(event);
|
|
21741
|
+
this.emit({ type: "turn_output", threadId, event: paint });
|
|
21742
|
+
noteTurnLiveEvent(threadId, paint);
|
|
21623
21743
|
if (event.type === "session_id") {
|
|
21624
21744
|
updateThread(threadId, { sessionId: event.data });
|
|
21625
21745
|
}
|
|
@@ -21692,7 +21812,9 @@ var init_orchestrator = __esm({
|
|
|
21692
21812
|
let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
|
|
21693
21813
|
const liveThread = this.requireThread(threadId);
|
|
21694
21814
|
const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
|
|
21695
|
-
|
|
21815
|
+
// Coordinators already pass toCodexUnattendedAppsArgs — a second
|
|
21816
|
+
// isolate exec keeps sessionId and burns the crash/OOM retry.
|
|
21817
|
+
alreadyIsolated: liveThread.isolateCodexPlugins === true || isOrchestratorThread(liveThread)
|
|
21696
21818
|
});
|
|
21697
21819
|
if (isolateCodexPluginRetry) {
|
|
21698
21820
|
updateThread(threadId, { isolateCodexPlugins: true });
|
|
@@ -21742,7 +21864,8 @@ var init_orchestrator = __esm({
|
|
|
21742
21864
|
isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
|
|
21743
21865
|
},
|
|
21744
21866
|
(event) => {
|
|
21745
|
-
|
|
21867
|
+
const paint = clipAgentEventForPaint(event);
|
|
21868
|
+
this.emit({ type: "turn_output", threadId, event: paint });
|
|
21746
21869
|
if (event.type === "session_id") {
|
|
21747
21870
|
updateThread(threadId, { sessionId: event.data });
|
|
21748
21871
|
}
|
|
@@ -22495,7 +22618,7 @@ var init_orchestrator = __esm({
|
|
|
22495
22618
|
} catch {
|
|
22496
22619
|
headUrl = null;
|
|
22497
22620
|
}
|
|
22498
|
-
return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd };
|
|
22621
|
+
return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd, headUrl };
|
|
22499
22622
|
}
|
|
22500
22623
|
async getPrChecks(threadRef) {
|
|
22501
22624
|
const { selectors, cwd } = await this.withPrSelector(threadRef);
|
|
@@ -22506,13 +22629,20 @@ var init_orchestrator = __esm({
|
|
|
22506
22629
|
return null;
|
|
22507
22630
|
}
|
|
22508
22631
|
async getPrMeta(threadRef) {
|
|
22509
|
-
const { thread, selectors, cwd } = await this.withPrSelector(threadRef);
|
|
22632
|
+
const { thread, selectors, cwd, headUrl } = await this.withPrSelector(threadRef);
|
|
22510
22633
|
for (const selector of selectors) {
|
|
22511
22634
|
const meta = await getPrMeta(cwd, selector);
|
|
22512
|
-
if (meta)
|
|
22513
|
-
|
|
22514
|
-
|
|
22635
|
+
if (!meta) continue;
|
|
22636
|
+
const live = this.requireThread(thread.id);
|
|
22637
|
+
if (!shouldPersistFetchedPrMeta({
|
|
22638
|
+
metaUrl: meta.url,
|
|
22639
|
+
livePrUrl: live.prUrl,
|
|
22640
|
+
headPrUrl: headUrl
|
|
22641
|
+
})) {
|
|
22642
|
+
continue;
|
|
22515
22643
|
}
|
|
22644
|
+
await this.persistPrMetaAndMaybeArchive(live, meta);
|
|
22645
|
+
return meta;
|
|
22516
22646
|
}
|
|
22517
22647
|
return null;
|
|
22518
22648
|
}
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchAbleTimeTasks,
|
|
12
12
|
toAbleTimeIssueInfo,
|
|
13
13
|
updateAbleTimeTask
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-6YZLSZLK.js";
|
|
15
15
|
import {
|
|
16
16
|
AGENT_GIT_ACTIONS,
|
|
17
17
|
BOARD_COLUMN_DEFS,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
syncBoardPins,
|
|
51
51
|
updateSchedule,
|
|
52
52
|
waitForDetachedJob
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-C6ZNQV5W.js";
|
|
54
54
|
import "../chunk-JFOPOMK7.js";
|
|
55
55
|
import "../chunk-YWI3IBP2.js";
|
|
56
56
|
import {
|
|
@@ -61,16 +61,16 @@ import {
|
|
|
61
61
|
materializeSystemCaBundle,
|
|
62
62
|
sideboardMcpProfile,
|
|
63
63
|
trustSystemCertificates
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-7PEIIN7P.js";
|
|
65
65
|
import {
|
|
66
66
|
GLOBAL_WORKSPACE_ID,
|
|
67
67
|
isCloudCoordinatorThread,
|
|
68
68
|
listWorkspaces
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-DNTPX6HV.js";
|
|
70
70
|
import "../chunk-3OHR73VK.js";
|
|
71
71
|
import "../chunk-Y4MIXGPA.js";
|
|
72
|
-
import "../chunk-
|
|
73
|
-
import "../chunk-
|
|
72
|
+
import "../chunk-TEDEVD4O.js";
|
|
73
|
+
import "../chunk-WXWJ5MJ4.js";
|
|
74
74
|
import {
|
|
75
75
|
httpFetch
|
|
76
76
|
} from "../chunk-VKQGAWHY.js";
|
|
@@ -84,9 +84,9 @@ import {
|
|
|
84
84
|
resolveListPrsOptions,
|
|
85
85
|
resolveRepoRoot,
|
|
86
86
|
warmGithubAgentAuth
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-NJ2CCLV6.js";
|
|
88
88
|
import "../chunk-D6JWYJ4P.js";
|
|
89
|
-
import "../chunk-
|
|
89
|
+
import "../chunk-ZHCB4CKR.js";
|
|
90
90
|
import "../chunk-SYFVUF2C.js";
|
|
91
91
|
import {
|
|
92
92
|
gh,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
resolveViewerProfileForRepo,
|
|
106
106
|
saveLinearOAuth,
|
|
107
107
|
writeViewerContext
|
|
108
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-4EGK47WV.js";
|
|
109
109
|
import "../chunk-NSTQ6QKD.js";
|
|
110
110
|
import "../chunk-KGZBYWZ3.js";
|
|
111
111
|
import {
|
|
@@ -3880,7 +3880,7 @@ async function startMcpServer() {
|
|
|
3880
3880
|
);
|
|
3881
3881
|
}
|
|
3882
3882
|
try {
|
|
3883
|
-
const { maxConcurrentAgents } = await import("../app-settings-
|
|
3883
|
+
const { maxConcurrentAgents } = await import("../app-settings-R2KNCT37.js");
|
|
3884
3884
|
orch.setMaxConcurrent(maxConcurrentAgents());
|
|
3885
3885
|
} catch {
|
|
3886
3886
|
}
|
|
@@ -4195,7 +4195,7 @@ async function startMcpServer() {
|
|
|
4195
4195
|
registerConnectedIssueVendorTools(server);
|
|
4196
4196
|
registerScheduleTools(server);
|
|
4197
4197
|
const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-OK4JJ5PP.js");
|
|
4198
|
-
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-
|
|
4198
|
+
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-R2KNCT37.js");
|
|
4199
4199
|
const accountDefaults = resolveThreadDefaults();
|
|
4200
4200
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
4201
4201
|
server.tool(
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-C6ZNQV5W.js";
|
|
13
13
|
import "./chunk-JFOPOMK7.js";
|
|
14
14
|
import "./chunk-YWI3IBP2.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7PEIIN7P.js";
|
|
16
|
+
import "./chunk-DNTPX6HV.js";
|
|
17
17
|
import "./chunk-3OHR73VK.js";
|
|
18
18
|
import "./chunk-Y4MIXGPA.js";
|
|
19
19
|
import "./chunk-VKQGAWHY.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-NJ2CCLV6.js";
|
|
21
21
|
import "./chunk-D6JWYJ4P.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ZHCB4CKR.js";
|
|
23
23
|
import "./chunk-SYFVUF2C.js";
|
|
24
24
|
import "./chunk-FNQNJOHY.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-4EGK47WV.js";
|
|
26
26
|
import "./chunk-NSTQ6QKD.js";
|
|
27
27
|
import "./chunk-KGZBYWZ3.js";
|
|
28
28
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -7,24 +7,24 @@ import {
|
|
|
7
7
|
resolveSendFollowUp,
|
|
8
8
|
startOrchestration,
|
|
9
9
|
waitForPidExit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C5MNMITQ.js";
|
|
11
11
|
import "./chunk-DJU54RYW.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-A6SOSLUV.js";
|
|
13
|
+
import "./chunk-HA4EZKFY.js";
|
|
14
|
+
import "./chunk-OP6CFVTB.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-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-JZHRZ3DR.js";
|
|
22
|
+
import "./chunk-Y4CF7LHH.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-7DKX5JLT.js";
|
|
28
28
|
import "./chunk-77WWLBCI.js";
|
|
29
29
|
import "./chunk-WFUDY6PC.js";
|
|
30
30
|
import "./chunk-UFHNSFAS.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
listWorkspaces,
|
|
7
7
|
removeWorkspace,
|
|
8
8
|
syncWorkspacesFromThreads
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-DNTPX6HV.js";
|
|
10
|
+
import "./chunk-NJ2CCLV6.js";
|
|
11
11
|
import "./chunk-D6JWYJ4P.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZHCB4CKR.js";
|
|
13
13
|
import "./chunk-SYFVUF2C.js";
|
|
14
14
|
import "./chunk-FNQNJOHY.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-4EGK47WV.js";
|
|
16
16
|
import "./chunk-NSTQ6QKD.js";
|
|
17
17
|
import "./chunk-KGZBYWZ3.js";
|
|
18
18
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
listWorkspaces,
|
|
5
5
|
removeWorkspace,
|
|
6
6
|
syncWorkspacesFromThreads
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-HA4EZKFY.js";
|
|
8
|
+
import "./chunk-OP6CFVTB.js";
|
|
9
9
|
import "./chunk-6K64FJDD.js";
|
|
10
10
|
import "./chunk-QQKDGPUI.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-Y4CF7LHH.js";
|
|
12
12
|
import "./chunk-4TR3HZFT.js";
|
|
13
13
|
import "./chunk-WDRMZKVB.js";
|
|
14
14
|
import "./chunk-JT7R45JB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7DKX5JLT.js";
|
|
16
16
|
import "./chunk-77WWLBCI.js";
|
|
17
17
|
import "./chunk-WFUDY6PC.js";
|
|
18
18
|
import "./chunk-UFHNSFAS.js";
|
|
@@ -60,12 +60,12 @@ import {
|
|
|
60
60
|
worktreeDisplayLabelForGroup,
|
|
61
61
|
worktreeNameFromPath,
|
|
62
62
|
worktreeSlugForTicket
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-NJ2CCLV6.js";
|
|
64
64
|
import "./chunk-D6JWYJ4P.js";
|
|
65
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-ZHCB4CKR.js";
|
|
66
66
|
import "./chunk-SYFVUF2C.js";
|
|
67
67
|
import "./chunk-FNQNJOHY.js";
|
|
68
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-4EGK47WV.js";
|
|
69
69
|
import "./chunk-NSTQ6QKD.js";
|
|
70
70
|
import "./chunk-KGZBYWZ3.js";
|
|
71
71
|
import "./chunk-EQNRWDLN.js";
|
|
@@ -58,14 +58,14 @@ import {
|
|
|
58
58
|
worktreeDisplayLabelForGroup,
|
|
59
59
|
worktreeNameFromPath,
|
|
60
60
|
worktreeSlugForTicket
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-OP6CFVTB.js";
|
|
62
62
|
import "./chunk-6K64FJDD.js";
|
|
63
63
|
import "./chunk-QQKDGPUI.js";
|
|
64
|
-
import "./chunk-
|
|
64
|
+
import "./chunk-Y4CF7LHH.js";
|
|
65
65
|
import "./chunk-4TR3HZFT.js";
|
|
66
66
|
import "./chunk-WDRMZKVB.js";
|
|
67
67
|
import "./chunk-JT7R45JB.js";
|
|
68
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-7DKX5JLT.js";
|
|
69
69
|
import "./chunk-77WWLBCI.js";
|
|
70
70
|
import "./chunk-WFUDY6PC.js";
|
|
71
71
|
import "./chunk-UFHNSFAS.js";
|