@yu_robotics/remote-cli-router 1.6.190 → 1.6.193

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 (2) hide show
  1. package/README.md +115 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -211,6 +211,8 @@ no late worker is launched. Failed collection after confirmed exit preserves onl
211
211
  the affected lane and files for recovery rather than quarantining the source.
212
212
  Individual Git command deadlines remain; cancellation may wait for Git to settle.
213
213
  From CLI 1.6.159, delegated `git worktree add` and `git checkout` commands have a 120-second deadline per command. Other Git commands, including worktree listing/removal and nested object transfers, retain their 15-second deadlines. Git command timeout errors show the operation, elapsed milliseconds and deadline without paths or checkout references. Preparation remains pending until the Git child exits; cancellation can wait for this bounded cleanup, and the existing task ID remains available for polling.
214
+
215
+ From CLI 1.6.193, a failed or timed-out nested Git transfer disconnects its input pipe and drains pending output before awaiting both child exits. This prevents a full pipe from keeping delegation cleanup pending after the processes have exited. Partial transfer data is removed only after both children close; unrelated temporary directories remain untouched. Upgrade the local CLI for this fix; a Router-only upgrade does not change local Git handling.
214
216
  Slow launch/cancel tools return the accepted task ID and a pending status before
215
217
  the adapter timeout; poll that ID with `remote_cli_result`, not a new delegation.
216
218
  The response does not claim cancellation cleanup or workspace release is complete.
@@ -219,14 +221,119 @@ omitting hidden edits or treating missing sparse files as deletions. Resolve tho
219
221
  flags and sparse checkouts explicitly; the source index is never modified.
220
222
  These changes require a CLI upgrade; Router protocol and native backends are unchanged.
221
223
 
222
- From CLI 1.6.135, the local CLI automatically reclaims verified successful
223
- no-change or successfully applied worker checkout directories and recreates them
224
- at their stable lane paths when needed. Conversation pointers and artifact refs
225
- are retained. Unknown or unresolved files remain for manual recovery. Failed
226
- checkout recreation preserves existing native context; full byte audits do not
227
- hold other lanes' repository metadata admission guard. Router messages, native
228
- backends, and non-Git FIFO execution are unchanged; older
229
- CLIs retain their existing lifecycle even when connected to a newer Router.
224
+ CLI 1.6.192 fixes a CommonJS runtime error introduced in 1.6.191 that prevented
225
+ delegation backend discovery and task admission. Upgrade the local CLI to apply
226
+ the fix. Router-only upgrades do not repair the installed CLI. Artifact export
227
+ validation and canonical storage-path checks retain their existing behavior.
228
+ On Linux and macOS, SIGTERM and SIGINT await client and worker teardown before process exit,
229
+ including during startup. Verified normal shutdown releases the delegation storage
230
+ owner before restart; failed or unconfirmed worker teardown retains recovery state
231
+ and exits unsuccessfully.
232
+
233
+ Ownership now uses a native OS lock held on a stable `.ownership.guard` file,
234
+ plus checksummed owner identity and a durable `.ownership.children` process
235
+ journal. Completed history is compacted atomically; unresolved launches remain
236
+ recorded, and failed lock releases can be retried without restarting. The
237
+ empty guard file intentionally remains after release: its existence does not
238
+ mean the storage is busy. Never remove or rename it while a CLI may be running.
239
+ Native binaries are bundled for supported Linux, macOS and Windows architectures;
240
+ unsupported native-lock platforms fail explicitly rather than falling back to an
241
+ age-based lock. Use local filesystems; shared/network storage is not supported.
242
+
243
+ A crashed idle owner can be recovered automatically. On the same host after a
244
+ reboot, old process evidence no longer blocks acquisition. On the same boot,
245
+ recovery validates PID/start identity and checks each recorded POSIX process
246
+ group with the kernel; surviving children, unknown launches, foreign hosts/PID
247
+ namespaces and incomplete journals remain protected. No process is killed by
248
+ recovery, and no worktree, artifact or conversation is deleted just to regain
249
+ ownership. Recovery does not authorize workspace disposal; existing artifact
250
+ and checkout checks still apply. Groups escaped via `setsid`/`setpgid` are outside
251
+ the existing managed-process-group guarantee. Windows crash recovery with recorded
252
+ children remains conservative because process-tree exit cannot be proved from a
253
+ PID alone. A crash between spawning a child and saving its identity also remains
254
+ protected until a proven reboot or controlled recovery.
255
+
256
+ Version-1 lock files from 1.6.191 lack boot and child evidence. They require a
257
+ one-time quiescent recovery if the old process did not shut down cleanly; the CLI
258
+ never steals them based only on PID or age. Upgrade the local CLI to activate
259
+ these changes; updating Router alone is insufficient.
260
+
261
+ From CLI 1.6.191 on Linux, newly created managed Git worktrees are disposable
262
+ execution storage. After confirmed native process-group exit, successful delivered output and failed
263
+ no-change output can release the entire checkout, including ignored dependencies
264
+ and temporary extras. Captured failed changes are retained as immutable Git
265
+ artifacts for recovery without merging; explicit retention also permits checkout
266
+ cleanup. Native conversation pointers, artifact records and private Git refs stay
267
+ available. The next task recreates the same lane path from fresh delivery input.
268
+ Pending successful changes wait for apply or retain. Uncertain process exit,
269
+ uncaptured source edits, incomplete deliverables, unsafe paths and unresolved
270
+ parent-application recovery remain explicit holds. Unknown legacy records do not
271
+ silently inherit the disposable policy. Reusing a pre-upgrade checkout also
272
+ keeps its original policy and ignored files; adoption requires strict reclamation
273
+ and creation of a fresh checkout, or explicit offline historical disposal.
274
+ On macOS and Windows, ordinary delegation keeps the existing conservative
275
+ checkout policy; the new whole-checkout disposal is not enabled. Linux delegated
276
+ workers use isolated process groups, including Codex, Claude and Pi. Group
277
+ confirmation remains separate from transport exit and holds the checkout on
278
+ uncertain identity, inventory or termination. Kernel-visible unreaped zombies
279
+ also hold cleanup until the group disappears; an empty process snapshot alone
280
+ is never sufficient. It covers members of that group;
281
+ background processes that escape using `setsid` or `setpgid` are not covered and
282
+ must not write into disposable worker checkouts.
283
+
284
+ Cleanup uses durable intent and receipt records. Failed removals are retried on
285
+ startup and while idle; cleanup failure does not undo integration or turn a
286
+ successful task into a failed task. Failed/retained receipts support reconstruction
287
+ as well as deletion. Required reports and images must be captured or durably
288
+ exported before cleanup; merely returning a path in the temporary checkout does
289
+ not deliver the file. Declare required relative file paths in the delegation
290
+ tool's optional `exports` array (up to 16 files, 16 MiB each, 64 MiB total).
291
+ Artifact inspection returns verified durable local file locations. Missing or
292
+ changed exports hold cleanup instead of silently dropping the deliverable.
293
+ Unsupported transformed or nested checkouts remain held.
294
+
295
+ One owner coordinates mutable local delegation storage. Lane admission excludes
296
+ cleanup, and cooperating CLI processes serialize shared Git metadata operations
297
+ by canonical Git common directory. Independent workers still run concurrently.
298
+ Unmanaged writers and old CLI versions do not participate in this ownership
299
+ protocol. A stale owner or uncertain child exit requires a confirmed quiescent
300
+ maintenance handoff; age or a missing parent PID alone never authorizes deletion.
301
+ Historical disposal is an explicit offline operation, not an automatic upgrade
302
+ sweep. It preserves parent projects, existing artifact refs and native sessions.
303
+
304
+ Inspect locally with `remote-cli delegation storage scan`. Freeze a cleanup plan
305
+ with `remote-cli delegation storage plan --out ./discard-plan.json`. After
306
+ stopping the daemon, supervisors and all native workers, run
307
+ `remote-cli delegation storage discard --plan ./discard-plan.json --discard-contents --confirm-workers-stopped`
308
+ from an independent terminal. This permanently discards checkout contents,
309
+ including unsubmitted and ignored files. The command never stops or restarts a
310
+ service. Retained session records receive scheduler exclusion markers so a
311
+ removed historical checkout is not resumed automatically. This explicit discard
312
+ can lose uncaptured state even for a lane labelled ready; it preserves native
313
+ history, not automatic continuation. Ordinary new-policy reclamation still
314
+ recreates the same lane and preserves continuation.
315
+
316
+ The inventory includes integration scratch and its receipts. Registered scratch
317
+ with matching ownership evidence can enter the explicit frozen discard plan;
318
+ unknown, conflicting-identity or unregistered directories stay listed with their
319
+ exclusion reasons. Discarding scratch leaves its originating lane and native
320
+ session unchanged. Conflict scratch is never deleted automatically. Completed discard
321
+ markers bound to the original task and workspace retire unavailable checkout
322
+ obligations without claiming successful delivery. Older, unbound or pending
323
+ markers remain conservative. Incomplete inventories warn about unseen records;
324
+ known pending tasks still require closeout and incomplete scans never authorize
325
+ automatic deletion.
326
+
327
+ The scan defaults to 100,000 entries, 1 GiB of hashed content and 120 seconds;
328
+ use `--max-entries`, `--max-bytes` and `--max-seconds` to increase explicit budgets.
329
+ An incomplete inventory cannot authorize deletion. Local output contains paths
330
+ and identities and should not be forwarded to chat. Offline deletion currently
331
+ requires Linux mount inspection; unsupported platforms refuse deletion. Ownership
332
+ uncertainty, stale locks and ambiguous partial removal require manual quiescent
333
+ recovery. Neither this command nor automatic cleanup prunes Git objects or refs.
334
+
335
+ This lifecycle requires a local CLI upgrade. Router messages and the protocol
336
+ remain unchanged; older CLIs keep their existing lifecycle with a newer Router.
230
337
  The upgraded CLI also recognizes successful worker snapshot commits already in
231
338
  delivery HEAD's ancestry. A later revert does not reopen historical delivery.
232
339
  Inspection, ready-lane admission, and idle closure reconcile only that thread's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yu_robotics/remote-cli-router",
3
- "version": "1.6.190",
3
+ "version": "1.6.193",
4
4
  "description": "Router server for remote CLI - message forwarding between Feishu and local clients",
5
5
  "main": "dist/cli.js",
6
6
  "types": "dist/cli.d.ts",