@pushary/agent-hooks 0.95.4 → 0.95.6
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.
- package/CHANGELOG.md +14 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +5 -0
- package/data/cursor-plugin/README.md +1 -1
- package/data/cursor-plugin/scripts/pushary-gate.mjs +5 -2
- package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
- package/data/vscode-plugin/CHANGELOG.md +5 -0
- package/data/vscode-plugin/README.md +1 -1
- package/data/vscode-plugin/scripts/pushary-gate.mjs +14 -3
- package/dist/bin/pushary-bell-hook.js +20 -20
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +29 -24
- package/dist/bin/pushary-clean.js +20 -20
- package/dist/bin/pushary-codex-bridge.js +10 -10
- package/dist/bin/pushary-codex-hook.js +24 -24
- package/dist/bin/pushary-codex.js +8 -8
- package/dist/bin/pushary-connect.js +8 -8
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +26 -26
- package/dist/bin/pushary-disconnect.js +11 -10
- package/dist/bin/pushary-doctor.js +89 -35
- package/dist/bin/pushary-elicitation-hook.js +20 -20
- package/dist/bin/pushary-gemini-bridge.js +9 -9
- package/dist/bin/pushary-gemini-hook.js +23 -23
- package/dist/bin/pushary-hook.js +27 -27
- package/dist/bin/pushary-login.js +9 -9
- package/dist/bin/pushary-logout.js +6 -6
- package/dist/bin/pushary-mode.js +5 -5
- package/dist/bin/pushary-notification-hook.js +22 -22
- package/dist/bin/pushary-opencode-hook.js +23 -23
- package/dist/bin/pushary-permission-denied-hook.js +25 -25
- package/dist/bin/pushary-permission-hook.js +25 -25
- package/dist/bin/pushary-post-hook.js +22 -22
- package/dist/bin/pushary-prompt-hook.js +22 -22
- package/dist/bin/pushary-session-end-hook.js +22 -22
- package/dist/bin/pushary-session-start-hook.js +25 -25
- package/dist/bin/pushary-setup.js +62 -42
- package/dist/bin/pushary-stats.js +4 -4
- package/dist/bin/pushary-status.js +14 -10
- package/dist/bin/pushary-stop-hook.js +22 -22
- package/dist/bin/pushary-stopfailure-hook.js +22 -22
- package/dist/bin/pushary-suggestions.js +2 -2
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +17 -17
- package/dist/bin/pushary-wait.js +5 -5
- package/dist/bin/pushary.js +1 -1
- package/dist/{chunk-EEJ6EQMI.js → chunk-32WFHA77.js} +1 -1
- package/dist/{chunk-YE37HYN3.js → chunk-32WWVRXN.js} +3 -14
- package/dist/{chunk-GGX5QTBG.js → chunk-3AJIK5AO.js} +4 -1
- package/dist/{chunk-PFRLYYF6.js → chunk-43TFQOAT.js} +1 -1
- package/dist/{chunk-MDDKA4QM.js → chunk-4XFBO3GW.js} +1 -1
- package/dist/{chunk-KT2CGUOE.js → chunk-6II5RBAS.js} +1 -1
- package/dist/{chunk-3N4FT4WQ.js → chunk-6MRPTYYH.js} +1 -1
- package/dist/{chunk-ND52YE7L.js → chunk-7N3D4GN7.js} +4 -4
- package/dist/{chunk-TMOCSYJK.js → chunk-A2M6FGUF.js} +3 -3
- package/dist/{chunk-HPM47TEO.js → chunk-AXECWTTZ.js} +2 -2
- package/dist/{chunk-MZOTKCNZ.js → chunk-BS5XR4J7.js} +4 -4
- package/dist/{chunk-O7ODXFII.js → chunk-C7BFOC35.js} +2 -2
- package/dist/{chunk-TKA2L2BU.js → chunk-CDBTCEKE.js} +5 -5
- package/dist/{chunk-JDNW6FTV.js → chunk-DH4INZW3.js} +1 -1
- package/dist/{chunk-6BNBW3M2.js → chunk-DSCGKZO5.js} +2 -2
- package/dist/{chunk-W5GH5GTX.js → chunk-FBO5WS3D.js} +1 -1
- package/dist/{chunk-U24ERDPE.js → chunk-FHIVWF4B.js} +13 -15
- package/dist/{chunk-HTWQH3VI.js → chunk-FVTFSYKB.js} +1 -1
- package/dist/{chunk-HJYGC7IR.js → chunk-GOPIMNVC.js} +1 -1
- package/dist/{chunk-DLLAWCQB.js → chunk-GOQHN2UH.js} +1 -1
- package/dist/{chunk-LVU3Q43J.js → chunk-HBBQO77U.js} +1 -1
- package/dist/{chunk-CVZP67ST.js → chunk-HHODMHTH.js} +4 -4
- package/dist/{chunk-3OXHYPZG.js → chunk-HKQ6CD32.js} +4 -1
- package/dist/{chunk-TGORRMOU.js → chunk-JZSWA3VT.js} +1 -1
- package/dist/{chunk-MNWDOXX6.js → chunk-KAWLZTRJ.js} +1 -1
- package/dist/{chunk-7W6E3C3I.js → chunk-KNIVXEW4.js} +1 -1
- package/dist/{chunk-D6PRC3YQ.js → chunk-LZQVAEWP.js} +2 -1
- package/dist/{chunk-JAKWHALW.js → chunk-O5RQ7RYJ.js} +90 -18
- package/dist/{chunk-TR6DBXO3.js → chunk-OIZVYUED.js} +1 -1
- package/dist/{chunk-V4G7BQZ6.js → chunk-R4MBUCPQ.js} +1 -1
- package/dist/{chunk-XDHJ4KZJ.js → chunk-RPHXG4HI.js} +2 -2
- package/dist/{chunk-J5KTLGO5.js → chunk-SLVXQOYU.js} +1 -1
- package/dist/{chunk-AGQA72IH.js → chunk-SRFA5BOO.js} +1 -1
- package/dist/{chunk-7VVX6HQG.js → chunk-VZADMT7R.js} +219 -17
- package/dist/{chunk-J6NAWJTQ.js → chunk-WRK6RAA5.js} +47 -4
- package/dist/{chunk-ZKDQ3QRP.js → chunk-WZ63WTAZ.js} +1 -1
- package/dist/{chunk-57NOPUBK.js → chunk-XJ6CXTSB.js} +8 -8
- package/dist/{chunk-4NJURLRP.js → chunk-XKIB2FQY.js} +8 -8
- package/dist/{chunk-2BE7ZVWP.js → chunk-XS33QBJA.js} +15 -3
- package/dist/{chunk-MQO7J2OJ.js → chunk-ZJ6QXXBC.js} +10 -7
- package/dist/{chunk-XIVPHGV4.js → chunk-ZQREURP6.js} +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +11 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.95.6
|
|
4
|
+
|
|
5
|
+
- Separate synthetic answer tests from real hook activation and report the actual answering surface.
|
|
6
|
+
- Cancel known pending diagnostic questions on interrupted or unanswered exits without fabricating approval.
|
|
7
|
+
- Add Claude Code activation evidence for a unique scratch-file approval, correlated with the observed tool result.
|
|
8
|
+
- Report managed-control readiness separately from hook configuration and phone delivery, refreshing credentials, service state and remote proof after interactive waits.
|
|
9
|
+
|
|
10
|
+
## 0.95.5
|
|
11
|
+
|
|
12
|
+
- Preserve the full approval window while allowing the final poll time to return; keep late denials and cancellation authoritative.
|
|
13
|
+
- Bundle corrected VS Code read classification and Cursor file-gate fallback, including native shell/MCP prompts when a gate script is missing.
|
|
14
|
+
- Share Claude hook ownership with the server to avoid duplicate decisions while retaining native-mode handoff.
|
|
15
|
+
- Keep supported-agent setup guidance and policy scope aligned with the shared agent manifest.
|
|
16
|
+
|
|
3
17
|
## 0.95.4
|
|
4
18
|
|
|
5
19
|
- Keep inactive/offline login results truthful, with one JSON result and no duplicate key minting to recheck readiness.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "pushary",
|
|
3
3
|
"displayName": "Pushary — Control Panel for AI Agents",
|
|
4
4
|
"description": "Push notifications, human-in-the-loop questions, and permission gating for your AI coding agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.2",
|
|
6
6
|
"author": { "name": "Pushary", "email": "business@pushary.com" },
|
|
7
7
|
"homepage": "https://pushary.com",
|
|
8
8
|
"repository": "https://github.com/Pushary/cursor-plugin",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
- Allow file edits when the server explicitly says the action is not gated.
|
|
6
|
+
- Keep unresolved file checks denied with an accurate retry message, while shell/MCP hooks retain the native prompt.
|
|
7
|
+
|
|
3
8
|
## 0.2.0
|
|
4
9
|
|
|
5
10
|
The gate stopped carrying its own copy of the policy engine.
|
|
@@ -20,7 +20,7 @@ There are three things.
|
|
|
20
20
|
|
|
21
21
|
2. Ask. The agent asks you questions through push: yes or no, multiple choice, or free text. It waits for your answer. The bundled instructions guide the agent to use Pushary for questions. Native editor question dialogs are not automatically intercepted.
|
|
22
22
|
|
|
23
|
-
3. Gate. Shell commands, file writes/edits/deletes, and third-party MCP calls reach your Pushary policy before execution. The policy can approve, deny, or wait for your answer. Cancelled or unverifiable decisions stop the action. Cursor’s generic file-tool hook does not enforce `ask`, so
|
|
23
|
+
3. Gate. Shell commands, file writes/edits/deletes, and third-party MCP calls reach your Pushary policy before execution. The policy can approve, deny, or wait for your answer. Cancelled or unverifiable decisions stop the action. Cursor’s generic file-tool hook does not enforce `ask`, so an unresolved file action is denied. File actions explicitly marked `not_gated` by the server proceed; shell/MCP hooks can hand off to Cursor’s prompt.
|
|
24
24
|
|
|
25
25
|
## Install
|
|
26
26
|
|
|
@@ -22,6 +22,9 @@ const ALLOW = { permission: 'allow' }
|
|
|
22
22
|
let genericToolHook = false
|
|
23
23
|
const ask = (agentMessage) => genericToolHook ? deny(agentMessage ?? 'Approval requires a user decision. Ask through Pushary, then retry.') : (agentMessage ? { permission: 'ask', agent_message: agentMessage } : { permission: 'ask' })
|
|
24
24
|
const deny = (agentMessage) => ({ permission: 'deny', user_message: 'Command denied via Pushary.', agent_message: agentMessage })
|
|
25
|
+
const unresolved = (verdict) => genericToolHook && verdict?.reason === 'not_gated'
|
|
26
|
+
? ALLOW
|
|
27
|
+
: ask(genericToolHook ? 'Pushary could not reach a verdict for this change. Retry shortly.' : undefined)
|
|
25
28
|
|
|
26
29
|
let activeQuestion
|
|
27
30
|
let done = false
|
|
@@ -623,7 +626,7 @@ setTimeout(async () => {
|
|
|
623
626
|
const verdict = await decide(apiKey, request, input.cwd, sessionId)
|
|
624
627
|
|
|
625
628
|
// Native shell/MCP prompts can take over; generic file hooks must deny ask.
|
|
626
|
-
if (!verdict || verdict.kind === 'no_opinion') return respond(
|
|
629
|
+
if (!verdict || verdict.kind === 'no_opinion') return respond(unresolved(verdict))
|
|
627
630
|
if (verdict.kind === 'kill') return respond(deny(verdict.reason))
|
|
628
631
|
if (verdict.kind === 'allow') return respond(ALLOW)
|
|
629
632
|
if (verdict.kind === 'deny') return respond(deny(verdict.reason))
|
|
@@ -644,7 +647,7 @@ setTimeout(async () => {
|
|
|
644
647
|
}
|
|
645
648
|
} catch (error) {
|
|
646
649
|
process.stderr.write(`[pushary-gate] ${error?.message ?? error}\n`)
|
|
647
|
-
return respond(
|
|
650
|
+
return respond(unresolved(null))
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
653
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushary",
|
|
3
3
|
"description": "Push notifications, human-in-the-loop questions, and permission gating for your AI agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pushary",
|
|
7
7
|
"email": "business@pushary.com",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
- Classify local reads, searches, diagnostics, and terminal/task output inspection as reads under the shared policy.
|
|
6
|
+
- Let known read-only tools proceed when no verdict is available; keep the native prompt for other tools.
|
|
7
|
+
|
|
3
8
|
## 0.2.0
|
|
4
9
|
|
|
5
10
|
The gate stopped carrying its own copy of the policy engine, and two defects went
|
|
@@ -98,7 +98,7 @@ Lifecycle hooks report session starts, turn completion, tool results, compaction
|
|
|
98
98
|
|
|
99
99
|
## Failure behavior
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Known read-only tools proceed when a missing API key or unavailable verdict prevents policy evaluation. Other tools fall back to `ask`, which hands the decision to VS Code's own approval prompt. A 55 second guard guarantees output before the hook's 60 second timeout.
|
|
102
102
|
|
|
103
103
|
## Cross-tool compatibility
|
|
104
104
|
|
|
@@ -38,6 +38,16 @@ const TERMINAL_TOOLS = new Set([
|
|
|
38
38
|
|
|
39
39
|
const normalizeToolName = (name) => name.toLowerCase().replace(/[^a-z0-9]/g, '')
|
|
40
40
|
|
|
41
|
+
const READ_ONLY_TOOLS = new Set([
|
|
42
|
+
'readfile', 'viewimage', 'listdir', 'listdirectory', 'filesearch', 'findfiles', 'grepsearch', 'findtextinfiles',
|
|
43
|
+
'semanticsearch', 'searchcodebase', 'searchworkspacesymbols', 'geterrors', 'getchangedfiles', 'readprojectstructure',
|
|
44
|
+
'getnotebooksummary', 'readnotebookcelloutput', 'testsearch', 'findtestfiles', 'testfailure', 'getvscodeapi',
|
|
45
|
+
'getterminaloutput', 'gettaskoutput', 'terminalselection', 'terminallastcommand',
|
|
46
|
+
])
|
|
47
|
+
|
|
48
|
+
export const isReadOnlyTool = (toolName) =>
|
|
49
|
+
typeof toolName === 'string' && READ_ONLY_TOOLS.has(normalizeToolName(toolName.replace(/^copilot_/, '')))
|
|
50
|
+
|
|
41
51
|
// ── VS Code decisions ─────────────────────────────────────────────────────────
|
|
42
52
|
const PASS = { continue: true }
|
|
43
53
|
const decision = (permissionDecision, permissionDecisionReason) => ({
|
|
@@ -50,6 +60,7 @@ const decision = (permissionDecision, permissionDecisionReason) => ({
|
|
|
50
60
|
const ALLOW = decision('allow')
|
|
51
61
|
const ask = (reason) => decision('ask', reason)
|
|
52
62
|
const deny = (reason) => decision('deny', reason)
|
|
63
|
+
const unresolved = (toolName, reason) => (isReadOnlyTool(toolName) ? PASS : ask(reason))
|
|
53
64
|
|
|
54
65
|
let activeQuestion
|
|
55
66
|
let done = false
|
|
@@ -648,7 +659,7 @@ const main = async () => {
|
|
|
648
659
|
if (!apiKey) {
|
|
649
660
|
diag('no API key found (PUSHARY_API_KEY, the plugin .mcp.json, or ~/.pushary/config.json). Run: npx @pushary/agent-hooks setup')
|
|
650
661
|
return respond(
|
|
651
|
-
|
|
662
|
+
unresolved(input.tool_name, 'Pushary is not configured: run `npx @pushary/agent-hooks setup` (get a key at https://pushary.com) to route this approval to your phone.')
|
|
652
663
|
)
|
|
653
664
|
}
|
|
654
665
|
|
|
@@ -661,7 +672,7 @@ const main = async () => {
|
|
|
661
672
|
|
|
662
673
|
// No verdict, or one that says nothing: VS Code's own prompt decides, exactly
|
|
663
674
|
// as if this gate were not installed. Never a forced denial on an outage.
|
|
664
|
-
if (!verdict || verdict.kind === 'no_opinion') return respond(
|
|
675
|
+
if (!verdict || verdict.kind === 'no_opinion') return respond(unresolved(input.tool_name))
|
|
665
676
|
if (verdict.kind === 'kill') return respond(deny(verdict.reason))
|
|
666
677
|
if (verdict.kind === 'allow') return respond(ALLOW)
|
|
667
678
|
if (verdict.kind === 'deny') return respond(deny(verdict.reason))
|
|
@@ -682,7 +693,7 @@ const main = async () => {
|
|
|
682
693
|
}
|
|
683
694
|
} catch (error) {
|
|
684
695
|
diag(describeNetworkFailure(error))
|
|
685
|
-
return respond(
|
|
696
|
+
return respond(unresolved(input.tool_name))
|
|
686
697
|
}
|
|
687
698
|
}
|
|
688
699
|
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-SLVXQOYU.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-R4MBUCPQ.js";
|
|
8
|
+
import "../chunk-XKIB2FQY.js";
|
|
9
|
+
import "../chunk-WZ63WTAZ.js";
|
|
10
|
+
import "../chunk-BS5XR4J7.js";
|
|
11
|
+
import "../chunk-4XFBO3GW.js";
|
|
12
|
+
import "../chunk-FVTFSYKB.js";
|
|
13
|
+
import "../chunk-A2M6FGUF.js";
|
|
14
|
+
import "../chunk-7N3D4GN7.js";
|
|
15
|
+
import "../chunk-CDBTCEKE.js";
|
|
16
|
+
import "../chunk-GOPIMNVC.js";
|
|
17
|
+
import "../chunk-3AJIK5AO.js";
|
|
18
|
+
import "../chunk-DH4INZW3.js";
|
|
19
19
|
import "../chunk-EQRS3SGM.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-JZSWA3VT.js";
|
|
21
21
|
import "../chunk-XHKBHWLX.js";
|
|
22
22
|
import "../chunk-L4ZCFMWW.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-32WWVRXN.js";
|
|
24
|
+
import "../chunk-C7BFOC35.js";
|
|
25
|
+
import "../chunk-FBO5WS3D.js";
|
|
26
26
|
import "../chunk-GMXKITVA.js";
|
|
27
27
|
import "../chunk-DINDL2CF.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-6MRPTYYH.js";
|
|
29
29
|
import "../chunk-7QLSKOSU.js";
|
|
30
30
|
import "../chunk-KZERVKTD.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-KAWLZTRJ.js";
|
|
32
32
|
import "../chunk-2UMNXADU.js";
|
|
33
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-VZADMT7R.js";
|
|
34
34
|
|
|
35
35
|
// bin/pushary-bell-hook.ts
|
|
36
36
|
var main = async () => {
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,29 +5,29 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-SLVXQOYU.js";
|
|
9
9
|
import {
|
|
10
10
|
addBellHooks,
|
|
11
11
|
bellInstalled,
|
|
12
12
|
removeBellHooks
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-GOPIMNVC.js";
|
|
14
|
+
import "../chunk-3AJIK5AO.js";
|
|
15
15
|
import "../chunk-L4ZCFMWW.js";
|
|
16
16
|
import {
|
|
17
17
|
claudeSettings
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-FBO5WS3D.js";
|
|
19
19
|
import {
|
|
20
20
|
createIo
|
|
21
21
|
} from "../chunk-5RUIFDTP.js";
|
|
22
22
|
import {
|
|
23
23
|
exitOnHelpFlag
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
} from "../chunk-GOQHN2UH.js";
|
|
25
|
+
import "../chunk-LZQVAEWP.js";
|
|
26
26
|
import {
|
|
27
27
|
parseFlags
|
|
28
28
|
} from "../chunk-GMXKITVA.js";
|
|
29
29
|
import "../chunk-DINDL2CF.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-6MRPTYYH.js";
|
|
31
31
|
import "../chunk-7QLSKOSU.js";
|
|
32
32
|
import {
|
|
33
33
|
EXIT
|
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
readJsonSafe,
|
|
37
37
|
writeJsonAtomic
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-KAWLZTRJ.js";
|
|
39
39
|
import "../chunk-2UMNXADU.js";
|
|
40
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-VZADMT7R.js";
|
|
41
41
|
|
|
42
42
|
// bin/pushary-bell.ts
|
|
43
43
|
exitOnHelpFlag("bell");
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
describeIdleWindow,
|
|
9
9
|
startProcessOwnership,
|
|
10
10
|
withSpawnProcessOwnership
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-DSCGKZO5.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer
|
|
14
14
|
} from "../chunk-YHG74UFF.js";
|
|
@@ -17,25 +17,25 @@ import {
|
|
|
17
17
|
loadSessionKey,
|
|
18
18
|
registerTranscript,
|
|
19
19
|
registeredTranscriptEnabled
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-XKIB2FQY.js";
|
|
21
|
+
import "../chunk-WZ63WTAZ.js";
|
|
22
|
+
import "../chunk-BS5XR4J7.js";
|
|
23
|
+
import "../chunk-4XFBO3GW.js";
|
|
24
|
+
import "../chunk-FVTFSYKB.js";
|
|
25
|
+
import "../chunk-A2M6FGUF.js";
|
|
26
26
|
import {
|
|
27
27
|
ensureDaemonRunning
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-7N3D4GN7.js";
|
|
29
|
+
import "../chunk-CDBTCEKE.js";
|
|
30
|
+
import "../chunk-GOPIMNVC.js";
|
|
31
|
+
import "../chunk-3AJIK5AO.js";
|
|
32
32
|
import {
|
|
33
33
|
encryptRecord
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-DH4INZW3.js";
|
|
35
35
|
import "../chunk-EQRS3SGM.js";
|
|
36
36
|
import {
|
|
37
37
|
transcriptsEnabled
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-JZSWA3VT.js";
|
|
39
39
|
import {
|
|
40
40
|
needsShell,
|
|
41
41
|
spawnClaude
|
|
@@ -54,35 +54,36 @@ import {
|
|
|
54
54
|
repoKeyFor,
|
|
55
55
|
reportEvent,
|
|
56
56
|
savePendingCommand
|
|
57
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-ZJ6QXXBC.js";
|
|
58
58
|
import {
|
|
59
59
|
DECISION_STOP_REASON,
|
|
60
60
|
askUser,
|
|
61
61
|
cancelQuestion,
|
|
62
62
|
isDecisionStopped,
|
|
63
63
|
isLocalQuestionHandoff,
|
|
64
|
+
nextLongPollMs,
|
|
64
65
|
waitForAnswer,
|
|
65
66
|
withdrawQuestion
|
|
66
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-XS33QBJA.js";
|
|
67
68
|
import {
|
|
68
69
|
UNNAMED_ACTION,
|
|
69
70
|
deriveToolTarget,
|
|
70
71
|
describeToolCall,
|
|
71
72
|
scopePathFor
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import "../chunk-
|
|
73
|
+
} from "../chunk-HBBQO77U.js";
|
|
74
|
+
import "../chunk-32WWVRXN.js";
|
|
74
75
|
import {
|
|
75
76
|
getMachineId
|
|
76
|
-
} from "../chunk-
|
|
77
|
-
import "../chunk-
|
|
77
|
+
} from "../chunk-C7BFOC35.js";
|
|
78
|
+
import "../chunk-FBO5WS3D.js";
|
|
78
79
|
import "../chunk-GMXKITVA.js";
|
|
79
80
|
import "../chunk-DINDL2CF.js";
|
|
80
|
-
import "../chunk-
|
|
81
|
+
import "../chunk-6MRPTYYH.js";
|
|
81
82
|
import "../chunk-EYRGBYZG.js";
|
|
82
83
|
import "../chunk-SAF6HGAA.js";
|
|
83
84
|
import "../chunk-7QLSKOSU.js";
|
|
84
85
|
import "../chunk-KZERVKTD.js";
|
|
85
|
-
import "../chunk-
|
|
86
|
+
import "../chunk-KAWLZTRJ.js";
|
|
86
87
|
import {
|
|
87
88
|
getApiKey,
|
|
88
89
|
getBaseUrl
|
|
@@ -91,7 +92,7 @@ import {
|
|
|
91
92
|
KILL_REASON,
|
|
92
93
|
redactSecrets,
|
|
93
94
|
resolveGate
|
|
94
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-VZADMT7R.js";
|
|
95
96
|
|
|
96
97
|
// src/wrapper/localPassthrough.ts
|
|
97
98
|
var SIGNAL_NUMBERS = {
|
|
@@ -450,7 +451,11 @@ var createRemoteApprover = (deps) => {
|
|
|
450
451
|
const waitForPhone = async (entry, correlationId, windowMs) => {
|
|
451
452
|
const deadline = now() + windowMs;
|
|
452
453
|
while (now() < deadline && !entry.controller.signal.aborted) {
|
|
453
|
-
const
|
|
454
|
+
const hold = nextLongPollMs(deadline, now());
|
|
455
|
+
if (hold === null) {
|
|
456
|
+
await sleep(Math.min(500, Math.max(0, deadline - now())));
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
454
459
|
const abortPromise = new Promise((resolve) => {
|
|
455
460
|
entry.controller.signal.addEventListener("abort", () => resolve({ answered: false, aborted: true }), {
|
|
456
461
|
once: true
|
|
@@ -459,7 +464,7 @@ var createRemoteApprover = (deps) => {
|
|
|
459
464
|
let outcome;
|
|
460
465
|
try {
|
|
461
466
|
outcome = await Promise.race([
|
|
462
|
-
waitForAnswer2(deps.apiKey, correlationId,
|
|
467
|
+
waitForAnswer2(deps.apiKey, correlationId, hold, AbortSignal.any([entry.controller.signal, AbortSignal.timeout(Math.max(1, deadline - now()))])),
|
|
463
468
|
abortPromise
|
|
464
469
|
]);
|
|
465
470
|
} catch {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
shortenHome,
|
|
13
13
|
unregisterPluginLocation,
|
|
14
14
|
vscodeSettingsTargets
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-RPHXG4HI.js";
|
|
16
16
|
import {
|
|
17
17
|
OPENCODE_PLUGIN_SIBLING,
|
|
18
18
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -22,39 +22,39 @@ import {
|
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodePluginFile,
|
|
24
24
|
removeOpenCodeMcpServer
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-43TFQOAT.js";
|
|
26
26
|
import {
|
|
27
27
|
isClaudeMcpSnapshot,
|
|
28
28
|
removeClaudeMcpServers,
|
|
29
29
|
removePusharySettings,
|
|
30
30
|
restoreClaudeMcpServer
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-HHODMHTH.js";
|
|
32
32
|
import {
|
|
33
33
|
hookOwnerOf,
|
|
34
34
|
isHookTakeoverReceipt,
|
|
35
35
|
restoreHookTakeover,
|
|
36
36
|
restoreMcpServer
|
|
37
|
-
} from "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
37
|
+
} from "../chunk-BS5XR4J7.js";
|
|
38
|
+
import "../chunk-4XFBO3GW.js";
|
|
39
|
+
import "../chunk-FVTFSYKB.js";
|
|
40
40
|
import {
|
|
41
41
|
pusharyHookExecutable
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-A2M6FGUF.js";
|
|
43
43
|
import {
|
|
44
44
|
disableDaemonService
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-7N3D4GN7.js";
|
|
46
46
|
import {
|
|
47
47
|
removeGeminiSettings
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
48
|
+
} from "../chunk-CDBTCEKE.js";
|
|
49
|
+
import "../chunk-GOPIMNVC.js";
|
|
50
|
+
import "../chunk-3AJIK5AO.js";
|
|
51
51
|
import "../chunk-XHKBHWLX.js";
|
|
52
52
|
import {
|
|
53
53
|
execNpm
|
|
54
54
|
} from "../chunk-L4ZCFMWW.js";
|
|
55
|
-
import "../chunk-
|
|
56
|
-
import "../chunk-
|
|
57
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-HBBQO77U.js";
|
|
56
|
+
import "../chunk-32WWVRXN.js";
|
|
57
|
+
import "../chunk-C7BFOC35.js";
|
|
58
58
|
import {
|
|
59
59
|
claudeJson,
|
|
60
60
|
claudeMcpReceipt,
|
|
@@ -80,28 +80,28 @@ import {
|
|
|
80
80
|
restoreCodexHookTrust,
|
|
81
81
|
vscodePluginDir,
|
|
82
82
|
vscodePluginMcp
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-FBO5WS3D.js";
|
|
84
84
|
import {
|
|
85
85
|
exitOnHelpFlag
|
|
86
|
-
} from "../chunk-
|
|
87
|
-
import "../chunk-
|
|
86
|
+
} from "../chunk-GOQHN2UH.js";
|
|
87
|
+
import "../chunk-LZQVAEWP.js";
|
|
88
88
|
import {
|
|
89
89
|
rejectUnknownFlags
|
|
90
90
|
} from "../chunk-GMXKITVA.js";
|
|
91
91
|
import "../chunk-DINDL2CF.js";
|
|
92
92
|
import {
|
|
93
93
|
removeClaudeAlias
|
|
94
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-6MRPTYYH.js";
|
|
95
95
|
import "../chunk-7QLSKOSU.js";
|
|
96
96
|
import {
|
|
97
97
|
EXIT
|
|
98
98
|
} from "../chunk-KZERVKTD.js";
|
|
99
|
-
import "../chunk-
|
|
99
|
+
import "../chunk-KAWLZTRJ.js";
|
|
100
100
|
import "../chunk-2UMNXADU.js";
|
|
101
101
|
import {
|
|
102
102
|
CURSOR_GATE_EVENTS,
|
|
103
103
|
HOOK_LOCATOR_BINARY
|
|
104
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-VZADMT7R.js";
|
|
105
105
|
|
|
106
106
|
// bin/pushary-clean.ts
|
|
107
107
|
import { existsSync, readFileSync, copyFileSync, readdirSync } from "fs";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-HKQ6CD32.js";
|
|
3
3
|
import {
|
|
4
4
|
LiveTranscriptRelay,
|
|
5
5
|
liveSessionSleep,
|
|
6
6
|
postLiveSession,
|
|
7
7
|
postLiveSessionUntilAccepted,
|
|
8
8
|
startLiveSessionHeartbeat
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-KNIVXEW4.js";
|
|
10
10
|
import {
|
|
11
11
|
SESSION_IDLE_TIMEOUT_MS,
|
|
12
12
|
describeIdleWindow,
|
|
13
13
|
idleDeadlinePassed,
|
|
14
14
|
startProcessOwnership,
|
|
15
15
|
withSpawnProcessOwnership
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-DSCGKZO5.js";
|
|
17
|
+
import "../chunk-DH4INZW3.js";
|
|
18
18
|
import "../chunk-EQRS3SGM.js";
|
|
19
19
|
import {
|
|
20
20
|
transcriptsEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-JZSWA3VT.js";
|
|
22
22
|
import {
|
|
23
23
|
spawnClaude
|
|
24
24
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -27,16 +27,16 @@ import {
|
|
|
27
27
|
} from "../chunk-L4ZCFMWW.js";
|
|
28
28
|
import {
|
|
29
29
|
getMachineId
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-C7BFOC35.js";
|
|
31
|
+
import "../chunk-FBO5WS3D.js";
|
|
32
|
+
import "../chunk-6MRPTYYH.js";
|
|
33
33
|
import {
|
|
34
34
|
callMcpTool
|
|
35
35
|
} from "../chunk-EYRGBYZG.js";
|
|
36
36
|
import "../chunk-SAF6HGAA.js";
|
|
37
37
|
import "../chunk-7QLSKOSU.js";
|
|
38
38
|
import "../chunk-KZERVKTD.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-KAWLZTRJ.js";
|
|
40
40
|
import {
|
|
41
41
|
getApiKey,
|
|
42
42
|
getBaseUrl
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
parseAgentQuestion,
|
|
46
46
|
parseAgentQuestionAnswers
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-VZADMT7R.js";
|
|
48
48
|
|
|
49
49
|
// bin/pushary-codex-bridge.ts
|
|
50
50
|
import { existsSync } from "fs";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defersToNativeMode
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-SRFA5BOO.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-32WFHA77.js";
|
|
9
9
|
import {
|
|
10
10
|
readHookInput
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-R4MBUCPQ.js";
|
|
12
12
|
import {
|
|
13
13
|
denyReasonFrom,
|
|
14
14
|
isDeferAnswer
|
|
15
15
|
} from "../chunk-YHG74UFF.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-XKIB2FQY.js";
|
|
17
|
+
import "../chunk-WZ63WTAZ.js";
|
|
18
|
+
import "../chunk-BS5XR4J7.js";
|
|
19
|
+
import "../chunk-4XFBO3GW.js";
|
|
20
|
+
import "../chunk-FVTFSYKB.js";
|
|
21
|
+
import "../chunk-A2M6FGUF.js";
|
|
22
|
+
import "../chunk-7N3D4GN7.js";
|
|
23
|
+
import "../chunk-CDBTCEKE.js";
|
|
24
|
+
import "../chunk-GOPIMNVC.js";
|
|
25
|
+
import "../chunk-3AJIK5AO.js";
|
|
26
|
+
import "../chunk-DH4INZW3.js";
|
|
27
27
|
import "../chunk-EQRS3SGM.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-JZSWA3VT.js";
|
|
29
29
|
import "../chunk-XHKBHWLX.js";
|
|
30
30
|
import "../chunk-L4ZCFMWW.js";
|
|
31
31
|
import {
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
toCodexWire,
|
|
53
53
|
toPolicyLookup,
|
|
54
54
|
toPolicyLookups
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-ZJ6QXXBC.js";
|
|
56
56
|
import {
|
|
57
57
|
DECISION_STOP_REASON,
|
|
58
58
|
askUser,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
isLocalQuestionHandoff,
|
|
61
61
|
sendNotification,
|
|
62
62
|
waitForQuestion
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-XS33QBJA.js";
|
|
64
64
|
import {
|
|
65
65
|
UNNAMED_ACTION,
|
|
66
66
|
deriveActionBody,
|
|
@@ -69,22 +69,22 @@ import {
|
|
|
69
69
|
describeToolCall,
|
|
70
70
|
scopePathFor,
|
|
71
71
|
sessionIdentityOf
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import "../chunk-
|
|
72
|
+
} from "../chunk-HBBQO77U.js";
|
|
73
|
+
import "../chunk-32WWVRXN.js";
|
|
74
74
|
import {
|
|
75
75
|
getMachineId
|
|
76
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-C7BFOC35.js";
|
|
77
77
|
import {
|
|
78
78
|
canonicalJson
|
|
79
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-FBO5WS3D.js";
|
|
80
80
|
import "../chunk-GMXKITVA.js";
|
|
81
81
|
import "../chunk-DINDL2CF.js";
|
|
82
|
-
import "../chunk-
|
|
82
|
+
import "../chunk-6MRPTYYH.js";
|
|
83
83
|
import "../chunk-EYRGBYZG.js";
|
|
84
84
|
import "../chunk-SAF6HGAA.js";
|
|
85
85
|
import "../chunk-7QLSKOSU.js";
|
|
86
86
|
import "../chunk-KZERVKTD.js";
|
|
87
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-KAWLZTRJ.js";
|
|
88
88
|
import {
|
|
89
89
|
getApiKey
|
|
90
90
|
} from "../chunk-2UMNXADU.js";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
hookWaitClamped,
|
|
96
96
|
hookWaitDeadline,
|
|
97
97
|
resolveGate
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-VZADMT7R.js";
|
|
99
99
|
|
|
100
100
|
// bin/pushary-codex-hook.ts
|
|
101
101
|
import { basename } from "path";
|