@yu_robotics/remote-cli 1.6.222 → 1.6.224

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.
Files changed (56) hide show
  1. package/README.md +24 -2
  2. package/dist/client/MessageHandler.d.ts.map +1 -1
  3. package/dist/client/MessageHandler.js +5 -4
  4. package/dist/client/MessageHandler.js.map +1 -1
  5. package/dist/client/WebSocketClient.d.ts +3 -0
  6. package/dist/client/WebSocketClient.d.ts.map +1 -1
  7. package/dist/client/WebSocketClient.js +16 -0
  8. package/dist/client/WebSocketClient.js.map +1 -1
  9. package/dist/commands/files.d.ts.map +1 -1
  10. package/dist/commands/files.js +3 -17
  11. package/dist/commands/files.js.map +1 -1
  12. package/dist/commands/init.d.ts +3 -0
  13. package/dist/commands/init.d.ts.map +1 -1
  14. package/dist/commands/init.js +42 -26
  15. package/dist/commands/init.js.map +1 -1
  16. package/dist/commands/start.d.ts.map +1 -1
  17. package/dist/commands/start.js +2 -0
  18. package/dist/commands/start.js.map +1 -1
  19. package/dist/delegation/DelegationManager.js +1 -3
  20. package/dist/delegation/DelegationManager.js.map +1 -1
  21. package/dist/files/AutomaticFileEnrollment.d.ts +17 -0
  22. package/dist/files/AutomaticFileEnrollment.d.ts.map +1 -0
  23. package/dist/files/AutomaticFileEnrollment.js +40 -0
  24. package/dist/files/AutomaticFileEnrollment.js.map +1 -0
  25. package/dist/files/DeviceEnrollment.d.ts +14 -0
  26. package/dist/files/DeviceEnrollment.d.ts.map +1 -0
  27. package/dist/files/DeviceEnrollment.js +53 -0
  28. package/dist/files/DeviceEnrollment.js.map +1 -0
  29. package/dist/files/DeviceIdentity.d.ts.map +1 -1
  30. package/dist/files/DeviceIdentity.js +45 -6
  31. package/dist/files/DeviceIdentity.js.map +1 -1
  32. package/dist/index.js +10 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/maintenance/release-notes.json +1 -1
  35. package/dist/output/OutputFiles.d.ts.map +1 -1
  36. package/dist/output/OutputFiles.js +4 -2
  37. package/dist/output/OutputFiles.js.map +1 -1
  38. package/dist/output/OutputPublication.d.ts +33 -0
  39. package/dist/output/OutputPublication.d.ts.map +1 -0
  40. package/dist/output/OutputPublication.js +78 -0
  41. package/dist/output/OutputPublication.js.map +1 -0
  42. package/dist/output/OutputSnapshots.d.ts +5 -0
  43. package/dist/output/OutputSnapshots.d.ts.map +1 -1
  44. package/dist/output/OutputSnapshots.js +91 -19
  45. package/dist/output/OutputSnapshots.js.map +1 -1
  46. package/dist/types/config.d.ts +1 -0
  47. package/dist/types/config.d.ts.map +1 -1
  48. package/native/prebuilds/darwin-arm64/managed_native.node +0 -0
  49. package/native/prebuilds/darwin-arm64/manifest.json +1 -1
  50. package/native/prebuilds/darwin-x64/managed_native.node +0 -0
  51. package/native/prebuilds/darwin-x64/manifest.json +1 -1
  52. package/native/prebuilds/win32-arm64/managed_native.node +0 -0
  53. package/native/prebuilds/win32-arm64/manifest.json +1 -1
  54. package/native/prebuilds/win32-x64/managed_native.node +0 -0
  55. package/native/prebuilds/win32-x64/manifest.json +1 -1
  56. package/package.json +1 -1
package/README.md CHANGED
@@ -129,9 +129,11 @@ npm install -g @yu_robotics/remote-cli
129
129
  ### 1. Initialize
130
130
 
131
131
  ```bash
132
- remote-cli init --server https://your-router-server.com
132
+ remote-cli init --server https://router.example.com
133
133
  ```
134
134
 
135
+ Initialization requests file-key approval by default and requires an upgraded Router with `files.enabled=true` and HTTPS (loopback HTTP is allowed). Approve the printed `/bind CODE` in Feishu before starting the CLI. For legacy text-only setup, explicitly add `--without-files`; failures never silently switch to that mode.
136
+
135
137
  ### 2. Bind Device in Feishu
136
138
 
137
139
  Send the binding code to the Feishu bot:
@@ -173,7 +175,9 @@ From CLI 1.6.219, managed child-session cleanup uses bundled Node-API helpers on
173
175
 
174
176
  | Command | Description |
175
177
  |---------|-------------|
176
- | `remote-cli init -s <url>` | Initialize and generate binding code |
178
+ | `remote-cli init -s <https-url>` | Request device binding and file-key approval (Feishu approval required) |
179
+ | `remote-cli init -s <https-url> --with-files` | Compatibility alias for the secure default |
180
+ | `remote-cli init -s <url> --without-files` | Explicit legacy text-only initialization without key enrollment |
177
181
  | `remote-cli start` | Start the background service |
178
182
  | `remote-cli stop` | Stop the service |
179
183
  | `remote-cli status` | Check service status |
@@ -842,4 +846,22 @@ See the project [CHANGELOG.md](../../CHANGELOG.md) for release notes and user-vi
842
846
 
843
847
  ## Retrieve Output Files
844
848
 
849
+ Worker file links are captured as private snapshots before temporary workspaces are reclaimed. Worker output does not directly create file cards or export-failure notices. A file becomes visible only when the coordinator explicitly selects it in its reply; selection uses the existing snapshot or a verified export instead of rereading a removed worker path. Unselected worker snapshots stay hidden across timers, reconnects and restarts, and retain the same quotas and expiry. Direct coordinator-file failures still produce a notice. Previously published receipts remain usable so existing file cards are not withdrawn. New worker receipts use a private filename format that older clients do not load; a hidden snapshot does not become public merely by downgrading the CLI.
850
+
851
+ From CLI and Router 1.6.224, existing initialized devices automatically request file-key approval over a supported HTTPS connection when Router files are enabled. Feishu sends the existing bound owner one approval card; no terminal enrollment command or copied binding code is needed. Devices that already authenticate with an approved key do not show another card. Preparing a local key alone does not approve it. Text operation remains available while approval is pending; successful approval reconnects the CLI with its saved key.
852
+
853
+ CLI `files.autoEnroll` defaults to `true`; set it to `false` to suppress automatic enrollment requests. This is separate from Router `files.enabled` and does not revoke an already approved identity. New `init --without-files` setups persist this opt-out; older releases did not record that choice. Explicit `remote-cli files enable` remains available for manual approval or recovery. Automatic requests expire after 24 hours. Expired requests, uncertain card delivery, or admission limits remain held instead of creating replacement cards; use the manual enrollment command for recovery.
854
+
855
+ Router 1.6.224 presents file entries and transfer tasks with colored status headers, prominent filenames, compact file metadata, and primary Get file or Retry actions. Expiry times use a readable absolute UTC format. Completed transfers show a delivery confirmation; uncertain sends remain clearly marked and are never retried automatically. This changes presentation only; retrieval still requires the existing button click and device authorization.
856
+
857
+ With CLI and Router 1.6.223, plain `remote-cli init` requests device binding and file-key approval together by default:
858
+
859
+ ```bash
860
+ remote-cli init --server https://router.example.com
861
+ ```
862
+
863
+ Send the printed `/bind CODE` to the Feishu bot once, then run `remote-cli start`. That approval binds the device and approves its public key together; no separate `remote-cli files enable` step is needed. The private key stays on the CLI machine. Files become available after the authenticated connection negotiates the supported capabilities; output retrieval also requires a compatible native helper.
864
+
865
+ Default enrollment requires HTTPS (loopback HTTP is permitted for development), an upgraded Router, and enabled Router file transfers. Unsupported enrollment, insecure URLs, redirects, and failed requests stop initialization without a silent legacy fallback. Retry with the same key; `init --force` does not rotate it. `--with-files` remains a compatible alias for the default. For text-only setup on an older Router or non-loopback HTTP, explicitly use `remote-cli init --server http://router.example.com:3000 --without-files`. This skips key enrollment; it does not delete or revoke an existing identity. `--with-files` and `--without-files` cannot be combined. Existing devices can still use `remote-cli files enable`; explicit key replacement uses `remote-cli files enable --rotate` and a new owner approval.
866
+
845
867
  CLI and Router 1.6.221 add explicit local Markdown link retrieval using immutable 20 MiB snapshots with a fixed 24-hour expiry. A stable file entry opens a separate transfer task card, followed by a native Feishu file message. Progress, safe retries, offline waiting, original-device ownership, restart receipts, and unknown-send handling are independent of the assistant reply and model task. Approved device enrollment and HTTPS are required; Router `files.enabled` also gates retrieval. CLI `outputFiles.allowedRoots` adds specific export roots, and `outputFiles.maxBytes` can lower the limit. Existing 16 MiB delegated exports and incoming attachments retain their contracts. See [Retrieve Output Files](../../README.md#retrieve-output-files) for permissions, limits, proxy configuration, and failure behavior.
@@ -1 +1 @@
1
- {"version":3,"file":"MessageHandler.d.ts","sourceRoot":"","sources":["../../src/client/MessageHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAgK,MAAM,UAAU,CAAC;AACzM,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE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OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,gBAAgB;IAYxB,uFAAuF;YACzE,sBAAsB;IAsBpC,mFAAmF;YACrE,eAAe;YAuDf,mBAAmB;IA0BjC,OAAO,CAAC,YAAY;YAUN,cAAc;YAuBd,oBAAoB;IAgHlC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CA4B/B"}
@@ -2381,6 +2381,7 @@ You can also use natural language commands to control Claude Code CLI.`,
2381
2381
  }
2382
2382
  const openId = this.getMessageOpenId(messageId);
2383
2383
  const thread = this.threadManager.getThread(threadId);
2384
+ const outputGeneration = thread?.delegationWorkspaceGeneration ?? 0;
2384
2385
  if (goalRequest && thread && (0, DelegationSettings_1.isDelegationEnabled)(thread)) {
2385
2386
  throw new Error('Turn managed delegation off before starting a native goal.');
2386
2387
  }
@@ -2418,8 +2419,8 @@ You can also use natural language commands to control Claude Code CLI.`,
2418
2419
  outputExports.set(entry.file, entry);
2419
2420
  },
2420
2421
  onOutputFiles: this.outputFiles ? async (links, cwd, taskId, final) => {
2421
- await this.outputFiles.capture(links, { messageId, threadId, taskId,
2422
- generation: thread?.delegationWorkspaceGeneration ?? 0, cwd, source: 'worker' }, final);
2422
+ await this.outputFiles.capture(links, { messageId, threadId, taskId, owner: openId,
2423
+ generation: outputGeneration, cwd, source: 'worker' }, final);
2423
2424
  } : undefined,
2424
2425
  isWorkspaceBusy: cwd => this.threadManager.listThreads().some(other => {
2425
2426
  if (other.id === threadId && isCurrent() || !this.threadPool.isThreadBusy(other.id))
@@ -2664,8 +2665,8 @@ You can also use natural language commands to control Claude Code CLI.`,
2664
2665
  || (scope && (suppressed || scope.hasPendingResults())) ? '' : result.output ?? '';
2665
2666
  queueLocalImages(visibleResult);
2666
2667
  if (this.outputFiles) {
2667
- await this.outputFiles.capture(outputLinks, { messageId, threadId, taskId: messageId,
2668
- generation: imageGeneration, cwd: imageCwd, source: 'workspace', exports: [...outputExports.values()] }, visibleResult);
2668
+ await this.outputFiles.capture(outputLinks, { messageId, threadId, taskId: messageId, owner: openId,
2669
+ generation: outputGeneration, cwd: imageCwd, source: 'workspace', exports: [...outputExports.values()] }, visibleResult);
2669
2670
  }
2670
2671
  await imageDelivery?.drain();
2671
2672
  }