@sideboard-ai/core 0.1.340 → 0.1.342
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-OGOHNRVB.js → abletime-MSIMJKKQ.js} +4 -4
- package/dist/{abletime-TNONAVJG.js → abletime-ZIYFR4SI.js} +4 -4
- package/dist/{abletime-oauth-DAZEUQJI.js → abletime-oauth-2RUKRZYZ.js} +3 -3
- package/dist/{abletime-oauth-TYDQ73GK.js → abletime-oauth-IQZ3LOB2.js} +3 -3
- package/dist/{abletime-rest-B4VI46MI.js → abletime-rest-7YAO5B74.js} +3 -3
- package/dist/{abletime-rest-3FWZGTX6.js → abletime-rest-UBLSGMSA.js} +3 -3
- package/dist/{agents-QFXIBIKJ.js → agents-7DCNOMFP.js} +8 -8
- package/dist/{agents-6MSZHZOM.js → agents-LNZ465IM.js} +8 -8
- package/dist/{app-settings-KOSVLMO5.js → app-settings-FS7TM55D.js} +11 -1
- package/dist/{app-settings-YS5AUJTF.js → app-settings-Q2F57NVK.js} +11 -1
- package/dist/{chunk-BD7QARIJ.js → chunk-2BLJ726H.js} +6 -5
- package/dist/{chunk-SYTTUNX6.js → chunk-3DMRQB4Y.js} +1 -1
- package/dist/{chunk-OMKTX7ZW.js → chunk-3J3XOIHF.js} +3 -3
- package/dist/{chunk-W6J3ZWLJ.js → chunk-4HELMBYR.js} +2 -2
- package/dist/{chunk-HNW5KMGK.js → chunk-4PXHJA5K.js} +2 -2
- package/dist/{chunk-QWFNKOGA.js → chunk-4TTTEKNV.js} +2 -2
- package/dist/{chunk-EVYOONTE.js → chunk-5BFEHSHO.js} +6 -5
- package/dist/{chunk-EZZY3EAZ.js → chunk-5HUR77ZH.js} +666 -62
- package/dist/{chunk-5TVRPOVS.js → chunk-5SJGR3VS.js} +1 -1
- package/dist/{chunk-I2C5ZRVO.js → chunk-5TS3KVGI.js} +1 -1
- package/dist/{chunk-5FGQTB2Z.js → chunk-6RO2AOE5.js} +2 -2
- package/dist/{chunk-FEGRY7NL.js → chunk-A4ZI7SA3.js} +3 -3
- package/dist/{chunk-DYUAVL5S.js → chunk-BIM24I3O.js} +1 -0
- package/dist/{chunk-KAIOL2M5.js → chunk-D7US5R4H.js} +1 -1
- package/dist/{chunk-NHLTTT5G.js → chunk-DEQLDEYR.js} +7 -6
- package/dist/{chunk-ELDHERAD.js → chunk-DZF25KTX.js} +661 -56
- package/dist/{chunk-4OVQGZEI.js → chunk-G3UV3GXJ.js} +48 -26
- package/dist/{chunk-Q73I6I2K.js → chunk-GUIJMZQG.js} +1 -1
- package/dist/{chunk-AFSLMWQK.js → chunk-JHT3CYLT.js} +42 -3
- package/dist/{chunk-BDQFZAE6.js → chunk-JX3OWNOT.js} +43 -3
- package/dist/{chunk-6ABL7HZN.js → chunk-LDJT3TLN.js} +10 -8
- package/dist/{chunk-LYJ5AVK4.js → chunk-LHU6ZBFB.js} +2 -2
- package/dist/{chunk-WSZIJNAR.js → chunk-NDBMDHQ5.js} +5 -5
- package/dist/{chunk-PEJ3N5VE.js → chunk-NGIGRAZB.js} +7 -6
- package/dist/{chunk-4BRO5LNX.js → chunk-O2IRQAFB.js} +3 -3
- package/dist/{chunk-5KH3EQ2C.js → chunk-ORO4ENZR.js} +1 -0
- package/dist/{chunk-ERCYQTJU.js → chunk-RTZO2YJC.js} +48 -26
- package/dist/{chunk-VHHEQP5V.js → chunk-S3DTEGMK.js} +11 -9
- package/dist/{chunk-N6TGSJVC.js → chunk-S3UGLMGE.js} +31 -0
- package/dist/{chunk-FCBUDWP6.js → chunk-SLLTEMIL.js} +2 -2
- package/dist/{chunk-23KYDM2U.js → chunk-TKEYXNXY.js} +31 -0
- package/dist/{chunk-4SP26Z6H.js → chunk-WO7VF4FG.js} +5 -5
- package/dist/{conductor-LEPTWN2U.js → conductor-4SWJM5FS.js} +6 -6
- package/dist/{conductor-AUUXCJZT.js → conductor-Q433HU77.js} +6 -6
- package/dist/{coordinator-prompt-VO42IZWS.js → coordinator-prompt-5QHWCO7V.js} +4 -4
- package/dist/{coordinator-prompt-CIWWP2P6.js → coordinator-prompt-Z7PPP45X.js} +4 -4
- package/dist/{global-workspace-FKXLFKYX.js → global-workspace-DL4K4K7O.js} +4 -4
- package/dist/{global-workspace-MCAREQI7.js → global-workspace-VDCZMFCZ.js} +4 -4
- package/dist/index.cjs +1018 -188
- package/dist/index.d.cts +57 -7
- package/dist/index.d.ts +57 -7
- package/dist/index.js +135 -30
- package/dist/{linear-P3LP455O.js → linear-JE4WAZ3W.js} +2 -2
- package/dist/{linear-5E2WI4QQ.js → linear-UXMDJAD4.js} +2 -2
- package/dist/{linear-list-Y3INIBYH.js → linear-list-I4NAOWPN.js} +1 -1
- package/dist/{linear-list-AXK62DPW.js → linear-list-KDLU7QWX.js} +1 -1
- package/dist/mcp/run-stdio.cjs +922 -114
- package/dist/mcp/run-stdio.js +119 -27
- package/dist/{optional-cli-6J6C4I3X.js → optional-cli-7QXXPEN6.js} +3 -3
- package/dist/{optional-cli-X6I35UNI.js → optional-cli-RUUCLNSM.js} +4 -4
- package/dist/{orchestrator-JTFCNXVR.js → orchestrator-BPCM4OP3.js} +11 -11
- package/dist/{orchestrator-NOQDMYLB.js → orchestrator-HIWWPWL5.js} +11 -11
- package/dist/{thread-store-DCO5MZWJ.js → thread-store-HETUMDVA.js} +2 -2
- package/dist/{thread-store-QGBPSZU2.js → thread-store-ILM2ZJCB.js} +2 -2
- package/dist/{workspaces-D6FQCZRK.js → workspaces-EIIHHH4S.js} +4 -4
- package/dist/{workspaces-Y25L2EPV.js → workspaces-MX4W4SSB.js} +4 -4
- package/dist/{worktree-S4YOAYRA.js → worktree-BD3EJE24.js} +5 -3
- package/dist/{worktree-GWS77LWX.js → worktree-QBVLKACU.js} +5 -3
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
normalizeTakenSlug,
|
|
5
5
|
normalizeWorktreePath,
|
|
6
6
|
takenSlugsFromThread
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JX3OWNOT.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureWorktreeSideboardIgnored
|
|
10
10
|
} from "./chunk-BMRJNRQK.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
getGithubGitAuthMode,
|
|
27
27
|
getGithubPat
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-TKEYXNXY.js";
|
|
29
29
|
import {
|
|
30
30
|
worktreesRoot
|
|
31
31
|
} from "./chunk-H4UEFJRI.js";
|
|
@@ -1075,11 +1075,16 @@ async function listCursorPrs(repoPath, slug, opts, head) {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
const { stdout, exitCode } = await originCli(args, repoPath, { reject: false, timeoutMs: 2e4 });
|
|
1078
|
-
if (exitCode !== 0
|
|
1078
|
+
if (exitCode !== 0) {
|
|
1079
|
+
if (opts?.strict) throw new Error(`origin pr list failed (${exitCode})`);
|
|
1080
|
+
return [];
|
|
1081
|
+
}
|
|
1082
|
+
if (!stdout.trim()) return [];
|
|
1079
1083
|
let parsed;
|
|
1080
1084
|
try {
|
|
1081
1085
|
parsed = JSON.parse(stdout);
|
|
1082
1086
|
} catch {
|
|
1087
|
+
if (opts?.strict) throw new Error("origin pr list returned invalid JSON");
|
|
1083
1088
|
return [];
|
|
1084
1089
|
}
|
|
1085
1090
|
if (!Array.isArray(parsed)) return [];
|
|
@@ -1182,21 +1187,23 @@ async function fetchCursorPrHead(repoPath, slug, number, localBranch) {
|
|
|
1182
1187
|
throw new Error((result.stderr || result.stdout).trim() || `git fetch origin ${head} failed`);
|
|
1183
1188
|
}
|
|
1184
1189
|
}
|
|
1185
|
-
async function
|
|
1190
|
+
async function cursorPrCiChecks(repoPath, slug, selector) {
|
|
1186
1191
|
const { stdout, exitCode, stderr } = await originCli(
|
|
1187
1192
|
["pr", "checks", selector, ...repoArgs(slug), "--json", "name,status,conclusion,detailsUrl,startedAt,completedAt,summary,group,link"],
|
|
1188
1193
|
repoPath,
|
|
1189
1194
|
{ reject: false, timeoutMs: 2e4 }
|
|
1190
1195
|
);
|
|
1191
1196
|
const err = stderr.trim();
|
|
1192
|
-
let ci;
|
|
1193
1197
|
if (!stdout.trim()) {
|
|
1194
1198
|
if (/no pull request|not found|no change/i.test(err)) return null;
|
|
1195
1199
|
if (exitCode !== 0 && err) throw new Error(err);
|
|
1196
|
-
|
|
1197
|
-
} else {
|
|
1198
|
-
ci = originChecksToRuns(stdout);
|
|
1200
|
+
return [];
|
|
1199
1201
|
}
|
|
1202
|
+
return originChecksToRuns(stdout);
|
|
1203
|
+
}
|
|
1204
|
+
async function cursorPrChecks(repoPath, slug, selector) {
|
|
1205
|
+
const ci = await cursorPrCiChecks(repoPath, slug, selector);
|
|
1206
|
+
if (!ci) return null;
|
|
1200
1207
|
const view = await viewCursorPr(
|
|
1201
1208
|
repoPath,
|
|
1202
1209
|
slug,
|
|
@@ -1755,7 +1762,11 @@ async function listPrs(repoPath, opts) {
|
|
|
1755
1762
|
limit: fetchLimit
|
|
1756
1763
|
});
|
|
1757
1764
|
const { stdout, exitCode } = await gh(args, repoPath, { reject: false });
|
|
1758
|
-
if (exitCode !== 0
|
|
1765
|
+
if (exitCode !== 0) {
|
|
1766
|
+
if (opts?.strict) throw new Error(`gh pr list failed (${exitCode})`);
|
|
1767
|
+
return [];
|
|
1768
|
+
}
|
|
1769
|
+
if (!stdout.trim()) return [];
|
|
1759
1770
|
return applyPrListResponse(stdout, { ...resolved, limit, viewerTeams });
|
|
1760
1771
|
}
|
|
1761
1772
|
var PR_INFO_JSON_FIELDS = "number,title,headRefName,url,isCrossRepository,author,isDraft,labels,state";
|
|
@@ -2018,12 +2029,7 @@ async function probeLocalMergeGate(cwd, gate) {
|
|
|
2018
2029
|
}
|
|
2019
2030
|
return { gate, files: [] };
|
|
2020
2031
|
}
|
|
2021
|
-
async function
|
|
2022
|
-
const origin = await resolveOriginRemote(cwd);
|
|
2023
|
-
if (origin?.forge === "entire") return null;
|
|
2024
|
-
const cursorSlug = origin?.forge === "cursor" ? origin.slug : null;
|
|
2025
|
-
if (cursorSlug) return cursorPrChecks(cwd, cursorSlug, selector);
|
|
2026
|
-
const slug = await resolveGithubRepoSlug(cwd);
|
|
2032
|
+
async function readGhPrChecks(cwd, selector, slug) {
|
|
2027
2033
|
const args = [
|
|
2028
2034
|
"pr",
|
|
2029
2035
|
"checks",
|
|
@@ -2034,7 +2040,6 @@ async function getPrChecks(cwd, selector) {
|
|
|
2034
2040
|
if (slug) args.push("--repo", slug);
|
|
2035
2041
|
const { stdout, exitCode, stderr } = await gh(args, cwd, { reject: false });
|
|
2036
2042
|
const errText = stderr.trim();
|
|
2037
|
-
let ciChecks;
|
|
2038
2043
|
if (!stdout.trim()) {
|
|
2039
2044
|
if (/no pull requests found/i.test(errText)) return null;
|
|
2040
2045
|
if (/auth|login|HTTP\s*401|credentials|token/i.test(errText)) {
|
|
@@ -2044,18 +2049,34 @@ async function getPrChecks(cwd, selector) {
|
|
|
2044
2049
|
if (exitCode === 1 && errText && !/fail|check/i.test(errText)) {
|
|
2045
2050
|
throw new Error(errText);
|
|
2046
2051
|
}
|
|
2047
|
-
|
|
2048
|
-
} else {
|
|
2049
|
-
throw new Error(errText || `gh pr checks failed (${exitCode})`);
|
|
2050
|
-
}
|
|
2051
|
-
} else {
|
|
2052
|
-
try {
|
|
2053
|
-
const parsed = JSON.parse(stdout);
|
|
2054
|
-
ciChecks = parsed.map(normalizeCheck);
|
|
2055
|
-
} catch {
|
|
2056
|
-
throw new Error(errText || "gh pr checks returned invalid JSON");
|
|
2052
|
+
return [];
|
|
2057
2053
|
}
|
|
2054
|
+
throw new Error(errText || `gh pr checks failed (${exitCode})`);
|
|
2055
|
+
}
|
|
2056
|
+
try {
|
|
2057
|
+
const parsed = JSON.parse(stdout);
|
|
2058
|
+
return parsed.map(normalizeCheck);
|
|
2059
|
+
} catch {
|
|
2060
|
+
throw new Error(errText || "gh pr checks returned invalid JSON");
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
async function getPrCiChecks(cwd, selector) {
|
|
2064
|
+
const origin = await resolveOriginRemote(cwd);
|
|
2065
|
+
if (origin?.forge === "entire") return null;
|
|
2066
|
+
if (origin?.forge === "cursor" && origin.slug) {
|
|
2067
|
+
return cursorPrCiChecks(cwd, origin.slug, selector);
|
|
2058
2068
|
}
|
|
2069
|
+
const slug = await resolveGithubRepoSlug(cwd);
|
|
2070
|
+
return readGhPrChecks(cwd, selector, slug);
|
|
2071
|
+
}
|
|
2072
|
+
async function getPrChecks(cwd, selector) {
|
|
2073
|
+
const origin = await resolveOriginRemote(cwd);
|
|
2074
|
+
if (origin?.forge === "entire") return null;
|
|
2075
|
+
const cursorSlug = origin?.forge === "cursor" ? origin.slug : null;
|
|
2076
|
+
if (cursorSlug) return cursorPrChecks(cwd, cursorSlug, selector);
|
|
2077
|
+
const slug = await resolveGithubRepoSlug(cwd);
|
|
2078
|
+
const ciChecks = await readGhPrChecks(cwd, selector, slug);
|
|
2079
|
+
if (!ciChecks) return null;
|
|
2059
2080
|
let gate = await fetchPrMergeGate(cwd, selector, slug);
|
|
2060
2081
|
const probed = await probeLocalMergeGate(cwd, gate);
|
|
2061
2082
|
gate = probed.gate;
|
|
@@ -3027,6 +3048,7 @@ export {
|
|
|
3027
3048
|
connectedPrSelectors,
|
|
3028
3049
|
getPrForHeadBranch,
|
|
3029
3050
|
detectLocalMergeConflicts,
|
|
3051
|
+
getPrCiChecks,
|
|
3030
3052
|
getPrChecks,
|
|
3031
3053
|
getPrMeta,
|
|
3032
3054
|
PR_DETAILS_JSON_FIELDS,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isOrchestratorCapableAgent,
|
|
10
10
|
normalizeThinkingEffort,
|
|
11
11
|
updateAdvancedSettings
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S3UGLMGE.js";
|
|
13
13
|
import {
|
|
14
14
|
writePrivateFile
|
|
15
15
|
} from "./chunk-NSTQ6QKD.js";
|
|
@@ -1199,6 +1199,7 @@ function normalizeWhen(raw) {
|
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
1201
|
// src/store/schedules.ts
|
|
1202
|
+
var SCHEDULE_RUN_HISTORY_LIMIT = 10;
|
|
1202
1203
|
function schedulesPath() {
|
|
1203
1204
|
return join(appDataDir(), "schedules.json");
|
|
1204
1205
|
}
|
|
@@ -1257,6 +1258,35 @@ function normalizeAttachments(raw) {
|
|
|
1257
1258
|
}
|
|
1258
1259
|
return out;
|
|
1259
1260
|
}
|
|
1261
|
+
function normalizeRunList(raw) {
|
|
1262
|
+
if (!Array.isArray(raw)) return [];
|
|
1263
|
+
const out = [];
|
|
1264
|
+
for (const item of raw) {
|
|
1265
|
+
if (!item || typeof item !== "object") continue;
|
|
1266
|
+
const row = item;
|
|
1267
|
+
if (typeof row.at !== "string" || !row.at.trim()) continue;
|
|
1268
|
+
const next = {
|
|
1269
|
+
at: row.at,
|
|
1270
|
+
threadId: typeof row.threadId === "string" && row.threadId.trim() ? row.threadId.trim() : null
|
|
1271
|
+
};
|
|
1272
|
+
if (typeof row.error === "string" && row.error.trim()) next.error = row.error;
|
|
1273
|
+
out.push(next);
|
|
1274
|
+
if (out.length >= SCHEDULE_RUN_HISTORY_LIMIT) break;
|
|
1275
|
+
}
|
|
1276
|
+
return out;
|
|
1277
|
+
}
|
|
1278
|
+
function runsFromStored(raw) {
|
|
1279
|
+
if (Array.isArray(raw.runs)) return normalizeRunList(raw.runs);
|
|
1280
|
+
if (typeof raw.lastRunAt === "string" && raw.lastRunAt.trim()) {
|
|
1281
|
+
const one = {
|
|
1282
|
+
at: raw.lastRunAt,
|
|
1283
|
+
threadId: raw.lastThreadId?.trim() || null
|
|
1284
|
+
};
|
|
1285
|
+
if (typeof raw.lastError === "string" && raw.lastError.trim()) one.error = raw.lastError;
|
|
1286
|
+
return [one];
|
|
1287
|
+
}
|
|
1288
|
+
return [];
|
|
1289
|
+
}
|
|
1260
1290
|
function normalizeTask(raw) {
|
|
1261
1291
|
const when = normalizeWhen(raw.when);
|
|
1262
1292
|
const agent = raw.agent && isOrchestratorCapableAgent(raw.agent) ? raw.agent : null;
|
|
@@ -1279,6 +1309,7 @@ function normalizeTask(raw) {
|
|
|
1279
1309
|
lastRunAt: raw.lastRunAt ?? null,
|
|
1280
1310
|
lastThreadId: raw.lastThreadId ?? null,
|
|
1281
1311
|
lastError: raw.lastError ?? null,
|
|
1312
|
+
runs: runsFromStored(raw),
|
|
1282
1313
|
createdBy: raw.createdBy === "mcp" || raw.createdBy === "cli" || raw.createdBy === "ui" ? raw.createdBy : "ui",
|
|
1283
1314
|
createdAt: raw.createdAt,
|
|
1284
1315
|
updatedAt: raw.updatedAt
|
|
@@ -1331,6 +1362,7 @@ function buildTask(input, now) {
|
|
|
1331
1362
|
lastRunAt: null,
|
|
1332
1363
|
lastThreadId: null,
|
|
1333
1364
|
lastError: null,
|
|
1365
|
+
runs: [],
|
|
1334
1366
|
createdBy: input.createdBy,
|
|
1335
1367
|
createdAt: ts,
|
|
1336
1368
|
updatedAt: ts
|
|
@@ -1420,14 +1452,19 @@ function recordScheduleRun(id, result) {
|
|
|
1420
1452
|
if (idx < 0) throw new Error(`Automation not found: ${id}`);
|
|
1421
1453
|
const prev = rows[idx];
|
|
1422
1454
|
const firedAt = result.firedAt ?? /* @__PURE__ */ new Date();
|
|
1455
|
+
const at = nowIso(firedAt);
|
|
1456
|
+
const threadId = result.lastThreadId !== void 0 ? result.lastThreadId?.trim() || null : null;
|
|
1457
|
+
const entry = { at, threadId };
|
|
1458
|
+
if (result.lastError?.trim()) entry.error = result.lastError;
|
|
1423
1459
|
const next = {
|
|
1424
1460
|
...prev,
|
|
1425
1461
|
enabled: prev.when.kind === "once" ? false : prev.enabled,
|
|
1426
1462
|
nextRunAt: prev.when.kind === "once" ? prev.nextRunAt : computeNextRunAt(prev.when, firedAt).toISOString(),
|
|
1427
|
-
lastRunAt:
|
|
1463
|
+
lastRunAt: at,
|
|
1428
1464
|
lastThreadId: result.lastThreadId !== void 0 ? result.lastThreadId : prev.lastThreadId,
|
|
1429
1465
|
lastError: result.lastError ?? null,
|
|
1430
|
-
|
|
1466
|
+
runs: [entry, ...prev.runs].slice(0, SCHEDULE_RUN_HISTORY_LIMIT),
|
|
1467
|
+
updatedAt: at
|
|
1431
1468
|
};
|
|
1432
1469
|
rows[idx] = next;
|
|
1433
1470
|
writeAll(rows);
|
|
@@ -1507,6 +1544,7 @@ function normalizeThread(raw) {
|
|
|
1507
1544
|
prIsInMergeQueue: Boolean(raw.prIsInMergeQueue),
|
|
1508
1545
|
prLabels: Array.isArray(raw.prLabels) ? raw.prLabels : [],
|
|
1509
1546
|
prChecksFailed: typeof raw.prChecksFailed === "boolean" ? raw.prChecksFailed : void 0,
|
|
1547
|
+
wakeOnGithubEdges: raw.wakeOnGithubEdges === true ? true : void 0,
|
|
1510
1548
|
issueBlockedBy: sanitizeIssueBlockedBy(raw.issueBlockedBy),
|
|
1511
1549
|
skipAutoArchiveOnMerge: Boolean(raw.skipAutoArchiveOnMerge),
|
|
1512
1550
|
cowboy: Boolean(raw.cowboy),
|
|
@@ -1551,6 +1589,7 @@ function createEmptyThread(partial) {
|
|
|
1551
1589
|
prIsInMergeQueue: Boolean(partial.prIsInMergeQueue),
|
|
1552
1590
|
prLabels: partial.prLabels ?? [],
|
|
1553
1591
|
prChecksFailed: partial.prChecksFailed,
|
|
1592
|
+
...partial.wakeOnGithubEdges === true ? { wakeOnGithubEdges: true } : {},
|
|
1554
1593
|
skipAutoArchiveOnMerge: partial.skipAutoArchiveOnMerge ?? false,
|
|
1555
1594
|
cowboy: Boolean(partial.cowboy),
|
|
1556
1595
|
stackId: partial.stackId ?? null,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isOrchestratorCapableAgent,
|
|
11
11
|
normalizeThinkingEffort,
|
|
12
12
|
updateAdvancedSettings
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TKEYXNXY.js";
|
|
14
14
|
import {
|
|
15
15
|
writePrivateFile
|
|
16
16
|
} from "./chunk-JT7R45JB.js";
|
|
@@ -1215,6 +1215,7 @@ function normalizeWhen(raw) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
1217
|
// src/store/schedules.ts
|
|
1218
|
+
var SCHEDULE_RUN_HISTORY_LIMIT = 10;
|
|
1218
1219
|
function schedulesPath() {
|
|
1219
1220
|
return join(appDataDir(), "schedules.json");
|
|
1220
1221
|
}
|
|
@@ -1273,6 +1274,35 @@ function normalizeAttachments(raw) {
|
|
|
1273
1274
|
}
|
|
1274
1275
|
return out;
|
|
1275
1276
|
}
|
|
1277
|
+
function normalizeRunList(raw) {
|
|
1278
|
+
if (!Array.isArray(raw)) return [];
|
|
1279
|
+
const out = [];
|
|
1280
|
+
for (const item of raw) {
|
|
1281
|
+
if (!item || typeof item !== "object") continue;
|
|
1282
|
+
const row = item;
|
|
1283
|
+
if (typeof row.at !== "string" || !row.at.trim()) continue;
|
|
1284
|
+
const next = {
|
|
1285
|
+
at: row.at,
|
|
1286
|
+
threadId: typeof row.threadId === "string" && row.threadId.trim() ? row.threadId.trim() : null
|
|
1287
|
+
};
|
|
1288
|
+
if (typeof row.error === "string" && row.error.trim()) next.error = row.error;
|
|
1289
|
+
out.push(next);
|
|
1290
|
+
if (out.length >= SCHEDULE_RUN_HISTORY_LIMIT) break;
|
|
1291
|
+
}
|
|
1292
|
+
return out;
|
|
1293
|
+
}
|
|
1294
|
+
function runsFromStored(raw) {
|
|
1295
|
+
if (Array.isArray(raw.runs)) return normalizeRunList(raw.runs);
|
|
1296
|
+
if (typeof raw.lastRunAt === "string" && raw.lastRunAt.trim()) {
|
|
1297
|
+
const one = {
|
|
1298
|
+
at: raw.lastRunAt,
|
|
1299
|
+
threadId: raw.lastThreadId?.trim() || null
|
|
1300
|
+
};
|
|
1301
|
+
if (typeof raw.lastError === "string" && raw.lastError.trim()) one.error = raw.lastError;
|
|
1302
|
+
return [one];
|
|
1303
|
+
}
|
|
1304
|
+
return [];
|
|
1305
|
+
}
|
|
1276
1306
|
function normalizeTask(raw) {
|
|
1277
1307
|
const when = normalizeWhen(raw.when);
|
|
1278
1308
|
const agent = raw.agent && isOrchestratorCapableAgent(raw.agent) ? raw.agent : null;
|
|
@@ -1295,6 +1325,7 @@ function normalizeTask(raw) {
|
|
|
1295
1325
|
lastRunAt: raw.lastRunAt ?? null,
|
|
1296
1326
|
lastThreadId: raw.lastThreadId ?? null,
|
|
1297
1327
|
lastError: raw.lastError ?? null,
|
|
1328
|
+
runs: runsFromStored(raw),
|
|
1298
1329
|
createdBy: raw.createdBy === "mcp" || raw.createdBy === "cli" || raw.createdBy === "ui" ? raw.createdBy : "ui",
|
|
1299
1330
|
createdAt: raw.createdAt,
|
|
1300
1331
|
updatedAt: raw.updatedAt
|
|
@@ -1347,6 +1378,7 @@ function buildTask(input, now) {
|
|
|
1347
1378
|
lastRunAt: null,
|
|
1348
1379
|
lastThreadId: null,
|
|
1349
1380
|
lastError: null,
|
|
1381
|
+
runs: [],
|
|
1350
1382
|
createdBy: input.createdBy,
|
|
1351
1383
|
createdAt: ts,
|
|
1352
1384
|
updatedAt: ts
|
|
@@ -1439,14 +1471,19 @@ function recordScheduleRun(id, result) {
|
|
|
1439
1471
|
if (idx < 0) throw new Error(`Automation not found: ${id}`);
|
|
1440
1472
|
const prev = rows[idx];
|
|
1441
1473
|
const firedAt = result.firedAt ?? /* @__PURE__ */ new Date();
|
|
1474
|
+
const at = nowIso(firedAt);
|
|
1475
|
+
const threadId = result.lastThreadId !== void 0 ? result.lastThreadId?.trim() || null : null;
|
|
1476
|
+
const entry = { at, threadId };
|
|
1477
|
+
if (result.lastError?.trim()) entry.error = result.lastError;
|
|
1442
1478
|
const next = {
|
|
1443
1479
|
...prev,
|
|
1444
1480
|
enabled: prev.when.kind === "once" ? false : prev.enabled,
|
|
1445
1481
|
nextRunAt: prev.when.kind === "once" ? prev.nextRunAt : computeNextRunAt(prev.when, firedAt).toISOString(),
|
|
1446
|
-
lastRunAt:
|
|
1482
|
+
lastRunAt: at,
|
|
1447
1483
|
lastThreadId: result.lastThreadId !== void 0 ? result.lastThreadId : prev.lastThreadId,
|
|
1448
1484
|
lastError: result.lastError ?? null,
|
|
1449
|
-
|
|
1485
|
+
runs: [entry, ...prev.runs].slice(0, SCHEDULE_RUN_HISTORY_LIMIT),
|
|
1486
|
+
updatedAt: at
|
|
1450
1487
|
};
|
|
1451
1488
|
rows[idx] = next;
|
|
1452
1489
|
writeAll(rows);
|
|
@@ -1526,6 +1563,7 @@ function normalizeThread(raw) {
|
|
|
1526
1563
|
prIsInMergeQueue: Boolean(raw.prIsInMergeQueue),
|
|
1527
1564
|
prLabels: Array.isArray(raw.prLabels) ? raw.prLabels : [],
|
|
1528
1565
|
prChecksFailed: typeof raw.prChecksFailed === "boolean" ? raw.prChecksFailed : void 0,
|
|
1566
|
+
wakeOnGithubEdges: raw.wakeOnGithubEdges === true ? true : void 0,
|
|
1529
1567
|
issueBlockedBy: sanitizeIssueBlockedBy(raw.issueBlockedBy),
|
|
1530
1568
|
skipAutoArchiveOnMerge: Boolean(raw.skipAutoArchiveOnMerge),
|
|
1531
1569
|
cowboy: Boolean(raw.cowboy),
|
|
@@ -1570,6 +1608,7 @@ function createEmptyThread(partial) {
|
|
|
1570
1608
|
prIsInMergeQueue: Boolean(partial.prIsInMergeQueue),
|
|
1571
1609
|
prLabels: partial.prLabels ?? [],
|
|
1572
1610
|
prChecksFailed: partial.prChecksFailed,
|
|
1611
|
+
...partial.wakeOnGithubEdges === true ? { wakeOnGithubEdges: true } : {},
|
|
1573
1612
|
skipAutoArchiveOnMerge: partial.skipAutoArchiveOnMerge ?? false,
|
|
1574
1613
|
cowboy: Boolean(partial.cowboy),
|
|
1575
1614
|
stackId: partial.stackId ?? null,
|
|
@@ -1783,6 +1822,7 @@ export {
|
|
|
1783
1822
|
weeklyCronExpr,
|
|
1784
1823
|
computeNextRunAt,
|
|
1785
1824
|
formatScheduleWhen,
|
|
1825
|
+
SCHEDULE_RUN_HISTORY_LIMIT,
|
|
1786
1826
|
schedulesPath,
|
|
1787
1827
|
defaultScheduleName,
|
|
1788
1828
|
resolveScheduleThreadId,
|
|
@@ -6,22 +6,22 @@ import {
|
|
|
6
6
|
} from "./chunk-XOEKCE6L.js";
|
|
7
7
|
import {
|
|
8
8
|
listAssignedLinearIssues
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-D7US5R4H.js";
|
|
10
10
|
import {
|
|
11
11
|
looksLikeConversationSummary,
|
|
12
12
|
looksLikeSkillBody,
|
|
13
13
|
skillCommandFromBody,
|
|
14
14
|
withEventParentId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BIM24I3O.js";
|
|
16
16
|
import {
|
|
17
17
|
isOrchestratorThread
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2BLJ726H.js";
|
|
19
19
|
import {
|
|
20
20
|
codexUnattendedGitConfigArgs,
|
|
21
21
|
mergeAgentGitAuthEnv,
|
|
22
22
|
resolveAgentGitAuthEnv,
|
|
23
23
|
resolveCodexGitWritableRoots
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-G3UV3GXJ.js";
|
|
25
25
|
import {
|
|
26
26
|
loadBrightsyConfig
|
|
27
27
|
} from "./chunk-RSA47QYR.js";
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
requestOccupancy,
|
|
81
81
|
resolveAgentExecutable,
|
|
82
82
|
resolveClaudeExecutable
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-TKEYXNXY.js";
|
|
84
84
|
import {
|
|
85
85
|
isElectronLikeCommand,
|
|
86
86
|
unwrapStrippedElectronLaunch
|
|
@@ -1054,6 +1054,7 @@ var WORKTREE_MCP_TOOLS = [
|
|
|
1054
1054
|
"get_orchestrator",
|
|
1055
1055
|
"notify_orchestrator",
|
|
1056
1056
|
"set_workspace_tags",
|
|
1057
|
+
"set_wake_on_github_edges",
|
|
1057
1058
|
"get_viewer_context",
|
|
1058
1059
|
"update_viewer_context",
|
|
1059
1060
|
"list_env",
|
|
@@ -1163,6 +1164,7 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
|
|
|
1163
1164
|
"mcp__sideboard__get_orchestrator",
|
|
1164
1165
|
"mcp__sideboard__notify_orchestrator",
|
|
1165
1166
|
"mcp__sideboard__set_workspace_tags",
|
|
1167
|
+
"mcp__sideboard__set_wake_on_github_edges",
|
|
1166
1168
|
"mcp__sideboard__get_viewer_context",
|
|
1167
1169
|
"mcp__sideboard__update_viewer_context",
|
|
1168
1170
|
"mcp__sideboard__list_env",
|
|
@@ -2669,7 +2671,7 @@ var claudeAdapter = {
|
|
|
2669
2671
|
);
|
|
2670
2672
|
}
|
|
2671
2673
|
const mode = permissionMode(thread);
|
|
2672
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2674
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-VDCZMFCZ.js");
|
|
2673
2675
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2674
2676
|
const rpc = worktreeAgentRpc(isOrchestrator);
|
|
2675
2677
|
const injectedServers = await buildInjectedMcpServers({
|
|
@@ -2896,7 +2898,7 @@ var claudeAdapter = {
|
|
|
2896
2898
|
return { file: claude, args, cwd: thread.worktreePath };
|
|
2897
2899
|
},
|
|
2898
2900
|
async listLinearIssues(_repoPath) {
|
|
2899
|
-
const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-
|
|
2901
|
+
const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-KDLU7QWX.js");
|
|
2900
2902
|
return listAssignedLinearIssues2();
|
|
2901
2903
|
}
|
|
2902
2904
|
};
|
|
@@ -3987,7 +3989,7 @@ var opencodeAdapter = {
|
|
|
3987
3989
|
};
|
|
3988
3990
|
},
|
|
3989
3991
|
async listLinearIssues(_repoPath) {
|
|
3990
|
-
const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-
|
|
3992
|
+
const { listAssignedLinearIssues: listAssignedLinearIssues2 } = await import("./linear-list-KDLU7QWX.js");
|
|
3991
3993
|
return listAssignedLinearIssues2();
|
|
3992
3994
|
}
|
|
3993
3995
|
};
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
normalizeAbleTimeCredential,
|
|
7
7
|
normalizeAbleTimeHost,
|
|
8
8
|
rewriteAbleTimeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NDBMDHQ5.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-S3UGLMGE.js";
|
|
17
17
|
|
|
18
18
|
// src/integrations/abletime-rest.ts
|
|
19
19
|
var ABLETIME_REST_PREFIX = "/api/public/v2";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
getAbleTimeHost,
|
|
8
8
|
isAbleTimeConnected
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S3UGLMGE.js";
|
|
10
10
|
|
|
11
11
|
// src/integrations/abletime-mcp.ts
|
|
12
12
|
var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
|
|
@@ -155,7 +155,7 @@ function textsFromUnknown(value) {
|
|
|
155
155
|
return "";
|
|
156
156
|
}
|
|
157
157
|
async function abletimeMcpRequest(method, params, opts) {
|
|
158
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
158
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-2RUKRZYZ.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
159
159
|
if (!rawToken?.trim()) {
|
|
160
160
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
161
161
|
}
|
|
@@ -226,9 +226,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
226
226
|
if (!opts?.token && !isAbleTimeConnected()) {
|
|
227
227
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
228
228
|
}
|
|
229
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
229
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-2RUKRZYZ.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
230
230
|
if (rawToken && ableTimeUsesRest(rawToken)) {
|
|
231
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
231
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-UBLSGMSA.js");
|
|
232
232
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
233
233
|
}
|
|
234
234
|
const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
|
|
@@ -244,7 +244,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
244
244
|
return await call();
|
|
245
245
|
}
|
|
246
246
|
if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
|
|
247
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
247
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-UBLSGMSA.js");
|
|
248
248
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
249
249
|
}
|
|
250
250
|
throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
compactSummaryPart,
|
|
3
3
|
isInternalAgentStatusText,
|
|
4
4
|
lastAssistantMessageText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BIM24I3O.js";
|
|
6
6
|
import {
|
|
7
7
|
isCloudCoordinatorThread,
|
|
8
8
|
isGlobalThread,
|
|
9
9
|
isOrchestratorThread,
|
|
10
10
|
isSlackCoordinatorThread
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2BLJ726H.js";
|
|
12
12
|
import {
|
|
13
13
|
mergeAgentGitAuthEnv,
|
|
14
14
|
resolveAgentGitAuthEnv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-G3UV3GXJ.js";
|
|
16
16
|
import {
|
|
17
17
|
REVIEW_TAB_TITLE,
|
|
18
18
|
allocateTeamName,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
updateThread,
|
|
25
25
|
worktreeNameFromPath,
|
|
26
26
|
writeThread
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JX3OWNOT.js";
|
|
28
28
|
import {
|
|
29
29
|
ensureWorktreeSideboardIgnored
|
|
30
30
|
} from "./chunk-BMRJNRQK.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
assertOrchestratorCapableAgent,
|
|
51
51
|
contextTokens
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-TKEYXNXY.js";
|
|
53
53
|
import {
|
|
54
54
|
stripNestedElectronEnv
|
|
55
55
|
} from "./chunk-4TR3HZFT.js";
|
|
@@ -699,6 +699,7 @@ function worktreeBindingFrom(from) {
|
|
|
699
699
|
prIsInMergeQueue: from.prIsInMergeQueue,
|
|
700
700
|
prLabels: from.prLabels,
|
|
701
701
|
prChecksFailed: from.prChecksFailed,
|
|
702
|
+
wakeOnGithubEdges: from.wakeOnGithubEdges,
|
|
702
703
|
issueBlockedBy: from.issueBlockedBy,
|
|
703
704
|
skipAutoArchiveOnMerge: from.skipAutoArchiveOnMerge,
|
|
704
705
|
stackId: from.stackId,
|
|
@@ -1704,7 +1705,7 @@ var PORT_RANGE_SIZE = 10;
|
|
|
1704
1705
|
var RECLAIM_RETRY_DELAY_MS = 40;
|
|
1705
1706
|
var RECLAIM_TRIES = 8;
|
|
1706
1707
|
async function killReclaimable(ports, worktreePath, signal) {
|
|
1707
|
-
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-
|
|
1708
|
+
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-Q433HU77.js");
|
|
1708
1709
|
if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
|
|
1709
1710
|
else killListenersOnPorts2(ports);
|
|
1710
1711
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_ABLETIME_HOST,
|
|
3
3
|
normalizeAbleTimeHost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WO7VF4FG.js";
|
|
5
5
|
import {
|
|
6
6
|
httpFetch
|
|
7
7
|
} from "./chunk-JAT3JFOS.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getAbleTimeHost,
|
|
11
11
|
loadAppSettings,
|
|
12
12
|
saveAbleTimeConnection
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TKEYXNXY.js";
|
|
14
14
|
|
|
15
15
|
// src/integrations/abletime-oauth.ts
|
|
16
16
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -280,7 +280,7 @@ async function startAbleTimeOAuth(opts) {
|
|
|
280
280
|
persistAbleTimeTokens(data, { host });
|
|
281
281
|
const token = data.access_token.trim();
|
|
282
282
|
try {
|
|
283
|
-
const { getAbleTimeOrientation } = await import("./abletime-
|
|
283
|
+
const { getAbleTimeOrientation } = await import("./abletime-ZIYFR4SI.js");
|
|
284
284
|
const orientation = await getAbleTimeOrientation({ token, host });
|
|
285
285
|
return saveAbleTimeConnection({
|
|
286
286
|
accessToken: token,
|
|
@@ -565,6 +565,7 @@ function toolDescription(name, input) {
|
|
|
565
565
|
if (/get_orchestrator$/i.test(name)) return "Get orchestrator";
|
|
566
566
|
else if (/notify_orchestrator$/i.test(name)) return "Notify orchestrator";
|
|
567
567
|
else if (/set_workspace_tags$/i.test(name)) return "Set workspace tags";
|
|
568
|
+
else if (/set_wake_on_github_edges$/i.test(name)) return "Wake on CI / review";
|
|
568
569
|
if (/(?:list|set|delete)_env$/i.test(name)) return /list_env$/i.test(name) ? "List env vars" : /set_env$/i.test(name) ? "Set env var" : "Delete env var";
|
|
569
570
|
if (/list_schedules$/i.test(name)) return "List automations";
|
|
570
571
|
if (/create_schedule$/i.test(name)) {
|