@alextis59/athena 1.0.0 → 1.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 +10 -3
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +3 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/options.d.ts +2 -0
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +9 -0
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +129 -6
- package/dist/cli/run.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +10 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +4 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config/types.d.ts +6 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/indexer/index.d.ts +1 -1
- package/dist/indexer/index.d.ts.map +1 -1
- package/dist/indexer/run.d.ts +16 -1
- package/dist/indexer/run.d.ts.map +1 -1
- package/dist/indexer/run.js +230 -22
- package/dist/indexer/run.js.map +1 -1
- package/dist/mcp/index.d.ts +6 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +20 -10
- package/dist/mcp/index.js.map +1 -1
- package/dist/retrieval/tools.js +12 -11
- package/dist/retrieval/tools.js.map +1 -1
- package/dist/storage/schema.d.ts +1 -1
- package/dist/storage/schema.d.ts.map +1 -1
- package/dist/storage/schema.js +4 -0
- package/dist/storage/schema.js.map +1 -1
- package/docs/QUALITY.md +137 -0
- package/docs/SECURITY.md +140 -0
- package/docs/agentic-rag-specifications.md +11 -0
- package/docs/exec-plans/template.md +67 -0
- package/docs/implementation-plan.md +8 -0
- package/docs/index.md +61 -0
- package/docs/mcp-integration.md +73 -0
- package/docs/tech-debt-tracker.md +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Execution Plan: <title>
|
|
2
|
+
|
|
3
|
+
Date: <yyyy-mm-dd>
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Describe the user-visible outcome and the repository behavior that will change.
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
In scope:
|
|
12
|
+
|
|
13
|
+
- <files, modules, commands, docs, or workflows>
|
|
14
|
+
|
|
15
|
+
Out of scope:
|
|
16
|
+
|
|
17
|
+
- <explicitly deferred or preserved behavior>
|
|
18
|
+
|
|
19
|
+
## Current Behavior
|
|
20
|
+
|
|
21
|
+
Summarize what the code and docs do now. Link the relevant files, tests, and
|
|
22
|
+
commands inspected before editing.
|
|
23
|
+
|
|
24
|
+
## Constraints And Invariants
|
|
25
|
+
|
|
26
|
+
- Preserve the `athena` binary name and `@alextis59/athena` package identity.
|
|
27
|
+
- Preserve local-first defaults and explicit remote document-text opt-ins.
|
|
28
|
+
- Preserve Athena-owned agent loop and citation validation unless this plan is
|
|
29
|
+
explicitly about changing them.
|
|
30
|
+
- Preserve `pdf-2-llm` as the PDF ingestion path unless this plan is explicitly
|
|
31
|
+
about parser architecture.
|
|
32
|
+
- Keep MCP read-only unless this plan includes a security design for writes.
|
|
33
|
+
|
|
34
|
+
Add task-specific constraints here.
|
|
35
|
+
|
|
36
|
+
## Plan
|
|
37
|
+
|
|
38
|
+
1. Inspect the relevant code, docs, tests, and package scripts.
|
|
39
|
+
2. Make the smallest implementation or documentation change that satisfies the
|
|
40
|
+
goal.
|
|
41
|
+
3. Update adjacent docs, tests, fixtures, or debt notes when behavior changes.
|
|
42
|
+
4. Run the validation below.
|
|
43
|
+
5. Record results and any follow-up debt.
|
|
44
|
+
|
|
45
|
+
## Validation
|
|
46
|
+
|
|
47
|
+
Commands to run:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
<command>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Expected outcomes:
|
|
54
|
+
|
|
55
|
+
- <observable pass condition>
|
|
56
|
+
|
|
57
|
+
If validation is skipped, record the reason and residual risk.
|
|
58
|
+
|
|
59
|
+
## Rollback
|
|
60
|
+
|
|
61
|
+
Describe how to revert the change or disable the behavior if validation fails
|
|
62
|
+
after merge.
|
|
63
|
+
|
|
64
|
+
## Notes
|
|
65
|
+
|
|
66
|
+
Capture decisions, tradeoffs, and follow-up items that should survive the
|
|
67
|
+
implementation turn.
|
|
@@ -1279,6 +1279,14 @@ Milestone 11 external agent documentation proof, 2026-07-03:
|
|
|
1279
1279
|
returned 4 JSON-RPC responses, 6 tools, `docs/admin-guide.md` as the top
|
|
1280
1280
|
search hit, and 1 read trace locator.
|
|
1281
1281
|
|
|
1282
|
+
Milestone 11 external agent provider option proof, 2026-07-05:
|
|
1283
|
+
|
|
1284
|
+
- Added `agent.provider` with `opencode` as the default and `codex` as the
|
|
1285
|
+
alternate provider.
|
|
1286
|
+
- Added `athena mcp --agent-provider <opencode|codex>` for one-off MCP setup.
|
|
1287
|
+
- Updated OpenCode and Codex MCP setup docs while preserving the same read-only
|
|
1288
|
+
tool exposure for both providers.
|
|
1289
|
+
|
|
1282
1290
|
## Release Readiness Checklist
|
|
1283
1291
|
|
|
1284
1292
|
Use this before publishing a public package or tagging a release.
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Documentation Index
|
|
2
|
+
|
|
3
|
+
Start with the root files, then use the task-specific docs below.
|
|
4
|
+
|
|
5
|
+
## Agent Entry Points
|
|
6
|
+
|
|
7
|
+
- [../AGENTS.md](../AGENTS.md): repository instructions for coding agents.
|
|
8
|
+
- [../ARCHITECTURE.md](../ARCHITECTURE.md): current package, module, runtime,
|
|
9
|
+
data-flow, and invariant map.
|
|
10
|
+
- [../README.md](../README.md): user-facing install, command, config, MCP, and
|
|
11
|
+
development quickstart.
|
|
12
|
+
|
|
13
|
+
## Product And Implementation
|
|
14
|
+
|
|
15
|
+
- [agentic-rag-specifications.md](agentic-rag-specifications.md): product and
|
|
16
|
+
engineering requirements for Athena's local-first documentation RAG behavior.
|
|
17
|
+
- [agentic-rag-study.md](agentic-rag-study.md): source study behind the
|
|
18
|
+
architecture choices.
|
|
19
|
+
- [implementation-plan.md](implementation-plan.md): milestone checklist and
|
|
20
|
+
historical proof notes for implementation work.
|
|
21
|
+
- [mcp-integration.md](mcp-integration.md): OpenCode, Codex, and generic MCP
|
|
22
|
+
setup, exposed read-only tools, and manual stdio smoke test.
|
|
23
|
+
- [validation-corpus.md](validation-corpus.md): corpus layout, licensing,
|
|
24
|
+
retrieval, cache, and coverage rules.
|
|
25
|
+
|
|
26
|
+
## Harness Operations
|
|
27
|
+
|
|
28
|
+
- [SECURITY.md](SECURITY.md): security model, local-first boundaries, secrets,
|
|
29
|
+
network, filesystem, MCP, and server exposure notes.
|
|
30
|
+
- [QUALITY.md](QUALITY.md): validation ladder for docs, source changes,
|
|
31
|
+
retrieval/parser changes, corpus changes, package release checks, and manual
|
|
32
|
+
smoke tests.
|
|
33
|
+
- [tech-debt-tracker.md](tech-debt-tracker.md): practical deferred work that is
|
|
34
|
+
visible from the current code and docs.
|
|
35
|
+
- [exec-plans/template.md](exec-plans/template.md): reusable plan template for
|
|
36
|
+
larger changes.
|
|
37
|
+
|
|
38
|
+
## Decisions
|
|
39
|
+
|
|
40
|
+
- [adr/0001-sqlite-driver.md](adr/0001-sqlite-driver.md): why Athena uses
|
|
41
|
+
`better-sqlite3` for the local SQLite layer.
|
|
42
|
+
|
|
43
|
+
## Source Map
|
|
44
|
+
|
|
45
|
+
- `src/cli/`: command parsing and dispatch.
|
|
46
|
+
- `src/config/`: default config, config loading, validation, and
|
|
47
|
+
`defineConfig()`.
|
|
48
|
+
- `src/storage/`: `.athena/` paths, migrations, schema checks, and
|
|
49
|
+
transactions.
|
|
50
|
+
- `src/indexer/`: discovery, hashing, parsing, chunking, embedding, and index
|
|
51
|
+
writes.
|
|
52
|
+
- `src/parsers/`: text-like parsers, PDF parsing, chunking, and normalization.
|
|
53
|
+
- `src/embeddings/`: local, Ollama, and remote embedding providers.
|
|
54
|
+
- `src/retrieval/`: read-only retrieval tools and trace capture.
|
|
55
|
+
- `src/agent/`: Athena-owned agent loop, model providers, tools, citations, and
|
|
56
|
+
turn persistence.
|
|
57
|
+
- `src/server/`: local HTTP UI/API server.
|
|
58
|
+
- `src/ui/`: static web UI.
|
|
59
|
+
- `src/mcp/`: stdio MCP server.
|
|
60
|
+
- `scripts/`: corpus and evaluation commands.
|
|
61
|
+
- `test/`: Node test suites and validation corpus fixtures.
|
package/docs/mcp-integration.md
CHANGED
|
@@ -17,6 +17,31 @@ node dist/cli/main.js index --root /absolute/path/to/project
|
|
|
17
17
|
For an installed package, replace `node dist/cli/main.js` with `athena` or
|
|
18
18
|
`npx @alextis59/athena`.
|
|
19
19
|
|
|
20
|
+
## Agent Provider Option
|
|
21
|
+
|
|
22
|
+
OpenCode is the default external-agent provider. Use `--agent-provider codex`
|
|
23
|
+
when the MCP server is configured for Codex:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
athena mcp --root /absolute/path/to/project --agent-provider codex
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The same choice can be made durable in `athena.config.ts`,
|
|
30
|
+
`athena.config.mjs`, or `athena.config.json`:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { defineConfig } from "@alextis59/athena";
|
|
34
|
+
|
|
35
|
+
export default defineConfig({
|
|
36
|
+
agent: {
|
|
37
|
+
provider: "codex"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The option changes client-specific initialization guidance only. The MCP server
|
|
43
|
+
continues to expose the same read-only retrieval tools for every provider.
|
|
44
|
+
|
|
20
45
|
## OpenCode
|
|
21
46
|
|
|
22
47
|
OpenCode configures MCP servers under the `mcp` key. A local MCP entry uses
|
|
@@ -66,6 +91,54 @@ Installed package example:
|
|
|
66
91
|
After saving the config, run `opencode mcp list` to check that OpenCode can
|
|
67
92
|
start the server and discover its tools.
|
|
68
93
|
|
|
94
|
+
## Codex
|
|
95
|
+
|
|
96
|
+
Codex stores MCP servers in `config.toml`. You can configure Athena in the
|
|
97
|
+
user-level `~/.codex/config.toml` or in a trusted project-scoped
|
|
98
|
+
`.codex/config.toml`.
|
|
99
|
+
|
|
100
|
+
Installed package example:
|
|
101
|
+
|
|
102
|
+
```toml
|
|
103
|
+
[mcp_servers.athena]
|
|
104
|
+
command = "npx"
|
|
105
|
+
args = [
|
|
106
|
+
"--yes",
|
|
107
|
+
"@alextis59/athena",
|
|
108
|
+
"mcp",
|
|
109
|
+
"--root",
|
|
110
|
+
".",
|
|
111
|
+
"--agent-provider",
|
|
112
|
+
"codex"
|
|
113
|
+
]
|
|
114
|
+
cwd = "/absolute/path/to/project"
|
|
115
|
+
enabled = true
|
|
116
|
+
startup_timeout_sec = 10
|
|
117
|
+
tool_timeout_sec = 60
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Development checkout example:
|
|
121
|
+
|
|
122
|
+
```toml
|
|
123
|
+
[mcp_servers.athena]
|
|
124
|
+
command = "node"
|
|
125
|
+
args = [
|
|
126
|
+
"/absolute/path/to/athena/dist/cli/main.js",
|
|
127
|
+
"mcp",
|
|
128
|
+
"--root",
|
|
129
|
+
".",
|
|
130
|
+
"--agent-provider",
|
|
131
|
+
"codex"
|
|
132
|
+
]
|
|
133
|
+
cwd = "/absolute/path/to/project"
|
|
134
|
+
enabled = true
|
|
135
|
+
startup_timeout_sec = 10
|
|
136
|
+
tool_timeout_sec = 60
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
After saving the config, start Codex in the project and use `/mcp` in the
|
|
140
|
+
terminal UI to check that the `athena` server is connected.
|
|
141
|
+
|
|
69
142
|
## Exposed Tools
|
|
70
143
|
|
|
71
144
|
Athena exposes only read-only retrieval tools:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tech Debt Tracker
|
|
2
|
+
|
|
3
|
+
Track deferred work that is visible from the current implementation. Keep this
|
|
4
|
+
file practical: each item should have a reason, a likely validation path, and a
|
|
5
|
+
status.
|
|
6
|
+
|
|
7
|
+
| Item | Context | Validation | Owner | Status |
|
|
8
|
+
| --- | --- | --- | --- | --- |
|
|
9
|
+
| Align chat provider docs and adapters | Config validation recognizes `openai`, `anthropic`, and `gemini` chat providers, but `createConfiguredModelProvider()` currently implements Ollama only after validation. Either add adapters or keep user docs explicit that non-Ollama chat adapters are not ready. | Provider tests plus `athena ask` smoke for each supported adapter. | TBD | Open |
|
|
10
|
+
| Decide authenticated server posture before non-loopback use | The HTTP server is intentionally local and unauthenticated today. Binding `--host` to a non-loopback address should remain an operator-controlled advanced use until there is an authenticated mode. | Server tests for auth behavior if added; security doc update. | TBD | Open |
|
|
11
|
+
| Evaluate query embedding parity for remote/provider-specific indexes | Indexed vectors can come from provider-specific embeddings. Retrieval currently builds query vectors inside the retrieval layer rather than routing the query through the configured embedding provider. Confirm whether this is acceptable for release quality or add provider-aware query embedding. | Retrieval/eval tests comparing hybrid, FTS-only, vector-only, and provider-backed query behavior. | TBD | Open |
|
|
12
|
+
| Harden package smoke automation | Package readiness currently relies on manual tarball and `npx --package` smoke commands documented in `docs/QUALITY.md`. A script could reduce release mistakes while preserving the same checks. | New script plus tarball CLI smoke in a temp project. | TBD | Open |
|
|
13
|
+
| Expand parser warning summaries | Doctor reports total parser warnings, while PDF warning detail is available in parser artifacts and retrieval responses. A future doctor view could summarize warning codes by source. | Doctor tests and fixture with repeated PDF warnings. | TBD | Open |
|
|
14
|
+
|
|
15
|
+
## Closing Criteria
|
|
16
|
+
|
|
17
|
+
Close an item only after:
|
|
18
|
+
|
|
19
|
+
- the implementation or documentation change lands;
|
|
20
|
+
- the validation in the row passes;
|
|
21
|
+
- related docs are updated when behavior or policy changes.
|