@sideboard-ai/core 0.1.209 → 0.1.210

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 (48) hide show
  1. package/dist/{abletime-G3MWSZVM.js → abletime-GDZLZRMY.js} +4 -4
  2. package/dist/{abletime-SQREWITG.js → abletime-QGGYL2G4.js} +4 -4
  3. package/dist/{abletime-oauth-SQD6K47H.js → abletime-oauth-3X3BAPTF.js} +3 -3
  4. package/dist/{abletime-oauth-7AOE4KJL.js → abletime-oauth-F335TWKY.js} +3 -3
  5. package/dist/{abletime-rest-QRTJH42S.js → abletime-rest-LAGTPAJL.js} +3 -3
  6. package/dist/{abletime-rest-BXL7QHCX.js → abletime-rest-PLJVY3H3.js} +3 -3
  7. package/dist/{agents-KA6HDNNP.js → agents-G3TFVFBQ.js} +5 -5
  8. package/dist/{agents-U2NVCYGC.js → agents-IQZUN47D.js} +5 -5
  9. package/dist/{app-settings-VBQHGX5Z.js → app-settings-2TN3WLZV.js} +1 -1
  10. package/dist/{app-settings-6SZLZNA7.js → app-settings-XCRNCEEE.js} +1 -1
  11. package/dist/{chunk-B2RPIHNJ.js → chunk-2M5B7YNY.js} +2 -2
  12. package/dist/{chunk-HBL7ILQA.js → chunk-2R6BZRRB.js} +21 -21
  13. package/dist/{chunk-TZCWNRMC.js → chunk-3S2LDD2F.js} +3 -3
  14. package/dist/{chunk-CQZCXRVG.js → chunk-42IULNIY.js} +3 -3
  15. package/dist/{chunk-MZP2C4KE.js → chunk-AOQZZA3M.js} +22 -22
  16. package/dist/{chunk-FUC3XFE2.js → chunk-BTC2D6LS.js} +2 -0
  17. package/dist/{chunk-OY7THBLG.js → chunk-FGTPRMPS.js} +8 -1
  18. package/dist/{chunk-5LFD3KCJ.js → chunk-G4TANQC3.js} +5 -5
  19. package/dist/{chunk-VJQDUD24.js → chunk-L5CIEBLR.js} +2 -0
  20. package/dist/{chunk-XRIF6M5H.js → chunk-LS6TSOCE.js} +5 -5
  21. package/dist/{chunk-IOOL3T7Q.js → chunk-MN6YUD4O.js} +3 -3
  22. package/dist/{chunk-MS2P5GXL.js → chunk-NDE5RKZP.js} +4 -4
  23. package/dist/{chunk-QVVJO4GN.js → chunk-REZRGCKV.js} +3 -3
  24. package/dist/{chunk-42VGWRSE.js → chunk-WX4S775K.js} +2 -2
  25. package/dist/{chunk-RPZFNKND.js → chunk-X5PUFYDJ.js} +8 -1
  26. package/dist/{chunk-IIENQFJ6.js → chunk-YVE4PXCJ.js} +2 -2
  27. package/dist/{chunk-KJAHVQL6.js → chunk-YYELAUKP.js} +4 -4
  28. package/dist/{chunk-PTOIWKDU.js → chunk-ZC664YBJ.js} +3 -3
  29. package/dist/{chunk-22A45QOI.js → chunk-ZZNZX2QW.js} +2 -2
  30. package/dist/{coordinator-prompt-EO2X2EYW.js → coordinator-prompt-GCITY3Q5.js} +4 -4
  31. package/dist/{coordinator-prompt-2YCOE5R4.js → coordinator-prompt-PONGPWIP.js} +4 -4
  32. package/dist/{global-workspace-H2ANUSGR.js → global-workspace-LIZHU4GM.js} +4 -4
  33. package/dist/{global-workspace-JEKMVE42.js → global-workspace-LQZLTGFL.js} +4 -4
  34. package/dist/index.cjs +10 -1
  35. package/dist/index.d.cts +5 -3
  36. package/dist/index.d.ts +5 -3
  37. package/dist/index.js +12 -12
  38. package/dist/mcp/run-stdio.cjs +10 -1
  39. package/dist/mcp/run-stdio.js +11 -11
  40. package/dist/{orchestrator-RUQXDYM7.js → orchestrator-G5HELCVT.js} +6 -6
  41. package/dist/{orchestrator-N7LLTK5O.js → orchestrator-ZBUXJCII.js} +6 -6
  42. package/dist/{thread-store-CMZWM5NY.js → thread-store-FCWU7Y3X.js} +1 -1
  43. package/dist/{thread-store-55X2JYDT.js → thread-store-KMZRQEPY.js} +1 -1
  44. package/dist/{workspaces-SVDORZEI.js → workspaces-2XW2DMRG.js} +4 -4
  45. package/dist/{workspaces-2YNYLSPV.js → workspaces-T6PMQZYQ.js} +4 -4
  46. package/dist/{worktree-5CPGB4D2.js → worktree-2OEMMFRT.js} +3 -3
  47. package/dist/{worktree-YQ6XUSR2.js → worktree-5ZGWKKZ6.js} +3 -3
  48. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-VJQDUD24.js";
7
+ } from "./chunk-L5CIEBLR.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-SQD6K47H.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-3X3BAPTF.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-SQD6K47H.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-3X3BAPTF.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-BXL7QHCX.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-PLJVY3H3.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-BXL7QHCX.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-PLJVY3H3.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -453,6 +453,8 @@ function clampHistoryMaxDays(value) {
453
453
  return Math.min(HISTORY_MAX_DAYS_MAX, Math.floor(value));
454
454
  }
455
455
  function archivedUpdatedMs(thread) {
456
+ const stamped = thread.archivedAt ? Date.parse(thread.archivedAt) : NaN;
457
+ if (Number.isFinite(stamped)) return stamped;
456
458
  const updated = Date.parse(thread.updatedAt);
457
459
  if (Number.isFinite(updated)) return updated;
458
460
  const created = Date.parse(thread.createdAt);
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  getAbleTimeHost,
8
8
  isAbleTimeConnected
9
- } from "./chunk-FUC3XFE2.js";
9
+ } from "./chunk-BTC2D6LS.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-7AOE4KJL.js").then((m) => m.ensureAbleTimeAccessToken());
158
+ const rawToken = opts?.token ?? await import("./abletime-oauth-F335TWKY.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-7AOE4KJL.js").then((m) => m.ensureAbleTimeAccessToken());
229
+ const rawToken = opts?.token ?? await import("./abletime-oauth-F335TWKY.js").then((m) => m.ensureAbleTimeAccessToken());
230
230
  if (rawToken && ableTimeUsesRest(rawToken)) {
231
- const { callAbleTimeRestTool } = await import("./abletime-rest-QRTJH42S.js");
231
+ const { callAbleTimeRestTool } = await import("./abletime-rest-LAGTPAJL.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-QRTJH42S.js");
247
+ const { callAbleTimeRestTool } = await import("./abletime-rest-LAGTPAJL.js");
248
248
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
249
249
  }
250
250
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-5LFD3KCJ.js";
4
+ } from "./chunk-G4TANQC3.js";
5
5
  import {
6
6
  httpFetch
7
7
  } from "./chunk-N7WZ6NIN.js";
@@ -10,7 +10,7 @@ import {
10
10
  getAbleTimeHost,
11
11
  loadAppSettings,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-VJQDUD24.js";
13
+ } from "./chunk-L5CIEBLR.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-G3MWSZVM.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-GDZLZRMY.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  isOrchestratorThread
5
- } from "./chunk-PTOIWKDU.js";
5
+ } from "./chunk-ZC664YBJ.js";
6
6
  import {
7
7
  applyConnectedTeamToCli,
8
8
  brightsyMcpServerName,
@@ -20,7 +20,7 @@ import {
20
20
  mergeAgentGitAuthEnv,
21
21
  resolveAgentGitAuthEnv,
22
22
  resolveCodexGitWritableRoots
23
- } from "./chunk-42VGWRSE.js";
23
+ } from "./chunk-WX4S775K.js";
24
24
  import {
25
25
  enrichPathWithNpmGlobalBin,
26
26
  isConductorBundledCli,
@@ -39,7 +39,7 @@ import {
39
39
  resolveClaudeExecutable,
40
40
  unwrapStrippedElectronLaunch,
41
41
  wrapElectronAsNodeLaunch
42
- } from "./chunk-FUC3XFE2.js";
42
+ } from "./chunk-BTC2D6LS.js";
43
43
  import {
44
44
  appDataDir
45
45
  } from "./chunk-EQNRWDLN.js";
@@ -2414,7 +2414,7 @@ var claudeAdapter = {
2414
2414
  );
2415
2415
  }
2416
2416
  const mode = permissionMode(thread);
2417
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-H2ANUSGR.js");
2417
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-LIZHU4GM.js");
2418
2418
  const isOrchestrator = isOrchestratorThread2(thread);
2419
2419
  const injectedServers = await buildInjectedMcpServers({
2420
2420
  includeSideboard: true,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  textFromAbleTimeDoc
3
- } from "./chunk-B2RPIHNJ.js";
3
+ } from "./chunk-2M5B7YNY.js";
4
4
  import {
5
5
  assertAbleTimeCredential,
6
6
  callAbleTimeTool,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-5LFD3KCJ.js";
9
+ } from "./chunk-G4TANQC3.js";
10
10
  import {
11
11
  isAbleTimeConnected,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-VJQDUD24.js";
13
+ } from "./chunk-L5CIEBLR.js";
14
14
 
15
15
  // src/integrations/abletime.ts
16
16
  var CLOSED_STATES = /* @__PURE__ */ new Set([
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-D6JWYJ4P.js";
6
6
  import {
7
7
  listThreads
8
- } from "./chunk-RPZFNKND.js";
8
+ } from "./chunk-X5PUFYDJ.js";
9
9
  import {
10
10
  ensureWorktreeSideboardIgnored
11
11
  } from "./chunk-SYFVUF2C.js";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  getGithubGitAuthMode,
24
24
  getGithubPat
25
- } from "./chunk-FUC3XFE2.js";
25
+ } from "./chunk-BTC2D6LS.js";
26
26
  import {
27
27
  worktreesRoot
28
28
  } from "./chunk-EQNRWDLN.js";
@@ -58,7 +58,8 @@ function normalizeThread(raw) {
58
58
  userSetTitle: Boolean(raw.userSetTitle),
59
59
  activeRuns: Array.isArray(raw.activeRuns) ? raw.activeRuns : [],
60
60
  quotaResumeAt: raw.quotaResumeAt ?? null,
61
- quotaContinuedFromId: raw.quotaContinuedFromId ?? null
61
+ quotaContinuedFromId: raw.quotaContinuedFromId ?? null,
62
+ archivedAt: typeof raw.archivedAt === "string" && raw.archivedAt.trim() ? raw.archivedAt.trim() : void 0
62
63
  };
63
64
  }
64
65
  function createEmptyThread(partial) {
@@ -93,6 +94,7 @@ function createEmptyThread(partial) {
93
94
  pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
94
95
  createdAt: ts,
95
96
  updatedAt: ts,
97
+ archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
96
98
  title: partial.title,
97
99
  sourceType: partial.sourceType,
98
100
  sourceRef: partial.sourceRef,
@@ -222,6 +224,11 @@ function updateThread(id, patch) {
222
224
  const current = readThread(id);
223
225
  if (!current) throw new Error(`Thread not found: ${id}`);
224
226
  const next = { ...current, ...patch, id: current.id, updatedAt: nowIso() };
227
+ if (next.status === "archived") {
228
+ next.archivedAt = typeof next.archivedAt === "string" && next.archivedAt.trim() || current.archivedAt || nowIso();
229
+ } else {
230
+ delete next.archivedAt;
231
+ }
225
232
  writeThread(next);
226
233
  return next;
227
234
  }
@@ -6,14 +6,14 @@ import {
6
6
  normalizeAbleTimeCredential,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-XRIF6M5H.js";
9
+ } from "./chunk-LS6TSOCE.js";
10
10
  import {
11
11
  httpFetch
12
12
  } from "./chunk-VKQGAWHY.js";
13
13
  import {
14
14
  getAbleTimeAccessToken,
15
15
  getAbleTimeHost
16
- } from "./chunk-FUC3XFE2.js";
16
+ } from "./chunk-BTC2D6LS.js";
17
17
 
18
18
  // src/integrations/abletime-rest.ts
19
19
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-TZCWNRMC.js";
3
+ } from "./chunk-3S2LDD2F.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-22A45QOI.js";
9
+ } from "./chunk-ZZNZX2QW.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
@@ -42,7 +42,7 @@ import {
42
42
  loadAppSettings,
43
43
  resolveAgentExecutable,
44
44
  resolveClaudeExecutable
45
- } from "./chunk-VJQDUD24.js";
45
+ } from "./chunk-L5CIEBLR.js";
46
46
  import {
47
47
  isElectronLikeCommand,
48
48
  unwrapStrippedElectronLaunch
@@ -1903,7 +1903,7 @@ var claudeAdapter = {
1903
1903
  );
1904
1904
  }
1905
1905
  const mode = permissionMode(thread);
1906
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-JEKMVE42.js");
1906
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-LQZLTGFL.js");
1907
1907
  const isOrchestrator = isOrchestratorThread2(thread);
1908
1908
  const injectedServers = await buildInjectedMcpServers({
1909
1909
  includeSideboard: true,
@@ -7,7 +7,7 @@ import {
7
7
  resolveRepoRoot,
8
8
  takenSlugsFromThread,
9
9
  teamSlugFromName
10
- } from "./chunk-42VGWRSE.js";
10
+ } from "./chunk-WX4S775K.js";
11
11
  import {
12
12
  ATTACHMENTS_DIR,
13
13
  attachmentsGitignoreBody
@@ -17,7 +17,7 @@ import {
17
17
  listThreads,
18
18
  updateThread,
19
19
  writeThread
20
- } from "./chunk-RPZFNKND.js";
20
+ } from "./chunk-X5PUFYDJ.js";
21
21
  import {
22
22
  assertOrchestratorCapableAgent,
23
23
  formatAccountProfilePlaybookLine,
@@ -30,7 +30,7 @@ import {
30
30
  resolveThreadDefaults,
31
31
  resolveViewerProfile,
32
32
  resolveViewerProfileForRepo
33
- } from "./chunk-FUC3XFE2.js";
33
+ } from "./chunk-BTC2D6LS.js";
34
34
  import {
35
35
  appDataDir,
36
36
  globalAgentCwd,
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  getGithubGitAuthMode,
9
9
  getGithubPat
10
- } from "./chunk-VJQDUD24.js";
10
+ } from "./chunk-L5CIEBLR.js";
11
11
  import {
12
12
  listThreads
13
- } from "./chunk-OY7THBLG.js";
13
+ } from "./chunk-FGTPRMPS.js";
14
14
  import {
15
15
  worktreesRoot
16
16
  } from "./chunk-WFUDY6PC.js";
@@ -7,15 +7,15 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-TZCWNRMC.js";
11
- import "./chunk-22A45QOI.js";
10
+ } from "./chunk-3S2LDD2F.js";
11
+ import "./chunk-ZZNZX2QW.js";
12
12
  import "./chunk-6K64FJDD.js";
13
13
  import "./chunk-QQKDGPUI.js";
14
- import "./chunk-VJQDUD24.js";
14
+ import "./chunk-L5CIEBLR.js";
15
15
  import "./chunk-4TR3HZFT.js";
16
16
  import "./chunk-WDRMZKVB.js";
17
17
  import "./chunk-JT7R45JB.js";
18
- import "./chunk-OY7THBLG.js";
18
+ import "./chunk-FGTPRMPS.js";
19
19
  import "./chunk-7J72QJOM.js";
20
20
  import "./chunk-77WWLBCI.js";
21
21
  import "./chunk-WFUDY6PC.js";
@@ -9,14 +9,14 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-PTOIWKDU.js";
13
- import "./chunk-42VGWRSE.js";
12
+ } from "./chunk-ZC664YBJ.js";
13
+ import "./chunk-WX4S775K.js";
14
14
  import "./chunk-D6JWYJ4P.js";
15
- import "./chunk-RPZFNKND.js";
15
+ import "./chunk-X5PUFYDJ.js";
16
16
  import "./chunk-X5B3OS5I.js";
17
17
  import "./chunk-SYFVUF2C.js";
18
18
  import "./chunk-FNQNJOHY.js";
19
- import "./chunk-FUC3XFE2.js";
19
+ import "./chunk-BTC2D6LS.js";
20
20
  import "./chunk-NSTQ6QKD.js";
21
21
  import "./chunk-KGZBYWZ3.js";
22
22
  import "./chunk-EQNRWDLN.js";
@@ -17,14 +17,14 @@ import {
17
17
  orchestratorSessionPoisonedByBuiltins,
18
18
  slackCoordinatorSourceRef,
19
19
  takenTeamSlugsForOrchestration
20
- } from "./chunk-PTOIWKDU.js";
21
- import "./chunk-42VGWRSE.js";
20
+ } from "./chunk-ZC664YBJ.js";
21
+ import "./chunk-WX4S775K.js";
22
22
  import "./chunk-D6JWYJ4P.js";
23
- import "./chunk-RPZFNKND.js";
23
+ import "./chunk-X5PUFYDJ.js";
24
24
  import "./chunk-X5B3OS5I.js";
25
25
  import "./chunk-SYFVUF2C.js";
26
26
  import "./chunk-FNQNJOHY.js";
27
- import "./chunk-FUC3XFE2.js";
27
+ import "./chunk-BTC2D6LS.js";
28
28
  import "./chunk-NSTQ6QKD.js";
29
29
  import "./chunk-KGZBYWZ3.js";
30
30
  import {
@@ -15,15 +15,15 @@ import {
15
15
  orchestratorSessionPoisonedByBuiltins,
16
16
  slackCoordinatorSourceRef,
17
17
  takenTeamSlugsForOrchestration
18
- } from "./chunk-TZCWNRMC.js";
19
- import "./chunk-22A45QOI.js";
18
+ } from "./chunk-3S2LDD2F.js";
19
+ import "./chunk-ZZNZX2QW.js";
20
20
  import "./chunk-6K64FJDD.js";
21
21
  import "./chunk-QQKDGPUI.js";
22
- import "./chunk-VJQDUD24.js";
22
+ import "./chunk-L5CIEBLR.js";
23
23
  import "./chunk-4TR3HZFT.js";
24
24
  import "./chunk-WDRMZKVB.js";
25
25
  import "./chunk-JT7R45JB.js";
26
- import "./chunk-OY7THBLG.js";
26
+ import "./chunk-FGTPRMPS.js";
27
27
  import "./chunk-7J72QJOM.js";
28
28
  import "./chunk-77WWLBCI.js";
29
29
  import {
package/dist/index.cjs CHANGED
@@ -1087,6 +1087,8 @@ function clampHistoryMaxDays(value) {
1087
1087
  return Math.min(HISTORY_MAX_DAYS_MAX, Math.floor(value));
1088
1088
  }
1089
1089
  function archivedUpdatedMs(thread) {
1090
+ const stamped = thread.archivedAt ? Date.parse(thread.archivedAt) : NaN;
1091
+ if (Number.isFinite(stamped)) return stamped;
1090
1092
  const updated = Date.parse(thread.updatedAt);
1091
1093
  if (Number.isFinite(updated)) return updated;
1092
1094
  const created = Date.parse(thread.createdAt);
@@ -3119,7 +3121,8 @@ function normalizeThread(raw) {
3119
3121
  userSetTitle: Boolean(raw.userSetTitle),
3120
3122
  activeRuns: Array.isArray(raw.activeRuns) ? raw.activeRuns : [],
3121
3123
  quotaResumeAt: raw.quotaResumeAt ?? null,
3122
- quotaContinuedFromId: raw.quotaContinuedFromId ?? null
3124
+ quotaContinuedFromId: raw.quotaContinuedFromId ?? null,
3125
+ archivedAt: typeof raw.archivedAt === "string" && raw.archivedAt.trim() ? raw.archivedAt.trim() : void 0
3123
3126
  };
3124
3127
  }
3125
3128
  function createEmptyThread(partial) {
@@ -3154,6 +3157,7 @@ function createEmptyThread(partial) {
3154
3157
  pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
3155
3158
  createdAt: ts,
3156
3159
  updatedAt: ts,
3160
+ archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
3157
3161
  title: partial.title,
3158
3162
  sourceType: partial.sourceType,
3159
3163
  sourceRef: partial.sourceRef,
@@ -3282,6 +3286,11 @@ function updateThread(id, patch) {
3282
3286
  const current = readThread(id);
3283
3287
  if (!current) throw new Error(`Thread not found: ${id}`);
3284
3288
  const next = { ...current, ...patch, id: current.id, updatedAt: nowIso() };
3289
+ if (next.status === "archived") {
3290
+ next.archivedAt = typeof next.archivedAt === "string" && next.archivedAt.trim() || current.archivedAt || nowIso();
3291
+ } else {
3292
+ delete next.archivedAt;
3293
+ }
3285
3294
  writeThread(next);
3286
3295
  return next;
3287
3296
  }
package/dist/index.d.cts CHANGED
@@ -192,6 +192,8 @@ interface Thread {
192
192
  userSetTitle: boolean;
193
193
  createdAt: string;
194
194
  updatedAt: string;
195
+ /** When this chat was archived. History age uses this, not later row updates. */
196
+ archivedAt?: string;
195
197
  messages: ThreadMessage[];
196
198
  /** Pending composer attachments (forked transcripts, etc.). */
197
199
  attachments: ThreadAttachment[];
@@ -1467,7 +1469,7 @@ declare function resolveThreadEffort(raw: {
1467
1469
  fast?: unknown;
1468
1470
  }): ThinkingEffort;
1469
1471
  declare function normalizeThread(raw: Thread): Thread;
1470
- declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'cowboy' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments' | 'pendingTurnAttachments'>>): Thread;
1472
+ declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'cowboy' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments' | 'pendingTurnAttachments' | 'archivedAt'>>): Thread;
1471
1473
  declare function withThreadLock<T>(id: string, fn: () => Promise<T>): Promise<T>;
1472
1474
  /** Drop the in-memory thread list (other-process writes, tests, store watcher). */
1473
1475
  declare function invalidateThreadListCache(): void;
@@ -5344,9 +5346,9 @@ declare function isHistoryRetentionStub(thread: Pick<Thread, 'messages' | 'attac
5344
5346
  * Age-expired rows are purged. Count overflow is stripped first (keep the
5345
5347
  * searchable row) and purged on a later pass once it is already a stub.
5346
5348
  */
5347
- declare function planHistoryRetention<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'messages' | 'attachments'>>(archived: T[], thresholds?: HistoryRetentionThresholds): HistoryRetentionPlan;
5349
+ declare function planHistoryRetention<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'archivedAt' | 'messages' | 'attachments'>>(archived: T[], thresholds?: HistoryRetentionThresholds): HistoryRetentionPlan;
5348
5350
  /** Manual History “Clear older than…” — purge those rows, do not strip. */
5349
- declare function planHistoryAgePurge<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt'>>(archived: T[], olderThanDays: number, nowMs?: number): string[];
5351
+ declare function planHistoryAgePurge<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'archivedAt'>>(archived: T[], olderThanDays: number, nowMs?: number): string[];
5350
5352
 
5351
5353
  /**
5352
5354
  * Sideboard MCP server — agent-facing judgment surface.
package/dist/index.d.ts CHANGED
@@ -192,6 +192,8 @@ interface Thread {
192
192
  userSetTitle: boolean;
193
193
  createdAt: string;
194
194
  updatedAt: string;
195
+ /** When this chat was archived. History age uses this, not later row updates. */
196
+ archivedAt?: string;
195
197
  messages: ThreadMessage[];
196
198
  /** Pending composer attachments (forked transcripts, etc.). */
197
199
  attachments: ThreadAttachment[];
@@ -1467,7 +1469,7 @@ declare function resolveThreadEffort(raw: {
1467
1469
  fast?: unknown;
1468
1470
  }): ThinkingEffort;
1469
1471
  declare function normalizeThread(raw: Thread): Thread;
1470
- declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'cowboy' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments' | 'pendingTurnAttachments'>>): Thread;
1472
+ declare function createEmptyThread(partial: Omit<Thread, 'id' | 'createdAt' | 'updatedAt' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'attachments'> & Partial<Pick<Thread, 'sessionId' | 'sourceIsFork' | 'parentThreadId' | 'autonomy' | 'model' | 'effort' | 'fast' | 'planMode' | 'messages' | 'queue' | 'status' | 'devPort' | 'activeRuns' | 'prUrl' | 'prTitle' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'skipAutoArchiveOnMerge' | 'cowboy' | 'stackId' | 'stackLayer' | 'userSetTitle' | 'attachments' | 'pendingTurnAttachments' | 'archivedAt'>>): Thread;
1471
1473
  declare function withThreadLock<T>(id: string, fn: () => Promise<T>): Promise<T>;
1472
1474
  /** Drop the in-memory thread list (other-process writes, tests, store watcher). */
1473
1475
  declare function invalidateThreadListCache(): void;
@@ -5344,9 +5346,9 @@ declare function isHistoryRetentionStub(thread: Pick<Thread, 'messages' | 'attac
5344
5346
  * Age-expired rows are purged. Count overflow is stripped first (keep the
5345
5347
  * searchable row) and purged on a later pass once it is already a stub.
5346
5348
  */
5347
- declare function planHistoryRetention<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'messages' | 'attachments'>>(archived: T[], thresholds?: HistoryRetentionThresholds): HistoryRetentionPlan;
5349
+ declare function planHistoryRetention<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'archivedAt' | 'messages' | 'attachments'>>(archived: T[], thresholds?: HistoryRetentionThresholds): HistoryRetentionPlan;
5348
5350
  /** Manual History “Clear older than…” — purge those rows, do not strip. */
5349
- declare function planHistoryAgePurge<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt'>>(archived: T[], olderThanDays: number, nowMs?: number): string[];
5351
+ declare function planHistoryAgePurge<T extends Pick<Thread, 'id' | 'updatedAt' | 'createdAt' | 'archivedAt'>>(archived: T[], olderThanDays: number, nowMs?: number): string[];
5350
5352
 
5351
5353
  /**
5352
5354
  * Sideboard MCP server — agent-facing judgment surface.
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-IOOL3T7Q.js";
23
+ } from "./chunk-MN6YUD4O.js";
24
24
  import {
25
25
  ableTimeDependencyTarget,
26
26
  commentAbleTimeTask,
@@ -38,8 +38,8 @@ import {
38
38
  toAbleTimeIssueInfo,
39
39
  updateAbleTimeTask,
40
40
  verifyAbleTimeConnection
41
- } from "./chunk-QVVJO4GN.js";
42
- import "./chunk-B2RPIHNJ.js";
41
+ } from "./chunk-REZRGCKV.js";
42
+ import "./chunk-2M5B7YNY.js";
43
43
  import {
44
44
  ABLETIME_MCP_PATH,
45
45
  ABLETIME_MCP_PM_PATH,
@@ -60,7 +60,7 @@ import {
60
60
  normalizeAbleTimeCredential,
61
61
  normalizeAbleTimeHost,
62
62
  rewriteAbleTimeError
63
- } from "./chunk-5LFD3KCJ.js";
63
+ } from "./chunk-G4TANQC3.js";
64
64
  import {
65
65
  AGENT_GIT_ACTIONS,
66
66
  BOARD_COLUMN_DEFS,
@@ -309,7 +309,7 @@ import {
309
309
  worktreeCleanupSettings,
310
310
  wrapReviewSkillMarkdown,
311
311
  writeWorktreeFile
312
- } from "./chunk-MZP2C4KE.js";
312
+ } from "./chunk-AOQZZA3M.js";
313
313
  import {
314
314
  LEGACY_PLAN_FILE_REL,
315
315
  PLAN_FILE_NAME,
@@ -425,7 +425,7 @@ import {
425
425
  withEventParentId,
426
426
  withEventsParentId,
427
427
  writeInjectedMcpConfig
428
- } from "./chunk-KJAHVQL6.js";
428
+ } from "./chunk-YYELAUKP.js";
429
429
  import {
430
430
  CLOUD_COORDINATOR_BUSY_REPLY,
431
431
  CLOUD_COORDINATOR_STOPPED_REPLY,
@@ -468,7 +468,7 @@ import {
468
468
  stageBuffersAsAttachments,
469
469
  syncWorkspacesFromThreads,
470
470
  takenTeamSlugsForOrchestration
471
- } from "./chunk-TZCWNRMC.js";
471
+ } from "./chunk-3S2LDD2F.js";
472
472
  import {
473
473
  FAMOUS_SOCCER_TEAMS,
474
474
  GITHUB_PR_BODY_MAX_CHARS,
@@ -566,7 +566,7 @@ import {
566
566
  worktreeDisplayLabelForGroup,
567
567
  worktreeNameFromPath,
568
568
  worktreeSlugForTicket
569
- } from "./chunk-22A45QOI.js";
569
+ } from "./chunk-ZZNZX2QW.js";
570
570
  import {
571
571
  ATTACHMENTS_DIR,
572
572
  CLI_DIR,
@@ -734,7 +734,7 @@ import {
734
734
  updateProjectProfileSettings,
735
735
  usageOnLimit,
736
736
  writeViewerContext
737
- } from "./chunk-VJQDUD24.js";
737
+ } from "./chunk-L5CIEBLR.js";
738
738
  import {
739
739
  stripNestedElectronEnv
740
740
  } from "./chunk-4TR3HZFT.js";
@@ -767,7 +767,7 @@ import {
767
767
  updateThread,
768
768
  withThreadLock,
769
769
  writeThread
770
- } from "./chunk-OY7THBLG.js";
770
+ } from "./chunk-FGTPRMPS.js";
771
771
  import "./chunk-7J72QJOM.js";
772
772
  import {
773
773
  THINKING_EFFORTS,
@@ -5254,7 +5254,7 @@ async function startMcpServer() {
5254
5254
  );
5255
5255
  }
5256
5256
  try {
5257
- const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-VBQHGX5Z.js");
5257
+ const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-2TN3WLZV.js");
5258
5258
  orch.setMaxConcurrent(maxConcurrentAgents2());
5259
5259
  } catch {
5260
5260
  }
@@ -5569,7 +5569,7 @@ async function startMcpServer() {
5569
5569
  registerConnectedIssueVendorTools(server);
5570
5570
  registerScheduleTools(server);
5571
5571
  const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-22VFDPSO.js");
5572
- const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-VBQHGX5Z.js");
5572
+ const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-2TN3WLZV.js");
5573
5573
  const accountDefaults = resolveThreadDefaults2();
5574
5574
  const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
5575
5575
  server.tool(
@@ -883,7 +883,8 @@ function normalizeThread(raw) {
883
883
  userSetTitle: Boolean(raw.userSetTitle),
884
884
  activeRuns: Array.isArray(raw.activeRuns) ? raw.activeRuns : [],
885
885
  quotaResumeAt: raw.quotaResumeAt ?? null,
886
- quotaContinuedFromId: raw.quotaContinuedFromId ?? null
886
+ quotaContinuedFromId: raw.quotaContinuedFromId ?? null,
887
+ archivedAt: typeof raw.archivedAt === "string" && raw.archivedAt.trim() ? raw.archivedAt.trim() : void 0
887
888
  };
888
889
  }
889
890
  function createEmptyThread(partial) {
@@ -918,6 +919,7 @@ function createEmptyThread(partial) {
918
919
  pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
919
920
  createdAt: ts,
920
921
  updatedAt: ts,
922
+ archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
921
923
  title: partial.title,
922
924
  sourceType: partial.sourceType,
923
925
  sourceRef: partial.sourceRef,
@@ -1046,6 +1048,11 @@ function updateThread(id, patch) {
1046
1048
  const current = readThread(id);
1047
1049
  if (!current) throw new Error(`Thread not found: ${id}`);
1048
1050
  const next = { ...current, ...patch, id: current.id, updatedAt: nowIso() };
1051
+ if (next.status === "archived") {
1052
+ next.archivedAt = typeof next.archivedAt === "string" && next.archivedAt.trim() || current.archivedAt || nowIso();
1053
+ } else {
1054
+ delete next.archivedAt;
1055
+ }
1049
1056
  writeThread(next);
1050
1057
  return next;
1051
1058
  }
@@ -3640,6 +3647,8 @@ function clampHistoryMaxDays(value) {
3640
3647
  return Math.min(HISTORY_MAX_DAYS_MAX, Math.floor(value));
3641
3648
  }
3642
3649
  function archivedUpdatedMs(thread) {
3650
+ const stamped = thread.archivedAt ? Date.parse(thread.archivedAt) : NaN;
3651
+ if (Number.isFinite(stamped)) return stamped;
3643
3652
  const updated = Date.parse(thread.updatedAt);
3644
3653
  if (Number.isFinite(updated)) return updated;
3645
3654
  const created = Date.parse(thread.createdAt);