@pushary/agent-hooks 1.9.57 → 1.9.59
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/dist/{api-RQAY3A5V.js → api-UVJGNZIF.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +49 -46
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.js +10 -8
- package/dist/bin/pushary-codex.js +14 -14
- package/dist/bin/pushary-connect.js +27 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +37 -37
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-doctor.js +41 -39
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +13 -13
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +28 -28
- 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 +33 -33
- package/dist/bin/pushary-setup.js +65 -268
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -30
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +13 -13
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +107 -58
- package/dist/bin/pushary-wait.js +13 -13
- package/dist/bin/pushary.js +7 -7
- package/dist/chunk-2FVP7WRP.js +378 -0
- package/dist/{chunk-W6363YYZ.js → chunk-2WMZDKPM.js} +8 -8
- package/dist/{chunk-N3NSWWNU.js → chunk-3N2ZTHZZ.js} +1 -1
- package/dist/{chunk-JCMSISCC.js → chunk-3NROUNIS.js} +2 -2
- package/dist/{chunk-7RZO6VWD.js → chunk-3RKIJM26.js} +2 -2
- package/dist/{chunk-Z7Q36I4K.js → chunk-4QF2YLYK.js} +11 -7
- package/dist/{chunk-LVDC3RUE.js → chunk-4XXZUFWN.js} +1 -1
- package/dist/{chunk-BAJ3A3BU.js → chunk-5BNXJTOZ.js} +5 -2
- package/dist/{chunk-A54W5A74.js → chunk-5EFNBL6V.js} +3 -3
- package/dist/{chunk-4YTFYILS.js → chunk-5JWCWALO.js} +9 -9
- package/dist/{chunk-3IBUZQKM.js → chunk-5O6D4J2K.js} +2 -2
- package/dist/{chunk-DDQRYX2L.js → chunk-5PP4455M.js} +3 -3
- package/dist/{chunk-NQDEMRAS.js → chunk-6ONSTCDJ.js} +5 -5
- package/dist/{chunk-ECJJKDP7.js → chunk-75UYYIFJ.js} +1 -1
- package/dist/{chunk-GZL3KEPC.js → chunk-762CDAJJ.js} +140 -136
- package/dist/{chunk-YKYVDHIY.js → chunk-AS4Z6KS4.js} +1 -1
- package/dist/{chunk-4YNNAF53.js → chunk-AY32RSUC.js} +2 -2
- package/dist/{chunk-I43PY5G3.js → chunk-BKVX53QR.js} +1 -1
- package/dist/{chunk-5SFM6XB4.js → chunk-BMPZ5HVJ.js} +2 -2
- package/dist/{chunk-7OQ4AJC7.js → chunk-BRUHVTFB.js} +2 -7
- package/dist/{chunk-OZSP4RIQ.js → chunk-CPRA7IEK.js} +174 -41
- package/dist/{chunk-C3IWX6KU.js → chunk-D6CXQIXO.js} +1 -1
- package/dist/{chunk-T45PAPOG.js → chunk-DK35M4TH.js} +5 -5
- package/dist/{chunk-K45CFSYV.js → chunk-DS7X36Z3.js} +4 -4
- package/dist/{chunk-IBSRULIY.js → chunk-EBQTWH5O.js} +10 -10
- package/dist/{chunk-OLNBYAPI.js → chunk-EHCIQA5D.js} +4 -4
- package/dist/{chunk-2NIRYGTK.js → chunk-IBXHVYN2.js} +2 -2
- package/dist/{chunk-HCIB4YNB.js → chunk-JAKBCKEB.js} +3 -3
- package/dist/{chunk-PZDMZ7LM.js → chunk-JBCMXSBO.js} +5 -5
- package/dist/{chunk-IRZ5FVWG.js → chunk-KAJDKYUM.js} +3 -3
- package/dist/{chunk-AN6TVB2H.js → chunk-KHDD74MK.js} +5 -5
- package/dist/{chunk-ZZB4J6CX.js → chunk-KQHY6L3X.js} +4 -4
- package/dist/{chunk-UPFFO4F6.js → chunk-KQWN7C5C.js} +4 -4
- package/dist/{chunk-D2EETYAL.js → chunk-KW3DED2A.js} +14 -369
- package/dist/{chunk-TWLWDIFB.js → chunk-KZCYHWDF.js} +4 -2
- package/dist/{chunk-RFAF3TOX.js → chunk-L3NVHPBU.js} +94 -15
- package/dist/{chunk-LVZYIUSR.js → chunk-LAEW5QQD.js} +1 -1
- package/dist/{chunk-SQ5G6A6K.js → chunk-M46WDK64.js} +1 -1
- package/dist/{chunk-LVWXRXT7.js → chunk-M6MOQBR5.js} +1 -1
- package/dist/{chunk-FBKVCODG.js → chunk-MA37WNVS.js} +3 -3
- package/dist/{chunk-XTZHUIGJ.js → chunk-MMLIQDTG.js} +1 -1
- package/dist/{chunk-CB565EVO.js → chunk-MSU3VKGJ.js} +2 -2
- package/dist/{chunk-ZU6L34DQ.js → chunk-MYU5D5VH.js} +4 -4
- package/dist/{chunk-WXZN5CS3.js → chunk-OZIXBN3O.js} +2 -2
- package/dist/{chunk-JSQOHMNJ.js → chunk-PVANKDWM.js} +1 -1
- package/dist/{chunk-JYXIARGW.js → chunk-RAMQBSVZ.js} +1 -1
- package/dist/{chunk-S5LX25XE.js → chunk-RQDP2SJY.js} +1 -1
- package/dist/{chunk-DS6OR5OS.js → chunk-SIU6OWA6.js} +6 -6
- package/dist/{chunk-QLDTBZBP.js → chunk-T65RIQK2.js} +6 -6
- package/dist/{chunk-2PJENKRJ.js → chunk-TCH5UCPR.js} +77 -30
- package/dist/{chunk-QQYUWTYS.js → chunk-TDOKDCFH.js} +3 -3
- package/dist/chunk-UFJS4RR7.js +266 -0
- package/dist/{chunk-AEXACKDR.js → chunk-US3IT6ZC.js} +3 -3
- package/dist/{chunk-4QD7VE4E.js → chunk-UTJ5465F.js} +2 -2
- package/dist/{chunk-M7NX25ZA.js → chunk-UVZK5LIK.js} +1 -1
- package/dist/{chunk-IUOUNRLH.js → chunk-V3PDUDPB.js} +2 -2
- package/dist/{chunk-K5SDLOFS.js → chunk-VAJHDTJX.js} +11 -11
- package/dist/{chunk-QTCFEKLJ.js → chunk-W47WL6JY.js} +1 -1
- package/dist/{chunk-6QM54CSJ.js → chunk-WW24SG27.js} +5 -5
- package/dist/{chunk-3TJLPABQ.js → chunk-WWAVHLGS.js} +3 -3
- package/dist/{chunk-CUEUANIU.js → chunk-X4ES7QBT.js} +5 -5
- package/dist/{chunk-XXNT4FGA.js → chunk-XGP5VSQG.js} +1 -1
- package/dist/{chunk-LW7IWGSV.js → chunk-YQVKG5MC.js} +5 -5
- package/dist/{codex-app-cards-switch-SVGTZ2UN.js → codex-app-cards-switch-N77RWKCO.js} +21 -19
- package/dist/{codex-desktop-launch-SH7OUEEC.js → codex-desktop-launch-KIX7OMTL.js} +3 -1
- package/dist/{codex-session-launch-IQ57OL3N.js → codex-session-launch-XV7SIIWP.js} +18 -18
- package/dist/{config-SYLUYZQE.js → config-HH4DYYNX.js} +3 -3
- package/dist/global-upgrade-YWIVJIUR.js +34 -0
- package/dist/{identity-6KRUO2YO.js → identity-4J7Y2MW3.js} +4 -4
- package/dist/{live-capabilities-RKUHAWT6.js → live-capabilities-LHZBCI5U.js} +4 -4
- package/dist/{paths-MUPQZNLG.js → paths-ES3V7BWQ.js} +5 -3
- package/dist/{reapply-YZXZCWCI.js → reapply-KA5SIYWX.js} +26 -26
- package/dist/src/index.js +21 -21
- package/dist/{upgrade-lock-JXP27UKI.js → upgrade-lock-TJPKU5HL.js} +4 -6
- package/dist/{usage-OUV76AIY.js → usage-7ALXBJVJ.js} +3 -3
- package/package.json +1 -1
- package/dist/global-upgrade-SRCWQE7N.js +0 -26
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import {
|
|
2
|
+
notificationAnswerStep
|
|
3
|
+
} from "./chunk-2FVP7WRP.js";
|
|
4
|
+
import {
|
|
5
|
+
matchMacAccountStep,
|
|
6
|
+
retryAgentCommand
|
|
7
|
+
} from "./chunk-6ONSTCDJ.js";
|
|
8
|
+
import {
|
|
9
|
+
EXIT
|
|
10
|
+
} from "./chunk-KZERVKTD.js";
|
|
11
|
+
import {
|
|
12
|
+
NPX_LATEST_COMMAND
|
|
13
|
+
} from "./chunk-BMPZ5HVJ.js";
|
|
14
|
+
|
|
15
|
+
// src/setup/closing.ts
|
|
16
|
+
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
17
|
+
var CHECK_THE_NOTIFICATION_OPENED = "Check the notification opened something you could tap, then:";
|
|
18
|
+
var SEND_ANOTHER_TEST = "pushary doctor --roundtrip send another one";
|
|
19
|
+
var sendAnotherTestLines = (appPlatforms) => {
|
|
20
|
+
const step = notificationAnswerStep(appPlatforms);
|
|
21
|
+
return step === null ? [CHECK_THE_NOTIFICATION_OPENED, SEND_ANOTHER_TEST] : [SEND_ANOTHER_TEST, step];
|
|
22
|
+
};
|
|
23
|
+
var TRANSCRIPT_SYNC_NOTICE = `Transcripts sync redacted and encrypted. Your phone can decrypt them; authorized Pushary compliance admins can recover them for documented legal obligations. Turn off: ${NPX_LATEST_COMMAND} setup --transcripts off`;
|
|
24
|
+
var PAIR_PHONE_APP_HINT = `${NPX_LATEST_COMMAND} setup --connect app pair the Pushary app on your phone`;
|
|
25
|
+
var RESTART_AGENTS_LINE = "Restart any open agent sessions so they pick up Pushary.";
|
|
26
|
+
var ANSWERING_DEVICES = {
|
|
27
|
+
mobile_app: "Your phone",
|
|
28
|
+
mobile_background: "Your phone",
|
|
29
|
+
mac_app: "Your Mac"
|
|
30
|
+
};
|
|
31
|
+
var SIMULATED_ANSWER_HEADLINE = "Agents configured. The test answer was simulated.";
|
|
32
|
+
var answerSeconds = (latencyMs) => Math.max(1, Math.round(latencyMs / 1e3));
|
|
33
|
+
var describeAnsweredHeadline = (answer) => {
|
|
34
|
+
if (!answer) return "You're set. The test question was answered.";
|
|
35
|
+
if (answer.answerSource === "sandbox") return SIMULATED_ANSWER_HEADLINE;
|
|
36
|
+
const device = answer.answerSource ? ANSWERING_DEVICES[answer.answerSource] : void 0;
|
|
37
|
+
const seconds = answerSeconds(answer.latencyMs);
|
|
38
|
+
return device ? `You're set. ${device} answered in ${seconds}s.` : `You're set. The test question was answered in ${seconds}s.`;
|
|
39
|
+
};
|
|
40
|
+
var COMMAND_SURFACE = [
|
|
41
|
+
{ command: "pushary status", summary: "what this machine is connected to" },
|
|
42
|
+
{ command: "pushary mode", summary: "choose where approval requests appear" },
|
|
43
|
+
{ command: "pushary wait", summary: "show or set how long approvals wait for your phone" },
|
|
44
|
+
{ command: "pushary stats", summary: "what your agents have been asking" },
|
|
45
|
+
{ command: "pushary claude", summary: "run Claude Code with encrypted transcript support" },
|
|
46
|
+
{ command: "pushary doctor", summary: "check the install" }
|
|
47
|
+
];
|
|
48
|
+
var SURFACE_COLUMN = Math.max(...COMMAND_SURFACE.map((entry) => entry.command.length)) + 2;
|
|
49
|
+
var renderCommandSurface = () => COMMAND_SURFACE.map((entry) => `${entry.command.padEnd(SURFACE_COLUMN)}${entry.summary}`);
|
|
50
|
+
var PHONE_START_VERIFIED_LINE = "Phone-start and steering: local and server checks passed just now. Recheck after sleep or network changes.";
|
|
51
|
+
var PHONE_START_UNVERIFIED_LINE = "Phone-start and steering: unverified. Run pushary doctor to check the provider, background service and server route.";
|
|
52
|
+
var PHONE_START_FELL_SHORT_LINES = {
|
|
53
|
+
not_running: "Phone-start and steering: not running on this computer. Approvals do not depend on it. Run pushary doctor to see what is missing.",
|
|
54
|
+
running_unverified: "Phone-start and steering: the background service is running, but this run could not verify it. Approvals do not depend on it. Run pushary doctor to check it.",
|
|
55
|
+
could_not_be_removed: "Phone-start and steering: the background service could not be stopped or removed. Approvals do not depend on it. Run pushary doctor to see its state."
|
|
56
|
+
};
|
|
57
|
+
var phoneStartFellShortLine = (service) => PHONE_START_FELL_SHORT_LINES[service];
|
|
58
|
+
var phoneStartServiceState = (reading) => {
|
|
59
|
+
if (reading.lifecycleFailed) return "could_not_be_removed";
|
|
60
|
+
return reading.serviceIsRunning ? "running_unverified" : "not_running";
|
|
61
|
+
};
|
|
62
|
+
var phoneStartStatusLine = (facts) => {
|
|
63
|
+
if (facts.managedControlReady === true) return PHONE_START_VERIFIED_LINE;
|
|
64
|
+
if (facts.daemonReady === false) return phoneStartFellShortLine(facts.phoneStartService ?? "not_running");
|
|
65
|
+
return PHONE_START_UNVERIFIED_LINE;
|
|
66
|
+
};
|
|
67
|
+
var phoneStartFailedTheRun = (facts) => facts.daemonReady === false && facts.phoneStartRequired !== false;
|
|
68
|
+
var PHONE_START_UNVERIFIED_STEPS = [
|
|
69
|
+
"Agent configuration and managed control are separate. Phone-start and steering could not be verified.",
|
|
70
|
+
"pushary daemon install install or repair the background service",
|
|
71
|
+
"pushary doctor verify it became reachable"
|
|
72
|
+
];
|
|
73
|
+
var PHONE_START_CANNOT_RUN_LINE = "Agent configuration and managed control are separate. Phone-start cannot run on this computer yet; approvals do not depend on it.";
|
|
74
|
+
var STOP_REQUIRING_PHONE_START_STEP = `${NPX_LATEST_COMMAND} setup --control off stop requiring phone-start on this computer`;
|
|
75
|
+
var WHAT_PHONE_START_NEEDS = {
|
|
76
|
+
provider: [
|
|
77
|
+
"It needs Claude Code, Codex or Gemini CLI set up here with a command it can start, and setup found none.",
|
|
78
|
+
"It looks for claude, codex and gemini on PATH and in npm's global folder, and for claude in Claude Code's own install folder too.",
|
|
79
|
+
"Install one, or open a terminal where it runs, then run setup again."
|
|
80
|
+
],
|
|
81
|
+
"service-manager": [
|
|
82
|
+
"It needs a background service manager (launchd, systemd --user or Windows Task Scheduler), and this session has none.",
|
|
83
|
+
"Run setup again from a normal desktop session."
|
|
84
|
+
]
|
|
85
|
+
};
|
|
86
|
+
var PHONE_START_NOT_REMOVED_STEPS = [
|
|
87
|
+
PHONE_START_FELL_SHORT_LINES.could_not_be_removed,
|
|
88
|
+
"pushary doctor see what state it is in"
|
|
89
|
+
];
|
|
90
|
+
var phoneStartProblemSteps = (facts) => {
|
|
91
|
+
if (facts.phoneStartService === "could_not_be_removed") return PHONE_START_NOT_REMOVED_STEPS;
|
|
92
|
+
const missing = facts.phoneStartMissingPrerequisite;
|
|
93
|
+
return missing ? [PHONE_START_CANNOT_RUN_LINE, ...WHAT_PHONE_START_NEEDS[missing], STOP_REQUIRING_PHONE_START_STEP] : PHONE_START_UNVERIFIED_STEPS;
|
|
94
|
+
};
|
|
95
|
+
var nextSteps = (facts, reachable) => {
|
|
96
|
+
const lines = ["Delivery follows the current approval mode, recipient rules and presence. pushary mode status shows the workspace setting.", phoneStartStatusLine(facts)];
|
|
97
|
+
lines.push("Before stepping away, run pushary wait to see how long phone approvals wait and what happens if you do not answer.");
|
|
98
|
+
if (facts.staleEnvironmentKey) {
|
|
99
|
+
lines.push("Open a new terminal or unset PUSHARY_API_KEY, then run pushary doctor before starting an agent.");
|
|
100
|
+
}
|
|
101
|
+
if (facts.transcriptSync === false) {
|
|
102
|
+
lines.push("Transcripts: disabled on this machine.");
|
|
103
|
+
lines.push("pushary setup --transcripts on enable encrypted transcript sync");
|
|
104
|
+
} else {
|
|
105
|
+
lines.push(TRANSCRIPT_SYNC_NOTICE);
|
|
106
|
+
}
|
|
107
|
+
if (facts.completed.includes("claude_code")) {
|
|
108
|
+
lines.push("pushary claude launch a managed Claude Code session");
|
|
109
|
+
}
|
|
110
|
+
if (!reachable) {
|
|
111
|
+
lines.push(PAIR_PHONE_APP_HINT);
|
|
112
|
+
}
|
|
113
|
+
lines.push("pushary doctor re-check everything");
|
|
114
|
+
return lines;
|
|
115
|
+
};
|
|
116
|
+
var describeClosing = (facts) => {
|
|
117
|
+
const reachable = facts.reachChecked && facts.reachesYou;
|
|
118
|
+
if (facts.configuredNothing) {
|
|
119
|
+
return {
|
|
120
|
+
ok: false,
|
|
121
|
+
headline: "Setup failed.",
|
|
122
|
+
next: ["Nothing was configured. Run pushary doctor to see why."],
|
|
123
|
+
exitCode: EXIT.FAILED,
|
|
124
|
+
reason: "configured-nothing"
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (facts.failed.length > 0) {
|
|
128
|
+
const count = facts.failed.length;
|
|
129
|
+
return {
|
|
130
|
+
ok: false,
|
|
131
|
+
headline: `Setup finished with ${count} problem${count === 1 ? "" : "s"}.`,
|
|
132
|
+
next: [
|
|
133
|
+
...nextSteps(facts, reachable),
|
|
134
|
+
"For support: pushary doctor --bundle creates a redacted diagnostic with the last setup failure. Review it before sharing.",
|
|
135
|
+
"",
|
|
136
|
+
`Approvals: ${ACTIVITY_URL}`
|
|
137
|
+
],
|
|
138
|
+
exitCode: EXIT.PROBLEMS_FOUND,
|
|
139
|
+
reason: "agents-failed"
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (facts.staleEnvironmentKey) {
|
|
143
|
+
return {
|
|
144
|
+
ok: false,
|
|
145
|
+
headline: "Agents configured. This terminal still selects the previous key.",
|
|
146
|
+
next: nextSteps(facts, reachable),
|
|
147
|
+
exitCode: EXIT.PROBLEMS_FOUND,
|
|
148
|
+
reason: "stale-environment-key"
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (phoneStartFailedTheRun(facts)) {
|
|
152
|
+
return {
|
|
153
|
+
ok: false,
|
|
154
|
+
headline: "Setup finished with 1 problem.",
|
|
155
|
+
next: phoneStartProblemSteps(facts),
|
|
156
|
+
exitCode: EXIT.PROBLEMS_FOUND,
|
|
157
|
+
reason: "control-unready"
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (facts.roundTripAnswered === true) {
|
|
161
|
+
return {
|
|
162
|
+
ok: true,
|
|
163
|
+
headline: describeAnsweredHeadline(facts.roundTripAnswer),
|
|
164
|
+
next: [RESTART_AGENTS_LINE, ...nextSteps(facts, reachable), "", `Approvals: ${ACTIVITY_URL}`],
|
|
165
|
+
exitCode: EXIT.OK,
|
|
166
|
+
reason: "synthetic-answer"
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
if (facts.reachChecked && !facts.reachesYou) {
|
|
170
|
+
return {
|
|
171
|
+
ok: false,
|
|
172
|
+
headline: "Agents configured. Phone delivery is unverified.",
|
|
173
|
+
next: [
|
|
174
|
+
"Your agent configuration is saved. Once your phone is connected, run pushary doctor --roundtrip to finish verification without reinstalling.",
|
|
175
|
+
"Approval routing depends on your mode, presence and recipients. Check the phone and its notification settings.",
|
|
176
|
+
"",
|
|
177
|
+
...nextSteps(facts, false)
|
|
178
|
+
],
|
|
179
|
+
exitCode: EXIT.NO_DEVICE,
|
|
180
|
+
reason: "phone-unverified"
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (facts.roundTripAnswered === false) {
|
|
184
|
+
return {
|
|
185
|
+
ok: false,
|
|
186
|
+
headline: "Agents configured. Nobody answered the test question.",
|
|
187
|
+
next: [
|
|
188
|
+
"No answer returned from the synthetic test. Delivery acceptance does not prove a visible notification.",
|
|
189
|
+
"",
|
|
190
|
+
...sendAnotherTestLines(facts.appPlatforms ?? []),
|
|
191
|
+
"",
|
|
192
|
+
"If you simply were not looking, re-run setup or pass --verify push to skip this check."
|
|
193
|
+
],
|
|
194
|
+
exitCode: EXIT.PROBLEMS_FOUND,
|
|
195
|
+
reason: "roundtrip-unanswered"
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (!facts.reachChecked) {
|
|
199
|
+
return {
|
|
200
|
+
ok: true,
|
|
201
|
+
headline: "Setup complete.",
|
|
202
|
+
next: [
|
|
203
|
+
"The phone check was skipped, so nothing here proves an approval reaches you.",
|
|
204
|
+
"",
|
|
205
|
+
...nextSteps(facts, false)
|
|
206
|
+
],
|
|
207
|
+
exitCode: EXIT.OK,
|
|
208
|
+
reason: "phone-skipped"
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
ok: true,
|
|
213
|
+
headline: "Setup complete.",
|
|
214
|
+
next: [...nextSteps(facts, true), "", `Approvals: ${ACTIVITY_URL}`],
|
|
215
|
+
exitCode: EXIT.OK,
|
|
216
|
+
reason: "complete"
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
var RETRY_AGENT_LABEL = "Retry just this agent:";
|
|
220
|
+
var INSTALL_NODE_STEP = "Install the current Node.js LTS, which includes npm, then run setup again.";
|
|
221
|
+
var NPM_PREFIX_STEP = "npm can't install globally here. Use nvm, or run: npm config set prefix ~/.npm-global, then run setup again.";
|
|
222
|
+
var NPM_FILE_IN_USE_STEP = "Close other terminals or editors that use Node, then run setup again.";
|
|
223
|
+
var nextStepFor = (failure) => {
|
|
224
|
+
switch (failure.remedy) {
|
|
225
|
+
case "install-node":
|
|
226
|
+
return { kind: "install-node", instruction: INSTALL_NODE_STEP };
|
|
227
|
+
case "fix-npm-prefix":
|
|
228
|
+
return { kind: "fix-npm-prefix", instruction: NPM_PREFIX_STEP };
|
|
229
|
+
case "close-node-programs":
|
|
230
|
+
return { kind: "close-node-programs", instruction: NPM_FILE_IN_USE_STEP };
|
|
231
|
+
case "match-mac-account":
|
|
232
|
+
return { kind: "match-mac-account", instruction: matchMacAccountStep(failure.agent, null) };
|
|
233
|
+
case "retry-agent":
|
|
234
|
+
return { kind: "retry-agent", command: retryAgentCommand(failure.agent) };
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
var describeAgentFailures = (failures, agentName) => failures.map((failure) => ({
|
|
238
|
+
summary: `${agentName(failure.agent)}: ${failure.detail}`,
|
|
239
|
+
next: nextStepFor(failure)
|
|
240
|
+
}));
|
|
241
|
+
var agentFailureFollowUps = (failures) => [
|
|
242
|
+
...failures.some((failure) => failure.remedy === "install-node") ? ["install-node"] : [],
|
|
243
|
+
...failures.some((failure) => failure.remedy === "fix-npm-prefix") ? ["fix-npm-prefix"] : [],
|
|
244
|
+
...failures.some((failure) => failure.remedy === "close-node-programs") ? ["close-node-programs"] : [],
|
|
245
|
+
...failures.some((failure) => failure.remedy === "retry-agent") ? ["run-doctor"] : []
|
|
246
|
+
];
|
|
247
|
+
var unverifiedKeyClosingReason = (facts) => {
|
|
248
|
+
if (facts.failedCount > 0) return "agents-failed";
|
|
249
|
+
if (facts.controlLifecycleFailed) return "control-unready";
|
|
250
|
+
return facts.keyCheck === "locked" ? "plan-inactive" : "key-unverified";
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
export {
|
|
254
|
+
TRANSCRIPT_SYNC_NOTICE,
|
|
255
|
+
renderCommandSurface,
|
|
256
|
+
phoneStartFellShortLine,
|
|
257
|
+
phoneStartServiceState,
|
|
258
|
+
describeClosing,
|
|
259
|
+
RETRY_AGENT_LABEL,
|
|
260
|
+
INSTALL_NODE_STEP,
|
|
261
|
+
NPM_PREFIX_STEP,
|
|
262
|
+
NPM_FILE_IN_USE_STEP,
|
|
263
|
+
describeAgentFailures,
|
|
264
|
+
agentFailureFollowUps,
|
|
265
|
+
unverifiedKeyClosingReason
|
|
266
|
+
};
|
|
@@ -360,9 +360,9 @@ var installGlobally = (options) => {
|
|
|
360
360
|
}
|
|
361
361
|
const started = (async () => {
|
|
362
362
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
363
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
364
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
365
|
-
const { autoUpdateLock } = await import("./paths-
|
|
363
|
+
const { withUpgradeLock } = await import("./global-upgrade-YWIVJIUR.js");
|
|
364
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-TJPKU5HL.js");
|
|
365
|
+
const { autoUpdateLock } = await import("./paths-ES3V7BWQ.js");
|
|
366
366
|
let result = "skipped";
|
|
367
367
|
const install = async () => {
|
|
368
368
|
const platform = process.platform;
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PVANKDWM.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3N2ZTHZZ.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-T65RIQK2.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RAMQBSVZ.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LAEW5QQD.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KQWN7C5C.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-5JWCWALO.js";
|
|
44
44
|
import {
|
|
45
45
|
repoKeyFor
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-XGP5VSQG.js";
|
|
47
47
|
import {
|
|
48
48
|
askUser,
|
|
49
49
|
cancelQuestion,
|
|
@@ -56,17 +56,17 @@ import {
|
|
|
56
56
|
sendNotification,
|
|
57
57
|
waitForQuestion,
|
|
58
58
|
waitsForThePhone
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-WW24SG27.js";
|
|
60
60
|
import {
|
|
61
61
|
getMachineId
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-M46WDK64.js";
|
|
63
63
|
import {
|
|
64
64
|
getApiKey,
|
|
65
65
|
getBaseUrl
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-4XXZUFWN.js";
|
|
67
67
|
import {
|
|
68
68
|
NPX_LATEST_COMMAND
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-BMPZ5HVJ.js";
|
|
70
70
|
import {
|
|
71
71
|
AGENT_QUESTION_STRATEGY,
|
|
72
72
|
AGENT_QUESTION_TOOL,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
resolveGate,
|
|
112
112
|
timeoutActionWithoutLocalPrompt,
|
|
113
113
|
unansweredRefusalReason
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-762CDAJJ.js";
|
|
115
115
|
|
|
116
116
|
// src/claude-permission-rules.ts
|
|
117
117
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SubscriptionRequiredError,
|
|
3
3
|
callMcpTool
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5EFNBL6V.js";
|
|
5
5
|
import {
|
|
6
6
|
CLIENT_REPORT_DISABLE_ENV,
|
|
7
7
|
isDisabledByEnv
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JAKBCKEB.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KZCYHWDF.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4XXZUFWN.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
CLIENT_REPORT_PATH,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
25
25
|
degradedLine,
|
|
26
26
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-762CDAJJ.js";
|
|
28
28
|
|
|
29
29
|
// src/api.ts
|
|
30
30
|
import { randomUUID } from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-75UYYIFJ.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-BMPZ5HVJ.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-762CDAJJ.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TDOKDCFH.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-75UYYIFJ.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AS4Z6KS4.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KZCYHWDF.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-762CDAJJ.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JBCMXSBO.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KQWN7C5C.js";
|
|
10
10
|
import {
|
|
11
11
|
codexHomeFrom
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KZCYHWDF.js";
|
|
13
13
|
import {
|
|
14
14
|
resolvePathBinary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-US3IT6ZC.js";
|
|
16
16
|
import {
|
|
17
17
|
HOOK_COMPATIBLE_PROFILES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-762CDAJJ.js";
|
|
19
19
|
|
|
20
20
|
// src/hermes-config.ts
|
|
21
21
|
import { execFileSync } from "child_process";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_APP_CARDS_DIRECTORY,
|
|
3
3
|
CODEX_APP_CARDS_LOGIN_ITEM,
|
|
4
|
+
cleanUpCodexAppCards,
|
|
5
|
+
cleanUpCodexAppCardsOnThisMac,
|
|
4
6
|
codexAppCardsCommand,
|
|
5
7
|
codexAppCardsCommandOnThisMac,
|
|
6
|
-
|
|
7
|
-
codexAppCardsFolderStaysOnThisMac,
|
|
8
|
+
codexAppCardsFolderInTheLastSweep,
|
|
8
9
|
codexAppCardsInstallation,
|
|
9
10
|
codexAppCardsLoginItem,
|
|
10
11
|
codexAppCardsLoginScript,
|
|
@@ -15,36 +16,37 @@ import {
|
|
|
15
16
|
codexAppCardsStatusLine,
|
|
16
17
|
rememberCodexAppCardsWereTurnedOff,
|
|
17
18
|
removeCodexAppCards,
|
|
18
|
-
removeCodexAppCardsFromThisMac,
|
|
19
19
|
runsFromATemporaryFolder,
|
|
20
20
|
setCodexAppLaunchAtLogin,
|
|
21
21
|
setCodexAppLaunchAtLoginOnThisMac,
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
|
-
turnCodexAppCardsOn
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
turnCodexAppCardsOn,
|
|
24
|
+
whyLaunchctlFailed
|
|
25
|
+
} from "./chunk-TCH5UCPR.js";
|
|
26
|
+
import "./chunk-CPRA7IEK.js";
|
|
26
27
|
import "./chunk-XCEN33UP.js";
|
|
27
28
|
import "./chunk-QCGNGEGE.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-4QF2YLYK.js";
|
|
29
30
|
import "./chunk-XHKBHWLX.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-KAJDKYUM.js";
|
|
31
32
|
import "./chunk-E46NE7FB.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-M46WDK64.js";
|
|
34
|
+
import "./chunk-3RKIJM26.js";
|
|
35
|
+
import "./chunk-KZCYHWDF.js";
|
|
36
|
+
import "./chunk-US3IT6ZC.js";
|
|
36
37
|
import "./chunk-QENTGE75.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-4XXZUFWN.js";
|
|
39
|
+
import "./chunk-BMPZ5HVJ.js";
|
|
39
40
|
import "./chunk-QTOLNRET.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-762CDAJJ.js";
|
|
41
42
|
export {
|
|
42
43
|
CODEX_APP_CARDS_DIRECTORY,
|
|
43
44
|
CODEX_APP_CARDS_LOGIN_ITEM,
|
|
45
|
+
cleanUpCodexAppCards,
|
|
46
|
+
cleanUpCodexAppCardsOnThisMac,
|
|
44
47
|
codexAppCardsCommand,
|
|
45
48
|
codexAppCardsCommandOnThisMac,
|
|
46
|
-
|
|
47
|
-
codexAppCardsFolderStaysOnThisMac,
|
|
49
|
+
codexAppCardsFolderInTheLastSweep,
|
|
48
50
|
codexAppCardsInstallation,
|
|
49
51
|
codexAppCardsLoginItem,
|
|
50
52
|
codexAppCardsLoginScript,
|
|
@@ -55,10 +57,10 @@ export {
|
|
|
55
57
|
codexAppCardsStatusLine,
|
|
56
58
|
rememberCodexAppCardsWereTurnedOff,
|
|
57
59
|
removeCodexAppCards,
|
|
58
|
-
removeCodexAppCardsFromThisMac,
|
|
59
60
|
runsFromATemporaryFolder,
|
|
60
61
|
setCodexAppLaunchAtLogin,
|
|
61
62
|
setCodexAppLaunchAtLoginOnThisMac,
|
|
62
63
|
turnCodexAppCardsOff,
|
|
63
|
-
turnCodexAppCardsOn
|
|
64
|
+
turnCodexAppCardsOn,
|
|
65
|
+
whyLaunchctlFailed
|
|
64
66
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
LAUNCHCTL,
|
|
2
3
|
codexAppOnThisMac,
|
|
3
4
|
codexDesktopCommand,
|
|
4
5
|
codexEngineBehindLauncher,
|
|
@@ -10,13 +11,14 @@ import {
|
|
|
10
11
|
installedCodexApp,
|
|
11
12
|
shellQuoted,
|
|
12
13
|
writeDesktopProxy
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CPRA7IEK.js";
|
|
14
15
|
import "./chunk-XCEN33UP.js";
|
|
15
16
|
import {
|
|
16
17
|
CODEX_APP_LAUNCH_VARIABLE
|
|
17
18
|
} from "./chunk-E46NE7FB.js";
|
|
18
19
|
export {
|
|
19
20
|
CODEX_APP_LAUNCH_VARIABLE,
|
|
21
|
+
LAUNCHCTL,
|
|
20
22
|
codexAppOnThisMac,
|
|
21
23
|
codexDesktopCommand,
|
|
22
24
|
codexEngineBehindLauncher,
|