infinicode 2.8.2 → 2.8.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.
@@ -9,7 +9,14 @@ export interface ServeOptions {
9
9
  foreground?: boolean;
10
10
  }
11
11
  /** Resolve the actual infinicode CLI entry point so `robopark setup --start`
12
- * works even when global bins are not on PATH. */
12
+ * works even when global bins are not on PATH.
13
+ *
14
+ * Returns the node executable path and the path to `bin/infinicode.js` inside
15
+ * the installed `infinicode` package. We avoid spawning the bare `infinicode`
16
+ * command because npm's `.cmd` shim is not reliably resolvable by Node's
17
+ * `spawn` without `shell: true` on Windows, and shell concatenation triggers
18
+ * a deprecation warning when args are passed.
19
+ */
13
20
  export declare function resolveInfinicodeBin(): Promise<{
14
21
  node: string;
15
22
  script: string;
@@ -23,7 +23,11 @@ function pkgDir() {
23
23
  }
24
24
  function findScheduler() {
25
25
  const candidates = [
26
+ // When robopark serve is invoked via the robopark wrapper, the wrapper
27
+ // imports infinicode/robopark, so this code runs from inside the
28
+ // infinicode package. The scheduler Python files are shipped there.
26
29
  join(pkgDir(), 'packages', 'robopark', 'scheduler', 'main.py'),
30
+ // Fallbacks for local checkout / when robopark is installed standalone.
27
31
  join(pkgDir(), 'scheduler', 'main.py'),
28
32
  join(process.cwd(), 'packages', 'robopark', 'scheduler', 'main.py'),
29
33
  join(process.cwd(), 'scheduler', 'main.py'),
@@ -47,7 +51,14 @@ function findPython() {
47
51
  return 'python3';
48
52
  }
49
53
  /** Resolve the actual infinicode CLI entry point so `robopark setup --start`
50
- * works even when global bins are not on PATH. */
54
+ * works even when global bins are not on PATH.
55
+ *
56
+ * Returns the node executable path and the path to `bin/infinicode.js` inside
57
+ * the installed `infinicode` package. We avoid spawning the bare `infinicode`
58
+ * command because npm's `.cmd` shim is not reliably resolvable by Node's
59
+ * `spawn` without `shell: true` on Windows, and shell concatenation triggers
60
+ * a deprecation warning when args are passed.
61
+ */
51
62
  export async function resolveInfinicodeBin() {
52
63
  try {
53
64
  // When running from the infinicode package itself, the CLI entry is nearby.
@@ -59,7 +70,8 @@ export async function resolveInfinicodeBin() {
59
70
  try {
60
71
  // When running from the robopark wrapper, resolve infinicode from npm.
61
72
  const { createRequire } = await import('node:module');
62
- const require = createRequire(import.meta.url);
73
+ // createRequire expects a file path, not a file:// URL.
74
+ const require = createRequire(fileURLToPath(import.meta.url));
63
75
  const pkgMain = require.resolve('infinicode/package.json');
64
76
  const candidate = join(dirname(pkgMain), 'bin', 'infinicode.js');
65
77
  if (existsSync(candidate))
@@ -103,6 +115,7 @@ export async function roboparkServe(opts) {
103
115
  env,
104
116
  stdio: 'pipe',
105
117
  detached: !opts.foreground,
118
+ shell: process.platform === 'win32',
106
119
  });
107
120
  let ready = false;
108
121
  proc.stdout?.on('data', (d) => {
@@ -40,7 +40,9 @@ async function infinicodeArgv(args) {
40
40
  const bin = await resolveInfinicodeBin();
41
41
  if (bin)
42
42
  return [bin.node, bin.script, ...args];
43
- // Fallback: assume `infinicode` is on PATH. Will fail clearly if not.
43
+ // Fallback: assume `infinicode` is on PATH. This will fail on Windows if the
44
+ // .cmd shim is not resolvable, but the resolved-bin path above is the
45
+ // intended path for all npm installs.
44
46
  return ['infinicode', ...args];
45
47
  }
46
48
  /** Build a Windows-task-friendly command string from an argv array. */
@@ -17,7 +17,7 @@ const config = new Conf({
17
17
  });
18
18
  const program = new Command('robopark')
19
19
  .description('RoboPark fleet control CLI — set up, watch, and drive talking robots')
20
- .version('2.8.2');
20
+ .version('2.8.4');
21
21
  program
22
22
  .command('scan')
23
23
  .description('Auto-discover the fleet and print ready-to-run setup commands')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinicode",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
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",
@@ -19,12 +19,14 @@
19
19
  "types": "./dist/kernel/index.d.ts",
20
20
  "import": "./dist/kernel/index.js"
21
21
  },
22
- "./robopark": "./dist/robopark-cli.js"
22
+ "./robopark": "./dist/robopark-cli.js",
23
+ "./package.json": "./package.json"
23
24
  },
24
25
  "files": [
25
26
  "bin/infinicode.js",
26
27
  "bin/robopark.js",
27
28
  "dist",
29
+ "packages/robopark/scheduler",
28
30
  ".opencode/plugins",
29
31
  ".opencode/themes",
30
32
  ".opencode/tui.json",
@@ -0,0 +1,63 @@
1
+ # robopark
2
+
3
+ The **RoboPark fleet control CLI** — set up, watch, and drive a room full of
4
+ talking robots from one command. `robopark` is the operator front-end; it rides
5
+ the [`infinicode`](https://www.npmjs.com/package/infinicode) device mesh, which
6
+ it installs as a dependency. You install and think in one name — everything else
7
+ is plumbing.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install -g robopark
13
+ ```
14
+
15
+ ## The whole setup — two commands
16
+
17
+ Operators think in **scheduler / robot / laptop**; the mesh underneath thinks in
18
+ hub / satellite / peer. `robopark` translates, and each role turns on the right
19
+ defaults automatically.
20
+
21
+ ```sh
22
+ # On the on-site hub (LiveKit Server 1) — LAN + Tailscale + dashboard on:
23
+ robopark setup --scheduler --gateway ws://<infinibot-gateway>:18789 --start
24
+
25
+ # On each robot Pi — accept-only, LAN-discovered:
26
+ robopark setup --robot --name robopanda --start
27
+
28
+ # From anywhere — a live table of the whole fleet:
29
+ robopark fleet --watch
30
+ ```
31
+
32
+ Run `robopark setup` with no role for a guided wizard.
33
+
34
+ ## Commands
35
+
36
+ | Command | Does |
37
+ |---|---|
38
+ | `robopark setup` | Configure this device's role + site and (with `--start`) launch its node. |
39
+ | `robopark fleet [--watch]` | Live table of every node the mesh can see. |
40
+ | `robopark run <node> <cmd>` | Run a command on one node (use `.` for the local node). |
41
+ | `robopark apply` | Publish this hub's providers / keys / policy to every satellite. |
42
+ | `robopark dashboard [--open]` | Open the web control panel served by the hub. |
43
+
44
+ ## How it fits together
45
+
46
+ ```
47
+ you ── robopark ──▶ infinicode nodes (the mesh) ──▶ InfiniBot (watch)
48
+ └──▶ web dashboard :47913 (watch / drive)
49
+ ```
50
+
51
+ - **robopark** — the remote control. A CLI, no daemon. Writes config and calls
52
+ each node's HTTP API.
53
+ - **infinicode** — the runtime. `infinicode serve` runs on every device, forms
54
+ the mesh, runs agents, streams telemetry, and serves the dashboard.
55
+ - **InfiniBot** — the cockpit. Each node pushes its status *up* to InfiniBot;
56
+ you watch there (or in the built-in dashboard).
57
+
58
+ `robopark` never talks to InfiniBot directly — it drives infinicode nodes, and
59
+ those surface in InfiniBot.
60
+
61
+ ## License
62
+
63
+ MIT
@@ -0,0 +1,24 @@
1
+ # RoboPark Session Scheduler
2
+ FROM python:3.11-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Install dependencies
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Copy application
11
+ COPY main.py .
12
+
13
+ # Create data directory
14
+ RUN mkdir -p /app/data
15
+
16
+ # Expose port
17
+ EXPOSE 8080
18
+
19
+ # Health check
20
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
21
+ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/api/robots')"
22
+
23
+ # Run
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]