@pushary/agent-hooks 1.3.1 → 1.4.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.
- package/CHANGELOG.md +23 -0
- package/README.md +1 -1
- package/dist/bin/pushary-bell-hook.js +18 -18
- package/dist/bin/pushary-bell.js +8 -8
- package/dist/bin/pushary-claude.js +18 -18
- package/dist/bin/pushary-clean.js +490 -95
- package/dist/bin/pushary-codex-bridge.js +10 -10
- package/dist/bin/pushary-codex-hook.js +28 -26
- package/dist/bin/pushary-codex.js +6 -6
- package/dist/bin/pushary-connect.js +8 -8
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +24 -24
- package/dist/bin/pushary-disconnect.js +12 -12
- package/dist/bin/pushary-doctor.js +75 -26
- package/dist/bin/pushary-elicitation-hook.js +17 -17
- package/dist/bin/pushary-gemini-bridge.js +9 -9
- package/dist/bin/pushary-gemini-hook.js +19 -19
- 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 +20 -20
- package/dist/bin/pushary-opencode-hook.js +19 -19
- package/dist/bin/pushary-permission-denied-hook.js +24 -24
- package/dist/bin/pushary-permission-hook.js +25 -25
- package/dist/bin/pushary-post-hook.js +20 -20
- package/dist/bin/pushary-prompt-hook.js +20 -20
- package/dist/bin/pushary-session-end-hook.js +20 -20
- package/dist/bin/pushary-session-start-hook.js +22 -22
- package/dist/bin/pushary-setup.js +38 -59
- package/dist/bin/pushary-stats.js +4 -4
- package/dist/bin/pushary-status.js +12 -12
- package/dist/bin/pushary-stop-hook.js +20 -20
- package/dist/bin/pushary-stopfailure-hook.js +20 -20
- package/dist/bin/pushary-suggestions.js +2 -2
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +6 -6
- package/dist/bin/pushary-upgrade.js +16 -16
- package/dist/bin/pushary-wait.js +5 -5
- package/dist/bin/pushary.js +1 -1
- package/dist/{chunk-RERJ2ZDV.js → chunk-2GMI6JH6.js} +5 -5
- package/dist/{chunk-AFOTOA24.js → chunk-37VLIYLI.js} +35 -4
- package/dist/{chunk-6HH4IH4K.js → chunk-3BPB2HYZ.js} +3 -3
- package/dist/{chunk-465UENKO.js → chunk-3T52B2OF.js} +1 -1
- package/dist/{chunk-PEV6ULSM.js → chunk-3UA6FPRC.js} +3 -3
- package/dist/{chunk-QDYJQLXT.js → chunk-43JKGLZZ.js} +2 -2
- package/dist/{chunk-CKLWJ6EL.js → chunk-4FN6VV56.js} +33 -7
- package/dist/{chunk-HCTSTMDD.js → chunk-ALFT7H5B.js} +3 -3
- package/dist/{chunk-35RPUNYU.js → chunk-BZBUPZC6.js} +1 -1
- package/dist/{chunk-CDSL3LLO.js → chunk-CRNAXFQ6.js} +1 -1
- package/dist/{chunk-NDSOOJDX.js → chunk-D7ERHWYB.js} +1 -1
- package/dist/{chunk-KHGIM2BN.js → chunk-ED5TA2FJ.js} +3 -3
- package/dist/{chunk-LZQVAEWP.js → chunk-FAH3D74E.js} +2 -1
- package/dist/{chunk-5UWDYOZX.js → chunk-FVKFDTN6.js} +81 -8
- package/dist/{chunk-I2OLM3DM.js → chunk-GOFDGTEI.js} +62 -12
- package/dist/{chunk-JZA2JOGO.js → chunk-HK3IXIQJ.js} +1 -1
- package/dist/{chunk-LWT34GSY.js → chunk-HQLAZWJJ.js} +7 -7
- package/dist/{chunk-5XKMOZO6.js → chunk-I6HRQOMT.js} +4 -4
- package/dist/{chunk-EAGMQMRM.js → chunk-JOVWYVSR.js} +1 -1
- package/dist/{chunk-5WLH2ENB.js → chunk-K6I5M2ME.js} +1 -1
- package/dist/{chunk-REIZ5GXG.js → chunk-KEMEBTCJ.js} +4 -4
- package/dist/{chunk-PHXU4NOP.js → chunk-KI36MAT6.js} +2 -2
- package/dist/{chunk-WOBHHXW5.js → chunk-LNGYW6G4.js} +5 -4
- package/dist/{chunk-AFKOWCMQ.js → chunk-LUT2EZLG.js} +1 -1
- package/dist/{chunk-KLZJEMSE.js → chunk-LYXX5NSB.js} +1 -1
- package/dist/{chunk-YXWM4TNX.js → chunk-MN3XOVRK.js} +1 -1
- package/dist/{chunk-XOUQUZ43.js → chunk-PHHGHHOW.js} +1 -1
- package/dist/{chunk-TW7KA27C.js → chunk-QBS6LGEK.js} +1 -1
- package/dist/{chunk-FGNABUPN.js → chunk-R3AMKNIW.js} +1 -1
- package/dist/{chunk-TGG4FWWB.js → chunk-S3EP4B35.js} +2 -2
- package/dist/{chunk-34NNTYK6.js → chunk-SAF6NNXY.js} +1 -1
- package/dist/{chunk-R5CU7ED6.js → chunk-SKXLIVFM.js} +1 -1
- package/dist/{chunk-OMP3KDDU.js → chunk-SWFF5U2N.js} +1 -1
- package/dist/{chunk-QOCWB4Q6.js → chunk-TF4IOINR.js} +3 -3
- package/dist/{chunk-5SALHATY.js → chunk-TI3ZWXZG.js} +11 -2
- package/dist/{chunk-P232YODQ.js → chunk-TNS3YLFE.js} +6 -6
- package/dist/{chunk-GOQHN2UH.js → chunk-TWWLVOPB.js} +1 -1
- package/dist/{chunk-XVE52YFZ.js → chunk-VYUDGQM7.js} +1 -1
- package/dist/{chunk-XP2KRTZD.js → chunk-WEO5JCB4.js} +1 -1
- package/dist/{chunk-SGZE2JBF.js → chunk-WIOXWUUH.js} +3 -3
- package/dist/{reapply-ADFRVH5N.js → reapply-BAWDJTG7.js} +8 -8
- package/dist/src/index.d.ts +19 -16
- package/dist/src/index.js +12 -12
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { CanonicalGateInputs, ReceiptMeta } from '@pushary/hook-mapping';
|
|
2
|
-
import { ClaudePreToolUseOutput,
|
|
2
|
+
import { ClaudePreToolUseOutput, MachineDecisionOrigin, SettledOutcome, AgentQuestion, PolicyConfig, ApprovalMode, ModeState } from '@pushary/contracts';
|
|
3
3
|
export { ApprovalMode, ModeState, PolicyConfig, ToolPolicy, resolvePolicy } from '@pushary/contracts';
|
|
4
4
|
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
interface ToolHookInput {
|
|
6
|
+
readonly hook_event_name?: string;
|
|
7
|
+
readonly tool_name: string;
|
|
8
|
+
readonly tool_input: Record<string, unknown>;
|
|
9
|
+
readonly session_id?: string;
|
|
10
|
+
readonly cwd?: string;
|
|
11
|
+
readonly transcript_path?: string;
|
|
12
|
+
readonly tool_use_id?: string;
|
|
13
|
+
readonly permission_mode?: string;
|
|
13
14
|
}
|
|
14
|
-
type HookOutput = ClaudePreToolUseOutput;
|
|
15
|
-
declare const handlePreToolUse: (input: ToolInput, canonical?: CanonicalGateInputs | null) => Promise<HookOutput | undefined>;
|
|
16
|
-
|
|
17
|
-
declare const getPolicy: (apiKey: string, expectedVersion?: string | null, agent?: string, repoAware?: boolean, sessionId?: string) => Promise<PolicyConfig>;
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
declare const
|
|
16
|
+
type HookOutput = ClaudePreToolUseOutput;
|
|
17
|
+
declare const handlePreToolUse: (input: ToolHookInput, canonical?: CanonicalGateInputs | null) => Promise<HookOutput | undefined>;
|
|
21
18
|
|
|
22
19
|
interface UsageReport {
|
|
23
20
|
readonly eventId: string;
|
|
@@ -47,7 +44,8 @@ interface AgentEvent {
|
|
|
47
44
|
error?: string;
|
|
48
45
|
taskTitle?: string;
|
|
49
46
|
decisionSource?: DecisionSource;
|
|
50
|
-
decisionOrigin?:
|
|
47
|
+
decisionOrigin?: MachineDecisionOrigin;
|
|
48
|
+
decisionOutcome?: SettledOutcome;
|
|
51
49
|
toolName?: string;
|
|
52
50
|
toolTarget?: string;
|
|
53
51
|
agents?: readonly string[];
|
|
@@ -191,6 +189,11 @@ declare const cancelQuestion: (apiKey: string, correlationId: string, signal?: A
|
|
|
191
189
|
handoffAction?: string;
|
|
192
190
|
}>;
|
|
193
191
|
|
|
192
|
+
declare const getPolicy: (apiKey: string, expectedVersion?: string | null, agent?: string, repoAware?: boolean, sessionId?: string) => Promise<PolicyConfig>;
|
|
193
|
+
|
|
194
|
+
declare const fetchModeState: (apiKey: string, sessionId?: string, reuseWithinMs?: number, signal?: AbortSignal) => Promise<ModeState>;
|
|
195
|
+
declare const fetchModeOverride: (apiKey: string) => Promise<ApprovalMode | null>;
|
|
196
|
+
|
|
194
197
|
declare const getApiKey: () => string;
|
|
195
198
|
declare const getBaseUrl: () => string;
|
|
196
199
|
|
package/dist/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GOFDGTEI.js";
|
|
4
|
+
import "../chunk-HQLAZWJJ.js";
|
|
5
|
+
import "../chunk-WIOXWUUH.js";
|
|
6
|
+
import "../chunk-ALFT7H5B.js";
|
|
7
|
+
import "../chunk-SWFF5U2N.js";
|
|
8
8
|
import "../chunk-YHG74UFF.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ED5TA2FJ.js";
|
|
10
10
|
import {
|
|
11
11
|
fetchAccountPublicKey
|
|
12
12
|
} from "../chunk-EQRS3SGM.js";
|
|
@@ -18,20 +18,20 @@ import {
|
|
|
18
18
|
handlePostToolUse,
|
|
19
19
|
handleStop,
|
|
20
20
|
reportEvent
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
} from "../chunk-LNGYW6G4.js";
|
|
22
|
+
import "../chunk-WEO5JCB4.js";
|
|
23
23
|
import {
|
|
24
24
|
askUser,
|
|
25
25
|
cancelQuestion,
|
|
26
26
|
waitForAnswer
|
|
27
27
|
} from "../chunk-LGXUGYUH.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-3T52B2OF.js";
|
|
29
|
+
import "../chunk-SAF6NNXY.js";
|
|
30
30
|
import "../chunk-EYRGBYZG.js";
|
|
31
31
|
import "../chunk-SAF6HGAA.js";
|
|
32
32
|
import "../chunk-7QLSKOSU.js";
|
|
33
33
|
import "../chunk-KZERVKTD.js";
|
|
34
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-K6I5M2ME.js";
|
|
35
35
|
import "../chunk-T7E75EKA.js";
|
|
36
36
|
import {
|
|
37
37
|
getApiKey,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "../chunk-2UMNXADU.js";
|
|
40
40
|
import {
|
|
41
41
|
resolvePolicy
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-FVKFDTN6.js";
|
|
43
43
|
export {
|
|
44
44
|
askUser,
|
|
45
45
|
cancelQuestion,
|