@qablehq/atto 0.0.13 → 0.0.16
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/preload/index.js
CHANGED
|
@@ -44,6 +44,11 @@ const IPC_CHANNELS = {
|
|
|
44
44
|
tesboLogout: "taa:tesbo:logout",
|
|
45
45
|
tesboAgents: "taa:tesbo:agents",
|
|
46
46
|
tesboRemoteConfig: "taa:tesbo:remoteConfig",
|
|
47
|
+
/** Main → renderer: start a Chat-queued desktop session (New session equivalent). */
|
|
48
|
+
tesboRemoteSession: "taa:tesbo:remoteSession",
|
|
49
|
+
tesboAckRemoteSession: "taa:tesbo:ackRemoteSession",
|
|
50
|
+
/** Renderer → main: bind a RealEngine session to a Chat job for live mirroring. */
|
|
51
|
+
tesboBindRemoteSession: "taa:tesbo:bindRemoteSession",
|
|
47
52
|
// Contextual command handling
|
|
48
53
|
submitCommand: "taa:sessions:submitCommand",
|
|
49
54
|
getCommandQueue: "taa:sessions:getCommandQueue",
|
|
@@ -110,7 +115,14 @@ const api = {
|
|
|
110
115
|
login: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogin, cmd),
|
|
111
116
|
logout: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogout),
|
|
112
117
|
agents: (projectId) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboAgents, projectId),
|
|
113
|
-
remoteConfig: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboRemoteConfig)
|
|
118
|
+
remoteConfig: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboRemoteConfig),
|
|
119
|
+
onRemoteSession: (cb) => {
|
|
120
|
+
const listener = (_event, payload) => cb(payload);
|
|
121
|
+
electron.ipcRenderer.on(IPC_CHANNELS.tesboRemoteSession, listener);
|
|
122
|
+
return () => electron.ipcRenderer.removeListener(IPC_CHANNELS.tesboRemoteSession, listener);
|
|
123
|
+
},
|
|
124
|
+
ackRemoteSession: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboAckRemoteSession, cmd),
|
|
125
|
+
bindRemoteSession: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboBindRemoteSession, cmd)
|
|
114
126
|
}
|
|
115
127
|
};
|
|
116
128
|
electron.contextBridge.exposeInMainWorld("taa", api);
|
|
@@ -16969,6 +16969,8 @@ function patchProject(slice, id, patch) {
|
|
|
16969
16969
|
};
|
|
16970
16970
|
}
|
|
16971
16971
|
function setProjectFolderPath(slice, id, folderPath) {
|
|
16972
|
+
const existing = slice.projectsById[id];
|
|
16973
|
+
if (existing && existing.folderPath === folderPath) return slice;
|
|
16972
16974
|
return patchProject(slice, id, { folderPath, analysis: { status: "idle" } });
|
|
16973
16975
|
}
|
|
16974
16976
|
function setProjectAiBinding(slice, id, aiBinding) {
|
|
@@ -33191,7 +33193,7 @@ function TesboPanel() {
|
|
|
33191
33193
|
formError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-3 text-sm text-destructive", children: formError })
|
|
33192
33194
|
] });
|
|
33193
33195
|
}
|
|
33194
|
-
function tesboProjectId(remote) {
|
|
33196
|
+
function tesboProjectId$1(remote) {
|
|
33195
33197
|
return `tesbo-${remote.projectId}`;
|
|
33196
33198
|
}
|
|
33197
33199
|
function ProjectList() {
|
|
@@ -33213,7 +33215,7 @@ function ProjectList() {
|
|
|
33213
33215
|
reactExports.useEffect(() => {
|
|
33214
33216
|
let cancelled = false;
|
|
33215
33217
|
const applyRemote = (remote) => {
|
|
33216
|
-
const id = tesboProjectId(remote);
|
|
33218
|
+
const id = tesboProjectId$1(remote);
|
|
33217
33219
|
ensureProject(id, {
|
|
33218
33220
|
name: remote.projectName || remote.userName || "Tesbo project",
|
|
33219
33221
|
targetUrl: remote.targetUrl || void 0,
|
|
@@ -34506,7 +34508,7 @@ function GateEditor({
|
|
|
34506
34508
|
}
|
|
34507
34509
|
);
|
|
34508
34510
|
}
|
|
34509
|
-
let started = false;
|
|
34511
|
+
let started$1 = false;
|
|
34510
34512
|
function toEngineContext(project) {
|
|
34511
34513
|
if (!project.folderPath || !project.aiBinding) return null;
|
|
34512
34514
|
return {
|
|
@@ -34530,8 +34532,8 @@ async function syncAiBindings() {
|
|
|
34530
34532
|
}
|
|
34531
34533
|
}
|
|
34532
34534
|
async function bootstrapEngineConnection() {
|
|
34533
|
-
if (started) return;
|
|
34534
|
-
started = true;
|
|
34535
|
+
if (started$1) return;
|
|
34536
|
+
started$1 = true;
|
|
34535
34537
|
await waitForStoreHydration();
|
|
34536
34538
|
const { ingestEvent, setActiveSession, setActiveProject, createProject: createProject2, linkSessionToProject: linkSessionToProject2 } = useAppStore.getState();
|
|
34537
34539
|
await syncAiBindings();
|
|
@@ -34828,7 +34830,101 @@ function App() {
|
|
|
34828
34830
|
useThemeEffect();
|
|
34829
34831
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppShell, {});
|
|
34830
34832
|
}
|
|
34833
|
+
function tesboProjectId(projectId) {
|
|
34834
|
+
return `tesbo-${projectId}`;
|
|
34835
|
+
}
|
|
34836
|
+
async function startRemoteSession(job) {
|
|
34837
|
+
const {
|
|
34838
|
+
ensureProject,
|
|
34839
|
+
setProjectFolderPath: setProjectFolderPath2,
|
|
34840
|
+
setProjectBrowserMode: setProjectBrowserMode2,
|
|
34841
|
+
setProjectAiBinding: setProjectAiBinding2,
|
|
34842
|
+
setProjectAnalysis: setProjectAnalysis2,
|
|
34843
|
+
setProjectMemories: setProjectMemories2,
|
|
34844
|
+
setActiveProject,
|
|
34845
|
+
setView,
|
|
34846
|
+
linkSessionToProject: linkSessionToProject2,
|
|
34847
|
+
setActiveSession,
|
|
34848
|
+
setStreamingSession
|
|
34849
|
+
} = useAppStore.getState();
|
|
34850
|
+
const id = tesboProjectId(job.projectId || "project");
|
|
34851
|
+
ensureProject(id, {
|
|
34852
|
+
name: job.projectName || "Tesbo project",
|
|
34853
|
+
targetUrl: job.targetUrl || void 0
|
|
34854
|
+
});
|
|
34855
|
+
setProjectFolderPath2(id, job.folderPath);
|
|
34856
|
+
setProjectBrowserMode2(id, job.browserMode);
|
|
34857
|
+
if (job.targetUrl) {
|
|
34858
|
+
ensureProject(id, {
|
|
34859
|
+
name: useAppStore.getState().projectsById[id]?.name || job.projectName || "Tesbo project",
|
|
34860
|
+
targetUrl: job.targetUrl
|
|
34861
|
+
});
|
|
34862
|
+
}
|
|
34863
|
+
setActiveProject(id);
|
|
34864
|
+
setView("session");
|
|
34865
|
+
const bindings = await window.taa.ai.listBindings().catch(() => ({}));
|
|
34866
|
+
if (bindings[id]) setProjectAiBinding2(id, bindings[id]);
|
|
34867
|
+
let project = useAppStore.getState().projectsById[id];
|
|
34868
|
+
if (!project?.folderPath) {
|
|
34869
|
+
throw new Error("No folder path on this PC for the Atto user. Set save location under Agents → Atto.");
|
|
34870
|
+
}
|
|
34871
|
+
if (!project.aiBinding) {
|
|
34872
|
+
throw new Error("Connect an AI key in Atto project settings on this PC, then retry from Chat.");
|
|
34873
|
+
}
|
|
34874
|
+
if (project.analysis?.status !== "ready") {
|
|
34875
|
+
setProjectAnalysis2(id, { status: "analyzing" });
|
|
34876
|
+
try {
|
|
34877
|
+
const result = await window.taa.projects.analyzeFolder({
|
|
34878
|
+
projectId: id,
|
|
34879
|
+
folderPath: project.folderPath
|
|
34880
|
+
});
|
|
34881
|
+
setProjectMemories2(id, result.memories);
|
|
34882
|
+
setProjectAnalysis2(id, {
|
|
34883
|
+
status: "ready",
|
|
34884
|
+
lastRunAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
34885
|
+
usedAi: result.usedAi,
|
|
34886
|
+
error: result.warning
|
|
34887
|
+
});
|
|
34888
|
+
} catch {
|
|
34889
|
+
setProjectAnalysis2(id, { status: "ready", lastRunAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
34890
|
+
}
|
|
34891
|
+
project = useAppStore.getState().projectsById[id];
|
|
34892
|
+
}
|
|
34893
|
+
await registerProjectWithEngine(project);
|
|
34894
|
+
const sessionId = await window.taa.sessions.submitGoal({
|
|
34895
|
+
goal: job.goal,
|
|
34896
|
+
targetUrl: job.targetUrl || project.targetUrl,
|
|
34897
|
+
project: {
|
|
34898
|
+
projectId: project.id,
|
|
34899
|
+
name: project.name,
|
|
34900
|
+
folderPath: project.folderPath,
|
|
34901
|
+
targetUrl: job.targetUrl || project.targetUrl,
|
|
34902
|
+
memories: (project.memories || []).map((memory) => memory.content),
|
|
34903
|
+
browserMode: job.browserMode || project.browserMode
|
|
34904
|
+
}
|
|
34905
|
+
});
|
|
34906
|
+
linkSessionToProject2(id, sessionId);
|
|
34907
|
+
setActiveSession(sessionId);
|
|
34908
|
+
setStreamingSession(sessionId);
|
|
34909
|
+
await window.taa.tesbo.bindRemoteSession({ jobId: job.id, desktopSessionId: sessionId });
|
|
34910
|
+
}
|
|
34911
|
+
let started = false;
|
|
34912
|
+
function startRemoteSessionListener() {
|
|
34913
|
+
if (started) return;
|
|
34914
|
+
started = true;
|
|
34915
|
+
window.taa.tesbo.onRemoteSession((job) => {
|
|
34916
|
+
void (async () => {
|
|
34917
|
+
try {
|
|
34918
|
+
await startRemoteSession(job);
|
|
34919
|
+
} catch (error) {
|
|
34920
|
+
const message = error instanceof Error ? error.message : "Could not start remote session.";
|
|
34921
|
+
await window.taa.tesbo.ackRemoteSession({ id: job.id, status: "failed", error: message }).catch(() => void 0);
|
|
34922
|
+
}
|
|
34923
|
+
})();
|
|
34924
|
+
});
|
|
34925
|
+
}
|
|
34831
34926
|
void bootstrapEngineConnection();
|
|
34927
|
+
startRemoteSessionListener();
|
|
34832
34928
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
34833
34929
|
/* @__PURE__ */ jsxRuntimeExports.jsx(React.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) })
|
|
34834
34930
|
);
|
package/out/renderer/index.html
CHANGED
|
@@ -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-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DPu6kKU4.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-CKtSvvUQ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|