@indigoai-us/hq-cli 5.124.0 → 5.126.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 (80) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/assets/bot-workers/setup/skills/joining-a-team.md +125 -0
  3. package/assets/bot-workers/setup/skills/your-business.md +270 -0
  4. package/assets/bot-workers/setup/worker.yaml +189 -58
  5. package/dist/command-catalog.generated.d.ts +414 -5
  6. package/dist/command-catalog.generated.js +531 -5
  7. package/dist/command-registration-plan.d.ts +6 -0
  8. package/dist/command-registration-plan.js +1 -0
  9. package/dist/commands/bot.d.ts +10 -0
  10. package/dist/commands/bot.js +6 -0
  11. package/dist/commands/lanes.d.ts +75 -0
  12. package/dist/commands/lanes.js +2032 -0
  13. package/dist/commands/login.js +49 -6
  14. package/dist/commands/mesh.js +133 -28
  15. package/dist/commands/onboard-create-identity.d.ts +26 -0
  16. package/dist/commands/onboard-create-identity.js +23 -0
  17. package/dist/commands/onboard.js +13 -4
  18. package/dist/lib/bot/progress.d.ts +6 -0
  19. package/dist/lib/bot/progress.js +16 -0
  20. package/dist/lib/bot/runtime/grok.d.ts +30 -7
  21. package/dist/lib/bot/runtime/grok.js +86 -8
  22. package/dist/lib/bot/runtime/index.js +15 -8
  23. package/dist/lib/bot/runtime/messages-stream.d.ts +12 -3
  24. package/dist/lib/bot/runtime/messages-stream.js +49 -3
  25. package/dist/lib/doctor/checks/work-context.js +4 -2
  26. package/dist/lib/lanes/accounts.d.ts +43 -0
  27. package/dist/lib/lanes/accounts.js +128 -0
  28. package/dist/lib/lanes/config.d.ts +56 -0
  29. package/dist/lib/lanes/config.js +351 -0
  30. package/dist/lib/lanes/errors.d.ts +39 -0
  31. package/dist/lib/lanes/errors.js +72 -0
  32. package/dist/lib/lanes/index.d.ts +19 -0
  33. package/dist/lib/lanes/index.js +12 -0
  34. package/dist/lib/lanes/liveness.d.ts +89 -0
  35. package/dist/lib/lanes/liveness.js +273 -0
  36. package/dist/lib/lanes/registry.d.ts +103 -0
  37. package/dist/lib/lanes/registry.js +247 -0
  38. package/dist/lib/lanes/store.d.ts +64 -0
  39. package/dist/lib/lanes/store.js +627 -0
  40. package/dist/lib/lanes/throttle.d.ts +89 -0
  41. package/dist/lib/lanes/throttle.js +297 -0
  42. package/dist/lib/lanes/types.d.ts +193 -0
  43. package/dist/lib/lanes/types.js +217 -0
  44. package/dist/lib/mesh/live/backfill-held.d.ts +2 -0
  45. package/dist/lib/mesh/live/backfill-held.js +8 -4
  46. package/dist/lib/mesh/live/daemon/board-refresh.d.ts +3 -0
  47. package/dist/lib/mesh/live/daemon/board-refresh.js +6 -0
  48. package/dist/lib/mesh/live/daemon/config.d.ts +27 -0
  49. package/dist/lib/mesh/live/daemon/config.js +75 -0
  50. package/dist/lib/mesh/live/daemon/doctor.d.ts +3 -0
  51. package/dist/lib/mesh/live/daemon/doctor.js +21 -1
  52. package/dist/lib/mesh/live/daemon/index.d.ts +4 -3
  53. package/dist/lib/mesh/live/daemon/index.js +3 -3
  54. package/dist/lib/mesh/live/daemon/install.d.ts +143 -1
  55. package/dist/lib/mesh/live/daemon/install.js +444 -2
  56. package/dist/lib/mesh/live/daemon/paths.d.ts +2 -0
  57. package/dist/lib/mesh/live/daemon/paths.js +2 -0
  58. package/dist/lib/mesh/live/daemon/run.d.ts +11 -0
  59. package/dist/lib/mesh/live/daemon/run.js +129 -10
  60. package/dist/lib/mesh/live/daemon/state.d.ts +2 -0
  61. package/dist/lib/mesh/live/flush.d.ts +3 -0
  62. package/dist/lib/mesh/live/flush.js +11 -0
  63. package/dist/lib/scan-packages/index.js +17 -12
  64. package/dist/lib/work-context/company.d.ts +8 -0
  65. package/dist/lib/work-context/company.js +62 -18
  66. package/dist/lib/work-context/config.d.ts +55 -0
  67. package/dist/lib/work-context/config.js +333 -67
  68. package/dist/lib/work-context/contract.d.ts +2 -0
  69. package/dist/lib/work-context/default-company.d.ts +43 -0
  70. package/dist/lib/work-context/default-company.js +83 -0
  71. package/dist/lib/work-context/outbox.d.ts +5 -1
  72. package/dist/lib/work-context/outbox.js +5 -0
  73. package/dist/lib/work-context/reconcile.d.ts +4 -0
  74. package/dist/lib/work-context/reconcile.js +86 -9
  75. package/dist/lib/work-context/state.d.ts +2 -0
  76. package/dist/lib/work-context/state.js +14 -0
  77. package/dist/lib/work-context/windows-acl.d.ts +123 -0
  78. package/dist/lib/work-context/windows-acl.js +425 -0
  79. package/dist/utils/pack-contributions.js +5 -4
  80. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ /**
2
+ * `hq lanes` — worker lane management and decision queue (spec §5–§7, §10–§11).
3
+ *
4
+ * Every command prints JSON on stdout and takes no interactive input, except
5
+ * `accounts login`, which hands the terminal to the vendor's own sign-in.
6
+ */
7
+ import { Command } from "commander";
8
+ import { type LaneCompanyRef, type LaneRecord, type QuestionRecord, type ResolvedLaneWorker, type SeniorRef, type ThrottleDeps } from "../lib/lanes/index.js";
9
+ export declare const MAX_LANE_DEPTH = 2;
10
+ export declare const OUTPOST_ID_PATH = "/etc/outpost/outpost-id";
11
+ export declare const OUTPOST_DIR = "/etc/outpost";
12
+ export declare const LANES_RUNS_REL: string;
13
+ export type OutpostIdentity = {
14
+ kind: "id";
15
+ id: string;
16
+ } | {
17
+ kind: "unknown";
18
+ } | {
19
+ kind: "not_outpost";
20
+ };
21
+ export interface SpawnLoginResult {
22
+ status: number;
23
+ }
24
+ export interface LanesMesh {
25
+ ensureProjectThread: (company: LaneCompanyRef, projectId: string) => Promise<string>;
26
+ appendThreadEvent: (company: LaneCompanyRef, threadId: string, eventKind: string, payload: Record<string, unknown>) => Promise<void>;
27
+ patchStoryStatus: (company: LaneCompanyRef, projectId: string, storyId: string, status: string) => Promise<void>;
28
+ }
29
+ export interface LanesCommandDeps {
30
+ hqRoot?: () => string;
31
+ env?: NodeJS.ProcessEnv;
32
+ now?: () => Date;
33
+ hostname?: () => string;
34
+ resolveCompany?: (company?: string) => Promise<LaneCompanyRef>;
35
+ listOutpostIds?: () => Promise<string[]>;
36
+ readOutpostIdentity?: () => OutpostIdentity;
37
+ spawnLogin?: (opts: {
38
+ command: string;
39
+ args: string[];
40
+ env: NodeJS.ProcessEnv;
41
+ cwd?: string;
42
+ }) => Promise<SpawnLoginResult>;
43
+ throttleDeps?: ThrottleDeps;
44
+ existsSync?: (p: string) => boolean;
45
+ readFileSync?: (p: string, encoding: "utf8") => string;
46
+ homedir?: () => string;
47
+ mesh?: LanesMesh;
48
+ sleep?: (ms: number) => Promise<void>;
49
+ }
50
+ /**
51
+ * Spawn seam for the worker process (spec §5). Process spawning and the
52
+ * reconcile daemon are out of scope for this command surface; calling this
53
+ * throws rather than faking a running lane.
54
+ */
55
+ export declare function spawnLaneWorker(lane: LaneRecord): never;
56
+ export declare function readOutpostIdentity(existsSync?: (p: string) => boolean, readFileSync?: (p: string) => string): OutpostIdentity;
57
+ export declare function parseSeniorRef(raw: string): SeniorRef;
58
+ export declare function resolveAnswerChoice(choice: string, options: string[], freeform: boolean): string;
59
+ /** Tenant-store path for a question body (spec §6.2 / §10). Never the personal vault for company prose. */
60
+ export declare function questionBodyAbsPath(hqRoot: string, question: Pick<QuestionRecord, "company" | "body" | "question_id">): string;
61
+ export declare function casUpdateQuestion(hqRoot: string, questionId: string, updater: (current: QuestionRecord) => QuestionRecord): QuestionRecord;
62
+ export declare function casUpdateLane(hqRoot: string, laneId: string, updater: (current: LaneRecord) => LaneRecord): LaneRecord;
63
+ export declare function composeWorkerBrief(worker: ResolvedLaneWorker, taskBrief: string): string;
64
+ export declare function parseMaxRuntimeSeconds(raw: unknown, workerId: string): number | undefined;
65
+ export declare function emitLaneDecisionEvents(mesh: LanesMesh, lane: LaneRecord, decision: "blocked" | "done", extra?: Record<string, unknown>): Promise<void>;
66
+ export declare const PICKUP_TERMINAL_REASONS: readonly ["account_not_logged_in", "unknown_account", "account_disabled"];
67
+ export type PickupTerminalReason = (typeof PICKUP_TERMINAL_REASONS)[number];
68
+ /**
69
+ * Outpost-side account bind (spec §5.2). Writes a named terminal reason,
70
+ * never a plain `failed`.
71
+ */
72
+ export declare function applyOutpostAccountPickup(hqRoot: string, laneId: string): LaneRecord;
73
+ export declare function cancelPendingQuestionsForLane(hqRoot: string, laneId: string, nowIso: string, operatorReason?: string): QuestionRecord[];
74
+ export declare function registerLanesCommand(parent: Command, deps?: LanesCommandDeps): void;
75
+ //# sourceMappingURL=lanes.d.ts.map