|
20 | 20 |
|
21 | 21 | ## Backend domains |
22 | 22 |
|
| 23 | +### Harness adapter framework |
| 24 | +- Contract: `src/harness/interface.mjs` |
| 25 | +- Registry: `src/harness/registry.mjs` |
| 26 | +- Shared scanner helpers: `src/harness/scanner-framework.mjs` |
| 27 | +- Adapters: |
| 28 | + - Claude Code — `src/harness/adapters/claude.mjs` |
| 29 | + - Codex CLI — `src/harness/adapters/codex.mjs` |
| 30 | + - OpenCode — `src/harness/adapters/opencode.mjs` |
| 31 | +- Search: `validateAdapter`, `registerAdapter`, `listAdapters`, `scanHarness` |
| 32 | +- Tests: `tests/unit/test-codex-adapter.mjs`, `tests/unit/test-opencode-adapter.mjs` |
| 33 | +- Connects to: |
| 34 | + - Server — selects one adapter per request and exposes its capabilities |
| 35 | + - Scanner — adapter scanners return the shared inventory shape |
| 36 | + - Frontend — harness selector and capability-gated actions |
| 37 | + |
23 | 38 | ### Scanner (discovery engine) |
24 | 39 | - Entry: `src/scanner.mjs` |
25 | 40 | - Search: `scanAll`, `scanScope`, `discoverProjects`, `CATEGORIES` |
|
47 | 62 |
|
48 | 63 | ### HTTP server |
49 | 64 | - Entry: `src/server.mjs` |
50 | | -- Search: `createServer`, `/api/scan`, `/api/move`, `/api/delete`, `/api/context-budget`, `/api/security-scan`, `/api/file-content`, `/api/session-preview`, `/api/export` |
| 65 | +- Search: `createServer`, `/api/scan`, `/api/move`, `/api/delete`, `/api/save-markdown`, `/api/context-budget`, `/api/security-scan`, `/api/file-content`, `/api/session-preview`, `/api/export` |
51 | 66 | - Tests: `tests/e2e/dashboard.spec.mjs` |
52 | 67 | - Connects to: |
53 | 68 | - Scanner — inventory via `scanAll()` |
|
110 | 125 | - Entry: `src/session-distiller.mjs` |
111 | 126 | - Search: `distillSession`, `distillBlocks`, `DISTILL_LIMITS` |
112 | 127 | - Usage: `node src/session-distiller.mjs <session.jsonl>` or via `POST /api/session-distill` endpoint |
113 | | -- Purpose: Extract conversation summary from full session JSONL, reduce size by ~90%, create backup + index |
| 128 | +- Purpose: Rebuild a compact independent Claude transcript with fresh UUIDs and a valid linear resume chain; create an exact backup + large-result index |
114 | 129 | - Creates: |
115 | 130 | - `{sessionId}/backup-{origId}.jsonl` — copy of original session |
116 | 131 | - `{sessionId}/index.md` — distilled conversation with tool result summaries |
117 | | - - Injects distiller context message into distilled session |
118 | | -- Tests: `tests/unit/test-trim-images.mjs` (integration) |
| 132 | +- Appends backup/index metadata to the final conversation record |
| 133 | +- Tests: `tests/unit/test-session-distiller.mjs` |
119 | 134 | - Connects to: |
120 | 135 | - Server — `POST /api/session-distill` endpoint in `src/server.mjs` |
121 | 136 | - Scanner — reads distill artifacts as session bundles |
|
141 | 156 | - `test-path-correctness.mjs` — scope path decoding |
142 | 157 | - `test-security-features.mjs` — security scanner patterns |
143 | 158 | - `test-trim-images.mjs` — image block redaction in sessions |
| 159 | +- `test-codex-adapter.mjs` — Codex CLI inventory and scope behavior |
| 160 | +- `test-opencode-adapter.mjs` — OpenCode config, instruction, skill, MCP, and plugin discovery |
144 | 161 |
|
145 | 162 | ### E2E tests |
146 | 163 | - Path: `tests/e2e/` |
|
161 | 178 |
|
162 | 179 | ## Known drift |
163 | 180 | - Drag-and-drop: disabled in runtime, still mentioned in docs/tests |
164 | | -- Version strings: stale in `server.json`, `.claude-plugin/plugin.json`, `src/mcp-server.mjs` |
165 | 181 | - `history.mjs`: dormant, not called by any live code path |
0 commit comments