@yu_robotics/remote-cli 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 (110) hide show
  1. package/README.md +117 -14
  2. package/dist/client/MessageHandler.d.ts.map +1 -1
  3. package/dist/client/MessageHandler.js +2 -1
  4. package/dist/client/MessageHandler.js.map +1 -1
  5. package/dist/commands/delegationStorage.d.ts +15 -0
  6. package/dist/commands/delegationStorage.d.ts.map +1 -0
  7. package/dist/commands/delegationStorage.js +59 -0
  8. package/dist/commands/delegationStorage.js.map +1 -0
  9. package/dist/commands/start.d.ts +2 -0
  10. package/dist/commands/start.d.ts.map +1 -1
  11. package/dist/commands/start.js +42 -18
  12. package/dist/commands/start.js.map +1 -1
  13. package/dist/delegation/DelegatedWorkerSessionStore.d.ts +6 -0
  14. package/dist/delegation/DelegatedWorkerSessionStore.d.ts.map +1 -1
  15. package/dist/delegation/DelegatedWorkerSessionStore.js +25 -2
  16. package/dist/delegation/DelegatedWorkerSessionStore.js.map +1 -1
  17. package/dist/delegation/DelegatedWorkspaceManager.d.ts +119 -2
  18. package/dist/delegation/DelegatedWorkspaceManager.d.ts.map +1 -1
  19. package/dist/delegation/DelegatedWorkspaceManager.js +551 -65
  20. package/dist/delegation/DelegatedWorkspaceManager.js.map +1 -1
  21. package/dist/delegation/DelegationManager.d.ts +20 -0
  22. package/dist/delegation/DelegationManager.d.ts.map +1 -1
  23. package/dist/delegation/DelegationManager.js +267 -41
  24. package/dist/delegation/DelegationManager.js.map +1 -1
  25. package/dist/delegation/DelegationOwnership.d.ts +33 -0
  26. package/dist/delegation/DelegationOwnership.d.ts.map +1 -0
  27. package/dist/delegation/DelegationOwnership.js +397 -0
  28. package/dist/delegation/DelegationOwnership.js.map +1 -0
  29. package/dist/delegation/GitCheckpoint.d.ts.map +1 -1
  30. package/dist/delegation/GitCheckpoint.js +14 -5
  31. package/dist/delegation/GitCheckpoint.js.map +1 -1
  32. package/dist/delegation/LegacyWorkspaceCleanup.d.ts +100 -0
  33. package/dist/delegation/LegacyWorkspaceCleanup.d.ts.map +1 -0
  34. package/dist/delegation/LegacyWorkspaceCleanup.js +864 -0
  35. package/dist/delegation/LegacyWorkspaceCleanup.js.map +1 -0
  36. package/dist/delegation/OwnershipRuntime.d.ts +50 -0
  37. package/dist/delegation/OwnershipRuntime.d.ts.map +1 -0
  38. package/dist/delegation/OwnershipRuntime.js +411 -0
  39. package/dist/delegation/OwnershipRuntime.js.map +1 -0
  40. package/dist/delegation/WorkspaceDisposal.d.ts +23 -0
  41. package/dist/delegation/WorkspaceDisposal.d.ts.map +1 -0
  42. package/dist/delegation/WorkspaceDisposal.js +212 -0
  43. package/dist/delegation/WorkspaceDisposal.js.map +1 -0
  44. package/dist/delegation/contract.d.ts +1 -1
  45. package/dist/delegation/contract.d.ts.map +1 -1
  46. package/dist/delegation/contract.js +2 -1
  47. package/dist/delegation/contract.js.map +1 -1
  48. package/dist/executor/AcpExecutor.d.ts +2 -0
  49. package/dist/executor/AcpExecutor.d.ts.map +1 -1
  50. package/dist/executor/AcpExecutor.js +14 -1
  51. package/dist/executor/AcpExecutor.js.map +1 -1
  52. package/dist/executor/AgyExecutor.d.ts +2 -0
  53. package/dist/executor/AgyExecutor.d.ts.map +1 -1
  54. package/dist/executor/AgyExecutor.js +11 -1
  55. package/dist/executor/AgyExecutor.js.map +1 -1
  56. package/dist/executor/ClaudePersistentExecutor.d.ts +2 -0
  57. package/dist/executor/ClaudePersistentExecutor.d.ts.map +1 -1
  58. package/dist/executor/ClaudePersistentExecutor.js +13 -3
  59. package/dist/executor/ClaudePersistentExecutor.js.map +1 -1
  60. package/dist/executor/CodexAppServerClient.d.ts +4 -0
  61. package/dist/executor/CodexAppServerClient.d.ts.map +1 -1
  62. package/dist/executor/CodexAppServerClient.js +15 -3
  63. package/dist/executor/CodexAppServerClient.js.map +1 -1
  64. package/dist/executor/CodexAppServerExecutor.d.ts +2 -0
  65. package/dist/executor/CodexAppServerExecutor.d.ts.map +1 -1
  66. package/dist/executor/CodexAppServerExecutor.js +7 -0
  67. package/dist/executor/CodexAppServerExecutor.js.map +1 -1
  68. package/dist/executor/DshExecutor.d.ts.map +1 -1
  69. package/dist/executor/DshExecutor.js +2 -1
  70. package/dist/executor/DshExecutor.js.map +1 -1
  71. package/dist/executor/IExecutor.d.ts +5 -1
  72. package/dist/executor/IExecutor.d.ts.map +1 -1
  73. package/dist/executor/ManagedProcessGroups.d.ts +30 -0
  74. package/dist/executor/ManagedProcessGroups.d.ts.map +1 -0
  75. package/dist/executor/ManagedProcessGroups.js +144 -0
  76. package/dist/executor/ManagedProcessGroups.js.map +1 -0
  77. package/dist/executor/PiExecutor.d.ts +2 -0
  78. package/dist/executor/PiExecutor.d.ts.map +1 -1
  79. package/dist/executor/PiExecutor.js +15 -0
  80. package/dist/executor/PiExecutor.js.map +1 -1
  81. package/dist/executor/ZCodeExecutor.d.ts.map +1 -1
  82. package/dist/executor/ZCodeExecutor.js +1 -0
  83. package/dist/executor/ZCodeExecutor.js.map +1 -1
  84. package/dist/executor/acp/AcpClient.d.ts +5 -0
  85. package/dist/executor/acp/AcpClient.d.ts.map +1 -1
  86. package/dist/executor/acp/AcpClient.js +13 -2
  87. package/dist/executor/acp/AcpClient.js.map +1 -1
  88. package/dist/executor/dsh/DshAcpClient.d.ts +1 -1
  89. package/dist/executor/dsh/DshAcpClient.d.ts.map +1 -1
  90. package/dist/executor/dsh/DshAcpClient.js +2 -2
  91. package/dist/executor/dsh/DshAcpClient.js.map +1 -1
  92. package/dist/executor/pi/PiClient.d.ts +2 -0
  93. package/dist/executor/pi/PiClient.d.ts.map +1 -1
  94. package/dist/executor/pi/PiClient.js +12 -2
  95. package/dist/executor/pi/PiClient.js.map +1 -1
  96. package/dist/executor/pi/PiTypes.d.ts +1 -0
  97. package/dist/executor/pi/PiTypes.d.ts.map +1 -1
  98. package/dist/executor/pi/PiTypes.js.map +1 -1
  99. package/dist/executor/zcode/ZCodeClient.d.ts +4 -0
  100. package/dist/executor/zcode/ZCodeClient.d.ts.map +1 -1
  101. package/dist/executor/zcode/ZCodeClient.js +13 -2
  102. package/dist/executor/zcode/ZCodeClient.js.map +1 -1
  103. package/dist/index.js +13 -5
  104. package/dist/index.js.map +1 -1
  105. package/dist/maintenance/release-notes.json +1 -1
  106. package/dist/utils/ProcessShutdown.d.ts +25 -0
  107. package/dist/utils/ProcessShutdown.d.ts.map +1 -0
  108. package/dist/utils/ProcessShutdown.js +54 -0
  109. package/dist/utils/ProcessShutdown.js.map +1 -0
  110. package/package.json +5 -4
package/README.md CHANGED
@@ -395,6 +395,8 @@ no late worker is launched. Failed collection after confirmed exit preserves onl
395
395
  the affected lane and files for recovery rather than quarantining the source.
396
396
  Individual Git command deadlines remain; cancellation may wait for Git to settle.
397
397
  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.
398
+
399
+ 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.
398
400
  Slow launch/cancel tools return the accepted task ID and a pending status before
399
401
  the adapter timeout; poll that ID with `remote_cli_result`, not a new delegation.
400
402
  The response does not claim cancellation cleanup or workspace release is complete.
@@ -402,18 +404,117 @@ Checkpoints reject `assume-unchanged` and `skip-worktree` entries rather than
402
404
  omitting hidden edits or treating missing sparse files as deletions. Resolve those
403
405
  flags and sparse checkouts explicitly; the source index is never modified.
404
406
 
405
- From CLI 1.6.135, verified successful no-change checkouts and successfully applied
406
- worker outputs reclaim their checkout directories automatically, while retaining
407
- native conversation pointers, stable lane paths, artifact records, and private Git
408
- refs. Subsequent tasks recreate the same path on fresh delivery input. Unknown,
409
- ignored, dirty, locked, failed/cancelled, pending, retained, or partially recovered
410
- workspaces stay on disk; cleanup failure does not change task success. Exact-byte
411
- verification may retain transformed checkouts. Missing legacy paths are not
412
- treated as reclamation receipts. There is no historical sweep, force deletion,
413
- or repository pruning. External writers must not share managed worker checkouts.
414
- Failed checkout preparation isolates a reused Git lane without deleting its native
415
- context; other lanes remain available. Full byte audits do not hold the shared
416
- repository metadata guard.
407
+ CLI 1.6.192 fixes a CommonJS runtime error introduced in 1.6.191 that prevented
408
+ delegation backend discovery and task admission. Upgrade the local CLI to apply
409
+ the fix. Router-only upgrades do not repair the installed CLI. Artifact export
410
+ validation and canonical storage-path checks retain their existing behavior.
411
+ On Linux and macOS, SIGTERM and SIGINT await client and worker teardown before process exit,
412
+ including during startup. Verified normal shutdown releases the delegation storage
413
+ owner before restart; failed or unconfirmed worker teardown retains recovery state
414
+ and exits unsuccessfully.
415
+
416
+ Ownership now uses a native OS lock held on a stable `.ownership.guard` file,
417
+ plus checksummed owner identity and a durable `.ownership.children` process
418
+ journal. Completed history is compacted atomically; unresolved launches remain
419
+ recorded, and failed lock releases can be retried without restarting. The
420
+ empty guard file intentionally remains after release: its existence does not
421
+ mean the storage is busy. Never remove or rename it while a CLI may be running.
422
+ Native binaries are bundled for supported Linux, macOS and Windows architectures;
423
+ unsupported native-lock platforms fail explicitly rather than falling back to an
424
+ age-based lock. Use local filesystems; shared/network storage is not supported.
425
+
426
+ A crashed idle owner can be recovered automatically. On the same host after a
427
+ reboot, old process evidence no longer blocks acquisition. On the same boot,
428
+ recovery validates PID/start identity and checks each recorded POSIX process
429
+ group with the kernel; surviving children, unknown launches, foreign hosts/PID
430
+ namespaces and incomplete journals remain protected. No process is killed by
431
+ recovery, and no worktree, artifact or conversation is deleted just to regain
432
+ ownership. Recovery does not authorize workspace disposal; existing artifact
433
+ and checkout checks still apply. Groups escaped via `setsid`/`setpgid` are outside
434
+ the existing managed-process-group guarantee. Windows crash recovery with recorded
435
+ children remains conservative because process-tree exit cannot be proved from a
436
+ PID alone. A crash between spawning a child and saving its identity also remains
437
+ protected until a proven reboot or controlled recovery.
438
+
439
+ Version-1 lock files from 1.6.191 lack boot and child evidence. They require a
440
+ one-time quiescent recovery if the old process did not shut down cleanly; the CLI
441
+ never steals them based only on PID or age. Upgrade the local CLI to activate
442
+ these changes; updating Router alone is insufficient.
443
+
444
+ From CLI 1.6.191 on Linux, newly created managed Git worktrees are disposable
445
+ execution storage. After confirmed native process-group exit, successful delivered output and failed
446
+ no-change output can release the entire checkout, including ignored dependencies
447
+ and temporary extras. Captured failed changes are retained as immutable Git
448
+ artifacts for recovery without merging; explicit retention also permits checkout
449
+ cleanup. Native conversation pointers, artifact records and private Git refs stay
450
+ available. The next task recreates the same lane path from fresh delivery input.
451
+ Pending successful changes wait for apply or retain. Uncertain process exit,
452
+ uncaptured source edits, incomplete deliverables, unsafe paths and unresolved
453
+ parent-application recovery remain explicit holds. Unknown legacy records do not
454
+ silently inherit the disposable policy. Reusing a pre-upgrade checkout also
455
+ keeps its original policy and ignored files; adoption requires strict reclamation
456
+ and creation of a fresh checkout, or explicit offline historical disposal.
457
+ On macOS and Windows, ordinary delegation keeps the existing conservative
458
+ checkout policy; the new whole-checkout disposal is not enabled. Linux delegated
459
+ workers use isolated process groups, including Codex, Claude and Pi. Group
460
+ confirmation remains separate from transport exit and holds the checkout on
461
+ uncertain identity, inventory or termination. Kernel-visible unreaped zombies
462
+ also hold cleanup until the group disappears; an empty process snapshot alone
463
+ is never sufficient. It covers members of that group;
464
+ background processes that escape using `setsid` or `setpgid` are not covered and
465
+ must not write into disposable worker checkouts.
466
+
467
+ Cleanup uses durable intent and receipt records. Failed removals are retried on
468
+ startup and while idle; cleanup failure does not undo integration or turn a
469
+ successful task into a failed task. Failed/retained receipts support reconstruction
470
+ as well as deletion. Required reports and images must be captured or durably
471
+ exported before cleanup; merely returning a path in the temporary checkout does
472
+ not deliver the file. Declare required relative file paths in the delegation
473
+ tool's optional `exports` array (up to 16 files, 16 MiB each, 64 MiB total).
474
+ Artifact inspection returns verified durable local file locations. Missing or
475
+ changed exports hold cleanup instead of silently dropping the deliverable.
476
+ Unsupported transformed or nested checkouts remain held.
477
+
478
+ One owner coordinates mutable local delegation storage. Lane admission excludes
479
+ cleanup, and cooperating CLI processes serialize shared Git metadata operations
480
+ by canonical Git common directory. Independent workers still run concurrently.
481
+ Unmanaged writers and old CLI versions do not participate in this ownership
482
+ protocol. A stale owner or uncertain child exit requires a confirmed quiescent
483
+ maintenance handoff; age or a missing parent PID alone never authorizes deletion.
484
+ Historical disposal is an explicit offline operation, not an automatic upgrade
485
+ sweep. It preserves parent projects, existing artifact refs and native sessions.
486
+
487
+ Inspect locally with `remote-cli delegation storage scan`. Freeze a cleanup plan
488
+ with `remote-cli delegation storage plan --out ./discard-plan.json`. After
489
+ stopping the daemon, supervisors and all native workers, run
490
+ `remote-cli delegation storage discard --plan ./discard-plan.json --discard-contents --confirm-workers-stopped`
491
+ from an independent terminal. This permanently discards checkout contents,
492
+ including unsubmitted and ignored files. The command never stops or restarts a
493
+ service. Retained session records receive scheduler exclusion markers so a
494
+ removed historical checkout is not resumed automatically. This explicit discard
495
+ can lose uncaptured state even for a lane labelled ready; it preserves native
496
+ history, not automatic continuation. Ordinary new-policy reclamation still
497
+ recreates the same lane and preserves continuation.
498
+
499
+ The inventory includes integration scratch and its receipts. Registered scratch
500
+ with matching ownership evidence can enter the explicit frozen discard plan;
501
+ unknown, conflicting-identity or unregistered directories stay listed with their
502
+ exclusion reasons. Discarding scratch leaves its originating lane and native
503
+ session unchanged. Conflict scratch is never deleted automatically. Completed discard
504
+ markers bound to the original task and workspace retire unavailable checkout
505
+ obligations without claiming successful delivery. Older, unbound or pending
506
+ markers remain conservative. Incomplete inventories warn about unseen records;
507
+ known pending tasks still require closeout and incomplete scans never authorize
508
+ automatic deletion.
509
+
510
+ The scan defaults to 100,000 entries, 1 GiB of hashed content and 120 seconds;
511
+ use `--max-entries`, `--max-bytes` and `--max-seconds` to increase explicit budgets.
512
+ An incomplete inventory cannot authorize deletion. Local output contains paths
513
+ and identities and should not be forwarded to chat. Offline deletion currently
514
+ requires Linux mount inspection; unsupported platforms refuse deletion. Ownership
515
+ uncertainty, stale locks and ambiguous partial removal require manual quiescent
516
+ recovery. Neither this command nor automatic cleanup prunes Git objects or refs.
517
+
417
518
  Successful pending outputs are also historically delivered when their recorded
418
519
  snapshot commit is an ancestor of delivery HEAD; later reverts do not reopen the
419
520
  receipt. Inspection, ready-lane admission, and idle turn closure recognize this
@@ -422,14 +523,16 @@ the same safe reclamation. Explicit retention and unknown recovery state remain
422
523
  preserved. Copies, cherry-picks, squash merges, and tree equality are not ancestry;
423
524
  explicit patch-only apply stays supported without staging or committing.
424
525
  From CLI 1.6.136, a code-enforced final check reads validated durable artifacts
425
- for Git workers started in the current request. No-change, applied, and explicitly
526
+ for current Git workers and durable unresolved artifacts from the matching thread
527
+ and workspace generation. No-change, applied, and explicitly
426
528
  retained outcomes pass; unread results and unresolved artifacts are separate checks.
427
529
  Pending, missing, invalid, or unretained recovery state gets at most two extra
428
530
  coordinator closeout rounds without replaying the request or attachments. New
429
531
  workers do not reset that budget. Remaining issues fail the final response with
430
532
  task IDs and available output commits, pause queued execution, and preserve artifacts.
431
533
  Coordinator errors, abort, and shutdown do not start more closeout rounds. This
432
- does not guarantee functional correctness, delete retained files, or replay old tasks.
534
+ does not guarantee functional correctness or replay old tasks. Retained artifacts
535
+ survive disposable checkout removal.
433
536
  The local CLI owns this lifecycle; native backends, non-Git FIFO scheduling,
434
537
  Router protocol, and old-peer compatibility are unchanged.
435
538
 
@@ -1 +1 @@
1
- {"version":3,"file":"MessageHandler.d.ts","sourceRoot":"","sources":["../../src/client/MessageHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAA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AC,QAAQ,CAAC,wBAAwB,CAG7C;YAEW,eAAe;IAgC7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;;;;;;;;;;;;OAaG;YACW,mBAAmB;IAgEjC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IA0E/B;;OAEG;YACW,cAAc;YAqYd,sBAAsB;IAoBpC,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,sBAAsB;IAuB9B,iFAAiF;IACjF,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,sBAAsB;IAyB9B,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,YAAY;IAsDpB,OAAO,CAAC,qBAAqB;IAI7B,8EAA8E;YAChE,sBAAsB;IAgBpC,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;CAuB/B"}
@@ -2251,7 +2251,8 @@ You can also use natural language commands to control Claude Code CLI.`,
2251
2251
  if (delegationScope.isClosed() || this.isDestroyed || this.abortOperations.has(threadId)) {
2252
2252
  throw new Error('Delegation was cancelled before the coordinator started');
2253
2253
  }
2254
- content = `${contract_1.DELEGATION_INSTRUCTIONS}\n\nUser request:\n${content}`;
2254
+ const pendingArtifacts = await this.delegation.pendingArtifactContext(thread, executor.getCurrentWorkingDirectory());
2255
+ content = `${contract_1.DELEGATION_INSTRUCTIONS}${pendingArtifacts ? `\n\n${pendingArtifacts}` : ''}\n\nUser request:\n${content}`;
2255
2256
  }
2256
2257
  else if (thread?.delegationBackends?.includes(this.threadPool.getBackendKey(threadId)) && executor.configureDelegation) {
2257
2258
  await executor.configureDelegation(undefined);