@pushary/agent-hooks 1.9.6 → 1.9.8
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 +19 -0
- package/README.md +3 -3
- package/data/cursor-plugin/README.md +3 -7
- package/data/vscode-plugin/README.md +1 -1
- package/dist/bin/pushary-bell-hook.js +22 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +98 -76
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +32 -33
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +24 -21
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +51 -38
- package/dist/bin/pushary-disconnect.js +187 -52
- package/dist/bin/pushary-doctor.js +68 -56
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +30 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +105 -42
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +28 -31
- package/dist/bin/pushary-notification-hook.js +26 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- package/dist/bin/pushary-permission-denied-hook.js +30 -32
- package/dist/bin/pushary-permission-hook.js +29 -31
- package/dist/bin/pushary-post-hook.js +26 -28
- package/dist/bin/pushary-prompt-hook.js +26 -28
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +98 -106
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -18
- package/dist/bin/pushary-stop-hook.js +26 -28
- package/dist/bin/pushary-stopfailure-hook.js +26 -28
- package/dist/bin/pushary-suggestions.js +19 -21
- package/dist/bin/pushary-transcript-register.js +18 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +67 -31
- package/dist/bin/pushary-wait.js +23 -19
- package/dist/bin/pushary.js +15 -14
- package/dist/{chunk-BSZ7VBVT.js → chunk-2A53H4S6.js} +17 -15
- package/dist/{chunk-D7SOOVHX.js → chunk-2QGYMY7A.js} +83 -3
- package/dist/{chunk-SVTHEMM3.js → chunk-2QTO5YIT.js} +6 -6
- package/dist/{chunk-WN6WYUCV.js → chunk-2VZAALEJ.js} +5 -9
- package/dist/chunk-2WXF3QJR.js +49 -0
- package/dist/{chunk-UKNKYTTY.js → chunk-3I6IVOZV.js} +3 -3
- package/dist/chunk-3Z3A37WD.js +77 -0
- package/dist/{chunk-2QRE6QH2.js → chunk-5QUPKDI5.js} +1 -1
- package/dist/chunk-6TE27XZR.js +69 -0
- package/dist/{chunk-L6USMDTW.js → chunk-7DVNSQWF.js} +59 -15
- package/dist/{chunk-SNJ3BOCP.js → chunk-7PT35RY2.js} +27 -8
- package/dist/{chunk-CBVDW2N6.js → chunk-B64KHETR.js} +3 -3
- package/dist/chunk-BEJRK4DF.js +94 -0
- package/dist/chunk-BXET3ALR.js +46 -0
- package/dist/{chunk-DJ4BB264.js → chunk-CD47ZFFZ.js} +1 -1
- package/dist/{chunk-FBD3QGVJ.js → chunk-CKV3UPMU.js} +2 -2
- package/dist/{chunk-7JTVYR5B.js → chunk-CLOSJ4ES.js} +1 -1
- package/dist/{chunk-DA4FTGTK.js → chunk-DKMD6AWR.js} +4 -4
- package/dist/{chunk-SPXBXN23.js → chunk-DL7XWKYV.js} +7 -5
- package/dist/{chunk-VRT3EEZN.js → chunk-DPGSLWOS.js} +8 -8
- package/dist/{chunk-3BUAEQCY.js → chunk-DUZVXBBU.js} +1 -1
- package/dist/{chunk-6GERGJHF.js → chunk-EUW7JL2K.js} +0 -32
- package/dist/{chunk-75CA37FZ.js → chunk-FQ2GORVG.js} +2 -2
- package/dist/{chunk-WUKUXICK.js → chunk-HRULIYDU.js} +2 -2
- package/dist/{chunk-Q4E56K4X.js → chunk-I5IJRMNV.js} +78 -8
- package/dist/{chunk-MKJ3RTUS.js → chunk-I6MJXLMY.js} +2 -2
- package/dist/{chunk-YPXUD6DW.js → chunk-IAD2RT4L.js} +14 -14
- package/dist/{chunk-LBLCFD5K.js → chunk-IHFDPV7C.js} +2 -2
- package/dist/{chunk-BVCHY4OY.js → chunk-IHO3YQAN.js} +2 -2
- package/dist/{chunk-RDK7FX5F.js → chunk-KF3UZLYI.js} +1 -1
- package/dist/chunk-KFF7G225.js +599 -0
- package/dist/{chunk-TE5M6GGK.js → chunk-KHNFLYJO.js} +204 -28
- package/dist/{chunk-CCDVL63C.js → chunk-KRCR2CRQ.js} +9 -9
- package/dist/{chunk-ZC3TF4LR.js → chunk-LKLVTG3V.js} +18 -9
- package/dist/{chunk-4QKM44N6.js → chunk-LWOO567I.js} +4 -3
- package/dist/{chunk-KK54WQ74.js → chunk-M6BZZFVQ.js} +1 -1
- package/dist/{chunk-RIC6OOJX.js → chunk-MFF3ONG5.js} +21 -1
- package/dist/{chunk-IMGJYFCX.js → chunk-MGRFDGWU.js} +3 -2
- package/dist/{chunk-ZPW4MJOV.js → chunk-MKTJEXZ3.js} +3 -3
- package/dist/{chunk-2I23NFVT.js → chunk-MXHTGVFZ.js} +52 -9
- package/dist/{chunk-5BHROGRB.js → chunk-N4QSPI3B.js} +54 -5
- package/dist/{chunk-DGQTJDSJ.js → chunk-NWDG3MSW.js} +1 -1
- package/dist/chunk-OP7IHC2I.js +24 -0
- package/dist/{chunk-EVFY3VE6.js → chunk-QOLITCIP.js} +1 -1
- package/dist/{chunk-W4Q7NFXU.js → chunk-TCQ43LSG.js} +3 -3
- package/dist/chunk-TCWKTUAE.js +50 -0
- package/dist/{chunk-EZAFBC2C.js → chunk-V5HPPF3E.js} +8 -4
- package/dist/{chunk-Q23MMVTD.js → chunk-WG3K4TCH.js} +1 -1
- package/dist/{chunk-F56SB65Y.js → chunk-WS4H76EP.js} +2 -2
- package/dist/{chunk-HWQNQVY6.js → chunk-WWOHTTVP.js} +2 -2
- package/dist/{chunk-NVGDMTX3.js → chunk-YIG2R3BJ.js} +9 -7
- package/dist/{chunk-HJXZJF6O.js → chunk-ZBHUHJG6.js} +4 -4
- package/dist/{chunk-5AXCOTIT.js → chunk-ZBK6E2OR.js} +1 -1
- package/dist/{chunk-5PMTC2CB.js → chunk-ZN3C6GBG.js} +84 -673
- package/dist/{chunk-GQHZIBAZ.js → chunk-ZSTSEBG7.js} +1 -1
- package/dist/{chunk-PYZC54KA.js → chunk-ZW3XZLJC.js} +61 -17
- package/dist/{global-upgrade-7F5RP45B.js → global-upgrade-I56HNM23.js} +6 -6
- package/dist/{paths-MELXIVBO.js → paths-AGY43CXS.js} +2 -2
- package/dist/reapply-IA5XUKWW.js +57 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -20
- package/dist/{upgrade-lock-AHRBA66K.js → upgrade-lock-B34TAUKV.js} +5 -3
- package/package.json +1 -1
- package/dist/chunk-HT3WMM6Q.js +0 -44
- package/dist/chunk-IR5FRUPQ.js +0 -197
- package/dist/chunk-JUFKJCZG.js +0 -38
- package/dist/chunk-SJN22ADZ.js +0 -86
- package/dist/reapply-NOB2Q6C4.js +0 -35
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-D7SOOVHX.js";
|
|
4
|
-
import {
|
|
5
|
-
isProtectedByScope,
|
|
6
|
-
registerHookEntry
|
|
7
|
-
} from "./chunk-HJXZJF6O.js";
|
|
8
|
-
|
|
9
1
|
// src/skills-cli.ts
|
|
10
2
|
import { execSync } from "child_process";
|
|
11
3
|
var PUSHARY_SKILL_SOURCE = "Pushary/pushary-skill";
|
|
@@ -33,28 +25,6 @@ var installAgentSkill = async (request, effects) => {
|
|
|
33
25
|
return "packaged-copy";
|
|
34
26
|
};
|
|
35
27
|
|
|
36
|
-
// src/cursor-config.ts
|
|
37
|
-
var hookCommandOf = (entry) => {
|
|
38
|
-
const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
|
|
39
|
-
return typeof command === "string" ? command : "";
|
|
40
|
-
};
|
|
41
|
-
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
|
|
42
|
-
var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
|
|
43
|
-
var withoutPusharyCursorHooks = (hooks, scope) => {
|
|
44
|
-
let removed = 0;
|
|
45
|
-
const kept = {};
|
|
46
|
-
for (const [event, entries] of Object.entries(hooks)) {
|
|
47
|
-
if (!Array.isArray(entries)) {
|
|
48
|
-
kept[event] = entries;
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
const others = entries.filter((entry) => !isPusharyCursorEntry(entry) || isProtectedByScope(hookCommandOf(entry), scope));
|
|
52
|
-
removed += entries.length - others.length;
|
|
53
|
-
if (others.length > 0 || entries.length === 0) kept[event] = others;
|
|
54
|
-
}
|
|
55
|
-
return { hooks: kept, removed };
|
|
56
|
-
};
|
|
57
|
-
|
|
58
28
|
// src/cli/dry-run.ts
|
|
59
29
|
import { execFileSync } from "child_process";
|
|
60
30
|
import { rmSync, writeFileSync } from "fs";
|
|
@@ -92,8 +62,6 @@ export {
|
|
|
92
62
|
PUSHARY_SKILL_NAME,
|
|
93
63
|
installSkillViaSkillsCli,
|
|
94
64
|
installAgentSkill,
|
|
95
|
-
registerCursorGate,
|
|
96
|
-
withoutPusharyCursorHooks,
|
|
97
65
|
createGuards,
|
|
98
66
|
describeSetupSideEffects
|
|
99
67
|
};
|
|
@@ -154,6 +154,7 @@ var AGENTS = {
|
|
|
154
154
|
fx: {
|
|
155
155
|
...defaults,
|
|
156
156
|
label: "fx",
|
|
157
|
+
disconnectable: true,
|
|
157
158
|
connectVia: "Local MCP bridge",
|
|
158
159
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
159
160
|
capabilityNote: "fx has no hooks that other tools can register, so Pushary cannot answer fx's own approval prompts. Setup turns off fx's terminal question tool so fx's agent asks through Pushary. fx's full-access mode ignores that setting; there the agent is only instructed to ask through Pushary."
|
|
@@ -196,7 +197,7 @@ var AGENTS = {
|
|
|
196
197
|
connectVia: "Native hooks + MCP",
|
|
197
198
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
198
199
|
enforcementDetail: "Shell, writes and edits through native PreToolUse hooks, plus PermissionRequest, over Qoder's superset of the Claude Code event list.",
|
|
199
|
-
capabilityNote: "Qoder documents no user-level instructions file, so the proactive-ask block is not installed. Hooks and MCP are unaffected.
|
|
200
|
+
capabilityNote: "Qoder documents no user-level instructions file, so the proactive-ask block is not installed. Hooks and MCP are unaffected."
|
|
200
201
|
},
|
|
201
202
|
droid: {
|
|
202
203
|
...defaults,
|
|
@@ -262,10 +263,24 @@ var POLICY_AGENTS = [...Object.values(AGENTS).flatMap((agent) => agent.policyAge
|
|
|
262
263
|
var AGENT_LABELS_BY_TYPE = Object.fromEntries(
|
|
263
264
|
Object.entries(AGENTS).flatMap(([id, agent]) => agent.hasStoredIdentity ? [[id, agent.label]] : [])
|
|
264
265
|
);
|
|
265
|
-
var DISCONNECTABLE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.disconnectable ? [agent.hookSource] : []));
|
|
266
|
+
var DISCONNECTABLE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.disconnectable && agent.hookSource !== null ? [agent.hookSource] : []));
|
|
266
267
|
var REPO_AWARE_AGENTS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.repoAware ? [agent.policyAgent] : []));
|
|
267
268
|
var MANAGED_PROVIDERS = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.managedProvider ? [agent.hookSource] : []));
|
|
268
269
|
var BRIDGE_HOOK_SOURCES = Object.freeze(Object.values(AGENTS).flatMap((agent) => agent.bridged ? [agent.hookSource] : []));
|
|
270
|
+
var isAgentId = (value) => Object.keys(AGENTS).includes(value);
|
|
271
|
+
var isHooklessDisconnectableAgent = (value) => isAgentId(value) && AGENTS[value].disconnectable && AGENTS[value].hookSource === null;
|
|
272
|
+
var DISCONNECT_AGENT_IDS = Object.freeze([...DISCONNECTABLE_AGENTS, ...Object.keys(AGENTS).filter(isHooklessDisconnectableAgent)]);
|
|
273
|
+
var agentIdCalled = (name) => isAgentId(name) ? name : Object.keys(AGENTS).filter(isAgentId).find((id) => AGENTS[id].hookSource === name) ?? null;
|
|
274
|
+
var namesOfAgent = (id) => {
|
|
275
|
+
const source = AGENTS[id].hookSource;
|
|
276
|
+
return source === null ? [id] : [id, source];
|
|
277
|
+
};
|
|
278
|
+
var normalizeAgentId = (value, accepted) => {
|
|
279
|
+
const name = value.trim().toLowerCase();
|
|
280
|
+
const agent = agentIdCalled(name);
|
|
281
|
+
const names = agent === null ? [name] : namesOfAgent(agent);
|
|
282
|
+
return accepted.find((candidate) => names.includes(candidate)) ?? null;
|
|
283
|
+
};
|
|
269
284
|
|
|
270
285
|
// ../contracts/src/agent-wiring.ts
|
|
271
286
|
var COMPATIBLE_AGENT_TYPES = ["qwen_code", "codebuddy", "qoder", "droid", "devin"];
|
|
@@ -697,6 +712,45 @@ var clientContextHeaders = (source) => {
|
|
|
697
712
|
if (isClientPlatform(source.platform)) headers[CLIENT_CONTEXT_HEADERS.platform] = source.platform;
|
|
698
713
|
return headers;
|
|
699
714
|
};
|
|
715
|
+
var AGENT_SITE_REJECTION_REASONS = [
|
|
716
|
+
"pairing_user_blank",
|
|
717
|
+
"pairing_user_mismatch",
|
|
718
|
+
"site_header_blank",
|
|
719
|
+
"device_token_blank",
|
|
720
|
+
"device_token_too_long",
|
|
721
|
+
"device_not_found",
|
|
722
|
+
"not_site_member",
|
|
723
|
+
"sandbox_site",
|
|
724
|
+
"no_current_site"
|
|
725
|
+
];
|
|
726
|
+
var AUTH_REJECTION_REASONS = [
|
|
727
|
+
"malformed_key",
|
|
728
|
+
"unknown_key",
|
|
729
|
+
"expired_key",
|
|
730
|
+
"scope_denied",
|
|
731
|
+
"oauth_rejected",
|
|
732
|
+
"site_not_found",
|
|
733
|
+
...AGENT_SITE_REJECTION_REASONS
|
|
734
|
+
];
|
|
735
|
+
|
|
736
|
+
// ../contracts/src/declined-agents.ts
|
|
737
|
+
var DECLINED_AGENTS_FILE = "declined-agents.json";
|
|
738
|
+
var DECLINED_AGENTS_VERSION = 1;
|
|
739
|
+
var isDeclinableAgent = (value) => typeof value === "string" && HOOK_SOURCES.includes(value);
|
|
740
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
741
|
+
var canonicalAgents = (agents) => [...new Set(agents)].sort();
|
|
742
|
+
var parseDeclinedAgents = (value) => {
|
|
743
|
+
if (!isRecord(value) || value.version !== DECLINED_AGENTS_VERSION || !Array.isArray(value.agents)) return [];
|
|
744
|
+
return canonicalAgents(value.agents.filter(isDeclinableAgent));
|
|
745
|
+
};
|
|
746
|
+
var declinedAgentsDocument = (agents) => ({
|
|
747
|
+
version: DECLINED_AGENTS_VERSION,
|
|
748
|
+
agents: canonicalAgents(agents)
|
|
749
|
+
});
|
|
750
|
+
var serializeDeclinedAgents = (agents) => `${JSON.stringify(declinedAgentsDocument(agents), null, 2)}
|
|
751
|
+
`;
|
|
752
|
+
var withDeclinedAgent = (agents, agent) => canonicalAgents([...agents, agent]);
|
|
753
|
+
var withoutDeclinedAgent = (agents, agent) => agents.filter((candidate) => candidate !== agent);
|
|
700
754
|
|
|
701
755
|
// ../contracts/src/index.ts
|
|
702
756
|
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
@@ -854,7 +908,7 @@ var CURSOR_GATE_EVENTS = ["beforeShellExecution", "beforeMCPExecution", "preTool
|
|
|
854
908
|
var SUPPORT_EMAIL = "business@pushary.com";
|
|
855
909
|
var SUPPORT_DISCORD = "https://discord.gg/9v3VvUByrr";
|
|
856
910
|
var HOOK_LOCATOR_BINARY = "pushary-bridge";
|
|
857
|
-
var
|
|
911
|
+
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
858
912
|
var HOOK_BATCH_MAX_BYTES = 4 * 1024 * 1024;
|
|
859
913
|
var REPO_KEY_MAX_LENGTH = 200;
|
|
860
914
|
var WILDCARD_TOOL_PATTERN = "*";
|
|
@@ -2222,7 +2276,7 @@ var settingsPermissionList = (permissions, kind) => {
|
|
|
2222
2276
|
};
|
|
2223
2277
|
var boundedUnion = (lists) => [...new Set(lists.flat())].slice(0, MAX_AGENT_PERMISSION_RULES_PER_KIND);
|
|
2224
2278
|
var claudePermissionRulesFromSettings = (documents) => {
|
|
2225
|
-
const permissionBlocks = documents.flatMap((document) =>
|
|
2279
|
+
const permissionBlocks = documents.flatMap((document) => isRecord2(document) && isRecord2(document.permissions) ? [document.permissions] : []);
|
|
2226
2280
|
const collect = (kind) => boundedUnion(permissionBlocks.map((permissions) => settingsPermissionList(permissions, kind)));
|
|
2227
2281
|
return { allow: collect("allow"), ask: collect("ask"), deny: collect("deny") };
|
|
2228
2282
|
};
|
|
@@ -2443,6 +2497,10 @@ var claudeElicitationOutput = (event, action, content) => ({
|
|
|
2443
2497
|
}
|
|
2444
2498
|
});
|
|
2445
2499
|
var renderElicitationOutput = (event, action, content) => ELICITATION_EVENTS.includes(event) ? JSON.stringify(claudeElicitationOutput(event, action, content)) : void 0;
|
|
2500
|
+
var UNVERIFIABLE_APPROVAL_REASON = "Pushary could not create a verifiable approval. Retry the action.";
|
|
2501
|
+
var DECISION_STOP_REASON = "Approval was cancelled or became unavailable. Retry only after resolving it.";
|
|
2502
|
+
var WITHDRAWN_APPROVAL_REASON = "The phone question was withdrawn. Approve in the current client.";
|
|
2503
|
+
var claudeStoppedPreToolUseOutput = (reason) => stoppedOutput(claudePreToolUseOutput("deny", reason), reason);
|
|
2446
2504
|
var ELICITATION_ANSWERABLE_MODE = "form";
|
|
2447
2505
|
var ELICITATION_MIN_OPTIONS = 2;
|
|
2448
2506
|
var ELICITATION_MAX_MULTI_QUESTIONS = 4;
|
|
@@ -2635,16 +2693,16 @@ var globalInstallTarget = (owner, ownName) => {
|
|
|
2635
2693
|
return LEGACY_PACKAGE;
|
|
2636
2694
|
}
|
|
2637
2695
|
};
|
|
2638
|
-
var
|
|
2639
|
-
var declaresOwnershipProbe = (bin) =>
|
|
2696
|
+
var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2697
|
+
var declaresOwnershipProbe = (bin) => isRecord3(bin) && typeof bin[OWNERSHIP_PROBE_COMMAND] === "string";
|
|
2640
2698
|
var cliManifestName = (manifest) => {
|
|
2641
|
-
if (!
|
|
2699
|
+
if (!isRecord3(manifest) || !isCliPackageName(manifest.name) || !declaresOwnershipProbe(manifest.bin)) return void 0;
|
|
2642
2700
|
return manifest.name;
|
|
2643
2701
|
};
|
|
2644
2702
|
var classifyGlobalFolder = (name, read) => {
|
|
2645
2703
|
if (read.kind === "unreadable") return { kind: "unseen" };
|
|
2646
2704
|
const { manifest } = read;
|
|
2647
|
-
if (!
|
|
2705
|
+
if (!isRecord3(manifest) || cliManifestName(manifest) !== name) return { kind: "foreign" };
|
|
2648
2706
|
return { kind: "ours", installed: { name, version: typeof manifest.version === "string" ? manifest.version : void 0 } };
|
|
2649
2707
|
};
|
|
2650
2708
|
var classifyGlobalInstall = (installed, owner) => {
|
|
@@ -2735,6 +2793,8 @@ export {
|
|
|
2735
2793
|
DISCONNECTABLE_AGENTS,
|
|
2736
2794
|
REPO_AWARE_AGENTS,
|
|
2737
2795
|
MANAGED_PROVIDERS,
|
|
2796
|
+
DISCONNECT_AGENT_IDS,
|
|
2797
|
+
normalizeAgentId,
|
|
2738
2798
|
PHONE_ANSWERED_TOOLS,
|
|
2739
2799
|
canonicalToolName,
|
|
2740
2800
|
toToolLookup,
|
|
@@ -2760,7 +2820,13 @@ export {
|
|
|
2760
2820
|
isSetupConnectMode,
|
|
2761
2821
|
CLIENT_REPORT_PATH,
|
|
2762
2822
|
clientContextHeaders,
|
|
2823
|
+
DECLINED_AGENTS_FILE,
|
|
2824
|
+
parseDeclinedAgents,
|
|
2825
|
+
serializeDeclinedAgents,
|
|
2826
|
+
withDeclinedAgent,
|
|
2827
|
+
withoutDeclinedAgent,
|
|
2763
2828
|
normalizeKeyScope,
|
|
2829
|
+
isApprovalMode,
|
|
2764
2830
|
parseAgentQuestion,
|
|
2765
2831
|
parseAgentQuestions,
|
|
2766
2832
|
parseAgentQuestionAnswers,
|
|
@@ -2829,6 +2895,10 @@ export {
|
|
|
2829
2895
|
claudePermissionRequestOutput,
|
|
2830
2896
|
gateOutputFor,
|
|
2831
2897
|
renderElicitationOutput,
|
|
2898
|
+
UNVERIFIABLE_APPROVAL_REASON,
|
|
2899
|
+
DECISION_STOP_REASON,
|
|
2900
|
+
WITHDRAWN_APPROVAL_REASON,
|
|
2901
|
+
claudeStoppedPreToolUseOutput,
|
|
2832
2902
|
ELICITATION_ANSWERABLE_MODE,
|
|
2833
2903
|
readElicitationFields,
|
|
2834
2904
|
planElicitationAsk,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZBHUHJG6.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I5IJRMNV.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-U4TMAANR.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MKTJEXZ3.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FQ2GORVG.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7DVNSQWF.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-I5IJRMNV.js";
|
|
30
30
|
|
|
31
31
|
// src/reach.ts
|
|
32
32
|
var reachVerdict = (channels) => {
|
|
@@ -155,7 +155,7 @@ var describeVerifyOutcome = (outcome) => {
|
|
|
155
155
|
ok: false,
|
|
156
156
|
message: "Nothing to deliver to. Agents are configured; approvals will fall back to the terminal.",
|
|
157
157
|
next: [
|
|
158
|
-
"Run pushary
|
|
158
|
+
"Run pushary pair to pair your phone.",
|
|
159
159
|
"Then pushary doctor --roundtrip to test a synthetic question and answer."
|
|
160
160
|
]
|
|
161
161
|
};
|
|
@@ -165,7 +165,7 @@ var describeVerifyOutcome = (outcome) => {
|
|
|
165
165
|
message: `Delivered to ${plural2(outcome.recipients, "device")} on this site, none of them yours.`,
|
|
166
166
|
next: [
|
|
167
167
|
`Approvals for your agent would wake one of your ${plural2(outcome.otherMembers, "teammate")}.`,
|
|
168
|
-
"Run pushary
|
|
168
|
+
"Run pushary pair to pair your own phone."
|
|
169
169
|
]
|
|
170
170
|
};
|
|
171
171
|
case "unattributable":
|
|
@@ -174,7 +174,7 @@ var describeVerifyOutcome = (outcome) => {
|
|
|
174
174
|
message: `Delivered to ${plural2(outcome.recipients, "device")} on this site, and no way to tell whose.`,
|
|
175
175
|
next: [
|
|
176
176
|
"Browser subscriptions carry no owner, and this site has other members.",
|
|
177
|
-
"Install the Pushary app with pushary
|
|
177
|
+
"Install the Pushary app and pair it with pushary pair, or run pushary doctor --roundtrip to prove it reaches you."
|
|
178
178
|
]
|
|
179
179
|
};
|
|
180
180
|
case "error":
|
|
@@ -319,8 +319,8 @@ var describeRoundTripOutcome = (outcome) => {
|
|
|
319
319
|
ok: false,
|
|
320
320
|
message: "Nothing to ask. No phone or browser is connected to this site.",
|
|
321
321
|
next: [
|
|
322
|
-
"Run pushary
|
|
323
|
-
"Or pushary
|
|
322
|
+
"Run pushary pair to pair your phone.",
|
|
323
|
+
"Or pushary pair --app if you already have the Pushary app."
|
|
324
324
|
]
|
|
325
325
|
};
|
|
326
326
|
case "error":
|
|
@@ -538,14 +538,14 @@ var waitForDevice = async (apiKey, baseline) => {
|
|
|
538
538
|
consecutiveFailures = 0;
|
|
539
539
|
const channels = probe.status;
|
|
540
540
|
if (reachesYou(channels) || channels.webActive > baseline.webActive) {
|
|
541
|
-
stop(check, "Phone
|
|
541
|
+
stop(check, "Phone paired");
|
|
542
542
|
return { kind: "connected", channels };
|
|
543
543
|
}
|
|
544
544
|
await sleep(CONNECT_POLL_INTERVAL_MS);
|
|
545
545
|
}
|
|
546
546
|
stop(yellow("!"), "Didn't detect a connection yet");
|
|
547
547
|
console.log(` ${dim("Signed in on the app already? Open it and allow notifications.")}`);
|
|
548
|
-
console.log(` ${dim("Signing in alone does not
|
|
548
|
+
console.log(` ${dim("Signing in alone does not pair the phone. Then run")} ${cyan("pushary doctor")}${dim(".")}`);
|
|
549
549
|
return { kind: "timeout" };
|
|
550
550
|
} catch (err) {
|
|
551
551
|
stop(yellow("!"), `Couldn't check connection ${dim(`(${err instanceof Error ? err.message : "network error"})`)}`);
|
|
@@ -588,14 +588,14 @@ var connectDevice = async (apiKey, options = {}) => {
|
|
|
588
588
|
}
|
|
589
589
|
const site = await fetchSite(apiKey);
|
|
590
590
|
if (!site) {
|
|
591
|
-
console.log(` ${yellow("!")} Couldn't load your subscribe link.
|
|
591
|
+
console.log(` ${yellow("!")} Couldn't load your subscribe link. Pair your phone later at ${cyan("pushary.com/download")}.`);
|
|
592
592
|
return phoneFailure("no_subscribe_link");
|
|
593
593
|
}
|
|
594
594
|
console.log();
|
|
595
595
|
if (channels.site !== null && channels.site.otherMembers > 0 && channels.phoneReachable) {
|
|
596
596
|
printSiteOnlyWarning(channels);
|
|
597
597
|
} else {
|
|
598
|
-
console.log(` ${bold("
|
|
598
|
+
console.log(` ${bold("Pair your phone")}`);
|
|
599
599
|
if (channels.webDesktop > 0) {
|
|
600
600
|
console.log(` ${dim("A browser on this computer is subscribed, but no phone is connected yet.")}`);
|
|
601
601
|
}
|
|
@@ -727,7 +727,7 @@ var printConnectInstructions = async (apiKey) => {
|
|
|
727
727
|
}
|
|
728
728
|
const site = await fetchSite(apiKey);
|
|
729
729
|
const target = site?.subscribeUrl ?? "https://pushary.com/download";
|
|
730
|
-
console.log(` ${dim("
|
|
730
|
+
console.log(` ${dim("Pair your phone for push notifications at")} ${cyan(target)}`);
|
|
731
731
|
console.log(` ${dim("or get the Pushary app at")} ${cyan("https://pushary.com/download")}`);
|
|
732
732
|
return phoneFailure("no_device");
|
|
733
733
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readConfigFileKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N4QSPI3B.js";
|
|
4
4
|
|
|
5
5
|
// src/bell/fleet.ts
|
|
6
6
|
import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
|
|
@@ -141,7 +141,7 @@ var writeLastShown = (at) => {
|
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
var upgradeLine = (context) => ` ${context.liveAgents} agents running. A bell can't tell you which one needs you, and it can't reach your pocket.
|
|
144
|
-
pushary
|
|
144
|
+
pushary pair`;
|
|
145
145
|
var upgradeNotice = (context, deps = {}) => {
|
|
146
146
|
const env = deps.env ?? process.env;
|
|
147
147
|
if (env.PUSHARY_BELL_QUIET === "1" || env.PUSHARY_BELL_QUIET === "true") return null;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
permissionDeniedAction,
|
|
6
6
|
releaseThrottle,
|
|
7
7
|
reportEvent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KRCR2CRQ.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_SESSION
|
|
11
11
|
} from "./chunk-N6IOSZOE.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
machineDecisionFor,
|
|
14
14
|
shouldDeferToNativeMode,
|
|
15
15
|
wireVerdictFor
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I5IJRMNV.js";
|
|
17
17
|
|
|
18
18
|
// src/machine-decision-audit.ts
|
|
19
19
|
import { basename } from "path";
|