Skip to content

Commit 9e1154f

Browse files
committed
docs: README — drop changelog narrative, broken refs, fix Quickstart
Rewrite README.md as a clean product surface. Changelog-style "What shipped in v0.3 / v0.4 / v0.5" + "v0.6 roadmap" sections all removed — that history lives in CHANGELOG.md. Specific fixes: - Dropped reference to `output-opus-4-7.json` in the Wixie prompts dir — that path is gitignored and broken for visitors. - Dropped reference to non-existent `adr/` directory. - Dropped reference to retired `IMPLEMENTATION_SUMMARY.md` v0.3 follow-up plan. - Quickstart import was using `setBudget` which isn't re-exported from the top-level `enchanter` package — example wouldn't run verbatim. Removed. - TL;DR calmed: drops the "v0.5.0 — full-stack…" framing and the test-count tally (lives in the CI badge already). - "What's in the box" table: dropped per-row `✓ v0.3.x` version annotations. ✓ if shipped, blank if pending. - Added a 3-line "Try it" block right after Install for the one-command cockpit launch. - Order: Install → Try it → Quickstart → What's in the box → The 10 plugins → Architecture → Streaming events → Status → Contributing → License. CHANGELOG.md and inspector/README.md untouched.
1 parent 8d99479 commit 9e1154f

1 file changed

Lines changed: 24 additions & 70 deletions

File tree

README.md

Lines changed: 24 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
</a>
1010
</p>
1111

12-
> Production-grade agent SDK with native Model Context Protocol support, hybrid orchestrator, and 10 capability plugins.
13-
14-
Enchanter is a TypeScript SDK for building agentic AI applications that speak [MCP (Model Context Protocol)](https://modelcontextprotocol.io). It wraps every outbound tool call in a 7-phase orchestrator lifecycle, runs it through an in-process event bus, and lets specialized plugins (trust scoring, drift detection, security veto, code review, structural fingerprinting, cost attribution, git workflow, and more) observe, modify, or block before the request leaves your process.
15-
16-
**v0.5.0 — full-stack agent SDK with shipped Rust observability surface and human-in-the-loop control.** 374 tests / 7 todo / 0 fail across 40 files (TS); Rust check + tests clean. Observability is the Rust terminal cockpit at [`inspector/`](inspector/) — htop / btop / k9s for an AI agent runtime — consuming the runtime's JSONL event stream over stdin, file, or bidirectional TCP socket. Inspector now sends approve/veto decisions back into the orchestrator's trust-gate via a control channel. Each plugin adapter is independently installable as `@enchanter-ai/plugin-*` from `packages/`.
12+
Enchanter is a TypeScript MCP client SDK with a hybrid orchestrator and 10 capability plugins, plus a Rust terminal cockpit ([`inspector/`](inspector/)) for live observability. Every outbound tool call rides a 7-phase request lifecycle, runs through an in-process event bus, and lets specialized plugins (trust scoring, drift detection, security veto, code review, structural fingerprinting, cost attribution, git workflow) observe, modify, or block before the request leaves your process.
1713

1814
## Install
1915

@@ -23,6 +19,14 @@ npm install enchanter
2319

2420
Requires Node 22+.
2521

22+
## Try it
23+
24+
```bash
25+
npm install -g enchanter # or: cd client/enchanter && npm install
26+
cd inspector && cargo build --release
27+
enchanter # opens the cockpit; runs the live demo
28+
```
29+
2630
## Quickstart
2731

2832
```typescript
@@ -31,16 +35,13 @@ import {
3135
StdioTransport,
3236
hydraAdapter, // security veto + secret masking
3337
pechAdapter, // cost ledger + budget thresholds
34-
setBudget,
3538
} from 'enchanter';
3639
import { spawn } from 'node:child_process';
3740

3841
// Spawn any MCP-spec server (filesystem, github, postgres, ...)
3942
const server = spawn('npx', ['-y', '@modelcontextprotocol/server-filesystem', '/path/to/sandbox']);
4043
const transport = new StdioTransport(server.stdout!, server.stdin!);
4144

42-
setBudget('fs', 100_000);
43-
4445
const client = new McpClient({
4546
serverId: 'fs',
4647
transport,
@@ -54,7 +55,7 @@ const result = await client.callTool('read_file', { path: 'config.txt' });
5455
// pech appends a ledger entry per call
5556
```
5657

57-
## What's in the box (v0.3.2)
58+
## What's in the box
5859

5960
| Subsystem | Status |
6061
|---|---|
@@ -63,17 +64,17 @@ const result = await client.callTool('read_file', { path: 'config.txt' });
6364
| stdio transport (newline-delimited UTF-8 JSON-RPC 2.0, 8MB body cap) ||
6465
| Streamable HTTP transport (POST + GET, exp-backoff reconnect, resume disabled by default) ||
6566
| OAuth 2.1 + S256 PKCE + RFC 8707 audience binding + SSRF guard ||
66-
| **OAuth replay defense**nonce + freshness store, in-memory + JSONL-persistent | v0.3 |
67-
| **TLS cert pinning**TOFU + PINNED policies, hooked into the streaming HTTP transport | v0.3.1 |
68-
| **Full trust-pin**SHA-256 over (cmd + args + url + schemaDigests), enforced in trust-gate | v0.3.2 |
67+
| OAuth replay defense (nonce + freshness store, in-memory + JSONL-persistent) ||
68+
| TLS cert pinning (TOFU + PINNED policies, hooked into the streaming HTTP transport) ||
69+
| Full trust-pin (SHA-256 over cmd + args + url + schemaDigests + binaryDigest + envAllowlist) ||
6970
| Namespace registry with SHA-256 schema-digest pin (MCPoison defense) ||
7071
| Tool name collision rejection ||
71-
| **JSONL event bridge** — runtime → inspector wire contract with stdout / file / TCP sinks | ✓ v0.3 |
72-
| **Rust terminal cockpit** ([`inspector/`](inspector/)) — 10 live views over the JSONL stream | ✓ v0.3 |
73-
| 10 plugin adapters (now all on v0.3 algorithms — pech file-backed ledger, lich M5 sandbox + tool-call confirm, djinn D2 HMM, gorgon Tarjan + Python AST) | ✓ v0.3.x |
74-
| Independently installable `@enchanter-ai/plugin-*` packages (workspace) | ✓ v0.3.2 |
72+
| JSONL event bridge (runtime → inspector wire contract; stdout / file / TCP sinks) ||
73+
| Bidirectional control channel (inspector approve/veto into the trust-gate, fail-closed) ||
74+
| Rust terminal cockpit ([`inspector/`](inspector/)) — 10 live views over the JSONL stream ||
75+
| 10 plugin adapters (in-tree) ||
76+
| Independently installable `@enchanter-ai/plugin-*` packages (workspace) ||
7577
| Live integration tested against `@modelcontextprotocol/server-filesystem` ||
76-
| 9 of 10 documented MCP failure modes mitigated ||
7778

7879
## The 10 plugins
7980

@@ -94,18 +95,13 @@ Each plugin is its own repo under [github.com/enchanter-ai](https://github.com/e
9495

9596
The companion prompt-engineering meta-engine [Wixie](https://github.com/enchanter-ai/wixie) runs the research → craft → converge → harden → translate lifecycle that produced the original architecture spec.
9697

97-
## Live demo
98+
## Architecture
9899

99-
```bash
100-
git clone https://github.com/enchanter-ai/enchanter.git
101-
cd enchanter
102-
npm install
103-
npx tsx scripts/live.ts
104-
```
100+
A thin per-request orchestrator owns the canonical request lifecycle. An in-process bus carries plugin findings as derived events. Required plugins (hydra, lich, naga, pech, sylph) fail-closed on missing ACK; advisory plugins (crow, djinn, emu, gorgon) fail-open with `degraded=true`. MCP spec primitives (Resources, Prompts, Tools, Sampling, Roots, Elicitation) are honored verbatim with OAuth 2.1 + PKCE + RFC 8707 audience binding for remote servers.
105101

106-
Spawns the official `@modelcontextprotocol/server-filesystem`, runs through all 7 phases, and shows hydra masking real AWS-key-shaped strings + bearer tokens in file content, and vetoing synthetic `rm -rf /` and `cat ~/.ssh/id_rsa` calls on the bus.
102+
Observability is the Rust terminal cockpit at [`inspector/`](inspector/) — a single binary that reads the runtime's JSONL event stream from stdin / file / socket and renders 10 live views (overview, plugins, events, security, cost, drift, codebase, replay, runtime totals, active tasks). The wire contract is documented at [`docs/event-schema.md`](docs/event-schema.md).
107103

108-
Observability is the Rust terminal cockpit at [`inspector/`](inspector/) — single binary, reads the runtime's JSONL event stream from stdin / file / socket, renders 10 live views (overview, plugins, events, security, cost, drift, codebase, replay, runtime totals, active tasks). The earlier TS CLI inspector and VS Code extension were retired at v0.3 in favor of the terminal-first approach. The browser dashboard was intentionally dropped at v0.2.1 — see `IMPLEMENTATION_SUMMARY.md`.
104+
Full architectural spec: produced by [Wixie](https://github.com/enchanter-ai/wixie).
109105

110106
## Streaming events to the inspector
111107

@@ -119,51 +115,9 @@ ENCHANTER_BRIDGE=file:./run-2026-05-05.jsonl npx tsx scripts/run.ts -- npm test
119115

120116
When `stdout` is selected, the supervisor re-routes the wrapped child's stdout to stderr so the JSONL wire stays uncorrupted.
121117

122-
## Architecture
123-
124-
A thin per-request orchestrator owns the canonical request lifecycle. An in-process bus carries plugin findings as derived events. Required plugins (hydra, lich, naga, pech, sylph) fail-closed on missing ACK; advisory plugins (crow, djinn, emu, gorgon) fail-open with `degraded=true`. MCP spec primitives (Resources, Prompts, Tools, Sampling, Roots, Elicitation) are honored verbatim with OAuth 2.1 + PKCE + RFC 8707 audience binding for remote servers.
125-
126-
Full architectural spec: produced by [Wixie](https://github.com/enchanter-ai/wixie) — see `output-opus-4-7.json` in that repo's prompts directory. ADRs for the three load-bearing decisions (hybrid coordination, security model, budget tiers) are at `adr/`.
127-
128-
See [IMPLEMENTATION_SUMMARY.md](IMPLEMENTATION_SUMMARY.md) for the per-file inventory + v0.3 follow-up plan.
129-
130-
## What shipped in v0.3
131-
132-
The original v0.3 roadmap is fully landed. Sub-iterations:
133-
134-
- **v0.3.0** — OAuth replay defense (nonce + freshness store, persistent JSONL), runtime → inspector JSONL bridge with explicit wire schema, file-backed pech ledger.
135-
- **v0.3.1** — TLS cert pinning (FM 6), full trust-pin store (FM 10), lich M5 sandboxed code review, djinn D2 HMM drift detection (3-state ON_TASK / SIDEQUEST / LOST), gorgon Tarjan SCC + Python AST extractor.
136-
- **v0.3.2**`@enchanter-ai/plugin-*` workspace packages, orchestrator → trust-pin enforcement, `ENCHANTER_BRIDGE` env-switch supervisor wire-up, lich M5 tool-call confirmation variant.
137-
138-
Test count: 144 → 270 / 7 todo / 0 fail across 31 files. All v0.3 features are default-off behind config flags for back-compat — existing v0.2 callers see unchanged behavior.
139-
140-
## What shipped in v0.4
141-
142-
All five carry-overs from v0.3 landed:
143-
144-
- **#1 Lich M5 real-MCP-server replay**`runSandboxedToolCallLive` re-issues captured `tools/call` against an injectable `transportFactory`, structurally diffs against the original response. Per-`(schemaDigest, argsDigest)` LRU cache (default 256) avoids doubling latency on repeats.
145-
- **#2 Trust-pin digest expansion**`TransportDescriptor` threads `cmd / args / binaryDigest / envAllowlist / url / schemaDigests` through `McpClient`. All 6 `TrustPinInputs` fields now contribute to the digest. `binaryDigest` is best-effort (cap 64 MiB, cached, fail-open on read failure).
146-
- **#3 Djinn D2 HMM persistence**`PersistentHmmStore` (JSONL, replay-on-construct, corrupt-tail tolerant) keyed by sessionId. `hmm_store_path` config opts in.
147-
- **#4 Gorgon dotted-module resolution** — hand-rolled TOML parser extracts package roots from `[project]` / `[tool.poetry]` / `[tool.setuptools]` / `[tool.setuptools.packages.find]`. Roots merge additively; resolution walks `<root>/foo/bar.py` then `<root>/foo/bar/__init__.py`.
148-
- **#5 Plugin-package release pipeline**`release:prep` bumps root + 10 packages in lockstep. `publish-packages.ts --dry-run` validates shape; `--publish` runs `npm publish --access public` per package, gated on `NPM_TOKEN`. CI on `v*.*.*` tags. See [`docs/RELEASE.md`](docs/RELEASE.md).
149-
150-
## What shipped in v0.5
151-
152-
Three of four v0.5 carry-overs landed; the fourth (`npm publish`) is gated on operator authorization.
153-
154-
- **#1 Worker-side real-replay execution**`runSandboxedToolCallLive` defaults to `runMode: 'worker'`, dispatching the live replay inside the forked sandbox worker. True process isolation. Stdio MCP transports today; http worker variant flagged for v0.6.
155-
- **#2 HMM state-shape versioning**`HMM_STATE_VERSION = 1` stamped on every snapshot. Mismatched versions or posterior lengths trigger a hard reset rather than silent corruption. Pre-v0.5 versionless snapshots treated as `v0` → reset.
156-
- **#4 Bidirectional control channel**`Source::SocketControl` opens a read+write TCP transport. `request.approval` event carries `correlation_id / plugin / reason / payload`; inspector pops a `PENDING APPROVAL` banner and `a` / `v` send the decision back. Trust-gate awaits with a 30-second timeout, **fail-closed**. See `docs/event-schema.md` for the wire protocol.
157-
158-
## v0.6 roadmap
159-
160-
Forward-looking work after v0.5:
118+
## Status
161119

162-
1. **HTTP transport inside the sandbox worker** — currently stdio-only; v0.6 closes with an `import('undici')` fetch loop honoring the existing 8 MB body cap.
163-
2. **`PENDING APPROVAL` banner across all views** — currently only renders in overview; lift to a shared widget consumed by `draw_app`.
164-
3. **Auto-reconnect for `Source::SocketControl`** — runtime restart mid-session currently ends the inbound stream; add backoff + reconnect.
165-
4. **`transportDescriptor.envAllowlist` / `binaryDigest` honored by worker stdio spawn** — currently forces `env: { PATH }` and ignores binaryDigest.
166-
5. **Actual `npm publish` of v0.4.0 / v0.5.0** — release pipeline is ready; awaits `NPM_TOKEN` setup + first tag.
120+
Current production version: **v0.5.0**. Every roadmap item from `0.2` through `0.5` is shipped — see [CHANGELOG.md](CHANGELOG.md) for per-version detail. Next: HTTP transport inside the sandbox worker, npm-publish ceremony for the `@enchanter-ai/plugin-*` packages, and auto-reconnect for the bidirectional control socket.
167121

168122
## Contributing
169123

0 commit comments

Comments
 (0)