@tiens.nguyen/gonext-local-worker 1.0.214 → 1.0.215
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/gonext-local-worker.mjs +13 -40
- package/package.json +1 -1
package/gonext-local-worker.mjs
CHANGED
|
@@ -1837,21 +1837,6 @@ async function runAgentChatJob(job) {
|
|
|
1837
1837
|
// lands here (must be a registered workspace; the python side re-validates).
|
|
1838
1838
|
activeWorkspace: payload?.activeWorkspace ?? "",
|
|
1839
1839
|
});
|
|
1840
|
-
// Remember the terminal's current folder so the web homepage can highlight which
|
|
1841
|
-
// registered workspace is ACTIVE (the local_health job reads this back). Without it
|
|
1842
|
-
// the web can only dump the full workspaces.json list with no "you are here" signal.
|
|
1843
|
-
// Fire-and-forget; a stale value just points at the last-used folder, which is fine.
|
|
1844
|
-
if (typeof payload?.activeWorkspace === "string" && payload.activeWorkspace) {
|
|
1845
|
-
const activePath = payload.activeWorkspace;
|
|
1846
|
-
void mkdir(join(homedir(), ".gonext"), { recursive: true })
|
|
1847
|
-
.then(() =>
|
|
1848
|
-
writeFile(
|
|
1849
|
-
join(homedir(), ".gonext", "active-workspace.json"),
|
|
1850
|
-
JSON.stringify({ path: activePath, at: new Date().toISOString() }) + "\n"
|
|
1851
|
-
)
|
|
1852
|
-
)
|
|
1853
|
-
.catch(() => {});
|
|
1854
|
-
}
|
|
1855
1840
|
// 30 min max for an agent run: multi-step ReAct on a 14B/31B with a cold prompt
|
|
1856
1841
|
// cache — or a remote Ollama box on slow GPU cold-loading a big model — can run
|
|
1857
1842
|
// for many minutes per step. Must stay BELOW the web client's hard WS deadline
|
|
@@ -2573,31 +2558,19 @@ async function runLocalHealthJob(job) {
|
|
|
2573
2558
|
}
|
|
2574
2559
|
: undefined,
|
|
2575
2560
|
// Registered coding workspaces (names/paths only — no secrets) so the web can
|
|
2576
|
-
// show which folders the agent may read/edit on this Mac.
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
if (!Array.isArray(parsed?.workspaces)) return undefined;
|
|
2590
|
-
const list = parsed.workspaces.map((w) => ({
|
|
2591
|
-
name: String(w.name ?? ""),
|
|
2592
|
-
path: String(w.path ?? ""),
|
|
2593
|
-
allowRun: Boolean(w.allowRun),
|
|
2594
|
-
active: Boolean(activePath) && String(w.path ?? "") === activePath,
|
|
2595
|
-
}));
|
|
2596
|
-
// Active folder first; the rest keep their registration order.
|
|
2597
|
-
return list.sort((a, b) => Number(b.active) - Number(a.active));
|
|
2598
|
-
})
|
|
2599
|
-
.catch(() => undefined);
|
|
2600
|
-
})(),
|
|
2561
|
+
// show which folders the agent may read/edit on this Mac.
|
|
2562
|
+
workspaces: await readFile(join(homedir(), ".gonext", "workspaces.json"), "utf8")
|
|
2563
|
+
.then((raw) => {
|
|
2564
|
+
const parsed = JSON.parse(raw);
|
|
2565
|
+
return Array.isArray(parsed?.workspaces)
|
|
2566
|
+
? parsed.workspaces.map((w) => ({
|
|
2567
|
+
name: String(w.name ?? ""),
|
|
2568
|
+
path: String(w.path ?? ""),
|
|
2569
|
+
allowRun: Boolean(w.allowRun),
|
|
2570
|
+
}))
|
|
2571
|
+
: undefined;
|
|
2572
|
+
})
|
|
2573
|
+
.catch(() => undefined),
|
|
2601
2574
|
};
|
|
2602
2575
|
const totalTimeSeconds = (Date.now() - start) / 1000;
|
|
2603
2576
|
const doneRes = await workerFetch(`/api/worker/jobs/${jobId}`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiens.nguyen/gonext-local-worker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.215",
|
|
4
4
|
"description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|