@sideboard-ai/core 0.1.323 → 0.1.325

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.
Files changed (83) hide show
  1. package/dist/{abletime-5ZY3ZUUO.js → abletime-M7STTMZT.js} +6 -5
  2. package/dist/{abletime-CU2UPMJF.js → abletime-VL234MCP.js} +5 -4
  3. package/dist/{abletime-oauth-7EOSBEFM.js → abletime-oauth-LMMGMAPA.js} +3 -3
  4. package/dist/{abletime-oauth-4TTCR3CT.js → abletime-oauth-P4ZFBEAL.js} +3 -3
  5. package/dist/{abletime-rest-3TG4G7LW.js → abletime-rest-DLV7EIWS.js} +3 -3
  6. package/dist/{abletime-rest-KOKE7V4B.js → abletime-rest-GOI7HELR.js} +3 -3
  7. package/dist/agents/claude-runner.cjs +59 -22
  8. package/dist/agents/claude-runner.js +39 -16
  9. package/dist/agents/cursor-runner.cjs +96 -31
  10. package/dist/agents/cursor-runner.js +74 -24
  11. package/dist/{agents-2ZXORBEJ.js → agents-LDRM3BTY.js} +9 -8
  12. package/dist/{agents-SPRAOMGI.js → agents-MBIEAETM.js} +12 -11
  13. package/dist/{app-settings-I5HM5RMP.js → app-settings-E7DMMEKC.js} +1 -1
  14. package/dist/{app-settings-XIF4EC4K.js → app-settings-UQHUNOLV.js} +1 -1
  15. package/dist/{chunk-INBUV7HY.js → chunk-2UP3XD2D.js} +2 -2
  16. package/dist/{chunk-EQ52JR3Q.js → chunk-5MXLDDYF.js} +1 -1
  17. package/dist/{chunk-NCHOTN3C.js → chunk-5YCKATG6.js} +4 -3
  18. package/dist/{chunk-SKO7IGKU.js → chunk-7G27TB4M.js} +6 -6
  19. package/dist/chunk-7LUOLYFM.js +1445 -0
  20. package/dist/{chunk-Y3WREIPQ.js → chunk-A76MKMSF.js} +12 -210
  21. package/dist/{chunk-6W3XRKD5.js → chunk-APKUI4BP.js} +6 -7
  22. package/dist/{chunk-FR3SAYUL.js → chunk-AQEKPJWU.js} +5 -5
  23. package/dist/{chunk-QOS4465Y.js → chunk-BOFYI6LC.js} +1 -1
  24. package/dist/{chunk-FUFNMUNR.js → chunk-BTF3ATST.js} +7 -8
  25. package/dist/{chunk-OIHRC2ZJ.js → chunk-CI4M54LS.js} +22 -2
  26. package/dist/chunk-DBKHL7NC.js +214 -0
  27. package/dist/{chunk-ROOZDDFA.js → chunk-EO6ZFLG6.js} +7 -8
  28. package/dist/chunk-EZR6W4B3.js +1259 -0
  29. package/dist/{chunk-MZIZTSR2.js → chunk-F65JMKUR.js} +2 -2
  30. package/dist/chunk-F6GE7V3Q.js +216 -0
  31. package/dist/{chunk-4C5PQ7JA.js → chunk-GNLKBS3U.js} +206 -188
  32. package/dist/{chunk-EKU7FQVG.js → chunk-H36GKGU2.js} +2 -2
  33. package/dist/{chunk-53SBTCKF.js → chunk-HG6KS7OT.js} +294 -265
  34. package/dist/chunk-MBT6WDAB.js +28 -0
  35. package/dist/{chunk-D3VSKNVA.js → chunk-MFMDZAA6.js} +262 -233
  36. package/dist/{chunk-7PVT73H6.js → chunk-NWGINMEA.js} +12 -210
  37. package/dist/{chunk-QIC2JXHW.js → chunk-OOXRMTU6.js} +1 -1
  38. package/dist/{chunk-5XNT6BCG.js → chunk-OPXEJJBM.js} +1 -1
  39. package/dist/chunk-OYRN356W.js +80 -0
  40. package/dist/chunk-PPTJMBUY.js +25 -0
  41. package/dist/{chunk-B4CDSSRN.js → chunk-Q3FHTGIW.js} +2 -0
  42. package/dist/{chunk-EJ66LEKH.js → chunk-RZJTGBXY.js} +22 -2
  43. package/dist/{chunk-JDX3474T.js → chunk-SACHHTBJ.js} +207 -186
  44. package/dist/{chunk-5GDJSFCT.js → chunk-SK6NYGPD.js} +2 -2
  45. package/dist/{chunk-74OPNF7U.js → chunk-SQQBU7Z6.js} +2 -2
  46. package/dist/{chunk-Q3YJZPQI.js → chunk-SS6CYGLF.js} +3 -3
  47. package/dist/{chunk-YDUHLWI5.js → chunk-SUZOPJZC.js} +21 -7
  48. package/dist/{chunk-ZHGMRBSC.js → chunk-U5WO6MEB.js} +3 -3
  49. package/dist/{chunk-NXUN4U5P.js → chunk-VAFQS4D2.js} +2 -2
  50. package/dist/chunk-W3ZLE4PO.js +77 -0
  51. package/dist/{chunk-RTVS3M74.js → chunk-WYEST76H.js} +7 -7
  52. package/dist/{chunk-ODH3XHMI.js → chunk-ZEUMWHOH.js} +5 -5
  53. package/dist/{chunk-MYVKOIIY.js → chunk-ZHDXLDLA.js} +6 -7
  54. package/dist/{chunk-IFWGG2M2.js → chunk-ZSHS46V5.js} +2 -0
  55. package/dist/{conductor-52KTQ3IM.js → conductor-D4KFZF54.js} +6 -6
  56. package/dist/{conductor-FB7MKLRN.js → conductor-KB7L7NQN.js} +7 -7
  57. package/dist/{coordinator-prompt-7HXV7HJ5.js → coordinator-prompt-OBXEC63K.js} +4 -4
  58. package/dist/{coordinator-prompt-7W7WPY4X.js → coordinator-prompt-SUO4FRY3.js} +4 -4
  59. package/dist/{cursor-recover-TEBFKAZ4.js → cursor-recover-7F46PAJ5.js} +1 -1
  60. package/dist/{cursor-recover-OWPQUHFH.js → cursor-recover-BDIAZIE3.js} +1 -1
  61. package/dist/{global-workspace-EI3KBGZE.js → global-workspace-UHU2FXTY.js} +4 -4
  62. package/dist/{global-workspace-5BWUTSPJ.js → global-workspace-Z2SURNHA.js} +4 -4
  63. package/dist/index.cjs +21115 -20868
  64. package/dist/index.d.cts +28 -12
  65. package/dist/index.d.ts +28 -12
  66. package/dist/index.js +343 -1678
  67. package/dist/linear-HFUOUJ5H.js +67 -0
  68. package/dist/linear-SIHEBU3X.js +69 -0
  69. package/dist/linear-list-63I7QUC6.js +6 -0
  70. package/dist/linear-list-JFV3EES6.js +8 -0
  71. package/dist/mcp/run-stdio.cjs +15909 -15654
  72. package/dist/mcp/run-stdio.js +67 -1247
  73. package/dist/{optional-cli-RMMS5L6F.js → optional-cli-U2GUA2X6.js} +3 -3
  74. package/dist/{optional-cli-Y3Z3GIPZ.js → optional-cli-ULDP3O5S.js} +4 -4
  75. package/dist/{orchestrator-RMPZETOO.js → orchestrator-3H4KNGPN.js} +15 -13
  76. package/dist/{orchestrator-2RDE2YS3.js → orchestrator-6ROMEWBP.js} +14 -12
  77. package/dist/{thread-store-3F7GR64A.js → thread-store-4ZN3DS2W.js} +1 -1
  78. package/dist/{thread-store-JRSL4HQY.js → thread-store-IC4BQXDW.js} +1 -1
  79. package/dist/{workspaces-LJQS73K6.js → workspaces-MG5JHRKW.js} +4 -4
  80. package/dist/{workspaces-OPQ5NMM6.js → workspaces-QJNKEGEM.js} +4 -4
  81. package/dist/{worktree-ZDA2UJ7C.js → worktree-KSJPTHGZ.js} +3 -3
  82. package/dist/{worktree-4NGXCCUO.js → worktree-MYJYUHZM.js} +3 -3
  83. package/package.json +1 -1
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-2TUE6JKQ.js";
8
8
  import {
9
9
  resolveAgentExecutable
10
- } from "./chunk-EJ66LEKH.js";
10
+ } from "./chunk-RZJTGBXY.js";
11
11
 
12
12
  // src/agents/install.ts
13
13
  import { existsSync } from "fs";
@@ -265,7 +265,7 @@ async function loginAgent(agent) {
265
265
  };
266
266
  }
267
267
  async function loginManagedAccount(accountId) {
268
- const { loadAppSettings } = await import("./app-settings-XIF4EC4K.js");
268
+ const { loadAppSettings } = await import("./app-settings-UQHUNOLV.js");
269
269
  const { loginEnvPrefix } = await import("./managed-accounts-JJTAKHMG.js");
270
270
  const account = loadAppSettings().accounts.accounts.find((a) => a.id === accountId);
271
271
  if (!account) {
@@ -2,11 +2,11 @@ import {
2
2
  OPTIONAL_SERVICES,
3
3
  isOptionalServiceId,
4
4
  optionalServiceSpec
5
- } from "./chunk-INBUV7HY.js";
5
+ } from "./chunk-2UP3XD2D.js";
6
6
  import {
7
7
  installNpmGlobalPackage,
8
8
  whichOnPath
9
- } from "./chunk-5GDJSFCT.js";
9
+ } from "./chunk-SK6NYGPD.js";
10
10
  import {
11
11
  enrichPathWithNpmGlobalBin
12
12
  } from "./chunk-2TUE6JKQ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-ODH3XHMI.js";
4
+ } from "./chunk-ZEUMWHOH.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-EJ66LEKH.js";
13
+ } from "./chunk-RZJTGBXY.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-CU2UPMJF.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-VL234MCP.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -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
- async ensureSocket() {
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
- await new Promise((resolve, reject) => {
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
- resolve();
217
+ ws.off("close", failClose);
218
+ settled = true;
219
+ this.ws = ws;
220
+ this.connecting = null;
221
+ resolve(ws);
210
222
  });
211
223
  });
212
- return ws;
224
+ this.connecting = pending;
225
+ return pending;
213
226
  }
214
227
  drop(ws, err) {
215
- if (this.ws === ws) this.ws = null;
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
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  extractJsonErrorMessage,
3
3
  formatUnknownDetail
4
- } from "./chunk-5XNT6BCG.js";
4
+ } from "./chunk-OPXEJJBM.js";
5
5
  import {
6
6
  npmGlobalNodeModules,
7
7
  run
@@ -555,7 +555,8 @@ function preferredCursorCostCents(cost) {
555
555
  }
556
556
  function turnCostUsdFromCursorUsage(before, after) {
557
557
  if (!after) return void 0;
558
- const beforeIds = new Set((before?.runs ?? []).map((r) => r.runId));
558
+ if (before == null) return void 0;
559
+ const beforeIds = new Set((before.runs ?? []).map((r) => r.runId));
559
560
  const newRuns = (after.runs ?? []).filter((r) => !beforeIds.has(r.runId));
560
561
  let sum = 0;
561
562
  let any = false;
@@ -567,7 +568,6 @@ function turnCostUsdFromCursorUsage(before, after) {
567
568
  }
568
569
  }
569
570
  if (any) return sum / 100;
570
- if (before == null) return void 0;
571
571
  const afterCents = preferredCursorCostCents(after.cost);
572
572
  if (afterCents == null) return void 0;
573
573
  const beforeCents = preferredCursorCostCents(before.cost) ?? 0;
@@ -6,14 +6,14 @@ import {
6
6
  normalizeAbleTimeCredential,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-FR3SAYUL.js";
9
+ } from "./chunk-AQEKPJWU.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-OIHRC2ZJ.js";
16
+ } from "./chunk-CI4M54LS.js";
17
17
 
18
18
  // src/integrations/abletime-rest.ts
19
19
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -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
+ };
@@ -2,17 +2,17 @@ import {
2
2
  compactSummaryPart,
3
3
  isInternalAgentStatusText,
4
4
  lastAssistantMessageText
5
- } from "./chunk-QIC2JXHW.js";
5
+ } from "./chunk-OOXRMTU6.js";
6
6
  import {
7
7
  isCloudCoordinatorThread,
8
8
  isGlobalThread,
9
9
  isOrchestratorThread,
10
10
  isSlackCoordinatorThread
11
- } from "./chunk-6W3XRKD5.js";
11
+ } from "./chunk-APKUI4BP.js";
12
12
  import {
13
13
  mergeAgentGitAuthEnv,
14
14
  resolveAgentGitAuthEnv
15
- } from "./chunk-FUFNMUNR.js";
15
+ } from "./chunk-BTF3ATST.js";
16
16
  import {
17
17
  REVIEW_TAB_TITLE,
18
18
  allocateTeamName,
@@ -24,13 +24,13 @@ import {
24
24
  updateThread,
25
25
  worktreeNameFromPath,
26
26
  writeThread
27
- } from "./chunk-IFWGG2M2.js";
27
+ } from "./chunk-ZSHS46V5.js";
28
28
  import {
29
29
  ensureWorktreeSideboardIgnored
30
30
  } from "./chunk-QKHEVSB5.js";
31
31
  import {
32
32
  clipToolResultForStore
33
- } from "./chunk-5XNT6BCG.js";
33
+ } from "./chunk-OPXEJJBM.js";
34
34
  import {
35
35
  ATTACHMENTS_DIR,
36
36
  DETACHED_JOBS_DIR,
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  assertOrchestratorCapableAgent,
46
46
  contextTokens
47
- } from "./chunk-EJ66LEKH.js";
47
+ } from "./chunk-RZJTGBXY.js";
48
48
  import {
49
49
  stripNestedElectronEnv
50
50
  } from "./chunk-4TR3HZFT.js";
@@ -1808,7 +1808,7 @@ var PORT_RANGE_SIZE = 10;
1808
1808
  var RECLAIM_RETRY_DELAY_MS = 40;
1809
1809
  var RECLAIM_TRIES = 8;
1810
1810
  async function killReclaimable(ports, worktreePath, signal) {
1811
- const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-FB7MKLRN.js");
1811
+ const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-KB7L7NQN.js");
1812
1812
  if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
1813
1813
  else killListenersOnPorts2(ports);
1814
1814
  }
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-EJ66LEKH.js";
7
+ } from "./chunk-RZJTGBXY.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-7EOSBEFM.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-LMMGMAPA.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-7EOSBEFM.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-LMMGMAPA.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-KOKE7V4B.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-GOI7HELR.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-KOKE7V4B.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-GOI7HELR.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -7,7 +7,7 @@ import {
7
7
  resolveGithubRepoSlug,
8
8
  resolveOriginRemote,
9
9
  resolveRepoRoot
10
- } from "./chunk-ROOZDDFA.js";
10
+ } from "./chunk-EO6ZFLG6.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-OIHRC2ZJ.js";
27
+ } from "./chunk-CI4M54LS.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-B4CDSSRN.js";
36
+ } from "./chunk-Q3FHTGIW.js";
37
37
  import {
38
38
  appDataDir,
39
39
  globalAgentCwd,
@@ -454,7 +454,7 @@ function coordinatorTurnReminder(opts) {
454
454
  const goal = opts.goal?.trim();
455
455
  return [
456
456
  "Sideboard Orchestration (mandatory):",
457
- "- You oversee worktree agents from a synthetic empty cwd (not a git repo). Follow AGENTS.md / CLAUDE.md.",
457
+ "- You oversee worktree agents from a synthetic empty cwd (not a git repo). Follow AGENTS.md (CLAUDE.md imports it).",
458
458
  `- YOUR orchestration chat id is ${opts.parentId} \u2014 pass parentChatId="${opts.parentId}" on create_workspace, or omit it.`,
459
459
  goal ? `- Goal / title: ${goal}` : null,
460
460
  accountDefaultsPlaybookLine(),
@@ -518,10 +518,9 @@ function ensureGlobalCoordinatorCwd(opts) {
518
518
  "Always ask worktree agents to commit, push, and open draft PRs (`ask_git` / `send_to_chat`). If the user gave a goal (Greptile 5/5, CI green), pass that goal through so they watch-fix-push until it lands \u2014 do not start that loop on a plain push, and do not tell the human to poll. Tell them to merge only when the user explicitly asked. The worktree agent runs git/gh; never merge from this orchestration cwd."
519
519
  ].join("\n");
520
520
  try {
521
- writeFileSync2(join2(dir, "CLAUDE.md"), `${body}
522
- `, "utf8");
523
521
  writeFileSync2(join2(dir, "AGENTS.md"), `${body}
524
522
  `, "utf8");
523
+ writeFileSync2(join2(dir, "CLAUDE.md"), "@AGENTS.md\n", "utf8");
525
524
  } catch {
526
525
  }
527
526
  return dir;
@@ -545,7 +544,7 @@ function coordinatorSystemPrompt(opts) {
545
544
  ...intro,
546
545
  "You operate across ALL registered workspaces below.",
547
546
  "You have no project git home \u2014 this process cwd is synthetic and empty on purpose.",
548
- "Follow AGENTS.md / CLAUDE.md in this cwd for the fleet playbook (they are the same document).",
547
+ "Follow AGENTS.md in this cwd for the fleet playbook. CLAUDE.md is `@AGENTS.md` so Cursor does not load a second copy.",
549
548
  `YOUR orchestration chat id is ${opts.parentId} \u2014 pass parentChatId="${opts.parentId}" on create_workspace, or omit parentChatId (Sideboard binds it). Never invent a uuid.`,
550
549
  `Goal: ${opts.goal}`,
551
550
  "Registered workspaces:",
@@ -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
  }
@@ -34,21 +34,21 @@ import {
34
34
  tryReservePort,
35
35
  tryReservePorts,
36
36
  worktreeRunPortsPath
37
- } from "./chunk-SKO7IGKU.js";
38
- import "./chunk-EQ52JR3Q.js";
39
- import "./chunk-MYVKOIIY.js";
40
- import "./chunk-ROOZDDFA.js";
37
+ } from "./chunk-7G27TB4M.js";
38
+ import "./chunk-5MXLDDYF.js";
39
+ import "./chunk-ZHDXLDLA.js";
40
+ import "./chunk-EO6ZFLG6.js";
41
41
  import "./chunk-N2WW62LF.js";
42
42
  import "./chunk-4YXZOXMT.js";
43
43
  import "./chunk-YBTSZ2SW.js";
44
- import "./chunk-OIHRC2ZJ.js";
44
+ import "./chunk-CI4M54LS.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-B4CDSSRN.js";
51
+ import "./chunk-Q3FHTGIW.js";
52
52
  import "./chunk-WMZIANPV.js";
53
53
  import "./chunk-KGZBYWZ3.js";
54
54
  import {
@@ -32,18 +32,18 @@ import {
32
32
  tryReservePort,
33
33
  tryReservePorts,
34
34
  worktreeRunPortsPath
35
- } from "./chunk-RTVS3M74.js";
36
- import "./chunk-QIC2JXHW.js";
37
- import "./chunk-6W3XRKD5.js";
38
- import "./chunk-FUFNMUNR.js";
39
- import "./chunk-IFWGG2M2.js";
35
+ } from "./chunk-WYEST76H.js";
36
+ import "./chunk-OOXRMTU6.js";
37
+ import "./chunk-APKUI4BP.js";
38
+ import "./chunk-BTF3ATST.js";
39
+ import "./chunk-ZSHS46V5.js";
40
40
  import "./chunk-QKHEVSB5.js";
41
41
  import "./chunk-F2PVRF3B.js";
42
- import "./chunk-5XNT6BCG.js";
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-EJ66LEKH.js";
46
+ import "./chunk-RZJTGBXY.js";
47
47
  import "./chunk-77WWLBCI.js";
48
48
  import {
49
49
  stripNestedElectronEnv
@@ -7,15 +7,15 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-6W3XRKD5.js";
11
- import "./chunk-FUFNMUNR.js";
12
- import "./chunk-IFWGG2M2.js";
10
+ } from "./chunk-APKUI4BP.js";
11
+ import "./chunk-BTF3ATST.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-EJ66LEKH.js";
18
+ import "./chunk-RZJTGBXY.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-MYVKOIIY.js";
13
- import "./chunk-ROOZDDFA.js";
12
+ } from "./chunk-ZHDXLDLA.js";
13
+ import "./chunk-EO6ZFLG6.js";
14
14
  import "./chunk-N2WW62LF.js";
15
15
  import "./chunk-4YXZOXMT.js";
16
16
  import "./chunk-YBTSZ2SW.js";
17
- import "./chunk-OIHRC2ZJ.js";
17
+ import "./chunk-CI4M54LS.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-B4CDSSRN.js";
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 && endedAt < startedAfterMs) continue;
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 && endedAt < startedAfterMs) continue;
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-MYVKOIIY.js";
24
- import "./chunk-ROOZDDFA.js";
23
+ } from "./chunk-ZHDXLDLA.js";
24
+ import "./chunk-EO6ZFLG6.js";
25
25
  import "./chunk-N2WW62LF.js";
26
26
  import "./chunk-4YXZOXMT.js";
27
27
  import "./chunk-YBTSZ2SW.js";
28
- import "./chunk-OIHRC2ZJ.js";
28
+ import "./chunk-CI4M54LS.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-B4CDSSRN.js";
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-6W3XRKD5.js";
22
- import "./chunk-FUFNMUNR.js";
23
- import "./chunk-IFWGG2M2.js";
21
+ } from "./chunk-APKUI4BP.js";
22
+ import "./chunk-BTF3ATST.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-EJ66LEKH.js";
29
+ import "./chunk-RZJTGBXY.js";
30
30
  import "./chunk-77WWLBCI.js";
31
31
  import "./chunk-4TR3HZFT.js";
32
32
  import "./chunk-WDRMZKVB.js";