@bodhi-ventures/aiocs 0.3.1 → 0.5.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.
@@ -8,22 +8,22 @@ Install the CLI and MCP binary globally:
8
8
 
9
9
  ```bash
10
10
  npm install -g @bodhi-ventures/aiocs
11
- docs --version
11
+ aiocs --version
12
12
  command -v aiocs-mcp
13
13
  ```
14
14
 
15
15
  If global install is unavailable, use `npx` only as a fallback:
16
16
 
17
17
  ```bash
18
- npx -y -p @bodhi-ventures/aiocs docs --version
18
+ npx -y -p @bodhi-ventures/aiocs aiocs --version
19
19
  npx -y -p @bodhi-ventures/aiocs aiocs-mcp
20
20
  ```
21
21
 
22
22
  The `aiocs-mcp` process is an MCP stdio server, so running it directly will wait for MCP clients instead of printing interactive help. The useful validation commands are:
23
23
 
24
24
  ```bash
25
- docs --json doctor
26
- docs --json init --no-fetch
25
+ aiocs --json doctor
26
+ aiocs --json init --no-fetch
27
27
  ```
28
28
 
29
29
  Register `aiocs-mcp` as a global Codex MCP server so the main agent can use it directly without shell fallback:
@@ -37,7 +37,7 @@ command = "aiocs-mcp"
37
37
 
38
38
  1. Prefer `aiocs` before live browsing when the requested docs may already exist locally.
39
39
  2. Prefer MCP through `aiocs-mcp` when Codex can use it.
40
- 3. Fall back to `docs --json ...` only when MCP is unavailable.
40
+ 3. Fall back to `aiocs --json ...` only when MCP is unavailable.
41
41
  4. Check `source_list` before assuming a source is missing or stale.
42
42
  5. Default to `search mode=auto`.
43
43
  6. Use `mode=lexical` for exact identifiers, endpoint names, headings, and error strings.
@@ -46,7 +46,6 @@ command = "aiocs-mcp"
46
46
  9. Prefer `refresh due <source-id>` over force `fetch <source-id>` when the source already exists.
47
47
  10. Use MCP `batch` when multiple list/search/show or search/diff/coverage steps are needed.
48
48
  11. Cite `sourceId`, `snapshotId`, and `pageUrl` when they materially improve traceability.
49
- 12. If the user is operating on a compiled research workspace, prefer `workspace_search` and `workspace_artifact_show` over raw source search.
50
49
 
51
50
  ## Automatic use in Codex
52
51
 
@@ -83,17 +82,17 @@ ln -sfn "$AIOCS_REPO/agents/aiocs-docs-specialist.toml" ~/.codex/agents/aiocs-do
83
82
  Health and bootstrap:
84
83
 
85
84
  ```bash
86
- docs --json doctor
87
- docs --json init --no-fetch
85
+ aiocs --json doctor
86
+ aiocs --json init --no-fetch
88
87
  ```
89
88
 
90
89
  Local docs lookup:
91
90
 
92
91
  ```bash
93
- docs --json source list
94
- docs --json search "maker flow" --source hyperliquid --mode auto
95
- docs --json search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript --mode lexical
96
- docs --json show 42
92
+ aiocs --json source list
93
+ aiocs --json search "maker flow" --source hyperliquid --mode auto
94
+ aiocs --json search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript --mode lexical
95
+ aiocs --json show 42
97
96
  ```
98
97
 
99
98
  Missing or stale sources:
@@ -102,45 +101,24 @@ Missing or stale sources:
102
101
  # user-managed source specs live here
103
102
  ~/.aiocs/sources
104
103
 
105
- docs --json source upsert ~/.aiocs/sources/my-source.yaml
106
- docs --json refresh due my-source
104
+ aiocs --json source upsert ~/.aiocs/sources/my-source.yaml
105
+ aiocs --json refresh due my-source
107
106
  ```
108
107
 
109
108
  Drift, change, and completeness:
110
109
 
111
110
  ```bash
112
- docs --json canary hyperliquid
113
- docs --json diff hyperliquid
114
- docs --json verify coverage hyperliquid /absolute/path/to/reference.md
111
+ aiocs --json canary hyperliquid
112
+ aiocs --json diff hyperliquid
113
+ aiocs --json verify coverage hyperliquid /absolute/path/to/reference.md
115
114
  ```
116
115
 
117
- Research workspaces:
118
-
119
- ```bash
120
- docs --json workspace create market-structure --label "Market Structure" --auto-compile
121
- docs --json workspace bind market-structure hyperliquid nktkas-hyperliquid
122
- docs --json workspace compile market-structure
123
- docs --json workspace queue-run
124
- docs --json workspace search market-structure "transport design" --scope mixed
125
- docs --json workspace artifact show market-structure derived/index.md
126
- docs --json workspace lint market-structure
127
- docs --json workspace output market-structure report --name weekly-brief
128
- docs --json workspace answer market-structure note "What changed in websocket transport?" --name websocket-note
129
- docs --json workspace ingest add market-structure markdown-dir /absolute/path/to/notes --label "Research notes"
130
- docs --json workspace ingest add market-structure csv /absolute/path/to/fills.csv --label "Fills CSV"
131
- docs --json workspace ingest add market-structure json /absolute/path/to/manifest.json --label "Research manifest"
132
- docs --json workspace ingest add market-structure jsonl /absolute/path/to/events.jsonl --label "Events JSONL"
133
- docs --json workspace sync obsidian market-structure /absolute/path/to/vault
134
- ```
135
-
136
- If bound source snapshots have changed since the last compile, rerun `workspace compile` before `workspace output`. The output path now fails closed on stale derived artifacts instead of synthesizing reports from outdated summaries.
137
-
138
116
  Catalog maintenance:
139
117
 
140
118
  ```bash
141
- docs --json refresh due hyperliquid
142
- docs --json embeddings status
143
- docs --json backup export /absolute/path/to/backup
119
+ aiocs --json refresh due hyperliquid
120
+ aiocs --json embeddings status
121
+ aiocs --json backup export /absolute/path/to/backup
144
122
  ```
145
123
 
146
124
  ## MCP-first guidance
@@ -156,26 +134,8 @@ If a Codex agent has access to the `aiocs-mcp` server, prefer these MCP tools ov
156
134
  - `diff_snapshots`
157
135
  - `verify_coverage`
158
136
  - `embeddings_status`
159
- - `workspace_list`
160
- - `workspace_status`
161
- - `workspace_search`
162
- - `workspace_ingest_list`
163
- - `workspace_ingest_search`
164
- - `workspace_artifact_list`
165
- - `workspace_artifact_show`
166
- - `workspace_lint`
167
137
  - `batch`
168
138
 
169
- Use mutating tools such as `source_upsert`, `refresh_due`, `fetch`, `workspace_create`, `workspace_bind`, `workspace_compile`, and `workspace_output` only through the `aiocs-curation` workflow.
170
-
171
- ## LM Studio requirement for workspaces
172
-
173
- Workspace compilation and output generation use LM Studio in v1. Codex should assume:
174
-
175
- - provider: LM Studio
176
- - model: `google/gemma-4-26b-a4b`
177
- - default API endpoint: `ws://127.0.0.1:1234`
178
-
179
- If `doctor` reports the `lmstudio` check as `warn` or `fail`, Codex should not claim workspace compilation is available until LM Studio is running and the configured model is loaded.
139
+ Use mutating tools such as `source_upsert`, `refresh_due`, and `fetch` only through the `aiocs-curation` workflow.
180
140
 
181
141
  The CLI remains the fallback and should always be invoked with `--json` for agent use. For normal answering flows, avoid `fetch all`; use targeted due refresh or explicit user-approved force fetches.
@@ -54,26 +54,6 @@ All of these support the root-level `--json` flag:
54
54
  - `diff`
55
55
  - `project link`
56
56
  - `project unlink`
57
- - `workspace create`
58
- - `workspace configure`
59
- - `workspace list`
60
- - `workspace bind`
61
- - `workspace unbind`
62
- - `workspace compile`
63
- - `workspace queue-run`
64
- - `workspace status`
65
- - `workspace search`
66
- - `workspace ingest add`
67
- - `workspace ingest list`
68
- - `workspace ingest show`
69
- - `workspace ingest search`
70
- - `workspace ingest remove`
71
- - `workspace artifact list`
72
- - `workspace artifact show`
73
- - `workspace lint`
74
- - `workspace output`
75
- - `workspace answer`
76
- - `workspace sync obsidian`
77
57
  - `backup export`
78
58
  - `backup import`
79
59
  - `embeddings status`
@@ -151,7 +131,6 @@ Check ids are currently:
151
131
  - `source-spec-dirs`
152
132
  - `freshness`
153
133
  - `daemon-heartbeat`
154
- - `lmstudio`
155
134
  - `embedding-provider`
156
135
  - `vector-store`
157
136
  - `embeddings`
@@ -266,405 +245,6 @@ Summary status values:
266
245
  }
267
246
  ```
268
247
 
269
- ### Workspace commands
270
-
271
- Workspace commands manage derived wiki artifacts backed by canonical source snapshots and LM Studio compilation.
272
-
273
- #### `workspace.create`
274
-
275
- ```json
276
- {
277
- "workspace": {
278
- "id": "market-structure",
279
- "label": "Market Structure",
280
- "compilerProfile": {
281
- "provider": "lmstudio",
282
- "model": "google/gemma-4-26b-a4b",
283
- "temperature": 0.1,
284
- "topP": 0.9,
285
- "maxInputChars": 12000,
286
- "maxOutputTokens": 4096,
287
- "concurrency": 1
288
- },
289
- "defaultOutputFormats": ["report", "slides"]
290
- }
291
- }
292
- ```
293
-
294
- #### `workspace.list`
295
-
296
- ```json
297
- {
298
- "workspaces": [
299
- {
300
- "id": "market-structure",
301
- "label": "Market Structure",
302
- "bindingCount": 2,
303
- "artifactCount": 5,
304
- "lastCompileStatus": "success"
305
- }
306
- ]
307
- }
308
- ```
309
-
310
- #### `workspace.bind` and `workspace.unbind`
311
-
312
- ```json
313
- {
314
- "workspaceId": "market-structure",
315
- "sourceIds": ["hyperliquid", "nktkas-hyperliquid"]
316
- }
317
- ```
318
-
319
- #### `workspace.configure`
320
-
321
- ```json
322
- {
323
- "workspace": {
324
- "id": "market-structure",
325
- "label": "Market Structure",
326
- "autoCompileEnabled": true
327
- }
328
- }
329
- ```
330
-
331
- #### `workspace.compile`
332
-
333
- ```json
334
- {
335
- "workspaceId": "market-structure",
336
- "skipped": false,
337
- "sourceFingerprint": "sha256...",
338
- "changedSourceIds": ["hyperliquid"],
339
- "changedRawInputIds": [],
340
- "updatedArtifactPaths": [
341
- "derived/sources/hyperliquid/summary.md",
342
- "derived/concepts/hyperliquid.md",
343
- "derived/index.md"
344
- ],
345
- "artifactCount": 3,
346
- "compileRunId": "wrkcmp_..."
347
- }
348
- ```
349
-
350
- #### `workspace.queue-run`
351
-
352
- ```json
353
- {
354
- "processedJobs": 1,
355
- "succeededJobs": [
356
- {
357
- "workspaceId": "market-structure",
358
- "sourceFingerprint": "sha256...",
359
- "changedSourceIds": ["hyperliquid"],
360
- "changedRawInputIds": []
361
- }
362
- ],
363
- "failedJobs": []
364
- }
365
- ```
366
-
367
- #### `workspace.status`
368
-
369
- ```json
370
- {
371
- "workspace": {
372
- "id": "market-structure",
373
- "label": "Market Structure",
374
- "autoCompileEnabled": true
375
- },
376
- "bindings": [
377
- {
378
- "workspaceId": "market-structure",
379
- "sourceId": "hyperliquid",
380
- "createdAt": "2026-04-03T10:00:00.000Z"
381
- }
382
- ],
383
- "artifacts": [
384
- {
385
- "workspaceId": "market-structure",
386
- "path": "derived/index.md",
387
- "kind": "index",
388
- "stale": false,
389
- "chunkCount": 3
390
- }
391
- ],
392
- "compileJob": {
393
- "workspaceId": "market-structure",
394
- "status": "pending",
395
- "requestedSourceIds": ["hyperliquid"],
396
- "requestedRawInputIds": [],
397
- "requestedFingerprint": null
398
- },
399
- "rawInputs": [],
400
- "syncTargets": [],
401
- "questionRuns": [],
402
- "links": [],
403
- "graph": {
404
- "linkCount": 4,
405
- "brokenLinkCount": 0,
406
- "orphanArtifactCount": 0,
407
- "backlinkCount": 4,
408
- "relationCounts": {
409
- "explicit_link": 0,
410
- "derived_from": 1,
411
- "mentions": 1,
412
- "related_to": 2,
413
- "expands": 1,
414
- "index_entry": 2,
415
- "summary_of": 1,
416
- "concept_of": 1,
417
- "output_depends_on": 0
418
- },
419
- "mostLinkedArtifacts": [
420
- {
421
- "artifactPath": "derived/index.md",
422
- "incomingCount": 0,
423
- "outgoingCount": 2
424
- }
425
- ]
426
- },
427
- "lintSummary": {
428
- "status": "pass",
429
- "findingCount": 0,
430
- "staleArtifactCount": 0,
431
- "missingProvenanceCount": 0,
432
- "missingArtifactCount": 0,
433
- "brokenLinkCount": 0,
434
- "orphanArtifactCount": 0,
435
- "suggestedConceptCount": 0,
436
- "duplicateConceptCandidateCount": 0,
437
- "missingArticleCandidateCount": 0,
438
- "followUpQuestionCount": 0
439
- },
440
- "health": {
441
- "status": "healthy",
442
- "staleArtifactCount": 0,
443
- "pendingCompileJobs": 0,
444
- "failedCompileJobs": 0,
445
- "brokenLinkCount": 0,
446
- "orphanArtifactCount": 0,
447
- "rawInputCount": 0,
448
- "lintFindingCount": 0,
449
- "duplicateConceptCandidateCount": 0,
450
- "missingArticleCandidateCount": 0,
451
- "followUpQuestionCount": 0
452
- },
453
- "compileRuns": [
454
- {
455
- "id": "wrkcmp_...",
456
- "status": "success"
457
- }
458
- ]
459
- }
460
- ```
461
-
462
- #### `workspace.ingest.*`
463
-
464
- ```json
465
- {
466
- "workspaceId": "market-structure",
467
- "rawInput": {
468
- "id": "csv-fills-abc123def0",
469
- "workspaceId": "market-structure",
470
- "kind": "csv",
471
- "label": "Fills CSV",
472
- "sourcePath": "/absolute/path/to/fills.csv",
473
- "storagePath": "raw/csv-fills-abc123def0/fills.csv",
474
- "extractedTextPath": "raw/csv-fills-abc123def0/fills.csv.txt",
475
- "contentHash": "sha256...",
476
- "chunkCount": 12
477
- }
478
- }
479
- ```
480
-
481
- Raw-input search returns:
482
-
483
- ```json
484
- {
485
- "workspaceId": "market-structure",
486
- "query": "fee tier",
487
- "total": 1,
488
- "limit": 10,
489
- "offset": 0,
490
- "hasMore": false,
491
- "results": [
492
- {
493
- "rawInputId": "csv-fills-abc123def0",
494
- "kind": "csv",
495
- "label": "Fills CSV",
496
- "sectionTitle": "Fills CSV rows 1-2",
497
- "markdown": "...",
498
- "filePath": "fills.csv",
499
- "score": 0.42
500
- }
501
- ]
502
- }
503
- ```
504
-
505
- #### `workspace.search`
506
-
507
- ```json
508
- {
509
- "workspaceId": "market-structure",
510
- "query": "transport design",
511
- "scope": "mixed",
512
- "limit": 10,
513
- "offset": 0,
514
- "hasMore": false,
515
- "modeRequested": "auto",
516
- "modeUsed": "hybrid",
517
- "total": 2,
518
- "results": [
519
- {
520
- "kind": "source",
521
- "scope": "source",
522
- "chunkId": 42,
523
- "sourceId": "nktkas-hyperliquid",
524
- "snapshotId": "snp_...",
525
- "pageUrl": "file://src/transports/websocket.ts",
526
- "pageTitle": "src/transports/websocket.ts",
527
- "sectionTitle": "WebSocketTransport",
528
- "markdown": "...",
529
- "pageKind": "file",
530
- "filePath": "src/transports/websocket.ts",
531
- "language": "typescript",
532
- "score": 0.91,
533
- "signals": ["lexical", "vector"]
534
- },
535
- {
536
- "kind": "derived",
537
- "scope": "derived",
538
- "artifactPath": "derived/concepts/nktkas-hyperliquid.md",
539
- "artifactKind": "concept",
540
- "sectionTitle": "Transport design",
541
- "markdown": "...",
542
- "stale": false,
543
- "score": 0.74
544
- }
545
- ]
546
- }
547
- ```
548
-
549
- #### `workspace.artifact.list`
550
-
551
- ```json
552
- {
553
- "workspaceId": "market-structure",
554
- "artifacts": [
555
- {
556
- "workspaceId": "market-structure",
557
- "path": "derived/index.md",
558
- "kind": "index",
559
- "stale": false,
560
- "chunkCount": 3
561
- }
562
- ]
563
- }
564
- ```
565
-
566
- #### `workspace.artifact.show`
567
-
568
- ```json
569
- {
570
- "workspaceId": "market-structure",
571
- "artifact": {
572
- "workspaceId": "market-structure",
573
- "path": "derived/index.md",
574
- "kind": "index",
575
- "stale": false
576
- },
577
- "content": "# Workspace Index\n...",
578
- "provenance": [
579
- {
580
- "workspaceId": "market-structure",
581
- "path": "derived/index.md",
582
- "sourceId": "hyperliquid",
583
- "snapshotId": "snp_...",
584
- "chunkIds": [42, 43]
585
- }
586
- ],
587
- "rawInputProvenance": []
588
- }
589
- ```
590
-
591
- #### `workspace.lint`
592
-
593
- ```json
594
- {
595
- "workspaceId": "market-structure",
596
- "summary": {
597
- "status": "warn",
598
- "findingCount": 1,
599
- "staleArtifactCount": 1,
600
- "missingProvenanceCount": 0,
601
- "missingArtifactCount": 0,
602
- "brokenLinkCount": 0,
603
- "orphanArtifactCount": 0,
604
- "suggestedConceptCount": 0,
605
- "duplicateConceptCandidateCount": 1,
606
- "missingArticleCandidateCount": 1,
607
- "followUpQuestionCount": 2
608
- },
609
- "findings": [
610
- {
611
- "kind": "stale-artifact",
612
- "severity": "warn",
613
- "summary": "Artifact provenance points at an older snapshot.",
614
- "artifactPath": "derived/sources/hyperliquid/summary.md"
615
- },
616
- {
617
- "kind": "follow-up-question-suggestion",
618
- "severity": "warn",
619
- "summary": "What important workflows, caveats, or open questions remain unresolved for derived/concepts/hyperliquid.md?",
620
- "artifactPath": "derived/concepts/hyperliquid.md"
621
- }
622
- ],
623
- "suggestionsArtifactPath": "outputs/suggestions/lint.md"
624
- }
625
- ```
626
-
627
- #### `workspace.output`
628
-
629
- ```json
630
- {
631
- "workspaceId": "market-structure",
632
- "format": "report",
633
- "path": "outputs/reports/weekly-brief.md",
634
- "artifactCount": 8
635
- }
636
- ```
637
-
638
- #### `workspace.answer`
639
-
640
- ```json
641
- {
642
- "workspaceId": "market-structure",
643
- "format": "note",
644
- "path": "derived/notes/websocket-note.md",
645
- "artifactCount": 9,
646
- "questionRun": {
647
- "id": "wrkq_...",
648
- "workspaceId": "market-structure",
649
- "question": "What changed in websocket transport?",
650
- "format": "note",
651
- "artifactPath": "derived/notes/websocket-note.md",
652
- "status": "success"
653
- }
654
- }
655
- ```
656
-
657
- #### `workspace.sync.obsidian`
658
-
659
- ```json
660
- {
661
- "workspaceId": "market-structure",
662
- "vaultPath": "/absolute/path/to/vault",
663
- "targetPath": "/absolute/path/to/vault/aiocs/market-structure",
664
- "exportSubdir": "aiocs/market-structure"
665
- }
666
- ```
667
-
668
248
  ### `diff`
669
249
 
670
250
  ```json
@@ -890,7 +470,7 @@ Raw-input search returns:
890
470
 
891
471
  ## Daemon event stream
892
472
 
893
- `docs daemon --json` is intentionally different because the process is long-running. It emits newline-delimited JSON events to stdout rather than a single envelope.
473
+ `aiocs daemon --json` is intentionally different because the process is long-running. It emits newline-delimited JSON events to stdout rather than a single envelope.
894
474
 
895
475
  Current event types:
896
476
 
@@ -914,11 +494,6 @@ Current stable CLI error codes include:
914
494
 
915
495
  - `INVALID_ARGUMENT`
916
496
  - `SOURCE_NOT_FOUND`
917
- - `WORKSPACE_NOT_FOUND`
918
- - `WORKSPACE_ARTIFACT_NOT_FOUND`
919
- - `WORKSPACE_ARTIFACTS_STALE`
920
- - `WORKSPACE_COMPILER_CONFIG_INVALID`
921
- - `WORKSPACE_COMPILER_UNAVAILABLE`
922
497
  - `SNAPSHOT_NOT_FOUND`
923
498
  - `NO_PAGES_FETCHED`
924
499
  - `NO_PROJECT_SCOPE`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodhi-ventures/aiocs",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Local-only documentation store, fetcher, and search CLI for AI agents.",
@@ -33,7 +33,7 @@
33
33
  "skills"
34
34
  ],
35
35
  "bin": {
36
- "docs": "./dist/cli.js",
36
+ "aiocs": "./dist/cli.js",
37
37
  "aiocs-mcp": "./dist/mcp-server.js"
38
38
  },
39
39
  "engines": {
@@ -48,15 +48,12 @@
48
48
  "test:watch": "vitest"
49
49
  },
50
50
  "dependencies": {
51
- "@lmstudio/sdk": "1.5.0",
52
51
  "@modelcontextprotocol/sdk": "1.28.0",
53
52
  "@mozilla/readability": "0.6.0",
54
53
  "@qdrant/js-client-rest": "1.17.0",
55
54
  "better-sqlite3": "12.4.1",
56
55
  "commander": "14.0.1",
57
- "csv-parse": "6.2.1",
58
56
  "jsdom": "27.0.1",
59
- "pdf-parse": "2.4.5",
60
57
  "playwright": "1.57.0",
61
58
  "turndown": "7.2.1",
62
59
  "turndown-plugin-gfm": "1.0.2",