@indigoai-us/hq-cli 5.149.1 → 5.150.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.
- package/CHANGELOG.md +6 -0
- package/dist/command-catalog.generated.d.ts +19 -0
- package/dist/command-catalog.generated.js +25 -0
- package/dist/commands/lanes.js +495 -246
- package/dist/lib/lanes/admission.d.ts +24 -0
- package/dist/lib/lanes/admission.js +193 -0
- package/dist/lib/lanes/delivery.js +5 -3
- package/dist/lib/lanes/index.d.ts +2 -0
- package/dist/lib/lanes/index.js +1 -0
- package/dist/lib/lanes/reconcile.js +155 -43
- package/dist/lib/lanes/spawn.js +4 -0
- package/dist/lib/lanes/store.js +48 -1
- package/dist/lib/lanes/types.d.ts +8 -1
- package/dist/lib/lanes/types.js +15 -4
- package/package.json +1 -1
|
@@ -166,8 +166,9 @@ export declare const TERMINAL_LANE_STATES: readonly ["done", "failed", "interrup
|
|
|
166
166
|
export type TerminalLaneState = (typeof TERMINAL_LANE_STATES)[number];
|
|
167
167
|
export declare const LANE_PROVIDERS: readonly ["claude", "codex", "grok"];
|
|
168
168
|
export type LaneProvider = (typeof LANE_PROVIDERS)[number];
|
|
169
|
-
export declare const QUEUED_REASONS: readonly ["cap", "queue_position", "throttle", "provider_binary_missing"];
|
|
169
|
+
export declare const QUEUED_REASONS: readonly ["cap", "provider_cap", "account_cap", "profile_cap", "queue_position", "throttle", "provider_binary_missing"];
|
|
170
170
|
export type QueuedReason = (typeof QUEUED_REASONS)[number];
|
|
171
|
+
export declare function isQueuedReason(value: unknown): value is QueuedReason;
|
|
171
172
|
export declare const HOST_KINDS: readonly ["local", "outpost"];
|
|
172
173
|
export type HostKind = (typeof HOST_KINDS)[number];
|
|
173
174
|
export declare const SENIOR_KINDS: readonly ["session", "lane", "user"];
|
|
@@ -270,6 +271,10 @@ export interface LaneRecord {
|
|
|
270
271
|
senior_history: SeniorHistoryEntry[];
|
|
271
272
|
state: LaneState;
|
|
272
273
|
queued_reason?: QueuedReason;
|
|
274
|
+
/** Time the current queue turn began; old records fall back to created_at. */
|
|
275
|
+
queued_at?: string;
|
|
276
|
+
/** Short-lived slot reservation between create persistence and worker spawn. */
|
|
277
|
+
admission_reserved_at?: string;
|
|
273
278
|
/**
|
|
274
279
|
* Set by `hq lanes pickup` when it stores an outpost lane and cleared by
|
|
275
280
|
* the account bind once the model probe has finished. While set, the
|
|
@@ -293,6 +298,8 @@ export interface LaneRecord {
|
|
|
293
298
|
worker_profile_ignored?: string[];
|
|
294
299
|
provider: LaneProvider;
|
|
295
300
|
account?: string;
|
|
301
|
+
/** Eligible accounts for a queue entry created without an explicit account. */
|
|
302
|
+
admission_accounts?: string[];
|
|
296
303
|
/**
|
|
297
304
|
* Every operator move of the lane's session to another account of the
|
|
298
305
|
* same provider (`hq lanes resume|message --account`), newest last, capped
|
package/dist/lib/lanes/types.js
CHANGED
|
@@ -95,7 +95,18 @@ export const TERMINAL_LANE_STATES = [
|
|
|
95
95
|
"killed",
|
|
96
96
|
];
|
|
97
97
|
export const LANE_PROVIDERS = ["claude", "codex", "grok"];
|
|
98
|
-
export const QUEUED_REASONS = [
|
|
98
|
+
export const QUEUED_REASONS = [
|
|
99
|
+
"cap",
|
|
100
|
+
"provider_cap",
|
|
101
|
+
"account_cap",
|
|
102
|
+
"profile_cap",
|
|
103
|
+
"queue_position",
|
|
104
|
+
"throttle",
|
|
105
|
+
"provider_binary_missing",
|
|
106
|
+
];
|
|
107
|
+
export function isQueuedReason(value) {
|
|
108
|
+
return typeof value === "string" && QUEUED_REASONS.includes(value);
|
|
109
|
+
}
|
|
99
110
|
export const HOST_KINDS = ["local", "outpost"];
|
|
100
111
|
export const SENIOR_KINDS = ["session", "lane", "user"];
|
|
101
112
|
export const ENVELOPE_DECISIONS = ["done", "ask", "blocked"];
|
|
@@ -204,16 +215,16 @@ export const LANE_FIELD_WRITERS = {
|
|
|
204
215
|
schema_version: ["creator"], lane_id: ["creator"], company: ["creator"],
|
|
205
216
|
project_id: ["command"], story_id: ["command"], stories: ["creator", "command", "watcher", "reconcile", "spawn"], thread_id: ["creator", "command", "spawn"], mesh_company: ["creator"],
|
|
206
217
|
depth: ["command"], senior: ["command"], senior_history: ["command"],
|
|
207
|
-
state: ["creator", "command", "watcher", "reconcile", "spawn"], queued_reason: ["creator", "command", "spawn", "reconcile"],
|
|
218
|
+
state: ["creator", "command", "watcher", "reconcile", "spawn"], queued_reason: ["creator", "command", "spawn", "reconcile"], queued_at: ["creator", "command", "spawn"], admission_reserved_at: ["creator", "command", "reconcile", "spawn"],
|
|
208
219
|
pickup_validation_pending: ["creator", "command", "spawn", "reconcile"],
|
|
209
220
|
pickup_validation_pending_since: ["creator", "command", "spawn", "reconcile"],
|
|
210
221
|
priority: ["command"], worker: ["creator"], worker_path: ["creator"], worker_pack: ["creator"], worker_profile: ["creator"], worker_profile_hash: ["creator", "spawn"], worker_profile_ignored: ["creator", "spawn"],
|
|
211
|
-
provider: ["creator"], account: ["creator", "spawn", "command"], account_history: ["command"], pending_resume: ["command", "spawn"], host: ["creator"], origin_host: ["creator"], origin_host_source: ["creator"],
|
|
222
|
+
provider: ["creator"], account: ["creator", "spawn", "command", "reconcile"], admission_accounts: ["creator", "command"], account_history: ["command"], pending_resume: ["command", "spawn"], host: ["creator"], origin_host: ["creator"], origin_host_source: ["creator"],
|
|
212
223
|
version: ["creator"], created_at: ["creator"], updated_at: ["creator"], attribution_history: ["command"],
|
|
213
224
|
last_envelope: ["watcher", "reconcile"], model: ["creator", "spawn", "command"], model_source: ["creator", "spawn", "command"], effort: ["creator", "spawn"], effort_source: ["creator", "spawn"], fast_mode: ["spawn"],
|
|
214
225
|
last_message_at: ["command"], last_compaction: ["spawn"], story_complete: ["watcher", "reconcile"], story_complete_reason: ["watcher", "reconcile"], story_status: ["watcher", "reconcile"],
|
|
215
226
|
overdue: ["reconcile"], overdue_at: ["reconcile"], last_host_report_at: ["watcher", "spawn", "reconcile"], stalled: ["watcher"], stalled_at: ["watcher"], stalled_reason: ["watcher"],
|
|
216
|
-
admitted_reason: ["reconcile"], terminal_reason: ["command", "watcher", "spawn", "reconcile"], terminal_details: ["command", "spawn", "watcher", "reconcile"],
|
|
227
|
+
admitted_reason: ["command", "reconcile"], terminal_reason: ["command", "watcher", "spawn", "reconcile"], terminal_details: ["command", "spawn", "watcher", "reconcile"],
|
|
217
228
|
quota_reset_at: ["watcher", "reconcile"], model_quota_marker: ["watcher", "reconcile"], outpost_command_id: ["command"],
|
|
218
229
|
provider_session_id: ["watcher", "command", "spawn"], provider_session_id_absent: ["watcher", "command"], provider_home_at_spawn: ["spawn"], last_resume: ["spawn"], last_run_usage: ["watcher"], envelope_repair: ["watcher", "reconcile"], last_progress_event_at: ["watcher"],
|
|
219
230
|
};
|