@pushary/agent-hooks 0.83.0 → 0.83.1

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.
@@ -3,7 +3,7 @@ import {
3
3
  confirmAppConnection,
4
4
  connectDevice,
5
5
  printConnectInstructions
6
- } from "../chunk-R3AEWBAZ.js";
6
+ } from "../chunk-7GTDHV7O.js";
7
7
  import "../chunk-3EGEA4KH.js";
8
8
  import {
9
9
  printKeyCheck
@@ -49,7 +49,7 @@ import {
49
49
  fetchChannels,
50
50
  reachVerdict,
51
51
  verifyRoundTrip
52
- } from "../chunk-R3AEWBAZ.js";
52
+ } from "../chunk-7GTDHV7O.js";
53
53
  import "../chunk-3EGEA4KH.js";
54
54
  import {
55
55
  checkApiKey,
@@ -58,7 +58,7 @@ import {
58
58
  printConnectInstructions,
59
59
  setHumanStream,
60
60
  verifyRoundTrip
61
- } from "../chunk-R3AEWBAZ.js";
61
+ } from "../chunk-7GTDHV7O.js";
62
62
  import "../chunk-3EGEA4KH.js";
63
63
  import {
64
64
  checkApiKey,
@@ -3,7 +3,7 @@ import {
3
3
  describeReach,
4
4
  fetchChannels,
5
5
  reachVerdict
6
- } from "../chunk-R3AEWBAZ.js";
6
+ } from "../chunk-7GTDHV7O.js";
7
7
  import "../chunk-3EGEA4KH.js";
8
8
  import {
9
9
  checkApiKey,
@@ -691,10 +691,15 @@ var buildPairLinks = (pairId, publicKeyB64, baseUrl = apiBase(), code = null) =>
691
691
  const id = encodeURIComponent(pairId);
692
692
  const pk = encodeURIComponent(publicKeyB64);
693
693
  const origin = baseUrl.replace(/\/+$/, "");
694
+ const longLink = `${origin}/pair?id=${id}&pk=${pk}`;
694
695
  return {
695
- // 33 characters against 114, so 16 rows of QR against 22. Without a code this
696
- // is the exact URL every published CLI already encodes.
697
- universalLink: code ? `${origin}/pair/${encodeURIComponent(code)}` : `${origin}/pair?id=${id}&pk=${pk}`,
696
+ // Never shortened. Both scanners have to read this one: the phone camera,
697
+ // which opens it, and the app's own scanner, which parses id and pk straight
698
+ // off it and cannot resolve a code. 22 rows of QR instead of 16 is the price
699
+ // of the in-app scan button working at all.
700
+ qrLink: longLink,
701
+ // 33 characters against 114, for the person reading it off the screen.
702
+ universalLink: code ? `${origin}/pair/${encodeURIComponent(code)}` : longLink,
698
703
  // Never shortened: the scheme reaches an installed app with no server round
699
704
  // trip, which is the path that has to survive the short code failing.
700
705
  deepLink: `pushary://pair?pk=${pk}&id=${id}`
@@ -708,11 +713,11 @@ var connectViaAppPairing = async (options = {}) => {
708
713
  return null;
709
714
  }
710
715
  const { pairId, code } = started;
711
- const { universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64, apiBase(), code);
716
+ const { qrLink, universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64, apiBase(), code);
712
717
  console.log();
713
718
  console.log(` ${bold("Connect your Pushary app")}`);
714
719
  console.log(` ${dim("Scan this with your phone camera:")}`);
715
- await printQr(universalLink);
720
+ await printQr(qrLink);
716
721
  console.log(` ${dim("No camera handy? Open this on the phone instead:")}`);
717
722
  console.log(` ${cyan(universalLink)}`);
718
723
  console.log(` ${dim("Confirm the app shows fingerprint")} ${cyan(publicKeyFingerprint(keypair.publicKeyB64))}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/agent-hooks",
3
- "version": "0.83.0",
3
+ "version": "0.83.1",
4
4
  "description": "Permission hooks for AI coding agents: route tool approvals through Pushary push notifications",
5
5
  "keywords": [
6
6
  "pushary",