@things-factory/integration-qdrant 9.0.0-beta.27 → 9.0.0-beta.30
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-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/engine/connector/index.d.ts +1 -0
- package/dist-server/engine/connector/index.js +4 -0
- package/dist-server/engine/connector/index.js.map +1 -0
- package/dist-server/engine/connector/qdrant.d.ts +14 -0
- package/dist-server/engine/connector/qdrant.js +52 -0
- package/dist-server/engine/connector/qdrant.js.map +1 -0
- package/dist-server/engine/index.d.ts +2 -0
- package/dist-server/engine/index.js +5 -0
- package/dist-server/engine/index.js.map +1 -0
- package/dist-server/engine/task/index.d.ts +3 -0
- package/dist-server/engine/task/index.js +6 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/engine/task/qdrant-fetch.d.ts +1 -0
- package/dist-server/engine/task/qdrant-fetch.js +45 -0
- package/dist-server/engine/task/qdrant-fetch.js.map +1 -0
- package/dist-server/engine/task/qdrant-search.d.ts +1 -0
- package/dist-server/engine/task/qdrant-search.js +45 -0
- package/dist-server/engine/task/qdrant-search.js.map +1 -0
- package/dist-server/engine/task/qdrant-upsert.d.ts +1 -0
- package/dist-server/engine/task/qdrant-upsert.js +119 -0
- package/dist-server/engine/task/qdrant-upsert.js.map +1 -0
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +4 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function bootstrap(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,KAAI,CAAC","sourcesContent":["export default function bootstrap() {}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../client/bootstrap.ts","../client/index.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileIdsList":[[56,99],[56,99,152],[56,99,154,157],[56,96,99],[56,98,99],[99],[56,99,104,134],[56,99,100,105,111,112,119,131,142],[56,99,100,101,111,119],[51,52,53,56,99],[56,99,102,143],[56,99,103,104,112,120],[56,99,104,131,139],[56,99,105,107,111,119],[56,98,99,106],[56,99,107,108],[56,99,111],[56,99,109,111],[56,98,99,111],[56,99,111,112,113,131,142],[56,99,111,112,113,126,131,134],[56,94,99,147],[56,94,99,107,111,114,119,131,142],[56,99,111,112,114,115,119,131,139,142],[56,99,114,116,131,139,142],[54,55,56,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],[56,99,111,117],[56,99,118,142],[56,99,107,111,119,131],[56,99,120],[56,99,121],[56,98,99,122],[56,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],[56,99,124],[56,99,125],[56,99,111,126,127],[56,99,126,128,143,145],[56,99,111,131,132,133,134],[56,99,131,133],[56,99,131,132],[56,99,134],[56,99,135],[56,96,99,131],[56,99,111,137,138],[56,99,137,138],[56,99,104,119,131,139],[56,99,140],[56,99,119,141],[56,99,114,125,142],[56,99,104,143],[56,99,131,144],[56,99,118,145],[56,99,146],[56,99,104,111,113,122,131,142,145,147],[56,99,131,148],[56,99,150,156],[56,99,154],[56,99,151,155],[56,99,153],[56,66,70,99,142],[56,66,99,131,142],[56,61,99],[56,63,66,99,139,142],[56,99,119,139],[56,99,149],[56,61,99,149],[56,63,66,99,119,142],[56,58,59,62,65,99,111,131,142],[56,66,73,99],[56,58,64,99],[56,66,87,88,99],[56,62,66,99,134,142,149],[56,87,99,149],[56,60,61,99,149],[56,66,99],[56,60,61,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,88,89,90,91,92,93,99],[56,66,81,99],[56,66,73,74,99],[56,64,66,74,75,99],[56,65,99],[56,58,61,66,99],[56,66,70,74,75,99],[56,70,99],[56,64,66,69,99,142],[56,58,63,66,73,99],[56,99,131],[56,61,66,87,99,147,149],[48,56,99]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"1f8f1bd57f21c36cc25547a0cb99a097f5e5443815789833d230741315a3a948","signature":"aac4ddff3d5c1247433870879e9838b1e23b81a9b62c75f59c3e1b64802f2b16"},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"13af9e8fb6757946c48117315866177b95e554d1e773577bb6ca6e40083b6d73","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f0539c58717cbc8b73acb29f9e992ab5ff20adba5f9b57130691c7f9b186a4d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"86956cc2eb9dd371d6fab493d326a574afedebf76eef3fa7833b8e0d9b52d6f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ff5a53a58e756d2661b73ba60ffe274231a4432d21f7a2d0d9e4f6aa99f4283","impliedFormat":1},{"version":"1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","impliedFormat":1},{"version":"2ea254f944dfe131df1264d1fb96e4b1f7d110195b21f1f5dbb68fdd394e5518","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"b11cb909327c874a4e81bfb390bf0d231e5bf9439052689ab80ba8afa50da17b","affectsGlobalScope":true,"impliedFormat":1},{"version":"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"1cbae62b67f180291d211f0e1045fb923a8ec800cfbf9caa13223d769013dae2","impliedFormat":1},{"version":"b52d379b4939681f3781d1cfd5b2c3cbb35e7e76f2425172e165782f8a08228c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"993985beef40c7d113f6dd8f0ba26eed63028b691fbfeb6a5b63f26408dd2c6d","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"b02784111b3fc9c38590cd4339ff8718f9329a6f4d3fd66e9744a1dcd1d7e191","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1}],"root":[49,50],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":4,"useDefineForClassFields":false},"referencedMap":[[150,1],[153,2],[152,1],[158,3],[96,4],[97,4],[98,5],[56,6],[99,7],[100,8],[101,9],[51,1],[54,10],[52,1],[53,1],[102,11],[103,12],[104,13],[105,14],[106,15],[107,16],[108,16],[110,17],[109,18],[111,19],[112,20],[113,21],[95,22],[55,1],[114,23],[115,24],[116,25],[149,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,33],[124,34],[125,35],[126,36],[127,36],[128,37],[129,1],[130,1],[131,38],[133,39],[132,40],[134,41],[135,42],[136,43],[137,44],[138,45],[139,46],[140,47],[141,48],[142,49],[143,50],[144,51],[145,52],[146,53],[147,54],[148,55],[57,1],[151,1],[157,56],[155,57],[156,58],[154,59],[48,1],[46,1],[47,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[21,1],[4,1],[22,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[1,1],[73,60],[83,61],[72,60],[93,62],[64,63],[63,64],[92,65],[86,66],[91,67],[66,68],[80,69],[65,70],[89,71],[61,72],[60,65],[90,73],[62,74],[67,75],[68,1],[71,75],[58,1],[94,76],[84,77],[75,78],[76,79],[78,80],[74,81],[77,82],[87,65],[69,83],[70,84],[79,85],[59,86],[82,77],[81,75],[85,1],[88,87],[49,88],[50,1]],"version":"5.7.3"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './qdrant.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/engine/connector/index.ts"],"names":[],"mappings":";;AAAA,uBAAoB","sourcesContent":["import './qdrant.js'\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Connection, Connector } from '@things-factory/integration-base';
|
|
2
|
+
export declare class QdrantConnector implements Connector {
|
|
3
|
+
ready(connectionConfigs: any): Promise<void>;
|
|
4
|
+
checkConnectionInstance(domain: any, connectionName: any): boolean;
|
|
5
|
+
connect(connection: any): Promise<void>;
|
|
6
|
+
disconnect(connection: Connection): Promise<void>;
|
|
7
|
+
get parameterSpec(): {
|
|
8
|
+
type: string;
|
|
9
|
+
name: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
get taskPrefixes(): string[];
|
|
13
|
+
get help(): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QdrantConnector = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
6
|
+
const integration_base_1 = require("@things-factory/integration-base");
|
|
7
|
+
class QdrantConnector {
|
|
8
|
+
async ready(connectionConfigs) {
|
|
9
|
+
await Promise.all(connectionConfigs.map(this.connect.bind(this)));
|
|
10
|
+
integration_base_1.ConnectionManager.logger.info('Qdrant connections are ready');
|
|
11
|
+
}
|
|
12
|
+
checkConnectionInstance(domain, connectionName) {
|
|
13
|
+
try {
|
|
14
|
+
const connection = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, connectionName);
|
|
15
|
+
return !!connection;
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async connect(connection) {
|
|
22
|
+
var { endpoint } = connection;
|
|
23
|
+
try {
|
|
24
|
+
// Qdrant에 Ping 요청을 보내 연결 확인
|
|
25
|
+
const response = await (0, node_fetch_1.default)(`${endpoint}/healthz`);
|
|
26
|
+
if (!response.ok)
|
|
27
|
+
throw new Error(`Qdrant connection failed: ${response.statusText}`);
|
|
28
|
+
integration_base_1.ConnectionManager.addConnectionInstance(connection, { endpoint });
|
|
29
|
+
integration_base_1.ConnectionManager.logger.info(`Qdrant connection(${connection.name}:${endpoint}) is connected`);
|
|
30
|
+
}
|
|
31
|
+
catch (ex) {
|
|
32
|
+
integration_base_1.ConnectionManager.logger.error(`Qdrant connection(${connection.name}:${endpoint}) failed to connect`, ex);
|
|
33
|
+
throw ex;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async disconnect(connection) {
|
|
37
|
+
integration_base_1.ConnectionManager.removeConnectionInstance(connection);
|
|
38
|
+
integration_base_1.ConnectionManager.logger.info(`Qdrant connection(${connection.name}) is disconnected`);
|
|
39
|
+
}
|
|
40
|
+
get parameterSpec() {
|
|
41
|
+
return [{ type: 'string', name: 'collection', label: 'qdrant.collection' }];
|
|
42
|
+
}
|
|
43
|
+
get taskPrefixes() {
|
|
44
|
+
return ['qdrant'];
|
|
45
|
+
}
|
|
46
|
+
get help() {
|
|
47
|
+
return 'integration/connector/qdrant-connector';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.QdrantConnector = QdrantConnector;
|
|
51
|
+
integration_base_1.ConnectionManager.registerConnector('qdrant-connector', new QdrantConnector());
|
|
52
|
+
//# sourceMappingURL=qdrant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qdrant.js","sourceRoot":"","sources":["../../../server/engine/connector/qdrant.ts"],"names":[],"mappings":";;;;AAAA,oEAA8B;AAC9B,uEAA2F;AAE3F,MAAa,eAAe;IAC1B,KAAK,CAAC,KAAK,CAAC,iBAAiB;QAC3B,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAEjE,oCAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA;IAC/D,CAAC;IAED,uBAAuB,CAAC,MAAM,EAAE,cAAc;QAC5C,IAAI,CAAC;YACH,MAAM,UA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IAAI,YAAY;QACd,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,wCAAwC,CAAA;IACjD,CAAC;CACF;AAjDD,0CAiDC;AAED,oCAAiB,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,IAAI,eAAe,EAAE,CAAC,CAAA","sourcesContent":["import fetch from 'node-fetch'\nimport { Connection, ConnectionManager, Connector } from '@things-factory/integration-base'\n\nexport class QdrantConnector implements Connector {\n async ready(connectionConfigs) {\n await Promise.all(connectionConfigs.map(this.connect.bind(this)))\n\n ConnectionManager.logger.info('Qdrant connections are ready')\n }\n\n checkConnectionInstance(domain, connectionName): boolean {\n try {\n const connection = ConnectionManager.getConnectionInstanceByName(domain, connectionName)\n return !!connection\n } catch (e) {\n return false\n }\n }\n\n async connect(connection) {\n var { endpoint } = connection\n\n try {\n // Qdrant에 Ping 요청을 보내 연결 확인\n const response = await fetch(`${endpoint}/healthz`)\n if (!response.ok) throw new Error(`Qdrant connection failed: ${response.statusText}`)\n\n ConnectionManager.addConnectionInstance(connection, { endpoint })\n\n ConnectionManager.logger.info(`Qdrant connection(${connection.name}:${endpoint}) is connected`)\n } catch (ex) {\n ConnectionManager.logger.error(`Qdrant connection(${connection.name}:${endpoint}) failed to connect`, ex)\n throw ex\n }\n }\n\n async disconnect(connection: Connection) {\n ConnectionManager.removeConnectionInstance(connection)\n ConnectionManager.logger.info(`Qdrant connection(${connection.name}) is disconnected`)\n }\n\n get parameterSpec() {\n return [{ type: 'string', name: 'collection', label: 'qdrant.collection' }]\n }\n\n get taskPrefixes() {\n return ['qdrant']\n }\n\n get help() {\n return 'integration/connector/qdrant-connector'\n }\n}\n\nConnectionManager.registerConnector('qdrant-connector', new QdrantConnector())\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/engine/index.ts"],"names":[],"mappings":";;AAAA,gCAA6B;AAC7B,2BAAwB","sourcesContent":["import './connector/index.js'\nimport './task/index.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/engine/task/index.ts"],"names":[],"mappings":";;AAAA,8BAA2B;AAC3B,8BAA2B;AAC3B,6BAA0B","sourcesContent":["import './qdrant-search.js'\nimport './qdrant-upsert.js'\nimport './qdrant-fetch.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
5
|
+
const integration_base_1 = require("@things-factory/integration-base");
|
|
6
|
+
const utils_1 = require("@things-factory/utils");
|
|
7
|
+
async function qdrantFetch(step, { domain, data }) {
|
|
8
|
+
const { connection, params: { collection, resultAccessor } } = step;
|
|
9
|
+
let searchResults = (0, utils_1.access)(resultAccessor, data);
|
|
10
|
+
if (!searchResults || !Array.isArray(searchResults)) {
|
|
11
|
+
throw new Error(`Invalid or missing search results`);
|
|
12
|
+
}
|
|
13
|
+
const qdrantConfig = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, connection);
|
|
14
|
+
if (!qdrantConfig) {
|
|
15
|
+
throw new Error(`No connection: ${connection}`);
|
|
16
|
+
}
|
|
17
|
+
let fetchedResults = [];
|
|
18
|
+
for (const result of searchResults) {
|
|
19
|
+
const pointId = result.id;
|
|
20
|
+
try {
|
|
21
|
+
const response = await (0, node_fetch_1.default)(`${qdrantConfig.endpoint}/collections/${collection}/points/${pointId}`, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
headers: { 'Content-Type': 'application/json' }
|
|
24
|
+
});
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
console.warn(`⚠️ Failed to fetch point ID: ${pointId}`);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const pointData = await response.json();
|
|
30
|
+
fetchedResults.push(Object.assign(Object.assign({}, result), { metadata: pointData.result }));
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
console.error(`❌ Qdrant fetch error for ID ${pointId}: ${error.message}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { data: fetchedResults };
|
|
37
|
+
}
|
|
38
|
+
// ✅ 파라미터 정의
|
|
39
|
+
qdrantFetch.parameterSpec = [
|
|
40
|
+
{ type: 'string', name: 'collection', label: 'qdrant.collection' },
|
|
41
|
+
{ type: 'string', name: 'resultAccessor', label: 'qdrant.result-accessor' }
|
|
42
|
+
];
|
|
43
|
+
// ✅ 태스크 등록
|
|
44
|
+
integration_base_1.TaskRegistry.registerTaskHandler('qdrant-fetch', qdrantFetch);
|
|
45
|
+
//# sourceMappingURL=qdrant-fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qdrant-fetch.js","sourceRoot":"","sources":["../../../server/engine/task/qdrant-fetch.ts"],"names":[],"mappings":";;;AAAA,oEAA8B;AAC9B,uEAA2F;AAC3F,iDAA8C;AAE9C,KAAK,UAAU,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAW;IACxD,MAAM,EACJ,UAAU,EACV,MAAM,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EACvC,GAAG,IAAI,CAAA;IAER,IAAI,aAAa,GAAG,IAAA,cAAM,EAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IAChD,IAAI,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,YAAY,GAAG,oCAAiB,CAAC,2BAA2B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACtF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,I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fetch from 'node-fetch'\nimport { ConnectionManager, Context, TaskRegistry } from '@things-factory/integration-base'\nimport { access } from '@things-factory/utils'\n\nasync function qdrantFetch(step, { domain, data }: Context) {\n const {\n connection,\n params: { collection, resultAccessor }\n } = step\n\n let searchResults = access(resultAccessor, data)\n if (!searchResults || !Array.isArray(searchResults)) {\n throw new Error(`Invalid or missing search results`)\n }\n\n const qdrantConfig = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!qdrantConfig) {\n throw new Error(`No connection: ${connection}`)\n }\n\n let fetchedResults = []\n for (const result of searchResults) {\n const pointId = result.id\n\n try {\n const response = await fetch(`${qdrantConfig.endpoint}/collections/${collection}/points/${pointId}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n\n if (!response.ok) {\n console.warn(`⚠️ Failed to fetch point ID: ${pointId}`)\n continue\n }\n\n const pointData = await response.json()\n fetchedResults.push({ ...result, metadata: pointData.result })\n } catch (error) {\n console.error(`❌ Qdrant fetch error for ID ${pointId}: ${error.message}`)\n }\n }\n\n return { data: fetchedResults }\n}\n\n// ✅ 파라미터 정의\nqdrantFetch.parameterSpec = [\n { type: 'string', name: 'collection', label: 'qdrant.collection' },\n { type: 'string', name: 'resultAccessor', label: 'qdrant.result-accessor' }\n]\n\n// ✅ 태스크 등록\nTaskRegistry.registerTaskHandler('qdrant-fetch', qdrantFetch)\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
5
|
+
const integration_base_1 = require("@things-factory/integration-base");
|
|
6
|
+
const utils_1 = require("@things-factory/utils");
|
|
7
|
+
async function qdrantSearch(step, { domain, data }) {
|
|
8
|
+
const { connection, params: { collection, embeddingAccessor } } = step;
|
|
9
|
+
// ✅ `embeddingAccessor`를 사용해 벡터 가져오기
|
|
10
|
+
let embedding = (0, utils_1.access)(embeddingAccessor, data);
|
|
11
|
+
if (!embedding || !Array.isArray(embedding)) {
|
|
12
|
+
throw new Error(`Valid embedding vector is required for search.`);
|
|
13
|
+
}
|
|
14
|
+
const qdrantConfig = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, connection);
|
|
15
|
+
if (!qdrantConfig) {
|
|
16
|
+
throw new Error(`No connection: ${connection}`);
|
|
17
|
+
}
|
|
18
|
+
const payload = {
|
|
19
|
+
vector: embedding,
|
|
20
|
+
limit: 5
|
|
21
|
+
};
|
|
22
|
+
try {
|
|
23
|
+
const response = await (0, node_fetch_1.default)(`${qdrantConfig.endpoint}/collections/${collection}/points/search`, {
|
|
24
|
+
method: 'POST',
|
|
25
|
+
headers: { 'Content-Type': 'application/json' },
|
|
26
|
+
body: JSON.stringify(payload)
|
|
27
|
+
});
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
throw new Error(`Failed to search data: ${response.statusText}`);
|
|
30
|
+
}
|
|
31
|
+
const results = await response.json();
|
|
32
|
+
return { data: results };
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
throw new Error(`Qdrant search error: ${error.message}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// ✅ 파라미터 정의
|
|
39
|
+
qdrantSearch.parameterSpec = [
|
|
40
|
+
{ type: 'string', name: 'collection', label: 'qdrant.collection' },
|
|
41
|
+
{ type: 'string', name: 'embeddingAccessor', label: 'qdrant.embedding-accessor' }
|
|
42
|
+
];
|
|
43
|
+
// ✅ 태스크 등록
|
|
44
|
+
integration_base_1.TaskRegistry.registerTaskHandler('qdrant-search', qdrantSearch);
|
|
45
|
+
//# sourceMappingURL=qdrant-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qdrant-search.js","sourceRoot":"","sources":["../../../server/engine/task/qdrant-search.ts"],"names":[],"mappings":";;;AAA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,CAAA;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC;AAED,YAAY;AACZ,YAAY,CAAC,aAAa,GAAG;IAC3B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAClE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,2BAA2B,EAAE;CAClF,CAAA;AAED,WAAW;AACX,+BAAY,CAAC,mBAAmB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA","sourcesContent":["import fetch from 'node-fetch'\nimport { ConnectionManager, Context, TaskRegistry } from '@things-factory/integration-base'\nimport { access } from '@things-factory/utils'\n\nasync function qdrantSearch(step, { domain, data }: Context) {\n const {\n connection,\n params: { collection, embeddingAccessor }\n } = step\n\n // ✅ `embeddingAccessor`를 사용해 벡터 가져오기\n let embedding = access(embeddingAccessor, data)\n\n if (!embedding || !Array.isArray(embedding)) {\n throw new Error(`Valid embedding vector is required for search.`)\n }\n\n const qdrantConfig = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!qdrantConfig) {\n throw new Error(`No connection: ${connection}`)\n }\n\n const payload = {\n vector: embedding,\n limit: 5\n }\n\n try {\n const response = await fetch(`${qdrantConfig.endpoint}/collections/${collection}/points/search`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(payload)\n })\n\n if (!response.ok) {\n throw new Error(`Failed to search data: ${response.statusText}`)\n }\n\n const results = await response.json()\n return { data: results }\n } catch (error) {\n throw new Error(`Qdrant search error: ${error.message}`)\n }\n}\n\n// ✅ 파라미터 정의\nqdrantSearch.parameterSpec = [\n { type: 'string', name: 'collection', label: 'qdrant.collection' },\n { type: 'string', name: 'embeddingAccessor', label: 'qdrant.embedding-accessor' }\n]\n\n// ✅ 태스크 등록\nTaskRegistry.registerTaskHandler('qdrant-search', qdrantSearch)\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
5
|
+
const integration_base_1 = require("@things-factory/integration-base");
|
|
6
|
+
const utils_1 = require("@things-factory/utils");
|
|
7
|
+
const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
8
|
+
// ✅ 네트워크 요청 타임아웃 추가
|
|
9
|
+
async function fetchWithTimeout(url, options = {}, timeout = 5000) {
|
|
10
|
+
const controller = new AbortController();
|
|
11
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
12
|
+
try {
|
|
13
|
+
const response = await (0, node_fetch_1.default)(url, Object.assign(Object.assign({}, options), { signal: controller.signal }));
|
|
14
|
+
clearTimeout(timeoutId);
|
|
15
|
+
return response;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error('❌ ERROR: Fetch failed (Timeout or Network issue)', error);
|
|
19
|
+
throw new Error('Fetch failed: ' + error.message);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// ✅ 파일 경로를 UUID 변환
|
|
23
|
+
function generateUUIDFromPath(filePath) {
|
|
24
|
+
return crypto_1.default.createHash('md5').update(filePath).digest('hex');
|
|
25
|
+
}
|
|
26
|
+
// ✅ Qdrant 컬렉션 존재 여부 확인
|
|
27
|
+
async function checkCollectionExists(endpoint, collection) {
|
|
28
|
+
const response = await fetchWithTimeout(`${endpoint}/collections/${collection}`, { method: 'GET' });
|
|
29
|
+
return response.ok;
|
|
30
|
+
}
|
|
31
|
+
// ✅ Qdrant 컬렉션 자동 생성
|
|
32
|
+
async function createCollectionIfNotExists(endpoint, collection) {
|
|
33
|
+
const exists = await checkCollectionExists(endpoint, collection);
|
|
34
|
+
if (exists)
|
|
35
|
+
return;
|
|
36
|
+
const createPayload = {
|
|
37
|
+
vectors: { size: 384, distance: 'Cosine' } // ✅ 벡터 크기 384로 설정
|
|
38
|
+
};
|
|
39
|
+
const response = await fetchWithTimeout(`${endpoint}/collections/${collection}`, {
|
|
40
|
+
method: 'PUT',
|
|
41
|
+
headers: { 'Content-Type': 'application/json' },
|
|
42
|
+
body: JSON.stringify(createPayload)
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
throw new Error(`Failed to create collection: ${response.statusText}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// ✅ Qdrant 데이터 업서트 태스크
|
|
49
|
+
async function qdrantUpsert(step, { domain, data }) {
|
|
50
|
+
const { connection, params: { collection, embeddingDataAccessor, analysisDataAccessor } } = step;
|
|
51
|
+
let embeddingData = (0, utils_1.access)(embeddingDataAccessor, data);
|
|
52
|
+
let analysisData = (0, utils_1.access)(analysisDataAccessor, data);
|
|
53
|
+
if (!embeddingData || !Array.isArray(embeddingData) || embeddingData.length === 0) {
|
|
54
|
+
throw new Error('Embedding data is missing or empty');
|
|
55
|
+
}
|
|
56
|
+
if (!analysisData || !Array.isArray(analysisData) || analysisData.length === 0) {
|
|
57
|
+
throw new Error('Analysis result is missing or not in correct format');
|
|
58
|
+
}
|
|
59
|
+
const qdrantConfig = integration_base_1.ConnectionManager.getConnectionInstanceByName(domain, connection);
|
|
60
|
+
if (!qdrantConfig) {
|
|
61
|
+
throw new Error(`No connection: ${connection}`);
|
|
62
|
+
}
|
|
63
|
+
console.log('🔍 DEBUG: Qdrant Endpoint', qdrantConfig.endpoint);
|
|
64
|
+
const safeCollection = collection.replace(/[^a-zA-Z0-9-_]/g, '_');
|
|
65
|
+
await createCollectionIfNotExists(qdrantConfig.endpoint, safeCollection);
|
|
66
|
+
const analysisMap = new Map(analysisData.map(item => [item.filePath, item.ast]));
|
|
67
|
+
console.log('🔍 DEBUG: Vector Length Check', embeddingData.map(e => e.embedding.length));
|
|
68
|
+
// ✅ 벡터 길이 384인지 확인
|
|
69
|
+
if (embeddingData.some(e => e.embedding.length !== 384)) {
|
|
70
|
+
throw new Error('🚨 ERROR: One or more embeddings have incorrect size! Expected 384.');
|
|
71
|
+
}
|
|
72
|
+
const points = embeddingData.map(item => {
|
|
73
|
+
const filePath = item.file;
|
|
74
|
+
const pointId = generateUUIDFromPath(filePath);
|
|
75
|
+
const ast = analysisMap.get(filePath) || { functions: [], classes: [], code: '' };
|
|
76
|
+
return {
|
|
77
|
+
id: pointId,
|
|
78
|
+
vector: item.embedding,
|
|
79
|
+
payload: {
|
|
80
|
+
filePath,
|
|
81
|
+
functions: ast.functions,
|
|
82
|
+
classes: ast.classes,
|
|
83
|
+
code: ast.code,
|
|
84
|
+
type: item.type
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
console.log('🔍 DEBUG: Number of points', points.length);
|
|
89
|
+
if (points.length === 0) {
|
|
90
|
+
throw new Error('No valid points to insert into Qdrant');
|
|
91
|
+
}
|
|
92
|
+
const payload = { points };
|
|
93
|
+
try {
|
|
94
|
+
const response = await fetchWithTimeout(`${qdrantConfig.endpoint}/collections/${safeCollection}/points`, {
|
|
95
|
+
method: 'PUT',
|
|
96
|
+
headers: { 'Content-Type': 'application/json' },
|
|
97
|
+
body: JSON.stringify(payload)
|
|
98
|
+
});
|
|
99
|
+
const responseText = await response.text();
|
|
100
|
+
console.log('🔍 DEBUG: Qdrant Response Text', responseText);
|
|
101
|
+
if (!response.ok) {
|
|
102
|
+
throw new Error(`Failed to upsert data: ${responseText}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error(`❌ Qdrant upsert error: ${error.message}`);
|
|
107
|
+
throw new Error(`Qdrant upsert failed`);
|
|
108
|
+
}
|
|
109
|
+
return { data: points };
|
|
110
|
+
}
|
|
111
|
+
// ✅ 파라미터 스펙 업데이트
|
|
112
|
+
qdrantUpsert.parameterSpec = [
|
|
113
|
+
{ type: 'string', name: 'collection', label: 'qdrant.collection' },
|
|
114
|
+
{ type: 'string', name: 'embeddingDataAccessor', label: 'qdrant.embedding-accessor' },
|
|
115
|
+
{ type: 'string', name: 'analysisDataAccessor', label: 'qdrant.analysis-accessor' }
|
|
116
|
+
];
|
|
117
|
+
qdrantUpsert.help = 'integration/task/qdrant-upsert';
|
|
118
|
+
integration_base_1.TaskRegistry.registerTaskHandler('qdrant-upsert', qdrantUpsert);
|
|
119
|
+
//# sourceMappingURL=qdrant-upsert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qdrant-upsert.js","sourceRoot":"","sources":["../../../server/engine/task/qdrant-upsert.ts"],"names":[],"mappings":";;;AAAA,oEAA8B;AAE9B,uEAA2F;AAC3F,iDAA8C;AAC9C,4DAA2B;AAE3B,oBAAoB;AACpB,KAAK,UAAU,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI;IAC/D,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAA;IAE/D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,GAAG,kCAAO,OAAO,KAAE,MAAM,EAAE,UAAU,CAAC,MAAM,IAAG,CAAA;QAC5E,YAAY,CAAC,SAAS,CAAC,CAAA;QACvB,OAAO,QAAQ,CAAA;IACjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kDAAkD,EAAE,KAAK,CAAC,CAAA;QACxE,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;IACnD,CAAC;AACH,CAAC;AAED,m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G,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAC9B,CAAC,CAAA;QAEF,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,YAAY,CAAC,CAAA;QAE3D,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,YAAY,EAAE,CAAC,CAAA;QAC3D,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,0BAA0B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QACxD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;IACzC,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AACzB,CAAC;AAED,iBAAiB;AACjB,YAAY,CAAC,aAAa,GAAG;IAC3B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAClE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,2BAA2B,EAAE;IACrF,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,0BAA0B,EAAE;CACpF,CAAA;AAED,YAAY,CAAC,IAAI,GAAG,gCAAgC,CAAA;AAEpD,+BAAY,CAAC,mBAAmB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA","sourcesContent":["import fetch from 'node-fetch'\n\nimport { ConnectionManager, Context, TaskRegistry } from '@things-factory/integration-base'\nimport { access } from '@things-factory/utils'\nimport crypto from 'crypto'\n\n// ✅ 네트워크 요청 타임아웃 추가\nasync function fetchWithTimeout(url, options = {}, timeout = 5000) {\n const controller = new AbortController()\n const timeoutId = setTimeout(() => controller.abort(), timeout)\n\n try {\n const response = await fetch(url, { ...options, signal: controller.signal })\n clearTimeout(timeoutId)\n return response\n } catch (error) {\n console.error('❌ ERROR: Fetch failed (Timeout or Network issue)', error)\n throw new Error('Fetch failed: ' + error.message)\n }\n}\n\n// ✅ 파일 경로를 UUID 변환\nfunction generateUUIDFromPath(filePath) {\n return crypto.createHash('md5').update(filePath).digest('hex')\n}\n\n// ✅ Qdrant 컬렉션 존재 여부 확인\nasync function checkCollectionExists(endpoint, collection) {\n const response = await fetchWithTimeout(`${endpoint}/collections/${collection}`, { method: 'GET' })\n return response.ok\n}\n\n// ✅ Qdrant 컬렉션 자동 생성\nasync function createCollectionIfNotExists(endpoint, collection) {\n const exists = await checkCollectionExists(endpoint, collection)\n if (exists) return\n\n const createPayload = {\n vectors: { size: 384, distance: 'Cosine' } // ✅ 벡터 크기 384로 설정\n }\n\n const response = await fetchWithTimeout(`${endpoint}/collections/${collection}`, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(createPayload)\n })\n\n if (!response.ok) {\n throw new Error(`Failed to create collection: ${response.statusText}`)\n }\n}\n\n// ✅ Qdrant 데이터 업서트 태스크\nasync function qdrantUpsert(step, { domain, data }: Context) {\n const {\n connection,\n params: { collection, embeddingDataAccessor, analysisDataAccessor }\n } = step\n\n let embeddingData = access(embeddingDataAccessor, data)\n let analysisData = access(analysisDataAccessor, data)\n\n if (!embeddingData || !Array.isArray(embeddingData) || embeddingData.length === 0) {\n throw new Error('Embedding data is missing or empty')\n }\n\n if (!analysisData || !Array.isArray(analysisData) || analysisData.length === 0) {\n throw new Error('Analysis result is missing or not in correct format')\n }\n\n const qdrantConfig = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!qdrantConfig) {\n throw new Error(`No connection: ${connection}`)\n }\n\n console.log('🔍 DEBUG: Qdrant Endpoint', qdrantConfig.endpoint)\n\n const safeCollection = collection.replace(/[^a-zA-Z0-9-_]/g, '_')\n await createCollectionIfNotExists(qdrantConfig.endpoint, safeCollection)\n\n const analysisMap = new Map(analysisData.map(item => [item.filePath, item.ast]))\n\n console.log(\n '🔍 DEBUG: Vector Length Check',\n embeddingData.map(e => e.embedding.length)\n )\n\n // ✅ 벡터 길이 384인지 확인\n if (embeddingData.some(e => e.embedding.length !== 384)) {\n throw new Error('🚨 ERROR: One or more embeddings have incorrect size! Expected 384.')\n }\n\n const points = embeddingData.map(item => {\n const filePath = item.file\n const pointId = generateUUIDFromPath(filePath)\n const ast = analysisMap.get(filePath) || { functions: [], classes: [], code: '' }\n\n return {\n id: pointId,\n vector: item.embedding,\n payload: {\n filePath,\n functions: ast.functions,\n classes: ast.classes,\n code: ast.code,\n type: item.type\n }\n }\n })\n\n console.log('🔍 DEBUG: Number of points', points.length)\n\n if (points.length === 0) {\n throw new Error('No valid points to insert into Qdrant')\n }\n\n const payload = { points }\n\n try {\n const response = await fetchWithTimeout(`${qdrantConfig.endpoint}/collections/${safeCollection}/points`, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(payload)\n })\n\n const responseText = await response.text()\n console.log('🔍 DEBUG: Qdrant Response Text', responseText)\n\n if (!response.ok) {\n throw new Error(`Failed to upsert data: ${responseText}`)\n }\n } catch (error) {\n console.error(`❌ Qdrant upsert error: ${error.message}`)\n throw new Error(`Qdrant upsert failed`)\n }\n\n return { data: points }\n}\n\n// ✅ 파라미터 스펙 업데이트\nqdrantUpsert.parameterSpec = [\n { type: 'string', name: 'collection', label: 'qdrant.collection' },\n { type: 'string', name: 'embeddingDataAccessor', label: 'qdrant.embedding-accessor' },\n { type: 'string', name: 'analysisDataAccessor', label: 'qdrant.analysis-accessor' }\n]\n\nqdrantUpsert.help = 'integration/task/qdrant-upsert'\n\nTaskRegistry.registerTaskHandler('qdrant-upsert', qdrantUpsert)\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './engine';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;AAAA,oBAAiB","sourcesContent":["import './engine'\n"]}
|