@indigoai-us/hq-cli 5.71.0 → 5.72.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.
Files changed (115) hide show
  1. package/dist/bin/hq-auth-refresh.js +1 -4
  2. package/dist/cli-version.js +1 -4
  3. package/dist/commands/__fixtures__/make-tar.js +1 -4
  4. package/dist/commands/_patterns.js +1 -4
  5. package/dist/commands/add.js +1 -4
  6. package/dist/commands/agents.js +1 -4
  7. package/dist/commands/api-keys.js +1 -4
  8. package/dist/commands/auth.js +1 -4
  9. package/dist/commands/billing.js +1 -4
  10. package/dist/commands/channels.js +1 -4
  11. package/dist/commands/cloud-demote.js +1 -4
  12. package/dist/commands/cloud-provision.js +1 -4
  13. package/dist/commands/cloud.js +1 -4
  14. package/dist/commands/company.js +1 -4
  15. package/dist/commands/creators.js +1 -4
  16. package/dist/commands/crm.js +1 -4
  17. package/dist/commands/db-migrate.js +1 -4
  18. package/dist/commands/db-provision.js +1 -4
  19. package/dist/commands/db-sql.js +1 -4
  20. package/dist/commands/db-status.js +1 -4
  21. package/dist/commands/db.js +1 -4
  22. package/dist/commands/dm.js +1 -4
  23. package/dist/commands/feedback.js +1 -4
  24. package/dist/commands/files-browse.js +1 -4
  25. package/dist/commands/files.js +1 -4
  26. package/dist/commands/group-grants.js +1 -4
  27. package/dist/commands/groups.js +1 -4
  28. package/dist/commands/integrations.js +1 -4
  29. package/dist/commands/list.js +1 -4
  30. package/dist/commands/login.js +1 -4
  31. package/dist/commands/logout.js +1 -4
  32. package/dist/commands/mcp-registration.js +1 -4
  33. package/dist/commands/mcp-status.js +1 -4
  34. package/dist/commands/meetings.js +1 -4
  35. package/dist/commands/members.js +1 -4
  36. package/dist/commands/onboard-identity-guard.js +1 -4
  37. package/dist/commands/onboard-join.js +1 -4
  38. package/dist/commands/onboard-warning.js +1 -4
  39. package/dist/commands/onboard.js +1 -4
  40. package/dist/commands/outposts.d.ts +23 -1
  41. package/dist/commands/outposts.js +172 -8
  42. package/dist/commands/pack-install.js +1 -4
  43. package/dist/commands/packs.js +1 -4
  44. package/dist/commands/people.js +1 -4
  45. package/dist/commands/pkg-install.js +1 -4
  46. package/dist/commands/pkg-list.js +1 -4
  47. package/dist/commands/pkg-remove.js +1 -4
  48. package/dist/commands/pkg-update.js +1 -4
  49. package/dist/commands/publish.js +1 -4
  50. package/dist/commands/reindex.js +1 -4
  51. package/dist/commands/rescue.js +1 -4
  52. package/dist/commands/run.js +1 -4
  53. package/dist/commands/safe-extract.js +1 -4
  54. package/dist/commands/secrets-scope.js +1 -4
  55. package/dist/commands/secrets.js +1 -4
  56. package/dist/commands/signals.js +1 -4
  57. package/dist/commands/skill.js +1 -4
  58. package/dist/commands/sources.js +1 -4
  59. package/dist/commands/sync-mode.js +1 -4
  60. package/dist/commands/sync-narrow.js +1 -4
  61. package/dist/commands/sync.js +1 -4
  62. package/dist/commands/team-sync.js +1 -4
  63. package/dist/commands/update.js +1 -4
  64. package/dist/commands/whoami.js +1 -4
  65. package/dist/commands/workers.js +1 -4
  66. package/dist/index.js +1 -4
  67. package/dist/lib/db/control-plane.js +1 -4
  68. package/dist/lib/db/local.js +1 -4
  69. package/dist/lib/db/migrate.js +1 -4
  70. package/dist/lib/db/paths.js +1 -4
  71. package/dist/lib/db/remote-engine.js +1 -4
  72. package/dist/lib/db/remote-sql.js +1 -4
  73. package/dist/lib/db/sql.js +1 -4
  74. package/dist/lib/local-tree-diff.js +1 -4
  75. package/dist/lib/narrow-hint-banner.js +1 -4
  76. package/dist/main.js +1 -4
  77. package/dist/node-preflight.js +1 -4
  78. package/dist/run/discover-schemas.js +1 -4
  79. package/dist/run/hq-plugin.js +1 -4
  80. package/dist/sentry-before-send.js +1 -4
  81. package/dist/sentry-dsn.generated.js +1 -4
  82. package/dist/sentry.js +1 -4
  83. package/dist/strategies/link.js +1 -4
  84. package/dist/strategies/merge.js +1 -4
  85. package/dist/types.js +1 -4
  86. package/dist/utils/billing-gate.js +1 -4
  87. package/dist/utils/breadcrumb-buffer.js +1 -4
  88. package/dist/utils/cli-telemetry.js +1 -4
  89. package/dist/utils/cognito-session.js +1 -4
  90. package/dist/utils/contribution-table.js +1 -4
  91. package/dist/utils/environmental-error.js +1 -4
  92. package/dist/utils/epipe.js +1 -4
  93. package/dist/utils/feedback-diagnostics.js +1 -4
  94. package/dist/utils/feedback-screenshots.js +1 -4
  95. package/dist/utils/feedback-versions.js +1 -4
  96. package/dist/utils/git.js +1 -4
  97. package/dist/utils/integrity.js +1 -4
  98. package/dist/utils/intercepted-process-exit.js +1 -4
  99. package/dist/utils/login-provider.js +1 -4
  100. package/dist/utils/manifest.js +1 -4
  101. package/dist/utils/pack-contributions.js +1 -4
  102. package/dist/utils/people.js +1 -4
  103. package/dist/utils/registry-client.js +1 -4
  104. package/dist/utils/registry.js +1 -4
  105. package/dist/utils/sandbox-runner-client.js +1 -4
  106. package/dist/utils/secrets-cache.js +1 -4
  107. package/dist/utils/sentry-identity.js +1 -4
  108. package/dist/utils/vault-api.js +1 -4
  109. package/dist/utils/version-check.js +1 -4
  110. package/dist/utils/version-gate.js +1 -4
  111. package/package.json +3 -2
  112. package/scripts/chmod-bins.mjs +49 -0
  113. package/src/commands/outposts-replica-sync.test.ts +272 -0
  114. package/src/commands/outposts.ts +258 -5
  115. package/src/packaging.test.ts +55 -0
@@ -188,5 +188,27 @@ export interface SelfDeployDependencies {
188
188
  defaultHqRoot: () => string;
189
189
  invokingUser: () => string;
190
190
  }
191
- export declare function registerOutpostsCommand(program: Command, selfDeployOverrides?: Partial<SelfDeployDependencies>): void;
191
+ /**
192
+ * The extra local surface `replica-sync` needs on top of the self-deploy set:
193
+ * two filesystem probes for the repos clone. Kept as an extension so the
194
+ * `self-deploy` dependency surface stays minimal.
195
+ */
196
+ export interface ReplicaSyncDependencies extends SelfDeployDependencies {
197
+ pathExists: (p: string) => boolean;
198
+ mkdirp: (p: string) => void;
199
+ }
200
+ /** One repo entry resolved from `personal/data/repos.yaml`. */
201
+ export interface ReplicaRepo {
202
+ url: string;
203
+ visibility: "public" | "private";
204
+ name: string;
205
+ }
206
+ /**
207
+ * Parse `personal/data/repos.yaml` into a clone list. Pure + exported for
208
+ * tests. Mirrors setup.sh's `clone_repos`: `visibility` defaults to public,
209
+ * `name` defaults to the URL basename. Malformed entries are skipped, never
210
+ * thrown.
211
+ */
212
+ export declare function parseReposManifest(yamlText: string): ReplicaRepo[];
213
+ export declare function registerOutpostsCommand(program: Command, selfDeployOverrides?: Partial<ReplicaSyncDependencies>): void;
192
214
  //# sourceMappingURL=outposts.d.ts.map
@@ -20,8 +20,6 @@
20
20
  * web console can't rename them either), so this CLI wraps only the lifecycle
21
21
  * and status routes that exist. Renaming an Outpost is not a backend capability.
22
22
  */
23
-
24
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="839f8f76-584d-5ea8-b86e-a92a55c32a16")}catch(e){}}();
25
23
  import chalk from "chalk";
26
24
  import { spawnSync } from "node:child_process";
27
25
  import * as fs from "node:fs";
@@ -29,6 +27,7 @@ import * as os from "node:os";
29
27
  import * as path from "node:path";
30
28
  import * as readline from "node:readline";
31
29
  import { randomBytes } from "node:crypto";
30
+ import * as yaml from "js-yaml";
32
31
  import { loadCachedTokens } from "@indigoai-us/hq-cloud";
33
32
  import { ensureCognitoToken } from "../utils/cognito-session.js";
34
33
  import { vaultApiFetch } from "../utils/vault-api.js";
@@ -506,9 +505,161 @@ async function selfDeployOutpost(opts, deps) {
506
505
  console.log(chalk.dim("Check it with: systemctl status outpost-sync.service"));
507
506
  console.log(chalk.dim("It is unregistered and unmanaged by hq-pro (no console entry or remote management)."));
508
507
  }
508
+ const defaultReplicaSyncDependencies = {
509
+ ...defaultSelfDeployDependencies,
510
+ pathExists: (p) => fs.existsSync(p),
511
+ mkdirp: (p) => {
512
+ fs.mkdirSync(p, { recursive: true });
513
+ },
514
+ };
515
+ function repoNameFromUrl(url) {
516
+ const tail = url.split("/").pop() ?? "";
517
+ return tail.replace(/\.git$/, "").trim();
518
+ }
519
+ /**
520
+ * A repo `name` becomes a path segment under repos/<visibility>/. A synced
521
+ * repos.yaml is operator data, but a malformed or hostile name must never
522
+ * escape that directory, so constrain it to a single, non-traversal component.
523
+ */
524
+ function isSafePathComponent(value) {
525
+ return (value.length > 0 &&
526
+ !value.includes("/") &&
527
+ !value.includes("\\") &&
528
+ value !== "." &&
529
+ value !== "..");
530
+ }
531
+ /**
532
+ * Parse `personal/data/repos.yaml` into a clone list. Pure + exported for
533
+ * tests. Mirrors setup.sh's `clone_repos`: `visibility` defaults to public,
534
+ * `name` defaults to the URL basename. Malformed entries are skipped, never
535
+ * thrown.
536
+ */
537
+ export function parseReposManifest(yamlText) {
538
+ let doc;
539
+ try {
540
+ doc = yaml.load(yamlText);
541
+ }
542
+ catch {
543
+ return [];
544
+ }
545
+ const rawRepos = doc?.repos;
546
+ if (!Array.isArray(rawRepos))
547
+ return [];
548
+ const out = [];
549
+ for (const entry of rawRepos) {
550
+ if (!entry || typeof entry !== "object")
551
+ continue;
552
+ const e = entry;
553
+ const url = typeof e.url === "string" ? e.url.trim() : "";
554
+ if (!url)
555
+ continue;
556
+ const visibility = e.visibility === "private" ? "private" : "public";
557
+ const name = typeof e.name === "string" && e.name.trim()
558
+ ? e.name.trim()
559
+ : repoNameFromUrl(url);
560
+ if (!isSafePathComponent(name))
561
+ continue;
562
+ out.push({ url, visibility, name });
563
+ }
564
+ return out;
565
+ }
566
+ /**
567
+ * Best-effort spawn: log a one-line outcome and carry on. NEVER throws and
568
+ * NEVER echoes child output — the same secret-safety stance as `runChecked`,
569
+ * since these children (auth refresh, secrets exec) touch credentials.
570
+ */
571
+ function runBestEffort(deps, command, args, description, options) {
572
+ let result;
573
+ try {
574
+ result = deps.spawnSync(command, args, options ?? { stdio: "inherit" });
575
+ }
576
+ catch {
577
+ console.warn(`replica-sync: ${description} could not run — continuing.`);
578
+ return false;
579
+ }
580
+ if (!result || result.error || result.status !== 0) {
581
+ console.warn(`replica-sync: ${description} did not complete cleanly — continuing.`);
582
+ return false;
583
+ }
584
+ return true;
585
+ }
586
+ /**
587
+ * Authenticate `gh` for private clones by streaming GITHUB_TOKEN through the
588
+ * vault into the child's ENV ONLY, unsetting it in-shell, and piping it to
589
+ * `gh auth login --with-token` over stdin. The token never touches argv or
590
+ * this process's logs. Mirrors personal/scripts/setup.sh's `configure_gh`.
591
+ */
592
+ function authGitHubViaVault(deps) {
593
+ const ghLogin = [
594
+ 'TOKEN="$GITHUB_TOKEN"',
595
+ "unset GITHUB_TOKEN",
596
+ 'printf "%s" "$TOKEN" | gh auth login --with-token',
597
+ ].join("\n");
598
+ const authed = runBestEffort(deps, "hq", ["secrets", "--personal", "exec", "--only", "GITHUB_TOKEN", "--", "bash", "-c", ghLogin], "GitHub auth via vault");
599
+ if (authed) {
600
+ // Let plain `git clone https://github.com/...` reuse gh's token so private
601
+ // repos don't prompt for a username/password.
602
+ runBestEffort(deps, "gh", ["auth", "setup-git"], "gh auth setup-git");
603
+ }
604
+ }
605
+ /** Clone any repos from `personal/data/repos.yaml` that aren't on disk yet. */
606
+ function replicateRepos(deps, hqRoot) {
607
+ const manifestPath = path.join(hqRoot, "personal", "data", "repos.yaml");
608
+ let manifestText;
609
+ try {
610
+ manifestText = deps.readTextFile(manifestPath);
611
+ }
612
+ catch {
613
+ console.log("replica-sync: no personal/data/repos.yaml — skipping repo clone.");
614
+ return;
615
+ }
616
+ const repos = parseReposManifest(manifestText);
617
+ if (repos.length === 0) {
618
+ console.log("replica-sync: repos.yaml lists no repos — skipping.");
619
+ return;
620
+ }
621
+ const missing = repos.filter((repo) => !deps.pathExists(path.join(hqRoot, "repos", repo.visibility, repo.name, ".git")));
622
+ if (missing.length === 0) {
623
+ console.log("replica-sync: all repos already present.");
624
+ return;
625
+ }
626
+ // Private repos need gh auth first; public-only manifests skip the vault call.
627
+ if (missing.some((repo) => repo.visibility === "private")) {
628
+ authGitHubViaVault(deps);
629
+ }
630
+ for (const repo of missing) {
631
+ deps.mkdirp(path.join(hqRoot, "repos", repo.visibility));
632
+ const dest = path.join(hqRoot, "repos", repo.visibility, repo.name);
633
+ console.log(`replica-sync: cloning ${repo.visibility}/${repo.name}…`);
634
+ runBestEffort(deps, "git", ["clone", "--recurse-submodules", repo.url, dest], `clone ${repo.visibility}/${repo.name}`);
635
+ }
636
+ }
637
+ async function replicaSyncOutpost(opts, deps) {
638
+ const hqRoot = opts.hqRoot ?? deps.defaultHqRoot();
639
+ // Gate: only replicate on a box that has an HQ session. A box that was never
640
+ // signed in has nothing to pull — exit cleanly so the timer stays green.
641
+ const session = deps.loadCachedTokens();
642
+ if (!session?.refreshToken) {
643
+ console.log("replica-sync: no HQ session on this box yet — nothing to replicate.");
644
+ return;
645
+ }
646
+ // Auth refresh gates the run: if the seeded refresh token is dead, every
647
+ // authenticated step below (pull, secrets exec) would just cascade 401s.
648
+ // Stop the cycle cleanly instead — the timer retries next tick.
649
+ if (!runBestEffort(deps, "hq", ["auth", "refresh"], "HQ auth refresh")) {
650
+ console.warn("replica-sync: auth refresh failed — skipping this cycle (token likely expired).");
651
+ return;
652
+ }
653
+ runBestEffort(deps, "hq", ["sync", "pull", "--personal", "--hq-root", hqRoot, "--on-conflict", "keep"], "personal vault pull");
654
+ // rescue lays down the core kernel and expects companies/ to exist.
655
+ deps.mkdirp(path.join(hqRoot, "companies"));
656
+ runBestEffort(deps, "hq", ["rescue", "--hq-root", hqRoot, "--yes"], "HQ kernel rescue");
657
+ replicateRepos(deps, hqRoot);
658
+ console.log("replica-sync: complete.");
659
+ }
509
660
  export function registerOutpostsCommand(program, selfDeployOverrides = {}) {
510
- const selfDeployDependencies = {
511
- ...defaultSelfDeployDependencies,
661
+ const deps = {
662
+ ...defaultReplicaSyncDependencies,
512
663
  ...selfDeployOverrides,
513
664
  };
514
665
  const outposts = program
@@ -518,15 +669,29 @@ export function registerOutpostsCommand(program, selfDeployOverrides = {}) {
518
669
  .command("self-deploy", { hidden: true })
519
670
  .description("Configure this EC2 host as a locally self-hosted HQ outpost")
520
671
  .option("--yes", "Skip the self-hosting confirmation")
521
- .option("--hq-root <path>", "HQ root to sync", selfDeployDependencies.defaultHqRoot())
672
+ .option("--hq-root <path>", "HQ root to sync", deps.defaultHqRoot())
522
673
  .action(async (opts) => {
523
674
  try {
524
- await selfDeployOutpost(opts, selfDeployDependencies);
675
+ await selfDeployOutpost(opts, deps);
525
676
  }
526
677
  catch (err) {
527
678
  fail(err);
528
679
  }
529
680
  });
681
+ outposts
682
+ .command("replica-sync", { hidden: true })
683
+ .description("Replicate your full HQ onto this box (personal pull + core rescue + repos). Runs on a timer.")
684
+ .option("--hq-root <path>", "HQ root to replicate into", deps.defaultHqRoot())
685
+ .action(async (opts) => {
686
+ // Best-effort background job: never hard-fail the systemd unit on a
687
+ // transient step. Swallow, log, and exit 0.
688
+ try {
689
+ await replicaSyncOutpost(opts, deps);
690
+ }
691
+ catch (err) {
692
+ console.warn(`replica-sync: unexpected error — ${err instanceof Error ? err.message : String(err)}`);
693
+ }
694
+ });
530
695
  outposts
531
696
  .command("provision")
532
697
  .alias("create")
@@ -885,5 +1050,4 @@ export function registerOutpostsCommand(program, selfDeployOverrides = {}) {
885
1050
  }
886
1051
  });
887
1052
  }
888
- //# sourceMappingURL=outposts.js.map
889
- //# debugId=839f8f76-584d-5ea8-b86e-a92a55c32a16
1053
+ //# sourceMappingURL=outposts.js.map
@@ -33,8 +33,6 @@
33
33
  * registry file under the v12 layout. (`hq update <pack>` re-resolves source
34
34
  * from each pack's package.yaml; rationale lives in the layout-fix PR.)
35
35
  */
36
-
37
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a90272ca-94a1-5905-85f8-af12a01cb58a")}catch(e){}}();
38
36
  import * as fs from 'fs';
39
37
  import * as os from 'os';
40
38
  import * as path from 'path';
@@ -1699,5 +1697,4 @@ export async function installPack(source, opts = {}) {
1699
1697
  fs.rmSync(tmpDir, { recursive: true, force: true });
1700
1698
  }
1701
1699
  }
1702
- //# sourceMappingURL=pack-install.js.map
1703
- //# debugId=a90272ca-94a1-5905-85f8-af12a01cb58a
1700
+ //# sourceMappingURL=pack-install.js.map
@@ -16,8 +16,6 @@
16
16
  *
17
17
  * Spec: knowledge/public/hq-core/package-yaml-spec.md.
18
18
  */
19
-
20
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b743f774-8d9b-594b-9ce4-e7f5a44faca0")}catch(e){}}();
21
19
  import * as fs from 'fs';
22
20
  import * as path from 'path';
23
21
  import * as readline from 'readline';
@@ -469,5 +467,4 @@ export function registerPacksCommand(parent) {
469
467
  }
470
468
  });
471
469
  }
472
- //# sourceMappingURL=packs.js.map
473
- //# debugId=b743f774-8d9b-594b-9ce4-e7f5a44faca0
470
+ //# sourceMappingURL=packs.js.map
@@ -11,8 +11,6 @@
11
11
  * roster for exactly ONE company (the active company, or the one named by
12
12
  * `--company`); nothing reads across company boundaries.
13
13
  */
14
-
15
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="555055d9-98e2-5fcd-b736-4b1df12daf4d")}catch(e){}}();
16
14
  import * as fs from "fs";
17
15
  import { Option } from "commander";
18
16
  import chalk from "chalk";
@@ -292,5 +290,4 @@ export function registerPeopleCommand(program, deps = {}) {
292
290
  }
293
291
  });
294
292
  }
295
- //# sourceMappingURL=people.js.map
296
- //# debugId=555055d9-98e2-5fcd-b736-4b1df12daf4d
293
+ //# sourceMappingURL=people.js.map
@@ -12,8 +12,6 @@
12
12
  * 8. Update packages/registry.yaml
13
13
  * 9. Print next-step message
14
14
  */
15
-
16
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ccc2e70c-f577-5a47-9a29-31a206194392")}catch(e){}}();
17
15
  import * as fs from 'fs';
18
16
  import * as os from 'os';
19
17
  import * as path from 'path';
@@ -165,5 +163,4 @@ async function installPackage(slug, company) {
165
163
  }
166
164
  }
167
165
  }
168
- //# sourceMappingURL=pkg-install.js.map
169
- //# debugId=ccc2e70c-f577-5a47-9a29-31a206194392
166
+ //# sourceMappingURL=pkg-install.js.map
@@ -4,11 +4,8 @@
4
4
  * Package installs use the content-pack installer, so this command delegates
5
5
  * to the same list view as `hq packs list`.
6
6
  */
7
-
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="96eb060c-c1d0-5874-918f-e818f92c6242")}catch(e){}}();
9
7
  import { registerPacksListCommand } from './packs.js';
10
8
  export function registerPackageListCommand(parent) {
11
9
  registerPacksListCommand(parent);
12
10
  }
13
- //# sourceMappingURL=pkg-list.js.map
14
- //# debugId=96eb060c-c1d0-5874-918f-e818f92c6242
11
+ //# sourceMappingURL=pkg-list.js.map
@@ -5,8 +5,6 @@
5
5
  * 2. Remove entry from packages/registry.yaml
6
6
  * 3. Print next-step message
7
7
  */
8
-
9
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e44da498-3e38-5643-b124-49aa2e91f42b")}catch(e){}}();
10
8
  import * as fs from 'fs';
11
9
  import * as path from 'path';
12
10
  import chalk from 'chalk';
@@ -52,5 +50,4 @@ async function removePackage(slug) {
52
50
  console.log(chalk.green(`\nRemoved ${slug}.`));
53
51
  console.log(chalk.cyan('Run /package-remove ' + slug + ' in Claude to clean up merged content.'));
54
52
  }
55
- //# sourceMappingURL=pkg-remove.js.map
56
- //# debugId=e44da498-3e38-5643-b124-49aa2e91f42b
53
+ //# sourceMappingURL=pkg-remove.js.map
@@ -4,8 +4,6 @@
4
4
  * If no slug: check all installed packages for updates.
5
5
  * If slug given: update only that package.
6
6
  */
7
-
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="35fae6a0-f8e1-5fde-90d8-34ae4adb3c1c")}catch(e){}}();
9
7
  import * as fs from 'fs';
10
8
  import * as os from 'os';
11
9
  import * as path from 'path';
@@ -123,5 +121,4 @@ async function updatePackages(slug) {
123
121
  }
124
122
  console.log(`\n${updatedCount} package(s) updated${updatedCount > 0 ? '.' : ' — everything is current.'}`);
125
123
  }
126
- //# sourceMappingURL=pkg-update.js.map
127
- //# debugId=35fae6a0-f8e1-5fde-90d8-34ae4adb3c1c
124
+ //# sourceMappingURL=pkg-update.js.map
@@ -27,8 +27,6 @@
27
27
  * - pack-install.ts:validateManifest (the 10 validation rules)
28
28
  * - manifest.ts (modules.yaml read/write for provenance)
29
29
  */
30
-
31
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2f6607e-188c-57f9-beba-a81488d15225")}catch(e){}}();
32
30
  import * as fs from 'fs';
33
31
  import * as os from 'os';
34
32
  import * as path from 'path';
@@ -405,5 +403,4 @@ export function registerPublishCommand(program) {
405
403
  }
406
404
  });
407
405
  }
408
- //# sourceMappingURL=publish.js.map
409
- //# debugId=e2f6607e-188c-57f9-beba-a81488d15225
406
+ //# sourceMappingURL=publish.js.map
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="91aee9b3-dd72-5f05-99a8-d23b37f5eabe")}catch(e){}}();
3
1
  import { reindex } from '@indigoai-us/hq-cloud';
4
2
  export function registerReindexCommand(program) {
5
3
  program
@@ -34,5 +32,4 @@ export function registerReindexCommand(program) {
34
32
  process.exit(status);
35
33
  });
36
34
  }
37
- //# sourceMappingURL=reindex.js.map
38
- //# debugId=91aee9b3-dd72-5f05-99a8-d23b37f5eabe
35
+ //# sourceMappingURL=reindex.js.map
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e0da62c9-7fd5-5514-b2d0-1b5b76ebcd21")}catch(e){}}();
3
1
  import { spawnSync } from 'child_process';
4
2
  import * as fs from 'fs';
5
3
  import * as path from 'path';
@@ -157,5 +155,4 @@ export function registerRescueCommand(program) {
157
155
  }
158
156
  });
159
157
  }
160
- //# sourceMappingURL=rescue.js.map
161
- //# debugId=e0da62c9-7fd5-5514-b2d0-1b5b76ebcd21
158
+ //# sourceMappingURL=rescue.js.map
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="26bb7e02-3864-5c66-8232-3abc8fc17dc1")}catch(e){}}();
3
1
  import { spawn } from 'node:child_process';
4
2
  import * as path from 'node:path';
5
3
  import * as fs from 'node:fs';
@@ -144,5 +142,4 @@ export function registerRunCommand(program) {
144
142
  }
145
143
  });
146
144
  }
147
- //# sourceMappingURL=run.js.map
148
- //# debugId=26bb7e02-3864-5c66-8232-3abc8fc17dc1
145
+ //# sourceMappingURL=run.js.map
@@ -32,8 +32,6 @@
32
32
  * actually written (we do NOT rely solely on the pre-flight scan or on the
33
33
  * tar binary's own protections).
34
34
  */
35
-
36
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="372e4f76-03b2-5287-ac66-249543f88937")}catch(e){}}();
37
35
  import { execFileSync } from 'child_process';
38
36
  import * as fs from 'fs';
39
37
  import * as path from 'path';
@@ -343,5 +341,4 @@ export function safeExtractTarball(tarballPath, finalDir, opts = {}) {
343
341
  }
344
342
  }
345
343
  }
346
- //# sourceMappingURL=safe-extract.js.map
347
- //# debugId=372e4f76-03b2-5287-ac66-249543f88937
344
+ //# sourceMappingURL=safe-extract.js.map
@@ -1,6 +1,4 @@
1
1
  /** Human label for a secrets scope: "your personal vault" or "company <slug-or-uid>". */
2
-
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="718913a3-f80f-5bff-928e-a7aa9f51dd0d")}catch(e){}}();
4
2
  export function describeSecretsScope(ref) {
5
3
  if (ref.personal)
6
4
  return "your personal vault";
@@ -15,5 +13,4 @@ export function formatSecretsListHeader(scope) {
15
13
  export function formatSecretsListEmpty(scope) {
16
14
  return `No secrets found for ${scope}.`;
17
15
  }
18
- //# sourceMappingURL=secrets-scope.js.map
19
- //# debugId=718913a3-f80f-5bff-928e-a7aa9f51dd0d
16
+ //# sourceMappingURL=secrets-scope.js.map
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="136bd272-0091-5fce-9a93-a2a375f98b38")}catch(e){}}();
3
1
  import chalk from "chalk";
4
2
  import * as readline from "node:readline";
5
3
  import { spawn } from "node:child_process";
@@ -1396,5 +1394,4 @@ export function registerSecretsCommand(program) {
1396
1394
  console.log(chalk.green("Secrets cache cleared."));
1397
1395
  });
1398
1396
  }
1399
- //# sourceMappingURL=secrets.js.map
1400
- //# debugId=136bd272-0091-5fce-9a93-a2a375f98b38
1397
+ //# sourceMappingURL=secrets.js.map
@@ -19,8 +19,6 @@
19
19
  * agents can't fabricate a signal type even if they bypass the CLI's
20
20
  * --type flag parsing.
21
21
  */
22
-
23
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="395fa417-375a-55e7-b881-e65431742835")}catch(e){}}();
24
22
  import * as fs from "node:fs";
25
23
  import * as path from "node:path";
26
24
  import chalk from "chalk";
@@ -241,5 +239,4 @@ export function registerSignalsCommand(program) {
241
239
  .option("--format <fmt>", "Output format: table | json (default: table for TTY, json piped)")
242
240
  .action(withErrorHandling(async (options) => runEntities(options)));
243
241
  }
244
- //# sourceMappingURL=signals.js.map
245
- //# debugId=395fa417-375a-55e7-b881-e65431742835
242
+ //# sourceMappingURL=signals.js.map
@@ -32,8 +32,6 @@
32
32
  * derived `authorPersonUid`; the CLI never sends an author. An optional
33
33
  * `--note` rides as `authorNote` (the change's rationale / failure context).
34
34
  */
35
-
36
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5bdf8a18-3088-5615-b596-9be2c9fdb5cc")}catch(e){}}();
37
35
  import * as fs from "node:fs";
38
36
  import * as path from "node:path";
39
37
  import { createHash } from "node:crypto";
@@ -589,5 +587,4 @@ export function registerSkillCommand(program, deps = {}) {
589
587
  });
590
588
  return skill;
591
589
  }
592
- //# sourceMappingURL=skill.js.map
593
- //# debugId=5bdf8a18-3088-5615-b596-9be2c9fdb5cc
590
+ //# sourceMappingURL=skill.js.map
@@ -17,8 +17,6 @@
17
17
  * --format 'table' when stdout is a TTY, 'json' when piped.
18
18
  * --limit 50.
19
19
  */
20
-
21
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1123e933-4c37-5679-ae51-84cffd42e31b")}catch(e){}}();
22
20
  import * as fs from "node:fs";
23
21
  import * as path from "node:path";
24
22
  import chalk from "chalk";
@@ -251,5 +249,4 @@ export function registerSourcesCommand(program) {
251
249
  .option("--format <fmt>", "Output format: table | json (default: table for TTY, json piped)")
252
250
  .action(withErrorHandling(async (options) => runEntities(options)));
253
251
  }
254
- //# sourceMappingURL=sources.js.map
255
- //# debugId=1123e933-4c37-5679-ae51-84cffd42e31b
252
+ //# sourceMappingURL=sources.js.map
@@ -30,8 +30,6 @@
30
30
  * in package.json — revert that line to `^5.20.0` (or whatever the
31
31
  * published cut is) once US-004 ships to npm.
32
32
  */
33
-
34
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="534a51ec-53e8-5cde-98c6-5ffc1741d2c1")}catch(e){}}();
35
33
  import chalk from "chalk";
36
34
  import * as fs from "node:fs";
37
35
  import * as path from "node:path";
@@ -245,5 +243,4 @@ export function registerSyncModeCommand(syncCmd) {
245
243
  }
246
244
  });
247
245
  }
248
- //# sourceMappingURL=sync-mode.js.map
249
- //# debugId=534a51ec-53e8-5cde-98c6-5ffc1741d2c1
246
+ //# sourceMappingURL=sync-mode.js.map
@@ -36,8 +36,6 @@
36
36
  * release is unpublished, hq-cli pins `@indigoai-us/hq-cloud` to
37
37
  * `file:../hq-cloud` via `pnpm.overrides`.
38
38
  */
39
-
40
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8cdf980e-e3cf-585c-b2e5-1615765675a1")}catch(e){}}();
41
39
  import chalk from "chalk";
42
40
  import * as readline from "node:readline";
43
41
  import * as fs from "node:fs";
@@ -334,5 +332,4 @@ export function registerSyncNarrowCommand(syncCmd) {
334
332
  }
335
333
  });
336
334
  }
337
- //# sourceMappingURL=sync-narrow.js.map
338
- //# debugId=8cdf980e-e3cf-585c-b2e5-1615765675a1
335
+ //# sourceMappingURL=sync-narrow.js.map
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * hq modules sync command (US-004)
3
3
  */
4
-
5
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="abaf6ba7-702e-53e3-9d38-21182f05e529")}catch(e){}}();
6
4
  import * as fs from 'fs';
7
5
  import * as path from 'path';
8
6
  import { findHqRoot, readManifest, readLock, writeLock, getModulesDir, } from '../utils/manifest.js';
@@ -111,5 +109,4 @@ export function registerSyncCommand(program) {
111
109
  }
112
110
  });
113
111
  }
114
- //# sourceMappingURL=sync.js.map
115
- //# debugId=abaf6ba7-702e-53e3-9d38-21182f05e529
112
+ //# sourceMappingURL=sync.js.map
@@ -9,8 +9,6 @@
9
9
  * 5. Report what changed (new, updated, removed files)
10
10
  * 6. Gracefully handle conflicts (warn, don't force overwrite)
11
11
  */
12
-
13
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2b2504c1-06d5-59f8-a9b3-41d1af7f745f")}catch(e){}}();
14
12
  import * as fs from 'fs';
15
13
  import * as path from 'path';
16
14
  import { execSync } from 'child_process';
@@ -421,5 +419,4 @@ export function registerTeamSyncCommand(program) {
421
419
  }
422
420
  });
423
421
  }
424
- //# sourceMappingURL=team-sync.js.map
425
- //# debugId=2b2504c1-06d5-59f8-a9b3-41d1af7f745f
422
+ //# sourceMappingURL=team-sync.js.map
@@ -2,8 +2,6 @@
2
2
  * hq modules update command (US-008)
3
3
  * Updates lock for specific module
4
4
  */
5
-
6
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ed0bfb79-4403-57a0-85eb-766bc4110b67")}catch(e){}}();
7
5
  import * as path from 'path';
8
6
  import { findHqRoot, readManifest, readLock, writeLock, getModulesDir } from '../utils/manifest.js';
9
7
  import { fetchRepo, pullRepo, getCurrentCommit, isRepo } from '../utils/git.js';
@@ -59,5 +57,4 @@ export function registerUpdateCommand(program) {
59
57
  }
60
58
  });
61
59
  }
62
- //# sourceMappingURL=update.js.map
63
- //# debugId=ed0bfb79-4403-57a0-85eb-766bc4110b67
60
+ //# sourceMappingURL=update.js.map
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * hq whoami — displays current user or 'not logged in'
3
3
  */
4
-
5
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1603fcc9-75f6-5855-b7b2-8333ffda9389")}catch(e){}}();
6
4
  import chalk from 'chalk';
7
5
  import { loadCachedTokens, isExpiring, isMachineIdentity, loadMachineCreds, } from '@indigoai-us/hq-cloud';
8
6
  function peekIdToken(idToken) {
@@ -61,5 +59,4 @@ export function registerWhoamiCommand(program) {
61
59
  }
62
60
  });
63
61
  }
64
- //# sourceMappingURL=whoami.js.map
65
- //# debugId=1603fcc9-75f6-5855-b7b2-8333ffda9389
62
+ //# sourceMappingURL=whoami.js.map
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4a2bf8b-0a33-57ba-a565-412a14132c99")}catch(e){}}();
3
1
  import chalk from "chalk";
4
2
  import * as fs from "fs";
5
3
  import * as path from "path";
@@ -225,5 +223,4 @@ export function registerWorkersCommand(program) {
225
223
  }
226
224
  });
227
225
  }
228
- //# sourceMappingURL=workers.js.map
229
- //# debugId=a4a2bf8b-0a33-57ba-a565-412a14132c99
226
+ //# sourceMappingURL=workers.js.map
package/dist/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // MUST be first: guard the Node version before any dependency that needs a
3
3
  // Node 20+ API (e.g. util.styleText) or a newer native ABI is evaluated.
4
-
5
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8fdfd788-4c00-50bc-9ed0-579ed9d5f903")}catch(e){}}();
6
4
  import "./node-preflight.js";
7
5
  import { CLI_VERSION } from "./cli-version.js";
8
6
  function isVersionRequest(argv) {
@@ -17,5 +15,4 @@ else {
17
15
  await runCli();
18
16
  }
19
17
  export const __test__ = { isVersionRequest };
20
- //# sourceMappingURL=index.js.map
21
- //# debugId=8fdfd788-4c00-50bc-9ed0-579ed9d5f903
18
+ //# sourceMappingURL=index.js.map