@pushary/agent-hooks 1.9.56 → 1.9.57
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/dist/{api-JHBUZ7CV.js → api-RQAY3A5V.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +33 -33
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +14 -14
- package/dist/bin/pushary-connect.js +26 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +37 -37
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-doctor.js +37 -37
- 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 +29 -29
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +28 -28
- 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 +33 -33
- package/dist/bin/pushary-setup.js +40 -40
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +29 -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 +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +35 -35
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-6U3L4K57.js → chunk-2NIRYGTK.js} +2 -2
- package/dist/{chunk-HTN7SMKB.js → chunk-2PJENKRJ.js} +2 -2
- package/dist/{chunk-PI2WWZQQ.js → chunk-3IBUZQKM.js} +2 -2
- package/dist/{chunk-X5FHQMUL.js → chunk-3TJLPABQ.js} +3 -3
- package/dist/{chunk-HR3DJWP2.js → chunk-4QD7VE4E.js} +2 -2
- package/dist/{chunk-V2AMLVMD.js → chunk-4YNNAF53.js} +2 -2
- package/dist/{chunk-724266XT.js → chunk-4YTFYILS.js} +9 -9
- package/dist/{chunk-T4IAMIX4.js → chunk-5SFM6XB4.js} +1 -1
- package/dist/{chunk-J5HQNZXQ.js → chunk-6QM54CSJ.js} +5 -5
- package/dist/{chunk-FBFPQLJG.js → chunk-7OQ4AJC7.js} +2 -2
- package/dist/{chunk-WW266XKU.js → chunk-7RZO6VWD.js} +2 -2
- package/dist/{chunk-WCPN3GVW.js → chunk-A54W5A74.js} +3 -3
- package/dist/{chunk-T6GEEMVC.js → chunk-AEXACKDR.js} +3 -3
- package/dist/{chunk-ILQARYXK.js → chunk-AN6TVB2H.js} +5 -5
- package/dist/{chunk-QWUWQBIJ.js → chunk-BAJ3A3BU.js} +2 -2
- package/dist/{chunk-4US3BCQJ.js → chunk-C3IWX6KU.js} +1 -1
- package/dist/{chunk-AKFTQT7P.js → chunk-CB565EVO.js} +2 -2
- package/dist/{chunk-74DKFWU2.js → chunk-CUEUANIU.js} +5 -5
- package/dist/{chunk-ECQNBLPS.js → chunk-D2EETYAL.js} +4 -4
- package/dist/{chunk-DWV3LTUH.js → chunk-DDQRYX2L.js} +3 -3
- package/dist/{chunk-MW3DD3S5.js → chunk-DS6OR5OS.js} +6 -6
- package/dist/{chunk-ZMRO6ESW.js → chunk-ECJJKDP7.js} +1 -1
- package/dist/{chunk-5HRXOANL.js → chunk-FBKVCODG.js} +3 -3
- package/dist/{chunk-WACFIQYA.js → chunk-GZL3KEPC.js} +51 -25
- package/dist/{chunk-32MSOGMD.js → chunk-HCIB4YNB.js} +3 -3
- package/dist/{chunk-5HMYW5W2.js → chunk-I43PY5G3.js} +1 -1
- package/dist/{chunk-AKBFNTJF.js → chunk-IBSRULIY.js} +10 -10
- package/dist/{chunk-YBE2KH2U.js → chunk-IRZ5FVWG.js} +3 -3
- package/dist/{chunk-M6DTXZQK.js → chunk-IUOUNRLH.js} +2 -2
- package/dist/{chunk-LTCNAIY2.js → chunk-JCMSISCC.js} +2 -2
- package/dist/{chunk-FXW3FW4A.js → chunk-JSQOHMNJ.js} +1 -1
- package/dist/{chunk-FLUKEZMH.js → chunk-JYXIARGW.js} +1 -1
- package/dist/{chunk-DFZTZRKL.js → chunk-K45CFSYV.js} +4 -4
- package/dist/{chunk-JPTFFZWY.js → chunk-K5SDLOFS.js} +11 -11
- package/dist/{chunk-MWBFB7WA.js → chunk-LVDC3RUE.js} +1 -1
- package/dist/{chunk-7QAL23TB.js → chunk-LVWXRXT7.js} +1 -1
- package/dist/{chunk-SM2DT5KP.js → chunk-LVZYIUSR.js} +1 -1
- package/dist/{chunk-KWAOOXSD.js → chunk-LW7IWGSV.js} +5 -5
- package/dist/{chunk-L66VPBS5.js → chunk-M7NX25ZA.js} +1 -1
- package/dist/{chunk-LW4ZEC3A.js → chunk-N3NSWWNU.js} +1 -1
- package/dist/{chunk-GWQ6T6JV.js → chunk-NQDEMRAS.js} +5 -5
- package/dist/{chunk-VRPDHJGB.js → chunk-OLNBYAPI.js} +4 -4
- package/dist/{chunk-RZF2GIPI.js → chunk-OZSP4RIQ.js} +2 -2
- package/dist/{chunk-JTQHC3RV.js → chunk-PZDMZ7LM.js} +5 -5
- package/dist/{chunk-MVW5WS6F.js → chunk-QLDTBZBP.js} +36 -28
- package/dist/{chunk-VZ3YPEMG.js → chunk-QQYUWTYS.js} +3 -3
- package/dist/{chunk-G63LBV4Y.js → chunk-QTCFEKLJ.js} +1 -1
- package/dist/{chunk-FJ7ZMR4N.js → chunk-RFAF3TOX.js} +5 -5
- package/dist/{chunk-M7ZXKMVX.js → chunk-S5LX25XE.js} +1 -1
- package/dist/{chunk-SMMDQXI2.js → chunk-SQ5G6A6K.js} +1 -1
- package/dist/{chunk-I6OGFHJT.js → chunk-T45PAPOG.js} +5 -5
- package/dist/{chunk-57EOP757.js → chunk-TWLWDIFB.js} +2 -2
- package/dist/{chunk-WNVQPGLH.js → chunk-UPFFO4F6.js} +4 -4
- package/dist/{chunk-FFGW45DJ.js → chunk-W6363YYZ.js} +8 -8
- package/dist/{chunk-JSS5RG65.js → chunk-WXZN5CS3.js} +2 -2
- package/dist/{chunk-OX5EYBOC.js → chunk-XTZHUIGJ.js} +1 -1
- package/dist/{chunk-S3CQBNUU.js → chunk-XXNT4FGA.js} +1 -1
- package/dist/{chunk-4OXULVUA.js → chunk-YKYVDHIY.js} +1 -1
- package/dist/{chunk-DUACX6E3.js → chunk-Z7Q36I4K.js} +6 -6
- package/dist/{chunk-OCYOOGXW.js → chunk-ZU6L34DQ.js} +4 -4
- package/dist/{chunk-6PUHW2FP.js → chunk-ZZB4J6CX.js} +4 -4
- package/dist/{codex-app-cards-switch-7UIGMEUE.js → codex-app-cards-switch-SVGTZ2UN.js} +11 -11
- package/dist/{codex-desktop-launch-66LZ6R4Y.js → codex-desktop-launch-SH7OUEEC.js} +1 -1
- package/dist/{codex-session-launch-3TGHFR7R.js → codex-session-launch-IQ57OL3N.js} +18 -18
- package/dist/{config-OBDZ2CL3.js → config-SYLUYZQE.js} +3 -3
- package/dist/{global-upgrade-6M2UXUUL.js → global-upgrade-SRCWQE7N.js} +7 -7
- package/dist/{identity-WJUPU3AK.js → identity-6KRUO2YO.js} +4 -4
- package/dist/{live-capabilities-GACO2VB6.js → live-capabilities-RKUHAWT6.js} +4 -4
- package/dist/{paths-5PWAQF63.js → paths-MUPQZNLG.js} +3 -3
- package/dist/{reapply-EYPT5EP2.js → reapply-YZXZCWCI.js} +26 -26
- package/dist/src/index.js +21 -21
- package/dist/{upgrade-lock-G2ZPV7ZO.js → upgrade-lock-JXP27UKI.js} +4 -4
- package/dist/{usage-PXBMEKSA.js → usage-OUV76AIY.js} +3 -3
- package/package.json +1 -1
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QQYUWTYS.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ECJJKDP7.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YKYVDHIY.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TWLWDIFB.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GZL3KEPC.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-A54W5A74.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7RZO6VWD.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5SFM6XB4.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-GZL3KEPC.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LVWXRXT7.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AEXACKDR.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GZL3KEPC.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IUOUNRLH.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CB565EVO.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
17
17
|
import {
|
|
18
18
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XXNT4FGA.js";
|
|
20
20
|
import {
|
|
21
21
|
isAskUserResponse,
|
|
22
22
|
isDecisionStopped,
|
|
23
23
|
isWaitForAnswerResponse,
|
|
24
24
|
withdrawQuestion,
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6QM54CSJ.js";
|
|
27
27
|
import {
|
|
28
28
|
callMcpTool,
|
|
29
29
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-A54W5A74.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
33
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
parseCodexQuestions,
|
|
49
49
|
planElicitationAsk,
|
|
50
50
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-GZL3KEPC.js";
|
|
52
52
|
|
|
53
53
|
// src/codex-question-owner.ts
|
|
54
54
|
import { createHash } from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCIB4YNB.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-LVDC3RUE.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GZL3KEPC.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;
|
|
@@ -2885,30 +2885,32 @@ var timeoutActionWithoutLocalPrompt = ({ mode, timeoutAction }) => mode !== "pus
|
|
|
2885
2885
|
var TIMEOUT_ACTIONS = ["approve", "deny", "escalate", "wait"];
|
|
2886
2886
|
var isTimeoutAction = (value) => typeof value === "string" && TIMEOUT_ACTIONS.includes(value);
|
|
2887
2887
|
var MAX_AGENT_QUESTIONS = 4;
|
|
2888
|
+
var MIN_AGENT_QUESTION_OPTIONS = 2;
|
|
2889
|
+
var MAX_AGENT_QUESTION_OPTIONS = 4;
|
|
2888
2890
|
var AGENT_QUESTION_HEADER_MAX = 40;
|
|
2889
2891
|
var AGENT_QUESTION_OPTION_MAX = 100;
|
|
2890
2892
|
var AGENT_QUESTION_DESCRIPTION_MAX = 500;
|
|
2891
|
-
var
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
...typeof value.description === "string" ? { description: value.description } : {}
|
|
2901
|
-
}];
|
|
2902
|
-
}) : [];
|
|
2903
|
-
if (options.length < 2) return void 0;
|
|
2893
|
+
var agentQuestionOptionIn = (raw) => {
|
|
2894
|
+
if (!isRecord(raw) || typeof raw.label !== "string" || raw.label.length === 0) return [];
|
|
2895
|
+
return [{
|
|
2896
|
+
label: raw.label,
|
|
2897
|
+
...typeof raw.description === "string" ? { description: raw.description } : {}
|
|
2898
|
+
}];
|
|
2899
|
+
};
|
|
2900
|
+
var agentQuestionFieldsIn = (raw) => {
|
|
2901
|
+
if (!isRecord(raw) || typeof raw.question !== "string") return void 0;
|
|
2904
2902
|
return {
|
|
2905
|
-
question:
|
|
2906
|
-
...typeof
|
|
2907
|
-
multiSelect:
|
|
2908
|
-
...typeof
|
|
2909
|
-
options
|
|
2903
|
+
question: raw.question,
|
|
2904
|
+
...typeof raw.header === "string" ? { header: raw.header } : {},
|
|
2905
|
+
multiSelect: raw.multiSelect === true,
|
|
2906
|
+
...typeof raw.allowOther === "boolean" ? { allowOther: raw.allowOther } : {},
|
|
2907
|
+
options: Array.isArray(raw.options) ? raw.options.flatMap(agentQuestionOptionIn) : []
|
|
2910
2908
|
};
|
|
2911
2909
|
};
|
|
2910
|
+
var parseAgentQuestion = (raw) => {
|
|
2911
|
+
const question = agentQuestionFieldsIn(raw);
|
|
2912
|
+
return question && question.options.length >= MIN_AGENT_QUESTION_OPTIONS ? question : void 0;
|
|
2913
|
+
};
|
|
2912
2914
|
var parseAgentQuestions = (toolInput) => {
|
|
2913
2915
|
const questions = toolInput.questions;
|
|
2914
2916
|
if (!Array.isArray(questions) || questions.length === 0) return void 0;
|
|
@@ -2921,13 +2923,16 @@ var parseAgentQuestions = (toolInput) => {
|
|
|
2921
2923
|
}
|
|
2922
2924
|
return parsed;
|
|
2923
2925
|
};
|
|
2926
|
+
var isTypedAnswerQuestion = (question) => question.options.length === 0;
|
|
2927
|
+
var typingCanAnswer = (question) => question.multiSelect === false && question.allowOther !== false;
|
|
2928
|
+
var optionCountCanBeAnswered = (question, optionCount) => optionCount === 0 ? typingCanAnswer(question) : optionCount >= MIN_AGENT_QUESTION_OPTIONS && optionCount <= MAX_AGENT_QUESTION_OPTIONS;
|
|
2924
2929
|
var isAgentQuestionSet = (value) => {
|
|
2925
2930
|
if (!Array.isArray(value) || value.length === 0 || value.length > 4) return false;
|
|
2926
2931
|
const questions = /* @__PURE__ */ new Set();
|
|
2927
2932
|
for (const item of value) {
|
|
2928
|
-
if (!
|
|
2933
|
+
if (!isRecord(item)) return false;
|
|
2929
2934
|
const question = item;
|
|
2930
|
-
if (typeof question.question !== "string" || question.question.length === 0 || questions.has(question.question) || question.header !== void 0 && typeof question.header !== "string" || typeof question.multiSelect !== "boolean" || question.allowOther !== void 0 && typeof question.allowOther !== "boolean" || !Array.isArray(question.options) || question
|
|
2935
|
+
if (typeof question.question !== "string" || question.question.length === 0 || questions.has(question.question) || question.header !== void 0 && typeof question.header !== "string" || typeof question.multiSelect !== "boolean" || question.allowOther !== void 0 && typeof question.allowOther !== "boolean" || !Array.isArray(question.options) || !optionCountCanBeAnswered(question, question.options.length)) return false;
|
|
2931
2936
|
const labels = /* @__PURE__ */ new Set();
|
|
2932
2937
|
for (const option of question.options) {
|
|
2933
2938
|
if (!option || typeof option !== "object" || Array.isArray(option)) return false;
|
|
@@ -2971,19 +2976,34 @@ var parseAgentQuestionAnswers = (questions, value) => {
|
|
|
2971
2976
|
}
|
|
2972
2977
|
return answers;
|
|
2973
2978
|
};
|
|
2979
|
+
var noOptionsWhenAbsent = (options) => options ?? [];
|
|
2980
|
+
var optionsNamedByLabel = (options) => Array.isArray(options) ? options.map((label) => ({ label })) : options;
|
|
2981
|
+
var offersOnlyItsOptions = (raw, options) => raw.isOther === false && Array.isArray(options) && options.length > 0;
|
|
2974
2982
|
var codexQuestionFields = (raw, toolName) => {
|
|
2975
2983
|
if (!isRecord(raw) || raw.isSecret === true) return void 0;
|
|
2984
|
+
const options = noOptionsWhenAbsent(raw.options);
|
|
2976
2985
|
if (toolName === CODEX_ASYNC_QUESTION_TOOL) {
|
|
2977
|
-
|
|
2978
|
-
return { question: raw.title, options: labels.map((label) => ({ label })), multiSelect: false };
|
|
2986
|
+
return { question: raw.title, options: optionsNamedByLabel(options), multiSelect: false };
|
|
2979
2987
|
}
|
|
2980
|
-
return { ...raw, multiSelect: raw.multiSelect ?? false, ...raw
|
|
2988
|
+
return { ...raw, options, multiSelect: raw.multiSelect ?? false, ...offersOnlyItsOptions(raw, options) ? { allowOther: false } : {} };
|
|
2981
2989
|
};
|
|
2990
|
+
var agentQuestionsOf = (questions) => questions.flatMap((question) => agentQuestionFieldsIn(question) ?? []);
|
|
2982
2991
|
var parseCodexQuestions = (toolName, toolInput) => {
|
|
2983
2992
|
const raw = Array.isArray(toolInput.questions) ? toolInput.questions : [];
|
|
2984
2993
|
const questions = raw.map((question) => codexQuestionFields(question, toolName));
|
|
2985
|
-
return isAgentQuestionSet(questions) ?
|
|
2986
|
-
};
|
|
2994
|
+
return isAgentQuestionSet(questions) ? agentQuestionsOf(questions) : void 0;
|
|
2995
|
+
};
|
|
2996
|
+
var typedTextAsAnswers = (questions, text2) => {
|
|
2997
|
+
const [only, ...others] = questions;
|
|
2998
|
+
if (!only || others.length > 0 || !isTypedAnswerQuestion(only)) return null;
|
|
2999
|
+
if (text2.trim().length === 0 || isHandBackAnswer(text2)) return null;
|
|
3000
|
+
return { [only.question]: text2 };
|
|
3001
|
+
};
|
|
3002
|
+
var plainAskOf = (question) => isTypedAnswerQuestion(question) ? { type: "input" } : { type: "select", options: question.options.map((option) => option.label) };
|
|
3003
|
+
var isLoneTypedAnswerQuestion = (questions) => questions.length === 1 && questions.every(isTypedAnswerQuestion);
|
|
3004
|
+
var questionsShownAsASet = (questions) => isLoneTypedAnswerQuestion(questions) ? void 0 : questions;
|
|
3005
|
+
var agentQuestionContext = (header, project) => header ? `${header}: your agent is asking in ${project}` : `Your agent is asking in ${project}`;
|
|
3006
|
+
var answersToQuestionsAsAsked = (questions, answer) => questionsShownAsASet(questions) ? parseAgentQuestionAnswers(questions, answer) : typedTextAsAnswers(questions, answer);
|
|
2987
3007
|
var CODEX_QUESTION_ANSWERED_IN_PUSHARY = "The user already answered this question in Pushary, so it was not shown again";
|
|
2988
3008
|
var CODEX_QUESTION_CONTINUE = "Continue with this answer and do not ask it again";
|
|
2989
3009
|
var quotedAnswerPair = ([question, answer]) => `${JSON.stringify(question)}: ${JSON.stringify(answer)}`;
|
|
@@ -6138,6 +6158,7 @@ var elicitationContentFromAnswers = (ask, answers) => {
|
|
|
6138
6158
|
}
|
|
6139
6159
|
return content;
|
|
6140
6160
|
};
|
|
6161
|
+
var isHandBackAnswer = (answer) => classifyConfirmResponse(answer) === "defer";
|
|
6141
6162
|
|
|
6142
6163
|
// ../contracts/src/hook-activation.ts
|
|
6143
6164
|
var hookWritePath = (toolName, input) => toolName === "Write" && typeof input.file_path === "string" && input.file_path.startsWith("/") && input.file_path.length <= 4096 ? input.file_path : void 0;
|
|
@@ -6237,8 +6258,13 @@ export {
|
|
|
6237
6258
|
AGENT_QUESTION_OPTION_MAX,
|
|
6238
6259
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
6239
6260
|
parseAgentQuestions,
|
|
6261
|
+
isTypedAnswerQuestion,
|
|
6240
6262
|
parseAgentQuestionAnswers,
|
|
6241
6263
|
parseCodexQuestions,
|
|
6264
|
+
plainAskOf,
|
|
6265
|
+
questionsShownAsASet,
|
|
6266
|
+
agentQuestionContext,
|
|
6267
|
+
answersToQuestionsAsAsked,
|
|
6242
6268
|
codexQuestionAnswerReason,
|
|
6243
6269
|
normalizeInstallSource,
|
|
6244
6270
|
HOOK_BUDGETS,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SQ5G6A6K.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LVDC3RUE.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-QTOLNRET.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZL3KEPC.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/net.ts
|
|
18
18
|
import { createRequire } from "module";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2NIRYGTK.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_INSTRUCTIONS_LABEL,
|
|
6
6
|
GEMINI_INSTRUCTIONS_LABEL,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
macAppFxBridge,
|
|
12
12
|
refreshInstructionBlock,
|
|
13
13
|
renderAgentInstructions
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NQDEMRAS.js";
|
|
15
15
|
import {
|
|
16
16
|
OPENCODE_HOOK_BINARY,
|
|
17
17
|
agentHookOwner,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
openCodeInstructionsFile,
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodeWired
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PZDMZ7LM.js";
|
|
25
25
|
import {
|
|
26
26
|
detectClaudeVersion
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LVWXRXT7.js";
|
|
28
28
|
import {
|
|
29
29
|
addClaudeMcpServer,
|
|
30
30
|
addCompatibleHooks,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
compatibleConfigFile,
|
|
34
34
|
compatibleInstructionsFile,
|
|
35
35
|
hasCompatibleHooks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UPFFO4F6.js";
|
|
37
37
|
import {
|
|
38
38
|
claudeUnprovenHolds,
|
|
39
39
|
claudeWired,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
codexWired,
|
|
42
42
|
geminiWired,
|
|
43
43
|
planHooks
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CUEUANIU.js";
|
|
45
45
|
import {
|
|
46
46
|
CLAUDE_HOOK_BINARY,
|
|
47
47
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
needsReregistration,
|
|
53
53
|
registrationSignatures,
|
|
54
54
|
supportedClaudeEvents
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-QQYUWTYS.js";
|
|
56
56
|
import {
|
|
57
57
|
formatVersion
|
|
58
58
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -80,11 +80,11 @@ import {
|
|
|
80
80
|
registeredCommands,
|
|
81
81
|
registrationHolderOf,
|
|
82
82
|
vscodePluginMcp
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-TWLWDIFB.js";
|
|
84
84
|
import {
|
|
85
85
|
resolveGlobalBinDir,
|
|
86
86
|
resolveGlobalBinary
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-AEXACKDR.js";
|
|
88
88
|
import {
|
|
89
89
|
readJsonSafe,
|
|
90
90
|
writeFileAtomic,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
HOOK_COMPATIBLE_PROFILES,
|
|
95
95
|
isCompatibleAgentType,
|
|
96
96
|
isRecord
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-GZL3KEPC.js";
|
|
98
98
|
|
|
99
99
|
// src/reapply.ts
|
|
100
100
|
import { dirname, join } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7RZO6VWD.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-QENTGE75.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LVDC3RUE.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GZL3KEPC.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JSQOHMNJ.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N3NSWWNU.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4YNNAF53.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-IRZ5FVWG.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FBKVCODG.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-LVDC3RUE.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QLDTBZBP.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JYXIARGW.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LVZYIUSR.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UPFFO4F6.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-4YTFYILS.js";
|
|
44
44
|
import {
|
|
45
45
|
repoKeyFor
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-XXNT4FGA.js";
|
|
47
47
|
import {
|
|
48
48
|
askUser,
|
|
49
49
|
cancelQuestion,
|
|
@@ -56,17 +56,17 @@ import {
|
|
|
56
56
|
sendNotification,
|
|
57
57
|
waitForQuestion,
|
|
58
58
|
waitsForThePhone
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-6QM54CSJ.js";
|
|
60
60
|
import {
|
|
61
61
|
getMachineId
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-SQ5G6A6K.js";
|
|
63
63
|
import {
|
|
64
64
|
getApiKey,
|
|
65
65
|
getBaseUrl
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-LVDC3RUE.js";
|
|
67
67
|
import {
|
|
68
68
|
NPX_LATEST_COMMAND
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-5SFM6XB4.js";
|
|
70
70
|
import {
|
|
71
71
|
AGENT_QUESTION_STRATEGY,
|
|
72
72
|
AGENT_QUESTION_TOOL,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
resolveGate,
|
|
112
112
|
timeoutActionWithoutLocalPrompt,
|
|
113
113
|
unansweredRefusalReason
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-GZL3KEPC.js";
|
|
115
115
|
|
|
116
116
|
// src/claude-permission-rules.ts
|
|
117
117
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PZDMZ7LM.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UPFFO4F6.js";
|
|
10
10
|
import {
|
|
11
11
|
codexHomeFrom
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TWLWDIFB.js";
|
|
13
13
|
import {
|
|
14
14
|
resolvePathBinary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AEXACKDR.js";
|
|
16
16
|
import {
|
|
17
17
|
HOOK_COMPATIBLE_PROFILES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GZL3KEPC.js";
|
|
19
19
|
|
|
20
20
|
// src/hermes-config.ts
|
|
21
21
|
import { execFileSync } from "child_process";
|