@pushary/agent-hooks 1.9.27 → 1.9.29
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 +11 -0
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -25
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +32 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +40 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +35 -35
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-QMMOVPUP.js → chunk-2FOAQ64R.js} +8 -8
- package/dist/{chunk-BZYYTJ65.js → chunk-2XM4TGIM.js} +4 -4
- package/dist/{chunk-W4LNR7LP.js → chunk-35CMXPES.js} +3 -3
- package/dist/{chunk-GORB726L.js → chunk-4DTKE3AS.js} +2 -2
- package/dist/{chunk-UQTQVH5X.js → chunk-5L7H32JK.js} +1 -1
- package/dist/{chunk-WGTD4NZV.js → chunk-62LJB5U3.js} +2 -2
- package/dist/{chunk-O2SMA3JN.js → chunk-7MYGOFVX.js} +4 -4
- package/dist/{chunk-VWTCGKMU.js → chunk-AVQ6ETA7.js} +1 -1
- package/dist/{chunk-LOVDPKUU.js → chunk-AZMHKUUU.js} +1 -1
- package/dist/{chunk-OPSLFAKF.js → chunk-BAVNBGH4.js} +39 -10
- package/dist/{chunk-TQE5VIDJ.js → chunk-BJMVQ6D5.js} +10 -9
- package/dist/{chunk-IOTR2VQN.js → chunk-BKOWTW5P.js} +4 -4
- package/dist/{chunk-5SKHXKIF.js → chunk-BP3WMLXJ.js} +5 -5
- package/dist/{chunk-MTODICDT.js → chunk-BUOLA2AM.js} +1 -1
- package/dist/{chunk-PQAA37YV.js → chunk-C2ZIVQ6W.js} +6 -6
- package/dist/{chunk-YTTPPJZW.js → chunk-CBOHZ6NY.js} +4 -4
- package/dist/{chunk-6CBKIF3S.js → chunk-CCI2UBYR.js} +3 -3
- package/dist/{chunk-TYPQUHIS.js → chunk-CJQEJWLU.js} +5 -5
- package/dist/{chunk-LUJAURFP.js → chunk-CPZZTS4I.js} +1 -1
- package/dist/{chunk-XESMYZLU.js → chunk-DQGM57ZW.js} +1 -1
- package/dist/{chunk-H2ZHGK4F.js → chunk-DUVHHQEL.js} +2 -2
- package/dist/{chunk-V6HQFOBS.js → chunk-EO2GYHWH.js} +3 -3
- package/dist/{chunk-HFGTWPAD.js → chunk-ETLVZHRG.js} +2 -2
- package/dist/{chunk-DY6AKR4W.js → chunk-G4X3Z3YS.js} +4 -4
- package/dist/{chunk-4LIOV4YP.js → chunk-GMVZYB3W.js} +3 -3
- package/dist/{chunk-ZWDXBLEZ.js → chunk-GVIPEBEL.js} +3 -3
- package/dist/{chunk-ZQZRBPTP.js → chunk-H7QTZTIE.js} +68 -10
- package/dist/{chunk-RZNJGCPR.js → chunk-IM73P6JT.js} +5 -5
- package/dist/{chunk-2NQHGDK5.js → chunk-IWPEAA2J.js} +1 -1
- package/dist/{chunk-YZ7D3P3M.js → chunk-JGDBHB6L.js} +2 -2
- package/dist/{chunk-CSXWXXFJ.js → chunk-KMTSU366.js} +1 -1
- package/dist/{chunk-4LO6OQZ4.js → chunk-L7PGUSAU.js} +1 -1
- package/dist/{chunk-5LLH2TBR.js → chunk-LRLF6PZ2.js} +1 -1
- package/dist/{chunk-5ZR7XFTB.js → chunk-LSB66XQC.js} +21 -13
- package/dist/{chunk-NK2URK5A.js → chunk-M2L4EHYW.js} +2 -2
- package/dist/{chunk-JK42X2VL.js → chunk-NRV5PIPA.js} +2 -2
- package/dist/{chunk-VGVMBY4V.js → chunk-OSVDGVLL.js} +18 -9
- package/dist/{chunk-LY3KHTHS.js → chunk-OUWDJIJF.js} +1 -1
- package/dist/{chunk-M463H5LN.js → chunk-PRVG3COH.js} +2 -2
- package/dist/{chunk-OXOT3CGW.js → chunk-PX4RRHEB.js} +4 -4
- package/dist/{chunk-Z5AAPX3O.js → chunk-QOMUEL44.js} +1 -1
- package/dist/{chunk-UWEDDQHU.js → chunk-S3DP6DCZ.js} +2 -2
- package/dist/{chunk-MDAJO2MP.js → chunk-SLKVEJLM.js} +5 -5
- package/dist/{chunk-MSKJRRHY.js → chunk-TILXDMUR.js} +3 -3
- package/dist/{chunk-TWCWRHNK.js → chunk-TJXCBTL4.js} +5 -5
- package/dist/{chunk-XTTMUQ4Z.js → chunk-TXKAPRIA.js} +1 -1
- package/dist/{chunk-KN5ULH4O.js → chunk-UM2HNUJA.js} +3 -3
- package/dist/{chunk-W4DFSUZG.js → chunk-UW37WHVP.js} +2 -2
- package/dist/{chunk-MRMIGVUI.js → chunk-WJUYWTNT.js} +1 -1
- package/dist/{chunk-E4NITECV.js → chunk-WLDFMVRY.js} +2 -2
- package/dist/{chunk-JXOCD4MG.js → chunk-XH7NMH3Q.js} +2 -2
- package/dist/{chunk-AT4URLSU.js → chunk-Y3OZ3CT6.js} +5 -5
- package/dist/{chunk-U4Q3AKLU.js → chunk-YFEHKEGQ.js} +1 -1
- package/dist/{chunk-SLW45RGY.js → chunk-Z2WS466S.js} +17 -16
- package/dist/{global-upgrade-FKQPJL5P.js → global-upgrade-ZPULZXOY.js} +6 -6
- package/dist/{paths-TU47TCRS.js → paths-Y7ZWWCFK.js} +2 -2
- package/dist/{reapply-CTJZBUJY.js → reapply-I4YMQP7F.js} +22 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-2SQCRMDL.js → upgrade-lock-IDAAFSH2.js} +3 -3
- package/package.json +1 -1
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M2L4EHYW.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-CJQEJWLU.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GMVZYB3W.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YFEHKEGQ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TXKAPRIA.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-H7QTZTIE.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7QTZTIE.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-ZPULZXOY.js");
|
|
399
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-IDAAFSH2.js");
|
|
400
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-Y7ZWWCFK.js");
|
|
401
401
|
let result = "skipped";
|
|
402
402
|
const install = async () => {
|
|
403
403
|
const platform = process.platform;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BP3WMLXJ.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom,
|
|
6
6
|
resolvePathBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
8
8
|
import {
|
|
9
9
|
HOOK_COMPATIBLE_PROFILES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H7QTZTIE.js";
|
|
11
11
|
|
|
12
12
|
// src/hermes-config.ts
|
|
13
13
|
import { execFileSync } from "child_process";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GMVZYB3W.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YFEHKEGQ.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-AQFEP65J.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TXKAPRIA.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor,
|
|
30
30
|
isRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-H7QTZTIE.js";
|
|
32
32
|
|
|
33
33
|
// src/daemon-lifecycle.ts
|
|
34
34
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WJUYWTNT.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QOMUEL44.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-H7QTZTIE.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GMVZYB3W.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QOMUEL44.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-FO3MDD26.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GVIPEBEL.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S3DP6DCZ.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QOMUEL44.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-H7QTZTIE.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S3DP6DCZ.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-AQFEP65J.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TXKAPRIA.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7QTZTIE.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TILXDMUR.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-35CMXPES.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TXKAPRIA.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -298,6 +298,7 @@ var normalizeAgentId = (value, accepted) => {
|
|
|
298
298
|
|
|
299
299
|
// ../contracts/src/agent-wiring.ts
|
|
300
300
|
var COMPATIBLE_AGENT_TYPES = ["qwen_code", "codebuddy", "qoder", "droid", "devin", "antigravity_cli"];
|
|
301
|
+
var isCompatibleAgentType = (value) => typeof value === "string" && COMPATIBLE_AGENT_TYPES.includes(value);
|
|
301
302
|
var CANONICAL_PATH_KEYS = ["file_path", "path", "notebook_path"];
|
|
302
303
|
var CANONICAL_COMMAND_KEYS = ["command"];
|
|
303
304
|
var SHELL_TOOLS = /* @__PURE__ */ new Set(["Bash", "PowerShell"]);
|
|
@@ -315,7 +316,34 @@ var withCanonicalInputKeys = (profile, toolInput) => {
|
|
|
315
316
|
return renamed.length === 0 ? toolInput : { ...toolInput, ...Object.fromEntries(renamed) };
|
|
316
317
|
};
|
|
317
318
|
var canonicalToolName = (profile, toolName) => profile.toolAliases[toolName] ?? toolName;
|
|
319
|
+
var TASK_OUTPUT_TOOL = "BashOutput";
|
|
320
|
+
var TASK_STOP_TOOL = "KillShell";
|
|
321
|
+
var BLANK_TASK_INPUT_TOOL = "TaskInput";
|
|
322
|
+
var SHELL_TOOL = "Bash";
|
|
323
|
+
var typesText = (value) => typeof value === "string" && value.trim().length > 0;
|
|
324
|
+
var taskIdOf = (control, toolInput) => typeof toolInput[control.taskKey] === "string" ? { task_id: toolInput[control.taskKey] } : {};
|
|
325
|
+
var typedIntoTask = (control, toolInput) => {
|
|
326
|
+
const text = toolInput[control.inputKey];
|
|
327
|
+
if (typesText(text)) return { tool: SHELL_TOOL, input: { command: text }, unreadable: false };
|
|
328
|
+
return {
|
|
329
|
+
tool: BLANK_TASK_INPUT_TOOL,
|
|
330
|
+
input: { ...taskIdOf(control, toolInput), input: typeof text === "string" ? text : "" },
|
|
331
|
+
unreadable: false
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
var taskControlLookup = (control, toolInput) => {
|
|
335
|
+
const action = toolInput[control.actionKey];
|
|
336
|
+
if (action === control.typingAction) return typedIntoTask(control, toolInput);
|
|
337
|
+
if (action === control.stopAction) return { tool: TASK_STOP_TOOL, input: taskIdOf(control, toolInput), unreadable: false };
|
|
338
|
+
if (typeof action === "string" && control.outputActions.includes(action)) {
|
|
339
|
+
return { tool: TASK_OUTPUT_TOOL, input: taskIdOf(control, toolInput), unreadable: false };
|
|
340
|
+
}
|
|
341
|
+
return { tool: control.name, input: toolInput, unreadable: false };
|
|
342
|
+
};
|
|
343
|
+
var controlsTasks = (profile, toolName) => profile.taskControl?.name === toolName ? profile.taskControl : void 0;
|
|
318
344
|
var toToolLookup = (profile, toolName, toolInput, resolvePath = (path) => path) => {
|
|
345
|
+
const taskControl = controlsTasks(profile, toolName);
|
|
346
|
+
if (taskControl) return taskControlLookup(taskControl, toolInput);
|
|
319
347
|
const tool = canonicalToolName(profile, toolName);
|
|
320
348
|
if (SHELL_TOOLS.has(tool)) {
|
|
321
349
|
const command = firstString(toolInput, [...profile.shellCommandKeys, ...CANONICAL_COMMAND_KEYS]);
|
|
@@ -453,7 +481,8 @@ var QWEN_CODE = {
|
|
|
453
481
|
instructions: { file: [".qwen", "QWEN.md"], label: "Qwen Code" },
|
|
454
482
|
permissionRuleFile: null,
|
|
455
483
|
configDirIsShared: false,
|
|
456
|
-
soleGate: null
|
|
484
|
+
soleGate: null,
|
|
485
|
+
taskControl: null
|
|
457
486
|
};
|
|
458
487
|
var CODEBUDDY = {
|
|
459
488
|
agentType: "codebuddy",
|
|
@@ -476,7 +505,8 @@ var CODEBUDDY = {
|
|
|
476
505
|
instructions: { file: [".codebuddy", "CODEBUDDY.md"], label: "CodeBuddy" },
|
|
477
506
|
permissionRuleFile: [".codebuddy", "settings.json"],
|
|
478
507
|
configDirIsShared: false,
|
|
479
|
-
soleGate: null
|
|
508
|
+
soleGate: null,
|
|
509
|
+
taskControl: null
|
|
480
510
|
};
|
|
481
511
|
var QODER = {
|
|
482
512
|
agentType: "qoder",
|
|
@@ -499,7 +529,8 @@ var QODER = {
|
|
|
499
529
|
instructions: null,
|
|
500
530
|
permissionRuleFile: null,
|
|
501
531
|
configDirIsShared: false,
|
|
502
|
-
soleGate: null
|
|
532
|
+
soleGate: null,
|
|
533
|
+
taskControl: null
|
|
503
534
|
};
|
|
504
535
|
var DROID = {
|
|
505
536
|
agentType: "droid",
|
|
@@ -527,7 +558,8 @@ var DROID = {
|
|
|
527
558
|
instructions: null,
|
|
528
559
|
permissionRuleFile: null,
|
|
529
560
|
configDirIsShared: false,
|
|
530
|
-
soleGate: null
|
|
561
|
+
soleGate: null,
|
|
562
|
+
taskControl: null
|
|
531
563
|
};
|
|
532
564
|
var DEVIN = {
|
|
533
565
|
agentType: "devin",
|
|
@@ -560,7 +592,17 @@ var DEVIN = {
|
|
|
560
592
|
instructions: null,
|
|
561
593
|
permissionRuleFile: null,
|
|
562
594
|
configDirIsShared: false,
|
|
563
|
-
soleGate: null
|
|
595
|
+
soleGate: null,
|
|
596
|
+
taskControl: null
|
|
597
|
+
};
|
|
598
|
+
var ANTIGRAVITY_TASK_CONTROL = {
|
|
599
|
+
name: "manage_task",
|
|
600
|
+
actionKey: "Action",
|
|
601
|
+
taskKey: "TaskId",
|
|
602
|
+
inputKey: "Input",
|
|
603
|
+
typingAction: "send_input",
|
|
604
|
+
outputActions: ["list", "status"],
|
|
605
|
+
stopAction: "kill"
|
|
564
606
|
};
|
|
565
607
|
var ANTIGRAVITY_CLI = {
|
|
566
608
|
agentType: "antigravity_cli",
|
|
@@ -599,8 +641,10 @@ var ANTIGRAVITY_CLI = {
|
|
|
599
641
|
file: [".gemini", "antigravity-cli", "settings.json"],
|
|
600
642
|
key: "toolPermission",
|
|
601
643
|
value: "always-proceed",
|
|
602
|
-
receipt: [".pushary", "setup", "antigravity-tool-permission.json"]
|
|
603
|
-
|
|
644
|
+
receipt: [".pushary", "setup", "antigravity-tool-permission.json"],
|
|
645
|
+
coveredTools: [ANTIGRAVITY_TASK_CONTROL.name]
|
|
646
|
+
},
|
|
647
|
+
taskControl: ANTIGRAVITY_TASK_CONTROL
|
|
604
648
|
};
|
|
605
649
|
var HOOK_COMPATIBLE_PROFILES = Object.freeze([QWEN_CODE, CODEBUDDY, QODER, DROID, DEVIN, ANTIGRAVITY_CLI]);
|
|
606
650
|
var hookCompatibleProfile = (agentType) => HOOK_COMPATIBLE_PROFILES.find((profile) => profile.agentType === agentType);
|
|
@@ -3452,7 +3496,10 @@ var isCodexCoordinationTool = (toolName) => CODEX_COORDINATION_TOOL_NAMES.has(to
|
|
|
3452
3496
|
var isNamedByARule = (rank) => rank !== void 0 && rank !== "wildcard";
|
|
3453
3497
|
var isSpecificArgumentRank = (rank) => rank === "exact" || rank === "prefix";
|
|
3454
3498
|
var shellReadOnlyFloorApplies = (toolName, arg, rank) => !isSpecificArgumentRank(rank) && toolName === "Bash" && typeof arg === "string" && isSafeReadOnlyCommand(arg);
|
|
3455
|
-
var
|
|
3499
|
+
var AGENT_TASK_CONTROL_TOOLS = [TASK_OUTPUT_TOOL, TASK_STOP_TOOL];
|
|
3500
|
+
var AGENT_TASK_CONTROL_TOOL_NAMES = new Set(AGENT_TASK_CONTROL_TOOLS);
|
|
3501
|
+
var readsOrStopsItsOwnWork = (toolName) => isCodexCoordinationTool(toolName) || AGENT_TASK_CONTROL_TOOL_NAMES.has(toolName);
|
|
3502
|
+
var coordinationFloorApplies = (toolName, rank) => readsOrStopsItsOwnWork(toolName) && !isNamedByARule(rank);
|
|
3456
3503
|
var POSIX_SHELL_TOOLS = /* @__PURE__ */ new Set(["Bash", "Monitor"]);
|
|
3457
3504
|
var argumentsAsWritten = (args) => ({ forms: args, hidesWhatItRuns: false });
|
|
3458
3505
|
var namesAnArgumentOf = (pattern, toolName) => pattern.startsWith(`${toolName}(`);
|
|
@@ -3688,6 +3735,7 @@ var agentPromptsBeforeAnEdit = ({ source, event, permissionMode }) => {
|
|
|
3688
3735
|
};
|
|
3689
3736
|
var editGoesToTheAgentsPrompt = (call, input, verdict) => agentPromptsBeforeAnEdit(call) && editAsksAtTheAgentsPrompt(input, verdict);
|
|
3690
3737
|
var SCOPE_BATCH_REASON = "This patch exceeds the agreed scope. Split it into single-file edits so each additional path can be approved.";
|
|
3738
|
+
var UNREADABLE_CALL_REASON = "Pushary could not read every target of this call. Use a supported command or a single-file edit.";
|
|
3691
3739
|
var unapprovedScopeReason = (scopeReason) => `${scopeReason}. Nobody approved this path, so the change was refused.`;
|
|
3692
3740
|
var NO_RESPONSE_REASON = "No response within timeout";
|
|
3693
3741
|
var codexRaisesItsOwnPrompts = (permissionMode) => permissionMode !== "bypassPermissions";
|
|
@@ -3700,8 +3748,11 @@ var codexUnansweredPreToolUse = (ask) => {
|
|
|
3700
3748
|
if (timeoutActionApplies(ask) && ask.timeoutAction === "deny") return CODEX_ASK_UNANSWERED;
|
|
3701
3749
|
return codexRaisesItsOwnPrompts(ask.permissionMode) ? CODEX_ASK_PASSES : CODEX_ASK_UNANSWERED;
|
|
3702
3750
|
};
|
|
3703
|
-
var
|
|
3704
|
-
var
|
|
3751
|
+
var HANDED_BACK_REASON = "Handling on your machine";
|
|
3752
|
+
var HAND_BACK_WITHOUT_A_PROMPT = { kind: "refuse", reason: NO_AGENT_PROMPT_REASON };
|
|
3753
|
+
var CODEX_HAND_BACK_REASON = "You chose to handle this on your machine, so it did not run. Ask Codex to run it again while you are at your computer, or run it yourself.";
|
|
3754
|
+
var CODEX_PRE_TOOL_USE_HAND_BACK = { kind: "refuse", reason: CODEX_HAND_BACK_REASON };
|
|
3755
|
+
var codexDeferredPreToolUse = () => ({ kind: "deny", reason: CODEX_PRE_TOOL_USE_HAND_BACK.reason });
|
|
3705
3756
|
var isScopeReason = (scopeReason) => typeof scopeReason === "string" && scopeReason.length > 0;
|
|
3706
3757
|
var scopeBreachReasonOf = (verdict) => verdict.kind === "gate" && isScopeReason(verdict.scopeReason) ? verdict.scopeReason : void 0;
|
|
3707
3758
|
var onlyCodexPreToolUseCanAsk = (verdict, permissionMode) => verdict.kind === "gate" && (scopeBreachReasonOf(verdict) !== void 0 || !codexRaisesItsOwnPrompts(permissionMode));
|
|
@@ -4256,8 +4307,12 @@ export {
|
|
|
4256
4307
|
MANAGED_PROVIDERS,
|
|
4257
4308
|
DISCONNECT_AGENT_IDS,
|
|
4258
4309
|
normalizeAgentId,
|
|
4310
|
+
isCompatibleAgentType,
|
|
4259
4311
|
PHONE_ANSWERED_TOOLS,
|
|
4260
4312
|
canonicalToolName,
|
|
4313
|
+
TASK_OUTPUT_TOOL,
|
|
4314
|
+
TASK_STOP_TOOL,
|
|
4315
|
+
BLANK_TASK_INPUT_TOOL,
|
|
4261
4316
|
toToolLookup,
|
|
4262
4317
|
SOLE_GATE_UNDECIDED_REASON,
|
|
4263
4318
|
SOLE_GATE_SUBSCRIPTION_REASON,
|
|
@@ -4354,10 +4409,13 @@ export {
|
|
|
4354
4409
|
resolveGate,
|
|
4355
4410
|
editGoesToTheAgentsPrompt,
|
|
4356
4411
|
SCOPE_BATCH_REASON,
|
|
4412
|
+
UNREADABLE_CALL_REASON,
|
|
4357
4413
|
unapprovedScopeReason,
|
|
4358
4414
|
NO_RESPONSE_REASON,
|
|
4359
4415
|
codexHasNoPromptOfItsOwn,
|
|
4360
4416
|
codexUnansweredPreToolUse,
|
|
4417
|
+
HANDED_BACK_REASON,
|
|
4418
|
+
HAND_BACK_WITHOUT_A_PROMPT,
|
|
4361
4419
|
codexDeferredPreToolUse,
|
|
4362
4420
|
scopeBreachReasonOf,
|
|
4363
4421
|
codexCallNeedsAPerson,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7MYGOFVX.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BKOWTW5P.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
readConfigFileKey,
|
|
14
14
|
readKeySource,
|
|
15
15
|
readMacAppKeyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GMVZYB3W.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TILXDMUR.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H7QTZTIE.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7QTZTIE.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2FOAQ64R.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BJMVQ6D5.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y3OZ3CT6.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-H7QTZTIE.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"];
|
|
@@ -68,33 +68,37 @@ var matches = (rule, source, event) => {
|
|
|
68
68
|
return (ruleSource === "*" || ruleSource === source) && (ruleEvent === "*" || ruleEvent === event);
|
|
69
69
|
};
|
|
70
70
|
var isAdmitted = (rules, source, event) => !rules.disabled.some((rule) => matches(rule, source, event));
|
|
71
|
-
var
|
|
71
|
+
var UNREADABLE = { kind: "unreadable" };
|
|
72
|
+
var UNKNOWN_AGENT = { kind: "unknown_agent" };
|
|
73
|
+
var readHookInputOutcome = async (source, fallbackEvent = "", stdin = process.stdin, parseInput) => {
|
|
72
74
|
if (source === null) {
|
|
73
75
|
writeDegraded("hook", {
|
|
74
76
|
reason: "unknown_agent",
|
|
75
77
|
fallback: "stood aside, so nothing is gated or reported for this call",
|
|
76
78
|
event: fallbackEvent
|
|
77
79
|
});
|
|
78
|
-
return
|
|
80
|
+
return UNKNOWN_AGENT;
|
|
79
81
|
}
|
|
80
82
|
let raw = "";
|
|
81
83
|
for await (const chunk of stdin) raw += chunk;
|
|
82
|
-
if (!raw.trim()) return
|
|
84
|
+
if (!raw.trim()) return UNREADABLE;
|
|
83
85
|
let parsed;
|
|
84
86
|
try {
|
|
85
87
|
parsed = JSON.parse(raw);
|
|
86
88
|
} catch {
|
|
87
|
-
return
|
|
89
|
+
return UNREADABLE;
|
|
88
90
|
}
|
|
89
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return
|
|
91
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return UNREADABLE;
|
|
90
92
|
const shaped = inClaudeShape(source, namedEvent(process.argv) ?? fallbackEvent, parsed);
|
|
91
93
|
const input = parseInput ? parseInput(shaped) : shaped;
|
|
92
|
-
if (input === null) return
|
|
94
|
+
if (input === null) return UNREADABLE;
|
|
93
95
|
const event = eventNameOf(input) ?? fallbackEvent;
|
|
94
|
-
if (!isAdmitted(readAdmissionRules(), source, event)) return
|
|
96
|
+
if (!isAdmitted(readAdmissionRules(), source, event)) return { kind: "not_admitted", input };
|
|
95
97
|
if (stdin === process.stdin) registerTranscript(source, input);
|
|
96
|
-
return input;
|
|
98
|
+
return { kind: "admitted", input };
|
|
97
99
|
};
|
|
100
|
+
var admittedInput = (read) => read.kind === "admitted" ? read.input : null;
|
|
101
|
+
var readHookInput = async (source, fallbackEvent = "", stdin = process.stdin, parseInput) => admittedInput(await readHookInputOutcome(source, fallbackEvent, stdin, parseInput));
|
|
98
102
|
var inClaudeShape = (source, event, parsed) => {
|
|
99
103
|
const profile = hookCompatibleProfileBySource(source);
|
|
100
104
|
return profile ? claudeShapedHookInput(profile.payload, event, parsed) : parsed;
|
|
@@ -107,8 +111,12 @@ var eventNameOf = (input) => {
|
|
|
107
111
|
function readToolHookInput(source, event, stdin = process.stdin) {
|
|
108
112
|
return readHookInput(source, event, stdin, parseToolHookInput);
|
|
109
113
|
}
|
|
114
|
+
function readToolHookCall(source, event, stdin = process.stdin) {
|
|
115
|
+
return readHookInputOutcome(source, event, stdin, parseToolHookInput);
|
|
116
|
+
}
|
|
110
117
|
|
|
111
118
|
export {
|
|
112
119
|
readHookInput,
|
|
113
|
-
readToolHookInput
|
|
120
|
+
readToolHookInput,
|
|
121
|
+
readToolHookCall
|
|
114
122
|
};
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7QTZTIE.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|