@yu_robotics/remote-cli 1.6.216 → 1.6.219

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 (124) hide show
  1. package/README.md +6 -1
  2. package/dist/delegation/AgySessionDeletion.d.ts +50 -0
  3. package/dist/delegation/AgySessionDeletion.d.ts.map +1 -0
  4. package/dist/delegation/AgySessionDeletion.js +340 -0
  5. package/dist/delegation/AgySessionDeletion.js.map +1 -0
  6. package/dist/delegation/DelegatedWorkerSessionStore.js +1 -2
  7. package/dist/delegation/DelegatedWorkerSessionStore.js.map +1 -1
  8. package/dist/delegation/DelegationManager.d.ts.map +1 -1
  9. package/dist/delegation/DelegationManager.js +36 -5
  10. package/dist/delegation/DelegationManager.js.map +1 -1
  11. package/dist/delegation/DshManagedHistory.d.ts +14 -0
  12. package/dist/delegation/DshManagedHistory.d.ts.map +1 -0
  13. package/dist/delegation/DshManagedHistory.js +106 -0
  14. package/dist/delegation/DshManagedHistory.js.map +1 -0
  15. package/dist/delegation/DshSessionDeletion.d.ts +57 -0
  16. package/dist/delegation/DshSessionDeletion.d.ts.map +1 -0
  17. package/dist/delegation/DshSessionDeletion.js +314 -0
  18. package/dist/delegation/DshSessionDeletion.js.map +1 -0
  19. package/dist/delegation/HistoryAnchor.d.ts +23 -0
  20. package/dist/delegation/HistoryAnchor.d.ts.map +1 -0
  21. package/dist/delegation/HistoryAnchor.js +127 -0
  22. package/dist/delegation/HistoryAnchor.js.map +1 -0
  23. package/dist/delegation/KimiSessionDeletion.d.ts.map +1 -1
  24. package/dist/delegation/KimiSessionDeletion.js +2 -1
  25. package/dist/delegation/KimiSessionDeletion.js.map +1 -1
  26. package/dist/delegation/NativeHistoryFiles.d.ts.map +1 -1
  27. package/dist/delegation/NativeHistoryFiles.js +4 -3
  28. package/dist/delegation/NativeHistoryFiles.js.map +1 -1
  29. package/dist/delegation/NativeHistoryRead.d.ts +7 -0
  30. package/dist/delegation/NativeHistoryRead.d.ts.map +1 -0
  31. package/dist/delegation/NativeHistoryRead.js +71 -0
  32. package/dist/delegation/NativeHistoryRead.js.map +1 -0
  33. package/dist/delegation/NativeSessionDeletion.d.ts +10 -2
  34. package/dist/delegation/NativeSessionDeletion.d.ts.map +1 -1
  35. package/dist/delegation/NativeSessionDeletion.js +36 -3
  36. package/dist/delegation/NativeSessionDeletion.js.map +1 -1
  37. package/dist/delegation/OpenCodeSessionDeletion.d.ts +55 -0
  38. package/dist/delegation/OpenCodeSessionDeletion.d.ts.map +1 -0
  39. package/dist/delegation/OpenCodeSessionDeletion.js +288 -0
  40. package/dist/delegation/OpenCodeSessionDeletion.js.map +1 -0
  41. package/dist/delegation/OwnershipRuntime.d.ts +3 -1
  42. package/dist/delegation/OwnershipRuntime.d.ts.map +1 -1
  43. package/dist/delegation/OwnershipRuntime.js +8 -0
  44. package/dist/delegation/OwnershipRuntime.js.map +1 -1
  45. package/dist/delegation/ZCodeOwnedHistory.d.ts +53 -0
  46. package/dist/delegation/ZCodeOwnedHistory.d.ts.map +1 -0
  47. package/dist/delegation/ZCodeOwnedHistory.js +763 -0
  48. package/dist/delegation/ZCodeOwnedHistory.js.map +1 -0
  49. package/dist/delegation/ZCodeSessionDeletion.d.ts +70 -0
  50. package/dist/delegation/ZCodeSessionDeletion.d.ts.map +1 -0
  51. package/dist/delegation/ZCodeSessionDeletion.js +164 -0
  52. package/dist/delegation/ZCodeSessionDeletion.js.map +1 -0
  53. package/dist/executor/AcpExecutor.d.ts +11 -0
  54. package/dist/executor/AcpExecutor.d.ts.map +1 -1
  55. package/dist/executor/AcpExecutor.js +27 -13
  56. package/dist/executor/AcpExecutor.js.map +1 -1
  57. package/dist/executor/AgyExecutor.d.ts +15 -1
  58. package/dist/executor/AgyExecutor.d.ts.map +1 -1
  59. package/dist/executor/AgyExecutor.js +130 -11
  60. package/dist/executor/AgyExecutor.js.map +1 -1
  61. package/dist/executor/ClaudePersistentExecutor.d.ts.map +1 -1
  62. package/dist/executor/ClaudePersistentExecutor.js +2 -1
  63. package/dist/executor/ClaudePersistentExecutor.js.map +1 -1
  64. package/dist/executor/CodexAppServerClient.d.ts.map +1 -1
  65. package/dist/executor/CodexAppServerClient.js +2 -1
  66. package/dist/executor/CodexAppServerClient.js.map +1 -1
  67. package/dist/executor/DshExecutor.d.ts +2 -0
  68. package/dist/executor/DshExecutor.d.ts.map +1 -1
  69. package/dist/executor/DshExecutor.js +10 -1
  70. package/dist/executor/DshExecutor.js.map +1 -1
  71. package/dist/executor/ManagedProcessGroups.d.ts +10 -1
  72. package/dist/executor/ManagedProcessGroups.d.ts.map +1 -1
  73. package/dist/executor/ManagedProcessGroups.js +40 -9
  74. package/dist/executor/ManagedProcessGroups.js.map +1 -1
  75. package/dist/executor/ManagedSpawn.d.ts +12 -0
  76. package/dist/executor/ManagedSpawn.d.ts.map +1 -0
  77. package/dist/executor/ManagedSpawn.js +143 -0
  78. package/dist/executor/ManagedSpawn.js.map +1 -0
  79. package/dist/executor/OpenCodeExecutor.d.ts.map +1 -1
  80. package/dist/executor/OpenCodeExecutor.js +8 -0
  81. package/dist/executor/OpenCodeExecutor.js.map +1 -1
  82. package/dist/executor/ZCodeExecutor.d.ts +9 -2
  83. package/dist/executor/ZCodeExecutor.d.ts.map +1 -1
  84. package/dist/executor/ZCodeExecutor.js +150 -7
  85. package/dist/executor/ZCodeExecutor.js.map +1 -1
  86. package/dist/executor/acp/AcpClient.d.ts.map +1 -1
  87. package/dist/executor/acp/AcpClient.js +3 -3
  88. package/dist/executor/acp/AcpClient.js.map +1 -1
  89. package/dist/executor/dsh/DshAcpClient.d.ts +1 -1
  90. package/dist/executor/dsh/DshAcpClient.d.ts.map +1 -1
  91. package/dist/executor/dsh/DshAcpClient.js +4 -2
  92. package/dist/executor/dsh/DshAcpClient.js.map +1 -1
  93. package/dist/executor/dsh/DshPrivacy.d.ts +1 -1
  94. package/dist/executor/dsh/DshPrivacy.d.ts.map +1 -1
  95. package/dist/executor/dsh/DshPrivacy.js +2 -2
  96. package/dist/executor/dsh/DshPrivacy.js.map +1 -1
  97. package/dist/executor/pi/PiClient.d.ts.map +1 -1
  98. package/dist/executor/pi/PiClient.js +2 -2
  99. package/dist/executor/pi/PiClient.js.map +1 -1
  100. package/dist/executor/zcode/ZCodeClient.d.ts +4 -0
  101. package/dist/executor/zcode/ZCodeClient.d.ts.map +1 -1
  102. package/dist/executor/zcode/ZCodeClient.js +25 -6
  103. package/dist/executor/zcode/ZCodeClient.js.map +1 -1
  104. package/dist/executor/zcode/ZCodeStorageSelection.d.ts +13 -0
  105. package/dist/executor/zcode/ZCodeStorageSelection.d.ts.map +1 -0
  106. package/dist/executor/zcode/ZCodeStorageSelection.js +86 -0
  107. package/dist/executor/zcode/ZCodeStorageSelection.js.map +1 -0
  108. package/dist/maintenance/release-notes.json +1 -1
  109. package/dist/native/NativeBindings.d.ts +43 -0
  110. package/dist/native/NativeBindings.d.ts.map +1 -0
  111. package/dist/native/NativeBindings.js +44 -0
  112. package/dist/native/NativeBindings.js.map +1 -0
  113. package/native/managed-worker.cjs +59 -0
  114. package/native/prebuilds/darwin-arm64/managed_native.node +0 -0
  115. package/native/prebuilds/darwin-arm64/manifest.json +1 -0
  116. package/native/prebuilds/darwin-x64/managed_native.node +0 -0
  117. package/native/prebuilds/darwin-x64/manifest.json +1 -0
  118. package/native/prebuilds/linux-x64/managed_native.node +0 -0
  119. package/native/prebuilds/linux-x64/manifest.json +1 -0
  120. package/native/prebuilds/win32-arm64/managed_native.node +0 -0
  121. package/native/prebuilds/win32-arm64/manifest.json +1 -0
  122. package/native/prebuilds/win32-x64/managed_native.node +0 -0
  123. package/native/prebuilds/win32-x64/manifest.json +1 -0
  124. package/package.json +7 -4
package/README.md CHANGED
@@ -164,7 +164,10 @@ From CLI 1.6.119, Linux and macOS startup append deterministic backend installat
164
164
 
165
165
  From CLI 1.6.211, `/clear` and `/new` request permanent deletion of managed worker native sessions from the previous parent conversation. Worker context reuse remains available until that reset. Cleanup waits for confirmed worker shutdown and never substitutes archiving. From CLI 1.6.212, the Linux cleanup queue also supports newly recorded Kimi, Claude, and Pi sessions with the audited version-3 JSONL format. Kimi uses its native ACP deletion capability; Claude and Pi remove exact owned history paths using durable deletion manifests and verified directory descriptors; Linux procfs must be available. Parent-directory replacement cannot redirect those deletion operations. This is not an OS sandbox, and leaf identity checks and deletion are not atomic against another process running as the same user. New managed Pi lanes use separate session directories. From CLI 1.6.214, Codex cleanup checks the native list/read/delete protocol and returned metadata instead of requiring one CLI version. Compatible releases retain the same ownership, confirmed-exit, and no-native-descendants checks; unavailable methods and incompatible responses leave cleanup pending. Saved cleanup receipts remain usable after an upgrade. From CLI 1.6.215, Kimi cleanup checks ACP protocol and deletion capabilities, while Claude cleanup validates the owned history layout and session identity instead of requiring an exact installed backend version. Unsupported protocols or history formats remain held; existing deletion receipts remain immutable and retryable. From CLI 1.6.216, provably unrelated non-native Codex pointer IDs no longer block eligible worker cleanup, and failures identify a bounded validation stage. Ambiguous records and references to the target still prevent deletion; unrelated pointer files are preserved.
166
166
 
167
- Only sessions with recorded creation ownership and confirmed process-group exit are eligible. Adopted or pre-upgrade histories without receipts, conflicting identities, changed storage roots, unsupported protocols/layouts, and oversized manifests remain held or unsupported. Deletion failures retain their recovery state. The other four backends and non-Linux exit confirmation remain unsupported. Pi compatibility is based on its version-3 JSONL session format, not a native Pi installation version check. The adapters have synthetic fixture coverage. Codex 0.165.0 list/read/delete and exact missing-target retries were also checked with synthetic histories in an isolated native home, without model calls or real user histories. Other native backend deletion and macOS/Windows acceptance remain unverified. Task results, code artifacts, exports, and recovery records are retained. Cleanup removes resumable native history; it does not promise forensic erasure of shared diagnostic logs or caches. This is local CLI behavior; updating only the Router does not enable it.
167
+ Only sessions with recorded creation ownership and confirmed process-group exit are eligible. Adopted or pre-upgrade histories without receipts, conflicting identities, changed storage roots, unsupported protocols/layouts, and oversized manifests remain held or unsupported. Deletion failures retain their recovery state. OpenCode, AGY, DSH, and ZCode managed-history adapters are available from CLI 1.6.217. Pi compatibility is based on its version-3 JSONL session format, not a native Pi installation version check. The adapters have synthetic fixture coverage. Codex 0.165.0 list/read/delete and exact missing-target retries were also checked with synthetic histories in an isolated native home, without model calls or real user histories. Authenticated native-backend acceptance on macOS/Windows remains separate from fixture validation. Task results, code artifacts, exports, and recovery records are retained. Cleanup removes resumable native history; it does not promise forensic erasure of shared diagnostic logs or caches. This is local CLI behavior; updating only the Router does not enable it.
168
+
169
+ From CLI 1.6.219, managed child-session cleanup uses bundled Node-API helpers on Windows and macOS. Windows starts the backend only after a private Job admits its launcher, and deletion waits for the retained Job to report zero processes. macOS verifies the managed process group with native process identities and kernel absence checks. History deletion and artifact reads use held directory/file handles instead of re-resolving absolute paths. The package includes x64/arm64 helpers for Windows/macOS; installation does not compile or download them. Native Windows arm64 requires Node.js 22 or newer; other bundled targets retain Node.js 18 compatibility. Building helpers from source uses Node.js 24 and the platform C toolchain. Missing helpers, incompatible history layouts, unresolved writers, and interrupted launches without exit evidence retain their history. Existing Linux behavior is preserved. macOS/Linux process groups do not contain deliberate group escape or writers launched through external services. Workspace disposal is a separate feature and retains its existing platform policy. Native fixture CI executes deletion, writer shutdown, recovery, and artifact preservation on Linux x64, macOS x64/arm64, and Windows x64/arm64. A separate packaging job verifies the merged five-platform helpers before publication. Real backend authentication and live messaging acceptance are separate from native fixture CI.
170
+
168
171
 
169
172
  | Command | Description |
170
173
  |---------|-------------|
@@ -651,6 +654,8 @@ From Router 1.6.174, completed cards show thread-switch buttons and **+ New** di
651
654
 
652
655
  From Router 1.6.189, the selected thread for new top-level messages is stored per Feishu user and bound device, so Router restarts and device A→B→A switches restore it without resetting native sessions. A device with no saved selection keeps the existing default behavior. Replies to known cards remain independent of that selection; unknown or expired parent cards return an error instead of silently using selected/default. A confirmed deleted selection resets with a Feishu notice, and the failed message is never replayed. If a saved preference is corrupt, `/thread list` is a narrow read-only recovery path that refreshes selection controls from the bound CLI; arbitrary work still blocks. Continuation-card thread controls and replies retain the same provenance, and New Thread adoption requires a validated complete catalog. This requires only a Router upgrade and remains compatible with older CLIs over protocol v1.
653
656
 
657
+ From Router 1.6.218, saved card-to-thread associations let thread-switch buttons and replies to those cards survive a Router restart within their original seven-day lifetime. Retention is bounded to 10,000 cards overall and 2,000 per device, with older cards evicted first. Thread-switch clicks verify the destination against the connected device's current thread list. Requests rejected before persistence leave the saved selection unchanged. Once persistence starts, a timeout or connection loss requires confirmation of the final outcome instead of implying that the switch was cancelled. User and device ownership checks still apply, and invalidated, evicted, or expired cards require a fresh `/thread list`. Cards whose associations were lost before this upgrade cannot be recovered; generate a new card after upgrading to use restart recovery. After a restart, the success toast confirms a switch, while the old card's selection highlight may retain its last rendered state. This requires a Router upgrade and preserves protocol-v1 compatibility.
658
+
654
659
  From CLI 1.6.172, Codex threads support native goals through `/goal` (status), `/goal <objective>` (start), `/goal pause`, `/goal resume`, and `/goal clear`. Start or resume only when the thread and queue are idle, with managed delegation explicitly disabled using `/delegation off`. This initial restriction does not disable Codex's native subagents. Optional `--budget <tokens>` on start or resume sets an explicit positive token budget; omitting it does not invent a budget. For example:
655
660
 
656
661
  ```text
@@ -0,0 +1,50 @@
1
+ import { type HistoryEntry } from './NativeHistoryFiles';
2
+ import type { NativeDirectoryIdentity, NativeDeletionResult } from './NativeSessionDeletion';
3
+ declare const CONTRACT = "agy-owned-sqlite-v1";
4
+ /** Creation observation, never an imported/resumed pointer alone. */
5
+ export interface AgyDeletionTarget {
6
+ version: 1;
7
+ backend: 'agy';
8
+ provenance: 'created';
9
+ nativeVersion: typeof CONTRACT;
10
+ sessionId: string;
11
+ executorThreadId: string;
12
+ home: NativeDirectoryIdentity;
13
+ nativeHome: NativeDirectoryIdentity;
14
+ scope: NativeDirectoryIdentity;
15
+ pointerRoot: NativeDirectoryIdentity;
16
+ pointer: string;
17
+ pointerHash: string;
18
+ createdFile: HistoryEntry;
19
+ cwd: string;
20
+ command: string;
21
+ }
22
+ export interface AgyDeletionPreparation {
23
+ version: 1;
24
+ nativeVersion: typeof CONTRACT;
25
+ targetHash: string;
26
+ files: HistoryEntry[];
27
+ }
28
+ export interface AgyDeletionRecovery {
29
+ /** Caller must independently authorize the parent's retired generation. */
30
+ confirmedProcessGroupExit: boolean;
31
+ /** Exact retired creation receipts sharing this native namespace. */
32
+ ownedTargets?: AgyDeletionTarget[];
33
+ detachedPointer?: boolean;
34
+ prepared?: AgyDeletionPreparation;
35
+ persistPrepared?: (preparation: AgyDeletionPreparation) => Promise<void>;
36
+ }
37
+ export declare function validAgyDeletionTarget(value: any): value is AgyDeletionTarget;
38
+ export declare function captureAgyDeletionTarget(input: {
39
+ sessionId: string;
40
+ executorThreadId: string;
41
+ home: string;
42
+ cwd: string;
43
+ command: string;
44
+ }): Promise<AgyDeletionTarget>;
45
+ export declare function verifyAgyDeletionTarget(target: AgyDeletionTarget, detached?: boolean, requirePrivateCache?: boolean): Promise<void>;
46
+ export declare function validAgyDeletionPreparation(target: AgyDeletionTarget, value: any): value is AgyDeletionPreparation;
47
+ /** No native DeleteConversation call: it can dispose worktrees and brain deliverables. */
48
+ export declare function deleteOwnedAgySession(target: AgyDeletionTarget, recovery: AgyDeletionRecovery): Promise<NativeDeletionResult>;
49
+ export {};
50
+ //# sourceMappingURL=AgySessionDeletion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgySessionDeletion.d.ts","sourceRoot":"","sources":["../../src/delegation/AgySessionDeletion.ts"],"names":[],"mappings":"AAQA,OAAO,EACsC,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG7F,QAAA,MAAM,QAAQ,wBAAwB,CAAC;AAIvC,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;IACf,UAAU,EAAE,SAAS,CAAC;IACtB,aAAa,EAAE,OAAO,QAAQ,CAAC;IAC/B,SAAS,EAAE,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IAAI,CAAC,CAuBpI;AA4BD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,sBAAsB,CAclH;AAgFD,0FAA0F;AAC1F,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAwDnI"}
@@ -0,0 +1,340 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validAgyDeletionTarget = validAgyDeletionTarget;
7
+ exports.captureAgyDeletionTarget = captureAgyDeletionTarget;
8
+ exports.verifyAgyDeletionTarget = verifyAgyDeletionTarget;
9
+ exports.validAgyDeletionPreparation = validAgyDeletionPreparation;
10
+ exports.deleteOwnedAgySession = deleteOwnedAgySession;
11
+ const NativeBindings_1 = require("../native/NativeBindings");
12
+ const promises_1 = __importDefault(require("fs/promises"));
13
+ const fs_1 = require("fs");
14
+ const os_1 = __importDefault(require("os"));
15
+ const path_1 = __importDefault(require("path"));
16
+ const crypto_1 = require("crypto");
17
+ const module_1 = require("module");
18
+ const HistoryAnchor_1 = require("./HistoryAnchor");
19
+ const NativeHistoryFiles_1 = require("./NativeHistoryFiles");
20
+ const UUID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/;
21
+ const CONTRACT = 'agy-owned-sqlite-v1';
22
+ const LIMIT = 4096;
23
+ const SUFFIXES = ['', '-wal', '-shm', '-journal'];
24
+ const absolute = (value) => typeof value === 'string'
25
+ && path_1.default.isAbsolute(value) && path_1.default.normalize(value) === value && !value.includes('\0');
26
+ const hash = (bytes) => (0, crypto_1.createHash)('sha256').update(bytes).digest('hex');
27
+ function validAgyDeletionTarget(value) {
28
+ return !!value && value.version === 1 && value.backend === 'agy' && value.provenance === 'created'
29
+ && value.nativeVersion === CONTRACT && typeof value.sessionId === 'string' && UUID.test(value.sessionId)
30
+ && typeof value.executorThreadId === 'string' && value.executorThreadId.startsWith('delegate-lane-')
31
+ && UUID.test(value.executorThreadId.slice(14))
32
+ && [value.home, value.nativeHome, value.scope, value.pointerRoot].every(NativeHistoryFiles_1.validHistoryDirectory)
33
+ && value.nativeHome.path === path_1.default.join(value.home.path, '.remote-cli', 'agy-homes', value.executorThreadId)
34
+ && value.scope.path === path_1.default.join(value.nativeHome.path, '.gemini', 'antigravity-cli')
35
+ && value.pointerRoot.path === path_1.default.join(value.home.path, '.remote-cli', 'agy-sessions')
36
+ && value.pointer === path_1.default.join(value.pointerRoot.path, `${value.executorThreadId}.json`)
37
+ && typeof value.pointerHash === 'string' && /^[a-f0-9]{64}$/.test(value.pointerHash)
38
+ && (0, NativeHistoryFiles_1.validHistoryEntry)(value.createdFile) && value.createdFile.kind === 'file'
39
+ && value.createdFile.path === path_1.default.join(value.scope.path, 'conversations', `${value.sessionId}.db`)
40
+ && absolute(value.cwd) && typeof value.command === 'string' && value.command.length > 0
41
+ && value.command.length < 4096 && !value.command.includes('\0');
42
+ }
43
+ /** Read a bounded regular file through a checked descriptor, rejecting swaps and links. */
44
+ async function bytes(file, limit) {
45
+ const before = await (0, NativeHistoryFiles_1.historyIdentity)(file, 'file');
46
+ if (BigInt(before.size) > BigInt(limit))
47
+ throw new Error('AGY metadata exceeds the inspection limit');
48
+ const handle = await promises_1.default.open(file, fs_1.constants.O_RDONLY | (fs_1.constants.O_NOFOLLOW ?? 0));
49
+ try {
50
+ const stat = await handle.stat({ bigint: true });
51
+ if (String(stat.dev) !== before.dev || String(stat.ino) !== before.ino)
52
+ throw new Error('AGY metadata changed');
53
+ const buffer = Buffer.alloc(Number(before.size));
54
+ let offset = 0;
55
+ while (offset < buffer.length) {
56
+ const read = await handle.read(buffer, offset, buffer.length - offset, offset);
57
+ if (!read.bytesRead)
58
+ throw new Error('AGY metadata was truncated');
59
+ offset += read.bytesRead;
60
+ }
61
+ if ((0, NativeHistoryFiles_1.stableHistoryHash)(await (0, NativeHistoryFiles_1.historyIdentity)(file, 'file')) !== (0, NativeHistoryFiles_1.stableHistoryHash)(before))
62
+ throw new Error('AGY metadata changed');
63
+ return buffer;
64
+ }
65
+ finally {
66
+ await handle.close();
67
+ }
68
+ }
69
+ async function captureAgyDeletionTarget(input) {
70
+ // Validate before constructing or inspecting paths from a native event.
71
+ if (!UUID.test(input.sessionId) || !input.executorThreadId.startsWith('delegate-lane-')
72
+ || !UUID.test(input.executorThreadId.slice(14)) || !absolute(input.home))
73
+ throw new Error('Invalid AGY creation identity');
74
+ const nativeHome = path_1.default.join(input.home, '.remote-cli', 'agy-homes', input.executorThreadId);
75
+ const pointerRoot = path_1.default.join(input.home, '.remote-cli', 'agy-sessions');
76
+ const pointer = path_1.default.join(pointerRoot, `${input.executorThreadId}.json`);
77
+ const target = { version: 1, backend: 'agy', provenance: 'created', nativeVersion: CONTRACT,
78
+ sessionId: input.sessionId, executorThreadId: input.executorThreadId, cwd: input.cwd, command: input.command,
79
+ home: await (0, NativeHistoryFiles_1.historyDirectory)(input.home), nativeHome: await (0, NativeHistoryFiles_1.historyDirectory)(nativeHome),
80
+ scope: await (0, NativeHistoryFiles_1.historyDirectory)(path_1.default.join(nativeHome, '.gemini', 'antigravity-cli')),
81
+ createdFile: await (0, NativeHistoryFiles_1.historyIdentity)(path_1.default.join(nativeHome, '.gemini', 'antigravity-cli', 'conversations', `${input.sessionId}.db`), 'file'),
82
+ pointerRoot: await (0, NativeHistoryFiles_1.historyDirectory)(pointerRoot), pointer, pointerHash: hash((await bytes(pointer, 65536)).toString('utf8')) };
83
+ // A legacy shared cache prevents deletion, but not ownership observation or
84
+ // ordinary execution. Preserve the receipt so cleanup can report that boundary.
85
+ await verifyAgyDeletionTarget(target, false, false);
86
+ return target;
87
+ }
88
+ async function verifyAgyDeletionTarget(target, detached = false, requirePrivateCache = true) {
89
+ if (!validAgyDeletionTarget(target) || os_1.default.homedir() !== target.home.path)
90
+ throw new Error('AGY native home changed');
91
+ for (const root of [target.home, target.nativeHome, target.scope, target.pointerRoot])
92
+ await (0, NativeHistoryFiles_1.verifyHistoryDirectory)(root);
93
+ // Future workers have a private cache; legacy shared-cache lanes need manual review.
94
+ if (requirePrivateCache)
95
+ await (0, NativeHistoryFiles_1.historyDirectory)(path_1.default.join(target.scope.path, 'cache'));
96
+ const names = await promises_1.default.readdir(target.pointerRoot.path);
97
+ if (names.length > LIMIT)
98
+ throw new Error('AGY pointer inventory exceeds the inspection limit');
99
+ let found = false;
100
+ for (const name of names) {
101
+ if (!name.endsWith('.json'))
102
+ continue;
103
+ const file = path_1.default.join(target.pointerRoot.path, name);
104
+ const text = (await bytes(file, 65536)).toString('utf8');
105
+ const pointer = JSON.parse(text);
106
+ if (!pointer || typeof pointer.id !== 'string' || !pointer.id || pointer.id.length > 256)
107
+ throw new Error('Ambiguous AGY pointer');
108
+ if (file !== target.pointer) {
109
+ if (pointer.id.toLowerCase() === target.sessionId)
110
+ throw new Error('AGY history has another reference');
111
+ continue;
112
+ }
113
+ found = true;
114
+ if (detached && pointer.id.toLowerCase() !== target.sessionId)
115
+ continue;
116
+ if (pointer.adopted || pointer.id !== target.sessionId || hash(text) !== target.pointerHash)
117
+ throw new Error('AGY pointer changed');
118
+ }
119
+ if (!found && !detached)
120
+ throw new Error('AGY pointer is missing');
121
+ }
122
+ function allowedFiles(target) {
123
+ const root = target.scope.path;
124
+ return [
125
+ ...SUFFIXES.map(suffix => path_1.default.join(root, 'conversations', `${target.sessionId}.db${suffix}`)),
126
+ ...SUFFIXES.map(suffix => path_1.default.join(root, `conversation_summaries.db${suffix}`)),
127
+ path_1.default.join(root, 'annotations', `${target.sessionId}.pbtxt`),
128
+ path_1.default.join(root, 'presence', `${target.sessionId}.lock`),
129
+ ];
130
+ }
131
+ function historyDirectories(target) {
132
+ const brain = path_1.default.join(target.scope.path, 'brain');
133
+ const session = path_1.default.join(brain, target.sessionId);
134
+ const generated = path_1.default.join(session, '.system_generated');
135
+ const logs = path_1.default.join(generated, 'logs');
136
+ return ['conversations', 'annotations', 'presence'].map(name => path_1.default.join(target.scope.path, name))
137
+ .concat([brain, session, generated, logs, path_1.default.join(logs, 'chunks'),
138
+ path_1.default.join(logs, 'chunks', 'transcript'), path_1.default.join(logs, 'chunks', 'transcript_full')]);
139
+ }
140
+ function isHistoryFile(target, file) {
141
+ if (allowedFiles(target).includes(file))
142
+ return true;
143
+ const logs = path_1.default.join(target.scope.path, 'brain', target.sessionId, '.system_generated', 'logs');
144
+ const relative = path_1.default.relative(logs, file).split(path_1.default.sep).join('/');
145
+ return /^(?:transcript(?:_full)?\.jsonl|chunks\/transcript(?:_full)?\/[0-9]{1,16}\.jsonl)$/.test(relative);
146
+ }
147
+ function validAgyDeletionPreparation(target, value) {
148
+ if (!validAgyDeletionTarget(target) || !value || value.version !== 1 || value.nativeVersion !== CONTRACT
149
+ || value.targetHash !== (0, NativeHistoryFiles_1.stableHistoryHash)(target) || !Array.isArray(value.files) || value.files.length > 256)
150
+ return false;
151
+ const allowed = allowedFiles(target);
152
+ const directories = historyDirectories(target);
153
+ const seen = new Set();
154
+ for (const entry of value.files) {
155
+ if (!(0, NativeHistoryFiles_1.validHistoryEntry)(entry) || seen.has(entry.path)
156
+ || !(entry.kind === 'file' ? isHistoryFile(target, entry.path) : directories.includes(entry.path)))
157
+ return false;
158
+ seen.add(entry.path);
159
+ }
160
+ return seen.has(allowed[0]) && seen.has(path_1.default.join(target.scope.path, 'conversations'))
161
+ && value.files.every((entry) => entry.kind === 'directory'
162
+ || path_1.default.dirname(entry.path) === target.scope.path || seen.has(path_1.default.dirname(entry.path)));
163
+ }
164
+ async function maybe(file, kind) {
165
+ try {
166
+ await promises_1.default.lstat(file);
167
+ }
168
+ catch (error) {
169
+ if (error.code === 'ENOENT')
170
+ return;
171
+ throw error;
172
+ }
173
+ return (0, NativeHistoryFiles_1.historyIdentity)(file, kind);
174
+ }
175
+ async function inventory(target, ownedTargets = [target]) {
176
+ const root = target.scope.path;
177
+ const entries = [];
178
+ for (const directoryPath of historyDirectories(target)) {
179
+ const directory = await maybe(directoryPath, 'directory');
180
+ if (!directory)
181
+ continue;
182
+ entries.push(directory);
183
+ const names = await promises_1.default.readdir(directory.path);
184
+ if (names.length > LIMIT)
185
+ throw new Error('AGY history inventory exceeds the inspection limit');
186
+ if (['conversations', 'annotations', 'presence'].some(name => directory.path === path_1.default.join(root, name))) {
187
+ const allowed = ownedTargets.flatMap(allowedFiles);
188
+ if (names.some(file => !allowed.includes(path_1.default.join(directory.path, file))))
189
+ throw new Error('AGY namespace has other histories');
190
+ }
191
+ for (const name of names) {
192
+ const file = path_1.default.join(directory.path, name);
193
+ if (!allowedFiles(target).includes(file) && isHistoryFile(target, file)) {
194
+ const entry = await maybe(file, 'file');
195
+ if (entry)
196
+ entries.push(entry);
197
+ }
198
+ }
199
+ }
200
+ for (const file of allowedFiles(target)) {
201
+ const entry = await maybe(file, 'file');
202
+ if (entry)
203
+ entries.push(entry);
204
+ }
205
+ return entries;
206
+ }
207
+ /** Only metadata is queried. The original database (including WAL/SHM) is never opened by SQLite. */
208
+ async function verifyExclusiveIndex(target, files, ownedTargets) {
209
+ const index = path_1.default.join(target.scope.path, 'conversation_summaries.db');
210
+ if (!files.some(file => file.path === index)) {
211
+ if (files.some(file => file.path.startsWith(index)))
212
+ throw new Error('AGY index has orphaned sidecars');
213
+ return true;
214
+ }
215
+ // Node 18 remains supported by the CLI; this optional capability is explicit when unavailable.
216
+ const builtin = 'node:sqlite';
217
+ let sqlite;
218
+ try {
219
+ sqlite = (0, module_1.createRequire)(path_1.default.join(target.home.path, 'native-maintenance.cjs'))(builtin);
220
+ }
221
+ catch {
222
+ return false;
223
+ }
224
+ if (typeof sqlite.DatabaseSync !== 'function')
225
+ return false;
226
+ const scratch = await promises_1.default.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'remote-cli-agy-index-'));
227
+ let database;
228
+ try {
229
+ for (const suffix of ['', '-wal', '-shm', '-journal']) {
230
+ const source = index + suffix;
231
+ if (!files.some(file => file.path === source))
232
+ continue;
233
+ // Private bounded snapshot, so SQLite cannot mutate the original SHM or follow native links.
234
+ await promises_1.default.writeFile(path_1.default.join(scratch, `index.db${suffix}`), await bytes(source, 32 * 1024 * 1024), { mode: 0o600 });
235
+ }
236
+ database = new sqlite.DatabaseSync(path_1.default.join(scratch, 'index.db'), { readOnly: true, allowExtension: false });
237
+ database.exec('PRAGMA trusted_schema=OFF');
238
+ const objects = database.prepare("SELECT type, name FROM sqlite_schema WHERE type IN ('table', 'view', 'trigger')").all();
239
+ if (objects.length !== 1 || objects[0].type !== 'table' || objects[0].name !== 'conversation_summaries') {
240
+ throw new Error('Unsupported AGY summary index objects');
241
+ }
242
+ const columns = database.prepare('PRAGMA table_info(conversation_summaries)').all();
243
+ for (const name of ['conversation_id', 'parent_conversation_id', 'app_data_dir']) {
244
+ if (!columns.some((column) => column.name === name && String(column.type).toLowerCase() === 'text')) {
245
+ throw new Error('Unsupported AGY summary index schema');
246
+ }
247
+ }
248
+ const rows = database.prepare('SELECT conversation_id, parent_conversation_id, app_data_dir FROM conversation_summaries LIMIT 65').all();
249
+ if (rows.length > 64 || rows.some((row) => !ownedTargets.some(owned => owned.sessionId === row.conversation_id)
250
+ || row.parent_conversation_id !== '' || !['', target.scope.path, 'antigravity-cli'].includes(row.app_data_dir))) {
251
+ throw new Error('AGY index contains unowned history');
252
+ }
253
+ return true;
254
+ }
255
+ finally {
256
+ try {
257
+ database?.close();
258
+ }
259
+ finally {
260
+ await promises_1.default.rm(scratch, { recursive: true, force: true });
261
+ }
262
+ }
263
+ }
264
+ /** No native DeleteConversation call: it can dispose worktrees and brain deliverables. */
265
+ async function deleteOwnedAgySession(target, recovery) {
266
+ if (!(0, NativeBindings_1.supportsNativeCleanup)())
267
+ return { state: 'unsupported', reason: 'AGY history deletion requires native anchored files and exit proof' };
268
+ if (!recovery.confirmedProcessGroupExit)
269
+ return { state: 'waiting-exit', reason: 'AGY writer process-group exit is unconfirmed' };
270
+ let deleting = false;
271
+ try {
272
+ const ownedTargets = recovery.ownedTargets ?? [target];
273
+ if (!ownedTargets.length || ownedTargets.length > 64
274
+ || !ownedTargets.some(value => (0, NativeHistoryFiles_1.stableHistoryHash)(value) === (0, NativeHistoryFiles_1.stableHistoryHash)(target))
275
+ || ownedTargets.some(value => !validAgyDeletionTarget(value) || value.executorThreadId !== target.executorThreadId
276
+ || (0, NativeHistoryFiles_1.stableHistoryHash)(value.scope) !== (0, NativeHistoryFiles_1.stableHistoryHash)(target.scope) || (0, NativeHistoryFiles_1.stableHistoryHash)(value.home) !== (0, NativeHistoryFiles_1.stableHistoryHash)(target.home))) {
277
+ throw new Error('AGY root ownership changed');
278
+ }
279
+ for (const owned of ownedTargets)
280
+ await verifyAgyDeletionTarget(owned, recovery.detachedPointer || owned !== target);
281
+ let prepared = recovery.prepared;
282
+ if (prepared && !validAgyDeletionPreparation(target, prepared))
283
+ throw new Error('AGY preparation changed');
284
+ if (!prepared) {
285
+ if (!recovery.persistPrepared)
286
+ throw new Error('Durable AGY preparation is required');
287
+ const files = await inventory(target, ownedTargets);
288
+ const transcript = path_1.default.join(target.scope.path, 'conversations', `${target.sessionId}.db`);
289
+ const currentFile = files.find(file => file.path === transcript);
290
+ if (!currentFile || currentFile.dev !== target.createdFile.dev || currentFile.ino !== target.createdFile.ino) {
291
+ throw new Error('AGY conversation was replaced after creation');
292
+ }
293
+ // Inspect only the SQLite magic, never conversation contents.
294
+ const handle = await promises_1.default.open(transcript, fs_1.constants.O_RDONLY | fs_1.constants.O_NOFOLLOW);
295
+ try {
296
+ const prefix = Buffer.alloc(16);
297
+ if ((await handle.read(prefix, 0, 16, 0)).bytesRead !== 16 || prefix.toString() !== 'SQLite format 3\0') {
298
+ throw new Error('Unsupported AGY conversation format');
299
+ }
300
+ }
301
+ finally {
302
+ await handle.close();
303
+ }
304
+ if (!await verifyExclusiveIndex(target, files, ownedTargets))
305
+ return { state: 'unsupported', reason: 'AGY index inspection requires the optional node:sqlite capability' };
306
+ prepared = { version: 1, nativeVersion: CONTRACT, targetHash: (0, NativeHistoryFiles_1.stableHistoryHash)(target), files };
307
+ if (!validAgyDeletionPreparation(target, prepared))
308
+ throw new Error('Invalid AGY manifest');
309
+ await recovery.persistPrepared(prepared);
310
+ }
311
+ await verifyAgyDeletionTarget(target, recovery.detachedPointer);
312
+ const current = await inventory(target, ownedTargets);
313
+ // Directory mtime changes after removing a leaf are expected on a retry.
314
+ if (current.some(entry => !prepared.files.some(saved => saved.path === entry.path && saved.dev === entry.dev && saved.ino === entry.ino
315
+ && (entry.kind === 'directory' || (0, NativeHistoryFiles_1.stableHistoryHash)(saved) === (0, NativeHistoryFiles_1.stableHistoryHash)(entry)))))
316
+ throw new Error('AGY history changed after preparation');
317
+ const anchor = await (0, HistoryAnchor_1.openHistoryAnchor)(target.scope, prepared.files);
318
+ try {
319
+ deleting = true;
320
+ // Keep directories, brain deliverables, caches, worktrees and remote-cli artifacts.
321
+ for (const entry of prepared.files.filter(entry => entry.kind === 'file'))
322
+ await anchor.remove(entry);
323
+ await verifyAgyDeletionTarget(target, recovery.detachedPointer);
324
+ for (const file of prepared.files.filter(entry => entry.kind === 'file')) {
325
+ if (await anchor.exists(file.path))
326
+ throw new Error('AGY history remains');
327
+ }
328
+ if ((await inventory(target, ownedTargets)).some(entry => entry.kind === 'file'))
329
+ throw new Error('AGY history reappeared');
330
+ return { state: 'deleted', reason: 'Owned AGY conversation and exclusive summary index permanently removed; brain outputs preserved' };
331
+ }
332
+ finally {
333
+ await anchor.close();
334
+ }
335
+ }
336
+ catch {
337
+ return { state: deleting ? 'uncertain' : 'held', reason: 'AGY ownership, exclusive index or durable deletion could not be confirmed' };
338
+ }
339
+ }
340
+ //# sourceMappingURL=AgySessionDeletion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgySessionDeletion.js","sourceRoot":"","sources":["../../src/delegation/AgySessionDeletion.ts"],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,CAAC;gBACzE,IAAI,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC7E,CAAC;YACD,IAAI,CAAC,MAAM,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;YAC5H,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,iGAAiG,EAAE,CAAC;QACzI,CAAC;gBAAS,CAAC;YAAC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,2EAA2E,EAAE,CAAC;IACzI,CAAC;AACH,CAAC"}
@@ -86,8 +86,7 @@ function validateLane(value) {
86
86
  && (lane.nativeDeletionPreparations === undefined || lane.nativeDeletionPreparations
87
87
  && typeof lane.nativeDeletionPreparations === 'object' && !Array.isArray(lane.nativeDeletionPreparations)
88
88
  && Object.entries(lane.nativeDeletionPreparations).length <= 64
89
- && Object.entries(lane.nativeDeletionPreparations).every(([id, prepared]) => UUID_RE.test(id)
90
- && prepared?.version === 1 && [lane.nativeSession, ...(lane.nativeSessionHistory ?? [])].some(target => target?.sessionId === id && (0, NativeSessionDeletion_1.validDeletionPreparation)(target, prepared))))
89
+ && Object.entries(lane.nativeDeletionPreparations).every(([id, prepared]) => prepared?.version === 1 && [lane.nativeSession, ...(lane.nativeSessionHistory ?? [])].some(target => target?.sessionId === id && (0, NativeSessionDeletion_1.validDeletionPreparation)(target, prepared))))
91
90
  && (lane.nativeGroupExitGeneration === undefined || validGeneration(lane.nativeGroupExitGeneration)
92
91
  && lane.nativeGroupExitGeneration === (lane.contextGeneration ?? 0))
93
92
  && (lane.nativeDeletion === undefined || lane.nativeDeletion && typeof lane.nativeDeletion.reason === 'string'