repoburg 1.3.185 → 1.3.186
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/package-lock.json +2359 -0
- package/agent-pane/backend/package.json +29 -0
- package/agent-pane/backend/src/codex/codex-provider.ts +260 -0
- package/agent-pane/backend/src/codex/item-mapper.ts +59 -0
- package/agent-pane/backend/src/db/index.ts +67 -0
- package/agent-pane/backend/src/db/schema.ts +65 -0
- package/agent-pane/backend/src/index.ts +55 -0
- package/agent-pane/backend/src/routes/sessions.ts +97 -0
- package/agent-pane/backend/src/routes/turns.ts +60 -0
- package/agent-pane/backend/src/ws/index.ts +43 -0
- package/agent-pane/backend/tsconfig.json +23 -0
- package/agent-pane/frontend/index.html +18 -0
- package/agent-pane/frontend/package-lock.json +1948 -0
- package/agent-pane/frontend/package.json +28 -0
- package/agent-pane/frontend/src/App.tsx +44 -0
- package/agent-pane/frontend/src/AppInitializer.tsx +46 -0
- package/agent-pane/frontend/src/api/client.ts +29 -0
- package/agent-pane/frontend/src/api/sessions.ts +31 -0
- package/agent-pane/frontend/src/api/websocket.ts +139 -0
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +42 -0
- package/agent-pane/frontend/src/components/CommandPalette.tsx +196 -0
- package/agent-pane/frontend/src/components/DiffViewer.tsx +27 -0
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +25 -0
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +84 -0
- package/agent-pane/frontend/src/components/RenderArea.tsx +157 -0
- package/agent-pane/frontend/src/components/RightPanel.tsx +40 -0
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +16 -0
- package/agent-pane/frontend/src/components/SessionTabs.tsx +41 -0
- package/agent-pane/frontend/src/components/StatusBar.tsx +60 -0
- package/agent-pane/frontend/src/components/StatusDot.tsx +13 -0
- package/agent-pane/frontend/src/components/Toast.tsx +34 -0
- package/agent-pane/frontend/src/components/TurnContent.tsx +202 -0
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +60 -0
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +77 -0
- package/agent-pane/frontend/src/components/panels/LogsPanel.tsx +25 -0
- package/agent-pane/frontend/src/components/panels/MetricsPanel.tsx +69 -0
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +84 -0
- package/agent-pane/frontend/src/main.tsx +10 -0
- package/agent-pane/frontend/src/store/store.ts +492 -0
- package/agent-pane/frontend/src/styles/app.css +288 -0
- package/agent-pane/frontend/src/styles/tokens.css +62 -0
- package/agent-pane/frontend/src/types/index.ts +115 -0
- package/agent-pane/frontend/tsconfig.json +22 -0
- package/agent-pane/frontend/vite.config.ts +16 -0
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { WebSocket } from 'ws';
|
|
2
|
+
import { WebSocketServer } from 'ws';
|
|
3
|
+
|
|
4
|
+
let wss: WebSocketServer | null = null;
|
|
5
|
+
|
|
6
|
+
/** Attach WebSocket server to an existing HTTP server (noServer mode). */
|
|
7
|
+
export function initWs(): WebSocketServer {
|
|
8
|
+
wss = new WebSocketServer({ noServer: true });
|
|
9
|
+
return wss;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Handle HTTP upgrade for the /ws path. Call from server.on('upgrade'). */
|
|
13
|
+
export function handleUpgrade(
|
|
14
|
+
wss: WebSocketServer,
|
|
15
|
+
request: any,
|
|
16
|
+
socket: any,
|
|
17
|
+
head: any,
|
|
18
|
+
): void {
|
|
19
|
+
const url = request.url || '';
|
|
20
|
+
if (url.startsWith('/ws')) {
|
|
21
|
+
wss.handleUpgrade(request, socket, head, (ws: WebSocket) => {
|
|
22
|
+
wss.emit('connection', ws, request);
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
socket.destroy();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Broadcast a JSON event to all connected WebSocket clients. */
|
|
30
|
+
export function broadcast(event: string, data: unknown): void {
|
|
31
|
+
if (!wss) return;
|
|
32
|
+
const message = JSON.stringify({ event, data });
|
|
33
|
+
for (const client of wss.clients) {
|
|
34
|
+
if (client.readyState === client.OPEN) {
|
|
35
|
+
client.send(message);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Get the WebSocket server instance (or null if not initialized). */
|
|
41
|
+
export function getWss(): WebSocketServer | null {
|
|
42
|
+
return wss;
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"declaration": false,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noImplicitReturns": true,
|
|
18
|
+
"noFallthroughCasesInSwitch": true,
|
|
19
|
+
"allowImportingTsExtensions": true
|
|
20
|
+
},
|
|
21
|
+
"include": ["src/**/*"],
|
|
22
|
+
"exclude": ["node_modules", "dist"]
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>AgentPane</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link
|
|
10
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;450;510;590;600&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
/>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="root"></div>
|
|
16
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|