infinicode 2.6.0 → 2.6.2
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/cli.js +1 -0
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.js +5 -0
- package/dist/kernel/command-system.js +71 -0
- package/dist/kernel/config-schema.d.ts +2 -0
- package/dist/kernel/federation/dashboard-html.d.ts +1 -1
- package/dist/kernel/federation/dashboard-html.js +231 -96
- package/dist/kernel/federation/federation.js +12 -0
- package/dist/kernel/federation/self-update.d.ts +26 -0
- package/dist/kernel/federation/self-update.js +68 -0
- package/dist/kernel/federation/transport-http.js +35 -0
- package/package.json +8 -7
|
@@ -16,7 +16,28 @@
|
|
|
16
16
|
import { createServer } from 'node:http';
|
|
17
17
|
import { createServer as createHttpsServer } from 'node:https';
|
|
18
18
|
import { timingSafeEqual } from 'node:crypto';
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
|
+
import { createRequire } from 'node:module';
|
|
19
21
|
import { frameToSSE, parseSSE } from './protocol.js';
|
|
22
|
+
/** Read the livekit-client UMD bundle from the installed dependency, once.
|
|
23
|
+
* Returns null (cached) if the package isn't present — the dashboard then
|
|
24
|
+
* falls back to an idle camera panel instead of erroring. */
|
|
25
|
+
let _lkUmd;
|
|
26
|
+
function loadLiveKitUmd() {
|
|
27
|
+
if (_lkUmd !== undefined)
|
|
28
|
+
return _lkUmd;
|
|
29
|
+
try {
|
|
30
|
+
const require = createRequire(import.meta.url);
|
|
31
|
+
// The package's exports map blocks deep subpaths, but its main/require entry
|
|
32
|
+
// IS the UMD bundle — so a bare resolve returns dist/livekit-client.umd.js.
|
|
33
|
+
const file = require.resolve('livekit-client');
|
|
34
|
+
_lkUmd = readFileSync(file, 'utf8');
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
_lkUmd = null;
|
|
38
|
+
}
|
|
39
|
+
return _lkUmd;
|
|
40
|
+
}
|
|
20
41
|
/** Constant-time string compare — avoids leaking the token via response timing. */
|
|
21
42
|
function safeEqual(a, b) {
|
|
22
43
|
const ab = Buffer.from(a);
|
|
@@ -131,6 +152,20 @@ export class MeshServer {
|
|
|
131
152
|
res.end(this.opts.dashboardHtml);
|
|
132
153
|
return;
|
|
133
154
|
}
|
|
155
|
+
// LiveKit browser SDK, served from the installed dependency so the Park
|
|
156
|
+
// tab can subscribe to a robot's live camera track. Loaded by the dashboard
|
|
157
|
+
// with the ?token= appended (so it passes the auth gate above). Optional:
|
|
158
|
+
// if livekit-client isn't installed, the dashboard just shows an idle cam.
|
|
159
|
+
if (req.method === 'GET' && path === '/vendor/livekit-client.umd.js') {
|
|
160
|
+
const js = loadLiveKitUmd();
|
|
161
|
+
if (!js) {
|
|
162
|
+
res.writeHead(404).end('livekit-client not installed');
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
res.writeHead(200, { 'content-type': 'application/javascript; charset=utf-8', 'cache-control': 'public, max-age=86400' });
|
|
166
|
+
res.end(js);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
134
169
|
if (req.method === 'GET' && path === '/fed/status') {
|
|
135
170
|
res.writeHead(200, { 'content-type': 'application/json' });
|
|
136
171
|
res.end(JSON.stringify(this.opts.getStatus?.() ?? {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infinicode",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "OpenKernel — provider-agnostic AI execution kernel. Native coding agent + mission-driven execution runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/kernel/index.js",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"conf": "^12.0.0",
|
|
76
76
|
"execa": "^9.3.0",
|
|
77
77
|
"inquirer": "^9.2.23",
|
|
78
|
+
"livekit-client": "^2.20.1",
|
|
78
79
|
"mitt": "^3.0.1",
|
|
79
80
|
"nanoid": "^5.0.7",
|
|
80
81
|
"node-fetch": "^3.3.2",
|
|
@@ -88,12 +89,12 @@
|
|
|
88
89
|
"typescript": "^5.4.5"
|
|
89
90
|
},
|
|
90
91
|
"optionalDependencies": {
|
|
91
|
-
"
|
|
92
|
-
"infinicode-tui-win32-x64": "^2.3.0",
|
|
93
|
-
"infinicode-tui-win32-arm64": "^2.3.0",
|
|
94
|
-
"infinicode-tui-linux-x64": "^2.3.0",
|
|
95
|
-
"infinicode-tui-linux-arm64": "^2.3.0",
|
|
92
|
+
"infinicode-tui-darwin-arm64": "^2.3.0",
|
|
96
93
|
"infinicode-tui-darwin-x64": "^2.3.0",
|
|
97
|
-
"infinicode-tui-
|
|
94
|
+
"infinicode-tui-linux-arm64": "^2.3.0",
|
|
95
|
+
"infinicode-tui-linux-x64": "^2.3.0",
|
|
96
|
+
"infinicode-tui-win32-arm64": "^2.3.0",
|
|
97
|
+
"infinicode-tui-win32-x64": "^2.3.0",
|
|
98
|
+
"playwright": "^1.47.0"
|
|
98
99
|
}
|
|
99
100
|
}
|