agenticros 0.1.2 → 0.1.3

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/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenticros",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "AgenticROS - agentic AI for ROS-powered robots. Single CLI to launch real-robot or simulated demos, manage configuration, and inspect status.",
6
6
  "keywords": [
@@ -31,6 +31,14 @@
31
31
  "engines": {
32
32
  "node": ">=20.0.0"
33
33
  },
34
+ "scripts": {
35
+ "build": "tsc",
36
+ "typecheck": "tsc --noEmit",
37
+ "clean": "rm -rf dist runtime tsconfig.tsbuildinfo",
38
+ "pack:runtime": "node ../../scripts/pack-runtime.mjs",
39
+ "size:check": "node ../../scripts/check-cli-tarball-size.mjs",
40
+ "prepublishOnly": "pnpm run clean && pnpm run build && pnpm run pack:runtime && pnpm run size:check"
41
+ },
34
42
  "dependencies": {
35
43
  "@inquirer/prompts": "^7.0.0",
36
44
  "commander": "^12.1.0",
@@ -49,12 +57,5 @@
49
57
  "type": "git",
50
58
  "url": "git+https://github.com/PlaiPin/agenticros.git",
51
59
  "directory": "packages/agenticros-cli"
52
- },
53
- "scripts": {
54
- "build": "tsc",
55
- "typecheck": "tsc --noEmit",
56
- "clean": "rm -rf dist runtime tsconfig.tsbuildinfo",
57
- "pack:runtime": "node ../../scripts/pack-runtime.mjs",
58
- "size:check": "node ../../scripts/check-cli-tarball-size.mjs"
59
60
  }
60
- }
61
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "packedAt": "2026-06-05T22:19:32.653Z",
2
+ "packedAt": "2026-06-05T22:26:30.554Z",
3
3
  "repo": "https://github.com/PlaiPin/agenticros",
4
4
  "note": "This directory is a snapshot of the agenticros monorepo source. `agenticros init` will copy it to ~/agenticros and run pnpm install + colcon build there.",
5
5
  "layout": {
@@ -0,0 +1,63 @@
1
+ diff --git a/dist/link.js b/dist/link.js
2
+ index 4ac3967f589784380501e4cbf3c9dd11a07500d6..2fff09753f579735a52a6115fb89e292b26f03a4 100644
3
+ --- a/dist/link.js
4
+ +++ b/dist/link.js
5
+ @@ -23,8 +23,9 @@ export class RemoteLink {
6
+ static async new(locator) {
7
+ let websocketEndpoint = this.parseZenohLocator(locator);
8
+ let retries = 0;
9
+ - let retryTimeoutMs = RETRY_TIMEOUT_MS;
10
+ while (retries < MAX_RETRIES) {
11
+ + // Per-attempt timeout (AgenticROS: avoid unbounded growth across outer loop iterations)
12
+ + const retryTimeoutMs = Math.min(RETRY_TIMEOUT_MS + retries * 1500, 15000);
13
+ let ws = new WebSocket(websocketEndpoint);
14
+ ws.binaryType = "arraybuffer";
15
+ ws.onerror = function (event) {
16
+ @@ -37,9 +38,13 @@ export class RemoteLink {
17
+ while (ws.readyState != 1) {
18
+ await sleep(100);
19
+ wait += 100;
20
+ - if (wait > (retryTimeoutMs)) {
21
+ - ws.close();
22
+ - retryTimeoutMs *= 2;
23
+ + if (wait > retryTimeoutMs) {
24
+ + try {
25
+ + ws.close();
26
+ + }
27
+ + catch {
28
+ + /* ignore */
29
+ + }
30
+ break;
31
+ }
32
+ }
33
+ @@ -47,10 +52,11 @@ export class RemoteLink {
34
+ console.warn("Connected to", websocketEndpoint);
35
+ return new RemoteLink(ws);
36
+ }
37
+ - else {
38
+ - ws = new WebSocket(websocketEndpoint);
39
+ - console.warn("Restart connection");
40
+ - }
41
+ + // AgenticROS: upstream never incremented `retries`, causing an infinite connect storm and
42
+ + // zenoh remote-api 1006 / router disconnects. Back off between attempts.
43
+ + retries += 1;
44
+ + console.warn(`Restart connection (${retries}/${MAX_RETRIES})`);
45
+ + await sleep(Math.min(400 + retries * 600, 12000));
46
+ }
47
+ throw new Error(`Failed to connect to locator endpoint: ${locator} after ${MAX_RETRIES}`);
48
+ }
49
+ @@ -60,12 +66,12 @@ export class RemoteLink {
50
+ };
51
+ }
52
+ async send(msg) {
53
+ - if (!this.isOk) {
54
+ + if (!this.isOk()) {
55
+ throw new Error("WebSocket is closed");
56
+ }
57
+ while (this.ws.bufferedAmount > MAX_WS_BUFFER_SIZE) {
58
+ await sleep(10);
59
+ - if (!this.isOk) {
60
+ + if (!this.isOk()) {
61
+ throw new Error("WebSocket is closed");
62
+ }
63
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -18,6 +18,8 @@
18
18
  * TypeScript sources for the workspace, NO dist or node_modules
19
19
  * - packages/agenticros-claude-code/dist (pre-built so `npx agenticros` works without colcon)
20
20
  * - package.json / pnpm-workspace.yaml / tsconfig.base.json monorepo manifests
21
+ * - patches/ pnpm patchedDependencies (zenoh-ts, ...)
22
+ * without this `pnpm install` ENOENTs after init
21
23
  * - docs/cli.md reference for the CLI (used by `agenticros logs --help`)
22
24
  * - README.md / LICENSE top-level docs
23
25
  *
@@ -204,6 +206,34 @@ function copyDocs() {
204
206
  }
205
207
  }
206
208
 
209
+ function copyPatches() {
210
+ // pnpm requires patches/* on disk because package.json -> pnpm.patchedDependencies
211
+ // references "patches/<name>.patch". Without these files `pnpm install` aborts
212
+ // with ENOENT during `agenticros init`. Bundle the whole patches/ dir verbatim.
213
+ logStep("Copying patches/");
214
+ copyTree(join(REPO_ROOT, "patches"), join(RUNTIME_DIR, "patches"));
215
+ }
216
+
217
+ function writeInitNpmrc() {
218
+ // The dev workspace runs with strict-peer-dependencies=true so we catch
219
+ // upstream peer mismatches in CI. End-user `agenticros init`, however, must
220
+ // tolerate them - mem0ai (a transitive dep of @agenticros/core) currently
221
+ // declares strict peer ranges on qdrant/pg/redis that the resolved versions
222
+ // don't satisfy, which aborts pnpm install. Overwriting .npmrc in the
223
+ // shipped snapshot keeps dev strictness intact while letting `init` succeed
224
+ // on a clean machine.
225
+ logStep("Writing init-friendly .npmrc (overrides dev settings)");
226
+ const contents = [
227
+ "# Generated by scripts/pack-runtime.mjs - safe defaults for `agenticros init`.",
228
+ "# Devs working on the repo itself get the stricter root .npmrc.",
229
+ "shamefully-hoist=false",
230
+ "strict-peer-dependencies=false",
231
+ "auto-install-peers=true",
232
+ "",
233
+ ].join("\n");
234
+ writeFileSync(join(RUNTIME_DIR, ".npmrc"), contents);
235
+ }
236
+
207
237
  function writeBundleManifest() {
208
238
  const manifestPath = join(RUNTIME_DIR, "BUNDLE.json");
209
239
  const manifest = {
@@ -240,6 +270,8 @@ copyRos2Ws();
240
270
  copyPackages();
241
271
  copyTopLevel();
242
272
  copyDocs();
273
+ copyPatches();
274
+ writeInitNpmrc(); // Must come AFTER copyTopLevel which copies the dev .npmrc
243
275
  writeBundleManifest();
244
276
  reportSize();
245
277
  logStep("Done.");
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes