@evandu/super-pi 0.1.2 → 0.1.4
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/client/assets/index-BsQxHODf.js +43 -0
- package/dist/client/assets/{index-WlIFA_Dt.css → index-DP3T9VzH.css} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/agents.d.ts +20 -1
- package/dist/server/agents.js +92 -18
- package/dist/server/application/catalog-service.d.ts +22 -2
- package/dist/server/application/catalog-service.js +61 -9
- package/dist/server/application/conversation-service.d.ts +3 -2
- package/dist/server/application/conversation-service.js +5 -1
- package/dist/server/application/run-service.d.ts +3 -2
- package/dist/server/application/run-service.js +3 -0
- package/dist/server/application/workspace-service.d.ts +3 -2
- package/dist/server/application/workspace-service.js +5 -1
- package/dist/server/command-handler.js +8 -0
- package/dist/server/http-server.js +3 -1
- package/dist/server/index.js +27 -10
- package/dist/server/runtime.d.ts +5 -2
- package/dist/server/runtime.js +6 -2
- package/dist/server/server-context.d.ts +1 -0
- package/dist/server/store.d.ts +6 -0
- package/dist/server/store.js +16 -0
- package/dist/server/subagent-runs.d.ts +2 -0
- package/dist/server/subagent-runs.js +4 -0
- package/dist/server/subagents.d.ts +3 -2
- package/dist/server/subagents.js +5 -1
- package/dist/server/types.d.ts +19 -0
- package/dist/server/version.d.ts +10 -0
- package/dist/server/version.js +39 -0
- package/dist/server/ws-server.d.ts +2 -0
- package/dist/server/ws-server.js +12 -0
- package/package.json +4 -2
- package/dist/client/assets/index-CHw4ZoY4.js +0 -43
|
@@ -25,6 +25,7 @@ export interface WsServerOptions {
|
|
|
25
25
|
commandHandler: CommandHandler;
|
|
26
26
|
catalogService: CatalogService;
|
|
27
27
|
accessToken?: string;
|
|
28
|
+
rootDir?: string;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* WebSocket transport manager handling upgrade, connection lifecycles, and command dispatch.
|
|
@@ -35,6 +36,7 @@ export declare class WsServer {
|
|
|
35
36
|
private readonly commandHandler;
|
|
36
37
|
private readonly catalogService;
|
|
37
38
|
private readonly accessToken?;
|
|
39
|
+
private readonly rootDir?;
|
|
38
40
|
constructor(options: WsServerOptions);
|
|
39
41
|
private setupUpgrade;
|
|
40
42
|
private setupConnectionHandling;
|
package/dist/server/ws-server.js
CHANGED
|
@@ -34,6 +34,7 @@ export class WsBroadcaster {
|
|
|
34
34
|
return this.getState();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
import { checkDiskVersion } from "./version.js";
|
|
37
38
|
/**
|
|
38
39
|
* WebSocket transport manager handling upgrade, connection lifecycles, and command dispatch.
|
|
39
40
|
*/
|
|
@@ -43,11 +44,13 @@ export class WsServer {
|
|
|
43
44
|
commandHandler;
|
|
44
45
|
catalogService;
|
|
45
46
|
accessToken;
|
|
47
|
+
rootDir;
|
|
46
48
|
constructor(options) {
|
|
47
49
|
this.broadcaster = options.broadcaster;
|
|
48
50
|
this.commandHandler = options.commandHandler;
|
|
49
51
|
this.catalogService = options.catalogService;
|
|
50
52
|
this.accessToken = options.accessToken;
|
|
53
|
+
this.rootDir = options.rootDir;
|
|
51
54
|
this.websocketServer = new WebSocketServer({ noServer: true });
|
|
52
55
|
this.setupUpgrade(options.httpServer);
|
|
53
56
|
this.setupConnectionHandling();
|
|
@@ -67,6 +70,9 @@ export class WsServer {
|
|
|
67
70
|
this.websocketServer.on("connection", (socket) => {
|
|
68
71
|
this.broadcaster.register(socket);
|
|
69
72
|
socket.send(JSON.stringify({ type: "state", state: this.broadcaster.getStateSnapshot() }));
|
|
73
|
+
if (this.rootDir) {
|
|
74
|
+
socket.send(JSON.stringify({ type: "server.version", version: checkDiskVersion(this.rootDir) }));
|
|
75
|
+
}
|
|
70
76
|
void this.catalogService.agentCatalog().then((catalog) => {
|
|
71
77
|
if (socket.readyState === WebSocket.OPEN) {
|
|
72
78
|
socket.send(JSON.stringify({ type: "agent.catalog", catalog }));
|
|
@@ -80,6 +86,12 @@ export class WsServer {
|
|
|
80
86
|
const heartbeat = setInterval(() => {
|
|
81
87
|
if (socket.readyState === WebSocket.OPEN) {
|
|
82
88
|
socket.ping();
|
|
89
|
+
if (this.rootDir) {
|
|
90
|
+
const v = checkDiskVersion(this.rootDir);
|
|
91
|
+
if (v.needsRestart) {
|
|
92
|
+
socket.send(JSON.stringify({ type: "server.version", version: v }));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
83
95
|
}
|
|
84
96
|
}, 30_000);
|
|
85
97
|
socket.on("close", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evandu/super-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Web control plane and companion for Pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"scripts/session-picker-browser.test.mjs",
|
|
82
82
|
"scripts/workspace-settings-browser.test.mjs",
|
|
83
83
|
"scripts/subagent-card-browser.test.mjs",
|
|
84
|
+
"scripts/workflow-browser.test.mjs",
|
|
84
85
|
"scripts/conversation-reconcile-browser.test.mjs",
|
|
85
86
|
"scripts/visual-defects-browser.test.mjs",
|
|
86
87
|
"scripts/agent-vis-card-browser.test.mjs",
|
|
@@ -100,7 +101,8 @@
|
|
|
100
101
|
"scripts/theme-contrast.test.mjs",
|
|
101
102
|
"scripts/theme-switch-state.test.mjs",
|
|
102
103
|
"scripts/settings-window-structure.test.mjs",
|
|
103
|
-
"scripts/file-tab-selected-contrast.test.mjs"
|
|
104
|
+
"scripts/file-tab-selected-contrast.test.mjs",
|
|
105
|
+
"scripts/help-window.test.mjs"
|
|
104
106
|
],
|
|
105
107
|
"dependencies": {
|
|
106
108
|
"ws": "latest"
|