@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.
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.344.1",
3
+ "version": "5.345.1",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {