@pushary/agent-hooks 0.83.2 → 0.84.1

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 (64) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/dist/bin/pushary-bell-hook.js +5 -5
  3. package/dist/bin/pushary-bell.js +15 -14
  4. package/dist/bin/pushary-claude.js +93 -143
  5. package/dist/bin/pushary-clean.js +13 -12
  6. package/dist/bin/pushary-codex-bridge.d.ts +1 -0
  7. package/dist/bin/pushary-codex-bridge.js +349 -0
  8. package/dist/bin/pushary-codex-hook.js +18 -14
  9. package/dist/bin/pushary-codex.js +7 -7
  10. package/dist/bin/pushary-connect.js +13 -12
  11. package/dist/bin/pushary-daemon.js +331 -41
  12. package/dist/bin/pushary-doctor.js +48 -25
  13. package/dist/bin/pushary-gemini-bridge.d.ts +1 -0
  14. package/dist/bin/pushary-gemini-bridge.js +299 -0
  15. package/dist/bin/pushary-gemini-hook.js +28 -21
  16. package/dist/bin/pushary-hook.js +14 -13
  17. package/dist/bin/pushary-login.js +15 -14
  18. package/dist/bin/pushary-logout.js +12 -11
  19. package/dist/bin/pushary-mode.js +10 -9
  20. package/dist/bin/pushary-notification-hook.js +5 -5
  21. package/dist/bin/pushary-permission-denied-hook.js +9 -9
  22. package/dist/bin/pushary-permission-hook.js +9 -9
  23. package/dist/bin/pushary-post-hook.js +5 -5
  24. package/dist/bin/pushary-prompt-hook.js +5 -5
  25. package/dist/bin/pushary-session-end-hook.js +5 -5
  26. package/dist/bin/pushary-session-start-hook.js +5 -5
  27. package/dist/bin/pushary-setup.js +42 -36
  28. package/dist/bin/pushary-stats.js +6 -5
  29. package/dist/bin/pushary-status.js +17 -16
  30. package/dist/bin/pushary-stop-hook.js +5 -5
  31. package/dist/bin/pushary-stopfailure-hook.js +5 -5
  32. package/dist/bin/pushary-suggestions.js +7 -6
  33. package/dist/bin/pushary-upgrade.js +18 -17
  34. package/dist/bin/pushary-wait.js +10 -9
  35. package/dist/bin/pushary.js +8 -6
  36. package/dist/{chunk-SAA3VBDK.js → chunk-437T77TY.js} +3 -3
  37. package/dist/{chunk-U27BZWFT.js → chunk-6LC4WSCL.js} +1 -1
  38. package/dist/{chunk-7WWZPII5.js → chunk-7PZPJSWI.js} +1 -1
  39. package/dist/{chunk-4QQOKEOS.js → chunk-BLDDXHHA.js} +6 -6
  40. package/dist/{chunk-7PO2VEA4.js → chunk-CCCJ6BPW.js} +40 -34
  41. package/dist/chunk-CCH775Y6.js +343 -0
  42. package/dist/chunk-DINDL2CF.js +45 -0
  43. package/dist/{chunk-TXF4QZSQ.js → chunk-DOXSWT4Q.js} +1 -1
  44. package/dist/chunk-ERYKGH4J.js +140 -0
  45. package/dist/{chunk-QR6MVVQ7.js → chunk-F52SIIDG.js} +4 -4
  46. package/dist/{chunk-26D2YMDU.js → chunk-FBGBJXVC.js} +1 -1
  47. package/dist/chunk-GCKAWHFP.js +124 -0
  48. package/dist/{chunk-QF7WTF2C.js → chunk-HZNOAJGB.js} +2 -2
  49. package/dist/chunk-ILB6UOAF.js +192 -0
  50. package/dist/{chunk-RRZZ7TFJ.js → chunk-J4KFVOCQ.js} +4 -2
  51. package/dist/{chunk-WDRRULBH.js → chunk-K7CSRGKZ.js} +4 -4
  52. package/dist/{chunk-ZUKH2NPJ.js → chunk-MGJBC6DD.js} +1 -44
  53. package/dist/{chunk-GQLB2GBJ.js → chunk-MHBC2XUP.js} +1 -1
  54. package/dist/{chunk-YWRJGYUH.js → chunk-MQMPG5X4.js} +28 -2
  55. package/dist/{chunk-3AGM3TDM.js → chunk-NJ7JT26G.js} +1 -1
  56. package/dist/chunk-NRGRUOAR.js +25 -0
  57. package/dist/{chunk-EHLTWCDZ.js → chunk-SEAHGHCE.js} +1 -1
  58. package/dist/{chunk-NDC3TBHI.js → chunk-UKSQWTBH.js} +1 -1
  59. package/dist/{chunk-UVAC2KHH.js → chunk-UXWEE3QI.js} +1 -1
  60. package/dist/{chunk-MUEW424A.js → chunk-VT4IVERX.js} +50 -3
  61. package/dist/{chunk-DHAZ6SOT.js → chunk-YR5TSPXB.js} +81 -25
  62. package/dist/src/index.d.ts +6 -3
  63. package/dist/src/index.js +9 -9
  64. package/package.json +3 -1
@@ -0,0 +1,299 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ LiveTranscriptRelay,
4
+ liveSessionSleep,
5
+ postLiveSession,
6
+ postLiveSessionUntilAccepted,
7
+ startLiveSessionHeartbeat
8
+ } from "../chunk-ERYKGH4J.js";
9
+ import "../chunk-GCKAWHFP.js";
10
+ import {
11
+ startProcessOwnership,
12
+ withSpawnProcessOwnership
13
+ } from "../chunk-ILB6UOAF.js";
14
+ import {
15
+ spawnClaude
16
+ } from "../chunk-XHKBHWLX.js";
17
+ import {
18
+ resolveBinary
19
+ } from "../chunk-VT4IVERX.js";
20
+ import "../chunk-SEAHGHCE.js";
21
+ import {
22
+ getMachineId
23
+ } from "../chunk-RN3NOEJF.js";
24
+ import "../chunk-6MTNS63X.js";
25
+ import {
26
+ getApiKey,
27
+ getBaseUrl
28
+ } from "../chunk-2UMNXADU.js";
29
+ import "../chunk-MQMPG5X4.js";
30
+
31
+ // bin/pushary-gemini-bridge.ts
32
+ import { existsSync } from "fs";
33
+
34
+ // src/gemini-bridge.ts
35
+ import { spawn } from "child_process";
36
+ import { randomUUID } from "crypto";
37
+ import { basename } from "path";
38
+ var MAX_STREAM_LINE = 1024 * 1024;
39
+ var MAX_TRANSCRIPT_TEXT = 32 * 1024;
40
+ var object = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
41
+ var string = (value) => typeof value === "string" && value.length > 0 ? value : null;
42
+ var geminiArgs = (options) => [
43
+ ...options.bridge.command.args ?? [],
44
+ ...options.bridge.model ? ["--model", options.bridge.model] : [],
45
+ options.startNew ? "--session-id" : "--resume",
46
+ options.sessionId,
47
+ "--output-format",
48
+ "stream-json",
49
+ "--prompt",
50
+ options.text
51
+ ];
52
+ var runGeminiTurn = (options) => new Promise((resolve, reject) => {
53
+ const spawnOptions = {
54
+ cwd: options.bridge.cwd,
55
+ env: { ...process.env, PUSHARY_GEMINI_BRIDGE: "1" },
56
+ stdio: ["ignore", "pipe", "pipe"],
57
+ windowsHide: true
58
+ };
59
+ const child = process.platform === "win32" ? spawnClaude(options.bridge.command.command, geminiArgs(options), spawnOptions) : spawn(options.bridge.command.command, geminiArgs(options), spawnOptions);
60
+ let buffer = "";
61
+ let assistant = "";
62
+ let initialized = false;
63
+ let successful = false;
64
+ let resultError = null;
65
+ let linkError;
66
+ let linking = null;
67
+ let settled = false;
68
+ const stop2 = () => {
69
+ if (child.exitCode == null) child.kill();
70
+ };
71
+ const fail = (error) => {
72
+ if (settled) return;
73
+ settled = true;
74
+ options.bridge.signal.removeEventListener("abort", stop2);
75
+ stop2();
76
+ reject(error instanceof Error ? error : new Error(String(error)));
77
+ };
78
+ const handle = (line) => {
79
+ let event;
80
+ try {
81
+ event = JSON.parse(line);
82
+ } catch {
83
+ return;
84
+ }
85
+ if (event.type === "init") {
86
+ if (event.session_id !== options.sessionId) {
87
+ fail(new Error("Gemini returned a different session id"));
88
+ return;
89
+ }
90
+ initialized = true;
91
+ linking ??= options.onSession().catch((error) => {
92
+ linkError = error;
93
+ stop2();
94
+ });
95
+ }
96
+ if (event.type === "message" && event.role === "assistant") {
97
+ const content = string(event.content);
98
+ if (content) assistant = `${assistant}${content}`.slice(0, MAX_TRANSCRIPT_TEXT);
99
+ }
100
+ if (event.type === "result") {
101
+ successful = event.status === "success";
102
+ resultError = string(object(event.error)?.message);
103
+ }
104
+ };
105
+ const read = (chunk) => {
106
+ buffer += chunk;
107
+ if (buffer.length > MAX_STREAM_LINE && !buffer.includes("\n")) {
108
+ fail(new Error("Gemini sent an oversized stream event"));
109
+ return;
110
+ }
111
+ let newline = buffer.indexOf("\n");
112
+ while (newline >= 0) {
113
+ const line = buffer.slice(0, newline);
114
+ buffer = buffer.slice(newline + 1);
115
+ if (line.length > MAX_STREAM_LINE) {
116
+ fail(new Error("Gemini sent an oversized stream event"));
117
+ return;
118
+ }
119
+ handle(line);
120
+ newline = buffer.indexOf("\n");
121
+ }
122
+ };
123
+ options.bridge.signal.addEventListener("abort", stop2, { once: true });
124
+ child.stdout?.setEncoding("utf8");
125
+ child.stdout?.on("data", (chunk) => read(String(chunk)));
126
+ child.stderr?.resume();
127
+ child.once("error", fail);
128
+ child.once("close", async (code) => {
129
+ if (settled) return;
130
+ await linking;
131
+ if (linkError) return fail(linkError);
132
+ settled = true;
133
+ options.bridge.signal.removeEventListener("abort", stop2);
134
+ if (options.bridge.signal.aborted) return resolve("aborted");
135
+ if (!initialized) return reject(new Error("Gemini did not initialize a session"));
136
+ if (code !== 0 || !successful) return reject(new Error(resultError ?? `Gemini exited with code ${code ?? "unknown"}`));
137
+ options.relay?.add({
138
+ type: "user",
139
+ uuid: `${options.commandId}-user`,
140
+ message: { role: "user", content: options.text }
141
+ });
142
+ if (assistant) {
143
+ options.relay?.add({
144
+ type: "assistant",
145
+ uuid: `${options.commandId}-assistant`,
146
+ message: { role: "assistant", content: assistant }
147
+ });
148
+ }
149
+ resolve("delivered");
150
+ });
151
+ });
152
+ var runGeminiBridge = async (options) => {
153
+ const sessionId = options.resumeSessionId ?? randomUUID();
154
+ const ownership = startProcessOwnership({ sessionId, pid: process.pid, spawnId: options.spawnId });
155
+ let linked = false;
156
+ let stopHeartbeat = () => {
157
+ };
158
+ let firstTurn = !options.resumeSessionId;
159
+ const relay = options.transcripts === false ? null : new LiveTranscriptRelay(options, sessionId);
160
+ const reportBody = (event, action) => ({
161
+ event,
162
+ action,
163
+ agentType: "gemini_cli",
164
+ agentName: `Gemini - ${basename(options.cwd)}`,
165
+ sessionId,
166
+ geminiSessionId: sessionId,
167
+ spawnId: options.spawnId,
168
+ machineId: options.machineId,
169
+ pid: process.pid,
170
+ cwd: options.cwd
171
+ });
172
+ const report = (event, action) => postLiveSession(options, "/api/agent/event", reportBody(event, action));
173
+ const link = async () => {
174
+ if (linked) return;
175
+ await postLiveSessionUntilAccepted(
176
+ options,
177
+ "/api/agent/event",
178
+ reportBody("session_start", options.resumeSessionId ? "Session resumed" : "Session started")
179
+ );
180
+ linked = true;
181
+ stopHeartbeat = startLiveSessionHeartbeat(options, reportBody("heartbeat", "Session online"));
182
+ };
183
+ const turn = (text, commandId) => {
184
+ const result = runGeminiTurn({
185
+ bridge: options,
186
+ sessionId,
187
+ text,
188
+ commandId,
189
+ startNew: firstTurn,
190
+ relay,
191
+ onSession: link
192
+ });
193
+ firstTurn = false;
194
+ return result;
195
+ };
196
+ try {
197
+ await ownership.ready;
198
+ if (options.resumeSessionId && !options.prompt) await link();
199
+ if (options.prompt) {
200
+ try {
201
+ await turn(options.prompt, `spawn-${options.spawnId}`);
202
+ } catch (error) {
203
+ if (!linked) throw error;
204
+ await report("turn_error", "Gemini turn failed").catch(() => null);
205
+ }
206
+ }
207
+ let pendingAck = null;
208
+ while (!options.signal.aborted) {
209
+ try {
210
+ if (pendingAck) {
211
+ const acknowledged = await postLiveSession(options, "/api/agent/command/ack", pendingAck);
212
+ if (acknowledged.ok) pendingAck = null;
213
+ }
214
+ if (pendingAck) {
215
+ await liveSessionSleep(options.pollIntervalMs ?? 2e3, options.signal);
216
+ continue;
217
+ }
218
+ const response = await postLiveSession(options, "/api/agent/command/drain", { sessionId, ackMode: true });
219
+ if (response.ok) {
220
+ const command = object((await response.json()).command);
221
+ const commandId = string(command?.id);
222
+ const text = string(command?.text);
223
+ if (commandId && text) {
224
+ try {
225
+ const outcome2 = await turn(text, commandId);
226
+ if (outcome2 === "aborted") break;
227
+ pendingAck = { commandId, state: "delivered" };
228
+ } catch (error) {
229
+ pendingAck = {
230
+ commandId,
231
+ state: "failed",
232
+ failureCode: "gemini_rejected",
233
+ failureMessage: (error instanceof Error ? error.message : String(error)).slice(0, 240)
234
+ };
235
+ }
236
+ }
237
+ }
238
+ } catch {
239
+ }
240
+ await relay?.flush();
241
+ await liveSessionSleep(options.pollIntervalMs ?? 2e3, options.signal);
242
+ }
243
+ await relay?.flush();
244
+ await report("session_closed", "Session stopped").catch(() => null);
245
+ return "stopped";
246
+ } catch (error) {
247
+ if (!linked && options.claimId) {
248
+ const message = error instanceof Error ? error.message : String(error);
249
+ for (let attempt = 0; attempt < 3; attempt++) {
250
+ const acknowledged = await postLiveSession(options, "/api/agent/spawn/ack", {
251
+ spawnId: options.spawnId,
252
+ claimId: options.claimId,
253
+ machineId: options.machineId,
254
+ state: "failed",
255
+ failure: {
256
+ code: "bridge_failed",
257
+ message: message.slice(0, 240),
258
+ retryable: false
259
+ }
260
+ }).catch(() => null);
261
+ if (acknowledged?.ok) break;
262
+ await liveSessionSleep(200 * (attempt + 1), options.signal);
263
+ }
264
+ }
265
+ await report("error", "Live bridge failed").catch(() => null);
266
+ return "failed";
267
+ } finally {
268
+ stopHeartbeat();
269
+ ownership.stop();
270
+ }
271
+ };
272
+
273
+ // bin/pushary-gemini-bridge.ts
274
+ var spawnId = process.env.PUSHARY_SPAWN_ID?.trim();
275
+ var requestedCwd = process.env.PUSHARY_BRIDGE_CWD?.trim();
276
+ if (!spawnId || !requestedCwd || !existsSync(requestedCwd)) {
277
+ process.stderr.write("[pushary] Gemini bridge received an invalid launch request\n");
278
+ process.exit(1);
279
+ }
280
+ var abort = new AbortController();
281
+ var signals = process.platform === "win32" ? ["SIGINT", "SIGTERM"] : ["SIGINT", "SIGTERM", "SIGHUP"];
282
+ var stop = () => abort.abort();
283
+ for (const signal of signals) process.on(signal, stop);
284
+ var outcome = await withSpawnProcessOwnership(spawnId, () => runGeminiBridge({
285
+ apiKey: getApiKey(),
286
+ baseUrl: getBaseUrl(),
287
+ machineId: getMachineId(),
288
+ spawnId,
289
+ claimId: process.env.PUSHARY_SPAWN_CLAIM_ID?.trim() || void 0,
290
+ cwd: requestedCwd,
291
+ prompt: process.env.PUSHARY_BRIDGE_PROMPT?.trim() || void 0,
292
+ model: process.env.PUSHARY_BRIDGE_MODEL?.trim() || void 0,
293
+ resumeSessionId: process.env.PUSHARY_BRIDGE_RESUME_SESSION_ID?.trim() || void 0,
294
+ command: { command: process.env.PUSHARY_GEMINI_COMMAND?.trim() || resolveBinary("gemini") || "gemini" },
295
+ signal: abort.signal,
296
+ transcripts: process.env.PUSHARY_TRANSCRIPTS === "1"
297
+ }));
298
+ for (const signal of signals) process.off(signal, stop);
299
+ process.exit(outcome === "stopped" ? 0 : 1);
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  isGatingMoment,
4
4
  recordKeylessMoment
5
- } from "../chunk-3AGM3TDM.js";
5
+ } from "../chunk-NJ7JT26G.js";
6
6
  import {
7
7
  KILL_REASON,
8
8
  denyReasonFrom,
9
9
  isDeferAnswer,
10
10
  resolveGate
11
- } from "../chunk-4QQOKEOS.js";
11
+ } from "../chunk-BLDDXHHA.js";
12
12
  import {
13
13
  DEFAULT_SESSION,
14
14
  askUser,
@@ -22,6 +22,7 @@ import {
22
22
  handlePostToolUse,
23
23
  handleStop,
24
24
  handleUserPrompt,
25
+ policyRequestFor,
25
26
  readLastPrompt,
26
27
  readLastUserPrompt,
27
28
  repoKeyFor,
@@ -30,24 +31,24 @@ import {
30
31
  scopePathFor,
31
32
  sendNotification,
32
33
  waitForAnswer
33
- } from "../chunk-7PO2VEA4.js";
34
+ } from "../chunk-CCCJ6BPW.js";
35
+ import {
36
+ getMachineId
37
+ } from "../chunk-RN3NOEJF.js";
34
38
  import "../chunk-BSZYIAZL.js";
35
39
  import "../chunk-SAF6HGAA.js";
36
- import "../chunk-SAA3VBDK.js";
40
+ import "../chunk-437T77TY.js";
37
41
  import "../chunk-7QLSKOSU.js";
42
+ import "../chunk-KZERVKTD.js";
43
+ import {
44
+ getApiKey
45
+ } from "../chunk-2UMNXADU.js";
38
46
  import {
39
47
  DECISION_LINE_MAX,
40
48
  effectiveWaitSeconds,
41
49
  hookWaitClamped,
42
50
  hookWaitDeadline
43
- } from "../chunk-YWRJGYUH.js";
44
- import {
45
- getMachineId
46
- } from "../chunk-RN3NOEJF.js";
47
- import {
48
- getApiKey
49
- } from "../chunk-2UMNXADU.js";
50
- import "../chunk-KZERVKTD.js";
51
+ } from "../chunk-MQMPG5X4.js";
51
52
 
52
53
  // bin/pushary-gemini-hook.ts
53
54
  import { basename } from "path";
@@ -55,6 +56,7 @@ import { basename } from "path";
55
56
  // src/gemini-adapter.ts
56
57
  import { isAbsolute, resolve } from "path";
57
58
  var GEMINI_AGENT = { type: "gemini_cli", label: "Gemini CLI" };
59
+ var geminiOwnsLifecycle = (bridge) => bridge !== "1";
58
60
  var GEMINI_TOOL_MAP = {
59
61
  run_shell_command: "Bash",
60
62
  write_file: "Write",
@@ -126,7 +128,8 @@ var pushQuestion = async (apiKey, input, lookup, waitSeconds, mode, pollInterval
126
128
  intent: readLastPrompt(input.session_id || DEFAULT_SESSION) ?? (input.transcript_path ? readLastUserPrompt(input.transcript_path) : void 0),
127
129
  action: description.slice(0, DECISION_LINE_MAX),
128
130
  blocker: deriveBlocker(mode),
129
- actionBody: deriveActionBody(input.tool_name ?? "", input.tool_input ?? {})
131
+ actionBody: deriveActionBody(input.tool_name ?? "", input.tool_input ?? {}),
132
+ repoKey: repoKeyFor(input.cwd)
130
133
  });
131
134
  if (result.suppressed || result.noDevices) {
132
135
  return {
@@ -218,8 +221,9 @@ var decideBeforeTool = async (input) => {
218
221
  }
219
222
  try {
220
223
  const modeState = await fetchModeState(apiKey, input.session_id);
224
+ const policyRequest = policyRequestFor("gemini_cli");
221
225
  const lookup = toGeminiPolicyLookup(input.tool_name ?? "", input.tool_input ?? {}, input.cwd);
222
- const config = await getPolicy(apiKey, modeState.policyVersion, "gemini_cli");
226
+ const config = await getPolicy(apiKey, modeState.policyVersion, policyRequest.agent, policyRequest.repoAware, input.session_id);
223
227
  const scopePath = modeState.scope ? scopePathFor(lookup.tool, lookup.input, input.cwd) : void 0;
224
228
  const verdict = resolveGate({
225
229
  modeState,
@@ -228,7 +232,8 @@ var decideBeforeTool = async (input) => {
228
232
  toolInputs: [lookup.input],
229
233
  scopePaths: scopePath ? [scopePath] : [],
230
234
  cwd: input.cwd,
231
- repoKey: repoKeyFor(input.cwd)
235
+ repoKey: repoKeyFor(input.cwd),
236
+ sessionId: input.session_id
232
237
  });
233
238
  if (verdict.kind === "kill") return geminiDeny(KILL_REASON);
234
239
  if (verdict.kind === "allow") return geminiAllow();
@@ -311,14 +316,16 @@ var main = async () => {
311
316
  }, GEMINI_AGENT);
312
317
  break;
313
318
  case "SessionEnd":
314
- await handleStop({
315
- cwd: input.cwd,
316
- session_id: input.session_id,
317
- transcript_path: input.transcript_path
318
- }, GEMINI_AGENT);
319
+ if (geminiOwnsLifecycle(process.env.PUSHARY_GEMINI_BRIDGE)) {
320
+ await handleStop({
321
+ cwd: input.cwd,
322
+ session_id: input.session_id,
323
+ transcript_path: input.transcript_path
324
+ }, GEMINI_AGENT);
325
+ }
319
326
  break;
320
327
  case "SessionStart":
321
- await reportSessionStart(input);
328
+ if (geminiOwnsLifecycle(process.env.PUSHARY_GEMINI_BRIDGE)) await reportSessionStart(input);
322
329
  break;
323
330
  default:
324
331
  break;
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePreToolUse
4
- } from "../chunk-DHAZ6SOT.js";
5
- import "../chunk-NDC3TBHI.js";
6
- import "../chunk-3AGM3TDM.js";
7
- import "../chunk-4QQOKEOS.js";
8
- import "../chunk-7PO2VEA4.js";
9
- import "../chunk-BSZYIAZL.js";
10
- import "../chunk-SAF6HGAA.js";
11
- import "../chunk-SAA3VBDK.js";
12
- import "../chunk-7QLSKOSU.js";
13
- import "../chunk-YWRJGYUH.js";
4
+ } from "../chunk-YR5TSPXB.js";
5
+ import "../chunk-UKSQWTBH.js";
6
+ import "../chunk-NJ7JT26G.js";
7
+ import "../chunk-BLDDXHHA.js";
8
+ import "../chunk-CCCJ6BPW.js";
14
9
  import "../chunk-RN3NOEJF.js";
15
10
  import {
16
11
  exitOnHelpFlag
17
- } from "../chunk-RRZZ7TFJ.js";
18
- import "../chunk-ZUKH2NPJ.js";
19
- import "../chunk-2UMNXADU.js";
12
+ } from "../chunk-J4KFVOCQ.js";
13
+ import "../chunk-MGJBC6DD.js";
14
+ import "../chunk-DINDL2CF.js";
15
+ import "../chunk-BSZYIAZL.js";
16
+ import "../chunk-SAF6HGAA.js";
17
+ import "../chunk-437T77TY.js";
18
+ import "../chunk-7QLSKOSU.js";
20
19
  import "../chunk-KZERVKTD.js";
20
+ import "../chunk-2UMNXADU.js";
21
+ import "../chunk-MQMPG5X4.js";
21
22
 
22
23
  // bin/pushary-hook.ts
23
24
  exitOnHelpFlag("hook");
@@ -6,37 +6,38 @@ import "../chunk-3EGEA4KH.js";
6
6
  import {
7
7
  checkApiKey,
8
8
  describeKeyCheck
9
- } from "../chunk-QR6MVVQ7.js";
9
+ } from "../chunk-F52SIIDG.js";
10
10
  import {
11
11
  createIo
12
12
  } from "../chunk-5RUIFDTP.js";
13
13
  import {
14
14
  readKeySource,
15
15
  writeKey
16
- } from "../chunk-WDRRULBH.js";
17
- import "../chunk-6MTNS63X.js";
16
+ } from "../chunk-K7CSRGKZ.js";
18
17
  import {
19
18
  parseFlags
20
19
  } from "../chunk-GMXKITVA.js";
20
+ import {
21
+ exitOnHelpFlag
22
+ } from "../chunk-J4KFVOCQ.js";
23
+ import "../chunk-MGJBC6DD.js";
21
24
  import "../chunk-BC3VCZ3E.js";
25
+ import {
26
+ getPackageVersion
27
+ } from "../chunk-DINDL2CF.js";
28
+ import "../chunk-6MTNS63X.js";
22
29
  import "../chunk-SAF6HGAA.js";
23
- import "../chunk-SAA3VBDK.js";
30
+ import "../chunk-437T77TY.js";
24
31
  import {
25
32
  UsageError
26
33
  } from "../chunk-7QLSKOSU.js";
27
- import {
28
- isValidApiKey
29
- } from "../chunk-YWRJGYUH.js";
30
- import {
31
- exitOnHelpFlag
32
- } from "../chunk-RRZZ7TFJ.js";
33
- import {
34
- getPackageVersion
35
- } from "../chunk-ZUKH2NPJ.js";
36
- import "../chunk-2UMNXADU.js";
37
34
  import {
38
35
  EXIT
39
36
  } from "../chunk-KZERVKTD.js";
37
+ import "../chunk-2UMNXADU.js";
38
+ import {
39
+ isValidApiKey
40
+ } from "../chunk-MQMPG5X4.js";
40
41
 
41
42
  // bin/pushary-login.ts
42
43
  exitOnHelpFlag("login");
@@ -4,34 +4,35 @@ import {
4
4
  codexConfigToml,
5
5
  cursorUserMcp,
6
6
  geminiSettings
7
- } from "../chunk-EHLTWCDZ.js";
7
+ } from "../chunk-SEAHGHCE.js";
8
8
  import {
9
9
  createIo
10
10
  } from "../chunk-5RUIFDTP.js";
11
11
  import {
12
12
  clearKey,
13
13
  readKeySource
14
- } from "../chunk-WDRRULBH.js";
15
- import "../chunk-6MTNS63X.js";
14
+ } from "../chunk-K7CSRGKZ.js";
16
15
  import {
17
16
  parseFlags
18
17
  } from "../chunk-GMXKITVA.js";
18
+ import {
19
+ exitOnHelpFlag
20
+ } from "../chunk-J4KFVOCQ.js";
21
+ import "../chunk-MGJBC6DD.js";
19
22
  import "../chunk-BC3VCZ3E.js";
20
- import "../chunk-SAA3VBDK.js";
23
+ import "../chunk-DINDL2CF.js";
24
+ import "../chunk-6MTNS63X.js";
25
+ import "../chunk-437T77TY.js";
21
26
  import {
22
27
  UsageError
23
28
  } from "../chunk-7QLSKOSU.js";
24
- import "../chunk-YWRJGYUH.js";
25
29
  import {
26
- exitOnHelpFlag
27
- } from "../chunk-RRZZ7TFJ.js";
28
- import "../chunk-ZUKH2NPJ.js";
30
+ EXIT
31
+ } from "../chunk-KZERVKTD.js";
29
32
  import {
30
33
  getBaseUrl
31
34
  } from "../chunk-2UMNXADU.js";
32
- import {
33
- EXIT
34
- } from "../chunk-KZERVKTD.js";
35
+ import "../chunk-MQMPG5X4.js";
35
36
 
36
37
  // bin/pushary-logout.ts
37
38
  import { existsSync } from "fs";
@@ -1,30 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnFailedResponse
4
- } from "../chunk-26D2YMDU.js";
5
- import "../chunk-QR6MVVQ7.js";
4
+ } from "../chunk-FBGBJXVC.js";
5
+ import "../chunk-F52SIIDG.js";
6
6
  import {
7
7
  createIo
8
8
  } from "../chunk-5RUIFDTP.js";
9
9
  import {
10
10
  rejectUnknownFlags
11
11
  } from "../chunk-GMXKITVA.js";
12
+ import {
13
+ exitOnHelpFlag
14
+ } from "../chunk-J4KFVOCQ.js";
15
+ import "../chunk-MGJBC6DD.js";
16
+ import "../chunk-DINDL2CF.js";
12
17
  import "../chunk-SAF6HGAA.js";
13
18
  import {
14
19
  UsageError
15
20
  } from "../chunk-7QLSKOSU.js";
16
- import "../chunk-YWRJGYUH.js";
17
21
  import {
18
- exitOnHelpFlag
19
- } from "../chunk-RRZZ7TFJ.js";
20
- import "../chunk-ZUKH2NPJ.js";
22
+ EXIT
23
+ } from "../chunk-KZERVKTD.js";
21
24
  import {
22
25
  getApiKey,
23
26
  getBaseUrl
24
27
  } from "../chunk-2UMNXADU.js";
25
- import {
26
- EXIT
27
- } from "../chunk-KZERVKTD.js";
28
+ import "../chunk-MQMPG5X4.js";
28
29
 
29
30
  // bin/pushary-mode.ts
30
31
  exitOnHelpFlag("mode");
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleNotification
4
- } from "../chunk-7PO2VEA4.js";
4
+ } from "../chunk-CCCJ6BPW.js";
5
+ import "../chunk-RN3NOEJF.js";
5
6
  import "../chunk-BSZYIAZL.js";
6
7
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-SAA3VBDK.js";
8
+ import "../chunk-437T77TY.js";
8
9
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-YWRJGYUH.js";
10
- import "../chunk-RN3NOEJF.js";
11
- import "../chunk-2UMNXADU.js";
12
10
  import "../chunk-KZERVKTD.js";
11
+ import "../chunk-2UMNXADU.js";
12
+ import "../chunk-MQMPG5X4.js";
13
13
 
14
14
  // bin/pushary-notification-hook.ts
15
15
  var main = async () => {
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePermissionDenied
4
- } from "../chunk-DHAZ6SOT.js";
5
- import "../chunk-NDC3TBHI.js";
6
- import "../chunk-3AGM3TDM.js";
7
- import "../chunk-4QQOKEOS.js";
8
- import "../chunk-7PO2VEA4.js";
4
+ } from "../chunk-YR5TSPXB.js";
5
+ import "../chunk-UKSQWTBH.js";
6
+ import "../chunk-NJ7JT26G.js";
7
+ import "../chunk-BLDDXHHA.js";
8
+ import "../chunk-CCCJ6BPW.js";
9
+ import "../chunk-RN3NOEJF.js";
9
10
  import "../chunk-BSZYIAZL.js";
10
11
  import "../chunk-SAF6HGAA.js";
11
- import "../chunk-SAA3VBDK.js";
12
+ import "../chunk-437T77TY.js";
12
13
  import "../chunk-7QLSKOSU.js";
13
- import "../chunk-YWRJGYUH.js";
14
- import "../chunk-RN3NOEJF.js";
15
- import "../chunk-2UMNXADU.js";
16
14
  import "../chunk-KZERVKTD.js";
15
+ import "../chunk-2UMNXADU.js";
16
+ import "../chunk-MQMPG5X4.js";
17
17
 
18
18
  // bin/pushary-permission-denied-hook.ts
19
19
  var main = async () => {
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePermissionRequest
4
- } from "../chunk-DHAZ6SOT.js";
5
- import "../chunk-NDC3TBHI.js";
6
- import "../chunk-3AGM3TDM.js";
7
- import "../chunk-4QQOKEOS.js";
8
- import "../chunk-7PO2VEA4.js";
4
+ } from "../chunk-YR5TSPXB.js";
5
+ import "../chunk-UKSQWTBH.js";
6
+ import "../chunk-NJ7JT26G.js";
7
+ import "../chunk-BLDDXHHA.js";
8
+ import "../chunk-CCCJ6BPW.js";
9
+ import "../chunk-RN3NOEJF.js";
9
10
  import "../chunk-BSZYIAZL.js";
10
11
  import "../chunk-SAF6HGAA.js";
11
- import "../chunk-SAA3VBDK.js";
12
+ import "../chunk-437T77TY.js";
12
13
  import "../chunk-7QLSKOSU.js";
13
- import "../chunk-YWRJGYUH.js";
14
- import "../chunk-RN3NOEJF.js";
15
- import "../chunk-2UMNXADU.js";
16
14
  import "../chunk-KZERVKTD.js";
15
+ import "../chunk-2UMNXADU.js";
16
+ import "../chunk-MQMPG5X4.js";
17
17
 
18
18
  // bin/pushary-permission-hook.ts
19
19
  var main = async () => {