@pushary/agent-hooks 1.9.38 → 1.9.40
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 +11 -0
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +24 -24
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +135 -30
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +32 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +35 -35
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-GBNG6QEV.js → chunk-22SNRAZS.js} +3 -3
- package/dist/{chunk-QC7ZNZMZ.js → chunk-2UG5Y6EC.js} +1 -1
- package/dist/{chunk-JWMCGL3P.js → chunk-2UKEITTN.js} +3 -3
- package/dist/{chunk-WLQENMOW.js → chunk-3E2P45GK.js} +4 -4
- package/dist/{chunk-D5IAEPFA.js → chunk-4YYT4QYH.js} +2 -2
- package/dist/{chunk-Y3XF324T.js → chunk-54JZ6GLW.js} +1 -1
- package/dist/{chunk-HCXBAF43.js → chunk-6YJS2IJS.js} +1 -1
- package/dist/{chunk-VITJTFFT.js → chunk-7TV7BXIH.js} +2 -2
- package/dist/{chunk-J2APHNZL.js → chunk-ABSVJ3WV.js} +5 -5
- package/dist/{chunk-L5WOYQT7.js → chunk-ADWW7Y6X.js} +8 -8
- package/dist/{chunk-QZ4KOMFE.js → chunk-ATMCBW5L.js} +1 -1
- package/dist/{chunk-BMHD2NEH.js → chunk-AYU4S7RQ.js} +3 -3
- package/dist/{chunk-KBMQYMGG.js → chunk-AYUCBAIJ.js} +6 -6
- package/dist/{chunk-4D54LZGF.js → chunk-BXPIKJPY.js} +1 -1
- package/dist/{chunk-W2TXFM6O.js → chunk-C7P5VIU6.js} +1 -1
- package/dist/{chunk-7GSOIBVM.js → chunk-CCAYCIW4.js} +4 -4
- package/dist/{chunk-MXEDMQLC.js → chunk-CPGW7MMA.js} +1 -1
- package/dist/{chunk-ABDGTGBT.js → chunk-CQ56WBBP.js} +3 -3
- package/dist/{chunk-AI2YBW42.js → chunk-DKJFRVVN.js} +5 -5
- package/dist/{chunk-FZEQWY7Q.js → chunk-E6QJMEQJ.js} +1 -1
- package/dist/{chunk-NRVZNZVE.js → chunk-EK7EOHH5.js} +5 -5
- package/dist/{chunk-QOUW57RT.js → chunk-EPFB6LGF.js} +32 -25
- package/dist/{chunk-WR3GKYKD.js → chunk-ESJY5UYZ.js} +1 -1
- package/dist/{chunk-DDRLK67P.js → chunk-FZ5FYVR3.js} +2 -2
- package/dist/{chunk-RISJLN3O.js → chunk-GBUAOQ7Q.js} +2 -2
- package/dist/{chunk-AJIH4JGB.js → chunk-HPZMNWDI.js} +5 -5
- package/dist/{chunk-K2CZJBUS.js → chunk-IKBQRXPQ.js} +4 -4
- package/dist/{chunk-7P43CI6G.js → chunk-KH57L2HF.js} +2 -2
- package/dist/{chunk-JVKY6ILU.js → chunk-KPDV6RQL.js} +1 -1
- package/dist/{chunk-N2I7RMC6.js → chunk-MAEO47WP.js} +10 -10
- package/dist/{chunk-MIENLS7P.js → chunk-MAMQK4I2.js} +2 -2
- package/dist/{chunk-WASCAI2U.js → chunk-MFGPTJJ3.js} +4 -4
- package/dist/{chunk-PA3OZGIA.js → chunk-N2JDDOQS.js} +8 -8
- package/dist/{chunk-5DC2PRVT.js → chunk-N7MBQPIF.js} +2 -2
- package/dist/{chunk-5KVL4AP5.js → chunk-P2IT4Y5Q.js} +4 -4
- package/dist/{chunk-3DXDJL4K.js → chunk-P2PWALZL.js} +4 -4
- package/dist/{chunk-TEG2JL5M.js → chunk-P7WQCX4D.js} +7 -7
- package/dist/{chunk-STXWIYAY.js → chunk-PFTAURWI.js} +4 -4
- package/dist/{chunk-B54Q4I7T.js → chunk-PKNHXBL2.js} +2 -2
- package/dist/{chunk-D2G6HWEA.js → chunk-PZTLBH6Z.js} +2 -2
- package/dist/{chunk-OLS4DTFN.js → chunk-QDC2VGFO.js} +3 -3
- package/dist/{chunk-G3CNMCQS.js → chunk-QENU2KIM.js} +1 -1
- package/dist/{chunk-ZFJAZBBF.js → chunk-QLV5S2KS.js} +5 -5
- package/dist/{chunk-3HUHP4A4.js → chunk-QWWJWPUV.js} +1 -1
- package/dist/{chunk-MBTNHQCI.js → chunk-SGOQGCKJ.js} +2 -2
- package/dist/{chunk-CHRRBADC.js → chunk-THIH3GV7.js} +6 -6
- package/dist/{chunk-4GEHVRV3.js → chunk-UOMFOMJM.js} +4 -4
- package/dist/{chunk-RULJMNY7.js → chunk-UTJSAOB2.js} +2 -2
- package/dist/{chunk-LZZ3EKKI.js → chunk-V2TZVYXI.js} +4 -4
- package/dist/{chunk-IBUAVM6X.js → chunk-VMIR56HZ.js} +1 -1
- package/dist/{chunk-7O5U5TED.js → chunk-W6PSSMTV.js} +5 -5
- package/dist/{chunk-CW3IJD2H.js → chunk-WNJW2NFZ.js} +3 -3
- package/dist/{chunk-D322CKL2.js → chunk-XJD5H72U.js} +1 -1
- package/dist/{chunk-FLEWP4BV.js → chunk-YVMQGRLS.js} +1 -1
- package/dist/{global-upgrade-ROZHFAO5.js → global-upgrade-KN7W4ULD.js} +6 -6
- package/dist/{paths-FSFFGRRU.js → paths-55G5FUXV.js} +2 -2
- package/dist/{reapply-WY5LHIR4.js → reapply-MCZ6RY6S.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-6PYOTF4X.js → upgrade-lock-HNWCOGS6.js} +3 -3
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QDC2VGFO.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AYU4S7RQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XJD5H72U.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IKBQRXPQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P2IT4Y5Q.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
readConfigFileKey,
|
|
14
14
|
readKeySource,
|
|
15
15
|
readMacAppKeyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2UKEITTN.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QDC2VGFO.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EPFB6LGF.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ATMCBW5L.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-4YYT4QYH.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-UOMFOMJM.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CPGW7MMA.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-EPFB6LGF.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -388,9 +388,9 @@ var CANONICAL_COMMAND_KEYS = ["command"];
|
|
|
388
388
|
var SHELL_TOOLS = /* @__PURE__ */ new Set([SHELL_TOOL, POWERSHELL_TOOL]);
|
|
389
389
|
var PATH_TOOLS = /* @__PURE__ */ new Set(["Write", "Edit", "MultiEdit", "NotebookEdit", "Read"]);
|
|
390
390
|
var PHONE_ANSWERED_TOOLS = /* @__PURE__ */ new Set(["AskUserQuestion", "ExitPlanMode"]);
|
|
391
|
-
var firstString = (
|
|
391
|
+
var firstString = (record2, keys) => {
|
|
392
392
|
for (const key of keys) {
|
|
393
|
-
const value =
|
|
393
|
+
const value = record2[key];
|
|
394
394
|
if (typeof value === "string" && value.length > 0) return value;
|
|
395
395
|
}
|
|
396
396
|
return void 0;
|
|
@@ -2528,6 +2528,12 @@ var ANSWER_DRAFT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
|
2528
2528
|
var DECISION_REMINDER_DELAY_MS = 10 * 60 * 1e3;
|
|
2529
2529
|
var DECISION_CACHE_TTL_SECONDS = 10 * 60;
|
|
2530
2530
|
|
|
2531
|
+
// ../contracts/src/question-continuation.ts
|
|
2532
|
+
var PERSONAL_QUESTION_CAPABILITY = "codex-owned-question-v1";
|
|
2533
|
+
var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
2534
|
+
var identifier = (value) => typeof value === "string" && value.length > 0 && value.length <= 200;
|
|
2535
|
+
var isQuestionOwner = (value) => record(value) && value.capability === PERSONAL_QUESTION_CAPABILITY && identifier(value.machineId) && identifier(value.generation) && identifier(value.threadId) && identifier(value.turnId) && identifier(value.itemId) && (identifier(value.requestId) || typeof value.requestId === "number" && Number.isSafeInteger(value.requestId)) && value.method === "item/tool/requestUserInput" && typeof value.subjectHash === "string" && /^[a-f0-9]{64}$/.test(value.subjectHash) && Object.keys(value).length === 9;
|
|
2536
|
+
|
|
2531
2537
|
// ../contracts/src/index.ts
|
|
2532
2538
|
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
2533
2539
|
var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
|
|
@@ -2599,9 +2605,9 @@ var isAgentQuestionSet = (value) => {
|
|
|
2599
2605
|
const labels = /* @__PURE__ */ new Set();
|
|
2600
2606
|
for (const option of question.options) {
|
|
2601
2607
|
if (!option || typeof option !== "object" || Array.isArray(option)) return false;
|
|
2602
|
-
const
|
|
2603
|
-
const label =
|
|
2604
|
-
if (typeof label !== "string" || label.length === 0 || labels.has(label) ||
|
|
2608
|
+
const record2 = option;
|
|
2609
|
+
const label = record2.label;
|
|
2610
|
+
if (typeof label !== "string" || label.length === 0 || labels.has(label) || record2.description !== void 0 && typeof record2.description !== "string") return false;
|
|
2605
2611
|
labels.add(label);
|
|
2606
2612
|
}
|
|
2607
2613
|
questions.add(question.question);
|
|
@@ -2639,20 +2645,18 @@ var parseAgentQuestionAnswers = (questions, value) => {
|
|
|
2639
2645
|
}
|
|
2640
2646
|
return answers;
|
|
2641
2647
|
};
|
|
2642
|
-
var
|
|
2643
|
-
|
|
2644
|
-
if (
|
|
2645
|
-
|
|
2646
|
-
|
|
2648
|
+
var codexQuestionFields = (raw, toolName) => {
|
|
2649
|
+
if (!isRecord(raw) || raw.isSecret === true) return void 0;
|
|
2650
|
+
if (toolName === CODEX_ASYNC_QUESTION_TOOL) {
|
|
2651
|
+
const labels = Array.isArray(raw.options) ? raw.options : [];
|
|
2652
|
+
return { question: raw.title, options: labels.map((label) => ({ label })), multiSelect: false };
|
|
2653
|
+
}
|
|
2654
|
+
return { ...raw, multiSelect: raw.multiSelect ?? false, ...raw.isOther === false ? { allowOther: false } : {} };
|
|
2647
2655
|
};
|
|
2648
|
-
var codexBlockingQuestionFields = (raw) => isQuestionRecord(raw) && raw.isOther === false ? { ...raw, allowOther: false } : raw;
|
|
2649
|
-
var asksForASecret = (questions) => questions.some((question) => isQuestionRecord(question) && question.isSecret === true);
|
|
2650
2656
|
var parseCodexQuestions = (toolName, toolInput) => {
|
|
2651
2657
|
const raw = Array.isArray(toolInput.questions) ? toolInput.questions : [];
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
const parsed = parseAgentQuestions({ questions });
|
|
2655
|
-
return parsed && isAgentQuestionSet(parsed) ? parsed : void 0;
|
|
2658
|
+
const questions = raw.map((question) => codexQuestionFields(question, toolName));
|
|
2659
|
+
return isAgentQuestionSet(questions) ? parseAgentQuestions({ questions }) : void 0;
|
|
2656
2660
|
};
|
|
2657
2661
|
var CODEX_QUESTION_ANSWERED_IN_PUSHARY = "The user already answered this question in Pushary, so it was not shown again";
|
|
2658
2662
|
var CODEX_QUESTION_CONTINUE = "Continue with this answer and do not ask it again";
|
|
@@ -4428,7 +4432,7 @@ var posixShellJudgeFor = (toolName) => ({
|
|
|
4428
4432
|
runsScripts,
|
|
4429
4433
|
namesASecretFile: (fileName) => SECRET_FILE_NAME.test(fileName)
|
|
4430
4434
|
});
|
|
4431
|
-
var commandIsDestructive = (toolName, command) => shellDialectOf(toolName) === "powershell" ? powerShellCommandIsDestructive(command, posixShellJudgeFor(toolName)) : classifyDecisionRisk(toolNameForAPosixReading(toolName),
|
|
4435
|
+
var commandIsDestructive = (toolName, command) => shellDialectOf(toolName) === "powershell" ? powerShellCommandIsDestructive(command, posixShellJudgeFor(toolName)) : commandSpellings(command).forms.some((form) => classifyDecisionRisk(toolNameForAPosixReading(toolName), form) === "destructive");
|
|
4432
4436
|
var commandHasAVisibleConsequence = (toolName, command) => shellDialectOf(toolName) === "powershell" ? powerShellCommandHasAVisibleConsequence(command, posixShellJudgeFor(toolName)) : commandHasAVisibleConsequenceAt(toolNameForAPosixReading(toolName), command, 0);
|
|
4433
4437
|
var MAX_SPELLING_DEPTH = 3;
|
|
4434
4438
|
var GIT_GLOBAL_OPTIONS_WITH_A_VALUE = /* @__PURE__ */ new Set([
|
|
@@ -5331,8 +5335,8 @@ var isBlockedActionRequest = (request) => isBlockedActionEvent(request) && block
|
|
|
5331
5335
|
var canonicalJsonText = (value) => {
|
|
5332
5336
|
if (Array.isArray(value)) return `[${value.map(canonicalJsonText).join(",")}]`;
|
|
5333
5337
|
if (value !== null && typeof value === "object") {
|
|
5334
|
-
const
|
|
5335
|
-
return `{${Object.keys(
|
|
5338
|
+
const record2 = value;
|
|
5339
|
+
return `{${Object.keys(record2).filter((key) => record2[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJsonText(record2[key])}`).join(",")}}`;
|
|
5336
5340
|
}
|
|
5337
5341
|
return JSON.stringify(value) ?? "null";
|
|
5338
5342
|
};
|
|
@@ -5437,7 +5441,7 @@ var editsAFileThatNeedsAPerson = ({ toolName, toolInputs }) => toolInputs.some((
|
|
|
5437
5441
|
});
|
|
5438
5442
|
var runsADestructiveCommand = ({ toolName, toolInputs }) => SHELL_DIALECT_BY_TOOL.has(toolName) && toolInputs.some((toolInput) => {
|
|
5439
5443
|
const command = extractPolicyArg(toolName, toolInput);
|
|
5440
|
-
return command !== void 0 &&
|
|
5444
|
+
return command !== void 0 && commandIsDestructive(toolName, command);
|
|
5441
5445
|
});
|
|
5442
5446
|
var codexCallIsDestructive = (input, call) => call.deletesFiles || runsADestructiveCommand(input);
|
|
5443
5447
|
var codexCallNeedsAPerson = (input, verdict, call) => onlyCodexPreToolUseCanAsk(verdict, call.permissionMode) || verdict.kind === "gate" && (aChosenRuleGoverns(input) || call.deletesFiles || runsACommandThatNeedsAPerson(input) || editsAFileThatNeedsAPerson(input));
|
|
@@ -5712,11 +5716,11 @@ var elicitationEnum = (property) => {
|
|
|
5712
5716
|
return members.length === property.enum.length && members.length >= ELICITATION_MIN_OPTIONS ? members : null;
|
|
5713
5717
|
};
|
|
5714
5718
|
var readElicitationFields = (schema) => {
|
|
5715
|
-
const
|
|
5716
|
-
const properties = elicitationRecord(
|
|
5717
|
-
if (!properties ||
|
|
5718
|
-
if (Object.keys(
|
|
5719
|
-
if (
|
|
5719
|
+
const record2 = elicitationRecord(schema);
|
|
5720
|
+
const properties = elicitationRecord(record2?.properties);
|
|
5721
|
+
if (!properties || record2?.type !== "object") return null;
|
|
5722
|
+
if (Object.keys(record2).some((key) => !["type", "properties", "required", "$schema"].includes(key))) return null;
|
|
5723
|
+
if (record2.required !== void 0 && (!Array.isArray(record2.required) || !record2.required.every((name) => typeof name === "string" && Object.hasOwn(properties, name)))) return null;
|
|
5720
5724
|
const entries = Object.entries(properties);
|
|
5721
5725
|
if (entries.length === 0) return null;
|
|
5722
5726
|
const fields = [];
|
|
@@ -6039,6 +6043,8 @@ export {
|
|
|
6039
6043
|
withDeclinedAgent,
|
|
6040
6044
|
withoutDeclinedAgent,
|
|
6041
6045
|
isAutoUpdateResult,
|
|
6046
|
+
PERSONAL_QUESTION_CAPABILITY,
|
|
6047
|
+
isQuestionOwner,
|
|
6042
6048
|
normalizeKeyScope,
|
|
6043
6049
|
isApprovalMode,
|
|
6044
6050
|
approvalModeWithoutLocalPrompt,
|
|
@@ -6096,6 +6102,7 @@ export {
|
|
|
6096
6102
|
questionHandedToTheTerminal,
|
|
6097
6103
|
CODEX_RESCUE_TOOL_NAME,
|
|
6098
6104
|
isBlockedActionRequest,
|
|
6105
|
+
canonicalJsonText,
|
|
6099
6106
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
6100
6107
|
blockedActionIdentity,
|
|
6101
6108
|
PRETOOLUSE_GATED_TOOLS,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UOMFOMJM.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-AQFEP65J.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EPFB6LGF.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UOMFOMJM.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EPFB6LGF.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2UKEITTN.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QWWJWPUV.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UOMFOMJM.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-AQFEP65J.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XJD5H72U.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor,
|
|
30
30
|
isRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-EPFB6LGF.js";
|
|
32
32
|
|
|
33
33
|
// src/daemon-lifecycle.ts
|
|
34
34
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PZTLBH6Z.js";
|
|
6
6
|
import {
|
|
7
7
|
createIo
|
|
8
8
|
} from "./chunk-FO3MDD26.js";
|
|
9
9
|
import {
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2UKEITTN.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QDC2VGFO.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XJD5H72U.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CPGW7MMA.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EPFB6LGF.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-THIH3GV7.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QENU2KIM.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C7P5VIU6.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CCAYCIW4.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
reportEvent,
|
|
42
42
|
scopePathFor,
|
|
43
43
|
settleQuestionsForToolUse
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ADWW7Y6X.js";
|
|
45
45
|
import {
|
|
46
46
|
askUser,
|
|
47
47
|
cancelQuestion,
|
|
@@ -54,17 +54,17 @@ import {
|
|
|
54
54
|
sendNotification,
|
|
55
55
|
waitForQuestion,
|
|
56
56
|
waitsForThePhone
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-W6PSSMTV.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-QWWJWPUV.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-XJD5H72U.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-CPGW7MMA.js";
|
|
68
68
|
import {
|
|
69
69
|
AGENT_QUESTION_STRATEGY,
|
|
70
70
|
AGENT_QUESTION_TOOL,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
resolveGate,
|
|
110
110
|
timeoutActionWithoutLocalPrompt,
|
|
111
111
|
unansweredRefusalReason
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-EPFB6LGF.js";
|
|
113
113
|
|
|
114
114
|
// src/claude-permission-rules.ts
|
|
115
115
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CCAYCIW4.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QLV5S2KS.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UOMFOMJM.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EPFB6LGF.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-DWQYCOPI.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HPZMNWDI.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BXPIKJPY.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ESJY5UYZ.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2UG5Y6EC.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QLV5S2KS.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2UKEITTN.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-UOMFOMJM.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-AQFEP65J.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XJD5H72U.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BXPIKJPY.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ESJY5UYZ.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ABSVJ3WV.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2UKEITTN.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UOMFOMJM.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-AQFEP65J.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EPFB6LGF.js";
|
|
16
16
|
|
|
17
17
|
// src/shared-mcp-key.ts
|
|
18
18
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ABSVJ3WV.js";
|
|
4
4
|
import {
|
|
5
5
|
grokHome
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CCAYCIW4.js";
|
|
7
7
|
import {
|
|
8
8
|
codexHomeFrom,
|
|
9
9
|
resolvePathBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UOMFOMJM.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_COMPATIBLE_PROFILES
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EPFB6LGF.js";
|
|
14
14
|
|
|
15
15
|
// src/hermes-config.ts
|
|
16
16
|
import { execFileSync } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UTJSAOB2.js";
|
|
4
4
|
import {
|
|
5
5
|
detectClaudeVersion
|
|
6
6
|
} from "./chunk-RIVNNBEK.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
openCodeHookArgv,
|
|
13
13
|
openCodePluginDir,
|
|
14
14
|
openCodeWired
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ABSVJ3WV.js";
|
|
16
16
|
import {
|
|
17
17
|
addClaudeMcpServer,
|
|
18
18
|
addCompatibleHooks,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
addPusharyToolPermissions,
|
|
21
21
|
compatibleConfigFile,
|
|
22
22
|
hasCompatibleHooks
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CCAYCIW4.js";
|
|
24
24
|
import {
|
|
25
25
|
claudeUnprovenHolds,
|
|
26
26
|
claudeWired,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
codexWired,
|
|
29
29
|
geminiWired,
|
|
30
30
|
planHooks
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QLV5S2KS.js";
|
|
32
32
|
import {
|
|
33
33
|
CLAUDE_HOOK_BINARY,
|
|
34
34
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
needsReregistration,
|
|
40
40
|
registrationSignatures,
|
|
41
41
|
supportedClaudeEvents
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-22SNRAZS.js";
|
|
43
43
|
import {
|
|
44
44
|
formatVersion
|
|
45
45
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
resolveGlobalBinDir,
|
|
64
64
|
resolveGlobalBinary,
|
|
65
65
|
vscodePluginMcp
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-UOMFOMJM.js";
|
|
67
67
|
import {
|
|
68
68
|
readJsonSafe,
|
|
69
69
|
writeFileAtomic,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
HOOK_COMPATIBLE_PROFILES,
|
|
74
74
|
isCompatibleAgentType,
|
|
75
75
|
isRecord
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-EPFB6LGF.js";
|
|
77
77
|
|
|
78
78
|
// src/reapply.ts
|
|
79
79
|
import { dirname, join } from "path";
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CQ56WBBP.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MAMQK4I2.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CPGW7MMA.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
27
|
classifyConfirmResponse,
|
|
28
28
|
isAnswerSource
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EPFB6LGF.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|