@gaunt-sloth/agent 2.0.0-alpha.8 → 2.0.0-beta.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 +73 -23
- package/cli-acp.js +21 -24
- package/dist/builtInToolsConfig.d.ts +17 -3
- package/dist/builtInToolsConfig.js +43 -41
- package/dist/builtInToolsConfig.js.map +1 -1
- package/dist/core/debugCapture.d.ts +7 -49
- package/dist/core/debugCapture.js +1 -1
- package/dist/core/debugCapture.js.map +1 -1
- package/dist/core/resolveAgentFactory.d.ts +10 -9
- package/dist/core/resolveAgentFactory.js +11 -12
- package/dist/core/resolveAgentFactory.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp/OAuthClientProviderImpl.js.map +1 -1
- package/dist/mcp/tlsTrust.d.ts +61 -0
- package/dist/mcp/tlsTrust.js +109 -0
- package/dist/mcp/tlsTrust.js.map +1 -0
- package/dist/middleware/binaryContentInjectionMiddleware.d.ts +8 -1
- package/dist/middleware/binaryContentInjectionMiddleware.js +11 -2
- package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -1
- package/dist/middleware/frontendImageInjectionMiddleware.d.ts +107 -0
- package/dist/middleware/frontendImageInjectionMiddleware.js +167 -0
- package/dist/middleware/frontendImageInjectionMiddleware.js.map +1 -0
- package/dist/middleware/registry.js +49 -1
- package/dist/middleware/registry.js.map +1 -1
- package/dist/middleware/types.d.ts +16 -2
- package/dist/modules/a2a/A2AClientWrapper.d.ts +56 -1
- package/dist/modules/a2a/A2AClientWrapper.js +131 -31
- package/dist/modules/a2a/A2AClientWrapper.js.map +1 -1
- package/dist/modules/acp/acpAgentApp.d.ts +57 -0
- package/dist/modules/acp/acpAgentApp.js +378 -0
- package/dist/modules/acp/acpAgentApp.js.map +1 -0
- package/dist/modules/acp/acpAgentAppV1.d.ts +52 -0
- package/dist/modules/acp/acpAgentAppV1.js +307 -0
- package/dist/modules/acp/acpAgentAppV1.js.map +1 -0
- package/dist/modules/acp/acpCommon.d.ts +167 -0
- package/dist/modules/acp/acpCommon.js +282 -0
- package/dist/modules/acp/acpCommon.js.map +1 -0
- package/dist/modules/acp/acpPermissions.d.ts +65 -0
- package/dist/modules/acp/acpPermissions.js +162 -0
- package/dist/modules/acp/acpPermissions.js.map +1 -0
- package/dist/modules/acp/acpPermissionsV1.d.ts +45 -0
- package/dist/modules/acp/acpPermissionsV1.js +110 -0
- package/dist/modules/acp/acpPermissionsV1.js.map +1 -0
- package/dist/modules/acp/acpRouter.d.ts +41 -0
- package/dist/modules/acp/acpRouter.js +48 -0
- package/dist/modules/acp/acpRouter.js.map +1 -0
- package/dist/modules/acp/acpStdio.d.ts +47 -0
- package/dist/modules/acp/acpStdio.js +71 -0
- package/dist/modules/acp/acpStdio.js.map +1 -0
- package/dist/modules/acp/acpToolCalls.d.ts +93 -0
- package/dist/modules/acp/acpToolCalls.js +193 -0
- package/dist/modules/acp/acpToolCalls.js.map +1 -0
- package/dist/modules/acp/acpUpdates.d.ts +48 -0
- package/dist/modules/acp/acpUpdates.js +142 -0
- package/dist/modules/acp/acpUpdates.js.map +1 -0
- package/dist/modules/acp/acpUpdatesV1.d.ts +61 -0
- package/dist/modules/acp/acpUpdatesV1.js +162 -0
- package/dist/modules/acp/acpUpdatesV1.js.map +1 -0
- package/dist/modules/apiAgUiModule.d.ts +87 -0
- package/dist/modules/apiAgUiModule.js +193 -28
- package/dist/modules/apiAgUiModule.js.map +1 -1
- package/dist/modules/interactiveSessionModule.js +497 -51
- package/dist/modules/interactiveSessionModule.js.map +1 -1
- package/dist/modules/slashCommands.d.ts +582 -0
- package/dist/modules/slashCommands.js +1001 -0
- package/dist/modules/slashCommands.js.map +1 -0
- package/dist/resolvers.js +119 -9
- package/dist/resolvers.js.map +1 -1
- package/dist/tools/GthCustomToolkit.js +95 -11
- package/dist/tools/GthCustomToolkit.js.map +1 -1
- package/dist/tools/GthDevToolkit.d.ts +8 -5
- package/dist/tools/GthDevToolkit.js +89 -43
- package/dist/tools/GthDevToolkit.js.map +1 -1
- package/dist/tools/GthFileSystemToolkit.d.ts +63 -0
- package/dist/tools/GthFileSystemToolkit.js +506 -105
- package/dist/tools/GthFileSystemToolkit.js.map +1 -1
- package/dist/tools/McpResourceTool.d.ts +31 -0
- package/dist/tools/McpResourceTool.js +106 -0
- package/dist/tools/McpResourceTool.js.map +1 -0
- package/dist/tools/gthChecklistTool.d.ts +30 -0
- package/dist/tools/gthChecklistTool.js +80 -0
- package/dist/tools/gthChecklistTool.js.map +1 -0
- package/dist/tools/gthGrepTool.d.ts +54 -0
- package/dist/tools/gthGrepTool.js +482 -0
- package/dist/tools/gthGrepTool.js.map +1 -0
- package/dist/tools/shell/env.js +1 -1
- package/dist/tools/shell/env.js.map +1 -1
- package/dist/tools/shell/outputBuffer.js.map +1 -1
- package/dist/tools/shell/workDir.d.ts +1 -10
- package/dist/tools/shell/workDir.js +10 -36
- package/dist/tools/shell/workDir.js.map +1 -1
- package/dist/utils/mcpAuthError.d.ts +36 -0
- package/dist/utils/mcpAuthError.js +89 -0
- package/dist/utils/mcpAuthError.js.map +1 -0
- package/dist/utils/mcpUtils.js +16 -0
- package/dist/utils/mcpUtils.js.map +1 -1
- package/package.json +13 -13
- package/dist/core/GthDeepAgent.d.ts +0 -181
- package/dist/core/GthDeepAgent.js +0 -682
- package/dist/core/GthDeepAgent.js.map +0 -1
- package/dist/core/deepAgentPermissions.d.ts +0 -115
- package/dist/core/deepAgentPermissions.js +0 -282
- package/dist/core/deepAgentPermissions.js.map +0 -1
- package/dist/core/gthAcpServer.d.ts +0 -27
- package/dist/core/gthAcpServer.js +0 -82
- package/dist/core/gthAcpServer.js.map +0 -1
- package/dist/core/gthDeepAgentFactory.d.ts +0 -8
- package/dist/core/gthDeepAgentFactory.js +0 -9
- package/dist/core/gthDeepAgentFactory.js.map +0 -1
- package/dist/modules/acpModule.d.ts +0 -40
- package/dist/modules/acpModule.js +0 -78
- package/dist/modules/acpModule.js.map +0 -1
- package/dist/tools/shell/allowlist.d.ts +0 -11
- package/dist/tools/shell/allowlist.js +0 -12
- package/dist/tools/shell/allowlist.js.map +0 -1
- package/dist/tools/shell/arity.d.ts +0 -11
- package/dist/tools/shell/arity.js +0 -12
- package/dist/tools/shell/arity.js.map +0 -1
- package/dist/tools/shell/hardline.d.ts +0 -15
- package/dist/tools/shell/hardline.js +0 -88
- package/dist/tools/shell/hardline.js.map +0 -1
- package/dist/tools/shell/normalize.d.ts +0 -10
- package/dist/tools/shell/normalize.js +0 -11
- package/dist/tools/shell/normalize.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,25 +1,75 @@
|
|
|
1
1
|
# @gaunt-sloth/agent
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
The agent runtime for Gaunt Sloth: built-in tools and toolkits (filesystem, dev/shell, web
|
|
4
|
+
fetch, custom), the middleware registry, MCP client + OAuth provider, A2A client and tools, the
|
|
5
|
+
AG-UI server (`startAgUiServer`), the interactive session
|
|
6
|
+
module, and the `createResolvers` tool/middleware resolver wiring. It builds on
|
|
7
|
+
[`@gaunt-sloth/core`](https://www.npmjs.com/package/@gaunt-sloth/core) (config, provider
|
|
8
|
+
factory, lean agent runtime).
|
|
9
|
+
|
|
10
|
+
**When to depend on this package** — you are embedding the running agent: serving it to a web
|
|
11
|
+
client over AG-UI, wiring its tools/middleware into your own host, or talking to MCP/A2A
|
|
12
|
+
services. The fat [`gaunt-sloth`](https://www.npmjs.com/package/gaunt-sloth) CLI wires this same
|
|
13
|
+
runtime into `gth chat` / `gth code` / `gth api`; install that instead if you want the terminal
|
|
14
|
+
experience rather than a library.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @gaunt-sloth/agent @langchain/anthropic
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
AI providers are optional peer dependencies of `@gaunt-sloth/core` — install the one(s) your
|
|
23
|
+
config uses (see the core README's provider list).
|
|
24
|
+
|
|
25
|
+
## Embedding: serve the agent over AG-UI
|
|
26
|
+
|
|
27
|
+
I want a local web client to talk to the configured Gaunt Sloth agent over the
|
|
28
|
+
[AG-UI protocol](https://github.com/ag-ui-protocol/ag-ui). With a `.gsloth.config.*` in the
|
|
29
|
+
working directory:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { initConfig } from '@gaunt-sloth/core';
|
|
33
|
+
import { startAgUiServer } from '@gaunt-sloth/agent';
|
|
34
|
+
|
|
35
|
+
const config = await initConfig({});
|
|
36
|
+
await startAgUiServer(config, config.commands?.api?.port ?? 3000);
|
|
37
|
+
// POST /agents/:agentId/run now streams typed AG-UI SSE events
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The server is intended for **local clients only** (a local web UI talking to a local agent); do
|
|
41
|
+
not expose it to public networks. Port and CORS come from `commands.api.*` in the config — see
|
|
42
|
+
[the configuration guide](https://github.com/pukeko-robotics/gaunt-sloth/blob/main/docs/configuration/index.md).
|
|
43
|
+
|
|
44
|
+
## Binaries
|
|
45
|
+
|
|
46
|
+
- **`gaunt-sloth-api`** — starts the AG-UI server standalone (the code above as a command):
|
|
47
|
+
`gaunt-sloth-api` (defaults to the `ag-ui` server on `commands.api.port`, 3000 by default).
|
|
48
|
+
- **`gaunt-sloth-acp`** — serves the [Agent Client Protocol](https://agentclientprotocol.com/) over
|
|
49
|
+
stdio, for an editor that spawns the agent as a subprocess. Serves **both ACP v1 and ACP v2**,
|
|
50
|
+
choosing the version from the host's own `initialize`. Takes no arguments, and roots the session
|
|
51
|
+
at the working directory the host supplies. Gated tools are escalated to the host as
|
|
52
|
+
`session/request_permission`. The same server is reachable programmatically as
|
|
53
|
+
`startAcpServer()`, and as `createAcpAgentRouter()` when you want to serve it over a transport of
|
|
54
|
+
your own (or `createAcpAgentApp()` / `createAcpV1AgentApp()` for one dialect on its own).
|
|
55
|
+
|
|
56
|
+
## Exports
|
|
57
|
+
|
|
58
|
+
- `@gaunt-sloth/agent` (the root export) is the public API: the AG-UI and interactive-session
|
|
59
|
+
modules, A2A client and tool, MCP utilities and OAuth provider, built-in tools config, the
|
|
60
|
+
middleware registry, the agent-backend seam (`resolveAgentFactory`), and `createResolvers`.
|
|
61
|
+
- `@gaunt-sloth/agent/<path>.js` deep paths mirror the internal `dist/` layout 1:1 and are
|
|
62
|
+
deliberately kept open for reach-in (the fat CLI imports e.g.
|
|
63
|
+
`@gaunt-sloth/agent/resolvers.js`). They are supported at your own risk: internal files can
|
|
64
|
+
move between alpha/minor versions without a deprecation cycle. Prefer the root export where it
|
|
65
|
+
suffices.
|
|
66
|
+
|
|
67
|
+
> `@gaunt-sloth/tools` and `@gaunt-sloth/api` are deprecated and now re-export from this
|
|
68
|
+
> package.
|
|
69
|
+
|
|
70
|
+
## Related packages
|
|
71
|
+
|
|
72
|
+
- [`@gaunt-sloth/core`](https://www.npmjs.com/package/@gaunt-sloth/core) — Core utilities, config, and agent infrastructure ([source](https://github.com/pukeko-robotics/gaunt-sloth/tree/main/packages/core))
|
|
73
|
+
- [`@gaunt-sloth/review`](https://www.npmjs.com/package/@gaunt-sloth/review) — Review engine with content/requirement sources (GitHub, Jira, file, text) and standalone CLI ([source](https://github.com/pukeko-robotics/gaunt-sloth/tree/main/packages/review))
|
|
74
|
+
- [`@gaunt-sloth/batch`](https://www.npmjs.com/package/@gaunt-sloth/batch) — Batch / eval / workflow runtime ([source](https://github.com/pukeko-robotics/gaunt-sloth/tree/main/packages/batch))
|
|
75
|
+
- [`gaunt-sloth`](https://www.npmjs.com/package/gaunt-sloth) — Main CLI application ([source](https://github.com/pukeko-robotics/gaunt-sloth/tree/main/packages/app))
|
package/cli-acp.js
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* ACP (Agent Client Protocol) server entry
|
|
4
|
+
* ACP (Agent Client Protocol) server entry.
|
|
5
5
|
* Usage: gaunt-sloth-acp
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Serves ACP over stdio, for an editor that spawns the agent as a subprocess (Zed, and any other
|
|
8
|
+
* ACP client). The protocol version comes from the host's own `initialize` — v1 and v2 are both
|
|
9
|
+
* served — and the whole startup, including redirecting ordinary console output away from stdout
|
|
10
|
+
* which the protocol owns, lives in `startAcpServer`, shared with `gaunt-sloth --acp-agent` so the
|
|
11
|
+
* two doors cannot drift.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* writes the protocol via process.stdout.write directly and is unaffected; console.warn/error
|
|
14
|
-
* already go to stderr.
|
|
13
|
+
* A failure before the transport is up is written to stderr, never stdout: to a host, stdout is
|
|
14
|
+
* the JSON-RPC framing channel, so prose there is a protocol error rather than a message anyone
|
|
15
|
+
* reads.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
18
|
+
import { setEntryPoint } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
19
|
+
import { startAcpServer } from '#src/modules/acp/acpStdio.js';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import
|
|
21
|
+
// The install dir is what `getSlothVersion()` reads, and the initialize handshake reports the
|
|
22
|
+
// version. Set from THIS file so it resolves the agent package's own manifest.
|
|
23
|
+
setEntryPoint(import.meta.url);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
25
|
+
try {
|
|
26
|
+
await startAcpServer();
|
|
27
|
+
} catch (err) {
|
|
28
|
+
process.stderr.write(
|
|
29
|
+
`Gaunt Sloth ACP agent failed to start: ${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
main();
|
|
@@ -10,15 +10,29 @@ export declare const AVAILABLE_BUILT_IN_TOOLS: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Reference tool. Simply prints provided argument to the screen.
|
|
12
12
|
*/
|
|
13
|
-
readonly gth_status_update:
|
|
13
|
+
readonly gth_status_update: '#src/tools/gthStatusUpdateTool.js';
|
|
14
14
|
/**
|
|
15
15
|
* Web fetch tool.
|
|
16
16
|
*/
|
|
17
|
-
readonly gth_web_fetch:
|
|
17
|
+
readonly gth_web_fetch: '#src/tools/gthWebFetchTool.js';
|
|
18
18
|
/**
|
|
19
19
|
* AG-UI A2UI surface tool: lets the agent render an A2UI surface in the web client.
|
|
20
20
|
*/
|
|
21
|
-
readonly show_a2ui_surface:
|
|
21
|
+
readonly show_a2ui_surface: '#src/tools/showA2UISurfaceTool.js';
|
|
22
|
+
/**
|
|
23
|
+
* Checklist / todo planning tool for the lean agent (the `write_todos` equivalent). Enabled
|
|
24
|
+
* by default (see {@link DEFAULT_CONFIG}); disable by setting your own `builtInTools`.
|
|
25
|
+
*/
|
|
26
|
+
readonly gth_checklist: '#src/tools/gthChecklistTool.js';
|
|
27
|
+
/**
|
|
28
|
+
* Content-search (grep) tool: ripgrep-backed regex search over file CONTENTS, with an
|
|
29
|
+
* in-process JS fallback when `rg` is absent. Permission-light (no shell approval) and
|
|
30
|
+
* available in every mode. Named `gth_grep` rather than `grep` so it cannot collide with a
|
|
31
|
+
* built-in a graph builder registers under that name. Enabled by default (see {@link DEFAULT_CONFIG.builtInTools}, GS2-51); disable
|
|
32
|
+
* with `{ "builtInTools": { "gth_grep": { "enabled": false } } }`. Its searched corpus is
|
|
33
|
+
* selectable via the `fileSet` tool-config key (`gitignore` default / `all`).
|
|
34
|
+
*/
|
|
35
|
+
readonly gth_grep: '#src/tools/gthGrepTool.js';
|
|
22
36
|
};
|
|
23
37
|
/**
|
|
24
38
|
* Get default tools based on filesystem and built-in tools configuration
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Built-in tools config. {@link AVAILABLE_BUILT_IN_TOOLS} has a list of available tools.
|
|
4
4
|
*/
|
|
5
5
|
import GthFileSystemToolkit from '#src/tools/GthFileSystemToolkit.js';
|
|
6
|
+
import { getEffectiveDevToolsConfig, normalizeBuiltInTools, isBuiltInToolEntryEnabled, isFilesystemToolRegistered, EXTERNALLY_EMITTED_BUILT_IN_TOOL_NAMES, } from '@gaunt-sloth/core/config.js';
|
|
6
7
|
import { displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
7
8
|
import { getCurrentWorkDir } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
8
9
|
import GthDevToolkit from '#src/tools/GthDevToolkit.js';
|
|
@@ -25,6 +26,20 @@ export const AVAILABLE_BUILT_IN_TOOLS = {
|
|
|
25
26
|
* AG-UI A2UI surface tool: lets the agent render an A2UI surface in the web client.
|
|
26
27
|
*/
|
|
27
28
|
show_a2ui_surface: '#src/tools/showA2UISurfaceTool.js',
|
|
29
|
+
/**
|
|
30
|
+
* Checklist / todo planning tool for the lean agent (the `write_todos` equivalent). Enabled
|
|
31
|
+
* by default (see {@link DEFAULT_CONFIG}); disable by setting your own `builtInTools`.
|
|
32
|
+
*/
|
|
33
|
+
gth_checklist: '#src/tools/gthChecklistTool.js',
|
|
34
|
+
/**
|
|
35
|
+
* Content-search (grep) tool: ripgrep-backed regex search over file CONTENTS, with an
|
|
36
|
+
* in-process JS fallback when `rg` is absent. Permission-light (no shell approval) and
|
|
37
|
+
* available in every mode. Named `gth_grep` rather than `grep` so it cannot collide with a
|
|
38
|
+
* built-in a graph builder registers under that name. Enabled by default (see {@link DEFAULT_CONFIG.builtInTools}, GS2-51); disable
|
|
39
|
+
* with `{ "builtInTools": { "gth_grep": { "enabled": false } } }`. Its searched corpus is
|
|
40
|
+
* selectable via the `fileSet` tool-config key (`gitignore` default / `all`).
|
|
41
|
+
*/
|
|
42
|
+
gth_grep: '#src/tools/gthGrepTool.js',
|
|
28
43
|
};
|
|
29
44
|
/**
|
|
30
45
|
* Get default tools based on filesystem and built-in tools configuration
|
|
@@ -33,15 +48,11 @@ export async function getDefaultTools(config, command) {
|
|
|
33
48
|
const filesystemTools = filterFilesystemTools(config.filesystem, config.aiignore, config.binaryFormats);
|
|
34
49
|
const builtInTools = await getBuiltInTools(config);
|
|
35
50
|
// Dev tools (run commands etc.) are available to the interactive `code` command and to the
|
|
36
|
-
// scripted `exec` command — both are "do-the-job" runs
|
|
37
|
-
// `ask
|
|
38
|
-
//
|
|
51
|
+
// scripted `exec` command — both are "do-the-job" runs. `ask --write` (config.askWriteMode) opts
|
|
52
|
+
// `ask` into the same do-the-job tools. CFG-18: the dev/shell config is resolved from the unified
|
|
53
|
+
// `builtInTools` registry by the shared core resolver (was per-command `devTools`).
|
|
39
54
|
const askWrite = command === 'ask' && config.askWriteMode === true;
|
|
40
|
-
const devToolConfig = command
|
|
41
|
-
? config.commands?.exec?.devTools
|
|
42
|
-
: askWrite
|
|
43
|
-
? config.commands?.ask?.devTools
|
|
44
|
-
: config.commands?.code?.devTools;
|
|
55
|
+
const devToolConfig = getEffectiveDevToolsConfig(config, command);
|
|
45
56
|
const devTools = await filterDevTools(askWrite ? 'code' : command, devToolConfig);
|
|
46
57
|
const customTools = getCustomTools(config, command);
|
|
47
58
|
return [...filesystemTools, ...devTools, ...customTools, ...builtInTools];
|
|
@@ -93,7 +104,13 @@ function getCustomTools(config, command) {
|
|
|
93
104
|
return toolkit.getTools();
|
|
94
105
|
}
|
|
95
106
|
/**
|
|
96
|
-
* Filter filesystem tools based on configuration
|
|
107
|
+
* Filter filesystem tools based on configuration.
|
|
108
|
+
*
|
|
109
|
+
* The decision itself lives in core ({@link isFilesystemToolRegistered}) rather than here, because
|
|
110
|
+
* the system-prompt notes need the same answer: a note that names a tool this filter did not
|
|
111
|
+
* register tells the model to call something that does not exist. Each tool is judged by the
|
|
112
|
+
* read/write class the toolkit stamped on it (`gthFileSystemType`), so the class is read from the
|
|
113
|
+
* tool rather than from a second table of names.
|
|
97
114
|
*/
|
|
98
115
|
function filterFilesystemTools(filesystemConfig, aiignoreConfig, binaryFormats) {
|
|
99
116
|
const toolkit = new GthFileSystemToolkit({
|
|
@@ -101,44 +118,29 @@ function filterFilesystemTools(filesystemConfig, aiignoreConfig, binaryFormats)
|
|
|
101
118
|
aiignoreConfig,
|
|
102
119
|
binaryFormats,
|
|
103
120
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (filesystemConfig === 'none') {
|
|
108
|
-
return [];
|
|
109
|
-
}
|
|
110
|
-
if (filesystemConfig === 'read') {
|
|
111
|
-
// Read-only: only allow read operations
|
|
112
|
-
return toolkit.getFilteredTools(['read']);
|
|
113
|
-
}
|
|
114
|
-
if (!Array.isArray(filesystemConfig)) {
|
|
115
|
-
return toolkit.getTools();
|
|
116
|
-
}
|
|
117
|
-
if (filesystemConfig.includes('all')) {
|
|
118
|
-
return toolkit.getTools();
|
|
119
|
-
}
|
|
120
|
-
// Handle an array of specific tool names or 'read'/'all'
|
|
121
|
-
const allowedTools = filesystemConfig.includes('read')
|
|
122
|
-
? toolkit.getFilteredTools(['read'])
|
|
123
|
-
: [];
|
|
124
|
-
// Also allow specific tool names
|
|
125
|
-
const allowedToolNames = new Set(filesystemConfig.filter((name) => name !== 'read' && name !== 'all'));
|
|
126
|
-
const specificNamedTools = toolkit.getTools().filter((tool) => {
|
|
127
|
-
return tool.name && allowedToolNames.has(tool.name);
|
|
128
|
-
});
|
|
129
|
-
// Combine and deduplicate
|
|
130
|
-
const allAllowedTools = [...allowedTools, ...specificNamedTools];
|
|
131
|
-
return allAllowedTools.filter((tool, index, arr) => arr.findIndex((t) => t.name === tool.name) === index);
|
|
121
|
+
return toolkit.getTools().filter((tool) => isFilesystemToolRegistered(filesystemConfig, tool.name,
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
|
+
tool.gthFileSystemType));
|
|
132
124
|
}
|
|
133
125
|
/**
|
|
134
126
|
* Get built-in tools based on configuration
|
|
135
127
|
*/
|
|
136
128
|
async function getBuiltInTools(config) {
|
|
137
129
|
const tools = [];
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
for
|
|
130
|
+
// CFG-18: `builtInTools` may be a string[] or the widened registry — normalize to a name→value
|
|
131
|
+
// lookup. Tools constructed OUTSIDE this loader are skipped here: the dev/shell tools (run_*,
|
|
132
|
+
// run_shell_command) come from GthDevToolkit, and gth_gh_read_file is built by the review module
|
|
133
|
+
// with the PR context bound in. A registry entry for one of them is legitimate config, not an
|
|
134
|
+
// unknown built-in, and warning about it would fire on every command — including the ones that
|
|
135
|
+
// never load the tool.
|
|
136
|
+
const registry = normalizeBuiltInTools(config.builtInTools);
|
|
137
|
+
for (const [toolName, value] of Object.entries(registry)) {
|
|
138
|
+
if (EXTERNALLY_EMITTED_BUILT_IN_TOOL_NAMES.includes(toolName)) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (!isBuiltInToolEntryEnabled(value)) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
142
144
|
if (toolName in AVAILABLE_BUILT_IN_TOOLS) {
|
|
143
145
|
try {
|
|
144
146
|
const tool = await import(AVAILABLE_BUILT_IN_TOOLS[toolName]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtInToolsConfig.js","sourceRoot":"","sources":["../src/builtInToolsConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;
|
|
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B,CAAC,KAAK,CAAC,EAAE,CAAC;YACtC,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,IAAI,wBAAwB,EAAE,CAAC;YACzC,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,MAAM,CACvB,wBAAwB,CAAC,QAAiD,CAAC,CAC5E,CAAC;gBACF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,cAAc,CAAC,iCAAiC,QAAQ,MAAM,KAAK,EAAE,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,51 +1,9 @@
|
|
|
1
|
-
import type { BaseMessage } from '@langchain/core/messages';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* (see `GthDeepAgent`); the raw model instance (which can carry an `apiKey`) is never
|
|
9
|
-
* passed through here.
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* The debug-capture contract lives in `@gaunt-sloth/core`, beside the agent
|
|
4
|
+
* ({@link import('@gaunt-sloth/core/core/GthLangChainAgent.js').GthLangChainAgent}) that installs
|
|
5
|
+
* the `wrapModelCall` capture middleware. This module re-exports it so
|
|
6
|
+
* `@gaunt-sloth/agent/core/debugCapture.js` importers (the TUI debug panel) resolve it here too.
|
|
10
7
|
*/
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
systemPrompt?: string;
|
|
14
|
-
/** The tool definitions made available for this call (name + description + JSON schema). */
|
|
15
|
-
tools?: DebugToolDef[];
|
|
16
|
-
/** Scalar model params (model id, temperature, …) — a key-free allowlist. */
|
|
17
|
-
modelParams?: Record<string, unknown>;
|
|
18
|
-
/** The tool-choice configuration for this call, if any. */
|
|
19
|
-
toolChoice?: unknown;
|
|
20
|
-
}
|
|
21
|
-
/** A single tool's debug-renderable definition. */
|
|
22
|
-
export interface DebugToolDef {
|
|
23
|
-
name: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
/** The tool's JSON-schema parameters, when resolvable. */
|
|
26
|
-
schema?: unknown;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Debug-capture sink for the TUI's `/debug` panel.
|
|
30
|
-
*
|
|
31
|
-
* A {@link DebugCapture} is an OPT-IN callback the TUI sets on a live
|
|
32
|
-
* {@link import('#src/core/GthDeepAgent.js').GthDeepAgent} after `init`. When present,
|
|
33
|
-
* the deep agent's `wrapModelCall` middleware reports, per model call:
|
|
34
|
-
*
|
|
35
|
-
* - `request` — `request.messages: BaseMessage[]`, the real history sent to the model at
|
|
36
|
-
* call time (post-summarization / post-middleware), plus the {@link DebugRequestExtras}
|
|
37
|
-
* (tools, system prompt, model params) that also shape the turn. This supersedes any
|
|
38
|
-
* `getState`/`getMessageHistory` snapshot idea: it is exactly what the model saw.
|
|
39
|
-
* - `response` — the resolved `AIMessage` returned by the handler, captured as a whole
|
|
40
|
-
* (decision (a): resolved message, not per-chunk frames; keeps the streaming core
|
|
41
|
-
* untouched).
|
|
42
|
-
*
|
|
43
|
-
* The sink is read lazily inside the middleware (per call), so when no TUI debug panel is
|
|
44
|
-
* attached the middleware is a transparent pass-through and the normal path pays nothing.
|
|
45
|
-
*/
|
|
46
|
-
export interface DebugCapture {
|
|
47
|
-
/** The full message history sent to the model for this call, plus the request extras. */
|
|
48
|
-
onRequest?(messages: BaseMessage[], extras?: DebugRequestExtras): void;
|
|
49
|
-
/** The resolved model response for this call (an `AIMessage`). */
|
|
50
|
-
onResponse?(response: unknown): void;
|
|
51
|
-
}
|
|
8
|
+
export type { DebugRequestExtras, DebugToolDef, DebugCapture, LastModelRequest, } from '@gaunt-sloth/core/core/debugCapture.js';
|
|
9
|
+
export { extractDebugRequestExtras } from '@gaunt-sloth/core/core/debugCapture.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { extractDebugRequestExtras } from '@gaunt-sloth/core/core/debugCapture.js';
|
|
2
2
|
//# sourceMappingURL=debugCapture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugCapture.js","sourceRoot":"","sources":["../../src/core/debugCapture.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"debugCapture.js","sourceRoot":"","sources":["../../src/core/debugCapture.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { GthAgentFactory } from '@gaunt-sloth/core/core/types.js';
|
|
2
2
|
import type { GthConfig } from '@gaunt-sloth/core/config.js';
|
|
3
3
|
/**
|
|
4
|
-
* Resolve the agent backend factory from config (B5).
|
|
5
|
-
* otherwise `defaultBackend` is used — the per-command default:
|
|
6
|
-
* - `'deep'` for the interactive `code`/`chat` sessions,
|
|
7
|
-
* - `'lean'` for the single-shot `ask`/`exec` commands.
|
|
4
|
+
* Resolve the agent backend factory from config (B5).
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* it
|
|
12
|
-
*
|
|
6
|
+
* There is one backend — the lean {@link gthLeanAgentFactory} — so every call resolves to it, and
|
|
7
|
+
* `agent.backend` can only name it. The seam is kept rather than inlined at the ten call sites
|
|
8
|
+
* because it is the single place a backend choice is made: reinstating a choice (EXT-46's ACP
|
|
9
|
+
* rebuild, or any later runtime) is an edit here, not an edit spread across every command.
|
|
10
|
+
*
|
|
11
|
+
* The parameters are accepted and ignored for the same reason. `defaultBackend` is each caller's
|
|
12
|
+
* per-command default, and every caller passes `'lean'`; typing it as the literal keeps a caller
|
|
13
|
+
* that means something else from compiling silently.
|
|
13
14
|
*/
|
|
14
|
-
export declare function resolveAgentFactory(
|
|
15
|
+
export declare function resolveAgentFactory(_config: GthConfig, _defaultBackend?: 'lean'): GthAgentFactory;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { gthLeanAgentFactory } from '@gaunt-sloth/core/core/gthLeanAgentFactory.js';
|
|
2
|
-
import { gthDeepAgentFactory } from '#src/core/gthDeepAgentFactory.js';
|
|
3
2
|
/**
|
|
4
|
-
* Resolve the agent backend factory from config (B5).
|
|
5
|
-
* otherwise `defaultBackend` is used — the per-command default:
|
|
6
|
-
* - `'deep'` for the interactive `code`/`chat` sessions,
|
|
7
|
-
* - `'lean'` for the single-shot `ask`/`exec` commands.
|
|
3
|
+
* Resolve the agent backend factory from config (B5).
|
|
8
4
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* it
|
|
12
|
-
*
|
|
5
|
+
* There is one backend — the lean {@link gthLeanAgentFactory} — so every call resolves to it, and
|
|
6
|
+
* `agent.backend` can only name it. The seam is kept rather than inlined at the ten call sites
|
|
7
|
+
* because it is the single place a backend choice is made: reinstating a choice (EXT-46's ACP
|
|
8
|
+
* rebuild, or any later runtime) is an edit here, not an edit spread across every command.
|
|
9
|
+
*
|
|
10
|
+
* The parameters are accepted and ignored for the same reason. `defaultBackend` is each caller's
|
|
11
|
+
* per-command default, and every caller passes `'lean'`; typing it as the literal keeps a caller
|
|
12
|
+
* that means something else from compiling silently.
|
|
13
13
|
*/
|
|
14
|
-
export function resolveAgentFactory(
|
|
15
|
-
|
|
16
|
-
return backend === 'deep' ? gthDeepAgentFactory : gthLeanAgentFactory;
|
|
14
|
+
export function resolveAgentFactory(_config, _defaultBackend = 'lean') {
|
|
15
|
+
return gthLeanAgentFactory;
|
|
17
16
|
}
|
|
18
17
|
//# sourceMappingURL=resolveAgentFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAgentFactory.js","sourceRoot":"","sources":["../../src/core/resolveAgentFactory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"resolveAgentFactory.js","sourceRoot":"","sources":["../../src/core/resolveAgentFactory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAkB,EAClB,eAAe,GAAW,MAAM;IAEhC,OAAO,mBAAmB,CAAC;AAC7B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '#src/modules/apiAgUiModule.js';
|
|
2
|
-
export * from '#src/modules/acpModule.js';
|
|
3
2
|
export * from '#src/modules/interactiveSessionModule.js';
|
|
4
3
|
export * from '#src/modules/a2a/A2AClientWrapper.js';
|
|
5
4
|
export * from '#src/tools/A2AAgentTool.js';
|
|
@@ -8,7 +7,8 @@ export * from '#src/utils/mcpUtils.js';
|
|
|
8
7
|
export { createResolvers } from '#src/resolvers.js';
|
|
9
8
|
export * from '#src/builtInToolsConfig.js';
|
|
10
9
|
export { resolveMiddleware } from '#src/middleware/registry.js';
|
|
11
|
-
export { GthDeepAgent, type GthDeepAgentParams } from '#src/core/GthDeepAgent.js';
|
|
12
|
-
export * from '#src/core/deepAgentPermissions.js';
|
|
13
|
-
export { gthDeepAgentFactory } from '#src/core/gthDeepAgentFactory.js';
|
|
14
10
|
export { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
|
|
11
|
+
export { startAcpServer } from '#src/modules/acp/acpStdio.js';
|
|
12
|
+
export { createAcpAgentRouter } from '#src/modules/acp/acpRouter.js';
|
|
13
|
+
export { createAcpAgentApp } from '#src/modules/acp/acpAgentApp.js';
|
|
14
|
+
export { createAcpV1AgentApp } from '#src/modules/acp/acpAgentAppV1.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '#src/modules/apiAgUiModule.js';
|
|
2
|
-
export * from '#src/modules/acpModule.js';
|
|
3
2
|
export * from '#src/modules/interactiveSessionModule.js';
|
|
4
3
|
export * from '#src/modules/a2a/A2AClientWrapper.js';
|
|
5
4
|
export * from '#src/tools/A2AAgentTool.js';
|
|
@@ -9,9 +8,12 @@ export { createResolvers } from '#src/resolvers.js';
|
|
|
9
8
|
// Tools + middleware (formerly @gaunt-sloth/tools)
|
|
10
9
|
export * from '#src/builtInToolsConfig.js';
|
|
11
10
|
export { resolveMiddleware } from '#src/middleware/registry.js';
|
|
12
|
-
//
|
|
13
|
-
export { GthDeepAgent } from '#src/core/GthDeepAgent.js';
|
|
14
|
-
export * from '#src/core/deepAgentPermissions.js';
|
|
15
|
-
export { gthDeepAgentFactory } from '#src/core/gthDeepAgentFactory.js';
|
|
11
|
+
// The agent-backend seam every command resolves its factory through.
|
|
16
12
|
export { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
|
|
13
|
+
// The ACP (Agent Client Protocol) surface: the stdio starter both ACP bins run, the
|
|
14
|
+
// version-dispatching connector behind it, and each dialect's app for serving one on its own.
|
|
15
|
+
export { startAcpServer } from '#src/modules/acp/acpStdio.js';
|
|
16
|
+
export { createAcpAgentRouter } from '#src/modules/acp/acpRouter.js';
|
|
17
|
+
export { createAcpAgentApp } from '#src/modules/acp/acpAgentApp.js';
|
|
18
|
+
export { createAcpV1AgentApp } from '#src/modules/acp/acpAgentAppV1.js';
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cA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