@indigoai-us/hq-cli 5.344.1 → 5.345.1
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 +9 -0
- package/assets/bot-workers/setup/worker.yaml +21 -0
- package/dist/commands/lanes.js +1 -25
- package/dist/commands/mesh.d.ts +1 -1
- package/dist/commands/mesh.js +6 -2
- package/dist/lib/bot/coding-tool-activity.d.ts +142 -0
- package/dist/lib/bot/coding-tool-activity.js +372 -0
- package/dist/lib/bot/run.d.ts +7 -0
- package/dist/lib/bot/run.js +123 -11
- package/dist/lib/bot/setup-explain.d.ts +12 -0
- package/dist/lib/bot/setup-tool-offer.d.ts +54 -0
- package/dist/lib/bot/setup-tool-offer.js +91 -0
- package/dist/lib/lanes/autopilot.d.ts +0 -5
- package/dist/lib/lanes/autopilot.js +13 -30
- package/dist/lib/lanes/disk-guard.d.ts +0 -1
- package/dist/lib/lanes/disk-guard.js +0 -1
- package/dist/lib/lanes/flag-keys.d.ts +0 -7
- package/dist/lib/lanes/flag-keys.js +0 -7
- package/dist/lib/lanes/reconcile.js +1 -14
- package/dist/lib/lanes/spawn.js +29 -21
- package/package.json +1 -1
package/dist/lib/lanes/spawn.js
CHANGED
|
@@ -1840,6 +1840,35 @@ export function spawnLaneWorker(hqRoot, lane, deps = {}, launch = {}) {
|
|
|
1840
1840
|
probe: modelDeps.probe ?? defaultProbe,
|
|
1841
1841
|
env,
|
|
1842
1842
|
};
|
|
1843
|
+
if (deps.lowDiskGuardEnabled === true) {
|
|
1844
|
+
const providerConfig = config.providers[existing.provider];
|
|
1845
|
+
const diskAccount = (existing.account !== undefined ? providerConfig.accounts[existing.account] : undefined) ??
|
|
1846
|
+
(providerConfig.default_account !== undefined
|
|
1847
|
+
? providerConfig.accounts[providerConfig.default_account]
|
|
1848
|
+
: undefined) ??
|
|
1849
|
+
Object.values(providerConfig.accounts).find((account) => account.enabled);
|
|
1850
|
+
if (diskAccount !== undefined) {
|
|
1851
|
+
const free = checkLaneDiskSpace(hqRoot, effectiveAccountHome(diskAccount, hostname).home, deps.statfs, config.low_disk_min_free_bytes);
|
|
1852
|
+
if (free.low) {
|
|
1853
|
+
const measuredAt = (deps.now ?? (() => new Date()))().toISOString();
|
|
1854
|
+
return retryUpdateLane(hqRoot, lane.lane_id, "spawn", (current) => ({
|
|
1855
|
+
...current,
|
|
1856
|
+
state: "queued",
|
|
1857
|
+
queued_reason: "low_disk",
|
|
1858
|
+
queued_details: {
|
|
1859
|
+
reason: "low_disk",
|
|
1860
|
+
hq_free_bytes: free.hq.free_bytes,
|
|
1861
|
+
provider_free_bytes: free.provider.free_bytes,
|
|
1862
|
+
measured_at: measuredAt,
|
|
1863
|
+
},
|
|
1864
|
+
queued_at: current.queued_at ?? measuredAt,
|
|
1865
|
+
admission_reserved_at: undefined,
|
|
1866
|
+
terminal_reason: undefined,
|
|
1867
|
+
terminal_details: undefined,
|
|
1868
|
+
}));
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1843
1872
|
let selection;
|
|
1844
1873
|
try {
|
|
1845
1874
|
selection = selectSpawnAccount({
|
|
@@ -1874,27 +1903,6 @@ export function spawnLaneWorker(hqRoot, lane, deps = {}, launch = {}) {
|
|
|
1874
1903
|
if (preservedAccountModel !== undefined)
|
|
1875
1904
|
pinnedModel = preservedAccountModel;
|
|
1876
1905
|
const resolved = selection.account;
|
|
1877
|
-
if (deps.lowDiskGuardEnabled === true) {
|
|
1878
|
-
const free = checkLaneDiskSpace(hqRoot, resolved.home, deps.statfs, config.low_disk_min_free_bytes);
|
|
1879
|
-
if (free.low) {
|
|
1880
|
-
const measuredAt = (deps.now ?? (() => new Date()))().toISOString();
|
|
1881
|
-
return retryUpdateLane(hqRoot, lane.lane_id, "spawn", (current) => ({
|
|
1882
|
-
...current,
|
|
1883
|
-
state: "queued",
|
|
1884
|
-
queued_reason: "low_disk",
|
|
1885
|
-
queued_details: {
|
|
1886
|
-
reason: "low_disk",
|
|
1887
|
-
hq_free_bytes: free.hq.free_bytes,
|
|
1888
|
-
provider_free_bytes: free.provider.free_bytes,
|
|
1889
|
-
measured_at: measuredAt,
|
|
1890
|
-
},
|
|
1891
|
-
queued_at: current.queued_at ?? measuredAt,
|
|
1892
|
-
admission_reserved_at: undefined,
|
|
1893
|
-
terminal_reason: undefined,
|
|
1894
|
-
terminal_details: undefined,
|
|
1895
|
-
}));
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
1906
|
const status = accountStatus(lane.provider, resolved.id, config, { existsSync, hostname });
|
|
1899
1907
|
if (isLoggedOut(status)) {
|
|
1900
1908
|
const failed = markPreSpawnFailure
|