pushary 1.9.43 → 1.9.45
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/README.md +1 -0
- package/dist/bin/pushary-bell-hook.js +26 -26
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-claude.js +33 -33
- package/dist/bin/pushary-clean.js +38 -38
- package/dist/bin/pushary-codex-bridge.js +22 -680
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.d.ts +1 -0
- package/dist/bin/pushary-codex-session.js +649 -0
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +27 -27
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +55 -55
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-doctor.js +84 -82
- package/dist/bin/pushary-elicitation-hook.js +26 -26
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +16 -16
- package/dist/bin/pushary-logout.js +27 -27
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +25 -25
- package/dist/bin/pushary-opencode-hook.js +28 -28
- package/dist/bin/pushary-permission-denied-hook.js +30 -30
- package/dist/bin/pushary-permission-hook.js +29 -29
- package/dist/bin/pushary-post-hook.js +25 -25
- package/dist/bin/pushary-prompt-hook.js +25 -25
- package/dist/bin/pushary-session-end-hook.js +25 -25
- package/dist/bin/pushary-session-start-hook.js +30 -30
- package/dist/bin/pushary-setup.js +164 -112
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -34
- package/dist/bin/pushary-stop-hook.js +25 -25
- package/dist/bin/pushary-stopfailure-hook.js +25 -25
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +41 -41
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -6
- package/dist/{chunk-HC4DQXAT.js → chunk-2DORVRDB.js} +2 -2
- package/dist/{chunk-C6QBNBL4.js → chunk-2FUHSKXH.js} +7 -7
- package/dist/{chunk-45W43U2Q.js → chunk-2SXXH6JY.js} +5 -5
- package/dist/{chunk-JE6GG3OV.js → chunk-335ZDJ7R.js} +1 -1
- package/dist/{chunk-S4QT3YFG.js → chunk-3PM62C2R.js} +15 -15
- package/dist/{chunk-Y3N3SYBX.js → chunk-46F4BRUQ.js} +1 -1
- package/dist/{chunk-W3BO56VE.js → chunk-4A6VUVXV.js} +1 -1
- package/dist/{chunk-LDCRV6HG.js → chunk-57M4ERJK.js} +2 -1
- package/dist/{chunk-IMD5FN6Y.js → chunk-5DCZL3BC.js} +3 -3
- package/dist/chunk-6JPDAUFP.js +866 -0
- package/dist/{chunk-H6V5S52A.js → chunk-6TYKZ4DN.js} +3 -3
- package/dist/{chunk-VQL62ECJ.js → chunk-7SGYCU5C.js} +1 -1
- package/dist/{chunk-SATOTPXW.js → chunk-7URSJMAB.js} +1 -1
- package/dist/{chunk-PIZ65U3D.js → chunk-ASK2MSD2.js} +5 -5
- package/dist/{chunk-SCYAXV7U.js → chunk-AUOSFZJ3.js} +7 -7
- package/dist/{chunk-LOUZNXTJ.js → chunk-BT57FUMT.js} +2 -2
- package/dist/{chunk-4T2TGP4T.js → chunk-CDERSTBO.js} +94 -7
- package/dist/{chunk-LAAOHBLO.js → chunk-CFMCV6Z7.js} +2 -2
- package/dist/{chunk-ENGASUEL.js → chunk-DSGB5JLG.js} +4 -4
- package/dist/{chunk-ZJXEQV3A.js → chunk-ECFEYB6Z.js} +1 -1
- package/dist/{chunk-CIERFMQT.js → chunk-EH5ZDG6V.js} +4 -4
- package/dist/{chunk-IDVKJICN.js → chunk-EKGQEDQ4.js} +3 -11
- package/dist/{chunk-GTOBOC6M.js → chunk-EWC4P4ZL.js} +1 -1
- package/dist/{chunk-F7SZ2RCK.js → chunk-FOUK4CBO.js} +4 -4
- package/dist/{chunk-LE2YVPAT.js → chunk-GQ5KCVGK.js} +11 -11
- package/dist/{chunk-YRE6GUFZ.js → chunk-GZSSAY6N.js} +75 -161
- package/dist/{chunk-LWW7SBK3.js → chunk-H4ODQD3Y.js} +2 -2
- package/dist/{chunk-O7ADPLBF.js → chunk-HHX6IRSH.js} +1 -1
- package/dist/{chunk-H64CU2VB.js → chunk-IFT3GU7Y.js} +2 -2
- package/dist/{chunk-FPJHS6PA.js → chunk-IKYI63RF.js} +6 -6
- package/dist/{chunk-S3OWTQ6Z.js → chunk-IOVJVGIT.js} +12 -5
- package/dist/{chunk-RXXKFM22.js → chunk-K7EGWMDU.js} +370 -138
- package/dist/{chunk-AVT7GPOF.js → chunk-KS7NA5CK.js} +10 -10
- package/dist/{chunk-A64UCGX3.js → chunk-N2K3BSCA.js} +5 -5
- package/dist/{chunk-ZORCUL3Z.js → chunk-NJN5NRHZ.js} +4 -4
- package/dist/{chunk-Q7CUTGT4.js → chunk-OHFC3GJY.js} +1 -1
- package/dist/{chunk-JW4S4O4W.js → chunk-P2F3JUFX.js} +4 -4
- package/dist/{chunk-C54VJJ37.js → chunk-PWUIPQ2I.js} +3 -3
- package/dist/{chunk-F5ALKPNS.js → chunk-QQXP3CQA.js} +1 -1
- package/dist/{chunk-EA5NWDK7.js → chunk-R7ZQHAVL.js} +29 -0
- package/dist/{chunk-V5SUKRRI.js → chunk-RBJWPUI6.js} +4 -4
- package/dist/{chunk-J6MVBWF2.js → chunk-RFQWB5ZV.js} +1 -1
- package/dist/{chunk-NKBAEGT7.js → chunk-S6EGJBI5.js} +1 -1
- package/dist/{chunk-53KLSE2F.js → chunk-SFQSOBLM.js} +3 -3
- package/dist/{chunk-MSUMSXTI.js → chunk-SIN7NJD7.js} +1 -1
- package/dist/{chunk-55FB6OSG.js → chunk-U45OINYS.js} +1 -1
- package/dist/{chunk-TH74SUVV.js → chunk-U6Z56IQS.js} +2 -2
- package/dist/{chunk-JJWG7CBT.js → chunk-VO6XI6AX.js} +3 -3
- package/dist/{chunk-VIVLJK3T.js → chunk-WDIX4XZH.js} +2 -2
- package/dist/{chunk-Y4VZYKSW.js → chunk-WM76AN4X.js} +11 -11
- package/dist/{chunk-NV2LARV4.js → chunk-WPPKXVV3.js} +2 -2
- package/dist/{chunk-VGPEXMYM.js → chunk-XFHISCJM.js} +42 -7
- package/dist/{chunk-C3RVRTHS.js → chunk-YK7FGPYS.js} +3 -3
- package/dist/{chunk-JB4JCGRW.js → chunk-YWIFK2UB.js} +2 -2
- package/dist/{chunk-O4SYJVAF.js → chunk-YXGWG5PO.js} +5 -5
- package/dist/{chunk-XLHFWG2E.js → chunk-ZSY6BWUD.js} +2 -2
- package/dist/{global-upgrade-FFWOHOJ4.js → global-upgrade-U6NWZA5W.js} +6 -6
- package/dist/{paths-Y2WPCM5Y.js → paths-IQTB3ZZI.js} +2 -2
- package/dist/{reapply-N3MV3CKD.js → reapply-LILGWJO3.js} +21 -21
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-ZXXNRH2P.js → upgrade-lock-2BVFIDU4.js} +3 -3
- package/package.json +5 -2
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
detectClaudeVersion
|
|
6
|
-
} from "./chunk-RIVNNBEK.js";
|
|
3
|
+
} from "./chunk-U6Z56IQS.js";
|
|
7
4
|
import {
|
|
8
5
|
OPENCODE_HOOK_BINARY,
|
|
9
6
|
agentHookOwner,
|
|
@@ -12,7 +9,7 @@ import {
|
|
|
12
9
|
openCodeHookArgv,
|
|
13
10
|
openCodePluginDir,
|
|
14
11
|
openCodeWired
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YXGWG5PO.js";
|
|
16
13
|
import {
|
|
17
14
|
addClaudeMcpServer,
|
|
18
15
|
addCompatibleHooks,
|
|
@@ -20,7 +17,7 @@ import {
|
|
|
20
17
|
addPusharyToolPermissions,
|
|
21
18
|
compatibleConfigFile,
|
|
22
19
|
hasCompatibleHooks
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RBJWPUI6.js";
|
|
24
21
|
import {
|
|
25
22
|
claudeUnprovenHolds,
|
|
26
23
|
claudeWired,
|
|
@@ -28,7 +25,7 @@ import {
|
|
|
28
25
|
codexWired,
|
|
29
26
|
geminiWired,
|
|
30
27
|
planHooks
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ASK2MSD2.js";
|
|
32
29
|
import {
|
|
33
30
|
CLAUDE_HOOK_BINARY,
|
|
34
31
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -39,7 +36,10 @@ import {
|
|
|
39
36
|
needsReregistration,
|
|
40
37
|
registrationSignatures,
|
|
41
38
|
supportedClaudeEvents
|
|
42
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5DCZL3BC.js";
|
|
40
|
+
import {
|
|
41
|
+
detectClaudeVersion
|
|
42
|
+
} from "./chunk-RIVNNBEK.js";
|
|
43
43
|
import {
|
|
44
44
|
formatVersion
|
|
45
45
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
resolveGlobalBinDir,
|
|
64
64
|
resolveGlobalBinary,
|
|
65
65
|
vscodePluginMcp
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-IOVJVGIT.js";
|
|
67
67
|
import {
|
|
68
68
|
readJsonSafe,
|
|
69
69
|
writeFileAtomic,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
HOOK_COMPATIBLE_PROFILES,
|
|
74
74
|
isCompatibleAgentType,
|
|
75
75
|
isRecord
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-K7EGWMDU.js";
|
|
77
77
|
|
|
78
78
|
// src/reapply.ts
|
|
79
79
|
import { dirname, join } from "path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P2F3JUFX.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FOUK4CBO.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-YK7FGPYS.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PWUIPQ2I.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-K7EGWMDU.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YXGWG5PO.js";
|
|
4
4
|
import {
|
|
5
5
|
grokHome
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RBJWPUI6.js";
|
|
7
7
|
import {
|
|
8
8
|
codexHomeFrom,
|
|
9
9
|
resolvePathBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IOVJVGIT.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_COMPATIBLE_PROFILES
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K7EGWMDU.js";
|
|
14
14
|
|
|
15
15
|
// src/hermes-config.ts
|
|
16
16
|
import { execFileSync } from "child_process";
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YWIFK2UB.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-YK7FGPYS.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PWUIPQ2I.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-EWC4P4ZL.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6TYKZ4DN.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K7EGWMDU.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readJsonSafe,
|
|
3
|
+
writeJsonAtomic
|
|
4
|
+
} from "./chunk-AQFEP65J.js";
|
|
5
|
+
import {
|
|
6
|
+
configFilePath
|
|
7
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
8
|
+
import {
|
|
9
|
+
readSetupOutcomeProperties
|
|
10
|
+
} from "./chunk-K7EGWMDU.js";
|
|
11
|
+
|
|
1
12
|
// src/hooks-spec.ts
|
|
2
13
|
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
3
14
|
|
|
@@ -39,7 +50,25 @@ var versionManagerOf = (execPath) => {
|
|
|
39
50
|
};
|
|
40
51
|
var describeVersionManagerPin = (execPath, manager) => `The background service is pinned to ${execPath}, which ${manager} manages. Switching Node versions strands it; run pushary daemon install afterwards.`;
|
|
41
52
|
|
|
53
|
+
// src/setup/failure-record.ts
|
|
54
|
+
import { dirname, join } from "path";
|
|
55
|
+
var failurePath = () => join(dirname(configFilePath()), "last-setup-failure.json");
|
|
56
|
+
var saveSetupFailure = (body, path = failurePath()) => {
|
|
57
|
+
const properties = readSetupOutcomeProperties(body);
|
|
58
|
+
if (properties.exitCode === null || properties.exitCode === 0) return;
|
|
59
|
+
writeJsonAtomic(path, { ...properties, recordedAt: (/* @__PURE__ */ new Date()).toISOString() }, 384);
|
|
60
|
+
};
|
|
61
|
+
var readSetupFailure = (path = failurePath()) => {
|
|
62
|
+
const result = readJsonSafe(path);
|
|
63
|
+
if (result.kind !== "ok" || typeof result.value !== "object" || result.value === null || Array.isArray(result.value)) return null;
|
|
64
|
+
const body = result.value;
|
|
65
|
+
if (!("recordedAt" in body) || typeof body.recordedAt !== "string" || body.recordedAt.length > 30 || !Number.isFinite(Date.parse(body.recordedAt))) return null;
|
|
66
|
+
return { ...readSetupOutcomeProperties({ ...body }), recordedAt: body.recordedAt };
|
|
67
|
+
};
|
|
68
|
+
|
|
42
69
|
export {
|
|
70
|
+
saveSetupFailure,
|
|
71
|
+
readSetupFailure,
|
|
43
72
|
CURSOR_GATE_SCRIPT,
|
|
44
73
|
readServiceExecPath,
|
|
45
74
|
versionManagerOf,
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5DCZL3BC.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GZSSAY6N.js";
|
|
11
11
|
import {
|
|
12
12
|
guardBinary,
|
|
13
13
|
guardBinaryRefusing,
|
|
14
14
|
holdBudgetOf,
|
|
15
15
|
isProtectedByScope,
|
|
16
16
|
registerHookEntry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IOVJVGIT.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
pusharyMissingReason,
|
|
26
26
|
refusalOutput,
|
|
27
27
|
withHookHoldBudget
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-K7EGWMDU.js";
|
|
29
29
|
|
|
30
30
|
// src/claude-config.ts
|
|
31
31
|
import { join } from "path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PWUIPQ2I.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6TYKZ4DN.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IOVJVGIT.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K7EGWMDU.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OHFC3GJY.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-57M4ERJK.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-K7EGWMDU.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IOVJVGIT.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-K7EGWMDU.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IKYI63RF.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-46F4BRUQ.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ECFEYB6Z.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RBJWPUI6.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -37,11 +37,10 @@ import {
|
|
|
37
37
|
readLastPrompt,
|
|
38
38
|
readLastUserPrompt,
|
|
39
39
|
recordBlockedActionHint,
|
|
40
|
-
repoKeyFor,
|
|
41
40
|
reportEvent,
|
|
42
41
|
scopePathFor,
|
|
43
42
|
settleQuestionsForToolUse
|
|
44
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-GZSSAY6N.js";
|
|
45
44
|
import {
|
|
46
45
|
askUser,
|
|
47
46
|
cancelQuestion,
|
|
@@ -50,21 +49,22 @@ import {
|
|
|
50
49
|
isDecisionStopped,
|
|
51
50
|
isLocalQuestionHandoff,
|
|
52
51
|
pollForAnswer,
|
|
52
|
+
repoKeyFor,
|
|
53
53
|
requestGate,
|
|
54
54
|
sendNotification,
|
|
55
55
|
waitForQuestion,
|
|
56
56
|
waitsForThePhone
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-CDERSTBO.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-4A6VUVXV.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-57M4ERJK.js";
|
|
68
68
|
import {
|
|
69
69
|
AGENT_QUESTION_STRATEGY,
|
|
70
70
|
AGENT_QUESTION_TOOL,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
resolveGate,
|
|
110
110
|
timeoutActionWithoutLocalPrompt,
|
|
111
111
|
unansweredRefusalReason
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-K7EGWMDU.js";
|
|
113
113
|
|
|
114
114
|
// src/claude-permission-rules.ts
|
|
115
115
|
import { readFileSync, statSync } from "fs";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IOVJVGIT.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K7EGWMDU.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BT57FUMT.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YK7FGPYS.js";
|
|
7
7
|
import {
|
|
8
|
+
NpmInstallError,
|
|
8
9
|
NpmMissingError,
|
|
9
10
|
NpmPermissionError
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IOVJVGIT.js";
|
|
11
12
|
import {
|
|
12
13
|
readJsonSafe,
|
|
13
14
|
writeFileAtomic,
|
|
@@ -15,7 +16,10 @@ import {
|
|
|
15
16
|
} from "./chunk-AQFEP65J.js";
|
|
16
17
|
import {
|
|
17
18
|
NPX_LATEST_COMMAND
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-57M4ERJK.js";
|
|
20
|
+
import {
|
|
21
|
+
readSetupAgentFailures
|
|
22
|
+
} from "./chunk-K7EGWMDU.js";
|
|
19
23
|
|
|
20
24
|
// src/instruction-file.ts
|
|
21
25
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -461,6 +465,23 @@ var fxIgnoresInstructionsFile = (path, fxDir) => {
|
|
|
461
465
|
}
|
|
462
466
|
};
|
|
463
467
|
|
|
468
|
+
// src/setup/config-write.ts
|
|
469
|
+
var AgentConfigWriteError = class extends Error {
|
|
470
|
+
constructor(error) {
|
|
471
|
+
super(error instanceof Error ? error.message : String(error), { cause: error });
|
|
472
|
+
this.name = "AgentConfigWriteError";
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
var writeSetupConfigFile = (path, content, mode = 384) => {
|
|
476
|
+
try {
|
|
477
|
+
writeFileAtomic(path, content, mode);
|
|
478
|
+
} catch (error) {
|
|
479
|
+
throw new AgentConfigWriteError(error);
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
var writeSetupConfigJson = (path, value, mode) => writeSetupConfigFile(path, `${JSON.stringify(value, null, 2)}
|
|
483
|
+
`, mode);
|
|
484
|
+
|
|
464
485
|
// src/setup/agent-failure.ts
|
|
465
486
|
var AgentConfigError = class extends Error {
|
|
466
487
|
kind;
|
|
@@ -485,7 +506,8 @@ var describedAgentFailure = (agent, kind) => ({
|
|
|
485
506
|
agent,
|
|
486
507
|
kind,
|
|
487
508
|
detail: AGENT_FAILURE_DETAILS[kind],
|
|
488
|
-
remedy: DESCRIBED_FAILURE_REMEDIES[kind]
|
|
509
|
+
remedy: DESCRIBED_FAILURE_REMEDIES[kind],
|
|
510
|
+
stage: kind === "not-wired" ? "hook-validation" : "account-check"
|
|
489
511
|
});
|
|
490
512
|
var NPM_PERMISSION_REMEDIES = {
|
|
491
513
|
"global-prefix": "fix-npm-prefix",
|
|
@@ -496,11 +518,22 @@ var remedyForError = (error) => {
|
|
|
496
518
|
if (error instanceof NpmPermissionError) return NPM_PERMISSION_REMEDIES[error.kind];
|
|
497
519
|
return "retry-agent";
|
|
498
520
|
};
|
|
521
|
+
var setupFailureDiagnostic = (error) => {
|
|
522
|
+
if (error instanceof AgentConfigError) return { stage: "config-read" };
|
|
523
|
+
if (error instanceof AgentConfigWriteError) return { stage: "config-write", diagnosticCode: "config-write-failed" };
|
|
524
|
+
if (error instanceof NpmMissingError) return { stage: "runtime-install", diagnosticCode: "npm-missing" };
|
|
525
|
+
if (error instanceof NpmPermissionError) {
|
|
526
|
+
return { stage: "runtime-install", diagnosticCode: error.kind === "global-prefix" ? "npm-global-prefix-denied" : "npm-file-in-use" };
|
|
527
|
+
}
|
|
528
|
+
if (error instanceof NpmInstallError) return { stage: "runtime-install", diagnosticCode: "npm-install-failed" };
|
|
529
|
+
return { stage: "unknown" };
|
|
530
|
+
};
|
|
499
531
|
var agentFailureFromError = (agent, error, describeError) => ({
|
|
500
532
|
agent,
|
|
501
533
|
kind: error instanceof AgentConfigError ? error.kind : "installer-error",
|
|
502
534
|
detail: describeError(error),
|
|
503
|
-
remedy: remedyForError(error)
|
|
535
|
+
remedy: remedyForError(error),
|
|
536
|
+
...setupFailureDiagnostic(error)
|
|
504
537
|
});
|
|
505
538
|
var retryAgentCommand = (agent) => `${NPX_LATEST_COMMAND} setup --agents ${agent}`;
|
|
506
539
|
var takeOverHooksCommand = (agent) => `${retryAgentCommand(agent)} --take-over-hooks`;
|
|
@@ -513,7 +546,7 @@ var describeMacAccountMismatch = (mismatch) => [
|
|
|
513
546
|
var REMAINING_AGENTS_CONTINUE = "Other agents will continue. Re-run setup to retry.";
|
|
514
547
|
var afterAgentFailureNote = (agentsStillToSetUp) => agentsStillToSetUp > 0 ? REMAINING_AGENTS_CONTINUE : null;
|
|
515
548
|
var failedAgentsContext = (configuredAgentNames) => configuredAgentNames.length > 0 ? `(configured: ${configuredAgentNames.join(", ")})` : null;
|
|
516
|
-
var agentFailureWire = (failures) => failures
|
|
549
|
+
var agentFailureWire = (failures) => readSetupAgentFailures(failures);
|
|
517
550
|
|
|
518
551
|
// src/fx-lifecycle.ts
|
|
519
552
|
import { existsSync as existsSync3 } from "fs";
|
|
@@ -644,6 +677,8 @@ export {
|
|
|
644
677
|
withFxPusharyServer,
|
|
645
678
|
FX_QUESTION_TOOL,
|
|
646
679
|
fxIgnoresInstructionsFile,
|
|
680
|
+
writeSetupConfigFile,
|
|
681
|
+
writeSetupConfigJson,
|
|
647
682
|
AgentConfigError,
|
|
648
683
|
configFailureKind,
|
|
649
684
|
describedAgentFailure,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CFMCV6Z7.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-EWC4P4ZL.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K7EGWMDU.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YK7FGPYS.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-57M4ERJK.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RBJWPUI6.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ASK2MSD2.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OHFC3GJY.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IOVJVGIT.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-AQFEP65J.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-K7EGWMDU.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-57M4ERJK.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K7EGWMDU.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readGlobalUpgradeSubject,
|
|
6
6
|
upgradeInstalledPackage,
|
|
7
7
|
withUpgradeLock
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2SXXH6JY.js";
|
|
9
|
+
import "./chunk-S6EGJBI5.js";
|
|
10
|
+
import "./chunk-IFT3GU7Y.js";
|
|
11
11
|
import "./chunk-POFBE6ZY.js";
|
|
12
12
|
import "./chunk-KZERVKTD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-IOVJVGIT.js";
|
|
14
14
|
import "./chunk-AQFEP65J.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-57M4ERJK.js";
|
|
16
|
+
import "./chunk-K7EGWMDU.js";
|
|
17
17
|
export {
|
|
18
18
|
finishGlobalUpgrade,
|
|
19
19
|
finishUpgradeWithLock,
|