pushary 1.9.32 → 1.9.34

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 (105) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/data/SKILL.md +6 -7
  3. package/data/cowork/SKILL.md +2 -2
  4. package/data/cursor-plugin/rules/pushary.mdc +1 -1
  5. package/data/cursor-plugin/skills/pushary/SKILL.md +6 -7
  6. package/data/vscode-plugin/skills/pushary/SKILL.md +6 -7
  7. package/dist/bin/pushary-bell-hook.js +25 -25
  8. package/dist/bin/pushary-bell.js +9 -9
  9. package/dist/bin/pushary-claude.js +24 -24
  10. package/dist/bin/pushary-clean.js +29 -29
  11. package/dist/bin/pushary-codex-bridge.js +17 -17
  12. package/dist/bin/pushary-codex-hook.js +30 -30
  13. package/dist/bin/pushary-codex.js +12 -12
  14. package/dist/bin/pushary-connect.js +24 -24
  15. package/dist/bin/pushary-cowork.js +5 -5
  16. package/dist/bin/pushary-daemon.js +32 -32
  17. package/dist/bin/pushary-disconnect.js +24 -24
  18. package/dist/bin/pushary-doctor.js +33 -33
  19. package/dist/bin/pushary-elicitation-hook.js +25 -25
  20. package/dist/bin/pushary-gemini-bridge.js +13 -13
  21. package/dist/bin/pushary-gemini-hook.js +27 -27
  22. package/dist/bin/pushary-hook.js +29 -29
  23. package/dist/bin/pushary-login.js +12 -12
  24. package/dist/bin/pushary-logout.js +24 -24
  25. package/dist/bin/pushary-mcp.js +9 -9
  26. package/dist/bin/pushary-mode.js +12 -12
  27. package/dist/bin/pushary-notification-hook.js +24 -24
  28. package/dist/bin/pushary-opencode-hook.js +26 -26
  29. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  30. package/dist/bin/pushary-permission-hook.js +28 -28
  31. package/dist/bin/pushary-post-hook.js +24 -24
  32. package/dist/bin/pushary-prompt-hook.js +24 -24
  33. package/dist/bin/pushary-session-end-hook.js +24 -24
  34. package/dist/bin/pushary-session-start-hook.js +28 -28
  35. package/dist/bin/pushary-setup.js +35 -35
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +26 -26
  38. package/dist/bin/pushary-stop-hook.js +24 -24
  39. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  40. package/dist/bin/pushary-suggestions.js +12 -12
  41. package/dist/bin/pushary-transcript-register.js +17 -17
  42. package/dist/bin/pushary-transcripts.js +7 -7
  43. package/dist/bin/pushary-upgrade.js +30 -30
  44. package/dist/bin/pushary-wait.js +12 -12
  45. package/dist/bin/pushary.js +6 -6
  46. package/dist/{chunk-ALJEKG2D.js → chunk-22YSHBTI.js} +3 -3
  47. package/dist/{chunk-I6D5BGFF.js → chunk-36ZCFJUI.js} +1 -1
  48. package/dist/{chunk-EUUB3NI5.js → chunk-3FOPVVNO.js} +4 -4
  49. package/dist/{chunk-Z73AKQYU.js → chunk-3LS3GFJW.js} +1 -1
  50. package/dist/{chunk-7OMOUQSU.js → chunk-45OXG3VR.js} +1 -1
  51. package/dist/{chunk-BZ3GN2YK.js → chunk-4PIAOJAW.js} +1 -1
  52. package/dist/{chunk-NRM4QJKG.js → chunk-4TFD3WAA.js} +2 -2
  53. package/dist/{chunk-Y53KKEMZ.js → chunk-57FFQR46.js} +1 -1
  54. package/dist/{chunk-I3N5LPFB.js → chunk-6OGDGQTT.js} +5 -5
  55. package/dist/{chunk-JD6HIO7N.js → chunk-7FQL5NWJ.js} +4 -3
  56. package/dist/{chunk-7ENPTXR4.js → chunk-7IVV4LLF.js} +3 -3
  57. package/dist/{chunk-ZLHBY5BV.js → chunk-7S7H7V5V.js} +4 -4
  58. package/dist/{chunk-L5WCPMWZ.js → chunk-7UGGCTTW.js} +2 -2
  59. package/dist/{chunk-SUXSVHCP.js → chunk-A455TSHF.js} +2 -2
  60. package/dist/{chunk-6R7RZMN5.js → chunk-A5FFSXZE.js} +2 -2
  61. package/dist/{chunk-6C57SBLO.js → chunk-B5RLJ6QD.js} +4 -4
  62. package/dist/{chunk-HFRRSYTG.js → chunk-CK3W7Q5S.js} +1 -1
  63. package/dist/{chunk-5SMAW6N7.js → chunk-CPYOJRDN.js} +85 -48
  64. package/dist/{chunk-H7F2IN22.js → chunk-DCBSD22V.js} +3 -3
  65. package/dist/{chunk-Y25UXZQT.js → chunk-DQKEGNTI.js} +1 -1
  66. package/dist/{chunk-XJEIN2FJ.js → chunk-E2OZZZKP.js} +2 -2
  67. package/dist/{chunk-IW6MFF5I.js → chunk-EGTRIM74.js} +4 -4
  68. package/dist/{chunk-IPJRYHDC.js → chunk-EJWSE7S7.js} +5 -5
  69. package/dist/{chunk-JH2TTKC4.js → chunk-FDNMQEU6.js} +2 -2
  70. package/dist/{chunk-OT6QTOOR.js → chunk-FPYBX36E.js} +5 -5
  71. package/dist/{chunk-K7NUD23S.js → chunk-FQQSW7MD.js} +1 -1
  72. package/dist/{chunk-LBD7QQ2V.js → chunk-FYQG2UTK.js} +2 -2
  73. package/dist/{chunk-2GYTGLML.js → chunk-GC3SUMYD.js} +4 -4
  74. package/dist/{chunk-UOVREWK3.js → chunk-H52HBSOD.js} +3 -3
  75. package/dist/{chunk-5LXIM5LF.js → chunk-HJNCVY5F.js} +7 -7
  76. package/dist/{chunk-6ILLZXCS.js → chunk-HQKYWUBF.js} +2 -2
  77. package/dist/{chunk-ZZ4C47Z2.js → chunk-HVUBWLER.js} +11 -11
  78. package/dist/{chunk-S5J2ZFQK.js → chunk-IRU7DKJW.js} +3 -3
  79. package/dist/{chunk-NFABDPWT.js → chunk-LOYSI2CZ.js} +5 -5
  80. package/dist/{chunk-ZVPADGCH.js → chunk-NKAMF2YJ.js} +1 -1
  81. package/dist/{chunk-KTFZKXRE.js → chunk-NMQLY4PE.js} +2 -2
  82. package/dist/{chunk-LA6Q2BJF.js → chunk-OZMGO4WF.js} +6 -7
  83. package/dist/{chunk-FAINF4IK.js → chunk-PEEJP4HN.js} +4 -4
  84. package/dist/{chunk-CBRLV3W7.js → chunk-QJ3ENGBT.js} +3 -3
  85. package/dist/{chunk-BQQQ4NP5.js → chunk-SMRMWDFE.js} +8 -8
  86. package/dist/{chunk-WAR24VWD.js → chunk-SMSX4TCC.js} +1 -1
  87. package/dist/{chunk-QRDTNXP2.js → chunk-U7CN5HG2.js} +5 -5
  88. package/dist/{chunk-GF45OS6U.js → chunk-UDECNZYI.js} +2 -2
  89. package/dist/{chunk-YTVNKMOA.js → chunk-ULJFIF5N.js} +1 -1
  90. package/dist/{chunk-MKYICE44.js → chunk-UPRNSD2T.js} +4 -4
  91. package/dist/{chunk-F3TI7CYV.js → chunk-V4ZIG66K.js} +1 -1
  92. package/dist/{chunk-BWPR75C3.js → chunk-VTAC5FBZ.js} +1 -1
  93. package/dist/{chunk-DXFMP37X.js → chunk-WFPXKCN4.js} +5 -5
  94. package/dist/{chunk-FZ2EGAEA.js → chunk-WMB3OCI4.js} +2 -2
  95. package/dist/{chunk-PQ3QV523.js → chunk-WPSI4246.js} +1 -1
  96. package/dist/{chunk-AGMKXRLQ.js → chunk-XLXG6MA5.js} +3 -3
  97. package/dist/{chunk-J2OVVMBU.js → chunk-YABMIGR3.js} +1 -1
  98. package/dist/{chunk-7HIODNBA.js → chunk-YRDNKY77.js} +6 -6
  99. package/dist/{chunk-EFQPXGND.js → chunk-Z6HDYK2A.js} +2 -2
  100. package/dist/{global-upgrade-B6E7DWGC.js → global-upgrade-IZCB4WIE.js} +6 -6
  101. package/dist/{paths-H4Q6OES7.js → paths-4WAA57P5.js} +2 -2
  102. package/dist/{reapply-HXIKYN5E.js → reapply-GJ73ZHDD.js} +20 -20
  103. package/dist/src/index.js +19 -19
  104. package/dist/{upgrade-lock-MLXS6NH2.js → upgrade-lock-J5PIKSYV.js} +3 -3
  105. package/package.json +1 -1
@@ -6,38 +6,38 @@ import {
6
6
  } from "./chunk-DWQYCOPI.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-OT6QTOOR.js";
9
+ } from "./chunk-FPYBX36E.js";
10
10
  import {
11
11
  buildTranscriptRecords,
12
12
  decodePublicKey,
13
13
  generateSessionKey,
14
14
  wrapSessionKey
15
- } from "./chunk-HFRRSYTG.js";
15
+ } from "./chunk-CK3W7Q5S.js";
16
16
  import {
17
17
  fetchTranscriptRecipients,
18
18
  uploadTranscriptRecords
19
- } from "./chunk-BZ3GN2YK.js";
19
+ } from "./chunk-4PIAOJAW.js";
20
20
  import {
21
21
  transcriptEnvironmentPreference,
22
22
  transcriptsEnabled
23
- } from "./chunk-WAR24VWD.js";
23
+ } from "./chunk-SMSX4TCC.js";
24
24
  import {
25
25
  hookOwnerOf
26
- } from "./chunk-I3N5LPFB.js";
26
+ } from "./chunk-6OGDGQTT.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-H7F2IN22.js";
29
+ } from "./chunk-DCBSD22V.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-MKYICE44.js";
33
+ } from "./chunk-UPRNSD2T.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-AQFEP65J.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-Z73AKQYU.js";
40
+ } from "./chunk-3LS3GFJW.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -176,27 +176,30 @@ var createSyncState = () => ({
176
176
  seen: /* @__PURE__ */ new Set(),
177
177
  keyUploaded: false,
178
178
  keyRejected: false,
179
- keyUnavailable: false
179
+ keyUnavailable: false,
180
+ unsettled: 0
180
181
  });
182
+ var withSessionKey = async (state, uploader) => {
183
+ if (state.sessionKey || state.keyRejected) return state;
184
+ const recipients = await uploader.fetchTranscriptRecipients();
185
+ if (!recipients) return state;
186
+ const sessionKey = generateSessionKey();
187
+ return {
188
+ ...state,
189
+ sessionKey,
190
+ wrappedKey: wrapSessionKey(sessionKey, decodePublicKey(recipients.phonePublicKey)),
191
+ providerWrappedKey: recipients.provider ? wrapSessionKey(sessionKey, decodePublicKey(recipients.provider.publicKey)) : state.providerWrappedKey,
192
+ providerKeyId: recipients.provider ? recipients.provider.keyId : state.providerKeyId
193
+ };
194
+ };
181
195
  var syncTick = async (lines, state, uploader, sessionId, machineId) => {
182
196
  if (state.keyRejected) return state;
183
- let sessionKey = state.sessionKey;
184
- let wrappedKey = state.wrappedKey;
185
- let providerWrappedKey = state.providerWrappedKey;
186
- let providerKeyId = state.providerKeyId;
187
- if (!sessionKey) {
188
- const recipients = await uploader.fetchTranscriptRecipients();
189
- if (!recipients) return state;
190
- sessionKey = generateSessionKey();
191
- wrappedKey = wrapSessionKey(sessionKey, decodePublicKey(recipients.phonePublicKey));
192
- if (recipients.provider) {
193
- providerWrappedKey = wrapSessionKey(sessionKey, decodePublicKey(recipients.provider.publicKey));
194
- providerKeyId = recipients.provider.keyId;
195
- }
196
- }
197
+ const keyed = await withSessionKey(state, uploader);
198
+ const { sessionKey, wrappedKey, providerWrappedKey, providerKeyId } = keyed;
199
+ if (!sessionKey) return state;
197
200
  const built = buildTranscriptRecords(lines, sessionKey, state.seen);
198
201
  if (built.records.length === 0) {
199
- return { ...state, sessionKey, wrappedKey, providerWrappedKey, providerKeyId, seen: built.seen };
202
+ return { ...state, sessionKey, wrappedKey, providerWrappedKey, providerKeyId, seen: built.seen, unsettled: 0 };
200
203
  }
201
204
  const seen = new Set(state.seen);
202
205
  let keyUploaded = state.keyUploaded;
@@ -237,7 +240,8 @@ var syncTick = async (lines, state, uploader, sessionId, machineId) => {
237
240
  seen,
238
241
  keyUploaded,
239
242
  keyRejected,
240
- keyUnavailable
243
+ keyUnavailable,
244
+ unsettled: built.records.filter((record) => !seen.has(record.localId)).length
241
245
  };
242
246
  };
243
247
  var MAX_RECORDS_PER_BATCH = 200;
@@ -299,7 +303,19 @@ var statOrNull = (path) => {
299
303
  };
300
304
  var sightTranscript = (epoch, path, seenAtMs) => recordSighting(epoch, path, sightingOf(statOrNull(path), seenAtMs));
301
305
  var LINE_FEED = 10;
302
- var nothingUnread = (cutoff) => ({ lines: [], cutoff, completeThroughOffset: cutoff.offset });
306
+ var MAXIMUM_TRANSCRIPT_READ_BYTES = 4 * 1024 * 1024;
307
+ var CATCH_UP_DELAY_MS = 50;
308
+ var STALLED_BACKOFF_FACTOR = 4;
309
+ var nothingUnread = (cutoff) => ({ lines: [], cutoff, completeThroughOffset: cutoff.offset, reachedEnd: true });
310
+ var readThroughALineEnd = (descriptor, offset, unread) => {
311
+ let window = Math.min(unread, MAXIMUM_TRANSCRIPT_READ_BYTES);
312
+ for (; ; ) {
313
+ const buffer = Buffer.alloc(window);
314
+ const received = buffer.subarray(0, readSync(descriptor, buffer, 0, window, offset));
315
+ if (window >= unread || received.length < window || received.includes(LINE_FEED)) return received;
316
+ window = Math.min(unread, window * 2);
317
+ }
318
+ };
303
319
  var readLinesSinceCutoff = (epoch, path, seenAtMs) => {
304
320
  let descriptor;
305
321
  try {
@@ -312,12 +328,14 @@ var readLinesSinceCutoff = (epoch, path, seenAtMs) => {
312
328
  const cutoff = recordSighting(epoch, path, sightingOf(info, seenAtMs));
313
329
  const unread = info.size - cutoff.offset;
314
330
  if (unread <= 0) return nothingUnread(cutoff);
315
- const buffer = Buffer.alloc(unread);
316
- const received = buffer.subarray(0, readSync(descriptor, buffer, 0, unread, cutoff.offset));
331
+ const received = readThroughALineEnd(descriptor, cutoff.offset, unread);
332
+ const completeBytes = received.lastIndexOf(LINE_FEED) + 1;
333
+ const reachedEnd = received.length >= unread;
317
334
  return {
318
- lines: received.toString("utf8").split("\n"),
335
+ lines: (reachedEnd ? received : received.subarray(0, completeBytes)).toString("utf8").split("\n"),
319
336
  cutoff,
320
- completeThroughOffset: cutoff.offset + received.lastIndexOf(LINE_FEED) + 1
337
+ completeThroughOffset: cutoff.offset + completeBytes,
338
+ reachedEnd
321
339
  };
322
340
  } finally {
323
341
  closeSync(descriptor);
@@ -327,7 +345,8 @@ var linesSeenDuringEpoch = (epoch, path, source, seenAtMs) => {
327
345
  const read2 = readLinesSinceCutoff(epoch, path, seenAtMs);
328
346
  return { ...read2, lines: transcriptLinesSeenLive(normalizeTranscriptLines(read2.lines, source), epoch.startedAtMs, read2.cutoff.startedBeforeEpoch) };
329
347
  };
330
- var nothingLeftToUpload = (state, lines) => state.sessionKey !== null && !state.keyRejected && buildTranscriptRecords(lines, state.sessionKey, state.seen).records.length === 0;
348
+ var nothingLeftToUpload = (state) => state.sessionKey !== null && !state.keyRejected && state.unsettled === 0;
349
+ var uploadStalled = (before, after) => after.sessionKey !== null && !after.keyRejected && after.unsettled > 0 && after.seen.size === before.seen.size;
331
350
  var nextInterval = (previousMs, idle, baseMs, maxMs) => idle ? Math.min(previousMs * 2, maxMs) : baseMs;
332
351
  var startTranscriptSync = (opts) => {
333
352
  let warnedAboutRecipients = false;
@@ -354,32 +373,50 @@ var startTranscriptSync = (opts) => {
354
373
  const persisted = loadSessionKey(opts.sessionId, opts.storage?.sessionKeyDirectory);
355
374
  let state = persisted ? { ...createSyncState(), ...persisted } : createSyncState();
356
375
  sweepStaleSessionKeys(Date.now(), opts.storage?.sessionKeyDirectory);
376
+ let persistedKey = persisted?.sessionKey ?? null;
357
377
  let persistedUploaded = persisted?.keyUploaded ?? false;
378
+ const persistSessionKey = () => {
379
+ if (!state.sessionKey || state.sessionKey === persistedKey && state.keyUploaded === persistedUploaded) return;
380
+ persistedKey = state.sessionKey;
381
+ persistedUploaded = state.keyUploaded;
382
+ saveSessionKey(opts.sessionId, {
383
+ sessionKey: state.sessionKey,
384
+ wrappedKey: state.wrappedKey,
385
+ providerWrappedKey: state.providerWrappedKey,
386
+ providerKeyId: state.providerKeyId,
387
+ keyUploaded: state.keyUploaded
388
+ }, opts.storage?.sessionKeyDirectory);
389
+ };
358
390
  let running = true;
359
391
  let inFlight = false;
392
+ let stalled = false;
393
+ let catchingUp = false;
360
394
  const tick = async () => {
395
+ catchingUp = false;
361
396
  if (!running || inFlight || !(opts.enabled ? opts.enabled() : transcriptsEnabled())) return;
362
397
  inFlight = true;
363
398
  try {
364
- const before = state.sessionKey;
365
399
  const ending = opts.ending?.() === true;
400
+ if (state.keyRejected) {
401
+ if (ending) opts.onDrained?.();
402
+ return;
403
+ }
404
+ state = await withSessionKey(state, uploader);
405
+ if (!state.sessionKey) return;
406
+ persistSessionKey();
407
+ const previous = state;
366
408
  const modified = existsSync2(path) ? statSync2(path).mtimeMs : null;
367
409
  const source = opts.source ?? "claude";
368
410
  const read2 = opts.epoch ? linesSeenDuringEpoch(opts.epoch, path, source, Date.now()) : null;
369
411
  const lines = read2?.lines ?? normalizeTranscriptLines(readLines(path), source);
370
412
  state = await syncTick(lines, state, uploader, opts.sessionId, opts.machineId);
371
- if (state.sessionKey && (before !== state.sessionKey || state.keyUploaded !== persistedUploaded)) {
372
- persistedUploaded = state.keyUploaded;
373
- saveSessionKey(opts.sessionId, {
374
- sessionKey: state.sessionKey,
375
- wrappedKey: state.wrappedKey,
376
- providerWrappedKey: state.providerWrappedKey,
377
- providerKeyId: state.providerKeyId,
378
- keyUploaded: state.keyUploaded
379
- }, opts.storage?.sessionKeyDirectory);
380
- }
381
- if (opts.epoch && read2 && nothingLeftToUpload(state, lines)) recordSettledPosition(opts.epoch, path, read2.cutoff, read2.completeThroughOffset);
382
- if (ending && opts.ending?.() && existsSync2(path) && statSync2(path).mtimeMs === modified && state.keyUploaded && nothingLeftToUpload(state, lines)) opts.onDrained?.();
413
+ stalled = uploadStalled(previous, state);
414
+ persistSessionKey();
415
+ const settled = nothingLeftToUpload(state);
416
+ if (opts.epoch && read2 && settled) recordSettledPosition(opts.epoch, path, read2.cutoff, read2.completeThroughOffset);
417
+ catchingUp = settled && read2 !== null && !read2.reachedEnd && read2.completeThroughOffset > read2.cutoff.offset;
418
+ const readEverything = read2?.reachedEnd ?? true;
419
+ if (ending && opts.ending?.() && existsSync2(path) && statSync2(path).mtimeMs === modified && settled && readEverything) opts.onDrained?.();
383
420
  } catch {
384
421
  } finally {
385
422
  inFlight = false;
@@ -394,14 +431,14 @@ var startTranscriptSync = (opts) => {
394
431
  void (async () => {
395
432
  const before = state.sessionKey;
396
433
  await tick();
397
- const idle = state.sessionKey === null && before === null || state.keyUnavailable;
398
- schedule(nextInterval(delayMs, idle, baseIntervalMs, maxIntervalMs));
434
+ const waiting = state.sessionKey === null && before === null || state.keyUnavailable || state.keyRejected;
435
+ const ceilingMs = waiting ? maxIntervalMs : Math.min(maxIntervalMs, baseIntervalMs * STALLED_BACKOFF_FACTOR);
436
+ schedule(catchingUp ? CATCH_UP_DELAY_MS : nextInterval(Math.max(delayMs, baseIntervalMs), waiting || stalled, baseIntervalMs, ceilingMs));
399
437
  })();
400
438
  }, delayMs);
401
439
  if (typeof timer.unref === "function") timer.unref();
402
440
  };
403
- void tick();
404
- schedule(baseIntervalMs);
441
+ schedule(0);
405
442
  return () => {
406
443
  running = false;
407
444
  if (timer) clearTimeout(timer);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-KTFZKXRE.js";
3
+ } from "./chunk-NMQLY4PE.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-AQFEP65J.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-Z73AKQYU.js";
12
+ } from "./chunk-3LS3GFJW.js";
13
13
  import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord
16
- } from "./chunk-JD6HIO7N.js";
16
+ } from "./chunk-7FQL5NWJ.js";
17
17
 
18
18
  // src/shell-alias.ts
19
19
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-JD6HIO7N.js";
3
+ } from "./chunk-7FQL5NWJ.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-MKYICE44.js";
3
+ } from "./chunk-UPRNSD2T.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-AQFEP65J.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-JD6HIO7N.js";
9
+ } from "./chunk-7FQL5NWJ.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-DXFMP37X.js";
3
+ } from "./chunk-WFPXKCN4.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-H7F2IN22.js";
6
+ } from "./chunk-DCBSD22V.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-MKYICE44.js";
9
+ } from "./chunk-UPRNSD2T.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-AQFEP65J.js";
13
13
  import {
14
14
  isValidApiKey
15
- } from "./chunk-JD6HIO7N.js";
15
+ } from "./chunk-7FQL5NWJ.js";
16
16
 
17
17
  // src/shared-mcp-key.ts
18
18
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  MCP_BRIDGE_BINARY
3
- } from "./chunk-GF45OS6U.js";
3
+ } from "./chunk-UDECNZYI.js";
4
4
  import {
5
5
  KEY_FILE_MODE
6
- } from "./chunk-H7F2IN22.js";
6
+ } from "./chunk-DCBSD22V.js";
7
7
  import {
8
8
  NpmMissingError,
9
9
  NpmPermissionError
10
- } from "./chunk-MKYICE44.js";
10
+ } from "./chunk-UPRNSD2T.js";
11
11
  import {
12
12
  readJsonSafe,
13
13
  writeFileAtomic,
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-AQFEP65J.js";
16
16
  import {
17
17
  NPX_LATEST_COMMAND
18
- } from "./chunk-7OMOUQSU.js";
18
+ } from "./chunk-45OXG3VR.js";
19
19
 
20
20
  // src/instruction-file.ts
21
21
  import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
@@ -37,7 +37,7 @@ You have Pushary MCP tools that reach the user on their phone. Use them proactiv
37
37
  - Use \`cancel_question\` to retract a pending question once it is no longer needed.
38
38
  - Respect the user's Pushary delivery mode: it decides where an approval is surfaced (phone, terminal, or awareness only), not whether it is required. In Terminal mode do not expect a phone answer; the approval waits in the terminal. If the Pushary hook already gated an action, a single approval is enough, do not ask again.
39
39
 
40
- Pass \`agentName\` as "${label} - <project folder name>" so the user knows which session is asking. If a question times out, follow \`handoffAction\` when present, otherwise \`nextAction\`: poll once, then cancel a live phone question before asking in the current client. If cancellation returns \`handoffAction: "stop"\`, stop. Otherwise, if cancellation returns false, poll once for 1 second and honor the answer that won the race.`;
40
+ Pass \`agentName\` as "${label} - <project folder name>" so the user knows which session is asking. If a question times out, follow \`handoffAction\` when present, otherwise \`nextAction\`: keep waiting with the same correlationId while pending. A poll ending is not question expiry. Cancel only for an explicit handoff or when the answer is no longer needed. If cancellation returns \`handoffAction: "stop"\`, stop. Otherwise, if cancellation returns false, poll once for 1 second and honor the answer that won the race.`;
41
41
  var SHARED_AGENTS_MD_LABEL = "<your agent's name, such as Codex or Hermes>";
42
42
  var renderAgentInstructions = (label) => instructionBody(label);
43
43
  var KEYLESS_FALLBACK_LINE = "This repo uses Pushary phone approvals. Your teammates get agent questions on their lock screens; you do not have a key yet, so questions will fall back to the terminal. Get your own key (3-day trial): https://pushary.com/sign-up?utm_source=agents-md&utm_medium=teammate";
@@ -4,10 +4,10 @@ import {
4
4
  keyPrefix,
5
5
  readConfigFileKey,
6
6
  readMacAppKeyPrefix
7
- } from "./chunk-H7F2IN22.js";
7
+ } from "./chunk-DCBSD22V.js";
8
8
  import {
9
9
  NPX_LATEST_COMMAND
10
- } from "./chunk-7OMOUQSU.js";
10
+ } from "./chunk-45OXG3VR.js";
11
11
 
12
12
  // src/key-signed-out.ts
13
13
  var VERDICT_BY_CHECK = {
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-H7F2IN22.js";
7
+ } from "./chunk-DCBSD22V.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-YTVNKMOA.js";
10
+ } from "./chunk-ULJFIF5N.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-MKYICE44.js";
14
+ } from "./chunk-UPRNSD2T.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-AQFEP65J.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-Z73AKQYU.js";
23
+ } from "./chunk-3LS3GFJW.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
@@ -28,7 +28,7 @@ import {
28
28
  globalPackageFolder,
29
29
  globalRootFor,
30
30
  isRecord
31
- } from "./chunk-JD6HIO7N.js";
31
+ } from "./chunk-7FQL5NWJ.js";
32
32
 
33
33
  // src/daemon-lifecycle.ts
34
34
  import { dirname, join, win32 as win32Path } from "path";
@@ -2,7 +2,7 @@ import {
2
2
  autoUpdateLock,
3
3
  installPackageGlobally,
4
4
  npmErrorMessage
5
- } from "./chunk-MKYICE44.js";
5
+ } from "./chunk-UPRNSD2T.js";
6
6
  import {
7
7
  writeJsonAtomic
8
8
  } from "./chunk-AQFEP65J.js";
@@ -6,12 +6,12 @@ import {
6
6
  permissionDeniedAction,
7
7
  releaseThrottle,
8
8
  reportEvent
9
- } from "./chunk-BQQQ4NP5.js";
9
+ } from "./chunk-SMRMWDFE.js";
10
10
  import {
11
11
  machineDecisionFor,
12
12
  shouldDeferToNativeMode,
13
13
  wireVerdictFor
14
- } from "./chunk-JD6HIO7N.js";
14
+ } from "./chunk-7FQL5NWJ.js";
15
15
 
16
16
  // src/machine-decision-audit.ts
17
17
  import { basename } from "path";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-ZLHBY5BV.js";
4
+ } from "./chunk-7S7H7V5V.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-I3N5LPFB.js";
7
+ } from "./chunk-6OGDGQTT.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-MKYICE44.js";
11
+ } from "./chunk-UPRNSD2T.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-JD6HIO7N.js";
14
+ } from "./chunk-7FQL5NWJ.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-7ENPTXR4.js";
3
+ } from "./chunk-7IVV4LLF.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-ALJEKG2D.js";
6
+ } from "./chunk-22YSHBTI.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-Z73AKQYU.js";
9
+ } from "./chunk-3LS3GFJW.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-SUXSVHCP.js";
3
+ } from "./chunk-A455TSHF.js";
4
4
  import {
5
5
  detectClaudeVersion
6
6
  } from "./chunk-RIVNNBEK.js";
@@ -12,7 +12,7 @@ import {
12
12
  openCodeHookArgv,
13
13
  openCodePluginDir,
14
14
  openCodeWired
15
- } from "./chunk-DXFMP37X.js";
15
+ } from "./chunk-WFPXKCN4.js";
16
16
  import {
17
17
  addClaudeMcpServer,
18
18
  addCompatibleHooks,
@@ -20,7 +20,7 @@ import {
20
20
  addPusharyToolPermissions,
21
21
  compatibleConfigFile,
22
22
  hasCompatibleHooks
23
- } from "./chunk-ZLHBY5BV.js";
23
+ } from "./chunk-7S7H7V5V.js";
24
24
  import {
25
25
  claudeUnprovenHolds,
26
26
  claudeWired,
@@ -28,7 +28,7 @@ import {
28
28
  codexWired,
29
29
  geminiWired,
30
30
  planHooks
31
- } from "./chunk-I3N5LPFB.js";
31
+ } from "./chunk-6OGDGQTT.js";
32
32
  import {
33
33
  CLAUDE_HOOK_BINARY,
34
34
  CLAUDE_HOOK_EVENTS,
@@ -39,7 +39,7 @@ import {
39
39
  needsReregistration,
40
40
  registrationSignatures,
41
41
  supportedClaudeEvents
42
- } from "./chunk-CBRLV3W7.js";
42
+ } from "./chunk-QJ3ENGBT.js";
43
43
  import {
44
44
  formatVersion
45
45
  } from "./chunk-6ICPEJY5.js";
@@ -63,7 +63,7 @@ import {
63
63
  resolveGlobalBinDir,
64
64
  resolveGlobalBinary,
65
65
  vscodePluginMcp
66
- } from "./chunk-MKYICE44.js";
66
+ } from "./chunk-UPRNSD2T.js";
67
67
  import {
68
68
  readJsonSafe,
69
69
  writeFileAtomic,
@@ -73,7 +73,7 @@ import {
73
73
  HOOK_COMPATIBLE_PROFILES,
74
74
  isCompatibleAgentType,
75
75
  isRecord
76
- } from "./chunk-JD6HIO7N.js";
76
+ } from "./chunk-7FQL5NWJ.js";
77
77
 
78
78
  // src/reapply.ts
79
79
  import { dirname, join } from "path";
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-HFRRSYTG.js";
6
+ } from "./chunk-CK3W7Q5S.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-BZ3GN2YK.js";
10
+ } from "./chunk-4PIAOJAW.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  defersToNativeMode,
3
3
  reportMachineDenial
4
- } from "./chunk-LBD7QQ2V.js";
4
+ } from "./chunk-FYQG2UTK.js";
5
5
  import {
6
6
  isGatingMoment,
7
7
  recordKeylessMoment
8
- } from "./chunk-BWPR75C3.js";
8
+ } from "./chunk-VTAC5FBZ.js";
9
9
  import {
10
10
  announceSubscriptionRequired,
11
11
  isDeferAnswer,
12
12
  oncePerSession
13
- } from "./chunk-ZVPADGCH.js";
13
+ } from "./chunk-NKAMF2YJ.js";
14
14
  import {
15
15
  activeHookSource,
16
16
  activeIdentity
17
- } from "./chunk-ZLHBY5BV.js";
17
+ } from "./chunk-7S7H7V5V.js";
18
18
  import {
19
19
  DEFAULT_SESSION,
20
20
  UNNAMED_ACTION,
@@ -39,7 +39,7 @@ import {
39
39
  reportEvent,
40
40
  scopePathFor,
41
41
  settleQuestionsForToolUse
42
- } from "./chunk-BQQQ4NP5.js";
42
+ } from "./chunk-SMRMWDFE.js";
43
43
  import {
44
44
  askUser,
45
45
  cancelQuestion,
@@ -52,20 +52,20 @@ import {
52
52
  sendNotification,
53
53
  waitForQuestion,
54
54
  waitsForThePhone
55
- } from "./chunk-LA6Q2BJF.js";
55
+ } from "./chunk-OZMGO4WF.js";
56
56
  import {
57
57
  SubscriptionRequiredError
58
- } from "./chunk-UOVREWK3.js";
58
+ } from "./chunk-H52HBSOD.js";
59
59
  import {
60
60
  getMachineId
61
- } from "./chunk-YTVNKMOA.js";
61
+ } from "./chunk-ULJFIF5N.js";
62
62
  import {
63
63
  getApiKey,
64
64
  getBaseUrl
65
- } from "./chunk-Z73AKQYU.js";
65
+ } from "./chunk-3LS3GFJW.js";
66
66
  import {
67
67
  NPX_LATEST_COMMAND
68
- } from "./chunk-7OMOUQSU.js";
68
+ } from "./chunk-45OXG3VR.js";
69
69
  import {
70
70
  AGENT_QUESTION_STRATEGY,
71
71
  DECISION_STOP_REASON,
@@ -110,7 +110,7 @@ import {
110
110
  resolveGate,
111
111
  timeoutActionWithoutLocalPrompt,
112
112
  unansweredRefusalReason
113
- } from "./chunk-JD6HIO7N.js";
113
+ } from "./chunk-7FQL5NWJ.js";
114
114
 
115
115
  // src/claude-permission-rules.ts
116
116
  import { readFileSync, statSync } from "fs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-DXFMP37X.js";
3
+ } from "./chunk-WFPXKCN4.js";
4
4
  import {
5
5
  codexHomeFrom,
6
6
  resolvePathBinary
7
- } from "./chunk-MKYICE44.js";
7
+ } from "./chunk-UPRNSD2T.js";
8
8
  import {
9
9
  HOOK_COMPATIBLE_PROFILES
10
- } from "./chunk-JD6HIO7N.js";
10
+ } from "./chunk-7FQL5NWJ.js";
11
11
 
12
12
  // src/hermes-config.ts
13
13
  import { execFileSync } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-K7NUD23S.js";
7
+ } from "./chunk-FQQSW7MD.js";
8
8
  import {
9
9
  describeAutoUpdateCheck,
10
10
  globalInstallLocation,
@@ -14,7 +14,7 @@ import {
14
14
  readAutoUpdateState,
15
15
  updateAutoUpdateState,
16
16
  upgradeEntryFor
17
- } from "./chunk-L5WCPMWZ.js";
17
+ } from "./chunk-7UGGCTTW.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
@@ -27,10 +27,10 @@ import {
27
27
  npmErrorMessage,
28
28
  readGlobalCliInstallAt,
29
29
  readGlobalPrefix
30
- } from "./chunk-MKYICE44.js";
30
+ } from "./chunk-UPRNSD2T.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-7OMOUQSU.js";
33
+ } from "./chunk-45OXG3VR.js";
34
34
  import {
35
35
  commandsPackage,
36
36
  globalUpgradeEntry,
@@ -39,7 +39,7 @@ import {
39
39
  isSameMajorVersion,
40
40
  ownPackageRoot,
41
41
  packageVersionAt
42
- } from "./chunk-JD6HIO7N.js";
42
+ } from "./chunk-7FQL5NWJ.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-BQQQ4NP5.js";
3
+ } from "./chunk-SMRMWDFE.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";