@pushary/agent-hooks 0.89.0 → 0.89.1
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/README.md +7 -2
- package/dist/bin/pushary-bell-hook.js +4 -4
- package/dist/bin/pushary-bell.js +5 -5
- package/dist/bin/pushary-claude.js +8 -8
- package/dist/bin/pushary-clean.js +6 -6
- package/dist/bin/pushary-codex-bridge.js +5 -5
- package/dist/bin/pushary-codex-hook.js +5 -5
- package/dist/bin/pushary-codex.js +4 -4
- package/dist/bin/pushary-connect.js +6 -6
- package/dist/bin/pushary-daemon.js +4 -4
- package/dist/bin/pushary-disconnect.js +4 -4
- package/dist/bin/pushary-doctor.js +13 -13
- package/dist/bin/pushary-elicitation-hook.js +48 -28
- package/dist/bin/pushary-gemini-bridge.js +5 -5
- package/dist/bin/pushary-gemini-hook.js +5 -5
- package/dist/bin/pushary-hook.js +6 -6
- package/dist/bin/pushary-login.js +4 -4
- package/dist/bin/pushary-logout.js +4 -4
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +4 -4
- package/dist/bin/pushary-opencode-hook.js +5 -5
- package/dist/bin/pushary-permission-denied-hook.js +6 -6
- package/dist/bin/pushary-permission-hook.js +6 -6
- package/dist/bin/pushary-post-hook.js +4 -4
- package/dist/bin/pushary-prompt-hook.js +4 -4
- package/dist/bin/pushary-session-end-hook.js +4 -4
- package/dist/bin/pushary-session-start-hook.js +4 -4
- package/dist/bin/pushary-setup.js +14 -14
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +5 -5
- package/dist/bin/pushary-stop-hook.js +4 -4
- package/dist/bin/pushary-stopfailure-hook.js +4 -4
- package/dist/bin/pushary-upgrade.js +4 -4
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-DLI5IXSD.js → chunk-475T3XIO.js} +1 -1
- package/dist/{chunk-SUZF64M4.js → chunk-4VYUMYWD.js} +2 -2
- package/dist/{chunk-OSE7X44J.js → chunk-6XSC6Z2K.js} +3 -3
- package/dist/{chunk-F3ZDPL6O.js → chunk-7TS2G4QG.js} +1 -1
- package/dist/{chunk-WPDMGNQR.js → chunk-B7JE4XHD.js} +1 -1
- package/dist/{chunk-LNAQWWBP.js → chunk-C623LWJR.js} +1 -1
- package/dist/{chunk-WFFPWJN6.js → chunk-I5L6SK5V.js} +1 -1
- package/dist/{chunk-4FANZF2L.js → chunk-K42SZKYF.js} +1 -1
- package/dist/{chunk-Q6MK2YKV.js → chunk-L4C2JXJS.js} +12 -3
- package/dist/{chunk-EKNFTIKO.js → chunk-LALHWDWL.js} +1 -1
- package/dist/{chunk-LXTX5CT7.js → chunk-LGXTBUT4.js} +1 -1
- package/dist/{chunk-O7P7O4VY.js → chunk-LUCFN47K.js} +2 -2
- package/dist/{chunk-4KMWTOBK.js → chunk-O5B7EK5U.js} +1 -1
- package/dist/{chunk-AJ4EMW5D.js → chunk-OFRNZWC4.js} +1 -1
- package/dist/{chunk-6GBQDZ7K.js → chunk-PMHTCDEO.js} +1 -1
- package/dist/{chunk-ZPRF4YLA.js → chunk-SS72Z7FV.js} +1 -1
- package/dist/{chunk-SHVW5KFR.js → chunk-T3LRWZKI.js} +1 -1
- package/dist/{chunk-U65EIMUJ.js → chunk-VI27GQKE.js} +4 -4
- package/dist/{chunk-FRH2QIMY.js → chunk-VKVHY5HD.js} +1 -1
- package/dist/{chunk-PXEFENML.js → chunk-VZKXBFUA.js} +1 -1
- package/dist/{chunk-U44C3ULB.js → chunk-ZYPS2XMT.js} +1 -1
- package/dist/src/index.js +6 -6
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ var parseAgentQuestion = (raw) => {
|
|
|
19
19
|
question: q.question,
|
|
20
20
|
...typeof q.header === "string" ? { header: q.header } : {},
|
|
21
21
|
multiSelect: q.multiSelect === true,
|
|
22
|
+
...typeof q.allowOther === "boolean" ? { allowOther: q.allowOther } : {},
|
|
22
23
|
options
|
|
23
24
|
};
|
|
24
25
|
};
|
|
@@ -47,13 +48,20 @@ var parseAgentQuestionAnswers = (questions, value) => {
|
|
|
47
48
|
for (const question of questions) {
|
|
48
49
|
const answer = answers[question.question];
|
|
49
50
|
if (typeof answer !== "string" || answer.trim().length === 0) return null;
|
|
50
|
-
|
|
51
|
+
const labels = new Set(question.options.map((option) => option.label));
|
|
52
|
+
if (!question.multiSelect) {
|
|
53
|
+
if (question.allowOther === false && !labels.has(answer)) return null;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
51
56
|
try {
|
|
52
57
|
const selected = JSON.parse(answer);
|
|
53
|
-
if (!Array.isArray(selected))
|
|
54
|
-
|
|
58
|
+
if (!Array.isArray(selected)) {
|
|
59
|
+
if (question.allowOther === false) return null;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
55
62
|
if (selected.length === 0 || new Set(selected).size !== selected.length || !selected.every((label) => typeof label === "string" && labels.has(label))) return null;
|
|
56
63
|
} catch {
|
|
64
|
+
if (question.allowOther === false) return null;
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
return answers;
|
|
@@ -1277,6 +1285,7 @@ var planElicitationAsk = (message, fields) => {
|
|
|
1277
1285
|
question: elicitationQuestionText(message, field, false),
|
|
1278
1286
|
header: field.label.slice(0, 12),
|
|
1279
1287
|
multiSelect: false,
|
|
1288
|
+
allowOther: false,
|
|
1280
1289
|
options: field.options.map((label) => ({ label }))
|
|
1281
1290
|
}));
|
|
1282
1291
|
return new Set(questions.map((question) => question.question)).size === questions.length ? { kind: "questions", fields, questions } : null;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VZKXBFUA.js";
|
|
9
9
|
import {
|
|
10
10
|
denyReasonFrom,
|
|
11
11
|
isDeferAnswer
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
readLastUserPrompt,
|
|
18
18
|
repoKeyFor,
|
|
19
19
|
throttlePass
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6XSC6Z2K.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_SESSION,
|
|
23
23
|
askUser,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
deriveToolTarget,
|
|
34
34
|
describeToolCall,
|
|
35
35
|
scopePathFor
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LGXTBUT4.js";
|
|
37
37
|
import {
|
|
38
38
|
getMachineId
|
|
39
39
|
} from "./chunk-RN3NOEJF.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
parseAgentQuestions,
|
|
53
53
|
resolveGate,
|
|
54
54
|
shouldDeferToNativeMode
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-L4C2JXJS.js";
|
|
56
56
|
|
|
57
57
|
// src/decision-episode.ts
|
|
58
58
|
var EPISODE_PATH = "/api/agent/decision-episode";
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VI27GQKE.js";
|
|
4
4
|
import "../chunk-ATBKJNWS.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-VZKXBFUA.js";
|
|
6
6
|
import "../chunk-YHG74UFF.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchModeOverride,
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
handlePostToolUse,
|
|
13
13
|
handleStop,
|
|
14
14
|
reportEvent
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-6XSC6Z2K.js";
|
|
16
16
|
import {
|
|
17
17
|
askUser,
|
|
18
18
|
cancelQuestion,
|
|
19
19
|
waitForAnswer
|
|
20
20
|
} from "../chunk-J3YDT4HM.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-LGXTBUT4.js";
|
|
22
22
|
import "../chunk-RN3NOEJF.js";
|
|
23
23
|
import "../chunk-BSZYIAZL.js";
|
|
24
24
|
import "../chunk-SAF6HGAA.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-OFRNZWC4.js";
|
|
26
26
|
import "../chunk-7QLSKOSU.js";
|
|
27
27
|
import "../chunk-KZERVKTD.js";
|
|
28
28
|
import {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "../chunk-2UMNXADU.js";
|
|
32
32
|
import {
|
|
33
33
|
resolvePolicy
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-L4C2JXJS.js";
|
|
35
35
|
export {
|
|
36
36
|
askUser,
|
|
37
37
|
cancelQuestion,
|