@nodetool-ai/cli-server 0.0.0-stage → 0.8.9-bootstrap.0

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/README.md CHANGED
@@ -1,3 +1,14 @@
1
- # Temporary Holding Version
1
+ # Classic API server commands
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The classic application HTTP and WebSocket server. The default `nodetool serve`
4
+ continues to start the lean execution server.
5
+
6
+ Install this independent command feature through the default CLI:
7
+
8
+ ```bash
9
+ nodetool packs add cli-server --yes
10
+ nodetool server serve --help
11
+ ```
12
+
13
+ Commands do not install missing features automatically. See the
14
+ [command reference](../../docs/cli.md#install-command-features).
@@ -0,0 +1 @@
1
+ 2026-10-30T19:34:55.943Z
@@ -0,0 +1,14 @@
1
+ import { Command } from "commander";
2
+ /** Start the classic HTTP/WebSocket server with the installed pack source. */
3
+ export declare function createProgram(): Command;
4
+ export declare function run(argv?: readonly string[]): Promise<void>;
5
+ export declare const feature: {
6
+ descriptor: {
7
+ id: string;
8
+ apiVersion: number;
9
+ requires: string[];
10
+ capabilities: string[];
11
+ };
12
+ run: typeof run;
13
+ };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,OAAO,CAkBvC;AACD,wBAAsB,GAAG,CAAC,IAAI,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAmE;AAC5J,eAAO,MAAM,OAAO;;QAAmB,EAAE;QAAgB,UAAU;QAAK,QAAQ;QAAoB,YAAY;;;CAAyB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import { Command } from "commander";
2
+ import { spawn } from "node:child_process";
3
+ import { fileURLToPath } from "node:url";
4
+ /** Start the classic HTTP/WebSocket server with the installed pack source. */
5
+ export function createProgram() {
6
+ const program = new Command("nodetool");
7
+ program.command("serve").description("Start the classic NodeTool HTTP and WebSocket server").option("--host <host>", "Host to bind", "127.0.0.1").option("--port <port>", "Port to listen on", "7777").action(async (flags) => {
8
+ const { refusePackInstallsInProcess } = await import("@nodetool-ai/pack-manager/packs/install-process");
9
+ refusePackInstallsInProcess("serve");
10
+ const target = new URL(import.meta.url.endsWith(".ts") ? "./packs/serve.ts" : "./packs/serve.js", import.meta.url);
11
+ const child = spawn(process.execPath, [...process.execArgv, fileURLToPath(target)], { stdio: "inherit", env: { ...process.env, HOST: flags.host, PORT: flags.port } });
12
+ const interrupt = () => { child.kill("SIGINT"); };
13
+ const terminate = () => { child.kill("SIGTERM"); };
14
+ process.once("SIGINT", interrupt);
15
+ process.once("SIGTERM", terminate);
16
+ try {
17
+ process.exitCode = await new Promise((resolve, reject) => {
18
+ child.once("error", reject);
19
+ child.once("exit", (code, signal) => resolve(code ?? (signal === "SIGINT" ? 130 : signal === "SIGTERM" ? 143 : 1)));
20
+ });
21
+ }
22
+ finally {
23
+ process.removeListener("SIGINT", interrupt);
24
+ process.removeListener("SIGTERM", terminate);
25
+ }
26
+ });
27
+ return program;
28
+ }
29
+ export async function run(argv = process.argv.slice(2)) { await createProgram().parseAsync([...argv], { from: "user" }); }
30
+ export const feature = { descriptor: { id: "cli-server", apiVersion: 1, requires: ["core", "text"], capabilities: ["cli:server"] }, run };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,UA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,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/packs/serve.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ import { initializeCliRuntime } from "@nodetool-ai/cli-common/runtime-env";
3
+ import { configureCliPackHost, getCliPackSource } from "@nodetool-ai/cli-execution/packs/host";
4
+ import { refusePackInstallsInProcess } from "@nodetool-ai/pack-manager/packs/install-process";
5
+ refusePackInstallsInProcess("serve");
6
+ const entryUrl = new URL(import.meta.url.endsWith(".ts") ? "../index.ts" : "../index.js", import.meta.url).href;
7
+ initializeCliRuntime(entryUrl);
8
+ const selection = process.env["NODETOOL_SERVER_PACKS"];
9
+ const configuredPackIds = selection === undefined ? undefined : z.array(z.string().min(1)).parse(JSON.parse(selection));
10
+ configureCliPackHost(import.meta.url, { configuredPackIds });
11
+ const packSource = await getCliPackSource();
12
+ if (!packSource) {
13
+ throw new Error("CLI serve requires an installed pack source");
14
+ }
15
+ const { createCatalogPackSource } = await import("@nodetool-ai/websocket/pack-source");
16
+ const providerOptions = configuredPackIds === undefined ? {} : { configuredPackIds };
17
+ const { registerProviders } = createCatalogPackSource(providerOptions);
18
+ const { startServer } = await import("@nodetool-ai/websocket/server");
19
+ await startServer({ packSource: { ...packSource, registerProviders } });
20
+ //# sourceMappingURL=serve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/packs/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,2BAA2B,CAAC,OAAO,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC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age",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.9-bootstrap.0",
4
+ "description": "Independent NodeTool server command module",
5
+ "type": "module",
6
+ "engines": {
7
+ "node": ">=22.0.0"
8
+ },
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "nodetool-dev": "./src/index.ts",
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./*": {
19
+ "nodetool-dev": "./src/*.ts",
20
+ "types": "./dist/*.d.ts",
21
+ "import": "./dist/*.js",
22
+ "default": "./dist/*.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "node ../../scripts/build-typescript-workspace.mjs",
27
+ "test": "node ../../scripts/run-vitest.mjs run",
28
+ "lint": "node ../../scripts/run-tsc.mjs --noEmit"
29
+ },
30
+ "dependencies": {
31
+ "@nodetool-ai/cli-common": "0.8.9-bootstrap.0",
32
+ "@nodetool-ai/cli-execution": "0.8.9-bootstrap.0",
33
+ "@nodetool-ai/pack-manager": "0.8.9-bootstrap.0",
34
+ "@nodetool-ai/websocket": "0.8.9-bootstrap.0",
35
+ "commander": "^12.1.0",
36
+ "zod": "^4.1.13",
37
+ "@nodetool-ai/core-nodes": "0.8.9-bootstrap.0",
38
+ "@nodetool-ai/text-nodes": "0.8.9-bootstrap.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^22.0.0",
42
+ "typescript": "npm:@typescript/typescript6@6.0.2",
43
+ "vitest": "^5.0.1"
44
+ },
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/nodetool-ai/nodetool.git",
49
+ "directory": "packages/cli-server"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "files": [
55
+ "dist",
56
+ "README.md"
57
+ ]
58
+ }