@pushary/agent-hooks 1.9.20 → 1.9.22
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 +10 -0
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +14 -12
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +36 -33
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +37 -37
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +25 -25
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +33 -33
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-doctor.js +34 -34
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +14 -14
- package/dist/bin/pushary-gemini-hook.js +30 -30
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +36 -20
- package/dist/bin/pushary-mcp.js +10 -10
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +29 -29
- 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 +30 -30
- package/dist/bin/pushary-setup.js +53 -48
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -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 +19 -19
- package/dist/bin/pushary-transcripts.js +9 -9
- package/dist/bin/pushary-upgrade.js +31 -31
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-LXYNKZFP.js → chunk-2MW4OHWI.js} +2 -2
- package/dist/{chunk-OLJ4GIRP.js → chunk-3BWW4UMT.js} +2 -2
- package/dist/{chunk-ZNFARGEY.js → chunk-4AO2OVUA.js} +6 -6
- package/dist/{chunk-P77EIWBJ.js → chunk-4PERN2SO.js} +2 -2
- package/dist/{chunk-5C2GFTWE.js → chunk-5AZ546F6.js} +1 -1
- package/dist/{chunk-MID7BURF.js → chunk-5TLRS3AK.js} +2 -2
- package/dist/{chunk-4ABHSCFJ.js → chunk-6IOLTFNP.js} +29 -26
- package/dist/{chunk-HILWD7WM.js → chunk-6SFTI7LM.js} +3 -3
- package/dist/{chunk-DF2FSJ7B.js → chunk-6TSEEKPL.js} +4 -4
- package/dist/{chunk-XQ4HTTBB.js → chunk-75MJRC5I.js} +1 -1
- package/dist/{chunk-MGW26CW7.js → chunk-76YNWUXC.js} +1 -1
- package/dist/{chunk-K5PUP76V.js → chunk-AGIO7SF5.js} +9 -6
- package/dist/{chunk-FT7UNIS3.js → chunk-AQFEP65J.js} +2 -1
- package/dist/{chunk-DBEJIFJD.js → chunk-AR4NXO4Q.js} +2 -2
- package/dist/{chunk-ANPECDYL.js → chunk-ARJSQUIS.js} +3 -3
- package/dist/{chunk-UVEIBBTR.js → chunk-BDGKWUK2.js} +2 -2
- package/dist/{chunk-CRW4P7JU.js → chunk-BDV4WDIA.js} +1 -1
- package/dist/{chunk-CW4CF7NU.js → chunk-CW3QUV6B.js} +11 -11
- package/dist/{chunk-A6U4RRFM.js → chunk-DV26ZWUC.js} +2 -2
- package/dist/{chunk-XGHXQUDG.js → chunk-E3FSKKTJ.js} +1 -1
- package/dist/{chunk-YJWEQZJC.js → chunk-E7EOUEGQ.js} +4 -4
- package/dist/{chunk-LU7JPQKL.js → chunk-E7HOX73X.js} +4 -4
- package/dist/{chunk-RGSG2GYV.js → chunk-G5YMVGAK.js} +4 -4
- package/dist/{chunk-6HMCOGKJ.js → chunk-GFXZDU4V.js} +31 -12
- package/dist/{chunk-ATDOYZXC.js → chunk-GNQZY4GL.js} +1 -1
- package/dist/{chunk-LB4HVID5.js → chunk-GWKT2ZZS.js} +3 -3
- package/dist/{chunk-6W6UY4AJ.js → chunk-JQVGCDHW.js} +5 -5
- package/dist/{chunk-AESHOWIB.js → chunk-KCLWVCGN.js} +8 -5
- package/dist/{chunk-XDKZZSU6.js → chunk-KCXG2INQ.js} +2 -2
- package/dist/{chunk-7YTJOWYI.js → chunk-KH2EDRJQ.js} +6 -3
- package/dist/{chunk-PPAMIQOV.js → chunk-LH3GTSXC.js} +10 -10
- package/dist/{chunk-HPMP6QQD.js → chunk-N2JP3RKP.js} +10 -9
- package/dist/{chunk-NESTNKCA.js → chunk-NB2PY5JX.js} +3 -3
- package/dist/{chunk-SB2GN6OP.js → chunk-OYIN77HO.js} +3 -2
- package/dist/{chunk-MMIN6VNU.js → chunk-OZVZGWER.js} +1 -1
- package/dist/{chunk-6I4D3XZ3.js → chunk-P345G4DK.js} +1 -7
- package/dist/{chunk-422Z3LBB.js → chunk-SGUGGHMC.js} +3 -3
- package/dist/{chunk-736I6CBY.js → chunk-T57BCGHQ.js} +1 -1
- package/dist/{chunk-DNSYWI7D.js → chunk-TH3HKKGW.js} +14 -13
- package/dist/{chunk-Q4EQHBA7.js → chunk-TSFNX5J2.js} +5 -14
- package/dist/{chunk-LHGB64O2.js → chunk-TZWZVAMN.js} +1 -1
- package/dist/{chunk-YONHM5BQ.js → chunk-U26CAOZC.js} +1 -1
- package/dist/{chunk-XJGGGDHX.js → chunk-U2IEM5FF.js} +2 -2
- package/dist/{chunk-XVNZHIVF.js → chunk-U4OWRGYI.js} +9 -8
- package/dist/{chunk-DQTBQHB5.js → chunk-UFGU7AK3.js} +2 -2
- package/dist/{chunk-6WEC3KZP.js → chunk-VTR4VRL2.js} +1 -1
- package/dist/{chunk-RZCTGLUJ.js → chunk-WAKQYJ6T.js} +3 -3
- package/dist/{chunk-2V2CCTGQ.js → chunk-WE2RVY7V.js} +1 -1
- package/dist/{chunk-N5K5H2AQ.js → chunk-XDTYGS6R.js} +5 -5
- package/dist/{chunk-VOIN2NZW.js → chunk-YGR5PBOF.js} +3 -3
- package/dist/{chunk-Z4YQ7ZMO.js → chunk-YI543EKI.js} +3 -3
- package/dist/{chunk-2YAHQ763.js → chunk-YODL2CJV.js} +5 -5
- package/dist/{chunk-OZOD37XK.js → chunk-YPZ4AE2R.js} +5 -5
- package/dist/{chunk-BIQF3C4H.js → chunk-YR3DHPYI.js} +1 -1
- package/dist/{chunk-EP6FWWBY.js → chunk-Z7KB4R6U.js} +11 -8
- package/dist/{chunk-R7SSVBHX.js → chunk-ZUOIDI6M.js} +4 -4
- package/dist/{global-upgrade-EELV2YEK.js → global-upgrade-F3QY6OHE.js} +7 -7
- package/dist/{paths-MDOKPY7A.js → paths-CBEAZNJR.js} +2 -2
- package/dist/{reapply-22C75UEY.js → reapply-4HP6N7LY.js} +21 -21
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-VPL5AYPQ.js → upgrade-lock-N3G5V2QS.js} +4 -4
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
autoUpdateLock,
|
|
3
3
|
installPackageGlobally,
|
|
4
4
|
npmErrorMessage
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
6
6
|
import {
|
|
7
7
|
writeJsonAtomic
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AQFEP65J.js";
|
|
9
9
|
|
|
10
10
|
// src/upgrade-lock.ts
|
|
11
11
|
import { fork } from "child_process";
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5TLRS3AK.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
7
7
|
writeFileAtomic,
|
|
8
8
|
writeJsonAtomic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AQFEP65J.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-75MJRC5I.js";
|
|
13
|
+
import {
|
|
14
|
+
API_KEY_PREFIX_PATTERN,
|
|
15
|
+
isRecord
|
|
16
|
+
} from "./chunk-GFXZDU4V.js";
|
|
13
17
|
|
|
14
18
|
// src/shell-alias.ts
|
|
15
19
|
import { homedir } from "os";
|
|
@@ -111,7 +115,6 @@ var isDisabledExport = (line) => {
|
|
|
111
115
|
};
|
|
112
116
|
var keyPrefix = (key) => key.split(".")[0] ?? key;
|
|
113
117
|
var MAC_APP_KEY_PREFIX_FIELD = "macAppKeyPrefix";
|
|
114
|
-
var KEY_PREFIX_SHAPE = /^pk_[a-f0-9]+$/;
|
|
115
118
|
var findKeyExport = (contents) => {
|
|
116
119
|
const lines = contents.split("\n");
|
|
117
120
|
for (const [index, line] of lines.entries()) {
|
|
@@ -120,6 +123,10 @@ var findKeyExport = (contents) => {
|
|
|
120
123
|
}
|
|
121
124
|
return null;
|
|
122
125
|
};
|
|
126
|
+
var readConfigRecord = (configPath) => {
|
|
127
|
+
const result = readJsonSafe(configPath);
|
|
128
|
+
return result.kind === "ok" && isRecord(result.value) ? result.value : null;
|
|
129
|
+
};
|
|
123
130
|
var keepMacAppKeyPrefix = (current, apiKey) => {
|
|
124
131
|
const { [MAC_APP_KEY_PREFIX_FIELD]: recorded, ...rest } = current;
|
|
125
132
|
return recorded === keyPrefix(apiKey) ? { ...rest, [MAC_APP_KEY_PREFIX_FIELD]: recorded } : rest;
|
|
@@ -214,9 +221,9 @@ var writeKey = (apiKey, options = {}) => {
|
|
|
214
221
|
`${configPath} exists but could not be read (${existing.error.message}). Fix its permissions or remove it, then re-run setup. Nothing was changed.`
|
|
215
222
|
);
|
|
216
223
|
}
|
|
217
|
-
if (existing.kind === "ok") {
|
|
224
|
+
if (existing.kind === "ok" && isRecord(existing.value)) {
|
|
218
225
|
current = existing.value;
|
|
219
|
-
} else if (existing.kind === "unparseable") {
|
|
226
|
+
} else if (existing.kind === "ok" || existing.kind === "unparseable") {
|
|
220
227
|
configBackupPath = backupFile(configPath);
|
|
221
228
|
}
|
|
222
229
|
writeJsonAtomic(
|
|
@@ -238,10 +245,10 @@ var writeKey = (apiKey, options = {}) => {
|
|
|
238
245
|
};
|
|
239
246
|
var clearKey = (options = {}) => {
|
|
240
247
|
const configPath = configFilePath();
|
|
241
|
-
const existing =
|
|
248
|
+
const existing = readConfigRecord(configPath);
|
|
242
249
|
let removedFromConfig = false;
|
|
243
|
-
if (existing
|
|
244
|
-
const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing
|
|
250
|
+
if (existing !== null && typeof existing.apiKey === "string") {
|
|
251
|
+
const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing;
|
|
245
252
|
writeJsonAtomic(configPath, rest, KEY_FILE_MODE);
|
|
246
253
|
restrictFile(configPath);
|
|
247
254
|
removedFromConfig = true;
|
|
@@ -277,22 +284,18 @@ var restrictFile = (filePath) => {
|
|
|
277
284
|
}
|
|
278
285
|
};
|
|
279
286
|
var readConfigKey = (configPath) => {
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
const key = typeof result.value.apiKey === "string" ? result.value.apiKey.trim() : "";
|
|
287
|
+
const apiKey = readConfigRecord(configPath)?.apiKey;
|
|
288
|
+
const key = typeof apiKey === "string" ? apiKey.trim() : "";
|
|
283
289
|
return key || null;
|
|
284
290
|
};
|
|
285
291
|
var readConfigFileKey = () => readConfigKey(configFilePath());
|
|
286
292
|
var readControlMode = (configPath = configFilePath()) => {
|
|
287
|
-
const
|
|
288
|
-
if (result.kind !== "ok") return null;
|
|
289
|
-
const value = result.value.controlMode;
|
|
293
|
+
const value = readConfigRecord(configPath)?.controlMode;
|
|
290
294
|
return value === "auto" || value === "on" || value === "off" ? value : null;
|
|
291
295
|
};
|
|
292
296
|
var readTranscriptPreference = () => {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
return typeof result.value.transcriptsEnabled === "boolean" ? result.value.transcriptsEnabled : null;
|
|
297
|
+
const value = readConfigRecord(configFilePath())?.transcriptsEnabled;
|
|
298
|
+
return typeof value === "boolean" ? value : null;
|
|
296
299
|
};
|
|
297
300
|
var readKeySource = () => {
|
|
298
301
|
const configPath = configFilePath();
|
|
@@ -304,16 +307,15 @@ var readKeySource = () => {
|
|
|
304
307
|
return { kind: "none", key: null, origin: null, drift: null };
|
|
305
308
|
};
|
|
306
309
|
var readMacAppKeyPrefix = (configPath = configFilePath()) => {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const recorded = result.value[MAC_APP_KEY_PREFIX_FIELD];
|
|
310
|
-
return typeof recorded === "string" && KEY_PREFIX_SHAPE.test(recorded) ? recorded : null;
|
|
310
|
+
const recorded = readConfigRecord(configPath)?.[MAC_APP_KEY_PREFIX_FIELD];
|
|
311
|
+
return typeof recorded === "string" && API_KEY_PREFIX_PATTERN.test(recorded) ? recorded : null;
|
|
311
312
|
};
|
|
313
|
+
var isAdoptedMacAppKey = (key, adoptedPrefix) => keyPrefix(key) === adoptedPrefix;
|
|
312
314
|
var recordMacAppKeyPrefix = (apiKey, configPath = configFilePath()) => {
|
|
313
|
-
const
|
|
314
|
-
if (
|
|
315
|
-
if (
|
|
316
|
-
writeJsonAtomic(configPath, { ...
|
|
315
|
+
const config = readConfigRecord(configPath);
|
|
316
|
+
if (config === null || config.apiKey !== apiKey) return false;
|
|
317
|
+
if (config[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
|
|
318
|
+
writeJsonAtomic(configPath, { ...config, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
|
|
317
319
|
restrictFile(configPath);
|
|
318
320
|
return true;
|
|
319
321
|
};
|
|
@@ -354,6 +356,7 @@ export {
|
|
|
354
356
|
readTranscriptPreference,
|
|
355
357
|
readKeySource,
|
|
356
358
|
readMacAppKeyPrefix,
|
|
359
|
+
isAdoptedMacAppKey,
|
|
357
360
|
recordMacAppKeyPrefix,
|
|
358
361
|
findExportedKeyLines,
|
|
359
362
|
findExportedKeyLine
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NB2PY5JX.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WAKQYJ6T.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-75MJRC5I.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YGR5PBOF.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
parseApplyPatchFiles
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CW3QUV6B.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-E7EOUEGQ.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusalOutput,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GFXZDU4V.js";
|
|
28
28
|
|
|
29
29
|
// src/claude-config.ts
|
|
30
30
|
import { join } from "path";
|
|
@@ -5,26 +5,27 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6SFTI7LM.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WAKQYJ6T.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-75MJRC5I.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
ASK_QUESTION_MAX,
|
|
23
23
|
CLIENT_REPORT_PATH,
|
|
24
24
|
DECISION_LINE_MAX,
|
|
25
|
+
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
25
26
|
degradedLine,
|
|
26
27
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GFXZDU4V.js";
|
|
28
29
|
|
|
29
30
|
// src/client-report-claim.ts
|
|
30
31
|
import { createHash } from "crypto";
|
|
@@ -190,13 +191,15 @@ var unavailableQuestionUnlessSubscriptionRequired = (error) => {
|
|
|
190
191
|
return { correlationId: "", status: "unavailable" };
|
|
191
192
|
};
|
|
192
193
|
var truncateOptional = (text, max) => text === void 0 ? void 0 : truncateLine(text, max);
|
|
194
|
+
var boundedPermissionMode = (value) => typeof value === "string" && value.length > 0 ? value.slice(0, GATE_PERMISSION_MODE_MAX_LENGTH) : void 0;
|
|
193
195
|
var withinAskUserLimits = (params) => ({
|
|
194
196
|
...params,
|
|
195
197
|
question: truncateLine(params.question, ASK_QUESTION_MAX),
|
|
196
198
|
agentName: truncateOptional(params.agentName, ASK_AGENT_NAME_MAX),
|
|
197
199
|
intent: truncateOptional(params.intent, DECISION_LINE_MAX),
|
|
198
200
|
action: truncateOptional(params.action, DECISION_LINE_MAX),
|
|
199
|
-
blocker: truncateOptional(params.blocker, DECISION_LINE_MAX)
|
|
201
|
+
blocker: truncateOptional(params.blocker, DECISION_LINE_MAX),
|
|
202
|
+
permissionMode: boundedPermissionMode(params.permissionMode)
|
|
200
203
|
});
|
|
201
204
|
var askUser = async (apiKey, params, timeoutMs = 15e3) => {
|
|
202
205
|
const identified = params.toolUseId || params.requestId ? params : { ...params, requestId: randomUUID() };
|
|
@@ -12,7 +12,8 @@ var readJsonSafe = (filePath) => {
|
|
|
12
12
|
}
|
|
13
13
|
if (raw.trim() === "") return { kind: "ok", value: {} };
|
|
14
14
|
try {
|
|
15
|
-
|
|
15
|
+
const value = JSON.parse(raw);
|
|
16
|
+
return { kind: "ok", value };
|
|
16
17
|
} catch (err) {
|
|
17
18
|
return { kind: "unparseable", error: err, raw };
|
|
18
19
|
}
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
permissionDeniedAction,
|
|
7
7
|
releaseThrottle,
|
|
8
8
|
reportEvent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CW3QUV6B.js";
|
|
10
10
|
import {
|
|
11
11
|
machineDecisionFor,
|
|
12
12
|
shouldDeferToNativeMode,
|
|
13
13
|
wireVerdictFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GFXZDU4V.js";
|
|
15
15
|
|
|
16
16
|
// src/machine-decision-audit.ts
|
|
17
17
|
import { basename } from "path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AQFEP65J.js";
|
|
8
8
|
import {
|
|
9
9
|
DECLINED_AGENTS_FILE,
|
|
10
10
|
DISCONNECT_AGENT_IDS,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GFXZDU4V.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BDV4WDIA.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,26 +10,26 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AGIO7SF5.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6SFTI7LM.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-U2IEM5FF.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5TLRS3AK.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-E7EOUEGQ.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AQFEP65J.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-75MJRC5I.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
resolvePolicy,
|
|
61
61
|
toToolLookup,
|
|
62
62
|
truncateLine
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-GFXZDU4V.js";
|
|
64
64
|
|
|
65
65
|
// ../hook-mapping/src/describe.ts
|
|
66
66
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -204,6 +204,7 @@ var parseApplyPatchOps = (command) => {
|
|
|
204
204
|
return ops;
|
|
205
205
|
};
|
|
206
206
|
var parseApplyPatchFiles = (command) => [...new Set(parseApplyPatchOps(command).map((entry) => entry.path))];
|
|
207
|
+
var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
|
|
207
208
|
var OPENCODE_TOOL_NAMES = {
|
|
208
209
|
bash: "Bash",
|
|
209
210
|
// A shell command reaching outside the worktree asks a second time under its
|
|
@@ -1359,7 +1360,6 @@ var toCodexWire = (event, decision) => {
|
|
|
1359
1360
|
decision.kind === "deny" ? decision.reason : void 0
|
|
1360
1361
|
) ?? null;
|
|
1361
1362
|
};
|
|
1362
|
-
var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
|
|
1363
1363
|
var describeApplyPatch = (command) => {
|
|
1364
1364
|
const ops = parseApplyPatchOps(command);
|
|
1365
1365
|
if (ops.length === 0) return null;
|
|
@@ -2246,6 +2246,7 @@ export {
|
|
|
2246
2246
|
describeToolCall,
|
|
2247
2247
|
deriveToolTarget,
|
|
2248
2248
|
parseApplyPatchFiles,
|
|
2249
|
+
patchDeletesFiles,
|
|
2249
2250
|
OPENCODE_TOOL_NAMES,
|
|
2250
2251
|
canonicalGateInputs,
|
|
2251
2252
|
scopePathFor,
|
|
@@ -2279,7 +2280,6 @@ export {
|
|
|
2279
2280
|
codexDeny,
|
|
2280
2281
|
codexPass,
|
|
2281
2282
|
toCodexWire,
|
|
2282
|
-
patchDeletesFiles,
|
|
2283
2283
|
describeApplyPatch,
|
|
2284
2284
|
toPolicyLookup,
|
|
2285
2285
|
toPolicyLookups,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E3FSKKTJ.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GNQZY4GL.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GFXZDU4V.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -395,9 +395,9 @@ var installGlobally = (options) => {
|
|
|
395
395
|
}
|
|
396
396
|
const started = (async () => {
|
|
397
397
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
398
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
399
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
400
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
398
|
+
const { withUpgradeLock } = await import("./global-upgrade-F3QY6OHE.js");
|
|
399
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-N3G5V2QS.js");
|
|
400
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-CBEAZNJR.js");
|
|
401
401
|
let result = "skipped";
|
|
402
402
|
const install = async () => {
|
|
403
403
|
const platform = process.platform;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LH3GTSXC.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6TSEEKPL.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AGIO7SF5.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GFXZDU4V.js";
|
|
14
14
|
|
|
15
15
|
// src/tool-hook-input.ts
|
|
16
16
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6SFTI7LM.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5TLRS3AK.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TZWZVAMN.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-GFXZDU4V.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|