@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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JCMSISCC.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmInstallError,
|
|
9
9
|
NpmMissingError,
|
|
10
10
|
NpmPermissionError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AEXACKDR.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeFileAtomic,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-QENTGE75.js";
|
|
17
17
|
import {
|
|
18
18
|
NPX_LATEST_COMMAND
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5SFM6XB4.js";
|
|
20
20
|
import {
|
|
21
21
|
readSetupAgentFailures
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GZL3KEPC.js";
|
|
23
23
|
|
|
24
24
|
// src/instruction-file.ts
|
|
25
25
|
import { accessSync, constants, existsSync, readFileSync, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PZDMZ7LM.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TWLWDIFB.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-QENTGE75.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZL3KEPC.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;
|
|
@@ -377,7 +377,7 @@ var CodexAppCards = class {
|
|
|
377
377
|
await Promise.allSettled(outstanding.map((question) => this.cancel(question)));
|
|
378
378
|
}
|
|
379
379
|
thePhone() {
|
|
380
|
-
this.phone ??= import("./api-
|
|
380
|
+
this.phone ??= import("./api-RQAY3A5V.js");
|
|
381
381
|
return this.phone;
|
|
382
382
|
}
|
|
383
383
|
questionShown(message) {
|
|
@@ -695,7 +695,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
695
695
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
696
696
|
}
|
|
697
697
|
if (args[0] === APP_CARDS_FLAG) {
|
|
698
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
698
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-SVGTZ2UN.js");
|
|
699
699
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
700
700
|
}
|
|
701
701
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UPFFO4F6.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CUEUANIU.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ECJJKDP7.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TWLWDIFB.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-QENTGE75.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-GZL3KEPC.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LVZYIUSR.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,24 +10,30 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4YTFYILS.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
17
|
waitForQuestion
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6QM54CSJ.js";
|
|
19
19
|
import {
|
|
20
20
|
SubscriptionRequiredError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-A54W5A74.js";
|
|
22
22
|
import {
|
|
23
23
|
getMachineId
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SQ5G6A6K.js";
|
|
25
25
|
import {
|
|
26
|
+
ASK_CONTEXT_MAX,
|
|
27
|
+
agentQuestionContext,
|
|
28
|
+
answersToQuestionsAsAsked,
|
|
29
|
+
isTypedAnswerQuestion,
|
|
26
30
|
machineDecisionFor,
|
|
27
31
|
parseAgentQuestionAnswers,
|
|
32
|
+
plainAskOf,
|
|
33
|
+
questionsShownAsASet,
|
|
28
34
|
shouldDeferToNativeMode,
|
|
29
35
|
wireVerdictFor
|
|
30
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GZL3KEPC.js";
|
|
31
37
|
|
|
32
38
|
// src/machine-decision-audit.ts
|
|
33
39
|
import { basename } from "path";
|
|
@@ -87,11 +93,15 @@ var UNAVAILABLE = { kind: "unavailable" };
|
|
|
87
93
|
var UNANSWERED = { kind: "unanswered" };
|
|
88
94
|
var answeredWith = (answers) => ({ kind: "answered", answers });
|
|
89
95
|
var failedAskOutcome = (error, sessionId) => outcomeOfFailedAsk(error, sessionId, UNAVAILABLE) ?? UNANSWERED;
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
var cardOf = (question) => {
|
|
97
|
+
const ask = plainAskOf(question);
|
|
98
|
+
const shownAsASet = questionsShownAsASet([question]);
|
|
99
|
+
return {
|
|
100
|
+
type: ask.type,
|
|
101
|
+
...ask.type === "select" ? { options: [...ask.options] } : {},
|
|
102
|
+
...shownAsASet ? { questions: [...shownAsASet] } : {}
|
|
103
|
+
};
|
|
104
|
+
};
|
|
95
105
|
var outcomeOfFailedAsk = (error, sessionId, failure) => {
|
|
96
106
|
if (!(error instanceof SubscriptionRequiredError)) return failure;
|
|
97
107
|
announceSubscriptionRequired(error.upgradeUrl, sessionId);
|
|
@@ -102,18 +112,19 @@ var storedWaitDeadline = (result, requestedDeadline) => {
|
|
|
102
112
|
return Number.isFinite(stored) ? Math.min(stored, requestedDeadline) : requestedDeadline;
|
|
103
113
|
};
|
|
104
114
|
var questionContext = (question, index, total, project) => {
|
|
105
|
-
const subject = question.header
|
|
106
|
-
|
|
115
|
+
const subject = agentQuestionContext(question.header, project);
|
|
116
|
+
const line = total > 1 ? `${subject} (${index + 1} of ${total})` : subject;
|
|
117
|
+
return line.slice(0, ASK_CONTEXT_MAX);
|
|
107
118
|
};
|
|
108
119
|
var legacyAnswerMap = (question, value) => JSON.stringify({ [question.question]: question.multiSelect ? JSON.stringify([value]) : value });
|
|
109
|
-
var
|
|
120
|
+
var answerInTheEarlierForm = (question, value) => isTypedAnswerQuestion(question) ? null : parseAgentQuestionAnswers([question], legacyAnswerMap(question, value));
|
|
121
|
+
var answersOnOneCard = (question, value) => answersToQuestionsAsAsked([question], value) ?? answerInTheEarlierForm(question, value);
|
|
122
|
+
var askAsOneCard = async (apiKey, call, only) => {
|
|
110
123
|
let result;
|
|
111
124
|
try {
|
|
112
125
|
result = await askUser(apiKey, {
|
|
113
126
|
question: only.question,
|
|
114
|
-
|
|
115
|
-
options: [...only.labels],
|
|
116
|
-
questions: labelled.map(withoutLabels),
|
|
127
|
+
...cardOf(only),
|
|
117
128
|
context: questionContext(only, 0, 1, call.projectName),
|
|
118
129
|
agentName: call.agentName,
|
|
119
130
|
sessionId: call.sessionId,
|
|
@@ -128,23 +139,21 @@ var askAsOneCard = async (apiKey, call, only, labelled) => {
|
|
|
128
139
|
if (isDecisionStopped(result)) return STOPPED;
|
|
129
140
|
const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
|
|
130
141
|
if (isDecisionStopped(answer)) return STOPPED;
|
|
131
|
-
const values = answer.answered && answer.value ?
|
|
142
|
+
const values = answer.answered && answer.value ? answersToQuestionsAsAsked([only], answer.value) : null;
|
|
132
143
|
if (!values || isDeferAnswer(answer.value)) {
|
|
133
144
|
return UNANSWERED;
|
|
134
145
|
}
|
|
135
146
|
return answeredWith(values);
|
|
136
147
|
};
|
|
137
|
-
var askQuestionByQuestion = async (apiKey, call,
|
|
148
|
+
var askQuestionByQuestion = async (apiKey, call, questions) => {
|
|
138
149
|
const answers = {};
|
|
139
|
-
for (const [index, question] of
|
|
150
|
+
for (const [index, question] of questions.entries()) {
|
|
140
151
|
let result;
|
|
141
152
|
try {
|
|
142
153
|
result = await askUser(apiKey, {
|
|
143
154
|
question: question.question,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
questions: [withoutLabels(question)],
|
|
147
|
-
context: questionContext(question, index, labelled.length, call.projectName),
|
|
155
|
+
...cardOf(question),
|
|
156
|
+
context: questionContext(question, index, questions.length, call.projectName),
|
|
148
157
|
agentName: call.agentName,
|
|
149
158
|
sessionId: call.sessionId,
|
|
150
159
|
machineId: getMachineId(),
|
|
@@ -159,7 +168,7 @@ var askQuestionByQuestion = async (apiKey, call, labelled) => {
|
|
|
159
168
|
const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, call.deadline));
|
|
160
169
|
if (isDecisionStopped(answer)) return STOPPED;
|
|
161
170
|
const legacyValue = answer.answered ? answer.value?.trim() : void 0;
|
|
162
|
-
const values = legacyValue ?
|
|
171
|
+
const values = legacyValue ? answersOnOneCard(question, legacyValue) : null;
|
|
163
172
|
const value = values?.[question.question];
|
|
164
173
|
if (!value || isDeferAnswer(answer.value)) {
|
|
165
174
|
return UNANSWERED;
|
|
@@ -169,10 +178,9 @@ var askQuestionByQuestion = async (apiKey, call, labelled) => {
|
|
|
169
178
|
return answeredWith(answers);
|
|
170
179
|
};
|
|
171
180
|
var askAgentQuestions = (apiKey, call, questions) => {
|
|
172
|
-
const
|
|
173
|
-
const [only, ...rest] = labelled;
|
|
181
|
+
const [only, ...rest] = questions;
|
|
174
182
|
if (!only) return Promise.resolve(UNANSWERED);
|
|
175
|
-
return rest.length === 0 ? askAsOneCard(apiKey, call, only
|
|
183
|
+
return rest.length === 0 ? askAsOneCard(apiKey, call, only) : askQuestionByQuestion(apiKey, call, questions);
|
|
176
184
|
};
|
|
177
185
|
|
|
178
186
|
export {
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QTCFEKLJ.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TWLWDIFB.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GZL3KEPC.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7OQ4AJC7.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-BAJ3A3BU.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
autoUpdateLock,
|
|
23
23
|
autoUpdateLog,
|
|
24
24
|
autoUpdateState
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TWLWDIFB.js";
|
|
26
26
|
import {
|
|
27
27
|
execNpm,
|
|
28
28
|
fetchLatestPublishedVersion,
|
|
29
29
|
npmErrorMessage,
|
|
30
30
|
readGlobalCliInstallAt,
|
|
31
31
|
readGlobalPrefix
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AEXACKDR.js";
|
|
33
33
|
import {
|
|
34
34
|
NPX_LATEST_COMMAND
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5SFM6XB4.js";
|
|
36
36
|
import {
|
|
37
37
|
commandsPackage,
|
|
38
38
|
globalUpgradeEntry,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K45CFSYV.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OLNBYAPI.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-IRZ5FVWG.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FBKVCODG.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GZL3KEPC.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
quoteIfNeeded
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AEXACKDR.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_QUESTION_TOOLS,
|
|
6
6
|
HOOK_BUDGETS,
|
|
7
7
|
HOOK_LOCATOR_BINARY,
|
|
8
8
|
withHookHoldBudget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GZL3KEPC.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/paths.ts
|
|
12
12
|
import { homedir as homedir2 } from "os";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QQYUWTYS.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4YTFYILS.js";
|
|
11
11
|
import {
|
|
12
12
|
guardBinary,
|
|
13
13
|
guardBinaryRefusing,
|
|
14
14
|
holdBudgetOf,
|
|
15
15
|
isProtectedByScope,
|
|
16
16
|
registerHookEntry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TWLWDIFB.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_COMPATIBLE_PROFILES,
|
|
20
20
|
HOOK_LOCATOR_BINARY,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
pusharyMissingReason,
|
|
27
27
|
refusalOutput,
|
|
28
28
|
withHookHoldBudget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GZL3KEPC.js";
|
|
30
30
|
|
|
31
31
|
// src/claude-config.ts
|
|
32
32
|
import { join } from "path";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-QW3FRUFB.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z7Q36I4K.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CUEUANIU.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
wrapSessionKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JSQOHMNJ.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchTranscriptRecipients,
|
|
21
21
|
uploadTranscriptRecords
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-N3NSWWNU.js";
|
|
23
23
|
import {
|
|
24
24
|
transcriptEnvironmentPreference,
|
|
25
25
|
transcriptsEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-C3IWX6KU.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TWLWDIFB.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-QENTGE75.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LVDC3RUE.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-QENTGE75.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LVDC3RUE.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GZL3KEPC.js";
|
|
11
11
|
|
|
12
12
|
// src/hooks-spec.ts
|
|
13
13
|
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IRZ5FVWG.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SQ5G6A6K.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TWLWDIFB.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AEXACKDR.js";
|
|
17
17
|
import {
|
|
18
18
|
readJsonSafe,
|
|
19
19
|
writeFileAtomic,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-QENTGE75.js";
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LVDC3RUE.js";
|
|
26
26
|
import {
|
|
27
27
|
CLI_PACKAGE_NAMES,
|
|
28
28
|
cmdShimTarget,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-QTOLNRET.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GZL3KEPC.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UPFFO4F6.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CUEUANIU.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TWLWDIFB.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GZL3KEPC.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W6363YYZ.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UPFFO4F6.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6QM54CSJ.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource,
|
|
13
13
|
isGrokHookPayload,
|
|
14
14
|
isGrokSessionEndStop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZL3KEPC.js";
|
|
16
16
|
|
|
17
17
|
// src/tool-hook-input.ts
|
|
18
18
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -21,23 +21,23 @@ import {
|
|
|
21
21
|
setCodexAppLaunchAtLoginOnThisMac,
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
23
|
turnCodexAppCardsOn
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-2PJENKRJ.js";
|
|
25
|
+
import "./chunk-OZSP4RIQ.js";
|
|
26
26
|
import "./chunk-XCEN33UP.js";
|
|
27
27
|
import "./chunk-QCGNGEGE.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-Z7Q36I4K.js";
|
|
29
29
|
import "./chunk-XHKBHWLX.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-IRZ5FVWG.js";
|
|
31
31
|
import "./chunk-E46NE7FB.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-SQ5G6A6K.js";
|
|
33
|
+
import "./chunk-7RZO6VWD.js";
|
|
34
|
+
import "./chunk-TWLWDIFB.js";
|
|
35
|
+
import "./chunk-AEXACKDR.js";
|
|
36
36
|
import "./chunk-QENTGE75.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-LVDC3RUE.js";
|
|
38
|
+
import "./chunk-5SFM6XB4.js";
|
|
39
39
|
import "./chunk-QTOLNRET.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-GZL3KEPC.js";
|
|
41
41
|
export {
|
|
42
42
|
CODEX_APP_CARDS_DIRECTORY,
|
|
43
43
|
CODEX_APP_CARDS_LOGIN_ITEM,
|