@pushary/agent-hooks 1.9.61 → 1.9.63
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 +14 -0
- package/README.md +1 -1
- package/dist/{api-LW3PJQYY.js → api-UHUUAONF.js} +14 -12
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-claude.js +35 -28
- package/dist/bin/pushary-clean.js +35 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +51 -38
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +14 -14
- package/dist/bin/pushary-connect.js +27 -27
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +39 -38
- package/dist/bin/pushary-disconnect.js +30 -29
- package/dist/bin/pushary-doctor.js +46 -44
- package/dist/bin/pushary-elicitation-hook.js +30 -28
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +38 -30
- package/dist/bin/pushary-hook.js +32 -31
- package/dist/bin/pushary-login.js +27 -15
- package/dist/bin/pushary-logout.js +28 -28
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +40 -31
- package/dist/bin/pushary-permission-denied-hook.js +31 -31
- package/dist/bin/pushary-permission-hook.js +30 -30
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +34 -33
- package/dist/bin/pushary-setup.js +115 -4205
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +62 -9
- package/dist/bin/pushary-upgrade.js +43 -41
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-ORX5BTV4.js → chunk-2MZ6ROWZ.js} +8 -6
- package/dist/{chunk-7BHI3PZN.js → chunk-3GVV7XVT.js} +1 -1
- package/dist/{chunk-GKFO5JLN.js → chunk-3QLFB2EY.js} +4 -4
- package/dist/{chunk-LBHJJEKT.js → chunk-4WFAP6QN.js} +10 -10
- package/dist/{chunk-PITQ5ZIQ.js → chunk-5JK3DQGZ.js} +2 -2
- package/dist/{chunk-CJ5TCFD4.js → chunk-5LOP4AVD.js} +3 -3
- package/dist/{chunk-ERK24P76.js → chunk-6Z2VR3BA.js} +4 -2
- package/dist/{chunk-K4MBKXAE.js → chunk-75ODMNOM.js} +1 -1
- package/dist/{chunk-YPD3MTFU.js → chunk-7GRQGXF4.js} +1 -1
- package/dist/{chunk-AXJLJJ3M.js → chunk-7NCLUA65.js} +99 -6
- package/dist/{chunk-YDR4BQ7R.js → chunk-AB3VAQ25.js} +3 -3
- package/dist/{chunk-2AELPDMT.js → chunk-BCVCUDFI.js} +16 -5
- package/dist/{chunk-RGSW36XH.js → chunk-BQFL2ECS.js} +3 -3
- package/dist/{chunk-BG4Y64FW.js → chunk-BUQU3OPX.js} +1 -1
- package/dist/{chunk-SHJVFW22.js → chunk-CLABCSZC.js} +4 -4
- package/dist/{chunk-4VRTSDGP.js → chunk-DMNLFWGY.js} +7 -108
- package/dist/{chunk-7MCCXE5Y.js → chunk-EHHTQURL.js} +5 -5
- package/dist/{chunk-XAO6EYGM.js → chunk-ELAK46NR.js} +26 -3
- package/dist/{chunk-JGQV4MDQ.js → chunk-EQ26IKZM.js} +6 -6
- package/dist/{chunk-VX2MJ4X7.js → chunk-FAF5AW3P.js} +9 -9
- package/dist/{chunk-XEJOPVCG.js → chunk-FEAGK25K.js} +1 -1
- package/dist/{chunk-GZCSWDAS.js → chunk-GNUARBRZ.js} +4 -4
- package/dist/{chunk-64S5PQBQ.js → chunk-GZS72NCF.js} +4 -4
- package/dist/{chunk-WFSGCFXQ.js → chunk-HAIXS4OX.js} +2 -6
- package/dist/{chunk-G36T5LAP.js → chunk-HOIO66DU.js} +3 -3
- package/dist/{chunk-ADR3KHOC.js → chunk-HZ72EMJE.js} +2 -2
- package/dist/{chunk-WN3RACVD.js → chunk-IOH2T3CB.js} +17 -3
- package/dist/chunk-KEPESIIR.js +4117 -0
- package/dist/{chunk-ZEWIMY63.js → chunk-KL76XWZ7.js} +1 -1
- package/dist/{chunk-IFPOHFDJ.js → chunk-KLZZI5TU.js} +1 -1
- package/dist/{chunk-ATKN4BJT.js → chunk-KUCL7ETL.js} +1 -1
- package/dist/{chunk-SFAP4AJY.js → chunk-L5CDGXPO.js} +3 -3
- package/dist/{chunk-GDKQUB52.js → chunk-LGZ545TA.js} +5 -5
- package/dist/{chunk-ZGU3NXL2.js → chunk-LTT54NOU.js} +8 -8
- package/dist/{chunk-MWLTTLPK.js → chunk-MK4USZYQ.js} +2 -2
- package/dist/{chunk-NKLNU577.js → chunk-MRCVYYPW.js} +3 -3
- package/dist/{chunk-7JXJJNQ5.js → chunk-OJEIS5L2.js} +1 -1
- package/dist/{chunk-ELLJPP6O.js → chunk-OP5IBEV7.js} +7 -3
- package/dist/{chunk-BQ2VV7LY.js → chunk-OU3BYBJ3.js} +2 -2
- package/dist/{chunk-6T5Z64KS.js → chunk-OW6VBXXI.js} +15 -15
- package/dist/{chunk-USE5IEEW.js → chunk-OY6Z4IKB.js} +1 -1
- package/dist/{chunk-O65F2IIN.js → chunk-P6RF4RQN.js} +6 -6
- package/dist/{chunk-4N5E4JNF.js → chunk-PIQ4HHA2.js} +5 -5
- package/dist/{chunk-7HDGH3Z2.js → chunk-PJ34FOIV.js} +4 -4
- package/dist/{chunk-DQLCFGHK.js → chunk-PXAOEFJZ.js} +17 -11
- package/dist/{chunk-P3VQH65N.js → chunk-QC2W42DE.js} +33 -20
- package/dist/{chunk-X3YKQJCZ.js → chunk-RAJ3QEIL.js} +1 -1
- package/dist/chunk-S2Z6VWHH.js +112 -0
- package/dist/{chunk-FUZ5VYWD.js → chunk-SARPHHTT.js} +1 -1
- package/dist/{chunk-BJTSKOH3.js → chunk-SKUSGWFK.js} +5 -5
- package/dist/{chunk-Y6Z7DA5Y.js → chunk-T3GHXR6N.js} +5 -5
- package/dist/{chunk-EUIPTDLX.js → chunk-T6XQNOZV.js} +22 -15
- package/dist/{chunk-RJHX66EY.js → chunk-TBKHQWIH.js} +16 -11
- package/dist/{chunk-CICLXLQN.js → chunk-TMGJAFSD.js} +4 -4
- package/dist/{chunk-Y5VKZNFN.js → chunk-V5W3CK7F.js} +2 -2
- package/dist/{chunk-GAMVAORR.js → chunk-V7N5NOZV.js} +4 -2
- package/dist/{chunk-33OOEVPG.js → chunk-VC3HFFMQ.js} +1 -1
- package/dist/{chunk-KPNZ7JUL.js → chunk-VDBXSUXP.js} +6 -6
- package/dist/{chunk-7BAO42UV.js → chunk-VFJSVPNL.js} +3 -3
- package/dist/{chunk-HUI4OE43.js → chunk-VHZAJ6IB.js} +3 -3
- package/dist/{chunk-QER5R7Z6.js → chunk-VN7XH6TU.js} +2 -2
- package/dist/{chunk-UADSXJZ4.js → chunk-WUOOZE5S.js} +2 -2
- package/dist/{chunk-LN7DE5LY.js → chunk-XBTWG2VL.js} +4 -4
- package/dist/{chunk-XV6S5PWW.js → chunk-XE5N352V.js} +1 -1
- package/dist/{chunk-SVQWHV65.js → chunk-XO3KAH7K.js} +1 -1
- package/dist/{chunk-BUZIEL7Y.js → chunk-YK6GR4GU.js} +2 -2
- package/dist/chunk-YMZOM6BD.js +216 -0
- package/dist/{codex-app-cards-switch-BD7LCI2I.js → codex-app-cards-switch-LXMAIOFB.js} +11 -11
- package/dist/{codex-desktop-launch-V5CASSBB.js → codex-desktop-launch-VE5RLFUU.js} +1 -1
- package/dist/{codex-session-launch-5PKFKUFD.js → codex-session-launch-XZZWXCPK.js} +18 -18
- package/dist/{config-AEKH7HGC.js → config-PPX25AV5.js} +3 -3
- package/dist/{global-upgrade-IUXJJDWF.js → global-upgrade-NRMHNLNU.js} +9 -9
- package/dist/{identity-YJIV2XTY.js → identity-ZFQR7JNW.js} +4 -4
- package/dist/{live-capabilities-QYFW5QAW.js → live-capabilities-SJRYRKNB.js} +4 -4
- package/dist/{paths-A5GAR5PL.js → paths-7VTVOQXJ.js} +3 -3
- package/dist/{reapply-BKJGICRJ.js → reapply-WOANOIRZ.js} +27 -26
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +21 -21
- package/dist/{upgrade-lock-DDB7WEWC.js → upgrade-lock-VAYJZVTB.js} +4 -4
- package/dist/{usage-HBDNFZ3O.js → usage-C4DIYUR6.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6FJ6CK32.js +0 -126
|
@@ -1,25 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentConfigError,
|
|
3
|
+
configFailureKind,
|
|
4
|
+
retryAgentCommand
|
|
5
|
+
} from "./chunk-S2Z6VWHH.js";
|
|
1
6
|
import {
|
|
2
7
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WUOOZE5S.js";
|
|
4
9
|
import {
|
|
5
10
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
NpmInstallError,
|
|
9
|
-
NpmMissingError,
|
|
10
|
-
NpmPermissionError
|
|
11
|
-
} from "./chunk-CJ5TCFD4.js";
|
|
11
|
+
} from "./chunk-IOH2T3CB.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeFileAtomic,
|
|
15
15
|
writeJsonAtomic
|
|
16
16
|
} from "./chunk-QENTGE75.js";
|
|
17
|
-
import {
|
|
18
|
-
NPX_LATEST_COMMAND
|
|
19
|
-
} from "./chunk-ERK24P76.js";
|
|
20
|
-
import {
|
|
21
|
-
readSetupAgentFailures
|
|
22
|
-
} from "./chunk-AXJLJJ3M.js";
|
|
23
17
|
|
|
24
18
|
// src/instruction-file.ts
|
|
25
19
|
import { accessSync, constants, existsSync, readFileSync, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -517,89 +511,6 @@ var fxIgnoresInstructionsFile = (path, fxDir) => {
|
|
|
517
511
|
}
|
|
518
512
|
};
|
|
519
513
|
|
|
520
|
-
// src/setup/config-write.ts
|
|
521
|
-
var AgentConfigWriteError = class extends Error {
|
|
522
|
-
constructor(error) {
|
|
523
|
-
super(error instanceof Error ? error.message : String(error), { cause: error });
|
|
524
|
-
this.name = "AgentConfigWriteError";
|
|
525
|
-
}
|
|
526
|
-
};
|
|
527
|
-
var writeSetupConfigFile = (path, content, mode = 384) => {
|
|
528
|
-
try {
|
|
529
|
-
writeFileAtomic(path, content, mode);
|
|
530
|
-
} catch (error) {
|
|
531
|
-
throw new AgentConfigWriteError(error);
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
var writeSetupConfigJson = (path, value, mode) => writeSetupConfigFile(path, `${JSON.stringify(value, null, 2)}
|
|
535
|
-
`, mode);
|
|
536
|
-
|
|
537
|
-
// src/setup/agent-failure.ts
|
|
538
|
-
var AgentConfigError = class extends Error {
|
|
539
|
-
kind;
|
|
540
|
-
filePath;
|
|
541
|
-
constructor(kind, filePath, message) {
|
|
542
|
-
super(message);
|
|
543
|
-
this.name = "AgentConfigError";
|
|
544
|
-
this.kind = kind;
|
|
545
|
-
this.filePath = filePath;
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
var configFailureKind = (readFailure) => readFailure === "unparseable" ? "config-unparseable" : "config-unreadable";
|
|
549
|
-
var AGENT_FAILURE_DETAILS = {
|
|
550
|
-
"not-wired": "reported success but its config is not there.",
|
|
551
|
-
"app-account-mismatch": "Pushary for Mac set it up with an account that does not match this setup, so it was left as it is."
|
|
552
|
-
};
|
|
553
|
-
var DESCRIBED_FAILURE_REMEDIES = {
|
|
554
|
-
"not-wired": "retry-agent",
|
|
555
|
-
"app-account-mismatch": "match-mac-account"
|
|
556
|
-
};
|
|
557
|
-
var describedAgentFailure = (agent, kind) => ({
|
|
558
|
-
agent,
|
|
559
|
-
kind,
|
|
560
|
-
detail: AGENT_FAILURE_DETAILS[kind],
|
|
561
|
-
remedy: DESCRIBED_FAILURE_REMEDIES[kind],
|
|
562
|
-
stage: kind === "not-wired" ? "hook-validation" : "account-check"
|
|
563
|
-
});
|
|
564
|
-
var NPM_PERMISSION_REMEDIES = {
|
|
565
|
-
"global-prefix": "fix-npm-prefix",
|
|
566
|
-
"file-in-use": "close-node-programs"
|
|
567
|
-
};
|
|
568
|
-
var remedyForError = (error) => {
|
|
569
|
-
if (error instanceof NpmMissingError) return "install-node";
|
|
570
|
-
if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
|
|
571
|
-
return "retry-agent";
|
|
572
|
-
};
|
|
573
|
-
var setupFailureDiagnostic = (error) => {
|
|
574
|
-
if (error instanceof AgentConfigError) return { stage: "config-read" };
|
|
575
|
-
if (error instanceof AgentConfigWriteError) return { stage: "config-write", diagnosticCode: "config-write-failed" };
|
|
576
|
-
if (error instanceof NpmMissingError) return { stage: "runtime-install", diagnosticCode: "npm-missing" };
|
|
577
|
-
if (error instanceof NpmPermissionError) {
|
|
578
|
-
return { stage: "runtime-install", diagnosticCode: error.kind === "global-prefix" ? "npm-global-prefix-denied" : "npm-file-in-use" };
|
|
579
|
-
}
|
|
580
|
-
if (error instanceof NpmInstallError) return { stage: "runtime-install", diagnosticCode: "npm-install-failed" };
|
|
581
|
-
return { stage: "unknown" };
|
|
582
|
-
};
|
|
583
|
-
var agentFailureFromError = (agent, error, describeError) => ({
|
|
584
|
-
agent,
|
|
585
|
-
kind: error instanceof AgentConfigError ? error.kind : "installer-error",
|
|
586
|
-
detail: describeError(error),
|
|
587
|
-
remedy: remedyForError(error),
|
|
588
|
-
...setupFailureDiagnostic(error)
|
|
589
|
-
});
|
|
590
|
-
var retryAgentCommand = (agent) => `${NPX_LATEST_COMMAND} setup --agents ${agent}`;
|
|
591
|
-
var takeOverHooksCommand = (agent) => `${retryAgentCommand(agent)} --take-over-hooks`;
|
|
592
|
-
var matchMacAccountStep = (agent, setupAccount) => `Sign Pushary for Mac into ${setupAccount ?? "this setup's account"}, or run ${takeOverHooksCommand(agent)}`;
|
|
593
|
-
var UNCHECKED_ACCOUNT = "an account that could not be checked";
|
|
594
|
-
var describeMacAccountMismatch = (mismatch) => [
|
|
595
|
-
`${mismatch.agentName}: Pushary for Mac uses ${mismatch.macAccount ?? UNCHECKED_ACCOUNT}. This setup uses ${mismatch.setupAccount ?? UNCHECKED_ACCOUNT}.`,
|
|
596
|
-
matchMacAccountStep(mismatch.agent, mismatch.setupAccount)
|
|
597
|
-
];
|
|
598
|
-
var REMAINING_AGENTS_CONTINUE = "Other agents will continue. Re-run setup to retry.";
|
|
599
|
-
var afterAgentFailureNote = (agentsStillToSetUp) => agentsStillToSetUp > 0 ? REMAINING_AGENTS_CONTINUE : null;
|
|
600
|
-
var failedAgentsContext = (configuredAgentNames) => configuredAgentNames.length > 0 ? `(configured: ${configuredAgentNames.join(", ")})` : null;
|
|
601
|
-
var agentFailureWire = (failures) => readSetupAgentFailures(failures);
|
|
602
|
-
|
|
603
514
|
// src/fx-lifecycle.ts
|
|
604
515
|
import { existsSync as existsSync3 } from "fs";
|
|
605
516
|
import { join } from "path";
|
|
@@ -741,18 +652,6 @@ export {
|
|
|
741
652
|
withFxPusharyServer,
|
|
742
653
|
FX_QUESTION_TOOL,
|
|
743
654
|
fxIgnoresInstructionsFile,
|
|
744
|
-
writeSetupConfigFile,
|
|
745
|
-
writeSetupConfigJson,
|
|
746
|
-
AgentConfigError,
|
|
747
|
-
configFailureKind,
|
|
748
|
-
describedAgentFailure,
|
|
749
|
-
agentFailureFromError,
|
|
750
|
-
retryAgentCommand,
|
|
751
|
-
matchMacAccountStep,
|
|
752
|
-
describeMacAccountMismatch,
|
|
753
|
-
afterAgentFailureNote,
|
|
754
|
-
failedAgentsContext,
|
|
755
|
-
agentFailureWire,
|
|
756
655
|
readFxProfileForSetup,
|
|
757
656
|
writeFxProfile,
|
|
758
657
|
macAppFxBridge,
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HOIO66DU.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-4WFAP6QN.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IOH2T3CB.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-L5CDGXPO.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BUQU3OPX.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AB3VAQ25.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VFJSVPNL.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BUQU3OPX.js";
|
|
10
|
+
import {
|
|
11
|
+
isRecord,
|
|
12
|
+
isToolErrorResult,
|
|
13
|
+
toolFailureCodeOfResult
|
|
14
|
+
} from "./chunk-7NCLUA65.js";
|
|
10
15
|
|
|
11
16
|
// src/retry.ts
|
|
12
17
|
var isRetryable = (err) => {
|
|
@@ -49,6 +54,21 @@ var SubscriptionRequiredError = class extends Error {
|
|
|
49
54
|
this.upgradeUrl = upgradeUrl;
|
|
50
55
|
}
|
|
51
56
|
};
|
|
57
|
+
var McpToolError = class extends Error {
|
|
58
|
+
tool;
|
|
59
|
+
failure;
|
|
60
|
+
constructor(tool, failure, message) {
|
|
61
|
+
super(message);
|
|
62
|
+
this.name = "McpToolError";
|
|
63
|
+
this.tool = tool;
|
|
64
|
+
this.failure = failure;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var firstTextOf = (content) => {
|
|
68
|
+
const first = Array.isArray(content) ? content[0] : void 0;
|
|
69
|
+
return isRecord(first) && typeof first.text === "string" && first.text.length > 0 ? first.text : null;
|
|
70
|
+
};
|
|
71
|
+
var toolErrorOf = (toolName, result) => new McpToolError(toolName, toolFailureCodeOfResult(result), firstTextOf(result.content) ?? `Pushary ${toolName} failed`);
|
|
52
72
|
var parseSseMessages = (body) => {
|
|
53
73
|
const messages = [];
|
|
54
74
|
for (const event of body.split(/\r?\n\r?\n/)) {
|
|
@@ -124,6 +144,8 @@ var callMcpTool = async (apiKey, toolName, params, options = {}) => {
|
|
|
124
144
|
method: "tools/call",
|
|
125
145
|
params: { name: toolName, arguments: params }
|
|
126
146
|
}, options);
|
|
147
|
+
const result = data.result;
|
|
148
|
+
if (isToolErrorResult(result)) throw toolErrorOf(toolName, result);
|
|
127
149
|
const text = data.result?.content?.[0]?.text;
|
|
128
150
|
if (!text) throw new Error("Empty response from Pushary");
|
|
129
151
|
return JSON.parse(text);
|
|
@@ -133,6 +155,7 @@ export {
|
|
|
133
155
|
isRetryable,
|
|
134
156
|
withRetry,
|
|
135
157
|
SubscriptionRequiredError,
|
|
158
|
+
McpToolError,
|
|
136
159
|
parseSseMessages,
|
|
137
160
|
sendMcpRequest,
|
|
138
161
|
callMcpTool
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PIQ4HHA2.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HOIO66DU.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PJ34FOIV.js";
|
|
22
22
|
import {
|
|
23
23
|
EXIT
|
|
24
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
autoUpdateLock,
|
|
27
27
|
autoUpdateLog,
|
|
28
28
|
autoUpdateState
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MK4USZYQ.js";
|
|
30
30
|
import {
|
|
31
31
|
execNpm,
|
|
32
32
|
fetchLatestPublishedVersion,
|
|
33
33
|
npmErrorMessage,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5LOP4AVD.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-6Z2VR3BA.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateKeypair,
|
|
3
|
+
openSealedKey,
|
|
4
|
+
publicKeyFingerprint
|
|
5
|
+
} from "./chunk-3EGEA4KH.js";
|
|
1
6
|
import {
|
|
2
7
|
describeAppRepair,
|
|
3
8
|
describeJustPairedRepair,
|
|
@@ -7,12 +12,7 @@ import {
|
|
|
7
12
|
reachVerdict,
|
|
8
13
|
reachesYou,
|
|
9
14
|
verifyDelivery
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
generateKeypair,
|
|
13
|
-
openSealedKey,
|
|
14
|
-
publicKeyFingerprint
|
|
15
|
-
} from "./chunk-3EGEA4KH.js";
|
|
15
|
+
} from "./chunk-VHZAJ6IB.js";
|
|
16
16
|
import {
|
|
17
17
|
humanIsTty,
|
|
18
18
|
writeHuman
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
} from "./chunk-FO3MDD26.js";
|
|
25
25
|
import {
|
|
26
26
|
reportedInstallSource
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-V5W3CK7F.js";
|
|
28
28
|
import {
|
|
29
29
|
NPX_LATEST_COMMAND
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6Z2VR3BA.js";
|
|
31
31
|
import {
|
|
32
32
|
NO_PAIRING_COMPUTER,
|
|
33
33
|
PAIR_TTL_SECONDS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7NCLUA65.js";
|
|
35
35
|
|
|
36
36
|
// src/onboarding.ts
|
|
37
37
|
import qrcodeTerminal from "qrcode-terminal";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3QLFB2EY.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SKUSGWFK.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MK4USZYQ.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7NCLUA65.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HZ72EMJE.js";
|
|
6
6
|
import {
|
|
7
7
|
createIo
|
|
8
8
|
} from "./chunk-FO3MDD26.js";
|
|
9
9
|
import {
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IOH2T3CB.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AB3VAQ25.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BUQU3OPX.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -4,13 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-QENTGE75.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BUQU3OPX.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
|
|
12
|
-
// src/hooks-spec.ts
|
|
13
|
-
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
10
|
+
} from "./chunk-7NCLUA65.js";
|
|
14
11
|
|
|
15
12
|
// src/diagnostics/service-runtime.ts
|
|
16
13
|
var unescapeXml = (value) => value.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
@@ -69,7 +66,6 @@ var readSetupFailure = (path = failurePath()) => {
|
|
|
69
66
|
export {
|
|
70
67
|
saveSetupFailure,
|
|
71
68
|
readSetupFailure,
|
|
72
|
-
CURSOR_GATE_SCRIPT,
|
|
73
69
|
readServiceExecPath,
|
|
74
70
|
versionManagerOf,
|
|
75
71
|
describeVersionManagerPin
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OY6Z4IKB.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5LOP4AVD.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7NCLUA65.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IOH2T3CB.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6Z2VR3BA.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V5W3CK7F.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-QENTGE75.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BUQU3OPX.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7NCLUA65.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -304,6 +304,19 @@ var readTranscriptPreference = () => {
|
|
|
304
304
|
const value = readConfigRecord(configFilePath())?.transcriptsEnabled;
|
|
305
305
|
return typeof value === "boolean" ? value : null;
|
|
306
306
|
};
|
|
307
|
+
var settingsIn = (existing) => {
|
|
308
|
+
if (existing.kind === "missing") return {};
|
|
309
|
+
return existing.kind === "ok" && isRecord(existing.value) ? existing.value : null;
|
|
310
|
+
};
|
|
311
|
+
var writeTranscriptPreference = (enabled, configPath = configFilePath()) => {
|
|
312
|
+
const existing = readJsonSafe(configPath);
|
|
313
|
+
if (existing.kind === "unreadable") return { kind: "config_unreadable", configPath };
|
|
314
|
+
const current = settingsIn(existing);
|
|
315
|
+
if (current === null) return { kind: "config_malformed", configPath };
|
|
316
|
+
writeJsonAtomic(configPath, { ...current, transcriptsEnabled: enabled }, KEY_FILE_MODE);
|
|
317
|
+
restrictFile(configPath);
|
|
318
|
+
return { kind: "saved", configPath };
|
|
319
|
+
};
|
|
307
320
|
var readKeySource = () => {
|
|
308
321
|
const configPath = configFilePath();
|
|
309
322
|
const envKey = process.env.PUSHARY_API_KEY?.trim() || null;
|
|
@@ -365,6 +378,7 @@ export {
|
|
|
365
378
|
readConfigFileKey,
|
|
366
379
|
readControlMode,
|
|
367
380
|
readTranscriptPreference,
|
|
381
|
+
writeTranscriptPreference,
|
|
368
382
|
readKeySource,
|
|
369
383
|
readMacAppKeyPrefix,
|
|
370
384
|
isAdoptedMacAppKey,
|