@sideboard-ai/core 0.1.346 → 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.
- package/dist/{abletime-MSIMJKKQ.js → abletime-3HRWLQZJ.js} +4 -4
- package/dist/{abletime-X2TJ6PPK.js → abletime-CGFJZB7L.js} +4 -4
- package/dist/{abletime-oauth-DEIENLHC.js → abletime-oauth-JQDSH5OL.js} +3 -3
- package/dist/{abletime-oauth-2RUKRZYZ.js → abletime-oauth-QNJQLHR4.js} +3 -3
- package/dist/{abletime-rest-UBLSGMSA.js → abletime-rest-TANL5TMY.js} +3 -3
- package/dist/{abletime-rest-HWBUPI4R.js → abletime-rest-UQA2CRZN.js} +3 -3
- package/dist/{agents-AQM7NLXD.js → agents-5MFGVK7C.js} +7 -7
- package/dist/{agents-7CHZO3K3.js → agents-T4XBZZDA.js} +7 -7
- package/dist/{app-settings-Q2F57NVK.js → app-settings-PPIMYJKS.js} +3 -1
- package/dist/{app-settings-A6JUT2SF.js → app-settings-SNOPJ7P5.js} +3 -1
- package/dist/{chunk-5IMXA563.js → chunk-27XWAI7S.js} +22 -22
- package/dist/{chunk-RTZO2YJC.js → chunk-2HPVGTHF.js} +2 -2
- package/dist/{chunk-GHKJBZW5.js → chunk-4NXGVJA6.js} +2 -2
- package/dist/{chunk-O5WRVQFT.js → chunk-5FUAOU3G.js} +1 -1
- package/dist/{chunk-3J3XOIHF.js → chunk-62ALWH3T.js} +3 -3
- package/dist/{chunk-J3BQHHDZ.js → chunk-6TV6L2DD.js} +4 -4
- package/dist/{chunk-4PHOJMZI.js → chunk-6WMNIX2U.js} +35 -2
- package/dist/{chunk-4PXHJA5K.js → chunk-7B2OUQON.js} +2 -2
- package/dist/{chunk-TD76ORBJ.js → chunk-AJMERXZP.js} +2 -2
- package/dist/{chunk-QTDCPMOW.js → chunk-ATS7SYHG.js} +1 -1
- package/dist/{chunk-AG2RM3DF.js → chunk-CEQ4Z32M.js} +3 -3
- package/dist/{chunk-5TS3KVGI.js → chunk-E77SRVVO.js} +1 -1
- package/dist/{chunk-5SJGR3VS.js → chunk-F7WP2U5I.js} +12 -9
- package/dist/{chunk-YFPSTG52.js → chunk-FDYMVJFU.js} +5 -5
- package/dist/{chunk-IYX53WZY.js → chunk-GAGTEI6B.js} +5 -5
- package/dist/{chunk-JZKNRDKF.js → chunk-IJNTTVFH.js} +23 -23
- package/dist/{chunk-MB3GOWB3.js → chunk-IVRWRYTH.js} +19 -10
- package/dist/{chunk-3DMRQB4Y.js → chunk-JCYGQKER.js} +1 -1
- package/dist/{chunk-JHT3CYLT.js → chunk-MOUAM6ZC.js} +1 -1
- package/dist/{chunk-Z54FI4VL.js → chunk-NTY5WGRD.js} +2 -2
- package/dist/{chunk-LHU6ZBFB.js → chunk-OHUAAX3O.js} +2 -2
- package/dist/{chunk-NQHEEGTH.js → chunk-PVCECFJK.js} +1 -1
- package/dist/{chunk-MHRU743Z.js → chunk-Q4TZA4MN.js} +2247 -2155
- package/dist/{chunk-4SNEW63T.js → chunk-RUIHNWRV.js} +3 -3
- package/dist/{chunk-NDBMDHQ5.js → chunk-RYPD7XWV.js} +5 -5
- package/dist/{chunk-FNAP6CCS.js → chunk-UJMCTGV7.js} +2 -2
- package/dist/{chunk-S3UGLMGE.js → chunk-WWU4SYZR.js} +35 -2
- package/dist/{chunk-4YGVJRXY.js → chunk-XNGW4OYD.js} +4 -4
- package/dist/{chunk-TW63CYUA.js → chunk-Y6VQX2LY.js} +2679 -2587
- package/dist/{chunk-BD7KUYJA.js → chunk-ZJMYCDYQ.js} +5 -5
- package/dist/{conductor-DUHRZUQY.js → conductor-EMGMDNHL.js} +5 -5
- package/dist/{conductor-3A2TNWUW.js → conductor-LYQKONSA.js} +5 -5
- package/dist/{coordinator-prompt-OX6A4MDA.js → coordinator-prompt-DLY3FS2L.js} +4 -4
- package/dist/{coordinator-prompt-7QALNDIV.js → coordinator-prompt-WALVMGKI.js} +4 -4
- package/dist/{global-workspace-HM2RKBCT.js → global-workspace-7OQ5O6JT.js} +4 -4
- package/dist/{global-workspace-6GGS3DWU.js → global-workspace-UG2A3CEM.js} +4 -4
- package/dist/index.cjs +1090 -640
- package/dist/index.d.cts +60 -6
- package/dist/index.d.ts +60 -6
- package/dist/index.js +325 -32
- package/dist/{linear-WYI64BMX.js → linear-MIJO6DCV.js} +2 -2
- package/dist/{linear-JE4WAZ3W.js → linear-PKYJH4WK.js} +2 -2
- package/dist/{linear-list-I4NAOWPN.js → linear-list-JPQ27RXG.js} +1 -1
- package/dist/{linear-list-CGUCPWTV.js → linear-list-N57PR6JM.js} +1 -1
- package/dist/mcp/run-stdio.cjs +500 -224
- package/dist/mcp/run-stdio.js +106 -21
- package/dist/{optional-cli-7QXXPEN6.js → optional-cli-4GTEDEYJ.js} +3 -3
- package/dist/{optional-cli-YHLVTVRK.js → optional-cli-RPJIQBDX.js} +4 -4
- package/dist/{orchestrator-OWO6LQ5U.js → orchestrator-AJZNVREM.js} +10 -10
- package/dist/{orchestrator-POMFVZLB.js → orchestrator-BUEPWNCF.js} +10 -10
- package/dist/{thread-store-HETUMDVA.js → thread-store-MEUWZDVV.js} +2 -2
- package/dist/{thread-store-V5IDUJ4L.js → thread-store-R3G5VBII.js} +2 -2
- package/dist/{workspaces-DTMPNDPW.js → workspaces-35T6FW57.js} +4 -4
- package/dist/{workspaces-V6IIBSKA.js → workspaces-KWGTP7DI.js} +4 -4
- package/dist/{worktree-FX5FT6BI.js → worktree-5P7SCST3.js} +3 -3
- package/dist/{worktree-BD3EJE24.js → worktree-ROJXGBWS.js} +3 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_ABLETIME_HOST,
|
|
3
3
|
normalizeAbleTimeHost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FDYMVJFU.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-
|
|
13
|
+
} from "./chunk-6WMNIX2U.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-
|
|
283
|
+
const { getAbleTimeOrientation } = await import("./abletime-CGFJZB7L.js");
|
|
284
284
|
const orientation = await getAbleTimeOrientation({ token, host });
|
|
285
285
|
return saveAbleTimeConnection({
|
|
286
286
|
accessToken: token,
|
|
@@ -27,13 +27,12 @@ var OPTIONAL_SERVICES = [
|
|
|
27
27
|
{
|
|
28
28
|
id: "posthog",
|
|
29
29
|
label: "PostHog",
|
|
30
|
-
hint: "Product analytics.
|
|
30
|
+
hint: "Product analytics. Sign in with your browser. Agents call `posthog_api`.",
|
|
31
31
|
tokenPlaceholder: "phx_\u2026",
|
|
32
|
-
tokenDocs: "https://
|
|
32
|
+
tokenDocs: "https://posthog.com/docs/api/oauth",
|
|
33
33
|
envKey: "POSTHOG_PERSONAL_API_KEY",
|
|
34
34
|
hostEnvKey: "POSTHOG_HOST",
|
|
35
|
-
defaultHost: "https://us.posthog.com"
|
|
36
|
-
hostPlaceholder: "https://us.posthog.com"
|
|
35
|
+
defaultHost: "https://us.posthog.com"
|
|
37
36
|
},
|
|
38
37
|
{
|
|
39
38
|
id: "sentry",
|
|
@@ -70,7 +69,11 @@ function normalizeServiceOrigin(raw, fallback) {
|
|
|
70
69
|
function optionalServiceConnected(id, integrations) {
|
|
71
70
|
if (id === "vercel") return Boolean(integrations.vercelToken?.trim());
|
|
72
71
|
if (id === "supabase") return Boolean(integrations.supabaseAccessToken?.trim());
|
|
73
|
-
if (id === "posthog")
|
|
72
|
+
if (id === "posthog") {
|
|
73
|
+
return Boolean(
|
|
74
|
+
integrations.posthogAccessToken?.trim() || integrations.posthogRefreshToken?.trim() || integrations.posthogPersonalApiKey?.trim()
|
|
75
|
+
);
|
|
76
|
+
}
|
|
74
77
|
return Boolean(integrations.sentryAuthToken?.trim());
|
|
75
78
|
}
|
|
76
79
|
function connectedOptionalServices(integrations) {
|
|
@@ -85,12 +88,12 @@ function connectorDirectiveLine(spec, cli) {
|
|
|
85
88
|
if (spec.cli) {
|
|
86
89
|
return `- ${spec.label}: use \`${spec.cli}\` (\`${spec.envKey}\`${extras})${cliPresencePhrase(spec, cli)}. Do not add a ${spec.label} MCP.`;
|
|
87
90
|
}
|
|
88
|
-
return `- ${spec.label}: call \`posthog_api\`. Path must start with \`/api/\`. GET is the default. POST \`/api/projects/:id/query/\` or \`/api/environments/:id/query/\` is a read and does not need \`write=true\`. Other POST and PATCH require \`write=true\` only when the user asked to change data. Do not read the
|
|
91
|
+
return `- ${spec.label}: call \`posthog_api\`. Path must start with \`/api/\`. GET is the default. POST \`/api/projects/:id/query/\` or \`/api/environments/:id/query/\` is a read and does not need \`write=true\`. Other POST and PATCH require \`write=true\` only when the user asked to change data. Do not read the token from the environment. Do not add a ${spec.label} MCP.`;
|
|
89
92
|
}
|
|
90
93
|
function connectorAuthCaution(posthog, cliConnected) {
|
|
91
94
|
const signIn = posthog ? "If a connector MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP." : "If a Vercel, Supabase, or Sentry MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP.";
|
|
92
95
|
const token = cliConnected ? " CLI tokens are already in this process." : "";
|
|
93
|
-
const key = posthog ? " Do not read a PostHog
|
|
96
|
+
const key = posthog ? " Do not read a PostHog token from the environment." : "";
|
|
94
97
|
return `${signIn}${token}${key} When this Sideboard connection works, ignore a Claude connector that failed to start. Use the Claude connector only when this connection is not set or the CLI call fails.`;
|
|
95
98
|
}
|
|
96
99
|
function connectorReminderBit(spec, cli) {
|
|
@@ -118,14 +121,14 @@ function formatOptionalServicesReminder(integrations, cli) {
|
|
|
118
121
|
const bits = connected.map((spec) => connectorReminderBit(spec, cli)).join(". ");
|
|
119
122
|
const tokenBit = connected.some((spec) => spec.cli) ? "CLI tokens are already in this process. " : "";
|
|
120
123
|
const posthog = connected.some((spec) => spec.id === "posthog");
|
|
121
|
-
const auth = posthog ? "If a connector MCP needsAuth or is unauthorized, ignore it and use the CLI or `posthog_api` while this Sideboard connection works. Use the Claude connector only when it is not set or the call fails. Do not read a PostHog
|
|
124
|
+
const auth = posthog ? "If a connector MCP needsAuth or is unauthorized, ignore it and use the CLI or `posthog_api` while this Sideboard connection works. Use the Claude connector only when it is not set or the call fails. Do not read a PostHog token from the environment." : "If a Vercel, Supabase, or Sentry MCP needsAuth or is unauthorized, ignore it and use the CLI while this Sideboard connection works. Use the Claude connector only when it is not set or the CLI call fails.";
|
|
122
125
|
return `Settings \u2192 Connectors: ${tokenBit}${bits}. ${auth} Do not add vendor MCPs. Shell dumps from those CLIs go in \`.context/cli/\` \u2014 read a slice.`;
|
|
123
126
|
}
|
|
124
127
|
async function connectedCliPresence(integrations) {
|
|
125
128
|
const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
|
|
126
129
|
if (ids.length === 0) return void 0;
|
|
127
130
|
try {
|
|
128
|
-
const { optionalCliPresence } = await import("./optional-cli-
|
|
131
|
+
const { optionalCliPresence } = await import("./optional-cli-4GTEDEYJ.js");
|
|
129
132
|
return await optionalCliPresence(ids);
|
|
130
133
|
} catch {
|
|
131
134
|
return void 0;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getAbleTimeHost,
|
|
6
6
|
isAbleTimeConnected
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6WMNIX2U.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-
|
|
156
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-JQDSH5OL.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-
|
|
227
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-JQDSH5OL.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
228
228
|
if (rawToken && ableTimeUsesRest(rawToken)) {
|
|
229
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
229
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-UQA2CRZN.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-
|
|
245
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-UQA2CRZN.js");
|
|
246
246
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
247
247
|
}
|
|
248
248
|
throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
isGlobalThread,
|
|
9
9
|
isOrchestratorThread,
|
|
10
10
|
isSlackCoordinatorThread
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XNGW4OYD.js";
|
|
12
12
|
import {
|
|
13
13
|
mergeAgentGitAuthEnv,
|
|
14
14
|
resolveAgentGitAuthEnv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NTY5WGRD.js";
|
|
16
16
|
import {
|
|
17
17
|
REVIEW_TAB_TITLE,
|
|
18
18
|
allocateTeamName,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
updateThread,
|
|
25
25
|
worktreeNameFromPath,
|
|
26
26
|
writeThread
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ATS7SYHG.js";
|
|
28
28
|
import {
|
|
29
29
|
ensureWorktreeSideboardIgnored
|
|
30
30
|
} from "./chunk-BMRJNRQK.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
assertOrchestratorCapableAgent,
|
|
51
51
|
contextTokens
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6WMNIX2U.js";
|
|
53
53
|
import {
|
|
54
54
|
stripNestedElectronEnv
|
|
55
55
|
} from "./chunk-4TR3HZFT.js";
|
|
@@ -1705,7 +1705,7 @@ var PORT_RANGE_SIZE = 10;
|
|
|
1705
1705
|
var RECLAIM_RETRY_DELAY_MS = 40;
|
|
1706
1706
|
var RECLAIM_TRIES = 8;
|
|
1707
1707
|
async function killReclaimable(ports, worktreePath, signal) {
|
|
1708
|
-
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-
|
|
1708
|
+
const { killListenersOnPorts: killListenersOnPorts2, killStaleWorktreeListeners: killStaleWorktreeListeners2 } = await import("./conductor-EMGMDNHL.js");
|
|
1709
1709
|
if (worktreePath) killStaleWorktreeListeners2(ports, worktreePath, signal);
|
|
1710
1710
|
else killListenersOnPorts2(ports);
|
|
1711
1711
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatOptionalServicesDirectiveForTurn,
|
|
3
3
|
formatOptionalServicesReminderForTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IVRWRYTH.js";
|
|
5
5
|
import {
|
|
6
6
|
extractPresentedPlan,
|
|
7
7
|
isPresentPlanToolName,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
parseSessionQuotaResetAt,
|
|
22
22
|
planModeTurnInstruction,
|
|
23
23
|
resolveQuotaFallbackAgent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q4TZA4MN.js";
|
|
25
25
|
import {
|
|
26
26
|
applyWorktreePkgCacheEnv,
|
|
27
27
|
buildBrightsySessionSeed,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
worktreeDevProcessKey,
|
|
57
57
|
worktreeRunProcessKey,
|
|
58
58
|
worktreeSetupProcessKey
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-GAGTEI6B.js";
|
|
60
60
|
import {
|
|
61
61
|
applyAgentEvent,
|
|
62
62
|
clipAgentEventForPaint,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
stageAbsolutePathsAsAttachments,
|
|
102
102
|
stageBuffersAsAttachments,
|
|
103
103
|
syncWorkspacesFromThreads
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-XNGW4OYD.js";
|
|
105
105
|
import {
|
|
106
106
|
addPrStackLayer,
|
|
107
107
|
allocateTeamSlug,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
resolveRepoRoot,
|
|
155
155
|
switchWorktreeBranch,
|
|
156
156
|
withRepoGitLock
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-NTY5WGRD.js";
|
|
158
158
|
import {
|
|
159
159
|
REVIEW_TAB_TITLE,
|
|
160
160
|
agentNicknameFromWorktreePath,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
worktreeNameFromPath,
|
|
187
187
|
worktreeSlugForTicket,
|
|
188
188
|
writeThread
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-ATS7SYHG.js";
|
|
190
190
|
import {
|
|
191
191
|
askBlockStillWaiting,
|
|
192
192
|
extractPendingPlanQuestions,
|
|
@@ -264,7 +264,7 @@ import {
|
|
|
264
264
|
wakeOrchestratorOnGithubEdgesEnabled,
|
|
265
265
|
withTurnScopedCost,
|
|
266
266
|
writeViewerContext
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-6WMNIX2U.js";
|
|
268
268
|
import {
|
|
269
269
|
examplePrefixedBranch,
|
|
270
270
|
sanitizeGitBranchPrefix
|
|
@@ -527,9 +527,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
527
527
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
530
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-UG2A3CEM.js");
|
|
531
531
|
if (isGlobalThread2(thread)) {
|
|
532
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
532
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-DLY3FS2L.js");
|
|
533
533
|
ensureGlobalCoordinatorCwd2(
|
|
534
534
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
535
535
|
);
|
|
@@ -3299,7 +3299,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3299
3299
|
});
|
|
3300
3300
|
await requireAgent(resolved.agent);
|
|
3301
3301
|
if (input.cowboy) {
|
|
3302
|
-
const { cowboyModeEnabled } = await import("./app-settings-
|
|
3302
|
+
const { cowboyModeEnabled } = await import("./app-settings-SNOPJ7P5.js");
|
|
3303
3303
|
if (!cowboyModeEnabled()) {
|
|
3304
3304
|
throw new Error(
|
|
3305
3305
|
"Cowboy mode is off. Enable it in Settings \u2192 Advanced."
|
|
@@ -3358,7 +3358,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3358
3358
|
let sourceIsFork = false;
|
|
3359
3359
|
if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
|
|
3360
3360
|
if (isAbleTimeConnected() && getIssueSource() === "abletime") {
|
|
3361
|
-
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-
|
|
3361
|
+
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-CGFJZB7L.js");
|
|
3362
3362
|
const task = await ensureAbleTimeTask({
|
|
3363
3363
|
title: title?.trim() || "Untitled work",
|
|
3364
3364
|
description: input.prompt?.trim() || void 0
|
|
@@ -3469,7 +3469,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3469
3469
|
return readThread(thread.id) ?? thread;
|
|
3470
3470
|
}
|
|
3471
3471
|
async function listLinearIssues(agent, repoPath) {
|
|
3472
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
3472
|
+
const { getAdapter: getAdapter2 } = await import("./agents-5MFGVK7C.js");
|
|
3473
3473
|
await requireAgent(agent, { requireLinear: true });
|
|
3474
3474
|
const adapter = getAdapter2(agent);
|
|
3475
3475
|
if (!adapter.listLinearIssues) {
|
|
@@ -4252,7 +4252,7 @@ async function adoptThread(input) {
|
|
|
4252
4252
|
messages: input.messages ?? []
|
|
4253
4253
|
});
|
|
4254
4254
|
writeThread(thread);
|
|
4255
|
-
const { addWorkspace: addWorkspace2 } = await import("./workspaces-
|
|
4255
|
+
const { addWorkspace: addWorkspace2 } = await import("./workspaces-35T6FW57.js");
|
|
4256
4256
|
await addWorkspace2(repoPath);
|
|
4257
4257
|
const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-YQBN43QD.js");
|
|
4258
4258
|
await ensureWorktreeSideboardIgnored(input.worktreePath);
|
|
@@ -7877,11 +7877,11 @@ function realDeps() {
|
|
|
7877
7877
|
parentIdForThread,
|
|
7878
7878
|
designatedId: designatedOrchestratorId,
|
|
7879
7879
|
send: async (threadId, prompt) => {
|
|
7880
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
7880
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-BUEPWNCF.js");
|
|
7881
7881
|
await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
|
|
7882
7882
|
},
|
|
7883
7883
|
startOrchestration: async (prompt) => {
|
|
7884
|
-
const { startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7884
|
+
const { startOrchestration: startOrchestration2 } = await import("./orchestrator-BUEPWNCF.js");
|
|
7885
7885
|
const defaults = resolveOrchestratorDefaults();
|
|
7886
7886
|
await startOrchestration2({
|
|
7887
7887
|
goal: prompt,
|
|
@@ -7908,7 +7908,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
7908
7908
|
${prompt}`;
|
|
7909
7909
|
}
|
|
7910
7910
|
async function defaultDeps() {
|
|
7911
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7911
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-BUEPWNCF.js");
|
|
7912
7912
|
const orch = getOrchestrator2();
|
|
7913
7913
|
return {
|
|
7914
7914
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -8264,7 +8264,7 @@ var Orchestrator = class {
|
|
|
8264
8264
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
8265
8265
|
});
|
|
8266
8266
|
}
|
|
8267
|
-
const { autoCleanupOrphansEnabled } = await import("./app-settings-
|
|
8267
|
+
const { autoCleanupOrphansEnabled } = await import("./app-settings-SNOPJ7P5.js");
|
|
8268
8268
|
if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
8269
8269
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
8270
8270
|
}
|
|
@@ -8654,7 +8654,7 @@ var Orchestrator = class {
|
|
|
8654
8654
|
}
|
|
8655
8655
|
await setup;
|
|
8656
8656
|
if (skipSetup) return;
|
|
8657
|
-
const { autoRunAfterSetupEnabled } = await import("./app-settings-
|
|
8657
|
+
const { autoRunAfterSetupEnabled } = await import("./app-settings-SNOPJ7P5.js");
|
|
8658
8658
|
if (autoRunAfterSetupEnabled()) {
|
|
8659
8659
|
try {
|
|
8660
8660
|
await this.startDev(threadId);
|
|
@@ -9038,7 +9038,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
9038
9038
|
}
|
|
9039
9039
|
const isBrightsy = fresh.agent === "brightsy";
|
|
9040
9040
|
const isOrchestration = isOrchestratorThread(fresh);
|
|
9041
|
-
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-
|
|
9041
|
+
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-SNOPJ7P5.js");
|
|
9042
9042
|
const gitAuthMode = getGithubGitAuthMode();
|
|
9043
9043
|
const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
|
|
9044
9044
|
githubSlug: turnOrigin?.forge === "github" ? turnOrigin.slug : await withTimeout(resolveGithubRepoSlug(fresh.worktreePath), 8e3, "resolveGithubRepoSlug").catch(() => null),
|
|
@@ -10380,7 +10380,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
10380
10380
|
if (Object.keys(patch).length === 0) continue;
|
|
10381
10381
|
updateThread(t.id, patch);
|
|
10382
10382
|
}
|
|
10383
|
-
const { autoArchiveOnMergeEnabled } = await import("./app-settings-
|
|
10383
|
+
const { autoArchiveOnMergeEnabled } = await import("./app-settings-SNOPJ7P5.js");
|
|
10384
10384
|
const latest = this.requireThread(thread.id);
|
|
10385
10385
|
if (!shouldAutoArchiveOnPrMerge({
|
|
10386
10386
|
previousPrState: prevState || null,
|
|
@@ -10704,7 +10704,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
10704
10704
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
10705
10705
|
} catch {
|
|
10706
10706
|
}
|
|
10707
|
-
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-
|
|
10707
|
+
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-SNOPJ7P5.js");
|
|
10708
10708
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
|
|
10709
10709
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
10710
10710
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -10842,7 +10842,7 @@ async function startOrchestration(opts) {
|
|
|
10842
10842
|
sourceRef: "default",
|
|
10843
10843
|
...createOpts
|
|
10844
10844
|
}).catch(async () => {
|
|
10845
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
10845
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-5P7SCST3.js");
|
|
10846
10846
|
const repo = await resolveRepoRoot2(repoPath);
|
|
10847
10847
|
const def = await resolveDefaultBranch2(repo);
|
|
10848
10848
|
return orch.createThread({
|
|
@@ -10852,7 +10852,7 @@ async function startOrchestration(opts) {
|
|
|
10852
10852
|
repoPath: repo
|
|
10853
10853
|
});
|
|
10854
10854
|
});
|
|
10855
|
-
const { updateThread: upd } = await import("./thread-store-
|
|
10855
|
+
const { updateThread: upd } = await import("./thread-store-R3G5VBII.js");
|
|
10856
10856
|
const updated = upd(thread.id, {
|
|
10857
10857
|
sourceType: "orchestration",
|
|
10858
10858
|
sourceRef: goal
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
loadAppSettings,
|
|
6
6
|
saveAppSettings
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6WMNIX2U.js";
|
|
8
8
|
|
|
9
9
|
// src/integrations/optional-services.ts
|
|
10
10
|
var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
|
|
@@ -32,13 +32,12 @@ var OPTIONAL_SERVICES = [
|
|
|
32
32
|
{
|
|
33
33
|
id: "posthog",
|
|
34
34
|
label: "PostHog",
|
|
35
|
-
hint: "Product analytics.
|
|
35
|
+
hint: "Product analytics. Sign in with your browser. Agents call `posthog_api`.",
|
|
36
36
|
tokenPlaceholder: "phx_\u2026",
|
|
37
|
-
tokenDocs: "https://
|
|
37
|
+
tokenDocs: "https://posthog.com/docs/api/oauth",
|
|
38
38
|
envKey: "POSTHOG_PERSONAL_API_KEY",
|
|
39
39
|
hostEnvKey: "POSTHOG_HOST",
|
|
40
|
-
defaultHost: "https://us.posthog.com"
|
|
41
|
-
hostPlaceholder: "https://us.posthog.com"
|
|
40
|
+
defaultHost: "https://us.posthog.com"
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
43
|
id: "sentry",
|
|
@@ -184,6 +183,9 @@ function clearConnection(integrations, id) {
|
|
|
184
183
|
}
|
|
185
184
|
if (id === "posthog") {
|
|
186
185
|
delete integrations.posthogPersonalApiKey;
|
|
186
|
+
delete integrations.posthogAccessToken;
|
|
187
|
+
delete integrations.posthogRefreshToken;
|
|
188
|
+
delete integrations.posthogTokenExpiresAt;
|
|
187
189
|
delete integrations.posthogViewerName;
|
|
188
190
|
delete integrations.posthogHost;
|
|
189
191
|
return;
|
|
@@ -196,6 +198,9 @@ async function connectOptionalService(input) {
|
|
|
196
198
|
if (!isOptionalServiceId(input.id)) {
|
|
197
199
|
throw new Error("Unknown optional service");
|
|
198
200
|
}
|
|
201
|
+
if (input.id === "posthog") {
|
|
202
|
+
throw new Error("PostHog connects with Sign in, not an API key.");
|
|
203
|
+
}
|
|
199
204
|
const verified = await verifyOptionalService(input);
|
|
200
205
|
const current = loadAppSettings();
|
|
201
206
|
const integrations = { ...current.integrations };
|
|
@@ -218,7 +223,11 @@ function disconnectOptionalService(id) {
|
|
|
218
223
|
function optionalServiceConnected(id, integrations) {
|
|
219
224
|
if (id === "vercel") return Boolean(integrations.vercelToken?.trim());
|
|
220
225
|
if (id === "supabase") return Boolean(integrations.supabaseAccessToken?.trim());
|
|
221
|
-
if (id === "posthog")
|
|
226
|
+
if (id === "posthog") {
|
|
227
|
+
return Boolean(
|
|
228
|
+
integrations.posthogAccessToken?.trim() || integrations.posthogRefreshToken?.trim() || integrations.posthogPersonalApiKey?.trim()
|
|
229
|
+
);
|
|
230
|
+
}
|
|
222
231
|
return Boolean(integrations.sentryAuthToken?.trim());
|
|
223
232
|
}
|
|
224
233
|
function connectedOptionalServices(integrations) {
|
|
@@ -233,12 +242,12 @@ function connectorDirectiveLine(spec, cli) {
|
|
|
233
242
|
if (spec.cli) {
|
|
234
243
|
return `- ${spec.label}: use \`${spec.cli}\` (\`${spec.envKey}\`${extras})${cliPresencePhrase(spec, cli)}. Do not add a ${spec.label} MCP.`;
|
|
235
244
|
}
|
|
236
|
-
return `- ${spec.label}: call \`posthog_api\`. Path must start with \`/api/\`. GET is the default. POST \`/api/projects/:id/query/\` or \`/api/environments/:id/query/\` is a read and does not need \`write=true\`. Other POST and PATCH require \`write=true\` only when the user asked to change data. Do not read the
|
|
245
|
+
return `- ${spec.label}: call \`posthog_api\`. Path must start with \`/api/\`. GET is the default. POST \`/api/projects/:id/query/\` or \`/api/environments/:id/query/\` is a read and does not need \`write=true\`. Other POST and PATCH require \`write=true\` only when the user asked to change data. Do not read the token from the environment. Do not add a ${spec.label} MCP.`;
|
|
237
246
|
}
|
|
238
247
|
function connectorAuthCaution(posthog, cliConnected) {
|
|
239
248
|
const signIn = posthog ? "If a connector MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP." : "If a Vercel, Supabase, or Sentry MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP.";
|
|
240
249
|
const token = cliConnected ? " CLI tokens are already in this process." : "";
|
|
241
|
-
const key = posthog ? " Do not read a PostHog
|
|
250
|
+
const key = posthog ? " Do not read a PostHog token from the environment." : "";
|
|
242
251
|
return `${signIn}${token}${key} When this Sideboard connection works, ignore a Claude connector that failed to start. Use the Claude connector only when this connection is not set or the CLI call fails.`;
|
|
243
252
|
}
|
|
244
253
|
function connectorReminderBit(spec, cli) {
|
|
@@ -266,14 +275,14 @@ function formatOptionalServicesReminder(integrations, cli) {
|
|
|
266
275
|
const bits = connected.map((spec) => connectorReminderBit(spec, cli)).join(". ");
|
|
267
276
|
const tokenBit = connected.some((spec) => spec.cli) ? "CLI tokens are already in this process. " : "";
|
|
268
277
|
const posthog = connected.some((spec) => spec.id === "posthog");
|
|
269
|
-
const auth = posthog ? "If a connector MCP needsAuth or is unauthorized, ignore it and use the CLI or `posthog_api` while this Sideboard connection works. Use the Claude connector only when it is not set or the call fails. Do not read a PostHog
|
|
278
|
+
const auth = posthog ? "If a connector MCP needsAuth or is unauthorized, ignore it and use the CLI or `posthog_api` while this Sideboard connection works. Use the Claude connector only when it is not set or the call fails. Do not read a PostHog token from the environment." : "If a Vercel, Supabase, or Sentry MCP needsAuth or is unauthorized, ignore it and use the CLI while this Sideboard connection works. Use the Claude connector only when it is not set or the CLI call fails.";
|
|
270
279
|
return `Settings \u2192 Connectors: ${tokenBit}${bits}. ${auth} Do not add vendor MCPs. Shell dumps from those CLIs go in \`.context/cli/\` \u2014 read a slice.`;
|
|
271
280
|
}
|
|
272
281
|
async function connectedCliPresence(integrations) {
|
|
273
282
|
const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
|
|
274
283
|
if (ids.length === 0) return void 0;
|
|
275
284
|
try {
|
|
276
|
-
const { optionalCliPresence } = await import("./optional-cli-
|
|
285
|
+
const { optionalCliPresence } = await import("./optional-cli-RPJIQBDX.js");
|
|
277
286
|
return await optionalCliPresence(ids);
|
|
278
287
|
} catch {
|
|
279
288
|
return void 0;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
var LIST_TIMEOUT_MS = 15e3;
|
|
6
6
|
async function listAssignedLinearIssues(opts) {
|
|
7
7
|
try {
|
|
8
|
-
const { listLinearIssuesDirect } = await import("./linear-
|
|
8
|
+
const { listLinearIssuesDirect } = await import("./linear-PKYJH4WK.js");
|
|
9
9
|
const listed = listLinearIssuesDirect({ limit: 50 }).catch(() => []);
|
|
10
10
|
let timer;
|
|
11
11
|
try {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
normalizeTakenSlug,
|
|
5
5
|
normalizeWorktreePath,
|
|
6
6
|
takenSlugsFromThread
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ATS7SYHG.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureWorktreeSideboardIgnored
|
|
10
10
|
} from "./chunk-BMRJNRQK.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
getGithubGitAuthMode,
|
|
27
27
|
getGithubPat
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6WMNIX2U.js";
|
|
29
29
|
import {
|
|
30
30
|
worktreesRoot
|
|
31
31
|
} from "./chunk-H4UEFJRI.js";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
normalizeAbleTimeCredential,
|
|
7
7
|
normalizeAbleTimeHost,
|
|
8
8
|
rewriteAbleTimeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RYPD7XWV.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-
|
|
16
|
+
} from "./chunk-WWU4SYZR.js";
|
|
17
17
|
|
|
18
18
|
// src/integrations/abletime-rest.ts
|
|
19
19
|
var ABLETIME_REST_PREFIX = "/api/public/v2";
|