@pushary/agent-hooks 1.9.64 → 1.9.66
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 +18 -1
- package/dist/{api-HDLTZTVR.js → api-GDSVUTI2.js} +12 -10
- package/dist/bin/pushary-bell-hook.js +25 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -28
- package/dist/bin/pushary-clean.js +39 -36
- package/dist/bin/pushary-codex-bridge.js +21 -22
- package/dist/bin/pushary-codex-hook.js +30 -32
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +25 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +37 -39
- package/dist/bin/pushary-disconnect.js +25 -26
- package/dist/bin/pushary-doctor.js +66 -44
- package/dist/bin/pushary-elicitation-hook.js +25 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -16
- package/dist/bin/pushary-gemini-hook.js +27 -29
- package/dist/bin/pushary-hook.js +29 -31
- package/dist/bin/pushary-login.js +19 -19
- package/dist/bin/pushary-logout.js +25 -26
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +24 -26
- package/dist/bin/pushary-opencode-hook.js +26 -28
- package/dist/bin/pushary-permission-denied-hook.js +29 -31
- package/dist/bin/pushary-permission-hook.js +32 -31
- package/dist/bin/pushary-post-hook.js +24 -26
- package/dist/bin/pushary-prompt-hook.js +24 -26
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +33 -35
- package/dist/bin/pushary-setup.js +68 -54
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +30 -31
- package/dist/bin/pushary-stop-hook.js +24 -26
- package/dist/bin/pushary-stopfailure-hook.js +24 -26
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +16 -18
- package/dist/bin/pushary-transcripts.js +17 -17
- package/dist/bin/pushary-upgrade.js +37 -38
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-7UBDBJTG.js → chunk-26W46E46.js} +4 -4
- package/dist/{chunk-MIPJ2VXP.js → chunk-2BL6KWN7.js} +9 -9
- package/dist/{chunk-42PD2MQH.js → chunk-32ZT2ATY.js} +5 -5
- package/dist/{chunk-2EY4HGLG.js → chunk-376TUN72.js} +3 -3
- package/dist/{chunk-A5KQXZR7.js → chunk-3ELJIG2R.js} +3 -3
- package/dist/{chunk-ML2Q6WWE.js → chunk-3EZP5ZPS.js} +5 -4
- package/dist/{chunk-66FRMK7V.js → chunk-3FQX74E4.js} +3 -3
- package/dist/{chunk-HVOQUPSO.js → chunk-45KMS76L.js} +1 -1
- package/dist/{chunk-LA7CKRZN.js → chunk-4APD2DPI.js} +2 -2
- package/dist/{chunk-5NP3OJ5P.js → chunk-57NTMVMI.js} +6 -6
- package/dist/{chunk-NYV45Q25.js → chunk-5FJDODOA.js} +3 -3
- package/dist/{chunk-RY4EPMZX.js → chunk-5J7OZBJ4.js} +2 -2
- package/dist/{chunk-XJIIU36L.js → chunk-6BGVSV2Q.js} +1 -1
- package/dist/{chunk-2YXBCZ3Z.js → chunk-6RJZSBPD.js} +1 -1
- package/dist/{chunk-MPPTIZ2G.js → chunk-6ZXCWK27.js} +5 -5
- package/dist/{chunk-VNRWQCGU.js → chunk-7LK3Y6ET.js} +63 -6
- package/dist/{chunk-Y64JGYTB.js → chunk-A47UKPC7.js} +1 -1
- package/dist/{chunk-5TNGBDIE.js → chunk-AVWECJSN.js} +2 -2
- package/dist/{chunk-CCNH4PJ2.js → chunk-AWGBL4P3.js} +211 -24
- package/dist/{chunk-LMC5UPL7.js → chunk-B6JC676X.js} +1 -1
- package/dist/{chunk-QPPBH5NY.js → chunk-CN6JFM62.js} +5 -5
- package/dist/{chunk-BLAIETMP.js → chunk-CNJ7SI5V.js} +4 -4
- package/dist/{chunk-DVYVGBPB.js → chunk-DBUHSUL7.js} +1 -1
- package/dist/{chunk-CJADXAJU.js → chunk-DIUTSF6I.js} +4 -4
- package/dist/{chunk-JX3DHGZX.js → chunk-DKMVVBXO.js} +30 -17
- package/dist/{chunk-2CEVEMJE.js → chunk-DPU6H4JY.js} +3 -3
- package/dist/{chunk-MNKIR2ZB.js → chunk-EJR5JXMV.js} +24 -1
- package/dist/{chunk-VHKK3US3.js → chunk-EU2ZOZC3.js} +3 -3
- package/dist/{chunk-AN7C3CHH.js → chunk-G6VJZ3RB.js} +1 -1
- package/dist/{chunk-H4BKC2GN.js → chunk-GDLT32I4.js} +3 -3
- package/dist/{chunk-EEM65CGJ.js → chunk-GECU7V44.js} +3 -3
- package/dist/{chunk-BAGBCSXA.js → chunk-GO7YKPT3.js} +1 -1
- package/dist/{chunk-QECRQWLV.js → chunk-GWYCKTXS.js} +5 -5
- package/dist/{chunk-2PKHGHMA.js → chunk-HUGVJBDN.js} +2 -2
- package/dist/{chunk-ADRPW7KU.js → chunk-IA5VWIHV.js} +2 -2
- package/dist/{chunk-6HPLEGUP.js → chunk-IGO3AGZK.js} +4 -4
- package/dist/{chunk-PMLQRB3D.js → chunk-IQ3GKPFM.js} +1 -1
- package/dist/{chunk-LV6DX4P6.js → chunk-JL3SZJJP.js} +2 -2
- package/dist/{chunk-BSZIPIFA.js → chunk-KS3O6O7E.js} +3 -3
- package/dist/{chunk-IZTDX2MX.js → chunk-MDIGG3Q7.js} +3 -3
- package/dist/{chunk-JTOBQUIL.js → chunk-MNNQEUQC.js} +3 -3
- package/dist/{chunk-2KID4FK4.js → chunk-Q5RNYE2L.js} +4 -4
- package/dist/{chunk-KX3RMF6T.js → chunk-QBNICXMC.js} +6 -6
- package/dist/{chunk-YUDZCJYC.js → chunk-QN25WBXL.js} +9 -7
- package/dist/{chunk-NUEPJ5W6.js → chunk-QOIPUYUD.js} +3 -5
- package/dist/{chunk-QNATBOUH.js → chunk-QR2QWGQI.js} +3 -3
- package/dist/{chunk-NOH3EJFH.js → chunk-R7C2FS33.js} +1 -1
- package/dist/{chunk-MXPOLQZH.js → chunk-RJ6JEHCP.js} +1 -1
- package/dist/{chunk-E2LB6JNV.js → chunk-RSZQEEEW.js} +7 -6
- package/dist/{chunk-57PU5OBL.js → chunk-SVKCYUYP.js} +11 -13
- package/dist/{chunk-DCMRNIDM.js → chunk-T6YLXO6N.js} +4 -4
- package/dist/{chunk-Q6ID23SU.js → chunk-TQNFDNJA.js} +6 -6
- package/dist/{chunk-SROWUG5W.js → chunk-UTAARXYQ.js} +1 -1
- package/dist/{chunk-OQKSF5ST.js → chunk-V3YBVOTZ.js} +2 -2
- package/dist/{chunk-XF3AWNMO.js → chunk-V4EOFOB2.js} +6 -6
- package/dist/{chunk-PLMX3IHG.js → chunk-VURDLVAQ.js} +3 -3
- package/dist/{chunk-AQAPPSDV.js → chunk-XDDSURY3.js} +3 -3
- package/dist/{chunk-QSW3HAKI.js → chunk-XEXF2OFZ.js} +61 -2
- package/dist/{chunk-2Z7I7DHT.js → chunk-XFQAK35L.js} +1 -1
- package/dist/{chunk-5TUDGSDC.js → chunk-XGFFNERF.js} +1 -1
- package/dist/{chunk-2VADJ6JH.js → chunk-XIJTXRWB.js} +2 -2
- package/dist/{chunk-3KXBRSL3.js → chunk-XXIJBYNW.js} +1 -1
- package/dist/{chunk-O7PCNYEY.js → chunk-YB3HMDKE.js} +2 -2
- package/dist/{chunk-KA7JIMTG.js → chunk-YQDCTID4.js} +115 -9
- package/dist/{chunk-E23RKH3T.js → chunk-ZAZUDYSF.js} +26 -12
- package/dist/{chunk-TR3GP5MH.js → chunk-ZJV7SFIJ.js} +1 -1
- package/dist/{codex-app-cards-switch-JQ6356VX.js → codex-app-cards-switch-W7OLKOMO.js} +11 -11
- package/dist/{codex-desktop-launch-YUB2LOAG.js → codex-desktop-launch-U6V3AXZF.js} +1 -1
- package/dist/{codex-session-launch-UKMAORXS.js → codex-session-launch-EFU46WBL.js} +18 -19
- package/dist/{config-YY54G3CC.js → config-UC4LMCNX.js} +3 -3
- package/dist/{global-upgrade-Y4USGPS2.js → global-upgrade-ABF5O3HU.js} +10 -10
- package/dist/{identity-W5CYL5RC.js → identity-3ZUZPHN6.js} +4 -4
- package/dist/{live-capabilities-JRNNA5EP.js → live-capabilities-BXWXJARK.js} +5 -5
- package/dist/{paths-4MEBINV3.js → paths-FO76CFRQ.js} +3 -3
- package/dist/{reapply-ZN7C3CB3.js → reapply-3T3DFUAI.js} +26 -27
- package/dist/src/index.js +30 -20
- package/dist/{upgrade-lock-QAWUV2DO.js → upgrade-lock-EZ5JIPJE.js} +4 -4
- package/dist/{usage-43C2DHDU.js → usage-Y6BL7RUD.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6QPDBD7Q.js +0 -118
- package/dist/chunk-TJUJAK5L.js +0 -62
|
@@ -5757,6 +5757,22 @@ var EXIT_PLAN_MODE_TOOL = "ExitPlanMode";
|
|
|
5757
5757
|
var ASKED_IN_EVERY_MODE_TOOLS = [AGENT_QUESTION_TOOL, EXIT_PLAN_MODE_TOOL];
|
|
5758
5758
|
var ASKED_IN_EVERY_MODE = /* @__PURE__ */ new Set([...ASKED_IN_EVERY_MODE_TOOLS, ...CODEX_QUESTION_TOOLS]);
|
|
5759
5759
|
var isAskedInEveryMode = (toolName) => ASKED_IN_EVERY_MODE.has(toolName);
|
|
5760
|
+
var MODES_WITH_A_TERMINAL_PROMPT = /* @__PURE__ */ new Set(["default", "acceptEdits"]);
|
|
5761
|
+
var TERMINAL_AND_PHONE_REASON = "Pushary may also ask your phone. The first answer counts.";
|
|
5762
|
+
var terminalStaysLiveForTheCall = (facts) => facts.source === "claude" && facts.sessionAttended && facts.permissionHookAdmitted && !facts.handedDownByTheMacBridge && !facts.fromCursor && MODES_WITH_A_TERMINAL_PROMPT.has(facts.permissionMode ?? "") && !isAskedInEveryMode(facts.toolName);
|
|
5763
|
+
var TIMEOUT_DECISIONS = { approve: "allow", deny: "deny" };
|
|
5764
|
+
var pushOnlyTimeoutDecision = (policy) => policy.mode === "push_only" ? TIMEOUT_DECISIONS[policy.timeoutAction] : void 0;
|
|
5765
|
+
var phoneWindowSeconds = (policy) => Math.max(policy.mode === "push_only" ? policy.timeoutSeconds : policy.pushFirstSeconds, 0);
|
|
5766
|
+
var terminalLiveWait = (policy, holdBudgetProof) => {
|
|
5767
|
+
const budget = Math.min(holdBudgetProof ?? HOOK_BUDGETS.claude.budgetSeconds, HOOK_BUDGETS.claude.budgetSeconds);
|
|
5768
|
+
const ceiling = Math.max(budget - HOOK_BUDGETS.claude.guardSeconds, 1);
|
|
5769
|
+
const policySeconds = phoneWindowSeconds(policy);
|
|
5770
|
+
const decision = pushOnlyTimeoutDecision(policy);
|
|
5771
|
+
if (decision !== void 0 && policySeconds <= ceiling) return { waitSeconds: policySeconds, holdSeconds: ceiling, onTimeout: decision };
|
|
5772
|
+
const waitsForThePhone = policy.mode === "push_only" && policy.timeoutAction === "wait";
|
|
5773
|
+
const holdsTheBudget = waitsForThePhone || holdBudgetProof !== void 0 && decision === void 0;
|
|
5774
|
+
return { waitSeconds: holdsTheBudget ? ceiling : Math.min(policySeconds, ceiling), holdSeconds: ceiling, onTimeout: "leave_to_terminal" };
|
|
5775
|
+
};
|
|
5760
5776
|
var NATIVE_BLOCK_EVENTS = /* @__PURE__ */ new Set(["PermissionDenied"]);
|
|
5761
5777
|
var isNativeBlockEvent = (event) => typeof event === "string" && NATIVE_BLOCK_EVENTS.has(event);
|
|
5762
5778
|
var CODEX_RESCUE_TOOL_NAME = "Bash";
|
|
@@ -5833,7 +5849,8 @@ var resolveGate = (input) => {
|
|
|
5833
5849
|
scopePath: scopeReason && "path" in scopeVerdict ? widenablePath(scopeVerdict.path) : void 0
|
|
5834
5850
|
};
|
|
5835
5851
|
};
|
|
5836
|
-
var
|
|
5852
|
+
var noModeOverrideIsActive = (input) => (input.modeState.mode ?? input.config.modeOverride ?? null) === null;
|
|
5853
|
+
var editAsksAtTheAgentsPrompt = (input, verdict) => verdict.kind === "gate" && !verdict.scopeReason && noModeOverrideIsActive(input) && !aChosenRuleGoverns(input) && verdict.policy.mode === "push_first" && FILE_EDIT_TOOLS.has(input.toolName);
|
|
5837
5854
|
var claudePromptsBeforeAnEdit = (permissionMode) => permissionMode === "default";
|
|
5838
5855
|
var runsTheClaudeHook = (source) => source === null || source === "claude" || hookCompatibleProfileBySource(source) !== void 0;
|
|
5839
5856
|
var agentPromptsBeforeAnEdit = ({ source, event, permissionMode }) => {
|
|
@@ -5950,6 +5967,7 @@ var aChosenRuleGoverns = (input) => {
|
|
|
5950
5967
|
});
|
|
5951
5968
|
};
|
|
5952
5969
|
var claudeAllowlistOwnsCall = (input, verdict, permissionMode, rules) => rules !== null && verdict.kind === "gate" && !verdict.scopeReason && !aChosenRuleGoverns(input) && !isAskedInEveryMode(input.toolName) && claudeConsultsItsAllowlist(permissionMode) && agentRulesAllowEveryInput(rules, input.toolName, input.toolInputs, input.cwd);
|
|
5970
|
+
var claudePromptTakesTheCall = (facts, input, verdict) => verdict.kind === "gate" && !verdict.scopeReason && terminalStaysLiveForTheCall(facts) && noModeOverrideIsActive(input) && !aChosenRuleGoverns(input) && !editGoesToTheAgentsPrompt({ source: facts.source, event: "PreToolUse", permissionMode: facts.permissionMode }, input, verdict);
|
|
5953
5971
|
var toPolicyVersion = (value) => typeof value === "string" || typeof value === "number" ? String(value) : null;
|
|
5954
5972
|
var modeStateFromResponse = (data) => {
|
|
5955
5973
|
const mode = data.override?.mode;
|
|
@@ -6426,12 +6444,16 @@ export {
|
|
|
6426
6444
|
codexQuestionGoesToPushary,
|
|
6427
6445
|
agentQuestionStrategy,
|
|
6428
6446
|
questionHandedToTheTerminal,
|
|
6447
|
+
TERMINAL_AND_PHONE_REASON,
|
|
6448
|
+
terminalStaysLiveForTheCall,
|
|
6449
|
+
terminalLiveWait,
|
|
6429
6450
|
CODEX_RESCUE_TOOL_NAME,
|
|
6430
6451
|
isBlockedActionRequest,
|
|
6431
6452
|
canonicalJsonText,
|
|
6432
6453
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
6433
6454
|
blockedActionIdentity,
|
|
6434
6455
|
PRETOOLUSE_GATED_TOOLS,
|
|
6456
|
+
PRETOOLUSE_HANDLED_TOOLS,
|
|
6435
6457
|
isPermissionRequestOwnedByPreToolUse,
|
|
6436
6458
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
6437
6459
|
resolveGate,
|
|
@@ -6453,6 +6475,7 @@ export {
|
|
|
6453
6475
|
claudeConsultsItsAllowlist,
|
|
6454
6476
|
agentRulesAllowEveryInput,
|
|
6455
6477
|
claudeAllowlistOwnsCall,
|
|
6478
|
+
claudePromptTakesTheCall,
|
|
6456
6479
|
modeStateFromResponse,
|
|
6457
6480
|
GATE_WIRE,
|
|
6458
6481
|
GATE_MAX_TOOL_INPUTS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTAARXYQ.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-NMUI3ZWG.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-PPY5N2E6.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GO7YKPT3.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EJR5JXMV.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
quoteIfNeeded,
|
|
5
5
|
shellDoubleQuoted,
|
|
6
6
|
writeFileAtomic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KS3O6O7E.js";
|
|
8
8
|
import {
|
|
9
9
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
10
10
|
CODEX_QUESTION_TOOLS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
HOOK_LOCATOR_BINARY,
|
|
13
13
|
PRETOOLUSE_GATED_TOOLS,
|
|
14
14
|
withHookHoldBudget
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EJR5JXMV.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/paths.ts
|
|
18
18
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -550,7 +550,7 @@ var CLAUDE_HOOK_EVENTS = [
|
|
|
550
550
|
{ event: "SessionStart", binary: "pushary-session-start-hook", matcher: "startup|resume|clear", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
551
551
|
{ event: "SessionEnd", binary: "pushary-session-end-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
552
552
|
{ event: "StopFailure", binary: "pushary-stopfailure-hook", timeout: 10, delivery: "telemetry", since: ESTABLISHED },
|
|
553
|
-
{ event: "PermissionRequest", binary: "pushary-permission-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", since: ESTABLISHED },
|
|
553
|
+
{ event: "PermissionRequest", binary: "pushary-permission-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", holds: true, since: ESTABLISHED },
|
|
554
554
|
{ event: "PermissionDenied", binary: "pushary-permission-denied-hook", timeout: HOOK_BUDGETS.claude.budgetSeconds, delivery: "approval", holds: true, since: ESTABLISHED },
|
|
555
555
|
// Observability only. Each carries session shape the island cannot get any other
|
|
556
556
|
// way, and none of them decides anything.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IA5VWIHV.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-PPY5N2E6.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A47UKPC7.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-QTOLNRET.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EJR5JXMV.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T6YLXO6N.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-57NTMVMI.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CNJ7SI5V.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IA5VWIHV.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-A47UKPC7.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3EZP5ZPS.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YQDCTID4.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GDLT32I4.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EJR5JXMV.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GDLT32I4.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KS3O6O7E.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -443,9 +443,9 @@ var installGlobally = (options) => {
|
|
|
443
443
|
}
|
|
444
444
|
const started = (async () => {
|
|
445
445
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
446
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
447
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
448
|
-
const { autoUpdateLock } = await import("./paths-
|
|
446
|
+
const { withUpgradeLock } = await import("./global-upgrade-ABF5O3HU.js");
|
|
447
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-EZ5JIPJE.js");
|
|
448
|
+
const { autoUpdateLock } = await import("./paths-FO76CFRQ.js");
|
|
449
449
|
let result = "skipped";
|
|
450
450
|
const install = async () => {
|
|
451
451
|
const platform = process.platform;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findNativeClaudeInstall
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RJ6JEHCP.js";
|
|
4
4
|
import {
|
|
5
5
|
parseVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KS3O6O7E.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EJR5JXMV.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/agent-probe.ts
|
|
12
12
|
import { execSync } from "child_process";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callMcpTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q5RNYE2L.js";
|
|
4
4
|
import {
|
|
5
5
|
NPX_LATEST_COMMAND
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GO7YKPT3.js";
|
|
7
7
|
import {
|
|
8
8
|
classifyConfirmResponse,
|
|
9
9
|
isAnswerSource
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EJR5JXMV.js";
|
|
11
11
|
|
|
12
12
|
// src/reach.ts
|
|
13
13
|
var reachVerdict = (channels) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QR2QWGQI.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GECU7V44.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A47UKPC7.js";
|
|
10
10
|
import {
|
|
11
11
|
isRecord,
|
|
12
12
|
isToolErrorResult,
|
|
13
13
|
toolFailureCodeOfResult
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EJR5JXMV.js";
|
|
15
15
|
|
|
16
16
|
// src/retry.ts
|
|
17
17
|
var isRetryable = (err) => {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7LK3Y6ET.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RJ6JEHCP.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3EZP5ZPS.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GDLT32I4.js";
|
|
15
15
|
import {
|
|
16
16
|
resolvePathBinary
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KS3O6O7E.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_COMPATIBLE_PROFILES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EJR5JXMV.js";
|
|
21
21
|
|
|
22
22
|
// src/hermes-config.ts
|
|
23
23
|
import { execFileSync } from "child_process";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SVKCYUYP.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3EZP5ZPS.js";
|
|
7
7
|
import {
|
|
8
8
|
isBridgeLocator,
|
|
9
9
|
liveBridgeProbe,
|
|
10
10
|
pusharyHookExecutable,
|
|
11
11
|
resolveBridgeStub
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YQDCTID4.js";
|
|
13
13
|
import {
|
|
14
14
|
writeDegraded
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZAZUDYSF.js";
|
|
16
16
|
import {
|
|
17
17
|
cursorUserHooks
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GDLT32I4.js";
|
|
19
19
|
import {
|
|
20
20
|
atLeast,
|
|
21
21
|
parseVersion
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KS3O6O7E.js";
|
|
23
23
|
import {
|
|
24
24
|
CURSOR_GATE_COVERAGE,
|
|
25
25
|
CURSOR_GATE_SCRIPT,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isGrokSessionEndStop,
|
|
34
34
|
isRecord,
|
|
35
35
|
toolsCoveredByGateEntry
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-EJR5JXMV.js";
|
|
37
37
|
|
|
38
38
|
// src/tool-hook-input.ts
|
|
39
39
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -210,6 +210,8 @@ function readToolHookCall(source, event, stdin = process.stdin, { readCursorGate
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
export {
|
|
213
|
+
readAdmissionRules,
|
|
214
|
+
isAdmitted,
|
|
213
215
|
readHookInput,
|
|
214
216
|
readToolHookInput,
|
|
215
217
|
readToolHookCall
|
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
buildTranscriptRecords,
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
encryptRecord,
|
|
5
|
+
fetchTranscriptRecipients,
|
|
5
6
|
generateSessionKey,
|
|
6
7
|
recordSealerFor,
|
|
8
|
+
uploadTranscriptRecords,
|
|
7
9
|
wrapSessionKey
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
fetchTranscriptRecipients,
|
|
11
|
-
uploadTranscriptRecords
|
|
12
|
-
} from "./chunk-TJUJAK5L.js";
|
|
10
|
+
} from "./chunk-XEXF2OFZ.js";
|
|
13
11
|
|
|
14
12
|
// src/live-session.ts
|
|
15
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GECU7V44.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-PPY5N2E6.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-A47UKPC7.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EJR5JXMV.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;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V3YBVOTZ.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T6YLXO6N.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VURDLVAQ.js";
|
|
22
22
|
import {
|
|
23
23
|
EXIT
|
|
24
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
autoUpdateLock,
|
|
27
27
|
autoUpdateLog,
|
|
28
28
|
autoUpdateState
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GDLT32I4.js";
|
|
30
30
|
import {
|
|
31
31
|
execNpm,
|
|
32
32
|
fetchLatestPublishedVersion,
|
|
33
33
|
npmErrorMessage,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KS3O6O7E.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-GO7YKPT3.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -59,6 +59,7 @@ var FINISHED_UPGRADE = { kind: "finished" };
|
|
|
59
59
|
var refreshedPartsOf = (agent) => [
|
|
60
60
|
...agent.result.hooks ? ["hooks"] : [],
|
|
61
61
|
...agent.result.mcp ? ["MCP key"] : [],
|
|
62
|
+
...agent.result.approvalRules ? ["approval rules"] : [],
|
|
62
63
|
...agent.instructions?.outcome === "refreshed" ? ["instructions"] : []
|
|
63
64
|
];
|
|
64
65
|
var wasRefreshed = (agent) => refreshedPartsOf(agent).length > 0;
|
|
@@ -3,43 +3,41 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DBUHSUL7.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-57NTMVMI.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YQDCTID4.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
|
+
fetchTranscriptRecipients,
|
|
16
17
|
generateSessionKey,
|
|
17
18
|
recordSealerFor,
|
|
19
|
+
uploadTranscriptRecords,
|
|
18
20
|
wrapSessionKey
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
fetchTranscriptRecipients,
|
|
22
|
-
uploadTranscriptRecords
|
|
23
|
-
} from "./chunk-TJUJAK5L.js";
|
|
21
|
+
} from "./chunk-XEXF2OFZ.js";
|
|
24
22
|
import {
|
|
25
23
|
transcriptEnvironmentPreference,
|
|
26
24
|
transcriptsEnabled
|
|
27
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XGFFNERF.js";
|
|
28
26
|
import {
|
|
29
27
|
readTranscriptPreference
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CNJ7SI5V.js";
|
|
31
29
|
import {
|
|
32
30
|
claudeConfigDir,
|
|
33
31
|
codexHome,
|
|
34
32
|
pusharyDir
|
|
35
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-GDLT32I4.js";
|
|
36
34
|
import {
|
|
37
35
|
writeJsonAtomic
|
|
38
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KS3O6O7E.js";
|
|
39
37
|
import {
|
|
40
38
|
getApiKey,
|
|
41
39
|
getBaseUrl
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-A47UKPC7.js";
|
|
43
41
|
|
|
44
42
|
// src/transcript-registration.ts
|
|
45
43
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MDIGG3Q7.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RJ6JEHCP.js";
|
|
7
7
|
import {
|
|
8
8
|
readGlobalPrefixAsync,
|
|
9
9
|
resolveGlobalBinary,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KS3O6O7E.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EJR5JXMV.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QOIPUYUD.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3ELJIG2R.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
17
17
|
import {
|
|
18
18
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XXIJBYNW.js";
|
|
20
20
|
import {
|
|
21
21
|
isAskUserResponse,
|
|
22
22
|
isDecisionStopped,
|
|
23
23
|
isWaitForAnswerResponse,
|
|
24
24
|
withdrawQuestion,
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZAZUDYSF.js";
|
|
27
27
|
import {
|
|
28
28
|
callMcpTool,
|
|
29
29
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Q5RNYE2L.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
33
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
parseCodexQuestions,
|
|
49
49
|
planElicitationAsk,
|
|
50
50
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-EJR5JXMV.js";
|
|
52
52
|
|
|
53
53
|
// src/codex-question-owner.ts
|
|
54
54
|
import { createHash } from "crypto";
|