pushary 1.9.241 → 1.9.243
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 +9 -0
- package/data/openclaw-plugin/dist/decision-reply.js +4 -0
- package/dist/bin/pushary-connect.js +1 -1
- package/dist/bin/pushary-doctor.js +1 -1
- package/dist/bin/pushary-setup.js +53 -24
- package/dist/bin/pushary-status.js +1 -1
- package/dist/{chunk-LSXM2XQQ.js → chunk-HHY574OJ.js} +88 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.243
|
|
4
|
+
|
|
5
|
+
- When the phone sign-in QR at "Connect your phone" expires before a phone uses it, setup shows a new one with "That QR expired. Scan this new one:", up to two times. Before, it said "The QR stopped working. Sign in to the Pushary app with the same account instead." It still says that when no new QR can be made, for example once the 15 minutes from the browser approval have passed. A new QR still needs Enter at the terminal before any phone is signed in. This is the QR behind `PHONE_QR_SIGN_IN_TERMINAL`, which is off until the phone app release.
|
|
6
|
+
|
|
7
|
+
## 1.9.242
|
|
8
|
+
|
|
9
|
+
- Ctrl-C at "Connect your phone" now stops the "Waiting for your phone" line with "Stopped before a phone connected", says "To connect a phone later, run npx -y pushary@latest setup.", sends the setup report, and exits 130 (143 for SIGTERM). Before, setup exited with the wait line still drawing and sent no report. With the terminal phone sign-in QR, the phone sign-in is still cancelled first.
|
|
10
|
+
- A Ctrl-C after the phone connects, while setup sends the test notification, no longer says the phone did not connect.
|
|
11
|
+
|
|
3
12
|
## 1.9.241
|
|
4
13
|
|
|
5
14
|
- More steps now count as destructive, so in the default mode the Autonomous preset and a `*` rule ask before them, and your phone shows them as risky: `gh repo delete` with or without `--yes`, `gh api -X DELETE` on `repos/<owner>/<repo>` or its full `https://api.github.com` URL, `prisma migrate reset` and `prisma db push --force-reset` through `npx`, `bunx`, `pnpm dlx` or on their own, `git checkout -- <path>`, `git checkout .` and `git checkout -f`, `git restore <path>` and `git restore .`, `git stash drop` and `git stash clear`, `npm unpublish`, `docker rm -f` and `docker container remove -f`, `dd` with `of=`, `shred`, `rsync --delete` (also with `-e "ssh ..."`, through `sshpass`, over `ssh` with its options before or after the host, or inside `bash -c`, `eval`, a heredoc, `docker exec`, `kubectl exec`, `find -exec` or a shell function), `rimraf` run on its own or through `npx`, `pnpm`, `npm exec`, `bun x` or `xargs` (also `xargs -n 1 npx rimraf`), and a recursive delete in code run by `python -c`, `node -e`, `ruby -e` or a heredoc fed to the interpreter, `fs.rmSync(path.join(...), {recursive: true})` included.
|
|
@@ -5,6 +5,10 @@ export const STOP_HANDOFF_ACTION = 'stop';
|
|
|
5
5
|
export const DECISION_STOP_STATUSES = ['cancelled', 'unavailable', 'stopped', 'missing'];
|
|
6
6
|
export const isDecisionStoppedReply = (reply) => reply.handoffAction === STOP_HANDOFF_ACTION || (typeof reply.status === 'string' && DECISION_STOP_STATUSES.includes(reply.status));
|
|
7
7
|
export const isApprovingAnswer = (answer) => answer === APPROVE_ANSWER;
|
|
8
|
+
export const isAwayPaused = (result) => result.paused === true;
|
|
9
|
+
export const isLocalQuestionHandoff = (result) => !isAwayPaused(result)
|
|
10
|
+
&& (result.suppressed === true || result.noDevices === true || result.status === 'terminal' || result.status === 'notified');
|
|
11
|
+
export const waitsForThePhone = (result) => result.answered !== true && !isAwayPaused(result) && !isLocalQuestionHandoff(result);
|
|
8
12
|
const isAbsentOrString = (value) => value === undefined || typeof value === 'string';
|
|
9
13
|
const isAbsentOrBoolean = (value) => value === undefined || typeof value === 'boolean';
|
|
10
14
|
const isAbsentOrTrue = (value) => value === undefined || value === true;
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
startPairing,
|
|
138
138
|
waitForYourPhone,
|
|
139
139
|
writeStatusLine
|
|
140
|
-
} from "../chunk-
|
|
140
|
+
} from "../chunk-HHY574OJ.js";
|
|
141
141
|
import {
|
|
142
142
|
generateKeypair,
|
|
143
143
|
publicKeyFingerprint
|
|
@@ -1182,7 +1182,7 @@ var terminalHeaders = (pass) => ({
|
|
|
1182
1182
|
Authorization: `Bearer ${pass}`
|
|
1183
1183
|
});
|
|
1184
1184
|
var spacedCode = (code) => `${code.slice(0, 3)} ${code.slice(3)}`;
|
|
1185
|
-
var startTerminalPhoneSignIn = async (pass, computer, installSource, deps = {}) => {
|
|
1185
|
+
var startTerminalPhoneSignIn = async (pass, computer, installSource, deps = {}, replaces = null) => {
|
|
1186
1186
|
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
1187
1187
|
const baseUrl = deps.baseUrl ?? getBaseUrl();
|
|
1188
1188
|
try {
|
|
@@ -1194,7 +1194,8 @@ var startTerminalPhoneSignIn = async (pass, computer, installSource, deps = {})
|
|
|
1194
1194
|
...computer.computerName === null ? {} : { computerName: computer.computerName },
|
|
1195
1195
|
...computer.os === null ? {} : { os: computer.os },
|
|
1196
1196
|
...computer.agents === null ? {} : { agents: computer.agents },
|
|
1197
|
-
installSource
|
|
1197
|
+
installSource,
|
|
1198
|
+
...replaces === null ? {} : { replaces }
|
|
1198
1199
|
}),
|
|
1199
1200
|
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
|
|
1200
1201
|
});
|
|
@@ -1258,7 +1259,7 @@ var approveThePhoneWhenItAsks = async (signIn, ui, options, deps = {}) => {
|
|
|
1258
1259
|
if (options.stopped()) return "stopped";
|
|
1259
1260
|
if (state.kind === "allowed") return "allowed";
|
|
1260
1261
|
if (state.kind === "ended") {
|
|
1261
|
-
writeStatusLine(ui.dim(PHONE_SIGN_IN_ENDED_LINE));
|
|
1262
|
+
if (options.sayWhenItEnds !== false) writeStatusLine(ui.dim(PHONE_SIGN_IN_ENDED_LINE));
|
|
1262
1263
|
return "ended";
|
|
1263
1264
|
}
|
|
1264
1265
|
if (state.kind === "asking") {
|
|
@@ -1272,13 +1273,21 @@ var approveThePhoneWhenItAsks = async (signIn, ui, options, deps = {}) => {
|
|
|
1272
1273
|
writeStatusLine(`${ui.done} Allowed. Finish on your phone.`);
|
|
1273
1274
|
return "allowed";
|
|
1274
1275
|
}
|
|
1275
|
-
|
|
1276
|
+
if (!approve) writeStatusLine(`${ui.yellow("!")} Denied. That phone was not signed in.`);
|
|
1277
|
+
else if (options.sayWhenItEnds !== false) writeStatusLine(ui.dim(PHONE_SIGN_IN_ENDED_LINE));
|
|
1276
1278
|
return approve ? "ended" : "denied";
|
|
1277
1279
|
}
|
|
1278
1280
|
await Promise.race([clock.sleep(PHONE_SIGN_IN_POLL_MS), options.woken]);
|
|
1279
1281
|
}
|
|
1280
1282
|
return "stopped";
|
|
1281
1283
|
};
|
|
1284
|
+
var PHONE_SIGN_IN_RENEWED_LINE = "That QR expired. Scan this new one:";
|
|
1285
|
+
var PHONE_SIGN_IN_RENEWALS = 2;
|
|
1286
|
+
var showRenewedPhoneSignIn = async (signIn, ui) => {
|
|
1287
|
+
ui.say(` ${ui.dim(PHONE_SIGN_IN_RENEWED_LINE)}`);
|
|
1288
|
+
await printQr(signIn.link);
|
|
1289
|
+
ui.say(` ${ui.dim("Or open on your phone:")} ${ui.cyan(signIn.link)}`);
|
|
1290
|
+
};
|
|
1282
1291
|
var showTerminalPhoneSignIn = async (signIn, ui) => {
|
|
1283
1292
|
ui.say(` ${ui.bold("Connect your phone")}`);
|
|
1284
1293
|
ui.say(` ${PHONE_SIGN_IN_SCAN_LINE}`);
|
|
@@ -1287,8 +1296,8 @@ var showTerminalPhoneSignIn = async (signIn, ui) => {
|
|
|
1287
1296
|
ui.say(` ${ui.dim(PHONE_WAIT_SKIP_LINE)}`);
|
|
1288
1297
|
};
|
|
1289
1298
|
var waitForYourPhoneToSignIn = async (apiKey, signIn, keys, ui, deps = {}) => {
|
|
1290
|
-
const exit = deps.exit ?? ((code) => process.exit(code));
|
|
1291
1299
|
let stopped = false;
|
|
1300
|
+
let current = signIn;
|
|
1292
1301
|
let wake = () => {
|
|
1293
1302
|
};
|
|
1294
1303
|
const woken = new Promise((resolve) => {
|
|
@@ -1299,35 +1308,50 @@ var waitForYourPhoneToSignIn = async (apiKey, signIn, keys, ui, deps = {}) => {
|
|
|
1299
1308
|
stopped = true;
|
|
1300
1309
|
wake();
|
|
1301
1310
|
};
|
|
1302
|
-
const cancelOnSignal = (exitCode) =>
|
|
1311
|
+
const cancelOnSignal = async (exitCode) => {
|
|
1303
1312
|
stopWaiting();
|
|
1304
1313
|
keys.close();
|
|
1305
|
-
|
|
1314
|
+
await Promise.allSettled([cancelTerminalPhoneSignIn(current, deps), deps.onSignal?.(exitCode)]);
|
|
1315
|
+
};
|
|
1316
|
+
const approveRenewingAnExpiredQr = async () => {
|
|
1317
|
+
for (let renewals = 0; ; renewals += 1) {
|
|
1318
|
+
const canRenew = deps.renew !== void 0 && renewals < PHONE_SIGN_IN_RENEWALS;
|
|
1319
|
+
const outcome = await approveThePhoneWhenItAsks(current, ui, {
|
|
1320
|
+
allow: keys.listenerFor(PHONE_ALLOW_KEY),
|
|
1321
|
+
deny: keys.listenerFor(PHONE_DENY_KEY),
|
|
1322
|
+
stopped: () => stopped,
|
|
1323
|
+
woken,
|
|
1324
|
+
sayWhenItEnds: !canRenew
|
|
1325
|
+
}, deps);
|
|
1326
|
+
if (outcome !== "ended" || !canRenew || stopped) return outcome;
|
|
1327
|
+
const renewed = await deps.renew?.(current.id);
|
|
1328
|
+
if (stopped) {
|
|
1329
|
+
if (renewed) await cancelTerminalPhoneSignIn(renewed, deps);
|
|
1330
|
+
return "stopped";
|
|
1331
|
+
}
|
|
1332
|
+
if (!renewed) {
|
|
1333
|
+
writeStatusLine(ui.dim(PHONE_SIGN_IN_ENDED_LINE));
|
|
1334
|
+
return "ended";
|
|
1335
|
+
}
|
|
1336
|
+
current = renewed;
|
|
1337
|
+
await showRenewedPhoneSignIn(renewed, ui);
|
|
1338
|
+
}
|
|
1306
1339
|
};
|
|
1307
|
-
const onInterrupt = cancelOnSignal(EXIT_ABORTED);
|
|
1308
|
-
const onTerminate = cancelOnSignal(EXIT_TERMINATED);
|
|
1309
|
-
process.once("SIGINT", onInterrupt);
|
|
1310
|
-
process.once("SIGTERM", onTerminate);
|
|
1311
1340
|
try {
|
|
1312
1341
|
return await waitForYourPhone(apiKey, {
|
|
1313
1342
|
skip: keys.listenerFor(PHONE_WAIT_SKIP_KEY),
|
|
1343
|
+
onSignal: cancelOnSignal,
|
|
1344
|
+
...deps.exit ? { exit: deps.exit } : {},
|
|
1314
1345
|
...deps.clock ? { clock: deps.clock } : {},
|
|
1315
1346
|
...deps.followsABlankLine === true ? { followsABlankLine: true } : {},
|
|
1316
1347
|
intro: async () => {
|
|
1317
1348
|
await showTerminalPhoneSignIn(signIn, ui);
|
|
1318
|
-
approval =
|
|
1319
|
-
allow: keys.listenerFor(PHONE_ALLOW_KEY),
|
|
1320
|
-
deny: keys.listenerFor(PHONE_DENY_KEY),
|
|
1321
|
-
stopped: () => stopped,
|
|
1322
|
-
woken
|
|
1323
|
-
}, deps);
|
|
1349
|
+
approval = approveRenewingAnExpiredQr();
|
|
1324
1350
|
}
|
|
1325
1351
|
});
|
|
1326
1352
|
} finally {
|
|
1327
|
-
process.off("SIGINT", onInterrupt);
|
|
1328
|
-
process.off("SIGTERM", onTerminate);
|
|
1329
1353
|
stopWaiting();
|
|
1330
|
-
if (await approval !== "allowed") await cancelTerminalPhoneSignIn(
|
|
1354
|
+
if (await approval !== "allowed") await cancelTerminalPhoneSignIn(current, deps);
|
|
1331
1355
|
}
|
|
1332
1356
|
};
|
|
1333
1357
|
|
|
@@ -3799,10 +3823,15 @@ var main = async () => {
|
|
|
3799
3823
|
break;
|
|
3800
3824
|
case "wait-for-app": {
|
|
3801
3825
|
const keys = keyRouter();
|
|
3802
|
-
const
|
|
3826
|
+
const startPhoneSignInWith = (pass) => (replacing) => startTerminalPhoneSignIn(pass, pairingComputerOf(hostname2(), process.platform, detectedAgentChoices()), reportedInstallSource(), {}, replacing ?? null);
|
|
3827
|
+
const startPhoneSignInHere = phonePass === null ? void 0 : startPhoneSignInWith(phonePass);
|
|
3828
|
+
const phoneSignIn = keys !== null && startPhoneSignInHere !== void 0 && connectInstructions.showQr ? await startPhoneSignInHere() : null;
|
|
3829
|
+
const reportStoppedAtThePhone = async (exitCode2) => {
|
|
3830
|
+
await abortWith("interrupted", exitCode2, keyCheck.kind, { completed, skipped, failures, connectOutcome: connectOutcomeOf(null, null) });
|
|
3831
|
+
};
|
|
3803
3832
|
if (keys === null) phone = await printConnectInstructions(trimmedKey, connectInstructions);
|
|
3804
|
-
else if (phoneSignIn === null) phone = await waitForYourPhone(trimmedKey, { skip: keys.listenerFor(PHONE_WAIT_SKIP_KEY), accountEmail: accountEmailFromCheck(keyCheck), followsABlankLine: stillToDoEndsTheOutput });
|
|
3805
|
-
else phone = await waitForYourPhoneToSignIn(trimmedKey, phoneSignIn, keys, { say: (line) => console.log(line), bold, dim, cyan, yellow, done: check }, { followsABlankLine: stillToDoEndsTheOutput });
|
|
3833
|
+
else if (phoneSignIn === null) phone = await waitForYourPhone(trimmedKey, { skip: keys.listenerFor(PHONE_WAIT_SKIP_KEY), accountEmail: accountEmailFromCheck(keyCheck), followsABlankLine: stillToDoEndsTheOutput, onSignal: reportStoppedAtThePhone });
|
|
3834
|
+
else phone = await waitForYourPhoneToSignIn(trimmedKey, phoneSignIn, keys, { say: (line) => console.log(line), bold, dim, cyan, yellow, done: check }, { followsABlankLine: stillToDoEndsTheOutput, onSignal: reportStoppedAtThePhone, ...startPhoneSignInHere ? { renew: startPhoneSignInHere } : {} });
|
|
3806
3835
|
keys?.close();
|
|
3807
3836
|
break;
|
|
3808
3837
|
}
|
|
@@ -756,6 +756,70 @@ var describePhoneWait = (skipOffered, accountEmail = null) => [
|
|
|
756
756
|
signInOnThePhoneStep(accountEmail),
|
|
757
757
|
...skipOffered ? [dim(PHONE_WAIT_SKIP_LINE)] : []
|
|
758
758
|
];
|
|
759
|
+
var PHONE_WAIT_STOPPED_LABEL = "Stopped before a phone connected";
|
|
760
|
+
var PHONE_WAIT_STOPPED_LINE = `To connect a phone later, run ${NPX_LATEST_COMMAND} setup.`;
|
|
761
|
+
var PHONE_WAIT_SIGNAL_CLEANUP_MS = 4e3;
|
|
762
|
+
var settledWithin = async (work, ms) => {
|
|
763
|
+
let timer;
|
|
764
|
+
try {
|
|
765
|
+
await Promise.race([work.catch(() => {
|
|
766
|
+
}), new Promise((resolve) => {
|
|
767
|
+
timer = setTimeout(resolve, ms);
|
|
768
|
+
})]);
|
|
769
|
+
} finally {
|
|
770
|
+
clearTimeout(timer);
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
var NO_PHONE_WAIT_SIGNALS = { spinner: { started: (stop) => stop }, stopped: () => false, release: () => {
|
|
774
|
+
} };
|
|
775
|
+
var stopOnlyOnce = (stop) => {
|
|
776
|
+
let done = false;
|
|
777
|
+
return (glyph, label) => {
|
|
778
|
+
if (done) return;
|
|
779
|
+
done = true;
|
|
780
|
+
stop(glyph, label);
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
var exitOnPhoneWaitSignals = (options) => {
|
|
784
|
+
const onSignal = options.onSignal;
|
|
785
|
+
if (onSignal === void 0) return NO_PHONE_WAIT_SIGNALS;
|
|
786
|
+
const exit = options.exit ?? ((code) => process.exit(code));
|
|
787
|
+
let stopSpinner = null;
|
|
788
|
+
let stopped = false;
|
|
789
|
+
let release = () => {
|
|
790
|
+
};
|
|
791
|
+
const stopOnSignal = (exitCode) => () => {
|
|
792
|
+
if (stopped) return;
|
|
793
|
+
stopped = true;
|
|
794
|
+
release();
|
|
795
|
+
if (stopSpinner === null) writeStatusLine(`${yellow("!")} ${PHONE_WAIT_STOPPED_LABEL}`);
|
|
796
|
+
else stopSpinner(yellow("!"), PHONE_WAIT_STOPPED_LABEL);
|
|
797
|
+
writeHuman(` ${dim(PHONE_WAIT_STOPPED_LINE)}
|
|
798
|
+
|
|
799
|
+
`);
|
|
800
|
+
void settledWithin(onSignal(exitCode), PHONE_WAIT_SIGNAL_CLEANUP_MS).finally(() => exit(exitCode));
|
|
801
|
+
};
|
|
802
|
+
const onInterrupt = stopOnSignal(EXIT_ABORTED);
|
|
803
|
+
const onTerminate = stopOnSignal(EXIT_TERMINATED);
|
|
804
|
+
process.once("SIGINT", onInterrupt);
|
|
805
|
+
process.once("SIGTERM", onTerminate);
|
|
806
|
+
release = () => {
|
|
807
|
+
process.off("SIGINT", onInterrupt);
|
|
808
|
+
process.off("SIGTERM", onTerminate);
|
|
809
|
+
};
|
|
810
|
+
return {
|
|
811
|
+
spinner: {
|
|
812
|
+
started: (stop) => {
|
|
813
|
+
const once = stopOnlyOnce(stop);
|
|
814
|
+
if (stopped) once(yellow("!"), PHONE_WAIT_STOPPED_LABEL);
|
|
815
|
+
stopSpinner = once;
|
|
816
|
+
return once;
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
stopped: () => stopped,
|
|
820
|
+
release: () => release()
|
|
821
|
+
};
|
|
822
|
+
};
|
|
759
823
|
var watchSkip = (listener) => {
|
|
760
824
|
let skipped = false;
|
|
761
825
|
let wake = () => {
|
|
@@ -774,15 +838,15 @@ var PHONE_WAIT_REPAIR_LINE = `Open the Pushary app, sign in with the same accoun
|
|
|
774
838
|
var phoneWaitRepair = (verdict) => verdict.kind === "nobody" ? [PHONE_WAIT_REPAIR_LINE] : describeAppRepair(verdict) ?? [];
|
|
775
839
|
var PHONE_WAIT_SKIPPED = "skipped_at_the_terminal";
|
|
776
840
|
var phoneWaitWasSkipped = (phone) => phone?.detail === PHONE_WAIT_SKIPPED;
|
|
777
|
-
var pollForYourPhone = async (apiKey, firstSeen, options) => {
|
|
841
|
+
var pollForYourPhone = async (apiKey, firstSeen, options, signals) => {
|
|
778
842
|
const clock = options.clock ?? SYSTEM_PAIR_CLOCK;
|
|
779
843
|
const deadline = clock.now() + PHONE_WAIT_TIMEOUT_MS;
|
|
780
844
|
const skip = watchSkip(options.skip);
|
|
781
845
|
const minutesLeft = () => Math.max(0, Math.ceil((deadline - clock.now()) / 6e4));
|
|
782
|
-
const stop = startSpinner(() => `Waiting for your phone ${dim(`(${minutesLeft()}m left)`)}`);
|
|
846
|
+
const stop = signals.spinner.started(startSpinner(() => `Waiting for your phone ${dim(`(${minutesLeft()}m left)`)}`));
|
|
783
847
|
let lastSeen = firstSeen;
|
|
784
848
|
try {
|
|
785
|
-
while (clock.now() < deadline && !skip.skipped()) {
|
|
849
|
+
while (clock.now() < deadline && !skip.skipped() && !signals.stopped()) {
|
|
786
850
|
const probe = await fetchChannels(apiKey);
|
|
787
851
|
if (probe.kind === "unauthorized") {
|
|
788
852
|
stop(yellow("!"), "The server stopped accepting this key");
|
|
@@ -811,18 +875,32 @@ var pollForYourPhone = async (apiKey, firstSeen, options) => {
|
|
|
811
875
|
skip.stop();
|
|
812
876
|
}
|
|
813
877
|
};
|
|
814
|
-
var
|
|
878
|
+
var waitUntilYourPhoneConnects = async (apiKey, options, signals) => {
|
|
815
879
|
const probe = await fetchChannels(apiKey);
|
|
816
|
-
if (probe.kind !== "ok") return
|
|
817
|
-
if (reachesYou(probe.status)) {
|
|
818
|
-
console.log(` ${check} ${describeExistingConnection(probe.status)}`);
|
|
819
|
-
return sendAndConfirm(apiKey, probe.status);
|
|
820
|
-
}
|
|
880
|
+
if (probe.kind !== "ok" || reachesYou(probe.status) || signals.stopped()) return { stage: "first-look", probe };
|
|
821
881
|
if (options.followsABlankLine !== true) console.log();
|
|
822
882
|
if (options.intro) await options.intro();
|
|
823
883
|
else for (const line of describePhoneWait(options.skip !== void 0, options.accountEmail ?? null)) console.log(` ${line}`);
|
|
824
884
|
console.log();
|
|
825
|
-
|
|
885
|
+
if (signals.stopped()) return { stage: "first-look", probe };
|
|
886
|
+
return { stage: "waited", waited: await pollForYourPhone(apiKey, probe.status, options, signals) };
|
|
887
|
+
};
|
|
888
|
+
var phoneSeenAtFirstLook = (apiKey, probe) => {
|
|
889
|
+
if (probe.kind !== "ok") return describeProbeFailure(probe);
|
|
890
|
+
console.log(` ${check} ${describeExistingConnection(probe.status)}`);
|
|
891
|
+
return sendAndConfirm(apiKey, probe.status);
|
|
892
|
+
};
|
|
893
|
+
var waitForYourPhone = async (apiKey, options = {}) => {
|
|
894
|
+
const signals = exitOnPhoneWaitSignals(options);
|
|
895
|
+
let outcome;
|
|
896
|
+
try {
|
|
897
|
+
outcome = await waitUntilYourPhoneConnects(apiKey, options, signals);
|
|
898
|
+
} finally {
|
|
899
|
+
signals.release();
|
|
900
|
+
}
|
|
901
|
+
if (signals.stopped()) return heldUntilTheSignalExits();
|
|
902
|
+
if (outcome.stage === "first-look") return phoneSeenAtFirstLook(apiKey, outcome.probe);
|
|
903
|
+
const { waited } = outcome;
|
|
826
904
|
if (waited.kind === "connected") return sendAndConfirm(apiKey, waited.channels);
|
|
827
905
|
if (waited.kind === "unauthorized" || waited.kind === "locked") return describeProbeFailure(waited);
|
|
828
906
|
if (waited.kind === "skipped") return phoneFailure(PHONE_WAIT_SKIPPED);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushary",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.243",
|
|
4
4
|
"description": "Human-in-the-loop (HITL) for AI agents: ask a person for approvals or answers by push notification. One command connects Claude Code, Codex, Cursor, Gemini CLI and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pushary",
|