ada-agent 0.1.0 → 0.2.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 +14 -7
- package/bench/README.md +88 -88
- package/bench/swebench.mjs +242 -242
- package/docs/architecture.md +163 -139
- package/docs/architecture.svg +73 -73
- package/docs/cloudflare.md +81 -0
- package/docs/connectors.md +49 -48
- package/docs/integrations.md +62 -59
- package/package.json +65 -64
- package/src/client/catalog.json +1 -0
- package/src/client/cli.ts +1262 -1253
- package/src/client/models-dev.ts +106 -52
- package/src/selfcheck.ts +26 -0
- package/src/server/config.ts +65 -58
- package/src/server/providers/openai-compat.ts +78 -76
- package/src/server/providers/registry.ts +32 -31
- package/src/server/router.ts +33 -29
- package/src/shared/types.ts +21 -20
package/docs/connectors.md
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
# Connectors (MCP)
|
|
2
|
-
|
|
3
|
-
ada connects to external tools and data through the **Model Context Protocol (MCP)**. Each connector
|
|
4
|
-
is an MCP server; ada spawns or calls it, lists its tools, and registers them as ada tools named
|
|
5
|
-
`<server>__<tool>` — approval-gated, and only loaded for **trusted projects**.
|
|
6
|
-
|
|
7
|
-
## Quick start
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ada mcp # list the connector catalog (● configured · ○ available)
|
|
11
|
-
ada mcp add github # write the github entry into .ada/mcp.json
|
|
12
|
-
ada mcp remove github # remove it
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
After `add`, set any env vars it prints (e.g. `GITHUB_PERSONAL_ACCESS_TOKEN`), then start `ada` in
|
|
16
|
-
that project — the connector's tools appear automatically.
|
|
17
|
-
|
|
18
|
-
## Catalog
|
|
19
|
-
|
|
20
|
-
`filesystem` · `github` · `git` · `postgres` · `sqlite` · `fetch` · `brave-search` · `puppeteer` ·
|
|
21
|
-
`slack` · `memory` · `sentry`. Run `ada mcp` for the live list and which env vars each needs.
|
|
22
|
-
|
|
23
|
-
## Config: `.ada/mcp.json`
|
|
24
|
-
|
|
25
|
-
`ada mcp add` edits this file, but you can also write entries by hand. Two transports:
|
|
26
|
-
|
|
27
|
-
```jsonc
|
|
28
|
-
{
|
|
29
|
-
"servers": {
|
|
30
|
-
// local stdio server (a subprocess)
|
|
31
|
-
"fs": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] },
|
|
32
|
-
// remote server over Streamable HTTP
|
|
33
|
-
"remote": { "url": "https://mcp.example.com/v1", "headers": { "Authorization": "Bearer <token>" } }
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
- **stdio** — `{ command, args, env }`: ada launches the process and speaks JSON-RPC over stdin/stdout.
|
|
39
|
-
- **http** — `{ url, headers }`: ada POSTs JSON-RPC and reads a JSON or SSE response (Streamable HTTP).
|
|
40
|
-
|
|
41
|
-
## Notes
|
|
42
|
-
|
|
43
|
-
- MCP servers run code / reach the network, so they load **only in trusted projects** (the same trust
|
|
44
|
-
gate as `.ada` prompts and settings). Untrusted projects skip them.
|
|
45
|
-
- Every MCP tool is **approval-gated** — ada prompts before each call.
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
1
|
+
# Connectors (MCP)
|
|
2
|
+
|
|
3
|
+
ada connects to external tools and data through the **Model Context Protocol (MCP)**. Each connector
|
|
4
|
+
is an MCP server; ada spawns or calls it, lists its tools, and registers them as ada tools named
|
|
5
|
+
`<server>__<tool>` — approval-gated, and only loaded for **trusted projects**.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ada mcp # list the connector catalog (● configured · ○ available)
|
|
11
|
+
ada mcp add github # write the github entry into .ada/mcp.json
|
|
12
|
+
ada mcp remove github # remove it
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
After `add`, set any env vars it prints (e.g. `GITHUB_PERSONAL_ACCESS_TOKEN`), then start `ada` in
|
|
16
|
+
that project — the connector's tools appear automatically.
|
|
17
|
+
|
|
18
|
+
## Catalog
|
|
19
|
+
|
|
20
|
+
`filesystem` · `github` · `git` · `postgres` · `sqlite` · `fetch` · `brave-search` · `puppeteer` ·
|
|
21
|
+
`slack` · `memory` · `sentry`. Run `ada mcp` for the live list and which env vars each needs.
|
|
22
|
+
|
|
23
|
+
## Config: `.ada/mcp.json`
|
|
24
|
+
|
|
25
|
+
`ada mcp add` edits this file, but you can also write entries by hand. Two transports:
|
|
26
|
+
|
|
27
|
+
```jsonc
|
|
28
|
+
{
|
|
29
|
+
"servers": {
|
|
30
|
+
// local stdio server (a subprocess)
|
|
31
|
+
"fs": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] },
|
|
32
|
+
// remote server over Streamable HTTP
|
|
33
|
+
"remote": { "url": "https://mcp.example.com/v1", "headers": { "Authorization": "Bearer <token>" } }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- **stdio** — `{ command, args, env }`: ada launches the process and speaks JSON-RPC over stdin/stdout.
|
|
39
|
+
- **http** — `{ url, headers }`: ada POSTs JSON-RPC and reads a JSON or SSE response (Streamable HTTP).
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- MCP servers run code / reach the network, so they load **only in trusted projects** (the same trust
|
|
44
|
+
gate as `.ada` prompts and settings). Untrusted projects skip them.
|
|
45
|
+
- Every MCP tool is **approval-gated** — ada prompts before each call (in `ask` mode).
|
|
46
|
+
- A server's **resources** are reachable through a generated `<server>__read_resource` tool.
|
|
47
|
+
- Secrets come from **env vars** (referenced in the server's `env`), never committed to `.ada/mcp.json`.
|
|
48
|
+
- See the `connectors` skill category (`list_skills {category: "connectors"}`) for per-connector setup
|
|
49
|
+
walk-throughs, and the `mcp-server` skill to build your own.
|
package/docs/integrations.md
CHANGED
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
# Integrating with ada
|
|
2
|
-
|
|
3
|
-
ada exposes a few programmatic surfaces so other tools can drive it. The buildable foundations are
|
|
4
|
-
shipped; the product surfaces that need *external* infrastructure (a Slack app, hosting, an Electron
|
|
5
|
-
build, an IdP) are described with what they'd take — they can't be "live" without your accounts.
|
|
6
|
-
|
|
7
|
-
## HTTP API — `ada serve`
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ada serve # → http://localhost:8788 (ADA_HTTP_PORT to change)
|
|
11
|
-
```
|
|
12
|
-
- `GET /health` → `{ ok, model }`
|
|
13
|
-
- `POST /v1/prompt` `{ "text": "...", "model"?: "..." }` → `{ text, usage }` (runs a fresh agent turn)
|
|
14
|
-
|
|
15
|
-
## Typed SDK — `src/sdk`
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { createClient } from "ada/sdk"; //
|
|
19
|
-
const ada = createClient("http://localhost:8788");
|
|
20
|
-
console.log(await ada.health());
|
|
21
|
-
const { text } = await ada.prompt("list the files in this project");
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
# Integrating with ada
|
|
2
|
+
|
|
3
|
+
ada exposes a few programmatic surfaces so other tools can drive it. The buildable foundations are
|
|
4
|
+
shipped; the product surfaces that need *external* infrastructure (a Slack app, hosting, an Electron
|
|
5
|
+
build, an IdP) are described with what they'd take — they can't be "live" without your accounts.
|
|
6
|
+
|
|
7
|
+
## HTTP API — `ada serve`
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ada serve # → http://localhost:8788 (ADA_HTTP_PORT to change)
|
|
11
|
+
```
|
|
12
|
+
- `GET /health` → `{ ok, model }`
|
|
13
|
+
- `POST /v1/prompt` `{ "text": "...", "model"?: "..." }` → `{ text, usage }` (runs a fresh agent turn)
|
|
14
|
+
|
|
15
|
+
## Typed SDK — `src/sdk`
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createClient } from "ada-agent/sdk"; // in-repo: "./src/sdk/index.ts"
|
|
19
|
+
const ada = createClient("http://localhost:8788");
|
|
20
|
+
console.log(await ada.health());
|
|
21
|
+
const { text } = await ada.prompt("list the files in this project");
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
It's a ~30-line `fetch` wrapper over the HTTP API above — if you'd rather not pull in the source,
|
|
25
|
+
just POST to `/v1/prompt` directly.
|
|
26
|
+
|
|
27
|
+
## ACP bridge — `ada acp`
|
|
28
|
+
|
|
29
|
+
A minimal Agent Client Protocol bridge over stdio (JSON-RPC 2.0, newline-delimited): handles
|
|
30
|
+
`initialize` and `session/prompt`, so an ACP-aware editor can drive ada. It's a **scaffold** — method
|
|
31
|
+
names and framing may need adjusting to your client's ACP version.
|
|
32
|
+
|
|
33
|
+
## Session share — `ada share`
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
ada share # serve the latest session as a read-only web page (localhost)
|
|
37
|
+
ada share <name|file> # a specific session
|
|
38
|
+
```
|
|
39
|
+
Local and read-only. A *public* share link would need a hosted backend to receive and serve the
|
|
40
|
+
transcript (see below).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Needs your infrastructure (foundations are here; the rest is your accounts/hosting)
|
|
45
|
+
|
|
46
|
+
These are all buildable **on top of the HTTP API / SDK above** — what's missing is the external
|
|
47
|
+
service, which only you can provision.
|
|
48
|
+
|
|
49
|
+
- **Slack bot** — a [Slack Bolt](https://slack.dev/bolt-js) app that, per thread, calls
|
|
50
|
+
`createClient().prompt(message)` and posts the reply. Needs a **Slack app + bot token** (`SLACK_BOT_TOKEN`)
|
|
51
|
+
and a running process. ~30 lines on top of the SDK.
|
|
52
|
+
- **Web console** — a single page that POSTs to `/v1/prompt` and renders the reply (the `ada share`
|
|
53
|
+
server is a minimal read-only version). Needs **hosting** + CORS if cross-origin.
|
|
54
|
+
- **Desktop app** — an Electron shell that spawns `ada serve` and points a webview at it. Needs the
|
|
55
|
+
**Electron build/packaging** pipeline (you already have the separate `ada-ide` VS Code fork).
|
|
56
|
+
- **Public session sharing** — `ada share` is local; a public link needs a **hosted endpoint** to
|
|
57
|
+
receive the transcript and a viewer (like opencode's `console.opncd.ai`).
|
|
58
|
+
- **Enterprise / identity / teams** — multi-tenant accounts + SSO need an **IdP and a control plane**;
|
|
59
|
+
out of scope for a single-binary CLI.
|
|
60
|
+
- **SQLite session store** — ada uses append-only JSONL (`.ada/sessions/*.jsonl`) by design (no native
|
|
61
|
+
dep, greppable, trivially portable). Node 24 ships an experimental `node:sqlite`; a SQLite backend is
|
|
62
|
+
a drop-in for `session.ts` if you want indexed queries — say the word and it's a small module.
|
package/package.json
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ada-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A from-zero terminal coding agent with a Cursor-style routing backend, ~285 skills, MCP connectors, and ask/plan/auto modes",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "Aditya",
|
|
8
|
-
"homepage": "https://github.com/black141312/ada#readme",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/black141312/ada.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/black141312/ada/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"coding-agent",
|
|
18
|
-
"ai-agent",
|
|
19
|
-
"llm",
|
|
20
|
-
"cli",
|
|
21
|
-
"terminal",
|
|
22
|
-
"tui",
|
|
23
|
-
"mcp",
|
|
24
|
-
"openai",
|
|
25
|
-
"anthropic",
|
|
26
|
-
"ollama",
|
|
27
|
-
"agentic",
|
|
28
|
-
"developer-tools"
|
|
29
|
-
],
|
|
30
|
-
"bin": {
|
|
31
|
-
"ada": "bin/ada.mjs",
|
|
32
|
-
"ada-server": "bin/ada-server.mjs"
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"bin/",
|
|
36
|
-
"src/",
|
|
37
|
-
"skills/",
|
|
38
|
-
"docs/",
|
|
39
|
-
"bench/",
|
|
40
|
-
"tsconfig.json",
|
|
41
|
-
"README.md",
|
|
42
|
-
"LICENSE"
|
|
43
|
-
],
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=18"
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"start": "tsx src/client/cli.ts",
|
|
49
|
-
"server": "tsx src/server/index.ts",
|
|
50
|
-
"typecheck": "tsc --noEmit",
|
|
51
|
-
"selfcheck": "tsx src/selfcheck.ts",
|
|
52
|
-
"bench:swebench": "node bench/swebench.mjs"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ada-agent",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "A from-zero terminal coding agent with a Cursor-style routing backend, ~285 skills, MCP connectors, and ask/plan/auto modes",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Aditya",
|
|
8
|
+
"homepage": "https://github.com/black141312/ada#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/black141312/ada.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/black141312/ada/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"coding-agent",
|
|
18
|
+
"ai-agent",
|
|
19
|
+
"llm",
|
|
20
|
+
"cli",
|
|
21
|
+
"terminal",
|
|
22
|
+
"tui",
|
|
23
|
+
"mcp",
|
|
24
|
+
"openai",
|
|
25
|
+
"anthropic",
|
|
26
|
+
"ollama",
|
|
27
|
+
"agentic",
|
|
28
|
+
"developer-tools"
|
|
29
|
+
],
|
|
30
|
+
"bin": {
|
|
31
|
+
"ada": "bin/ada.mjs",
|
|
32
|
+
"ada-server": "bin/ada-server.mjs"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"bin/",
|
|
36
|
+
"src/",
|
|
37
|
+
"skills/",
|
|
38
|
+
"docs/",
|
|
39
|
+
"bench/",
|
|
40
|
+
"tsconfig.json",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"start": "tsx src/client/cli.ts",
|
|
49
|
+
"server": "tsx src/server/index.ts",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"selfcheck": "tsx src/selfcheck.ts",
|
|
52
|
+
"bench:swebench": "node bench/swebench.mjs",
|
|
53
|
+
"catalog:refresh": "node scripts/refresh-catalog.mjs"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@anthropic-ai/sdk": "^0.106.0",
|
|
57
|
+
"node-pty": "^1.1.0",
|
|
58
|
+
"openai": "^6.45.0",
|
|
59
|
+
"tsx": "^4.22.4"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^26.0.1",
|
|
63
|
+
"typescript": "^6.0.3"
|
|
64
|
+
}
|
|
65
|
+
}
|