@indigoai-us/hq-cli 5.345.58 → 5.345.59
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 +12 -0
- package/dist/command-catalog.generated.d.ts +8 -0
- package/dist/command-catalog.generated.js +10 -0
- package/dist/commands/agent-kit.js +20 -10
- package/dist/commands/billing.d.ts +13 -0
- package/dist/commands/billing.js +31 -0
- package/dist/commands/db-dump.js +2 -2
- package/dist/commands/db-remote-deps.js +6 -0
- package/dist/commands/lanes-loop.js +3 -1
- package/dist/commands/lanes-questions.js +16 -0
- package/dist/commands/lanes-session-start.js +19 -3
- package/dist/commands/lanes-shared.d.ts +1 -0
- package/dist/commands/lanes.d.ts +3 -1
- package/dist/commands/lanes.js +52 -2
- package/dist/lib/agent-kit/inbox-poll-backoff-flag.d.ts +19 -0
- package/dist/lib/agent-kit/inbox-poll-backoff-flag.js +70 -0
- package/dist/lib/agent-kit/run/inbox.d.ts +7 -3
- package/dist/lib/agent-kit/run/inbox.js +45 -6
- package/dist/lib/agent-kit/run/stop-signals.d.ts +14 -0
- package/dist/lib/agent-kit/run/stop-signals.js +26 -0
- package/dist/lib/agent-kit/services.d.ts +2 -2
- package/dist/lib/agent-kit/services.js +5 -3
- package/dist/lib/anywhere-runtime-flag-key.d.ts +1 -0
- package/dist/lib/anywhere-runtime-flag-key.js +1 -0
- package/dist/lib/anywhere-runtime-revocation-marker.d.ts +4 -0
- package/dist/lib/anywhere-runtime-revocation-marker.js +26 -0
- package/dist/lib/daemon/run.d.ts +2 -0
- package/dist/lib/daemon/run.js +17 -4
- package/dist/lib/daemon/server.js +7 -0
- package/dist/lib/db/control-plane.d.ts +12 -1
- package/dist/lib/db/usage-format.d.ts +2 -1
- package/dist/lib/db/usage-format.js +19 -0
- package/dist/lib/install/provider-wrappers.js +13 -0
- package/dist/lib/lanes/loop.d.ts +23 -1
- package/dist/lib/lanes/loop.js +134 -19
- package/dist/lib/lanes/questions.d.ts +5 -0
- package/dist/lib/lanes/reconcile.js +3 -0
- package/dist/lib/lanes/story-ledger.js +30 -20
- package/dist/lib/lanes/types.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,8 @@ const LOCK_TIMEOUT_MS = 10_000;
|
|
|
9
9
|
const LOCK_STALE_MS = 60_000;
|
|
10
10
|
const LOCK_RETRY_MS = 10;
|
|
11
11
|
const STORY_STATES = ["todo", "in_progress", "review", "waiting", "blocked", "done", "dropped"];
|
|
12
|
-
const
|
|
12
|
+
const LEAD_CONTROLLED_STATES = new Set(["waiting", "blocked", "dropped"]);
|
|
13
|
+
const STORY_STATE_ORDER = ["todo", "in_progress", "review", "done"];
|
|
13
14
|
const TERMINAL_STATES = new Set(["done", "failed", "interrupted", "cancelled", "killed"]);
|
|
14
15
|
function projectFocusOverrides(value) {
|
|
15
16
|
if (value === undefined)
|
|
@@ -561,6 +562,13 @@ function validPriorQuestions(value, storyId) {
|
|
|
561
562
|
}
|
|
562
563
|
return value;
|
|
563
564
|
}
|
|
565
|
+
function canonicalStoryState(value) {
|
|
566
|
+
if (value === "in_review" || value === "verification")
|
|
567
|
+
return "review";
|
|
568
|
+
return typeof value === "string" && STORY_STATES.includes(value)
|
|
569
|
+
? value
|
|
570
|
+
: undefined;
|
|
571
|
+
}
|
|
564
572
|
function setLaneStatusFields(story, lane, laneStoryStatus, isCurrentAttribution) {
|
|
565
573
|
const laneStatus = story.lane_status;
|
|
566
574
|
if (laneStatus !== undefined && !isJsonObject(laneStatus)) {
|
|
@@ -615,29 +623,31 @@ function setLaneStatusFields(story, lane, laneStoryStatus, isCurrentAttribution)
|
|
|
615
623
|
else {
|
|
616
624
|
delete story.pending_questions;
|
|
617
625
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
626
|
+
const currentState = canonicalStoryState(story.state) ?? canonicalStoryState(story.status);
|
|
627
|
+
const currentStates = currentState === undefined ? [] : [currentState];
|
|
628
|
+
const laneProgressState = laneStoryStatus === "review"
|
|
629
|
+
? "review"
|
|
630
|
+
: laneStoryStatus === "done"
|
|
631
|
+
? "done"
|
|
632
|
+
: laneStoryStatus === "in_progress" || lane.state === "queued" || lane.state === "running" || lane.state === "awaiting_input"
|
|
633
|
+
? "in_progress"
|
|
634
|
+
: undefined;
|
|
635
|
+
const currentProgressState = STORY_STATE_ORDER.reduce((highest, state) => currentStates.includes(state) || laneProgressState === state ? state : highest, undefined);
|
|
636
|
+
const laneManagedBlocked = isJsonObject(laneStatus) && isJsonObject(laneStatus.saved);
|
|
637
|
+
const leadControlledState = currentStates.find((state) => LEAD_CONTROLLED_STATES.has(state) && !(state === "blocked" && laneManagedBlocked));
|
|
638
|
+
if (currentStates.includes("done"))
|
|
631
639
|
story.state = "done";
|
|
640
|
+
else if (leadControlledState !== undefined)
|
|
641
|
+
story.state = leadControlledState;
|
|
642
|
+
else if (blockers.length > 0 && currentProgressState !== "review" && currentProgressState !== "done") {
|
|
643
|
+
story.state = "blocked";
|
|
632
644
|
}
|
|
633
|
-
else if (
|
|
634
|
-
story.state =
|
|
645
|
+
else if (currentProgressState !== undefined) {
|
|
646
|
+
story.state = currentProgressState;
|
|
635
647
|
}
|
|
636
648
|
else if (saved !== undefined && story.state === "blocked") {
|
|
637
|
-
const previous = saved.state;
|
|
638
|
-
story.state =
|
|
639
|
-
? previous
|
|
640
|
-
: "in_progress";
|
|
649
|
+
const previous = canonicalStoryState(saved.state);
|
|
650
|
+
story.state = previous ?? "in_progress";
|
|
641
651
|
}
|
|
642
652
|
if (typeof story.state === "string" && STORY_STATES.includes(story.state)) {
|
|
643
653
|
story.status = story.state;
|
package/dist/lib/lanes/types.js
CHANGED
|
@@ -236,7 +236,7 @@ export const LANE_FIELD_WRITERS = {
|
|
|
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
238
|
provider: ["creator", "command"], 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"],
|
|
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: ["watcher", "reconcile"],
|
|
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"],
|
|
242
242
|
overdue: ["reconcile"], overdue_at: ["reconcile"], last_host_report_at: ["watcher", "spawn", "reconcile"], stalled: ["watcher"], stalled_at: ["watcher"], stalled_reason: ["watcher"],
|