wiki-graph-core 0.4.0 → 0.4.1
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/data/help/commands/library-predicate.jinja +2 -2
- package/data/help/commands/library.jinja +12 -10
- package/data/help/commands/predicate.jinja +1 -1
- package/data/help/topics/library.jinja +8 -5
- package/data/help/topics/uri.jinja +2 -0
- package/dist/gc.cjs.map +1 -1
- package/dist/index.cjs +114 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/library/index.d.ts +2 -2
- package/dist/library/membership.js +18 -5
- package/dist/library/membership.js.map +1 -1
- package/dist/library/query.d.ts +4 -2
- package/dist/library/query.js +44 -0
- package/dist/library/query.js.map +1 -1
- package/dist/library/registry.d.ts +2 -1
- package/dist/library/registry.js +10 -0
- package/dist/library/registry.js.map +1 -1
- package/dist/maintenance/upgrade.js +15 -19
- package/dist/maintenance/upgrade.js.map +1 -1
- package/dist/retrieval/query/archive-view/helper/sort.js +1 -1
- package/dist/retrieval/query/archive-view/helper/sort.js.map +1 -1
- package/dist/storage/schema-upgrade/index.d.ts +7 -2
- package/dist/storage/schema-upgrade/index.js +26 -14
- package/dist/storage/schema-upgrade/index.js.map +1 -1
- package/dist/worker.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -107,7 +107,7 @@ Usage:
|
|
|
107
107
|
|
|
108
108
|
Notes:
|
|
109
109
|
- The status tells whether the library index is current, dirty, missing, or disabled.
|
|
110
|
-
- Library-wide `--query` and
|
|
110
|
+
- Library-wide object `--query` and object scope enumeration require a current library index.
|
|
111
111
|
- Run `enable` when the status says the index needs to be built or rebuilt.
|
|
112
112
|
{% elif target.kind == "scope" and target.objectUri == "wikg://index" and predicate == "enable" %}
|
|
113
113
|
Purpose:
|
|
@@ -133,7 +133,7 @@ Usage:
|
|
|
133
133
|
|
|
134
134
|
Notes:
|
|
135
135
|
- This does not delete the library registry, metadata, folder, or managed `.wikg` archives.
|
|
136
|
-
- Library-wide `--query` and
|
|
136
|
+
- Library-wide object `--query` and object scope enumeration will fail until the index is enabled again.
|
|
137
137
|
- Library indexes do not support archive-style `embed` or `external` modes.
|
|
138
138
|
- Disable holds the library write lock and cannot run concurrently with membership changes or index rebuild for the same library.
|
|
139
139
|
{% elif target.kind == "scope" and predicate == "add" %}
|
|
@@ -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
|
|
|
@@ -165,11 +166,12 @@ 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.
|
|
171
172
|
- `{{ commandName }} {{ uri }}/arc scan` reconciles membership with `.wikg` files currently under the library folder.
|
|
172
173
|
- Library-wide object scopes such as `/entity` and `/triple` query one object type through the library index after it is enabled.
|
|
174
|
+
- Archive object search must use an explicit lens such as `/entity`, `/triple`, `/chapter`, or `/chunk`.
|
|
173
175
|
|
|
174
176
|
Use when:
|
|
175
177
|
- You need to manage a folder of `.wikg` archives as one library.
|
|
@@ -181,15 +183,15 @@ Use when:
|
|
|
181
183
|
{% endif %}
|
|
182
184
|
|
|
183
185
|
URI forms:
|
|
184
|
-
- `{{ commandName }} wikg://lib` addresses the default library.
|
|
185
|
-
- `{{ commandName }} wikg://lib/<lib-id>` addresses a non-default library.
|
|
186
|
+
- `{{ commandName }} wikg://lib` addresses the default library root scope.
|
|
187
|
+
- `{{ commandName }} wikg://lib/<lib-id>` addresses a non-default library root scope.
|
|
186
188
|
- `{{ commandName }} wikg://lib/arc/<archive-id>/` addresses one archive membership in the default library.
|
|
187
189
|
- `{{ commandName }} wikg://lib/<lib-id>/arc/<archive-id>/` addresses one archive membership in a non-default library.
|
|
188
190
|
|
|
189
191
|
Usage:
|
|
190
192
|
{% if target.isDefault %}
|
|
191
|
-
{{ commandName }} wikg://lib
|
|
192
|
-
{{ commandName }} wikg://lib --query <query>
|
|
193
|
+
{{ commandName }} wikg://lib [--json]
|
|
194
|
+
{{ commandName }} wikg://lib --query <query> [--limit <n>] [--cursor <cursor>] [--json]
|
|
193
195
|
{{ commandName }} wikg://lib/chapter --query <query>
|
|
194
196
|
{{ commandName }} wikg://lib/chunk --query <query>
|
|
195
197
|
{{ commandName }} wikg://lib/registry add --path <folder> [--json]
|
|
@@ -202,8 +204,8 @@ Usage:
|
|
|
202
204
|
{{ commandName }} wikg://lib/triple --query <query>
|
|
203
205
|
{{ commandName }} wikg://lib/meta [--json]
|
|
204
206
|
{% else %}
|
|
205
|
-
{{ commandName }} {{ uri }}
|
|
206
|
-
{{ commandName }} {{ uri }} --query <query>
|
|
207
|
+
{{ commandName }} {{ uri }} [--json]
|
|
208
|
+
{{ commandName }} {{ uri }} --query <query> [--limit <n>] [--cursor <cursor>] [--json]
|
|
207
209
|
{{ commandName }} {{ uri }}/chapter --query <query>
|
|
208
210
|
{{ commandName }} {{ uri }}/chunk --query <query>
|
|
209
211
|
{{ commandName }} {{ uri }}/arc scan [--json|--jsonl]
|
|
@@ -380,7 +380,7 @@ Usage:
|
|
|
380
380
|
|
|
381
381
|
Notes:
|
|
382
382
|
- This does not delete the library registry, metadata, folder, or managed `.wikg` archives.
|
|
383
|
-
- Library-wide `--query` and
|
|
383
|
+
- Library-wide object `--query` and object scope enumeration will fail until the index is enabled again.
|
|
384
384
|
- Library indexes do not support archive-style `embed` or `external` modes.
|
|
385
385
|
- Disable holds the library write lock and cannot run concurrently with membership changes or index rebuild for the same library.
|
|
386
386
|
{% else %}
|
|
@@ -12,7 +12,8 @@ Core model:
|
|
|
12
12
|
- The default library is addressed as `wikg://lib`.
|
|
13
13
|
- A non-default library is addressed as `wikg://lib/<lib-id>`.
|
|
14
14
|
- The `arc` reserved segment keeps library ids distinct from archive member ids.
|
|
15
|
-
- `{{ commandName }} wikg://lib` reads the default library scope
|
|
15
|
+
- `{{ commandName }} wikg://lib` reads the default library root scope.
|
|
16
|
+
- `{{ commandName }} wikg://lib --query <query>` searches library-wide objects through the library index.
|
|
16
17
|
|
|
17
18
|
Registry discovery:
|
|
18
19
|
- `{{ commandName }} wikg://lib/registry add --path <folder>` prints the new non-default library URI.
|
|
@@ -30,15 +31,16 @@ Library folders:
|
|
|
30
31
|
Archive memberships:
|
|
31
32
|
- `{{ commandName }} wikg://lib/arc scan` recursively discovers `.wikg` files under the default library folder and reconciles registry state.
|
|
32
33
|
- `{{ commandName }} wikg://lib/arc add --input <path> [--to <relative-wikg-path>]` copies one `.wikg` file into the default library folder and registers it.
|
|
33
|
-
- `{{ commandName }} wikg://lib/arc
|
|
34
|
+
- `{{ commandName }} wikg://lib` and `{{ commandName }} wikg://lib/arc` separate the library root scope from archive membership management; use `{{ commandName }} wikg://lib/arc/tree` when you want a file tree visualization.
|
|
34
35
|
- For a non-default library, replace `wikg://lib` with `wikg://lib/<lib-id>` in those `arc` commands.
|
|
35
36
|
- `{{ commandName }} <library-archive-uri>/path set <relative-wikg-path>` moves or renames one managed archive inside the same folder.
|
|
36
37
|
- `{{ commandName }} <library-archive-uri> remove --confirm` deletes one managed archive file and unregisters it.
|
|
37
38
|
- Missing registered files remain visible as missing or stale until `arc scan`, archive `path set`, archive `remove`, or library `path set` resolves them.
|
|
38
39
|
|
|
39
40
|
Library archive shortcuts:
|
|
40
|
-
- `wikg://lib/arc/<archive-id>/` addresses one archive
|
|
41
|
-
- `wikg://lib/<lib-id>/arc/<archive-id>/` addresses one archive
|
|
41
|
+
- `wikg://lib/arc/<archive-id>/` addresses one archive member page in the default library.
|
|
42
|
+
- `wikg://lib/<lib-id>/arc/<archive-id>/` addresses one archive member page in a non-default library.
|
|
43
|
+
- The archive member page exposes the managed archive's business entry URIs (`/chapter`, `/entity`, `/triple`, and `inspect`) and keeps registry fields as diagnostic metadata.
|
|
42
44
|
- Add normal archive object suffixes after the trailing slash to query that archive's contents:
|
|
43
45
|
{{ commandName }} wikg://lib/arc/<archive-id>/chapter
|
|
44
46
|
{{ commandName }} wikg://lib/arc/<archive-id>/entity --query "term"
|
|
@@ -48,6 +50,7 @@ Library archive shortcuts:
|
|
|
48
50
|
- `{{ commandName }} <library-archive-uri>/entity --help` explains the archive object scope reached through that library shortcut.
|
|
49
51
|
|
|
50
52
|
Library-wide query:
|
|
53
|
+
- `{{ commandName }} wikg://lib --query <archive-term>` searches library-wide objects through the library index.
|
|
51
54
|
- `{{ commandName }} wikg://lib/entity --query <query>` searches across present archive members through the library index.
|
|
52
55
|
- `{{ commandName }} wikg://lib/triple --query <query>` searches library-wide Knowledge Graph triples.
|
|
53
56
|
- `{{ commandName }} wikg://lib/chunk --query <query>` searches library-wide Reading Graph chunks.
|
|
@@ -68,7 +71,7 @@ Library index lifecycle:
|
|
|
68
71
|
Concurrency:
|
|
69
72
|
- Library registry and membership writes hold the library write lock.
|
|
70
73
|
- `arc scan`, `arc add`, library `path set`, library archive `path set`, library archive `remove`, and library index `enable` or `disable` cannot run concurrently for the same library.
|
|
71
|
-
- Library-wide `--query`,
|
|
74
|
+
- Library-wide object `--query`, object scope enumeration, evidence, related, and pack commands read the current aggregate index.
|
|
72
75
|
- If a write marks the aggregate index dirty, rebuild it with `{{ commandName }} <library-uri>/index enable` before relying on library-wide query results.
|
|
73
76
|
|
|
74
77
|
Upgrade and cleanup:
|
|
@@ -23,6 +23,8 @@ Archive locator:
|
|
|
23
23
|
Library locators:
|
|
24
24
|
- `wikg://lib` addresses the default library.
|
|
25
25
|
- `wikg://lib/<lib-id>` addresses a non-default library.
|
|
26
|
+
- Naked library scopes enumerate library-wide objects; `--query` on a naked library scope searches library-wide objects through the library index.
|
|
27
|
+
- Use explicit object lenses such as `/entity`, `/triple`, `/chapter`, or `/chunk` for archive object search.
|
|
26
28
|
- `wikg://lib/arc/<archive-id>/` addresses one archive membership in the default library.
|
|
27
29
|
- `wikg://lib/<lib-id>/arc/<archive-id>/` addresses one archive membership in a non-default library.
|
|
28
30
|
- Add ordinary archive object suffixes after the trailing slash to query a managed archive:
|