@sideboard-ai/core 0.1.19 → 0.1.22

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.
@@ -3,7 +3,7 @@ import {
3
3
  ensureWorkspace,
4
4
  removeWorkspace,
5
5
  syncWorkspacesFromThreads
6
- } from "./chunk-LIUV5ONW.js";
6
+ } from "./chunk-PER4N6LS.js";
7
7
  import {
8
8
  GLOBAL_WORKSPACE_ID,
9
9
  createGlobalChat,
@@ -13,19 +13,19 @@ import {
13
13
  isGlobalThread,
14
14
  isOrchestratorThread,
15
15
  orchestratorSessionPoisonedByBuiltins
16
- } from "./chunk-5263JXQY.js";
16
+ } from "./chunk-Y2EWQ4TL.js";
17
17
  import {
18
18
  coordinatorSystemPrompt,
19
19
  coordinatorTurnReminder,
20
20
  enrichWorkspacesWithGithub,
21
21
  ensureGlobalCoordinatorCwd
22
- } from "./chunk-SNHWAARD.js";
22
+ } from "./chunk-BMB7WCGF.js";
23
23
  import {
24
24
  PLAN_MODE_INSTRUCTION,
25
25
  allAdapters,
26
26
  getAdapter,
27
27
  parseBrightsyCliLine
28
- } from "./chunk-JQJZTL2Q.js";
28
+ } from "./chunk-V54GKKCI.js";
29
29
  import {
30
30
  childEnvWithAppSettings,
31
31
  getLinearApiKey,
@@ -64,7 +64,7 @@ import {
64
64
  takenSlugsFromThread,
65
65
  threadDisplayLabel,
66
66
  worktreeNameFromPath
67
- } from "./chunk-LXHSRNJJ.js";
67
+ } from "./chunk-UFWEANLU.js";
68
68
  import {
69
69
  appendMessage,
70
70
  createEmptyThread,
@@ -432,9 +432,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
432
432
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
433
433
  );
434
434
  }
435
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-IV6LIDTO.js");
435
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-LM4AA4RO.js");
436
436
  if (isGlobalThread2(thread)) {
437
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-QPTX6YCW.js");
437
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-QH35ES7Y.js");
438
438
  ensureGlobalCoordinatorCwd2();
439
439
  }
440
440
  const adapter = getAdapter(thread.agent);
@@ -2273,7 +2273,7 @@ async function createThread(input, onSetupLine) {
2273
2273
  return readThread(thread.id) ?? thread;
2274
2274
  }
2275
2275
  async function listLinearIssues(agent, repoPath) {
2276
- const { getAdapter: getAdapter2 } = await import("./agents-2XMZO3CY.js");
2276
+ const { getAdapter: getAdapter2 } = await import("./agents-RYOW25YJ.js");
2277
2277
  await requireAgent(agent, { requireLinear: true });
2278
2278
  const adapter = getAdapter2(agent);
2279
2279
  if (!adapter.listLinearIssues) {
@@ -2489,7 +2489,7 @@ async function adoptThread(input) {
2489
2489
  messages: input.messages ?? []
2490
2490
  });
2491
2491
  writeThread(thread);
2492
- const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-JBWIRU55.js");
2492
+ const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-23GHLR7I.js");
2493
2493
  await ensureWorkspace2(repoPath);
2494
2494
  return thread;
2495
2495
  }
@@ -3859,7 +3859,7 @@ var Orchestrator = class {
3859
3859
  return setStatus(thread.id, "idle");
3860
3860
  }
3861
3861
  if (!existsSync10(thread.worktreePath)) {
3862
- const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-TYI2SANE.js");
3862
+ const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-RYTBDHHP.js");
3863
3863
  const { execa: execa6 } = await import("execa");
3864
3864
  const slug = thread.worktreePath.split("/").pop();
3865
3865
  const dest = thread.worktreePath;
@@ -3936,7 +3936,7 @@ async function startOrchestration(opts) {
3936
3936
  sourceRef: "default",
3937
3937
  ...createOpts
3938
3938
  }).catch(async () => {
3939
- const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-TYI2SANE.js");
3939
+ const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-RYTBDHHP.js");
3940
3940
  const repo = await resolveRepoRoot2(repoPath);
3941
3941
  const def = await resolveDefaultBranch2(repo);
3942
3942
  return createThread({
@@ -4379,45 +4379,6 @@ async function startMcpServer() {
4379
4379
  };
4380
4380
  }
4381
4381
  );
4382
- server.tool(
4383
- "preview_land",
4384
- "Preview push+PR land (does NOT push). Use before create_draft_pr.",
4385
- { ref: z.string() },
4386
- async ({ ref }) => {
4387
- const preview = await orch.previewLand(ref);
4388
- return { content: [{ type: "text", text: JSON.stringify(preview, null, 2) }] };
4389
- }
4390
- );
4391
- server.tool(
4392
- "create_draft_pr",
4393
- "Commit dirty changes if needed, push the thread branch to origin, and create/update a DRAFT GitHub PR against that worktree's origin (never upstream). Ready-for-review / non-draft land stays human-only (CLI/app confirm_land). Prefer this when the orchestrator should open a PR itself; alternatively send_to_thread asking the worktree agent to run `gh pr create --draft -R <origin-owner/name>`.",
4394
- { ref: z.string() },
4395
- async ({ ref }) => {
4396
- try {
4397
- const result = await orch.confirmLand(ref, { draft: true });
4398
- return {
4399
- content: [
4400
- {
4401
- type: "text",
4402
- text: JSON.stringify(
4403
- {
4404
- prUrl: result.prUrl,
4405
- pushed: result.pushed,
4406
- committed: result.committed,
4407
- draft: true
4408
- },
4409
- null,
4410
- 2
4411
- )
4412
- }
4413
- ]
4414
- };
4415
- } catch (err) {
4416
- const message = err instanceof Error ? err.message : String(err);
4417
- return { content: [{ type: "text", text: message }], isError: true };
4418
- }
4419
- }
4420
- );
4421
4382
  server.tool(
4422
4383
  "list_branches",
4423
4384
  "List git branches in a registered workspace. Pass repoPath from list_workspaces (unmerged into the default branch by default \u2014 for create_thread sourceType=branch).",
@@ -607,7 +607,21 @@ function permissionMode(thread) {
607
607
  }
608
608
 
609
609
  // src/agents/claude.ts
610
- var BASE_ALLOWED_TOOLS = ["Edit", "Write", "Bash", "Read", "Glob", "Grep"];
610
+ var BASE_ALLOWED_TOOLS = [
611
+ "Edit",
612
+ "Write",
613
+ "Bash",
614
+ "Read",
615
+ "Glob",
616
+ "Grep",
617
+ "WebFetch",
618
+ "WebSearch"
619
+ ];
620
+ var CLAUDE_CHROME_ALLOWED_TOOLS = [
621
+ "mcp__claude-in-chrome",
622
+ "mcp__claude-in-chrome__*",
623
+ "Skill(claude-in-chrome)"
624
+ ];
611
625
  var CLAUDE_PROMPT_ARG_MAX = 2e5;
612
626
  async function loadMcpServers() {
613
627
  const claude = resolveClaudeExecutable();
@@ -719,13 +733,14 @@ var claudeAdapter = {
719
733
  );
720
734
  }
721
735
  const mode = permissionMode(thread);
722
- const { isOrchestratorThread } = await import("./global-workspace-IV6LIDTO.js");
736
+ const { isOrchestratorThread } = await import("./global-workspace-LM4AA4RO.js");
723
737
  const isOrchestrator = isOrchestratorThread(thread);
724
738
  const injectedServers = await buildInjectedMcpServers({
725
739
  includeSideboard: isOrchestrator,
726
740
  includeBrightsy: isBrightsyConnected()
727
741
  });
728
742
  const injectedBrightsyNames = injectedServers.filter((s) => s.name === "brightsy" || s.name.startsWith("brightsy_")).map((s) => s.name);
743
+ const chromeOn = claudeChromeEnabled();
729
744
  let allowedTools;
730
745
  if (isOrchestrator) {
731
746
  allowedTools = [
@@ -741,6 +756,9 @@ var claudeAdapter = {
741
756
  ...brightsyMcpAllowedTools(injectedBrightsyNames)
742
757
  ];
743
758
  }
759
+ if (chromeOn) {
760
+ allowedTools = [...allowedTools, ...CLAUDE_CHROME_ALLOWED_TOOLS];
761
+ }
744
762
  const args = [
745
763
  "-p",
746
764
  ...useStdin ? [] : [promptText],
@@ -755,7 +773,7 @@ var claudeAdapter = {
755
773
  if (mcpConfigPath) {
756
774
  args.push("--mcp-config", mcpConfigPath);
757
775
  }
758
- if (claudeChromeEnabled()) {
776
+ if (chromeOn) {
759
777
  args.push("--chrome");
760
778
  }
761
779
  if (useStdin) {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ensureGlobalCoordinatorCwd
3
- } from "./chunk-SNHWAARD.js";
3
+ } from "./chunk-BMB7WCGF.js";
4
4
  import {
5
5
  allocateTeamName,
6
6
  takenSlugsFromThread,
7
7
  teamSlugFromName
8
- } from "./chunk-LXHSRNJJ.js";
8
+ } from "./chunk-UFWEANLU.js";
9
9
  import {
10
10
  createEmptyThread,
11
11
  listThreads,
@@ -6,8 +6,8 @@ import {
6
6
  enrichWorkspacesWithGithub,
7
7
  ensureGlobalCoordinatorCwd,
8
8
  formatWorkspaceInventory
9
- } from "./chunk-SNHWAARD.js";
10
- import "./chunk-LXHSRNJJ.js";
9
+ } from "./chunk-BMB7WCGF.js";
10
+ import "./chunk-UFWEANLU.js";
11
11
  import "./chunk-HYRHI3QU.js";
12
12
  import "./chunk-M37RITA6.js";
13
13
  import "./chunk-AJ6ROGD7.js";
@@ -11,9 +11,9 @@ import {
11
11
  orchestrationTitleNeedsSoccerNickname,
12
12
  orchestratorSessionPoisonedByBuiltins,
13
13
  takenTeamSlugsForOrchestration
14
- } from "./chunk-5263JXQY.js";
15
- import "./chunk-SNHWAARD.js";
16
- import "./chunk-LXHSRNJJ.js";
14
+ } from "./chunk-Y2EWQ4TL.js";
15
+ import "./chunk-BMB7WCGF.js";
16
+ import "./chunk-UFWEANLU.js";
17
17
  import "./chunk-HYRHI3QU.js";
18
18
  import {
19
19
  globalAgentCwd