localant 1.0.0 → 1.0.2

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,7 @@
1
+ <p align="center">
2
+ <img src="assets/icon.svg" width="96" height="96" alt="LocalAnt — ChatGPT-native Local MCP Gateway" />
3
+ </p>
4
+
1
5
  # LocalAnt
2
6
 
3
7
  > **Use ChatGPT as the brain. Use your local computer as the hands.**
@@ -0,0 +1,25 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="none">
2
+ <!-- Body -->
3
+ <ellipse cx="52" cy="70" rx="20" ry="14" fill="#4f8cff"/>
4
+ <ellipse cx="88" cy="68" rx="18" ry="13" fill="#4f8cff"/>
5
+ <!-- Head -->
6
+ <circle cx="42" cy="50" r="15" fill="#4f8cff"/>
7
+ <!-- Eyes -->
8
+ <circle cx="37" cy="47" r="3" fill="#0b0f17"/>
9
+ <circle cx="46" cy="47" r="3" fill="#0b0f17"/>
10
+ <!-- Antennae -->
11
+ <path d="M35 38 Q28 18 22 10" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
12
+ <path d="M46 38 Q50 16 58 8" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
13
+ <circle cx="22" cy="9" r="2.5" fill="#7fafff"/>
14
+ <circle cx="58" cy="7" r="2.5" fill="#7fafff"/>
15
+ <!-- Legs -->
16
+ <path d="M42 68 L28 88" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
17
+ <path d="M52 70 L52 92" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
18
+ <path d="M62 68 L72 90" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
19
+ <path d="M78 66 L68 90" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
20
+ <path d="M88 68 L92 92" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
21
+ <path d="M98 64 L108 88" stroke="#4f8cff" stroke-width="2.5" stroke-linecap="round"/>
22
+ <!-- Terminal cursor (representing local execution) -->
23
+ <rect x="68" y="40" width="28" height="10" rx="2" fill="#1b2433" stroke="#3fb950" stroke-width="0.8"/>
24
+ <text x="72" y="48" font-family="monospace" font-size="7" fill="#3fb950">&gt;_</text>
25
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "localant",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "description": "LocalAnt — Use ChatGPT as the brain and your local computer as the hands. A safe, permissioned local MCP Gateway for ChatGPT.",
6
6
  "license": "MIT",
@@ -12,24 +12,22 @@
12
12
  "packages/*/dist/**",
13
13
  "packages/*/package.json",
14
14
  "examples/skills/**",
15
+ "assets/**",
16
+ "scripts/postinstall.mjs",
15
17
  "README.md",
16
18
  "SECURITY.md",
17
19
  "LICENSE"
18
20
  ],
19
21
  "engines": {
20
- "node": ">=20"
22
+ "node": ">=22"
21
23
  },
22
- "scripts": {
23
- "build": "tsc -b",
24
- "clean": "tsc -b --clean && rimraf packages/*/dist",
25
- "dev": "tsc -b --watch",
26
- "typecheck": "tsc -b --noEmit false",
27
- "lint": "eslint .",
28
- "test": "vitest run",
29
- "test:watch": "vitest",
30
- "validate": "pnpm build && pnpm test",
31
- "start": "node packages/cli/dist/bin.js start",
32
- "setup": "node packages/cli/dist/bin.js setup"
24
+ "dependencies": {
25
+ "@modelcontextprotocol/sdk": "^1.12.0",
26
+ "commander": "^12.1.0",
27
+ "express": "^5.0.1",
28
+ "nanoid": "^5.0.9",
29
+ "tsx": "^4.19.2",
30
+ "zod": "^3.24.1"
33
31
  },
34
32
  "keywords": [
35
33
  "chatgpt",
@@ -45,10 +43,6 @@
45
43
  "localant"
46
44
  ],
47
45
  "devDependencies": {
48
- "@localant/gateway": "workspace:*",
49
- "@localant/mcp": "workspace:*",
50
- "@localant/shared": "workspace:*",
51
- "@localant/skill-sdk": "workspace:*",
52
46
  "@types/express": "^5.0.0",
53
47
  "@types/node": "^22.10.0",
54
48
  "@typescript-eslint/eslint-plugin": "^8.18.0",
@@ -57,7 +51,23 @@
57
51
  "rimraf": "^6.0.1",
58
52
  "tsx": "^4.19.2",
59
53
  "typescript": "^5.7.2",
60
- "vitest": "^2.1.8"
54
+ "vitest": "^2.1.8",
55
+ "@localant/gateway": "1.0.0",
56
+ "@localant/mcp": "1.0.0",
57
+ "@localant/shared": "1.0.0",
58
+ "@localant/skill-sdk": "1.0.0"
61
59
  },
62
- "packageManager": "pnpm@11.5.1"
63
- }
60
+ "scripts": {
61
+ "build": "tsc -b",
62
+ "clean": "tsc -b --clean && rimraf packages/*/dist",
63
+ "dev": "tsc -b --watch",
64
+ "typecheck": "tsc -b --noEmit false",
65
+ "lint": "eslint .",
66
+ "test": "vitest run",
67
+ "test:watch": "vitest",
68
+ "validate": "pnpm build && pnpm test",
69
+ "start": "node packages/cli/dist/bin.js start",
70
+ "setup": "node packages/cli/dist/bin.js setup",
71
+ "postinstall": "node scripts/postinstall.mjs"
72
+ }
73
+ }
File without changes
@@ -126,11 +126,11 @@ export declare const ConfigSchema: z.ZodObject<{
126
126
  enabled: z.ZodDefault<z.ZodBoolean>;
127
127
  port: z.ZodDefault<z.ZodNumber>;
128
128
  }, "strip", z.ZodTypeAny, {
129
- port: number;
130
129
  enabled: boolean;
130
+ port: number;
131
131
  }, {
132
- port?: number | undefined;
133
132
  enabled?: boolean | undefined;
133
+ port?: number | undefined;
134
134
  }>>;
135
135
  tunnel: z.ZodDefault<z.ZodObject<{
136
136
  provider: z.ZodDefault<z.ZodEnum<["cloudflared", "ngrok", "none"]>>;
@@ -228,8 +228,8 @@ export declare const ConfigSchema: z.ZodObject<{
228
228
  port: number;
229
229
  };
230
230
  dashboard: {
231
- port: number;
232
231
  enabled: boolean;
232
+ port: number;
233
233
  };
234
234
  tunnel: {
235
235
  provider: "none" | "cloudflared" | "ngrok";
@@ -271,8 +271,8 @@ export declare const ConfigSchema: z.ZodObject<{
271
271
  port?: number | undefined;
272
272
  } | undefined;
273
273
  dashboard?: {
274
- port?: number | undefined;
275
274
  enabled?: boolean | undefined;
275
+ port?: number | undefined;
276
276
  } | undefined;
277
277
  tunnel?: {
278
278
  provider?: "none" | "cloudflared" | "ngrok" | undefined;
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ // postinstall — makes @localant/* internal packages resolvable at runtime.
3
+ //
4
+ // The published npm tarball flattens the monorepo: each package's dist dir and
5
+ // package.json ship at their original `packages/<pkg>/` path, but there is no
6
+ // `node_modules/@localant/` entry, so Node can't resolve `@localant/shared`
7
+ // (and friends) when the CLI bundle imports them.
8
+ //
9
+ // This script links `node_modules/@localant/<pkg>` to the real `packages/<pkg>`
10
+ // directory, reusing each package's own package.json (whose `main`/`types`
11
+ // already point at `dist/`). It is a no-op in the dev workspace, where pnpm has
12
+ // already created those links — writing through them would corrupt the real
13
+ // source package.json files.
14
+ import fs from "node:fs";
15
+ import path from "node:path";
16
+ import { fileURLToPath } from "node:url";
17
+
18
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
+ const root = path.resolve(__dirname, "..");
20
+
21
+ const LOCALANT_PACKAGES = ["shared", "skill-sdk", "gateway", "mcp", "dashboard", "cli"];
22
+
23
+ for (const pkg of LOCALANT_PACKAGES) {
24
+ const linkPath = path.join(root, "node_modules", "@localant", pkg);
25
+ const target = path.join(root, "packages", pkg);
26
+
27
+ // Already linked (pnpm/npm workspace) — never write through it.
28
+ if (fs.existsSync(linkPath)) continue;
29
+ // Source package not present (unexpected layout) — skip rather than guess.
30
+ if (!fs.existsSync(target)) continue;
31
+
32
+ fs.mkdirSync(path.dirname(linkPath), { recursive: true });
33
+ const relTarget = path.relative(path.dirname(linkPath), target);
34
+ try {
35
+ fs.symlinkSync(relTarget, linkPath, "junction");
36
+ } catch {
37
+ // Symlinks unavailable (e.g. restricted Windows): fall back to a shim
38
+ // package.json that re-points main/types at the real dist via absolute path.
39
+ const real = JSON.parse(fs.readFileSync(path.join(target, "package.json"), "utf8"));
40
+ fs.mkdirSync(linkPath, { recursive: true });
41
+ fs.writeFileSync(
42
+ path.join(linkPath, "package.json"),
43
+ JSON.stringify(
44
+ {
45
+ name: `@localant/${pkg}`,
46
+ version: real.version ?? "1.0.0",
47
+ type: "module",
48
+ main: path.join(target, "dist/index.js"),
49
+ types: path.join(target, "dist/index.d.ts"),
50
+ },
51
+ null,
52
+ 2,
53
+ ),
54
+ );
55
+ }
56
+ }