wiki-graph 0.4.1 → 0.6.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 +1360 -1017
- package/dist/cli.js.map +1 -1
- package/dist/data/help/commands/library-predicate.jinja +19 -19
- package/dist/data/help/commands/library.jinja +8 -5
- package/dist/data/help/commands/maintenance/chapter/add.jinja +2 -2
- package/dist/data/help/commands/maintenance/chapter/set-source.jinja +3 -20
- package/dist/data/help/commands/maintenance/chapter.jinja +3 -2
- package/dist/data/help/commands/maintenance/upgrade.jinja +2 -2
- package/dist/data/help/commands/maintenance.jinja +1 -1
- package/dist/data/help/commands/predicate.jinja +143 -119
- package/dist/data/help/commands/root.jinja +4 -2
- package/dist/data/help/commands/shared/chapter-source-set.jinja +21 -0
- package/dist/data/help/commands/uri.jinja +89 -23
- package/dist/data/help/topics/config.jinja +27 -0
- package/dist/data/help/topics/file-import.jinja +49 -0
- package/dist/data/help/topics/format.jinja +6 -4
- package/dist/data/help/topics/library.jinja +11 -7
- package/dist/data/help/topics/readiness.jinja +73 -34
- package/dist/data/help/topics/recipe.jinja +15 -12
- package/dist/data/help/topics/runtime.jinja +1 -1
- package/dist/data/help/topics/source-locators.jinja +45 -0
- package/dist/data/help/topics/uri.jinja +19 -4
- package/dist/gc-worker.js +508 -253
- package/dist/gc-worker.js.map +1 -1
- package/dist/index.cjs +5232 -2809
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5153 -2731
- package/dist/index.js.map +1 -1
- package/dist/queue-worker.js +1856 -647
- package/dist/queue-worker.js.map +1 -1
- package/package.json +9 -8
- package/LICENSE +0 -201
- 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
|
@@ -4,7 +4,7 @@ Command: {{ commandName }} <uri> {{ predicate }}
|
|
|
4
4
|
URI Predicate Command
|
|
5
5
|
|
|
6
6
|
Target:
|
|
7
|
-
{{
|
|
7
|
+
{{ displayUri }}
|
|
8
8
|
|
|
9
9
|
Predicate:
|
|
10
10
|
{{ predicate }}
|
|
@@ -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,13 +29,15 @@ 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.
|
|
40
|
+
- To trace an evidence passage to an imported PDF or EPUB location, move its sentence fragment to `<chapter-uri>/source/locators#<range>`; read `{{ commandName }} help source-locators`.
|
|
38
41
|
- Source and scope URIs are not evidence targets.
|
|
39
42
|
{% elif predicate == "pack" %}
|
|
40
43
|
Purpose:
|
|
@@ -52,13 +55,15 @@ Purpose:
|
|
|
52
55
|
Create the archive at this URI.
|
|
53
56
|
|
|
54
57
|
Usage:
|
|
55
|
-
{{ commandName }} {{ uri }} create [--import <
|
|
58
|
+
{{ commandName }} {{ uri }} create [--import <source-file>] [--replace] [--json]
|
|
56
59
|
|
|
57
60
|
Notes:
|
|
58
61
|
- Without `--import`, create an empty `.wikg` archive.
|
|
59
|
-
- `--import <
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
+
- `--import <source-file>` creates the archive and imports the source file's metadata, structure, and source text.
|
|
63
|
+
- File import also records source provenance so normalized source text can be traced back to the imported file.
|
|
64
|
+
- The imported file itself is not embedded in the `.wikg` archive.
|
|
65
|
+
- `create` does not read stdin. Read `{{ commandName }} help file-import` for supported source files and import boundaries.
|
|
66
|
+
- File import runs only the import/source stage and does not call an LLM provider.
|
|
62
67
|
- Existing archives are not overwritten by default. Use `--replace` only when the target archive should be discarded and recreated.
|
|
63
68
|
- Parent directories must already exist.
|
|
64
69
|
- On success, text output is the archive object (`<archive>`). With `--json`, output is `{"uri":"..."}`.
|
|
@@ -96,11 +101,32 @@ Usage:
|
|
|
96
101
|
|
|
97
102
|
Notes:
|
|
98
103
|
- Run this before broad Reading Graph, Reading Summary, or Knowledge Graph work.
|
|
99
|
-
- The report includes content counts,
|
|
104
|
+
- The report includes content counts, search index readiness, generation coverage, retrieval guidance, recommended next commands, planning estimates, and concurrency hints.
|
|
100
105
|
- Use `--json` for a machine-readable report with the same recommendations.
|
|
101
106
|
{% if libraryContext.isArchiveShortcut %}
|
|
102
107
|
- This library archive shortcut inspects one managed archive's readiness; it is not a library-level health report.
|
|
103
108
|
{% endif %}
|
|
109
|
+
{% elif predicate == "build" and target.name == "chapter-index-artifact" %}
|
|
110
|
+
Purpose:
|
|
111
|
+
Queue a job to build or replace this chapter index artifact.
|
|
112
|
+
|
|
113
|
+
Usage:
|
|
114
|
+
{{ commandName }} {{ uri }} build [--json]
|
|
115
|
+
|
|
116
|
+
Notes:
|
|
117
|
+
- This command enqueues work; it does not wait for the artifact to be built.
|
|
118
|
+
- 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.
|
|
119
|
+
{% if "/index/fts" in uri %}
|
|
120
|
+
- FTS artifacts are local compilation work and do not call a provider.
|
|
121
|
+
{% else %}
|
|
122
|
+
- Source and summary embedding artifacts require `wikg://local/config/embeddings` and may call the configured provider.
|
|
123
|
+
- Building an embedding artifact can immediately enqueue or run provider-backed work and may incur provider cost.
|
|
124
|
+
{% endif %}
|
|
125
|
+
- Direct artifact build is an explicit build request; it does not use `--accept-cost`.
|
|
126
|
+
{% if "/index/embedding/summary" in uri %}
|
|
127
|
+
- Summary embedding artifacts require an existing non-empty chapter summary.
|
|
128
|
+
{% endif %}
|
|
129
|
+
- 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
130
|
{% elif predicate == "add" and target.name == "chapter-collection-scope" %}
|
|
105
131
|
Purpose:
|
|
106
132
|
Add a chapter to the archive.
|
|
@@ -110,19 +136,31 @@ Usage:
|
|
|
110
136
|
|
|
111
137
|
Notes:
|
|
112
138
|
- Without `--input`, creates an empty planned chapter placeholder.
|
|
113
|
-
- With `--input <path
|
|
114
|
-
|
|
115
|
-
-
|
|
139
|
+
- With `--input <path|->`, reads non-empty UTF-8 plain text, does not infer a
|
|
140
|
+
format from the file name, and creates the chapter in the `source` stage.
|
|
141
|
+
- This plain-text path does not create a source-text map or call an LLM
|
|
142
|
+
provider. Read `{{ commandName }} help file-import` for source locators.
|
|
143
|
+
- Chapter handles are opaque and are not derived from `--title`; reuse the
|
|
144
|
+
returned `locatedUri` for later commands.
|
|
145
|
+
|
|
146
|
+
Output:
|
|
147
|
+
- Text output includes `Chapter`, the archive-relative handle, and `Located URI`, the complete target for later commands.
|
|
148
|
+
- With `--json`, the same values are `uri` and `locatedUri`; reuse `locatedUri` for later commands.
|
|
116
149
|
{% elif predicate == "add" and target.name == "job-collection-scope" %}
|
|
117
150
|
Purpose:
|
|
118
|
-
Add a local
|
|
151
|
+
Add a local build job.
|
|
119
152
|
|
|
120
153
|
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>]
|
|
154
|
+
{{ 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
155
|
|
|
123
156
|
Notes:
|
|
124
|
-
-
|
|
157
|
+
- `index-fts` builds chapter FTS artifacts locally and does not require `--accept-cost`.
|
|
158
|
+
- `index-embedding-source` and `index-embedding-summary` build Dense artifacts with `wikg://local/config/embeddings` and require `--accept-cost`.
|
|
159
|
+
- Reading Graph, Reading Summary, and Knowledge Graph jobs may call an LLM provider and require `--accept-cost`.
|
|
160
|
+
- Reading Graph and Knowledge Graph jobs require a current FTS artifact for the chapter.
|
|
161
|
+
- Summary embedding jobs require an existing non-empty summary.
|
|
125
162
|
- Archive input adds jobs for all eligible chapters; chapter input expands to the chapter subtree by default.
|
|
163
|
+
- For archive-wide indexing, use `{{ commandName }} wikg://local/job --json` to inspect the jobs and re-run archive `inspect` to verify coverage.
|
|
126
164
|
- 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
165
|
- `--llm <json>` stores a job-local LLM object; it does not update `wikg://local/config/llm`.
|
|
128
166
|
{% elif predicate == "move" %}
|
|
@@ -166,9 +204,13 @@ Usage:
|
|
|
166
204
|
{{ commandName }} {{ uri }} reset --to planned|source|reading-graph [--json]
|
|
167
205
|
|
|
168
206
|
Notes:
|
|
169
|
-
- `planned` deletes source text, Reading Graph
|
|
170
|
-
|
|
171
|
-
- `
|
|
207
|
+
- `planned` deletes source text and provenance, Reading Graph, Knowledge Graph,
|
|
208
|
+
summary, and all chapter index artifacts.
|
|
209
|
+
- `source` keeps source text and provenance, and deletes Reading Graph,
|
|
210
|
+
Knowledge Graph, summary, and all chapter index artifacts.
|
|
211
|
+
- `reading-graph` keeps source text and provenance, Reading Graph, Knowledge
|
|
212
|
+
Graph, and the source embedding artifact. It deletes summary, FTS, and the
|
|
213
|
+
summary embedding artifact.
|
|
172
214
|
- `reading-summary` and `knowledge-graph` are not supported reset targets.
|
|
173
215
|
- Reset is destructive and may discard generated work.
|
|
174
216
|
{% elif predicate == "set" %}
|
|
@@ -184,16 +226,7 @@ Notes:
|
|
|
184
226
|
- Use `--input -` to read the tree JSON from stdin.
|
|
185
227
|
- This rewires chapter hierarchy and order; it does not rewrite chapter source text or generated graph content.
|
|
186
228
|
{% elif target.name == "chapter-source-object" %}
|
|
187
|
-
|
|
188
|
-
Replace this chapter source text.
|
|
189
|
-
|
|
190
|
-
Usage:
|
|
191
|
-
{{ commandName }} {{ uri }} set [text] [--input <path|->]
|
|
192
|
-
|
|
193
|
-
Notes:
|
|
194
|
-
- Source text is read from a positional value, `--input <path>`, or `--input -` for stdin.
|
|
195
|
-
- Source replacement invalidates later generated work for that chapter.
|
|
196
|
-
- Use `{{ commandName }} {{ uri }} --help` to inspect the source object before replacing it.
|
|
229
|
+
{% include "help/commands/shared/chapter-source-set.jinja" %}
|
|
197
230
|
{% elif target.name == "chapter-summary-object" %}
|
|
198
231
|
Purpose:
|
|
199
232
|
Replace this chapter summary text.
|
|
@@ -261,6 +294,23 @@ Notes:
|
|
|
261
294
|
- If current output shows `"apiKey":"****"`, passing the same masked value preserves the existing secret.
|
|
262
295
|
- To add or replace the secret, use `{{ commandName }} {{ uri }} put apiKey --secret`.
|
|
263
296
|
- To remove the secret, use `{{ commandName }} {{ uri }} delete apiKey`.
|
|
297
|
+
{% elif "/embeddings" in uri %}
|
|
298
|
+
Schema:
|
|
299
|
+
{
|
|
300
|
+
"provider": "openai|openai-compatible",
|
|
301
|
+
"model": "<embedding-model-name>",
|
|
302
|
+
"baseURL": "<url>",
|
|
303
|
+
"name": "<display-name>",
|
|
304
|
+
"dimensions": 1536
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
Notes:
|
|
308
|
+
- Allowed keys: provider, model, baseURL, name, dimensions, apiKey.
|
|
309
|
+
- `apiKey` is sensitive and cannot be set from JSON.
|
|
310
|
+
- If current output shows `"apiKey":"****"`, passing the same masked value preserves the existing secret.
|
|
311
|
+
- To add or replace the secret, use `{{ commandName }} {{ uri }} put apiKey --secret`.
|
|
312
|
+
- To remove the secret, use `{{ commandName }} {{ uri }} delete apiKey`.
|
|
313
|
+
- `dimensions` must be a positive integer and is sent only to providers/models that support dimension control.
|
|
264
314
|
{% elif "/wikispine" in uri %}
|
|
265
315
|
Schema:
|
|
266
316
|
{
|
|
@@ -287,6 +337,10 @@ Examples:
|
|
|
287
337
|
{{ commandName }} {{ uri }} set '{"provider":"openai","model":"gpt-4.1"}'
|
|
288
338
|
{{ commandName }} {{ uri }} set --json-input '{"provider":"openai-compatible","model":"model-name"}'
|
|
289
339
|
{{ commandName }} {{ uri }} set '{"provider":"google","model":"gemini-2.5-pro"}' --json
|
|
340
|
+
{% elif "/embeddings" in uri %}
|
|
341
|
+
{{ commandName }} {{ uri }} set '{"provider":"openai","model":"text-embedding-3-small"}'
|
|
342
|
+
{{ commandName }} {{ uri }} set --json-input '{"provider":"openai-compatible","model":"embedding-model","baseURL":"https://api.example.com/v1"}'
|
|
343
|
+
{{ commandName }} {{ uri }} put dimensions 1536
|
|
290
344
|
{% elif "/wikispine" in uri %}
|
|
291
345
|
{{ commandName }} {{ uri }} set '{"provider":"fetch"}'
|
|
292
346
|
{{ commandName }} {{ uri }} set '{"provider":"cli"}'
|
|
@@ -337,112 +391,50 @@ Notes:
|
|
|
337
391
|
Notes:
|
|
338
392
|
- This predicate is only available on URI targets that explicitly support clearing.
|
|
339
393
|
{% endif %}
|
|
340
|
-
{% elif predicate == "
|
|
341
|
-
{% if
|
|
394
|
+
{% elif predicate == "sync" and target.name == "index-object" %}
|
|
395
|
+
{% if libraryContext.isLibraryWide %}
|
|
342
396
|
Purpose:
|
|
343
|
-
|
|
397
|
+
Sync this library index cache from registered archives' chapter index artifacts.
|
|
344
398
|
|
|
345
399
|
Usage:
|
|
346
|
-
{{ commandName }} {{ uri }}
|
|
400
|
+
{{ commandName }} {{ uri }} sync [--jsonl]
|
|
347
401
|
|
|
348
402
|
Notes:
|
|
349
|
-
- This is a
|
|
403
|
+
- This is a cache rebuild from artifacts already stored inside member `.wikg` archives.
|
|
404
|
+
- It does not build missing chapter artifacts and does not call an embeddings provider.
|
|
350
405
|
- Missing or unreadable library archive members are skipped and reported.
|
|
351
406
|
- Progress is emitted as text by default, or line-delimited events with `--jsonl`.
|
|
352
|
-
- `--json` is not supported for
|
|
407
|
+
- `--json` is not supported for sync because progress is streamed.
|
|
353
408
|
- 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 object `--query` and object 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.
|
|
409
|
+
- 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.
|
|
410
|
+
- Library query requires a current library index cache.
|
|
409
411
|
{% else %}
|
|
410
412
|
Purpose:
|
|
411
|
-
|
|
413
|
+
Sync this archive index cache from chapter index artifacts.
|
|
412
414
|
|
|
413
415
|
Usage:
|
|
414
|
-
{{ commandName }} {{ uri }}
|
|
416
|
+
{{ commandName }} {{ uri }} sync [--jsonl] [--skip-unindexed]
|
|
415
417
|
|
|
416
418
|
Notes:
|
|
417
|
-
- This
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
-
|
|
419
|
+
- This initializes or repairs the local `index.db` cache outside the `.wikg` archive.
|
|
420
|
+
- It reads chapter index artifacts from the archive and does not call an embeddings provider.
|
|
421
|
+
- If required chapter artifacts are missing, sync reports that artifact readiness problem instead of building them.
|
|
422
|
+
- Add `--skip-unindexed` only when you intentionally want the cache to include indexed chapters and ignore uncovered chapters.
|
|
423
|
+
- Archive-level query can create a missing cache from current artifacts on first use, but explicit sync avoids the first-query delay.
|
|
424
|
+
- If query reports a missing or outdated cache, run this sync command before retrying.
|
|
425
|
+
- With `--jsonl`, progress is emitted as line-delimited event records.
|
|
421
426
|
{% 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 %}
|
|
427
|
+
{% elif predicate == "clean" and target.name == "index-object" %}
|
|
434
428
|
Purpose:
|
|
435
|
-
|
|
429
|
+
Delete this index cache.
|
|
436
430
|
|
|
437
431
|
Usage:
|
|
438
|
-
{{ commandName }} {{ uri }}
|
|
432
|
+
{{ commandName }} {{ uri }} clean [--json]
|
|
439
433
|
|
|
440
434
|
Notes:
|
|
441
|
-
- This
|
|
442
|
-
-
|
|
443
|
-
-
|
|
444
|
-
- Run `{{ commandName }} {{ uri }} enable` to build or repair local query support after switching to external storage.
|
|
445
|
-
{% endif %}
|
|
435
|
+
- This removes local `index.db` cache data only.
|
|
436
|
+
- It does not delete chapter index artifacts, Knowledge Graph, Reading Graph, Summary, source text, or library membership.
|
|
437
|
+
- Archive query can recreate an archive cache from artifacts when the selected scope supports lazy cache creation.
|
|
446
438
|
{% elif predicate == "clean" %}
|
|
447
439
|
Purpose:
|
|
448
440
|
Remove completed local generation jobs.
|
|
@@ -475,6 +467,11 @@ Purpose:
|
|
|
475
467
|
|
|
476
468
|
Usage:
|
|
477
469
|
{{ commandName }} {{ uri }} resume
|
|
470
|
+
|
|
471
|
+
Notes:
|
|
472
|
+
- Paused jobs move back to queued.
|
|
473
|
+
- Queued jobs are already resumable work; `resume` leaves them queued and asks the local worker to pick up the queue.
|
|
474
|
+
- Finished, failed, canceled, and canceling jobs cannot be resumed.
|
|
478
475
|
{% elif predicate == "cancel" %}
|
|
479
476
|
Purpose:
|
|
480
477
|
Cancel this local job.
|
|
@@ -522,6 +519,14 @@ Keys:
|
|
|
522
519
|
- baseURL: non-empty provider base URL string
|
|
523
520
|
- name: non-empty display name
|
|
524
521
|
- apiKey: secret; use `--secret`
|
|
522
|
+
{% elif "/embeddings" in uri %}
|
|
523
|
+
Keys:
|
|
524
|
+
- provider: openai or openai-compatible
|
|
525
|
+
- model: non-empty embedding model name
|
|
526
|
+
- baseURL: non-empty provider base URL string
|
|
527
|
+
- name: non-empty display name
|
|
528
|
+
- dimensions: positive integer; numeric strings are normalized to numbers
|
|
529
|
+
- apiKey: secret; use `--secret`
|
|
525
530
|
{% elif "/wikispine" in uri %}
|
|
526
531
|
Keys:
|
|
527
532
|
- provider: fetch or cli
|
|
@@ -535,14 +540,24 @@ Notes:
|
|
|
535
540
|
- Positional `<value>` is stored as a string.
|
|
536
541
|
- `--json-input` stores a JSON value and is useful for numeric config sections.
|
|
537
542
|
- `--json` controls output shape; it is not JSON input.
|
|
538
|
-
{% if "/llm" in uri %}
|
|
543
|
+
{% if "/llm" in uri or "/embeddings" in uri %}
|
|
539
544
|
- `--secret` reads the value from an interactive terminal without echoing it; use it for `apiKey`.
|
|
540
545
|
{% endif %}
|
|
541
546
|
- Success output is the full section JSON with sensitive values masked.
|
|
542
547
|
{% endif %}
|
|
543
548
|
{% endif %}
|
|
544
549
|
{% elif predicate == "delete" %}
|
|
545
|
-
{% if target.name == "
|
|
550
|
+
{% if target.name == "chapter-index-artifact" %}
|
|
551
|
+
Purpose:
|
|
552
|
+
Delete this chapter index artifact.
|
|
553
|
+
|
|
554
|
+
Usage:
|
|
555
|
+
{{ commandName }} {{ uri }} delete [--json]
|
|
556
|
+
|
|
557
|
+
Notes:
|
|
558
|
+
- This deletes the stored artifact from the `.wikg` archive.
|
|
559
|
+
- It does not clean external `index.db` cache by itself; sync or clean the archive/library index cache after deleting artifacts.
|
|
560
|
+
{% elif target.name == "metadata-object" %}
|
|
546
561
|
Purpose:
|
|
547
562
|
Delete one metadata key.
|
|
548
563
|
|
|
@@ -584,6 +599,7 @@ Notes:
|
|
|
584
599
|
- This does not contact an external service.
|
|
585
600
|
{% else %}
|
|
586
601
|
- For `llm`, this sends a small request to the configured model.
|
|
602
|
+
- For `embeddings`, this sends a small embedding request and reports the returned vector dimensions.
|
|
587
603
|
- For `wikispine`, this checks the built-in fetch service or local `wikispine` command.
|
|
588
604
|
{% endif %}
|
|
589
605
|
- Text success output is intentionally short.
|
|
@@ -598,7 +614,7 @@ Notes:
|
|
|
598
614
|
Library context:
|
|
599
615
|
- This predicate runs through a library URI, not a standalone `.wikg` locator.
|
|
600
616
|
{% if libraryContext.isLibraryWide %}
|
|
601
|
-
- Library-wide object predicates use the aggregate library index and may fail when that index is missing,
|
|
617
|
+
- Library-wide object predicates use the aggregate library index and may fail when that index is missing, stale, or not ready.
|
|
602
618
|
- Interpret results with the returned archive/member provenance; cite the specific returned evidence or member.
|
|
603
619
|
{% endif %}
|
|
604
620
|
{% 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,12 +635,20 @@ Library context:
|
|
|
619
635
|
Related help:
|
|
620
636
|
- {{ commandName }} {{ uri }} --help
|
|
621
637
|
- {{ commandName }} help uri
|
|
622
|
-
{% if
|
|
638
|
+
{% if target.name == "chapter-source-object" and predicate == "set" %}
|
|
639
|
+
- {{ commandName }} <chapter-uri>/state --help
|
|
640
|
+
- {{ commandName }} <chapter-uri> reset --help
|
|
641
|
+
- {{ commandName }} help file-import
|
|
642
|
+
{% endif %}
|
|
643
|
+
{% 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
644
|
- {{ commandName }} help readiness
|
|
624
645
|
{% endif %}
|
|
625
646
|
{% if predicate == "create" or predicate == "export" %}
|
|
626
647
|
- {{ commandName }} help format
|
|
627
648
|
{% endif %}
|
|
649
|
+
{% if predicate == "create" %}
|
|
650
|
+
- {{ commandName }} help file-import
|
|
651
|
+
{% endif %}
|
|
628
652
|
{% if target.name == "job-collection-scope" or target.name == "job-object" or target.name == "job-target-object" %}
|
|
629
653
|
- {{ commandName }} help runtime
|
|
630
654
|
{% endif %}
|
|
@@ -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:
|
|
@@ -82,9 +82,11 @@ Library entry point:
|
|
|
82
82
|
|
|
83
83
|
Help topics:
|
|
84
84
|
{% for topic in helpTopics %}
|
|
85
|
+
{% if topic.rootVisible is not defined or topic.rootVisible %}
|
|
85
86
|
- {{ commandName }} help {{ topic.name }}
|
|
86
87
|
{{ topic.summary }}
|
|
88
|
+
{% endif %}
|
|
87
89
|
{% endfor %}
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
Built-in formats:
|
|
90
92
|
{{ formats | join(", ") }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Purpose:
|
|
2
|
+
Fill a planned chapter with its complete source text.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
{{ commandName }} {{ uri }} set (<text>|--input <path|->) [--input-format jsonl] [--json]
|
|
6
|
+
|
|
7
|
+
Input:
|
|
8
|
+
- Supply exactly one positional value or `--input`; files and stdin are UTF-8 plain text unless `--input-format jsonl` is set. File extensions are not inferred.
|
|
9
|
+
- Source input must not be empty.
|
|
10
|
+
- Plain text writes source without a source-text map.
|
|
11
|
+
- `--input-format jsonl` writes source and provenance supplied by an external extractor. Read `{{ commandName }} help file-import` for the record contract.
|
|
12
|
+
|
|
13
|
+
Preconditions:
|
|
14
|
+
- The chapter must be `planned`.
|
|
15
|
+
- Read the chapter state and reset help before discarding data from a later-stage chapter.
|
|
16
|
+
|
|
17
|
+
Behavior:
|
|
18
|
+
- Initializes source for a planned chapter; it does not replace source on a later-stage chapter.
|
|
19
|
+
- Writes the complete source text and moves the chapter to `source`.
|
|
20
|
+
- Does not generate Reading Graph data or a summary, and does not call an LLM provider.
|
|
21
|
+
- With `--json`, prints the updated chapter status as one JSON object. `sourceUnits` is the number of stored source processing fragments, not the number of sentences.
|