@sideboard-ai/core 0.1.9
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/LICENSE +190 -0
- package/dist/agents/cursor-runner.cjs +173 -0
- package/dist/agents/cursor-runner.d.cts +1 -0
- package/dist/agents/cursor-runner.d.ts +1 -0
- package/dist/agents/cursor-runner.js +102 -0
- package/dist/agents-OAX7XPKX.js +41 -0
- package/dist/app-settings-BDMLWCWI.js +61 -0
- package/dist/chunk-2M4OHXYX.js +198 -0
- package/dist/chunk-2R5VV4BA.js +143 -0
- package/dist/chunk-3DKGI32Q.js +92 -0
- package/dist/chunk-3WF3X46L.js +373 -0
- package/dist/chunk-AJ6ROGD7.js +74 -0
- package/dist/chunk-E4PWXO2C.js +4534 -0
- package/dist/chunk-HYRHI3QU.js +154 -0
- package/dist/chunk-ILQK4P5R.js +311 -0
- package/dist/chunk-LL7DTZ5B.js +1282 -0
- package/dist/chunk-M37RITA6.js +304 -0
- package/dist/chunk-TLJH3L2C.js +80 -0
- package/dist/chunk-WMCPLDW3.js +1413 -0
- package/dist/connected-teams-GF52Q7LB.js +22 -0
- package/dist/coordinator-prompt-6R2TX4WQ.js +22 -0
- package/dist/global-workspace-R44HGBU6.js +36 -0
- package/dist/index.cjs +9940 -0
- package/dist/index.d.cts +2284 -0
- package/dist/index.d.ts +2284 -0
- package/dist/index.js +929 -0
- package/dist/mcp/run-stdio.cjs +8654 -0
- package/dist/mcp/run-stdio.d.cts +2 -0
- package/dist/mcp/run-stdio.d.ts +2 -0
- package/dist/mcp/run-stdio.js +21 -0
- package/dist/paths-VPH3ITBK.js +26 -0
- package/dist/run-LF6E5IKL.js +10 -0
- package/dist/thread-store-UNPZNIFW.js +27 -0
- package/dist/title-4A2ATYNY.js +24 -0
- package/dist/workspaces-TCJFYI35.js +20 -0
- package/dist/worktree-NGFDN3J4.js +79 -0
- package/package.json +63 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
startMcpServer
|
|
4
|
+
} from "../chunk-E4PWXO2C.js";
|
|
5
|
+
import "../chunk-TLJH3L2C.js";
|
|
6
|
+
import "../chunk-2M4OHXYX.js";
|
|
7
|
+
import "../chunk-2R5VV4BA.js";
|
|
8
|
+
import "../chunk-WMCPLDW3.js";
|
|
9
|
+
import "../chunk-ILQK4P5R.js";
|
|
10
|
+
import "../chunk-3DKGI32Q.js";
|
|
11
|
+
import "../chunk-3WF3X46L.js";
|
|
12
|
+
import "../chunk-LL7DTZ5B.js";
|
|
13
|
+
import "../chunk-HYRHI3QU.js";
|
|
14
|
+
import "../chunk-M37RITA6.js";
|
|
15
|
+
import "../chunk-AJ6ROGD7.js";
|
|
16
|
+
|
|
17
|
+
// src/mcp/run-stdio.ts
|
|
18
|
+
startMcpServer().catch((err) => {
|
|
19
|
+
console.error(err);
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appDataDir,
|
|
3
|
+
globalAgentCwd,
|
|
4
|
+
locksDir,
|
|
5
|
+
repoSlug,
|
|
6
|
+
sideboardHomeDir,
|
|
7
|
+
sideboardReposDir,
|
|
8
|
+
sideboardWorkspacesDir,
|
|
9
|
+
threadFilePath,
|
|
10
|
+
threadLockPath,
|
|
11
|
+
threadsDir,
|
|
12
|
+
worktreesRoot
|
|
13
|
+
} from "./chunk-M37RITA6.js";
|
|
14
|
+
export {
|
|
15
|
+
appDataDir,
|
|
16
|
+
globalAgentCwd,
|
|
17
|
+
locksDir,
|
|
18
|
+
repoSlug,
|
|
19
|
+
sideboardHomeDir,
|
|
20
|
+
sideboardReposDir,
|
|
21
|
+
sideboardWorkspacesDir,
|
|
22
|
+
threadFilePath,
|
|
23
|
+
threadLockPath,
|
|
24
|
+
threadsDir,
|
|
25
|
+
worktreesRoot
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appendMessage,
|
|
3
|
+
createEmptyThread,
|
|
4
|
+
deleteThreadRecord,
|
|
5
|
+
findThreadByRef,
|
|
6
|
+
listThreads,
|
|
7
|
+
normalizeThread,
|
|
8
|
+
readThread,
|
|
9
|
+
setStatus,
|
|
10
|
+
updateThread,
|
|
11
|
+
withThreadLock,
|
|
12
|
+
writeThread
|
|
13
|
+
} from "./chunk-HYRHI3QU.js";
|
|
14
|
+
import "./chunk-M37RITA6.js";
|
|
15
|
+
export {
|
|
16
|
+
appendMessage,
|
|
17
|
+
createEmptyThread,
|
|
18
|
+
deleteThreadRecord,
|
|
19
|
+
findThreadByRef,
|
|
20
|
+
listThreads,
|
|
21
|
+
normalizeThread,
|
|
22
|
+
readThread,
|
|
23
|
+
setStatus,
|
|
24
|
+
updateThread,
|
|
25
|
+
withThreadLock,
|
|
26
|
+
writeThread
|
|
27
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/threads/title.ts
|
|
2
|
+
function titleFromPrompt(prompt, max = 60) {
|
|
3
|
+
let t = (prompt.trim().split(/\n/)[0] ?? "").trim().replace(/\s+/g, " ");
|
|
4
|
+
if (!t) return "";
|
|
5
|
+
const sentence = t.match(/^(.+?[.!?])(\s|$)/);
|
|
6
|
+
if (sentence?.[1] && sentence[1].length >= 12 && sentence[1].length <= max + 20) {
|
|
7
|
+
t = sentence[1];
|
|
8
|
+
}
|
|
9
|
+
t = t.replace(/[.?!]+$/g, "").trim();
|
|
10
|
+
const chatter = /^(hey[,!]?\s+|hi[,!]?\s+|hello[,!]?\s+|please\s+|can you\s+|could you\s+|would you\s+|i want (you )?to\s+|i need (you )?to\s+)/i;
|
|
11
|
+
for (let i = 0; i < 4 && chatter.test(t); i++) {
|
|
12
|
+
t = t.replace(chatter, "");
|
|
13
|
+
}
|
|
14
|
+
if (!t) return "";
|
|
15
|
+
t = t.charAt(0).toUpperCase() + t.slice(1);
|
|
16
|
+
if (t.length <= max) return t;
|
|
17
|
+
const sliced = t.slice(0, max - 1);
|
|
18
|
+
const lastSpace = sliced.lastIndexOf(" ");
|
|
19
|
+
const base = lastSpace > Math.floor(max * 0.4) ? sliced.slice(0, lastSpace) : sliced;
|
|
20
|
+
return `${base.trimEnd()}\u2026`;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
titleFromPrompt
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addWorkspace,
|
|
3
|
+
ensureWorkspace,
|
|
4
|
+
listWorkspaces,
|
|
5
|
+
removeWorkspace,
|
|
6
|
+
syncWorkspacesFromThreads
|
|
7
|
+
} from "./chunk-TLJH3L2C.js";
|
|
8
|
+
import "./chunk-2M4OHXYX.js";
|
|
9
|
+
import "./chunk-2R5VV4BA.js";
|
|
10
|
+
import "./chunk-LL7DTZ5B.js";
|
|
11
|
+
import "./chunk-HYRHI3QU.js";
|
|
12
|
+
import "./chunk-M37RITA6.js";
|
|
13
|
+
import "./chunk-AJ6ROGD7.js";
|
|
14
|
+
export {
|
|
15
|
+
addWorkspace,
|
|
16
|
+
ensureWorkspace,
|
|
17
|
+
listWorkspaces,
|
|
18
|
+
removeWorkspace,
|
|
19
|
+
syncWorkspacesFromThreads
|
|
20
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FAMOUS_SOCCER_TEAMS,
|
|
3
|
+
allocateTeamName,
|
|
4
|
+
allocateTeamSlug,
|
|
5
|
+
branchDisplayLabel,
|
|
6
|
+
collectTakenTeamSlugs,
|
|
7
|
+
commitAll,
|
|
8
|
+
createOrUpdatePr,
|
|
9
|
+
createThreadWorktree,
|
|
10
|
+
currentBranch,
|
|
11
|
+
detectLocalMergeConflicts,
|
|
12
|
+
fetchPrHead,
|
|
13
|
+
getPr,
|
|
14
|
+
getPrChecks,
|
|
15
|
+
getPrDetails,
|
|
16
|
+
isDirty,
|
|
17
|
+
isPlaceholderBranch,
|
|
18
|
+
listBranches,
|
|
19
|
+
listPrs,
|
|
20
|
+
listWorktrees,
|
|
21
|
+
mergePr,
|
|
22
|
+
normalizeWorktreePath,
|
|
23
|
+
parseGithubSlugFromRemoteUrl,
|
|
24
|
+
pushBranch,
|
|
25
|
+
removeWorktree,
|
|
26
|
+
resolveDefaultBranch,
|
|
27
|
+
resolveDiffBaseRef,
|
|
28
|
+
resolveGithubRepoSlug,
|
|
29
|
+
resolvePrSelector,
|
|
30
|
+
resolveRepoRoot,
|
|
31
|
+
resolveWorktreeStartPoint,
|
|
32
|
+
slugify,
|
|
33
|
+
suggestSlug,
|
|
34
|
+
threadDisplayLabel,
|
|
35
|
+
worktreeDisplayLabel,
|
|
36
|
+
worktreeDisplayLabelForGroup,
|
|
37
|
+
worktreeNameFromPath
|
|
38
|
+
} from "./chunk-LL7DTZ5B.js";
|
|
39
|
+
import "./chunk-HYRHI3QU.js";
|
|
40
|
+
import "./chunk-M37RITA6.js";
|
|
41
|
+
import "./chunk-AJ6ROGD7.js";
|
|
42
|
+
export {
|
|
43
|
+
FAMOUS_SOCCER_TEAMS,
|
|
44
|
+
allocateTeamName,
|
|
45
|
+
allocateTeamSlug,
|
|
46
|
+
branchDisplayLabel,
|
|
47
|
+
collectTakenTeamSlugs,
|
|
48
|
+
commitAll,
|
|
49
|
+
createOrUpdatePr,
|
|
50
|
+
createThreadWorktree,
|
|
51
|
+
currentBranch,
|
|
52
|
+
detectLocalMergeConflicts,
|
|
53
|
+
fetchPrHead,
|
|
54
|
+
getPr,
|
|
55
|
+
getPrChecks,
|
|
56
|
+
getPrDetails,
|
|
57
|
+
isDirty,
|
|
58
|
+
isPlaceholderBranch,
|
|
59
|
+
listBranches,
|
|
60
|
+
listPrs,
|
|
61
|
+
listWorktrees,
|
|
62
|
+
mergePr,
|
|
63
|
+
normalizeWorktreePath,
|
|
64
|
+
parseGithubSlugFromRemoteUrl,
|
|
65
|
+
pushBranch,
|
|
66
|
+
removeWorktree,
|
|
67
|
+
resolveDefaultBranch,
|
|
68
|
+
resolveDiffBaseRef,
|
|
69
|
+
resolveGithubRepoSlug,
|
|
70
|
+
resolvePrSelector,
|
|
71
|
+
resolveRepoRoot,
|
|
72
|
+
resolveWorktreeStartPoint,
|
|
73
|
+
slugify,
|
|
74
|
+
suggestSlug,
|
|
75
|
+
threadDisplayLabel,
|
|
76
|
+
worktreeDisplayLabel,
|
|
77
|
+
worktreeDisplayLabelForGroup,
|
|
78
|
+
worktreeNameFromPath
|
|
79
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sideboard-ai/core",
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"bin": {
|
|
11
|
+
"sideboard-mcp": "./dist/mcp/run-stdio.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/mattlevine/sideboard.git",
|
|
30
|
+
"directory": "packages/core"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"sideboard",
|
|
34
|
+
"mcp",
|
|
35
|
+
"model-context-protocol",
|
|
36
|
+
"agents",
|
|
37
|
+
"worktree"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@cursor/sdk": "^1.0.26",
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
42
|
+
"better-sqlite3": "^11.9.1",
|
|
43
|
+
"chokidar": "^4.0.3",
|
|
44
|
+
"execa": "^9.5.2",
|
|
45
|
+
"proper-lockfile": "^4.1.2",
|
|
46
|
+
"smol-toml": "^1.3.1",
|
|
47
|
+
"zod": "^3.24.2"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
51
|
+
"@types/node": "^22.13.10",
|
|
52
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
53
|
+
"tsup": "^8.4.0",
|
|
54
|
+
"typescript": "^5.8.2",
|
|
55
|
+
"vitest": "^3.0.9"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup src/index.ts src/agents/cursor-runner.ts src/mcp/run-stdio.ts --format esm,cjs --dts --clean && node scripts/add-bin-shebang.cjs",
|
|
59
|
+
"dev": "tsup src/index.ts src/agents/cursor-runner.ts src/mcp/run-stdio.ts --format esm,cjs --dts --watch",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"typecheck": "tsc --noEmit"
|
|
62
|
+
}
|
|
63
|
+
}
|