@bodhi-ventures/aiocs 0.1.2 → 0.3.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 +122 -3
- package/dist/chunk-GX6CZOO7.js +10429 -0
- package/dist/cli.js +352 -2
- package/dist/mcp-server.js +707 -4
- package/docs/README.md +1 -1
- package/docs/codex-integration.md +65 -18
- package/docs/json-contract.md +446 -3
- package/package.json +23 -20
- package/skills/aiocs/SKILL.md +46 -36
- package/skills/aiocs-curation/SKILL.md +145 -0
- package/sources/nktkas-hyperliquid.yaml +30 -0
- package/dist/chunk-CZ6C4YUX.js +0 -4601
- 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/superpowers/specs/2026-03-29-tag-driven-release-pipeline-design.md +0 -135
package/docs/README.md
CHANGED
|
@@ -26,6 +26,13 @@ docs --json doctor
|
|
|
26
26
|
docs --json init --no-fetch
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Register `aiocs-mcp` as a global Codex MCP server so the main agent can use it directly without shell fallback:
|
|
30
|
+
|
|
31
|
+
```toml
|
|
32
|
+
[mcp_servers.aiocs]
|
|
33
|
+
command = "aiocs-mcp"
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
## How Codex should use aiocs
|
|
30
37
|
|
|
31
38
|
1. Prefer `aiocs` before live browsing when the requested docs may already exist locally.
|
|
@@ -34,41 +41,41 @@ docs --json init --no-fetch
|
|
|
34
41
|
4. Check `source_list` before assuming a source is missing or stale.
|
|
35
42
|
5. Default to `search mode=auto`.
|
|
36
43
|
6. Use `mode=lexical` for exact identifiers, endpoint names, headings, and error strings.
|
|
37
|
-
7.
|
|
38
|
-
8. Use
|
|
39
|
-
9.
|
|
44
|
+
7. Use `pathPatterns` and `languages` filters when the source is a repo/code source and the question is file- or language-specific.
|
|
45
|
+
8. Use the `aiocs` skill for read/search flows and `aiocs-curation` only when the task requires source onboarding or refresh.
|
|
46
|
+
9. Prefer `refresh due <source-id>` over force `fetch <source-id>` when the source already exists.
|
|
47
|
+
10. Use MCP `batch` when multiple list/search/show or search/diff/coverage steps are needed.
|
|
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.
|
|
40
50
|
|
|
41
51
|
## Automatic use in Codex
|
|
42
52
|
|
|
43
|
-
Codex does not automatically invoke a custom subagent just because one exists. The primary automatic-use mechanism is the `aiocs` skill itself.
|
|
53
|
+
Codex does not automatically invoke a custom subagent just because one exists. The primary automatic-use mechanism is the `aiocs` MCP server plus the `aiocs` skill itself.
|
|
44
54
|
|
|
45
|
-
To make Codex discover
|
|
55
|
+
To make Codex discover the read/search path automatically, expose the skills in the global Codex skill directory:
|
|
46
56
|
|
|
47
57
|
```bash
|
|
48
58
|
AIOCS_REPO=/absolute/path/to/your/aiocs/checkout
|
|
49
59
|
mkdir -p ~/.codex/skills
|
|
50
60
|
ln -sfn "$AIOCS_REPO/skills/aiocs" ~/.codex/skills/aiocs
|
|
61
|
+
ln -sfn "$AIOCS_REPO/skills/aiocs-curation" ~/.codex/skills/aiocs-curation
|
|
51
62
|
```
|
|
52
63
|
|
|
53
|
-
Once
|
|
64
|
+
Once those symlinks exist, Codex can load `aiocs` for normal local-doc lookup and `aiocs-curation` only when the task needs source mutation or refresh.
|
|
54
65
|
|
|
55
66
|
## Subagent options
|
|
56
67
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- Repo-managed agent definition:
|
|
60
|
-
[`agents/aiocs-docs-specialist.toml`](../agents/aiocs-docs-specialist.toml)
|
|
61
|
-
- Install-ready global agent definition:
|
|
62
|
-
`ai-skills/agents/aiocs-docs-specialist.toml` from your local `ai-skills` checkout
|
|
68
|
+
The repo ships a ready-to-copy specialist definition at
|
|
69
|
+
[`agents/aiocs-docs-specialist.toml`](../agents/aiocs-docs-specialist.toml).
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
It points at the globally installed `aiocs-mcp` binary so Codex uses the published package by default.
|
|
65
72
|
|
|
66
|
-
To expose
|
|
73
|
+
To expose that agent to Codex:
|
|
67
74
|
|
|
68
75
|
```bash
|
|
69
|
-
|
|
76
|
+
AIOCS_REPO=/absolute/path/to/your/aiocs/checkout
|
|
70
77
|
mkdir -p ~/.codex/agents
|
|
71
|
-
ln -sfn "$
|
|
78
|
+
ln -sfn "$AIOCS_REPO/agents/aiocs-docs-specialist.toml" ~/.codex/agents/aiocs-docs-specialist.toml
|
|
72
79
|
```
|
|
73
80
|
|
|
74
81
|
## Suggested Codex flows
|
|
@@ -85,6 +92,7 @@ Local docs lookup:
|
|
|
85
92
|
```bash
|
|
86
93
|
docs --json source list
|
|
87
94
|
docs --json search "maker flow" --source hyperliquid --mode auto
|
|
95
|
+
docs --json search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript --mode lexical
|
|
88
96
|
docs --json show 42
|
|
89
97
|
```
|
|
90
98
|
|
|
@@ -106,6 +114,27 @@ docs --json diff hyperliquid
|
|
|
106
114
|
docs --json verify coverage hyperliquid /absolute/path/to/reference.md
|
|
107
115
|
```
|
|
108
116
|
|
|
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
|
+
|
|
109
138
|
Catalog maintenance:
|
|
110
139
|
|
|
111
140
|
```bash
|
|
@@ -121,14 +150,32 @@ If a Codex agent has access to the `aiocs-mcp` server, prefer these MCP tools ov
|
|
|
121
150
|
- `doctor`
|
|
122
151
|
- `init`
|
|
123
152
|
- `source_list`
|
|
124
|
-
- `source_upsert`
|
|
125
153
|
- `search`
|
|
126
154
|
- `show`
|
|
127
155
|
- `canary`
|
|
128
|
-
- `refresh_due`
|
|
129
156
|
- `diff_snapshots`
|
|
130
157
|
- `verify_coverage`
|
|
131
158
|
- `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`
|
|
132
167
|
- `batch`
|
|
133
168
|
|
|
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.
|
|
180
|
+
|
|
134
181
|
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.
|
package/docs/json-contract.md
CHANGED
|
@@ -54,6 +54,26 @@ 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`
|
|
57
77
|
- `backup export`
|
|
58
78
|
- `backup import`
|
|
59
79
|
- `embeddings status`
|
|
@@ -106,8 +126,8 @@ This section documents the stable top-level `data` payload per command.
|
|
|
106
126
|
{
|
|
107
127
|
"summary": {
|
|
108
128
|
"status": "healthy",
|
|
109
|
-
"checkCount":
|
|
110
|
-
"passCount":
|
|
129
|
+
"checkCount": 11,
|
|
130
|
+
"passCount": 11,
|
|
111
131
|
"warnCount": 0,
|
|
112
132
|
"failCount": 0
|
|
113
133
|
},
|
|
@@ -125,11 +145,13 @@ This section documents the stable top-level `data` payload per command.
|
|
|
125
145
|
Check ids are currently:
|
|
126
146
|
|
|
127
147
|
- `catalog`
|
|
148
|
+
- `git`
|
|
128
149
|
- `playwright`
|
|
129
150
|
- `daemon-config`
|
|
130
151
|
- `source-spec-dirs`
|
|
131
152
|
- `freshness`
|
|
132
153
|
- `daemon-heartbeat`
|
|
154
|
+
- `lmstudio`
|
|
133
155
|
- `embedding-provider`
|
|
134
156
|
- `vector-store`
|
|
135
157
|
- `embeddings`
|
|
@@ -158,9 +180,13 @@ Summary status values:
|
|
|
158
180
|
"sources": [
|
|
159
181
|
{
|
|
160
182
|
"id": "hyperliquid",
|
|
183
|
+
"kind": "web",
|
|
184
|
+
"specPath": "/absolute/path/to/spec.yaml",
|
|
161
185
|
"label": "Hyperliquid",
|
|
162
186
|
"nextDueAt": "2026-03-26T12:00:00.000Z",
|
|
187
|
+
"isDue": false,
|
|
163
188
|
"nextCanaryDueAt": "2026-03-26T06:00:00.000Z",
|
|
189
|
+
"isCanaryDue": false,
|
|
164
190
|
"lastCheckedAt": "2026-03-26T10:00:00.000Z",
|
|
165
191
|
"lastSuccessfulSnapshotAt": "2026-03-26T10:00:00.000Z",
|
|
166
192
|
"lastSuccessfulSnapshotId": "snp_...",
|
|
@@ -240,6 +266,405 @@ Summary status values:
|
|
|
240
266
|
}
|
|
241
267
|
```
|
|
242
268
|
|
|
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
|
+
|
|
243
668
|
### `diff`
|
|
244
669
|
|
|
245
670
|
```json
|
|
@@ -256,7 +681,10 @@ Summary status values:
|
|
|
256
681
|
"addedPages": [
|
|
257
682
|
{
|
|
258
683
|
"url": "https://example.dev/docs/new-page",
|
|
259
|
-
"title": "New page"
|
|
684
|
+
"title": "New page",
|
|
685
|
+
"pageKind": "document",
|
|
686
|
+
"filePath": null,
|
|
687
|
+
"language": null
|
|
260
688
|
}
|
|
261
689
|
],
|
|
262
690
|
"removedPages": [],
|
|
@@ -265,6 +693,9 @@ Summary status values:
|
|
|
265
693
|
"url": "https://example.dev/docs/start",
|
|
266
694
|
"beforeTitle": "Start",
|
|
267
695
|
"afterTitle": "Start",
|
|
696
|
+
"pageKind": "document",
|
|
697
|
+
"filePath": null,
|
|
698
|
+
"language": null,
|
|
268
699
|
"lineSummary": {
|
|
269
700
|
"addedLineCount": 3,
|
|
270
701
|
"removedLineCount": 2
|
|
@@ -293,6 +724,9 @@ Summary status values:
|
|
|
293
724
|
"pageUrl": "https://example.dev/docs/maker-flow",
|
|
294
725
|
"pageTitle": "Maker flow",
|
|
295
726
|
"sectionTitle": "Order lifecycle",
|
|
727
|
+
"pageKind": "document",
|
|
728
|
+
"filePath": null,
|
|
729
|
+
"language": null,
|
|
296
730
|
"markdown": "# Order lifecycle\n...",
|
|
297
731
|
"score": 0.036,
|
|
298
732
|
"signals": ["lexical", "vector"]
|
|
@@ -302,6 +736,7 @@ Summary status values:
|
|
|
302
736
|
```
|
|
303
737
|
|
|
304
738
|
`limit` defaults to `20`. `offset` defaults to `0`.
|
|
739
|
+
`pathPatterns` and `languages` narrow results for git/file sources and are also honored by MCP.
|
|
305
740
|
|
|
306
741
|
`modeRequested` is the requested search mode (`auto`, `lexical`, `hybrid`, `semantic`).
|
|
307
742
|
`modeUsed` is the actual executed mode after fallbacks. In `auto`, `aiocs` can degrade back to lexical if the vector layer is unavailable or incomplete for the requested scope.
|
|
@@ -445,6 +880,9 @@ Summary status values:
|
|
|
445
880
|
"pageUrl": "https://example.dev/docs/maker-flow",
|
|
446
881
|
"pageTitle": "Maker flow",
|
|
447
882
|
"sectionTitle": "Order lifecycle",
|
|
883
|
+
"pageKind": "document",
|
|
884
|
+
"filePath": null,
|
|
885
|
+
"language": null,
|
|
448
886
|
"markdown": "# Order lifecycle\n..."
|
|
449
887
|
}
|
|
450
888
|
}
|
|
@@ -476,6 +914,11 @@ Current stable CLI error codes include:
|
|
|
476
914
|
|
|
477
915
|
- `INVALID_ARGUMENT`
|
|
478
916
|
- `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`
|
|
479
922
|
- `SNAPSHOT_NOT_FOUND`
|
|
480
923
|
- `NO_PAGES_FETCHED`
|
|
481
924
|
- `NO_PROJECT_SCOPE`
|