@pushary/agent-hooks 0.95.0 → 0.95.2

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 (87) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +9 -0
  3. package/data/SKILL.md +31 -24
  4. package/data/cowork/SKILL.md +77 -0
  5. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  6. package/data/cursor-plugin/skills/pushary/SKILL.md +30 -23
  7. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  8. package/data/vscode-plugin/skills/pushary/SKILL.md +30 -23
  9. package/dist/bin/pushary-bell-hook.js +17 -16
  10. package/dist/bin/pushary-bell.js +7 -7
  11. package/dist/bin/pushary-claude.js +18 -17
  12. package/dist/bin/pushary-clean.js +16 -15
  13. package/dist/bin/pushary-codex-bridge.js +9 -9
  14. package/dist/bin/pushary-codex-hook.js +20 -19
  15. package/dist/bin/pushary-codex.js +7 -7
  16. package/dist/bin/pushary-connect.js +8 -8
  17. package/dist/bin/pushary-cowork.d.ts +1 -0
  18. package/dist/bin/pushary-cowork.js +37 -0
  19. package/dist/bin/pushary-daemon.js +22 -21
  20. package/dist/bin/pushary-disconnect.js +8 -8
  21. package/dist/bin/pushary-doctor.js +20 -20
  22. package/dist/bin/pushary-elicitation-hook.js +16 -15
  23. package/dist/bin/pushary-gemini-bridge.js +9 -9
  24. package/dist/bin/pushary-gemini-hook.js +19 -18
  25. package/dist/bin/pushary-hook.js +23 -22
  26. package/dist/bin/pushary-login.js +11 -10
  27. package/dist/bin/pushary-logout.js +6 -6
  28. package/dist/bin/pushary-mode.js +5 -5
  29. package/dist/bin/pushary-notification-hook.js +18 -17
  30. package/dist/bin/pushary-opencode-hook.js +19 -18
  31. package/dist/bin/pushary-permission-denied-hook.js +21 -20
  32. package/dist/bin/pushary-permission-hook.js +21 -20
  33. package/dist/bin/pushary-post-hook.js +18 -17
  34. package/dist/bin/pushary-prompt-hook.js +18 -17
  35. package/dist/bin/pushary-session-end-hook.js +18 -17
  36. package/dist/bin/pushary-session-start-hook.js +21 -20
  37. package/dist/bin/pushary-setup.js +39 -27
  38. package/dist/bin/pushary-stats.js +4 -4
  39. package/dist/bin/pushary-status.js +10 -10
  40. package/dist/bin/pushary-stop-hook.js +18 -17
  41. package/dist/bin/pushary-stopfailure-hook.js +18 -17
  42. package/dist/bin/pushary-suggestions.js +2 -2
  43. package/dist/bin/pushary-transcript-register.js +15 -14
  44. package/dist/bin/pushary-transcripts.js +6 -6
  45. package/dist/bin/pushary-upgrade.js +15 -15
  46. package/dist/bin/pushary-wait.js +5 -5
  47. package/dist/bin/pushary.js +2 -1
  48. package/dist/{chunk-GHCGSEPE.js → chunk-2XUPP4WM.js} +1 -1
  49. package/dist/chunk-3ZUTNTZA.js +133 -0
  50. package/dist/{chunk-AYJ7NH5S.js → chunk-4XXUHWIK.js} +1 -1
  51. package/dist/chunk-5GLPYGKS.js +88 -0
  52. package/dist/{chunk-Z6CP5ZZD.js → chunk-6FAHPGCZ.js} +30 -0
  53. package/dist/{chunk-FH3YLP5Z.js → chunk-76XICHYT.js} +3 -3
  54. package/dist/{chunk-BMOFXRGS.js → chunk-7LUFYRH4.js} +3 -3
  55. package/dist/{chunk-OYNPLEXP.js → chunk-A4R6BZCK.js} +1 -1
  56. package/dist/{chunk-ROHFVGXM.js → chunk-AMZJ3CKW.js} +1 -1
  57. package/dist/{chunk-5SJ54JJO.js → chunk-CH6DTGQR.js} +3 -3
  58. package/dist/{chunk-4PE2SQVM.js → chunk-CKOLDI47.js} +1 -1
  59. package/dist/{chunk-OXTRFRMD.js → chunk-DNVDKHQD.js} +5 -5
  60. package/dist/{chunk-BSEAOCCQ.js → chunk-E3NF5CL2.js} +1 -1
  61. package/dist/{chunk-QGA2ZB4I.js → chunk-EPFDN2ZT.js} +1 -1
  62. package/dist/{chunk-2ORRI66J.js → chunk-EUAQ4YAN.js} +1 -1
  63. package/dist/{chunk-SFCGKE6U.js → chunk-FQUV5KTM.js} +6 -6
  64. package/dist/{chunk-MDQOBG5J.js → chunk-G24SEVCI.js} +7 -6
  65. package/dist/{chunk-LSXJH2HB.js → chunk-G4TL4YWH.js} +1 -1
  66. package/dist/{chunk-Z3Z4VK5F.js → chunk-GKIUEIDX.js} +4 -33
  67. package/dist/{chunk-6BIMJIRG.js → chunk-GUVCYYDK.js} +1 -1
  68. package/dist/{chunk-NVPYRDCT.js → chunk-IAEXPTXA.js} +1 -1
  69. package/dist/{chunk-Q5UFC2QK.js → chunk-IPHOUBTU.js} +1 -1
  70. package/dist/{chunk-UZFVNEEU.js → chunk-JDFB3YKG.js} +1 -1
  71. package/dist/{chunk-TDUTNYAQ.js → chunk-M7WWEFG6.js} +1 -1
  72. package/dist/{chunk-BVBEURWJ.js → chunk-MOY5X6HJ.js} +1 -1
  73. package/dist/chunk-PUZZELE6.js +37 -0
  74. package/dist/{chunk-2WVDQVI5.js → chunk-QF4RI5CD.js} +1 -1
  75. package/dist/{chunk-RH3TM7TO.js → chunk-QUE76J4H.js} +1 -1
  76. package/dist/{chunk-ZTJF6ANY.js → chunk-RVSEGFPD.js} +2 -2
  77. package/dist/{chunk-6LQAGVG2.js → chunk-UOTSWS5N.js} +7 -7
  78. package/dist/{chunk-YGZXYEVY.js → chunk-UW4LWAWY.js} +6 -6
  79. package/dist/{chunk-Y3UGCQQC.js → chunk-V27AHID3.js} +1 -1
  80. package/dist/{chunk-XY4GSZ3K.js → chunk-VX3BWMC5.js} +1 -1
  81. package/dist/{chunk-Y6XXFXVB.js → chunk-WB2C7VPF.js} +1 -1
  82. package/dist/{chunk-GI5UQSG7.js → chunk-WM5XMCID.js} +5 -131
  83. package/dist/{chunk-ODL52O5V.js → chunk-X7YWD6IS.js} +1 -1
  84. package/dist/{chunk-WY4ALDYN.js → chunk-YJAQRKH5.js} +1 -1
  85. package/dist/{chunk-43GMYSS4.js → chunk-ZDAT5KMU.js} +12 -0
  86. package/dist/src/index.js +10 -10
  87. package/package.json +2 -1
@@ -1,3 +1,26 @@
1
+ // ../contracts/src/claude-connector.ts
2
+ var CLAUDE_CONNECTOR_URL = "https://pushary.com/api/mcp/mcp";
3
+ var CLAUDE_CONNECTOR_GUIDE = "https://pushary.com/docs/agents/guides/claude-desktop";
4
+ var COWORK_CONNECTOR_LIMIT = "Pushary\u2019s Cowork connector is cooperative: Claude chooses when to ask. It does not intercept Claude\u2019s native permission prompts or start new Cowork tasks.";
5
+ var CLAUDE_CONNECTOR_STEPS = [
6
+ "In Claude, open Customize > Connectors > Add custom connector and paste the Pushary connector URL.",
7
+ "Leave OAuth Client ID and Secret empty. Sign in with the same Pushary account used by your phone and Mac app.",
8
+ "Enable Pushary in the Chat or Cowork conversation. Approve access to its tools if Claude asks.",
9
+ "For proactive Cowork use, install the Pushary Cowork plugin/skill or paste the standing instructions into Settings > Cowork.",
10
+ "Ask Claude to send the test question below, answer it from Pushary, and confirm Claude receives your answer."
11
+ ];
12
+ var CLAUDE_CONNECTOR_TEST = "Use Pushary ask_user to ask \u201CDid this setup question reach you?\u201D with type \u201Cconfirm\u201D. Use agentName \u201CClaude Cowork - Setup check\u201D in Cowork or \u201CClaude Chat - Setup check\u201D in Chat. Wait for my answer and tell me which answer you received. Do not run a command or change any files.";
13
+ var COWORK_STANDING_INSTRUCTIONS = `Pushary is connected as a custom connector. Use it proactively to reach me on my phone or Mac notch.
14
+
15
+ - When you need a decision or clarifying answer, call ask_user. Use type "confirm", "select", or "input" as appropriate. Ask once on one channel.
16
+ - Before a risky or irreversible action outside my existing authorization, call ask_user with type "confirm" and wait for approval. Silence is never consent.
17
+ - When a task finishes, call send_notification with context.type "task_complete" and a short summary. For an error you cannot resolve, use context.type "error"; use "info" for other updates.
18
+ - Only keep a reply channel open when a specific unresolved decision is required: call send_notification with context.askQuestion, then poll the returned linkedCorrelationId with wait_for_answer. Do not ask for optional feedback just to keep a finished turn alive.
19
+ - Follow handoffAction when present, otherwise nextAction. If ask_user times out on a live question, poll once with wait_for_answer. If still pending, cancel_question before asking in the current chat. If cancellation returns handoffAction "stop", stop. If cancellation returns false, poll once for 1 second and honor the answer that won the race. Expired, cancelled, missing, and unavailable questions are not new timeouts.
20
+ - Pass agentName as "Claude Cowork - <task name>" on every call, and reuse one opaque sessionId per task so parallel tasks stay separate. Never include credentials in these identifiers.
21
+ - Cancel a question when it is no longer needed. Once this turn ends, reopen Cowork for follow-up work; this connector cannot restart it.
22
+ - If Pushary tools are missing or disabled, report that once and continue within my authorization. Do not claim a notification or approval was delivered.`;
23
+
1
24
  // ../contracts/src/index.ts
2
25
  var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
3
26
  var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
@@ -120,6 +143,7 @@ var effectiveWaitSeconds = (timeoutAction, policySeconds, agent) => timeoutActio
120
143
  var HOOK_SOURCES = ["claude", "codex", "gemini", "cursor", "vscode", "opencode"];
121
144
  var AGENT_LABELS_BY_TYPE = {
122
145
  claude_code: "Claude Code",
146
+ claude_chat: "Claude Chat",
123
147
  claude_cowork: "Claude Cowork",
124
148
  codex: "Codex",
125
149
  chatgpt: "ChatGPT",
@@ -1349,6 +1373,12 @@ var elicitationContentFromAnswers = (ask, answers) => {
1349
1373
  };
1350
1374
 
1351
1375
  export {
1376
+ CLAUDE_CONNECTOR_URL,
1377
+ CLAUDE_CONNECTOR_GUIDE,
1378
+ COWORK_CONNECTOR_LIMIT,
1379
+ CLAUDE_CONNECTOR_STEPS,
1380
+ CLAUDE_CONNECTOR_TEST,
1381
+ COWORK_STANDING_INSTRUCTIONS,
1352
1382
  normalizeKeyScope,
1353
1383
  parseAgentQuestions,
1354
1384
  parseAgentQuestionAnswers,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  supportedClaudeEvents
4
- } from "./chunk-BMOFXRGS.js";
4
+ } from "./chunk-7LUFYRH4.js";
5
5
  import {
6
6
  guardBinary
7
7
  } from "./chunk-EZIEXHYM.js";
8
8
  import {
9
9
  isProtectedByScope
10
- } from "./chunk-Y6XXFXVB.js";
10
+ } from "./chunk-WB2C7VPF.js";
11
11
  import {
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-Z6CP5ZZD.js";
13
+ } from "./chunk-6FAHPGCZ.js";
14
14
 
15
15
  // src/claude-config.ts
16
16
  import { join } from "path";
@@ -3,14 +3,14 @@ import {
3
3
  POSTTOOLUSE_MIRRORED_TOOLS,
4
4
  PRETOOLUSE_GATED_TOOLS,
5
5
  PRETOOLUSE_PHONE_ANSWERED_TOOLS
6
- } from "./chunk-Y3UGCQQC.js";
6
+ } from "./chunk-V27AHID3.js";
7
7
  import {
8
8
  isProtectedByScope
9
- } from "./chunk-Y6XXFXVB.js";
9
+ } from "./chunk-WB2C7VPF.js";
10
10
  import {
11
11
  HOOK_BUDGETS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-Z6CP5ZZD.js";
13
+ } from "./chunk-6FAHPGCZ.js";
14
14
 
15
15
  // src/gemini-config.ts
16
16
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldDeferToNativeMode
3
- } from "./chunk-Z6CP5ZZD.js";
3
+ } from "./chunk-6FAHPGCZ.js";
4
4
 
5
5
  // src/native-defer.ts
6
6
  var nativeDeferOptions = () => {
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-EYRGBYZG.js";
16
16
  import {
17
17
  reportedInstallSource
18
- } from "./chunk-ODL52O5V.js";
18
+ } from "./chunk-X7YWD6IS.js";
19
19
 
20
20
  // src/reach.ts
21
21
  var reachVerdict = (channels) => {
@@ -2,15 +2,15 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-BMOFXRGS.js";
5
+ } from "./chunk-7LUFYRH4.js";
6
6
  import {
7
7
  CODEX_HOOK_EVENTS,
8
8
  hasCodexHooks
9
- } from "./chunk-Y6XXFXVB.js";
9
+ } from "./chunk-WB2C7VPF.js";
10
10
  import {
11
11
  CURSOR_GATE_EVENTS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-Z6CP5ZZD.js";
13
+ } from "./chunk-6FAHPGCZ.js";
14
14
 
15
15
  // src/diagnostics/wiring.ts
16
16
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -5,7 +5,7 @@ import {
5
5
  FILE_TARGET_TOOLS,
6
6
  redactSecrets,
7
7
  redactSecretsDeep
8
- } from "./chunk-Z6CP5ZZD.js";
8
+ } from "./chunk-6FAHPGCZ.js";
9
9
 
10
10
  // ../hook-mapping/src/describe.ts
11
11
  import { isAbsolute, relative, resolve } from "path";
@@ -34,20 +34,20 @@ import {
34
34
  summarizeStop,
35
35
  taskTitleFrom,
36
36
  toolResultErrorText
37
- } from "./chunk-4PE2SQVM.js";
37
+ } from "./chunk-CKOLDI47.js";
38
38
  import {
39
39
  NOTIFICATION_PUSH_TYPES,
40
40
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
41
- } from "./chunk-Y3UGCQQC.js";
41
+ } from "./chunk-V27AHID3.js";
42
42
  import {
43
43
  getMachineId
44
- } from "./chunk-NVPYRDCT.js";
44
+ } from "./chunk-IAEXPTXA.js";
45
45
  import {
46
46
  withRetry
47
47
  } from "./chunk-EYRGBYZG.js";
48
48
  import {
49
49
  reportedInstallSource
50
- } from "./chunk-ODL52O5V.js";
50
+ } from "./chunk-X7YWD6IS.js";
51
51
  import {
52
52
  getApiKey,
53
53
  getBaseUrl
@@ -63,7 +63,7 @@ import {
63
63
  pendingCommandEvents,
64
64
  resolveAutoResolveOrigin,
65
65
  resolvePolicy
66
- } from "./chunk-Z6CP5ZZD.js";
66
+ } from "./chunk-6FAHPGCZ.js";
67
67
 
68
68
  // src/policy.ts
69
69
  import { createHash } from "crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_BUDGETS,
3
3
  OPENCODE_APPROVAL_EVENT
4
- } from "./chunk-Z6CP5ZZD.js";
4
+ } from "./chunk-6FAHPGCZ.js";
5
5
 
6
6
  // src/opencode-plugin.ts
7
7
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getMachineId
3
- } from "./chunk-NVPYRDCT.js";
3
+ } from "./chunk-IAEXPTXA.js";
4
4
  import {
5
5
  getPackageVersion
6
6
  } from "./chunk-DINDL2CF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-Z6CP5ZZD.js";
3
+ } from "./chunk-6FAHPGCZ.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  detectClaudeVersion
3
- } from "./chunk-LSXJH2HB.js";
3
+ } from "./chunk-G4TL4YWH.js";
4
4
  import {
5
5
  addClaudeMcpServer,
6
6
  addPusharyHooks,
7
7
  addPusharyToolPermissions
8
- } from "./chunk-FH3YLP5Z.js";
8
+ } from "./chunk-76XICHYT.js";
9
9
  import {
10
10
  claudeWired,
11
11
  codexWired,
12
12
  geminiWired
13
- } from "./chunk-5SJ54JJO.js";
13
+ } from "./chunk-CH6DTGQR.js";
14
14
  import {
15
15
  CLAUDE_HOOK_EVENTS,
16
16
  GEMINI_HOOK_BINARY,
@@ -21,7 +21,7 @@ import {
21
21
  needsReregistration,
22
22
  registrationSignatures,
23
23
  supportedClaudeEvents
24
- } from "./chunk-BMOFXRGS.js";
24
+ } from "./chunk-7LUFYRH4.js";
25
25
  import {
26
26
  guardBinary
27
27
  } from "./chunk-EZIEXHYM.js";
@@ -40,14 +40,14 @@ import {
40
40
  codexHooksJson,
41
41
  hasCodexHooks,
42
42
  vscodePluginMcp
43
- } from "./chunk-Y6XXFXVB.js";
43
+ } from "./chunk-WB2C7VPF.js";
44
44
  import {
45
45
  readJsonSafe,
46
46
  writeJsonAtomic
47
47
  } from "./chunk-4LL6LG5X.js";
48
48
  import {
49
49
  HOOK_LOCATOR_BINARY
50
- } from "./chunk-Z6CP5ZZD.js";
50
+ } from "./chunk-6FAHPGCZ.js";
51
51
 
52
52
  // src/reapply.ts
53
53
  import { join } from "path";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-BSEAOCCQ.js";
3
+ } from "./chunk-E3NF5CL2.js";
4
4
  import {
5
5
  codexHomeFrom
6
- } from "./chunk-Y6XXFXVB.js";
6
+ } from "./chunk-WB2C7VPF.js";
7
7
 
8
8
  // src/vscode-config.ts
9
9
  import { homedir } from "os";
@@ -262,12 +262,13 @@ var instructionBody = (label) => `## Pushary notifications and approvals
262
262
 
263
263
  You have Pushary MCP tools that reach the user on their phone. Use them proactively. Do not wait for the user to ask.
264
264
 
265
- - When you need the user to make a decision or answer a clarifying question, call \`ask_user\` instead of guessing or stalling. Use type "confirm" for yes/no, "select" for a fixed set of options, and "input" for free text. \`ask_user\` blocks until the user replies or it times out, so you do not need a separate wait step.
265
+ - When you need the user to make a decision or answer a clarifying question, call \`ask_user\` instead of guessing or stalling. Use type "confirm" for yes/no, "select" for a fixed set of options, and "input" for free text. Read \`answered\`, \`status\` and the returned handoff instead of assuming the tool blocked. Silence is not consent; choice/text answers do not authorize a separate action.
266
266
  - Ask once, on one channel. If you also have a built-in way to prompt the user, use that or \`ask_user\` for a given question, never both. \`ask_user\` is the one that reaches the user when they are away from this machine, so prefer it. Raising both strands the user in whichever prompt you are not waiting on.
267
- - Before any risky or irreversible step (deleting files, force pushing, spending money, sending external messages), call \`ask_user\` with type "confirm" and wait for approval.
268
- - Before starting a multi-step run that will change several files, call \`propose_scope\` once with the paths you expect to change, anything you promise not to touch, and what done means. The user agrees to the boundary in one tap. A ratified boundary NARROWS what may proceed without asking, it does not pre-approve work inside it, so an action that would normally need approval still needs it. Skip it for a single quick edit, and do not propose a new scope mid-run just to widen one: if you need to go outside the agreed scope, do the work and let the approval that follows widen it.
267
+ - Honor authorization already granted in this session. Ask before a risky or irreversible action outside that authorization, or when an enforced host policy requires it. Do not ask again for an already authorized step, and never bypass an enforced gate.
268
+ - Call \`propose_scope\` only for an unresolved or requested file boundary. A ratified scope narrows what may proceed; it does not bypass other approval rules. Do not add a plan approval merely because work spans several files, and do not propose a new scope mid-run just to widen it. Let the installed gate request any scope expansion before the edit executes.
269
269
  - When you are blocked, stuck, or hit an error you cannot resolve on your own, call \`send_notification\` so the user knows, and call \`ask_user\` if you need a decision to continue.
270
- - When a task that took several steps finishes, call \`send_notification\` so the user knows it is done. Always pass \`context\` with a \`type\` of "task_complete", "error" or "info": it is what tells Pushary this is a task update, so the user's own setting for where updates land can route it.
270
+ - When meaningful work finishes while the user is away, or they requested an alert, call \`send_notification\` so the user knows it is done. Skip trivial completions and duplicate reports to someone already reading. Always pass \`context\` with a \`type\` of "task_complete", "error" or "info": it is what tells Pushary this is a task update, so the user's own setting for where updates land can route it.
271
+ - Confirm notifications can offer lock-screen actions; arbitrary choices and text open the app. The Mac notch handles personal account questions, not Partner customer enrollment.
271
272
  - Use \`cancel_question\` to retract a pending question once it is no longer needed.
272
273
  - 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.
273
274
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseVersion
3
- } from "./chunk-BMOFXRGS.js";
3
+ } from "./chunk-7LUFYRH4.js";
4
4
 
5
5
  // src/setup/agent-probe.ts
6
6
  import { execSync } from "child_process";
@@ -1,3 +1,7 @@
1
+ import {
2
+ canOpenBrowser,
3
+ openInBrowser
4
+ } from "./chunk-PUZZELE6.js";
1
5
  import {
2
6
  generateKeypair,
3
7
  openSealedKey,
@@ -10,39 +14,6 @@ import {
10
14
  // src/cli/login-ui.ts
11
15
  import { hostname } from "os";
12
16
 
13
- // src/cli/browser.ts
14
- import { spawn } from "child_process";
15
- var command = () => {
16
- if (process.platform === "darwin") return { bin: "open", args: [] };
17
- if (process.platform === "win32") return { bin: "cmd", args: ["/c", "start", ""] };
18
- if (process.platform === "linux") return { bin: "xdg-open", args: [] };
19
- return null;
20
- };
21
- var canOpenBrowser = () => {
22
- if (process.env.PUSHARY_NO_BROWSER === "1") return false;
23
- if (process.env.CI) return false;
24
- if (process.env.SSH_TTY) return false;
25
- if (process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) return false;
26
- return command() !== null;
27
- };
28
- var openInBrowser = (url) => {
29
- const resolved = command();
30
- if (!resolved) return false;
31
- try {
32
- const child = spawn(resolved.bin, [...resolved.args, url], {
33
- stdio: "ignore",
34
- detached: true,
35
- windowsHide: true
36
- });
37
- child.unref();
38
- child.on("error", () => {
39
- });
40
- return true;
41
- } catch {
42
- return false;
43
- }
44
- };
45
-
46
17
  // src/cli/login.ts
47
18
  var START_PATH = "/api/cli/auth/start";
48
19
  var CLAIM_PATH = "/api/cli/auth/claim";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BC3VCZ3E.js";
4
4
  import {
5
5
  resolveInstallSourceFor
6
- } from "./chunk-ODL52O5V.js";
6
+ } from "./chunk-X7YWD6IS.js";
7
7
  import {
8
8
  backupFile,
9
9
  readJsonSafe,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-Y6XXFXVB.js";
3
+ } from "./chunk-WB2C7VPF.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-4LL6LG5X.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecrets
3
- } from "./chunk-Z6CP5ZZD.js";
3
+ } from "./chunk-6FAHPGCZ.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-Z6CP5ZZD.js";
16
+ } from "./chunk-6FAHPGCZ.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-Y6XXFXVB.js";
3
+ } from "./chunk-WB2C7VPF.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-4LL6LG5X.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-43GMYSS4.js";
3
+ } from "./chunk-ZDAT5KMU.js";
4
4
  import {
5
5
  getPackageVersion
6
6
  } from "./chunk-DINDL2CF.js";
@@ -0,0 +1,37 @@
1
+ // src/cli/browser.ts
2
+ import { spawn } from "child_process";
3
+ var command = () => {
4
+ if (process.platform === "darwin") return { bin: "open", args: [] };
5
+ if (process.platform === "win32") return { bin: "cmd", args: ["/c", "start", ""] };
6
+ if (process.platform === "linux") return { bin: "xdg-open", args: [] };
7
+ return null;
8
+ };
9
+ var canOpenBrowser = () => {
10
+ if (process.env.PUSHARY_NO_BROWSER === "1") return false;
11
+ if (process.env.CI) return false;
12
+ if (process.env.SSH_TTY) return false;
13
+ if (process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) return false;
14
+ return command() !== null;
15
+ };
16
+ var openInBrowser = (url) => {
17
+ const resolved = command();
18
+ if (!resolved) return false;
19
+ try {
20
+ const child = spawn(resolved.bin, [...resolved.args, url], {
21
+ stdio: "ignore",
22
+ detached: true,
23
+ windowsHide: true
24
+ });
25
+ child.unref();
26
+ child.on("error", () => {
27
+ });
28
+ return true;
29
+ } catch {
30
+ return false;
31
+ }
32
+ };
33
+
34
+ export {
35
+ canOpenBrowser,
36
+ openInBrowser
37
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-6BIMJIRG.js";
3
+ } from "./chunk-GUVCYYDK.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-6BIMJIRG.js";
3
+ } from "./chunk-GUVCYYDK.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-L4ZCFMWW.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-NVPYRDCT.js";
10
+ } from "./chunk-IAEXPTXA.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-Y6XXFXVB.js";
13
+ } from "./chunk-WB2C7VPF.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-DINDL2CF.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  defersToNativeMode
3
- } from "./chunk-OYNPLEXP.js";
3
+ } from "./chunk-A4R6BZCK.js";
4
4
  import {
5
5
  isGatingMoment,
6
6
  recordKeylessMoment
7
- } from "./chunk-2ORRI66J.js";
7
+ } from "./chunk-EUAQ4YAN.js";
8
8
  import {
9
9
  denyReasonFrom,
10
10
  isDeferAnswer
@@ -19,7 +19,7 @@ import {
19
19
  reportEvent,
20
20
  settleQuestionsForToolUse,
21
21
  throttlePass
22
- } from "./chunk-OXTRFRMD.js";
22
+ } from "./chunk-DNVDKHQD.js";
23
23
  import {
24
24
  DEFAULT_SESSION,
25
25
  askUser,
@@ -37,14 +37,14 @@ import {
37
37
  describeToolCall,
38
38
  permissionDeniedAction,
39
39
  scopePathFor
40
- } from "./chunk-4PE2SQVM.js";
40
+ } from "./chunk-CKOLDI47.js";
41
41
  import {
42
42
  PRETOOLUSE_HANDLED_TOOLS,
43
43
  PRETOOLUSE_PHONE_ANSWERED_TOOLS
44
- } from "./chunk-Y3UGCQQC.js";
44
+ } from "./chunk-V27AHID3.js";
45
45
  import {
46
46
  getMachineId
47
- } from "./chunk-NVPYRDCT.js";
47
+ } from "./chunk-IAEXPTXA.js";
48
48
  import {
49
49
  getApiKey,
50
50
  getBaseUrl
@@ -61,7 +61,7 @@ import {
61
61
  parseAgentQuestions,
62
62
  resolveGate,
63
63
  stoppedOutput
64
- } from "./chunk-Z6CP5ZZD.js";
64
+ } from "./chunk-6FAHPGCZ.js";
65
65
 
66
66
  // src/decision-episode.ts
67
67
  var EPISODE_PATH = "/api/agent/decision-episode";
@@ -6,16 +6,16 @@ import {
6
6
  } from "./chunk-YKLCWWEI.js";
7
7
  import {
8
8
  hookOwnerOf
9
- } from "./chunk-GI5UQSG7.js";
9
+ } from "./chunk-WM5XMCID.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-ZTJF6ANY.js";
12
+ } from "./chunk-RVSEGFPD.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-Q5UFC2QK.js";
18
+ } from "./chunk-IPHOUBTU.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
@@ -23,14 +23,14 @@ import {
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-2WVDQVI5.js";
26
+ } from "./chunk-QF4RI5CD.js";
27
27
  import {
28
28
  codexHome,
29
29
  pusharyDir
30
- } from "./chunk-Y6XXFXVB.js";
30
+ } from "./chunk-WB2C7VPF.js";
31
31
  import {
32
32
  readTranscriptPreference
33
- } from "./chunk-6BIMJIRG.js";
33
+ } from "./chunk-GUVCYYDK.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-4LL6LG5X.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ASKED_IN_EVERY_MODE_TOOLS
3
- } from "./chunk-Z6CP5ZZD.js";
3
+ } from "./chunk-6FAHPGCZ.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var PRETOOLUSE_GATED_TOOLS = [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-YGZXYEVY.js";
3
+ } from "./chunk-UW4LWAWY.js";
4
4
 
5
5
  // src/admission.ts
6
6
  import { readFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_BUDGETS,
3
3
  HOOK_LOCATOR_BINARY
4
- } from "./chunk-Z6CP5ZZD.js";
4
+ } from "./chunk-6FAHPGCZ.js";
5
5
 
6
6
  // src/removal-scope.ts
7
7
  var namesAppLocator = (command) => command.includes(HOOK_LOCATOR_BINARY);