localant 1.0.1 → 1.1.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.ja.md +185 -0
- package/README.md +137 -20
- package/SECURITY.md +63 -8
- package/assets/hero.png +0 -0
- package/assets/localant-icon.png +0 -0
- package/examples/skills/article-publisher/README.md +41 -0
- package/examples/skills/article-publisher/package.json +9 -0
- package/examples/skills/article-publisher/skill.json +134 -0
- package/examples/skills/article-publisher/src/index.ts +186 -0
- package/examples/skills/article-publisher/tests/skill.test.ts +72 -0
- package/package.json +26 -6
- package/packages/cli/dist/autostart.d.ts +14 -0
- package/packages/cli/dist/autostart.d.ts.map +1 -0
- package/packages/cli/dist/autostart.js +98 -0
- package/packages/cli/dist/autostart.js.map +1 -0
- package/packages/cli/dist/bin.js +214 -2
- package/packages/cli/dist/bin.js.map +1 -1
- package/packages/cli/dist/runtime.d.ts.map +1 -1
- package/packages/cli/dist/runtime.js +56 -8
- package/packages/cli/dist/runtime.js.map +1 -1
- package/packages/cli/dist/serveo-setup.d.ts +37 -0
- package/packages/cli/dist/serveo-setup.d.ts.map +1 -0
- package/packages/cli/dist/serveo-setup.js +168 -0
- package/packages/cli/dist/serveo-setup.js.map +1 -0
- package/packages/cli/dist/util.d.ts +6 -0
- package/packages/cli/dist/util.d.ts.map +1 -1
- package/packages/cli/dist/util.js +20 -0
- package/packages/cli/dist/util.js.map +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/dashboard/dist/index.d.ts +5 -4
- package/packages/dashboard/dist/index.d.ts.map +1 -1
- package/packages/dashboard/dist/index.js +781 -44
- package/packages/dashboard/dist/index.js.map +1 -1
- package/packages/gateway/dist/gateway.d.ts +14 -1
- package/packages/gateway/dist/gateway.d.ts.map +1 -1
- package/packages/gateway/dist/gateway.js +59 -6
- package/packages/gateway/dist/gateway.js.map +1 -1
- package/packages/gateway/dist/index.d.ts +3 -0
- package/packages/gateway/dist/index.d.ts.map +1 -1
- package/packages/gateway/dist/index.js +3 -0
- package/packages/gateway/dist/index.js.map +1 -1
- package/packages/gateway/dist/managers/coding-agent-manager.d.ts +14 -0
- package/packages/gateway/dist/managers/coding-agent-manager.d.ts.map +1 -1
- package/packages/gateway/dist/managers/coding-agent-manager.js +21 -2
- package/packages/gateway/dist/managers/coding-agent-manager.js.map +1 -1
- package/packages/gateway/dist/managers/fs-manager.d.ts +73 -0
- package/packages/gateway/dist/managers/fs-manager.d.ts.map +1 -1
- package/packages/gateway/dist/managers/fs-manager.js +290 -6
- package/packages/gateway/dist/managers/fs-manager.js.map +1 -1
- package/packages/gateway/dist/managers/git-manager.d.ts +6 -0
- package/packages/gateway/dist/managers/git-manager.d.ts.map +1 -1
- package/packages/gateway/dist/managers/git-manager.js +24 -0
- package/packages/gateway/dist/managers/git-manager.js.map +1 -1
- package/packages/gateway/dist/managers/lsp-service.d.ts +88 -0
- package/packages/gateway/dist/managers/lsp-service.d.ts.map +1 -0
- package/packages/gateway/dist/managers/lsp-service.js +249 -0
- package/packages/gateway/dist/managers/lsp-service.js.map +1 -0
- package/packages/gateway/dist/managers/mcp-bridge.d.ts +2 -1
- package/packages/gateway/dist/managers/mcp-bridge.d.ts.map +1 -1
- package/packages/gateway/dist/managers/mcp-bridge.js +23 -2
- package/packages/gateway/dist/managers/mcp-bridge.js.map +1 -1
- package/packages/gateway/dist/managers/shell-manager.d.ts +19 -0
- package/packages/gateway/dist/managers/shell-manager.d.ts.map +1 -1
- package/packages/gateway/dist/managers/shell-manager.js +28 -0
- package/packages/gateway/dist/managers/shell-manager.js.map +1 -1
- package/packages/gateway/dist/managers/skill-runtime.d.ts +8 -0
- package/packages/gateway/dist/managers/skill-runtime.d.ts.map +1 -1
- package/packages/gateway/dist/managers/skill-runtime.js +15 -0
- package/packages/gateway/dist/managers/skill-runtime.js.map +1 -1
- package/packages/gateway/dist/managers/tunnel-manager.d.ts +19 -1
- package/packages/gateway/dist/managers/tunnel-manager.d.ts.map +1 -1
- package/packages/gateway/dist/managers/tunnel-manager.js +289 -8
- package/packages/gateway/dist/managers/tunnel-manager.js.map +1 -1
- package/packages/gateway/dist/security/command-guard.d.ts +3 -0
- package/packages/gateway/dist/security/command-guard.d.ts.map +1 -1
- package/packages/gateway/dist/security/command-guard.js +15 -7
- package/packages/gateway/dist/security/command-guard.js.map +1 -1
- package/packages/gateway/dist/security/path-guard.d.ts +3 -0
- package/packages/gateway/dist/security/path-guard.d.ts.map +1 -1
- package/packages/gateway/dist/security/path-guard.js +8 -2
- package/packages/gateway/dist/security/path-guard.js.map +1 -1
- package/packages/gateway/dist/stores/config-store.d.ts +10 -0
- package/packages/gateway/dist/stores/config-store.d.ts.map +1 -1
- package/packages/gateway/dist/stores/config-store.js +47 -3
- package/packages/gateway/dist/stores/config-store.js.map +1 -1
- package/packages/gateway/dist/stores/secret-vault.d.ts +19 -3
- package/packages/gateway/dist/stores/secret-vault.d.ts.map +1 -1
- package/packages/gateway/dist/stores/secret-vault.js +47 -6
- package/packages/gateway/dist/stores/secret-vault.js.map +1 -1
- package/packages/gateway/dist/tools/adapters.d.ts.map +1 -1
- package/packages/gateway/dist/tools/adapters.js +198 -7
- package/packages/gateway/dist/tools/adapters.js.map +1 -1
- package/packages/gateway/dist/tools/adb.d.ts.map +1 -1
- package/packages/gateway/dist/tools/adb.js +42 -0
- package/packages/gateway/dist/tools/adb.js.map +1 -1
- package/packages/gateway/dist/tools/agent.d.ts +10 -0
- package/packages/gateway/dist/tools/agent.d.ts.map +1 -0
- package/packages/gateway/dist/tools/agent.js +35 -0
- package/packages/gateway/dist/tools/agent.js.map +1 -0
- package/packages/gateway/dist/tools/aliases.d.ts +7 -0
- package/packages/gateway/dist/tools/aliases.d.ts.map +1 -0
- package/packages/gateway/dist/tools/aliases.js +64 -0
- package/packages/gateway/dist/tools/aliases.js.map +1 -0
- package/packages/gateway/dist/tools/bash.d.ts +10 -0
- package/packages/gateway/dist/tools/bash.d.ts.map +1 -0
- package/packages/gateway/dist/tools/bash.js +67 -0
- package/packages/gateway/dist/tools/bash.js.map +1 -0
- package/packages/gateway/dist/tools/browser.d.ts.map +1 -1
- package/packages/gateway/dist/tools/browser.js +9 -0
- package/packages/gateway/dist/tools/browser.js.map +1 -1
- package/packages/gateway/dist/tools/control.d.ts +8 -0
- package/packages/gateway/dist/tools/control.d.ts.map +1 -0
- package/packages/gateway/dist/tools/control.js +134 -0
- package/packages/gateway/dist/tools/control.js.map +1 -0
- package/packages/gateway/dist/tools/editing.d.ts +8 -0
- package/packages/gateway/dist/tools/editing.d.ts.map +1 -0
- package/packages/gateway/dist/tools/editing.js +102 -0
- package/packages/gateway/dist/tools/editing.js.map +1 -0
- package/packages/gateway/dist/tools/git.d.ts.map +1 -1
- package/packages/gateway/dist/tools/git.js +67 -0
- package/packages/gateway/dist/tools/git.js.map +1 -1
- package/packages/gateway/dist/tools/index.d.ts.map +1 -1
- package/packages/gateway/dist/tools/index.js +17 -2
- package/packages/gateway/dist/tools/index.js.map +1 -1
- package/packages/gateway/dist/tools/lsp.d.ts +10 -0
- package/packages/gateway/dist/tools/lsp.d.ts.map +1 -0
- package/packages/gateway/dist/tools/lsp.js +111 -0
- package/packages/gateway/dist/tools/lsp.js.map +1 -0
- package/packages/gateway/dist/tools/question.d.ts +10 -0
- package/packages/gateway/dist/tools/question.d.ts.map +1 -0
- package/packages/gateway/dist/tools/question.js +30 -0
- package/packages/gateway/dist/tools/question.js.map +1 -0
- package/packages/gateway/dist/tools/shell.d.ts +1 -1
- package/packages/gateway/dist/tools/shell.d.ts.map +1 -1
- package/packages/gateway/dist/tools/shell.js +15 -0
- package/packages/gateway/dist/tools/shell.js.map +1 -1
- package/packages/gateway/dist/tools/skill.d.ts.map +1 -1
- package/packages/gateway/dist/tools/skill.js +2 -7
- package/packages/gateway/dist/tools/skill.js.map +1 -1
- package/packages/gateway/dist/tools/system.js +2 -2
- package/packages/gateway/dist/tools/system.js.map +1 -1
- package/packages/gateway/dist/tools/validation.d.ts +3 -0
- package/packages/gateway/dist/tools/validation.d.ts.map +1 -0
- package/packages/gateway/dist/tools/validation.js +120 -0
- package/packages/gateway/dist/tools/validation.js.map +1 -0
- package/packages/mcp/dist/http-server.d.ts +1 -1
- package/packages/mcp/dist/http-server.d.ts.map +1 -1
- package/packages/mcp/dist/http-server.js +544 -20
- package/packages/mcp/dist/http-server.js.map +1 -1
- package/packages/mcp/dist/mcp-server.d.ts.map +1 -1
- package/packages/mcp/dist/mcp-server.js +5 -1
- package/packages/mcp/dist/mcp-server.js.map +1 -1
- package/packages/shared/dist/config.d.ts +146 -16
- package/packages/shared/dist/config.d.ts.map +1 -1
- package/packages/shared/dist/config.js +93 -7
- package/packages/shared/dist/config.js.map +1 -1
- package/packages/shared/dist/index.d.ts +2 -0
- package/packages/shared/dist/index.d.ts.map +1 -1
- package/packages/shared/dist/index.js +2 -0
- package/packages/shared/dist/index.js.map +1 -1
- package/packages/shared/dist/paths.d.ts +19 -2
- package/packages/shared/dist/paths.d.ts.map +1 -1
- package/packages/shared/dist/paths.js +50 -3
- package/packages/shared/dist/paths.js.map +1 -1
- package/packages/shared/dist/tool-profiles.d.ts +34 -0
- package/packages/shared/dist/tool-profiles.d.ts.map +1 -0
- package/packages/shared/dist/tool-profiles.js +188 -0
- package/packages/shared/dist/tool-profiles.js.map +1 -0
- package/packages/shared/dist/version.d.ts +9 -0
- package/packages/shared/dist/version.d.ts.map +1 -0
- package/packages/shared/dist/version.js +9 -0
- package/packages/shared/dist/version.js.map +1 -0
- package/scripts/postinstall.mjs +56 -0
- package/assets/icon.svg +0 -25
- package/packages/gateway/dist/tools/article.d.ts +0 -3
- package/packages/gateway/dist/tools/article.d.ts.map +0 -1
- package/packages/gateway/dist/tools/article.js +0 -230
- package/packages/gateway/dist/tools/article.js.map +0 -1
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve the
|
|
2
|
+
* Resolve the configuration/data directory.
|
|
3
|
+
*
|
|
4
|
+
* A single home-directory dotfolder (`~/.localant`) on every platform — this
|
|
5
|
+
* matches the ecosystem LocalAnt integrates with (`~/.claude`, `~/.codex`,
|
|
6
|
+
* `~/.opencode`) and is easy to find/inspect. Override with `LOCALANT_HOME`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function configDir(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Pre-1.x per-OS location, retained only so existing installs can be migrated
|
|
11
|
+
* once into {@link configDir}.
|
|
3
12
|
* - macOS: ~/Library/Application Support/LocalAnt
|
|
4
13
|
* - Windows: %APPDATA%/LocalAnt
|
|
5
14
|
* - Linux: $XDG_CONFIG_HOME/LocalAnt or ~/.config/LocalAnt
|
|
6
15
|
*/
|
|
7
|
-
export declare function
|
|
16
|
+
export declare function legacyConfigDir(): string;
|
|
17
|
+
/**
|
|
18
|
+
* One-time migration: if `target` does not yet exist but the legacy per-OS
|
|
19
|
+
* directory does, move the legacy data into `target` (preserving token, vault
|
|
20
|
+
* key, secrets, config, serveo registration, audit log). Returns true if data
|
|
21
|
+
* was migrated. Never clobbers an existing `target`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function migrateLegacyConfigDir(target: string): boolean;
|
|
8
24
|
export interface AppPaths {
|
|
9
25
|
root: string;
|
|
10
26
|
configFile: string;
|
|
11
27
|
tokenFile: string;
|
|
28
|
+
vaultKeyFile: string;
|
|
12
29
|
auditLog: string;
|
|
13
30
|
approvalsFile: string;
|
|
14
31
|
secretsFile: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAIlC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAYxC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAmB9D;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,IAAI,SAAc,GAAG,QAAQ,CAgBrD;AAED,wBAAgB,yBAAyB,IAAI,MAAM,EAAE,CAOpD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAiB7C;AAED,eAAO,MAAM,gBAAgB,aAAW,CAAC"}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import os from "node:os";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
const APP_NAME = "LocalAnt";
|
|
4
5
|
/**
|
|
5
|
-
* Resolve the
|
|
6
|
+
* Resolve the configuration/data directory.
|
|
7
|
+
*
|
|
8
|
+
* A single home-directory dotfolder (`~/.localant`) on every platform — this
|
|
9
|
+
* matches the ecosystem LocalAnt integrates with (`~/.claude`, `~/.codex`,
|
|
10
|
+
* `~/.opencode`) and is easy to find/inspect. Override with `LOCALANT_HOME`.
|
|
11
|
+
*/
|
|
12
|
+
export function configDir() {
|
|
13
|
+
const override = process.env.LOCALANT_HOME;
|
|
14
|
+
if (override && override.trim())
|
|
15
|
+
return path.resolve(override.trim());
|
|
16
|
+
return path.join(os.homedir(), ".localant");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Pre-1.x per-OS location, retained only so existing installs can be migrated
|
|
20
|
+
* once into {@link configDir}.
|
|
6
21
|
* - macOS: ~/Library/Application Support/LocalAnt
|
|
7
22
|
* - Windows: %APPDATA%/LocalAnt
|
|
8
23
|
* - Linux: $XDG_CONFIG_HOME/LocalAnt or ~/.config/LocalAnt
|
|
9
24
|
*/
|
|
10
|
-
export function
|
|
25
|
+
export function legacyConfigDir() {
|
|
11
26
|
const home = os.homedir();
|
|
12
27
|
switch (process.platform) {
|
|
13
28
|
case "darwin":
|
|
@@ -20,11 +35,43 @@ export function configDir() {
|
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* One-time migration: if `target` does not yet exist but the legacy per-OS
|
|
40
|
+
* directory does, move the legacy data into `target` (preserving token, vault
|
|
41
|
+
* key, secrets, config, serveo registration, audit log). Returns true if data
|
|
42
|
+
* was migrated. Never clobbers an existing `target`.
|
|
43
|
+
*/
|
|
44
|
+
export function migrateLegacyConfigDir(target) {
|
|
45
|
+
const legacy = legacyConfigDir();
|
|
46
|
+
if (target === legacy)
|
|
47
|
+
return false;
|
|
48
|
+
if (fs.existsSync(target))
|
|
49
|
+
return false;
|
|
50
|
+
if (!fs.existsSync(legacy))
|
|
51
|
+
return false;
|
|
52
|
+
try {
|
|
53
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
54
|
+
fs.renameSync(legacy, target);
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
// Cross-device rename can fail; fall back to a recursive copy + remove.
|
|
59
|
+
try {
|
|
60
|
+
fs.cpSync(legacy, target, { recursive: true });
|
|
61
|
+
fs.rmSync(legacy, { recursive: true, force: true });
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
23
69
|
export function appPaths(base = configDir()) {
|
|
24
70
|
return {
|
|
25
71
|
root: base,
|
|
26
72
|
configFile: path.join(base, "config.json"),
|
|
27
73
|
tokenFile: path.join(base, "token"),
|
|
74
|
+
vaultKeyFile: path.join(base, "vault.key"),
|
|
28
75
|
auditLog: path.join(base, "audit", "audit.jsonl"),
|
|
29
76
|
approvalsFile: path.join(base, "approvals.json"),
|
|
30
77
|
secretsFile: path.join(base, "secrets.json"),
|
|
@@ -41,7 +88,7 @@ export function defaultAllowedDirectories() {
|
|
|
41
88
|
return [
|
|
42
89
|
path.join(home, "Projects"),
|
|
43
90
|
path.join(home, "Developer"),
|
|
44
|
-
path.join(home, "Documents"
|
|
91
|
+
path.join(home, "Documents"),
|
|
45
92
|
];
|
|
46
93
|
}
|
|
47
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC3C,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe;IAC7B,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,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool exposure profiles.
|
|
3
|
+
*
|
|
4
|
+
* The gateway registers ~200 built-in tools, but exposing all of them to an MCP
|
|
5
|
+
* client (ChatGPT) hurts tool-selection accuracy and bloats every request. Three
|
|
6
|
+
* profiles trade surface area against capability:
|
|
7
|
+
*
|
|
8
|
+
* - `minimal` (legacy default): the small delegation core — shell allowlist,
|
|
9
|
+
* coding agent, skill, read-only fs/project, MCP bridge, control plane.
|
|
10
|
+
* - `coding`: the surface needed to use ChatGPT itself as a coding agent —
|
|
11
|
+
* read/write/edit/multi_edit/apply_patch, grep/glob, bash, git, project
|
|
12
|
+
* validation, todo/task/plan, question, agent delegation, MCP, webfetch,
|
|
13
|
+
* basic browser.
|
|
14
|
+
* - `full`: every registered tool (browser full, adb, skill authoring, config
|
|
15
|
+
* mutation, secret management, destructive git, …).
|
|
16
|
+
*/
|
|
17
|
+
export type ToolProfile = "minimal" | "coding" | "full";
|
|
18
|
+
/**
|
|
19
|
+
* The set of tool names exposed in the `minimal` profile. Everything else is
|
|
20
|
+
* reachable only in the `coding` / `full` profiles — or, preferably, via shell /
|
|
21
|
+
* a coding agent / a skill.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MINIMAL_PROFILE_TOOLS: ReadonlySet<string>;
|
|
24
|
+
/**
|
|
25
|
+
* The set of tool names exposed in the `coding` profile. This is the surface a
|
|
26
|
+
* person would want when driving ChatGPT as a local coding agent: read/search,
|
|
27
|
+
* edit, run, validate, commit, plan, delegate. It is a superset of the minimal
|
|
28
|
+
* status/approval/audit/project/MCP surface plus the standard Codex / Claude
|
|
29
|
+
* Code-style tool names.
|
|
30
|
+
*/
|
|
31
|
+
export declare const CODING_PROFILE_TOOLS: ReadonlySet<string>;
|
|
32
|
+
/** Whether a tool is exposed under the given profile. `full` exposes everything. */
|
|
33
|
+
export declare function isToolInProfile(name: string, profile: ToolProfile): boolean;
|
|
34
|
+
//# sourceMappingURL=tool-profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-profiles.d.ts","sourceRoot":"","sources":["../src/tool-profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAoEpD,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAmHnD,CAAC;AAEH,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAI3E"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The set of tool names exposed in the `minimal` profile. Everything else is
|
|
3
|
+
* reachable only in the `coding` / `full` profiles — or, preferably, via shell /
|
|
4
|
+
* a coding agent / a skill.
|
|
5
|
+
*/
|
|
6
|
+
export const MINIMAL_PROFILE_TOOLS = new Set([
|
|
7
|
+
// --- Control plane / status (cannot be delegated) ---
|
|
8
|
+
"health_check",
|
|
9
|
+
"get_app_status",
|
|
10
|
+
"get_version",
|
|
11
|
+
"get_config",
|
|
12
|
+
"get_dashboard_url",
|
|
13
|
+
"get_mcp_endpoint",
|
|
14
|
+
"get_tunnel_status",
|
|
15
|
+
// --- Approvals + audit (read-only; the human approves in the dashboard) ---
|
|
16
|
+
"approval_list_pending",
|
|
17
|
+
"approval_get",
|
|
18
|
+
"audit_list_logs",
|
|
19
|
+
"audit_get_log",
|
|
20
|
+
"audit_search_logs",
|
|
21
|
+
// --- Pillar 1: Shell ---
|
|
22
|
+
"shell_run_allowed_command",
|
|
23
|
+
"shell_request_command_approval",
|
|
24
|
+
"shell_run_approved_command",
|
|
25
|
+
"shell_list_allowed_commands",
|
|
26
|
+
"shell_list_processes",
|
|
27
|
+
"shell_get_process_output",
|
|
28
|
+
"shell_stop_process",
|
|
29
|
+
// --- Pillar 2: coding Agent ---
|
|
30
|
+
"coding_agent_list",
|
|
31
|
+
"coding_agent_status",
|
|
32
|
+
"coding_agent_plan",
|
|
33
|
+
"coding_agent_start_task",
|
|
34
|
+
"coding_agent_get_task",
|
|
35
|
+
"coding_agent_get_logs",
|
|
36
|
+
"coding_agent_stop_task",
|
|
37
|
+
"coding_agent_continue_task",
|
|
38
|
+
"coding_agent_get_result",
|
|
39
|
+
"coding_agent_get_diff",
|
|
40
|
+
"coding_agent_run_validation",
|
|
41
|
+
// --- Pillar 3: Skill ---
|
|
42
|
+
"skill_list",
|
|
43
|
+
"skill_info",
|
|
44
|
+
"skill_run",
|
|
45
|
+
"skill_search_registry",
|
|
46
|
+
"skill_install_from_git",
|
|
47
|
+
// --- Read-only filesystem (lightweight read path) ---
|
|
48
|
+
"fs_list_allowed_directories",
|
|
49
|
+
"fs_list_files",
|
|
50
|
+
"fs_read_file",
|
|
51
|
+
"fs_read_file_range",
|
|
52
|
+
"fs_search_files",
|
|
53
|
+
"fs_search_content",
|
|
54
|
+
"fs_get_file_info",
|
|
55
|
+
// --- Read-only project context ---
|
|
56
|
+
"project_list",
|
|
57
|
+
"project_get",
|
|
58
|
+
"project_status",
|
|
59
|
+
"project_detect_stack",
|
|
60
|
+
// --- MCP bridge ---
|
|
61
|
+
"mcp_server_list",
|
|
62
|
+
"mcp_server_register",
|
|
63
|
+
"mcp_server_unregister",
|
|
64
|
+
"mcp_server_status",
|
|
65
|
+
"mcp_server_list_tools",
|
|
66
|
+
"mcp_server_run_tool",
|
|
67
|
+
]);
|
|
68
|
+
/**
|
|
69
|
+
* The set of tool names exposed in the `coding` profile. This is the surface a
|
|
70
|
+
* person would want when driving ChatGPT as a local coding agent: read/search,
|
|
71
|
+
* edit, run, validate, commit, plan, delegate. It is a superset of the minimal
|
|
72
|
+
* status/approval/audit/project/MCP surface plus the standard Codex / Claude
|
|
73
|
+
* Code-style tool names.
|
|
74
|
+
*/
|
|
75
|
+
export const CODING_PROFILE_TOOLS = new Set([
|
|
76
|
+
...MINIMAL_PROFILE_TOOLS,
|
|
77
|
+
// --- Filesystem / code editing (standard names + aliases) ---
|
|
78
|
+
"read",
|
|
79
|
+
"read_file",
|
|
80
|
+
"read_file_range",
|
|
81
|
+
"write",
|
|
82
|
+
"write_file",
|
|
83
|
+
"edit",
|
|
84
|
+
"edit_file",
|
|
85
|
+
"multi_edit",
|
|
86
|
+
"apply_patch",
|
|
87
|
+
"list_files",
|
|
88
|
+
"glob",
|
|
89
|
+
"grep",
|
|
90
|
+
"search_content",
|
|
91
|
+
"search_files",
|
|
92
|
+
"get_file_info",
|
|
93
|
+
"create_directory",
|
|
94
|
+
"move_file",
|
|
95
|
+
"copy_file",
|
|
96
|
+
"delete_file",
|
|
97
|
+
"diff_file",
|
|
98
|
+
// --- Shell / bash ---
|
|
99
|
+
"bash",
|
|
100
|
+
"shell_run",
|
|
101
|
+
"shell_run_background",
|
|
102
|
+
"shell_get_output",
|
|
103
|
+
"shell_stop",
|
|
104
|
+
"bash_output",
|
|
105
|
+
"kill_shell",
|
|
106
|
+
"command_exists",
|
|
107
|
+
// --- Git ---
|
|
108
|
+
"git_status",
|
|
109
|
+
"git_diff",
|
|
110
|
+
"git_diff_file",
|
|
111
|
+
"git_list_changed_files",
|
|
112
|
+
"git_log",
|
|
113
|
+
"git_branch",
|
|
114
|
+
"git_checkout",
|
|
115
|
+
"git_checkout_new_branch",
|
|
116
|
+
"git_add",
|
|
117
|
+
"git_commit",
|
|
118
|
+
"git_restore",
|
|
119
|
+
"git_stash",
|
|
120
|
+
"git_clean_preview",
|
|
121
|
+
"git_apply_patch",
|
|
122
|
+
"git_create_patch",
|
|
123
|
+
"git_get_current_branch",
|
|
124
|
+
"git_is_dirty",
|
|
125
|
+
// --- Project / validation ---
|
|
126
|
+
"project_register",
|
|
127
|
+
"project_get_package_scripts",
|
|
128
|
+
"project_install_deps",
|
|
129
|
+
"project_run_tests",
|
|
130
|
+
"project_run_lint",
|
|
131
|
+
"project_run_typecheck",
|
|
132
|
+
"project_run_format",
|
|
133
|
+
"project_run_build",
|
|
134
|
+
"project_run_validation",
|
|
135
|
+
// --- Human interaction ---
|
|
136
|
+
// NOTE: no todo/plan/task or question/ask_user tools — ChatGPT plans and asks
|
|
137
|
+
// the user natively, so tool-ifying those only bloats the surface. Only the
|
|
138
|
+
// local security-gating request is exposed; ChatGPT must NOT self-approve, so
|
|
139
|
+
// approval_approve/approval_deny are deliberately excluded (human approves in
|
|
140
|
+
// the dashboard / CLI).
|
|
141
|
+
"approval_request",
|
|
142
|
+
// --- Agent delegation (aliases over coding_agent_*) ---
|
|
143
|
+
"agent_list",
|
|
144
|
+
"agent_status",
|
|
145
|
+
"agent_run",
|
|
146
|
+
"agent_plan",
|
|
147
|
+
"agent_continue",
|
|
148
|
+
"agent_stop",
|
|
149
|
+
"agent_get_logs",
|
|
150
|
+
"agent_get_result",
|
|
151
|
+
"agent_get_diff",
|
|
152
|
+
"agent_run_validation",
|
|
153
|
+
// --- LSP / code intelligence ---
|
|
154
|
+
"lsp_status",
|
|
155
|
+
"lsp_list_servers",
|
|
156
|
+
"lsp_diagnostics",
|
|
157
|
+
"lsp_document_symbols",
|
|
158
|
+
"lsp_go_to_definition",
|
|
159
|
+
"lsp_find_references",
|
|
160
|
+
"lsp_hover",
|
|
161
|
+
"lsp_workspace_symbols",
|
|
162
|
+
"lsp_rename_symbol",
|
|
163
|
+
// --- Basic browser ---
|
|
164
|
+
"browser_open",
|
|
165
|
+
"browser_close",
|
|
166
|
+
"browser_screenshot",
|
|
167
|
+
"browser_extract_text",
|
|
168
|
+
"browser_get_url",
|
|
169
|
+
"browser_wait",
|
|
170
|
+
// --- MCP import ---
|
|
171
|
+
"mcp_import_claude_config",
|
|
172
|
+
"mcp_import_codex_config",
|
|
173
|
+
"mcp_import_opencode_config",
|
|
174
|
+
"mcp_import_all_agent_configs",
|
|
175
|
+
// --- Tunnel control ---
|
|
176
|
+
"tunnel_start",
|
|
177
|
+
"tunnel_stop",
|
|
178
|
+
"tunnel_restart",
|
|
179
|
+
]);
|
|
180
|
+
/** Whether a tool is exposed under the given profile. `full` exposes everything. */
|
|
181
|
+
export function isToolInProfile(name, profile) {
|
|
182
|
+
if (profile === "full")
|
|
183
|
+
return true;
|
|
184
|
+
if (profile === "coding")
|
|
185
|
+
return CODING_PROFILE_TOOLS.has(name);
|
|
186
|
+
return MINIMAL_PROFILE_TOOLS.has(name);
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=tool-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-profiles.js","sourceRoot":"","sources":["../src/tool-profiles.ts"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAS;IACxE,uDAAuD;IACvD,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IAEnB,6EAA6E;IAC7E,uBAAuB;IACvB,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IAEnB,0BAA0B;IAC1B,2BAA2B;IAC3B,gCAAgC;IAChC,4BAA4B;IAC5B,6BAA6B;IAC7B,sBAAsB;IACtB,0BAA0B;IAC1B,oBAAoB;IAEpB,iCAAiC;IACjC,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,yBAAyB;IACzB,uBAAuB;IACvB,uBAAuB;IACvB,wBAAwB;IACxB,4BAA4B;IAC5B,yBAAyB;IACzB,uBAAuB;IACvB,6BAA6B;IAE7B,0BAA0B;IAC1B,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,uBAAuB;IACvB,wBAAwB;IA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yDAAyD;IACzD,YAAY;IACZ,cAAc;IACd,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IAEtB,kCAAkC;IAClC,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,WAAW;IACX,uBAAuB;IACvB,mBAAmB;IAGnB,wBAAwB;IACxB,cAAc;IACd,eAAe;IACf,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,cAAc;IAEd,qBAAqB;IACrB,0BAA0B;IAC1B,yBAAyB;IACzB,4BAA4B;IAC5B,8BAA8B;IAE9B,yBAAyB;IACzB,cAAc;IACd,aAAa;IACb,gBAAgB;CACjB,CAAC,CAAC;AAEH,oFAAoF;AACpF,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,OAAoB;IAChE,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the application version.
|
|
3
|
+
*
|
|
4
|
+
* Kept in sync with the root `package.json` `version` field by the release
|
|
5
|
+
* process (see CONTRIBUTING.md → Releasing). Importing the version from here
|
|
6
|
+
* avoids hardcoded, drifting `"1.0.0"` strings scattered across packages.
|
|
7
|
+
*/
|
|
8
|
+
export declare const APP_VERSION = "1.1.0";
|
|
9
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the application version.
|
|
3
|
+
*
|
|
4
|
+
* Kept in sync with the root `package.json` `version` field by the release
|
|
5
|
+
* process (see CONTRIBUTING.md → Releasing). Importing the version from here
|
|
6
|
+
* avoids hardcoded, drifting `"1.0.0"` strings scattered across packages.
|
|
7
|
+
*/
|
|
8
|
+
export const APP_VERSION = "1.1.0";
|
|
9
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -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
|
+
}
|
package/assets/icon.svg
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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">>_</text>
|
|
25
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"article.d.ts","sourceRoot":"","sources":["../../src/tools/article.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAuB7C,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAwMtD"}
|