@indigoai-us/hq-cli 5.345.148 → 5.345.150

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 (83) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +2 -0
  3. package/dist/command-catalog.generated.d.ts +62 -14
  4. package/dist/command-catalog.generated.js +74 -14
  5. package/dist/command-help.js +2 -1
  6. package/dist/commands/_patterns.d.ts +6 -0
  7. package/dist/commands/_patterns.js +6 -0
  8. package/dist/commands/access.d.ts +45 -2
  9. package/dist/commands/access.js +537 -223
  10. package/dist/commands/billing-usage.d.ts +33 -2
  11. package/dist/commands/billing-usage.js +75 -4
  12. package/dist/commands/bot.js +2 -2
  13. package/dist/commands/channels.d.ts +27 -0
  14. package/dist/commands/channels.js +108 -4
  15. package/dist/commands/core-refresh-vault-access-native.d.ts +16 -0
  16. package/dist/commands/core-refresh-vault-access-native.js +142 -9
  17. package/dist/commands/core.js +4 -1
  18. package/dist/commands/dm.js +9 -1
  19. package/dist/commands/groups.js +9 -6
  20. package/dist/commands/install-global.d.ts +1 -8
  21. package/dist/commands/install-global.js +11 -27
  22. package/dist/commands/lanes-questions.js +7 -4
  23. package/dist/commands/lanes.js +13 -6
  24. package/dist/commands/library-add.d.ts +31 -1
  25. package/dist/commands/library-add.js +69 -2
  26. package/dist/commands/library.js +37 -3
  27. package/dist/commands/members.d.ts +35 -0
  28. package/dist/commands/members.js +65 -14
  29. package/dist/commands/reindex.js +19 -0
  30. package/dist/commands/secrets.d.ts +5 -0
  31. package/dist/commands/secrets.js +11 -6
  32. package/dist/hook-engine-path.js +10 -3
  33. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +63282 -62480
  34. package/dist/hq-cloud-sync-runner/package.json +1 -1
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.js +70 -5
  37. package/dist/lazy-commands.js +2 -0
  38. package/dist/lib/billing/usage-cost.d.ts +31 -1
  39. package/dist/lib/billing/usage-cost.js +46 -0
  40. package/dist/lib/db/local.d.ts +2 -2
  41. package/dist/lib/db/local.js +2 -2
  42. package/dist/lib/db/sql.js +2 -2
  43. package/dist/lib/db/sqlite-binding.d.ts +22 -0
  44. package/dist/lib/db/sqlite-binding.js +168 -0
  45. package/dist/lib/doctor/checks/anywhere.d.ts +12 -0
  46. package/dist/lib/doctor/checks/anywhere.js +63 -12
  47. package/dist/lib/doctor/checks/cli-path.d.ts +2 -1
  48. package/dist/lib/doctor/checks/cli-path.js +2 -1
  49. package/dist/lib/doctor/checks/hook-engine.js +2 -1
  50. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  51. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  52. package/dist/lib/hook-engine/reconcile.d.ts +9 -0
  53. package/dist/lib/hook-engine/reconcile.js +134 -0
  54. package/dist/lib/hook-engine/registration.d.ts +17 -0
  55. package/dist/lib/hook-engine/registration.js +50 -0
  56. package/dist/lib/install/claude-targets.d.ts +2 -1
  57. package/dist/lib/install/claude-targets.js +8 -3
  58. package/dist/lib/install/codex-targets.d.ts +3 -0
  59. package/dist/lib/install/codex-targets.js +15 -4
  60. package/dist/lib/install/hook-target.d.ts +9 -0
  61. package/dist/lib/install/hook-target.js +39 -0
  62. package/dist/lib/lanes/index.d.ts +1 -1
  63. package/dist/lib/lanes/index.js +1 -1
  64. package/dist/lib/lanes/store.d.ts +11 -0
  65. package/dist/lib/lanes/store.js +20 -0
  66. package/dist/lib/lanes/watch.js +5 -3
  67. package/dist/lib/windows/console-encoding.d.ts +24 -0
  68. package/dist/lib/windows/console-encoding.js +83 -0
  69. package/dist/lib/windows/install-followup.d.ts +35 -0
  70. package/dist/lib/windows/install-followup.js +142 -0
  71. package/dist/lib/windows/user-path.d.ts +80 -3
  72. package/dist/lib/windows/user-path.js +187 -26
  73. package/dist/main.js +2 -1
  74. package/dist/unknown-command.d.ts +18 -0
  75. package/dist/unknown-command.js +88 -0
  76. package/dist/utils/cognito-session.d.ts +8 -0
  77. package/dist/utils/cognito-session.js +14 -2
  78. package/dist/utils/hook-trust.d.ts +9 -0
  79. package/dist/utils/hook-trust.js +30 -2
  80. package/dist/utils/qmd-native-binding-error.js +3 -1
  81. package/dist/utils/resolve-executable.d.ts +2 -0
  82. package/dist/utils/resolve-executable.js +6 -2
  83. package/package.json +9 -9
@@ -13,6 +13,11 @@ export { vaultApiFetch, getCompanyUid, getEntityUid };
13
13
  */
14
14
  export declare const HQ_PRO_RESOURCE_SURFACES: readonly ["api", "bot_invite", "bot_join_now", "calendar_auto_schedule", "calendar_preferences", "cli_secrets_set", "console_secrets_form", "deploy_precheck", "external_connection", "factory_install", "integrations_connect", "oauth_callback", "plan_limit_check", "secrets_input_link", "web"];
15
15
  export declare const CLI_SECRETS_SET_SURFACE = "cli_secrets_set";
16
+ interface SecretAclPrincipal {
17
+ granteeType: "email" | "group" | "company-wide" | "person";
18
+ granteeId: string;
19
+ }
20
+ export declare function parseSecretAclPrincipal(principal: string): SecretAclPrincipal | null;
16
21
  export interface SecretInjectionRecipe {
17
22
  header: string;
18
23
  scheme: "raw" | "bearer";
@@ -60,7 +60,7 @@ import { fastFlagEnabledDefaultOn } from "../native-fast-route.js";
60
60
  import { MULTI_COMPANY_SESSION_LOCK_FLAG } from "../lib/cli-flag-keys.js";
61
61
  import { secretsExecChildExitCode } from "../utils/child-wrapper-exit.js";
62
62
  import { isPlanGateError } from "../utils/plan-gate-error.js";
63
- import { SECRET_NAME_PATTERN, GROUP_ID_PATTERN, EMAIL_PATTERN } from "./_patterns.js";
63
+ import { SECRET_NAME_PATTERN, GROUP_ID_PATTERN, EMAIL_PATTERN, OUTPOST_UID_PATTERN, } from "./_patterns.js";
64
64
  import { describeSecretsScope, formatSecretSaved, formatSecretsListEmpty, formatSecretsListHeader, } from "./secrets-scope.js";
65
65
  import { vaultApiFetch, getCompanyUid, getEntityUid, looksLikeCompanyUid, } from "../utils/vault-api.js";
66
66
  import { formatApiKeyCapabilityDenial, requireApiKeyCapability, resolveVaultCredentialForCapability, } from "../utils/resolve-vault-credential.js";
@@ -277,7 +277,7 @@ function promptSecretInteractively() {
277
277
  process.stdin.resume();
278
278
  });
279
279
  }
280
- function parseSecretAclPrincipal(principal) {
280
+ export function parseSecretAclPrincipal(principal) {
281
281
  const p = principal.trim();
282
282
  if (p === "@all") {
283
283
  // Company-wide grant: every active member of the company. The server
@@ -290,7 +290,12 @@ function parseSecretAclPrincipal(principal) {
290
290
  if (GROUP_ID_PATTERN.test(p)) {
291
291
  return { granteeType: "group", granteeId: p };
292
292
  }
293
- console.error(chalk.red(`Invalid principal '${principal}': must be '@all', an email address, or a group id matching grp_<alphanumeric, underscore, hyphen>`));
293
+ if (OUTPOST_UID_PATTERN.test(p)) {
294
+ // The company Outpost rides the person grantee slot; the server checks
295
+ // that this id is the company's active Outpost.
296
+ return { granteeType: "person", granteeId: p };
297
+ }
298
+ console.error(chalk.red(`Invalid principal '${principal}': must be '@all', an email address, a group id matching grp_<alphanumeric, underscore, hyphen>, or a company Outpost id (out_…)`));
294
299
  return null;
295
300
  }
296
301
  function describeSecretAclPrincipal(principal) {
@@ -1312,8 +1317,8 @@ export function registerSecretsCommand(program) {
1312
1317
  });
1313
1318
  secrets
1314
1319
  .command("share <path>")
1315
- .description("Share a secret with an email address, group, or the entire company (@all)")
1316
- .requiredOption("--with <principal>", "Email address, group id, or @all (entire company) to share with")
1320
+ .description("Share a secret with an email address, group, company Outpost (out_…), or the entire company (@all)")
1321
+ .requiredOption("--with <principal>", "Email address, group id, out_ Outpost id, or @all (entire company) to share with")
1317
1322
  .requiredOption("--permission <level>", "Permission level: read | write | admin")
1318
1323
  .action(async (path, opts) => {
1319
1324
  try {
@@ -1376,7 +1381,7 @@ export function registerSecretsCommand(program) {
1376
1381
  secrets
1377
1382
  .command("unshare <path>")
1378
1383
  .description("Remove a grant from a secret")
1379
- .requiredOption("--from <principal>", "Email address, group id, or @all (entire company) to remove")
1384
+ .requiredOption("--from <principal>", "Email address, group id, out_ Outpost id, or @all (entire company) to remove")
1380
1385
  .action(async (path, opts) => {
1381
1386
  try {
1382
1387
  rejectIfPersonal(secrets.opts(), "unshare");
@@ -11,14 +11,21 @@ export function hookEnginePathArgs(argv) {
11
11
  }
12
12
  export async function runHookEnginePath(args) {
13
13
  try {
14
- if (args.some(arg => !['--repair', '--help', '-h'].includes(arg))) {
15
- throw new Error('Usage: hq core hook-engine-path [--repair]');
14
+ if (args.some(arg => !['--repair', '--help', '-h', '--for-registration'].includes(arg))) {
15
+ throw new Error('Usage: hq core hook-engine-path [--repair] [--for-registration]');
16
16
  }
17
17
  if (args.includes('--help') || args.includes('-h')) {
18
- console.log('Usage: hq core hook-engine-path [--repair]\nResolve and pin the installed native hook engine offline.');
18
+ console.log('Usage: hq core hook-engine-path [--repair] [--for-registration]\nResolve and pin the installed native hook engine offline.\n--for-registration prints a path only when the launcher flag is enabled.');
19
19
  return;
20
20
  }
21
21
  const { installHookEngine, hookEngineRequired, HOOK_ENGINE_REPAIR } = await import('./lib/hook-engine/resolve.js');
22
+ if (args.includes('--for-registration')) {
23
+ const { launcherEnabled } = await import('./lib/hook-engine/registration.js');
24
+ if (!launcherEnabled()) {
25
+ process.exitCode = 1;
26
+ return;
27
+ }
28
+ }
22
29
  const binary = installHookEngine({ repair: args.includes('--repair') });
23
30
  if (binary)
24
31
  console.log(binary);