@ontos-ai/knowhere-claw 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/channel-route.test.d.ts +1 -0
- package/dist/__tests__/ingest-tool.test.d.ts +1 -0
- package/dist/__tests__/kg-service-test-helper.d.ts +2 -0
- package/dist/__tests__/kg-service.test.d.ts +1 -0
- package/dist/__tests__/read-result-file-tool.test.d.ts +1 -0
- package/dist/__tests__/tracker-progress.test.d.ts +1 -0
- package/dist/_virtual/_rolldown/runtime.js +1 -35
- package/dist/channel-delivery.d.ts +21 -0
- package/dist/client.d.ts +33 -0
- package/dist/client.js +1 -1
- package/dist/config.d.ts +13 -0
- package/dist/connect-builder.d.ts +48 -0
- package/dist/connect-builder.js +1 -2
- package/dist/error-message.d.ts +1 -0
- package/dist/graph-builder.d.ts +75 -0
- package/dist/graph-builder.js +9 -5
- package/dist/index.d.ts +9 -0
- package/dist/kg-service.d.ts +38 -0
- package/dist/kg-service.js +39 -33
- package/dist/parser.d.ts +16 -0
- package/dist/parser.js +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/store.d.ts +79 -0
- package/dist/text.d.ts +10 -0
- package/dist/tools.d.ts +10 -0
- package/dist/tracker-progress.d.ts +10 -0
- package/dist/types.d.ts +320 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +4 -3
- package/dist/node_modules/.pnpm/@knowhere-ai_sdk@0.1.1/node_modules/@knowhere-ai/sdk/dist/index.js +0 -717
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js +0 -212
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js +0 -35
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.js +0 -2609
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js +0 -142
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js +0 -103
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +0 -199
- package/dist/node_modules/.pnpm/@mapbox_node-pre-gyp@1.0.11/node_modules/@mapbox/node-pre-gyp/package.js +0 -67
- package/dist/node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js +0 -59
- package/dist/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +0 -11
- package/dist/node_modules/.pnpm/aproba@2.1.0/node_modules/aproba/index.js +0 -119
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/index.js +0 -13
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-base.js +0 -16
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-group.js +0 -98
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -37
- package/dist/node_modules/.pnpm/are-we-there-yet@2.0.0/node_modules/are-we-there-yet/lib/tracker.js +0 -32
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/adapters/adapters.js +0 -83
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/adapters/fetch.js +0 -170
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/adapters/xhr.js +0 -106
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/axios.js +0 -57
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/cancel/CancelToken.js +0 -90
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/cancel/CanceledError.js +0 -20
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/cancel/isCancel.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/Axios.js +0 -174
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/AxiosError.js +0 -70
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/AxiosHeaders.js +0 -204
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/InterceptorManager.js +0 -60
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/buildFullPath.js +0 -20
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/dispatchRequest.js +0 -52
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/mergeConfig.js +0 -81
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/settle.js +0 -18
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/core/transformData.js +0 -25
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/defaults/index.js +0 -107
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/defaults/transitional.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/env/data.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -50
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/bind.js +0 -15
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/buildURL.js +0 -40
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/composeSignals.js +0 -39
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/cookies.js +0 -31
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/formDataToJSON.js +0 -67
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/progressEventReducer.js +0 -38
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/resolveConfig.js +0 -36
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/speedometer.js +0 -36
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/spread.js +0 -29
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/throttle.js +0 -38
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/toFormData.js +0 -151
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -18
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/trackStream.js +0 -69
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/helpers/validator.js +0 -76
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -5
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/browser/index.js +0 -22
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/common/utils.js +0 -46
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/platform/index.js +0 -9
- package/dist/node_modules/.pnpm/axios@1.13.6/node_modules/axios/lib/utils.js +0 -698
- package/dist/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -53
- package/dist/node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js +0 -132
- package/dist/node_modules/.pnpm/color-support@1.1.3/node_modules/color-support/browser.js +0 -18
- package/dist/node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +0 -19
- package/dist/node_modules/.pnpm/console-control-strings@1.1.0/node_modules/console-control-strings/index.js +0 -104
- package/dist/node_modules/.pnpm/delegates@1.0.0/node_modules/delegates/index.js +0 -104
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js +0 -221
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js +0 -26
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js +0 -48
- package/dist/node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js +0 -24
- package/dist/node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +0 -10
- package/dist/node_modules/.pnpm/fflate@0.8.2/node_modules/fflate/esm/browser.js +0 -426
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy-sync.js +0 -120
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy.js +0 -100
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/index.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/empty/index.js +0 -43
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/file.js +0 -53
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/index.js +0 -27
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/link.js +0 -56
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -89
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -35
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink.js +0 -81
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/fs/index.js +0 -113
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/index.js +0 -29
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/index.js +0 -22
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/jsonfile.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json-sync.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/index.js +0 -20
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -33
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/utils.js +0 -17
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/index.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move-sync.js +0 -56
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move.js +0 -49
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/output-file/index.js +0 -30
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/path-exists/index.js +0 -18
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/remove/index.js +0 -27
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/async.js +0 -15
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/stat.js +0 -131
- package/dist/node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/utimes.js +0 -34
- package/dist/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +0 -51
- package/dist/node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +0 -171
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/base-theme.js +0 -21
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/error.js +0 -27
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/has-color.js +0 -9
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/index.js +0 -224
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/plumbing.js +0 -48
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/process.js +0 -8
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/progress-bar.js +0 -46
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/render-template.js +0 -155
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/set-immediate.js +0 -14
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/set-interval.js +0 -8
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/spin.js +0 -10
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/template-item.js +0 -58
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/theme-set.js +0 -99
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/themes.js +0 -67
- package/dist/node_modules/.pnpm/gauge@3.0.2/node_modules/gauge/wide-truncate.js +0 -22
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js +0 -162
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js +0 -451
- package/dist/node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js +0 -280
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +0 -20
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +0 -362
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +0 -92
- package/dist/node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +0 -255
- package/dist/node_modules/.pnpm/has-unicode@2.0.1/node_modules/has-unicode/index.js +0 -14
- package/dist/node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +0 -45
- package/dist/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +0 -27
- package/dist/node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +0 -14
- package/dist/node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js +0 -68
- package/dist/node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js +0 -19
- package/dist/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.js +0 -3110
- package/dist/node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js +0 -578
- package/dist/node_modules/.pnpm/nodejieba@2.6.0/node_modules/nodejieba/index.js +0 -46
- package/dist/node_modules/.pnpm/nopt@5.0.0/node_modules/nopt/lib/nopt.js +0 -330
- package/dist/node_modules/.pnpm/npmlog@5.0.1/node_modules/npmlog/log.js +0 -305
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +0 -54
- package/dist/node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +0 -44
- package/dist/node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +0 -19
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors-browser.js +0 -88
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js +0 -75
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js +0 -19
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js +0 -666
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js +0 -89
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js +0 -423
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -172
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -243
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -77
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -87
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -10
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -80
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js +0 -21
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -8
- package/dist/node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js +0 -23
- package/dist/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js +0 -229
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +0 -79
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +0 -282
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +0 -186
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +0 -14
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +0 -41
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +0 -34
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +0 -32
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +0 -14
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +0 -14
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +0 -99
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +0 -28
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +0 -8
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +0 -36
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +0 -84
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +0 -31
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +0 -31
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +0 -45
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +0 -64
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +0 -35
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +0 -102
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +0 -17
- package/dist/node_modules/.pnpm/set-blocking@2.0.0/node_modules/set-blocking/index.js +0 -12
- package/dist/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -130
- package/dist/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -16
- package/dist/node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js +0 -30
- package/dist/node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js +0 -10
- package/dist/node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js +0 -26
- package/dist/node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js +0 -59
- package/dist/node_modules/.pnpm/wide-align@1.1.5/node_modules/wide-align/align.js +0 -52
- package/dist/node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +0 -26
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AnyAgentTool, type OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
2
|
+
import { KnowhereStore } from "./store";
|
|
3
|
+
import type { KnowledgeGraphService } from "./kg-service";
|
|
4
|
+
import type { ResolvedKnowhereConfig, ToolRuntimeContext } from "./types";
|
|
5
|
+
export declare function createKnowhereToolFactory(params: {
|
|
6
|
+
api: OpenClawPluginApi;
|
|
7
|
+
config: ResolvedKnowhereConfig;
|
|
8
|
+
store: KnowhereStore;
|
|
9
|
+
kgService: KnowledgeGraphService;
|
|
10
|
+
}): (ctx: ToolRuntimeContext) => AnyAgentTool[];
|
|
@@ -0,0 +1,10 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
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;
|
|
249
|
+
export type KbIdSource = "disabled" | "agent" | "agent-session" | "global";
|
|
250
|
+
export interface KnowledgeGraphConnectConfig {
|
|
251
|
+
minKeywordOverlap: number;
|
|
252
|
+
keywordScoreWeight: number;
|
|
253
|
+
maxConnectionsPerChunk: number;
|
|
254
|
+
minScoreThreshold: number;
|
|
255
|
+
crossFileOnly: boolean;
|
|
256
|
+
maxContentOverlap: number;
|
|
257
|
+
}
|
|
258
|
+
export interface KnowledgeGraphConfig {
|
|
259
|
+
enableKnowledgeGraph: boolean;
|
|
260
|
+
kbId?: string;
|
|
261
|
+
kbIdSource?: KbIdSource;
|
|
262
|
+
concurrentBuildStrategy?: "queue" | "skip";
|
|
263
|
+
buildTimeout?: number;
|
|
264
|
+
notifyOnGraphFailure?: boolean;
|
|
265
|
+
connectConfig?: Partial<KnowledgeGraphConnectConfig>;
|
|
266
|
+
}
|
|
267
|
+
export interface GraphConnection {
|
|
268
|
+
source: string;
|
|
269
|
+
target: string;
|
|
270
|
+
score: number;
|
|
271
|
+
sharedKeywords: string[];
|
|
272
|
+
connectionType: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* File-level edge in knowledge graph (matches SKILL.md schema)
|
|
276
|
+
*/
|
|
277
|
+
export interface FileEdge {
|
|
278
|
+
source: string;
|
|
279
|
+
target: string;
|
|
280
|
+
connection_count: number;
|
|
281
|
+
avg_score: number;
|
|
282
|
+
top_connections: Array<{
|
|
283
|
+
source_chunk: string;
|
|
284
|
+
source_id: string;
|
|
285
|
+
target_chunk: string;
|
|
286
|
+
target_id: string;
|
|
287
|
+
relation: string;
|
|
288
|
+
score: number;
|
|
289
|
+
}>;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* File metadata in knowledge graph (matches SKILL.md schema)
|
|
293
|
+
*/
|
|
294
|
+
export interface FileMetadata {
|
|
295
|
+
chunks_count: number;
|
|
296
|
+
types: Record<string, number>;
|
|
297
|
+
top_keywords: string[];
|
|
298
|
+
top_summary: string;
|
|
299
|
+
importance: number;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Knowledge graph structure (matches SKILL.md schema)
|
|
303
|
+
*/
|
|
304
|
+
export interface KnowledgeGraph {
|
|
305
|
+
version: string;
|
|
306
|
+
stats: {
|
|
307
|
+
total_files: number;
|
|
308
|
+
total_chunks: number;
|
|
309
|
+
total_cross_file_edges: number;
|
|
310
|
+
};
|
|
311
|
+
files: Record<string, FileMetadata>;
|
|
312
|
+
edges: FileEdge[];
|
|
313
|
+
}
|
|
314
|
+
export interface KbMetadata {
|
|
315
|
+
kbId: string;
|
|
316
|
+
createdAt: string;
|
|
317
|
+
lastUpdated: string;
|
|
318
|
+
documentCount: number;
|
|
319
|
+
config: Partial<KnowledgeGraphConnectConfig>;
|
|
320
|
+
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "Knowhere",
|
|
4
4
|
"description": "Parse documents with Knowhere and expose the stored result as tool-queryable document state for OpenClaw agents.",
|
|
5
5
|
"skills": ["./skills"],
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.2.2",
|
|
7
7
|
"uiHints": {
|
|
8
8
|
"apiKey": {
|
|
9
9
|
"label": "Knowhere API Key",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ontos-ai/knowhere-claw",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "OpenClaw plugin for Knowhere-powered document ingestion and automatic grounding.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "rolldown -c",
|
|
21
|
+
"build": "rolldown -c && tsc -p tsconfig.build.json",
|
|
22
22
|
"changeset": "changeset",
|
|
23
23
|
"changeset:publish": "changeset publish",
|
|
24
24
|
"fmt": "oxfmt",
|
|
25
25
|
"fmt:check": "oxfmt --check",
|
|
26
26
|
"lint": "oxlint --type-aware",
|
|
27
27
|
"lint:fix": "oxlint --type-aware --fix",
|
|
28
|
+
"smoke:auto": "vite-node --mode smoke ./smoketest/run-tool.ts -- --auto --file-path smoketest/fixtures/sample.pdf",
|
|
28
29
|
"smoke:tools": "vite-node --mode smoke ./smoketest/run-tool.ts",
|
|
29
30
|
"release:beta": "node ./scripts/publish-beta-release.mjs",
|
|
30
31
|
"release:publish": "node ./scripts/publish-release.mjs",
|
|
@@ -69,4 +70,4 @@
|
|
|
69
70
|
"./dist/index.js"
|
|
70
71
|
]
|
|
71
72
|
}
|
|
72
|
-
}
|
|
73
|
+
}
|