@sideboard-ai/core 0.1.345 → 0.1.347

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 (67) hide show
  1. package/dist/{abletime-MSIMJKKQ.js → abletime-3HRWLQZJ.js} +4 -4
  2. package/dist/{abletime-X2TJ6PPK.js → abletime-CGFJZB7L.js} +4 -4
  3. package/dist/{abletime-oauth-DEIENLHC.js → abletime-oauth-JQDSH5OL.js} +3 -3
  4. package/dist/{abletime-oauth-2RUKRZYZ.js → abletime-oauth-QNJQLHR4.js} +3 -3
  5. package/dist/{abletime-rest-UBLSGMSA.js → abletime-rest-TANL5TMY.js} +3 -3
  6. package/dist/{abletime-rest-HWBUPI4R.js → abletime-rest-UQA2CRZN.js} +3 -3
  7. package/dist/{agents-AQM7NLXD.js → agents-5MFGVK7C.js} +7 -7
  8. package/dist/{agents-7CHZO3K3.js → agents-T4XBZZDA.js} +7 -7
  9. package/dist/{app-settings-Q2F57NVK.js → app-settings-PPIMYJKS.js} +3 -1
  10. package/dist/{app-settings-A6JUT2SF.js → app-settings-SNOPJ7P5.js} +3 -1
  11. package/dist/{chunk-5IMXA563.js → chunk-27XWAI7S.js} +22 -22
  12. package/dist/{chunk-RTZO2YJC.js → chunk-2HPVGTHF.js} +2 -2
  13. package/dist/{chunk-GHKJBZW5.js → chunk-4NXGVJA6.js} +2 -2
  14. package/dist/{chunk-O5WRVQFT.js → chunk-5FUAOU3G.js} +1 -1
  15. package/dist/{chunk-3J3XOIHF.js → chunk-62ALWH3T.js} +3 -3
  16. package/dist/{chunk-J3BQHHDZ.js → chunk-6TV6L2DD.js} +4 -4
  17. package/dist/{chunk-4PHOJMZI.js → chunk-6WMNIX2U.js} +35 -2
  18. package/dist/{chunk-4PXHJA5K.js → chunk-7B2OUQON.js} +2 -2
  19. package/dist/{chunk-TD76ORBJ.js → chunk-AJMERXZP.js} +2 -2
  20. package/dist/{chunk-QTDCPMOW.js → chunk-ATS7SYHG.js} +1 -1
  21. package/dist/{chunk-AG2RM3DF.js → chunk-CEQ4Z32M.js} +3 -3
  22. package/dist/{chunk-5TS3KVGI.js → chunk-E77SRVVO.js} +1 -1
  23. package/dist/{chunk-5SJGR3VS.js → chunk-F7WP2U5I.js} +12 -9
  24. package/dist/{chunk-YFPSTG52.js → chunk-FDYMVJFU.js} +5 -5
  25. package/dist/{chunk-IYX53WZY.js → chunk-GAGTEI6B.js} +5 -5
  26. package/dist/{chunk-JZKNRDKF.js → chunk-IJNTTVFH.js} +23 -23
  27. package/dist/{chunk-MB3GOWB3.js → chunk-IVRWRYTH.js} +19 -10
  28. package/dist/{chunk-3DMRQB4Y.js → chunk-JCYGQKER.js} +1 -1
  29. package/dist/{chunk-JHT3CYLT.js → chunk-MOUAM6ZC.js} +1 -1
  30. package/dist/{chunk-Z54FI4VL.js → chunk-NTY5WGRD.js} +2 -2
  31. package/dist/{chunk-LHU6ZBFB.js → chunk-OHUAAX3O.js} +2 -2
  32. package/dist/{chunk-NQHEEGTH.js → chunk-PVCECFJK.js} +1 -1
  33. package/dist/{chunk-MHRU743Z.js → chunk-Q4TZA4MN.js} +2247 -2155
  34. package/dist/{chunk-4SNEW63T.js → chunk-RUIHNWRV.js} +3 -3
  35. package/dist/{chunk-NDBMDHQ5.js → chunk-RYPD7XWV.js} +5 -5
  36. package/dist/{chunk-FNAP6CCS.js → chunk-UJMCTGV7.js} +2 -2
  37. package/dist/{chunk-S3UGLMGE.js → chunk-WWU4SYZR.js} +35 -2
  38. package/dist/{chunk-4YGVJRXY.js → chunk-XNGW4OYD.js} +4 -4
  39. package/dist/{chunk-TW63CYUA.js → chunk-Y6VQX2LY.js} +2679 -2587
  40. package/dist/{chunk-BD7KUYJA.js → chunk-ZJMYCDYQ.js} +5 -5
  41. package/dist/{conductor-DUHRZUQY.js → conductor-EMGMDNHL.js} +5 -5
  42. package/dist/{conductor-3A2TNWUW.js → conductor-LYQKONSA.js} +5 -5
  43. package/dist/{coordinator-prompt-OX6A4MDA.js → coordinator-prompt-DLY3FS2L.js} +4 -4
  44. package/dist/{coordinator-prompt-7QALNDIV.js → coordinator-prompt-WALVMGKI.js} +4 -4
  45. package/dist/{global-workspace-HM2RKBCT.js → global-workspace-7OQ5O6JT.js} +4 -4
  46. package/dist/{global-workspace-6GGS3DWU.js → global-workspace-UG2A3CEM.js} +4 -4
  47. package/dist/index.cjs +1090 -640
  48. package/dist/index.d.cts +62 -8
  49. package/dist/index.d.ts +62 -8
  50. package/dist/index.js +325 -32
  51. package/dist/{linear-WYI64BMX.js → linear-MIJO6DCV.js} +2 -2
  52. package/dist/{linear-JE4WAZ3W.js → linear-PKYJH4WK.js} +2 -2
  53. package/dist/{linear-list-I4NAOWPN.js → linear-list-JPQ27RXG.js} +1 -1
  54. package/dist/{linear-list-CGUCPWTV.js → linear-list-N57PR6JM.js} +1 -1
  55. package/dist/mcp/run-stdio.cjs +500 -224
  56. package/dist/mcp/run-stdio.js +106 -21
  57. package/dist/{optional-cli-7QXXPEN6.js → optional-cli-4GTEDEYJ.js} +3 -3
  58. package/dist/{optional-cli-YHLVTVRK.js → optional-cli-RPJIQBDX.js} +4 -4
  59. package/dist/{orchestrator-OWO6LQ5U.js → orchestrator-AJZNVREM.js} +10 -10
  60. package/dist/{orchestrator-POMFVZLB.js → orchestrator-BUEPWNCF.js} +10 -10
  61. package/dist/{thread-store-HETUMDVA.js → thread-store-MEUWZDVV.js} +2 -2
  62. package/dist/{thread-store-V5IDUJ4L.js → thread-store-R3G5VBII.js} +2 -2
  63. package/dist/{workspaces-DTMPNDPW.js → workspaces-35T6FW57.js} +4 -4
  64. package/dist/{workspaces-V6IIBSKA.js → workspaces-KWGTP7DI.js} +4 -4
  65. package/dist/{worktree-FX5FT6BI.js → worktree-5P7SCST3.js} +3 -3
  66. package/dist/{worktree-BD3EJE24.js → worktree-ROJXGBWS.js} +3 -3
  67. package/package.json +1 -1
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  abletimeRestUrl,
12
12
  textFromAbleTimeDoc
13
- } from "./chunk-TD76ORBJ.js";
13
+ } from "./chunk-AJMERXZP.js";
14
14
  import {
15
15
  assertAbleTimeCredential,
16
16
  callAbleTimeTool,
17
17
  normalizeAbleTimeHost,
18
18
  rewriteAbleTimeError
19
- } from "./chunk-YFPSTG52.js";
19
+ } from "./chunk-FDYMVJFU.js";
20
20
  import {
21
21
  httpFetch
22
22
  } from "./chunk-JAT3JFOS.js";
@@ -25,7 +25,7 @@ import {
25
25
  getAbleTimeHost,
26
26
  isAbleTimeConnected,
27
27
  saveAbleTimeConnection
28
- } from "./chunk-4PHOJMZI.js";
28
+ } from "./chunk-6WMNIX2U.js";
29
29
 
30
30
  // src/integrations/abletime-attachments.ts
31
31
  function asRecord(value) {
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  getAbleTimeHost,
8
8
  isAbleTimeConnected
9
- } from "./chunk-S3UGLMGE.js";
9
+ } from "./chunk-WWU4SYZR.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-2RUKRZYZ.js").then((m) => m.ensureAbleTimeAccessToken());
158
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QNJQLHR4.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-2RUKRZYZ.js").then((m) => m.ensureAbleTimeAccessToken());
229
+ const rawToken = opts?.token ?? await import("./abletime-oauth-QNJQLHR4.js").then((m) => m.ensureAbleTimeAccessToken());
230
230
  if (rawToken && ableTimeUsesRest(rawToken)) {
231
- const { callAbleTimeRestTool } = await import("./abletime-rest-UBLSGMSA.js");
231
+ const { callAbleTimeRestTool } = await import("./abletime-rest-TANL5TMY.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-UBLSGMSA.js");
247
+ const { callAbleTimeRestTool } = await import("./abletime-rest-TANL5TMY.js");
248
248
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
249
249
  }
250
250
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
@@ -2,11 +2,11 @@ import {
2
2
  OPTIONAL_SERVICES,
3
3
  isOptionalServiceId,
4
4
  optionalServiceSpec
5
- } from "./chunk-MB3GOWB3.js";
5
+ } from "./chunk-IVRWRYTH.js";
6
6
  import {
7
7
  installNpmGlobalPackage,
8
8
  whichOnPath
9
- } from "./chunk-GHKJBZW5.js";
9
+ } from "./chunk-4NXGVJA6.js";
10
10
  import {
11
11
  enrichPathWithNpmGlobalBin
12
12
  } from "./chunk-R4W4VQJZ.js";
@@ -462,6 +462,12 @@ function normalizeVault(raw) {
462
462
  if (typeof raw.posthogPersonalApiKey === "string" && raw.posthogPersonalApiKey.trim()) {
463
463
  out.posthogPersonalApiKey = raw.posthogPersonalApiKey.trim();
464
464
  }
465
+ if (typeof raw.posthogAccessToken === "string" && raw.posthogAccessToken.trim()) {
466
+ out.posthogAccessToken = raw.posthogAccessToken.trim();
467
+ }
468
+ if (typeof raw.posthogRefreshToken === "string" && raw.posthogRefreshToken.trim()) {
469
+ out.posthogRefreshToken = raw.posthogRefreshToken.trim();
470
+ }
465
471
  if (typeof raw.sentryAuthToken === "string" && raw.sentryAuthToken.trim()) {
466
472
  out.sentryAuthToken = raw.sentryAuthToken.trim();
467
473
  }
@@ -870,6 +876,8 @@ var INTEGRATION_VAULT_KEYS = [
870
876
  "vercelToken",
871
877
  "supabaseAccessToken",
872
878
  "posthogPersonalApiKey",
879
+ "posthogAccessToken",
880
+ "posthogRefreshToken",
873
881
  "sentryAuthToken"
874
882
  ];
875
883
  function hasLinearOAuth(integrations) {
@@ -903,7 +911,7 @@ function toPublicAppSettings(settings) {
903
911
  hasAbleTimeOAuth: Boolean(settings.integrations.abletimeRefreshToken?.trim()),
904
912
  hasVercelToken: Boolean(settings.integrations.vercelToken?.trim()),
905
913
  hasSupabaseToken: Boolean(settings.integrations.supabaseAccessToken?.trim()),
906
- hasPosthogToken: Boolean(settings.integrations.posthogPersonalApiKey?.trim()),
914
+ hasPosthogToken: hasPosthogCredentials(settings.integrations),
907
915
  hasSentryToken: Boolean(settings.integrations.sentryAuthToken?.trim()),
908
916
  hasRemoteAccount: Boolean(settings.integrations.remoteAccountToken?.trim())
909
917
  }
@@ -1107,6 +1115,12 @@ function normalizeIntegrations(raw) {
1107
1115
  const key = source.posthogPersonalApiKey.trim();
1108
1116
  if (key) out.posthogPersonalApiKey = key;
1109
1117
  }
1118
+ for (const key of ["posthogAccessToken", "posthogRefreshToken"]) {
1119
+ const token = typeof source[key] === "string" ? source[key].trim() : "";
1120
+ if (token) out[key] = token;
1121
+ }
1122
+ const posthogExp = Number(source.posthogTokenExpiresAt);
1123
+ if (Number.isFinite(posthogExp)) out.posthogTokenExpiresAt = posthogExp;
1110
1124
  if (typeof source.posthogHost === "string") {
1111
1125
  const host = source.posthogHost.trim();
1112
1126
  if (host) out.posthogHost = host;
@@ -2040,8 +2054,26 @@ function disconnectLinearConnection() {
2040
2054
  delete integrations.linearOrganizationName;
2041
2055
  return saveAppSettings({ ...current, integrations });
2042
2056
  }
2057
+ function hasPosthogCredentials(integrations) {
2058
+ return Boolean(
2059
+ integrations.posthogAccessToken?.trim() || integrations.posthogRefreshToken?.trim() || integrations.posthogPersonalApiKey?.trim()
2060
+ );
2061
+ }
2043
2062
  function isPosthogConnected(settings = loadAppSettings()) {
2044
- return Boolean(settings.integrations.posthogPersonalApiKey?.trim());
2063
+ return hasPosthogCredentials(settings.integrations);
2064
+ }
2065
+ function savePosthogOAuth(input) {
2066
+ const current = loadAppSettings();
2067
+ const integrations = { ...current.integrations };
2068
+ integrations.posthogAccessToken = input.accessToken.trim();
2069
+ if (input.refreshToken?.trim()) integrations.posthogRefreshToken = input.refreshToken.trim();
2070
+ if (typeof input.expiresIn === "number" && Number.isFinite(input.expiresIn)) {
2071
+ integrations.posthogTokenExpiresAt = Date.now() + Math.max(0, input.expiresIn) * 1e3;
2072
+ }
2073
+ if (input.host?.trim()) integrations.posthogHost = input.host.trim();
2074
+ if (input.viewerName?.trim()) integrations.posthogViewerName = input.viewerName.trim().slice(0, 120);
2075
+ delete integrations.posthogPersonalApiKey;
2076
+ return saveAppSettings({ ...current, integrations });
2045
2077
  }
2046
2078
  function isAbleTimeConnected(settings = loadAppSettings()) {
2047
2079
  return Boolean(
@@ -2509,6 +2541,7 @@ export {
2509
2541
  saveLinearOAuth,
2510
2542
  disconnectLinearConnection,
2511
2543
  isPosthogConnected,
2544
+ savePosthogOAuth,
2512
2545
  isAbleTimeConnected,
2513
2546
  getAbleTimeAccessToken,
2514
2547
  getAbleTimeHost,
@@ -5,7 +5,7 @@ import {
5
5
  resolveGithubRepoSlug,
6
6
  resolveOriginRemote,
7
7
  resolveRepoRoot
8
- } from "./chunk-Z54FI4VL.js";
8
+ } from "./chunk-NTY5WGRD.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-QTDCPMOW.js";
17
+ } from "./chunk-ATS7SYHG.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-4PHOJMZI.js";
34
+ } from "./chunk-6WMNIX2U.js";
35
35
  import {
36
36
  appDataDir,
37
37
  globalAgentCwd,
@@ -394,7 +394,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
394
394
  "- linear_* (when Linear is connected) \u2014 list_teams for team key/states; linear_list_projects for project names; get/search include the project a ticket is on; get/create/update/comment with ENG-123. Worktree agents have the same Account tools \u2014 prefer they comment, update status, and create spin-offs (parent=) on their own ticket when they were asked to do the work. When reviewing a PR or ticket, do not comment or update until the user types a next step \u2014 they should work through the feedback in chat first. Do not tell the child to ask_user after the review. Scope errors: reconnect Linear in Account settings. Prefer these over any Linear MCP the CLI may still list. Worktree agents use the Claude Linear connector only when Account Linear is not set or the Sideboard call fails, and they do not mention that connector startup failure when Sideboard works.",
395
395
  "- github_* \u2014 get/comment/update/create GitHub issues via Account `gh` (#123). github_list_projects and get/search include GitHub Projects. projectsError or a missing read:project scope \u2192 `gh auth refresh -s read:project`. Worktree agents have these too. Prefer Sideboard `github_*` while Account `gh` works. A failed Claude GitHub connector (`mcp_github_github`) is not a Sideboard outage \u2014 do not mention it. Use that connector only when `gh` is not set up or the Sideboard call fails. Pass parent= for spin-offs. When reviewing a PR or ticket, do not comment, submit `gh pr review`, or update the PR/ticket until the user types a next step.",
396
396
  "- abletime_* (when AbleTime is connected) \u2014 orientation first; abletime_list_projects lists projects; get/list include the project a task is on; get/comment/update/create (parent= for spin-offs); ensure_task when work has no ticket (or create_workspace from the default branch auto-creates one). Worktree agents have the same Account tools. Same review-write gate as Linear/GitHub.",
397
- "- Optional connectors (Vercel, Supabase, Sentry) in Settings \u2192 Connectors inject tokens into worktree agent env when connected. Prefer official CLIs (`vercel`, `supabase`, `sentry-cli`). When Settings \u2192 Connectors has a PostHog personal API key, PostHog is the Sideboard tool `posthog_api` (GET by default; POST `/api/projects/:id/query/` or `/api/environments/:id/query/` is a read and does not need write=true; other POST and PATCH need write=true only when the user asked to change data). The PostHog key stays in the vault \u2014 do not read it from the environment, and do not sign in to a PostHog MCP. When no PostHog API key is set, use the Claude PostHog connector. When a key is set, ignore a failed Claude PostHog connector and do not sign in to a PostHog MCP. If a Vercel, Supabase, or Sentry MCP needsAuth or is unauthorized while that Sideboard token is set, do not sign in \u2014 use the native CLI. When that token is not set or the CLI call fails, the Claude connector is the fallback. Do not mention a Claude connector startup failure when the Sideboard connection works. Tell any worktree agent (Claude / Cursor / Codex / OpenCode) to write CLI output to `.context/cli/` and read a slice. If a CLI is missing, the user presses Install CLI on that row. Do not add vendor MCPs. Git (`gh`) stays Settings \u2192 Git; issue tracking stays Settings \u2192 Issues. The phone remote is Settings \u2192 Remote \u2014 do not look up Slack users.",
397
+ "- Optional connectors (Vercel, Supabase, Sentry) in Settings \u2192 Connectors inject tokens into worktree agent env when connected. Prefer official CLIs (`vercel`, `supabase`, `sentry-cli`). When Settings \u2192 Connectors is signed in to PostHog, PostHog is the Sideboard tool `posthog_api` (GET by default; POST `/api/projects/:id/query/` or `/api/environments/:id/query/` is a read and does not need write=true; other POST and PATCH need write=true only when the user asked to change data). The PostHog token stays in the vault \u2014 do not read it from the environment, and do not sign in to a PostHog MCP. When PostHog is not signed in, Claude worktree turns load the signed-in PostHog connector as server claude.ai PostHog (tools mcp__claude_ai_PostHog__*) inside --mcp-config. --strict-mcp-config does not load claude.ai connectors, and --allowedTools only skips prompts. Cursor, Codex, and OpenCode do not have those tools. When PostHog is signed in, ignore a failed Claude PostHog connector and do not sign in to a PostHog MCP. If a Vercel, Supabase, or Sentry MCP needsAuth or is unauthorized while that Sideboard token is set, do not sign in \u2014 use the native CLI. When that token is not set or the CLI call fails, the Claude connector is the fallback. Do not mention a Claude connector startup failure when the Sideboard connection works. Tell any worktree agent (Claude / Cursor / Codex / OpenCode) to write CLI output to `.context/cli/` and read a slice. If a CLI is missing, the user presses Install CLI on that row. Do not add vendor MCPs. Git (`gh`) stays Settings \u2192 Git; issue tracking stays Settings \u2192 Issues. The phone remote is Settings \u2192 Remote \u2014 do not look up Slack users.",
398
398
  "- get_pr_stack / open_pr_stack_layers / add_stack_layer / create_pr_stack \u2014 GitHub stacked PRs (`gh stack`); one worktree per layer",
399
399
  "- list_models \u2014 only when you need a specific model (rare); otherwise omit model so Account defaults apply",
400
400
  "- list_chats / get_chat \u2014 live thread list (parent id + last message preview). get_chat on this orchestration chat lists child worktree agents (status + lastText). blockedReason is why that agent is waiting on a person. Also includes usage / lastTurnUsage. Archived workspaces and agents are list_archive, not this list.",