pushary 1.9.119 → 1.9.120
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 +7 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +13 -2
- package/data/vscode-plugin/scripts/pushary-gate.mjs +12 -1
- package/dist/{api-WWB7ZOLK.js → api-QFUMNTEQ.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +43 -43
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +36 -36
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +44 -44
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +33 -33
- package/dist/bin/pushary-hook.js +33 -33
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +30 -30
- package/dist/bin/pushary-permission-denied-hook.js +33 -33
- package/dist/bin/pushary-permission-hook.js +33 -33
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +35 -35
- package/dist/bin/pushary-setup.js +90 -90
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +43 -43
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-RIAELZYW.js → chunk-2AMSWODQ.js} +2 -2
- package/dist/{chunk-PNSIMPC7.js → chunk-2ZT4XV4I.js} +6 -6
- package/dist/{chunk-Z3OG44Z4.js → chunk-33NEYAK2.js} +4 -4
- package/dist/{chunk-SE7P5BBK.js → chunk-363YZ5WJ.js} +1 -1
- package/dist/{chunk-XNCKBVZX.js → chunk-3DD44QTA.js} +5 -5
- package/dist/{chunk-COXNQUDP.js → chunk-3GFJ7CXQ.js} +4 -4
- package/dist/{chunk-U32N5JZO.js → chunk-47HCNA5U.js} +1 -1
- package/dist/{chunk-SQRS4IF2.js → chunk-4DSJF5JD.js} +3 -3
- package/dist/{chunk-UHAUC7EO.js → chunk-4FLMGGWB.js} +2 -2
- package/dist/{chunk-MEPYLTWF.js → chunk-5JZCFZUT.js} +10 -10
- package/dist/{chunk-GAOUWLYN.js → chunk-5KCUQ3B7.js} +3 -3
- package/dist/{chunk-K5WTTEIQ.js → chunk-5NHWNILG.js} +5 -5
- package/dist/{chunk-W5ZUDPKV.js → chunk-6CJ7D6EQ.js} +5 -5
- package/dist/{chunk-TZYVXTLN.js → chunk-6FR5ZYMS.js} +1 -1
- package/dist/{chunk-PJSFKKZ5.js → chunk-7VRL6XYM.js} +1 -1
- package/dist/{chunk-JKS4MN47.js → chunk-7YRKM4AB.js} +6 -6
- package/dist/{chunk-PDAOZ2NF.js → chunk-A5YOWKPR.js} +10 -10
- package/dist/{chunk-YCCLWG7G.js → chunk-AIABYHHZ.js} +6 -6
- package/dist/{chunk-VMM6JCNQ.js → chunk-B4M2XZNQ.js} +2 -2
- package/dist/{chunk-HYTDNEXV.js → chunk-BYP2R2PF.js} +1 -1
- package/dist/{chunk-KILSIJTF.js → chunk-BZ6N5DDZ.js} +60 -16
- package/dist/{chunk-YZ7V2LVG.js → chunk-CPBS6LS3.js} +3 -3
- package/dist/{chunk-XBH6OKHD.js → chunk-EDNCFLR7.js} +3 -3
- package/dist/{chunk-V52J2THT.js → chunk-EG2E2562.js} +1 -1
- package/dist/{chunk-VRZOUCIK.js → chunk-EU4NV7SS.js} +2 -2
- package/dist/{chunk-ZLUAXGAA.js → chunk-F24QURGP.js} +4 -4
- package/dist/{chunk-4SZM2HRA.js → chunk-H4LCCX7W.js} +6 -6
- package/dist/{chunk-YZESBU7F.js → chunk-HHZSB6KL.js} +151 -6
- package/dist/{chunk-SNKC2IQZ.js → chunk-HSFTTGOB.js} +2 -2
- package/dist/{chunk-GW3PE52Q.js → chunk-HVGN7TRN.js} +1 -1
- package/dist/{chunk-AGXOTZID.js → chunk-INKDRMSK.js} +5 -5
- package/dist/{chunk-JJNF6QU4.js → chunk-IYUAMUO6.js} +1 -1
- package/dist/{chunk-6YLVNFQZ.js → chunk-J4AJVM5F.js} +3 -3
- package/dist/{chunk-EFFH2FYG.js → chunk-J6ACLE2A.js} +2 -2
- package/dist/{chunk-GBVTVTDF.js → chunk-K4RIBZ32.js} +1 -1
- package/dist/{chunk-BQ673OOD.js → chunk-KESS6HAK.js} +2 -2
- package/dist/{chunk-NASQPMXW.js → chunk-KG7UZSCD.js} +9 -9
- package/dist/{chunk-EP6I3MQY.js → chunk-L37Q4BR6.js} +4 -4
- package/dist/{chunk-R3RTISDD.js → chunk-MZX35RFX.js} +1 -1
- package/dist/{chunk-5T5T4YXM.js → chunk-NBKH6SKN.js} +1 -1
- package/dist/{chunk-ZTVBM3EZ.js → chunk-NVOQBKIL.js} +4 -4
- package/dist/{chunk-6KX2H4I5.js → chunk-NXWQZBOK.js} +3 -3
- package/dist/{chunk-KOZBVXXC.js → chunk-ODXZPMKN.js} +3 -3
- package/dist/{chunk-VFZ2PE6U.js → chunk-PEMESJZY.js} +3 -3
- package/dist/{chunk-FPG7X2GS.js → chunk-PTONPJWL.js} +4 -4
- package/dist/{chunk-KVDN4U6W.js → chunk-RHTAI4XP.js} +10 -10
- package/dist/{chunk-L3MCQSES.js → chunk-RM7MNCCA.js} +5 -5
- package/dist/{chunk-3IESC326.js → chunk-RWS4DRFK.js} +3 -3
- package/dist/{chunk-R67NTMBY.js → chunk-SJPH24TK.js} +8 -8
- package/dist/{chunk-ISVHV2DP.js → chunk-SSTO42XS.js} +1 -1
- package/dist/{chunk-2UE2NDCX.js → chunk-SUI5JE6T.js} +1 -1
- package/dist/{chunk-3B7S2H4R.js → chunk-T57CIR6H.js} +1 -1
- package/dist/{chunk-G5FQU2XF.js → chunk-TAHUCUY3.js} +6 -6
- package/dist/{chunk-7CJ7W2RH.js → chunk-UFRRAAYD.js} +4 -4
- package/dist/{chunk-W6LKC5YD.js → chunk-UZL3VQCE.js} +5 -5
- package/dist/{chunk-2C45MJGK.js → chunk-VKRRUT45.js} +13 -6
- package/dist/{chunk-SSBETUYZ.js → chunk-W4MZBZU3.js} +3 -3
- package/dist/{chunk-TRDHHF3A.js → chunk-W744DTUT.js} +17 -0
- package/dist/{chunk-EISUEJDT.js → chunk-WFHUECGB.js} +6 -6
- package/dist/{chunk-G4OVFWU4.js → chunk-XOPOX5QY.js} +46 -28
- package/dist/{chunk-RGXFBS56.js → chunk-XRRY45XB.js} +3 -3
- package/dist/{chunk-TLCJCP5R.js → chunk-XSSG5JLJ.js} +1 -1
- package/dist/{chunk-MYNLU6DV.js → chunk-XUAGV5VH.js} +2 -2
- package/dist/{chunk-NVV3YUTX.js → chunk-YOSATSUD.js} +2 -2
- package/dist/{chunk-CXIYGD33.js → chunk-YQGPBLIT.js} +2 -2
- package/dist/{chunk-4D23TNCL.js → chunk-YQUJQGJU.js} +4 -4
- package/dist/{chunk-67I7QRQB.js → chunk-YZORQXN7.js} +1 -1
- package/dist/{chunk-B7BOENW7.js → chunk-ZMKZ5WHS.js} +1 -1
- package/dist/{chunk-DXJUASTS.js → chunk-ZR35L635.js} +2 -2
- package/dist/{chunk-CBLFIWPI.js → chunk-ZRTUS6WD.js} +12 -5
- package/dist/{chunk-4HDX77ND.js → chunk-ZV7G73KH.js} +3 -3
- package/dist/{chunk-5HKU4VUL.js → chunk-ZWUVJ3DV.js} +3 -3
- package/dist/{codex-app-cards-switch-J6EULXO5.js → codex-app-cards-switch-545ISCGQ.js} +12 -12
- package/dist/{codex-card-routing-XNJB6573.js → codex-card-routing-IKNAEEMC.js} +2 -2
- package/dist/{codex-desktop-launch-46ELENBQ.js → codex-desktop-launch-VQNI4GUS.js} +1 -1
- package/dist/{codex-session-launch-R5FHFWAG.js → codex-session-launch-OGOGHTM7.js} +18 -18
- package/dist/{config-RKWDMDRY.js → config-VGWGOR2V.js} +3 -3
- package/dist/{global-upgrade-E65GJQS6.js → global-upgrade-GUHXKJPO.js} +9 -9
- package/dist/{identity-JRGY2KS6.js → identity-FORDJUYW.js} +4 -4
- package/dist/{live-capabilities-SOO6PD7Y.js → live-capabilities-VA3VXZOZ.js} +4 -4
- package/dist/{paths-G7NZODAY.js → paths-5XZPI4LD.js} +3 -3
- package/dist/{reapply-YKN5BKIP.js → reapply-77JJ3QV2.js} +28 -28
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +32 -32
- package/dist/{upgrade-lock-YKAZI3BH.js → upgrade-lock-EEPLQBLA.js} +4 -4
- package/dist/{usage-QWYNOIU6.js → usage-27IDH6UH.js} +3 -3
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canOpenBrowser,
|
|
3
|
+
openInBrowser
|
|
4
|
+
} from "./chunk-PUZZELE6.js";
|
|
1
5
|
import {
|
|
2
6
|
generateKeypair,
|
|
3
7
|
openSealedKey,
|
|
4
8
|
publicKeyFingerprint
|
|
5
9
|
} from "./chunk-3EGEA4KH.js";
|
|
6
|
-
import {
|
|
7
|
-
canOpenBrowser,
|
|
8
|
-
openInBrowser
|
|
9
|
-
} from "./chunk-PUZZELE6.js";
|
|
10
10
|
import {
|
|
11
11
|
PLAN_CONFIGS,
|
|
12
12
|
PLAN_TYPES
|
|
13
13
|
} from "./chunk-G66WIAST.js";
|
|
14
14
|
import {
|
|
15
15
|
keyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CPBS6LS3.js";
|
|
17
17
|
import {
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MZX35RFX.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7VRL6XYM.js";
|
|
23
23
|
import {
|
|
24
24
|
isValidApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-W744DTUT.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/login-ui.ts
|
|
28
28
|
import { hostname } from "os";
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
|
-
CODEX_APP_LAUNCH_VARIABLE
|
|
16
|
-
} from "./chunk-E46NE7FB.js";
|
|
12
|
+
} from "./chunk-5KCUQ3B7.js";
|
|
17
13
|
import {
|
|
18
14
|
writeHuman
|
|
19
15
|
} from "./chunk-QCGNGEGE.js";
|
|
20
16
|
import {
|
|
21
17
|
xml
|
|
22
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WFHUECGB.js";
|
|
23
19
|
import {
|
|
24
20
|
writeFileAtomic
|
|
25
21
|
} from "./chunk-T5I4PKOQ.js";
|
|
22
|
+
import {
|
|
23
|
+
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
24
|
+
CODEX_APP_LAUNCH_VARIABLE
|
|
25
|
+
} from "./chunk-E46NE7FB.js";
|
|
26
26
|
|
|
27
27
|
// src/codex-app-cards-switch.ts
|
|
28
28
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
reachVerdict,
|
|
13
13
|
reachesYou,
|
|
14
14
|
verifyDelivery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AIABYHHZ.js";
|
|
16
16
|
import {
|
|
17
17
|
humanIsTty,
|
|
18
18
|
writeHuman
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
} from "./chunk-FO3MDD26.js";
|
|
25
25
|
import {
|
|
26
26
|
reportedInstallSource
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-B4M2XZNQ.js";
|
|
28
28
|
import {
|
|
29
29
|
NPX_LATEST_COMMAND
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7VRL6XYM.js";
|
|
31
31
|
import {
|
|
32
32
|
NO_PAIRING_COMPUTER,
|
|
33
33
|
PAIR_TTL_SECONDS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-W744DTUT.js";
|
|
35
35
|
|
|
36
36
|
// src/onboarding.ts
|
|
37
37
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZV7G73KH.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XRRY45XB.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchAsCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-47HCNA5U.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MZX35RFX.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W744DTUT.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L37Q4BR6.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A5YOWKPR.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HHZSB6KL.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KG7UZSCD.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-W744DTUT.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -32,9 +32,16 @@ function isToolHookInput(value) {
|
|
|
32
32
|
}
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
|
+
function withoutNullOptionalText(value) {
|
|
36
|
+
const present = { ...value };
|
|
37
|
+
for (const field of OPTIONAL_TEXT_FIELDS) {
|
|
38
|
+
if (present[field] === null) delete present[field];
|
|
39
|
+
}
|
|
40
|
+
return present;
|
|
41
|
+
}
|
|
35
42
|
function parseToolHookInput(value) {
|
|
36
43
|
if (!isInputRecord(value)) return null;
|
|
37
|
-
const input = { ...value, tool_input: value.tool_input === void 0 ? {} : value.tool_input };
|
|
44
|
+
const input = { ...withoutNullOptionalText(value), tool_input: value.tool_input === void 0 ? {} : value.tool_input };
|
|
38
45
|
return isToolHookInput(input) ? input : null;
|
|
39
46
|
}
|
|
40
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YQGPBLIT.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-ROVLRXBI.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ODXZPMKN.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-W744DTUT.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -8533,6 +8533,14 @@ var GATE_ALLOW_SOURCE = {
|
|
|
8533
8533
|
};
|
|
8534
8534
|
var PUSHARY_TOOL_PREFIX = "mcp__pushary__";
|
|
8535
8535
|
var isPusharyOwnTool = (toolName) => toolName.startsWith(PUSHARY_TOOL_PREFIX);
|
|
8536
|
+
var PUSHARY_CONNECTOR_TOOL_PREFIXES = ["mcp__claude_ai_Pushary__", "mcp__plugin_pushary_pushary__"];
|
|
8537
|
+
var SERVER_AND_TOOL_SEPARATOR = "__";
|
|
8538
|
+
var namesOneToolAfterPrefix = (toolName, prefix) => {
|
|
8539
|
+
if (!toolName.startsWith(prefix)) return false;
|
|
8540
|
+
const tool = toolName.slice(prefix.length);
|
|
8541
|
+
return tool.length > 0 && !tool.includes(SERVER_AND_TOOL_SEPARATOR);
|
|
8542
|
+
};
|
|
8543
|
+
var isPusharyConnectorTool = (toolName) => PUSHARY_CONNECTOR_TOOL_PREFIXES.some((prefix) => namesOneToolAfterPrefix(toolName, prefix));
|
|
8536
8544
|
var strictestScopeVerdict = (scope, paths) => {
|
|
8537
8545
|
if (paths.length === 0) return evaluateScope(scope, void 0);
|
|
8538
8546
|
let worst = { outcome: "in_scope" };
|
|
@@ -8643,6 +8651,10 @@ var PRETOOLUSE_HANDLED_TOOLS = /* @__PURE__ */ new Set([...PRETOOLUSE_GATED_TOOL
|
|
|
8643
8651
|
var isPermissionRequestOwnedByPreToolUse = (toolName, permissionMode, defers = shouldDeferToNativeMode) => PRETOOLUSE_HANDLED_TOOLS.has(toolName) && (isAskedInEveryMode(toolName) || !defers(permissionMode, toolName));
|
|
8644
8652
|
var CLAUDE_PRETOOLUSE_MATCHER = [...PRETOOLUSE_HANDLED_TOOLS].join("|");
|
|
8645
8653
|
var CLAUDE_MCP_PRETOOLUSE_MATCHER = "mcp__.*";
|
|
8654
|
+
var CLAUDE_REFUSALS_ONLY_TOOLS = ["WebFetch", "Task", "Agent"];
|
|
8655
|
+
var CLAUDE_REFUSALS_ONLY_PRETOOLUSE_MATCHER = `^(${CLAUDE_REFUSALS_ONLY_TOOLS.join("|")})$`;
|
|
8656
|
+
var CLAUDE_SUBAGENT_TOOL_ALIASES = { Task: "Agent", Agent: "Task" };
|
|
8657
|
+
var claudeSubagentToolAliasOf = (toolName) => Object.hasOwn(CLAUDE_SUBAGENT_TOOL_ALIASES, toolName) ? CLAUDE_SUBAGENT_TOOL_ALIASES[toolName] : void 0;
|
|
8646
8658
|
var LINE_BREAK = /[\r\n]/;
|
|
8647
8659
|
var bypassModeCovers = (toolName, toolInput) => {
|
|
8648
8660
|
const arg = extractPolicyArg(toolName, toolInput);
|
|
@@ -9564,6 +9576,7 @@ export {
|
|
|
9564
9576
|
isTokenCount,
|
|
9565
9577
|
reportableSessionId,
|
|
9566
9578
|
TOOL_NAME_MAX_LENGTH,
|
|
9579
|
+
WILDCARD_TOOL_PATTERN,
|
|
9567
9580
|
normalizeRepoRemote,
|
|
9568
9581
|
localRepoKey,
|
|
9569
9582
|
isSafeReadOnlyCommand,
|
|
@@ -9588,6 +9601,7 @@ export {
|
|
|
9588
9601
|
resolvePolicy,
|
|
9589
9602
|
KILL_REASON,
|
|
9590
9603
|
isPusharyOwnTool,
|
|
9604
|
+
isPusharyConnectorTool,
|
|
9591
9605
|
shouldDeferToNativeMode,
|
|
9592
9606
|
AGENT_QUESTION_TOOL,
|
|
9593
9607
|
AGENT_QUESTION_STRATEGY,
|
|
@@ -9608,6 +9622,9 @@ export {
|
|
|
9608
9622
|
isPermissionRequestOwnedByPreToolUse,
|
|
9609
9623
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
9610
9624
|
CLAUDE_MCP_PRETOOLUSE_MATCHER,
|
|
9625
|
+
CLAUDE_REFUSALS_ONLY_TOOLS,
|
|
9626
|
+
CLAUDE_REFUSALS_ONLY_PRETOOLUSE_MATCHER,
|
|
9627
|
+
claudeSubagentToolAliasOf,
|
|
9611
9628
|
permissionsOffLineAppliesTo,
|
|
9612
9629
|
permissionsOffAskReason,
|
|
9613
9630
|
resolveGate,
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6FR5ZYMS.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CPBS6LS3.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZRTUS6WD.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ODXZPMKN.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MZX35RFX.js";
|
|
20
20
|
import {
|
|
21
21
|
readJsonSafe,
|
|
22
22
|
writeFileAtomic,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-ZVU6WMMU.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-W744DTUT.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HVGN7TRN.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-363YZ5WJ.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,34 +39,35 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KG7UZSCD.js";
|
|
43
43
|
import {
|
|
44
|
+
isRetryable,
|
|
44
45
|
withRetry
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-UZL3VQCE.js";
|
|
46
47
|
import {
|
|
47
48
|
fetchAsCredential
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-47HCNA5U.js";
|
|
49
50
|
import {
|
|
50
51
|
getMachineId
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6FR5ZYMS.js";
|
|
52
53
|
import {
|
|
53
54
|
reportedInstallSource
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-B4M2XZNQ.js";
|
|
55
56
|
import {
|
|
56
57
|
IDLE_PROMPT_NOTIFICATION,
|
|
57
58
|
NOTIFICATION_PUSH_TYPES,
|
|
58
59
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
59
60
|
canonicalJson,
|
|
60
61
|
claudeConfigDir
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZRTUS6WD.js";
|
|
62
63
|
import {
|
|
63
64
|
compareVersion,
|
|
64
65
|
parseVersion
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-ODXZPMKN.js";
|
|
66
67
|
import {
|
|
67
68
|
getApiKey,
|
|
68
69
|
getBaseUrl
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-MZX35RFX.js";
|
|
70
71
|
import {
|
|
71
72
|
writeFileAtomic,
|
|
72
73
|
writeJsonAtomicDurable
|
|
@@ -95,7 +96,7 @@ import {
|
|
|
95
96
|
resolveAutoResolveOrigin,
|
|
96
97
|
resolvePolicy,
|
|
97
98
|
unansweredRefusalReason
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-W744DTUT.js";
|
|
99
100
|
|
|
100
101
|
// src/pending.ts
|
|
101
102
|
import { join } from "path";
|
|
@@ -376,7 +377,7 @@ var policyCacheFile = (apiKey, agent, repoAware = false) => {
|
|
|
376
377
|
return join2(tmpdir2(), `pushary-policy-${POLICY_CACHE_FORMAT}-${hash}.json`);
|
|
377
378
|
};
|
|
378
379
|
var POLICY_REQUEST_CAPABILITIES_VALUE = policyRequestCapabilitiesHeaderValue(CLI_POLICY_REQUEST_CAPABILITIES);
|
|
379
|
-
var fetchPolicy = async (apiKey, agent, repoAware = false, sessionId) => {
|
|
380
|
+
var fetchPolicy = async (apiKey, agent, repoAware = false, sessionId, signal) => {
|
|
380
381
|
return withRetry(async () => {
|
|
381
382
|
const baseUrl = getBaseUrl();
|
|
382
383
|
const params = new URLSearchParams();
|
|
@@ -389,7 +390,7 @@ var fetchPolicy = async (apiKey, agent, repoAware = false, sessionId) => {
|
|
|
389
390
|
const url = query ? `${baseUrl}/api/mcp/policy?${query}` : `${baseUrl}/api/mcp/policy`;
|
|
390
391
|
const response = await fetchAsCredential(apiKey, url, {
|
|
391
392
|
headers: { "Authorization": `Bearer ${apiKey}`, [POLICY_REQUEST_CAPABILITIES_HEADER]: POLICY_REQUEST_CAPABILITIES_VALUE },
|
|
392
|
-
signal: AbortSignal.timeout(1e4)
|
|
393
|
+
signal: AbortSignal.any([AbortSignal.timeout(1e4), ...signal ? [signal] : []])
|
|
393
394
|
});
|
|
394
395
|
if (!response.ok) {
|
|
395
396
|
throw new Error(`Failed to fetch policy: ${response.status}`);
|
|
@@ -397,9 +398,9 @@ var fetchPolicy = async (apiKey, agent, repoAware = false, sessionId) => {
|
|
|
397
398
|
const raw = await response.json();
|
|
398
399
|
if (!isPolicyConfig(raw)) throw new Error("Invalid policy response");
|
|
399
400
|
return raw;
|
|
400
|
-
}, { maxAttempts: 2 });
|
|
401
|
+
}, { maxAttempts: 2, shouldRetry: (error) => signal?.aborted !== true && isRetryable(error) });
|
|
401
402
|
};
|
|
402
|
-
var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessionId) => {
|
|
403
|
+
var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessionId, signal) => {
|
|
403
404
|
const path = policyCacheFile(apiKey, agent, repoAware);
|
|
404
405
|
let staleCache = null;
|
|
405
406
|
if (existsSync2(path)) {
|
|
@@ -419,7 +420,7 @@ var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessio
|
|
|
419
420
|
}
|
|
420
421
|
}
|
|
421
422
|
try {
|
|
422
|
-
const policy = await fetchPolicy(apiKey, agent, repoAware, sessionId);
|
|
423
|
+
const policy = await fetchPolicy(apiKey, agent, repoAware, sessionId, signal);
|
|
423
424
|
try {
|
|
424
425
|
writeFileSync2(path, JSON.stringify({ ...policy, _cachedAt: Date.now(), _policyVersion: expectedVersion ?? null, _sessionId: sessionId ?? null }), { encoding: "utf-8", mode: 384 });
|
|
425
426
|
} catch {
|
|
@@ -430,6 +431,18 @@ var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessio
|
|
|
430
431
|
throw new Error("Failed to fetch policy and no cached policy available");
|
|
431
432
|
}
|
|
432
433
|
};
|
|
434
|
+
var readFreshPolicyOfAnySession = (path, expectedVersion) => {
|
|
435
|
+
try {
|
|
436
|
+
const cached = JSON.parse(readFileSync2(path, "utf-8"));
|
|
437
|
+
if (!isRecord(cached) || typeof cached._cachedAt !== "number") return null;
|
|
438
|
+
if (Date.now() - cached._cachedAt >= CACHE_TTL_MS) return null;
|
|
439
|
+
if (expectedVersion != null && (cached._policyVersion ?? null) !== expectedVersion) return null;
|
|
440
|
+
return isPolicyConfig(cached) ? cached : null;
|
|
441
|
+
} catch {
|
|
442
|
+
return null;
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
var getPolicyForStandingDenies = async (apiKey, expectedVersion, agent, repoAware, sessionId, signal) => readFreshPolicyOfAnySession(policyCacheFile(apiKey, agent, repoAware), expectedVersion) ?? getPolicy(apiKey, expectedVersion, agent, repoAware, sessionId, signal);
|
|
433
446
|
var readCachedPolicy = (apiKey, agent, repoAware = false) => {
|
|
434
447
|
const path = policyCacheFile(apiKey, agent, repoAware);
|
|
435
448
|
try {
|
|
@@ -446,6 +459,7 @@ var modeStateCacheFile = (apiKey) => {
|
|
|
446
459
|
const hash = createHash2("sha256").update(`mode:${apiKey}`).digest("hex").slice(0, 12);
|
|
447
460
|
return join2(tmpdir2(), `pushary-mode-${hash}.json`);
|
|
448
461
|
};
|
|
462
|
+
var wasFetchedForSession = (cached, sessionId) => (cached.sessionId ?? null) === (sessionId ?? null);
|
|
449
463
|
var readLastGoodMode = (apiKey) => {
|
|
450
464
|
try {
|
|
451
465
|
const path = modeStateCacheFile(apiKey);
|
|
@@ -473,25 +487,25 @@ var unknownMode = () => ({
|
|
|
473
487
|
scope: null,
|
|
474
488
|
degraded: true
|
|
475
489
|
});
|
|
476
|
-
var degradedFallback = (apiKey, authoritative = false) => {
|
|
490
|
+
var degradedFallback = (apiKey, sessionId, authoritative = false) => {
|
|
477
491
|
if (authoritative) return unknownMode();
|
|
478
492
|
const last = readLastGoodMode(apiKey);
|
|
479
|
-
if (last
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
return unknownMode();
|
|
493
|
+
if (!last || Date.now() - last.at >= MODE_GRACE_MS) return unknownMode();
|
|
494
|
+
if (wasFetchedForSession(last, sessionId)) return { ...last.state, degraded: false };
|
|
495
|
+
return { ...unknownMode(), kill: last.state.kill === true };
|
|
483
496
|
};
|
|
484
497
|
var MODE_REUSE_MS = CACHE_TTL_MS;
|
|
485
498
|
var readReusableMode = (apiKey, sessionId, maxAgeMs) => {
|
|
486
499
|
const last = readLastGoodMode(apiKey);
|
|
487
|
-
if (!last || (last
|
|
500
|
+
if (!last || !wasFetchedForSession(last, sessionId)) return null;
|
|
488
501
|
if (Date.now() - last.at >= maxAgeMs) return null;
|
|
489
502
|
return { ...last.state, degraded: false };
|
|
490
503
|
};
|
|
491
|
-
var
|
|
504
|
+
var unansweredModeRead = (state) => ({ state, answeredLive: false });
|
|
505
|
+
var readModeState = async (apiKey, sessionId, reuseWithinMs, signal) => {
|
|
492
506
|
if (reuseWithinMs > 0) {
|
|
493
507
|
const reusable = readReusableMode(apiKey, sessionId, reuseWithinMs);
|
|
494
|
-
if (reusable) return reusable;
|
|
508
|
+
if (reusable) return unansweredModeRead(reusable);
|
|
495
509
|
}
|
|
496
510
|
try {
|
|
497
511
|
const baseUrl = getBaseUrl();
|
|
@@ -502,21 +516,23 @@ var fetchModeState = async (apiKey, sessionId, reuseWithinMs = 0, signal) => {
|
|
|
502
516
|
});
|
|
503
517
|
if (!response.ok) {
|
|
504
518
|
void reportClientError({ kind: "http_status", code: `mode_http_${response.status}` });
|
|
505
|
-
return degradedFallback(apiKey, response.status === 401 || response.status === 403);
|
|
519
|
+
return unansweredModeRead(degradedFallback(apiKey, sessionId, response.status === 401 || response.status === 403));
|
|
506
520
|
}
|
|
507
521
|
const body = await response.json();
|
|
508
522
|
if (!isProvenModeResponse(body)) {
|
|
509
523
|
void reportClientError({ kind: "invalid_response", code: "mode_response_unproven" });
|
|
510
|
-
return degradedFallback(apiKey);
|
|
524
|
+
return unansweredModeRead(degradedFallback(apiKey, sessionId));
|
|
511
525
|
}
|
|
512
526
|
const state = modeStateFromResponse(body);
|
|
513
527
|
writeLastGoodMode(apiKey, state, sessionId);
|
|
514
|
-
return state;
|
|
528
|
+
return { state, answeredLive: true };
|
|
515
529
|
} catch (error) {
|
|
516
530
|
void reportClientError({ kind: clientErrorKindOf(error), code: "mode_fetch_failed" });
|
|
517
|
-
return degradedFallback(apiKey);
|
|
531
|
+
return unansweredModeRead(degradedFallback(apiKey, sessionId));
|
|
518
532
|
}
|
|
519
533
|
};
|
|
534
|
+
var fetchModeState = async (apiKey, sessionId, reuseWithinMs = 0, signal) => (await readModeState(apiKey, sessionId, reuseWithinMs, signal)).state;
|
|
535
|
+
var fetchLiveModeState = (apiKey, sessionId, signal) => readModeState(apiKey, sessionId, 0, signal);
|
|
520
536
|
var fetchModeOverride = async (apiKey) => (await fetchModeState(apiKey)).mode;
|
|
521
537
|
|
|
522
538
|
// src/usage.ts
|
|
@@ -1677,8 +1693,10 @@ export {
|
|
|
1677
1693
|
releaseThrottle,
|
|
1678
1694
|
policyRequestFor,
|
|
1679
1695
|
getPolicy,
|
|
1696
|
+
getPolicyForStandingDenies,
|
|
1680
1697
|
readCachedPolicy,
|
|
1681
1698
|
fetchModeState,
|
|
1699
|
+
fetchLiveModeState,
|
|
1682
1700
|
fetchModeOverride,
|
|
1683
1701
|
readLastUserPrompt,
|
|
1684
1702
|
CODEX_AGENT,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6FR5ZYMS.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MZX35RFX.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-YU2EUD7O.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W744DTUT.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZRTUS6WD.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ZVU6WMMU.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-W744DTUT.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZRTUS6WD.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ODXZPMKN.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-ROVLRXBI.js";
|
|
4
4
|
import {
|
|
5
5
|
parseVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ODXZPMKN.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W744DTUT.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/agent-probe.ts
|
|
12
12
|
import { execSync } from "child_process";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AIABYHHZ.js";
|
|
4
4
|
import {
|
|
5
5
|
canChangeApprovalSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KESS6HAK.js";
|
|
7
7
|
import {
|
|
8
8
|
matchMacAccountStep,
|
|
9
9
|
retryAgentCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EDNCFLR7.js";
|
|
11
11
|
import {
|
|
12
12
|
EXIT
|
|
13
13
|
} from "./chunk-BG4HHB7E.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7VRL6XYM.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/closing.ts
|
|
19
19
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRTUS6WD.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W744DTUT.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|