wiki-graph 0.4.0 → 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.
- package/dist/cli.js +917 -578
- package/dist/cli.js.map +1 -1
- package/dist/data/help/commands/library-predicate.jinja +19 -19
- package/dist/data/help/commands/library.jinja +20 -15
- package/dist/data/help/commands/predicate.jinja +108 -98
- package/dist/data/help/commands/root.jinja +1 -1
- package/dist/data/help/commands/uri.jinja +46 -19
- package/dist/data/help/topics/config.jinja +27 -0
- package/dist/data/help/topics/library.jinja +19 -12
- package/dist/data/help/topics/readiness.jinja +71 -34
- package/dist/data/help/topics/recipe.jinja +11 -8
- package/dist/data/help/topics/uri.jinja +12 -3
- package/dist/gc-worker.js +109 -84
- package/dist/gc-worker.js.map +1 -1
- package/dist/index.cjs +2681 -1283
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3886 -2468
- package/dist/index.js.map +1 -1
- package/dist/queue-worker.js +571 -355
- package/dist/queue-worker.js.map +1 -1
- package/package.json +3 -3
- package/dist/cli.d.ts +0 -1
- package/dist/gc-worker.d.ts +0 -1
- package/dist/index.d.cts +0 -36
- package/dist/queue-worker.d.ts +0 -1
|
@@ -106,36 +106,36 @@ Usage:
|
|
|
106
106
|
{{ commandName }} {{ uri }} [--json]
|
|
107
107
|
|
|
108
108
|
Notes:
|
|
109
|
-
- The status tells whether the library index is current, dirty,
|
|
110
|
-
- Library-wide `--query` and
|
|
111
|
-
- Run `
|
|
112
|
-
{% elif target.kind == "scope" and target.objectUri == "wikg://index" and predicate == "
|
|
109
|
+
- The status tells whether the library index cache is current, dirty, or missing.
|
|
110
|
+
- Library-wide object `--query` and object scope enumeration require a current library index.
|
|
111
|
+
- Run `sync` when the status says the index cache needs to be built or rebuilt.
|
|
112
|
+
{% elif target.kind == "scope" and target.objectUri == "wikg://index" and predicate == "sync" %}
|
|
113
113
|
Purpose:
|
|
114
|
-
|
|
114
|
+
Sync this library's aggregate index cache.
|
|
115
115
|
|
|
116
116
|
Usage:
|
|
117
|
-
{{ commandName }} {{ uri }}
|
|
117
|
+
{{ commandName }} {{ uri }} sync [--jsonl]
|
|
118
118
|
|
|
119
119
|
Notes:
|
|
120
|
-
- This
|
|
120
|
+
- This rebuilds cache from chapter index artifacts already stored in registered present archives.
|
|
121
|
+
- It does not build missing artifacts and does not call an embeddings provider.
|
|
121
122
|
- Missing or unreadable library archive members are skipped and reported.
|
|
122
123
|
- Progress is emitted as text by default, or line-delimited events with `--jsonl`.
|
|
123
|
-
- `--json` is not supported for
|
|
124
|
+
- `--json` is not supported for sync because progress is streamed.
|
|
124
125
|
- Library indexes are local derived state under Wiki Graph staging, not files inside the library folder.
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
{% elif target.kind == "scope" and target.objectUri == "wikg://index" and predicate == "disable" %}
|
|
126
|
+
- Sync holds the library write lock; concurrent `arc scan`, `arc add`, `path set`, `clean`, archive `path set`, or archive `remove` commands for the same library cannot run at the same time.
|
|
127
|
+
{% elif target.kind == "scope" and target.objectUri == "wikg://index" and predicate == "clean" %}
|
|
128
128
|
Purpose:
|
|
129
|
-
|
|
129
|
+
Remove this library index cache.
|
|
130
130
|
|
|
131
131
|
Usage:
|
|
132
|
-
{{ commandName }} {{ uri }}
|
|
132
|
+
{{ commandName }} {{ uri }} clean [--json]
|
|
133
133
|
|
|
134
134
|
Notes:
|
|
135
135
|
- This does not delete the library registry, metadata, folder, or managed `.wikg` archives.
|
|
136
|
-
-
|
|
137
|
-
- Library
|
|
138
|
-
-
|
|
136
|
+
- It deletes only local derived cache under Wiki Graph staging.
|
|
137
|
+
- Library-wide object `--query` and object scope enumeration will fail until the index cache is synced again.
|
|
138
|
+
- Clean holds the library write lock and cannot run concurrently with membership changes or index sync for the same library.
|
|
139
139
|
{% elif target.kind == "scope" and predicate == "add" %}
|
|
140
140
|
Purpose:
|
|
141
141
|
Copy a `.wikg` archive into this library folder and register it as a managed archive member.
|
|
@@ -149,7 +149,7 @@ Notes:
|
|
|
149
149
|
- `--to` must be a relative `.wikg` path inside the library folder.
|
|
150
150
|
- Parent directories for `--to` are created as needed.
|
|
151
151
|
- Existing target files are not overwritten.
|
|
152
|
-
- Adding an archive
|
|
152
|
+
- Adding an archive can make an existing library index cache stale.
|
|
153
153
|
- The command holds the library write lock and cannot run concurrently with `arc scan`, library `path set`, archive path changes/removes, or index rebuild for the same library.
|
|
154
154
|
{% elif target.kind == "scope" and predicate == "scan" %}
|
|
155
155
|
Purpose:
|
|
@@ -162,7 +162,7 @@ Notes:
|
|
|
162
162
|
- Scan recursively discovers `.wikg` files in the bound library folder.
|
|
163
163
|
- Registered files that are no longer present remain visible as missing/stale instead of being deleted silently.
|
|
164
164
|
- When a moved archive can be matched by its stable mutation token, scan preserves its archive id and updates the relative path.
|
|
165
|
-
- Scan
|
|
165
|
+
- Scan can make an existing library index cache stale when membership changes.
|
|
166
166
|
- Scan holds the library write lock and cannot run concurrently with membership changes or index rebuild for the same library.
|
|
167
167
|
{% elif target.kind == "scope" and predicate == "get" %}
|
|
168
168
|
Purpose:
|
|
@@ -220,7 +220,7 @@ Notes:
|
|
|
220
220
|
- `--confirm` is required.
|
|
221
221
|
- If the registered file is already missing, the command can still clean the registry entry.
|
|
222
222
|
- This does not delete empty parent directories.
|
|
223
|
-
- Removing an archive
|
|
223
|
+
- Removing an archive can make an existing library index cache stale.
|
|
224
224
|
- Remove holds the library write lock and cannot run concurrently with library scan, add, path binding, archive path changes, or index rebuild for the same library.
|
|
225
225
|
{% elif target.kind == "metadata" and predicate == "set" %}
|
|
226
226
|
Purpose:
|
|
@@ -121,8 +121,9 @@ Predicate commands:
|
|
|
121
121
|
Library archive membership
|
|
122
122
|
|
|
123
123
|
Default behavior:
|
|
124
|
-
- `{{ commandName }} {{ uri }}` reads the
|
|
125
|
-
- The
|
|
124
|
+
- `{{ commandName }} {{ uri }}` reads the archive member page for this managed archive.
|
|
125
|
+
- The member page shows the member URI, readable label or relative path, status, and business entry URIs for `/chapter`, `/entity`, `/triple`, and `inspect`.
|
|
126
|
+
- Registry fields such as physical path, size, mtime, and mutation token are diagnostic metadata.
|
|
126
127
|
- `{{ commandName }} {{ uri }} inspect` checks readiness for this managed archive's contents, not the library registry.
|
|
127
128
|
- Add archive object suffixes such as `/chapter`, `/entity`, or `/triple` when you want to query the archive contents.
|
|
128
129
|
|
|
@@ -152,12 +153,12 @@ Use when:
|
|
|
152
153
|
|
|
153
154
|
Usage:
|
|
154
155
|
{{ commandName }} {{ uri }} [--json]
|
|
155
|
-
{{ commandName }} {{ uri }}
|
|
156
|
-
{{ commandName }} {{ uri }}
|
|
156
|
+
{{ commandName }} {{ uri }} sync [--jsonl]
|
|
157
|
+
{{ commandName }} {{ uri }} clean [--json]
|
|
157
158
|
|
|
158
159
|
Predicate commands:
|
|
159
|
-
-
|
|
160
|
-
-
|
|
160
|
+
- sync: rebuild this library index cache from registered present archives' artifacts. Help: {{ commandName }} {{ uri }} sync --help
|
|
161
|
+
- clean: remove this library index cache. Help: {{ commandName }} {{ uri }} clean --help
|
|
161
162
|
|
|
162
163
|
Related help:
|
|
163
164
|
- Library registry, membership, path binding, and aggregate index concepts: {{ commandName }} help library
|
|
@@ -165,11 +166,13 @@ Related help:
|
|
|
165
166
|
Library scope
|
|
166
167
|
|
|
167
168
|
Default behavior:
|
|
168
|
-
- `{{ commandName }} {{ uri }}` reads
|
|
169
|
+
- `{{ commandName }} {{ uri }}` reads the library-wide scope collection.
|
|
169
170
|
- Use `{{ commandName }} wikg://lib/registry` to list all library registries.
|
|
170
|
-
- `{{ commandName }} {{ uri }} --query <query>`
|
|
171
|
+
- `{{ commandName }} {{ uri }} --query <query>` searches library-wide objects through the library index.
|
|
172
|
+
- Query is strict by default; add `--skip-unindexed` only to intentionally search indexed chapters and ignore uncovered chapters.
|
|
171
173
|
- `{{ commandName }} {{ uri }}/arc scan` reconciles membership with `.wikg` files currently under the library folder.
|
|
172
|
-
- Library-wide object scopes such as `/entity` and `/triple` query one object type through the library index after it is
|
|
174
|
+
- Library-wide object scopes such as `/entity` and `/triple` query one object type through the library index after it is synced.
|
|
175
|
+
- Archive object search must use an explicit lens such as `/entity`, `/triple`, `/chapter`, or `/chunk`.
|
|
173
176
|
|
|
174
177
|
Use when:
|
|
175
178
|
- You need to manage a folder of `.wikg` archives as one library.
|
|
@@ -181,15 +184,16 @@ Use when:
|
|
|
181
184
|
{% endif %}
|
|
182
185
|
|
|
183
186
|
URI forms:
|
|
184
|
-
- `{{ commandName }} wikg://lib` addresses the default library.
|
|
185
|
-
- `{{ commandName }} wikg://lib/<lib-id>` addresses a non-default library.
|
|
187
|
+
- `{{ commandName }} wikg://lib` addresses the default library root scope.
|
|
188
|
+
- `{{ commandName }} wikg://lib/<lib-id>` addresses a non-default library root scope.
|
|
186
189
|
- `{{ commandName }} wikg://lib/arc/<archive-id>/` addresses one archive membership in the default library.
|
|
187
190
|
- `{{ commandName }} wikg://lib/<lib-id>/arc/<archive-id>/` addresses one archive membership in a non-default library.
|
|
188
191
|
|
|
189
192
|
Usage:
|
|
190
193
|
{% if target.isDefault %}
|
|
191
|
-
{{ commandName }} wikg://lib
|
|
192
|
-
{{ commandName }} wikg://lib --query <query>
|
|
194
|
+
{{ commandName }} wikg://lib [--json]
|
|
195
|
+
{{ commandName }} wikg://lib --query <query> [--limit <n>] [--cursor <cursor>] [--json]
|
|
196
|
+
{{ commandName }} wikg://lib --query <query> --skip-unindexed
|
|
193
197
|
{{ commandName }} wikg://lib/chapter --query <query>
|
|
194
198
|
{{ commandName }} wikg://lib/chunk --query <query>
|
|
195
199
|
{{ commandName }} wikg://lib/registry add --path <folder> [--json]
|
|
@@ -202,8 +206,9 @@ Usage:
|
|
|
202
206
|
{{ commandName }} wikg://lib/triple --query <query>
|
|
203
207
|
{{ commandName }} wikg://lib/meta [--json]
|
|
204
208
|
{% else %}
|
|
205
|
-
{{ commandName }} {{ uri }}
|
|
206
|
-
{{ commandName }} {{ uri }} --query <query>
|
|
209
|
+
{{ commandName }} {{ uri }} [--json]
|
|
210
|
+
{{ commandName }} {{ uri }} --query <query> [--limit <n>] [--cursor <cursor>] [--json]
|
|
211
|
+
{{ commandName }} {{ uri }} --query <query> --skip-unindexed
|
|
207
212
|
{{ commandName }} {{ uri }}/chapter --query <query>
|
|
208
213
|
{{ commandName }} {{ uri }}/chunk --query <query>
|
|
209
214
|
{{ commandName }} {{ uri }}/arc scan [--json|--jsonl]
|
|
@@ -14,12 +14,13 @@ Purpose:
|
|
|
14
14
|
Expand from the current chunk or entity object to nearby objects.
|
|
15
15
|
|
|
16
16
|
Usage:
|
|
17
|
-
{{ commandName }} {{ uri }} related [--query <query>] [--reverse] [--all] [--limit <n>] [--context <n>] [--cursor <token>] [--role <any|subject|object|self>] [--evidence [n]] [--json|--jsonl]
|
|
17
|
+
{{ commandName }} {{ uri }} related [--query <query>] [--skip-unindexed] [--reverse] [--all] [--limit <n>] [--context <n>] [--cursor <token>] [--role <any|subject|object|self>] [--evidence [n]] [--json|--jsonl]
|
|
18
18
|
|
|
19
19
|
Notes:
|
|
20
20
|
- Chunk targets return nearby Reading Graph chunks.
|
|
21
21
|
- Entity targets return Knowledge Graph triples involving the entity.
|
|
22
|
-
- `--query` filters and ranks related results with the current
|
|
22
|
+
- `--query` filters and ranks related results with the current search index.
|
|
23
|
+
- Add `--skip-unindexed` only with `--query` when you intentionally want to search indexed chapters and ignore uncovered chapters.
|
|
23
24
|
- Without `--query`, `--reverse` reads Document Flow order backward. See `{{ commandName }} help uri`.
|
|
24
25
|
- `--role` only applies to entity targets.
|
|
25
26
|
- Use `{{ commandName }} {{ uri }} evidence --help` when source grounding is the main goal.
|
|
@@ -28,11 +29,12 @@ Purpose:
|
|
|
28
29
|
Trace the current object back to source-backed evidence.
|
|
29
30
|
|
|
30
31
|
Usage:
|
|
31
|
-
{{ commandName }} {{ uri }} evidence [--query <query>] [--reverse] [--all] [--limit <n>] [--context <n>] [--
|
|
32
|
+
{{ commandName }} {{ uri }} evidence [--query <query>] [--skip-unindexed] [--reverse] [--all] [--limit <n>] [--context <n>] [--json|--jsonl]
|
|
32
33
|
|
|
33
34
|
Notes:
|
|
34
35
|
- Evidence is for grounding, verification, and citation support.
|
|
35
|
-
- `--query` filters and ranks evidence with the current
|
|
36
|
+
- `--query` filters and ranks evidence with the current search index.
|
|
37
|
+
- Add `--skip-unindexed` only with `--query` when you intentionally want to search indexed chapters and ignore uncovered chapters.
|
|
36
38
|
- Without `--query`, `--reverse` reads Document Flow order backward. See `{{ commandName }} help uri`.
|
|
37
39
|
- Evidence previews include nearby source context by default; use `--context 0` for exact cited ranges.
|
|
38
40
|
- Source and scope URIs are not evidence targets.
|
|
@@ -96,11 +98,32 @@ Usage:
|
|
|
96
98
|
|
|
97
99
|
Notes:
|
|
98
100
|
- Run this before broad Reading Graph, Reading Summary, or Knowledge Graph work.
|
|
99
|
-
- The report includes content counts,
|
|
101
|
+
- The report includes content counts, search index readiness, generation coverage, retrieval guidance, recommended next commands, planning estimates, and concurrency hints.
|
|
100
102
|
- Use `--json` for a machine-readable report with the same recommendations.
|
|
101
103
|
{% if libraryContext.isArchiveShortcut %}
|
|
102
104
|
- This library archive shortcut inspects one managed archive's readiness; it is not a library-level health report.
|
|
103
105
|
{% endif %}
|
|
106
|
+
{% elif predicate == "build" and target.name == "chapter-index-artifact" %}
|
|
107
|
+
Purpose:
|
|
108
|
+
Queue a job to build or replace this chapter index artifact.
|
|
109
|
+
|
|
110
|
+
Usage:
|
|
111
|
+
{{ commandName }} {{ uri }} build [--json]
|
|
112
|
+
|
|
113
|
+
Notes:
|
|
114
|
+
- This command enqueues work; it does not wait for the artifact to be built.
|
|
115
|
+
- A queued response means the artifact is not ready yet. Use the returned job id with `{{ commandName }} wikg://local/job/<job-id> watch` to follow progress.
|
|
116
|
+
{% if "/index/fts" in uri %}
|
|
117
|
+
- FTS artifacts are local compilation work and do not call a provider.
|
|
118
|
+
{% else %}
|
|
119
|
+
- Source and summary embedding artifacts require `wikg://local/config/embeddings` and may call the configured provider.
|
|
120
|
+
- Building an embedding artifact can immediately enqueue or run provider-backed work and may incur provider cost.
|
|
121
|
+
{% endif %}
|
|
122
|
+
- Direct artifact build is an explicit build request; it does not use `--accept-cost`.
|
|
123
|
+
{% if "/index/embedding/summary" in uri %}
|
|
124
|
+
- Summary embedding artifacts require an existing non-empty chapter summary.
|
|
125
|
+
{% endif %}
|
|
126
|
+
- After artifacts change, sync the archive or library index cache before library query; archive-level query can create a missing archive cache from current artifacts on first use.
|
|
104
127
|
{% elif predicate == "add" and target.name == "chapter-collection-scope" %}
|
|
105
128
|
Purpose:
|
|
106
129
|
Add a chapter to the archive.
|
|
@@ -115,13 +138,17 @@ Notes:
|
|
|
115
138
|
- Source input must not be empty when `--input` is used.
|
|
116
139
|
{% elif predicate == "add" and target.name == "job-collection-scope" %}
|
|
117
140
|
Purpose:
|
|
118
|
-
Add a local
|
|
141
|
+
Add a local build job.
|
|
119
142
|
|
|
120
143
|
Usage:
|
|
121
|
-
{{ commandName }} {{ uri }} add --input <archive-uri|chapter-uri> --task reading-graph|reading-summary|knowledge-graph --accept-cost [--depth <N>] [--boost] [--llm <json>] [--prompt <text>]
|
|
144
|
+
{{ commandName }} {{ uri }} add --input <archive-uri|chapter-uri> --task index-fts|index-embedding-source|index-embedding-summary|reading-graph|reading-summary|knowledge-graph [--accept-cost] [--depth <N>] [--boost] [--llm <json>] [--prompt <text>]
|
|
122
145
|
|
|
123
146
|
Notes:
|
|
124
|
-
-
|
|
147
|
+
- `index-fts` builds chapter FTS artifacts locally and does not require `--accept-cost`.
|
|
148
|
+
- `index-embedding-source` and `index-embedding-summary` build Dense artifacts with `wikg://local/config/embeddings` and require `--accept-cost`.
|
|
149
|
+
- Reading Graph, Reading Summary, and Knowledge Graph jobs may call an LLM provider and require `--accept-cost`.
|
|
150
|
+
- Reading Graph and Knowledge Graph jobs require a current FTS artifact for the chapter.
|
|
151
|
+
- Summary embedding jobs require an existing non-empty summary.
|
|
125
152
|
- Archive input adds jobs for all eligible chapters; chapter input expands to the chapter subtree by default.
|
|
126
153
|
- Use `--depth <N>` with archive or chapter input to limit affected chapters. For archive input, depth is measured from the archive's root chapters; for chapter input, it is measured from the specified chapter. `--depth 0` means only the relevant root chapters or specified chapter.
|
|
127
154
|
- `--llm <json>` stores a job-local LLM object; it does not update `wikg://local/config/llm`.
|
|
@@ -261,6 +288,23 @@ Notes:
|
|
|
261
288
|
- If current output shows `"apiKey":"****"`, passing the same masked value preserves the existing secret.
|
|
262
289
|
- To add or replace the secret, use `{{ commandName }} {{ uri }} put apiKey --secret`.
|
|
263
290
|
- To remove the secret, use `{{ commandName }} {{ uri }} delete apiKey`.
|
|
291
|
+
{% elif "/embeddings" in uri %}
|
|
292
|
+
Schema:
|
|
293
|
+
{
|
|
294
|
+
"provider": "openai|openai-compatible",
|
|
295
|
+
"model": "<embedding-model-name>",
|
|
296
|
+
"baseURL": "<url>",
|
|
297
|
+
"name": "<display-name>",
|
|
298
|
+
"dimensions": 1536
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
Notes:
|
|
302
|
+
- Allowed keys: provider, model, baseURL, name, dimensions, apiKey.
|
|
303
|
+
- `apiKey` is sensitive and cannot be set from JSON.
|
|
304
|
+
- If current output shows `"apiKey":"****"`, passing the same masked value preserves the existing secret.
|
|
305
|
+
- To add or replace the secret, use `{{ commandName }} {{ uri }} put apiKey --secret`.
|
|
306
|
+
- To remove the secret, use `{{ commandName }} {{ uri }} delete apiKey`.
|
|
307
|
+
- `dimensions` must be a positive integer and is sent only to providers/models that support dimension control.
|
|
264
308
|
{% elif "/wikispine" in uri %}
|
|
265
309
|
Schema:
|
|
266
310
|
{
|
|
@@ -287,6 +331,10 @@ Examples:
|
|
|
287
331
|
{{ commandName }} {{ uri }} set '{"provider":"openai","model":"gpt-4.1"}'
|
|
288
332
|
{{ commandName }} {{ uri }} set --json-input '{"provider":"openai-compatible","model":"model-name"}'
|
|
289
333
|
{{ commandName }} {{ uri }} set '{"provider":"google","model":"gemini-2.5-pro"}' --json
|
|
334
|
+
{% elif "/embeddings" in uri %}
|
|
335
|
+
{{ commandName }} {{ uri }} set '{"provider":"openai","model":"text-embedding-3-small"}'
|
|
336
|
+
{{ commandName }} {{ uri }} set --json-input '{"provider":"openai-compatible","model":"embedding-model","baseURL":"https://api.example.com/v1"}'
|
|
337
|
+
{{ commandName }} {{ uri }} put dimensions 1536
|
|
290
338
|
{% elif "/wikispine" in uri %}
|
|
291
339
|
{{ commandName }} {{ uri }} set '{"provider":"fetch"}'
|
|
292
340
|
{{ commandName }} {{ uri }} set '{"provider":"cli"}'
|
|
@@ -337,112 +385,50 @@ Notes:
|
|
|
337
385
|
Notes:
|
|
338
386
|
- This predicate is only available on URI targets that explicitly support clearing.
|
|
339
387
|
{% endif %}
|
|
340
|
-
{% elif predicate == "
|
|
341
|
-
{% if
|
|
388
|
+
{% elif predicate == "sync" and target.name == "index-object" %}
|
|
389
|
+
{% if libraryContext.isLibraryWide %}
|
|
342
390
|
Purpose:
|
|
343
|
-
|
|
391
|
+
Sync this library index cache from registered archives' chapter index artifacts.
|
|
344
392
|
|
|
345
393
|
Usage:
|
|
346
|
-
{{ commandName }} {{ uri }}
|
|
394
|
+
{{ commandName }} {{ uri }} sync [--jsonl]
|
|
347
395
|
|
|
348
396
|
Notes:
|
|
349
|
-
- This is a
|
|
397
|
+
- This is a cache rebuild from artifacts already stored inside member `.wikg` archives.
|
|
398
|
+
- It does not build missing chapter artifacts and does not call an embeddings provider.
|
|
350
399
|
- Missing or unreadable library archive members are skipped and reported.
|
|
351
400
|
- Progress is emitted as text by default, or line-delimited events with `--jsonl`.
|
|
352
|
-
- `--json` is not supported for
|
|
401
|
+
- `--json` is not supported for sync because progress is streamed.
|
|
353
402
|
- Library indexes are local derived state under Wiki Graph staging, not files inside the library folder.
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
{% else %}
|
|
357
|
-
Purpose:
|
|
358
|
-
Enable searchable FTS index support for this archive on this machine.
|
|
359
|
-
|
|
360
|
-
Usage:
|
|
361
|
-
{{ commandName }} {{ uri }} enable [--jsonl]
|
|
362
|
-
|
|
363
|
-
Notes:
|
|
364
|
-
- This initializes or repairs the local searchable index and may take time on large archives.
|
|
365
|
-
- After the index is enabled, CLI archive writes keep it synchronized automatically.
|
|
366
|
-
- Do not run this after every generation job; run it when `inspect` says query support is unavailable or the index needs repair.
|
|
367
|
-
- By default the index is stored as local cache outside the `.wikg` archive. Use `embed` when the index should travel with the archive.
|
|
368
|
-
- Enabling uses local CPU and disk only; it does not call an LLM provider.
|
|
369
|
-
- Text success output is a short status summary.
|
|
370
|
-
- With `--jsonl`, progress is emitted as line-delimited event records such as step/status/error records.
|
|
371
|
-
- After enable succeeds, `--query`, `related --query`, and `evidence --query` become available.
|
|
372
|
-
{% endif %}
|
|
373
|
-
{% elif predicate == "disable" %}
|
|
374
|
-
{% if target.name == "index-object" and libraryContext.isLibraryWide %}
|
|
375
|
-
Purpose:
|
|
376
|
-
Disable this library index and remove its current local materialization.
|
|
377
|
-
|
|
378
|
-
Usage:
|
|
379
|
-
{{ commandName }} {{ uri }} disable [--json]
|
|
380
|
-
|
|
381
|
-
Notes:
|
|
382
|
-
- This does not delete the library registry, metadata, folder, or managed `.wikg` archives.
|
|
383
|
-
- Library-wide `--query` and naked scope enumeration will fail until the index is enabled again.
|
|
384
|
-
- Library indexes do not support archive-style `embed` or `external` modes.
|
|
385
|
-
- Disable holds the library write lock and cannot run concurrently with membership changes or index rebuild for the same library.
|
|
386
|
-
{% else %}
|
|
387
|
-
Purpose:
|
|
388
|
-
Disable searchable FTS index support for this archive and remove the current index materialization.
|
|
389
|
-
|
|
390
|
-
Usage:
|
|
391
|
-
{{ commandName }} {{ uri }} disable [--json]
|
|
392
|
-
|
|
393
|
-
Notes:
|
|
394
|
-
- Disabling removes the current local or embedded index materialization.
|
|
395
|
-
- After disable succeeds, `--query`, `related --query`, and `evidence --query` are unavailable until `enable` or `embed` is run again.
|
|
396
|
-
- Use this when intentionally dropping index state, not as routine cleanup after generation.
|
|
397
|
-
{% endif %}
|
|
398
|
-
{% elif predicate == "embed" %}
|
|
399
|
-
{% if target.name == "index-object" and libraryContext.isLibraryWide %}
|
|
400
|
-
Purpose:
|
|
401
|
-
This library index does not support embedded archive index storage.
|
|
402
|
-
|
|
403
|
-
Usage:
|
|
404
|
-
{{ commandName }} {{ uri }} enable --help
|
|
405
|
-
|
|
406
|
-
Notes:
|
|
407
|
-
- Library indexes are local derived state under Wiki Graph staging.
|
|
408
|
-
- Use `enable` to build the library index or `disable` to remove it.
|
|
403
|
+
- Sync holds the library write lock; concurrent `arc scan`, `arc add`, `path set`, `clean`, archive `path set`, or archive `remove` commands for the same library cannot run at the same time.
|
|
404
|
+
- Library query requires a current library index cache.
|
|
409
405
|
{% else %}
|
|
410
406
|
Purpose:
|
|
411
|
-
|
|
407
|
+
Sync this archive index cache from chapter index artifacts.
|
|
412
408
|
|
|
413
409
|
Usage:
|
|
414
|
-
{{ commandName }} {{ uri }}
|
|
410
|
+
{{ commandName }} {{ uri }} sync [--jsonl] [--skip-unindexed]
|
|
415
411
|
|
|
416
412
|
Notes:
|
|
417
|
-
- This
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
-
|
|
413
|
+
- This initializes or repairs the local `index.db` cache outside the `.wikg` archive.
|
|
414
|
+
- It reads chapter index artifacts from the archive and does not call an embeddings provider.
|
|
415
|
+
- If required chapter artifacts are missing, sync reports that artifact readiness problem instead of building them.
|
|
416
|
+
- Add `--skip-unindexed` only when you intentionally want the cache to include indexed chapters and ignore uncovered chapters.
|
|
417
|
+
- Archive-level query can create a missing cache from current artifacts on first use, but explicit sync avoids the first-query delay.
|
|
418
|
+
- If query reports a missing or outdated cache, run this sync command before retrying.
|
|
419
|
+
- With `--jsonl`, progress is emitted as line-delimited event records.
|
|
421
420
|
{% endif %}
|
|
422
|
-
{% elif predicate == "
|
|
423
|
-
{% if target.name == "index-object" and libraryContext.isLibraryWide %}
|
|
424
|
-
Purpose:
|
|
425
|
-
This library index does not support archive externalization.
|
|
426
|
-
|
|
427
|
-
Usage:
|
|
428
|
-
{{ commandName }} {{ uri }} enable --help
|
|
429
|
-
|
|
430
|
-
Notes:
|
|
431
|
-
- Library indexes are already local derived state under Wiki Graph staging.
|
|
432
|
-
- Use `enable` to build the library index or `disable` to remove it.
|
|
433
|
-
{% else %}
|
|
421
|
+
{% elif predicate == "clean" and target.name == "index-object" %}
|
|
434
422
|
Purpose:
|
|
435
|
-
|
|
423
|
+
Delete this index cache.
|
|
436
424
|
|
|
437
425
|
Usage:
|
|
438
|
-
{{ commandName }} {{ uri }}
|
|
426
|
+
{{ commandName }} {{ uri }} clean [--json]
|
|
439
427
|
|
|
440
428
|
Notes:
|
|
441
|
-
- This
|
|
442
|
-
-
|
|
443
|
-
-
|
|
444
|
-
- Run `{{ commandName }} {{ uri }} enable` to build or repair local query support after switching to external storage.
|
|
445
|
-
{% endif %}
|
|
429
|
+
- This removes local `index.db` cache data only.
|
|
430
|
+
- It does not delete chapter index artifacts, Knowledge Graph, Reading Graph, Summary, source text, or library membership.
|
|
431
|
+
- Archive query can recreate an archive cache from artifacts when the selected scope supports lazy cache creation.
|
|
446
432
|
{% elif predicate == "clean" %}
|
|
447
433
|
Purpose:
|
|
448
434
|
Remove completed local generation jobs.
|
|
@@ -475,6 +461,11 @@ Purpose:
|
|
|
475
461
|
|
|
476
462
|
Usage:
|
|
477
463
|
{{ commandName }} {{ uri }} resume
|
|
464
|
+
|
|
465
|
+
Notes:
|
|
466
|
+
- Paused jobs move back to queued.
|
|
467
|
+
- Queued jobs are already resumable work; `resume` leaves them queued and asks the local worker to pick up the queue.
|
|
468
|
+
- Finished, failed, canceled, and canceling jobs cannot be resumed.
|
|
478
469
|
{% elif predicate == "cancel" %}
|
|
479
470
|
Purpose:
|
|
480
471
|
Cancel this local job.
|
|
@@ -522,6 +513,14 @@ Keys:
|
|
|
522
513
|
- baseURL: non-empty provider base URL string
|
|
523
514
|
- name: non-empty display name
|
|
524
515
|
- apiKey: secret; use `--secret`
|
|
516
|
+
{% elif "/embeddings" in uri %}
|
|
517
|
+
Keys:
|
|
518
|
+
- provider: openai or openai-compatible
|
|
519
|
+
- model: non-empty embedding model name
|
|
520
|
+
- baseURL: non-empty provider base URL string
|
|
521
|
+
- name: non-empty display name
|
|
522
|
+
- dimensions: positive integer; numeric strings are normalized to numbers
|
|
523
|
+
- apiKey: secret; use `--secret`
|
|
525
524
|
{% elif "/wikispine" in uri %}
|
|
526
525
|
Keys:
|
|
527
526
|
- provider: fetch or cli
|
|
@@ -535,14 +534,24 @@ Notes:
|
|
|
535
534
|
- Positional `<value>` is stored as a string.
|
|
536
535
|
- `--json-input` stores a JSON value and is useful for numeric config sections.
|
|
537
536
|
- `--json` controls output shape; it is not JSON input.
|
|
538
|
-
{% if "/llm" in uri %}
|
|
537
|
+
{% if "/llm" in uri or "/embeddings" in uri %}
|
|
539
538
|
- `--secret` reads the value from an interactive terminal without echoing it; use it for `apiKey`.
|
|
540
539
|
{% endif %}
|
|
541
540
|
- Success output is the full section JSON with sensitive values masked.
|
|
542
541
|
{% endif %}
|
|
543
542
|
{% endif %}
|
|
544
543
|
{% elif predicate == "delete" %}
|
|
545
|
-
{% if target.name == "
|
|
544
|
+
{% if target.name == "chapter-index-artifact" %}
|
|
545
|
+
Purpose:
|
|
546
|
+
Delete this chapter index artifact.
|
|
547
|
+
|
|
548
|
+
Usage:
|
|
549
|
+
{{ commandName }} {{ uri }} delete [--json]
|
|
550
|
+
|
|
551
|
+
Notes:
|
|
552
|
+
- This deletes the stored artifact from the `.wikg` archive.
|
|
553
|
+
- It does not clean external `index.db` cache by itself; sync or clean the archive/library index cache after deleting artifacts.
|
|
554
|
+
{% elif target.name == "metadata-object" %}
|
|
546
555
|
Purpose:
|
|
547
556
|
Delete one metadata key.
|
|
548
557
|
|
|
@@ -584,6 +593,7 @@ Notes:
|
|
|
584
593
|
- This does not contact an external service.
|
|
585
594
|
{% else %}
|
|
586
595
|
- For `llm`, this sends a small request to the configured model.
|
|
596
|
+
- For `embeddings`, this sends a small embedding request and reports the returned vector dimensions.
|
|
587
597
|
- For `wikispine`, this checks the built-in fetch service or local `wikispine` command.
|
|
588
598
|
{% endif %}
|
|
589
599
|
- Text success output is intentionally short.
|
|
@@ -598,7 +608,7 @@ Notes:
|
|
|
598
608
|
Library context:
|
|
599
609
|
- This predicate runs through a library URI, not a standalone `.wikg` locator.
|
|
600
610
|
{% if libraryContext.isLibraryWide %}
|
|
601
|
-
- Library-wide object predicates use the aggregate library index and may fail when that index is missing,
|
|
611
|
+
- Library-wide object predicates use the aggregate library index and may fail when that index is missing, stale, or not ready.
|
|
602
612
|
- Interpret results with the returned archive/member provenance; cite the specific returned evidence or member.
|
|
603
613
|
{% endif %}
|
|
604
614
|
{% if target.name == "chapter-collection-scope" or target.name == "chapter-scope" or target.name == "chapter-source-object" or target.name == "chapter-summary-object" or target.name == "chapter-title-object" or target.name == "chapter-tree-object" or target.name == "chapter-state-object" %}
|
|
@@ -619,7 +629,7 @@ Library context:
|
|
|
619
629
|
Related help:
|
|
620
630
|
- {{ commandName }} {{ uri }} --help
|
|
621
631
|
- {{ commandName }} help uri
|
|
622
|
-
{% if predicate == "related" or predicate == "evidence" or predicate == "pack" or
|
|
632
|
+
{% if predicate == "related" or predicate == "evidence" or predicate == "pack" or target.name == "index-object" or target.name == "chapter-index-artifact" or target.name == "job-collection-scope" %}
|
|
623
633
|
- {{ commandName }} help readiness
|
|
624
634
|
{% endif %}
|
|
625
635
|
{% if predicate == "create" or predicate == "export" %}
|
|
@@ -22,7 +22,7 @@ Knowledge-base contents:
|
|
|
22
22
|
- Reading Graph: attention chunks that preserve source-backed reading context.
|
|
23
23
|
- Summaries: compressed reading outputs for chapters or archive scopes.
|
|
24
24
|
- Source text: original chapter content and source ranges.
|
|
25
|
-
These structures are URI-addressed and can be retrieved
|
|
25
|
+
These structures are URI-addressed and can be retrieved through the search index.
|
|
26
26
|
|
|
27
27
|
Required first step for Agents:
|
|
28
28
|
If you receive an unfamiliar archive, inspect it before querying, generating, or editing:
|