@tiens.nguyen/gonext-local-worker 1.0.297 → 1.0.299
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 +12 -0
- package/gonext-repl.mjs +12 -1
- package/package.json +1 -1
package/gonext-local-worker.mjs
CHANGED
|
@@ -16,11 +16,22 @@ import { homedir, platform, tmpdir } from "node:os";
|
|
|
16
16
|
import { dirname, extname, join } from "node:path";
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
18
18
|
import { promisify } from "node:util";
|
|
19
|
+
import { createRequire } from "node:module";
|
|
19
20
|
import dotenv from "dotenv";
|
|
20
21
|
import OpenAI from "openai";
|
|
21
22
|
|
|
22
23
|
const WORKER_DIR = dirname(fileURLToPath(import.meta.url));
|
|
23
24
|
|
|
25
|
+
// Running worker version, read from the package's own package.json (single source of
|
|
26
|
+
// truth) so the startup banner shows exactly which build a box is running (task #105).
|
|
27
|
+
const WORKER_VERSION = (() => {
|
|
28
|
+
try {
|
|
29
|
+
return createRequire(import.meta.url)("./package.json").version ?? "unknown";
|
|
30
|
+
} catch {
|
|
31
|
+
return "unknown";
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
34
|
+
|
|
24
35
|
/** Avoid `node:child_process/promises` — not available on some Node builds / older runtimes. */
|
|
25
36
|
const execFile = promisify(execFileCallback);
|
|
26
37
|
|
|
@@ -508,6 +519,7 @@ if (args[0] === "simulate-chat") {
|
|
|
508
519
|
|
|
509
520
|
assertWorkerRuntimeConfig("worker");
|
|
510
521
|
|
|
522
|
+
console.log(`[gonext-worker] gonext-local-worker v${WORKER_VERSION}`);
|
|
511
523
|
console.log(
|
|
512
524
|
`[gonext-worker] API base ${apiBase} — streaming chunks POST ${apiBase}${CHUNK_PATH} — keyfp=${workerKeyFingerprint(
|
|
513
525
|
workerKey
|
package/gonext-repl.mjs
CHANGED
|
@@ -31,9 +31,20 @@ import { dirname, join, resolve, basename } from "node:path";
|
|
|
31
31
|
import { fileURLToPath } from "node:url";
|
|
32
32
|
import { createInterface } from "node:readline";
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
34
|
+
import { createRequire } from "node:module";
|
|
34
35
|
import dotenv from "dotenv";
|
|
35
36
|
|
|
36
37
|
const DIR = dirname(fileURLToPath(import.meta.url));
|
|
38
|
+
|
|
39
|
+
// Running version, from the package's own package.json (task #105) — shown in the REPL
|
|
40
|
+
// banner so it's clear which build is running.
|
|
41
|
+
const REPL_VERSION = (() => {
|
|
42
|
+
try {
|
|
43
|
+
return createRequire(import.meta.url)("./package.json").version ?? "unknown";
|
|
44
|
+
} catch {
|
|
45
|
+
return "unknown";
|
|
46
|
+
}
|
|
47
|
+
})();
|
|
37
48
|
const ENV_FILE = join(homedir(), ".gonext", "worker.env");
|
|
38
49
|
const WS_FILE = join(homedir(), ".gonext", "workspaces.json");
|
|
39
50
|
const SESSIONS_DIR = join(homedir(), ".gonext", "sessions");
|
|
@@ -1870,7 +1881,7 @@ async function runAgentTurn(history) {
|
|
|
1870
1881
|
|
|
1871
1882
|
// ---------- REPL ----------
|
|
1872
1883
|
async function main() {
|
|
1873
|
-
console.log(cyan("GoNext agent REPL") + dim(` · API ${apiBase} · key ${workerKey.slice(0, 8)}…`));
|
|
1884
|
+
console.log(cyan("GoNext agent REPL") + dim(` v${REPL_VERSION} · API ${apiBase} · key ${workerKey.slice(0, 8)}…`));
|
|
1874
1885
|
await ensureWorkspace();
|
|
1875
1886
|
// Restore this folder's remembered auto-test + deploy-target so the banner + agent-ask
|
|
1876
1887
|
// reflect them (both survive a fresh terminal in the same project).
|
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.299",
|
|
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",
|