@indigoai-us/hq-cli 5.345.120 → 5.345.121

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,7 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.121] — 2026-10-13
6
+ - `hq capture` ships in this release. It was listed under 5.345.120, but that tag was cut before the change merged, so 5.345.120 does not include it. `hq capture` drives HQ Capture, the hq-capture pack's screen recorder: `doctor`, `build`, `start [--record]`, `record`, `status`, `wait`, `stop`, `run` and `resume` run the pack's launcher from the HQ root with the arguments unchanged and pass its JSON and exit code through. `hq capture record` starts a recording without anyone pressing Start (pack 0.1.3 or later).
7
+
5
8
  ## [5.345.120] — 2026-10-13
9
+ - Add `hq capture` to drive HQ Capture, the hq-capture pack's screen recorder: `doctor`, `build`, `start [--record]`, `record`, `status`, `wait`, `stop`, `run` and `resume` run the pack's launcher from the HQ root with the arguments unchanged and pass its JSON and exit code through. `hq capture record` starts a recording without anyone pressing Start (pack 0.1.3 or later).
10
+
6
11
  - `hq dm forward --company <slug|cmp_id>` names the company a person or agent
7
12
  destination belongs to. The CLI sends it as `companyUid`, so the server runs
8
13
  its destination-side cross-company check. Without it the destination is
@@ -1352,6 +1352,171 @@ export declare const COMMAND_CATALOG: readonly [{
1352
1352
  readonly hidden: false;
1353
1353
  }];
1354
1354
  readonly subcommands: readonly [];
1355
+ }, {
1356
+ readonly name: "capture";
1357
+ readonly description: "Record your screen with HQ Capture: start, record, stop, status and wait";
1358
+ readonly aliases: readonly [];
1359
+ readonly hidden: false;
1360
+ readonly helpOption: true;
1361
+ readonly helpCommand: true;
1362
+ readonly usage: "[options] [command]";
1363
+ readonly helpText: readonly [];
1364
+ readonly arguments: readonly [];
1365
+ readonly options: readonly [];
1366
+ readonly subcommands: readonly [{
1367
+ readonly name: "doctor";
1368
+ readonly description: "Check this Mac can build and run HQ Capture";
1369
+ readonly aliases: readonly [];
1370
+ readonly hidden: false;
1371
+ readonly helpOption: false;
1372
+ readonly helpCommand: false;
1373
+ readonly usage: "[args...]";
1374
+ readonly helpText: readonly [];
1375
+ readonly arguments: readonly [{
1376
+ readonly name: "args";
1377
+ readonly required: false;
1378
+ readonly variadic: true;
1379
+ readonly description: "";
1380
+ }];
1381
+ readonly options: readonly [];
1382
+ readonly subcommands: readonly [];
1383
+ }, {
1384
+ readonly name: "build";
1385
+ readonly description: "Build HQ Capture if missing or out of date ([--force])";
1386
+ readonly aliases: readonly [];
1387
+ readonly hidden: false;
1388
+ readonly helpOption: false;
1389
+ readonly helpCommand: false;
1390
+ readonly usage: "[args...]";
1391
+ readonly helpText: readonly [];
1392
+ readonly arguments: readonly [{
1393
+ readonly name: "args";
1394
+ readonly required: false;
1395
+ readonly variadic: true;
1396
+ readonly description: "";
1397
+ }];
1398
+ readonly options: readonly [];
1399
+ readonly subcommands: readonly [];
1400
+ }, {
1401
+ readonly name: "start";
1402
+ readonly description: "Open HQ Capture for the session's company ([--company <slug>] [--record])";
1403
+ readonly aliases: readonly [];
1404
+ readonly hidden: false;
1405
+ readonly helpOption: false;
1406
+ readonly helpCommand: false;
1407
+ readonly usage: "[args...]";
1408
+ readonly helpText: readonly [];
1409
+ readonly arguments: readonly [{
1410
+ readonly name: "args";
1411
+ readonly required: false;
1412
+ readonly variadic: true;
1413
+ readonly description: "";
1414
+ }];
1415
+ readonly options: readonly [];
1416
+ readonly subcommands: readonly [];
1417
+ }, {
1418
+ readonly name: "record";
1419
+ readonly description: "Start recording in the open HQ Capture, as if Start was pressed";
1420
+ readonly aliases: readonly [];
1421
+ readonly hidden: false;
1422
+ readonly helpOption: false;
1423
+ readonly helpCommand: false;
1424
+ readonly usage: "[args...]";
1425
+ readonly helpText: readonly [];
1426
+ readonly arguments: readonly [{
1427
+ readonly name: "args";
1428
+ readonly required: false;
1429
+ readonly variadic: true;
1430
+ readonly description: "";
1431
+ }];
1432
+ readonly options: readonly [];
1433
+ readonly subcommands: readonly [];
1434
+ }, {
1435
+ readonly name: "status";
1436
+ readonly description: "Print HQ Capture's current status as JSON";
1437
+ readonly aliases: readonly [];
1438
+ readonly hidden: false;
1439
+ readonly helpOption: false;
1440
+ readonly helpCommand: false;
1441
+ readonly usage: "[args...]";
1442
+ readonly helpText: readonly [];
1443
+ readonly arguments: readonly [{
1444
+ readonly name: "args";
1445
+ readonly required: false;
1446
+ readonly variadic: true;
1447
+ readonly description: "";
1448
+ }];
1449
+ readonly options: readonly [];
1450
+ readonly subcommands: readonly [];
1451
+ }, {
1452
+ readonly name: "wait";
1453
+ readonly description: "Wait until the recording is saved, failed or closed ([--timeout <seconds>])";
1454
+ readonly aliases: readonly [];
1455
+ readonly hidden: false;
1456
+ readonly helpOption: false;
1457
+ readonly helpCommand: false;
1458
+ readonly usage: "[args...]";
1459
+ readonly helpText: readonly [];
1460
+ readonly arguments: readonly [{
1461
+ readonly name: "args";
1462
+ readonly required: false;
1463
+ readonly variadic: true;
1464
+ readonly description: "";
1465
+ }];
1466
+ readonly options: readonly [];
1467
+ readonly subcommands: readonly [];
1468
+ }, {
1469
+ readonly name: "stop";
1470
+ readonly description: "Stop HQ Capture, saving a recording in progress";
1471
+ readonly aliases: readonly [];
1472
+ readonly hidden: false;
1473
+ readonly helpOption: false;
1474
+ readonly helpCommand: false;
1475
+ readonly usage: "[args...]";
1476
+ readonly helpText: readonly [];
1477
+ readonly arguments: readonly [{
1478
+ readonly name: "args";
1479
+ readonly required: false;
1480
+ readonly variadic: true;
1481
+ readonly description: "";
1482
+ }];
1483
+ readonly options: readonly [];
1484
+ readonly subcommands: readonly [];
1485
+ }, {
1486
+ readonly name: "run";
1487
+ readonly description: "Run an agent command on a saved recording (<mode> <package> [args])";
1488
+ readonly aliases: readonly [];
1489
+ readonly hidden: false;
1490
+ readonly helpOption: false;
1491
+ readonly helpCommand: false;
1492
+ readonly usage: "[args...]";
1493
+ readonly helpText: readonly [];
1494
+ readonly arguments: readonly [{
1495
+ readonly name: "args";
1496
+ readonly required: false;
1497
+ readonly variadic: true;
1498
+ readonly description: "";
1499
+ }];
1500
+ readonly options: readonly [];
1501
+ readonly subcommands: readonly [];
1502
+ }, {
1503
+ readonly name: "resume";
1504
+ readonly description: "Check a pasted resume prompt and print its package (<prompt>)";
1505
+ readonly aliases: readonly [];
1506
+ readonly hidden: false;
1507
+ readonly helpOption: false;
1508
+ readonly helpCommand: false;
1509
+ readonly usage: "[args...]";
1510
+ readonly helpText: readonly [];
1511
+ readonly arguments: readonly [{
1512
+ readonly name: "args";
1513
+ readonly required: false;
1514
+ readonly variadic: true;
1515
+ readonly description: "";
1516
+ }];
1517
+ readonly options: readonly [];
1518
+ readonly subcommands: readonly [];
1519
+ }];
1355
1520
  }, {
1356
1521
  readonly name: "auth";
1357
1522
  readonly description: "Manage the local HQ Cognito session";
@@ -1621,6 +1621,200 @@ export const COMMAND_CATALOG = [
1621
1621
  ],
1622
1622
  "subcommands": []
1623
1623
  },
1624
+ {
1625
+ "name": "capture",
1626
+ "description": "Record your screen with HQ Capture: start, record, stop, status and wait",
1627
+ "aliases": [],
1628
+ "hidden": false,
1629
+ "helpOption": true,
1630
+ "helpCommand": true,
1631
+ "usage": "[options] [command]",
1632
+ "helpText": [],
1633
+ "arguments": [],
1634
+ "options": [],
1635
+ "subcommands": [
1636
+ {
1637
+ "name": "doctor",
1638
+ "description": "Check this Mac can build and run HQ Capture",
1639
+ "aliases": [],
1640
+ "hidden": false,
1641
+ "helpOption": false,
1642
+ "helpCommand": false,
1643
+ "usage": "[args...]",
1644
+ "helpText": [],
1645
+ "arguments": [
1646
+ {
1647
+ "name": "args",
1648
+ "required": false,
1649
+ "variadic": true,
1650
+ "description": ""
1651
+ }
1652
+ ],
1653
+ "options": [],
1654
+ "subcommands": []
1655
+ },
1656
+ {
1657
+ "name": "build",
1658
+ "description": "Build HQ Capture if missing or out of date ([--force])",
1659
+ "aliases": [],
1660
+ "hidden": false,
1661
+ "helpOption": false,
1662
+ "helpCommand": false,
1663
+ "usage": "[args...]",
1664
+ "helpText": [],
1665
+ "arguments": [
1666
+ {
1667
+ "name": "args",
1668
+ "required": false,
1669
+ "variadic": true,
1670
+ "description": ""
1671
+ }
1672
+ ],
1673
+ "options": [],
1674
+ "subcommands": []
1675
+ },
1676
+ {
1677
+ "name": "start",
1678
+ "description": "Open HQ Capture for the session's company ([--company <slug>] [--record])",
1679
+ "aliases": [],
1680
+ "hidden": false,
1681
+ "helpOption": false,
1682
+ "helpCommand": false,
1683
+ "usage": "[args...]",
1684
+ "helpText": [],
1685
+ "arguments": [
1686
+ {
1687
+ "name": "args",
1688
+ "required": false,
1689
+ "variadic": true,
1690
+ "description": ""
1691
+ }
1692
+ ],
1693
+ "options": [],
1694
+ "subcommands": []
1695
+ },
1696
+ {
1697
+ "name": "record",
1698
+ "description": "Start recording in the open HQ Capture, as if Start was pressed",
1699
+ "aliases": [],
1700
+ "hidden": false,
1701
+ "helpOption": false,
1702
+ "helpCommand": false,
1703
+ "usage": "[args...]",
1704
+ "helpText": [],
1705
+ "arguments": [
1706
+ {
1707
+ "name": "args",
1708
+ "required": false,
1709
+ "variadic": true,
1710
+ "description": ""
1711
+ }
1712
+ ],
1713
+ "options": [],
1714
+ "subcommands": []
1715
+ },
1716
+ {
1717
+ "name": "status",
1718
+ "description": "Print HQ Capture's current status as JSON",
1719
+ "aliases": [],
1720
+ "hidden": false,
1721
+ "helpOption": false,
1722
+ "helpCommand": false,
1723
+ "usage": "[args...]",
1724
+ "helpText": [],
1725
+ "arguments": [
1726
+ {
1727
+ "name": "args",
1728
+ "required": false,
1729
+ "variadic": true,
1730
+ "description": ""
1731
+ }
1732
+ ],
1733
+ "options": [],
1734
+ "subcommands": []
1735
+ },
1736
+ {
1737
+ "name": "wait",
1738
+ "description": "Wait until the recording is saved, failed or closed ([--timeout <seconds>])",
1739
+ "aliases": [],
1740
+ "hidden": false,
1741
+ "helpOption": false,
1742
+ "helpCommand": false,
1743
+ "usage": "[args...]",
1744
+ "helpText": [],
1745
+ "arguments": [
1746
+ {
1747
+ "name": "args",
1748
+ "required": false,
1749
+ "variadic": true,
1750
+ "description": ""
1751
+ }
1752
+ ],
1753
+ "options": [],
1754
+ "subcommands": []
1755
+ },
1756
+ {
1757
+ "name": "stop",
1758
+ "description": "Stop HQ Capture, saving a recording in progress",
1759
+ "aliases": [],
1760
+ "hidden": false,
1761
+ "helpOption": false,
1762
+ "helpCommand": false,
1763
+ "usage": "[args...]",
1764
+ "helpText": [],
1765
+ "arguments": [
1766
+ {
1767
+ "name": "args",
1768
+ "required": false,
1769
+ "variadic": true,
1770
+ "description": ""
1771
+ }
1772
+ ],
1773
+ "options": [],
1774
+ "subcommands": []
1775
+ },
1776
+ {
1777
+ "name": "run",
1778
+ "description": "Run an agent command on a saved recording (<mode> <package> [args])",
1779
+ "aliases": [],
1780
+ "hidden": false,
1781
+ "helpOption": false,
1782
+ "helpCommand": false,
1783
+ "usage": "[args...]",
1784
+ "helpText": [],
1785
+ "arguments": [
1786
+ {
1787
+ "name": "args",
1788
+ "required": false,
1789
+ "variadic": true,
1790
+ "description": ""
1791
+ }
1792
+ ],
1793
+ "options": [],
1794
+ "subcommands": []
1795
+ },
1796
+ {
1797
+ "name": "resume",
1798
+ "description": "Check a pasted resume prompt and print its package (<prompt>)",
1799
+ "aliases": [],
1800
+ "hidden": false,
1801
+ "helpOption": false,
1802
+ "helpCommand": false,
1803
+ "usage": "[args...]",
1804
+ "helpText": [],
1805
+ "arguments": [
1806
+ {
1807
+ "name": "args",
1808
+ "required": false,
1809
+ "variadic": true,
1810
+ "description": ""
1811
+ }
1812
+ ],
1813
+ "options": [],
1814
+ "subcommands": []
1815
+ }
1816
+ ]
1817
+ },
1624
1818
  {
1625
1819
  "name": "auth",
1626
1820
  "description": "Manage the local HQ Cognito session",
@@ -213,6 +213,12 @@ export declare const REGISTRATION_PLAN: readonly [{
213
213
  readonly parent: "program";
214
214
  readonly module: "./commands/version.js";
215
215
  readonly exportName: "registerVersionCommand";
216
+ }, {
217
+ readonly type: "registrar";
218
+ readonly root: "capture";
219
+ readonly parent: "program";
220
+ readonly module: "./commands/capture.js";
221
+ readonly exportName: "registerCaptureCommand";
216
222
  }, {
217
223
  readonly type: "registrar";
218
224
  readonly root: "auth";
@@ -38,6 +38,7 @@ export const REGISTRATION_PLAN = [
38
38
  { type: "registrar", root: "resolve-company", parent: "program", module: "./commands/link.js", exportName: "registerResolveCompanyCommand" },
39
39
  { type: "registrar", root: "provider", parent: "program", module: "./commands/provider.js", exportName: "registerProviderCommand" },
40
40
  { type: "registrar", root: "version", parent: "program", module: "./commands/version.js", exportName: "registerVersionCommand" },
41
+ { type: "registrar", root: "capture", parent: "program", module: "./commands/capture.js", exportName: "registerCaptureCommand" },
41
42
  { type: "registrar", root: "auth", parent: "program", module: "./commands/auth.js", exportName: "registerAuthCommands" },
42
43
  { type: "registrar", root: "secrets", parent: "program", module: "./commands/secrets.js", exportName: "registerSecretsCommand" },
43
44
  { type: "registrar", root: "db", parent: "program", module: "./commands/db.js", exportName: "registerDbCommand" },
@@ -0,0 +1,25 @@
1
+ /**
2
+ * hq capture — drive HQ Capture (the hq-capture pack's screen recorder) from the CLI.
3
+ *
4
+ * Every subcommand runs the pack's launcher, `hq-record-process.sh`, from the HQ root with
5
+ * the arguments unchanged. The launcher owns company binding, the app's control folder and
6
+ * its JSON output; this command adds nothing to them, so the pack stays the one source of
7
+ * truth for what each subcommand does. The launcher's exit code becomes the CLI's (3 means
8
+ * `wait` timed out with HQ Capture still open).
9
+ */
10
+ import { type StdioOptions } from "node:child_process";
11
+ import type { Command } from "commander";
12
+ export declare const CAPTURE_LAUNCHER = "core/packages/hq-pack-hq-capture/scripts/hq-record-process.sh";
13
+ export declare const CAPTURE_SUBCOMMANDS: readonly ["doctor", "build", "start", "record", "status", "wait", "stop", "run", "resume"];
14
+ export interface CaptureRunOptions {
15
+ root: string;
16
+ stdio?: StdioOptions;
17
+ }
18
+ /** Runs the launcher with `args` and returns its exit code. */
19
+ export declare function runCapture(args: readonly string[], opts: CaptureRunOptions): number;
20
+ export interface CaptureRegisterOptions {
21
+ root?: () => string;
22
+ stdio?: StdioOptions;
23
+ }
24
+ export declare function registerCaptureCommand(program: Command, opts?: CaptureRegisterOptions): Command;
25
+ //# sourceMappingURL=capture.d.ts.map
@@ -0,0 +1,95 @@
1
+ /**
2
+ * hq capture — drive HQ Capture (the hq-capture pack's screen recorder) from the CLI.
3
+ *
4
+ * Every subcommand runs the pack's launcher, `hq-record-process.sh`, from the HQ root with
5
+ * the arguments unchanged. The launcher owns company binding, the app's control folder and
6
+ * its JSON output; this command adds nothing to them, so the pack stays the one source of
7
+ * truth for what each subcommand does. The launcher's exit code becomes the CLI's (3 means
8
+ * `wait` timed out with HQ Capture still open).
9
+ */
10
+ import { spawnSync } from "node:child_process";
11
+ import * as fs from "node:fs";
12
+ import * as path from "node:path";
13
+ import { resolveDefaultHqRoot } from "../utils/hq-root-resolver.js";
14
+ export const CAPTURE_LAUNCHER = "core/packages/hq-pack-hq-capture/scripts/hq-record-process.sh";
15
+ export const CAPTURE_SUBCOMMANDS = [
16
+ "doctor",
17
+ "build",
18
+ "start",
19
+ "record",
20
+ "status",
21
+ "wait",
22
+ "stop",
23
+ "run",
24
+ "resume",
25
+ ];
26
+ const DESCRIPTIONS = {
27
+ doctor: "Check this Mac can build and run HQ Capture",
28
+ build: "Build HQ Capture if missing or out of date ([--force])",
29
+ start: "Open HQ Capture for the session's company ([--company <slug>] [--record])",
30
+ record: "Start recording in the open HQ Capture, as if Start was pressed",
31
+ status: "Print HQ Capture's current status as JSON",
32
+ wait: "Wait until the recording is saved, failed or closed ([--timeout <seconds>])",
33
+ stop: "Stop HQ Capture, saving a recording in progress",
34
+ run: "Run an agent command on a saved recording (<mode> <package> [args])",
35
+ resume: "Check a pasted resume prompt and print its package (<prompt>)",
36
+ };
37
+ /** Runs the launcher with `args` and returns its exit code. */
38
+ export function runCapture(args, opts) {
39
+ const launcher = path.join(opts.root, CAPTURE_LAUNCHER);
40
+ if (!fs.existsSync(launcher)) {
41
+ process.stderr.write("HQ Capture is not installed in this HQ. Install it with: hq install hq-capture\n");
42
+ return 1;
43
+ }
44
+ const result = spawnSync("bash", [launcher, ...args], {
45
+ cwd: opts.root,
46
+ stdio: opts.stdio ?? "inherit",
47
+ env: process.env,
48
+ });
49
+ if (result.error) {
50
+ process.stderr.write(`Could not run HQ Capture: ${result.error.message}\n`);
51
+ return 1;
52
+ }
53
+ if (result.signal)
54
+ return 1;
55
+ return result.status ?? 1;
56
+ }
57
+ export function registerCaptureCommand(program, opts = {}) {
58
+ const capture = program
59
+ .command("capture")
60
+ .description("Record your screen with HQ Capture: start, record, stop, status and wait");
61
+ for (const name of CAPTURE_SUBCOMMANDS) {
62
+ capture
63
+ .command(name)
64
+ .description(DESCRIPTIONS[name])
65
+ .argument("[args...]")
66
+ .allowUnknownOption(true)
67
+ .allowExcessArguments(true)
68
+ .helpOption(false)
69
+ .action((_args, _options, command) => {
70
+ const root = opts.root ? opts.root() : resolveDefaultHqRoot({ onMissing: "throw" });
71
+ const forwarded = rawArgsAfter(command, name) ?? command.args;
72
+ process.exitCode = runCapture([name, ...forwarded], { root, stdio: opts.stdio });
73
+ });
74
+ }
75
+ return capture;
76
+ }
77
+ /**
78
+ * The arguments typed after `capture <name>`, exactly as given. Commander drops a `--`
79
+ * separator from `command.args`, which would change what the launcher receives, so the
80
+ * slice comes from the root command's raw argv. Returns undefined when it can't be found.
81
+ */
82
+ function rawArgsAfter(command, name) {
83
+ let root = command;
84
+ while (root.parent)
85
+ root = root.parent;
86
+ const raw = root.rawArgs;
87
+ if (!Array.isArray(raw))
88
+ return undefined;
89
+ for (let i = 0; i + 1 < raw.length; i++) {
90
+ if (raw[i] === "capture" && raw[i + 1] === name)
91
+ return raw.slice(i + 2);
92
+ }
93
+ return undefined;
94
+ }
95
+ //# sourceMappingURL=capture.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.345.120",
3
+ "version": "5.345.121",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {