@indigoai-us/hq-cli 5.345.219 → 5.345.221
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 +170 -0
- package/dist/command-catalog.generated.d.ts +169 -3
- package/dist/command-catalog.generated.js +206 -3
- package/dist/commands/auth.js +4 -1
- package/dist/commands/bot-runtime.d.ts +18 -5
- package/dist/commands/bot-runtime.js +29 -12
- package/dist/commands/bot.d.ts +85 -0
- package/dist/commands/bot.js +245 -16
- package/dist/commands/cloud.d.ts +16 -0
- package/dist/commands/cloud.js +112 -102
- package/dist/commands/core-checkpoint-native.d.ts +13 -0
- package/dist/commands/core-checkpoint-native.js +167 -52
- package/dist/commands/core-hook-registration-plan.js +5 -4
- package/dist/commands/core-stop-autosave.d.ts +21 -0
- package/dist/commands/core-stop-autosave.js +300 -0
- package/dist/commands/core.js +2 -0
- package/dist/commands/daemon.d.ts +5 -0
- package/dist/commands/daemon.js +52 -9
- package/dist/commands/doctor-usage.d.ts +5 -0
- package/dist/commands/doctor-usage.js +25 -0
- package/dist/commands/env.d.ts +49 -4
- package/dist/commands/env.js +355 -5
- package/dist/commands/integrations.js +84 -3
- package/dist/commands/lanes-shared.d.ts +3 -0
- package/dist/commands/lanes.d.ts +3 -0
- package/dist/commands/lanes.js +87 -3
- package/dist/commands/packs.js +23 -0
- package/dist/commands/pkg-update.d.ts +6 -0
- package/dist/commands/pkg-update.js +15 -7
- package/dist/commands/run.js +55 -45
- package/dist/commands/sources.js +4 -3
- package/dist/commands/sync-core.d.ts +1 -0
- package/dist/commands/sync-core.js +77 -3
- package/dist/commands/whoami.js +96 -80
- package/dist/lib/bot/config.d.ts +17 -0
- package/dist/lib/bot/config.js +13 -0
- package/dist/lib/bot/fleet-cron.js +29 -4
- package/dist/lib/bot/fleet-local.d.ts +30 -2
- package/dist/lib/bot/fleet-local.js +60 -1
- package/dist/lib/bot/grok-login-scope.d.ts +36 -0
- package/dist/lib/bot/grok-login-scope.js +93 -0
- package/dist/lib/bot/inflight.d.ts +9 -0
- package/dist/lib/bot/jobs/hot-signal-sync.d.ts +51 -0
- package/dist/lib/bot/jobs/hot-signal-sync.js +90 -9
- package/dist/lib/bot/legacy-provider-login.d.ts +32 -9
- package/dist/lib/bot/legacy-provider-login.js +28 -22
- package/dist/lib/bot/run.d.ts +29 -5
- package/dist/lib/bot/run.js +203 -1
- package/dist/lib/bot/runtime-sign-in-check.js +6 -1
- package/dist/lib/bot/runtime-sign-in.d.ts +2 -0
- package/dist/lib/bot/signals-try-now.d.ts +76 -0
- package/dist/lib/bot/signals-try-now.js +111 -0
- package/dist/lib/capacity/collectors/claude-oauth.d.ts +22 -3
- package/dist/lib/capacity/collectors/claude-oauth.js +78 -22
- package/dist/lib/capacity/scheduler.d.ts +8 -0
- package/dist/lib/capacity/scheduler.js +5 -2
- package/dist/lib/core-utils/sentry-report.js +2 -0
- package/dist/lib/daemon/machine-checks.d.ts +22 -1
- package/dist/lib/daemon/machine-checks.js +54 -12
- package/dist/lib/daemon/run.js +71 -8
- package/dist/lib/daemon/runtime-notifications.d.ts +7 -0
- package/dist/lib/daemon/runtime-notifications.js +50 -0
- package/dist/lib/daemon/stop-autosave-lock.d.ts +19 -0
- package/dist/lib/daemon/stop-autosave-lock.js +166 -0
- package/dist/lib/daemon/stop-autosave.d.ts +28 -0
- package/dist/lib/daemon/stop-autosave.js +111 -0
- package/dist/lib/daemon/stop-diagnostics.d.ts +11 -0
- package/dist/lib/daemon/stop-diagnostics.js +136 -0
- package/dist/lib/daemon/stop-job-executor.d.ts +19 -0
- package/dist/lib/daemon/stop-job-executor.js +126 -0
- package/dist/lib/daemon/stop-jobs.d.ts +93 -0
- package/dist/lib/daemon/stop-jobs.js +599 -0
- package/dist/lib/doctor/checks/fleet-hook-core.d.ts +9 -1
- package/dist/lib/doctor/checks/fleet-hook-core.js +39 -15
- package/dist/lib/doctor/checks/host-core.js +1 -1
- package/dist/lib/environment/access-probes.d.ts +234 -0
- package/dist/lib/environment/access-probes.js +918 -0
- package/dist/lib/environment/profile.d.ts +15 -2
- package/dist/lib/environment/profile.js +55 -20
- package/dist/lib/environment/rfc3339.d.ts +8 -0
- package/dist/lib/environment/rfc3339.js +26 -0
- package/dist/lib/environment/work-requirements.d.ts +169 -0
- package/dist/lib/environment/work-requirements.js +389 -0
- package/dist/lib/hook-engine/coverage.d.ts +137 -7
- package/dist/lib/hook-engine/coverage.js +1424 -4
- package/dist/lib/hook-engine/fleet-registration.d.ts +17 -5
- package/dist/lib/hook-engine/fleet-registration.js +53 -17
- package/dist/lib/hook-engine/git-stop-config.json +513 -0
- package/dist/lib/hook-engine/native-stop-compatibility.json +311 -0
- package/dist/lib/hook-engine/reconcile.js +2 -2
- package/dist/lib/hot-channels/alert.d.ts +10 -1
- package/dist/lib/hot-channels/alert.js +38 -8
- package/dist/lib/hot-channels/signals-claude-login.d.ts +53 -0
- package/dist/lib/hot-channels/signals-claude-login.js +96 -0
- package/dist/lib/hot-channels/signals-pass.d.ts +143 -17
- package/dist/lib/hot-channels/signals-pass.js +324 -17
- package/dist/lib/hot-channels/signals-runtime.d.ts +30 -0
- package/dist/lib/hot-channels/signals-runtime.js +82 -0
- package/dist/lib/install/hook-target.js +1 -1
- package/dist/lib/lanes/host-capacity.d.ts +26 -2
- package/dist/lib/lanes/host-capacity.js +17 -2
- package/dist/lib/lanes/host-compute.d.ts +90 -0
- package/dist/lib/lanes/host-compute.js +185 -0
- package/dist/lib/lanes/index.d.ts +2 -0
- package/dist/lib/lanes/index.js +1 -0
- package/dist/lib/lanes/reconcile.js +22 -1
- package/dist/lib/lanes/resource-usage.d.ts +155 -0
- package/dist/lib/lanes/resource-usage.js +589 -0
- package/dist/lib/lanes/run-size.d.ts +46 -0
- package/dist/lib/lanes/run-size.js +197 -0
- package/dist/lib/lanes/store.js +27 -0
- package/dist/lib/lanes/throttle.d.ts +36 -1
- package/dist/lib/lanes/throttle.js +47 -10
- package/dist/lib/lanes/types.d.ts +40 -0
- package/dist/lib/lanes/types.js +2 -2
- package/dist/lib/lanes/watcher.js +13 -4
- package/dist/lib/lanes/worker-process.d.ts +25 -2
- package/dist/lib/lanes/worker-process.js +71 -19
- package/dist/lib/placement/match.d.ts +192 -0
- package/dist/lib/placement/match.js +667 -0
- package/dist/lib/safe-store.d.ts +14 -0
- package/dist/lib/safe-store.js +77 -4
- package/dist/lib/search-index/index.d.ts +88 -4
- package/dist/lib/search-index/index.js +299 -25
- package/dist/lib/search-index/max-doc-bytes.d.ts +17 -6
- package/dist/lib/search-index/max-doc-bytes.js +48 -23
- package/dist/lib/signals/codex-lockdown.d.ts +79 -0
- package/dist/lib/signals/codex-lockdown.js +271 -0
- package/dist/lib/signals/codex-login.d.ts +37 -0
- package/dist/lib/signals/codex-login.js +83 -0
- package/dist/lib/signals/engine.d.ts +28 -0
- package/dist/lib/signals/engine.js +77 -0
- package/dist/lib/signals/reply.d.ts +48 -0
- package/dist/lib/signals/reply.js +94 -12
- package/dist/lib/signals/run-record.js +6 -1
- package/dist/lib/signals/settings.d.ts +5 -0
- package/dist/lib/signals/settings.js +2 -0
- package/dist/lib/signals/steps/adapters.js +6 -0
- package/dist/lib/signals/steps/extract.d.ts +135 -12
- package/dist/lib/signals/steps/extract.js +416 -84
- package/dist/lib/signals/steps/types.d.ts +21 -0
- package/dist/lib/sync-core/engine-home.d.ts +41 -2
- package/dist/lib/sync-core/engine-home.js +132 -19
- package/dist/lib/sync-core/reconcile.js +1 -1
- package/dist/lib/sync-core/release-compare.d.ts +7 -0
- package/dist/lib/sync-core/release-compare.js +16 -0
- package/dist/lib/sync-core/release.d.ts +2 -1
- package/dist/lib/sync-core/release.js +2 -10
- package/dist/lib/sync-core/rollout-state.d.ts +2 -1
- package/dist/lib/sync-core/rollout-state.js +5 -2
- package/dist/lib/sync-core/vault-uid.d.ts +2 -0
- package/dist/lib/sync-core/vault-uid.js +4 -0
- package/dist/run/schema-env-overrides.d.ts +24 -0
- package/dist/run/schema-env-overrides.js +72 -0
- package/dist/schemas/hq-work-requirements.v1.schema.json +145 -0
- package/dist/utils/auth-session-check.d.ts +16 -0
- package/dist/utils/auth-session-check.js +16 -0
- package/dist/utils/client-health-contract.d.ts +6 -0
- package/dist/utils/client-health-contract.js +13 -0
- package/dist/utils/client-health.d.ts +7 -0
- package/dist/utils/client-health.js +22 -1
- package/dist/utils/command-usage.d.ts +40 -0
- package/dist/utils/command-usage.js +61 -0
- package/dist/utils/duplicate-command-usage.d.ts +72 -0
- package/dist/utils/duplicate-command-usage.js +125 -0
- package/dist/utils/host-registration.d.ts +1 -1
- package/dist/utils/host-registration.js +6 -1
- package/dist/utils/resident-package-preload.js +4 -0
- package/dist/utils/sentry-fingerprint.js +9 -0
- package/dist/utils/windows-bash.d.ts +2 -0
- package/dist/utils/windows-bash.js +2 -1
- package/package.json +15 -10
- package/scripts/bench-core-compare.mjs +313 -0
- package/scripts/bench-core.mjs +399 -12
- package/scripts/check-function-manifest.mjs +121 -7
- package/dist/commands/__fixtures__/access-vault.d.ts +0 -95
- package/dist/commands/__fixtures__/access-vault.js +0 -166
- package/dist/commands/__fixtures__/make-tar.d.ts +0 -38
- package/dist/commands/__fixtures__/make-tar.js +0 -102
- package/dist/commands/secrets-public-types.test-d.d.ts +0 -2
- package/dist/commands/secrets-public-types.test-d.js +0 -18
- package/dist/lib/decisions/fixtures/us001.d.ts +0 -137
- package/dist/lib/decisions/fixtures/us001.js +0 -21
- package/dist/lib/doctor/__testing__/fake-hq-tree.d.ts +0 -226
- package/dist/lib/doctor/__testing__/fake-hq-tree.js +0 -408
- package/dist/lib/doctor/__testing__/run-doctor.d.ts +0 -8
- package/dist/lib/doctor/__testing__/run-doctor.js +0 -69
- package/dist/lib/fingerprint/fixtures.d.ts +0 -19
- package/dist/lib/fingerprint/fixtures.js +0 -61
- package/dist/lib/hot-channels/adapters/__fixtures__/dummy.d.ts +0 -33
- package/dist/lib/hot-channels/adapters/__fixtures__/dummy.js +0 -53
- package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.d.ts +0 -38
- package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.js +0 -64
- package/dist/lib/mesh/live/daemon/mqtt-events.test-d.d.ts +0 -2
- package/dist/lib/mesh/live/daemon/mqtt-events.test-d.js +0 -10
- package/dist/lib/test-utils/isolated-flag-company-context.d.ts +0 -3
- package/dist/lib/test-utils/isolated-flag-company-context.js +0 -18
- package/scripts/hook-engine-manifest.mjs +0 -22
- package/scripts/mesh-daemon-if-stale.mjs +0 -20
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export type StopOperation = {
|
|
2
|
+
kind: "checkpoint";
|
|
3
|
+
session: string;
|
|
4
|
+
transcript: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: "probe";
|
|
8
|
+
runtime: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "refresh";
|
|
11
|
+
company: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "autosave";
|
|
14
|
+
session: string;
|
|
15
|
+
};
|
|
16
|
+
export interface StopJob {
|
|
17
|
+
id: string;
|
|
18
|
+
digest: string;
|
|
19
|
+
root: string;
|
|
20
|
+
cwd: string;
|
|
21
|
+
operation: StopOperation;
|
|
22
|
+
env: NodeJS.ProcessEnv;
|
|
23
|
+
}
|
|
24
|
+
export declare function parseStopJob(text: string, home: string): StopJob | undefined;
|
|
25
|
+
export interface StopDrainOptions {
|
|
26
|
+
home: string;
|
|
27
|
+
/** Must prove ownership of the canonical per-user daemon lease. */
|
|
28
|
+
ownsQueue: () => boolean;
|
|
29
|
+
/** Runs a validated operation, never the original argv. No shell evaluation. */
|
|
30
|
+
execute: (job: StopJob) => Promise<{
|
|
31
|
+
code: number;
|
|
32
|
+
detail?: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** True only after the operation's own durable output proves completion. */
|
|
35
|
+
completed?: (job: StopJob) => boolean;
|
|
36
|
+
/** Removes completion proofs older than the given time (ms since the epoch). Runs only when the queue is fully consumed. */
|
|
37
|
+
pruneResults?: (olderThan: number) => void;
|
|
38
|
+
log: (message: string) => void;
|
|
39
|
+
/** Clock (tests). */
|
|
40
|
+
now?: () => number;
|
|
41
|
+
/** Whether a process is running; undefined when unknown (tests). */
|
|
42
|
+
alive?: (pid: number) => boolean | undefined;
|
|
43
|
+
/** Queue size at which a fully consumed queue file is rotated (tests). */
|
|
44
|
+
rotateBytes?: number;
|
|
45
|
+
/** How long a rotated queue file is kept for a writer that opened it before the rotation (tests). */
|
|
46
|
+
rotateGraceMs?: number;
|
|
47
|
+
}
|
|
48
|
+
/** The longest a job runs before the executor kills it. */
|
|
49
|
+
export declare const STOP_JOB_KILL_MS = 60000;
|
|
50
|
+
/** A `started` receipt older than this has no running job behind it: the kill timer plus a margin. */
|
|
51
|
+
export declare const STOP_JOB_STALE_MS: number;
|
|
52
|
+
/** Receipts and completion proofs are kept this long; a record older than this is never run. */
|
|
53
|
+
export declare const STOP_JOB_RETENTION_MS: number;
|
|
54
|
+
/** Lines consumed per pass (run, skipped or already receipted); the drainer schedules another pass at once when reached. */
|
|
55
|
+
export declare const STOP_JOB_PASS_LIMIT = 64;
|
|
56
|
+
/** Builds only known CLI arguments from the validated operation. */
|
|
57
|
+
export declare function stopJobArguments(job: StopJob): string[];
|
|
58
|
+
/** Startup scan plus file notifications, with a bounded fallback scan when
|
|
59
|
+
* a watcher is unavailable or an event was missed. The singleton daemon owns
|
|
60
|
+
* this consumer and close waits for its current operation to finish. */
|
|
61
|
+
export declare function startStopJobDrainer(options: StopDrainOptions): {
|
|
62
|
+
close(): Promise<void>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Drain the queue. It always makes progress: no input stops it for good.
|
|
66
|
+
*
|
|
67
|
+
* - The cursor names the queue file by identity. A replaced, truncated or
|
|
68
|
+
* rewritten queue (or an unreadable cursor) restarts at the start of the
|
|
69
|
+
* file now there. That is safe because every consumed line has a receipt
|
|
70
|
+
* keyed by its digest, so a line seen again is not run again, and a line
|
|
71
|
+
* older than the receipt retention is never run (`expired`).
|
|
72
|
+
* - A line that is not UTF-8, or a record longer than the producer's line
|
|
73
|
+
* limit, is skipped (logged) and the cursor moves past it.
|
|
74
|
+
* - A `started` receipt with no completion proof is a job that was
|
|
75
|
+
* interrupted (daemon killed, crash, power loss). Once no job can still be
|
|
76
|
+
* running behind it (its daemon is gone, or it is older than the kill timer
|
|
77
|
+
* plus a margin) it runs once more: checkpoint, gate probe, setting refresh
|
|
78
|
+
* and autosave each recompute their result from current state, so a second
|
|
79
|
+
* run repeats work rather than duplicating it, and losing the job would
|
|
80
|
+
* lose the checkpoint or autosave the shell always made. A job interrupted
|
|
81
|
+
* twice is skipped with a warning, so a job that itself kills the daemon
|
|
82
|
+
* cannot stall the queue.
|
|
83
|
+
* - Pruning: when the whole queue is consumed and has grown past a bound, it
|
|
84
|
+
* is renamed to `stop-jobs.1.jsonl` (the Rust writer opens the name with
|
|
85
|
+
* O_APPEND and writes each line in one call, with no lock, so a writer that
|
|
86
|
+
* opened the old name before the rename appends to the renamed file). The
|
|
87
|
+
* renamed file is drained first and removed only after a grace period with
|
|
88
|
+
* no write. Receipts and completion proofs older than the retention are
|
|
89
|
+
* removed only when the queue is fully consumed, so only for jobs behind
|
|
90
|
+
* the cursor.
|
|
91
|
+
*/
|
|
92
|
+
export declare function drainStopJobs(options: StopDrainOptions): Promise<number>;
|
|
93
|
+
//# sourceMappingURL=stop-jobs.d.ts.map
|