@indigoai-us/hq-cli 5.345.164 → 5.345.166
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 +17 -0
- package/assets/scaffold/core/scripts/rebuild-all-indexes.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-orchestrator-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-public-knowledge-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-reports-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-social-drafts-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-threads-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-workers-index.sh +11 -0
- package/dist/command-catalog.generated.d.ts +66 -0
- package/dist/command-catalog.generated.js +82 -0
- package/dist/commands/billing-sponsor.d.ts +20 -0
- package/dist/commands/billing-sponsor.js +116 -0
- package/dist/commands/integrations-api.d.ts +15 -0
- package/dist/commands/integrations-api.js +27 -0
- package/dist/commands/integrations-manage.js +4 -2
- package/dist/commands/integrations.js +9 -5
- package/dist/commands/scan.d.ts +6 -0
- package/dist/commands/scan.js +11 -1
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +210 -197
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/doctor/checks/sync-runtime.d.ts +7 -2
- package/dist/lib/doctor/checks/sync-runtime.js +1 -3
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/index-render/index.d.ts +5 -0
- package/dist/lib/index-render/index.js +22 -1
- package/dist/lib/secret-scan/detect.js +2 -0
- package/dist/lib/secret-scan/probes.d.ts +13 -0
- package/dist/lib/secret-scan/probes.js +69 -0
- package/dist/lib/secret-scan/repo-config.d.ts +24 -0
- package/dist/lib/secret-scan/repo-config.js +159 -29
- package/dist/lib/secret-scan/rules.d.ts +2 -0
- package/dist/lib/secret-scan/staged.d.ts +15 -1
- package/dist/lib/secret-scan/staged.js +46 -4
- package/package.json +8 -8
|
@@ -61,7 +61,7 @@ import { registerConnectCommands } from "./integrations-connect.js";
|
|
|
61
61
|
import { registerImportCommands } from "./integrations-import.js";
|
|
62
62
|
import { registerManageCommands } from "./integrations-manage.js";
|
|
63
63
|
import { registerSlackCommands } from "./integrations-slack.js";
|
|
64
|
-
import { fetchPendingApprovals } from "./integrations-api.js";
|
|
64
|
+
import { fetchPendingApprovals, terminalSafeText } from "./integrations-api.js";
|
|
65
65
|
const CALL_ARGS_EXAMPLE = `--args '{"assignee":"me"}' or --args-file args.json`;
|
|
66
66
|
function readStream(stream) {
|
|
67
67
|
return new Promise((resolve, reject) => {
|
|
@@ -533,7 +533,7 @@ export function registerIntegrationsCommand(program) {
|
|
|
533
533
|
return;
|
|
534
534
|
}
|
|
535
535
|
console.log(chalk.yellow("Queued for approval — this call can change the app, so a company owner decides first."));
|
|
536
|
-
console.log(`Approve with:\n hq integrations approve ${queued.queueId} --provider ${bareProvider(connection.provider)}`);
|
|
536
|
+
console.log(`Approve with:\n hq integrations approve ${queued.queueId} --provider ${bareProvider(connection.provider)}${opts.company ? ` --company ${opts.company}` : ""}`);
|
|
537
537
|
if (queued.expiresAt) {
|
|
538
538
|
console.log(chalk.dim(`Expires ${queued.expiresAt}`));
|
|
539
539
|
}
|
|
@@ -606,7 +606,9 @@ export function registerIntegrationsCommand(program) {
|
|
|
606
606
|
const unknown = terminal.status === "write_unknown" || terminal.outcome === "unknown";
|
|
607
607
|
console.log(chalk.red(unknown
|
|
608
608
|
? `The provider outcome is unknown for ${queueId}. Check the provider before taking any action; ${historyCommand} shows the latest queue state.`
|
|
609
|
-
:
|
|
609
|
+
: terminal.failureMessage
|
|
610
|
+
? `The approved call did not run: ${terminalSafeText(terminal.failureMessage)}`
|
|
611
|
+
: `The approved call failed (${terminal.rejectionReason ?? terminal.status ?? terminal.outcome}). See ${historyCommand} for its status.`));
|
|
610
612
|
}
|
|
611
613
|
else if (terminal.status === "resumed" || terminal.status === "completed" || terminal.outcome === "ran") {
|
|
612
614
|
console.log(chalk.green("Approved — the call completed."));
|
|
@@ -614,7 +616,7 @@ export function registerIntegrationsCommand(program) {
|
|
|
614
616
|
printJson(unwrapGatewayResult(stored.result));
|
|
615
617
|
}
|
|
616
618
|
else if (ran) {
|
|
617
|
-
console.log(chalk.yellow(`The call's result could not be read back. Run \`hq integrations approve ${queueId}\` again to fetch it; the call will not run twice.`));
|
|
619
|
+
console.log(chalk.yellow(`The call's result could not be read back. Run \`hq integrations approve ${queueId} --provider ${bareProvider(connection.provider)}${opts.company ? ` --company ${opts.company}` : ""}\` again to fetch it; the call will not run twice.`));
|
|
618
620
|
}
|
|
619
621
|
}
|
|
620
622
|
else {
|
|
@@ -649,7 +651,9 @@ export function registerIntegrationsCommand(program) {
|
|
|
649
651
|
if (failed) {
|
|
650
652
|
const reason = body.rejectionReason ??
|
|
651
653
|
(toolError ? "provider_tool_error" : body.outcome ?? body.status ?? "failed");
|
|
652
|
-
console.log(chalk.red(
|
|
654
|
+
console.log(chalk.red(body.failureMessage
|
|
655
|
+
? `The approved call did not run: ${terminalSafeText(body.failureMessage)}`
|
|
656
|
+
: `The approved call failed at the provider (${reason}).`));
|
|
653
657
|
}
|
|
654
658
|
else if (body.status === "resumed" || body.status === "completed" || body.outcome === "ran") {
|
|
655
659
|
console.log(chalk.green(`Approved — the call ran (status: ${body.status ?? body.outcome}).`));
|
package/dist/commands/scan.d.ts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* hq scan secrets scan the staged changes of the current repo
|
|
5
5
|
* hq scan secrets <file...> scan whole files instead
|
|
6
6
|
* hq scan secrets --json findings as JSON
|
|
7
|
+
* hq scan secrets --repo <dir> [--snapshot-root <dir>] [--allowlist-rev <rev>] <file...>
|
|
8
|
+
* scan files with that repo's committed
|
|
9
|
+
* .gitleaks.toml allowlists (used by pr-check)
|
|
7
10
|
*
|
|
8
11
|
* Rules: the vendored gitleaks default rule set (MIT, vendor/gitleaks/) plus
|
|
9
12
|
* HQ's own token patterns. No network, no account, no quota. A staged scan also
|
|
@@ -18,6 +21,9 @@ import { Command } from "commander";
|
|
|
18
21
|
interface ScanSecretsOptions {
|
|
19
22
|
json?: boolean;
|
|
20
23
|
staged?: boolean;
|
|
24
|
+
repo?: string;
|
|
25
|
+
snapshotRoot?: string;
|
|
26
|
+
allowlistRev?: string;
|
|
21
27
|
}
|
|
22
28
|
export declare function runScanSecrets(paths: string[], opts: ScanSecretsOptions, cwd?: string): number;
|
|
23
29
|
export declare function registerScanCommand(program: Command): void;
|
package/dist/commands/scan.js
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* hq scan secrets scan the staged changes of the current repo
|
|
5
5
|
* hq scan secrets <file...> scan whole files instead
|
|
6
6
|
* hq scan secrets --json findings as JSON
|
|
7
|
+
* hq scan secrets --repo <dir> [--snapshot-root <dir>] [--allowlist-rev <rev>] <file...>
|
|
8
|
+
* scan files with that repo's committed
|
|
9
|
+
* .gitleaks.toml allowlists (used by pr-check)
|
|
7
10
|
*
|
|
8
11
|
* Rules: the vendored gitleaks default rule set (MIT, vendor/gitleaks/) plus
|
|
9
12
|
* HQ's own token patterns. No network, no account, no quota. A staged scan also
|
|
@@ -31,7 +34,11 @@ function report(findings, scope) {
|
|
|
31
34
|
export function runScanSecrets(paths, opts, cwd = process.cwd()) {
|
|
32
35
|
let findings;
|
|
33
36
|
try {
|
|
34
|
-
|
|
37
|
+
if (opts.snapshotRoot !== undefined && opts.repo === undefined)
|
|
38
|
+
throw new ScanInputError("--snapshot-root needs --repo");
|
|
39
|
+
if (opts.allowlistRev !== undefined && opts.repo === undefined)
|
|
40
|
+
throw new ScanInputError("--allowlist-rev needs --repo");
|
|
41
|
+
findings = paths.length && !opts.staged ? scanFiles(paths, { repo: opts.repo, snapshotRoot: opts.snapshotRoot, allowlistRev: opts.allowlistRev }) : scanStaged(cwd);
|
|
35
42
|
}
|
|
36
43
|
catch (err) {
|
|
37
44
|
const msg = err instanceof ScanInputError || err instanceof ScanConfigError ? err.message : `scan failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
@@ -56,6 +63,9 @@ export function registerScanCommand(program) {
|
|
|
56
63
|
.argument("[files...]", "Scan these files instead of the staged changes")
|
|
57
64
|
.option("--staged", "Scan the staged changes (default when no files are given)")
|
|
58
65
|
.option("--json", "Print findings as JSON")
|
|
66
|
+
.option("--repo <dir>", "With files: apply this repo's committed .gitleaks.toml allowlists, matching repo-relative paths")
|
|
67
|
+
.option("--snapshot-root <dir>", "With --repo: files under <dir>/<commit>/<path> are matched as <path>")
|
|
68
|
+
.option("--allowlist-rev <rev>", "With --repo: read .gitleaks.toml from this commit instead of HEAD")
|
|
59
69
|
.action((files, opts) => {
|
|
60
70
|
process.exitCode = runScanSecrets(files ?? [], opts);
|
|
61
71
|
});
|