# emet 1.4.0 — DX + raw-source release

## Release summary

emet 1.4.0 is a developer-experience and source-access release. It makes the package easier to install, diagnose, and use across hosts, while keeping the public agent tool surface intentionally small.

The biggest product decision in this release: **do not add a swarm of collector-specific MCP tools.** emet keeps one main research tool (`emet`) and one raw-source companion (`web_fetch`). Future social/collector work should plug into `emet` as options and internal modules, not as public tool sprawl.

## What changed

### 1. Install and host setup are easier

New CLI helpers:

```bash
emet doctor
emet init claude-code --print
emet init cursor --write
emet fetch https://example.com/docs --json
```

`emet doctor` checks the local runtime, package metadata, MCP entrypoint, Pi extension, packaged model, shipped host configs, and page-store stats. `emet init` prints or writes known-good host configs for Claude Code, Codex, Cursor, Gemini, and VS Code/Copilot.

### 2. Raw source access is now first-class

`web_fetch` is now exposed in both MCP and Pi. It takes a known URL and returns extracted raw page text through emet's existing resilient fetch/cache path, avoiding ad-hoc `curl` or browser fallback calls.

For CLI users, the same path is available as:

```bash
emet fetch <url> [--json]
```

### 3. Fetched pages persist across sessions

The emet context DB now includes a persistent page store:

- `pages` table
- FTS5-backed `pages_fts` index
- URL-normalized dedupe
- TTL cleanup
- access counts
- read/write/search/stats helpers

`fetchPageSource()` now checks the persistent page store in addition to the in-memory page cache, so successfully fetched pages can be reused by later raw fetches and research runs.

### 4. Pi and MCP schemas are aligned

The Pi `emet` schema now includes `options.rawPages`, matching the runtime/MCP behavior. Agents can ask for a synthesized answer plus full source text when they need direct source inspection.

### 5. Onboarding docs are pinned and shipped

New docs:

- [5-minute quickstarts](../quickstarts.md)
- [examples gallery](../examples.md)
- [contributor guide](../../CONTRIBUTING.md)
- [changelog](../../CHANGELOG.md)

These docs are included in the npm package file list so installed users can access them.

## Tool surface policy

Public agent tools should stay minimal:

1. `emet` — research, citations, policy, synthesis, future collector-backed orchestration
2. `web_fetch` — raw text for one known URL, no synthesis

Explicitly rejected for the public MCP/Pi surface:

- `emet_search`
- `emet_fetch`
- `emet_synthesize`
- `emet_plan`
- `emet_continue`
- `emet_status`

Those concepts can exist as internal functions/modules if needed, but agents should not have to choose between many overlapping tools.

## GitHub issue follow-up

The large social-collector epic was cleaned up:

- #17 — rewritten and closed as superseded
- #18 — internal no-auth collector registry
- #19 — collector-backed interactive mode inside existing `emet`
- #22 — optional auth-backed collectors without new public tools
- #20 and #21 — closed into #19

## Compatibility notes

- Existing `emet` calls remain compatible.
- Plain `emet` still starts the MCP stdio server.
- `web_fetch` is additive.
- No social collectors ship in 1.4.0; the release prepares the architecture and backlog only.
- The package version and all plugin/server manifests were aligned to `1.4.0`.

## Verification before release

Fresh local verification for this release preparation:

- `npm test` — 210/210 passing
- `npm run audit:roadmap` — `allSlicesReady: true`
- `npm run pack:dry` — produced `black-knight.dev-emet-1.4.0.tgz`
- `node bin/emet.js doctor` — core install checks reported ok

## Suggested GitHub release text

```markdown
## emet 1.4.0 — DX + raw-source release

This release makes emet easier to install, diagnose, and use across hosts, while keeping the public agent tool surface intentionally small.

### Highlights
- New `emet doctor` install/runtime health check.
- New `emet init <host> --print|--write` config generator for Claude Code, Codex, Cursor, Gemini, and VS Code/Copilot.
- New `emet fetch <url> [--json]` CLI command.
- New MCP/Pi `web_fetch` tool for raw text from a known URL.
- Persistent SQLite page store with FTS5, URL dedupe, TTL cleanup, and cross-session reuse.
- Pi `emet` schema now exposes `options.rawPages`.
- Added quickstarts, examples gallery, and contributor guide.
- Social-collector roadmap consolidated to avoid tool bloat: public agent tools stay `emet` + `web_fetch`.

### Compatibility
- Existing `emet` research calls are unchanged.
- Plain `emet` still starts the MCP stdio server.
- `web_fetch` is additive and replaces many curl/browser fallback cases.
- Social collectors are not shipped yet; #18/#19/#22 track the focused follow-up work.

### Verification
- `npm test`: 210/210 passing
- `npm run audit:roadmap`: `allSlicesReady: true`
- `npm run pack:dry`: package dry-run succeeds
```
