@pushary/agent-hooks 0.65.0 → 0.66.0

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.66.0
4
+
5
+ ### Setup waited three minutes for a step that takes longer than three minutes
6
+
7
+ If you already had the app installed and signed in, pairing resolved in seconds
8
+ and this never came up. If you did not, it could not work at all.
9
+
10
+ Scanning the QR without the app opens a page that sends you to the store. Install
11
+ it, sign in, subscribe, come back, scan: that is never three minutes. The CLI had
12
+ given up and cancelled the pairing long before, so a first-time user's first scan
13
+ was guaranteed to fail, and the only route through was to notice the terminal had
14
+ stopped waiting and run setup again.
15
+
16
+ Setup now waits as long as the code is actually valid, and after the first
17
+ 45 seconds the spinner says what to do if the app is not installed yet. Ctrl-C
18
+ still exits cleanly and cancels the pairing, so nothing holds you there.
19
+
20
+ The window itself is unchanged in what protects it: a pairing id is 128 bits,
21
+ single use, deleted the moment it is claimed, and authorising one requires a
22
+ signed-in session for the owning account and the public key you physically
23
+ scanned.
24
+
3
25
  ## 0.65.0
4
26
 
5
27
  ### The pairing QR now works when you scan it with your phone camera
@@ -6,7 +6,7 @@ import {
6
6
  confirmAppConnection,
7
7
  connectDevice,
8
8
  printConnectInstructions
9
- } from "../chunk-LZLXTM7P.js";
9
+ } from "../chunk-QTC7SR6A.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
11
  import {
12
12
  readKeySource
@@ -34,7 +34,7 @@ import {
34
34
  describeReach,
35
35
  fetchChannels,
36
36
  reachVerdict
37
- } from "../chunk-LZLXTM7P.js";
37
+ } from "../chunk-QTC7SR6A.js";
38
38
  import "../chunk-3EGEA4KH.js";
39
39
  import {
40
40
  keyPrefix,
@@ -45,7 +45,7 @@ import {
45
45
  connectViaAppPairing,
46
46
  printConnectInstructions,
47
47
  setHumanStream
48
- } from "../chunk-LZLXTM7P.js";
48
+ } from "../chunk-QTC7SR6A.js";
49
49
  import "../chunk-3EGEA4KH.js";
50
50
  import {
51
51
  KEY_FILE_MODE,
@@ -7,7 +7,7 @@ import {
7
7
  describeReach,
8
8
  fetchChannels,
9
9
  reachVerdict
10
- } from "../chunk-LZLXTM7P.js";
10
+ } from "../chunk-QTC7SR6A.js";
11
11
  import "../chunk-3EGEA4KH.js";
12
12
  import {
13
13
  readKeySource
@@ -448,7 +448,8 @@ var printConnectInstructions = async (apiKey) => {
448
448
  return phoneFailure("no_device");
449
449
  };
450
450
  var PAIR_POLL_INTERVAL_MS = 2e3;
451
- var PAIR_TIMEOUT_MS = 18e4;
451
+ var PAIR_TIMEOUT_MS = 9e5;
452
+ var PAIR_HINT_AFTER_MS = 45e3;
452
453
  var startPairing = async (cliPublicKey) => {
453
454
  try {
454
455
  const res = await fetch(`${apiBase()}/api/mobile/pair/start`, {
@@ -511,10 +512,14 @@ var connectViaAppPairing = async (options = {}) => {
511
512
  console.log(` ${dim("Confirm the app shows fingerprint")} ${cyan(publicKeyFingerprint(keypair.publicKeyB64))}`);
512
513
  console.log(` ${dim("Already have the app and it opened a browser? Use")} ${cyan(deepLink)}`);
513
514
  console.log();
514
- const deadline = Date.now() + PAIR_TIMEOUT_MS;
515
+ const startedAt = Date.now();
516
+ const deadline = startedAt + PAIR_TIMEOUT_MS;
515
517
  const stop = startSpinner(() => {
516
- const left = Math.max(0, Math.ceil((deadline - Date.now()) / 1e3));
517
- return `Waiting for the app to authorize ${dim(`(${left}s)`)}`;
518
+ const left = Math.max(0, Math.ceil((deadline - Date.now()) / 6e4));
519
+ if (Date.now() - startedAt < PAIR_HINT_AFTER_MS) {
520
+ return "Waiting for the app to authorize";
521
+ }
522
+ return `Waiting for the app ${dim(`(${left}m left. No app yet? Install it, sign in with this account, then scan. Ctrl-C to stop)`)}`;
518
523
  });
519
524
  let cancelled = false;
520
525
  const onInterrupt = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/agent-hooks",
3
- "version": "0.65.0",
3
+ "version": "0.66.0",
4
4
  "description": "Permission hooks for AI coding agents: route tool approvals through Pushary push notifications",
5
5
  "keywords": [
6
6
  "pushary",