wiki-graph-core 0.3.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/LICENSE +201 -0
- package/data/editor/clue_reviewer.jinja +410 -0
- package/data/editor/clue_reviewer_generator.jinja +428 -0
- package/data/editor/revision_feedback.jinja +5 -0
- package/data/editor/text_compressor.jinja +127 -0
- package/data/guaranteed/response_intent_classifier.jinja +8 -0
- package/data/help/commands/archive/next.jinja +29 -0
- package/data/help/commands/gc.jinja +38 -0
- package/data/help/commands/legacy/migrate.jinja +20 -0
- package/data/help/commands/legacy.jinja +19 -0
- package/data/help/commands/maintenance/chapter/add.jinja +41 -0
- package/data/help/commands/maintenance/chapter/list.jinja +33 -0
- package/data/help/commands/maintenance/chapter/move.jinja +36 -0
- package/data/help/commands/maintenance/chapter/remove.jinja +26 -0
- package/data/help/commands/maintenance/chapter/reset.jinja +29 -0
- package/data/help/commands/maintenance/chapter/set-source.jinja +34 -0
- package/data/help/commands/maintenance/chapter/set-summary.jinja +31 -0
- package/data/help/commands/maintenance/chapter/set-title.jinja +29 -0
- package/data/help/commands/maintenance/chapter/tree.jinja +58 -0
- package/data/help/commands/maintenance/chapter.jinja +59 -0
- package/data/help/commands/maintenance/cover.jinja +28 -0
- package/data/help/commands/maintenance/meta.jinja +55 -0
- package/data/help/commands/predicate.jinja +460 -0
- package/data/help/commands/root.jinja +83 -0
- package/data/help/commands/transform.jinja +34 -0
- package/data/help/commands/uri.jinja +274 -0
- package/data/help/topics/config.jinja +88 -0
- package/data/help/topics/format.jinja +72 -0
- package/data/help/topics/readiness.jinja +99 -0
- package/data/help/topics/recipe.jinja +151 -0
- package/data/help/topics/runtime.jinja +62 -0
- package/data/help/topics/uri.jinja +178 -0
- package/data/output/epub/cover.xhtml.jinja +13 -0
- package/data/output/epub/nav.xhtml.jinja +12 -0
- package/data/output/epub/package.opf.xml.jinja +39 -0
- package/data/output/epub/section.xhtml.jinja +12 -0
- package/data/topologization/book_coherence_extraction.jinja +223 -0
- package/data/topologization/chunk_extraction.jinja +233 -0
- package/data/topologization/evidence_choice.jinja +38 -0
- package/data/topologization/translate_chunks.jinja +138 -0
- package/data/topologization/user_focused_extraction.jinja +378 -0
- package/dist/archive/query/archive-view.d.ts +26 -0
- package/dist/archive/query/archive-view.js +4540 -0
- package/dist/archive/query/archive-view.js.map +1 -0
- package/dist/archive/query/continuation-cursor.d.ts +61 -0
- package/dist/archive/query/continuation-cursor.js +363 -0
- package/dist/archive/query/continuation-cursor.js.map +1 -0
- package/dist/archive/query/index.d.ts +29 -0
- package/dist/archive/query/index.js +63 -0
- package/dist/archive/query/index.js.map +1 -0
- package/dist/archive/query/lexical-search.d.ts +22 -0
- package/dist/archive/query/lexical-search.js +137 -0
- package/dist/archive/query/lexical-search.js.map +1 -0
- package/dist/archive/query/search-cache.d.ts +192 -0
- package/dist/archive/query/search-cache.js +1248 -0
- package/dist/archive/query/search-cache.js.map +1 -0
- package/dist/archive/search-index/index.d.ts +26 -0
- package/dist/archive/search-index/index.js +29 -0
- package/dist/archive/search-index/index.js.map +1 -0
- package/dist/archive/search-index/search-index.d.ts +26 -0
- package/dist/archive/search-index/search-index.js +555 -0
- package/dist/archive/search-index/search-index.js.map +1 -0
- package/dist/archive/search-index/search-tokenizer.d.ts +16 -0
- package/dist/archive/search-index/search-tokenizer.js +225 -0
- package/dist/archive/search-index/search-tokenizer.js.map +1 -0
- package/dist/common/cli-command.d.ts +4 -0
- package/dist/common/cli-command.js +7 -0
- package/dist/common/cli-command.js.map +1 -0
- package/dist/common/data-dir.d.ts +3 -0
- package/dist/common/data-dir.js +48 -0
- package/dist/common/data-dir.js.map +1 -0
- package/dist/common/language.d.ts +55 -0
- package/dist/common/language.js +208 -0
- package/dist/common/language.js.map +1 -0
- package/dist/common/llm-scope.d.ts +19 -0
- package/dist/common/llm-scope.js +31 -0
- package/dist/common/llm-scope.js.map +1 -0
- package/dist/common/logging.d.ts +22 -0
- package/dist/common/logging.js +141 -0
- package/dist/common/logging.js.map +1 -0
- package/dist/common/template.d.ts +8 -0
- package/dist/common/template.js +54 -0
- package/dist/common/template.js.map +1 -0
- package/dist/common/tinyld-language.d.ts +6 -0
- package/dist/common/tinyld-language.js +34 -0
- package/dist/common/tinyld-language.js.map +1 -0
- package/dist/common/wiki-graph-dir.d.ts +10 -0
- package/dist/common/wiki-graph-dir.js +41 -0
- package/dist/common/wiki-graph-dir.js.map +1 -0
- package/dist/common/wiki-graph-temp.d.ts +6 -0
- package/dist/common/wiki-graph-temp.js +21 -0
- package/dist/common/wiki-graph-temp.js.map +1 -0
- package/dist/common/wiki-graph-uri.d.ts +28 -0
- package/dist/common/wiki-graph-uri.js +171 -0
- package/dist/common/wiki-graph-uri.js.map +1 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +13 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/task-context.d.ts +41 -0
- package/dist/context/task-context.js +111 -0
- package/dist/context/task-context.js.map +1 -0
- package/dist/document/database.d.ts +30 -0
- package/dist/document/database.js +273 -0
- package/dist/document/database.js.map +1 -0
- package/dist/document/document.d.ts +153 -0
- package/dist/document/document.js +615 -0
- package/dist/document/document.js.map +1 -0
- package/dist/document/fragments.d.ts +63 -0
- package/dist/document/fragments.js +371 -0
- package/dist/document/fragments.js.map +1 -0
- package/dist/document/index.d.ts +13 -0
- package/dist/document/index.js +62 -0
- package/dist/document/index.js.map +1 -0
- package/dist/document/schema.d.ts +8 -0
- package/dist/document/schema.js +472 -0
- package/dist/document/schema.js.map +1 -0
- package/dist/document/shared-state-database.d.ts +9 -0
- package/dist/document/shared-state-database.js +193 -0
- package/dist/document/shared-state-database.js.map +1 -0
- package/dist/document/stores.d.ts +203 -0
- package/dist/document/stores.js +1678 -0
- package/dist/document/stores.js.map +1 -0
- package/dist/document/text-streams.d.ts +86 -0
- package/dist/document/text-streams.js +515 -0
- package/dist/document/text-streams.js.map +1 -0
- package/dist/document/types.d.ts +148 -0
- package/dist/document/types.js +69 -0
- package/dist/document/types.js.map +1 -0
- package/dist/editor/clue.d.ts +27 -0
- package/dist/editor/clue.js +158 -0
- package/dist/editor/clue.js.map +1 -0
- package/dist/editor/compressor.d.ts +18 -0
- package/dist/editor/compressor.js +68 -0
- package/dist/editor/compressor.js.map +1 -0
- package/dist/editor/editor.d.ts +39 -0
- package/dist/editor/editor.js +253 -0
- package/dist/editor/editor.js.map +1 -0
- package/dist/editor/feedback.d.ts +16 -0
- package/dist/editor/feedback.js +104 -0
- package/dist/editor/feedback.js.map +1 -0
- package/dist/editor/index.d.ts +17 -0
- package/dist/editor/index.js +5 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/language-review.d.ts +14 -0
- package/dist/editor/language-review.js +35 -0
- package/dist/editor/language-review.js.map +1 -0
- package/dist/editor/log.d.ts +37 -0
- package/dist/editor/log.js +202 -0
- package/dist/editor/log.js.map +1 -0
- package/dist/editor/markup.d.ts +20 -0
- package/dist/editor/markup.js +294 -0
- package/dist/editor/markup.js.map +1 -0
- package/dist/editor/prompt-templates.d.ts +6 -0
- package/dist/editor/prompt-templates.js +11 -0
- package/dist/editor/prompt-templates.js.map +1 -0
- package/dist/editor/response.d.ts +5 -0
- package/dist/editor/response.js +31 -0
- package/dist/editor/response.js.map +1 -0
- package/dist/editor/review.d.ts +34 -0
- package/dist/editor/review.js +189 -0
- package/dist/editor/review.js.map +1 -0
- package/dist/editor/types.d.ts +31 -0
- package/dist/editor/types.js +21 -0
- package/dist/editor/types.js.map +1 -0
- package/dist/evidence-selection/anchor-resolver.d.ts +43 -0
- package/dist/evidence-selection/anchor-resolver.js +783 -0
- package/dist/evidence-selection/anchor-resolver.js.map +1 -0
- package/dist/evidence-selection/anchor-types.d.ts +27 -0
- package/dist/evidence-selection/anchor-types.js +1 -0
- package/dist/evidence-selection/anchor-types.js.map +1 -0
- package/dist/evidence-selection/index.d.ts +8 -0
- package/dist/evidence-selection/index.js +32 -0
- package/dist/evidence-selection/index.js.map +1 -0
- package/dist/evidence-selection/prompt.d.ts +18 -0
- package/dist/evidence-selection/prompt.js +54 -0
- package/dist/evidence-selection/prompt.js.map +1 -0
- package/dist/evidence-selection/quote-score.d.ts +29 -0
- package/dist/evidence-selection/quote-score.js +331 -0
- package/dist/evidence-selection/quote-score.js.map +1 -0
- package/dist/evidence-selection/selection-resolver.d.ts +19 -0
- package/dist/evidence-selection/selection-resolver.js +303 -0
- package/dist/evidence-selection/selection-resolver.js.map +1 -0
- package/dist/evidence-selection/text.d.ts +4 -0
- package/dist/evidence-selection/text.js +66 -0
- package/dist/evidence-selection/text.js.map +1 -0
- package/dist/evidence-selection/types.d.ts +36 -0
- package/dist/evidence-selection/types.js +1 -0
- package/dist/evidence-selection/types.js.map +1 -0
- package/dist/facade/app.d.ts +75 -0
- package/dist/facade/app.js +141 -0
- package/dist/facade/app.js.map +1 -0
- package/dist/facade/build-queue.d.ts +181 -0
- package/dist/facade/build-queue.js +1442 -0
- package/dist/facade/build-queue.js.map +1 -0
- package/dist/facade/chapter-build.d.ts +60 -0
- package/dist/facade/chapter-build.js +1020 -0
- package/dist/facade/chapter-build.js.map +1 -0
- package/dist/facade/chapter.d.ts +168 -0
- package/dist/facade/chapter.js +944 -0
- package/dist/facade/chapter.js.map +1 -0
- package/dist/facade/digest.d.ts +55 -0
- package/dist/facade/digest.js +168 -0
- package/dist/facade/digest.js.map +1 -0
- package/dist/facade/graph.d.ts +60 -0
- package/dist/facade/graph.js +203 -0
- package/dist/facade/graph.js.map +1 -0
- package/dist/facade/import.d.ts +49 -0
- package/dist/facade/import.js +262 -0
- package/dist/facade/import.js.map +1 -0
- package/dist/facade/index.d.ts +39 -0
- package/dist/facade/index.js +171 -0
- package/dist/facade/index.js.map +1 -0
- package/dist/facade/knowledge-graph-build.d.ts +75 -0
- package/dist/facade/knowledge-graph-build.js +897 -0
- package/dist/facade/knowledge-graph-build.js.map +1 -0
- package/dist/facade/llm-sampling.d.ts +11 -0
- package/dist/facade/llm-sampling.js +58 -0
- package/dist/facade/llm-sampling.js.map +1 -0
- package/dist/facade/types.d.ts +8 -0
- package/dist/facade/types.js +1 -0
- package/dist/facade/types.js.map +1 -0
- package/dist/facade/wiki-graph-archive.d.ts +41 -0
- package/dist/facade/wiki-graph-archive.js +130 -0
- package/dist/facade/wiki-graph-archive.js.map +1 -0
- package/dist/gc/files.d.ts +15 -0
- package/dist/gc/files.js +141 -0
- package/dist/gc/files.js.map +1 -0
- package/dist/gc/index.d.ts +2 -0
- package/dist/gc/index.js +5 -0
- package/dist/gc/index.js.map +1 -0
- package/dist/gc/lock.d.ts +3 -0
- package/dist/gc/lock.js +137 -0
- package/dist/gc/lock.js.map +1 -0
- package/dist/gc/runner.d.ts +9 -0
- package/dist/gc/runner.js +129 -0
- package/dist/gc/runner.js.map +1 -0
- package/dist/gc/tmp-gc.d.ts +5 -0
- package/dist/gc/tmp-gc.js +57 -0
- package/dist/gc/tmp-gc.js.map +1 -0
- package/dist/gc/types.d.ts +24 -0
- package/dist/gc/types.js +1 -0
- package/dist/gc/types.js.map +1 -0
- package/dist/gc.cjs +10041 -0
- package/dist/gc.cjs.map +1 -0
- package/dist/gc.d.cts +10 -0
- package/dist/gc.d.ts +2 -0
- package/dist/gc.js +5 -0
- package/dist/gc.js.map +1 -0
- package/dist/guaranteed/classifier.d.ts +10 -0
- package/dist/guaranteed/classifier.js +88 -0
- package/dist/guaranteed/classifier.js.map +1 -0
- package/dist/guaranteed/errors.d.ts +38 -0
- package/dist/guaranteed/errors.js +73 -0
- package/dist/guaranteed/errors.js.map +1 -0
- package/dist/guaranteed/index.d.ts +7 -0
- package/dist/guaranteed/index.js +21 -0
- package/dist/guaranteed/index.js.map +1 -0
- package/dist/guaranteed/request.d.ts +8 -0
- package/dist/guaranteed/request.js +206 -0
- package/dist/guaranteed/request.js.map +1 -0
- package/dist/guaranteed/response.d.ts +12 -0
- package/dist/guaranteed/response.js +98 -0
- package/dist/guaranteed/response.js.map +1 -0
- package/dist/guaranteed/types.d.ts +20 -0
- package/dist/guaranteed/types.js +1 -0
- package/dist/guaranteed/types.js.map +1 -0
- package/dist/index-B8NNnQ8P.d.ts +424 -0
- package/dist/index.cjs +34774 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2462 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +168 -0
- package/dist/index.js.map +1 -0
- package/dist/legacy-sdpub/upgrade.d.ts +7 -0
- package/dist/legacy-sdpub/upgrade.js +795 -0
- package/dist/legacy-sdpub/upgrade.js.map +1 -0
- package/dist/llm/cache.d.ts +13 -0
- package/dist/llm/cache.js +35 -0
- package/dist/llm/cache.js.map +1 -0
- package/dist/llm/client.d.ts +26 -0
- package/dist/llm/client.js +572 -0
- package/dist/llm/client.js.map +1 -0
- package/dist/llm/context.d.ts +22 -0
- package/dist/llm/context.js +78 -0
- package/dist/llm/context.js.map +1 -0
- package/dist/llm/errors.d.ts +7 -0
- package/dist/llm/errors.js +12 -0
- package/dist/llm/errors.js.map +1 -0
- package/dist/llm/index.d.ts +7 -0
- package/dist/llm/index.js +17 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/request-log.d.ts +9 -0
- package/dist/llm/request-log.js +35 -0
- package/dist/llm/request-log.js.map +1 -0
- package/dist/llm/sampling.d.ts +11 -0
- package/dist/llm/sampling.js +67 -0
- package/dist/llm/sampling.js.map +1 -0
- package/dist/llm/types.d.ts +50 -0
- package/dist/llm/types.js +1 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/output/epub/archive.d.ts +9 -0
- package/dist/output/epub/archive.js +81 -0
- package/dist/output/epub/archive.js.map +1 -0
- package/dist/output/epub/book.d.ts +15 -0
- package/dist/output/epub/book.js +76 -0
- package/dist/output/epub/book.js.map +1 -0
- package/dist/output/epub/content.d.ts +9 -0
- package/dist/output/epub/content.js +35 -0
- package/dist/output/epub/content.js.map +1 -0
- package/dist/output/epub/index.d.ts +20 -0
- package/dist/output/epub/index.js +14 -0
- package/dist/output/epub/index.js.map +1 -0
- package/dist/output/epub/model.d.ts +24 -0
- package/dist/output/epub/model.js +1 -0
- package/dist/output/epub/model.js.map +1 -0
- package/dist/output/epub/navigation.d.ts +10 -0
- package/dist/output/epub/navigation.js +39 -0
- package/dist/output/epub/navigation.js.map +1 -0
- package/dist/output/epub/package.d.ts +17 -0
- package/dist/output/epub/package.js +29 -0
- package/dist/output/epub/package.js.map +1 -0
- package/dist/output/epub/shared.d.ts +4 -0
- package/dist/output/epub/shared.js +12 -0
- package/dist/output/epub/shared.js.map +1 -0
- package/dist/output/epub/templates.d.ts +35 -0
- package/dist/output/epub/templates.js +26 -0
- package/dist/output/epub/templates.js.map +1 -0
- package/dist/output/index.d.ts +14 -0
- package/dist/output/index.js +11 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/plain-text.d.ts +18 -0
- package/dist/output/plain-text.js +56 -0
- package/dist/output/plain-text.js.map +1 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +14 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress/reporter.d.ts +10 -0
- package/dist/progress/reporter.js +79 -0
- package/dist/progress/reporter.js.map +1 -0
- package/dist/progress/tracker.d.ts +37 -0
- package/dist/progress/tracker.js +119 -0
- package/dist/progress/tracker.js.map +1 -0
- package/dist/progress/types.d.ts +28 -0
- package/dist/progress/types.js +1 -0
- package/dist/progress/types.js.map +1 -0
- package/dist/reader/attention/attention.d.ts +39 -0
- package/dist/reader/attention/attention.js +123 -0
- package/dist/reader/attention/attention.js.map +1 -0
- package/dist/reader/attention/index.d.ts +9 -0
- package/dist/reader/attention/index.js +5 -0
- package/dist/reader/attention/index.js.map +1 -0
- package/dist/reader/attention/wave-reflection.d.ts +21 -0
- package/dist/reader/attention/wave-reflection.js +153 -0
- package/dist/reader/attention/wave-reflection.js.map +1 -0
- package/dist/reader/attention/working-memory.d.ts +28 -0
- package/dist/reader/attention/working-memory.js +62 -0
- package/dist/reader/attention/working-memory.js.map +1 -0
- package/dist/reader/chunk-batch/extract.d.ts +13 -0
- package/dist/reader/chunk-batch/extract.js +14 -0
- package/dist/reader/chunk-batch/extract.js.map +1 -0
- package/dist/reader/chunk-batch/extractor.d.ts +17 -0
- package/dist/reader/chunk-batch/extractor.js +337 -0
- package/dist/reader/chunk-batch/extractor.js.map +1 -0
- package/dist/reader/chunk-batch/fragment-projection.d.ts +34 -0
- package/dist/reader/chunk-batch/fragment-projection.js +94 -0
- package/dist/reader/chunk-batch/fragment-projection.js.map +1 -0
- package/dist/reader/chunk-batch/index.d.ts +12 -0
- package/dist/reader/chunk-batch/index.js +13 -0
- package/dist/reader/chunk-batch/index.js.map +1 -0
- package/dist/reader/chunk-batch/language.d.ts +9 -0
- package/dist/reader/chunk-batch/language.js +23 -0
- package/dist/reader/chunk-batch/language.js.map +1 -0
- package/dist/reader/chunk-batch/parser.d.ts +94 -0
- package/dist/reader/chunk-batch/parser.js +640 -0
- package/dist/reader/chunk-batch/parser.js.map +1 -0
- package/dist/reader/chunk-batch/prompt-templates.d.ts +6 -0
- package/dist/reader/chunk-batch/prompt-templates.js +11 -0
- package/dist/reader/chunk-batch/prompt-templates.js.map +1 -0
- package/dist/reader/chunk-batch/types.d.ts +85 -0
- package/dist/reader/chunk-batch/types.js +1 -0
- package/dist/reader/chunk-batch/types.js.map +1 -0
- package/dist/reader/index.d.ts +13 -0
- package/dist/reader/index.js +7 -0
- package/dist/reader/index.js.map +1 -0
- package/dist/reader/reader.d.ts +37 -0
- package/dist/reader/reader.js +82 -0
- package/dist/reader/reader.js.map +1 -0
- package/dist/reader/segment/index.d.ts +2 -0
- package/dist/reader/segment/index.js +5 -0
- package/dist/reader/segment/index.js.map +1 -0
- package/dist/reader/segment/intl-segmenter.d.ts +5 -0
- package/dist/reader/segment/intl-segmenter.js +102 -0
- package/dist/reader/segment/intl-segmenter.js.map +1 -0
- package/dist/reader/segment/segment.d.ts +5 -0
- package/dist/reader/segment/segment.js +9 -0
- package/dist/reader/segment/segment.js.map +1 -0
- package/dist/reader/segment/types.d.ts +14 -0
- package/dist/reader/segment/types.js +1 -0
- package/dist/reader/segment/types.js.map +1 -0
- package/dist/reader/types.d.ts +29 -0
- package/dist/reader/types.js +1 -0
- package/dist/reader/types.js.map +1 -0
- package/dist/serial.d.ts +89 -0
- package/dist/serial.js +476 -0
- package/dist/serial.js.map +1 -0
- package/dist/source/adapter.d.ts +15 -0
- package/dist/source/adapter.js +1 -0
- package/dist/source/adapter.js.map +1 -0
- package/dist/source/epub/archive.d.ts +27 -0
- package/dist/source/epub/archive.js +189 -0
- package/dist/source/epub/archive.js.map +1 -0
- package/dist/source/epub/content.d.ts +22 -0
- package/dist/source/epub/content.js +183 -0
- package/dist/source/epub/content.js.map +1 -0
- package/dist/source/epub/document.d.ts +55 -0
- package/dist/source/epub/document.js +179 -0
- package/dist/source/epub/document.js.map +1 -0
- package/dist/source/epub/index.d.ts +10 -0
- package/dist/source/epub/index.js +6 -0
- package/dist/source/epub/index.js.map +1 -0
- package/dist/source/epub/navigation.d.ts +16 -0
- package/dist/source/epub/navigation.js +215 -0
- package/dist/source/epub/navigation.js.map +1 -0
- package/dist/source/epub/package.d.ts +33 -0
- package/dist/source/epub/package.js +237 -0
- package/dist/source/epub/package.js.map +1 -0
- package/dist/source/epub/xml.d.ts +16 -0
- package/dist/source/epub/xml.js +111 -0
- package/dist/source/epub/xml.js.map +1 -0
- package/dist/source/index.d.ts +12 -0
- package/dist/source/index.js +32 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/meta.d.ts +30 -0
- package/dist/source/meta.js +22 -0
- package/dist/source/meta.js.map +1 -0
- package/dist/source/plain-text.d.ts +16 -0
- package/dist/source/plain-text.js +86 -0
- package/dist/source/plain-text.js.map +1 -0
- package/dist/source/toc.d.ts +16 -0
- package/dist/source/toc.js +17 -0
- package/dist/source/toc.js.map +1 -0
- package/dist/source/types.d.ts +16 -0
- package/dist/source/types.js +1 -0
- package/dist/source/types.js.map +1 -0
- package/dist/topology/grouping.d.ts +15 -0
- package/dist/topology/grouping.js +18 -0
- package/dist/topology/grouping.js.map +1 -0
- package/dist/topology/index.d.ts +21 -0
- package/dist/topology/index.js +5 -0
- package/dist/topology/index.js.map +1 -0
- package/dist/topology/resource-segmentation.d.ts +13 -0
- package/dist/topology/resource-segmentation.js +111 -0
- package/dist/topology/resource-segmentation.js.map +1 -0
- package/dist/topology/segment-incision.d.ts +18 -0
- package/dist/topology/segment-incision.js +197 -0
- package/dist/topology/segment-incision.js.map +1 -0
- package/dist/topology/snake-detector.d.ts +13 -0
- package/dist/topology/snake-detector.js +520 -0
- package/dist/topology/snake-detector.js.map +1 -0
- package/dist/topology/snake-graph-builder.d.ts +14 -0
- package/dist/topology/snake-graph-builder.js +76 -0
- package/dist/topology/snake-graph-builder.js.map +1 -0
- package/dist/topology/topology.d.ts +29 -0
- package/dist/topology/topology.js +348 -0
- package/dist/topology/topology.js.map +1 -0
- package/dist/topology/weights.d.ts +10 -0
- package/dist/topology/weights.js +84 -0
- package/dist/topology/weights.js.map +1 -0
- package/dist/types-FVIqiLC9.d.cts +24 -0
- package/dist/utils/async-semaphore.d.ts +7 -0
- package/dist/utils/async-semaphore.js +40 -0
- package/dist/utils/async-semaphore.js.map +1 -0
- package/dist/utils/enum.d.ts +5 -0
- package/dist/utils/enum.js +18 -0
- package/dist/utils/enum.js.map +1 -0
- package/dist/utils/hash.d.ts +3 -0
- package/dist/utils/hash.js +132 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/node-error.d.ts +4 -0
- package/dist/utils/node-error.js +59 -0
- package/dist/utils/node-error.js.map +1 -0
- package/dist/wikg/archive-uri.d.ts +1 -0
- package/dist/wikg/archive-uri.js +37 -0
- package/dist/wikg/archive-uri.js.map +1 -0
- package/dist/wikg/archive.d.ts +28 -0
- package/dist/wikg/archive.js +496 -0
- package/dist/wikg/archive.js.map +1 -0
- package/dist/wikg/index.d.ts +31 -0
- package/dist/wikg/index.js +60 -0
- package/dist/wikg/index.js.map +1 -0
- package/dist/wikg/wikg-coordinator.d.ts +45 -0
- package/dist/wikg/wikg-coordinator.js +1687 -0
- package/dist/wikg/wikg-coordinator.js.map +1 -0
- package/dist/wikg/wiki-graph-archive-file.d.ts +42 -0
- package/dist/wikg/wiki-graph-archive-file.js +78 -0
- package/dist/wikg/wiki-graph-archive-file.js.map +1 -0
- package/dist/wikilink/index.d.ts +10 -0
- package/dist/wikilink/index.js +7 -0
- package/dist/wikilink/index.js.map +1 -0
- package/dist/wikilink/relation-discovery.d.ts +31 -0
- package/dist/wikilink/relation-discovery.js +477 -0
- package/dist/wikilink/relation-discovery.js.map +1 -0
- package/dist/wikilink/types.d.ts +23 -0
- package/dist/wikilink/types.js +1 -0
- package/dist/wikilink/types.js.map +1 -0
- package/dist/wikilink/window.d.ts +7 -0
- package/dist/wikilink/window.js +53 -0
- package/dist/wikilink/window.js.map +1 -0
- package/dist/wikimatch/enrichment.d.ts +10 -0
- package/dist/wikimatch/enrichment.js +55 -0
- package/dist/wikimatch/enrichment.js.map +1 -0
- package/dist/wikimatch/index.d.ts +16 -0
- package/dist/wikimatch/index.js +66 -0
- package/dist/wikimatch/index.js.map +1 -0
- package/dist/wikimatch/option-narrowing.d.ts +17 -0
- package/dist/wikimatch/option-narrowing.js +208 -0
- package/dist/wikimatch/option-narrowing.js.map +1 -0
- package/dist/wikimatch/options.d.ts +14 -0
- package/dist/wikimatch/options.js +155 -0
- package/dist/wikimatch/options.js.map +1 -0
- package/dist/wikimatch/policy-judge.d.ts +17 -0
- package/dist/wikimatch/policy-judge.js +430 -0
- package/dist/wikimatch/policy-judge.js.map +1 -0
- package/dist/wikimatch/range-suppression.d.ts +9 -0
- package/dist/wikimatch/range-suppression.js +27 -0
- package/dist/wikimatch/range-suppression.js.map +1 -0
- package/dist/wikimatch/surface-screening.d.ts +16 -0
- package/dist/wikimatch/surface-screening.js +168 -0
- package/dist/wikimatch/surface-screening.js.map +1 -0
- package/dist/wikimatch/surface-window.d.ts +6 -0
- package/dist/wikimatch/surface-window.js +44 -0
- package/dist/wikimatch/surface-window.js.map +1 -0
- package/dist/wikimatch/types.d.ts +151 -0
- package/dist/wikimatch/types.js +1 -0
- package/dist/wikimatch/types.js.map +1 -0
- package/dist/wikimatch/wikispine.d.ts +43 -0
- package/dist/wikimatch/wikispine.js +399 -0
- package/dist/wikimatch/wikispine.js.map +1 -0
- package/dist/wikimatch/window.d.ts +6 -0
- package/dist/wikimatch/window.js +83 -0
- package/dist/wikimatch/window.js.map +1 -0
- package/dist/wikimatch/words.d.ts +16 -0
- package/dist/wikimatch/words.js +66 -0
- package/dist/wikimatch/words.js.map +1 -0
- package/dist/wikipage/cache.d.ts +18 -0
- package/dist/wikipage/cache.js +404 -0
- package/dist/wikipage/cache.js.map +1 -0
- package/dist/wikipage/fetch-log.d.ts +17 -0
- package/dist/wikipage/fetch-log.js +143 -0
- package/dist/wikipage/fetch-log.js.map +1 -0
- package/dist/wikipage/index.d.ts +14 -0
- package/dist/wikipage/index.js +17 -0
- package/dist/wikipage/index.js.map +1 -0
- package/dist/wikipage/normalizer.d.ts +14 -0
- package/dist/wikipage/normalizer.js +147 -0
- package/dist/wikipage/normalizer.js.map +1 -0
- package/dist/wikipage/rate-limiter.d.ts +13 -0
- package/dist/wikipage/rate-limiter.js +84 -0
- package/dist/wikipage/rate-limiter.js.map +1 -0
- package/dist/wikipage/resolver.d.ts +26 -0
- package/dist/wikipage/resolver.js +325 -0
- package/dist/wikipage/resolver.js.map +1 -0
- package/dist/wikipage/types.d.ts +96 -0
- package/dist/wikipage/types.js +1 -0
- package/dist/wikipage/types.js.map +1 -0
- package/dist/wikipage/wikimedia-client.d.ts +48 -0
- package/dist/wikipage/wikimedia-client.js +397 -0
- package/dist/wikipage/wikimedia-client.js.map +1 -0
- package/dist/worker-BgQ0Xl8T.d.cts +181 -0
- package/dist/worker.cjs +5259 -0
- package/dist/worker.cjs.map +1 -0
- package/dist/worker.d.cts +2 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +5 -0
- package/dist/worker.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Help Type: topic
|
|
2
|
+
Topic: recipe
|
|
3
|
+
|
|
4
|
+
Workflow Recipe
|
|
5
|
+
|
|
6
|
+
Purpose:
|
|
7
|
+
Read this after root help. It is the practical workflow guide for Agents operating `.wikg` archives.
|
|
8
|
+
Use it to choose a starting point, interpret inspect output, answer questions from archive objects, and decide which topic to read next.
|
|
9
|
+
|
|
10
|
+
Operating rules:
|
|
11
|
+
- Never unzip a `.wikg` archive, rewrite internal files, or bypass this CLI. Use CLI commands for archive edits.
|
|
12
|
+
- Use Wiki Graph URIs as stable object handles.
|
|
13
|
+
- Use `--json` when you want stable Agent-readable fields instead of human text. Whole `source` and `summary` objects are text streams, while ranged fragments such as `/source#20..30` support `--json`.
|
|
14
|
+
- If you have a URI and need valid operations, run `{{ commandName }} <uri> --help`.
|
|
15
|
+
- If you need concrete predicate usage for that URI type, run `{{ commandName }} <uri> <predicate> --help`.
|
|
16
|
+
- Never pass a bare filesystem path to URI-targeted commands.
|
|
17
|
+
/Users/me/book.wikg -> wikg:///Users/me/book.wikg
|
|
18
|
+
./book.wikg -> wikg://book.wikg
|
|
19
|
+
- Treat returned short URIs as archive-relative handles. Add the archive locator before passing them back:
|
|
20
|
+
wikg://entity/Q8018 -> wikg:///absolute/path/book.wikg/entity/Q8018
|
|
21
|
+
|
|
22
|
+
Choose your starting point:
|
|
23
|
+
- User gave you an existing `.wikg` archive:
|
|
24
|
+
Inspect before querying, generating, or editing.
|
|
25
|
+
{{ commandName }} wikg://book.wikg inspect
|
|
26
|
+
|
|
27
|
+
- User gave you source content and needs a reusable knowledge-base archive:
|
|
28
|
+
Create an empty `.wikg` archive, or create one while importing an EPUB.
|
|
29
|
+
{{ commandName }} wikg://book.wikg create
|
|
30
|
+
{{ commandName }} wikg://book.wikg create --import ./book.epub
|
|
31
|
+
|
|
32
|
+
- User needs one-shot conversion without keeping an archive:
|
|
33
|
+
Use transform. Source input usually requires LLM configuration.
|
|
34
|
+
cat chapter.txt | {{ commandName }} transform --input-format txt --output-format markdown
|
|
35
|
+
|
|
36
|
+
- User needs a chapter-level file:
|
|
37
|
+
Read the chapter object and use Unix pipes or redirection. `/source` prints original source text; `/summary` prints the chapter summary.
|
|
38
|
+
{{ commandName }} wikg://book.wikg/chapter/3/source > chapter-3-source.md
|
|
39
|
+
{{ commandName }} wikg://book.wikg/chapter/3/summary > chapter-3-summary.md
|
|
40
|
+
|
|
41
|
+
After inspect:
|
|
42
|
+
- If the archive is ready for retrieval, use `--query` on a scope or open the URI that inspect suggests.
|
|
43
|
+
{{ commandName }} wikg:///Users/me/book.wikg --query "attention memory"
|
|
44
|
+
{{ commandName }} wikg:///Users/me/book.wikg/chapter/3 --query "attention"
|
|
45
|
+
|
|
46
|
+
- If inspect reports missing or unavailable index support, inspect the index target before enabling anything.
|
|
47
|
+
{{ commandName }} <archive-uri>/index --help
|
|
48
|
+
{{ commandName }} <archive-uri>/index enable --help
|
|
49
|
+
Read readiness before deciding whether to keep the index local or embed it:
|
|
50
|
+
{{ commandName }} help readiness
|
|
51
|
+
|
|
52
|
+
- If Reading Graph data is missing, chunk `--query`, related expansion, and pack may be unavailable or incomplete.
|
|
53
|
+
Inspect job help before starting generated work.
|
|
54
|
+
{{ commandName }} wikg://local/job --help
|
|
55
|
+
{{ commandName }} wikg://local/job add --help
|
|
56
|
+
{{ commandName }} help readiness
|
|
57
|
+
|
|
58
|
+
- If Knowledge Graph data is missing, entity and triple retrieval may be unavailable or incomplete.
|
|
59
|
+
Knowledge Graph generation needs configuration and may require WikiSpine provider setup.
|
|
60
|
+
{{ commandName }} help config
|
|
61
|
+
{{ commandName }} help readiness
|
|
62
|
+
|
|
63
|
+
- If summaries are missing, summary reads and summary-based exports may be incomplete.
|
|
64
|
+
Check the chapter or archive readiness before relying on summaries.
|
|
65
|
+
|
|
66
|
+
Finding material:
|
|
67
|
+
`--query` uses indexed full-text retrieval. Treat it like grep/find with Google-like keyword input.
|
|
68
|
+
|
|
69
|
+
- Need document structure, chapter readiness, or chapter-local scope:
|
|
70
|
+
{{ commandName }} wikg://book.wikg/chapter
|
|
71
|
+
{{ commandName }} wikg://book.wikg/chapter/3
|
|
72
|
+
|
|
73
|
+
- Need to understand a concept, person, place, term, or object:
|
|
74
|
+
Use `--query` on entity scopes with source evidence, then ground, expand, or pack from the entity URI.
|
|
75
|
+
{{ commandName }} wikg://book.wikg/entity --query "attention" --evidence 2
|
|
76
|
+
{{ commandName }} wikg://book.wikg/chapter/3/entity --query "attention" --evidence 2
|
|
77
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018
|
|
78
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018 evidence
|
|
79
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018 related --query "memory"
|
|
80
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018 pack --budget 5000
|
|
81
|
+
Do not rely on label-only matching as the primary path for known entities; aliases, translations, and variants may not match the label.
|
|
82
|
+
Entity scopes can be archive-wide (`<archive-uri>/entity`) or chapter-limited (`<chapter-uri>/entity`).
|
|
83
|
+
|
|
84
|
+
- Need to trace a relation, claim, or subject-predicate-object connection:
|
|
85
|
+
Use `--query` on triple scopes with source evidence, then open or ground the triple object.
|
|
86
|
+
{{ commandName }} wikg://book.wikg/triple --query "attention memory" --evidence 2
|
|
87
|
+
{{ commandName }} wikg://book.wikg/chapter/3/triple --query "attention memory" --evidence 2
|
|
88
|
+
{{ commandName }} wikg://book.wikg/triple/Q8018/discusses/Q123
|
|
89
|
+
{{ commandName }} wikg://book.wikg/triple/Q8018/discusses/Q123 evidence
|
|
90
|
+
Triple scopes can be archive-wide (`<archive-uri>/triple`) or chapter-limited (`<chapter-uri>/triple`).
|
|
91
|
+
Related expansion is available from chunk and entity objects; for a triple, expand through its subject or object entity.
|
|
92
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018 related --query "memory" --evidence 2
|
|
93
|
+
|
|
94
|
+
- Need literal source wording:
|
|
95
|
+
Use `--query` on the narrowest useful scope.
|
|
96
|
+
{{ commandName }} wikg:///Users/me/book.wikg --query "attention memory"
|
|
97
|
+
{{ commandName }} wikg:///Users/me/book.wikg/chapter/3 --query "attention"
|
|
98
|
+
{{ commandName }} wikg://book.wikg/chapter/3/source#20..30
|
|
99
|
+
{{ commandName }} wikg://book.wikg/chapter/3/source#23..45
|
|
100
|
+
|
|
101
|
+
- Need the latest source evidence for a known object:
|
|
102
|
+
Use `--reverse` without `--query`; read `{{ commandName }} help uri` for Document Flow order.
|
|
103
|
+
{{ commandName }} wikg://book.wikg/entity/Q8018 evidence --reverse --limit 1
|
|
104
|
+
|
|
105
|
+
- Need summary wording:
|
|
106
|
+
Read summary objects or summary ranges, then verify important claims through related chunk, entity, or triple evidence.
|
|
107
|
+
{{ commandName }} wikg://book.wikg/chapter/3/summary
|
|
108
|
+
{{ commandName }} wikg://book.wikg/chapter/3/summary#23..45
|
|
109
|
+
{{ commandName }} wikg://book.wikg/chapter/3/chunk --query "attention" --evidence 2
|
|
110
|
+
|
|
111
|
+
- Need Reading Graph chunks:
|
|
112
|
+
Use `--query` on chunk scopes with source evidence, then open or expand from useful chunk objects.
|
|
113
|
+
{{ commandName }} wikg://book.wikg/chunk --query "attention memory" --evidence 2
|
|
114
|
+
{{ commandName }} wikg://book.wikg/chapter/3/chunk --query "attention" --evidence 2
|
|
115
|
+
{{ commandName }} wikg://book.wikg/chunk
|
|
116
|
+
{{ commandName }} wikg://book.wikg/chunk/123 evidence
|
|
117
|
+
{{ commandName }} wikg://book.wikg/chunk/123 related --query "attention" --evidence 2
|
|
118
|
+
|
|
119
|
+
- Need quick compressed understanding before returning to source evidence:
|
|
120
|
+
Read summaries, then verify important claims with evidence.
|
|
121
|
+
{{ commandName }} wikg://book.wikg/chapter/3/summary
|
|
122
|
+
|
|
123
|
+
- Need an inventory for a script or Unix pipeline:
|
|
124
|
+
Use `--all --jsonl` to export the selected scope as line-delimited records, then filter with standard stream tools.
|
|
125
|
+
Prefer the narrowest useful scope before full export.
|
|
126
|
+
{{ commandName }} wikg://book.wikg/entity --all --jsonl
|
|
127
|
+
{{ commandName }} wikg://book.wikg/triple --all --jsonl
|
|
128
|
+
{{ commandName }} wikg://book.wikg/chunk --all --jsonl
|
|
129
|
+
{{ commandName }} wikg://book.wikg/chapter/3/entity --all --jsonl
|
|
130
|
+
{{ commandName }} wikg://book.wikg/chapter/3/triple --all --jsonl
|
|
131
|
+
{{ commandName }} wikg://book.wikg/chapter/3/chunk --all --jsonl
|
|
132
|
+
|
|
133
|
+
- Need bounded Agent-readable context around an object:
|
|
134
|
+
Use pack only after choosing a located chunk or entity URI.
|
|
135
|
+
{{ commandName }} wikg:///Users/me/book.wikg/entity/Q8018 pack --budget 5000
|
|
136
|
+
|
|
137
|
+
- Need more results from a paged response:
|
|
138
|
+
Continue with the cursor returned by the previous command.
|
|
139
|
+
{{ commandName }} next <cursor>
|
|
140
|
+
|
|
141
|
+
When to read deeper:
|
|
142
|
+
- URI details, scope/object routing, pagination, and short URI handling:
|
|
143
|
+
{{ commandName }} help uri
|
|
144
|
+
- Format inference, stdin/stdout, create/import, export, transform, JSON, JSONL, and pipe output:
|
|
145
|
+
{{ commandName }} help format
|
|
146
|
+
- LLM, concurrency, and WikiSpine provider setup:
|
|
147
|
+
{{ commandName }} help config
|
|
148
|
+
- FTS index, LLM, WikiSpine, and generated-data prerequisites:
|
|
149
|
+
{{ commandName }} help readiness
|
|
150
|
+
- Workers, cache, logs, workspaces, failures, and JSONL progress:
|
|
151
|
+
{{ commandName }} help runtime
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Help Type: topic
|
|
2
|
+
Topic: runtime
|
|
3
|
+
|
|
4
|
+
Runtime and Debug Behavior
|
|
5
|
+
|
|
6
|
+
Purpose:
|
|
7
|
+
This is a low-frequency advanced topic. Read it when a command fails, a job appears stuck, JSON/JSONL behavior matters, or you need to understand workers, cache, logs, and workspaces.
|
|
8
|
+
|
|
9
|
+
Archive-first streams:
|
|
10
|
+
- `{{ commandName }} <archive-uri> create` creates an empty archive; it does not read stdin.
|
|
11
|
+
- `{{ commandName }} <archive-uri> create --import <epub-path>` imports EPUB source into a new archive.
|
|
12
|
+
- `{{ commandName }} <archive-uri> export --output-format markdown|txt` can write text projections to stdout.
|
|
13
|
+
- `{{ commandName }} transform --input-format markdown|txt --output-format markdown|txt` runs direct one-shot stream digest/export and usually requires LLM configuration.
|
|
14
|
+
- Retrieval commands print human-readable text by default and support `--json` where documented.
|
|
15
|
+
- A bare `{{ commandName }}` in an interactive terminal prints root help.
|
|
16
|
+
- A bare non-interactive `{{ commandName }}` invocation is not a transform shortcut; use `{{ commandName }} transform`.
|
|
17
|
+
|
|
18
|
+
Exit behavior:
|
|
19
|
+
- Success returns exit code 0.
|
|
20
|
+
- Failures return non-zero.
|
|
21
|
+
- Commands that accept `--json` or `--jsonl` emit machine-readable error objects when those flags are present.
|
|
22
|
+
- Commands without machine-readable output support print plain-text errors.
|
|
23
|
+
|
|
24
|
+
Generation job behavior:
|
|
25
|
+
- Reading Graph, Reading Summary, and Knowledge Graph generation run as device-local jobs.
|
|
26
|
+
- Generation jobs consume LLM tokens, may incur provider charges, and can run for minutes to hours on large archives.
|
|
27
|
+
- `wikg://local/job add` requires `--accept-cost` as an explicit cost/time acknowledgement.
|
|
28
|
+
- Job records live under `~/.{{ commandName }}/jobs`.
|
|
29
|
+
- `wikg://local/job add`, `wikg://local/job/<job-id> resume`, `wikg://local/job/<job-id> boost`, and `wikg://local/job/<job-id>/target set` try to start a transient worker.
|
|
30
|
+
- The worker exits after idle time; it is not intended to be a permanent daemon.
|
|
31
|
+
- `wikg://local/job/<job-id> watch --jsonl` is the stable agent-facing progress stream.
|
|
32
|
+
- `wikg://local/config/concurrent` controls job and LLM request concurrency.
|
|
33
|
+
|
|
34
|
+
Progress and diagnostics:
|
|
35
|
+
- Job progress is recorded as durable events and exposed by `wikg://local/job/<job-id> watch`.
|
|
36
|
+
- `status_snapshot` events include counters and token usage when the LLM provider reports it.
|
|
37
|
+
- `transform --verbose` writes diagnostic logs to stderr.
|
|
38
|
+
- Use `{{ commandName }} <archive-uri> inspect` before starting or debugging generation work.
|
|
39
|
+
- Use `{{ commandName }} <archive-uri>/index --help` when `--query`, evidence, or related appears unavailable.
|
|
40
|
+
|
|
41
|
+
Workspace behavior:
|
|
42
|
+
- Archive creation and EPUB import use temporary workspaces.
|
|
43
|
+
- `transform --digest-dir <path>` uses the provided digest workspace for source digest runs.
|
|
44
|
+
- Generation jobs use per-job directories under `~/.{{ commandName }}/jobs/work`, `~/.{{ commandName }}/jobs/cache`, and `~/.{{ commandName }}/jobs/logs`.
|
|
45
|
+
- Succeeded jobs delete their workspace by default.
|
|
46
|
+
- Failed and canceled jobs keep their workspace for debugging until cleanup.
|
|
47
|
+
- Job events, logs, and LLM cache are kept until the job record is cleaned.
|
|
48
|
+
|
|
49
|
+
In-place archive edits:
|
|
50
|
+
- Mutating `.wikg` commands go through the archive coordinator.
|
|
51
|
+
- Active generation jobs block destructive chapter maintenance edits for the same chapter.
|
|
52
|
+
- Archive writes are coordinated through `~/.{{ commandName }}/staging`.
|
|
53
|
+
|
|
54
|
+
Where to go next:
|
|
55
|
+
- Need the normal workflow before debugging:
|
|
56
|
+
{{ commandName }} help recipe
|
|
57
|
+
- Need FTS/generation prerequisites before debugging:
|
|
58
|
+
{{ commandName }} help readiness
|
|
59
|
+
- Need legal format combinations:
|
|
60
|
+
{{ commandName }} help format
|
|
61
|
+
- Need URI command routing:
|
|
62
|
+
{{ commandName }} help uri
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Help Type: topic
|
|
2
|
+
Topic: uri
|
|
3
|
+
|
|
4
|
+
Wiki Graph URIs
|
|
5
|
+
|
|
6
|
+
Purpose:
|
|
7
|
+
URI targets are the address and routing layer for Wiki Graph commands.
|
|
8
|
+
Use this page to choose a target, understand scope/object behavior, and select retrieval shape.
|
|
9
|
+
|
|
10
|
+
Archive locator:
|
|
11
|
+
- Archive/object command URIs must contain a `.wikg` locator.
|
|
12
|
+
- Do not pass a bare filesystem path as a command target.
|
|
13
|
+
/Users/me/book.wikg -> wikg:///Users/me/book.wikg
|
|
14
|
+
./book.wikg -> wikg://book.wikg
|
|
15
|
+
C:\Users\me\book.wikg -> wikg://C:/Users/me/book.wikg
|
|
16
|
+
- URI paths use `/` separators, including on Windows.
|
|
17
|
+
- Absolute archive locators use `wikg:///`, for example `wikg:///books/book.wikg`.
|
|
18
|
+
- Relative archive locators use `wikg://`, for example `wikg://book.wikg`.
|
|
19
|
+
- Home archive locators may start with `wikg://~/`; `~` is expanded only in that leading form.
|
|
20
|
+
- The first path segment ending in `.wikg` is the archive/object boundary.
|
|
21
|
+
|
|
22
|
+
Short and located URIs:
|
|
23
|
+
Commands may return short object URIs without local file paths:
|
|
24
|
+
wikg://chapter/3/title
|
|
25
|
+
wikg://chapter/3/source#4..8
|
|
26
|
+
wikg://chunk/12
|
|
27
|
+
wikg://entity/Q8018
|
|
28
|
+
wikg://triple/Q8018/discusses/Q123
|
|
29
|
+
Returned short URIs are archive-relative handles, not complete command targets.
|
|
30
|
+
Add the archive locator before passing them back to commands:
|
|
31
|
+
wikg://book.wikg/entity/Q8018
|
|
32
|
+
wikg:///books/book.wikg/chapter/3/source#4..8
|
|
33
|
+
|
|
34
|
+
Command routing:
|
|
35
|
+
- `{{ commandName }} <scope-uri>` enumerates objects.
|
|
36
|
+
- `{{ commandName }} <scope-uri> --query <query>` applies keyword retrieval within that scope.
|
|
37
|
+
- `{{ commandName }} <object-uri>` reads one object.
|
|
38
|
+
- `{{ commandName }} <uri> --help` explains that URI target and its supported predicates.
|
|
39
|
+
- `{{ commandName }} <uri> <predicate> --help` explains a URI-bound predicate.
|
|
40
|
+
|
|
41
|
+
Common command shapes:
|
|
42
|
+
{{ commandName }} <scope-uri>
|
|
43
|
+
{{ commandName }} <scope-uri> --query <query>
|
|
44
|
+
{{ commandName }} <object-uri>
|
|
45
|
+
{{ commandName }} <chunk-uri|entity-uri> related
|
|
46
|
+
{{ commandName }} <entity|triple|chunk-uri> evidence
|
|
47
|
+
{{ commandName }} <located-chunk-uri|located-entity-uri> pack
|
|
48
|
+
{{ commandName }} next <cursor>
|
|
49
|
+
{{ commandName }} <archive-uri> create [--import <epub-path>]
|
|
50
|
+
{{ commandName }} <archive-uri> export --output-format <format>
|
|
51
|
+
{{ commandName }} <archive-uri> inspect
|
|
52
|
+
{{ commandName }} transform [options]
|
|
53
|
+
{{ commandName }} wikg://local/job
|
|
54
|
+
{{ commandName }} wikg://local/job add --input <archive-uri|chapter-uri> --task <reading-graph|reading-summary|knowledge-graph> --accept-cost
|
|
55
|
+
{{ commandName }} wikg://local/job/<job-id>
|
|
56
|
+
{{ commandName }} <object-uri> related
|
|
57
|
+
{{ commandName }} <object-uri> evidence
|
|
58
|
+
{{ commandName }} <object-uri> pack --budget 5000
|
|
59
|
+
|
|
60
|
+
Scope URIs:
|
|
61
|
+
Scope URIs enumerate objects by default. With `--query <query>`, they apply keyword retrieval within that scope.
|
|
62
|
+
wikg://book.wikg
|
|
63
|
+
wikg://book.wikg/chapter
|
|
64
|
+
wikg://book.wikg/chapter/3
|
|
65
|
+
wikg://book.wikg/chapter/3/chunk
|
|
66
|
+
wikg://book.wikg/chapter/3/entity
|
|
67
|
+
wikg://book.wikg/chapter/3/triple
|
|
68
|
+
wikg://book.wikg/chunk
|
|
69
|
+
wikg://book.wikg/entity
|
|
70
|
+
wikg://book.wikg/triple
|
|
71
|
+
wikg://book.wikg/triple/Q8018
|
|
72
|
+
wikg://book.wikg/triple/Q8018/discusses
|
|
73
|
+
wikg://book.wikg/triple/Q8018/_/Q123
|
|
74
|
+
|
|
75
|
+
Object URIs:
|
|
76
|
+
Object URIs read one object by default.
|
|
77
|
+
wikg://book.wikg/chapter/3/title
|
|
78
|
+
wikg://book.wikg/chapter/3/state
|
|
79
|
+
wikg://book.wikg/chapter/3/source
|
|
80
|
+
wikg://book.wikg/chapter/3/source#4..8
|
|
81
|
+
wikg://book.wikg/chapter/3/summary
|
|
82
|
+
wikg://book.wikg/chapter/3/summary#4..8
|
|
83
|
+
wikg://book.wikg/chapter/3/chunk/12
|
|
84
|
+
wikg://book.wikg/chapter/3/entity/Q8018
|
|
85
|
+
wikg://book.wikg/chapter/3/triple/Q8018/discusses/Q123
|
|
86
|
+
wikg://book.wikg/chunk/12
|
|
87
|
+
wikg://book.wikg/entity/Q8018
|
|
88
|
+
wikg://book.wikg/entity/Q8018/wikipage
|
|
89
|
+
wikg://book.wikg/triple/Q8018/discusses/Q123
|
|
90
|
+
|
|
91
|
+
Triple pattern scopes:
|
|
92
|
+
Use `_` as an any-value placeholder for subject, predicate, or object:
|
|
93
|
+
wikg://book.wikg/triple/Q8018/_/Q123
|
|
94
|
+
wikg://book.wikg/triple/_/_/Q123
|
|
95
|
+
Trailing placeholders may be omitted:
|
|
96
|
+
wikg://book.wikg/triple/Q8018
|
|
97
|
+
wikg://book.wikg/triple/Q8018/discusses
|
|
98
|
+
Any triple URI with `_` or omitted trailing subject/predicate/object parts is a scope URI.
|
|
99
|
+
A complete triple URI with concrete subject, predicate, and object is an object URI.
|
|
100
|
+
|
|
101
|
+
Object boundaries:
|
|
102
|
+
- `chapter/<id>` is a scope, not an object.
|
|
103
|
+
- `chapter/<id>/title` is the queryable chapter title object.
|
|
104
|
+
- Whole `source` and `summary` objects are readable text streams, not collection scopes.
|
|
105
|
+
- Ranged fragments such as `/source#4..8` and `/summary#4..8` are structured range objects.
|
|
106
|
+
- Source and summary range numbers are 1-based and inclusive. `/source#1..2` means the first two source sentences.
|
|
107
|
+
- Source text is the grounding material. `evidence` is not available for source, summary, or chapter scope URIs.
|
|
108
|
+
- `chunk`, `entity`, and `triple` can return source-backed evidence.
|
|
109
|
+
|
|
110
|
+
Retrieval strategy:
|
|
111
|
+
1. Choose the narrowest URI scope that can answer the task.
|
|
112
|
+
2. Choose the object lens that matches the question.
|
|
113
|
+
3. Start with a bounded page.
|
|
114
|
+
4. Use `--all` only for an intentional full export or bounded inventory.
|
|
115
|
+
|
|
116
|
+
Document Flow order:
|
|
117
|
+
Without `--query`, multi-object results and source/summary evidence follow Document Flow order.
|
|
118
|
+
Document Flow order means `/chapter/tree` preorder chapter traversal, then source or summary ranges from the start of each chapter to the end.
|
|
119
|
+
Use `--reverse` when you need the same flow backward, for example to find the latest source occurrence of a known object.
|
|
120
|
+
`--reverse` cannot be combined with `--query`; query results use indexed match ranking instead.
|
|
121
|
+
|
|
122
|
+
Lens selection:
|
|
123
|
+
- Use `<archive-uri>` when the whole archive is the right retrieval scope.
|
|
124
|
+
- Use `<chapter-uri>` when a known chapter is enough.
|
|
125
|
+
- Use `<chapter-uri>/<lens>` when both chapter and object kind are known.
|
|
126
|
+
- `/chunk` targets Reading Graph chunks.
|
|
127
|
+
- `/entity` targets grounded entities.
|
|
128
|
+
- `/triple` targets Knowledge Graph relations.
|
|
129
|
+
- `chapter/<id>` is a scope; `--query` over chapter titles returns `chapter/<id>/title` objects.
|
|
130
|
+
|
|
131
|
+
Literal source passages:
|
|
132
|
+
Use `--query` on the narrowest useful scope when the task is to find source wording or passages mentioning a literal term:
|
|
133
|
+
{{ commandName }} <archive-uri> --query "term"
|
|
134
|
+
{{ commandName }} <archive-uri>/chapter/<id> --query "term"
|
|
135
|
+
{{ commandName }} <archive-uri>/chapter/<id>/source#20..30
|
|
136
|
+
|
|
137
|
+
Entity-grounded evidence:
|
|
138
|
+
Use entity evidence when you already have an entity URI or QID and need grounded mentions, aliases, translations, variants, or source-backed support:
|
|
139
|
+
{{ commandName }} <archive-uri>/entity/<qid> evidence
|
|
140
|
+
{{ commandName }} <archive-uri>/entity/<qid> related --query "aspect" --evidence 2
|
|
141
|
+
{{ commandName }} <archive-uri>/entity/<qid> evidence --reverse --limit 1
|
|
142
|
+
|
|
143
|
+
Pagination:
|
|
144
|
+
- Use default paging or `--limit <n>` while exploring.
|
|
145
|
+
- Use `{{ commandName }} next <cursor>` to continue a paged result.
|
|
146
|
+
- Use `--all` only when you intentionally need every item from the selected scope.
|
|
147
|
+
- Prefer the narrowest scope before using `--all`.
|
|
148
|
+
- Read `{{ commandName }} help format` before choosing text, `--json`, `--jsonl`, or `--all --jsonl` for machine consumption.
|
|
149
|
+
|
|
150
|
+
Recovery hints:
|
|
151
|
+
- No `--query` results: try fewer keywords, use a broader scope URI, or inspect chapter readiness and structure.
|
|
152
|
+
{{ commandName }} <archive-uri>/chapter
|
|
153
|
+
{{ commandName }} <archive-uri>/chapter/tree
|
|
154
|
+
{{ commandName }} help readiness
|
|
155
|
+
- Missing generated objects: start the relevant generation job for the chapter.
|
|
156
|
+
{{ commandName }} wikg://local/job add --input <archive-uri|chapter-uri> --task reading-graph --accept-cost
|
|
157
|
+
{{ commandName }} wikg://local/job add --input <archive-uri|chapter-uri> --task reading-summary --accept-cost
|
|
158
|
+
{{ commandName }} help readiness
|
|
159
|
+
{{ commandName }} help runtime
|
|
160
|
+
- URI rejected: convert bare filesystem paths to Wiki Graph URIs, and prepend the archive locator to short object URIs.
|
|
161
|
+
- Help did not appear: append `--help` to the URI or URI-bound predicate you are trying to inspect.
|
|
162
|
+
|
|
163
|
+
Job URIs:
|
|
164
|
+
Local jobs use the `wikg://local/job/` scheme and do not contain `.wikg` locators:
|
|
165
|
+
{{ commandName }} wikg://local/job
|
|
166
|
+
{{ commandName }} wikg://local/job/<job-id> --json
|
|
167
|
+
{{ commandName }} wikg://local/job/<job-id> watch --jsonl
|
|
168
|
+
|
|
169
|
+
Archive internals:
|
|
170
|
+
Do not unzip `.wikg` or read internal SQLite for routine retrieval. Use URI commands.
|
|
171
|
+
|
|
172
|
+
Related help:
|
|
173
|
+
- Search index, generated data, and provider prerequisites:
|
|
174
|
+
{{ commandName }} help readiness
|
|
175
|
+
- Stdin/stdout, create/import, export, transform, JSON, JSONL, and pipe-oriented output:
|
|
176
|
+
{{ commandName }} help format
|
|
177
|
+
- Local jobs, cache, logs, and runtime debugging:
|
|
178
|
+
{{ commandName }} help runtime
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ language }}" lang="{{ language }}">
|
|
3
|
+
<head>
|
|
4
|
+
<title>{{ title }}</title>
|
|
5
|
+
<style>
|
|
6
|
+
body { margin: 0; padding: 0; }
|
|
7
|
+
img { display: block; height: auto; width: 100%; }
|
|
8
|
+
</style>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<img src="../{{ coverImageHref }}" alt="{{ title }}"/>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="{{ language }}" lang="{{ language }}">
|
|
3
|
+
<head>
|
|
4
|
+
<title>{{ title }}</title>
|
|
5
|
+
</head>
|
|
6
|
+
<body>
|
|
7
|
+
<nav epub:type="toc" id="toc">
|
|
8
|
+
<h1>{{ title }}</h1>
|
|
9
|
+
{{ itemsMarkup | safe }}
|
|
10
|
+
</nav>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<package version="{{ version }}" unique-identifier="book-id" xmlns="http://www.idpf.org/2007/opf">
|
|
3
|
+
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
4
|
+
<dc:identifier id="book-id">{{ identifier }}</dc:identifier>
|
|
5
|
+
<dc:title>{{ title }}</dc:title>
|
|
6
|
+
<dc:language>{{ language }}</dc:language>
|
|
7
|
+
{% for author in authors %}
|
|
8
|
+
<dc:creator>{{ author }}</dc:creator>
|
|
9
|
+
{% endfor %}
|
|
10
|
+
{% if publisher %}
|
|
11
|
+
<dc:publisher>{{ publisher }}</dc:publisher>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if publishedAt %}
|
|
14
|
+
<dc:date>{{ publishedAt }}</dc:date>
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% if description %}
|
|
17
|
+
<dc:description>{{ description }}</dc:description>
|
|
18
|
+
{% endif %}
|
|
19
|
+
<meta property="dcterms:modified">{{ modifiedAt }}</meta>
|
|
20
|
+
</metadata>
|
|
21
|
+
<manifest>
|
|
22
|
+
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
|
|
23
|
+
{% for section in sections %}
|
|
24
|
+
<item id="{{ section.id }}" href="{{ section.href }}" media-type="application/xhtml+xml"/>
|
|
25
|
+
{% endfor %}
|
|
26
|
+
{% if coverImageHref %}
|
|
27
|
+
<item id="cover-image" href="{{ coverImageHref }}" media-type="{{ coverMediaType or "application/octet-stream" }}" properties="cover-image"/>
|
|
28
|
+
<item id="cover-page" href="{{ coverPageHref or "text/cover.xhtml" }}" media-type="application/xhtml+xml"/>
|
|
29
|
+
{% endif %}
|
|
30
|
+
</manifest>
|
|
31
|
+
<spine>
|
|
32
|
+
{% if coverPageHref %}
|
|
33
|
+
<itemref idref="cover-page"/>
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% for section in sections %}
|
|
36
|
+
<itemref idref="{{ section.id }}"/>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
</spine>
|
|
39
|
+
</package>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ language }}" lang="{{ language }}">
|
|
3
|
+
<head>
|
|
4
|
+
<title>{{ title }}</title>
|
|
5
|
+
</head>
|
|
6
|
+
<body>
|
|
7
|
+
<h1>{{ title }}</h1>
|
|
8
|
+
{% for paragraph in paragraphs %}
|
|
9
|
+
<p>{{ paragraph }}</p>
|
|
10
|
+
{% endfor %}
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|