@qablehq/atto 0.0.22 → 0.0.23
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/bin/atto.js
CHANGED
|
@@ -1,8 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Opens the built Atto desktop window. Installed as the `atto` command.
|
|
3
|
-
|
|
3
|
+
// If a silent update was queued on the previous quit, apply it before launch.
|
|
4
|
+
const { spawn, spawnSync } = require("node:child_process");
|
|
5
|
+
const fs = require("node:fs");
|
|
6
|
+
const os = require("node:os");
|
|
4
7
|
const path = require("node:path");
|
|
5
8
|
|
|
9
|
+
const PENDING_FILE = path.join(os.homedir(), ".atto", "pending-npm-update.json");
|
|
10
|
+
|
|
11
|
+
function applyPendingSilentUpdate() {
|
|
12
|
+
let pending;
|
|
13
|
+
try {
|
|
14
|
+
pending = JSON.parse(fs.readFileSync(PENDING_FILE, "utf8"));
|
|
15
|
+
} catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (!pending?.name || !pending?.version) {
|
|
19
|
+
try {
|
|
20
|
+
fs.unlinkSync(PENDING_FILE);
|
|
21
|
+
} catch {
|
|
22
|
+
/* ignore */
|
|
23
|
+
}
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const npm = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
28
|
+
const args = ["install", "-g", `${pending.name}@${pending.version}`, "--silent", "--no-fund", "--no-audit"];
|
|
29
|
+
if (pending.prefix) args.push("--prefix", pending.prefix);
|
|
30
|
+
|
|
31
|
+
// Best-effort: if install fails (locked files / offline), keep the pending file for next open.
|
|
32
|
+
const result = spawnSync(npm, args, {
|
|
33
|
+
stdio: "ignore",
|
|
34
|
+
windowsHide: true,
|
|
35
|
+
timeout: 120_000,
|
|
36
|
+
});
|
|
37
|
+
if (result.status === 0) {
|
|
38
|
+
try {
|
|
39
|
+
fs.unlinkSync(PENDING_FILE);
|
|
40
|
+
} catch {
|
|
41
|
+
/* ignore */
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
applyPendingSilentUpdate();
|
|
47
|
+
|
|
6
48
|
let electronPath;
|
|
7
49
|
try {
|
|
8
50
|
electronPath = require("electron");
|
package/out/main/index.js
CHANGED
|
@@ -10,6 +10,7 @@ const node_child_process = require("node:child_process");
|
|
|
10
10
|
const playwright = require("playwright");
|
|
11
11
|
const ts = require("typescript");
|
|
12
12
|
const node_module = require("node:module");
|
|
13
|
+
const node_os = require("node:os");
|
|
13
14
|
const electronUpdater = require("electron-updater");
|
|
14
15
|
const IPC_CHANNELS = {
|
|
15
16
|
submitGoal: "taa:sessions:submitGoal",
|
|
@@ -12560,16 +12561,25 @@ function detectNpmPrefix() {
|
|
|
12560
12561
|
}
|
|
12561
12562
|
return beforeModules;
|
|
12562
12563
|
}
|
|
12564
|
+
function pendingUpdatePath() {
|
|
12565
|
+
return node_path.join(node_os.homedir(), ".atto", "pending-npm-update.json");
|
|
12566
|
+
}
|
|
12567
|
+
function writePendingUpdate(name, version, prefix) {
|
|
12568
|
+
const dir = node_path.join(node_os.homedir(), ".atto");
|
|
12569
|
+
node_fs.mkdirSync(dir, { recursive: true });
|
|
12570
|
+
node_fs.writeFileSync(
|
|
12571
|
+
pendingUpdatePath(),
|
|
12572
|
+
JSON.stringify({ name, version, prefix: prefix ?? null, queuedAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
12573
|
+
"utf8"
|
|
12574
|
+
);
|
|
12575
|
+
}
|
|
12563
12576
|
function setupNpmUpdater() {
|
|
12564
12577
|
const name = readPackageName();
|
|
12565
12578
|
let pending = null;
|
|
12566
12579
|
const prefix = detectNpmPrefix();
|
|
12567
|
-
|
|
12568
|
-
if (!pending) return;
|
|
12569
|
-
const version = pending;
|
|
12570
|
-
pending = null;
|
|
12580
|
+
const installQuietly = (version) => {
|
|
12571
12581
|
const npm = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
12572
|
-
const args = ["install", "-g", `${name}@${version}
|
|
12582
|
+
const args = ["install", "-g", `${name}@${version}`, "--silent", "--no-fund", "--no-audit"];
|
|
12573
12583
|
if (prefix) args.push("--prefix", prefix);
|
|
12574
12584
|
console.log(
|
|
12575
12585
|
`[npm-updater] installing ${name}@${version}${prefix ? ` --prefix ${prefix}` : ""} after quit`
|
|
@@ -12580,6 +12590,13 @@ function setupNpmUpdater() {
|
|
|
12580
12590
|
windowsHide: true
|
|
12581
12591
|
});
|
|
12582
12592
|
child.unref();
|
|
12593
|
+
};
|
|
12594
|
+
electron.app.on("before-quit", () => {
|
|
12595
|
+
if (!pending) return;
|
|
12596
|
+
const version = pending;
|
|
12597
|
+
pending = null;
|
|
12598
|
+
writePendingUpdate(name, version, prefix);
|
|
12599
|
+
installQuietly(version);
|
|
12583
12600
|
});
|
|
12584
12601
|
const current = electron.app.getVersion();
|
|
12585
12602
|
void (async () => {
|
|
@@ -12591,7 +12608,8 @@ function setupNpmUpdater() {
|
|
|
12591
12608
|
const body = await response.json();
|
|
12592
12609
|
if (!body.version || !isNewerVersion(body.version, current)) return;
|
|
12593
12610
|
pending = body.version;
|
|
12594
|
-
|
|
12611
|
+
writePendingUpdate(name, body.version, prefix);
|
|
12612
|
+
console.log(`[npm-updater] ${body.version} queued for silent install on quit / next launch`);
|
|
12595
12613
|
} catch (error) {
|
|
12596
12614
|
console.error("[npm-updater] check failed", error);
|
|
12597
12615
|
} finally {
|
|
@@ -17255,7 +17255,11 @@ function Sidebar() {
|
|
|
17255
17255
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
17256
17256
|
"button",
|
|
17257
17257
|
{
|
|
17258
|
-
|
|
17258
|
+
type: "button",
|
|
17259
|
+
onClick: () => {
|
|
17260
|
+
setActiveProject(null);
|
|
17261
|
+
setView("projects");
|
|
17262
|
+
},
|
|
17259
17263
|
className: "flex w-fit items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",
|
|
17260
17264
|
children: [
|
|
17261
17265
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "size-3.5" }),
|
|
@@ -33137,8 +33141,8 @@ function TesboPanel() {
|
|
|
33137
33141
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "mb-6 rounded-lg border border-border bg-card p-4", children: [
|
|
33138
33142
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
33139
33143
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33140
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: "Tesbo
|
|
33141
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Paste the access code from
|
|
33144
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: status?.connected ? "Tesbo connection" : "Connect with access code" }),
|
|
33145
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: status?.connected ? "This PC is linked. Choose a project below to start testing." : "Paste the access code from Agents → Atto on the website. This is the first step — no local project needed." }),
|
|
33142
33146
|
status?.connected && status.user?.name && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-foreground", children: status.user.name })
|
|
33143
33147
|
] }),
|
|
33144
33148
|
status?.connected && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", variant: "outline", onClick: () => void disconnect(), disabled: busy, children: "Disconnect" })
|
|
@@ -33146,7 +33150,7 @@ function TesboPanel() {
|
|
|
33146
33150
|
!status?.connected ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
33147
33151
|
"form",
|
|
33148
33152
|
{
|
|
33149
|
-
className: "mt-4 grid gap-3",
|
|
33153
|
+
className: "mt-4 grid max-w-lg gap-3",
|
|
33150
33154
|
onSubmit: (event) => {
|
|
33151
33155
|
event.preventDefault();
|
|
33152
33156
|
void connect();
|
|
@@ -33159,13 +33163,15 @@ function TesboPanel() {
|
|
|
33159
33163
|
{
|
|
33160
33164
|
value: code,
|
|
33161
33165
|
onChange: (event) => setCode(event.target.value),
|
|
33162
|
-
className: "h-
|
|
33166
|
+
className: "h-10 rounded-md border border-border bg-background px-3 text-sm text-foreground",
|
|
33167
|
+
placeholder: "atto_…",
|
|
33163
33168
|
autoComplete: "off",
|
|
33164
|
-
spellCheck: false
|
|
33169
|
+
spellCheck: false,
|
|
33170
|
+
autoFocus: true
|
|
33165
33171
|
}
|
|
33166
33172
|
)
|
|
33167
33173
|
] }),
|
|
33168
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
33174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "submit", disabled: busy || !code.trim(), children: busy ? "Connecting…" : "Connect" }) })
|
|
33169
33175
|
]
|
|
33170
33176
|
}
|
|
33171
33177
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 grid gap-3", children: [
|
|
@@ -33193,8 +33199,8 @@ function TesboPanel() {
|
|
|
33193
33199
|
formError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-3 text-sm text-destructive", children: formError })
|
|
33194
33200
|
] });
|
|
33195
33201
|
}
|
|
33196
|
-
function tesboProjectId$1(
|
|
33197
|
-
return `tesbo-${
|
|
33202
|
+
function tesboProjectId$1(remoteProjectId) {
|
|
33203
|
+
return `tesbo-${remoteProjectId}`;
|
|
33198
33204
|
}
|
|
33199
33205
|
function ProjectList() {
|
|
33200
33206
|
const projectsById = useAppStore((s2) => s2.projectsById);
|
|
@@ -33214,8 +33220,8 @@ function ProjectList() {
|
|
|
33214
33220
|
};
|
|
33215
33221
|
reactExports.useEffect(() => {
|
|
33216
33222
|
let cancelled = false;
|
|
33217
|
-
const
|
|
33218
|
-
const id = tesboProjectId$1(remote);
|
|
33223
|
+
const syncRemote = (remote) => {
|
|
33224
|
+
const id = tesboProjectId$1(remote.projectId);
|
|
33219
33225
|
ensureProject(id, {
|
|
33220
33226
|
name: remote.projectName || remote.userName || "Tesbo project",
|
|
33221
33227
|
targetUrl: remote.targetUrl || void 0,
|
|
@@ -33233,7 +33239,6 @@ function ProjectList() {
|
|
|
33233
33239
|
source: "manual"
|
|
33234
33240
|
}))
|
|
33235
33241
|
);
|
|
33236
|
-
setActiveProject(id);
|
|
33237
33242
|
};
|
|
33238
33243
|
const refresh = async () => {
|
|
33239
33244
|
try {
|
|
@@ -33241,9 +33246,14 @@ function ProjectList() {
|
|
|
33241
33246
|
if (cancelled) return;
|
|
33242
33247
|
setTesboConnected(Boolean(status.connected));
|
|
33243
33248
|
if (!status.connected) return;
|
|
33249
|
+
for (const project of status.projects) {
|
|
33250
|
+
ensureProject(tesboProjectId$1(project.id), {
|
|
33251
|
+
name: project.name || project.userName || "Tesbo project"
|
|
33252
|
+
});
|
|
33253
|
+
}
|
|
33244
33254
|
const remote = await window.taa.tesbo.remoteConfig();
|
|
33245
33255
|
if (cancelled || !remote?.projectId) return;
|
|
33246
|
-
|
|
33256
|
+
syncRemote(remote);
|
|
33247
33257
|
} catch {
|
|
33248
33258
|
}
|
|
33249
33259
|
};
|
|
@@ -33253,29 +33263,28 @@ function ProjectList() {
|
|
|
33253
33263
|
cancelled = true;
|
|
33254
33264
|
window.clearInterval(timer);
|
|
33255
33265
|
};
|
|
33256
|
-
}, [ensureProject, setFolderPath, setBrowserMode, setMemories
|
|
33266
|
+
}, [ensureProject, setFolderPath, setBrowserMode, setMemories]);
|
|
33257
33267
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-1 flex-col overflow-hidden bg-background", children: [
|
|
33258
33268
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
|
|
33259
33269
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33260
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-semibold", children: "Projects" }),
|
|
33261
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "
|
|
33270
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-semibold", children: tesboConnected ? "Projects" : "Connect Atto" }),
|
|
33271
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "Pick a Tesbo project below. Folder and browser mode come from Agents → Atto on the website." : "Paste your access code to link this PC. You do not need a local project first." })
|
|
33262
33272
|
] }),
|
|
33263
|
-
|
|
33273
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", variant: "outline", className: "gap-2", onClick: () => setDialogOpen(true), children: [
|
|
33264
33274
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
|
|
33265
|
-
"New project"
|
|
33275
|
+
"New local project"
|
|
33266
33276
|
] })
|
|
33267
33277
|
] }),
|
|
33268
33278
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: [
|
|
33269
33279
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TesboPanel, {}),
|
|
33270
|
-
projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
|
33280
|
+
!tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 rounded-lg border border-dashed border-border px-4 py-8 text-center", children: [
|
|
33281
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Connect to see your projects" }),
|
|
33282
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "After you connect, Tesbo projects (including ones shared with you) show up here." })
|
|
33283
|
+
] }) : tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [
|
|
33271
33284
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderKanban, { className: "size-8 text-muted-foreground" }),
|
|
33272
33285
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33273
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children:
|
|
33274
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
33275
|
-
] }),
|
|
33276
|
-
!tesboConnected && /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", className: "gap-2", onClick: () => setDialogOpen(true), children: [
|
|
33277
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
|
|
33278
|
-
"New project"
|
|
33286
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Waiting for website settings" }),
|
|
33287
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "On the website open Agents → Atto, set the project folder path, then keep Atto connected." })
|
|
33279
33288
|
] })
|
|
33280
33289
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
33281
33290
|
"div",
|
package/out/renderer/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
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-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DhNABw4-.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-Cq11Gc4F.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qablehq/atto",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Atto
|
|
3
|
+
"version": "0.0.23",
|
|
4
|
+
"description": "Atto — AI-assisted desktop test automation",
|
|
5
5
|
"homepage": "https://github.com/QAbleHQ/Atto",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "QAble",
|