repoburg 1.3.202 → 1.3.204
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/agent-pane/backend/dist/index.js +2092 -32001
- package/agent-pane/backend/dist/server.js +45304 -0
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/daemon/dist/agentPane.js +128 -0
- package/daemon/dist/agentPane.spec.js +183 -0
- package/daemon/dist/index.js +28 -8
- package/daemon/package.json +1 -1
- package/package.json +15 -2
- package/agent-pane/.prettierignore +0 -5
- package/agent-pane/.prettierrc +0 -8
- package/agent-pane/backend/coverage/base.css +0 -224
- package/agent-pane/backend/coverage/block-navigation.js +0 -87
- package/agent-pane/backend/coverage/clover.xml +0 -887
- package/agent-pane/backend/coverage/coverage-final.json +0 -10
- package/agent-pane/backend/coverage/favicon.png +0 -0
- package/agent-pane/backend/coverage/index.html +0 -176
- package/agent-pane/backend/coverage/prettify.css +0 -1
- package/agent-pane/backend/coverage/prettify.js +0 -2
- package/agent-pane/backend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/backend/coverage/sorter.js +0 -210
- package/agent-pane/backend/coverage/src/codex/codex-provider.ts.html +0 -1402
- package/agent-pane/backend/coverage/src/codex/index.html +0 -131
- package/agent-pane/backend/coverage/src/codex/item-mapper.ts.html +0 -331
- package/agent-pane/backend/coverage/src/db/index.html +0 -131
- package/agent-pane/backend/coverage/src/db/index.ts.html +0 -436
- package/agent-pane/backend/coverage/src/db/schema.ts.html +0 -175
- package/agent-pane/backend/coverage/src/index.html +0 -116
- package/agent-pane/backend/coverage/src/index.ts.html +0 -262
- package/agent-pane/backend/coverage/src/routes/index.html +0 -146
- package/agent-pane/backend/coverage/src/routes/sessions.ts.html +0 -991
- package/agent-pane/backend/coverage/src/routes/turns.ts.html +0 -256
- package/agent-pane/backend/coverage/src/routes/workspaces.ts.html +0 -406
- package/agent-pane/backend/coverage/src/ws/index.html +0 -116
- package/agent-pane/backend/coverage/src/ws/index.ts.html +0 -238
- package/agent-pane/backend/data.db +0 -0
- package/agent-pane/backend/data.db-shm +0 -0
- package/agent-pane/backend/data.db-wal +0 -0
- package/agent-pane/backend/package-lock.json +0 -5945
- package/agent-pane/backend/package.json +0 -33
- package/agent-pane/backend/scripts/backfill-from-jsonl.ts +0 -206
- package/agent-pane/backend/scripts/import-session-from-jsonl.ts +0 -264
- package/agent-pane/backend/src/claude/claude-message-mapper.test.ts +0 -271
- package/agent-pane/backend/src/claude/claude-message-mapper.ts +0 -259
- package/agent-pane/backend/src/claude/claude-provider.test.ts +0 -455
- package/agent-pane/backend/src/claude/claude-provider.ts +0 -1319
- package/agent-pane/backend/src/claude/claude-types.ts +0 -45
- package/agent-pane/backend/src/codex/app-server-client.test.ts +0 -183
- package/agent-pane/backend/src/codex/app-server-client.ts +0 -247
- package/agent-pane/backend/src/codex/app-server-types.ts +0 -259
- package/agent-pane/backend/src/codex/codex-provider-runtime-config.test.ts +0 -56
- package/agent-pane/backend/src/codex/codex-provider.test.ts +0 -60
- package/agent-pane/backend/src/codex/codex-provider.ts +0 -619
- package/agent-pane/backend/src/codex/item-mapper.test.ts +0 -221
- package/agent-pane/backend/src/codex/item-mapper.ts +0 -86
- package/agent-pane/backend/src/codex/shared-app-server.ts +0 -25
- package/agent-pane/backend/src/db/index.test.ts +0 -125
- package/agent-pane/backend/src/db/index.ts +0 -236
- package/agent-pane/backend/src/db/schema.ts +0 -34
- package/agent-pane/backend/src/index.ts +0 -89
- package/agent-pane/backend/src/integration/__fixtures__/cancel-turn.json +0 -29
- package/agent-pane/backend/src/integration/__fixtures__/delta-streaming.json +0 -40
- package/agent-pane/backend/src/integration/__fixtures__/failed-turn.json +0 -16
- package/agent-pane/backend/src/integration/__fixtures__/mcp-tool-call.json +0 -60
- package/agent-pane/backend/src/integration/__fixtures__/missing-item-started.json +0 -34
- package/agent-pane/backend/src/integration/__fixtures__/multi-item-turn.json +0 -85
- package/agent-pane/backend/src/integration/__fixtures__/multi-turn.json +0 -48
- package/agent-pane/backend/src/integration/__fixtures__/simple-turn.json +0 -35
- package/agent-pane/backend/src/integration/delta-streaming.test.ts +0 -130
- package/agent-pane/backend/src/integration/helpers/app-server-mock.ts +0 -272
- package/agent-pane/backend/src/integration/helpers/test-app.ts +0 -110
- package/agent-pane/backend/src/integration/helpers/ws-capture.ts +0 -64
- package/agent-pane/backend/src/integration/item-lifecycle.test.ts +0 -133
- package/agent-pane/backend/src/integration/mcp-tool-call.test.ts +0 -102
- package/agent-pane/backend/src/integration/missing-item-started.test.ts +0 -91
- package/agent-pane/backend/src/integration/multi-turn.test.ts +0 -121
- package/agent-pane/backend/src/integration/session-operations.test.ts +0 -175
- package/agent-pane/backend/src/integration/threads-claude-fork.test.ts +0 -241
- package/agent-pane/backend/src/integration/threads.test.ts +0 -309
- package/agent-pane/backend/src/integration/title-generation.test.ts +0 -109
- package/agent-pane/backend/src/integration/turn-cancel.test.ts +0 -111
- package/agent-pane/backend/src/integration/turn-failure.test.ts +0 -97
- package/agent-pane/backend/src/integration/turn-lifecycle.test.ts +0 -141
- package/agent-pane/backend/src/providers/index.ts +0 -16
- package/agent-pane/backend/src/providers/registry.test.ts +0 -92
- package/agent-pane/backend/src/providers/registry.ts +0 -43
- package/agent-pane/backend/src/providers/runtime-provider.ts +0 -49
- package/agent-pane/backend/src/repoburg/action-mapping.test.ts +0 -122
- package/agent-pane/backend/src/repoburg/action-mapping.ts +0 -294
- package/agent-pane/backend/src/repoburg/agent-runtime-client.test.ts +0 -271
- package/agent-pane/backend/src/repoburg/agent-runtime-client.ts +0 -285
- package/agent-pane/backend/src/repoburg/backend-resolver.test.ts +0 -356
- package/agent-pane/backend/src/repoburg/backend-resolver.ts +0 -261
- package/agent-pane/backend/src/repoburg/repoburg-client.test.ts +0 -180
- package/agent-pane/backend/src/repoburg/repoburg-client.ts +0 -194
- package/agent-pane/backend/src/repoburg/repoburg-provider.test.ts +0 -780
- package/agent-pane/backend/src/repoburg/repoburg-provider.ts +0 -471
- package/agent-pane/backend/src/repoburg/turn-projector.test.ts +0 -621
- package/agent-pane/backend/src/repoburg/turn-projector.ts +0 -637
- package/agent-pane/backend/src/routes/files.ts +0 -31
- package/agent-pane/backend/src/routes/mcp.ts +0 -33
- package/agent-pane/backend/src/routes/models.test.ts +0 -92
- package/agent-pane/backend/src/routes/models.ts +0 -16
- package/agent-pane/backend/src/routes/plugins.ts +0 -40
- package/agent-pane/backend/src/routes/providers.test.ts +0 -86
- package/agent-pane/backend/src/routes/providers.ts +0 -86
- package/agent-pane/backend/src/routes/sessions.test.ts +0 -772
- package/agent-pane/backend/src/routes/sessions.ts +0 -565
- package/agent-pane/backend/src/routes/skills.test.ts +0 -114
- package/agent-pane/backend/src/routes/skills.ts +0 -70
- package/agent-pane/backend/src/routes/threads.ts +0 -323
- package/agent-pane/backend/src/routes/turns.test.ts +0 -196
- package/agent-pane/backend/src/routes/turns.ts +0 -103
- package/agent-pane/backend/src/routes/workspaces.test.ts +0 -197
- package/agent-pane/backend/src/routes/workspaces.ts +0 -128
- package/agent-pane/backend/src/ws/index.test.ts +0 -107
- package/agent-pane/backend/src/ws/index.ts +0 -51
- package/agent-pane/backend/tsconfig.json +0 -25
- package/agent-pane/backend/vitest.config.ts +0 -20
- package/agent-pane/eslint.config.js +0 -33
- package/agent-pane/frontend/coverage/base.css +0 -224
- package/agent-pane/frontend/coverage/block-navigation.js +0 -87
- package/agent-pane/frontend/coverage/clover.xml +0 -2962
- package/agent-pane/frontend/coverage/coverage-final.json +0 -37
- package/agent-pane/frontend/coverage/favicon.png +0 -0
- package/agent-pane/frontend/coverage/index.html +0 -251
- package/agent-pane/frontend/coverage/prettify.css +0 -1
- package/agent-pane/frontend/coverage/prettify.js +0 -2
- package/agent-pane/frontend/coverage/sort-arrow-sprite.png +0 -0
- package/agent-pane/frontend/coverage/sorter.js +0 -210
- package/agent-pane/frontend/coverage/src/App.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/AppInitializer.tsx.html +0 -223
- package/agent-pane/frontend/coverage/src/api/client.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/api/index.html +0 -161
- package/agent-pane/frontend/coverage/src/api/sessions.ts.html +0 -316
- package/agent-pane/frontend/coverage/src/api/websocket.ts.html +0 -544
- package/agent-pane/frontend/coverage/src/api/workspaces.ts.html +0 -199
- package/agent-pane/frontend/coverage/src/components/CollapsibleToolCalls.tsx.html +0 -226
- package/agent-pane/frontend/coverage/src/components/CommandInputBar.tsx.html +0 -382
- package/agent-pane/frontend/coverage/src/components/CommandPalette.tsx.html +0 -715
- package/agent-pane/frontend/coverage/src/components/IdeWorkspace.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/ModelSelector.tsx.html +0 -478
- package/agent-pane/frontend/coverage/src/components/NewSessionDialog.tsx.html +0 -472
- package/agent-pane/frontend/coverage/src/components/RenderArea.tsx.html +0 -574
- package/agent-pane/frontend/coverage/src/components/RightPanel.tsx.html +0 -205
- package/agent-pane/frontend/coverage/src/components/RuntimeIcon.tsx.html +0 -133
- package/agent-pane/frontend/coverage/src/components/SessionTabs.tsx.html +0 -217
- package/agent-pane/frontend/coverage/src/components/StatusBar.tsx.html +0 -271
- package/agent-pane/frontend/coverage/src/components/StatusDot.tsx.html +0 -109
- package/agent-pane/frontend/coverage/src/components/Toast.tsx.html +0 -313
- package/agent-pane/frontend/coverage/src/components/TurnContent.tsx.html +0 -1216
- package/agent-pane/frontend/coverage/src/components/WorkspaceSidebar.tsx.html +0 -1138
- package/agent-pane/frontend/coverage/src/components/index.html +0 -326
- package/agent-pane/frontend/coverage/src/components/panels/ChangesPanel.tsx.html +0 -247
- package/agent-pane/frontend/coverage/src/components/panels/LogsPanel.tsx.html +0 -160
- package/agent-pane/frontend/coverage/src/components/panels/MetricsPanel.tsx.html +0 -427
- package/agent-pane/frontend/coverage/src/components/panels/TurnsPanel.tsx.html +0 -397
- package/agent-pane/frontend/coverage/src/components/panels/index.html +0 -161
- package/agent-pane/frontend/coverage/src/constants/index.html +0 -116
- package/agent-pane/frontend/coverage/src/constants/models.ts.html +0 -406
- package/agent-pane/frontend/coverage/src/hooks/index.html +0 -146
- package/agent-pane/frontend/coverage/src/hooks/useEscapeKey.ts.html +0 -124
- package/agent-pane/frontend/coverage/src/hooks/useOutsideClick.ts.html +0 -142
- package/agent-pane/frontend/coverage/src/hooks/useSessionStatus.ts.html +0 -187
- package/agent-pane/frontend/coverage/src/index.html +0 -146
- package/agent-pane/frontend/coverage/src/main.tsx.html +0 -115
- package/agent-pane/frontend/coverage/src/store/index.html +0 -116
- package/agent-pane/frontend/coverage/src/store/store.ts.html +0 -2404
- package/agent-pane/frontend/coverage/src/test/component-helpers.ts.html +0 -190
- package/agent-pane/frontend/coverage/src/test/fixtures.ts.html +0 -367
- package/agent-pane/frontend/coverage/src/test/index.html +0 -131
- package/agent-pane/frontend/coverage/src/types/index.html +0 -116
- package/agent-pane/frontend/coverage/src/types/index.ts.html +0 -466
- package/agent-pane/frontend/coverage/src/utils/changes.ts.html +0 -202
- package/agent-pane/frontend/coverage/src/utils/duration.ts.html +0 -127
- package/agent-pane/frontend/coverage/src/utils/index.html +0 -131
- package/agent-pane/frontend/dist/assets/index-CJxD4YmJ.js +0 -370
- package/agent-pane/frontend/dist/assets/index-r-xwfOKQ.css +0 -1
- package/agent-pane/frontend/dist/index.html +0 -19
- package/agent-pane/frontend/index.html +0 -18
- package/agent-pane/frontend/package-lock.json +0 -4211
- package/agent-pane/frontend/package.json +0 -35
- package/agent-pane/frontend/src/App.test.tsx +0 -74
- package/agent-pane/frontend/src/App.tsx +0 -44
- package/agent-pane/frontend/src/AppInitializer.test.tsx +0 -142
- package/agent-pane/frontend/src/AppInitializer.tsx +0 -46
- package/agent-pane/frontend/src/__tests__/ThreadsPanel.test.tsx +0 -192
- package/agent-pane/frontend/src/api/client.test.ts +0 -126
- package/agent-pane/frontend/src/api/client.ts +0 -34
- package/agent-pane/frontend/src/api/models.ts +0 -7
- package/agent-pane/frontend/src/api/providers.ts +0 -17
- package/agent-pane/frontend/src/api/sessions.test.ts +0 -246
- package/agent-pane/frontend/src/api/sessions.ts +0 -97
- package/agent-pane/frontend/src/api/skills.ts +0 -12
- package/agent-pane/frontend/src/api/websocket.test.ts +0 -288
- package/agent-pane/frontend/src/api/websocket.ts +0 -240
- package/agent-pane/frontend/src/api/workspaces.test.ts +0 -112
- package/agent-pane/frontend/src/api/workspaces.ts +0 -38
- package/agent-pane/frontend/src/components/AskUserItem.test.tsx +0 -143
- package/agent-pane/frontend/src/components/AskUserItem.tsx +0 -207
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.test.tsx +0 -49
- package/agent-pane/frontend/src/components/CollapsibleToolCalls.tsx +0 -56
- package/agent-pane/frontend/src/components/CommandInputBar.test.tsx +0 -133
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +0 -584
- package/agent-pane/frontend/src/components/CommandPalette.test.tsx +0 -226
- package/agent-pane/frontend/src/components/CommandPalette.tsx +0 -194
- package/agent-pane/frontend/src/components/CommentableText.test.tsx +0 -196
- package/agent-pane/frontend/src/components/CommentableText.tsx +0 -379
- package/agent-pane/frontend/src/components/IdeWorkspace.test.tsx +0 -39
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +0 -51
- package/agent-pane/frontend/src/components/ModelSelector.test.tsx +0 -129
- package/agent-pane/frontend/src/components/ModelSelector.tsx +0 -191
- package/agent-pane/frontend/src/components/NewSessionDialog.test.tsx +0 -95
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +0 -129
- package/agent-pane/frontend/src/components/RenderArea.test.tsx +0 -160
- package/agent-pane/frontend/src/components/RenderArea.tsx +0 -170
- package/agent-pane/frontend/src/components/ResizeHandle.tsx +0 -29
- package/agent-pane/frontend/src/components/RightPanel.test.tsx +0 -43
- package/agent-pane/frontend/src/components/RightPanel.tsx +0 -46
- package/agent-pane/frontend/src/components/RuntimeIcon.test.tsx +0 -32
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +0 -16
- package/agent-pane/frontend/src/components/SessionTabs.test.tsx +0 -72
- package/agent-pane/frontend/src/components/SessionTabs.tsx +0 -49
- package/agent-pane/frontend/src/components/StatusBar.test.tsx +0 -56
- package/agent-pane/frontend/src/components/StatusBar.tsx +0 -129
- package/agent-pane/frontend/src/components/StatusDot.test.tsx +0 -25
- package/agent-pane/frontend/src/components/StatusDot.tsx +0 -8
- package/agent-pane/frontend/src/components/Toast.test.tsx +0 -79
- package/agent-pane/frontend/src/components/Toast.tsx +0 -76
- package/agent-pane/frontend/src/components/TurnContent.test.tsx +0 -377
- package/agent-pane/frontend/src/components/TurnContent.tsx +0 -594
- package/agent-pane/frontend/src/components/WorkspaceSidebar.test.tsx +0 -297
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +0 -351
- package/agent-pane/frontend/src/components/input/OptionSubPopup.tsx +0 -32
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.test.tsx +0 -63
- package/agent-pane/frontend/src/components/input/SkillMentionPopup.tsx +0 -78
- package/agent-pane/frontend/src/components/input/SlashPopup.test.tsx +0 -96
- package/agent-pane/frontend/src/components/input/SlashPopup.tsx +0 -82
- package/agent-pane/frontend/src/components/panels/ChangesPanel.test.tsx +0 -61
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +0 -54
- package/agent-pane/frontend/src/components/panels/TasksPanel.test.tsx +0 -97
- package/agent-pane/frontend/src/components/panels/TasksPanel.tsx +0 -208
- package/agent-pane/frontend/src/components/panels/ThreadsPanel.tsx +0 -382
- package/agent-pane/frontend/src/components/panels/TurnsPanel.test.tsx +0 -131
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +0 -131
- package/agent-pane/frontend/src/constants/models.test.ts +0 -97
- package/agent-pane/frontend/src/constants/models.ts +0 -166
- package/agent-pane/frontend/src/hooks/useEscapeKey.test.ts +0 -42
- package/agent-pane/frontend/src/hooks/useEscapeKey.ts +0 -13
- package/agent-pane/frontend/src/hooks/useOutsideClick.test.ts +0 -92
- package/agent-pane/frontend/src/hooks/useOutsideClick.ts +0 -19
- package/agent-pane/frontend/src/hooks/useProvider.ts +0 -44
- package/agent-pane/frontend/src/hooks/useResizable.test.ts +0 -97
- package/agent-pane/frontend/src/hooks/useResizable.ts +0 -75
- package/agent-pane/frontend/src/hooks/useSessionStatus.test.ts +0 -116
- package/agent-pane/frontend/src/hooks/useSessionStatus.ts +0 -34
- package/agent-pane/frontend/src/main.test.tsx +0 -37
- package/agent-pane/frontend/src/main.tsx +0 -10
- package/agent-pane/frontend/src/store/sessionSlice.ts +0 -440
- package/agent-pane/frontend/src/store/store.test.ts +0 -1338
- package/agent-pane/frontend/src/store/store.ts +0 -37
- package/agent-pane/frontend/src/store/threadSlice.ts +0 -136
- package/agent-pane/frontend/src/store/uiSlice.ts +0 -133
- package/agent-pane/frontend/src/store/workspaceSlice.ts +0 -77
- package/agent-pane/frontend/src/store/wsSlice.ts +0 -368
- package/agent-pane/frontend/src/styles/app.css +0 -627
- package/agent-pane/frontend/src/styles/tokens.css +0 -62
- package/agent-pane/frontend/src/test/component-helpers.ts +0 -38
- package/agent-pane/frontend/src/test/fixtures.ts +0 -101
- package/agent-pane/frontend/src/test-setup.ts +0 -5
- package/agent-pane/frontend/src/types/index.test.ts +0 -128
- package/agent-pane/frontend/src/types/index.ts +0 -134
- package/agent-pane/frontend/src/utils/changes.test.ts +0 -81
- package/agent-pane/frontend/src/utils/changes.ts +0 -39
- package/agent-pane/frontend/src/utils/duration.test.ts +0 -76
- package/agent-pane/frontend/src/utils/duration.ts +0 -14
- package/agent-pane/frontend/tsconfig.json +0 -25
- package/agent-pane/frontend/vite.config.ts +0 -22
- package/agent-pane/frontend/vitest.config.ts +0 -29
- package/agent-pane/package-lock.json +0 -1527
- package/agent-pane/package.json +0 -19
- package/agent-pane/shared/provider-types.ts +0 -67
- package/agent-pane/shared/types.ts +0 -184
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Agent-pane embed — loads the agent-pane backend bundle in-process so the
|
|
4
|
+
* daemon serves it behind its own port (no second listener).
|
|
5
|
+
*
|
|
6
|
+
* The bundle (agent-pane/backend/dist/server.js, ESM, built by esbuild) is
|
|
7
|
+
* loaded with a dynamic import; its `createAgentPaneApp` factory builds the
|
|
8
|
+
* Fastify app with an explicit DB path. The daemon delegates `/api/*` requests
|
|
9
|
+
* to `fastify.routing()` and routes `/ws` upgrades to the app's WebSocket
|
|
10
|
+
* server. Env kill-switch: REPOBURG_EMBED_AGENT_PANE=0 disables the embed.
|
|
11
|
+
*/
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.resolveAgentPaneDist = resolveAgentPaneDist;
|
|
17
|
+
exports.agentPaneDbDir = agentPaneDbDir;
|
|
18
|
+
exports.migrateLegacyDb = migrateLegacyDb;
|
|
19
|
+
exports.loadAgentPane = loadAgentPane;
|
|
20
|
+
exports.createPaneDelegate = createPaneDelegate;
|
|
21
|
+
exports.createUpgradeRouter = createUpgradeRouter;
|
|
22
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
23
|
+
const path_1 = __importDefault(require("path"));
|
|
24
|
+
const os_1 = __importDefault(require("os"));
|
|
25
|
+
const url_1 = require("url");
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the agent-pane bundle path ABSOLUTELY (pm2 God-daemon-cwd bug class:
|
|
28
|
+
* never resolve runtime paths against the process cwd).
|
|
29
|
+
*
|
|
30
|
+
* Works for dev (daemon/src or daemon/dist under the repo) and for the
|
|
31
|
+
* published layout (repoburg/daemon/dist -> repoburg/agent-pane/backend/dist).
|
|
32
|
+
*/
|
|
33
|
+
function resolveAgentPaneDist(fromDir) {
|
|
34
|
+
return path_1.default.resolve(fromDir, '../../agent-pane/backend/dist/server.js');
|
|
35
|
+
}
|
|
36
|
+
/** Directory holding the embedded app's DB (alongside services.json). */
|
|
37
|
+
function agentPaneDbDir(home = os_1.default.homedir()) {
|
|
38
|
+
return path_1.default.join(home, '.repoburg', 'agent-pane');
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One-time migration: copy the legacy dev DB into the embedded location.
|
|
42
|
+
*
|
|
43
|
+
* Copies the DB file plus any WAL/SHM sidecars. No-op when the source is
|
|
44
|
+
* missing (published installs) or the destination already exists.
|
|
45
|
+
*
|
|
46
|
+
* @returns true when a copy was performed.
|
|
47
|
+
*/
|
|
48
|
+
function migrateLegacyDb(sourceDbPath, destDbPath) {
|
|
49
|
+
if (!fs_extra_1.default.existsSync(sourceDbPath) || fs_extra_1.default.existsSync(destDbPath)) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
fs_extra_1.default.ensureDirSync(path_1.default.dirname(destDbPath));
|
|
53
|
+
const sidecars = ['', '-wal', '-shm'];
|
|
54
|
+
for (const suffix of sidecars) {
|
|
55
|
+
const src = `${sourceDbPath}${suffix}`;
|
|
56
|
+
if (fs_extra_1.default.existsSync(src)) {
|
|
57
|
+
fs_extra_1.default.copyFileSync(src, `${destDbPath}${suffix}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
console.log(`[agentPane] migrated legacy DB ${sourceDbPath} -> ${destDbPath}`);
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
/** Load and initialise the embedded agent-pane app. Returns null when disabled/absent. */
|
|
64
|
+
async function loadAgentPane(opts = {}) {
|
|
65
|
+
if ((opts.envDisable ?? process.env.REPOBURG_EMBED_AGENT_PANE) === '0') {
|
|
66
|
+
console.log('[agentPane] embed disabled via REPOBURG_EMBED_AGENT_PANE=0');
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const distPath = opts.distPath ?? resolveAgentPaneDist(__dirname);
|
|
70
|
+
if (!fs_extra_1.default.existsSync(distPath)) {
|
|
71
|
+
console.warn(`[agentPane] bundle not found at ${distPath} — /api/* responds 503`);
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const dbPath = opts.dbPath ?? path_1.default.join(agentPaneDbDir(), 'data.db');
|
|
75
|
+
fs_extra_1.default.ensureDirSync(path_1.default.dirname(dbPath));
|
|
76
|
+
migrateLegacyDb(opts.legacyDbPath ?? resolveAgentPaneDist(__dirname).replace('dist/server.js', 'data.db'), dbPath);
|
|
77
|
+
// Dynamic import: the bundle is ESM; the daemon itself is CommonJS.
|
|
78
|
+
// new Function keeps the RUNTIME import even under ts-jest, which would
|
|
79
|
+
// otherwise transpile import() into require() (ESM-incompatible).
|
|
80
|
+
const dynamicImport = new Function('specifier', 'return import(specifier);');
|
|
81
|
+
const mod = await dynamicImport((0, url_1.pathToFileURL)(distPath).href);
|
|
82
|
+
const { fastify, wss } = await mod.createAgentPaneApp(dbPath);
|
|
83
|
+
await fastify.ready();
|
|
84
|
+
console.log(`[agentPane] embedded app ready (db: ${dbPath})`);
|
|
85
|
+
return {
|
|
86
|
+
routing: fastify.routing.bind(fastify),
|
|
87
|
+
handleWsUpgrade: (req, socket, head) => {
|
|
88
|
+
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
89
|
+
wss.emit('connection', ws, req);
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
shutdown: mod.shutdownAllProviders,
|
|
93
|
+
close: () => fastify.close(),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Express middleware delegating `/api/*` to the embedded app.
|
|
98
|
+
*
|
|
99
|
+
* Mount BEFORE `express.json()` — Fastify parses its own request bodies, and
|
|
100
|
+
* the stream can only be consumed once.
|
|
101
|
+
*/
|
|
102
|
+
function createPaneDelegate(pane) {
|
|
103
|
+
return (req, res) => {
|
|
104
|
+
if (!pane) {
|
|
105
|
+
res.status(503).json({ error: 'agent-pane is not available on this daemon' });
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
pane.routing(req, res);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Single upgrade router for the daemon's HTTP server.
|
|
113
|
+
*
|
|
114
|
+
* `/ws` goes to the embedded agent-pane app (when present); everything else —
|
|
115
|
+
* e.g. the platform frontend's auth WebSocket — goes to the daemon wss.
|
|
116
|
+
*/
|
|
117
|
+
function createUpgradeRouter(pane, daemonWss) {
|
|
118
|
+
return (req, socket, head) => {
|
|
119
|
+
const url = req.url || '';
|
|
120
|
+
if (pane && url.startsWith('/ws')) {
|
|
121
|
+
pane.handleWsUpgrade(req, socket, head);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
daemonWss.handleUpgrade(req, socket, head, (ws) => {
|
|
125
|
+
daemonWss.emit('connection', ws, req);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Specs for the agent-pane embed: path resolution, legacy DB migration,
|
|
4
|
+
* delegation middleware, upgrade routing, and the loader (stub + real bundle).
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
+
const os_1 = __importDefault(require("os"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const agentPane_1 = require("./agentPane");
|
|
14
|
+
// Stub bundle contents: an ESM module satisfying the embed contract.
|
|
15
|
+
const STUB_DIST = `
|
|
16
|
+
export async function createAgentPaneApp(dbPath) {
|
|
17
|
+
globalThis.__stubDbPath = dbPath;
|
|
18
|
+
return {
|
|
19
|
+
fastify: {
|
|
20
|
+
ready: async () => {},
|
|
21
|
+
routing: (req, res) => { res.end('pane:' + req.url); },
|
|
22
|
+
close: async () => {},
|
|
23
|
+
},
|
|
24
|
+
wss: {
|
|
25
|
+
handleUpgrade: (req, socket, head, cb) => { cb({ stub: true }); },
|
|
26
|
+
emit: () => {},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export async function shutdownAllProviders() { globalThis.__stubShutdown = true; }
|
|
31
|
+
`;
|
|
32
|
+
function writeStubDist(dir) {
|
|
33
|
+
fs_extra_1.default.ensureDirSync(dir);
|
|
34
|
+
const distPath = path_1.default.join(dir, 'server.js');
|
|
35
|
+
fs_extra_1.default.writeFileSync(distPath, STUB_DIST);
|
|
36
|
+
return distPath;
|
|
37
|
+
}
|
|
38
|
+
function tmpDir(name) {
|
|
39
|
+
return fs_extra_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), `agentpane-${name}-`));
|
|
40
|
+
}
|
|
41
|
+
function makeLegacyDb(dir, content = 'legacy-data') {
|
|
42
|
+
const legacyDb = path_1.default.join(dir, 'legacy', 'data.db');
|
|
43
|
+
fs_extra_1.default.ensureDirSync(path_1.default.dirname(legacyDb));
|
|
44
|
+
fs_extra_1.default.writeFileSync(legacyDb, content);
|
|
45
|
+
return legacyDb;
|
|
46
|
+
}
|
|
47
|
+
describe('resolveAgentPaneDist', () => {
|
|
48
|
+
it('resolves an absolute path under the repo/package layout from either src or dist', () => {
|
|
49
|
+
const fromSrc = (0, agentPane_1.resolveAgentPaneDist)('/repo/daemon/src');
|
|
50
|
+
const fromDist = (0, agentPane_1.resolveAgentPaneDist)('/repo/daemon/dist');
|
|
51
|
+
expect(fromSrc).toBe('/repo/agent-pane/backend/dist/server.js');
|
|
52
|
+
expect(fromDist).toBe('/repo/agent-pane/backend/dist/server.js');
|
|
53
|
+
expect(path_1.default.isAbsolute(fromSrc)).toBe(true);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe('agentPaneDbDir', () => {
|
|
57
|
+
it('lives under ~/.repoburg/agent-pane', () => {
|
|
58
|
+
expect((0, agentPane_1.agentPaneDbDir)('/home/tester')).toBe(path_1.default.join('/home/tester', '.repoburg', 'agent-pane'));
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
describe('migrateLegacyDb', () => {
|
|
62
|
+
it('copies the DB plus WAL/SHM sidecars when the destination is missing', () => {
|
|
63
|
+
const dir = tmpDir('migrate');
|
|
64
|
+
const src = path_1.default.join(dir, 'data.db');
|
|
65
|
+
fs_extra_1.default.writeFileSync(src, 'base');
|
|
66
|
+
fs_extra_1.default.writeFileSync(`${src}-wal`, 'wal');
|
|
67
|
+
const dest = path_1.default.join(dir, 'dest', 'data.db');
|
|
68
|
+
expect((0, agentPane_1.migrateLegacyDb)(src, dest)).toBe(true);
|
|
69
|
+
expect(fs_extra_1.default.readFileSync(dest, 'utf-8')).toBe('base');
|
|
70
|
+
expect(fs_extra_1.default.readFileSync(`${dest}-wal`, 'utf-8')).toBe('wal');
|
|
71
|
+
});
|
|
72
|
+
it('is a no-op when the destination already exists', () => {
|
|
73
|
+
const dir = tmpDir('migrate-dest-exists');
|
|
74
|
+
const src = path_1.default.join(dir, 'data.db');
|
|
75
|
+
const dest = path_1.default.join(dir, 'out', 'data.db');
|
|
76
|
+
fs_extra_1.default.writeFileSync(src, 'base');
|
|
77
|
+
fs_extra_1.default.ensureDirSync(path_1.default.dirname(dest));
|
|
78
|
+
fs_extra_1.default.writeFileSync(dest, 'existing');
|
|
79
|
+
expect((0, agentPane_1.migrateLegacyDb)(src, dest)).toBe(false);
|
|
80
|
+
expect(fs_extra_1.default.readFileSync(dest, 'utf-8')).toBe('existing');
|
|
81
|
+
});
|
|
82
|
+
it('is a no-op when the source is missing', () => {
|
|
83
|
+
const dir = tmpDir('migrate-no-source');
|
|
84
|
+
expect((0, agentPane_1.migrateLegacyDb)(path_1.default.join(dir, 'absent.db'), path_1.default.join(dir, 'out', 'data.db'))).toBe(false);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
describe('createPaneDelegate', () => {
|
|
88
|
+
it('responds 503 when the pane is not loaded', () => {
|
|
89
|
+
const res = { status: jest.fn().mockReturnThis(), json: jest.fn() };
|
|
90
|
+
(0, agentPane_1.createPaneDelegate)(null)({}, res);
|
|
91
|
+
expect(res.status).toHaveBeenCalledWith(503);
|
|
92
|
+
expect(res.json).toHaveBeenCalledWith({ error: 'agent-pane is not available on this daemon' });
|
|
93
|
+
});
|
|
94
|
+
it('routes raw request/response into the embedded fastify router', () => {
|
|
95
|
+
const routing = jest.fn();
|
|
96
|
+
const pane = {
|
|
97
|
+
routing,
|
|
98
|
+
handleWsUpgrade: jest.fn(),
|
|
99
|
+
shutdown: jest.fn(),
|
|
100
|
+
close: jest.fn(),
|
|
101
|
+
};
|
|
102
|
+
const req = { url: '/api/sessions' };
|
|
103
|
+
const res = {};
|
|
104
|
+
(0, agentPane_1.createPaneDelegate)(pane)(req, res);
|
|
105
|
+
expect(routing).toHaveBeenCalledWith(req, res);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
describe('createUpgradeRouter', () => {
|
|
109
|
+
it('sends /ws upgrades to the embedded pane', () => {
|
|
110
|
+
const pane = {
|
|
111
|
+
routing: jest.fn(),
|
|
112
|
+
handleWsUpgrade: jest.fn(),
|
|
113
|
+
shutdown: jest.fn(),
|
|
114
|
+
close: jest.fn(),
|
|
115
|
+
};
|
|
116
|
+
const daemonWss = { handleUpgrade: jest.fn(), emit: jest.fn() };
|
|
117
|
+
const route = (0, agentPane_1.createUpgradeRouter)(pane, daemonWss);
|
|
118
|
+
route({ url: '/ws' }, {}, Buffer.alloc(0));
|
|
119
|
+
expect(pane.handleWsUpgrade).toHaveBeenCalled();
|
|
120
|
+
expect(daemonWss.handleUpgrade).not.toHaveBeenCalled();
|
|
121
|
+
});
|
|
122
|
+
it('sends non-/ws upgrades to the daemon wss and emits connection', () => {
|
|
123
|
+
const pane = { handleWsUpgrade: jest.fn() };
|
|
124
|
+
const daemonWss = {
|
|
125
|
+
handleUpgrade: jest.fn((_req, _socket, _head, cb) => cb({ daemon: true })),
|
|
126
|
+
emit: jest.fn(),
|
|
127
|
+
};
|
|
128
|
+
const route = (0, agentPane_1.createUpgradeRouter)(pane, daemonWss);
|
|
129
|
+
route({ url: '/' }, {}, Buffer.alloc(0));
|
|
130
|
+
expect(pane.handleWsUpgrade).not.toHaveBeenCalled();
|
|
131
|
+
expect(daemonWss.handleUpgrade).toHaveBeenCalled();
|
|
132
|
+
expect(daemonWss.emit).toHaveBeenCalledWith('connection', { daemon: true }, { url: '/' });
|
|
133
|
+
});
|
|
134
|
+
it('falls back to the daemon wss for /ws when the pane is absent', () => {
|
|
135
|
+
const daemonWss = {
|
|
136
|
+
handleUpgrade: jest.fn((_req, _socket, _head, cb) => cb({})),
|
|
137
|
+
emit: jest.fn(),
|
|
138
|
+
};
|
|
139
|
+
const route = (0, agentPane_1.createUpgradeRouter)(null, daemonWss);
|
|
140
|
+
route({ url: '/ws' }, {}, Buffer.alloc(0));
|
|
141
|
+
expect(daemonWss.handleUpgrade).toHaveBeenCalled();
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
describe('loadAgentPane', () => {
|
|
145
|
+
it('returns null when disabled via the kill-switch', async () => {
|
|
146
|
+
expect(await (0, agentPane_1.loadAgentPane)({ envDisable: '0', distPath: 'unused' })).toBeNull();
|
|
147
|
+
});
|
|
148
|
+
it('returns null when the bundle is missing', async () => {
|
|
149
|
+
const dir = tmpDir('no-dist');
|
|
150
|
+
expect(await (0, agentPane_1.loadAgentPane)({ distPath: path_1.default.join(dir, 'absent.js') })).toBeNull();
|
|
151
|
+
});
|
|
152
|
+
it('loads the stub bundle, wires routing/shutdown, and migrates the legacy DB', async () => {
|
|
153
|
+
const dir = tmpDir('full');
|
|
154
|
+
const distPath = writeStubDist(path_1.default.join(dir, 'dist'));
|
|
155
|
+
const dbPath = path_1.default.join(dir, 'home', 'data.db');
|
|
156
|
+
const legacyDb = makeLegacyDb(dir);
|
|
157
|
+
const pane = await (0, agentPane_1.loadAgentPane)({ distPath, dbPath, legacyDbPath: legacyDb });
|
|
158
|
+
expect(pane).not.toBeNull();
|
|
159
|
+
// DB dir created + legacy DB migrated in.
|
|
160
|
+
expect(fs_extra_1.default.readFileSync(dbPath, 'utf-8')).toBe('legacy-data');
|
|
161
|
+
// routing delegates to the stub fastify.
|
|
162
|
+
const chunks = [];
|
|
163
|
+
const res = { end: (s) => chunks.push(s) };
|
|
164
|
+
pane.routing({ url: '/api/sessions' }, res);
|
|
165
|
+
expect(chunks[0]).toBe('pane:/api/sessions');
|
|
166
|
+
await pane.shutdown();
|
|
167
|
+
await pane.close();
|
|
168
|
+
});
|
|
169
|
+
it('does not copy a legacy DB over an existing embedded DB', async () => {
|
|
170
|
+
const dir = tmpDir('no-overwrite');
|
|
171
|
+
const distPath = writeStubDist(path_1.default.join(dir, 'dist'));
|
|
172
|
+
const dbPath = path_1.default.join(dir, 'home', 'data.db');
|
|
173
|
+
const legacyDb = makeLegacyDb(dir);
|
|
174
|
+
fs_extra_1.default.ensureDirSync(path_1.default.dirname(dbPath));
|
|
175
|
+
fs_extra_1.default.writeFileSync(dbPath, 'embedded-data');
|
|
176
|
+
await (0, agentPane_1.loadAgentPane)({ distPath, dbPath, legacyDbPath: legacyDb });
|
|
177
|
+
expect(fs_extra_1.default.readFileSync(dbPath, 'utf-8')).toBe('embedded-data');
|
|
178
|
+
});
|
|
179
|
+
// NOTE: the real bundle is NOT loaded here — jest's vm module loader
|
|
180
|
+
// cannot provide the CJS interop the bundle's native deps need
|
|
181
|
+
// ("exports is not defined"). Real-bundle boot is validated by the live
|
|
182
|
+
// daemon E2E (Phase 5 of the merge plan).
|
|
183
|
+
});
|
package/daemon/dist/index.js
CHANGED
|
@@ -13,17 +13,28 @@ const services_1 = __importDefault(require("./api/services"));
|
|
|
13
13
|
const auth_1 = __importDefault(require("./api/auth"));
|
|
14
14
|
const registry_1 = __importDefault(require("./api/registry"));
|
|
15
15
|
const mcp_gateway_1 = require("./mcp-gateway");
|
|
16
|
+
const agentPane_1 = require("./agentPane");
|
|
16
17
|
const PORT = 9998;
|
|
17
18
|
async function main() {
|
|
18
19
|
await serviceManager_1.serviceManager.connect();
|
|
20
|
+
// Embedded agent-pane backend — served on THIS port (no second listener).
|
|
21
|
+
// Failure is non-fatal: the daemon keeps managing services, /api/* -> 503.
|
|
22
|
+
const pane = await (0, agentPane_1.loadAgentPane)().catch((err) => {
|
|
23
|
+
console.warn('[agentPane] embed failed:', err);
|
|
24
|
+
return null;
|
|
25
|
+
});
|
|
19
26
|
const app = (0, express_1.default)();
|
|
20
27
|
const server = http_1.default.createServer(app);
|
|
21
|
-
|
|
28
|
+
// Daemon wss in noServer mode — the shared upgrade router dispatches below.
|
|
29
|
+
const wss = new ws_1.WebSocketServer({ noServer: true });
|
|
22
30
|
app.use((0, cors_1.default)({
|
|
23
31
|
origin: '*', // Allow all
|
|
24
32
|
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
|
25
33
|
credentials: true,
|
|
26
34
|
}));
|
|
35
|
+
// Embedded agent-pane API. MUST precede express.json() — Fastify parses its
|
|
36
|
+
// own request bodies; the stream can only be consumed once.
|
|
37
|
+
app.all('/api/*', (0, agentPane_1.createPaneDelegate)(pane));
|
|
27
38
|
app.use(express_1.default.json());
|
|
28
39
|
// API Routers
|
|
29
40
|
app.use('/services', services_1.default);
|
|
@@ -51,19 +62,28 @@ async function main() {
|
|
|
51
62
|
ws.on('close', () => console.log('Client disconnected from daemon WebSocket'));
|
|
52
63
|
ws.on('error', (error) => console.error('WebSocket error:', error));
|
|
53
64
|
});
|
|
65
|
+
// Single upgrade router: '/ws' -> embedded agent-pane, everything else -> daemon wss.
|
|
66
|
+
server.on('upgrade', (0, agentPane_1.createUpgradeRouter)(pane, wss));
|
|
54
67
|
server.listen(PORT, () => {
|
|
55
68
|
console.log(`Repoburg Platform Daemon listening on http://localhost:${PORT}`);
|
|
56
69
|
console.log(`MCP Gateway available at http://localhost:${PORT}/mcp`);
|
|
57
70
|
});
|
|
58
|
-
// Clean up MCP gateway sessions on shutdown.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
// Clean up MCP gateway sessions and the embedded agent-pane on shutdown.
|
|
72
|
+
const shutdown = async () => {
|
|
73
|
+
if (pane) {
|
|
74
|
+
try {
|
|
75
|
+
await pane.shutdown();
|
|
76
|
+
await pane.close();
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
console.error('[agentPane] shutdown failed:', err);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
64
82
|
await mcp_gateway_1.mcpGateway.closeAllSessions();
|
|
65
83
|
process.exit(0);
|
|
66
|
-
}
|
|
84
|
+
};
|
|
85
|
+
process.on('SIGINT', shutdown);
|
|
86
|
+
process.on('SIGTERM', shutdown);
|
|
67
87
|
}
|
|
68
88
|
main().catch(err => {
|
|
69
89
|
console.error("Failed to start daemon:", err);
|
package/daemon/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"start": "cross-env NODE_ENV=production node dist/index.js",
|
|
10
10
|
"dev": "NODE_ENV=development ts-node-dev --respawn --transpile-only src/index.ts",
|
|
11
|
-
"test": "jest"
|
|
11
|
+
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "Celal Ertug",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repoburg",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.204",
|
|
4
4
|
"description": "A local AI-powered software developer assistant that runs on your own machine.",
|
|
5
5
|
"author": "Celal Ertug",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -20,6 +20,17 @@
|
|
|
20
20
|
"repoburg-daemon": "daemon/dist/index.js",
|
|
21
21
|
"repoburg-backend": "backend/dist/src/main.js"
|
|
22
22
|
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"repoburg": "./platform-cli.js",
|
|
25
|
+
"repoburg-daemon": "daemon/dist/index.js",
|
|
26
|
+
"repoburg-backend": "backend/dist/src/main.js"
|
|
27
|
+
},
|
|
28
|
+
"overrides": {
|
|
29
|
+
"@anthropic-ai/claude-agent-sdk": {
|
|
30
|
+
"@anthropic-ai/sdk": "^0.36.3",
|
|
31
|
+
"@modelcontextprotocol/sdk": "1.23.1"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
23
34
|
"scripts": {
|
|
24
35
|
"postinstall": "node postinstall.js",
|
|
25
36
|
"start": "cross-env NODE_ENV=production concurrently \"npm:start:backend\" \"npm:start:frontend\"",
|
|
@@ -33,11 +44,12 @@
|
|
|
33
44
|
"dev:agent-pane": "concurrently -n backend,frontend -c blue,green \"cd agent-pane/backend && npm run dev\" \"cd agent-pane/frontend && npm run dev\"",
|
|
34
45
|
"jaeger:start": "docker run -d --rm --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:latest",
|
|
35
46
|
"jaeger:stop": "docker stop jaeger",
|
|
36
|
-
"lo:build": "npm run build -w backend && npm run build -w website2 && npm run build -w daemon && npm run build -w visual-editor-proxy && cd frontend && npm run build",
|
|
47
|
+
"lo:build": "npm run build -w backend && npm run build -w website2 && (cd agent-pane/backend && npm run build) && npm run build -w daemon && npm run build -w visual-editor-proxy && cd frontend && npm run build",
|
|
37
48
|
"lo:publish": "npm publish"
|
|
38
49
|
},
|
|
39
50
|
"dependencies": {
|
|
40
51
|
"@anthropic-ai/sdk": "^0.36.3",
|
|
52
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.233",
|
|
41
53
|
"@modelcontextprotocol/sdk": "1.23.1",
|
|
42
54
|
"@nestjs/common": "^10.0.0",
|
|
43
55
|
"@nestjs/core": "^10.0.0",
|
|
@@ -65,6 +77,7 @@
|
|
|
65
77
|
"dotenv": "^16.4.5",
|
|
66
78
|
"esbuild": "^0.28.0",
|
|
67
79
|
"eta": "^3.5.0",
|
|
80
|
+
"better-sqlite3": "^11.8.0",
|
|
68
81
|
"express": "^4.19.2",
|
|
69
82
|
"form-data": "^4.0.0",
|
|
70
83
|
"fs-extra": "^11.2.0",
|
package/agent-pane/.prettierrc
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
body, html {
|
|
2
|
-
margin:0; padding: 0;
|
|
3
|
-
height: 100%;
|
|
4
|
-
}
|
|
5
|
-
body {
|
|
6
|
-
font-family: Helvetica Neue, Helvetica, Arial;
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
color:#333;
|
|
9
|
-
}
|
|
10
|
-
.small { font-size: 12px; }
|
|
11
|
-
*, *:after, *:before {
|
|
12
|
-
-webkit-box-sizing:border-box;
|
|
13
|
-
-moz-box-sizing:border-box;
|
|
14
|
-
box-sizing:border-box;
|
|
15
|
-
}
|
|
16
|
-
h1 { font-size: 20px; margin: 0;}
|
|
17
|
-
h2 { font-size: 14px; }
|
|
18
|
-
pre {
|
|
19
|
-
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
-moz-tab-size: 2;
|
|
23
|
-
-o-tab-size: 2;
|
|
24
|
-
tab-size: 2;
|
|
25
|
-
}
|
|
26
|
-
a { color:#0074D9; text-decoration:none; }
|
|
27
|
-
a:hover { text-decoration:underline; }
|
|
28
|
-
.strong { font-weight: bold; }
|
|
29
|
-
.space-top1 { padding: 10px 0 0 0; }
|
|
30
|
-
.pad2y { padding: 20px 0; }
|
|
31
|
-
.pad1y { padding: 10px 0; }
|
|
32
|
-
.pad2x { padding: 0 20px; }
|
|
33
|
-
.pad2 { padding: 20px; }
|
|
34
|
-
.pad1 { padding: 10px; }
|
|
35
|
-
.space-left2 { padding-left:55px; }
|
|
36
|
-
.space-right2 { padding-right:20px; }
|
|
37
|
-
.center { text-align:center; }
|
|
38
|
-
.clearfix { display:block; }
|
|
39
|
-
.clearfix:after {
|
|
40
|
-
content:'';
|
|
41
|
-
display:block;
|
|
42
|
-
height:0;
|
|
43
|
-
clear:both;
|
|
44
|
-
visibility:hidden;
|
|
45
|
-
}
|
|
46
|
-
.fl { float: left; }
|
|
47
|
-
@media only screen and (max-width:640px) {
|
|
48
|
-
.col3 { width:100%; max-width:100%; }
|
|
49
|
-
.hide-mobile { display:none!important; }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.quiet {
|
|
53
|
-
color: #7f7f7f;
|
|
54
|
-
color: rgba(0,0,0,0.5);
|
|
55
|
-
}
|
|
56
|
-
.quiet a { opacity: 0.7; }
|
|
57
|
-
|
|
58
|
-
.fraction {
|
|
59
|
-
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
color: #555;
|
|
62
|
-
background: #E8E8E8;
|
|
63
|
-
padding: 4px 5px;
|
|
64
|
-
border-radius: 3px;
|
|
65
|
-
vertical-align: middle;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
div.path a:link, div.path a:visited { color: #333; }
|
|
69
|
-
table.coverage {
|
|
70
|
-
border-collapse: collapse;
|
|
71
|
-
margin: 10px 0 0 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
table.coverage td {
|
|
76
|
-
margin: 0;
|
|
77
|
-
padding: 0;
|
|
78
|
-
vertical-align: top;
|
|
79
|
-
}
|
|
80
|
-
table.coverage td.line-count {
|
|
81
|
-
text-align: right;
|
|
82
|
-
padding: 0 5px 0 20px;
|
|
83
|
-
}
|
|
84
|
-
table.coverage td.line-coverage {
|
|
85
|
-
text-align: right;
|
|
86
|
-
padding-right: 10px;
|
|
87
|
-
min-width:20px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
table.coverage td span.cline-any {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
padding: 0 5px;
|
|
93
|
-
width: 100%;
|
|
94
|
-
}
|
|
95
|
-
.missing-if-branch {
|
|
96
|
-
display: inline-block;
|
|
97
|
-
margin-right: 5px;
|
|
98
|
-
border-radius: 3px;
|
|
99
|
-
position: relative;
|
|
100
|
-
padding: 0 4px;
|
|
101
|
-
background: #333;
|
|
102
|
-
color: yellow;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.skip-if-branch {
|
|
106
|
-
display: none;
|
|
107
|
-
margin-right: 10px;
|
|
108
|
-
position: relative;
|
|
109
|
-
padding: 0 4px;
|
|
110
|
-
background: #ccc;
|
|
111
|
-
color: white;
|
|
112
|
-
}
|
|
113
|
-
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
114
|
-
color: inherit !important;
|
|
115
|
-
}
|
|
116
|
-
.coverage-summary {
|
|
117
|
-
border-collapse: collapse;
|
|
118
|
-
width: 100%;
|
|
119
|
-
}
|
|
120
|
-
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
|
121
|
-
.keyline-all { border: 1px solid #ddd; }
|
|
122
|
-
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
|
123
|
-
.coverage-summary tbody { border: 1px solid #bbb; }
|
|
124
|
-
.coverage-summary td { border-right: 1px solid #bbb; }
|
|
125
|
-
.coverage-summary td:last-child { border-right: none; }
|
|
126
|
-
.coverage-summary th {
|
|
127
|
-
text-align: left;
|
|
128
|
-
font-weight: normal;
|
|
129
|
-
white-space: nowrap;
|
|
130
|
-
}
|
|
131
|
-
.coverage-summary th.file { border-right: none !important; }
|
|
132
|
-
.coverage-summary th.pct { }
|
|
133
|
-
.coverage-summary th.pic,
|
|
134
|
-
.coverage-summary th.abs,
|
|
135
|
-
.coverage-summary td.pct,
|
|
136
|
-
.coverage-summary td.abs { text-align: right; }
|
|
137
|
-
.coverage-summary td.file { white-space: nowrap; }
|
|
138
|
-
.coverage-summary td.pic { min-width: 120px !important; }
|
|
139
|
-
.coverage-summary tfoot td { }
|
|
140
|
-
|
|
141
|
-
.coverage-summary .sorter {
|
|
142
|
-
height: 10px;
|
|
143
|
-
width: 7px;
|
|
144
|
-
display: inline-block;
|
|
145
|
-
margin-left: 0.5em;
|
|
146
|
-
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
147
|
-
}
|
|
148
|
-
.coverage-summary .sorted .sorter {
|
|
149
|
-
background-position: 0 -20px;
|
|
150
|
-
}
|
|
151
|
-
.coverage-summary .sorted-desc .sorter {
|
|
152
|
-
background-position: 0 -10px;
|
|
153
|
-
}
|
|
154
|
-
.status-line { height: 10px; }
|
|
155
|
-
/* yellow */
|
|
156
|
-
.cbranch-no { background: yellow !important; color: #111; }
|
|
157
|
-
/* dark red */
|
|
158
|
-
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
|
159
|
-
.low .chart { border:1px solid #C21F39 }
|
|
160
|
-
.highlighted,
|
|
161
|
-
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
|
162
|
-
background: #C21F39 !important;
|
|
163
|
-
}
|
|
164
|
-
/* medium red */
|
|
165
|
-
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
|
166
|
-
/* light red */
|
|
167
|
-
.low, .cline-no { background:#FCE1E5 }
|
|
168
|
-
/* light green */
|
|
169
|
-
.high, .cline-yes { background:rgb(230,245,208) }
|
|
170
|
-
/* medium green */
|
|
171
|
-
.cstat-yes { background:rgb(161,215,106) }
|
|
172
|
-
/* dark green */
|
|
173
|
-
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
|
174
|
-
.high .chart { border:1px solid rgb(77,146,33) }
|
|
175
|
-
/* dark yellow (gold) */
|
|
176
|
-
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
|
177
|
-
.medium .chart { border:1px solid #f9cd0b; }
|
|
178
|
-
/* light yellow */
|
|
179
|
-
.medium { background: #fff4c2; }
|
|
180
|
-
|
|
181
|
-
.cstat-skip { background: #ddd; color: #111; }
|
|
182
|
-
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
183
|
-
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
184
|
-
|
|
185
|
-
span.cline-neutral { background: #eaeaea; }
|
|
186
|
-
|
|
187
|
-
.coverage-summary td.empty {
|
|
188
|
-
opacity: .5;
|
|
189
|
-
padding-top: 4px;
|
|
190
|
-
padding-bottom: 4px;
|
|
191
|
-
line-height: 1;
|
|
192
|
-
color: #888;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.cover-fill, .cover-empty {
|
|
196
|
-
display:inline-block;
|
|
197
|
-
height: 12px;
|
|
198
|
-
}
|
|
199
|
-
.chart {
|
|
200
|
-
line-height: 0;
|
|
201
|
-
}
|
|
202
|
-
.cover-empty {
|
|
203
|
-
background: white;
|
|
204
|
-
}
|
|
205
|
-
.cover-full {
|
|
206
|
-
border-right: none !important;
|
|
207
|
-
}
|
|
208
|
-
pre.prettyprint {
|
|
209
|
-
border: none !important;
|
|
210
|
-
padding: 0 !important;
|
|
211
|
-
margin: 0 !important;
|
|
212
|
-
}
|
|
213
|
-
.com { color: #999 !important; }
|
|
214
|
-
.ignore-none { color: #999; font-weight: normal; }
|
|
215
|
-
|
|
216
|
-
.wrapper {
|
|
217
|
-
min-height: 100%;
|
|
218
|
-
height: auto !important;
|
|
219
|
-
height: 100%;
|
|
220
|
-
margin: 0 auto -48px;
|
|
221
|
-
}
|
|
222
|
-
.footer, .push {
|
|
223
|
-
height: 48px;
|
|
224
|
-
}
|