@sideboard-ai/core 0.1.46 → 0.1.49
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-6L6VENDT.js → agents-3P4N6KHC.js} +1 -1
- package/dist/agents-LUB3Q773.js +82 -0
- package/dist/app-settings-7XVDQJ7F.js +80 -0
- package/dist/{chunk-SZAKJ4TR.js → chunk-3NAS4MWH.js} +1 -1
- package/dist/{chunk-SPCU3MFY.js → chunk-5WYEJ3F3.js} +3 -3
- package/dist/chunk-7MV3RXSC.js +277 -0
- package/dist/chunk-DF5VQQKA.js +191 -0
- package/dist/chunk-E35APBHV.js +269 -0
- package/dist/chunk-EOYDCKQC.js +172 -0
- package/dist/chunk-GZXBYHJC.js +148 -0
- package/dist/chunk-HBJSHRY2.js +494 -0
- package/dist/chunk-ISY4EGF6.js +77 -0
- package/dist/chunk-KGZBYWZ3.js +23 -0
- package/dist/chunk-RQI4TOXK.js +2232 -0
- package/dist/chunk-S2LL5HA4.js +33 -0
- package/dist/{chunk-TQK2OYPU.js → chunk-SS34TVSY.js} +1 -1
- package/dist/chunk-V4JRXYYU.js +122 -0
- package/dist/{chunk-6NAPN2N5.js → chunk-ZQCQIWIP.js} +1 -1
- package/dist/chunk-ZVV5EEQN.js +1892 -0
- package/dist/connected-teams-UBXHZGO4.js +24 -0
- package/dist/{coordinator-prompt-2XFYG3C5.js → coordinator-prompt-SPGDT7J5.js} +1 -1
- package/dist/coordinator-prompt-VG4BZ5JL.js +25 -0
- package/dist/cursor-recover-NNK7JPQM.js +44 -0
- package/dist/{global-workspace-XFOXEQCP.js → global-workspace-KSR3E63K.js} +2 -2
- package/dist/global-workspace-OJF4ENH4.js +40 -0
- package/dist/index.cjs +243 -19
- package/dist/index.d.cts +49 -10
- package/dist/index.d.ts +49 -10
- package/dist/index.js +5768 -192
- package/dist/mcp/run-stdio.cjs +203 -21
- package/dist/mcp/run-stdio.js +5618 -15
- package/dist/paths-2OFB7UJG.js +28 -0
- package/dist/run-HMRSRG3U.js +12 -0
- package/dist/thread-store-XICUWFNM.js +32 -0
- package/dist/title-4WAKWZRF.js +27 -0
- package/dist/workspaces-OZE7LRDO.js +24 -0
- package/dist/{workspaces-SRL2HZTB.js → workspaces-UJX7JIGH.js} +3 -3
- package/dist/worktree-XG5PCLZY.js +94 -0
- package/package.json +2 -2
- package/dist/chunk-7DTJFP4D.js +0 -5680
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/agents/orchestrator-capable.ts
|
|
5
|
+
var ORCHESTRATOR_AGENT_KINDS = [
|
|
6
|
+
"claude",
|
|
7
|
+
"codex",
|
|
8
|
+
"opencode",
|
|
9
|
+
"cursor"
|
|
10
|
+
];
|
|
11
|
+
function isOrchestratorCapableAgent(agent) {
|
|
12
|
+
return Boolean(
|
|
13
|
+
agent && ORCHESTRATOR_AGENT_KINDS.includes(agent)
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function assertOrchestratorCapableAgent(agent, context = "orchestration") {
|
|
17
|
+
if (!isOrchestratorCapableAgent(agent)) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`${agent} cannot run ${context} \u2014 it does not support Sideboard MCP. Use Claude, Cursor, Codex, or OpenCode.`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
return agent;
|
|
23
|
+
}
|
|
24
|
+
function coerceOrchestratorAgent(agent, fallback = "claude") {
|
|
25
|
+
return isOrchestratorCapableAgent(agent) ? agent : fallback;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
ORCHESTRATOR_AGENT_KINDS,
|
|
30
|
+
isOrchestratorCapableAgent,
|
|
31
|
+
assertOrchestratorCapableAgent,
|
|
32
|
+
coerceOrchestratorAgent
|
|
33
|
+
};
|
|
@@ -837,7 +837,7 @@ var claudeAdapter = {
|
|
|
837
837
|
);
|
|
838
838
|
}
|
|
839
839
|
const mode = permissionMode(thread);
|
|
840
|
-
const { isOrchestratorThread } = await import("./global-workspace-
|
|
840
|
+
const { isOrchestratorThread } = await import("./global-workspace-KSR3E63K.js");
|
|
841
841
|
const isOrchestrator = isOrchestratorThread(thread);
|
|
842
842
|
const injectedServers = await buildInjectedMcpServers({
|
|
843
843
|
includeSideboard: true,
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
isGlobalRepoPath
|
|
5
|
+
} from "./chunk-DF5VQQKA.js";
|
|
6
|
+
import {
|
|
7
|
+
ensureGhPreferOrigin,
|
|
8
|
+
resolveRepoRoot
|
|
9
|
+
} from "./chunk-ZVV5EEQN.js";
|
|
10
|
+
import {
|
|
11
|
+
appDataDir
|
|
12
|
+
} from "./chunk-7MV3RXSC.js";
|
|
13
|
+
|
|
14
|
+
// src/store/workspaces.ts
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
16
|
+
import { basename, join } from "path";
|
|
17
|
+
function workspacesFile() {
|
|
18
|
+
return join(appDataDir(), "workspaces.json");
|
|
19
|
+
}
|
|
20
|
+
function removedWorkspacesFile() {
|
|
21
|
+
return join(appDataDir(), "removed-workspaces.json");
|
|
22
|
+
}
|
|
23
|
+
function readAll() {
|
|
24
|
+
const path = workspacesFile();
|
|
25
|
+
if (!existsSync(path)) return [];
|
|
26
|
+
try {
|
|
27
|
+
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
28
|
+
return Array.isArray(raw) ? raw : [];
|
|
29
|
+
} catch {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function writeAll(list) {
|
|
34
|
+
mkdirSync(appDataDir(), { recursive: true });
|
|
35
|
+
writeFileSync(workspacesFile(), JSON.stringify(list, null, 2), "utf8");
|
|
36
|
+
}
|
|
37
|
+
function readRemoved() {
|
|
38
|
+
const path = removedWorkspacesFile();
|
|
39
|
+
if (!existsSync(path)) return /* @__PURE__ */ new Set();
|
|
40
|
+
try {
|
|
41
|
+
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
42
|
+
return new Set(Array.isArray(raw) ? raw.filter((p) => typeof p === "string") : []);
|
|
43
|
+
} catch {
|
|
44
|
+
return /* @__PURE__ */ new Set();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function writeRemoved(paths) {
|
|
48
|
+
mkdirSync(appDataDir(), { recursive: true });
|
|
49
|
+
writeFileSync(removedWorkspacesFile(), JSON.stringify([...paths].sort(), null, 2), "utf8");
|
|
50
|
+
}
|
|
51
|
+
function rememberRemoved(repoPath) {
|
|
52
|
+
const next = readRemoved();
|
|
53
|
+
next.add(repoPath);
|
|
54
|
+
writeRemoved(next);
|
|
55
|
+
}
|
|
56
|
+
function forgetRemoved(repoPath) {
|
|
57
|
+
const next = readRemoved();
|
|
58
|
+
if (!next.delete(repoPath)) return;
|
|
59
|
+
writeRemoved(next);
|
|
60
|
+
}
|
|
61
|
+
function listWorkspaces() {
|
|
62
|
+
const all = readAll();
|
|
63
|
+
const valid = all.filter(
|
|
64
|
+
(w) => Boolean(w.path) && w.path !== "/" && w.path !== "." && !isGlobalRepoPath(w.path)
|
|
65
|
+
);
|
|
66
|
+
if (valid.length !== all.length) writeAll(valid);
|
|
67
|
+
return valid.sort((a, b) => a.name.localeCompare(b.name));
|
|
68
|
+
}
|
|
69
|
+
async function addWorkspace(repoPath) {
|
|
70
|
+
const root = await resolveRepoRoot(repoPath);
|
|
71
|
+
if (!root || root === "/") throw new Error(`Invalid repo path: ${repoPath}`);
|
|
72
|
+
if (!existsSync(root)) throw new Error(`Repo not found: ${root}`);
|
|
73
|
+
forgetRemoved(root);
|
|
74
|
+
await ensureGhPreferOrigin(root);
|
|
75
|
+
const current = readAll();
|
|
76
|
+
const existing = current.find((w) => w.path === root);
|
|
77
|
+
if (existing) return existing;
|
|
78
|
+
const next = {
|
|
79
|
+
path: root,
|
|
80
|
+
name: basename(root),
|
|
81
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
82
|
+
};
|
|
83
|
+
writeAll([...current, next]);
|
|
84
|
+
return next;
|
|
85
|
+
}
|
|
86
|
+
function removeWorkspace(repoPath) {
|
|
87
|
+
writeAll(readAll().filter((w) => w.path !== repoPath));
|
|
88
|
+
rememberRemoved(repoPath);
|
|
89
|
+
}
|
|
90
|
+
async function ensureWorkspace(repoPath) {
|
|
91
|
+
return addWorkspace(repoPath);
|
|
92
|
+
}
|
|
93
|
+
function syncWorkspacesFromThreads(repoPaths) {
|
|
94
|
+
const current = readAll();
|
|
95
|
+
const removed = readRemoved();
|
|
96
|
+
const byPath = new Map(current.map((w) => [w.path, w]));
|
|
97
|
+
let dirty = false;
|
|
98
|
+
for (const path of repoPaths) {
|
|
99
|
+
if (!path || path === "/" || isGlobalRepoPath(path) || byPath.has(path) || removed.has(path)) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (!existsSync(path)) continue;
|
|
103
|
+
const ws = {
|
|
104
|
+
path,
|
|
105
|
+
name: basename(path),
|
|
106
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
107
|
+
};
|
|
108
|
+
byPath.set(path, ws);
|
|
109
|
+
dirty = true;
|
|
110
|
+
}
|
|
111
|
+
const next = [...byPath.values()];
|
|
112
|
+
if (dirty) writeAll(next);
|
|
113
|
+
return next.sort((a, b) => a.name.localeCompare(b.name));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export {
|
|
117
|
+
listWorkspaces,
|
|
118
|
+
addWorkspace,
|
|
119
|
+
removeWorkspace,
|
|
120
|
+
ensureWorkspace,
|
|
121
|
+
syncWorkspacesFromThreads
|
|
122
|
+
};
|
|
@@ -59,7 +59,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
59
59
|
"- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
|
|
60
60
|
"Inspect / review / PRs:",
|
|
61
61
|
"- get_diff \u2014 compact diff summary",
|
|
62
|
-
|
|
62
|
+
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review."); then wait_for_turn / get_turn_result on the returned id',
|
|
63
63
|
"- Ask the worktree agent via send_to_thread to open a draft PR with `gh pr create --draft -R <origin-owner/name>` (workspace `github:` slug / that worktree's origin \u2014 never upstream). Do not open PRs from the orchestrator yourself.",
|
|
64
64
|
"Human-only (do not attempt): merge, ready-for-review land, purge_thread.",
|
|
65
65
|
"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.",
|