@sideboard-ai/core 0.1.298 → 0.1.300

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 (29) hide show
  1. package/dist/{agents-GHZFY65E.js → agents-IVKPCK56.js} +3 -3
  2. package/dist/{agents-XL67HSZH.js → agents-JCCJJMA7.js} +2 -2
  3. package/dist/{chunk-RQMLJZ2V.js → chunk-EB3F5AWV.js} +2 -2
  4. package/dist/{chunk-IL77XODJ.js → chunk-EB7B4D2Z.js} +3 -3
  5. package/dist/{chunk-JM5P36PM.js → chunk-F3JYJ4UB.js} +2 -2
  6. package/dist/{chunk-BIMHIHX3.js → chunk-G52HLBQR.js} +21 -1
  7. package/dist/{chunk-KRGQWQME.js → chunk-GNX6YNNU.js} +164 -107
  8. package/dist/{chunk-4FWMUMXG.js → chunk-MMIDAD6J.js} +3 -3
  9. package/dist/{chunk-KMYCNSSI.js → chunk-QB4UQA5L.js} +3 -3
  10. package/dist/{chunk-5FMQU2RU.js → chunk-UMALFEDS.js} +2 -2
  11. package/dist/{chunk-2POLTCSC.js → chunk-YAILSKW3.js} +61 -47
  12. package/dist/{conductor-NGIEDMAB.js → conductor-JLHXMMKR.js} +2 -2
  13. package/dist/{conductor-HUITLA2M.js → conductor-UQDDDW35.js} +3 -3
  14. package/dist/{coordinator-prompt-JUN3IITF.js → coordinator-prompt-HKLVS26O.js} +2 -2
  15. package/dist/{coordinator-prompt-52T5A4SU.js → coordinator-prompt-SSUYZSJO.js} +1 -1
  16. package/dist/{global-workspace-VVUIFQ72.js → global-workspace-I32EWKX3.js} +2 -2
  17. package/dist/{global-workspace-Z5YRL67Y.js → global-workspace-MHE6FCUZ.js} +1 -1
  18. package/dist/index.cjs +317 -222
  19. package/dist/index.d.cts +40 -26
  20. package/dist/index.d.ts +40 -26
  21. package/dist/index.js +11 -11
  22. package/dist/mcp/run-stdio.cjs +81 -43
  23. package/dist/mcp/run-stdio.js +7 -7
  24. package/dist/{orchestrator-S7TKI6DR.js → orchestrator-FVVDOQVD.js} +5 -5
  25. package/dist/{orchestrator-JY4ZETFX.js → orchestrator-SX4SGZHF.js} +4 -4
  26. package/dist/{workspaces-OSF56FHS.js → workspaces-ATMIKXLK.js} +2 -2
  27. package/dist/{workspaces-7FVNGUBV.js → workspaces-O3L32CDO.js} +1 -1
  28. package/dist/{worktree-LFSBIUCN.js → worktree-RMYXBTJG.js} +1 -1
  29. package/package.json +1 -1
@@ -27,7 +27,7 @@ import {
27
27
  parseSessionQuotaResetAt,
28
28
  planModeTurnInstruction,
29
29
  resolveQuotaFallbackAgent
30
- } from "./chunk-RQMLJZ2V.js";
30
+ } from "./chunk-EB3F5AWV.js";
31
31
  import {
32
32
  REVIEW_TAB_TITLE,
33
33
  applyWorktreePkgCacheEnv,
@@ -66,7 +66,7 @@ import {
66
66
  worktreeDevProcessKey,
67
67
  worktreeRunProcessKey,
68
68
  worktreeSetupProcessKey
69
- } from "./chunk-JM5P36PM.js";
69
+ } from "./chunk-F3JYJ4UB.js";
70
70
  import {
71
71
  applyAgentEvent,
72
72
  clipAgentEventForPaint,
@@ -118,7 +118,7 @@ import {
118
118
  stageAbsolutePathsAsAttachments,
119
119
  stageBuffersAsAttachments,
120
120
  syncWorkspacesFromThreads
121
- } from "./chunk-5FMQU2RU.js";
121
+ } from "./chunk-UMALFEDS.js";
122
122
  import {
123
123
  addPrStackLayer,
124
124
  allocateTeamSlug,
@@ -503,9 +503,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
503
503
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
504
504
  );
505
505
  }
506
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-Z5YRL67Y.js");
506
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-MHE6FCUZ.js");
507
507
  if (isGlobalThread2(thread)) {
508
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-52T5A4SU.js");
508
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-SSUYZSJO.js");
509
509
  ensureGlobalCoordinatorCwd2(
510
510
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
511
511
  );
@@ -1911,6 +1911,53 @@ function threadCardBlockFields(group) {
1911
1911
  return block ? { blockedReason: block.reason, blockedSource: block.source } : null;
1912
1912
  }
1913
1913
 
1914
+ // src/board/pr-state.ts
1915
+ function isOpenPrState(prUrl, prState) {
1916
+ if (!prUrl?.trim()) return false;
1917
+ const state = (prState ?? "OPEN").trim().toUpperCase();
1918
+ return state !== "MERGED" && state !== "CLOSED";
1919
+ }
1920
+ function isMergedPrState(prUrl, prState) {
1921
+ if (!prUrl?.trim()) return false;
1922
+ return (prState ?? "").trim().toUpperCase() === "MERGED";
1923
+ }
1924
+ function isApprovedOpenPr(thread) {
1925
+ if (!isOpenPrState(thread.prUrl, thread.prState) || thread.prIsDraft) return false;
1926
+ return (thread.prReviewDecision ?? "").trim().toUpperCase() === "APPROVED";
1927
+ }
1928
+
1929
+ // src/board/worktree-ownership.ts
1930
+ var DEFAULT_BOARD_OWNERSHIP = "all";
1931
+ function normalizeViewerLogin(login) {
1932
+ return (login ?? "").trim().toLowerCase();
1933
+ }
1934
+ function loginsInclude(logins, viewerLogin) {
1935
+ const me = normalizeViewerLogin(viewerLogin);
1936
+ if (!me) return false;
1937
+ return (logins ?? []).some((login) => normalizeViewerLogin(login) === me);
1938
+ }
1939
+ function classifyWorktreeOwnership(group, viewerLogin = "") {
1940
+ const me = normalizeViewerLogin(viewerLogin);
1941
+ if (group.some((t) => {
1942
+ const author = normalizeViewerLogin(t.prAuthorLogin);
1943
+ return Boolean(author && me && author === me);
1944
+ })) {
1945
+ return "mine";
1946
+ }
1947
+ const reviewing = group.some((t) => {
1948
+ const author = normalizeViewerLogin(t.prAuthorLogin);
1949
+ if (author && me && author !== me) return true;
1950
+ if (t.sourceType === "pr" && me && (!author || author !== me)) return true;
1951
+ if (me && loginsInclude(t.prReviewerLogins, me)) return true;
1952
+ return false;
1953
+ });
1954
+ return reviewing ? "reviewing" : "mine";
1955
+ }
1956
+ function worktreeMatchesOwnership(group, filter, viewerLogin = "") {
1957
+ if (filter === "all") return true;
1958
+ return classifyWorktreeOwnership(group, viewerLogin) === filter;
1959
+ }
1960
+
1914
1961
  // src/board/home-board.ts
1915
1962
  var GLOBAL_WORKSPACE_ID = "__global__";
1916
1963
  function isHomeBoardThread(thread) {
@@ -1922,18 +1969,10 @@ var BOARD_COLUMN_DEFS = [
1922
1969
  { id: "new", title: "New" },
1923
1970
  { id: "draft", title: "Draft" },
1924
1971
  { id: "review", title: "Review" },
1972
+ { id: "approved", title: "Approved" },
1925
1973
  { id: "done", title: "Merged" }
1926
1974
  ];
1927
1975
  var HOME_BOARD_CACHE_TTL_MS = 15 * 60 * 1e3;
1928
- function isOpenPrState(prUrl, prState) {
1929
- if (!prUrl?.trim()) return false;
1930
- const state = (prState ?? "OPEN").trim().toUpperCase();
1931
- return state !== "MERGED" && state !== "CLOSED";
1932
- }
1933
- function isMergedPrState(prUrl, prState) {
1934
- if (!prUrl?.trim()) return false;
1935
- return (prState ?? "").trim().toUpperCase() === "MERGED";
1936
- }
1937
1976
  var DEFAULT_WORKTREE_SORT = "created";
1938
1977
  function groupCreatedAt(group) {
1939
1978
  let min = group[0]?.createdAt ?? "";
@@ -1986,38 +2025,9 @@ function groupHomeBoardWorktrees(threads, sort = DEFAULT_WORKTREE_SORT, labelOf
1986
2025
  }
1987
2026
  return [...map.values()].map((list) => sortThreadsInWorktree(list)).sort((a, b) => compareWorktreeGroups(a, b, sort, labelOf));
1988
2027
  }
1989
- var DEFAULT_BOARD_OWNERSHIP = "all";
1990
- function normalizeViewerLogin(login) {
1991
- return (login ?? "").trim().toLowerCase();
1992
- }
1993
- function loginsInclude(logins, viewerLogin) {
1994
- const me = normalizeViewerLogin(viewerLogin);
1995
- if (!me) return false;
1996
- return (logins ?? []).some((login) => normalizeViewerLogin(login) === me);
1997
- }
1998
- function classifyWorktreeOwnership(group, viewerLogin = "") {
1999
- const me = normalizeViewerLogin(viewerLogin);
2000
- if (group.some((t) => {
2001
- const author = normalizeViewerLogin(t.prAuthorLogin);
2002
- return Boolean(author && me && author === me);
2003
- })) {
2004
- return "mine";
2005
- }
2006
- const reviewing = group.some((t) => {
2007
- const author = normalizeViewerLogin(t.prAuthorLogin);
2008
- if (author && me && author !== me) return true;
2009
- if (t.sourceType === "pr" && me && (!author || author !== me)) return true;
2010
- if (me && loginsInclude(t.prReviewerLogins, me)) return true;
2011
- return false;
2012
- });
2013
- return reviewing ? "reviewing" : "mine";
2014
- }
2015
- function worktreeMatchesOwnership(group, filter, viewerLogin = "") {
2016
- if (filter === "all") return true;
2017
- return classifyWorktreeOwnership(group, viewerLogin) === filter;
2018
- }
2019
2028
  function classifyWorktreeColumn(group) {
2020
2029
  if (group.some((t) => isMergedPrState(t.prUrl, t.prState))) return "done";
2030
+ if (group.some((t) => isApprovedOpenPr(t))) return "approved";
2021
2031
  if (group.some((t) => isOpenPrState(t.prUrl, t.prState) && !t.prIsDraft)) {
2022
2032
  return "review";
2023
2033
  }
@@ -2268,6 +2278,7 @@ function emptyColumns() {
2268
2278
  new: [],
2269
2279
  draft: [],
2270
2280
  review: [],
2281
+ approved: [],
2271
2282
  done: []
2272
2283
  };
2273
2284
  }
@@ -2279,6 +2290,7 @@ function emptyHidden() {
2279
2290
  new: 0,
2280
2291
  draft: 0,
2281
2292
  review: 0,
2293
+ approved: 0,
2282
2294
  done: 0
2283
2295
  };
2284
2296
  }
@@ -2347,6 +2359,7 @@ function assembleHomeBoard(input) {
2347
2359
  new: 0,
2348
2360
  draft: 0,
2349
2361
  review: 0,
2362
+ approved: 0,
2350
2363
  done: 0,
2351
2364
  tickets: 0,
2352
2365
  prs: 0,
@@ -2359,6 +2372,7 @@ function assembleHomeBoard(input) {
2359
2372
  new: [],
2360
2373
  draft: [],
2361
2374
  review: [],
2375
+ approved: [],
2362
2376
  done: []
2363
2377
  };
2364
2378
  for (const group of groupHomeBoardWorktrees(live)) {
@@ -2393,7 +2407,7 @@ function assembleHomeBoard(input) {
2393
2407
  }
2394
2408
  return { columns, hidden, totals };
2395
2409
  }
2396
- var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. Orchestration chats stay in the sidebar. Do not invent status.";
2410
+ var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. Orchestration chats stay in the sidebar. Do not invent status.";
2397
2411
 
2398
2412
  // src/threads/workspace-tags.ts
2399
2413
  function workspaceTagTargetRef(opts) {
@@ -3430,7 +3444,7 @@ async function adoptThread(input) {
3430
3444
  messages: input.messages ?? []
3431
3445
  });
3432
3446
  writeThread(thread);
3433
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-7FVNGUBV.js");
3447
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-O3L32CDO.js");
3434
3448
  await addWorkspace2(repoPath);
3435
3449
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-5N2KTYIT.js");
3436
3450
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -6315,7 +6329,7 @@ function formatScheduledPrompt(name, prompt) {
6315
6329
  ${prompt}`;
6316
6330
  }
6317
6331
  async function defaultDeps() {
6318
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-JY4ZETFX.js");
6332
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-SX4SGZHF.js");
6319
6333
  const orch = getOrchestrator2();
6320
6334
  return {
6321
6335
  findThread: (id) => findThreadByRef(id),
@@ -33,9 +33,9 @@ import {
33
33
  tryReservePort,
34
34
  tryReservePorts,
35
35
  worktreeRunPortsPath
36
- } from "./chunk-JM5P36PM.js";
36
+ } from "./chunk-F3JYJ4UB.js";
37
37
  import "./chunk-5XQ43YZU.js";
38
- import "./chunk-5FMQU2RU.js";
38
+ import "./chunk-UMALFEDS.js";
39
39
  import "./chunk-3IXGI2FP.js";
40
40
  import "./chunk-N2WW62LF.js";
41
41
  import "./chunk-DD67JWTN.js";
@@ -31,10 +31,10 @@ import {
31
31
  tryReservePort,
32
32
  tryReservePorts,
33
33
  worktreeRunPortsPath
34
- } from "./chunk-4FWMUMXG.js";
34
+ } from "./chunk-MMIDAD6J.js";
35
35
  import "./chunk-F36QRDM4.js";
36
- import "./chunk-KMYCNSSI.js";
37
- import "./chunk-BIMHIHX3.js";
36
+ import "./chunk-QB4UQA5L.js";
37
+ import "./chunk-G52HLBQR.js";
38
38
  import "./chunk-K5EACGG2.js";
39
39
  import "./chunk-2P4XKWV2.js";
40
40
  import "./chunk-HO5R3ZRH.js";
@@ -7,8 +7,8 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-KMYCNSSI.js";
11
- import "./chunk-BIMHIHX3.js";
10
+ } from "./chunk-QB4UQA5L.js";
11
+ import "./chunk-G52HLBQR.js";
12
12
  import "./chunk-K5EACGG2.js";
13
13
  import "./chunk-2P4XKWV2.js";
14
14
  import "./chunk-6K64FJDD.js";
@@ -9,7 +9,7 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-5FMQU2RU.js";
12
+ } from "./chunk-UMALFEDS.js";
13
13
  import "./chunk-3IXGI2FP.js";
14
14
  import "./chunk-N2WW62LF.js";
15
15
  import "./chunk-DD67JWTN.js";
@@ -18,8 +18,8 @@ import {
18
18
  remoteCoordinatorSourceRef,
19
19
  slackCoordinatorSourceRef,
20
20
  takenTeamSlugsForOrchestration
21
- } from "./chunk-KMYCNSSI.js";
22
- import "./chunk-BIMHIHX3.js";
21
+ } from "./chunk-QB4UQA5L.js";
22
+ import "./chunk-G52HLBQR.js";
23
23
  import "./chunk-K5EACGG2.js";
24
24
  import "./chunk-2P4XKWV2.js";
25
25
  import "./chunk-6K64FJDD.js";
@@ -20,7 +20,7 @@ import {
20
20
  remoteCoordinatorSourceRef,
21
21
  slackCoordinatorSourceRef,
22
22
  takenTeamSlugsForOrchestration
23
- } from "./chunk-5FMQU2RU.js";
23
+ } from "./chunk-UMALFEDS.js";
24
24
  import "./chunk-3IXGI2FP.js";
25
25
  import "./chunk-N2WW62LF.js";
26
26
  import "./chunk-DD67JWTN.js";