@sideboard-ai/core 0.1.52 → 0.1.56
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/agents/cursor-runner.cjs +126 -11
- package/dist/agents/cursor-runner.js +45 -6
- package/dist/{agents-YKSS6VBO.js → agents-2YYWW723.js} +3 -3
- package/dist/{agents-ON6RKKND.js → agents-AQFEFKBL.js} +2 -2
- package/dist/{app-settings-LZP632KI.js → app-settings-2LQNRTBE.js} +3 -1
- package/dist/{app-settings-7XVDQJ7F.js → app-settings-73DI4B6T.js} +3 -1
- package/dist/{chunk-J5JTEJ5O.js → chunk-3WJAUKIL.js} +89 -7
- package/dist/{chunk-GNML24AW.js → chunk-5DMYULLC.js} +1 -1
- package/dist/{chunk-D3METLRW.js → chunk-7F454EE2.js} +96 -14
- package/dist/{chunk-6QTZVJ7A.js → chunk-C3J4GDW4.js} +188 -24
- package/dist/{chunk-HBJSHRY2.js → chunk-C4BCC5X5.js} +17 -1
- package/dist/{chunk-T5QQVXK3.js → chunk-DIOF73S2.js} +17 -1
- package/dist/{chunk-UEAHMGHW.js → chunk-DQJ5D42H.js} +16 -2
- package/dist/{chunk-YOWIYAVA.js → chunk-EBWEKG52.js} +36 -11
- package/dist/{chunk-XX5BB7NV.js → chunk-S42XDFKF.js} +36 -11
- package/dist/{chunk-LRLKJM3O.js → chunk-UA5NDAHL.js} +16 -2
- package/dist/{chunk-YDXQ72MD.js → chunk-V2DUTUNC.js} +1 -1
- package/dist/{coordinator-prompt-S6JZD5EF.js → coordinator-prompt-ICF36NUQ.js} +2 -1
- package/dist/{coordinator-prompt-6FXVTSFN.js → coordinator-prompt-RBKUNRPR.js} +2 -1
- package/dist/{global-workspace-EV4G2WMQ.js → global-workspace-667XLBW6.js} +3 -2
- package/dist/{global-workspace-MSX2K27Y.js → global-workspace-S7VLWPWG.js} +3 -2
- package/dist/index.cjs +395 -61
- package/dist/index.d.cts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +164 -43
- package/dist/mcp/run-stdio.cjs +389 -57
- package/dist/mcp/run-stdio.js +164 -44
- package/dist/{workspaces-AYTBR6KQ.js → workspaces-FPJJXXAE.js} +4 -3
- package/dist/{workspaces-3RQQZQRO.js → workspaces-LYIDE2VR.js} +4 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-S2LL5HA4.js";
|
|
6
6
|
import {
|
|
7
7
|
ensureGlobalCoordinatorCwd
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DQJ5D42H.js";
|
|
9
9
|
import {
|
|
10
10
|
allocateTeamName,
|
|
11
11
|
takenSlugsFromThread,
|
|
@@ -17,6 +17,10 @@ import {
|
|
|
17
17
|
updateThread,
|
|
18
18
|
writeThread
|
|
19
19
|
} from "./chunk-HLEX5AQ6.js";
|
|
20
|
+
import {
|
|
21
|
+
resolveNewThreadOptions,
|
|
22
|
+
resolveThreadDefaults
|
|
23
|
+
} from "./chunk-C4BCC5X5.js";
|
|
20
24
|
import {
|
|
21
25
|
globalAgentCwd
|
|
22
26
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -107,7 +111,13 @@ function createGlobalChat(opts) {
|
|
|
107
111
|
const explicit = opts.title?.trim();
|
|
108
112
|
const title = explicit && explicit !== CLOUD_ORCHESTRATOR_GOAL ? explicit : allocateTeamName(takenTeamSlugsForOrchestration()).name;
|
|
109
113
|
const sourceRef = opts.sourceRef?.trim() || (isCloud ? CLOUD_ORCHESTRATOR_GOAL : title);
|
|
110
|
-
const
|
|
114
|
+
const resolved = resolveNewThreadOptions({
|
|
115
|
+
agent: opts.agent,
|
|
116
|
+
model: opts.model,
|
|
117
|
+
effort: opts.effort,
|
|
118
|
+
fast: opts.fast
|
|
119
|
+
});
|
|
120
|
+
const agent = assertOrchestratorCapableAgent(resolved.agent);
|
|
111
121
|
const thread = createEmptyThread({
|
|
112
122
|
title,
|
|
113
123
|
// Stick nicknames the same way chat tabs do (avoid later sync overwrites).
|
|
@@ -119,9 +129,9 @@ function createGlobalChat(opts) {
|
|
|
119
129
|
repoPath: GLOBAL_WORKSPACE_ID,
|
|
120
130
|
agent,
|
|
121
131
|
autonomy: opts.autonomy ?? "default",
|
|
122
|
-
model:
|
|
123
|
-
effort:
|
|
124
|
-
fast:
|
|
132
|
+
model: resolved.model,
|
|
133
|
+
effort: resolved.effort,
|
|
134
|
+
fast: resolved.fast,
|
|
125
135
|
planMode: Boolean(opts.planMode),
|
|
126
136
|
attachments: opts.attachments ?? [],
|
|
127
137
|
parentThreadId: opts.parentThreadId ?? null,
|
|
@@ -154,20 +164,35 @@ function findCloudCoordinator() {
|
|
|
154
164
|
);
|
|
155
165
|
}
|
|
156
166
|
function ensureCloudCoordinator(agent) {
|
|
167
|
+
const defaults = resolveThreadDefaults();
|
|
168
|
+
const desired = assertOrchestratorCapableAgent(agent);
|
|
157
169
|
const existing = findCloudCoordinator();
|
|
158
170
|
if (existing) {
|
|
171
|
+
const patch = {};
|
|
159
172
|
if (existing.repoPath !== GLOBAL_WORKSPACE_ID) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
173
|
+
patch.repoPath = GLOBAL_WORKSPACE_ID;
|
|
174
|
+
patch.worktreePath = globalAgentCwd();
|
|
175
|
+
patch.branchName = "global";
|
|
176
|
+
}
|
|
177
|
+
const hasAgentTurns = existing.messages.some((m) => m.role === "agent");
|
|
178
|
+
const canRetarget = !existing.sessionId && !hasAgentTurns && existing.status !== "running" && existing.status !== "queued";
|
|
179
|
+
if (canRetarget) {
|
|
180
|
+
if (existing.agent !== desired) patch.agent = desired;
|
|
181
|
+
if (existing.model !== defaults.model) patch.model = defaults.model;
|
|
182
|
+
if (existing.effort !== defaults.effort) patch.effort = defaults.effort;
|
|
183
|
+
if (existing.fast !== defaults.fast) patch.fast = defaults.fast;
|
|
184
|
+
}
|
|
185
|
+
if (Object.keys(patch).length > 0) {
|
|
186
|
+
return updateThread(existing.id, patch);
|
|
165
187
|
}
|
|
166
188
|
return existing;
|
|
167
189
|
}
|
|
168
190
|
const created = createGlobalChat({
|
|
169
191
|
sourceRef: CLOUD_ORCHESTRATOR_GOAL,
|
|
170
|
-
agent
|
|
192
|
+
agent: desired,
|
|
193
|
+
model: defaults.model,
|
|
194
|
+
effort: defaults.effort,
|
|
195
|
+
fast: defaults.fast
|
|
171
196
|
});
|
|
172
197
|
const all = listThreads({ includeArchived: true }).filter(
|
|
173
198
|
(t) => t.status !== "archived" && isCloudCoordinatorThread(t)
|
|
@@ -3,7 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-GI7E5733.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureGlobalCoordinatorCwd
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UA5NDAHL.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveNewThreadOptions,
|
|
9
|
+
resolveThreadDefaults
|
|
10
|
+
} from "./chunk-DIOF73S2.js";
|
|
7
11
|
import {
|
|
8
12
|
allocateTeamName,
|
|
9
13
|
takenSlugsFromThread,
|
|
@@ -113,7 +117,13 @@ function createGlobalChat(opts) {
|
|
|
113
117
|
const explicit = opts.title?.trim();
|
|
114
118
|
const title = explicit && explicit !== CLOUD_ORCHESTRATOR_GOAL ? explicit : allocateTeamName(takenTeamSlugsForOrchestration()).name;
|
|
115
119
|
const sourceRef = opts.sourceRef?.trim() || (isCloud ? CLOUD_ORCHESTRATOR_GOAL : title);
|
|
116
|
-
const
|
|
120
|
+
const resolved = resolveNewThreadOptions({
|
|
121
|
+
agent: opts.agent,
|
|
122
|
+
model: opts.model,
|
|
123
|
+
effort: opts.effort,
|
|
124
|
+
fast: opts.fast
|
|
125
|
+
});
|
|
126
|
+
const agent = assertOrchestratorCapableAgent(resolved.agent);
|
|
117
127
|
const thread = createEmptyThread({
|
|
118
128
|
title,
|
|
119
129
|
// Stick nicknames the same way chat tabs do (avoid later sync overwrites).
|
|
@@ -125,9 +135,9 @@ function createGlobalChat(opts) {
|
|
|
125
135
|
repoPath: GLOBAL_WORKSPACE_ID,
|
|
126
136
|
agent,
|
|
127
137
|
autonomy: opts.autonomy ?? "default",
|
|
128
|
-
model:
|
|
129
|
-
effort:
|
|
130
|
-
fast:
|
|
138
|
+
model: resolved.model,
|
|
139
|
+
effort: resolved.effort,
|
|
140
|
+
fast: resolved.fast,
|
|
131
141
|
planMode: Boolean(opts.planMode),
|
|
132
142
|
attachments: opts.attachments ?? [],
|
|
133
143
|
parentThreadId: opts.parentThreadId ?? null,
|
|
@@ -160,20 +170,35 @@ function findCloudCoordinator() {
|
|
|
160
170
|
);
|
|
161
171
|
}
|
|
162
172
|
function ensureCloudCoordinator(agent) {
|
|
173
|
+
const defaults = resolveThreadDefaults();
|
|
174
|
+
const desired = assertOrchestratorCapableAgent(agent);
|
|
163
175
|
const existing = findCloudCoordinator();
|
|
164
176
|
if (existing) {
|
|
177
|
+
const patch = {};
|
|
165
178
|
if (existing.repoPath !== GLOBAL_WORKSPACE_ID) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
179
|
+
patch.repoPath = GLOBAL_WORKSPACE_ID;
|
|
180
|
+
patch.worktreePath = globalAgentCwd();
|
|
181
|
+
patch.branchName = "global";
|
|
182
|
+
}
|
|
183
|
+
const hasAgentTurns = existing.messages.some((m) => m.role === "agent");
|
|
184
|
+
const canRetarget = !existing.sessionId && !hasAgentTurns && existing.status !== "running" && existing.status !== "queued";
|
|
185
|
+
if (canRetarget) {
|
|
186
|
+
if (existing.agent !== desired) patch.agent = desired;
|
|
187
|
+
if (existing.model !== defaults.model) patch.model = defaults.model;
|
|
188
|
+
if (existing.effort !== defaults.effort) patch.effort = defaults.effort;
|
|
189
|
+
if (existing.fast !== defaults.fast) patch.fast = defaults.fast;
|
|
190
|
+
}
|
|
191
|
+
if (Object.keys(patch).length > 0) {
|
|
192
|
+
return updateThread(existing.id, patch);
|
|
171
193
|
}
|
|
172
194
|
return existing;
|
|
173
195
|
}
|
|
174
196
|
const created = createGlobalChat({
|
|
175
197
|
sourceRef: CLOUD_ORCHESTRATOR_GOAL,
|
|
176
|
-
agent
|
|
198
|
+
agent: desired,
|
|
199
|
+
model: defaults.model,
|
|
200
|
+
effort: defaults.effort,
|
|
201
|
+
fast: defaults.fast
|
|
177
202
|
});
|
|
178
203
|
const all = listThreads({ includeArchived: true }).filter(
|
|
179
204
|
(t) => t.status !== "archived" && isCloudCoordinatorThread(t)
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveThreadDefaults
|
|
3
|
+
} from "./chunk-DIOF73S2.js";
|
|
1
4
|
import {
|
|
2
5
|
resolveGithubRepoSlug
|
|
3
6
|
} from "./chunk-DZFH2KLT.js";
|
|
@@ -43,12 +46,12 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
43
46
|
"- list_workspaces \u2014 registered repos (path + github slug when known)",
|
|
44
47
|
"- list_branches / list_prs / list_issues \u2014 pass repoPath from list_workspaces (issues: Linear API or GitHub Issues)",
|
|
45
48
|
"- get_pr_stack / open_pr_stack_layers / add_stack_layer / create_pr_stack \u2014 GitHub stacked PRs (`gh stack`); one worktree per layer",
|
|
46
|
-
"- list_models \u2014 only when you need a specific model (rare); otherwise
|
|
49
|
+
"- list_models \u2014 only when you need a specific model (rare); otherwise omit model so Account defaults apply",
|
|
47
50
|
"- list_threads / get_thread \u2014 fleet status (what is going on)",
|
|
48
51
|
"Workspaces:",
|
|
49
52
|
"- add_workspace / remove_workspace \u2014 register or unregister a git repo",
|
|
50
53
|
"Worktree threads (chats):",
|
|
51
|
-
"- create_thread \u2014 create a worktree + chat from branch | pr | ticket; pass repoPath + parentThreadId",
|
|
54
|
+
"- create_thread \u2014 create a worktree + chat from branch | pr | ticket; pass repoPath + parentThreadId; omit agent and model to use Sideboard Account defaults (Settings \u2192 Default agent, model & effort)",
|
|
52
55
|
"- fork_worktree \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
|
|
53
56
|
"- fork_chat \u2014 fork a worktree chat (same worktree tab) OR a Global orchestration chat (new orchestration tab); optional agent; leave model unset (Auto) unless you have a reason. Remote coordinators: use this to continue another orchestration chat on a different agent after session limits.",
|
|
54
57
|
"- send_to_thread \u2014 queue a prompt (start/continue a chat turn); pass force_stop: true to interrupt mid-turn / clear stale queued prompts before replacing with a new request",
|
|
@@ -66,6 +69,11 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
66
69
|
"Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
|
|
67
70
|
"Bash / Read / etc: allowed for (1) inspecting target worktrees / registered repo paths from MCP, and (2) greenfield setup under ~/sideboard/repos (git clone, gh repo create, git init+remote). Never git init/clone *inside* this synthetic home cwd \u2014 emptiness here is expected, not a bug."
|
|
68
71
|
].join("\n");
|
|
72
|
+
function accountDefaultsPlaybookLine() {
|
|
73
|
+
const d = resolveThreadDefaults();
|
|
74
|
+
const model = d.model?.trim() || "Auto";
|
|
75
|
+
return `- Account defaults for create_thread (omit agent/model to use these): agent=${d.agent}, model=${model}, effort=${d.effort}`;
|
|
76
|
+
}
|
|
69
77
|
function coordinatorTurnReminder(opts) {
|
|
70
78
|
const goal = opts.goal?.trim();
|
|
71
79
|
return [
|
|
@@ -75,6 +83,7 @@ function coordinatorTurnReminder(opts) {
|
|
|
75
83
|
"- Registered workspaces / child threads are the fleet you manage via Sideboard MCP.",
|
|
76
84
|
`- Parent thread id (pass as parentThreadId when creating children): ${opts.parentId}`,
|
|
77
85
|
goal ? `- Goal / title: ${goal}` : null,
|
|
86
|
+
accountDefaultsPlaybookLine(),
|
|
78
87
|
`- For "what's going on": call list_threads (and list_workspaces if needed). Summarize fleet status \u2014 do not ls/git-status this synthetic home.`,
|
|
79
88
|
"- Existing repo: create_thread on a repoPath \u2192 send_to_thread \u2192 wait_for_turn.",
|
|
80
89
|
"- New repo: Bash (clone or gh repo create under ~/sideboard/repos/<name>) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 draft PR.",
|
|
@@ -97,9 +106,12 @@ function ensureGlobalCoordinatorCwd() {
|
|
|
97
106
|
"",
|
|
98
107
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
99
108
|
"",
|
|
109
|
+
accountDefaultsPlaybookLine(),
|
|
110
|
+
"",
|
|
100
111
|
coordinatorGreenfieldPlaybook(reposDir),
|
|
101
112
|
"",
|
|
102
113
|
"When creating threads, pass `repoPath` from `list_workspaces` (or the path you just registered) and `parentThreadId` for children.",
|
|
114
|
+
"Omit `agent` / `model` on `create_thread` unless you have a reason to override Account defaults.",
|
|
103
115
|
"Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn.",
|
|
104
116
|
"Typical flow (new app): Bash create/clone under repos dir \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 draft PR via worktree agent.",
|
|
105
117
|
"Always ask worktree agents to open draft PRs (`send_to_thread` + `gh pr create --draft -R <origin>`); never open PRs from the orchestrator."
|
|
@@ -125,8 +137,10 @@ function coordinatorSystemPrompt(opts) {
|
|
|
125
137
|
"You operate across ALL registered workspaces below.",
|
|
126
138
|
"You have no project git home \u2014 this process cwd is synthetic and empty on purpose.",
|
|
127
139
|
COORDINATOR_TOOL_PLAYBOOK,
|
|
140
|
+
accountDefaultsPlaybookLine(),
|
|
128
141
|
coordinatorGreenfieldPlaybook(reposDir),
|
|
129
142
|
"When creating threads, pass the correct repoPath for the target workspace and parentThreadId for children.",
|
|
143
|
+
"Omit agent/model on create_thread unless you need to override Account defaults.",
|
|
130
144
|
"Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 send_to_thread (ask for `gh pr create --draft -R <origin-owner/name>` using the workspace github slug) \u2192 wait_for_turn. Never target upstream. Never open PRs from the orchestrator.",
|
|
131
145
|
"Typical flow (new app): Bash under repos dir (clone or gh repo create) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 draft PR via worktree agent.",
|
|
132
146
|
`Goal: ${opts.goal}`,
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
enrichWorkspacesWithGithub,
|
|
7
7
|
ensureGlobalCoordinatorCwd,
|
|
8
8
|
formatWorkspaceInventory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UA5NDAHL.js";
|
|
10
|
+
import "./chunk-DIOF73S2.js";
|
|
10
11
|
import "./chunk-DZFH2KLT.js";
|
|
11
12
|
import "./chunk-FKOIHGKV.js";
|
|
12
13
|
import "./chunk-TSRXOSVD.js";
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
enrichWorkspacesWithGithub,
|
|
9
9
|
ensureGlobalCoordinatorCwd,
|
|
10
10
|
formatWorkspaceInventory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DQJ5D42H.js";
|
|
12
12
|
import "./chunk-XOU6HNQJ.js";
|
|
13
13
|
import "./chunk-B3SJXYIJ.js";
|
|
14
14
|
import "./chunk-HLEX5AQ6.js";
|
|
15
15
|
import "./chunk-ZNM4MAN4.js";
|
|
16
|
+
import "./chunk-C4BCC5X5.js";
|
|
16
17
|
import "./chunk-KGZBYWZ3.js";
|
|
17
18
|
import "./chunk-7MV3RXSC.js";
|
|
18
19
|
export {
|
|
@@ -13,13 +13,14 @@ import {
|
|
|
13
13
|
orchestrationTitleNeedsSoccerNickname,
|
|
14
14
|
orchestratorSessionPoisonedByBuiltins,
|
|
15
15
|
takenTeamSlugsForOrchestration
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EBWEKG52.js";
|
|
17
17
|
import "./chunk-S2LL5HA4.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-DQJ5D42H.js";
|
|
19
19
|
import "./chunk-XOU6HNQJ.js";
|
|
20
20
|
import "./chunk-B3SJXYIJ.js";
|
|
21
21
|
import "./chunk-HLEX5AQ6.js";
|
|
22
22
|
import "./chunk-ZNM4MAN4.js";
|
|
23
|
+
import "./chunk-C4BCC5X5.js";
|
|
23
24
|
import "./chunk-KGZBYWZ3.js";
|
|
24
25
|
import {
|
|
25
26
|
globalAgentCwd
|
|
@@ -11,9 +11,10 @@ import {
|
|
|
11
11
|
orchestrationTitleNeedsSoccerNickname,
|
|
12
12
|
orchestratorSessionPoisonedByBuiltins,
|
|
13
13
|
takenTeamSlugsForOrchestration
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S42XDFKF.js";
|
|
15
15
|
import "./chunk-GI7E5733.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-UA5NDAHL.js";
|
|
17
|
+
import "./chunk-DIOF73S2.js";
|
|
17
18
|
import "./chunk-DZFH2KLT.js";
|
|
18
19
|
import "./chunk-FKOIHGKV.js";
|
|
19
20
|
import "./chunk-TSRXOSVD.js";
|