pushary 1.9.104 → 1.9.106
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 +8 -0
- package/data/SKILL.md +3 -3
- package/data/cursor-plugin/skills/pushary/SKILL.md +2 -2
- package/data/vscode-plugin/skills/pushary/SKILL.md +2 -2
- package/dist/{api-QOG7JVXE.js → api-RL5CPDTH.js} +11 -11
- package/dist/bin/pushary-audit.js +4 -4
- package/dist/bin/pushary-bell-hook.js +28 -27
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-claude.js +28 -28
- package/dist/bin/pushary-clean.js +37 -37
- package/dist/bin/pushary-codex-bridge.js +22 -22
- package/dist/bin/pushary-codex-hook.js +33 -32
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +489 -62
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +18 -18
- package/dist/bin/pushary-doctor.js +50 -50
- package/dist/bin/pushary-elicitation-hook.js +28 -27
- package/dist/bin/pushary-gemini-bridge.js +16 -16
- package/dist/bin/pushary-gemini-hook.js +30 -29
- package/dist/bin/pushary-hook.js +33 -31
- package/dist/bin/pushary-login.js +21 -21
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -26
- package/dist/bin/pushary-opencode-hook.js +29 -28
- package/dist/bin/pushary-permission-denied-hook.js +33 -31
- package/dist/bin/pushary-permission-hook.js +33 -31
- package/dist/bin/pushary-post-hook.js +27 -26
- package/dist/bin/pushary-prompt-hook.js +27 -26
- package/dist/bin/pushary-session-end-hook.js +29 -28
- package/dist/bin/pushary-session-start-hook.js +37 -36
- package/dist/bin/pushary-setup.js +49 -49
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +33 -33
- package/dist/bin/pushary-stop-hook.js +27 -26
- package/dist/bin/pushary-stopfailure-hook.js +27 -26
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +27 -27
- package/dist/bin/pushary-upgrade.js +41 -41
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-4JBCPRWZ.js → chunk-2HC5ISDW.js} +2 -2
- package/dist/{chunk-HB7FHRTT.js → chunk-43PNDDB3.js} +6 -6
- package/dist/{chunk-SJCHJQKT.js → chunk-4EMPELDR.js} +4 -4
- package/dist/{chunk-XDTE55H7.js → chunk-4OUPD4KA.js} +4 -4
- package/dist/{chunk-HJ4EBHK4.js → chunk-4XE3DVF7.js} +2 -2
- package/dist/{chunk-SJJCCFD5.js → chunk-5IAW6G3K.js} +3 -3
- package/dist/{chunk-JVZVO3K5.js → chunk-6DKMZBRK.js} +1 -1
- package/dist/{chunk-OFRQNTJD.js → chunk-76JOLPST.js} +1 -1
- package/dist/{chunk-FYQHXN4X.js → chunk-772NHSQB.js} +2 -2
- package/dist/{chunk-BDSI2NEN.js → chunk-A37RKFI3.js} +4 -4
- package/dist/{chunk-UL52HYKN.js → chunk-ASCQXNCL.js} +1 -1
- package/dist/{chunk-XXPA3X6L.js → chunk-ATVZAEM5.js} +5 -5
- package/dist/{chunk-JMTOQXHV.js → chunk-B5Q44HKN.js} +1 -1
- package/dist/{chunk-NKA2PEQQ.js → chunk-B7O4CXFX.js} +4 -4
- package/dist/{chunk-SVZPRTCK.js → chunk-CJTJ55DR.js} +1 -1
- package/dist/{chunk-AG7PFGGE.js → chunk-CKWV3T7O.js} +6 -6
- package/dist/{chunk-GV2MF4NY.js → chunk-DA57ZI62.js} +2 -2
- package/dist/{chunk-ZBT3U2VB.js → chunk-DH22FQAS.js} +1 -1
- package/dist/{chunk-VZY4GD4T.js → chunk-DIVVLBZZ.js} +6 -6
- package/dist/{chunk-FXTUSTQG.js → chunk-DS672F57.js} +11 -11
- package/dist/{chunk-NGY2WS3X.js → chunk-EMSRB2KH.js} +3 -3
- package/dist/{chunk-HHEFOGT2.js → chunk-FE5JENEJ.js} +3 -3
- package/dist/{chunk-4QI6SBNR.js → chunk-FJYUB3ZK.js} +4 -4
- package/dist/{chunk-6B4R7HUV.js → chunk-FUTFQSRA.js} +1 -1
- package/dist/{chunk-TMJK3CLD.js → chunk-G5HGV6D4.js} +3 -3
- package/dist/{chunk-HXZYBYBD.js → chunk-GBHP3LML.js} +7 -5
- package/dist/{chunk-4OLWSYX5.js → chunk-GESW4OSZ.js} +4 -4
- package/dist/{chunk-3A7REECH.js → chunk-GKCDMAUM.js} +1 -1
- package/dist/{chunk-U5DBYW63.js → chunk-GUIS6ASL.js} +1 -1
- package/dist/{chunk-KDIZS7FN.js → chunk-HH5NNPB5.js} +1 -1
- package/dist/{chunk-XTMAVKO3.js → chunk-HLYZEZOI.js} +3 -3
- package/dist/{chunk-OPV6724W.js → chunk-HONSMBF2.js} +7 -7
- package/dist/{chunk-M7BDKARZ.js → chunk-HXBQTPKC.js} +1 -1
- package/dist/{chunk-PYUN7HNY.js → chunk-I3IUS4SR.js} +2 -2
- package/dist/{chunk-CC4LGKEZ.js → chunk-IAASPG5B.js} +5 -5
- package/dist/{chunk-2MRLDEQY.js → chunk-IGO5NDQY.js} +3 -3
- package/dist/{chunk-RDUY7MKN.js → chunk-IHQRLJEP.js} +12 -12
- package/dist/{chunk-RUN772MN.js → chunk-J2HIFUAT.js} +7 -7
- package/dist/{chunk-UYJLXAP4.js → chunk-J5PUKKCT.js} +8 -7
- package/dist/{chunk-AYWX6M7J.js → chunk-JCSJEMTA.js} +208 -60
- package/dist/{chunk-FVERRWDP.js → chunk-JDGLNYDZ.js} +2 -2
- package/dist/{chunk-5BX57BGT.js → chunk-JLJJRBTD.js} +6 -5
- package/dist/{chunk-UUYLBSAU.js → chunk-KHZCJP7P.js} +11 -11
- package/dist/{chunk-WBLK4WLO.js → chunk-LK3WA6MK.js} +3 -3
- package/dist/{chunk-ID4BZRBW.js → chunk-LL7SW4RL.js} +3 -3
- package/dist/{chunk-GV5TEADP.js → chunk-LMDXQIYT.js} +1 -1
- package/dist/{chunk-RYUIXLZ5.js → chunk-MFJHLVIZ.js} +11 -95
- package/dist/{chunk-XXNXMX2G.js → chunk-MLLL2ET6.js} +17 -61
- package/dist/{chunk-TYM6IH5F.js → chunk-NM44KCO6.js} +4 -4
- package/dist/{chunk-5YVBVJOH.js → chunk-O5TB2LMQ.js} +8 -0
- package/dist/{chunk-ZUXDGVW4.js → chunk-OBZQPBUI.js} +5 -5
- package/dist/chunk-OINGJICB.js +108 -0
- package/dist/{chunk-JGRBWTDW.js → chunk-P3H6I656.js} +11 -11
- package/dist/{chunk-IVAXF3JG.js → chunk-P3VVRBBI.js} +1 -1
- package/dist/{chunk-PK6LBL3Z.js → chunk-PFZCLG55.js} +4 -4
- package/dist/{chunk-I3T5YV5I.js → chunk-RKQVMFHN.js} +11 -93
- package/dist/{chunk-VUFHYMSP.js → chunk-ROVLRXBI.js} +1 -1
- package/dist/{chunk-7RHEZVAE.js → chunk-S2TTGX6F.js} +5 -5
- package/dist/{chunk-N4RIGNDX.js → chunk-S75UO75C.js} +2 -2
- package/dist/{chunk-QENTGE75.js → chunk-T5I4PKOQ.js} +37 -1
- package/dist/{chunk-SPM4VNED.js → chunk-TXMYET7E.js} +3 -3
- package/dist/{chunk-CFTPHNBY.js → chunk-UUJQK7DJ.js} +1 -1
- package/dist/{chunk-ORIVT4BL.js → chunk-UXIUCMFO.js} +6 -6
- package/dist/{chunk-4HBWXZPI.js → chunk-VCWLGM77.js} +3 -3
- package/dist/{chunk-3KEY3453.js → chunk-VK4PPVWB.js} +24 -10
- package/dist/{chunk-AE2BQ3XM.js → chunk-VKTW5WVB.js} +2 -2
- package/dist/chunk-WUIWHGKF.js +56 -0
- package/dist/{chunk-FQNMUJTK.js → chunk-X3QG5RT5.js} +1 -1
- package/dist/{chunk-TYH7SNKD.js → chunk-XN527J4W.js} +1 -1
- package/dist/{chunk-YDT6TVGN.js → chunk-YDQ6OJMF.js} +1 -1
- package/dist/{chunk-FH6PHTUD.js → chunk-Z5FV7LTD.js} +2 -2
- package/dist/{chunk-LIDIA5JW.js → chunk-ZB2WNJXZ.js} +4 -4
- package/dist/{chunk-VAZCGOLS.js → chunk-ZCBTCW3T.js} +3 -3
- package/dist/{codex-app-cards-switch-6IDDWXYS.js → codex-app-cards-switch-FD2ZWLYL.js} +12 -12
- package/dist/{codex-desktop-launch-VP4TXVCM.js → codex-desktop-launch-BN5OABPN.js} +1 -1
- package/dist/{codex-session-launch-OACJB5NN.js → codex-session-launch-O3PHQWTS.js} +19 -19
- package/dist/{config-S7HAIK6E.js → config-KWP7UXYG.js} +3 -3
- package/dist/{global-upgrade-OOFEGR4H.js → global-upgrade-NBSY5436.js} +11 -11
- package/dist/{identity-QSM6MVAH.js → identity-RP5I7KTV.js} +5 -5
- package/dist/{live-capabilities-NSVW362T.js → live-capabilities-XC6C47ZH.js} +6 -6
- package/dist/{paths-KFRRYJWL.js → paths-OE5APZ4Q.js} +8 -4
- package/dist/{reapply-7H3VCPW4.js → reapply-DRZ32BIB.js} +29 -29
- package/dist/src/index.js +32 -30
- package/dist/{upgrade-lock-BJKRXNMC.js → upgrade-lock-LWTVHYAJ.js} +5 -5
- package/dist/{usage-KGWL6WKQ.js → usage-5YESCANM.js} +3 -3
- package/package.json +1 -1
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GESW4OSZ.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HONSMBF2.js";
|
|
14
14
|
import {
|
|
15
15
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I3IUS4SR.js";
|
|
17
17
|
import {
|
|
18
18
|
readControlMode,
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B7O4CXFX.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GKCDMAUM.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -37,12 +37,13 @@ var sendHeartbeat = async (apiKey, input = {}, deps = {}) => {
|
|
|
37
37
|
method: "POST",
|
|
38
38
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}` },
|
|
39
39
|
body: JSON.stringify({
|
|
40
|
-
machineId: getMachineId(),
|
|
40
|
+
machineId: input.machineId ?? getMachineId(),
|
|
41
41
|
hostname: hostname(),
|
|
42
42
|
cliVersion: getPackageVersion(),
|
|
43
43
|
repoKey: input.repoKey ?? null,
|
|
44
44
|
capabilities: input.capabilities ?? [],
|
|
45
|
-
autoUpdate: input.autoUpdate ?? null
|
|
45
|
+
autoUpdate: input.autoUpdate ?? null,
|
|
46
|
+
...input.hookWiring ? { hookWiring: input.hookWiring } : {}
|
|
46
47
|
}),
|
|
47
48
|
signal: AbortSignal.timeout(1e4)
|
|
48
49
|
});
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
formatVersion,
|
|
4
4
|
quoteIfNeeded,
|
|
5
5
|
shellDoubleQuoted
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZCBTCW3T.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
10
10
|
import {
|
|
11
11
|
cmdShimScriptOf
|
|
12
12
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
HOOK_LOCATOR_BINARY,
|
|
18
18
|
PRETOOLUSE_GATED_TOOLS,
|
|
19
19
|
withHookHoldBudget
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
21
21
|
|
|
22
22
|
// src/setup/paths.ts
|
|
23
23
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -29,8 +29,8 @@ var claudeConfigDir = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: proc
|
|
|
29
29
|
var claudeUserConfigFile = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: process.env.CLAUDE_CONFIG_DIR }) => join(environment.CLAUDE_CONFIG_DIR ? claudeConfigDir(home, environment) : home, ".claude.json");
|
|
30
30
|
|
|
31
31
|
// src/setup/paths.ts
|
|
32
|
-
import { homedir as
|
|
33
|
-
import { join as
|
|
32
|
+
import { homedir as homedir4 } from "os";
|
|
33
|
+
import { join as join6 } from "path";
|
|
34
34
|
|
|
35
35
|
// src/codex-config.ts
|
|
36
36
|
import { createHash } from "crypto";
|
|
@@ -53,6 +53,39 @@ var HOOK_GUARD_SCRIPTS = {
|
|
|
53
53
|
node_script: `[ -f "$0" ] || exit 0; ${NODE_PRESENT}; exec node "$0" "$@"`,
|
|
54
54
|
cursor_gate_script: `[ -f "$0" ] || ${CURSOR_MISS}; command -v node >/dev/null 2>&1 || ${CURSOR_MISS}; exec node "$0" "$@"`
|
|
55
55
|
};
|
|
56
|
+
var COMMAND_TOKEN = /"(?:\\.|[^"\\])*"|'[^']*'|\S+/g;
|
|
57
|
+
var DOUBLE_QUOTED_ESCAPE = /\\(["\\$`])/g;
|
|
58
|
+
var [GUARD_SHELL, GUARD_SHELL_FLAG] = HOOK_SHELL.split(/\s+/);
|
|
59
|
+
var NODE_LAUNCHERS = /* @__PURE__ */ new Set(["node", "node.exe"]);
|
|
60
|
+
var GUARD_STATEMENT_SEPARATOR = "; ";
|
|
61
|
+
var guardExecStatement = (script) => script.slice(script.lastIndexOf(GUARD_STATEMENT_SEPARATOR) + GUARD_STATEMENT_SEPARATOR.length);
|
|
62
|
+
var GUARDS_WITHOUT_ARGUMENTS_EXEC_STATEMENT = 'exec "$B"';
|
|
63
|
+
var GUARD_EXEC_STATEMENTS = [
|
|
64
|
+
.../* @__PURE__ */ new Set([...Object.values(HOOK_GUARD_SCRIPTS).map(guardExecStatement), GUARDS_WITHOUT_ARGUMENTS_EXEC_STATEMENT])
|
|
65
|
+
];
|
|
66
|
+
var guardRunsItsTarget = (script) => GUARD_EXEC_STATEMENTS.some((statement) => script.endsWith(statement));
|
|
67
|
+
var NODE_GUARD_EXEC_STATEMENT = guardExecStatement(HOOK_GUARD_SCRIPTS.node_script);
|
|
68
|
+
var guardRunsThroughNode = (script) => script.endsWith(NODE_GUARD_EXEC_STATEMENT);
|
|
69
|
+
var isWrappedIn = (token, quote) => token[0] === quote && token.at(-1) === quote;
|
|
70
|
+
var unquotedToken = (raw, unescapesDoubleQuotes) => {
|
|
71
|
+
const unquoted = isWrappedIn(raw, '"') || isWrappedIn(raw, "'") ? raw.slice(1, -1) : raw;
|
|
72
|
+
return unescapesDoubleQuotes && raw[0] === '"' ? unquoted.replace(DOUBLE_QUOTED_ESCAPE, "$1") : unquoted;
|
|
73
|
+
};
|
|
74
|
+
var hookCommandTokens = (command) => {
|
|
75
|
+
const unescapesDoubleQuotes = command.startsWith(`${HOOK_SHELL} `);
|
|
76
|
+
return (command.match(COMMAND_TOKEN) ?? []).map((raw) => unquotedToken(raw, unescapesDoubleQuotes));
|
|
77
|
+
};
|
|
78
|
+
var executableFileName = (executable) => executable.split(/[/\\]/).pop() ?? "";
|
|
79
|
+
var isNodeLauncher = (executable) => NODE_LAUNCHERS.has(executableFileName(executable).toLowerCase());
|
|
80
|
+
var guardedExecutable = (script, target) => script === void 0 || target === void 0 ? null : { executable: target, runsExecutable: guardRunsItsTarget(script), runsThroughNode: guardRunsThroughNode(script) };
|
|
81
|
+
var parseHookArgv = (argv) => {
|
|
82
|
+
const [first, second, script, target] = argv;
|
|
83
|
+
if (first === void 0) return null;
|
|
84
|
+
if (first === GUARD_SHELL && second === GUARD_SHELL_FLAG) return guardedExecutable(script, target);
|
|
85
|
+
if (isNodeLauncher(first)) return second === void 0 ? null : { executable: second, runsExecutable: true, runsThroughNode: true };
|
|
86
|
+
return { executable: first, runsExecutable: true, runsThroughNode: false };
|
|
87
|
+
};
|
|
88
|
+
var parseHookCommand = (command) => parseHookArgv(hookCommandTokens(command));
|
|
56
89
|
var BINARY_GUARDS = {
|
|
57
90
|
native: "native_binary",
|
|
58
91
|
node: "node_binary"
|
|
@@ -71,6 +104,7 @@ var targetPath = (target) => target.kind === "binary" ? target.path : target.scr
|
|
|
71
104
|
var runsThroughNode = (target) => target.kind !== "binary";
|
|
72
105
|
var LAUNCHABLE_EXTENSION = /\.(cmd|exe|js|mjs)$/i;
|
|
73
106
|
var hookBinaryNameOf = (fileName) => fileName.replace(LAUNCHABLE_EXTENSION, "");
|
|
107
|
+
var hookExecutableName = (executable) => hookBinaryNameOf(executableFileName(executable));
|
|
74
108
|
var windowsNodeLaunchOf = (target, launcher) => {
|
|
75
109
|
if (launcher === null) return null;
|
|
76
110
|
if (target.kind !== "binary") return { node: launcher.node, script: target.script };
|
|
@@ -221,6 +255,9 @@ var CODEX_HOOK_EVENTS = [
|
|
|
221
255
|
{ event: "PreCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 },
|
|
222
256
|
{ event: "PostCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 }
|
|
223
257
|
];
|
|
258
|
+
var CODEX_EARLIER_APPROVAL_MATCHERS = {
|
|
259
|
+
PermissionRequest: ["Bash|apply_patch"]
|
|
260
|
+
};
|
|
224
261
|
var CODEX_REQUIRED_APPROVAL_EVENTS = CODEX_HOOK_EVENTS.filter((event) => event.delivery === "approval").map((event) => event.event);
|
|
225
262
|
var CODEX_EVENT_KEY = {
|
|
226
263
|
PermissionRequest: "permission_request",
|
|
@@ -355,6 +392,7 @@ var removeCodexHooks = (config, scope) => {
|
|
|
355
392
|
if (Object.keys(hooks).length === 0) delete config.hooks;
|
|
356
393
|
return changed;
|
|
357
394
|
};
|
|
395
|
+
var codexHooksFeatureDisabled = (config) => asRecord2(config.features)?.hooks === false;
|
|
358
396
|
var hasCodexHooks = (config) => {
|
|
359
397
|
const hooks = asRecord2(config.hooks);
|
|
360
398
|
if (!hooks) return false;
|
|
@@ -539,11 +577,103 @@ var staleTrustKeys = (state, hooksJsonPath, event, currentKey, ourHash) => {
|
|
|
539
577
|
);
|
|
540
578
|
};
|
|
541
579
|
|
|
580
|
+
// src/diagnostics/bridge.ts
|
|
581
|
+
import { execFileSync } from "child_process";
|
|
582
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
583
|
+
import { homedir as homedir3 } from "os";
|
|
584
|
+
import { dirname, join as join3 } from "path";
|
|
585
|
+
var BRIDGE_BUNDLE_IDENTIFIER = "com.pushary.app";
|
|
586
|
+
var BRIDGE_HELPER_SUFFIX = "/Contents/Helpers/pushary-bridge";
|
|
587
|
+
var BRIDGE_BUNDLE_ROOTS = ["/Applications/Pushary.app", "$HOME/Applications/Pushary.app"];
|
|
588
|
+
var BRIDGE_CACHE_FILE = ".bridge-cache";
|
|
589
|
+
var BRIDGE_STUB_HELPER_LINE = `H=${BRIDGE_HELPER_SUFFIX}`;
|
|
590
|
+
var BRIDGE_STUB_RUNS_THE_HELPER = 'exec "$P$H"';
|
|
591
|
+
var expandHome = (path, home) => path.replaceAll("$HOME", home);
|
|
592
|
+
var parseBridgeStub = (contents, stubPath) => {
|
|
593
|
+
const helperSuffix = contents.match(/^H=(\S+)$/m)?.[1] ?? BRIDGE_HELPER_SUFFIX;
|
|
594
|
+
const cachePath = contents.match(/^C="([^"\n]+)"$/m)?.[1] ?? join3(dirname(stubPath), BRIDGE_CACHE_FILE);
|
|
595
|
+
const rootsLine = contents.match(/^for P in ((?:"[^"\n]*"\s*)+); do$/m)?.[1];
|
|
596
|
+
const bundleRoots = rootsLine ? [...rootsLine.matchAll(/"([^"]*)"/g)].map((match) => match[1]) : BRIDGE_BUNDLE_ROOTS;
|
|
597
|
+
const bundleIdentifier = contents.match(/kMDItemCFBundleIdentifier == "([^"]+)"/)?.[1] ?? BRIDGE_BUNDLE_IDENTIFIER;
|
|
598
|
+
return { helperSuffix, cachePath, bundleRoots, bundleIdentifier };
|
|
599
|
+
};
|
|
600
|
+
var resolveBridgeStub = (stubPath, probe) => {
|
|
601
|
+
const contents = probe.readFile(stubPath);
|
|
602
|
+
if (contents === null) return { kind: "no-stub", stub: stubPath };
|
|
603
|
+
const shape = parseBridgeStub(contents, stubPath);
|
|
604
|
+
const helperIn = (bundle) => `${bundle}${shape.helperSuffix}`;
|
|
605
|
+
const looked = [];
|
|
606
|
+
for (const root of shape.bundleRoots.map((root2) => expandHome(root2, probe.home))) {
|
|
607
|
+
looked.push(root);
|
|
608
|
+
if (probe.exists(helperIn(root))) return { kind: "bundle", helper: helperIn(root), via: "root" };
|
|
609
|
+
}
|
|
610
|
+
const cached = shape.cachePath ? probe.readFile(shape.cachePath)?.split("\n")[0]?.trim() : void 0;
|
|
611
|
+
if (cached) {
|
|
612
|
+
looked.push(cached);
|
|
613
|
+
if (probe.exists(helperIn(cached))) return { kind: "bundle", helper: helperIn(cached), via: "cache" };
|
|
614
|
+
}
|
|
615
|
+
for (const found of probe.mdfind(shape.bundleIdentifier)) {
|
|
616
|
+
looked.push(found);
|
|
617
|
+
if (probe.exists(helperIn(found))) return { kind: "bundle", helper: helperIn(found), via: "spotlight" };
|
|
618
|
+
}
|
|
619
|
+
return { kind: "missing", stub: stubPath, looked };
|
|
620
|
+
};
|
|
621
|
+
var NO_SPOTLIGHT = () => [];
|
|
622
|
+
var bridgeResolvesToApp = (locator, probe) => resolveBridgeStub(locator, { ...probe, mdfind: NO_SPOTLIGHT }).kind === "bundle";
|
|
623
|
+
var installedBridgeBundleRoots = (home) => BRIDGE_BUNDLE_ROOTS.map((root) => expandHome(root, home));
|
|
624
|
+
var isMacAppBridgeStub = (contents) => contents.split("\n").includes(BRIDGE_STUB_HELPER_LINE) && contents.includes(BRIDGE_STUB_RUNS_THE_HELPER);
|
|
625
|
+
var cachedBundleRoot = (location, probe) => {
|
|
626
|
+
const cached = probe.readFile(location.cache)?.split("\n")[0]?.trim();
|
|
627
|
+
return cached ? [cached] : [];
|
|
628
|
+
};
|
|
629
|
+
var macAppBridgeIsInstalled = (location, probe) => {
|
|
630
|
+
const stub = probe.readFile(location.stub);
|
|
631
|
+
if (stub === null || !isMacAppBridgeStub(stub)) return false;
|
|
632
|
+
return [...location.bundleRoots, ...cachedBundleRoot(location, probe)].some((root) => probe.exists(`${root}${BRIDGE_HELPER_SUFFIX}`));
|
|
633
|
+
};
|
|
634
|
+
var BRIDGE_GONE_MESSAGE = "the Mac app is gone but its hooks remain; run pushary setup or reinstall the app";
|
|
635
|
+
var describeBridgeResolution = (resolution) => {
|
|
636
|
+
switch (resolution.kind) {
|
|
637
|
+
case "bundle":
|
|
638
|
+
return `${resolution.helper} (${resolution.via === "root" ? "installed" : resolution.via === "cache" ? "cached path" : "found by Spotlight"})`;
|
|
639
|
+
case "missing":
|
|
640
|
+
return BRIDGE_GONE_MESSAGE;
|
|
641
|
+
case "no-stub":
|
|
642
|
+
return `${resolution.stub} is not there; ${BRIDGE_GONE_MESSAGE}`;
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
var isBridgeLocator = (executable) => executable !== null && executable.split(/[/\\]/).pop() === HOOK_LOCATOR_BINARY;
|
|
646
|
+
var spotlight = (bundleIdentifier) => {
|
|
647
|
+
if (process.platform !== "darwin") return [];
|
|
648
|
+
try {
|
|
649
|
+
return execFileSync("/usr/bin/mdfind", [`kMDItemCFBundleIdentifier == "${bundleIdentifier}"`], {
|
|
650
|
+
encoding: "utf-8",
|
|
651
|
+
timeout: 5e3,
|
|
652
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
653
|
+
}).split("\n").map((line) => line.trim()).filter((line) => line !== "");
|
|
654
|
+
} catch {
|
|
655
|
+
return [];
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
var readOrNull = (path) => {
|
|
659
|
+
try {
|
|
660
|
+
return readFileSync2(path, "utf-8");
|
|
661
|
+
} catch {
|
|
662
|
+
return null;
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
var liveBridgeProbe = () => ({
|
|
666
|
+
exists: existsSync2,
|
|
667
|
+
readFile: readOrNull,
|
|
668
|
+
mdfind: spotlight,
|
|
669
|
+
home: homedir3()
|
|
670
|
+
});
|
|
671
|
+
|
|
542
672
|
// src/cline-config.ts
|
|
543
|
-
import { join as
|
|
673
|
+
import { join as join5 } from "path";
|
|
544
674
|
|
|
545
675
|
// src/claude-config.ts
|
|
546
|
-
import { join as
|
|
676
|
+
import { join as join4 } from "path";
|
|
547
677
|
|
|
548
678
|
// src/claude-tools.ts
|
|
549
679
|
var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
|
|
@@ -735,7 +865,7 @@ var addPusharyToolPermissions = (settings) => {
|
|
|
735
865
|
permissions.allow = filtered;
|
|
736
866
|
};
|
|
737
867
|
var addPusharyHooks = (settings, binDir, version = null) => {
|
|
738
|
-
const resolve2 = (name) => guardBinary(binDir ?
|
|
868
|
+
const resolve2 = (name) => guardBinary(binDir ? join4(binDir, name) : name);
|
|
739
869
|
const hooks = ensureRecord2(settings, "hooks");
|
|
740
870
|
const supported = new Map(supportedClaudeEvents(version).map((hook) => [hook.event, hook]));
|
|
741
871
|
for (const known of CLAUDE_HOOK_EVENTS) {
|
|
@@ -785,8 +915,8 @@ var removePusharySettings = (settings, scope) => {
|
|
|
785
915
|
};
|
|
786
916
|
|
|
787
917
|
// src/instruction-file.ts
|
|
788
|
-
import { accessSync, constants, existsSync as
|
|
789
|
-
import { dirname } from "path";
|
|
918
|
+
import { accessSync, constants, existsSync as existsSync3, readFileSync as readFileSync3, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
919
|
+
import { dirname as dirname2 } from "path";
|
|
790
920
|
var PUSHARY_BEGIN = "<!-- BEGIN PUSHARY (managed by @pushary/agent-hooks; do not edit this block) -->";
|
|
791
921
|
var PUSHARY_END = "<!-- END PUSHARY -->";
|
|
792
922
|
var instructionBody = (label) => `## Pushary notifications and approvals
|
|
@@ -832,11 +962,11 @@ var withInstructionBlockReplaced = (existing, body) => {
|
|
|
832
962
|
return range ? existing.slice(0, range.start) + wrap(body) + existing.slice(range.end) : null;
|
|
833
963
|
};
|
|
834
964
|
var writeInstructionBlock = (filePath, body) => {
|
|
835
|
-
const dir =
|
|
836
|
-
if (!
|
|
965
|
+
const dir = dirname2(filePath);
|
|
966
|
+
if (!existsSync3(dir)) mkdirSync(dir, { recursive: true });
|
|
837
967
|
let existing = "";
|
|
838
968
|
try {
|
|
839
|
-
existing =
|
|
969
|
+
existing = readFileSync3(filePath, "utf-8");
|
|
840
970
|
} catch {
|
|
841
971
|
}
|
|
842
972
|
writeFileSync(filePath, withInstructionBlockReplaced(existing, body) ?? withInstructionBlockAppended(existing, body), "utf-8");
|
|
@@ -853,7 +983,7 @@ var CRLF = "\r\n";
|
|
|
853
983
|
var withLineEndingsOf = (sample, block) => sample.includes(CRLF) ? block.replaceAll("\n", CRLF) : block;
|
|
854
984
|
var readUtf8 = (filePath) => {
|
|
855
985
|
try {
|
|
856
|
-
const bytes =
|
|
986
|
+
const bytes = readFileSync3(filePath);
|
|
857
987
|
const text = bytes.toString("utf-8");
|
|
858
988
|
return Buffer.from(text, "utf-8").equals(bytes) ? { kind: "text", text } : { kind: "not_utf8" };
|
|
859
989
|
} catch {
|
|
@@ -869,7 +999,7 @@ var isWritable = (filePath) => {
|
|
|
869
999
|
}
|
|
870
1000
|
};
|
|
871
1001
|
var refreshInstructionBlock = (filePath, body) => {
|
|
872
|
-
if (!
|
|
1002
|
+
if (!existsSync3(filePath)) return "absent";
|
|
873
1003
|
const read = readUtf8(filePath);
|
|
874
1004
|
if (read.kind !== "text") return read.kind;
|
|
875
1005
|
const block = soleManagedBlock(read.text);
|
|
@@ -890,7 +1020,7 @@ var refreshInstructionBlock = (filePath, body) => {
|
|
|
890
1020
|
var removeInstructionBlock = (filePath) => {
|
|
891
1021
|
let existing = "";
|
|
892
1022
|
try {
|
|
893
|
-
existing =
|
|
1023
|
+
existing = readFileSync3(filePath, "utf-8");
|
|
894
1024
|
} catch {
|
|
895
1025
|
return false;
|
|
896
1026
|
}
|
|
@@ -907,7 +1037,7 @@ var removeInstructionBlock = (filePath) => {
|
|
|
907
1037
|
};
|
|
908
1038
|
var hasInstructionBlock = (filePath) => {
|
|
909
1039
|
try {
|
|
910
|
-
return
|
|
1040
|
+
return readFileSync3(filePath, "utf-8").includes(PUSHARY_BEGIN);
|
|
911
1041
|
} catch {
|
|
912
1042
|
return false;
|
|
913
1043
|
}
|
|
@@ -967,10 +1097,10 @@ var environmentValue = (environment, name) => {
|
|
|
967
1097
|
const value = environment[name]?.trim();
|
|
968
1098
|
return value ? value : void 0;
|
|
969
1099
|
};
|
|
970
|
-
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ??
|
|
971
|
-
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ??
|
|
972
|
-
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ??
|
|
973
|
-
var clineRulesFile = (location) =>
|
|
1100
|
+
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ?? join5(location.home, CLINE_DIRECTORY_NAME);
|
|
1101
|
+
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ?? join5(clineDirectory(location), CLINE_DATA_DIRECTORY_NAME);
|
|
1102
|
+
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ?? join5(clineDataDirectory(location), CLINE_SETTINGS_DIRECTORY_NAME, CLINE_SETTINGS_FILE_NAME);
|
|
1103
|
+
var clineRulesFile = (location) => join5(clineDirectory(location), CLINE_RULES_DIRECTORY_NAME, CLINE_RULES_FILE_NAME);
|
|
974
1104
|
var parsedJson = (text) => {
|
|
975
1105
|
try {
|
|
976
1106
|
return { ok: true, value: JSON.parse(text) };
|
|
@@ -1074,53 +1204,59 @@ var clineInstructionsBody = () => `${renderAgentInstructions(CLINE_LABEL)}
|
|
|
1074
1204
|
${CLINE_TOOL_NOTE}`;
|
|
1075
1205
|
|
|
1076
1206
|
// src/setup/paths.ts
|
|
1077
|
-
var claudeSettings = (environment = process.env) =>
|
|
1078
|
-
var claudeJson = (environment = process.env) => claudeUserConfigFile(
|
|
1079
|
-
var claudeSkillDir = (environment = process.env) =>
|
|
1080
|
-
var cursorPluginDir = () =>
|
|
1081
|
-
var cursorUserHooks = () =>
|
|
1082
|
-
var cursorPluginMcp = () =>
|
|
1083
|
-
var cursorPluginManifest = () =>
|
|
1084
|
-
var cursorPluginRule = () =>
|
|
1085
|
-
var cursorUserMcp = () =>
|
|
1086
|
-
var vscodePluginDir = () =>
|
|
1087
|
-
var vscodePluginMcp = () =>
|
|
1088
|
-
var claudeSettingsLocal = () =>
|
|
1089
|
-
var pusharyDir = () =>
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1094
|
-
var
|
|
1095
|
-
var
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1098
|
-
var
|
|
1099
|
-
var
|
|
1100
|
-
var
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1106
|
-
var
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1109
|
-
var
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
1112
|
-
var
|
|
1113
|
-
var
|
|
1114
|
-
var
|
|
1207
|
+
var claudeSettings = (environment = process.env) => join6(claudeConfigDir(homedir4(), environment), "settings.json");
|
|
1208
|
+
var claudeJson = (environment = process.env) => claudeUserConfigFile(homedir4(), environment);
|
|
1209
|
+
var claudeSkillDir = (environment = process.env) => join6(claudeConfigDir(homedir4(), environment), "skills", "pushary");
|
|
1210
|
+
var cursorPluginDir = () => join6(homedir4(), ".cursor", "plugins", "local", "pushary");
|
|
1211
|
+
var cursorUserHooks = () => join6(homedir4(), ".cursor", "hooks.json");
|
|
1212
|
+
var cursorPluginMcp = () => join6(cursorPluginDir(), "mcp.json");
|
|
1213
|
+
var cursorPluginManifest = () => join6(cursorPluginDir(), ".cursor-plugin", "plugin.json");
|
|
1214
|
+
var cursorPluginRule = () => join6(cursorPluginDir(), "rules", "pushary.mdc");
|
|
1215
|
+
var cursorUserMcp = () => join6(homedir4(), ".cursor", "mcp.json");
|
|
1216
|
+
var vscodePluginDir = () => join6(homedir4(), ".pushary", "plugins", "vscode");
|
|
1217
|
+
var vscodePluginMcp = () => join6(vscodePluginDir(), ".mcp.json");
|
|
1218
|
+
var claudeSettingsLocal = () => join6(claudeConfigDir(), "settings.local.json");
|
|
1219
|
+
var pusharyDir = () => join6(homedir4(), ".pushary");
|
|
1220
|
+
var bridgeStub = () => join6(pusharyDir(), "bin", HOOK_LOCATOR_BINARY);
|
|
1221
|
+
var bridgeCache = () => join6(pusharyDir(), "bin", BRIDGE_CACHE_FILE);
|
|
1222
|
+
var claudeSetupDir = () => process.env.CLAUDE_CONFIG_DIR ? join6(pusharyDir(), "setup", "claude-profiles", createHash2("sha256").update(claudeUserConfigFile()).digest("hex").slice(0, 32)) : join6(pusharyDir(), "setup");
|
|
1223
|
+
var claudeMcpReceipt = () => join6(claudeSetupDir(), "claude-mcp.json");
|
|
1224
|
+
var bridgeAgentKey = () => join6(pusharyDir(), "bridge-auth", "agent-key.json");
|
|
1225
|
+
var autoUpdateState = () => join6(pusharyDir(), "auto-update.json");
|
|
1226
|
+
var autoUpdateLock = () => join6(pusharyDir(), "auto-update.lock");
|
|
1227
|
+
var serviceOwedBackMark = () => join6(pusharyDir(), "service-owed-back");
|
|
1228
|
+
var autoUpdateLog = () => join6(pusharyDir(), "logs", "auto-update.log");
|
|
1229
|
+
var clientReportClaims = () => join6(pusharyDir(), "client-reports");
|
|
1230
|
+
var claudeRegistrationReceipt = () => join6(claudeSetupDir(), "claude-registration.json");
|
|
1231
|
+
var hermesConfig = () => join6(homedir4(), ".hermes", "config.yaml");
|
|
1232
|
+
var hermesConfigReceipt = () => join6(pusharyDir(), "setup", "hermes-config.json");
|
|
1233
|
+
var hermesSetupReceipt = () => join6(pusharyDir(), "setup", "hermes-plugin.json");
|
|
1234
|
+
var hermesAppWiringRecord = () => join6(pusharyDir(), "setup", "hermes-wired-by-mac-app");
|
|
1235
|
+
var fxQuestionRuleReceipt = () => join6(pusharyDir(), "setup", "fx-question-rule.json");
|
|
1236
|
+
var hookTakeoverReceipt = (agent) => join6(agent === "claude_code" ? claudeSetupDir() : join6(pusharyDir(), "setup"), `hook-takeover-${agent}.json`);
|
|
1237
|
+
var codexSkillDir2 = () => join6(codexHome(), "skills", "pushary");
|
|
1238
|
+
var codexAgentsMd2 = () => join6(codexHome(), "AGENTS.md");
|
|
1239
|
+
var geminiSettings = () => join6(homedir4(), ".gemini", "settings.json");
|
|
1240
|
+
var geminiMd = () => join6(homedir4(), ".gemini", "GEMINI.md");
|
|
1241
|
+
var pusharyConfigFile = () => join6(homedir4(), ".pushary", "config.json");
|
|
1242
|
+
var fxConfigDir = () => join6(homedir4(), ".fx");
|
|
1243
|
+
var fxMcpProfile = () => join6(fxConfigDir(), "mcp.json");
|
|
1244
|
+
var fxSettings = () => join6(fxConfigDir(), "settings.json");
|
|
1245
|
+
var fxAgentsMd = () => join6(fxConfigDir(), "AGENTS.md");
|
|
1246
|
+
var clineLocation = () => ({ home: homedir4(), environment: process.env });
|
|
1115
1247
|
var clineMcpSettings = () => clineMcpSettingsPath(clineLocation());
|
|
1116
1248
|
var clineRules = () => clineRulesFile(clineLocation());
|
|
1117
1249
|
|
|
1118
1250
|
export {
|
|
1119
1251
|
claudeConfigDir,
|
|
1120
1252
|
claudeUserConfigFile,
|
|
1121
|
-
HOOK_SHELL,
|
|
1122
1253
|
holdBudgetOf,
|
|
1254
|
+
hookCommandTokens,
|
|
1255
|
+
executableFileName,
|
|
1256
|
+
parseHookArgv,
|
|
1257
|
+
parseHookCommand,
|
|
1123
1258
|
hookBinaryNameOf,
|
|
1259
|
+
hookExecutableName,
|
|
1124
1260
|
guardBinary,
|
|
1125
1261
|
guardBinaryRefusing,
|
|
1126
1262
|
guardNodeScript,
|
|
@@ -1143,6 +1279,7 @@ export {
|
|
|
1143
1279
|
codexAgentsMd,
|
|
1144
1280
|
codexSkillDir,
|
|
1145
1281
|
CODEX_HOOK_EVENTS,
|
|
1282
|
+
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
1146
1283
|
CODEX_REQUIRED_APPROVAL_EVENTS,
|
|
1147
1284
|
codexMcpMixesCommandWithHttp,
|
|
1148
1285
|
CODEX_RESTART_AFTER_TRANSPORT_CHANGE,
|
|
@@ -1153,6 +1290,7 @@ export {
|
|
|
1153
1290
|
codexRegistrationHolder,
|
|
1154
1291
|
addCodexHooks,
|
|
1155
1292
|
removeCodexHooks,
|
|
1293
|
+
codexHooksFeatureDisabled,
|
|
1156
1294
|
hasCodexHooks,
|
|
1157
1295
|
missingCodexHookEvents,
|
|
1158
1296
|
codexHookPositions,
|
|
@@ -1164,6 +1302,14 @@ export {
|
|
|
1164
1302
|
removeCodexHookTrust,
|
|
1165
1303
|
removeCodexSettings,
|
|
1166
1304
|
addCodexHookTrust,
|
|
1305
|
+
resolveBridgeStub,
|
|
1306
|
+
NO_SPOTLIGHT,
|
|
1307
|
+
bridgeResolvesToApp,
|
|
1308
|
+
installedBridgeBundleRoots,
|
|
1309
|
+
macAppBridgeIsInstalled,
|
|
1310
|
+
describeBridgeResolution,
|
|
1311
|
+
isBridgeLocator,
|
|
1312
|
+
liveBridgeProbe,
|
|
1167
1313
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
1168
1314
|
IDLE_PROMPT_NOTIFICATION,
|
|
1169
1315
|
NOTIFICATION_PUSH_TYPES,
|
|
@@ -1230,6 +1376,8 @@ export {
|
|
|
1230
1376
|
vscodePluginMcp,
|
|
1231
1377
|
claudeSettingsLocal,
|
|
1232
1378
|
pusharyDir,
|
|
1379
|
+
bridgeStub,
|
|
1380
|
+
bridgeCache,
|
|
1233
1381
|
claudeMcpReceipt,
|
|
1234
1382
|
bridgeAgentKey,
|
|
1235
1383
|
autoUpdateState,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_CODE_AGENT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KHZCJP7P.js";
|
|
4
4
|
import {
|
|
5
5
|
addGeminiMcpServer,
|
|
6
6
|
removeGeminiMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MFJHLVIZ.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-76JOLPST.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-JCSJEMTA.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-O5TB2LMQ.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -308,6 +308,7 @@ var removeCompatibleMcpServer = (config, profile) => {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
export {
|
|
311
|
+
parseConfigDocument,
|
|
311
312
|
readConfigDocument,
|
|
312
313
|
serializeConfigDocument,
|
|
313
314
|
hasCompatibleMcpServer,
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-76JOLPST.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LMDXQIYT.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,35 +39,35 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-IAASPG5B.js";
|
|
43
43
|
import {
|
|
44
44
|
withRetry
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PFZCLG55.js";
|
|
46
46
|
import {
|
|
47
47
|
getMachineId
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-I3IUS4SR.js";
|
|
49
49
|
import {
|
|
50
50
|
reportedInstallSource
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-Z5FV7LTD.js";
|
|
52
52
|
import {
|
|
53
53
|
IDLE_PROMPT_NOTIFICATION,
|
|
54
54
|
NOTIFICATION_PUSH_TYPES,
|
|
55
55
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
56
56
|
canonicalJson,
|
|
57
57
|
claudeConfigDir
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-JCSJEMTA.js";
|
|
59
59
|
import {
|
|
60
60
|
compareVersion,
|
|
61
61
|
parseVersion
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZCBTCW3T.js";
|
|
63
63
|
import {
|
|
64
64
|
getApiKey,
|
|
65
65
|
getBaseUrl
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GKCDMAUM.js";
|
|
67
67
|
import {
|
|
68
68
|
writeFileAtomic,
|
|
69
69
|
writeJsonAtomicDurable
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
71
71
|
import {
|
|
72
72
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
73
73
|
COMMAND_RECOVERY,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
resolveAutoResolveOrigin,
|
|
89
89
|
resolvePolicy,
|
|
90
90
|
unansweredRefusalReason
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
92
92
|
|
|
93
93
|
// src/pending.ts
|
|
94
94
|
import { join } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DH22FQAS.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-YPY4YCIZ.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-YU2EUD7O.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YDQ6OJMF.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3IUS4SR.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GKCDMAUM.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-YU2EUD7O.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|