@indigoai-us/hq-cli 5.345.107 → 5.345.108

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.
@@ -742,15 +742,15 @@ export function parseLaneRecord(raw, filePath) {
742
742
  if (!isLaneProvider(raw.provider)) {
743
743
  throw new LaneSchemaError(`Unknown provider ${JSON.stringify(raw.provider)}`, { path: filePath, value: raw.provider });
744
744
  }
745
- if (raw.provider_source !== undefined && !["cli", "profile", "default"].includes(String(raw.provider_source))) {
746
- throw new LaneSchemaError("provider_source must be cli, profile, or default", {
745
+ if (raw.provider_source !== undefined && !["cli", "profile", "default", "auto"].includes(String(raw.provider_source))) {
746
+ throw new LaneSchemaError("provider_source must be cli, profile, default, or auto", {
747
747
  path: filePath,
748
748
  field: "provider_source",
749
749
  value: raw.provider_source,
750
750
  });
751
751
  }
752
- if (raw.account_source !== undefined && !["cli", "profile", "balanced"].includes(String(raw.account_source))) {
753
- throw new LaneSchemaError("account_source must be cli, profile, or balanced", {
752
+ if (raw.account_source !== undefined && !["cli", "profile", "balanced", "auto"].includes(String(raw.account_source))) {
753
+ throw new LaneSchemaError("account_source must be cli, profile, balanced, or auto", {
754
754
  path: filePath,
755
755
  field: "account_source",
756
756
  value: raw.account_source,
@@ -614,15 +614,31 @@ export interface LaneRecord {
614
614
  provider: LaneProvider;
615
615
  /** Open each Claude turn as a named Remote Control session using account a's login. */
616
616
  remote_control?: boolean;
617
- /** Whether provider came from an explicit create override or the worker profile/default. */
618
- provider_source?: "cli" | "profile" | "default";
617
+ /** Whether provider came from an explicit create override, the router (`--account auto`), or the worker profile/default. */
618
+ provider_source?: "cli" | "profile" | "default" | "auto";
619
619
  account?: string;
620
- /** Explicit create account choices remain pinned during profile refreshes. */
621
- account_source?: "cli" | "profile" | "balanced";
620
+ /** Explicit create account choices remain pinned during profile refreshes. `auto` means the router picked the account. */
621
+ account_source?: "cli" | "profile" | "balanced" | "auto";
622
622
  /** Reuse snapshots the worker profile's resolved settings for the new story. */
623
623
  profile_settings_pinned?: boolean;
624
624
  /** Recent Claude account-selection evidence for a create or automatic resume move. */
625
625
  account_selection?: LaneAccountSelection;
626
+ /**
627
+ * Router evidence recorded when `--account auto` picked this lane's account
628
+ * via `pickAccount` (src/lib/capacity/route.ts). Written once at creation.
629
+ */
630
+ account_pick?: {
631
+ /**
632
+ * Semicolon-joined reason parts from pickAccount, e.g.
633
+ * `"82% left on claude weekly; 1 live lane already on it"`
634
+ * or `"nothing used yet on any limit"`.
635
+ */
636
+ why: string;
637
+ /** Headroom percent of the binding limit at pick time (0-100). */
638
+ headroom: number;
639
+ /** Composite score at pick time: headroom - live*penalty + resetSoonBonus - oldReadingPenalty. */
640
+ score: number;
641
+ };
626
642
  /** Eligible accounts for a queue entry created without an explicit account. */
627
643
  admission_accounts?: string[];
628
644
  /**
@@ -235,7 +235,7 @@ export const LANE_FIELD_WRITERS = {
235
235
  pickup_validation_pending_since: ["creator", "command", "spawn", "reconcile"],
236
236
  priority: ["command"], worker: ["creator", "command"], worker_path: ["creator", "command"], worker_pack: ["creator", "command"], worker_profile: ["creator", "command"], worker_profile_hash: ["creator", "command", "spawn"], registry_worker: ["creator", "command", "spawn"], registry_worker_approval_history: ["command", "watcher", "reconcile"], worker_profile_repin_history: ["command"], worker_profile_ignored: ["creator", "command", "spawn"], worker_policy_delivery: ["command", "spawn"],
237
237
  keep_alive: ["creator", "command"], keep_alive_standing: ["command"], keep_alive_opted_in_at: ["creator", "command"], keep_alive_blocked_reason: ["command", "reconcile"], keep_alive_resume_count: ["command", "reconcile", "spawn"], keep_alive_history: ["reconcile"], keep_alive_blocked_resume_streak: ["reconcile", "spawn", "watcher"], keep_alive_last_resume_at: ["command", "reconcile", "spawn"], keep_alive_next_eligible_at: ["command", "reconcile", "spawn"], keep_alive_exhausted_at: ["command", "reconcile", "spawn"], loop_mode: ["creator"],
238
- provider: ["creator", "command"], remote_control: ["creator"], provider_source: ["creator", "command"], account: ["creator", "spawn", "command", "watcher", "reconcile"], account_source: ["creator", "command"], profile_settings_pinned: ["command"], account_selection: ["creator", "command"], admission_accounts: ["creator", "command"], account_history: ["command", "spawn", "watcher", "reconcile"], failed_resume_history: ["command"], fallback_question_cancellation_failures: ["command"], pending_resume: ["command", "spawn", "watcher", "reconcile"], placement_default: ["creator"], host: ["creator", "command"], origin_host: ["creator"], origin_host_source: ["creator"],
238
+ provider: ["creator", "command"], remote_control: ["creator"], provider_source: ["creator", "command"], account: ["creator", "spawn", "command", "watcher", "reconcile"], account_source: ["creator", "command"], profile_settings_pinned: ["command"], account_selection: ["creator", "command"], account_pick: ["creator"], admission_accounts: ["creator", "command"], account_history: ["command", "spawn", "watcher", "reconcile"], failed_resume_history: ["command"], fallback_question_cancellation_failures: ["command"], pending_resume: ["command", "spawn", "watcher", "reconcile"], placement_default: ["creator"], host: ["creator", "command"], origin_host: ["creator"], origin_host_source: ["creator"],
239
239
  version: ["creator"], created_at: ["creator"], updated_at: ["creator"], ended_at: ["reconcile"], envelope_summary: ["reconcile"], attribution_history: ["command", "watcher", "reconcile"], story_switch_pending: ["command", "watcher", "reconcile"], story_switch_unacknowledged: ["command", "watcher", "reconcile"],
240
240
  last_envelope: ["watcher", "reconcile"], model: ["creator", "spawn", "command"], model_source: ["creator", "spawn", "command"], effort: ["creator", "spawn", "command"], effort_source: ["creator", "spawn", "command"], fast_mode: ["spawn"],
241
241
  last_message_at: ["creator", "command"], status_gate: ["spawn", "watcher"], status_gate_history: ["watcher", "reconcile"], blocker_freshness_state: ["watcher"], kr_freshness_state: ["watcher"], last_compaction: ["spawn"], story_complete: ["watcher", "reconcile"], story_complete_reason: ["watcher", "reconcile"], story_status: ["watcher", "reconcile"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.345.107",
3
+ "version": "5.345.108",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "@aws-sdk/client-iot-data-plane": "^3.1096.0",
49
49
  "@aws-sdk/client-s3": "^3.1049.0",
50
50
  "@aws-sdk/dsql-signer": "^3.1146.0",
51
- "@indigoai-us/hq-cloud": "~6.18.66",
51
+ "@indigoai-us/hq-cloud": "~6.18.67",
52
52
  "@indigoai-us/hq-flags-client": "^0.1.2",
53
53
  "@modelcontextprotocol/sdk": "1.29.0",
54
54
  "@sentry/node": "^10.49.0",