@bodhi-ventures/aiocs 0.1.1 → 0.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 +105 -60
- package/dist/{chunk-AJ5NZDK4.js → chunk-M7YEYMJL.js} +1094 -261
- package/dist/cli.js +14 -2
- package/dist/mcp-server.js +22 -4
- package/docs/README.md +2 -2
- package/docs/codex-integration.md +33 -19
- package/docs/json-contract.md +21 -3
- package/package.json +20 -20
- package/skills/aiocs/SKILL.md +25 -38
- package/skills/aiocs-curation/SKILL.md +110 -0
- package/sources/nktkas-hyperliquid.yaml +30 -0
- package/docs/2026-03-26-agent-json-and-daemon-design.md +0 -157
- package/docs/2026-03-28-hybrid-search-design.md +0 -423
- package/docs/examples/codex-agents/aiocs-docs-specialist.example.toml +0 -21
- package/docs/superpowers/specs/2026-03-29-tag-driven-release-pipeline-design.md +0 -135
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Local-only documentation fetch, versioning, and search CLI for AI agents.
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
7
7
|
- fetches docs from websites with Playwright
|
|
8
|
+
- snapshots curated external git repositories as shared local reference sources
|
|
8
9
|
- supports authenticated sources via environment-backed headers and cookies
|
|
9
10
|
- runs lightweight canaries to detect source drift before full refreshes
|
|
10
11
|
- normalizes them into Markdown
|
|
@@ -30,25 +31,24 @@ For testing or local overrides, set:
|
|
|
30
31
|
```bash
|
|
31
32
|
npm install -g @bodhi-ventures/aiocs
|
|
32
33
|
docs --version
|
|
34
|
+
docs --help
|
|
35
|
+
command -v aiocs-mcp
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
Zero-install fallback:
|
|
36
39
|
|
|
37
40
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
npx -y -p @bodhi-ventures/aiocs docs --version
|
|
42
|
+
npx -y -p @bodhi-ventures/aiocs aiocs-mcp
|
|
40
43
|
```
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
For repository development only:
|
|
43
46
|
|
|
44
47
|
```bash
|
|
48
|
+
pnpm install
|
|
49
|
+
pnpm build
|
|
45
50
|
pnpm dev -- --help
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Or after build:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
./dist/cli.js --help
|
|
51
|
+
pnpm dev:mcp
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
For AI agents, prefer the root-level `--json` flag for one-shot commands:
|
|
@@ -57,9 +57,9 @@ For AI agents, prefer the root-level `--json` flag for one-shot commands:
|
|
|
57
57
|
docs --json version
|
|
58
58
|
docs --json doctor
|
|
59
59
|
docs --json init --no-fetch
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
docs --json source list
|
|
61
|
+
docs --json search "maker flow" --source hyperliquid
|
|
62
|
+
docs --json show 42
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
`--json` emits exactly one JSON document to stdout with this envelope:
|
|
@@ -109,12 +109,23 @@ GitHub Actions publishes `@bodhi-ventures/aiocs` publicly to npm and creates the
|
|
|
109
109
|
|
|
110
110
|
## Codex integration
|
|
111
111
|
|
|
112
|
-
For Codex-first setup, automatic-use guidance, MCP recommendations, and
|
|
112
|
+
For Codex-first setup, automatic-use guidance, MCP recommendations, and agent definitions, see [docs/codex-integration.md](./docs/codex-integration.md).
|
|
113
|
+
|
|
114
|
+
Canonical Codex setup:
|
|
115
|
+
|
|
116
|
+
- register `aiocs-mcp` in `~/.codex/config.toml`
|
|
117
|
+
- link `skills/aiocs` into `~/.codex/skills/aiocs`
|
|
118
|
+
- link `skills/aiocs-curation` into `~/.codex/skills/aiocs-curation`
|
|
119
|
+
- keep the optional specialist subagent linked only as a fallback for heavier docs workflows
|
|
113
120
|
|
|
114
121
|
## Managed sources
|
|
115
122
|
|
|
116
|
-
The open-source repo bundles
|
|
117
|
-
|
|
123
|
+
The open-source repo bundles both web and git sources in `sources/`:
|
|
124
|
+
|
|
125
|
+
- `hyperliquid` for the public docs site
|
|
126
|
+
- `nktkas-hyperliquid` for the `nktkas/hyperliquid` GitHub repository
|
|
127
|
+
|
|
128
|
+
Additional machine-local source specs belong in `~/.aiocs/sources`.
|
|
118
129
|
|
|
119
130
|
`docs init` bootstraps both managed locations, so source behavior is the same regardless of
|
|
120
131
|
whether a spec lives in the repo or in `~/.aiocs/sources`.
|
|
@@ -140,50 +151,51 @@ Register a source:
|
|
|
140
151
|
```bash
|
|
141
152
|
mkdir -p ~/.aiocs/sources
|
|
142
153
|
cp /path/to/source.yaml ~/.aiocs/sources/my-source.yaml
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
docs source upsert ~/.aiocs/sources/my-source.yaml
|
|
155
|
+
docs source upsert /path/to/source.yaml
|
|
156
|
+
docs source list
|
|
146
157
|
```
|
|
147
158
|
|
|
148
159
|
Fetch and snapshot docs:
|
|
149
160
|
|
|
150
161
|
```bash
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
162
|
+
docs refresh due hyperliquid
|
|
163
|
+
docs snapshot list hyperliquid
|
|
164
|
+
docs refresh due
|
|
154
165
|
```
|
|
155
166
|
|
|
156
167
|
Force fetch remains available for explicit maintenance:
|
|
157
168
|
|
|
158
169
|
```bash
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
docs fetch hyperliquid
|
|
171
|
+
docs fetch all
|
|
161
172
|
```
|
|
162
173
|
|
|
163
174
|
Link docs to a local project:
|
|
164
175
|
|
|
165
176
|
```bash
|
|
166
|
-
|
|
167
|
-
|
|
177
|
+
docs project link /absolute/path/to/project hyperliquid lighter
|
|
178
|
+
docs project unlink /absolute/path/to/project lighter
|
|
168
179
|
```
|
|
169
180
|
|
|
170
181
|
Search and inspect results:
|
|
171
182
|
|
|
172
183
|
```bash
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
docs search "maker flow" --source hyperliquid
|
|
185
|
+
docs search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript
|
|
186
|
+
docs search "maker flow" --source hyperliquid --mode lexical
|
|
187
|
+
docs search "maker flow" --source hyperliquid --mode hybrid
|
|
188
|
+
docs search "maker flow" --source hyperliquid --mode semantic
|
|
189
|
+
docs search "maker flow" --all
|
|
190
|
+
docs search "maker flow" --source hyperliquid --limit 5 --offset 0
|
|
191
|
+
docs show 42
|
|
192
|
+
docs canary hyperliquid
|
|
193
|
+
docs diff hyperliquid
|
|
194
|
+
docs embeddings status
|
|
195
|
+
docs embeddings backfill all
|
|
196
|
+
docs embeddings run
|
|
197
|
+
docs backup export /absolute/path/to/backup
|
|
198
|
+
docs verify coverage hyperliquid /absolute/path/to/reference.md
|
|
187
199
|
```
|
|
188
200
|
|
|
189
201
|
When `docs search` runs inside a linked project, it automatically scopes to that project's linked sources unless `--source` or `--all` is provided.
|
|
@@ -195,6 +207,34 @@ For agents, the intended decision order is:
|
|
|
195
207
|
3. if the source is missing but worth reusing, add a spec under `~/.aiocs/sources`, then upsert and refresh only that source
|
|
196
208
|
4. avoid `fetch all` unless the user explicitly asks or the daemon is doing maintenance
|
|
197
209
|
|
|
210
|
+
### Git repo sources
|
|
211
|
+
|
|
212
|
+
`aiocs` supports first-class `kind: git` sources for curated external repositories that should be
|
|
213
|
+
reused across multiple local projects.
|
|
214
|
+
|
|
215
|
+
Example:
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
kind: git
|
|
219
|
+
id: nktkas-hyperliquid
|
|
220
|
+
label: nktkas/hyperliquid Repo
|
|
221
|
+
repo:
|
|
222
|
+
url: https://github.com/nktkas/hyperliquid.git
|
|
223
|
+
ref: main
|
|
224
|
+
include:
|
|
225
|
+
- README.md
|
|
226
|
+
- docs/**
|
|
227
|
+
- src/**
|
|
228
|
+
exclude:
|
|
229
|
+
- .github/**
|
|
230
|
+
- dist/**
|
|
231
|
+
schedule:
|
|
232
|
+
everyHours: 24
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Git source snapshots are commit-based, stored under the shared local catalog, and searchable with
|
|
236
|
+
the same project linking, diffing, canary, and hybrid search flows as website docs.
|
|
237
|
+
|
|
198
238
|
### Hybrid search
|
|
199
239
|
|
|
200
240
|
`aiocs` keeps SQLite FTS5/BM25 as the canonical lexical index and adds an optional hybrid layer:
|
|
@@ -279,22 +319,22 @@ All one-shot commands support `--json`:
|
|
|
279
319
|
Representative examples:
|
|
280
320
|
|
|
281
321
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
322
|
+
docs --json doctor
|
|
323
|
+
docs --json init --no-fetch
|
|
324
|
+
docs --json source list
|
|
325
|
+
docs --json source upsert sources/hyperliquid.yaml
|
|
326
|
+
docs --json refresh due hyperliquid
|
|
327
|
+
docs --json canary hyperliquid
|
|
328
|
+
docs --json refresh due
|
|
329
|
+
docs --json diff hyperliquid
|
|
330
|
+
docs --json embeddings status
|
|
331
|
+
docs --json embeddings backfill all
|
|
332
|
+
docs --json embeddings clear hyperliquid
|
|
333
|
+
docs --json embeddings run
|
|
334
|
+
docs --json project link /absolute/path/to/project hyperliquid lighter
|
|
335
|
+
docs --json snapshot list hyperliquid
|
|
336
|
+
docs --json backup export /absolute/path/to/backup
|
|
337
|
+
docs --json verify coverage hyperliquid /absolute/path/to/reference.md
|
|
298
338
|
```
|
|
299
339
|
|
|
300
340
|
For multi-result commands like `fetch`, `refresh due`, and `search`, `data` contains structured collections rather than line-by-line output:
|
|
@@ -321,8 +361,7 @@ For multi-result commands like `fetch`, `refresh due`, and `search`, `data` cont
|
|
|
321
361
|
`aiocs` ships a first-class long-running refresh process:
|
|
322
362
|
|
|
323
363
|
```bash
|
|
324
|
-
|
|
325
|
-
./dist/cli.js daemon
|
|
364
|
+
docs daemon
|
|
326
365
|
```
|
|
327
366
|
|
|
328
367
|
The daemon bootstraps source specs from the configured directories, refreshes due sources, sleeps for the configured interval, and repeats.
|
|
@@ -353,7 +392,7 @@ For local agents, the daemon keeps the shared catalog under `~/.aiocs` warm whil
|
|
|
353
392
|
`docs daemon --json` is intentionally different from one-shot commands. Because it is long-running, it emits one JSON event per line:
|
|
354
393
|
|
|
355
394
|
```bash
|
|
356
|
-
|
|
395
|
+
docs --json daemon
|
|
357
396
|
```
|
|
358
397
|
|
|
359
398
|
Example event stream:
|
|
@@ -369,7 +408,13 @@ Example event stream:
|
|
|
369
408
|
`aiocs` also ships an MCP server binary for tool-native agent integrations:
|
|
370
409
|
|
|
371
410
|
```bash
|
|
411
|
+
command -v aiocs-mcp
|
|
372
412
|
aiocs-mcp
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
For repository development only:
|
|
416
|
+
|
|
417
|
+
```bash
|
|
373
418
|
pnpm dev:mcp
|
|
374
419
|
```
|
|
375
420
|
|
|
@@ -405,7 +450,7 @@ The repo ships two GitHub Actions workflows:
|
|
|
405
450
|
- [ci.yml](./.github/workflows/ci.yml): validation for lint, tests, build, pack, and Docker smoke coverage
|
|
406
451
|
- [release.yml](./.github/workflows/release.yml): tag-driven stable release flow that validates the tagged package state, publishes to npm, and creates a GitHub release
|
|
407
452
|
|
|
408
|
-
The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects
|
|
453
|
+
The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects an npm publish token in GitHub repository secrets. The release job is retryable: if `@bodhi-ventures/aiocs@X.Y.Z` already exists on npm or the GitHub release already exists for `vX.Y.Z`, the workflow skips the completed publication step and finishes the remaining one.
|
|
409
454
|
|
|
410
455
|
Successful MCP results use an envelope:
|
|
411
456
|
|