@pushary/agent-hooks 1.9.170 → 1.9.174
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 +20 -0
- package/dist/{api-3KBPIGV4.js → api-MNYX7TLY.js} +12 -12
- package/dist/bin/pushary-audit.js +4 -4
- package/dist/bin/pushary-bell-hook.js +31 -31
- package/dist/bin/pushary-bell.js +13 -12
- package/dist/bin/pushary-calls.js +16 -16
- package/dist/bin/pushary-claude.js +37 -39
- package/dist/bin/pushary-clean.js +49 -47
- package/dist/bin/pushary-codex-bridge.js +27 -27
- package/dist/bin/pushary-codex-hook.js +47 -49
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +20 -19
- package/dist/bin/pushary-connect.js +37 -37
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +57 -56
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +26 -26
- package/dist/bin/pushary-doctor.js +54 -53
- package/dist/bin/pushary-elicitation-hook.js +34 -33
- package/dist/bin/pushary-gemini-bridge.js +25 -23
- package/dist/bin/pushary-gemini-hook.js +41 -43
- package/dist/bin/pushary-hook.js +39 -39
- package/dist/bin/pushary-login.js +32 -26
- package/dist/bin/pushary-logout.js +41 -33
- package/dist/bin/pushary-mcp.js +13 -13
- package/dist/bin/pushary-mode.js +17 -17
- package/dist/bin/pushary-notification-hook.js +30 -30
- package/dist/bin/pushary-opencode-hook.js +47 -56
- package/dist/bin/pushary-permission-denied-hook.js +39 -39
- package/dist/bin/pushary-permission-hook.js +39 -39
- package/dist/bin/pushary-post-hook.js +31 -31
- package/dist/bin/pushary-prompt-hook.js +30 -30
- package/dist/bin/pushary-session-end-hook.js +32 -32
- package/dist/bin/pushary-session-start-hook.js +42 -42
- package/dist/bin/pushary-sessions.js +15 -15
- package/dist/bin/pushary-setup.js +79 -68
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +38 -38
- package/dist/bin/pushary-stop-hook.js +30 -30
- package/dist/bin/pushary-stopfailure-hook.js +30 -30
- package/dist/bin/pushary-suggestions.js +17 -17
- package/dist/bin/pushary-transcript-register.js +21 -21
- package/dist/bin/pushary-transcripts.js +29 -29
- package/dist/bin/pushary-upgrade.js +46 -46
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-MPJAXUN2.js → chunk-2EHDZOJA.js} +14 -14
- package/dist/{chunk-BZILLAPJ.js → chunk-2IEU6RX5.js} +1 -1
- package/dist/{chunk-LEXVQXZU.js → chunk-3FOW4K2L.js} +4 -4
- package/dist/{chunk-UCND4JHN.js → chunk-3L5DXDPK.js} +1 -1
- package/dist/{chunk-3ZO7WCMV.js → chunk-4IOCYW6O.js} +3 -3
- package/dist/{chunk-NJSBHEEW.js → chunk-4NXEOPXZ.js} +1 -1
- package/dist/{chunk-352FIVVH.js → chunk-55L4JSPA.js} +1 -1
- package/dist/{chunk-EBHIVYSD.js → chunk-57C45LJT.js} +2 -2
- package/dist/{chunk-5OI4EW6G.js → chunk-5JCKVJC6.js} +5 -5
- package/dist/{chunk-GVIKF73A.js → chunk-5LIGHRBH.js} +1 -1
- package/dist/{chunk-TIRZZCS4.js → chunk-6355EUTT.js} +4 -4
- package/dist/{chunk-DXHRKDP7.js → chunk-6BZCNKCY.js} +5 -5
- package/dist/{chunk-7RNLPI6H.js → chunk-6HYQSAMW.js} +3 -3
- package/dist/{chunk-3UNQJ6AO.js → chunk-76T3UMRC.js} +32 -33
- package/dist/{chunk-65U6TH6P.js → chunk-7VG4JO77.js} +4 -4
- package/dist/{chunk-JNUZYDUC.js → chunk-7XALAS43.js} +3 -3
- package/dist/{chunk-W4NCWOVL.js → chunk-7YVSQ342.js} +1 -1
- package/dist/{chunk-TGYM6UQJ.js → chunk-A3JTWB74.js} +2 -2
- package/dist/{chunk-CNPTWWKJ.js → chunk-A3YA4EIY.js} +3 -3
- package/dist/{chunk-L6UCFQKZ.js → chunk-BHBHY35A.js} +4 -4
- package/dist/{chunk-IWKEIVDF.js → chunk-C7SKKHMD.js} +7 -5
- package/dist/{chunk-QJNI6MPV.js → chunk-CDUTYRXO.js} +4 -4
- package/dist/{chunk-DXUPOVJP.js → chunk-CPV25VW5.js} +1 -1
- package/dist/{chunk-2OMWK322.js → chunk-CTLI2HJE.js} +5 -5
- package/dist/{chunk-BX45H3DU.js → chunk-DJS7W4SC.js} +6 -6
- package/dist/{chunk-2TRYSF64.js → chunk-DNJKQHK2.js} +20 -1
- package/dist/{chunk-FTE5ECGI.js → chunk-DPHYIJNF.js} +4 -4
- package/dist/{chunk-57MF5I5V.js → chunk-E2WABTIY.js} +7 -7
- package/dist/{chunk-OKM76UDB.js → chunk-ET2BWLQX.js} +3 -3
- package/dist/{chunk-OJUW7QW2.js → chunk-FAMKGTCF.js} +1 -1
- package/dist/{chunk-HP5RU3OU.js → chunk-FPF7ZSH5.js} +3 -3
- package/dist/{chunk-SKDSU735.js → chunk-FS7WOHFO.js} +5 -5
- package/dist/{chunk-LILP3T24.js → chunk-GGNKMBCN.js} +4 -4
- package/dist/{chunk-NYDJHJIJ.js → chunk-GPHESUOZ.js} +6 -6
- package/dist/{chunk-TBH5WLIA.js → chunk-GTCNACQ2.js} +5 -5
- package/dist/{chunk-K5HACZJ3.js → chunk-H3MY3EQP.js} +4 -4
- package/dist/{chunk-DVBRMNFM.js → chunk-HGVGOGVD.js} +3 -3
- package/dist/{chunk-NWKXT7LC.js → chunk-HLK3ZELO.js} +2 -2
- package/dist/{chunk-CLT4J5N5.js → chunk-HUJWZIQ2.js} +2 -2
- package/dist/{chunk-HXVCULWA.js → chunk-HZGSGLK4.js} +6 -6
- package/dist/{chunk-7AENNOGX.js → chunk-IP4NJN6G.js} +1 -1
- package/dist/{chunk-MVWWEQQG.js → chunk-IQNM745W.js} +3 -3
- package/dist/{chunk-GZZ7XGL5.js → chunk-JG2ZVO5L.js} +1 -1
- package/dist/{chunk-RSVW634O.js → chunk-JXOVA3JW.js} +6 -6
- package/dist/{chunk-HZANYISD.js → chunk-K5NBHOE6.js} +2 -2
- package/dist/{chunk-3I3RUJRD.js → chunk-LH5JTAAH.js} +2 -2
- package/dist/{chunk-IHNII3GT.js → chunk-LIVVVKIZ.js} +3 -3
- package/dist/{chunk-AVN4A4A6.js → chunk-M4KQPSMS.js} +1 -1
- package/dist/{chunk-SDLL4YPS.js → chunk-MF6FSDM4.js} +3 -3
- package/dist/{chunk-SSKNRWWS.js → chunk-N73CKAC6.js} +1 -1
- package/dist/{chunk-YEZL4T4K.js → chunk-O4AAXXXP.js} +4 -4
- package/dist/{chunk-OHVQ75S7.js → chunk-OBNVYNPQ.js} +3 -3
- package/dist/{chunk-CFZUESTS.js → chunk-OFKKNHYJ.js} +1 -1
- package/dist/{chunk-EGPOBJZG.js → chunk-OLKAGHOO.js} +1 -1
- package/dist/{chunk-LML7I4FY.js → chunk-PAYK5BD7.js} +2 -2
- package/dist/{chunk-WI2WYKSE.js → chunk-PDIN6FE5.js} +1 -1
- package/dist/{chunk-TODDEIYG.js → chunk-PM2NRK6Y.js} +12 -2
- package/dist/{chunk-SADLXUUA.js → chunk-PWJ76P2L.js} +7 -7
- package/dist/{chunk-T33PQ3TE.js → chunk-PZNVSYIY.js} +6 -6
- package/dist/{chunk-UDPXX6YR.js → chunk-QCZMBOMF.js} +1 -1
- package/dist/{chunk-CXKAP6DR.js → chunk-R3EIRYON.js} +5 -5
- package/dist/{chunk-ZA7N6SUH.js → chunk-R4RL4UDT.js} +5 -5
- package/dist/{chunk-W4TTC7MU.js → chunk-RIHIXQAL.js} +12 -12
- package/dist/{chunk-XI7MSL4R.js → chunk-RT6FAMIF.js} +27 -26
- package/dist/{chunk-IV7WDCKS.js → chunk-S3X6WLW5.js} +1 -1
- package/dist/{chunk-6KL27ETS.js → chunk-SHLAHE46.js} +10 -10
- package/dist/{chunk-5TNFIUN3.js → chunk-SNY4ABHS.js} +4 -4
- package/dist/{chunk-CYTPQDQY.js → chunk-TCE3J44Z.js} +1 -1
- package/dist/{chunk-VX6ZYAOA.js → chunk-TRXYUOWW.js} +8 -8
- package/dist/{chunk-A2DVMIX4.js → chunk-TU5DTA2V.js} +1 -1
- package/dist/{chunk-TNYOSIAY.js → chunk-UJ6ZJNHK.js} +3 -3
- package/dist/{chunk-XR27HPYC.js → chunk-UOPOVQ2P.js} +2 -1
- package/dist/{chunk-L77OIGRB.js → chunk-US4LUIFU.js} +20 -0
- package/dist/{chunk-KE5ED475.js → chunk-VCWHZDP3.js} +3 -3
- package/dist/{chunk-FD7JHIET.js → chunk-VH2DDTBE.js} +12 -12
- package/dist/{chunk-2SMEEXDR.js → chunk-VLEKL3PF.js} +1 -1
- package/dist/{chunk-Y6ILCLKE.js → chunk-VRNGMRJA.js} +1 -1
- package/dist/{chunk-RGE64J2V.js → chunk-WAZIEUIG.js} +7 -5
- package/dist/{chunk-LT3B5432.js → chunk-WWVVLMPJ.js} +5 -3
- package/dist/{chunk-TTTMOX73.js → chunk-X5LTD4VA.js} +2 -2
- package/dist/{chunk-MPCJB6I7.js → chunk-XZOYXQ6J.js} +6 -6
- package/dist/{chunk-JTFD3KQ6.js → chunk-YDYKKSFU.js} +224 -75
- package/dist/{chunk-BFZHRQJU.js → chunk-YE7WPP7M.js} +1 -1
- package/dist/{chunk-IGKHWARK.js → chunk-YFOR2JQQ.js} +2 -2
- package/dist/{chunk-7E4OSMST.js → chunk-YXLWKFKC.js} +6 -6
- package/dist/{chunk-GFWQNXX7.js → chunk-Z6YRFNN3.js} +5 -5
- package/dist/{chunk-EPBS4KJR.js → chunk-ZLXN26UD.js} +6 -6
- package/dist/{codex-app-cards-switch-AKCQRBUP.js → codex-app-cards-switch-MJA47AZY.js} +13 -13
- package/dist/{codex-card-routing-QGOX4RNI.js → codex-card-routing-2MDDCMAO.js} +2 -2
- package/dist/{codex-desktop-launch-SCQW4KAV.js → codex-desktop-launch-7IVPOMSK.js} +1 -1
- package/dist/{codex-session-launch-4EVYIYEQ.js → codex-session-launch-U6JUH6X6.js} +24 -24
- package/dist/{config-QIHLQCEV.js → config-S2OVEI6F.js} +3 -3
- package/dist/{global-upgrade-WHSNOE3E.js → global-upgrade-XGDWDFQN.js} +11 -11
- package/dist/{identity-NEXDWMLO.js → identity-7LLNHIP3.js} +5 -5
- package/dist/{live-capabilities-CC7L4VDX.js → live-capabilities-CI46M4XO.js} +6 -6
- package/dist/{paths-J3MVJDQI.js → paths-FVQYVHLH.js} +4 -4
- package/dist/reapply-M4DKHUZX.js +69 -0
- package/dist/src/index.js +38 -38
- package/dist/{upgrade-lock-7PPYIRBP.js → upgrade-lock-DTWLFPH2.js} +5 -5
- package/dist/{usage-GDUDYZSV.js → usage-IHNVIPGZ.js} +3 -3
- package/package.json +1 -1
- package/dist/reapply-6FNUVXCL.js +0 -69
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/cli/fsx.ts
|
|
2
|
-
import { constants as fsConstants, copyFileSync, fstatSync, lstatSync, realpathSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
3
|
-
import { dirname, join } from "path";
|
|
2
|
+
import { constants as fsConstants, chmodSync, copyFileSync, fstatSync, lstatSync, realpathSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, closeSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
3
|
+
import { basename, dirname, join } from "path";
|
|
4
4
|
var readJsonSafe = (filePath) => {
|
|
5
5
|
let raw;
|
|
6
6
|
try {
|
|
@@ -68,6 +68,15 @@ var readFileOrMissing = (path) => {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
71
|
+
var PRIVATE_DIRECTORY_MODE = 448;
|
|
72
|
+
var PRIVATE_FILE_MODE = 384;
|
|
73
|
+
var backupFileInto = (filePath, directory) => {
|
|
74
|
+
mkdirSync(directory, { recursive: true, mode: PRIVATE_DIRECTORY_MODE });
|
|
75
|
+
const target = join(directory, `${basename(filePath)}.pushary-backup-${stamp()}`);
|
|
76
|
+
copyFileSync(filePath, target);
|
|
77
|
+
chmodSync(target, PRIVATE_FILE_MODE);
|
|
78
|
+
return target;
|
|
79
|
+
};
|
|
71
80
|
var backupFile = (filePath) => {
|
|
72
81
|
const target = `${filePath}.pushary-backup-${stamp()}`;
|
|
73
82
|
copyFileSync(filePath, target);
|
|
@@ -119,6 +128,7 @@ export {
|
|
|
119
128
|
readRegularJsonFile,
|
|
120
129
|
isFile,
|
|
121
130
|
readFileOrMissing,
|
|
131
|
+
backupFileInto,
|
|
122
132
|
backupFile,
|
|
123
133
|
writeFileAtomic,
|
|
124
134
|
writeJsonAtomic,
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
openCodePluginArgv,
|
|
11
11
|
openCodePluginModule,
|
|
12
12
|
renderOpenCodePlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3L5DXDPK.js";
|
|
14
14
|
import {
|
|
15
15
|
compatibleConfigFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-R3EIRYON.js";
|
|
17
17
|
import {
|
|
18
18
|
hookOwnerOf,
|
|
19
19
|
hookOwnerOfCommands
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7VG4JO77.js";
|
|
21
21
|
import {
|
|
22
22
|
AGENT_CHOICES
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HUJWZIQ2.js";
|
|
24
24
|
import {
|
|
25
25
|
OPENCODE_INSTRUCTIONS_LABEL,
|
|
26
26
|
bridgeStub,
|
|
@@ -34,17 +34,17 @@ import {
|
|
|
34
34
|
resolveBridgeStub,
|
|
35
35
|
vscodePluginDir,
|
|
36
36
|
windowsNodeLauncherFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MF6FSDM4.js";
|
|
38
38
|
import {
|
|
39
39
|
readJsonSafe
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
41
41
|
import {
|
|
42
42
|
HOOK_BUDGETS,
|
|
43
43
|
HOOK_COMPATIBLE_PROFILES,
|
|
44
44
|
OPENCODE_APPROVAL_EVENT,
|
|
45
45
|
hookCompatibleProfile,
|
|
46
46
|
isRecord
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-US4LUIFU.js";
|
|
48
48
|
|
|
49
49
|
// src/opencode-config.ts
|
|
50
50
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6355EUTT.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4IOCYW6O.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YDYKKSFU.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,15 +32,15 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MF6FSDM4.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GGNKMBCN.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
42
42
|
writeJsonAtomic
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
44
44
|
|
|
45
45
|
// src/fx-config.ts
|
|
46
46
|
var FX_SERVER_NAME = "pushary";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
uploadTranscriptRecords,
|
|
11
11
|
verifyAnchoredRecipients,
|
|
12
12
|
wrapSessionKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6BZCNKCY.js";
|
|
14
14
|
|
|
15
15
|
// src/live-session.ts
|
|
16
16
|
var LIVE_TRANSCRIPT_LIMITS = { queuedRecords: 100, recordCharacters: 32 * 1024 };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7VG4JO77.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RT6FAMIF.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OFKKNHYJ.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MF6FSDM4.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-US4LUIFU.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4NXEOPXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
askUser,
|
|
7
7
|
isDecisionStopped,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
isThePersonsStop,
|
|
10
10
|
waitForOpenQuestion,
|
|
11
11
|
waitForQuestion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YXLWKFKC.js";
|
|
13
13
|
import {
|
|
14
14
|
SubscriptionRequiredError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5JCKVJC6.js";
|
|
16
16
|
import {
|
|
17
17
|
getMachineId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YFOR2JQQ.js";
|
|
19
19
|
import {
|
|
20
20
|
ASK_CONTEXT_MAX,
|
|
21
21
|
agentQuestionContext,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
parseAgentQuestionAnswers,
|
|
27
27
|
plainAskOf,
|
|
28
28
|
questionsShownAsASet
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-US4LUIFU.js";
|
|
30
30
|
|
|
31
31
|
// src/agent-question-ask.ts
|
|
32
32
|
var ONLY_QUESTION = { index: 0, total: 1 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A3YA4EIY.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
refreshHermesPluginFiles,
|
|
10
10
|
refreshOpenClawPlugin,
|
|
11
11
|
shippedHermesPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GPHESUOZ.js";
|
|
13
13
|
import {
|
|
14
14
|
fxIgnoresInstructionsFile,
|
|
15
15
|
fxInstructionsBody,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
macAppFxBridge,
|
|
19
19
|
refreshClineKey,
|
|
20
20
|
switchFxHttpEntryToBridge
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PZNVSYIY.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCODE_HOOK_BINARY,
|
|
24
24
|
agentHookOwner,
|
|
@@ -31,16 +31,16 @@ import {
|
|
|
31
31
|
openCodePluginDir,
|
|
32
32
|
openCodeWired,
|
|
33
33
|
withOpenCodeAskRules
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-PWJ76P2L.js";
|
|
35
35
|
import {
|
|
36
36
|
detectClaudeVersion
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FPF7ZSH5.js";
|
|
38
38
|
import {
|
|
39
39
|
addCompatibleHooks,
|
|
40
40
|
compatibleConfigFile,
|
|
41
41
|
compatibleInstructionsFile,
|
|
42
42
|
hasCompatibleHooks
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-R3EIRYON.js";
|
|
44
44
|
import {
|
|
45
45
|
GEMINI_HOOK_BINARY,
|
|
46
46
|
addGeminiHooks,
|
|
@@ -52,10 +52,10 @@ import {
|
|
|
52
52
|
geminiWired,
|
|
53
53
|
hasGeminiHooks,
|
|
54
54
|
planHooks
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-7VG4JO77.js";
|
|
56
56
|
import {
|
|
57
57
|
KEY_FILE_MODE
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YDYKKSFU.js";
|
|
59
59
|
import {
|
|
60
60
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
61
61
|
CLAUDE_HOOK_BINARY,
|
|
@@ -102,23 +102,23 @@ import {
|
|
|
102
102
|
renderAgentInstructions,
|
|
103
103
|
supportedClaudeEvents,
|
|
104
104
|
vscodePluginMcp
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-MF6FSDM4.js";
|
|
106
106
|
import {
|
|
107
107
|
formatVersion,
|
|
108
108
|
hookCommandsUseBareNames,
|
|
109
109
|
resolveGlobalBinDir,
|
|
110
110
|
resolveGlobalBinary
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-GGNKMBCN.js";
|
|
112
112
|
import {
|
|
113
113
|
readJsonSafe,
|
|
114
114
|
writeFileAtomic,
|
|
115
115
|
writeJsonAtomic
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
117
117
|
import {
|
|
118
118
|
HOOK_COMPATIBLE_PROFILES,
|
|
119
119
|
isCompatibleAgentType,
|
|
120
120
|
isRecord
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-US4LUIFU.js";
|
|
122
122
|
|
|
123
123
|
// src/reapply.ts
|
|
124
124
|
import { dirname, join } from "path";
|
|
@@ -27,11 +27,7 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
branchFor,
|
|
33
|
-
repoKeyFor
|
|
34
|
-
} from "./chunk-2TRYSF64.js";
|
|
30
|
+
} from "./chunk-OFKKNHYJ.js";
|
|
35
31
|
import {
|
|
36
32
|
cancelQuestion,
|
|
37
33
|
clientErrorKindOf,
|
|
@@ -39,43 +35,48 @@ import {
|
|
|
39
35
|
reportClientError,
|
|
40
36
|
sendNotification,
|
|
41
37
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YXLWKFKC.js";
|
|
43
39
|
import {
|
|
44
40
|
RETRY_ACK,
|
|
45
41
|
readCommandAck,
|
|
46
42
|
refusedReceiptMessage
|
|
47
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-5LIGHRBH.js";
|
|
48
44
|
import {
|
|
49
45
|
isRetryable,
|
|
50
46
|
withRetry
|
|
51
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-5JCKVJC6.js";
|
|
52
48
|
import {
|
|
53
49
|
fetchAsCredential
|
|
54
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-N73CKAC6.js";
|
|
51
|
+
import {
|
|
52
|
+
branchFor,
|
|
53
|
+
projectNameFor,
|
|
54
|
+
repoKeyFor
|
|
55
|
+
} from "./chunk-DNJKQHK2.js";
|
|
55
56
|
import {
|
|
56
57
|
getMachineId
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YFOR2JQQ.js";
|
|
58
59
|
import {
|
|
59
60
|
reportedInstallSource
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-LH5JTAAH.js";
|
|
61
62
|
import {
|
|
62
63
|
IDLE_PROMPT_NOTIFICATION,
|
|
63
64
|
NOTIFICATION_PUSH_TYPES,
|
|
64
65
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
65
66
|
claudeConfigDir
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-MF6FSDM4.js";
|
|
67
68
|
import {
|
|
68
69
|
compareVersion,
|
|
69
70
|
parseVersion
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-GGNKMBCN.js";
|
|
71
72
|
import {
|
|
72
73
|
getApiKey,
|
|
73
74
|
getBaseUrl
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TU5DTA2V.js";
|
|
75
76
|
import {
|
|
76
77
|
writeFileAtomic,
|
|
77
78
|
writeJsonAtomicDurable
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
79
80
|
import {
|
|
80
81
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
81
82
|
CLI_POLICY_REQUEST_CAPABILITIES,
|
|
@@ -102,7 +103,7 @@ import {
|
|
|
102
103
|
resolveAutoResolveOrigin,
|
|
103
104
|
resolvePolicy,
|
|
104
105
|
unansweredRefusalReason
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-US4LUIFU.js";
|
|
106
107
|
|
|
107
108
|
// src/pending.ts
|
|
108
109
|
import { join } from "path";
|
|
@@ -1240,7 +1241,7 @@ var takeGateOutcome = (toolUseId) => {
|
|
|
1240
1241
|
};
|
|
1241
1242
|
|
|
1242
1243
|
// src/events.ts
|
|
1243
|
-
import {
|
|
1244
|
+
import { join as join10 } from "path";
|
|
1244
1245
|
import { existsSync as existsSync5, mkdirSync as mkdirSync7, readFileSync as readFileSync8, statSync as statSync7, writeFileSync as writeFileSync8 } from "fs";
|
|
1245
1246
|
import { tmpdir as tmpdir9 } from "os";
|
|
1246
1247
|
var INTENT_DIR = join10(tmpdir9(), "pushary-intent");
|
|
@@ -1565,7 +1566,7 @@ var handlePostToolUse = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1565
1566
|
const deadline = Date.now() + HOOK_BUDGET_MS;
|
|
1566
1567
|
const signal = AbortSignal.timeout(HOOK_BUDGET_MS);
|
|
1567
1568
|
try {
|
|
1568
|
-
const projectName =
|
|
1569
|
+
const projectName = projectNameFor(input.cwd);
|
|
1569
1570
|
const action = describeToolCall(input.tool_name, input.tool_input, "event");
|
|
1570
1571
|
const lookup = toPolicyLookup(input.tool_name, input.tool_input);
|
|
1571
1572
|
const toolResult = input.tool_response ?? input.tool_result;
|
|
@@ -1635,7 +1636,7 @@ var handleUserPrompt = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1635
1636
|
const deadline = Date.now() + HOOK_BUDGET_MS;
|
|
1636
1637
|
const signal = AbortSignal.timeout(HOOK_BUDGET_MS);
|
|
1637
1638
|
try {
|
|
1638
|
-
const projectName =
|
|
1639
|
+
const projectName = projectNameFor(input.cwd);
|
|
1639
1640
|
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
1640
1641
|
const titlesEnabled = process.env.PUSHARY_TASK_TITLES !== "off";
|
|
1641
1642
|
const taskTitle = titlesEnabled ? taskTitleFrom(input.prompt) : void 0;
|
|
@@ -1675,7 +1676,7 @@ var handleStop = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1675
1676
|
const deadline = Date.now() + HOOK_BUDGET_MS;
|
|
1676
1677
|
const signal = AbortSignal.timeout(HOOK_BUDGET_MS);
|
|
1677
1678
|
try {
|
|
1678
|
-
const projectName =
|
|
1679
|
+
const projectName = projectNameFor(input.cwd);
|
|
1679
1680
|
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
1680
1681
|
noteBackgroundWork(sessionKey, hasRunningBackgroundTasks(input.background_tasks));
|
|
1681
1682
|
const late = await reconcilePendingQuestions(sessionKey, void 0, signal);
|
|
@@ -1717,7 +1718,7 @@ var isSubagentStop = (input) => input.hook_event_name === "SubagentStop" || type
|
|
|
1717
1718
|
var SUBAGENT_STOP_REPORT_TIMEOUT_MS = 4e3;
|
|
1718
1719
|
var handleSubagentStop = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
1719
1720
|
try {
|
|
1720
|
-
const projectName =
|
|
1721
|
+
const projectName = projectNameFor(input.cwd);
|
|
1721
1722
|
await reportEvent({
|
|
1722
1723
|
event: "session_end",
|
|
1723
1724
|
agentType: agent.type,
|
|
@@ -1736,7 +1737,7 @@ var isCompactionEvent = (hookEventName) => hookEventName === "PreCompact" || hoo
|
|
|
1736
1737
|
var COMPACTION_REPORT_TIMEOUT_MS = 4e3;
|
|
1737
1738
|
var handleCompaction = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
1738
1739
|
try {
|
|
1739
|
-
const projectName =
|
|
1740
|
+
const projectName = projectNameFor(input.cwd);
|
|
1740
1741
|
await reportEvent({
|
|
1741
1742
|
event: "compaction",
|
|
1742
1743
|
agentType: agent.type,
|
|
@@ -1750,7 +1751,7 @@ var handleCompaction = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1750
1751
|
};
|
|
1751
1752
|
var handleSessionStart = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
1752
1753
|
try {
|
|
1753
|
-
const projectName =
|
|
1754
|
+
const projectName = projectNameFor(input.cwd);
|
|
1754
1755
|
const action = input.agent_id ? "Subagent started" : sessionStartAction(input.source);
|
|
1755
1756
|
await reportEvent({
|
|
1756
1757
|
event: "session_start",
|
|
@@ -1765,7 +1766,7 @@ var handleSessionStart = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1765
1766
|
};
|
|
1766
1767
|
var handleSessionEnd = async (input, agent = CLAUDE_CODE_AGENT, options = {}) => {
|
|
1767
1768
|
try {
|
|
1768
|
-
const projectName =
|
|
1769
|
+
const projectName = projectNameFor(input.cwd);
|
|
1769
1770
|
const action = sessionEndAction(input.reason);
|
|
1770
1771
|
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
1771
1772
|
if (options.reconcile ?? true) {
|
|
@@ -1794,7 +1795,7 @@ var pushesNotification = (notifType, sessionKey) => NOTIFICATION_PUSH_TYPES.has(
|
|
|
1794
1795
|
var handleNotification = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
1795
1796
|
const signal = AbortSignal.timeout(HOOK_BUDGET_MS);
|
|
1796
1797
|
try {
|
|
1797
|
-
const projectName =
|
|
1798
|
+
const projectName = projectNameFor(input.cwd);
|
|
1798
1799
|
const notifType = notificationTypeOf(input) ?? "";
|
|
1799
1800
|
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
1800
1801
|
const teammateIdle = input.hook_event_name === "TeammateIdle";
|
|
@@ -1856,7 +1857,7 @@ var handleStopFailure = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1856
1857
|
} catch {
|
|
1857
1858
|
return;
|
|
1858
1859
|
}
|
|
1859
|
-
const projectName =
|
|
1860
|
+
const projectName = projectNameFor(input.cwd);
|
|
1860
1861
|
const reason = describeStopFailure(input.error);
|
|
1861
1862
|
await reportEvent({
|
|
1862
1863
|
event: "turn_error",
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K5NBHOE6.js";
|
|
4
4
|
import {
|
|
5
5
|
declinedAgentsFile,
|
|
6
6
|
readDeclinedAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IQNM745W.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENCODE_HOOK_BINARY,
|
|
10
10
|
openCodeConfigDir,
|
|
11
11
|
openCodePluginFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PWJ76P2L.js";
|
|
13
13
|
import {
|
|
14
14
|
openCodePluginArgv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3L5DXDPK.js";
|
|
16
16
|
import {
|
|
17
17
|
liveCursorGateCoverage
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-H3MY3EQP.js";
|
|
19
19
|
import {
|
|
20
20
|
compatibleConfigFile,
|
|
21
21
|
compatibleHookEvents,
|
|
22
22
|
grokHome,
|
|
23
23
|
parseConfigDocument
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-R3EIRYON.js";
|
|
25
25
|
import {
|
|
26
26
|
DEFAULT_HOOKS_KEY_PATH,
|
|
27
27
|
GEMINI_HOOK_BINARY,
|
|
28
28
|
GEMINI_HOOK_EVENTS,
|
|
29
29
|
hooksAt
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7VG4JO77.js";
|
|
31
31
|
import {
|
|
32
32
|
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
33
33
|
CODEX_HOOK_BINARY,
|
|
@@ -55,11 +55,11 @@ import {
|
|
|
55
55
|
parseHookArgv,
|
|
56
56
|
parseHookCommand,
|
|
57
57
|
supportedClaudeEvents
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-MF6FSDM4.js";
|
|
59
59
|
import {
|
|
60
60
|
readRegularJsonFile,
|
|
61
61
|
readRegularTextFile
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
63
63
|
import {
|
|
64
64
|
CURSOR_GATE_EVENTS,
|
|
65
65
|
CURSOR_GATE_SCRIPT,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
OPENCODE_APPROVAL_EVENT,
|
|
70
70
|
isRecord,
|
|
71
71
|
matcherMatchesEveryCall
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-US4LUIFU.js";
|
|
73
73
|
|
|
74
74
|
// src/hook-wiring.ts
|
|
75
75
|
import { createHash } from "crypto";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_STATUS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A3YA4EIY.js";
|
|
4
4
|
import {
|
|
5
5
|
HERMES_ALWAYS_ALLOWED_SHELL_RULE,
|
|
6
6
|
HERMES_COMMAND_ALLOWLIST_KEY,
|
|
7
7
|
HERMES_GATE_TOOLS_KEY,
|
|
8
8
|
HERMES_SHELL_TOOL
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GPHESUOZ.js";
|
|
10
10
|
import {
|
|
11
11
|
retryAgentCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6355EUTT.js";
|
|
13
13
|
import {
|
|
14
14
|
NPX_LATEST_COMMAND
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-S3X6WLW5.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/codex-trust.ts
|
|
18
18
|
var CODEX_TRUST_TELEMETRY = {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
needsShell,
|
|
3
3
|
spawnClaude
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VRNGMRJA.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YFOR2JQQ.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YDYKKSFU.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MF6FSDM4.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GGNKMBCN.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TU5DTA2V.js";
|
|
20
20
|
import {
|
|
21
21
|
readJsonSafe,
|
|
22
22
|
writeFileAtomic,
|
|
23
23
|
writeJsonAtomic,
|
|
24
24
|
writeJsonAtomicDurable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
26
26
|
import {
|
|
27
27
|
CLI_PACKAGE_NAMES,
|
|
28
28
|
cmdShimScriptOf,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-UQTQ6HPO.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-US4LUIFU.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-entry-guard.ts
|
|
38
38
|
import { mkdirSync, readFileSync } from "fs";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MF6FSDM4.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
11
11
|
import {
|
|
12
12
|
CLI_PACKAGE_NAMES,
|
|
13
13
|
POSIX_GLOBAL_ROOT_SEGMENTS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-UQTQ6HPO.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-US4LUIFU.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|
|
@@ -67,7 +67,8 @@ var describeService = (effects) => {
|
|
|
67
67
|
var describeSetupSideEffects = (effects) => [
|
|
68
68
|
`run npm install -g ${effects.globalPackage}@${effects.version} (the hooks run from the global copy; up to two minutes)`,
|
|
69
69
|
`write ${effects.configFile} (the API key, mode 600)`,
|
|
70
|
-
|
|
70
|
+
`write ${effects.keyEnvFile} (export PUSHARY_API_KEY for new terminals, mode 600)`,
|
|
71
|
+
effects.rcPath ? `edit ${effects.rcPath} (one line that loads ${effects.keyEnvFile}; the key itself is never written there)` : "skip the shell profile, since no rc file was found for this shell",
|
|
71
72
|
describeService(effects),
|
|
72
73
|
"ask Add Pushary instructions to this project's CLAUDE.md/AGENTS.md? (default no)",
|
|
73
74
|
"ask Alias claude to pushary claude? (default no)"
|
|
@@ -135,6 +135,24 @@ var isAgentQuestionSet = (value) => {
|
|
|
135
135
|
}
|
|
136
136
|
return true;
|
|
137
137
|
};
|
|
138
|
+
var CLAUDE_MULTI_SELECT_SEPARATOR = ", ";
|
|
139
|
+
var multiSelectLabelsIn = (answer) => {
|
|
140
|
+
try {
|
|
141
|
+
const parsed = JSON.parse(answer);
|
|
142
|
+
return Array.isArray(parsed) && parsed.every((label) => typeof label === "string") ? parsed : null;
|
|
143
|
+
} catch {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var CLAUDE_QUOTED_LABEL_MARK = '"';
|
|
148
|
+
var claudeLabelText = (label) => label.includes(CLAUDE_MULTI_SELECT_SEPARATOR) || label.includes(CLAUDE_QUOTED_LABEL_MARK) ? JSON.stringify(label) : label;
|
|
149
|
+
var claudeAnswerTo = (question, answer) => {
|
|
150
|
+
const labels = question?.multiSelect ? multiSelectLabelsIn(answer) : null;
|
|
151
|
+
return labels === null ? answer : labels.map(claudeLabelText).join(CLAUDE_MULTI_SELECT_SEPARATOR);
|
|
152
|
+
};
|
|
153
|
+
var claudeQuestionAnswers = (questions, answers) => Object.fromEntries(
|
|
154
|
+
Object.entries(answers).map(([question, answer]) => [question, claudeAnswerTo(questions.find((asked) => asked.question === question), answer)])
|
|
155
|
+
);
|
|
138
156
|
var parseAgentQuestionAnswers = (questions, value) => {
|
|
139
157
|
let parsed;
|
|
140
158
|
try {
|
|
@@ -10300,6 +10318,8 @@ export {
|
|
|
10300
10318
|
parseAgentQuestions,
|
|
10301
10319
|
isTypedAnswerQuestion,
|
|
10302
10320
|
isAgentQuestionSet,
|
|
10321
|
+
multiSelectLabelsIn,
|
|
10322
|
+
claudeQuestionAnswers,
|
|
10303
10323
|
parseAgentQuestionAnswers,
|
|
10304
10324
|
CODEX_QUESTION_TOOLS,
|
|
10305
10325
|
isCodexQuestionTool,
|