@alextis59/athena 1.0.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/LICENSE +15 -0
- package/README.md +147 -0
- package/dist/agent/ask.d.ts +7 -0
- package/dist/agent/ask.d.ts.map +1 -0
- package/dist/agent/ask.js +35 -0
- package/dist/agent/ask.js.map +1 -0
- package/dist/agent/citations.d.ts +27 -0
- package/dist/agent/citations.d.ts.map +1 -0
- package/dist/agent/citations.js +190 -0
- package/dist/agent/citations.js.map +1 -0
- package/dist/agent/fake-provider.d.ts +9 -0
- package/dist/agent/fake-provider.d.ts.map +1 -0
- package/dist/agent/fake-provider.js +51 -0
- package/dist/agent/fake-provider.js.map +1 -0
- package/dist/agent/index.d.ts +10 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +6 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/loop.d.ts +11 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/loop.js +156 -0
- package/dist/agent/loop.js.map +1 -0
- package/dist/agent/providers.d.ts +17 -0
- package/dist/agent/providers.d.ts.map +1 -0
- package/dist/agent/providers.js +171 -0
- package/dist/agent/providers.js.map +1 -0
- package/dist/agent/tools.d.ts +8 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +233 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/agent/types.d.ts +84 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +2 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/cli/help.d.ts +2 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +28 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +5 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/options.d.ts +21 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/options.js +97 -0
- package/dist/cli/options.js.map +1 -0
- package/dist/cli/run.d.ts +21 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +144 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +14 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +352 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +6 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +72 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/types.d.ts +53 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +2 -0
- package/dist/config/types.js.map +1 -0
- package/dist/doctor/doctor.d.ts +47 -0
- package/dist/doctor/doctor.d.ts.map +1 -0
- package/dist/doctor/doctor.js +159 -0
- package/dist/doctor/doctor.js.map +1 -0
- package/dist/embeddings/index.d.ts +117 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +515 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/errors.d.ts +19 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +37 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer/discovery.d.ts +10 -0
- package/dist/indexer/discovery.d.ts.map +1 -0
- package/dist/indexer/discovery.js +38 -0
- package/dist/indexer/discovery.js.map +1 -0
- package/dist/indexer/hash.d.ts +3 -0
- package/dist/indexer/hash.d.ts.map +1 -0
- package/dist/indexer/hash.js +11 -0
- package/dist/indexer/hash.js.map +1 -0
- package/dist/indexer/index.d.ts +7 -0
- package/dist/indexer/index.d.ts.map +1 -0
- package/dist/indexer/index.js +5 -0
- package/dist/indexer/index.js.map +1 -0
- package/dist/indexer/kinds.d.ts +4 -0
- package/dist/indexer/kinds.d.ts.map +1 -0
- package/dist/indexer/kinds.js +38 -0
- package/dist/indexer/kinds.js.map +1 -0
- package/dist/indexer/run.d.ts +42 -0
- package/dist/indexer/run.d.ts.map +1 -0
- package/dist/indexer/run.js +563 -0
- package/dist/indexer/run.js.map +1 -0
- package/dist/logging/logger.d.ts +11 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +18 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/mcp/index.d.ts +35 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +392 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/parsers/chunking.d.ts +4 -0
- package/dist/parsers/chunking.d.ts.map +1 -0
- package/dist/parsers/chunking.js +112 -0
- package/dist/parsers/chunking.js.map +1 -0
- package/dist/parsers/index.d.ts +8 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/index.js +5 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/line-parser.d.ts +13 -0
- package/dist/parsers/line-parser.d.ts.map +1 -0
- package/dist/parsers/line-parser.js +242 -0
- package/dist/parsers/line-parser.js.map +1 -0
- package/dist/parsers/normalize.d.ts +4 -0
- package/dist/parsers/normalize.d.ts.map +1 -0
- package/dist/parsers/normalize.js +17 -0
- package/dist/parsers/normalize.js.map +1 -0
- package/dist/parsers/parser.d.ts +14 -0
- package/dist/parsers/parser.d.ts.map +1 -0
- package/dist/parsers/parser.js +77 -0
- package/dist/parsers/parser.js.map +1 -0
- package/dist/parsers/pdf2llm.d.ts +14 -0
- package/dist/parsers/pdf2llm.d.ts.map +1 -0
- package/dist/parsers/pdf2llm.js +215 -0
- package/dist/parsers/pdf2llm.js.map +1 -0
- package/dist/parsers/types.d.ts +48 -0
- package/dist/parsers/types.d.ts.map +1 -0
- package/dist/parsers/types.js +2 -0
- package/dist/parsers/types.js.map +1 -0
- package/dist/retrieval/index.d.ts +4 -0
- package/dist/retrieval/index.d.ts.map +1 -0
- package/dist/retrieval/index.js +3 -0
- package/dist/retrieval/index.js.map +1 -0
- package/dist/retrieval/schemas.d.ts +127 -0
- package/dist/retrieval/schemas.d.ts.map +1 -0
- package/dist/retrieval/schemas.js +65 -0
- package/dist/retrieval/schemas.js.map +1 -0
- package/dist/retrieval/tools.d.ts +31 -0
- package/dist/retrieval/tools.d.ts.map +1 -0
- package/dist/retrieval/tools.js +803 -0
- package/dist/retrieval/tools.js.map +1 -0
- package/dist/retrieval/types.d.ts +104 -0
- package/dist/retrieval/types.d.ts.map +1 -0
- package/dist/retrieval/types.js +2 -0
- package/dist/retrieval/types.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/server.d.ts +49 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +517 -0
- package/dist/server/server.js.map +1 -0
- package/dist/shared/types.d.ts +98 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +2 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/storage/database.d.ts +18 -0
- package/dist/storage/database.d.ts.map +1 -0
- package/dist/storage/database.js +66 -0
- package/dist/storage/database.js.map +1 -0
- package/dist/storage/index.d.ts +8 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +5 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/migrations.d.ts +15 -0
- package/dist/storage/migrations.d.ts.map +1 -0
- package/dist/storage/migrations.js +170 -0
- package/dist/storage/migrations.js.map +1 -0
- package/dist/storage/paths.d.ts +15 -0
- package/dist/storage/paths.d.ts.map +1 -0
- package/dist/storage/paths.js +27 -0
- package/dist/storage/paths.js.map +1 -0
- package/dist/storage/schema.d.ts +11 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage/schema.js +40 -0
- package/dist/storage/schema.js.map +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +2 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/static-app.d.ts +2 -0
- package/dist/ui/static-app.d.ts.map +1 -0
- package/dist/ui/static-app.js +735 -0
- package/dist/ui/static-app.js.map +1 -0
- package/docs/adr/0001-sqlite-driver.md +23 -0
- package/docs/agentic-rag-specifications.md +659 -0
- package/docs/agentic-rag-study.md +1056 -0
- package/docs/implementation-plan.md +1425 -0
- package/docs/mcp-integration.md +154 -0
- package/docs/validation-corpus.md +71 -0
- package/package.json +79 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Athena MCP Integration
|
|
2
|
+
|
|
3
|
+
Athena exposes a read-only Model Context Protocol server through `athena mcp`.
|
|
4
|
+
Use it when an external coding agent needs citation-aware project
|
|
5
|
+
documentation retrieval without taking over Athena's own agent loop.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
Build or install Athena, then index the documentation project that the external
|
|
10
|
+
agent should read:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm run build
|
|
14
|
+
node dist/cli/main.js index --root /absolute/path/to/project
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For an installed package, replace `node dist/cli/main.js` with `athena` or
|
|
18
|
+
`npx @alextis59/athena`.
|
|
19
|
+
|
|
20
|
+
## OpenCode
|
|
21
|
+
|
|
22
|
+
OpenCode configures MCP servers under the `mcp` key. A local MCP entry uses
|
|
23
|
+
`type: "local"` and a `command` array, with optional `cwd`, `environment`,
|
|
24
|
+
`enabled`, and `timeout` fields.
|
|
25
|
+
|
|
26
|
+
Development checkout example:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"$schema": "https://opencode.ai/config.json",
|
|
31
|
+
"mcp": {
|
|
32
|
+
"athena": {
|
|
33
|
+
"type": "local",
|
|
34
|
+
"command": [
|
|
35
|
+
"node",
|
|
36
|
+
"/absolute/path/to/athena/dist/cli/main.js",
|
|
37
|
+
"mcp",
|
|
38
|
+
"--root",
|
|
39
|
+
"."
|
|
40
|
+
],
|
|
41
|
+
"cwd": "/absolute/path/to/project",
|
|
42
|
+
"enabled": true,
|
|
43
|
+
"timeout": 10000
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Installed package example:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"$schema": "https://opencode.ai/config.json",
|
|
54
|
+
"mcp": {
|
|
55
|
+
"athena": {
|
|
56
|
+
"type": "local",
|
|
57
|
+
"command": ["npx", "--yes", "@alextis59/athena", "mcp", "--root", "."],
|
|
58
|
+
"cwd": "/absolute/path/to/project",
|
|
59
|
+
"enabled": true,
|
|
60
|
+
"timeout": 10000
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
After saving the config, run `opencode mcp list` to check that OpenCode can
|
|
67
|
+
start the server and discover its tools.
|
|
68
|
+
|
|
69
|
+
## Exposed Tools
|
|
70
|
+
|
|
71
|
+
Athena exposes only read-only retrieval tools:
|
|
72
|
+
|
|
73
|
+
- `searchDocs`
|
|
74
|
+
- `readSourceRange`
|
|
75
|
+
- `readPdfSource`
|
|
76
|
+
- `grepDocs`
|
|
77
|
+
- `listDocs`
|
|
78
|
+
- `relatedChunks`
|
|
79
|
+
|
|
80
|
+
It does not expose write, edit, delete, shell, indexing, chat, or package
|
|
81
|
+
management tools through MCP. External agents can retrieve context, but they do
|
|
82
|
+
not own Athena's model loop. Use `athena ask` or the local UI when you want
|
|
83
|
+
Athena itself to plan tool calls and validate final answer citations.
|
|
84
|
+
|
|
85
|
+
## Citation And Trace Shape
|
|
86
|
+
|
|
87
|
+
MCP tool results are returned as text content containing JSON:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"result": {},
|
|
92
|
+
"trace": {
|
|
93
|
+
"seenChunkIds": [],
|
|
94
|
+
"readLocators": [],
|
|
95
|
+
"searchScores": []
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`result` is the normal Athena retrieval payload. Search results include chunk
|
|
101
|
+
IDs, paths, snippets, score details, and text or PDF locators. Source-read
|
|
102
|
+
tools return exact line or PDF page/region locators.
|
|
103
|
+
|
|
104
|
+
`trace` mirrors the runtime trace shape used by the UI and Athena's internal
|
|
105
|
+
agent loop. Use it to inspect which chunks were surfaced, which source locators
|
|
106
|
+
were read, and how retrieval scores were assigned during the MCP session.
|
|
107
|
+
|
|
108
|
+
## Manual Smoke Test
|
|
109
|
+
|
|
110
|
+
From this repository, build and index a small fixture project:
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
tmpdir="$(mktemp -d)"
|
|
114
|
+
mkdir -p "$tmpdir/docs"
|
|
115
|
+
cat > "$tmpdir/docs/admin-guide.md" <<'EOF'
|
|
116
|
+
# Admin Guide
|
|
117
|
+
|
|
118
|
+
## Indexing
|
|
119
|
+
|
|
120
|
+
Set `ATHENA_INDEX_BATCH_SIZE=64` before indexing large docsets.
|
|
121
|
+
EOF
|
|
122
|
+
|
|
123
|
+
npm run build
|
|
124
|
+
node dist/cli/main.js index --root "$tmpdir" --json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Then send a finite stdio MCP session:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
printf '%s\n' \
|
|
131
|
+
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"manual-smoke","version":"1.0.0"}}}' \
|
|
132
|
+
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
|
|
133
|
+
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
|
|
134
|
+
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"searchDocs","arguments":{"query":"ATHENA_INDEX_BATCH_SIZE","pathPrefix":"docs/"}}}' \
|
|
135
|
+
'{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"readSourceRange","arguments":{"path":"docs/admin-guide.md","startLine":3,"endLine":5}}}' \
|
|
136
|
+
| node dist/cli/main.js mcp --root "$tmpdir"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Expected output:
|
|
140
|
+
|
|
141
|
+
- one `initialize` response with `serverInfo.name` set to `athena`;
|
|
142
|
+
- one `tools/list` response with the six read-only retrieval tools;
|
|
143
|
+
- one `searchDocs` response whose JSON text has
|
|
144
|
+
`result[0].path == "docs/admin-guide.md"` and non-empty
|
|
145
|
+
`trace.seenChunkIds`;
|
|
146
|
+
- one `readSourceRange` response whose JSON text includes
|
|
147
|
+
`ATHENA_INDEX_BATCH_SIZE` and a `trace.readLocators` entry for
|
|
148
|
+
`docs/admin-guide.md`.
|
|
149
|
+
|
|
150
|
+
## References
|
|
151
|
+
|
|
152
|
+
- [MCP 2025-03-26 transports](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports)
|
|
153
|
+
- [MCP 2025-03-26 tools](https://modelcontextprotocol.io/specification/2025-03-26/server/tools)
|
|
154
|
+
- [OpenCode MCP servers](https://opencode.ai/docs/mcp-servers)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Athena Validation Corpus
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-03
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
The validation corpus gives Athena realistic documents early in the
|
|
8
|
+
implementation. It is used to validate discovery, parsing, chunking, retrieval,
|
|
9
|
+
citations, PDF extraction, UI source previews, and later evaluation runs.
|
|
10
|
+
|
|
11
|
+
## Directory Layout
|
|
12
|
+
|
|
13
|
+
- `test/corpus/manifest.json` is the locked corpus manifest.
|
|
14
|
+
- `test/corpus/manifest.schema.json` documents the manifest shape.
|
|
15
|
+
- `test/corpus/ground-truth.json` contains deterministic validation questions.
|
|
16
|
+
- `test/corpus/synthetic/` contains committed synthetic controls.
|
|
17
|
+
- `test/corpus/cache/` contains downloaded third-party artifacts and is ignored
|
|
18
|
+
by git.
|
|
19
|
+
|
|
20
|
+
The cache is intentionally outside `.athena/` so tests can distinguish the
|
|
21
|
+
validation corpus from runtime indexes. The script still treats the cache as
|
|
22
|
+
local runtime state, not source code.
|
|
23
|
+
|
|
24
|
+
## Licensing and Redistribution
|
|
25
|
+
|
|
26
|
+
Synthetic controls are committed under this project's license-compatible test
|
|
27
|
+
fixture policy and are marked `redistribution: "committed"`.
|
|
28
|
+
|
|
29
|
+
Third-party documents are marked `redistribution: "download-only"`. Athena
|
|
30
|
+
commits their URL, license metadata, retrieval date, expected size, and SHA-256
|
|
31
|
+
hash, but it does not commit the downloaded artifacts. This avoids copying
|
|
32
|
+
third-party documentation into the repository while keeping the validation set
|
|
33
|
+
reproducible.
|
|
34
|
+
|
|
35
|
+
## Retrieval
|
|
36
|
+
|
|
37
|
+
Download or refresh the corpus:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm run corpus:retrieve
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Verify an already-cached corpus without network access:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run corpus:health
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The retrieval script refuses changed downloads. If an upstream document changes
|
|
50
|
+
intentionally, refresh the cache, review the changed file, update the manifest
|
|
51
|
+
hash and size in the same commit, and describe why the change is acceptable.
|
|
52
|
+
|
|
53
|
+
## Coverage
|
|
54
|
+
|
|
55
|
+
The manifest covers:
|
|
56
|
+
|
|
57
|
+
- Markdown README, API reference, and changelog samples;
|
|
58
|
+
- MDX with imports, exports, and embedded JSX that must not execute;
|
|
59
|
+
- plain text and extensionless documentation;
|
|
60
|
+
- reStructuredText;
|
|
61
|
+
- AsciiDoc;
|
|
62
|
+
- HTML with navigation and visible documentation content;
|
|
63
|
+
- born-digital PDF;
|
|
64
|
+
- table-heavy PDF;
|
|
65
|
+
- encrypted hard-PDF warning behavior;
|
|
66
|
+
- synthetic exact-citation, ambiguous-heading, exact-symbol, semantic-only,
|
|
67
|
+
hybrid-comparison, and stale-document controls.
|
|
68
|
+
|
|
69
|
+
Every required document type has at least one ground-truth question. Negative
|
|
70
|
+
questions require Athena to refuse or mark an answer unsupported when the corpus
|
|
71
|
+
does not contain the requested fact.
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alextis59/athena",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Local-first agentic documentation RAG command.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"bin": {
|
|
8
|
+
"athena": "dist/cli/main.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"docs"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"rag",
|
|
18
|
+
"documentation",
|
|
19
|
+
"search",
|
|
20
|
+
"sqlite",
|
|
21
|
+
"mcp",
|
|
22
|
+
"pdf"
|
|
23
|
+
],
|
|
24
|
+
"homepage": "https://github.com/alextis59/athena#readme",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/alextis59/athena/issues"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/alextis59/athena.git"
|
|
31
|
+
},
|
|
32
|
+
"license": "ISC",
|
|
33
|
+
"author": "Athena contributors",
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22.0.0"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"main": "./dist/index.js",
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"import": "./dist/index.js"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc -p tsconfig.json",
|
|
50
|
+
"check": "npm run format:check && npm run lint && npm run typecheck && npm test",
|
|
51
|
+
"check:publish": "npm run check && npm run eval && npm run build",
|
|
52
|
+
"corpus:health": "tsx scripts/corpus.ts health --offline",
|
|
53
|
+
"corpus:retrieve": "tsx scripts/corpus.ts retrieve",
|
|
54
|
+
"eval": "tsx scripts/eval.ts validate --offline",
|
|
55
|
+
"format:check": "prettier --check .",
|
|
56
|
+
"lint": "eslint .",
|
|
57
|
+
"prepack": "npm run build",
|
|
58
|
+
"prepublishOnly": "npm run check:publish",
|
|
59
|
+
"test": "node --import tsx --test \"test/**/*.test.ts\"",
|
|
60
|
+
"typecheck": "tsc -p tsconfig.test.json --noEmit"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@eslint/js": "^10.0.1",
|
|
64
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
65
|
+
"@types/node": "^26.1.0",
|
|
66
|
+
"eslint": "^10.6.0",
|
|
67
|
+
"prettier": "^3.9.4",
|
|
68
|
+
"tsx": "^4.23.0",
|
|
69
|
+
"typescript": "^6.0.3",
|
|
70
|
+
"typescript-eslint": "^8.62.1"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@huggingface/transformers": "^4.2.0",
|
|
74
|
+
"better-sqlite3": "^12.11.1",
|
|
75
|
+
"fast-glob": "^3.3.3",
|
|
76
|
+
"jiti": "^2.7.0",
|
|
77
|
+
"pdf-2-llm": "^1.1.0"
|
|
78
|
+
}
|
|
79
|
+
}
|