@autohq/cli 0.1.203 → 0.1.204

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.
@@ -26660,7 +26660,7 @@ Object.assign(lookup, {
26660
26660
  // package.json
26661
26661
  var package_default = {
26662
26662
  name: "@autohq/cli",
26663
- version: "0.1.203",
26663
+ version: "0.1.204",
26664
26664
  license: "SEE LICENSE IN README.md",
26665
26665
  publishConfig: {
26666
26666
  access: "public"
package/dist/index.js CHANGED
@@ -21673,7 +21673,7 @@ var init_package = __esm({
21673
21673
  "package.json"() {
21674
21674
  package_default = {
21675
21675
  name: "@autohq/cli",
21676
- version: "0.1.203",
21676
+ version: "0.1.204",
21677
21677
  license: "SEE LICENSE IN README.md",
21678
21678
  publishConfig: {
21679
21679
  access: "public"
@@ -27439,7 +27439,7 @@ function agentSessionsQueryOptions(client, agentName, apiUrl, includeArchived =
27439
27439
  return res.sessions;
27440
27440
  },
27441
27441
  enabled: Boolean(agentName),
27442
- ...runsFreshnessOptions()
27442
+ ...pollingQueryOptions()
27443
27443
  });
27444
27444
  }
27445
27445
  function sessionsQueryOptions(client, apiUrl, includeArchived = false) {
@@ -27453,14 +27453,14 @@ function sessionsQueryOptions(client, apiUrl, includeArchived = false) {
27453
27453
  });
27454
27454
  return res.sessions;
27455
27455
  },
27456
- ...runsFreshnessOptions()
27456
+ ...pollingQueryOptions()
27457
27457
  });
27458
27458
  }
27459
- function runsFreshnessOptions() {
27459
+ function pollingQueryOptions() {
27460
27460
  return {
27461
27461
  staleTime: 0,
27462
27462
  refetchOnMount: "always",
27463
- refetchInterval: SESSIONS_REFETCH_INTERVAL_MS
27463
+ refetchInterval: DASHBOARD_POLL_INTERVAL_MS
27464
27464
  };
27465
27465
  }
27466
27466
  function environmentsQueryOptions(client, apiUrl) {
@@ -27470,7 +27470,7 @@ function environmentsQueryOptions(client, apiUrl) {
27470
27470
  const res = await client.listEnvironments({ apiBaseUrl: apiUrl });
27471
27471
  return sortByName(res.environments);
27472
27472
  },
27473
- staleTime: Number.POSITIVE_INFINITY
27473
+ ...pollingQueryOptions()
27474
27474
  });
27475
27475
  }
27476
27476
  function identitiesQueryOptions(client, apiUrl) {
@@ -27478,7 +27478,7 @@ function identitiesQueryOptions(client, apiUrl) {
27478
27478
  queryKey: queryKeys.identities(apiUrl),
27479
27479
  queryFn: async () => (await client.listIdentities({ apiBaseUrl: apiUrl })).identities,
27480
27480
  select: sortByName,
27481
- staleTime: Number.POSITIVE_INFINITY
27481
+ ...pollingQueryOptions()
27482
27482
  });
27483
27483
  }
27484
27484
  function agentsQueryOptions(client, apiUrl) {
@@ -27488,7 +27488,7 @@ function agentsQueryOptions(client, apiUrl) {
27488
27488
  const res = await client.listAgents({ apiBaseUrl: apiUrl });
27489
27489
  return sortAgents(res.agents);
27490
27490
  },
27491
- staleTime: Number.POSITIVE_INFINITY
27491
+ ...pollingQueryOptions()
27492
27492
  });
27493
27493
  }
27494
27494
  function projectsQueryOptions(client, apiUrl) {
@@ -27498,7 +27498,7 @@ function projectsQueryOptions(client, apiUrl) {
27498
27498
  const res = await client.listProjects({ apiBaseUrl: apiUrl });
27499
27499
  return res.projects;
27500
27500
  },
27501
- staleTime: Number.POSITIVE_INFINITY
27501
+ ...pollingQueryOptions()
27502
27502
  });
27503
27503
  }
27504
27504
  function serviceAccountsQueryOptions(client, apiUrl) {
@@ -27510,7 +27510,7 @@ function serviceAccountsQueryOptions(client, apiUrl) {
27510
27510
  });
27511
27511
  return res.serviceAccounts.slice().sort((a, b) => a.name.localeCompare(b.name));
27512
27512
  },
27513
- staleTime: Number.POSITIVE_INFINITY
27513
+ ...pollingQueryOptions()
27514
27514
  });
27515
27515
  }
27516
27516
  function connectionsQueryOptions(client, apiUrl, enabled = true) {
@@ -27521,7 +27521,7 @@ function connectionsQueryOptions(client, apiUrl, enabled = true) {
27521
27521
  return res.connections;
27522
27522
  },
27523
27523
  enabled,
27524
- staleTime: Number.POSITIVE_INFINITY
27524
+ ...pollingQueryOptions()
27525
27525
  });
27526
27526
  }
27527
27527
  function connectionProvidersQueryOptions(client, apiUrl, enabled = true) {
@@ -27532,7 +27532,7 @@ function connectionProvidersQueryOptions(client, apiUrl, enabled = true) {
27532
27532
  return res.providers;
27533
27533
  },
27534
27534
  enabled,
27535
- staleTime: Number.POSITIVE_INFINITY
27535
+ ...pollingQueryOptions()
27536
27536
  });
27537
27537
  }
27538
27538
  function githubSyncBindingsQueryOptions(client, apiUrl, enabled = true) {
@@ -27543,7 +27543,7 @@ function githubSyncBindingsQueryOptions(client, apiUrl, enabled = true) {
27543
27543
  return res.bindings;
27544
27544
  },
27545
27545
  enabled,
27546
- staleTime: Number.POSITIVE_INFINITY
27546
+ ...pollingQueryOptions()
27547
27547
  });
27548
27548
  }
27549
27549
  function sortAgents(list) {
@@ -27568,7 +27568,7 @@ function invalidateRunListQueries(queryClient, apiUrl) {
27568
27568
  void queryClient.invalidateQueries({ queryKey: ["sessions", apiUrl] });
27569
27569
  void queryClient.invalidateQueries({ queryKey: ["sessions"] });
27570
27570
  }
27571
- var TUI_SESSION_LIST_LIMIT, queryKeys, SESSIONS_REFETCH_INTERVAL_MS;
27571
+ var TUI_SESSION_LIST_LIMIT, queryKeys, DASHBOARD_POLL_INTERVAL_MS;
27572
27572
  var init_queries = __esm({
27573
27573
  "src/tui/hooks/queries.ts"() {
27574
27574
  "use strict";
@@ -27587,7 +27587,7 @@ var init_queries = __esm({
27587
27587
  sessions: (apiUrl, includeArchived = false) => ["sessions", apiUrl, includeArchived],
27588
27588
  agentSessions: (agentName, apiUrl, includeArchived = false) => ["agent-sessions", agentName, apiUrl, includeArchived]
27589
27589
  };
27590
- SESSIONS_REFETCH_INTERVAL_MS = 5e3;
27590
+ DASHBOARD_POLL_INTERVAL_MS = 2e3;
27591
27591
  }
27592
27592
  });
27593
27593
 
@@ -29959,10 +29959,15 @@ import { spawnSync } from "child_process";
29959
29959
  import { existsSync as existsSync4 } from "fs";
29960
29960
  import { dirname as dirname6, resolve as resolve3 } from "path";
29961
29961
  import { fileURLToPath } from "url";
29962
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
29962
+ import {
29963
+ QueryClient,
29964
+ QueryClientProvider,
29965
+ environmentManager
29966
+ } from "@tanstack/react-query";
29963
29967
  import { render } from "ink";
29964
29968
  import React from "react";
29965
29969
  async function launch(opts) {
29970
+ environmentManager.setIsServer(() => false);
29966
29971
  const apiUrl = resolveApiBaseUrl({
29967
29972
  explicit: opts.apiUrl,
29968
29973
  env: process.env,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.203",
3
+ "version": "0.1.204",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"