@ontos-ai/knowhere-claw 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/_virtual/_rolldown/runtime.js +2 -1
- package/dist/config.js +115 -1
- package/dist/connect-builder.js +181 -0
- package/dist/graph-builder.js +204 -0
- package/dist/index.js +15 -3
- package/dist/kg-service.js +249 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js +212 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js +35 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.js +2609 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js +142 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js +103 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +199 -0
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/package.js +67 -0
- package/dist/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js +59 -0
- package/dist/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +11 -0
- package/dist/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js +119 -0
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/index.js +13 -0
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-base.js +16 -0
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-group.js +98 -0
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-stream.js +37 -0
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker.js +32 -0
- package/dist/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +53 -0
- package/dist/node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js +132 -0
- package/dist/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js +18 -0
- package/dist/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +19 -0
- package/dist/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js +104 -0
- package/dist/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js +104 -0
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js +221 -0
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js +26 -0
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js +48 -0
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js +24 -0
- package/dist/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +10 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy-sync.js +120 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy.js +100 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/index.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/empty/index.js +43 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/file.js +53 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/index.js +27 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/link.js +56 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-paths.js +89 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-type.js +35 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink.js +81 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/fs/index.js +113 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/index.js +29 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/index.js +22 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/jsonfile.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json-sync.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/index.js +20 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/make-dir.js +33 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/utils.js +17 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/index.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move-sync.js +56 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move.js +49 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/output-file/index.js +30 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/path-exists/index.js +18 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/remove/index.js +27 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/async.js +15 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/stat.js +131 -0
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/utimes.js +34 -0
- package/dist/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +51 -0
- package/dist/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +171 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/base-theme.js +21 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/error.js +27 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/has-color.js +9 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/index.js +224 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/plumbing.js +48 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/process.js +8 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/progress-bar.js +46 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/render-template.js +155 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/set-immediate.js +14 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/set-interval.js +8 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/spin.js +10 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/template-item.js +58 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/theme-set.js +99 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/themes.js +67 -0
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/wide-truncate.js +22 -0
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js +162 -0
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js +451 -0
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js +280 -0
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +20 -0
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +362 -0
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +92 -0
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +255 -0
- package/dist/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js +14 -0
- package/dist/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +45 -0
- package/dist/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +27 -0
- package/dist/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +14 -0
- package/dist/node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js +68 -0
- package/dist/node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js +19 -0
- package/dist/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js +578 -0
- package/dist/node_modules/.pnpm/nodejieba@2.6.0/node_modules/nodejieba/index.js +46 -0
- package/dist/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js +330 -0
- package/dist/node_modules/.pnpm/npmlog@5.0.1/node_modules/npmlog/log.js +305 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +54 -0
- package/dist/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +44 -0
- package/dist/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +19 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js +88 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js +19 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js +666 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js +89 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js +423 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js +172 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js +243 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js +77 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +87 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js +10 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js +80 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js +21 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js +8 -0
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js +23 -0
- package/dist/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js +229 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +79 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +282 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +186 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +14 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +41 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +34 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +15 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +32 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +14 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +14 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +99 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +8 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +23 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +36 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +15 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +84 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +15 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +31 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +31 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +45 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +64 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +35 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +102 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +11 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +17 -0
- package/dist/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/index.js +12 -0
- package/dist/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +130 -0
- package/dist/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +16 -0
- package/dist/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js +30 -0
- package/dist/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js +10 -0
- package/dist/node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js +26 -0
- package/dist/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js +59 -0
- package/dist/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/align.js +52 -0
- package/dist/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +26 -0
- package/dist/tools.js +163 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +15 -6
- package/skills/knowhere/SKILL.md +1 -1
- package/dist/__tests__/channel-route.test.d.ts +0 -1
- package/dist/__tests__/ingest-tool.test.d.ts +0 -1
- package/dist/__tests__/read-result-file-tool.test.d.ts +0 -1
- package/dist/__tests__/tracker-progress.test.d.ts +0 -1
- package/dist/channel-delivery.d.ts +0 -21
- package/dist/client.d.ts +0 -33
- package/dist/config.d.ts +0 -12
- package/dist/error-message.d.ts +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/parser.d.ts +0 -16
- package/dist/session.d.ts +0 -11
- package/dist/store.d.ts +0 -79
- package/dist/text.d.ts +0 -10
- package/dist/tools.d.ts +0 -8
- package/dist/tracker-progress.d.ts +0 -10
- package/dist/types.d.ts +0 -248
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ontos-ai/knowhere-claw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "OpenClaw plugin for Knowhere-powered document ingestion and automatic grounding.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -18,27 +18,36 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "rolldown -c
|
|
21
|
+
"build": "rolldown -c",
|
|
22
|
+
"changeset": "changeset",
|
|
23
|
+
"changeset:publish": "changeset publish",
|
|
22
24
|
"fmt": "oxfmt",
|
|
23
25
|
"fmt:check": "oxfmt --check",
|
|
24
26
|
"lint": "oxlint --type-aware",
|
|
25
27
|
"lint:fix": "oxlint --type-aware --fix",
|
|
26
28
|
"smoke:tools": "vite-node --mode smoke ./smoketest/run-tool.ts",
|
|
29
|
+
"release:beta": "node ./scripts/publish-beta-release.mjs",
|
|
30
|
+
"release:publish": "node ./scripts/publish-release.mjs",
|
|
31
|
+
"release:version": "node ./scripts/release-version.mjs",
|
|
27
32
|
"tsgo": "tsgo --noEmit -p tsconfig.json",
|
|
28
33
|
"typecheck": "pnpm tsgo",
|
|
29
34
|
"check:plugin-version": "node ./scripts/release-guard.mjs plugin-version",
|
|
30
|
-
"check:beta-version": "node ./scripts/release-guard.mjs beta-version",
|
|
31
35
|
"prepack": "pnpm build",
|
|
32
36
|
"test": "vitest --run",
|
|
33
37
|
"clean": "rm -rf dist"
|
|
34
38
|
},
|
|
35
39
|
"dependencies": {
|
|
36
40
|
"@knowhere-ai/sdk": "^0.1.1",
|
|
37
|
-
"fflate": "^0.8.2"
|
|
41
|
+
"fflate": "^0.8.2",
|
|
42
|
+
"fs-extra": "^11.2.0",
|
|
43
|
+
"nodejieba": "^2.6.0"
|
|
38
44
|
},
|
|
39
45
|
"devDependencies": {
|
|
46
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
47
|
+
"@changesets/cli": "^2.30.0",
|
|
40
48
|
"@tsconfig/node22": "^22.0.5",
|
|
41
|
-
"@types/
|
|
49
|
+
"@types/fs-extra": "^11.0.4",
|
|
50
|
+
"@types/node": "^25.4.0",
|
|
42
51
|
"@typescript/native-preview": "7.0.0-dev.20260307.1",
|
|
43
52
|
"oxfmt": "0.38.0",
|
|
44
53
|
"oxlint": "^1.51.0",
|
|
@@ -60,4 +69,4 @@
|
|
|
60
69
|
"./dist/index.js"
|
|
61
70
|
]
|
|
62
71
|
}
|
|
63
|
-
}
|
|
72
|
+
}
|
package/skills/knowhere/SKILL.md
CHANGED
|
@@ -132,7 +132,7 @@ After ingesting a document, use the returned document or job identifiers for fol
|
|
|
132
132
|
## Recommended workflow
|
|
133
133
|
|
|
134
134
|
1. If the document may already exist in the current scope, call `knowhere_list_documents` first and compare `Source`, `File`, and `Title` to find an existing match.
|
|
135
|
-
2. Ingest or import the document only if it is not already in the store, or if the user explicitly wants a fresh parse. After calling `knowhere_ingest_document`, you receive a job ID immediately while parsing continues in the background.
|
|
135
|
+
2. Ingest or import the document only if it is not already in the store, or if the user explicitly wants a fresh parse. After calling `knowhere_ingest_document`, you receive a job ID immediately while parsing continues in the background. If the current turn needs the parsed document, check with `knowhere_get_job_status`; otherwise stop and wait for the user to continue later.
|
|
136
136
|
3. Call `knowhere_list_documents` again if you need to confirm the right `docId`.
|
|
137
137
|
4. Call `knowhere_preview_document` to get a structural overview (table of contents with summaries).
|
|
138
138
|
5. When you know what to search for, call `knowhere_grep` with `conditions: [{ pattern: "your query" }]` — this searches all text fields (content, summary, keywords, path) in one call. Add more conditions to narrow results (e.g. filter by `chunk.type` or `chunk.path`).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
-
import type { ChannelRouteRecord } from "./types";
|
|
3
|
-
type DeliverySurface = "discord" | "imessage" | "line" | "signal" | "slack" | "telegram" | "whatsapp";
|
|
4
|
-
type DeliveryResult = {
|
|
5
|
-
delivered: boolean;
|
|
6
|
-
surface?: DeliverySurface;
|
|
7
|
-
to?: string;
|
|
8
|
-
accountId?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function deliverChannelMessage(params: {
|
|
11
|
-
api: OpenClawPluginApi;
|
|
12
|
-
operationLabel: string;
|
|
13
|
-
context?: unknown;
|
|
14
|
-
sessionKey?: string;
|
|
15
|
-
messages?: unknown[];
|
|
16
|
-
channelRoute?: ChannelRouteRecord;
|
|
17
|
-
text: string;
|
|
18
|
-
mediaUrl?: string;
|
|
19
|
-
mediaLocalRoots?: readonly string[];
|
|
20
|
-
}): Promise<DeliveryResult>;
|
|
21
|
-
export {};
|
package/dist/client.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { KnowhereIngestRequest, KnowhereIngestResult, KnowhereJobList, KnowhereJobListRequest, KnowhereJobResult } from "./types";
|
|
2
|
-
export declare class KnowhereClient {
|
|
3
|
-
private readonly apiKey;
|
|
4
|
-
private readonly baseUrl;
|
|
5
|
-
private readonly requestTimeoutMs;
|
|
6
|
-
private readonly uploadTimeoutMs;
|
|
7
|
-
private readonly pollIntervalMs;
|
|
8
|
-
private readonly pollTimeoutMs;
|
|
9
|
-
private readonly logger;
|
|
10
|
-
private readonly sdk;
|
|
11
|
-
constructor(params: {
|
|
12
|
-
apiKey: string;
|
|
13
|
-
baseUrl: string;
|
|
14
|
-
requestTimeoutMs: number;
|
|
15
|
-
uploadTimeoutMs: number;
|
|
16
|
-
pollIntervalMs: number;
|
|
17
|
-
pollTimeoutMs: number;
|
|
18
|
-
logger: {
|
|
19
|
-
debug?: (message: string) => void;
|
|
20
|
-
info: (message: string) => void;
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
ingestDocument(params: KnowhereIngestRequest): Promise<KnowhereIngestResult>;
|
|
24
|
-
private logPollProgress;
|
|
25
|
-
getJob(jobId: string): Promise<KnowhereJobResult>;
|
|
26
|
-
listJobs(options?: KnowhereJobListRequest): Promise<KnowhereJobList>;
|
|
27
|
-
getCompletedJobResult(jobId: string): Promise<KnowhereIngestResult>;
|
|
28
|
-
private downloadResultArchive;
|
|
29
|
-
private uploadFile;
|
|
30
|
-
private requestJson;
|
|
31
|
-
private requestBuffer;
|
|
32
|
-
private request;
|
|
33
|
-
}
|
package/dist/config.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
-
import type { JsonSchemaObject, ResolvedKnowhereConfig } from "./types";
|
|
3
|
-
export declare const DEFAULT_BASE_URL = "https://api.knowhereto.ai";
|
|
4
|
-
export declare const knowherePluginConfigSchema: JsonSchemaObject;
|
|
5
|
-
export declare function resolveKnowhereConfig(api: OpenClawPluginApi): ResolvedKnowhereConfig;
|
|
6
|
-
export declare const API_KEY_URL = "https://knowhereto.ai/api-keys";
|
|
7
|
-
export declare const PURCHASE_CREDITS_URL = "https://knowhereto.ai/usage?buy=true";
|
|
8
|
-
export declare function assertKnowhereApiKey(config: ResolvedKnowhereConfig): void;
|
|
9
|
-
export declare function isPaymentRequiredError(error: unknown): boolean;
|
|
10
|
-
export declare function formatPaymentRequiredMessage(): string;
|
|
11
|
-
export declare function readPersistedApiKey(storageDir: string): Promise<string | null>;
|
|
12
|
-
export declare function persistApiKey(storageDir: string, apiKey: string): Promise<void>;
|
package/dist/error-message.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function formatErrorMessage(error: unknown): string;
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
-
declare const plugin: {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
configSchema: import("./types").JsonSchemaObject;
|
|
7
|
-
register(api: OpenClawPluginApi): void;
|
|
8
|
-
};
|
|
9
|
-
export default plugin;
|
package/dist/parser.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { KnowhereDownloadedResult, KnowhereManifest, KnowhereParseResult, KnowhereStatistics, StoredBrowseIndex, StoredChunk } from "./types";
|
|
2
|
-
type KnowhereStoredResultSummary = {
|
|
3
|
-
manifest: KnowhereManifest;
|
|
4
|
-
chunkCount: number;
|
|
5
|
-
statistics: KnowhereStatistics;
|
|
6
|
-
};
|
|
7
|
-
export declare const STORED_BROWSE_INDEX_VERSION = 2;
|
|
8
|
-
export declare function resolveResultEntryPath(rootDir: string, entryPath: string): string;
|
|
9
|
-
export declare function buildStoredPathPrefixes(storedPath: string): string[];
|
|
10
|
-
export declare function isStoredBrowseIndex(value: unknown): value is StoredBrowseIndex;
|
|
11
|
-
export declare function buildStoredBrowseIndex(resultDir: string, manifest: KnowhereManifest, chunks: StoredChunk[]): Promise<StoredBrowseIndex>;
|
|
12
|
-
export declare function extractKnowhereResultArchive(downloadedResult: KnowhereDownloadedResult, targetDir: string): Promise<void>;
|
|
13
|
-
export declare function readStoredKnowhereResultSummary(resultDir: string): Promise<KnowhereStoredResultSummary>;
|
|
14
|
-
export declare function readStoredKnowhereResultContent(resultDir: string): Promise<Omit<KnowhereParseResult, "browseIndex">>;
|
|
15
|
-
export declare function readStoredKnowhereParseResult(resultDir: string): Promise<KnowhereParseResult>;
|
|
16
|
-
export {};
|
package/dist/session.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type ParsedConversationSessionKey = {
|
|
2
|
-
agentId: string;
|
|
3
|
-
surface: string;
|
|
4
|
-
remainder: string;
|
|
5
|
-
segments: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare function parseConversationSessionKey(sessionKey: string | undefined): ParsedConversationSessionKey | undefined;
|
|
8
|
-
export declare function normalizeConversationScopeKey(sessionKey: string | undefined): string | undefined;
|
|
9
|
-
export declare function resolveSharedConversationScopeKey(sessionKey: string | undefined): string | undefined;
|
|
10
|
-
export declare function findConversationSegmentValue(session: ParsedConversationSessionKey | undefined, ...keys: string[]): string | undefined;
|
|
11
|
-
export declare function deriveMessageContextScopeKey(context: unknown): string | undefined;
|
package/dist/store.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { ChannelRouteRecord, KnowhereScope, PluginLogger, SaveStoredDocumentPayload, ScopeMode, StoredDocumentPayload, StoredDocumentRecord } from "./types";
|
|
2
|
-
export declare class KnowhereStore {
|
|
3
|
-
private readonly rootDir;
|
|
4
|
-
private readonly scopeMode;
|
|
5
|
-
private readonly logger;
|
|
6
|
-
private readonly indexCache;
|
|
7
|
-
private readonly documentPayloadCache;
|
|
8
|
-
private readonly scopeAccessChains;
|
|
9
|
-
private readonly scopeKeyAliases;
|
|
10
|
-
private readonly sessionScopeKeysBySessionId;
|
|
11
|
-
private readonly sessionScopeKeysBySessionKey;
|
|
12
|
-
private readonly channelRoutes;
|
|
13
|
-
private routesLoaded;
|
|
14
|
-
constructor(params: {
|
|
15
|
-
rootDir: string;
|
|
16
|
-
scopeMode: ScopeMode;
|
|
17
|
-
logger: PluginLogger;
|
|
18
|
-
});
|
|
19
|
-
registerScopeAlias(context: {
|
|
20
|
-
scopeKey: string;
|
|
21
|
-
sessionKey?: string;
|
|
22
|
-
sessionId?: string;
|
|
23
|
-
}): string;
|
|
24
|
-
registerMessageScope(context: {
|
|
25
|
-
sessionKey?: string;
|
|
26
|
-
sessionId?: string;
|
|
27
|
-
messageContext: unknown;
|
|
28
|
-
}): string | undefined;
|
|
29
|
-
registerChannelRoute(params: {
|
|
30
|
-
channelId: string;
|
|
31
|
-
accountId?: string;
|
|
32
|
-
conversationId?: string;
|
|
33
|
-
}): Promise<void>;
|
|
34
|
-
resolveChannelRoute(params: {
|
|
35
|
-
channelId?: string;
|
|
36
|
-
conversationId?: string;
|
|
37
|
-
sessionKey?: string;
|
|
38
|
-
}): Promise<ChannelRouteRecord | undefined>;
|
|
39
|
-
private lookupChannelRoute;
|
|
40
|
-
inheritScopeAlias(context: {
|
|
41
|
-
childSessionKey?: string;
|
|
42
|
-
childSessionId?: string;
|
|
43
|
-
requesterSessionKey?: string;
|
|
44
|
-
requesterSessionId?: string;
|
|
45
|
-
}): string | undefined;
|
|
46
|
-
resolveScope(context?: {
|
|
47
|
-
agentId?: string;
|
|
48
|
-
sessionKey?: string;
|
|
49
|
-
sessionId?: string;
|
|
50
|
-
}): KnowhereScope;
|
|
51
|
-
listDocuments(scope: KnowhereScope): Promise<StoredDocumentRecord[]>;
|
|
52
|
-
loadDocumentPayload(scope: KnowhereScope, docId: string): Promise<StoredDocumentPayload | null>;
|
|
53
|
-
getResultFileAbsolutePath(scope: KnowhereScope, docId: string, relativePath: string): string;
|
|
54
|
-
readResultFile(scope: KnowhereScope, docId: string, relativePath: string): Promise<{
|
|
55
|
-
document: StoredDocumentRecord;
|
|
56
|
-
relativePath: string;
|
|
57
|
-
text: string | null;
|
|
58
|
-
} | null>;
|
|
59
|
-
saveDownloadedDocument(scope: KnowhereScope, payload: SaveStoredDocumentPayload, options?: {
|
|
60
|
-
overwrite?: boolean;
|
|
61
|
-
}): Promise<StoredDocumentRecord>;
|
|
62
|
-
removeDocument(scope: KnowhereScope, docId: string): Promise<StoredDocumentRecord | null>;
|
|
63
|
-
clearScope(scope: KnowhereScope): Promise<StoredDocumentRecord[]>;
|
|
64
|
-
private getIndex;
|
|
65
|
-
private persistIndex;
|
|
66
|
-
private runWithScopeAccessLock;
|
|
67
|
-
private removeDocumentArtifacts;
|
|
68
|
-
private buildDocumentPayloadCacheKey;
|
|
69
|
-
private touchDocumentPayloadCache;
|
|
70
|
-
private deleteDocumentPayloadCache;
|
|
71
|
-
private deleteScopeDocumentPayloadCaches;
|
|
72
|
-
private loadOrBuildBrowseIndex;
|
|
73
|
-
private buildRouteKey;
|
|
74
|
-
private ensureRoutesLoaded;
|
|
75
|
-
private persistRoutes;
|
|
76
|
-
private resolveCanonicalScopeKey;
|
|
77
|
-
private resolveKnownScopeKey;
|
|
78
|
-
private rebuildIndex;
|
|
79
|
-
}
|
package/dist/text.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function normalizeWhitespace(value: unknown): string;
|
|
2
|
-
export declare function truncateText(value: unknown, maxChars: number): string;
|
|
3
|
-
export declare function slugify(value: unknown, fallback?: string): string;
|
|
4
|
-
export declare function hashString(value: string): string;
|
|
5
|
-
export declare function sanitizeStringArray(value: unknown): string[];
|
|
6
|
-
export declare function toComparableText(value: unknown): string;
|
|
7
|
-
export declare function stripHtmlTags(text: string): string;
|
|
8
|
-
export declare function stripLatex(text: string): string;
|
|
9
|
-
export declare function normalizeUnicode(text: string): string;
|
|
10
|
-
export declare function normalizeForGrep(text: string): string;
|
package/dist/tools.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type AnyAgentTool, type OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
-
import { KnowhereStore } from "./store";
|
|
3
|
-
import type { ResolvedKnowhereConfig, ToolRuntimeContext } from "./types";
|
|
4
|
-
export declare function createKnowhereToolFactory(params: {
|
|
5
|
-
api: OpenClawPluginApi;
|
|
6
|
-
config: ResolvedKnowhereConfig;
|
|
7
|
-
store: KnowhereStore;
|
|
8
|
-
}): (ctx: ToolRuntimeContext) => AnyAgentTool[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
-
import type { ChannelRouteRecord } from "./types";
|
|
3
|
-
export declare function sendTrackerProgress(params: {
|
|
4
|
-
api: OpenClawPluginApi;
|
|
5
|
-
context?: unknown;
|
|
6
|
-
sessionKey?: string;
|
|
7
|
-
messages?: unknown[];
|
|
8
|
-
channelRoute?: ChannelRouteRecord;
|
|
9
|
-
text: string;
|
|
10
|
-
}): Promise<boolean>;
|
package/dist/types.d.ts
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
export type ScopeMode = "session" | "agent" | "global";
|
|
2
|
-
export type StringRecord = Record<string, unknown>;
|
|
3
|
-
export interface PluginLogger {
|
|
4
|
-
debug?: (message: string) => void;
|
|
5
|
-
info: (message: string) => void;
|
|
6
|
-
warn: (message: string) => void;
|
|
7
|
-
error: (message: string) => void;
|
|
8
|
-
}
|
|
9
|
-
export interface ToolRuntimeContext {
|
|
10
|
-
workspaceDir?: string;
|
|
11
|
-
agentId?: string;
|
|
12
|
-
accountId?: string;
|
|
13
|
-
sessionKey?: string;
|
|
14
|
-
sessionId?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ResolvedKnowhereConfig {
|
|
17
|
-
apiKey: string;
|
|
18
|
-
baseUrl: string;
|
|
19
|
-
storageDir: string;
|
|
20
|
-
scopeMode: ScopeMode;
|
|
21
|
-
pollIntervalMs: number;
|
|
22
|
-
pollTimeoutMs: number;
|
|
23
|
-
requestTimeoutMs: number;
|
|
24
|
-
uploadTimeoutMs: number;
|
|
25
|
-
}
|
|
26
|
-
export interface KnowhereStatistics {
|
|
27
|
-
total_chunks?: number;
|
|
28
|
-
text_chunks?: number;
|
|
29
|
-
image_chunks?: number;
|
|
30
|
-
table_chunks?: number;
|
|
31
|
-
total_pages?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface KnowhereChecksum {
|
|
34
|
-
algorithm?: string;
|
|
35
|
-
value?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface KnowhereManifest {
|
|
38
|
-
version?: string;
|
|
39
|
-
job_id?: string;
|
|
40
|
-
data_id?: string;
|
|
41
|
-
source_file_name?: string;
|
|
42
|
-
processing_date?: string;
|
|
43
|
-
checksum?: KnowhereChecksum;
|
|
44
|
-
statistics?: KnowhereStatistics;
|
|
45
|
-
files?: StringRecord;
|
|
46
|
-
}
|
|
47
|
-
export interface StoredChunk {
|
|
48
|
-
chunkId: string;
|
|
49
|
-
type: "text" | "image" | "table";
|
|
50
|
-
path: string | null;
|
|
51
|
-
summary: string;
|
|
52
|
-
content: string;
|
|
53
|
-
tokens: number | null;
|
|
54
|
-
keywords: string[];
|
|
55
|
-
relationships: unknown[];
|
|
56
|
-
metadata: StringRecord;
|
|
57
|
-
assetFilePath: string | null;
|
|
58
|
-
originalName: string | null;
|
|
59
|
-
tableType: string | null;
|
|
60
|
-
}
|
|
61
|
-
export interface StoredPathRecord {
|
|
62
|
-
path: string;
|
|
63
|
-
parentPath: string | null;
|
|
64
|
-
depth: number;
|
|
65
|
-
childPaths: string[];
|
|
66
|
-
chunkIds: string[];
|
|
67
|
-
directChunkCount: number;
|
|
68
|
-
chunkCount: number;
|
|
69
|
-
textChunkCount: number;
|
|
70
|
-
imageChunkCount: number;
|
|
71
|
-
tableChunkCount: number;
|
|
72
|
-
}
|
|
73
|
-
export type StoredResultFileKind = "manifest" | "chunks" | "fullMarkdown" | "kbCsv" | "hierarchy" | "hierarchyView" | "image" | "table" | "other";
|
|
74
|
-
export interface StoredResultFileRecord {
|
|
75
|
-
relativePath: string;
|
|
76
|
-
kind: StoredResultFileKind;
|
|
77
|
-
chunkId: string | null;
|
|
78
|
-
format: string | null;
|
|
79
|
-
sizeBytes: number | null;
|
|
80
|
-
}
|
|
81
|
-
export interface StoredBrowseIndex {
|
|
82
|
-
version: number;
|
|
83
|
-
paths: StoredPathRecord[];
|
|
84
|
-
chunkOrder: string[];
|
|
85
|
-
resultFiles: StoredResultFileRecord[];
|
|
86
|
-
}
|
|
87
|
-
export interface KnowhereParseResult {
|
|
88
|
-
manifest: KnowhereManifest;
|
|
89
|
-
chunks: StoredChunk[];
|
|
90
|
-
fullMarkdown: string;
|
|
91
|
-
hierarchy: unknown;
|
|
92
|
-
browseIndex: StoredBrowseIndex;
|
|
93
|
-
}
|
|
94
|
-
export interface KnowhereDownloadedResult {
|
|
95
|
-
zipBytes: Buffer;
|
|
96
|
-
rawZipSha1: string;
|
|
97
|
-
}
|
|
98
|
-
export interface KnowhereJob {
|
|
99
|
-
job_id: string;
|
|
100
|
-
status: string;
|
|
101
|
-
source_type: string;
|
|
102
|
-
data_id?: string | null;
|
|
103
|
-
created_at?: string | null;
|
|
104
|
-
upload_url?: string | null;
|
|
105
|
-
upload_headers?: Record<string, string> | null;
|
|
106
|
-
expires_in?: number | null;
|
|
107
|
-
}
|
|
108
|
-
export interface KnowhereJobError {
|
|
109
|
-
code?: string;
|
|
110
|
-
message?: string;
|
|
111
|
-
request_id?: string;
|
|
112
|
-
details?: unknown;
|
|
113
|
-
}
|
|
114
|
-
export interface KnowhereJobResult {
|
|
115
|
-
job_id: string;
|
|
116
|
-
status: string;
|
|
117
|
-
source_type: string;
|
|
118
|
-
data_id?: string | null;
|
|
119
|
-
created_at?: string | null;
|
|
120
|
-
progress?: unknown;
|
|
121
|
-
error?: KnowhereJobError | null;
|
|
122
|
-
result?: StringRecord | null;
|
|
123
|
-
result_url?: string | null;
|
|
124
|
-
result_url_expires_at?: string | null;
|
|
125
|
-
file_name?: string | null;
|
|
126
|
-
file_extension?: string | null;
|
|
127
|
-
model?: string | null;
|
|
128
|
-
ocr_enabled?: boolean | null;
|
|
129
|
-
duration_seconds?: number | null;
|
|
130
|
-
credits_spent?: number | null;
|
|
131
|
-
}
|
|
132
|
-
export interface KnowhereJobList {
|
|
133
|
-
jobs: KnowhereJobResult[];
|
|
134
|
-
total: number;
|
|
135
|
-
page: number;
|
|
136
|
-
pageSize: number;
|
|
137
|
-
totalPages: number;
|
|
138
|
-
}
|
|
139
|
-
export interface KnowhereJobListRequest {
|
|
140
|
-
page?: number;
|
|
141
|
-
pageSize?: number;
|
|
142
|
-
jobStatus?: string;
|
|
143
|
-
jobType?: string;
|
|
144
|
-
recentDays?: 1 | 7 | 30;
|
|
145
|
-
startTime?: string;
|
|
146
|
-
endTime?: string;
|
|
147
|
-
}
|
|
148
|
-
export interface KnowhereParsingParams {
|
|
149
|
-
model?: "base" | "advanced";
|
|
150
|
-
ocr_enabled?: boolean;
|
|
151
|
-
kb_dir?: string;
|
|
152
|
-
doc_type?: string;
|
|
153
|
-
smart_title_parse?: boolean;
|
|
154
|
-
summary_image?: boolean;
|
|
155
|
-
summary_table?: boolean;
|
|
156
|
-
summary_txt?: boolean;
|
|
157
|
-
add_frag_desc?: string;
|
|
158
|
-
}
|
|
159
|
-
export interface KnowhereIngestRequest {
|
|
160
|
-
filePath?: string;
|
|
161
|
-
fileName?: string;
|
|
162
|
-
url?: string;
|
|
163
|
-
dataId?: string;
|
|
164
|
-
parsingParams?: KnowhereParsingParams;
|
|
165
|
-
onJobCreated?: (job: KnowhereJob) => void | Promise<void>;
|
|
166
|
-
onJobUpdated?: (jobResult: KnowhereJobResult) => void | Promise<void>;
|
|
167
|
-
}
|
|
168
|
-
export interface KnowhereIngestResult {
|
|
169
|
-
job: KnowhereJob;
|
|
170
|
-
jobResult: KnowhereJobResult;
|
|
171
|
-
downloadedResult: KnowhereDownloadedResult;
|
|
172
|
-
}
|
|
173
|
-
export interface KnowhereScope {
|
|
174
|
-
mode: ScopeMode | "global";
|
|
175
|
-
key: string;
|
|
176
|
-
label: string;
|
|
177
|
-
rootDir: string;
|
|
178
|
-
documentsDir: string;
|
|
179
|
-
indexPath: string;
|
|
180
|
-
}
|
|
181
|
-
export interface StoredDocumentRecord {
|
|
182
|
-
id: string;
|
|
183
|
-
title: string;
|
|
184
|
-
sourceType: "file" | "url";
|
|
185
|
-
source: string;
|
|
186
|
-
sourceLabel: string;
|
|
187
|
-
fileName: string | null;
|
|
188
|
-
originalFileName: string | null;
|
|
189
|
-
dataId: string | null;
|
|
190
|
-
jobId: string | null;
|
|
191
|
-
checksum: string | null;
|
|
192
|
-
resultUrl: string | null;
|
|
193
|
-
resultUrlExpiresAt: string | null;
|
|
194
|
-
scopeLabel: string;
|
|
195
|
-
tags: string[];
|
|
196
|
-
ingestedAt: string;
|
|
197
|
-
updatedAt: string;
|
|
198
|
-
chunkCount: number;
|
|
199
|
-
statistics: KnowhereStatistics;
|
|
200
|
-
}
|
|
201
|
-
export interface StoredDocumentPayload {
|
|
202
|
-
version: number;
|
|
203
|
-
document: StoredDocumentRecord;
|
|
204
|
-
manifest: KnowhereManifest;
|
|
205
|
-
jobResult: KnowhereJobResult;
|
|
206
|
-
fullMarkdown: string;
|
|
207
|
-
hierarchy: unknown;
|
|
208
|
-
browseIndex: StoredBrowseIndex;
|
|
209
|
-
rawZipSha1: string;
|
|
210
|
-
chunks: StoredChunk[];
|
|
211
|
-
}
|
|
212
|
-
export interface StoredDocumentMetadata {
|
|
213
|
-
version: number;
|
|
214
|
-
document: StoredDocumentRecord;
|
|
215
|
-
jobResult: KnowhereJobResult;
|
|
216
|
-
rawZipSha1: string;
|
|
217
|
-
}
|
|
218
|
-
export interface KnowhereIndex {
|
|
219
|
-
version: number;
|
|
220
|
-
scopeMode: string;
|
|
221
|
-
scopeKey: string;
|
|
222
|
-
updatedAt: string | null;
|
|
223
|
-
documents: StoredDocumentRecord[];
|
|
224
|
-
}
|
|
225
|
-
export interface SaveStoredDocumentPayload {
|
|
226
|
-
sourceType: "file" | "url";
|
|
227
|
-
source: string;
|
|
228
|
-
sourceLabel?: string;
|
|
229
|
-
fileName: string | null;
|
|
230
|
-
docId?: string;
|
|
231
|
-
title?: string;
|
|
232
|
-
dataId?: string;
|
|
233
|
-
tags: string[];
|
|
234
|
-
job: KnowhereJob;
|
|
235
|
-
jobResult: KnowhereJobResult;
|
|
236
|
-
downloadedResult: KnowhereDownloadedResult;
|
|
237
|
-
}
|
|
238
|
-
export interface JsonSchemaObject {
|
|
239
|
-
[key: string]: unknown;
|
|
240
|
-
}
|
|
241
|
-
export interface ChannelRouteRecord {
|
|
242
|
-
readonly channelId: string;
|
|
243
|
-
readonly accountId: string;
|
|
244
|
-
readonly conversationId?: string;
|
|
245
|
-
readonly updatedAt: string;
|
|
246
|
-
}
|
|
247
|
-
export declare function isRecord(value: unknown): value is StringRecord;
|
|
248
|
-
export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException;
|