@qablehq/atto 0.0.40 → 0.0.42

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/out/main/index.js CHANGED
@@ -522,6 +522,7 @@ async function pullRemoteSessionAnswers() {
522
522
  async function pullAndDispatchPendingSessions() {
523
523
  const link = readLink();
524
524
  if (!link) return { started: 0, errors: [] };
525
+ await fetchAttoRemoteConfig().catch(() => null);
525
526
  const response = await tesboFetch(link, "/api/atto/sessions/pending");
526
527
  if (response.status === 401) {
527
528
  clearLink();
@@ -806,6 +807,7 @@ async function pullAndHandleDesktopCommands() {
806
807
  }
807
808
  }
808
809
  let commandPollTimer = null;
810
+ let remoteConfigPollTimer = null;
809
811
  function startAttoScriptPoller(intervalMs = 5e3) {
810
812
  if (scriptPollTimer) return;
811
813
  const tick = () => {
@@ -815,6 +817,14 @@ function startAttoScriptPoller(intervalMs = 5e3) {
815
817
  tick();
816
818
  scriptPollTimer = setInterval(tick, intervalMs);
817
819
  scriptPollTimer.unref?.();
820
+ if (!remoteConfigPollTimer) {
821
+ const configTick = () => {
822
+ void fetchAttoRemoteConfig().catch(() => void 0);
823
+ };
824
+ configTick();
825
+ remoteConfigPollTimer = setInterval(configTick, 3e3);
826
+ remoteConfigPollTimer.unref?.();
827
+ }
818
828
  if (!commandPollTimer) {
819
829
  const commandTick = () => {
820
830
  void pullAndHandleDesktopCommands().catch(() => void 0);
@@ -11577,7 +11587,8 @@ function describeIntent(intent) {
11577
11587
  return "Unknown intent";
11578
11588
  }
11579
11589
  }
11580
- function resolveHeaded(project) {
11590
+ function resolveHeaded(project, opts) {
11591
+ if (opts?.remoteChatJob) return false;
11581
11592
  if (process.env.TAA_HEADED === "1") return true;
11582
11593
  if (process.env.TAA_HEADED === "0") return false;
11583
11594
  return (project.browserMode ?? DEFAULT_BROWSER_MODE) === "headed";
@@ -11687,6 +11698,8 @@ class RealEngine {
11687
11698
  await writeSessionMeta(meta);
11688
11699
  if (cmd.remoteJobId) {
11689
11700
  bindRemoteSessionJob(cmd.remoteJobId, sessionId);
11701
+ const bound = this.sessions.get(sessionId);
11702
+ if (bound) bound.remoteChatJob = true;
11690
11703
  }
11691
11704
  void this.runTracked(sessionId, (signal) => this.startSession(sessionId, signal));
11692
11705
  return sessionId;
@@ -11717,7 +11730,7 @@ class RealEngine {
11717
11730
  emitter,
11718
11731
  askUser: (question) => this.ask(sessionId, question),
11719
11732
  llm,
11720
- headed: resolveHeaded(state.meta.project),
11733
+ headed: resolveHeaded(state.meta.project, { remoteChatJob: Boolean(state.remoteChatJob) }),
11721
11734
  onArtifacts: (artifacts) => {
11722
11735
  const current = this.sessions.get(sessionId);
11723
11736
  if (current) current.artifacts = artifacts;
@@ -11771,7 +11784,7 @@ class RealEngine {
11771
11784
  fixtureContent,
11772
11785
  pageObjects,
11773
11786
  baseUrl: framework.baseUrl ?? state.meta.targetUrl,
11774
- headed: resolveHeaded(state.meta.project),
11787
+ headed: resolveHeaded(state.meta.project, { remoteChatJob: Boolean(state.remoteChatJob) }),
11775
11788
  signal
11776
11789
  });
11777
11790
  emitter.emit({
@@ -33481,7 +33481,7 @@ function ProjectList() {
33481
33481
  }
33482
33482
  };
33483
33483
  void refresh();
33484
- const timer = window.setInterval(() => void refresh(), 8e3);
33484
+ const timer = window.setInterval(() => void refresh(), 3e3);
33485
33485
  return () => {
33486
33486
  cancelled = true;
33487
33487
  window.clearInterval(timer);
@@ -35166,6 +35166,7 @@ async function startRemoteSession(job) {
35166
35166
  }
35167
35167
  setActiveProject(id, { force: true });
35168
35168
  setView("session");
35169
+ const remote = await window.taa.tesbo.remoteConfig().catch(() => null);
35169
35170
  const bindings = await window.taa.ai.listBindings().catch(() => ({}));
35170
35171
  if (bindings[id]) setProjectAiBinding2(id, bindings[id]);
35171
35172
  let project = useAppStore.getState().projectsById[id];
@@ -35173,15 +35174,9 @@ async function startRemoteSession(job) {
35173
35174
  throw new Error("No folder path on this PC for the Atto user. Set save location under Agents → Atto.");
35174
35175
  }
35175
35176
  if (!project.aiBinding) {
35176
- const remote = await window.taa.tesbo.remoteConfig().catch(() => null);
35177
- const refreshed = await window.taa.ai.listBindings().catch(() => ({}));
35178
- if (refreshed[id]) setProjectAiBinding2(id, refreshed[id]);
35179
- project = useAppStore.getState().projectsById[id];
35180
- if (!project?.aiBinding) {
35181
- throw new Error(
35182
- remote?.aiSynced ? "Website AI key synced but project binding is missing. Reconnect Atto, then retry." : "Allocate an AI key to this project on Tesbo (Workspace → AI Providers), or connect a key in Atto project settings on this PC."
35183
- );
35184
- }
35177
+ throw new Error(
35178
+ remote?.aiSynced ? "Website AI key synced but project binding is missing. Reconnect Atto, then retry." : "Allocate an AI key to this project on Tesbo (Workspace → AI Providers), or connect a key in Atto project settings on this PC."
35179
+ );
35185
35180
  }
35186
35181
  if (project.analysis?.status !== "ready") {
35187
35182
  setProjectAnalysis2(id, { status: "analyzing" });
@@ -8,7 +8,7 @@
8
8
  />
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
10
  <title>Tesbo Automate</title>
11
- <script type="module" crossorigin src="./assets/index-DevA0EpF.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-CugGXqpv.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="./assets/index-DyJdhPcb.css">
13
13
  </head>
14
14
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qablehq/atto",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "description": "Atto — AI-assisted desktop test automation",
5
5
  "homepage": "https://github.com/QAbleHQ/Atto",
6
6
  "author": {