@indigoai-us/hq-cli 5.137.0 → 5.138.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
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.138.0] — 2026-09-23
6
+
7
+ ### Fixed
8
+
9
+ - `hq dm accept`, `decline`, and `block` now resolve pending requests to the
10
+ server's `personUid` field instead of sending unsupported action body fields.
11
+
5
12
  ## [5.137.0] — 2026-09-23
6
13
  ### Added
7
14
 
@@ -2333,7 +2333,7 @@ export declare const COMMAND_CATALOG: readonly [{
2333
2333
  readonly subcommands: readonly [];
2334
2334
  }, {
2335
2335
  readonly name: "accept";
2336
- readonly description: "Accept a pending connection request (by email, personUid, or pairKey). Their held message is then delivered.";
2336
+ readonly description: "Accept a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`). Their held message is then delivered.";
2337
2337
  readonly aliases: readonly [];
2338
2338
  readonly hidden: false;
2339
2339
  readonly usage: "[options] <person>";
@@ -2346,7 +2346,7 @@ export declare const COMMAND_CATALOG: readonly [{
2346
2346
  readonly subcommands: readonly [];
2347
2347
  }, {
2348
2348
  readonly name: "decline";
2349
- readonly description: "Decline a pending connection request (by email, personUid, or pairKey).";
2349
+ readonly description: "Decline a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`).";
2350
2350
  readonly aliases: readonly [];
2351
2351
  readonly hidden: false;
2352
2352
  readonly usage: "[options] <person>";
@@ -2359,7 +2359,7 @@ export declare const COMMAND_CATALOG: readonly [{
2359
2359
  readonly subcommands: readonly [];
2360
2360
  }, {
2361
2361
  readonly name: "block";
2362
- readonly description: "Block a person so they can't send you further requests (by email, personUid, or pairKey).";
2362
+ readonly description: "Block a person so they can't send you further requests (by requester email, personUid, or pairKey from `hq dm requests`).";
2363
2363
  readonly aliases: readonly [];
2364
2364
  readonly hidden: false;
2365
2365
  readonly usage: "[options] <person>";
@@ -3001,7 +3001,7 @@ export const COMMAND_CATALOG = [
3001
3001
  },
3002
3002
  {
3003
3003
  "name": "accept",
3004
- "description": "Accept a pending connection request (by email, personUid, or pairKey). Their held message is then delivered.",
3004
+ "description": "Accept a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`). Their held message is then delivered.",
3005
3005
  "aliases": [],
3006
3006
  "hidden": false,
3007
3007
  "usage": "[options] <person>",
@@ -3017,7 +3017,7 @@ export const COMMAND_CATALOG = [
3017
3017
  },
3018
3018
  {
3019
3019
  "name": "decline",
3020
- "description": "Decline a pending connection request (by email, personUid, or pairKey).",
3020
+ "description": "Decline a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`).",
3021
3021
  "aliases": [],
3022
3022
  "hidden": false,
3023
3023
  "usage": "[options] <person>",
@@ -3033,7 +3033,7 @@ export const COMMAND_CATALOG = [
3033
3033
  },
3034
3034
  {
3035
3035
  "name": "block",
3036
- "description": "Block a person so they can't send you further requests (by email, personUid, or pairKey).",
3036
+ "description": "Block a person so they can't send you further requests (by requester email, personUid, or pairKey from `hq dm requests`).",
3037
3037
  "aliases": [],
3038
3038
  "hidden": false,
3039
3039
  "usage": "[options] <person>",
@@ -175,20 +175,15 @@ export interface ConnectionRequest {
175
175
  */
176
176
  export declare function matchRequest(requests: ConnectionRequest[], identifier: string): ConnectionRequest | null;
177
177
  /**
178
- * Build the POST body for an accept/decline/block action. Prefers a resolved
179
- * pairKey (from a matched pending request); otherwise falls back to the
180
- * recipient identifier the backend can resolve (`withPersonUid` for a prs_ UID,
181
- * `toEmail`-style is not supported by the connections endpoints so we send
182
- * `withEmail`). Pure → unit-testable.
178
+ * Build the POST body for an accept/decline/block action. The connections
179
+ * endpoints accept the requester's `personUid`, so resolve friendly email or
180
+ * pairKey input through the pending request before building the body. Pure →
181
+ * unit-testable.
183
182
  *
184
183
  * Throws Error with a user-facing message when the identifier can't be resolved.
185
184
  */
186
185
  export declare function buildConnectionActionBody(identifier: string, matched: ConnectionRequest | null): {
187
- pairKey: string;
188
- } | {
189
- withPersonUid: string;
190
- } | {
191
- withEmail: string;
186
+ personUid: string;
192
187
  };
193
188
  /** Fetch the caller's channels (GET /v1/notify/channels). */
194
189
  export declare function fetchChannels(token: string): Promise<ChannelSummary[]>;
@@ -355,25 +355,22 @@ export function matchRequest(requests, identifier) {
355
355
  return null;
356
356
  }
357
357
  /**
358
- * Build the POST body for an accept/decline/block action. Prefers a resolved
359
- * pairKey (from a matched pending request); otherwise falls back to the
360
- * recipient identifier the backend can resolve (`withPersonUid` for a prs_ UID,
361
- * `toEmail`-style is not supported by the connections endpoints so we send
362
- * `withEmail`). Pure → unit-testable.
358
+ * Build the POST body for an accept/decline/block action. The connections
359
+ * endpoints accept the requester's `personUid`, so resolve friendly email or
360
+ * pairKey input through the pending request before building the body. Pure →
361
+ * unit-testable.
363
362
  *
364
363
  * Throws Error with a user-facing message when the identifier can't be resolved.
365
364
  */
366
365
  export function buildConnectionActionBody(identifier, matched) {
367
366
  if (matched) {
368
- return { pairKey: matched.pairKey };
367
+ return { personUid: matched.fromPersonUid };
369
368
  }
370
369
  const r = identifier.trim();
371
370
  const rcpt = detectRecipient(r);
372
371
  if (rcpt?.toPersonUid)
373
- return { withPersonUid: rcpt.toPersonUid };
374
- if (rcpt?.toEmail)
375
- return { withEmail: rcpt.toEmail };
376
- throw new Error(`Could not resolve '${identifier}' to a pending request — pass the requester's email, personUid, or the pairKey from \`hq dm requests\`.`);
372
+ return { personUid: rcpt.toPersonUid };
373
+ throw new Error(`Could not resolve '${identifier}' to a pending request — pass the requester's email or personUid, or a pairKey from \`hq dm requests\`.`);
377
374
  }
378
375
  const CONNECTION_ACTIONS = {
379
376
  accept: { path: "accept", done: "Connection accepted" },
@@ -1328,19 +1325,19 @@ export function registerDmCommand(program) {
1328
1325
  });
1329
1326
  dm
1330
1327
  .command("accept <person>")
1331
- .description("Accept a pending connection request (by email, personUid, or pairKey). Their held message is then delivered.")
1328
+ .description("Accept a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`). Their held message is then delivered.")
1332
1329
  .action(async (person) => {
1333
1330
  await runConnectionAction("accept", person);
1334
1331
  });
1335
1332
  dm
1336
1333
  .command("decline <person>")
1337
- .description("Decline a pending connection request (by email, personUid, or pairKey).")
1334
+ .description("Decline a pending connection request (by requester email, personUid, or pairKey from `hq dm requests`).")
1338
1335
  .action(async (person) => {
1339
1336
  await runConnectionAction("decline", person);
1340
1337
  });
1341
1338
  dm
1342
1339
  .command("block <person>")
1343
- .description("Block a person so they can't send you further requests (by email, personUid, or pairKey).")
1340
+ .description("Block a person so they can't send you further requests (by requester email, personUid, or pairKey from `hq dm requests`).")
1344
1341
  .action(async (person) => {
1345
1342
  await runConnectionAction("block", person);
1346
1343
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.137.0",
3
+ "version": "5.138.0",
4
4
  "description": "HQ by Indigo management CLI \u2014 modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {