infinicode 2.3.6 → 2.5.0
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/bin/robopark.js +2 -0
- package/dist/cli.js +26 -1
- package/dist/commands/maintain.d.ts +29 -0
- package/dist/commands/maintain.js +186 -0
- package/dist/commands/mcp.js +1 -1
- package/dist/commands/robopark.d.ts +6 -0
- package/dist/commands/robopark.js +450 -0
- package/dist/commands/serve.d.ts +5 -0
- package/dist/commands/serve.js +170 -11
- package/dist/kernel/agents/backends/cli-backend.d.ts +4 -0
- package/dist/kernel/agents/backends/cli-backend.js +13 -5
- package/dist/kernel/agents/backends/detect.d.ts +12 -0
- package/dist/kernel/agents/backends/detect.js +102 -2
- package/dist/kernel/agents/backends/profiles.d.ts +67 -0
- package/dist/kernel/agents/backends/profiles.js +48 -0
- package/dist/kernel/agents/backends/registry.d.ts +2 -1
- package/dist/kernel/agents/backends/registry.js +39 -5
- package/dist/kernel/agents/backends/rotation.d.ts +51 -0
- package/dist/kernel/agents/backends/rotation.js +107 -0
- package/dist/kernel/agents/backends/types.d.ts +3 -1
- package/dist/kernel/federation/dashboard-html.d.ts +13 -0
- package/dist/kernel/federation/dashboard-html.js +561 -0
- package/dist/kernel/federation/federation.d.ts +75 -1
- package/dist/kernel/federation/federation.js +119 -23
- package/dist/kernel/federation/moltfed-adapter.js +1 -0
- package/dist/kernel/federation/telemetry.d.ts +1 -1
- package/dist/kernel/federation/telemetry.js +2 -1
- package/dist/kernel/federation/transport-http.d.ts +34 -1
- package/dist/kernel/federation/transport-http.js +117 -4
- package/dist/kernel/federation/types.d.ts +20 -0
- package/dist/kernel/mcp/mcp-server.js +23 -7
- package/dist/robopark-cli.d.ts +2 -0
- package/dist/robopark-cli.js +23 -0
- package/package.json +7 -3
|
@@ -37,28 +37,43 @@ export function createMcpServer(deps) {
|
|
|
37
37
|
// ── Spawn + dispatch (parallel agents across devices, no SSH) ───────────────
|
|
38
38
|
server.registerTool('spawn_agent', {
|
|
39
39
|
title: 'Spawn agent on a device',
|
|
40
|
-
description: 'Hand a task to a device\'s local agent (by name or id). Non-blocking: returns a runId immediately — use follow_task to monitor. Pass wait:true to block until done (short tasks). Runs on the target with its persistent role
|
|
40
|
+
description: 'Hand a task to a device\'s local agent (by name or id). Non-blocking: returns a runId immediately — use follow_task to monitor. Pass wait:true to block until done (short tasks). Runs on the target with its persistent role.\n\nExecutor: set `agent` to a fixed CLI ("claude" | "codex" | "opencode" | "gemini") or "kernel" (native). For automatic backend rotation instead of a fixed one, set `agent:"auto"` (or any of profile/strategy/policy/taskType) — the target then resolves a coder-profile *chain* and runs it with fallback (first backend that succeeds wins). Use `profile` to pin a named profile, `taskType` to route by kind (e.g. "refactor","docs","bulk"), `policy` to order by tier ("free-first"|"cheapest"|"fastest"|"highest-quality"|"balanced"), `strategy` to force one mode, and `model` to override the head model.',
|
|
41
41
|
inputSchema: {
|
|
42
42
|
task: z.string().describe('what the agent should do'),
|
|
43
43
|
device: z.string().optional().describe('target device name or node id'),
|
|
44
44
|
capabilities: z.array(z.string()).optional().describe('required capabilities, e.g. ["coding"]'),
|
|
45
|
-
agent: z.string().optional().describe('executor
|
|
45
|
+
agent: z.string().optional().describe('executor: "kernel" (default), "claude" | "codex" | "opencode" | "gemini", or "auto" to rotate across coder profiles'),
|
|
46
|
+
profile: z.string().optional().describe('pin a named coder profile (e.g. "deep","fast","precise","cheap","oss")'),
|
|
47
|
+
strategy: z.enum(['auto', 'tasktype', 'policy', 'roundrobin', 'fallback']).optional().describe('rotation strategy (default from config: auto)'),
|
|
48
|
+
policy: z.enum(['free-first', 'cheapest', 'fastest', 'highest-quality', 'balanced']).optional().describe('policy tier ordering when rotating'),
|
|
49
|
+
taskType: z.string().optional().describe('route by task kind: refactor|architecture|debug|feature|edit|test|docs|bulk|boilerplate|fix'),
|
|
50
|
+
model: z.string().optional().describe('model override applied to the chosen backend'),
|
|
46
51
|
role: z.string().optional().describe('override the role context for this task'),
|
|
47
52
|
wait: z.boolean().optional().describe('block until the run finishes (default false)'),
|
|
48
53
|
},
|
|
49
|
-
}, async ({ task, device, capabilities, agent, role, wait }) => {
|
|
50
|
-
const
|
|
54
|
+
}, async ({ task, device, capabilities, agent, profile, strategy, policy, taskType, model, role, wait }) => {
|
|
55
|
+
const rotate = !!(profile || strategy || policy || taskType || agent === 'auto');
|
|
56
|
+
const caps = [
|
|
57
|
+
...(capabilities ?? []),
|
|
58
|
+
...(agent && agent !== 'kernel' && agent !== 'auto' ? [`backend:${agent}`] : []),
|
|
59
|
+
...(rotate ? ['coding'] : []),
|
|
60
|
+
];
|
|
51
61
|
const t = {
|
|
52
62
|
description: task.slice(0, 80),
|
|
53
63
|
prompt: task,
|
|
54
64
|
capabilities: caps,
|
|
55
65
|
agent,
|
|
56
66
|
role,
|
|
67
|
+
model,
|
|
68
|
+
profile,
|
|
69
|
+
strategy,
|
|
70
|
+
policy,
|
|
71
|
+
taskType,
|
|
57
72
|
};
|
|
58
73
|
const res = await federation.dispatch(t, { preferName: device, preferNodeId: device }, { wait });
|
|
59
74
|
if (!res)
|
|
60
75
|
return text({ ok: false, error: 'no capable device online for this task' });
|
|
61
|
-
return text({ ok: true, peerId: res.peerId, runId: res.runId, agent: agent ?? 'kernel', status: res.record.status, record: res.record });
|
|
76
|
+
return text({ ok: true, peerId: res.peerId, runId: res.runId, agent: rotate ? 'rotate' : (agent ?? 'kernel'), status: res.record.status, record: res.record });
|
|
62
77
|
});
|
|
63
78
|
server.registerTool('dispatch', {
|
|
64
79
|
title: 'Dispatch to best device',
|
|
@@ -142,11 +157,12 @@ export function createMcpServer(deps) {
|
|
|
142
157
|
description: 'Persist a device\'s role + architecture so spawned agents are proactive and context-aware.',
|
|
143
158
|
inputSchema: {
|
|
144
159
|
role: z.string().describe('e.g. "RoboPanda"'),
|
|
160
|
+
site: z.string().optional().describe('physical deployment/location, e.g. "Tel Aviv" — lets a fleet UI group by site as you add more locations'),
|
|
145
161
|
architecture: z.string().optional().describe('this device\'s job + the wider system'),
|
|
146
162
|
nodeId: z.string().optional().describe('target node; omit for local'),
|
|
147
163
|
},
|
|
148
|
-
}, async ({ role, architecture, nodeId }) => {
|
|
149
|
-
const payload = { role, architecture };
|
|
164
|
+
}, async ({ role, site, architecture, nodeId }) => {
|
|
165
|
+
const payload = { role, site, architecture };
|
|
150
166
|
return text(nodeId ? await federation.setRoleOf(nodeId, payload) : federation.setRole(payload));
|
|
151
167
|
});
|
|
152
168
|
// ── Voice (LiveKit intent — media plane handles TTS) ────────────────────────
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `robopark` — standalone entry for the RoboPark fleet control CLI.
|
|
4
|
+
*
|
|
5
|
+
* Same verbs as `infinicode robopark …`, exposed as a top-level `robopark`
|
|
6
|
+
* command so operators type `robopark fleet` / `robopark setup` directly.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import Conf from 'conf';
|
|
10
|
+
import { attachRoboparkSubcommands } from './commands/robopark.js';
|
|
11
|
+
import { DEFAULT_CONFIG } from './kernel/config-schema.js';
|
|
12
|
+
const VERSION = '2.5.0';
|
|
13
|
+
const config = new Conf({
|
|
14
|
+
projectName: 'infinicode', // share infinicode's config store (providers, federation)
|
|
15
|
+
defaults: DEFAULT_CONFIG,
|
|
16
|
+
});
|
|
17
|
+
const program = new Command();
|
|
18
|
+
program
|
|
19
|
+
.name('robopark')
|
|
20
|
+
.description('RoboPark fleet control — setup, fleet status, run, apply, dashboard (rides the infinicode mesh)')
|
|
21
|
+
.version(VERSION);
|
|
22
|
+
attachRoboparkSubcommands(program, config);
|
|
23
|
+
program.parse();
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infinicode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
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",
|
|
7
7
|
"types": "./dist/kernel/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
9
|
"infinicode": "./bin/infinicode.js",
|
|
10
|
-
"ic": "./bin/infinicode.js"
|
|
10
|
+
"ic": "./bin/infinicode.js",
|
|
11
|
+
"robopark": "./bin/robopark.js"
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
@@ -17,10 +18,12 @@
|
|
|
17
18
|
"./kernel": {
|
|
18
19
|
"types": "./dist/kernel/index.d.ts",
|
|
19
20
|
"import": "./dist/kernel/index.js"
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"./robopark": "./dist/robopark-cli.js"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
23
25
|
"bin/infinicode.js",
|
|
26
|
+
"bin/robopark.js",
|
|
24
27
|
"dist",
|
|
25
28
|
".opencode/plugins",
|
|
26
29
|
".opencode/themes",
|
|
@@ -31,6 +34,7 @@
|
|
|
31
34
|
"build": "tsc",
|
|
32
35
|
"dev": "tsc --watch",
|
|
33
36
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
37
|
+
"test": "npm run build && node --test \"test/**/*.test.mjs\"",
|
|
34
38
|
"prepublishOnly": "npm run build",
|
|
35
39
|
"kernel": "node bin/infinicode.js mission",
|
|
36
40
|
"typecheck": "tsc --noEmit"
|