diff --git a/CLAUDE.md b/CLAUDE.md index 4ab90d5..a0b0164 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,7 +16,7 @@ The stdio **MCP server** for agentage Memory: exposes local vaults as the frozen - The 6-tool `memory__*` contract is **frozen**. Schema + `.mcpc.json` must stay in sync. - `.mcpc.json` is a CI snapshot (`z.toJSONSchema`, draft-2020-12) — it disagrees with the live `tools/list` (SDK, draft-07). **Verify contract claims against a dumped live `tools/list`, never the snapshot** — snapshot-only checks go false-green. - Descriptions flow to BOTH serializers — the safe cross-model lever (the model routes on the description, not just the schema). -- Transport-agnostic by design: stdio bin here; the CLI daemon reuses `createMemoryServer` over Streamable HTTP. Keep it that way. +- Transport-agnostic by design: `createMemoryServer` takes any transport; the bin here wires stdio. Keep it that way. - `@agentage/memory-core` is a `file:` link until both publish — build core first (the e2e does this automatically). ## Verify diff --git a/README.md b/README.md index 5092150..d081f55 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,11 @@ All memory logic (backends, git, search, routing) lives in `@agentage/memory-cor ## Use it ```bash -# one-time, offline: scaffold ~/.agentage + a starter vault -# (memory-core's `init`, also surfaced by the agentage CLI) +# one-time, offline: scaffold ~/.agentage + a starter vault (memory-core's `init`) npx @agentage/server-memory # serves ~/.agentage/vaults.json over stdio ``` -Point any stdio MCP client (Windsurf, Zed, Claude Desktop) at `npx @agentage/server-memory`. - -## Reused by the CLI daemon - -The server builder is transport-agnostic, so the agentage CLI reuses the exact same -pieces and only swaps the transport: - -```ts -import { createMemoryServer, loadLocalServer } from '@agentage/server-memory'; - -// stdio bin: await (await loadLocalServer()).connect(new StdioServerTransport()); -// CLI daemon: const server = createMemoryServer(registry, { scope: 'local' }); -// await server.connect(new StreamableHTTPServerTransport(...)); -``` +Point any stdio MCP client (VS Code, Windsurf, Zed, Claude Desktop) at `npx @agentage/server-memory`. ## Telemetry (optional, off by default) @@ -39,7 +25,7 @@ dependency, because `npx @agentage/server-memory` should stay a small cold start alongside and the bin picks it up on its own - traces and one wide event per tool call: ```bash -npm i -g @agentage/observability # or just use the agentage CLI, which ships with it +npm i -g @agentage/observability ``` Absent, the server behaves exactly as before (`AGENTAGE_DEBUG=1` prints one stderr line saying the diff --git a/src/bin/server-memory.ts b/src/bin/server-memory.ts index 6cecdbf..832f030 100644 --- a/src/bin/server-memory.ts +++ b/src/bin/server-memory.ts @@ -10,8 +10,8 @@ const reason = (err: unknown): string => (err instanceof Error ? err.message : String(err)); // Optional observability. @agentage/observability is deliberately NOT a dependency: this package is -// run through `npx`, and the kit would triple a cold start's install. Installed alongside (global, -// or via the agentage CLI) its bootstrap adds tool spans, wide events and crash capture; absent, it +// run through `npx`, and the kit would triple a cold start's install. Installed alongside (e.g. +// globally) its bootstrap adds tool spans, wide events and crash capture; absent, it // is a silent skip. Either way stdout stays the JSON-RPC wire - the kit logs to stderr only, and // stays inert until OTEL_EXPORTER_OTLP_ENDPOINT names a collector. const startObservability = async (): Promise => {