pushary 1.9.20 → 1.9.22
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 +10 -0
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +14 -12
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +36 -33
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +37 -37
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +25 -25
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +33 -33
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-doctor.js +34 -34
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +14 -14
- package/dist/bin/pushary-gemini-hook.js +30 -30
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +36 -20
- package/dist/bin/pushary-mcp.js +10 -10
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +29 -29
- package/dist/bin/pushary-permission-denied-hook.js +31 -31
- package/dist/bin/pushary-permission-hook.js +30 -30
- 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 +30 -30
- package/dist/bin/pushary-setup.js +53 -48
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -29
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +13 -13
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +9 -9
- package/dist/bin/pushary-upgrade.js +31 -31
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-LXYNKZFP.js → chunk-2MW4OHWI.js} +2 -2
- package/dist/{chunk-OLJ4GIRP.js → chunk-3BWW4UMT.js} +2 -2
- package/dist/{chunk-ZNFARGEY.js → chunk-4AO2OVUA.js} +6 -6
- package/dist/{chunk-P77EIWBJ.js → chunk-4PERN2SO.js} +2 -2
- package/dist/{chunk-5C2GFTWE.js → chunk-5AZ546F6.js} +1 -1
- package/dist/{chunk-MID7BURF.js → chunk-5TLRS3AK.js} +2 -2
- package/dist/{chunk-4ABHSCFJ.js → chunk-6IOLTFNP.js} +29 -26
- package/dist/{chunk-HILWD7WM.js → chunk-6SFTI7LM.js} +3 -3
- package/dist/{chunk-DF2FSJ7B.js → chunk-6TSEEKPL.js} +4 -4
- package/dist/{chunk-XQ4HTTBB.js → chunk-75MJRC5I.js} +1 -1
- package/dist/{chunk-MGW26CW7.js → chunk-76YNWUXC.js} +1 -1
- package/dist/{chunk-K5PUP76V.js → chunk-AGIO7SF5.js} +9 -6
- package/dist/{chunk-FT7UNIS3.js → chunk-AQFEP65J.js} +2 -1
- package/dist/{chunk-DBEJIFJD.js → chunk-AR4NXO4Q.js} +2 -2
- package/dist/{chunk-ANPECDYL.js → chunk-ARJSQUIS.js} +3 -3
- package/dist/{chunk-UVEIBBTR.js → chunk-BDGKWUK2.js} +2 -2
- package/dist/{chunk-CRW4P7JU.js → chunk-BDV4WDIA.js} +1 -1
- package/dist/{chunk-CW4CF7NU.js → chunk-CW3QUV6B.js} +11 -11
- package/dist/{chunk-A6U4RRFM.js → chunk-DV26ZWUC.js} +2 -2
- package/dist/{chunk-XGHXQUDG.js → chunk-E3FSKKTJ.js} +1 -1
- package/dist/{chunk-YJWEQZJC.js → chunk-E7EOUEGQ.js} +4 -4
- package/dist/{chunk-LU7JPQKL.js → chunk-E7HOX73X.js} +4 -4
- package/dist/{chunk-RGSG2GYV.js → chunk-G5YMVGAK.js} +4 -4
- package/dist/{chunk-6HMCOGKJ.js → chunk-GFXZDU4V.js} +31 -12
- package/dist/{chunk-ATDOYZXC.js → chunk-GNQZY4GL.js} +1 -1
- package/dist/{chunk-LB4HVID5.js → chunk-GWKT2ZZS.js} +3 -3
- package/dist/{chunk-6W6UY4AJ.js → chunk-JQVGCDHW.js} +5 -5
- package/dist/{chunk-AESHOWIB.js → chunk-KCLWVCGN.js} +8 -5
- package/dist/{chunk-XDKZZSU6.js → chunk-KCXG2INQ.js} +2 -2
- package/dist/{chunk-7YTJOWYI.js → chunk-KH2EDRJQ.js} +6 -3
- package/dist/{chunk-PPAMIQOV.js → chunk-LH3GTSXC.js} +10 -10
- package/dist/{chunk-HPMP6QQD.js → chunk-N2JP3RKP.js} +10 -9
- package/dist/{chunk-NESTNKCA.js → chunk-NB2PY5JX.js} +3 -3
- package/dist/{chunk-SB2GN6OP.js → chunk-OYIN77HO.js} +3 -2
- package/dist/{chunk-MMIN6VNU.js → chunk-OZVZGWER.js} +1 -1
- package/dist/{chunk-6I4D3XZ3.js → chunk-P345G4DK.js} +1 -7
- package/dist/{chunk-422Z3LBB.js → chunk-SGUGGHMC.js} +3 -3
- package/dist/{chunk-736I6CBY.js → chunk-T57BCGHQ.js} +1 -1
- package/dist/{chunk-DNSYWI7D.js → chunk-TH3HKKGW.js} +14 -13
- package/dist/{chunk-Q4EQHBA7.js → chunk-TSFNX5J2.js} +5 -14
- package/dist/{chunk-LHGB64O2.js → chunk-TZWZVAMN.js} +1 -1
- package/dist/{chunk-YONHM5BQ.js → chunk-U26CAOZC.js} +1 -1
- package/dist/{chunk-XJGGGDHX.js → chunk-U2IEM5FF.js} +2 -2
- package/dist/{chunk-XVNZHIVF.js → chunk-U4OWRGYI.js} +9 -8
- package/dist/{chunk-DQTBQHB5.js → chunk-UFGU7AK3.js} +2 -2
- package/dist/{chunk-6WEC3KZP.js → chunk-VTR4VRL2.js} +1 -1
- package/dist/{chunk-RZCTGLUJ.js → chunk-WAKQYJ6T.js} +3 -3
- package/dist/{chunk-2V2CCTGQ.js → chunk-WE2RVY7V.js} +1 -1
- package/dist/{chunk-N5K5H2AQ.js → chunk-XDTYGS6R.js} +5 -5
- package/dist/{chunk-VOIN2NZW.js → chunk-YGR5PBOF.js} +3 -3
- package/dist/{chunk-Z4YQ7ZMO.js → chunk-YI543EKI.js} +3 -3
- package/dist/{chunk-2YAHQ763.js → chunk-YODL2CJV.js} +5 -5
- package/dist/{chunk-OZOD37XK.js → chunk-YPZ4AE2R.js} +5 -5
- package/dist/{chunk-BIQF3C4H.js → chunk-YR3DHPYI.js} +1 -1
- package/dist/{chunk-EP6FWWBY.js → chunk-Z7KB4R6U.js} +11 -8
- package/dist/{chunk-R7SSVBHX.js → chunk-ZUOIDI6M.js} +4 -4
- package/dist/{global-upgrade-EELV2YEK.js → global-upgrade-F3QY6OHE.js} +7 -7
- package/dist/{paths-MDOKPY7A.js → paths-CBEAZNJR.js} +2 -2
- package/dist/{reapply-22C75UEY.js → reapply-4HP6N7LY.js} +21 -21
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-VPL5AYPQ.js → upgrade-lock-N3G5V2QS.js} +4 -4
- package/package.json +1 -1
|
@@ -676,6 +676,9 @@ var redactSecrets = (text) => applyRedactionRules(SECRET_REDACTION_RULES, text);
|
|
|
676
676
|
var redactSecretsFromContent = (text) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text);
|
|
677
677
|
var redactSecretsDeep = (text) => redactSecrets(text).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
|
|
678
678
|
|
|
679
|
+
// ../contracts/src/json-record.ts
|
|
680
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
681
|
+
|
|
679
682
|
// ../contracts/src/shell-analysis.ts
|
|
680
683
|
var SHELL_WORD_SEPARATOR = /[ \t\n]/;
|
|
681
684
|
var ARITHMETIC_EVALUATING_EXPANSION = /\$[#+=~^]*(?:[A-Za-z_][A-Za-z0-9_]*|[0-9]+|[-?$!@*#])?\[/;
|
|
@@ -880,7 +883,6 @@ var AUTH_REJECTION_REASONS = [
|
|
|
880
883
|
var DECLINED_AGENTS_FILE = "declined-agents.json";
|
|
881
884
|
var DECLINED_AGENTS_VERSION = 1;
|
|
882
885
|
var isDeclinableAgent = (value) => typeof value === "string" && DISCONNECT_AGENT_IDS.includes(value);
|
|
883
|
-
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
884
886
|
var canonicalAgents = (agents) => [...new Set(agents)].sort();
|
|
885
887
|
var parseDeclinedAgents = (value) => {
|
|
886
888
|
if (!isRecord(value) || value.version !== DECLINED_AGENTS_VERSION || !Array.isArray(value.agents)) return [];
|
|
@@ -1063,7 +1065,6 @@ var hasNativeApprovalPrompt = (source, event) => !(source === "cursor" && event
|
|
|
1063
1065
|
var SUPPORT_EMAIL = "business@pushary.com";
|
|
1064
1066
|
var SUPPORT_DISCORD = "https://discord.gg/9v3VvUByrr";
|
|
1065
1067
|
var HOOK_LOCATOR_BINARY = "pushary-bridge";
|
|
1066
|
-
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1067
1068
|
var isTokenCount = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
1068
1069
|
var reportableSessionId = (value) => typeof value === "string" && value.length > 0 && value.length <= SESSION_ID_MAX_LENGTH ? value : null;
|
|
1069
1070
|
var HOOK_BATCH_MAX_BYTES = 4 * 1024 * 1024;
|
|
@@ -1901,7 +1902,9 @@ var mcpToolNameNeedsAPerson = (toolName) => {
|
|
|
1901
1902
|
};
|
|
1902
1903
|
var allowsSessionToolGrant = (toolName) => SESSION_TOOL_GRANT_TOOLS.has(toolName) || parseMcpToolName(toolName) !== void 0 && !isPusharyOwnTool(toolName.toLowerCase()) && !mcpToolNameNeedsAPerson(toolName);
|
|
1903
1904
|
var isSessionToolGrant = (policy) => Boolean(policy.sessionId) && allowsSessionToolGrant(policy.tool) && isAutoApprove(policy);
|
|
1904
|
-
var
|
|
1905
|
+
var API_KEY_PREFIX_SHAPE = "pk_[a-f0-9]+";
|
|
1906
|
+
var API_KEY_PREFIX_PATTERN = new RegExp(`^${API_KEY_PREFIX_SHAPE}$`);
|
|
1907
|
+
var API_KEY_PATTERN = new RegExp(`^${API_KEY_PREFIX_SHAPE}\\.[a-f0-9]+$`);
|
|
1905
1908
|
var isValidApiKey = (value) => API_KEY_PATTERN.test(value);
|
|
1906
1909
|
var ACTION_BODY_MAX = 4e3;
|
|
1907
1910
|
var DECISION_LINE_MAX = 500;
|
|
@@ -2122,9 +2125,19 @@ var SETTLED_OUTCOME = {
|
|
|
2122
2125
|
deny: "deny"
|
|
2123
2126
|
};
|
|
2124
2127
|
var isSettledOutcome = (value) => typeof value === "string" && SETTLED_OUTCOMES.includes(value);
|
|
2125
|
-
var
|
|
2126
|
-
var
|
|
2127
|
-
var
|
|
2128
|
+
var APPROVE_ANSWER = "yes";
|
|
2129
|
+
var DENY_ANSWER = "no";
|
|
2130
|
+
var DEFER_ANSWER = "defer";
|
|
2131
|
+
var PHONE_DENIAL_PREFIX = "Denied from your phone: ";
|
|
2132
|
+
var PHONE_DENIAL_REASON = "Denied via push notification";
|
|
2133
|
+
var denyReasonFrom = (value, note) => {
|
|
2134
|
+
const trimmed = note?.trim();
|
|
2135
|
+
if (trimmed) return `${PHONE_DENIAL_PREFIX}${trimmed}`;
|
|
2136
|
+
return value && value !== DENY_ANSWER && value !== APPROVE_ANSWER ? `${PHONE_DENIAL_PREFIX}${value}` : PHONE_DENIAL_REASON;
|
|
2137
|
+
};
|
|
2138
|
+
var APPROVE_RESPONSES = /* @__PURE__ */ new Set([APPROVE_ANSWER, "approve", "approved"]);
|
|
2139
|
+
var DENY_RESPONSES = /* @__PURE__ */ new Set([DENY_ANSWER, "deny", "denied", "reject", "rejected"]);
|
|
2140
|
+
var DEFER_RESPONSES = /* @__PURE__ */ new Set([DEFER_ANSWER]);
|
|
2128
2141
|
var classifyConfirmResponse = (response) => {
|
|
2129
2142
|
const normalized = (response ?? "").trim().toLowerCase();
|
|
2130
2143
|
if (APPROVE_RESPONSES.has(normalized)) return "approve";
|
|
@@ -2587,6 +2600,7 @@ var SCOPE_BATCH_REASON = "This patch exceeds the agreed scope. Split it into sin
|
|
|
2587
2600
|
var unapprovedScopeReason = (scopeReason) => `${scopeReason}. Nobody approved this path, so the change was refused.`;
|
|
2588
2601
|
var NO_RESPONSE_REASON = "No response within timeout";
|
|
2589
2602
|
var codexRaisesItsOwnPrompts = (permissionMode) => permissionMode !== "bypassPermissions";
|
|
2603
|
+
var codexHasNoPromptOfItsOwn = (scopeReason, permissionMode) => scopeReason !== void 0 || !codexRaisesItsOwnPrompts(permissionMode);
|
|
2590
2604
|
var CODEX_ASK_PASSES = { kind: "pass" };
|
|
2591
2605
|
var CODEX_ASK_UNANSWERED = { kind: "deny", reason: NO_RESPONSE_REASON };
|
|
2592
2606
|
var timeoutActionApplies = (ask) => ask.mode === "push_only" && ask.fullWindowServed;
|
|
@@ -2612,7 +2626,7 @@ var settingsPermissionList = (permissions, kind) => {
|
|
|
2612
2626
|
};
|
|
2613
2627
|
var boundedUnion = (lists) => [...new Set(lists.flat())].slice(0, MAX_AGENT_PERMISSION_RULES_PER_KIND);
|
|
2614
2628
|
var claudePermissionRulesFromSettings = (documents) => {
|
|
2615
|
-
const permissionBlocks = documents.flatMap((document) =>
|
|
2629
|
+
const permissionBlocks = documents.flatMap((document) => isRecord(document) && isRecord(document.permissions) ? [document.permissions] : []);
|
|
2616
2630
|
const collect = (kind) => boundedUnion(permissionBlocks.map((permissions) => settingsPermissionList(permissions, kind)));
|
|
2617
2631
|
return { allow: collect("allow"), ask: collect("ask"), deny: collect("deny") };
|
|
2618
2632
|
};
|
|
@@ -2676,6 +2690,7 @@ var modeStateFromResponse = (data) => {
|
|
|
2676
2690
|
};
|
|
2677
2691
|
var GATE_WIRE = 1;
|
|
2678
2692
|
var GATE_MAX_TOOL_INPUTS = 32;
|
|
2693
|
+
var GATE_PERMISSION_MODE_MAX_LENGTH = 64;
|
|
2679
2694
|
var GATE_BLOCK_REASON_MAX_LENGTH = 200;
|
|
2680
2695
|
var wireVerdictFor = (verdict, deadlineSeconds) => {
|
|
2681
2696
|
switch (verdict.kind) {
|
|
@@ -3033,16 +3048,16 @@ var globalInstallTarget = (owner, ownName) => {
|
|
|
3033
3048
|
return LEGACY_PACKAGE;
|
|
3034
3049
|
}
|
|
3035
3050
|
};
|
|
3036
|
-
var
|
|
3037
|
-
var declaresOwnershipProbe = (bin) =>
|
|
3051
|
+
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3052
|
+
var declaresOwnershipProbe = (bin) => isRecord2(bin) && typeof bin[OWNERSHIP_PROBE_COMMAND] === "string";
|
|
3038
3053
|
var cliManifestName = (manifest) => {
|
|
3039
|
-
if (!
|
|
3054
|
+
if (!isRecord2(manifest) || !isCliPackageName(manifest.name) || !declaresOwnershipProbe(manifest.bin)) return void 0;
|
|
3040
3055
|
return manifest.name;
|
|
3041
3056
|
};
|
|
3042
3057
|
var classifyGlobalFolder = (name, read) => {
|
|
3043
3058
|
if (read.kind === "unreadable") return { kind: "unseen" };
|
|
3044
3059
|
const { manifest } = read;
|
|
3045
|
-
if (!
|
|
3060
|
+
if (!isRecord2(manifest) || cliManifestName(manifest) !== name) return { kind: "foreign" };
|
|
3046
3061
|
return { kind: "ours", installed: { name, version: typeof manifest.version === "string" ? manifest.version : void 0 } };
|
|
3047
3062
|
};
|
|
3048
3063
|
var classifyGlobalInstall = (installed, owner) => {
|
|
@@ -3151,6 +3166,7 @@ export {
|
|
|
3151
3166
|
redactSecrets,
|
|
3152
3167
|
redactSecretsFromContent,
|
|
3153
3168
|
redactSecretsDeep,
|
|
3169
|
+
isRecord,
|
|
3154
3170
|
degradedLine,
|
|
3155
3171
|
hookWritePath,
|
|
3156
3172
|
MAX_HOOK_ACTIVATION_EVIDENCE_ROWS,
|
|
@@ -3200,6 +3216,7 @@ export {
|
|
|
3200
3216
|
isAutoApprove,
|
|
3201
3217
|
FILE_TARGET_TOOLS,
|
|
3202
3218
|
parseMcpToolName,
|
|
3219
|
+
API_KEY_PREFIX_PATTERN,
|
|
3203
3220
|
isValidApiKey,
|
|
3204
3221
|
ACTION_BODY_MAX,
|
|
3205
3222
|
DECISION_LINE_MAX,
|
|
@@ -3207,6 +3224,7 @@ export {
|
|
|
3207
3224
|
ASK_AGENT_NAME_MAX,
|
|
3208
3225
|
truncateLine,
|
|
3209
3226
|
isAnswerSource,
|
|
3227
|
+
denyReasonFrom,
|
|
3210
3228
|
classifyConfirmResponse,
|
|
3211
3229
|
buildDecisionEpisodeFeatures,
|
|
3212
3230
|
resolveAutoResolveOrigin,
|
|
@@ -3229,7 +3247,7 @@ export {
|
|
|
3229
3247
|
SCOPE_BATCH_REASON,
|
|
3230
3248
|
unapprovedScopeReason,
|
|
3231
3249
|
NO_RESPONSE_REASON,
|
|
3232
|
-
|
|
3250
|
+
codexHasNoPromptOfItsOwn,
|
|
3233
3251
|
codexUnansweredPreToolUse,
|
|
3234
3252
|
scopeBreachReasonOf,
|
|
3235
3253
|
codexCallNeedsAPerson,
|
|
@@ -3240,6 +3258,7 @@ export {
|
|
|
3240
3258
|
modeStateFromResponse,
|
|
3241
3259
|
GATE_WIRE,
|
|
3242
3260
|
GATE_MAX_TOOL_INPUTS,
|
|
3261
|
+
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
3243
3262
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
3244
3263
|
wireVerdictFor,
|
|
3245
3264
|
machineDecisionFor,
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AQFEP65J.js";
|
|
11
11
|
import {
|
|
12
12
|
CLI_PACKAGE_NAMES,
|
|
13
13
|
POSIX_GLOBAL_ROOT_SEGMENTS,
|
|
14
14
|
cliPackagePathSegments,
|
|
15
15
|
globalUpgradeEntry,
|
|
16
16
|
ownPackageRoot
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GFXZDU4V.js";
|
|
18
18
|
|
|
19
19
|
// src/auto-update.ts
|
|
20
20
|
import { spawn } from "child_process";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4PERN2SO.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GWKT2ZZS.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
npmErrorMessage,
|
|
28
28
|
readGlobalCliInstallAt,
|
|
29
29
|
readGlobalPrefix
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TZWZVAMN.js";
|
|
34
34
|
import {
|
|
35
35
|
commandsPackage,
|
|
36
36
|
globalUpgradeEntry,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
isSameMajorVersion,
|
|
40
40
|
ownPackageRoot,
|
|
41
41
|
packageVersionAt
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GFXZDU4V.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6TSEEKPL.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TSFNX5J2.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
12
|
+
import {
|
|
13
|
+
isRecord
|
|
14
|
+
} from "./chunk-GFXZDU4V.js";
|
|
12
15
|
|
|
13
16
|
// src/cursor-config.ts
|
|
14
17
|
var hookCommandOf = (entry) => {
|
|
15
|
-
const command =
|
|
18
|
+
const command = isRecord(entry) ? entry.command : void 0;
|
|
16
19
|
return typeof command === "string" ? command : "";
|
|
17
20
|
};
|
|
18
21
|
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
|
|
@@ -38,7 +41,7 @@ var isCursorPluginLeftover = (name) => name.startsWith(`${CURSOR_PLUGIN_NAME}${C
|
|
|
38
41
|
var isPusharyCursorPluginManifest = (contents) => {
|
|
39
42
|
try {
|
|
40
43
|
const manifest = JSON.parse(contents);
|
|
41
|
-
return
|
|
44
|
+
return isRecord(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
|
|
42
45
|
} catch {
|
|
43
46
|
return false;
|
|
44
47
|
}
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GFXZDU4V.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AQFEP65J.js";
|
|
7
|
+
import {
|
|
8
|
+
isRecord
|
|
9
|
+
} from "./chunk-GFXZDU4V.js";
|
|
7
10
|
|
|
8
11
|
// src/process-ownership.ts
|
|
9
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -21,7 +24,7 @@ var isProof = (value) => {
|
|
|
21
24
|
};
|
|
22
25
|
var removeProof = (path, token) => {
|
|
23
26
|
const current = readJsonSafe(path);
|
|
24
|
-
if (current.kind !== "ok" || current.value.token !== token) return;
|
|
27
|
+
if (current.kind !== "ok" || !isRecord(current.value) || current.value.token !== token) return;
|
|
25
28
|
try {
|
|
26
29
|
unlinkSync(path);
|
|
27
30
|
} catch {
|
|
@@ -3,41 +3,41 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VTR4VRL2.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N2JP3RKP.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E3FSKKTJ.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GNQZY4GL.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WE2RVY7V.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TSFNX5J2.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6IOLTFNP.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-AQFEP65J.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-75MJRC5I.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -4,30 +4,31 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6IOLTFNP.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U2IEM5FF.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
18
18
|
writeJsonAtomic,
|
|
19
19
|
writeJsonAtomicDurable
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AQFEP65J.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-75MJRC5I.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
27
27
|
getPackageVersion,
|
|
28
28
|
globalPackageFolder,
|
|
29
|
-
globalRootFor
|
|
30
|
-
|
|
29
|
+
globalRootFor,
|
|
30
|
+
isRecord
|
|
31
|
+
} from "./chunk-GFXZDU4V.js";
|
|
31
32
|
|
|
32
33
|
// src/daemon-lifecycle.ts
|
|
33
34
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -615,7 +616,7 @@ var acquireDaemonLease = (options = {}) => {
|
|
|
615
616
|
let currentState = state;
|
|
616
617
|
const isOwner = () => {
|
|
617
618
|
const owner = readJsonSafe(lockPath(dir));
|
|
618
|
-
return owner.kind === "ok" && owner.value.instanceId === instanceId;
|
|
619
|
+
return owner.kind === "ok" && isRecord(owner.value) && owner.value.instanceId === instanceId;
|
|
619
620
|
};
|
|
620
621
|
const updateState = (next) => {
|
|
621
622
|
if (!isOwner()) return;
|
|
@@ -659,7 +660,7 @@ var acquireDaemonLease = (options = {}) => {
|
|
|
659
660
|
shouldYield: () => {
|
|
660
661
|
if (!isOwner()) return true;
|
|
661
662
|
const target = readJsonSafe(targetPath(dir));
|
|
662
|
-
return target.kind === "ok" && (typeof target.value.version === "string" && target.value.version !== installedVersion || isTimestamp(target.value.requestedAt) && Date.parse(target.value.requestedAt) > Date.parse(startedAt));
|
|
663
|
+
return target.kind === "ok" && isRecord(target.value) && (typeof target.value.version === "string" && target.value.version !== installedVersion || isTimestamp(target.value.requestedAt) && Date.parse(target.value.requestedAt) > Date.parse(startedAt));
|
|
663
664
|
},
|
|
664
665
|
release: () => {
|
|
665
666
|
if (!isOwner()) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WAKQYJ6T.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-75MJRC5I.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GFXZDU4V.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;
|
|
@@ -20,7 +20,7 @@ var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
|
|
|
20
20
|
});
|
|
21
21
|
if (!response.ok) return { kind: "refused", status: response.status };
|
|
22
22
|
const revoked = await readRevokedCount(response);
|
|
23
|
-
if (revoked === null) return { kind: "
|
|
23
|
+
if (revoked === null) return { kind: "unconfirmed", status: response.status };
|
|
24
24
|
return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
|
|
25
25
|
};
|
|
26
26
|
var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
|
|
@@ -42,10 +42,11 @@ var REVOKE_DETAIL = {
|
|
|
42
42
|
revoked: "Revoked the key on pushary.com.",
|
|
43
43
|
not_accepted: "pushary.com had already stopped accepting the key.",
|
|
44
44
|
refused: "pushary.com refused to revoke the key",
|
|
45
|
+
unconfirmed: "pushary.com did not confirm the key was revoked",
|
|
45
46
|
unreachable: "Could not reach pushary.com to revoke the key"
|
|
46
47
|
};
|
|
47
48
|
var describeRevokeAttempt = (attempt) => {
|
|
48
|
-
if (attempt.kind === "refused") return `${REVOKE_DETAIL.
|
|
49
|
+
if (attempt.kind === "refused" || attempt.kind === "unconfirmed") return `${REVOKE_DETAIL[attempt.kind]} (HTTP ${attempt.status}).`;
|
|
49
50
|
if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
|
|
50
51
|
return REVOKE_DETAIL[attempt.kind];
|
|
51
52
|
};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_SESSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CW3QUV6B.js";
|
|
4
4
|
|
|
5
5
|
// src/answer.ts
|
|
6
|
-
var denyReasonFrom = (value, note) => {
|
|
7
|
-
const trimmed = note?.trim();
|
|
8
|
-
if (trimmed) return `Denied from your phone: ${trimmed}`;
|
|
9
|
-
return value && value !== "no" && value !== "yes" ? `Denied from your phone: ${value}` : "Denied via push notification";
|
|
10
|
-
};
|
|
11
6
|
var isDeferAnswer = (value) => value === "defer";
|
|
12
7
|
|
|
13
8
|
// src/session-notice.ts
|
|
@@ -38,7 +33,6 @@ var announceSubscriptionRequired = (upgradeUrl, sessionId) => {
|
|
|
38
33
|
};
|
|
39
34
|
|
|
40
35
|
export {
|
|
41
|
-
denyReasonFrom,
|
|
42
36
|
isDeferAnswer,
|
|
43
37
|
oncePerSession,
|
|
44
38
|
announceSubscriptionRequired
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U4OWRGYI.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom,
|
|
6
6
|
resolvePathBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
8
8
|
import {
|
|
9
9
|
HOOK_COMPATIBLE_PROFILES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GFXZDU4V.js";
|
|
11
11
|
|
|
12
12
|
// src/hermes-config.ts
|
|
13
13
|
import { execFileSync } from "child_process";
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AR4NXO4Q.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-T57BCGHQ.js";
|
|
9
9
|
import {
|
|
10
10
|
announceSubscriptionRequired,
|
|
11
|
-
denyReasonFrom,
|
|
12
11
|
isDeferAnswer,
|
|
13
12
|
oncePerSession
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P345G4DK.js";
|
|
15
14
|
import {
|
|
16
15
|
activeHookSource,
|
|
17
16
|
activeIdentity
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6TSEEKPL.js";
|
|
19
18
|
import {
|
|
20
19
|
DEFAULT_SESSION,
|
|
21
20
|
UNNAMED_ACTION,
|
|
@@ -40,7 +39,7 @@ import {
|
|
|
40
39
|
reportEvent,
|
|
41
40
|
scopePathFor,
|
|
42
41
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CW3QUV6B.js";
|
|
44
43
|
import {
|
|
45
44
|
askUser,
|
|
46
45
|
cancelQuestion,
|
|
@@ -52,20 +51,20 @@ import {
|
|
|
52
51
|
sendNotification,
|
|
53
52
|
waitForQuestion,
|
|
54
53
|
waitsForThePhone
|
|
55
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AGIO7SF5.js";
|
|
56
55
|
import {
|
|
57
56
|
SubscriptionRequiredError
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-6SFTI7LM.js";
|
|
59
58
|
import {
|
|
60
59
|
getMachineId
|
|
61
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-U2IEM5FF.js";
|
|
62
61
|
import {
|
|
63
62
|
getApiKey,
|
|
64
63
|
getBaseUrl
|
|
65
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-75MJRC5I.js";
|
|
66
65
|
import {
|
|
67
66
|
NPX_LATEST_COMMAND
|
|
68
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-TZWZVAMN.js";
|
|
69
68
|
import {
|
|
70
69
|
AGENT_QUESTION_STRATEGY,
|
|
71
70
|
DECISION_STOP_REASON,
|
|
@@ -89,6 +88,7 @@ import {
|
|
|
89
88
|
claudePreToolUseOutput,
|
|
90
89
|
claudeStoppedPermissionRequestOutput,
|
|
91
90
|
claudeStoppedPreToolUseOutput,
|
|
91
|
+
denyReasonFrom,
|
|
92
92
|
editGoesToTheAgentsPrompt,
|
|
93
93
|
effectiveWaitSeconds,
|
|
94
94
|
hasNativeApprovalPrompt,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
parseAgentQuestions,
|
|
105
105
|
questionHandedToTheTerminal,
|
|
106
106
|
resolveGate
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-GFXZDU4V.js";
|
|
108
108
|
|
|
109
109
|
// src/claude-permission-rules.ts
|
|
110
110
|
import { readFileSync, statSync } from "fs";
|
|
@@ -336,7 +336,8 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
336
336
|
// creates a fresh decision exactly as before.
|
|
337
337
|
toolUseId: input.tool_use_id,
|
|
338
338
|
sessionToolAware: true,
|
|
339
|
-
...ownPrompt ? {} : { localSurfaceAvailable: false }
|
|
339
|
+
...ownPrompt ? {} : { localSurfaceAvailable: false },
|
|
340
|
+
permissionMode: input.permission_mode
|
|
340
341
|
};
|
|
341
342
|
const signals = {};
|
|
342
343
|
const runHandler = () => {
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YGR5PBOF.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-U26CAOZC.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OZVZGWER.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GFXZDU4V.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -228,14 +228,6 @@ var hasAppCommand = (value) => commandsIn(value).some((command) => {
|
|
|
228
228
|
const executable = pusharyHookExecutable(command);
|
|
229
229
|
return executable !== null && isBridgeLocator(executable);
|
|
230
230
|
});
|
|
231
|
-
var mcpBearerKey = (document, containerKey, headersKey) => {
|
|
232
|
-
const servers = isRecord(document?.[containerKey]) ? document[containerKey] : null;
|
|
233
|
-
const pushary = isRecord(servers?.pushary) ? servers.pushary : null;
|
|
234
|
-
const headers = isRecord(pushary?.[headersKey]) ? pushary[headersKey] : null;
|
|
235
|
-
const authorization = headers?.Authorization;
|
|
236
|
-
const match = typeof authorization === "string" ? authorization.trim().match(/^Bearer\s+(\S+)$/) : null;
|
|
237
|
-
return match?.[1] ?? null;
|
|
238
|
-
};
|
|
239
231
|
var captureMcpServer = (document, containerKey) => {
|
|
240
232
|
const container = document[containerKey];
|
|
241
233
|
const servers = isRecord(container) ? container : null;
|
|
@@ -347,7 +339,6 @@ export {
|
|
|
347
339
|
holdsLong,
|
|
348
340
|
describeOtherHolder,
|
|
349
341
|
describeHoldSentence,
|
|
350
|
-
mcpBearerKey,
|
|
351
342
|
captureMcpServer,
|
|
352
343
|
restoreMcpServer,
|
|
353
344
|
captureHookTakeover,
|