@sideboard-ai/core 0.1.324 → 0.1.326
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-CU2UPMJF.js → abletime-RDHYSZL2.js} +5 -4
- package/dist/{abletime-5ZY3ZUUO.js → abletime-RYYFGKMU.js} +6 -5
- package/dist/{abletime-oauth-7EOSBEFM.js → abletime-oauth-OYGS2DAU.js} +3 -3
- package/dist/{abletime-oauth-4TTCR3CT.js → abletime-oauth-QR2QDVMK.js} +3 -3
- package/dist/{abletime-rest-KOKE7V4B.js → abletime-rest-BKYKNPTC.js} +3 -3
- package/dist/{abletime-rest-3TG4G7LW.js → abletime-rest-QDPTWNS4.js} +3 -3
- package/dist/agents/claude-runner.cjs +59 -22
- package/dist/agents/claude-runner.js +39 -16
- package/dist/agents/cursor-runner.cjs +97 -32
- package/dist/agents/cursor-runner.js +74 -24
- package/dist/{agents-YK65UDLT.js → agents-HANWZNI6.js} +9 -8
- package/dist/{agents-LUSTCMDN.js → agents-QO7GKBYT.js} +12 -11
- package/dist/{app-settings-XIF4EC4K.js → app-settings-RXBH7KY4.js} +1 -1
- package/dist/{app-settings-I5HM5RMP.js → app-settings-TUVLZNDE.js} +1 -1
- package/dist/{chunk-7MQSYPAY.js → chunk-2EOLWHXH.js} +206 -188
- package/dist/{chunk-QOS4465Y.js → chunk-3Q4XNYHY.js} +1 -1
- package/dist/{chunk-RR4WCGNB.js → chunk-46FECFZU.js} +18 -15
- package/dist/{chunk-5GDJSFCT.js → chunk-4H5MWZ6J.js} +2 -2
- package/dist/{chunk-EQ52JR3Q.js → chunk-5MXLDDYF.js} +1 -1
- package/dist/{chunk-NCHOTN3C.js → chunk-5YCKATG6.js} +4 -3
- package/dist/{chunk-ROOZDDFA.js → chunk-75RPUXJS.js} +7 -8
- package/dist/{chunk-INBUV7HY.js → chunk-B244TJWC.js} +2 -2
- package/dist/{chunk-JH5SMVM5.js → chunk-BBNWKL4I.js} +268 -235
- package/dist/{chunk-ODH3XHMI.js → chunk-C7HUCBX7.js} +5 -5
- package/dist/{chunk-OIHRC2ZJ.js → chunk-D744HOI5.js} +25 -3
- package/dist/chunk-DBKHL7NC.js +214 -0
- package/dist/chunk-F6GE7V3Q.js +216 -0
- package/dist/{chunk-JE3JLHMO.js → chunk-FWVUGLBG.js} +3 -3
- package/dist/{chunk-DF5BM5OY.js → chunk-GP3RLZ6A.js} +207 -186
- package/dist/{chunk-FR3SAYUL.js → chunk-JM2TGOHP.js} +5 -5
- package/dist/{chunk-Y3WREIPQ.js → chunk-K7M7MIWL.js} +12 -210
- package/dist/{chunk-FUFNMUNR.js → chunk-KECHK3ZT.js} +7 -8
- package/dist/{chunk-EKU7FQVG.js → chunk-KXRF6RNL.js} +2 -2
- package/dist/chunk-LRHUBGEM.js +1259 -0
- package/dist/{chunk-MZIZTSR2.js → chunk-MAW7DIG7.js} +2 -2
- package/dist/{chunk-ZHGMRBSC.js → chunk-NURZOXGN.js} +4 -4
- package/dist/{chunk-QIC2JXHW.js → chunk-OOXRMTU6.js} +1 -1
- package/dist/{chunk-5XNT6BCG.js → chunk-OPXEJJBM.js} +1 -1
- package/dist/chunk-OYRN356W.js +80 -0
- package/dist/{chunk-7PVT73H6.js → chunk-PB6HW7SA.js} +12 -210
- package/dist/{chunk-B4CDSSRN.js → chunk-Q3FHTGIW.js} +2 -0
- package/dist/{chunk-7D5QIU3N.js → chunk-QG4CYRA3.js} +301 -268
- package/dist/{chunk-EJ66LEKH.js → chunk-QPSKQP6E.js} +24 -3
- package/dist/{chunk-Q3YJZPQI.js → chunk-RZVOX2MT.js} +3 -3
- package/dist/chunk-SO7G6O24.js +1445 -0
- package/dist/{chunk-YDUHLWI5.js → chunk-SUZOPJZC.js} +21 -7
- package/dist/chunk-TMCK5TLA.js +25 -0
- package/dist/chunk-W3ZLE4PO.js +77 -0
- package/dist/chunk-WUCAVIIP.js +28 -0
- package/dist/{chunk-BYUCNIXK.js → chunk-XLVLMQKN.js} +13 -9
- package/dist/{chunk-ZIRQZUZY.js → chunk-YGVGXQA7.js} +3 -3
- package/dist/{chunk-NXUN4U5P.js → chunk-YWQF7WAG.js} +2 -2
- package/dist/{chunk-IFWGG2M2.js → chunk-ZSHS46V5.js} +2 -0
- package/dist/{chunk-74OPNF7U.js → chunk-ZUAYA57W.js} +2 -2
- package/dist/{conductor-SPZOTC7W.js → conductor-4GVTHUUB.js} +7 -7
- package/dist/{conductor-JFABMXDA.js → conductor-TGWI6ETZ.js} +6 -6
- package/dist/{coordinator-prompt-K66RGNWK.js → coordinator-prompt-3E6SIDTM.js} +4 -4
- package/dist/{coordinator-prompt-Z6UFHFDH.js → coordinator-prompt-WEYJREV6.js} +4 -4
- package/dist/{cursor-recover-TEBFKAZ4.js → cursor-recover-7F46PAJ5.js} +1 -1
- package/dist/{cursor-recover-OWPQUHFH.js → cursor-recover-BDIAZIE3.js} +1 -1
- package/dist/{global-workspace-A6UO6PJV.js → global-workspace-FPDZKUPF.js} +4 -4
- package/dist/{global-workspace-RHEO55B4.js → global-workspace-UIEXAG2B.js} +4 -4
- package/dist/index.cjs +21094 -20840
- package/dist/index.d.cts +36 -17
- package/dist/index.d.ts +36 -17
- package/dist/index.js +343 -1678
- package/dist/linear-6S7MK5YK.js +69 -0
- package/dist/linear-Z2T4KUAQ.js +67 -0
- package/dist/linear-list-A37WLUBO.js +6 -0
- package/dist/linear-list-Q4M7AZO2.js +8 -0
- package/dist/mcp/run-stdio.cjs +15903 -15640
- package/dist/mcp/run-stdio.js +67 -1247
- package/dist/{optional-cli-RMMS5L6F.js → optional-cli-AANBL4U5.js} +3 -3
- package/dist/{optional-cli-Y3Z3GIPZ.js → optional-cli-CA4LL322.js} +4 -4
- package/dist/{orchestrator-7VTAUY24.js → orchestrator-7FVDBE7Y.js} +15 -13
- package/dist/{orchestrator-2O6OJQLX.js → orchestrator-RQXRZW7Z.js} +14 -12
- package/dist/{thread-store-3F7GR64A.js → thread-store-4ZN3DS2W.js} +1 -1
- package/dist/{thread-store-JRSL4HQY.js → thread-store-IC4BQXDW.js} +1 -1
- package/dist/{workspaces-NRKEXOYR.js → workspaces-LEW4UP56.js} +4 -4
- package/dist/{workspaces-42E6AGXD.js → workspaces-QONNLHNR.js} +4 -4
- package/dist/{worktree-ZDA2UJ7C.js → worktree-6GIONDQO.js} +3 -3
- package/dist/{worktree-4NGXCCUO.js → worktree-KFEJAQ2H.js} +3 -3
- package/package.json +1 -1
|
@@ -133,6 +133,8 @@ function agentRuntimeLooksLive(meta = readAgentRuntimeMetadata()) {
|
|
|
133
133
|
import { WebSocket } from "ws";
|
|
134
134
|
var AgentRpcClient = class {
|
|
135
135
|
ws = null;
|
|
136
|
+
/** In-flight connect. Concurrent call()s must share it or each opens a socket. */
|
|
137
|
+
connecting = null;
|
|
136
138
|
pending = /* @__PURE__ */ new Map();
|
|
137
139
|
nextId = 1;
|
|
138
140
|
url;
|
|
@@ -175,10 +177,10 @@ var AgentRpcClient = class {
|
|
|
175
177
|
url.searchParams.set(AGENT_RPC_TOKEN_QUERY, this.authToken);
|
|
176
178
|
return url.toString();
|
|
177
179
|
}
|
|
178
|
-
|
|
179
|
-
if (this.ws && this.ws.readyState === WebSocket.OPEN) return this.ws;
|
|
180
|
+
ensureSocket() {
|
|
181
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) return Promise.resolve(this.ws);
|
|
182
|
+
if (this.connecting) return this.connecting;
|
|
180
183
|
const ws = new WebSocket(this.socketUrl());
|
|
181
|
-
this.ws = ws;
|
|
182
184
|
ws.on("message", (data) => this.onFrame(data.toString()));
|
|
183
185
|
ws.on("error", (err) => this.drop(ws, err));
|
|
184
186
|
ws.on("close", () => this.drop(ws, new Error("Agent RPC socket closed")));
|
|
@@ -191,11 +193,16 @@ var AgentRpcClient = class {
|
|
|
191
193
|
)
|
|
192
194
|
);
|
|
193
195
|
});
|
|
194
|
-
|
|
196
|
+
let settled = false;
|
|
197
|
+
const pending = new Promise((resolve, reject) => {
|
|
195
198
|
const fail = (err) => {
|
|
199
|
+
if (settled) return;
|
|
200
|
+
settled = true;
|
|
201
|
+
if (this.connecting === pending) this.connecting = null;
|
|
196
202
|
const message = err.message.includes("401") ? "Unauthorized" : err.message;
|
|
197
203
|
reject(message === err.message ? err : new Error(message));
|
|
198
204
|
};
|
|
205
|
+
const failClose = () => fail(new Error("Agent RPC socket closed"));
|
|
199
206
|
ws.once("unexpected-response", (_req, res) => {
|
|
200
207
|
fail(
|
|
201
208
|
new Error(
|
|
@@ -204,15 +211,22 @@ var AgentRpcClient = class {
|
|
|
204
211
|
);
|
|
205
212
|
});
|
|
206
213
|
ws.once("error", fail);
|
|
214
|
+
ws.once("close", failClose);
|
|
207
215
|
ws.once("open", () => {
|
|
208
216
|
ws.off("error", fail);
|
|
209
|
-
|
|
217
|
+
ws.off("close", failClose);
|
|
218
|
+
settled = true;
|
|
219
|
+
this.ws = ws;
|
|
220
|
+
this.connecting = null;
|
|
221
|
+
resolve(ws);
|
|
210
222
|
});
|
|
211
223
|
});
|
|
212
|
-
|
|
224
|
+
this.connecting = pending;
|
|
225
|
+
return pending;
|
|
213
226
|
}
|
|
214
227
|
drop(ws, err) {
|
|
215
|
-
if (this.ws
|
|
228
|
+
if (this.ws !== ws) return;
|
|
229
|
+
this.ws = null;
|
|
216
230
|
if (this.pending.size === 0) return;
|
|
217
231
|
this.failAll(err);
|
|
218
232
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/agents/linear-list.ts
|
|
2
|
+
var LIST_TIMEOUT_MS = 15e3;
|
|
3
|
+
async function listAssignedLinearIssues(opts) {
|
|
4
|
+
try {
|
|
5
|
+
const { listLinearIssuesDirect } = await import("./linear-Z2T4KUAQ.js");
|
|
6
|
+
const listed = listLinearIssuesDirect({ limit: 50 }).catch(() => []);
|
|
7
|
+
let timer;
|
|
8
|
+
try {
|
|
9
|
+
return await Promise.race([
|
|
10
|
+
listed,
|
|
11
|
+
new Promise((resolve) => {
|
|
12
|
+
timer = setTimeout(() => resolve([]), opts?.timeoutMs ?? LIST_TIMEOUT_MS);
|
|
13
|
+
})
|
|
14
|
+
]);
|
|
15
|
+
} finally {
|
|
16
|
+
if (timer) clearTimeout(timer);
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
listAssignedLinearIssues
|
|
25
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/integrations/issue-since.ts
|
|
2
|
+
var ISSUE_SINCE_ERROR = "updatedSince must be an ISO datetime, YYYY-MM-DD, or relative time (yesterday, 2d, 3 hours ago)";
|
|
3
|
+
var DATE_ONLY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
4
|
+
var DATE_TIME_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
5
|
+
var RELATIVE_RE = /^(\d+)\s*(hours?|hrs?|h|days?|d|weeks?|wks?|w)(?:\s+ago)?$/i;
|
|
6
|
+
function startOfLocalDay(date) {
|
|
7
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
8
|
+
}
|
|
9
|
+
function addLocalDays(date, days) {
|
|
10
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
11
|
+
}
|
|
12
|
+
function parseIssueSince(input, now = /* @__PURE__ */ new Date()) {
|
|
13
|
+
const raw = input.trim();
|
|
14
|
+
if (!raw) throw new Error(ISSUE_SINCE_ERROR);
|
|
15
|
+
const dateOnly = raw.match(DATE_ONLY_RE);
|
|
16
|
+
if (dateOnly) {
|
|
17
|
+
const year = Number(dateOnly[1]);
|
|
18
|
+
const month = Number(dateOnly[2]);
|
|
19
|
+
const day = Number(dateOnly[3]);
|
|
20
|
+
const local = new Date(year, month - 1, day);
|
|
21
|
+
if (local.getFullYear() !== year || local.getMonth() !== month - 1 || local.getDate() !== day) {
|
|
22
|
+
throw new Error(ISSUE_SINCE_ERROR);
|
|
23
|
+
}
|
|
24
|
+
return startOfLocalDay(local).toISOString();
|
|
25
|
+
}
|
|
26
|
+
if (DATE_TIME_RE.test(raw)) {
|
|
27
|
+
const ms = Date.parse(raw);
|
|
28
|
+
if (!Number.isFinite(ms)) throw new Error(ISSUE_SINCE_ERROR);
|
|
29
|
+
return new Date(ms).toISOString();
|
|
30
|
+
}
|
|
31
|
+
const lower = raw.toLowerCase();
|
|
32
|
+
if (lower === "today") return startOfLocalDay(now).toISOString();
|
|
33
|
+
if (lower === "yesterday") return addLocalDays(startOfLocalDay(now), -1).toISOString();
|
|
34
|
+
if (lower === "last week" || lower === "lastweek") {
|
|
35
|
+
return addLocalDays(startOfLocalDay(now), -7).toISOString();
|
|
36
|
+
}
|
|
37
|
+
const relative = lower.match(RELATIVE_RE);
|
|
38
|
+
if (relative) {
|
|
39
|
+
const n = Number(relative[1]);
|
|
40
|
+
if (!Number.isInteger(n) || n < 1) throw new Error(ISSUE_SINCE_ERROR);
|
|
41
|
+
const unit = relative[2];
|
|
42
|
+
if (unit.startsWith("h")) return new Date(now.getTime() - n * 36e5).toISOString();
|
|
43
|
+
if (unit.startsWith("w")) return addLocalDays(startOfLocalDay(now), -7 * n).toISOString();
|
|
44
|
+
return addLocalDays(startOfLocalDay(now), -n).toISOString();
|
|
45
|
+
}
|
|
46
|
+
throw new Error(ISSUE_SINCE_ERROR);
|
|
47
|
+
}
|
|
48
|
+
function formatGitHubSearchUpdatedSince(iso) {
|
|
49
|
+
return iso.replace(/\.\d{3}Z$/, "Z");
|
|
50
|
+
}
|
|
51
|
+
function issueMatchesUpdatedSince(issue, sinceIso) {
|
|
52
|
+
const ts = issue.updatedAt || issue.createdAt;
|
|
53
|
+
if (!ts) return false;
|
|
54
|
+
const value = Date.parse(ts);
|
|
55
|
+
const since = Date.parse(sinceIso);
|
|
56
|
+
return Number.isFinite(value) && Number.isFinite(since) && value >= since;
|
|
57
|
+
}
|
|
58
|
+
var ISSUE_COMMENT_PREVIEW_CHARS = 240;
|
|
59
|
+
function previewIssueCommentBody(body) {
|
|
60
|
+
const flat = body.replace(/\s+/g, " ").trim();
|
|
61
|
+
if (flat.length <= ISSUE_COMMENT_PREVIEW_CHARS) return flat;
|
|
62
|
+
return `${flat.slice(0, ISSUE_COMMENT_PREVIEW_CHARS - 1).trimEnd()}\u2026`;
|
|
63
|
+
}
|
|
64
|
+
function issueActivityKind(issue, sinceIso) {
|
|
65
|
+
const created = issue.createdAt ? Date.parse(issue.createdAt) : Number.NaN;
|
|
66
|
+
const since = Date.parse(sinceIso);
|
|
67
|
+
if (Number.isFinite(created) && Number.isFinite(since) && created >= since) return "created";
|
|
68
|
+
return "updated";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
parseIssueSince,
|
|
73
|
+
formatGitHubSearchUpdatedSince,
|
|
74
|
+
issueMatchesUpdatedSince,
|
|
75
|
+
previewIssueCommentBody,
|
|
76
|
+
issueActivityKind
|
|
77
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/agents/linear-list.ts
|
|
5
|
+
var LIST_TIMEOUT_MS = 15e3;
|
|
6
|
+
async function listAssignedLinearIssues(opts) {
|
|
7
|
+
try {
|
|
8
|
+
const { listLinearIssuesDirect } = await import("./linear-6S7MK5YK.js");
|
|
9
|
+
const listed = listLinearIssuesDirect({ limit: 50 }).catch(() => []);
|
|
10
|
+
let timer;
|
|
11
|
+
try {
|
|
12
|
+
return await Promise.race([
|
|
13
|
+
listed,
|
|
14
|
+
new Promise((resolve) => {
|
|
15
|
+
timer = setTimeout(() => resolve([]), opts?.timeoutMs ?? LIST_TIMEOUT_MS);
|
|
16
|
+
})
|
|
17
|
+
]);
|
|
18
|
+
} finally {
|
|
19
|
+
if (timer) clearTimeout(timer);
|
|
20
|
+
}
|
|
21
|
+
} catch {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
listAssignedLinearIssues
|
|
28
|
+
};
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
compactSummaryPart,
|
|
6
6
|
isInternalAgentStatusText,
|
|
7
7
|
lastAssistantMessageText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5MXLDDYF.js";
|
|
9
9
|
import {
|
|
10
10
|
isCloudCoordinatorThread,
|
|
11
11
|
isGlobalThread,
|
|
12
12
|
isOrchestratorThread,
|
|
13
13
|
isSlackCoordinatorThread
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YGVGXQA7.js";
|
|
15
15
|
import {
|
|
16
16
|
mergeAgentGitAuthEnv,
|
|
17
17
|
resolveAgentGitAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-75RPUXJS.js";
|
|
19
19
|
import {
|
|
20
20
|
ATTACHMENTS_DIR,
|
|
21
21
|
DETACHED_JOBS_DIR,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
assertOrchestratorCapableAgent,
|
|
34
34
|
contextTokens
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-D744HOI5.js";
|
|
36
36
|
import {
|
|
37
37
|
stripNestedElectronEnv
|
|
38
38
|
} from "./chunk-WWUABK6B.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
updateThread,
|
|
48
48
|
worktreeNameFromPath,
|
|
49
49
|
writeThread
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-Q3FHTGIW.js";
|
|
51
51
|
import {
|
|
52
52
|
findConventionSetup,
|
|
53
53
|
loadRepoSettings,
|
|
@@ -528,11 +528,15 @@ function applyCompaction(messages, summaryText, thresholds = {}) {
|
|
|
528
528
|
return [summary, ...recent];
|
|
529
529
|
}
|
|
530
530
|
function lastRequestOccupancy(thread) {
|
|
531
|
+
if (thread.agent === "cursor") return estimateOccupancyTokens(thread.messages);
|
|
531
532
|
for (let i = thread.messages.length - 1; i >= 0; i--) {
|
|
532
533
|
const usage = thread.messages[i]?.usage;
|
|
533
|
-
if (usage)
|
|
534
|
+
if (!usage) continue;
|
|
535
|
+
const n = usage.lastRequestTokens;
|
|
536
|
+
if (n != null && n > 0) return n;
|
|
537
|
+
if (thread.agent === "codex") return estimateOccupancyTokens(thread.messages);
|
|
534
538
|
}
|
|
535
|
-
return 0;
|
|
539
|
+
return thread.agent === "codex" ? estimateOccupancyTokens(thread.messages) : 0;
|
|
536
540
|
}
|
|
537
541
|
function shouldResetSessionForOccupancy(thread, occupancyTokens = SESSION_RESET_OCCUPANCY_TOKENS) {
|
|
538
542
|
return lastRequestOccupancy(thread) >= occupancyTokens;
|
|
@@ -551,7 +555,7 @@ async function maybeCompactContext(thread, thresholds = {}, summarize = summariz
|
|
|
551
555
|
});
|
|
552
556
|
let messages = applyCompaction(thread.messages, summary, thresholds);
|
|
553
557
|
const compactedMessages = appendCompactedMessages(thread.compactedMessages, older);
|
|
554
|
-
const resetSession = shouldResetSessionForOccupancy(
|
|
558
|
+
const resetSession = shouldResetSessionForOccupancy(thread);
|
|
555
559
|
if (resetSession) {
|
|
556
560
|
messages = applyForwardOccupancy(messages);
|
|
557
561
|
}
|
|
@@ -1678,7 +1682,7 @@ var PORT_RANGE_SIZE = 10;
|
|
|
1678
1682
|
var RECLAIM_RETRY_DELAY_MS = 40;
|
|
1679
1683
|
var RECLAIM_TRIES = 8;
|
|
1680
1684
|
async function killReclaimable(ports, worktreePath, signal) {
|
|
1681
|
-
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-
|
|
1685
|
+
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-TGWI6ETZ.js");
|
|
1682
1686
|
if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
|
|
1683
1687
|
else killListenersOnPorts2(ports);
|
|
1684
1688
|
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveGithubRepoSlug,
|
|
8
8
|
resolveOriginRemote,
|
|
9
9
|
resolveRepoRoot
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-75RPUXJS.js";
|
|
11
11
|
import {
|
|
12
12
|
ATTACHMENTS_DIR,
|
|
13
13
|
attachmentsGitignoreBody
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveThreadDefaults,
|
|
25
25
|
resolveViewerProfile,
|
|
26
26
|
resolveViewerProfileForRepo
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-D744HOI5.js";
|
|
28
28
|
import {
|
|
29
29
|
allocateTeamName,
|
|
30
30
|
createEmptyThread,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
teamSlugFromName,
|
|
34
34
|
updateThread,
|
|
35
35
|
writeThread
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Q3FHTGIW.js";
|
|
37
37
|
import {
|
|
38
38
|
appDataDir,
|
|
39
39
|
globalAgentCwd,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
normalizeAbleTimeCredential,
|
|
7
7
|
normalizeAbleTimeHost,
|
|
8
8
|
rewriteAbleTimeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JM2TGOHP.js";
|
|
10
10
|
import {
|
|
11
11
|
httpFetch
|
|
12
12
|
} from "./chunk-2GPQZZLY.js";
|
|
13
13
|
import {
|
|
14
14
|
getAbleTimeAccessToken,
|
|
15
15
|
getAbleTimeHost
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-D744HOI5.js";
|
|
17
17
|
|
|
18
18
|
// src/integrations/abletime-rest.ts
|
|
19
19
|
var ABLETIME_REST_PREFIX = "/api/public/v2";
|
|
@@ -1077,6 +1077,7 @@ function normalizeThread(raw) {
|
|
|
1077
1077
|
approvedMcpServers: normalizeApprovedMcpServers(raw.approvedMcpServers),
|
|
1078
1078
|
lastError: raw.lastError ?? null,
|
|
1079
1079
|
agentPid: raw.agentPid ?? null,
|
|
1080
|
+
agentPidStartedAt: raw.agentPidStartedAt ?? null,
|
|
1080
1081
|
attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
|
|
1081
1082
|
pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
|
|
1082
1083
|
queueAttachments: Array.isArray(raw.queueAttachments) ? raw.queueAttachments : [],
|
|
@@ -1155,6 +1156,7 @@ function createEmptyThread(partial) {
|
|
|
1155
1156
|
agent: partial.agent,
|
|
1156
1157
|
lastError: null,
|
|
1157
1158
|
agentPid: null,
|
|
1159
|
+
agentPidStartedAt: null,
|
|
1158
1160
|
...partial.accountId !== void 0 ? { accountId: partial.accountId } : {}
|
|
1159
1161
|
};
|
|
1160
1162
|
}
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
OPTIONAL_SERVICES,
|
|
3
3
|
isOptionalServiceId,
|
|
4
4
|
optionalServiceSpec
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B244TJWC.js";
|
|
6
6
|
import {
|
|
7
7
|
installNpmGlobalPackage,
|
|
8
8
|
whichOnPath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4H5MWZ6J.js";
|
|
10
10
|
import {
|
|
11
11
|
enrichPathWithNpmGlobalBin
|
|
12
12
|
} from "./chunk-2TUE6JKQ.js";
|
|
@@ -32,18 +32,18 @@ import {
|
|
|
32
32
|
tryReservePort,
|
|
33
33
|
tryReservePorts,
|
|
34
34
|
worktreeRunPortsPath
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-46FECFZU.js";
|
|
36
|
+
import "./chunk-OOXRMTU6.js";
|
|
37
|
+
import "./chunk-FWVUGLBG.js";
|
|
38
|
+
import "./chunk-KECHK3ZT.js";
|
|
39
|
+
import "./chunk-ZSHS46V5.js";
|
|
40
40
|
import "./chunk-QKHEVSB5.js";
|
|
41
41
|
import "./chunk-F2PVRF3B.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-OPXEJJBM.js";
|
|
43
43
|
import "./chunk-6K64FJDD.js";
|
|
44
44
|
import "./chunk-LG6RJBIY.js";
|
|
45
45
|
import "./chunk-2TUE6JKQ.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-QPSKQP6E.js";
|
|
47
47
|
import "./chunk-77WWLBCI.js";
|
|
48
48
|
import {
|
|
49
49
|
stripNestedElectronEnv
|
|
@@ -34,21 +34,21 @@ import {
|
|
|
34
34
|
tryReservePort,
|
|
35
35
|
tryReservePorts,
|
|
36
36
|
worktreeRunPortsPath
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-XLVLMQKN.js";
|
|
38
|
+
import "./chunk-5MXLDDYF.js";
|
|
39
|
+
import "./chunk-YGVGXQA7.js";
|
|
40
|
+
import "./chunk-75RPUXJS.js";
|
|
41
41
|
import "./chunk-N2WW62LF.js";
|
|
42
42
|
import "./chunk-4YXZOXMT.js";
|
|
43
43
|
import "./chunk-YBTSZ2SW.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-D744HOI5.js";
|
|
45
45
|
import "./chunk-NSTQ6QKD.js";
|
|
46
46
|
import {
|
|
47
47
|
stripNestedElectronEnv
|
|
48
48
|
} from "./chunk-WWUABK6B.js";
|
|
49
49
|
import "./chunk-FJZWM2ON.js";
|
|
50
50
|
import "./chunk-J2LNLI4S.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-Q3FHTGIW.js";
|
|
52
52
|
import "./chunk-WMZIANPV.js";
|
|
53
53
|
import "./chunk-KGZBYWZ3.js";
|
|
54
54
|
import {
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-FWVUGLBG.js";
|
|
11
|
+
import "./chunk-KECHK3ZT.js";
|
|
12
|
+
import "./chunk-ZSHS46V5.js";
|
|
13
13
|
import "./chunk-QKHEVSB5.js";
|
|
14
14
|
import "./chunk-F2PVRF3B.js";
|
|
15
15
|
import "./chunk-6K64FJDD.js";
|
|
16
16
|
import "./chunk-LG6RJBIY.js";
|
|
17
17
|
import "./chunk-2TUE6JKQ.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-QPSKQP6E.js";
|
|
19
19
|
import "./chunk-77WWLBCI.js";
|
|
20
20
|
import "./chunk-4TR3HZFT.js";
|
|
21
21
|
import "./chunk-WDRMZKVB.js";
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YGVGXQA7.js";
|
|
13
|
+
import "./chunk-75RPUXJS.js";
|
|
14
14
|
import "./chunk-N2WW62LF.js";
|
|
15
15
|
import "./chunk-4YXZOXMT.js";
|
|
16
16
|
import "./chunk-YBTSZ2SW.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-D744HOI5.js";
|
|
18
18
|
import "./chunk-NSTQ6QKD.js";
|
|
19
19
|
import "./chunk-WWUABK6B.js";
|
|
20
20
|
import "./chunk-FJZWM2ON.js";
|
|
21
21
|
import "./chunk-J2LNLI4S.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-Q3FHTGIW.js";
|
|
23
23
|
import "./chunk-WMZIANPV.js";
|
|
24
24
|
import "./chunk-KGZBYWZ3.js";
|
|
25
25
|
import "./chunk-WOU343SI.js";
|
|
@@ -36,7 +36,7 @@ function scanFinishedCursorRuns(runsPath, agentId, startedAfterMs) {
|
|
|
36
36
|
if (typeof row.result !== "string" || !row.result.trim()) continue;
|
|
37
37
|
const endedAt = typeof row.endedAt === "number" ? row.endedAt : 0;
|
|
38
38
|
const createdAt = typeof row.createdAt === "number" ? row.createdAt : 0;
|
|
39
|
-
if (createdAt < startedAfterMs
|
|
39
|
+
if (createdAt < startedAfterMs) continue;
|
|
40
40
|
if (!best || endedAt >= best.endedAt) {
|
|
41
41
|
best = { runId: row.runId || "", result: row.result.trim(), endedAt };
|
|
42
42
|
}
|
|
@@ -34,7 +34,7 @@ function scanFinishedCursorRuns(runsPath, agentId, startedAfterMs) {
|
|
|
34
34
|
if (typeof row.result !== "string" || !row.result.trim()) continue;
|
|
35
35
|
const endedAt = typeof row.endedAt === "number" ? row.endedAt : 0;
|
|
36
36
|
const createdAt = typeof row.createdAt === "number" ? row.createdAt : 0;
|
|
37
|
-
if (createdAt < startedAfterMs
|
|
37
|
+
if (createdAt < startedAfterMs) continue;
|
|
38
38
|
if (!best || endedAt >= best.endedAt) {
|
|
39
39
|
best = { runId: row.runId || "", result: row.result.trim(), endedAt };
|
|
40
40
|
}
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
remoteCoordinatorSourceRef,
|
|
21
21
|
slackCoordinatorSourceRef,
|
|
22
22
|
takenTeamSlugsForOrchestration
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-YGVGXQA7.js";
|
|
24
|
+
import "./chunk-75RPUXJS.js";
|
|
25
25
|
import "./chunk-N2WW62LF.js";
|
|
26
26
|
import "./chunk-4YXZOXMT.js";
|
|
27
27
|
import "./chunk-YBTSZ2SW.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-D744HOI5.js";
|
|
29
29
|
import "./chunk-NSTQ6QKD.js";
|
|
30
30
|
import "./chunk-WWUABK6B.js";
|
|
31
31
|
import "./chunk-FJZWM2ON.js";
|
|
32
32
|
import "./chunk-J2LNLI4S.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-Q3FHTGIW.js";
|
|
34
34
|
import "./chunk-WMZIANPV.js";
|
|
35
35
|
import "./chunk-KGZBYWZ3.js";
|
|
36
36
|
import {
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
remoteCoordinatorSourceRef,
|
|
19
19
|
slackCoordinatorSourceRef,
|
|
20
20
|
takenTeamSlugsForOrchestration
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-FWVUGLBG.js";
|
|
22
|
+
import "./chunk-KECHK3ZT.js";
|
|
23
|
+
import "./chunk-ZSHS46V5.js";
|
|
24
24
|
import "./chunk-QKHEVSB5.js";
|
|
25
25
|
import "./chunk-F2PVRF3B.js";
|
|
26
26
|
import "./chunk-6K64FJDD.js";
|
|
27
27
|
import "./chunk-LG6RJBIY.js";
|
|
28
28
|
import "./chunk-2TUE6JKQ.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-QPSKQP6E.js";
|
|
30
30
|
import "./chunk-77WWLBCI.js";
|
|
31
31
|
import "./chunk-4TR3HZFT.js";
|
|
32
32
|
import "./chunk-WDRMZKVB.js";
|