@sideboard-ai/core 0.1.339 → 0.1.341
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-TNONAVJG.js → abletime-AYYRRDT2.js} +4 -4
- package/dist/{abletime-OGOHNRVB.js → abletime-MK4T5FZY.js} +4 -4
- package/dist/{abletime-oauth-TYDQ73GK.js → abletime-oauth-7TOEFRWH.js} +3 -3
- package/dist/{abletime-oauth-DAZEUQJI.js → abletime-oauth-NB34M4X4.js} +3 -3
- package/dist/{abletime-rest-3FWZGTX6.js → abletime-rest-7M3QXAXY.js} +3 -3
- package/dist/{abletime-rest-B4VI46MI.js → abletime-rest-IF7IMJGU.js} +3 -3
- package/dist/{agents-QFXIBIKJ.js → agents-4WL4U5WD.js} +8 -8
- package/dist/{agents-6MSZHZOM.js → agents-FH5NVVCJ.js} +8 -8
- package/dist/{app-settings-KOSVLMO5.js → app-settings-377375BJ.js} +3 -1
- package/dist/{app-settings-YS5AUJTF.js → app-settings-YTOPIRDH.js} +3 -1
- package/dist/{chunk-W6J3ZWLJ.js → chunk-2IA556KV.js} +2 -2
- package/dist/{chunk-SYTTUNX6.js → chunk-3HJ2USRA.js} +1 -1
- package/dist/{chunk-5FGQTB2Z.js → chunk-43BOPWFV.js} +2 -2
- package/dist/{chunk-4BRO5LNX.js → chunk-47UDPUVZ.js} +3 -3
- package/dist/{chunk-FCBUDWP6.js → chunk-4BUTF5LN.js} +2 -2
- package/dist/{chunk-NHLTTT5G.js → chunk-4RIKHUKB.js} +7 -6
- package/dist/{chunk-HNW5KMGK.js → chunk-5MHENWO5.js} +2 -2
- package/dist/{chunk-6ABL7HZN.js → chunk-5VXE4ZI4.js} +10 -8
- package/dist/{chunk-DYUAVL5S.js → chunk-BIM24I3O.js} +1 -0
- package/dist/{chunk-VHHEQP5V.js → chunk-CMYGUGGZ.js} +11 -9
- package/dist/{chunk-5TVRPOVS.js → chunk-CN7GSNEL.js} +1 -1
- package/dist/{chunk-EZZY3EAZ.js → chunk-COFHTNQU.js} +666 -62
- package/dist/{chunk-N6TGSJVC.js → chunk-DF34F3QR.js} +10 -0
- package/dist/{chunk-PEJ3N5VE.js → chunk-DF3S5X3H.js} +7 -6
- package/dist/{chunk-LYJ5AVK4.js → chunk-FVX7JWFW.js} +2 -2
- package/dist/{chunk-4SP26Z6H.js → chunk-HNIEEKKR.js} +5 -5
- package/dist/{chunk-4OVQGZEI.js → chunk-HZRYQ27Z.js} +48 -26
- package/dist/{chunk-OMKTX7ZW.js → chunk-I5C42O2M.js} +3 -3
- package/dist/{chunk-Q73I6I2K.js → chunk-IY4YNHYD.js} +1 -1
- package/dist/{chunk-EVYOONTE.js → chunk-K355SYYX.js} +5 -5
- package/dist/{chunk-BD7QARIJ.js → chunk-MGV6JFDY.js} +5 -5
- package/dist/{chunk-KAIOL2M5.js → chunk-NF3KRZXV.js} +1 -1
- package/dist/{chunk-AFSLMWQK.js → chunk-O6UAW76V.js} +42 -3
- package/dist/{chunk-5KH3EQ2C.js → chunk-ORO4ENZR.js} +1 -0
- package/dist/{chunk-ELDHERAD.js → chunk-PHLFFV2M.js} +661 -56
- package/dist/{chunk-ERCYQTJU.js → chunk-QBUX2EDG.js} +48 -26
- package/dist/{chunk-FEGRY7NL.js → chunk-QULOUTDQ.js} +3 -3
- package/dist/{chunk-23KYDM2U.js → chunk-RZUZU5KD.js} +10 -0
- package/dist/{chunk-BDQFZAE6.js → chunk-SLTWZRBN.js} +43 -3
- package/dist/{chunk-QWFNKOGA.js → chunk-TZFYBQAD.js} +2 -2
- package/dist/{chunk-I2C5ZRVO.js → chunk-WSW27W5R.js} +1 -1
- package/dist/{chunk-WSZIJNAR.js → chunk-ZS7AY6DS.js} +5 -5
- package/dist/{conductor-AUUXCJZT.js → conductor-QZKG7YPO.js} +6 -6
- package/dist/{conductor-LEPTWN2U.js → conductor-RGVRIOTZ.js} +6 -6
- package/dist/{coordinator-prompt-CIWWP2P6.js → coordinator-prompt-66UHVADL.js} +4 -4
- package/dist/{coordinator-prompt-VO42IZWS.js → coordinator-prompt-CDVIFBYS.js} +4 -4
- package/dist/{global-workspace-MCAREQI7.js → global-workspace-FNDRAJLF.js} +4 -4
- package/dist/{global-workspace-FKXLFKYX.js → global-workspace-KMQSUF2G.js} +4 -4
- package/dist/index.cjs +965 -182
- package/dist/index.d.cts +45 -7
- package/dist/index.d.ts +45 -7
- package/dist/index.js +107 -25
- package/dist/{linear-5E2WI4QQ.js → linear-6DM4FJWT.js} +2 -2
- package/dist/{linear-P3LP455O.js → linear-ZJQM5IGJ.js} +2 -2
- package/dist/{linear-list-AXK62DPW.js → linear-list-4EPKZTYE.js} +1 -1
- package/dist/{linear-list-Y3INIBYH.js → linear-list-POPBU2VC.js} +1 -1
- package/dist/mcp/run-stdio.cjs +877 -108
- package/dist/mcp/run-stdio.js +97 -22
- package/dist/{optional-cli-6J6C4I3X.js → optional-cli-3G2274LT.js} +3 -3
- package/dist/{optional-cli-X6I35UNI.js → optional-cli-CZF2ZFU5.js} +4 -4
- package/dist/{orchestrator-JTFCNXVR.js → orchestrator-BKCQUMLB.js} +11 -11
- package/dist/{orchestrator-NOQDMYLB.js → orchestrator-SCFWTIE7.js} +11 -11
- package/dist/{thread-store-DCO5MZWJ.js → thread-store-OARQT6DL.js} +2 -2
- package/dist/{thread-store-QGBPSZU2.js → thread-store-W2SSO6IQ.js} +2 -2
- package/dist/{workspaces-D6FQCZRK.js → workspaces-6GB56LMJ.js} +4 -4
- package/dist/{workspaces-Y25L2EPV.js → workspaces-EWWLVSZ5.js} +4 -4
- package/dist/{worktree-S4YOAYRA.js → worktree-BRKMPZMJ.js} +5 -3
- package/dist/{worktree-GWS77LWX.js → worktree-OB5ABI22.js} +5 -3
- package/package.json +1 -1
|
@@ -1259,6 +1259,9 @@ function normalizeAdvanced(raw) {
|
|
|
1259
1259
|
if (typeof source.cowboyMode === "boolean") {
|
|
1260
1260
|
out.cowboyMode = source.cowboyMode;
|
|
1261
1261
|
}
|
|
1262
|
+
if (typeof source.wakeOrchestratorOnGithubEdges === "boolean") {
|
|
1263
|
+
out.wakeOrchestratorOnGithubEdges = source.wakeOrchestratorOnGithubEdges;
|
|
1264
|
+
}
|
|
1262
1265
|
if (typeof source.showCost === "boolean") {
|
|
1263
1266
|
out.showCost = source.showCost;
|
|
1264
1267
|
}
|
|
@@ -2161,6 +2164,9 @@ function updateAdvancedSettings(patch) {
|
|
|
2161
2164
|
if (typeof patch.cowboyMode === "boolean") {
|
|
2162
2165
|
advanced.cowboyMode = patch.cowboyMode;
|
|
2163
2166
|
}
|
|
2167
|
+
if (typeof patch.wakeOrchestratorOnGithubEdges === "boolean") {
|
|
2168
|
+
advanced.wakeOrchestratorOnGithubEdges = patch.wakeOrchestratorOnGithubEdges;
|
|
2169
|
+
}
|
|
2164
2170
|
if (typeof patch.showCost === "boolean") {
|
|
2165
2171
|
advanced.showCost = patch.showCost;
|
|
2166
2172
|
}
|
|
@@ -2266,6 +2272,9 @@ function deleteBranchOnPurgeEnabled(settings = loadAppSettings()) {
|
|
|
2266
2272
|
function cowboyModeEnabled(settings = loadAppSettings()) {
|
|
2267
2273
|
return Boolean(settings.advanced.cowboyMode);
|
|
2268
2274
|
}
|
|
2275
|
+
function wakeOrchestratorOnGithubEdgesEnabled(settings = loadAppSettings()) {
|
|
2276
|
+
return Boolean(settings.advanced.wakeOrchestratorOnGithubEdges);
|
|
2277
|
+
}
|
|
2269
2278
|
function showCostEnabled(settings = loadAppSettings()) {
|
|
2270
2279
|
return Boolean(settings.advanced.showCost);
|
|
2271
2280
|
}
|
|
@@ -2509,6 +2518,7 @@ export {
|
|
|
2509
2518
|
caffeinateWhileCloudConnectEnabled,
|
|
2510
2519
|
deleteBranchOnPurgeEnabled,
|
|
2511
2520
|
cowboyModeEnabled,
|
|
2521
|
+
wakeOrchestratorOnGithubEdgesEnabled,
|
|
2512
2522
|
showCostEnabled,
|
|
2513
2523
|
chatTextScale,
|
|
2514
2524
|
confirmClaudeUsageOverLimitEnabled,
|
|
@@ -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-MGV6JFDY.js";
|
|
12
12
|
import {
|
|
13
13
|
mergeAgentGitAuthEnv,
|
|
14
14
|
resolveAgentGitAuthEnv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HZRYQ27Z.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-SLTWZRBN.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-RZUZU5KD.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-QZKG7YPO.js");
|
|
1708
1709
|
if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
|
|
1709
1710
|
else killListenersOnPorts2(ports);
|
|
1710
1711
|
}
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
normalizeAbleTimeCredential,
|
|
7
7
|
normalizeAbleTimeHost,
|
|
8
8
|
rewriteAbleTimeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZS7AY6DS.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-DF34F3QR.js";
|
|
17
17
|
|
|
18
18
|
// src/integrations/abletime-rest.ts
|
|
19
19
|
var ABLETIME_REST_PREFIX = "/api/public/v2";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getAbleTimeHost,
|
|
6
6
|
isAbleTimeConnected
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RZUZU5KD.js";
|
|
8
8
|
|
|
9
9
|
// src/integrations/abletime-mcp.ts
|
|
10
10
|
var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
|
|
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
|
|
|
153
153
|
return "";
|
|
154
154
|
}
|
|
155
155
|
async function abletimeMcpRequest(method, params, opts) {
|
|
156
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
156
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-7TOEFRWH.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
157
157
|
if (!rawToken?.trim()) {
|
|
158
158
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
159
159
|
}
|
|
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
224
224
|
if (!opts?.token && !isAbleTimeConnected()) {
|
|
225
225
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
226
226
|
}
|
|
227
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
227
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-7TOEFRWH.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
228
228
|
if (rawToken && ableTimeUsesRest(rawToken)) {
|
|
229
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
229
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-IF7IMJGU.js");
|
|
230
230
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
231
231
|
}
|
|
232
232
|
const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
|
|
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
242
242
|
return await call();
|
|
243
243
|
}
|
|
244
244
|
if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
|
|
245
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
245
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-IF7IMJGU.js");
|
|
246
246
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
247
247
|
}
|
|
248
248
|
throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
normalizeTakenSlug,
|
|
5
5
|
normalizeWorktreePath,
|
|
6
6
|
takenSlugsFromThread
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SLTWZRBN.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-RZUZU5KD.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,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
abletimeRestUrl,
|
|
5
5
|
textFromAbleTimeDoc
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FVX7JWFW.js";
|
|
7
7
|
import {
|
|
8
8
|
assertAbleTimeCredential,
|
|
9
9
|
callAbleTimeTool,
|
|
10
10
|
normalizeAbleTimeHost,
|
|
11
11
|
rewriteAbleTimeError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZS7AY6DS.js";
|
|
13
13
|
import {
|
|
14
14
|
downloadAuthenticatedFile,
|
|
15
15
|
extractHttpUrls,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getAbleTimeHost,
|
|
28
28
|
isAbleTimeConnected,
|
|
29
29
|
saveAbleTimeConnection
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DF34F3QR.js";
|
|
31
31
|
|
|
32
32
|
// src/integrations/abletime-attachments.ts
|
|
33
33
|
function asRecord(value) {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveGithubRepoSlug,
|
|
8
8
|
resolveOriginRemote,
|
|
9
9
|
resolveRepoRoot
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QBUX2EDG.js";
|
|
11
11
|
import {
|
|
12
12
|
ATTACHMENTS_DIR,
|
|
13
13
|
attachmentsGitignoreBody
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
teamSlugFromName,
|
|
21
21
|
updateThread,
|
|
22
22
|
writeThread
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-O6UAW76V.js";
|
|
24
24
|
import {
|
|
25
25
|
assertOrchestratorCapableAgent,
|
|
26
26
|
formatAccountProfilePlaybookLine,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resolveThreadDefaults,
|
|
34
34
|
resolveViewerProfile,
|
|
35
35
|
resolveViewerProfileForRepo
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-DF34F3QR.js";
|
|
37
37
|
import {
|
|
38
38
|
appDataDir,
|
|
39
39
|
globalAgentCwd,
|
|
@@ -357,12 +357,12 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
357
357
|
"- get_viewer_context / update_viewer_context \u2014 read or replace Settings \u2192 Agents (account) and Settings \u2192 Projects (per-repo) context. You can update a project: pass scope=project and repoPath from list_projects (this cwd is not a project). update_viewer_context requires confirmed=true after ask_user. Never write context unprompted.",
|
|
358
358
|
"- list_env / set_env / delete_env \u2014 Settings \u2192 Environment. scope=project requires repoPath from list_projects and stores the key under that project prefix (the project name, uppercased, plus _). APPLE_ID for sideboard is SIDEBOARD_APPLE_ID. scope=account is shared by every project and is not prefixed. list_env returns names only.",
|
|
359
359
|
"- set_caffeinate \u2014 keep this Mac awake across turns (macOS caffeinate). A connected phone already holds caffeinate (lid can close on power), so do not turn this on just because they are on the phone. Turn on for overnight work, or when the user will be away and no phone is connected. Turn OFF when they say they are done, wrapping up, going to sleep, or no longer need the machine awake. Closing this chat also releases it.",
|
|
360
|
-
"- list_schedules / create_schedule / update_schedule / delete_schedule / run_schedule \u2014 automations that send a prompt to a chat (chatId or self) or start a new Global chat (omit chatId). A job bound to a chat is removed when that chat is archived. Omit chatId only for a Global automation that should outlive the chat. One-shot `at`, interval `every` (15m/1h/6h/1d), clock time `time` + `days` (07:30 and weekdays, or mon,wed), or 5-field `cron`. Recurring jobs without chatId open a new chat each run and archive it when that run finishes unless archiveChat is false (leave the chat open to keep talking). History keeps the last 5 archived
|
|
360
|
+
"- list_schedules / create_schedule / update_schedule / delete_schedule / run_schedule \u2014 automations that send a prompt to a chat (chatId or self) or start a new Global chat (omit chatId). A job bound to a chat is removed when that chat is archived. Omit chatId only for a Global automation that should outlive the chat. One-shot `at`, interval `every` (15m/1h/6h/1d), clock time `time` + `days` (07:30 and weekdays, or mon,wed), or 5-field `cron`. Recurring jobs without chatId open a new chat each run and archive it when that run finishes unless archiveChat is false (leave the chat open to keep talking). History keeps the last 5 archived chats for that automation. list_schedules includes runs, the last 10 fires (at, threadId, error). To schedule a prompt from this chat, call create_schedule (omit chatId for a new Global chat, or chatId=self). Worktree agents have the same tools (`chatId=self` continues that coding chat and is removed when that chat is archived). Jobs fire only while Sideboard.app is running; sleep skips until wake. Creating or enabling a future job turns on Settings \u2192 Advanced \u2192 Caffeinate while automations are enabled (or call set_caffeinate). The desktop lists them in the sidebar after Board.",
|
|
361
361
|
"Projects:",
|
|
362
362
|
"- add_project / remove_project \u2014 register or unregister a git repo",
|
|
363
363
|
"Workspaces and chats:",
|
|
364
364
|
'- create_workspace \u2014 create a workspace (isolated checkout + first chat) from branch | pr | ticket (appears on Home). A ticket, PR, or named branch has one checkout: a second call returns that workspace (alreadyStarted=true) and chats for every agent already on it. That is not one agent. To put another agent on that checkout, fork_chat. send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated workspace. Pass repoPath + parentChatId; omit agent and model so Sideboard applies Settings \u2192 Default agent, model & effort (never pass your own agent or agent=cursor). Pass the same tags (short labels, e.g. "phone-sync") on every workspace you open for one task so they group in the sidebar; reusing a checkout adds those tags. If the repo has a setup script, Sideboard runs it in the background (does not block send_to_chat). Nested Codex (you are Codex and the child would be Codex) can deadlock on ~/.codex locks \u2014 omit agent; Sideboard switches the child to Cursor when a CURSOR_API_KEY is set, otherwise keeps the Account default',
|
|
365
|
-
"- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref).",
|
|
365
|
+
"- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref). set_wake_on_github_edges opts a workspace into CI and review-request wakes once Settings \u2192 Advanced is on. Pass a child chat id. Do not flip the Advanced switch.",
|
|
366
366
|
"- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns ready vs waiting. Start ready steps with create_workspace or send_to_chat. Leave waiting steps alone. Merge only if they asked. Worktree agents show_plan to open the diagram and this checkout's implementation plan when plan.md exists. set_dependency / clear_dependency only for a step they are part of. A dependency says one PR, issue, or workspace must reach a gate before another can start or merge. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency (Sideboard cannot see production). hold=start blocks starting the subject; hold=merge blocks merging it. Example: PR 1 in prod before PR 2 can merge; PR 3 in main before issue 4 can start. Pass waitsOnKind (pr|issue|workspace), waitsOnRef, gate, subjectKind, subjectRef, hold. Pass repoPath when the same number exists in more than one project. A step can name another orchestration chat (kind orchestration, ref that chat id). That chat drafts its own plan. Each orchestration chat opens its own plan with show_plan. Worktree agents set their own checkout and omit subject. Plan mode on a workspace agent stays a separate plan for that checkout. Do not tell a child to merge or start while list_order still marks that step waiting.",
|
|
367
367
|
"- start_board_card \u2014 same as create_workspace for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_chat.",
|
|
368
368
|
"- fork_workspace \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
resolveGithubRepoSlug,
|
|
6
6
|
resolveOriginRemote,
|
|
7
7
|
resolveRepoRoot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HZRYQ27Z.js";
|
|
9
9
|
import {
|
|
10
10
|
allocateTeamName,
|
|
11
11
|
createEmptyThread,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
teamSlugFromName,
|
|
15
15
|
updateThread,
|
|
16
16
|
writeThread
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SLTWZRBN.js";
|
|
18
18
|
import {
|
|
19
19
|
ATTACHMENTS_DIR,
|
|
20
20
|
attachmentsGitignoreBody
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveThreadDefaults,
|
|
32
32
|
resolveViewerProfile,
|
|
33
33
|
resolveViewerProfileForRepo
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RZUZU5KD.js";
|
|
35
35
|
import {
|
|
36
36
|
appDataDir,
|
|
37
37
|
globalAgentCwd,
|
|
@@ -402,12 +402,12 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
402
402
|
"- get_viewer_context / update_viewer_context \u2014 read or replace Settings \u2192 Agents (account) and Settings \u2192 Projects (per-repo) context. You can update a project: pass scope=project and repoPath from list_projects (this cwd is not a project). update_viewer_context requires confirmed=true after ask_user. Never write context unprompted.",
|
|
403
403
|
"- list_env / set_env / delete_env \u2014 Settings \u2192 Environment. scope=project requires repoPath from list_projects and stores the key under that project prefix (the project name, uppercased, plus _). APPLE_ID for sideboard is SIDEBOARD_APPLE_ID. scope=account is shared by every project and is not prefixed. list_env returns names only.",
|
|
404
404
|
"- set_caffeinate \u2014 keep this Mac awake across turns (macOS caffeinate). A connected phone already holds caffeinate (lid can close on power), so do not turn this on just because they are on the phone. Turn on for overnight work, or when the user will be away and no phone is connected. Turn OFF when they say they are done, wrapping up, going to sleep, or no longer need the machine awake. Closing this chat also releases it.",
|
|
405
|
-
"- list_schedules / create_schedule / update_schedule / delete_schedule / run_schedule \u2014 automations that send a prompt to a chat (chatId or self) or start a new Global chat (omit chatId). A job bound to a chat is removed when that chat is archived. Omit chatId only for a Global automation that should outlive the chat. One-shot `at`, interval `every` (15m/1h/6h/1d), clock time `time` + `days` (07:30 and weekdays, or mon,wed), or 5-field `cron`. Recurring jobs without chatId open a new chat each run and archive it when that run finishes unless archiveChat is false (leave the chat open to keep talking). History keeps the last 5 archived
|
|
405
|
+
"- list_schedules / create_schedule / update_schedule / delete_schedule / run_schedule \u2014 automations that send a prompt to a chat (chatId or self) or start a new Global chat (omit chatId). A job bound to a chat is removed when that chat is archived. Omit chatId only for a Global automation that should outlive the chat. One-shot `at`, interval `every` (15m/1h/6h/1d), clock time `time` + `days` (07:30 and weekdays, or mon,wed), or 5-field `cron`. Recurring jobs without chatId open a new chat each run and archive it when that run finishes unless archiveChat is false (leave the chat open to keep talking). History keeps the last 5 archived chats for that automation. list_schedules includes runs, the last 10 fires (at, threadId, error). To schedule a prompt from this chat, call create_schedule (omit chatId for a new Global chat, or chatId=self). Worktree agents have the same tools (`chatId=self` continues that coding chat and is removed when that chat is archived). Jobs fire only while Sideboard.app is running; sleep skips until wake. Creating or enabling a future job turns on Settings \u2192 Advanced \u2192 Caffeinate while automations are enabled (or call set_caffeinate). The desktop lists them in the sidebar after Board.",
|
|
406
406
|
"Projects:",
|
|
407
407
|
"- add_project / remove_project \u2014 register or unregister a git repo",
|
|
408
408
|
"Workspaces and chats:",
|
|
409
409
|
'- create_workspace \u2014 create a workspace (isolated checkout + first chat) from branch | pr | ticket (appears on Home). A ticket, PR, or named branch has one checkout: a second call returns that workspace (alreadyStarted=true) and chats for every agent already on it. That is not one agent. To put another agent on that checkout, fork_chat. send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated workspace. Pass repoPath + parentChatId; omit agent and model so Sideboard applies Settings \u2192 Default agent, model & effort (never pass your own agent or agent=cursor). Pass the same tags (short labels, e.g. "phone-sync") on every workspace you open for one task so they group in the sidebar; reusing a checkout adds those tags. If the repo has a setup script, Sideboard runs it in the background (does not block send_to_chat). Nested Codex (you are Codex and the child would be Codex) can deadlock on ~/.codex locks \u2014 omit agent; Sideboard switches the child to Cursor when a CURSOR_API_KEY is set, otherwise keeps the Account default',
|
|
410
|
-
"- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref).",
|
|
410
|
+
"- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref). set_wake_on_github_edges opts a workspace into CI and review-request wakes once Settings \u2192 Advanced is on. Pass a child chat id. Do not flip the Advanced switch.",
|
|
411
411
|
"- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns ready vs waiting. Start ready steps with create_workspace or send_to_chat. Leave waiting steps alone. Merge only if they asked. Worktree agents show_plan to open the diagram and this checkout's implementation plan when plan.md exists. set_dependency / clear_dependency only for a step they are part of. A dependency says one PR, issue, or workspace must reach a gate before another can start or merge. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency (Sideboard cannot see production). hold=start blocks starting the subject; hold=merge blocks merging it. Example: PR 1 in prod before PR 2 can merge; PR 3 in main before issue 4 can start. Pass waitsOnKind (pr|issue|workspace), waitsOnRef, gate, subjectKind, subjectRef, hold. Pass repoPath when the same number exists in more than one project. A step can name another orchestration chat (kind orchestration, ref that chat id). That chat drafts its own plan. Each orchestration chat opens its own plan with show_plan. Worktree agents set their own checkout and omit subject. Plan mode on a workspace agent stays a separate plan for that checkout. Do not tell a child to merge or start while list_order still marks that step waiting.",
|
|
412
412
|
"- start_board_card \u2014 same as create_workspace for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_chat.",
|
|
413
413
|
"- fork_workspace \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var LIST_TIMEOUT_MS = 15e3;
|
|
3
3
|
async function listAssignedLinearIssues(opts) {
|
|
4
4
|
try {
|
|
5
|
-
const { listLinearIssuesDirect } = await import("./linear-
|
|
5
|
+
const { listLinearIssuesDirect } = await import("./linear-6DM4FJWT.js");
|
|
6
6
|
const listed = listLinearIssuesDirect({ limit: 50 }).catch(() => []);
|
|
7
7
|
let timer;
|
|
8
8
|
try {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isOrchestratorCapableAgent,
|
|
10
10
|
normalizeThinkingEffort,
|
|
11
11
|
updateAdvancedSettings
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DF34F3QR.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,
|
|
@@ -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)) {
|