@nhtio/adk 1.20260604.0 → 1.20260607.0
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/CHANGELOG.md +261 -0
- package/adk-mcp.mjs +1 -1
- package/batteries/embeddings/openai/adapter.cjs +1 -1
- package/batteries/embeddings/openai/adapter.mjs +1 -1
- package/batteries/embeddings/webllm/adapter.cjs +1 -1
- package/batteries/embeddings/webllm/adapter.mjs +1 -1
- package/batteries/index.d.ts +1 -0
- package/batteries/llm/openai_chat_completions/adapter.cjs +6 -6
- package/batteries/llm/openai_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/adapter.mjs +6 -6
- package/batteries/llm/openai_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/openai_chat_completions/helpers.cjs +2 -2
- package/batteries/llm/openai_chat_completions/helpers.mjs +2 -2
- package/batteries/llm/openai_chat_completions/validation.cjs +2 -2
- package/batteries/llm/openai_chat_completions/validation.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/validation.mjs +2 -2
- package/batteries/llm/openai_chat_completions/validation.mjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.cjs +6 -6
- package/batteries/llm/webllm_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.mjs +6 -6
- package/batteries/llm/webllm_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/validation.cjs +2 -2
- package/batteries/llm/webllm_chat_completions/validation.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/validation.mjs +2 -2
- package/batteries/llm/webllm_chat_completions/validation.mjs.map +1 -1
- package/batteries/storage/flydrive.cjs +1 -1
- package/batteries/storage/flydrive.mjs +2 -2
- package/batteries/storage/in_memory.cjs +1 -1
- package/batteries/storage/in_memory.mjs +1 -1
- package/batteries/storage/opfs.cjs +1 -1
- package/batteries/storage/opfs.mjs +1 -1
- package/batteries/tools/color.cjs +2 -2
- package/batteries/tools/color.mjs +2 -2
- package/batteries/tools/comparison.cjs +3 -3
- package/batteries/tools/comparison.mjs +3 -3
- package/batteries/tools/data_structure.cjs +3 -3
- package/batteries/tools/data_structure.mjs +3 -3
- package/batteries/tools/datetime_extended.cjs +2 -2
- package/batteries/tools/datetime_extended.mjs +2 -2
- package/batteries/tools/datetime_math.cjs +2 -2
- package/batteries/tools/datetime_math.mjs +2 -2
- package/batteries/tools/encoding.cjs +3 -3
- package/batteries/tools/encoding.mjs +3 -3
- package/batteries/tools/formatting.cjs +3 -3
- package/batteries/tools/formatting.mjs +3 -3
- package/batteries/tools/geo_basics.cjs +2 -2
- package/batteries/tools/geo_basics.mjs +2 -2
- package/batteries/tools/math/index.d.ts +16 -5
- package/batteries/tools/math.cjs +340 -22
- package/batteries/tools/math.cjs.map +1 -1
- package/batteries/tools/math.mjs +338 -21
- package/batteries/tools/math.mjs.map +1 -1
- package/batteries/tools/memory.cjs +5 -5
- package/batteries/tools/memory.mjs +5 -5
- package/batteries/tools/parsing.cjs +4 -4
- package/batteries/tools/parsing.mjs +4 -4
- package/batteries/tools/retrievables.cjs +4 -4
- package/batteries/tools/retrievables.mjs +4 -4
- package/batteries/tools/standing_instructions.cjs +4 -4
- package/batteries/tools/standing_instructions.mjs +4 -4
- package/batteries/tools/statistics.cjs +4 -4
- package/batteries/tools/statistics.mjs +4 -4
- package/batteries/tools/string_processing.cjs +3 -3
- package/batteries/tools/string_processing.mjs +3 -3
- package/batteries/tools/structured_data.cjs +3 -3
- package/batteries/tools/structured_data.mjs +3 -3
- package/batteries/tools/text_analysis.cjs +3 -3
- package/batteries/tools/text_analysis.mjs +3 -3
- package/batteries/tools/text_comparison.cjs +2 -2
- package/batteries/tools/text_comparison.mjs +2 -2
- package/batteries/tools/time.cjs +2 -2
- package/batteries/tools/time.mjs +2 -2
- package/batteries/tools/unit_conversion.cjs +2 -2
- package/batteries/tools/unit_conversion.mjs +2 -2
- package/batteries/vector/arangodb/index.d.ts +38 -0
- package/batteries/vector/arangodb.cjs +257 -0
- package/batteries/vector/arangodb.cjs.map +1 -0
- package/batteries/vector/arangodb.mjs +255 -0
- package/batteries/vector/arangodb.mjs.map +1 -0
- package/batteries/vector/builder.cjs +297 -0
- package/batteries/vector/builder.cjs.map +1 -0
- package/batteries/vector/builder.d.ts +87 -0
- package/batteries/vector/builder.mjs +294 -0
- package/batteries/vector/builder.mjs.map +1 -0
- package/batteries/vector/chroma/index.d.ts +32 -0
- package/batteries/vector/chroma.cjs +305 -0
- package/batteries/vector/chroma.cjs.map +1 -0
- package/batteries/vector/chroma.mjs +302 -0
- package/batteries/vector/chroma.mjs.map +1 -0
- package/batteries/vector/clickhouse/index.d.ts +39 -0
- package/batteries/vector/clickhouse.cjs +246 -0
- package/batteries/vector/clickhouse.cjs.map +1 -0
- package/batteries/vector/clickhouse.mjs +244 -0
- package/batteries/vector/clickhouse.mjs.map +1 -0
- package/batteries/vector/cloudflare/index.d.ts +43 -0
- package/batteries/vector/cloudflare.cjs +397 -0
- package/batteries/vector/cloudflare.cjs.map +1 -0
- package/batteries/vector/cloudflare.mjs +395 -0
- package/batteries/vector/cloudflare.mjs.map +1 -0
- package/batteries/vector/conformance/index.d.ts +15 -0
- package/batteries/vector/conformance.cjs +209 -0
- package/batteries/vector/conformance.cjs.map +1 -0
- package/batteries/vector/conformance.mjs +205 -0
- package/batteries/vector/conformance.mjs.map +1 -0
- package/batteries/vector/contract.cjs +42 -0
- package/batteries/vector/contract.cjs.map +1 -0
- package/batteries/vector/contract.d.ts +39 -0
- package/batteries/vector/contract.mjs +40 -0
- package/batteries/vector/contract.mjs.map +1 -0
- package/batteries/vector/couchbase/index.d.ts +49 -0
- package/batteries/vector/couchbase.cjs +401 -0
- package/batteries/vector/couchbase.cjs.map +1 -0
- package/batteries/vector/couchbase.mjs +399 -0
- package/batteries/vector/couchbase.mjs.map +1 -0
- package/batteries/vector/duckdb/index.d.ts +33 -0
- package/batteries/vector/duckdb.cjs +218 -0
- package/batteries/vector/duckdb.cjs.map +1 -0
- package/batteries/vector/duckdb.mjs +216 -0
- package/batteries/vector/duckdb.mjs.map +1 -0
- package/batteries/vector/elasticsearch/index.d.ts +43 -0
- package/batteries/vector/elasticsearch.cjs +306 -0
- package/batteries/vector/elasticsearch.cjs.map +1 -0
- package/batteries/vector/elasticsearch.mjs +303 -0
- package/batteries/vector/elasticsearch.mjs.map +1 -0
- package/batteries/vector/exceptions.cjs +126 -0
- package/batteries/vector/exceptions.cjs.map +1 -0
- package/batteries/vector/exceptions.d.ts +142 -0
- package/batteries/vector/exceptions.mjs +107 -0
- package/batteries/vector/exceptions.mjs.map +1 -0
- package/batteries/vector/factory.cjs +28 -0
- package/batteries/vector/factory.cjs.map +1 -0
- package/batteries/vector/factory.d.ts +38 -0
- package/batteries/vector/factory.mjs +25 -0
- package/batteries/vector/factory.mjs.map +1 -0
- package/batteries/vector/filters.cjs +107 -0
- package/batteries/vector/filters.cjs.map +1 -0
- package/batteries/vector/filters.d.ts +34 -0
- package/batteries/vector/filters.mjs +99 -0
- package/batteries/vector/filters.mjs.map +1 -0
- package/batteries/vector/helpers.cjs +23 -0
- package/batteries/vector/helpers.cjs.map +1 -0
- package/batteries/vector/helpers.d.ts +12 -0
- package/batteries/vector/helpers.mjs +17 -0
- package/batteries/vector/helpers.mjs.map +1 -0
- package/batteries/vector/hnswlib/index.d.ts +35 -0
- package/batteries/vector/hnswlib.cjs +237 -0
- package/batteries/vector/hnswlib.cjs.map +1 -0
- package/batteries/vector/hnswlib.mjs +235 -0
- package/batteries/vector/hnswlib.mjs.map +1 -0
- package/batteries/vector/in_memory/index.d.ts +23 -0
- package/batteries/vector/in_memory.cjs +178 -0
- package/batteries/vector/in_memory.cjs.map +1 -0
- package/batteries/vector/in_memory.mjs +176 -0
- package/batteries/vector/in_memory.mjs.map +1 -0
- package/batteries/vector/index.d.ts +18 -0
- package/batteries/vector/lancedb/index.d.ts +34 -0
- package/batteries/vector/lancedb.cjs +224 -0
- package/batteries/vector/lancedb.cjs.map +1 -0
- package/batteries/vector/lancedb.mjs +222 -0
- package/batteries/vector/lancedb.mjs.map +1 -0
- package/batteries/vector/mariadb/index.d.ts +39 -0
- package/batteries/vector/mariadb.cjs +228 -0
- package/batteries/vector/mariadb.cjs.map +1 -0
- package/batteries/vector/mariadb.mjs +226 -0
- package/batteries/vector/mariadb.mjs.map +1 -0
- package/batteries/vector/meilisearch/index.d.ts +36 -0
- package/batteries/vector/meilisearch.cjs +242 -0
- package/batteries/vector/meilisearch.cjs.map +1 -0
- package/batteries/vector/meilisearch.mjs +240 -0
- package/batteries/vector/meilisearch.mjs.map +1 -0
- package/batteries/vector/migrate.cjs +54 -0
- package/batteries/vector/migrate.cjs.map +1 -0
- package/batteries/vector/migrate.d.ts +30 -0
- package/batteries/vector/migrate.mjs +52 -0
- package/batteries/vector/migrate.mjs.map +1 -0
- package/batteries/vector/milvus/index.d.ts +35 -0
- package/batteries/vector/milvus.cjs +357 -0
- package/batteries/vector/milvus.cjs.map +1 -0
- package/batteries/vector/milvus.mjs +354 -0
- package/batteries/vector/milvus.mjs.map +1 -0
- package/batteries/vector/mongodb/index.d.ts +46 -0
- package/batteries/vector/mongodb.cjs +270 -0
- package/batteries/vector/mongodb.cjs.map +1 -0
- package/batteries/vector/mongodb.mjs +268 -0
- package/batteries/vector/mongodb.mjs.map +1 -0
- package/batteries/vector/neo4j/index.d.ts +38 -0
- package/batteries/vector/neo4j.cjs +231 -0
- package/batteries/vector/neo4j.cjs.map +1 -0
- package/batteries/vector/neo4j.mjs +229 -0
- package/batteries/vector/neo4j.mjs.map +1 -0
- package/batteries/vector/opensearch/index.d.ts +46 -0
- package/batteries/vector/opensearch.cjs +316 -0
- package/batteries/vector/opensearch.cjs.map +1 -0
- package/batteries/vector/opensearch.mjs +313 -0
- package/batteries/vector/opensearch.mjs.map +1 -0
- package/batteries/vector/oracle23ai/index.d.ts +45 -0
- package/batteries/vector/oracle23ai.cjs +340 -0
- package/batteries/vector/oracle23ai.cjs.map +1 -0
- package/batteries/vector/oracle23ai.mjs +338 -0
- package/batteries/vector/oracle23ai.mjs.map +1 -0
- package/batteries/vector/orama/index.d.ts +23 -0
- package/batteries/vector/orama.cjs +272 -0
- package/batteries/vector/orama.cjs.map +1 -0
- package/batteries/vector/orama.mjs +270 -0
- package/batteries/vector/orama.mjs.map +1 -0
- package/batteries/vector/pgvector/index.d.ts +43 -0
- package/batteries/vector/pgvector.cjs +411 -0
- package/batteries/vector/pgvector.cjs.map +1 -0
- package/batteries/vector/pgvector.mjs +408 -0
- package/batteries/vector/pgvector.mjs.map +1 -0
- package/batteries/vector/pinecone/index.d.ts +38 -0
- package/batteries/vector/pinecone.cjs +415 -0
- package/batteries/vector/pinecone.cjs.map +1 -0
- package/batteries/vector/pinecone.mjs +412 -0
- package/batteries/vector/pinecone.mjs.map +1 -0
- package/batteries/vector/plan.cjs +2 -0
- package/batteries/vector/plan.d.ts +65 -0
- package/batteries/vector/plan.mjs +0 -0
- package/batteries/vector/qdrant/index.d.ts +34 -0
- package/batteries/vector/qdrant.cjs +286 -0
- package/batteries/vector/qdrant.cjs.map +1 -0
- package/batteries/vector/qdrant.mjs +284 -0
- package/batteries/vector/qdrant.mjs.map +1 -0
- package/batteries/vector/redis/index.d.ts +44 -0
- package/batteries/vector/redis.cjs +391 -0
- package/batteries/vector/redis.cjs.map +1 -0
- package/batteries/vector/redis.mjs +388 -0
- package/batteries/vector/redis.mjs.map +1 -0
- package/batteries/vector/retrievable.cjs +69 -0
- package/batteries/vector/retrievable.cjs.map +1 -0
- package/batteries/vector/retrievable.mjs +67 -0
- package/batteries/vector/retrievable.mjs.map +1 -0
- package/batteries/vector/retrievable_glue.d.ts +24 -0
- package/batteries/vector/s3vectors/index.d.ts +52 -0
- package/batteries/vector/s3vectors.cjs +438 -0
- package/batteries/vector/s3vectors.cjs.map +1 -0
- package/batteries/vector/s3vectors.mjs +436 -0
- package/batteries/vector/s3vectors.mjs.map +1 -0
- package/batteries/vector/schema.cjs +96 -0
- package/batteries/vector/schema.cjs.map +1 -0
- package/batteries/vector/schema.d.ts +40 -0
- package/batteries/vector/schema.mjs +93 -0
- package/batteries/vector/schema.mjs.map +1 -0
- package/batteries/vector/solr/index.d.ts +36 -0
- package/batteries/vector/solr.cjs +230 -0
- package/batteries/vector/solr.cjs.map +1 -0
- package/batteries/vector/solr.mjs +228 -0
- package/batteries/vector/solr.mjs.map +1 -0
- package/batteries/vector/sqlite_vec/index.d.ts +30 -0
- package/batteries/vector/sqlite_vec.cjs +318 -0
- package/batteries/vector/sqlite_vec.cjs.map +1 -0
- package/batteries/vector/sqlite_vec.mjs +316 -0
- package/batteries/vector/sqlite_vec.mjs.map +1 -0
- package/batteries/vector/surrealdb/index.d.ts +37 -0
- package/batteries/vector/surrealdb.cjs +230 -0
- package/batteries/vector/surrealdb.cjs.map +1 -0
- package/batteries/vector/surrealdb.mjs +228 -0
- package/batteries/vector/surrealdb.mjs.map +1 -0
- package/batteries/vector/types.cjs +2 -0
- package/batteries/vector/types.d.ts +100 -0
- package/batteries/vector/types.mjs +0 -0
- package/batteries/vector/typesense/index.d.ts +38 -0
- package/batteries/vector/typesense.cjs +272 -0
- package/batteries/vector/typesense.cjs.map +1 -0
- package/batteries/vector/typesense.mjs +270 -0
- package/batteries/vector/typesense.mjs.map +1 -0
- package/batteries/vector/validation.cjs +90 -0
- package/batteries/vector/validation.cjs.map +1 -0
- package/batteries/vector/validation.d.ts +18 -0
- package/batteries/vector/validation.mjs +83 -0
- package/batteries/vector/validation.mjs.map +1 -0
- package/batteries/vector/vector_store_constructor.cjs +56 -0
- package/batteries/vector/vector_store_constructor.cjs.map +1 -0
- package/batteries/vector/vector_store_constructor.d.ts +30 -0
- package/batteries/vector/vector_store_constructor.mjs +53 -0
- package/batteries/vector/vector_store_constructor.mjs.map +1 -0
- package/batteries/vector/vespa/index.d.ts +39 -0
- package/batteries/vector/vespa.cjs +423 -0
- package/batteries/vector/vespa.cjs.map +1 -0
- package/batteries/vector/vespa.mjs +421 -0
- package/batteries/vector/vespa.mjs.map +1 -0
- package/batteries/vector/weaviate/index.d.ts +57 -0
- package/batteries/vector/weaviate.cjs +325 -0
- package/batteries/vector/weaviate.cjs.map +1 -0
- package/batteries/vector/weaviate.mjs +322 -0
- package/batteries/vector/weaviate.mjs.map +1 -0
- package/batteries/vector.cjs +63 -0
- package/batteries/vector.mjs +14 -0
- package/batteries.cjs +62 -0
- package/batteries.mjs +15 -1
- package/{chunk-kRvK8_k2.mjs → chunk-Bpcn9VDT.mjs} +5 -1
- package/{common-lMrnzoyn.mjs → common-BT0nfCi9.mjs} +8 -8
- package/{common-lMrnzoyn.mjs.map → common-BT0nfCi9.mjs.map} +1 -1
- package/{common-D_e5zYsG.js → common-Cj8TaQ9U.js} +8 -8
- package/{common-D_e5zYsG.js.map → common-Cj8TaQ9U.js.map} +1 -1
- package/common.cjs +7 -7
- package/common.mjs +7 -7
- package/{dispatch_runner-CpuyATj1.js → dispatch_runner-BHBNupqp.js} +2 -2
- package/dispatch_runner-BHBNupqp.js.map +1 -0
- package/{dispatch_runner-CDF3X0nv.mjs → dispatch_runner-DPcS7Y_M.mjs} +2 -2
- package/dispatch_runner-DPcS7Y_M.mjs.map +1 -0
- package/dispatch_runner.cjs +1 -1
- package/dispatch_runner.mjs +1 -1
- package/forge.cjs +4 -4
- package/forge.mjs +4 -4
- package/guards.cjs +8 -8
- package/guards.mjs +8 -8
- package/index.cjs +12 -12
- package/index.mjs +12 -12
- package/lib/classes/tool_registry.d.ts +70 -4
- package/mcp/adk-docs-corpus.json +1 -1
- package/package.json +424 -88
- package/skills/adk-assembly/SKILL.md +2 -2
- package/{spooled_artifact-B8gIIn9h.js → spooled_artifact-BTq6Nzfy.js} +4 -4
- package/spooled_artifact-BTq6Nzfy.js.map +1 -0
- package/{spooled_artifact-CWoKUDEm.mjs → spooled_artifact-CHoZgWwI.mjs} +4 -4
- package/spooled_artifact-CHoZgWwI.mjs.map +1 -0
- package/spooled_artifact.cjs +2 -2
- package/spooled_artifact.mjs +2 -2
- package/{spooled_markdown_artifact-DQX0RCdI.js → spooled_markdown_artifact-CALSDxIx.js} +3 -3
- package/{spooled_markdown_artifact-DQX0RCdI.js.map → spooled_markdown_artifact-CALSDxIx.js.map} +1 -1
- package/{spooled_markdown_artifact-CNle4jXN.mjs → spooled_markdown_artifact-Ci5UL7l4.mjs} +3 -3
- package/{spooled_markdown_artifact-CNle4jXN.mjs.map → spooled_markdown_artifact-Ci5UL7l4.mjs.map} +1 -1
- package/src/types/evaluatex.d.ts +31 -0
- package/{thought-BD6AkkOr.js → thought-BbwhJ1wb.js} +4 -4
- package/thought-BbwhJ1wb.js.map +1 -0
- package/{thought-B_P8LiB6.mjs → thought-D34QQZZ9.mjs} +4 -4
- package/thought-D34QQZZ9.mjs.map +1 -0
- package/{tool-CRZSUcdP.mjs → tool-CMhaDRNd.mjs} +3 -3
- package/tool-CMhaDRNd.mjs.map +1 -0
- package/{tool-CX9vNHAw.js → tool-CVyZkFC7.js} +3 -3
- package/tool-CVyZkFC7.js.map +1 -0
- package/{tool_call-BUeMuCc6.mjs → tool_call-CV5qVNlb.mjs} +3 -3
- package/{tool_call-BUeMuCc6.mjs.map → tool_call-CV5qVNlb.mjs.map} +1 -1
- package/{tool_call--7ti-frB.js → tool_call-Db68hB7y.js} +3 -3
- package/{tool_call--7ti-frB.js.map → tool_call-Db68hB7y.js.map} +1 -1
- package/{tool_registry-BGHg6KTq.mjs → tool_registry-D1pSSlsd.mjs} +109 -22
- package/tool_registry-D1pSSlsd.mjs.map +1 -0
- package/{tool_registry-CtCQ4Xoz.js → tool_registry-DYUYqXvo.js} +109 -22
- package/tool_registry-DYUYqXvo.js.map +1 -0
- package/{turn_runner-BJTtAORU.js → turn_runner-DqWHNP80.js} +5 -5
- package/turn_runner-DqWHNP80.js.map +1 -0
- package/{turn_runner-C02LZHjt.mjs → turn_runner-fg1Wc3dK.mjs} +5 -5
- package/turn_runner-fg1Wc3dK.mjs.map +1 -0
- package/turn_runner.cjs +1 -1
- package/turn_runner.mjs +1 -1
- package/dispatch_runner-CDF3X0nv.mjs.map +0 -1
- package/dispatch_runner-CpuyATj1.js.map +0 -1
- package/spooled_artifact-B8gIIn9h.js.map +0 -1
- package/spooled_artifact-CWoKUDEm.mjs.map +0 -1
- package/thought-BD6AkkOr.js.map +0 -1
- package/thought-B_P8LiB6.mjs.map +0 -1
- package/tool-CRZSUcdP.mjs.map +0 -1
- package/tool-CX9vNHAw.js.map +0 -1
- package/tool_registry-BGHg6KTq.mjs.map +0 -1
- package/tool_registry-CtCQ4Xoz.js.map +0 -1
- package/turn_runner-BJTtAORU.js.map +0 -1
- package/turn_runner-C02LZHjt.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_thought = require("../../thought-
|
|
5
|
-
const require_tool = require("../../tool-
|
|
6
|
-
require("../../common-
|
|
7
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_thought = require("../../thought-BbwhJ1wb.js");
|
|
5
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
6
|
+
require("../../common-Cj8TaQ9U.js");
|
|
7
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
8
8
|
require("../../guards.cjs");
|
|
9
9
|
let _nhtio_validation = require("@nhtio/validation");
|
|
10
10
|
let luxon = require("luxon");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { r as Memory } from "../../thought-
|
|
3
|
-
import { t as Tool } from "../../tool-
|
|
4
|
-
import "../../common-
|
|
5
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { r as Memory } from "../../thought-D34QQZZ9.mjs";
|
|
3
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
4
|
+
import "../../common-BT0nfCi9.mjs";
|
|
5
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
6
6
|
import "../../guards.mjs";
|
|
7
7
|
import { validator } from "@nhtio/validation";
|
|
8
8
|
import { DateTime } from "luxon";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
require("../../common-
|
|
6
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
require("../../common-Cj8TaQ9U.js");
|
|
6
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
7
7
|
require("../../guards.cjs");
|
|
8
8
|
let _nhtio_validation = require("@nhtio/validation");
|
|
9
9
|
let js_yaml = require("js-yaml");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import "../../common-
|
|
4
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import "../../common-BT0nfCi9.mjs";
|
|
4
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
5
5
|
import "../../guards.mjs";
|
|
6
6
|
import { validator } from "@nhtio/validation";
|
|
7
7
|
import { load } from "js-yaml";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
const require_common = require("../../common-
|
|
6
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
const require_common = require("../../common-Cj8TaQ9U.js");
|
|
6
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
7
7
|
require("../../guards.cjs");
|
|
8
8
|
let _nhtio_validation = require("@nhtio/validation");
|
|
9
9
|
let luxon = require("luxon");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import { o as Retrievable } from "../../common-
|
|
4
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import { o as Retrievable } from "../../common-BT0nfCi9.mjs";
|
|
4
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
5
5
|
import "../../guards.mjs";
|
|
6
6
|
import { validator } from "@nhtio/validation";
|
|
7
7
|
import { DateTime } from "luxon";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
require("../../common-
|
|
6
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
require("../../common-Cj8TaQ9U.js");
|
|
6
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
7
7
|
require("../../guards.cjs");
|
|
8
8
|
let _nhtio_validation = require("@nhtio/validation");
|
|
9
9
|
//#region src/batteries/tools/standing_instructions/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import "../../common-
|
|
4
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import "../../common-BT0nfCi9.mjs";
|
|
4
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
5
5
|
import "../../guards.mjs";
|
|
6
6
|
import { validator } from "@nhtio/validation";
|
|
7
7
|
//#region src/batteries/tools/standing_instructions/index.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
require("../../common-
|
|
6
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
require("../../common-Cj8TaQ9U.js");
|
|
6
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
7
7
|
require("../../guards.cjs");
|
|
8
8
|
let _nhtio_validation = require("@nhtio/validation");
|
|
9
9
|
let simple_statistics = require("simple-statistics");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import "../../common-
|
|
4
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import "../../common-BT0nfCi9.mjs";
|
|
4
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
5
5
|
import "../../guards.mjs";
|
|
6
6
|
import { validator } from "@nhtio/validation";
|
|
7
7
|
import { equalIntervalBreaks, interquartileRange, max, mean, median, min, mode, quantile, sampleCorrelation, standardDeviation, sum, variance, zScore } from "simple-statistics";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
require("../../common-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
require("../../common-Cj8TaQ9U.js");
|
|
6
6
|
require("../../guards.cjs");
|
|
7
7
|
let _nhtio_validation = require("@nhtio/validation");
|
|
8
8
|
let case_anything = require("case-anything");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import "../../common-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import "../../common-BT0nfCi9.mjs";
|
|
4
4
|
import "../../guards.mjs";
|
|
5
5
|
import { validator } from "@nhtio/validation";
|
|
6
6
|
import { camelCase, capitalCase, kebabCase, pascalCase, snakeCase, trainCase } from "case-anything";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool_registry = require("../../tool_registry-
|
|
4
|
-
const require_tool = require("../../tool-
|
|
5
|
-
require("../../common-
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
5
|
+
require("../../common-Cj8TaQ9U.js");
|
|
6
6
|
require("../../guards.cjs");
|
|
7
7
|
let _nhtio_validation = require("@nhtio/validation");
|
|
8
8
|
//#region src/batteries/tools/structured_data/index.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as isError } from "../../tool_registry-
|
|
2
|
-
import { t as Tool } from "../../tool-
|
|
3
|
-
import "../../common-
|
|
1
|
+
import { o as isError } from "../../tool_registry-D1pSSlsd.mjs";
|
|
2
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
3
|
+
import "../../common-BT0nfCi9.mjs";
|
|
4
4
|
import "../../guards.mjs";
|
|
5
5
|
import { validator } from "@nhtio/validation";
|
|
6
6
|
//#region src/batteries/tools/structured_data/index.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool = require("../../tool-
|
|
4
|
-
require("../../common-
|
|
5
|
-
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-
|
|
3
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
4
|
+
require("../../common-Cj8TaQ9U.js");
|
|
5
|
+
const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-CALSDxIx.js");
|
|
6
6
|
let _nhtio_validation = require("@nhtio/validation");
|
|
7
7
|
//#region src/batteries/tools/text_analysis/index.ts
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Tool } from "../../tool-
|
|
2
|
-
import "../../common-
|
|
3
|
-
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-
|
|
1
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
2
|
+
import "../../common-BT0nfCi9.mjs";
|
|
3
|
+
import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-Ci5UL7l4.mjs";
|
|
4
4
|
import { validator } from "@nhtio/validation";
|
|
5
5
|
//#region src/batteries/tools/text_analysis/index.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool = require("../../tool-
|
|
4
|
-
require("../../common-
|
|
3
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
4
|
+
require("../../common-Cj8TaQ9U.js");
|
|
5
5
|
let _nhtio_validation = require("@nhtio/validation");
|
|
6
6
|
let diff = require("diff");
|
|
7
7
|
let fastest_levenshtein = require("fastest-levenshtein");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Tool } from "../../tool-
|
|
2
|
-
import "../../common-
|
|
1
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
2
|
+
import "../../common-BT0nfCi9.mjs";
|
|
3
3
|
import { validator } from "@nhtio/validation";
|
|
4
4
|
import { diffLines, diffWords } from "diff";
|
|
5
5
|
import { distance } from "fastest-levenshtein";
|
package/batteries/tools/time.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool = require("../../tool-
|
|
4
|
-
require("../../common-
|
|
3
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
4
|
+
require("../../common-Cj8TaQ9U.js");
|
|
5
5
|
let _nhtio_validation = require("@nhtio/validation");
|
|
6
6
|
let luxon = require("luxon");
|
|
7
7
|
//#region src/batteries/tools/time/index.ts
|
package/batteries/tools/time.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Tool } from "../../tool-
|
|
2
|
-
import "../../common-
|
|
1
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
2
|
+
import "../../common-BT0nfCi9.mjs";
|
|
3
3
|
import { validator } from "@nhtio/validation";
|
|
4
4
|
import { DateTime, IANAZone } from "luxon";
|
|
5
5
|
//#region src/batteries/tools/time/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Ble4zEEl.js");
|
|
3
|
-
const require_tool = require("../../tool-
|
|
4
|
-
require("../../common-
|
|
3
|
+
const require_tool = require("../../tool-CVyZkFC7.js");
|
|
4
|
+
require("../../common-Cj8TaQ9U.js");
|
|
5
5
|
let _nhtio_validation = require("@nhtio/validation");
|
|
6
6
|
//#region src/batteries/tools/unit_conversion/index.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Tool } from "../../tool-
|
|
2
|
-
import "../../common-
|
|
1
|
+
import { t as Tool } from "../../tool-CMhaDRNd.mjs";
|
|
2
|
+
import "../../common-BT0nfCi9.mjs";
|
|
3
3
|
import { validator } from "@nhtio/validation";
|
|
4
4
|
//#region src/batteries/tools/unit_conversion/index.ts
|
|
5
5
|
/**
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @nhtio/adk/batteries/vector/arangodb
|
|
3
|
+
*
|
|
4
|
+
* ArangoDB adapter (experimental vector index, 3.12.4+). Each collection is an ArangoDB
|
|
5
|
+
* document collection keyed by `_key`; a `vector` index on `vec` enables KNN via
|
|
6
|
+
* `APPROX_NEAR_COSINE` / `APPROX_NEAR_L2`. Metadata is a JSON string attribute filtered with
|
|
7
|
+
* the neutral filter tree's JS reference evaluator for exact cross-adapter parity.
|
|
8
|
+
*
|
|
9
|
+
* Driver: `arangojs` (pure JS). Requires the server started with
|
|
10
|
+
* `--experimental-vector-index=true`. All values are passed as AQL bind parameters.
|
|
11
|
+
*/
|
|
12
|
+
import { BaseVectorStore } from "../contract";
|
|
13
|
+
import type { SearchPlan, UpsertPlan, DeletePlan, CollectionSpec } from "../plan";
|
|
14
|
+
import type { VectorMatch, VectorStoreCapabilities, BaseVectorStoreOptions } from "../types";
|
|
15
|
+
export interface ArangoDBVectorStoreOptions extends BaseVectorStoreOptions {
|
|
16
|
+
connection: {
|
|
17
|
+
url: string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
database?: string;
|
|
21
|
+
nLists?: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class ArangoDBVectorStore extends BaseVectorStore {
|
|
25
|
+
#private;
|
|
26
|
+
readonly capabilities: VectorStoreCapabilities;
|
|
27
|
+
static isAvailable(): boolean;
|
|
28
|
+
isAvailable(): boolean;
|
|
29
|
+
connect(): Promise<void>;
|
|
30
|
+
close(): Promise<void>;
|
|
31
|
+
createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise<void>;
|
|
32
|
+
dropCollection(collection: string, ifExists: boolean): Promise<void>;
|
|
33
|
+
hasCollection(collection: string): Promise<boolean>;
|
|
34
|
+
renameCollection(_from: string, _to: string): Promise<void>;
|
|
35
|
+
executeUpsert(plan: UpsertPlan): Promise<void>;
|
|
36
|
+
executeSearch(plan: SearchPlan): Promise<VectorMatch[]>;
|
|
37
|
+
executeDelete(plan: DeletePlan): Promise<void>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../chunk-Ble4zEEl.js");
|
|
3
|
+
const require_tool_registry = require("../../tool_registry-DYUYqXvo.js");
|
|
4
|
+
require("../../guards.cjs");
|
|
5
|
+
const require_batteries_vector_filters = require("./filters.cjs");
|
|
6
|
+
const require_batteries_vector_exceptions = require("./exceptions.cjs");
|
|
7
|
+
const require_batteries_vector_contract = require("./contract.cjs");
|
|
8
|
+
const require_batteries_vector_validation = require("./validation.cjs");
|
|
9
|
+
//#region src/batteries/vector/arangodb/index.ts
|
|
10
|
+
/**
|
|
11
|
+
* @module @nhtio/adk/batteries/vector/arangodb
|
|
12
|
+
*
|
|
13
|
+
* ArangoDB adapter (experimental vector index, 3.12.4+). Each collection is an ArangoDB
|
|
14
|
+
* document collection keyed by `_key`; a `vector` index on `vec` enables KNN via
|
|
15
|
+
* `APPROX_NEAR_COSINE` / `APPROX_NEAR_L2`. Metadata is a JSON string attribute filtered with
|
|
16
|
+
* the neutral filter tree's JS reference evaluator for exact cross-adapter parity.
|
|
17
|
+
*
|
|
18
|
+
* Driver: `arangojs` (pure JS). Requires the server started with
|
|
19
|
+
* `--experimental-vector-index=true`. All values are passed as AQL bind parameters.
|
|
20
|
+
*/
|
|
21
|
+
var getArango = async () => {
|
|
22
|
+
try {
|
|
23
|
+
return await import("arangojs");
|
|
24
|
+
} catch {
|
|
25
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_DRIVER_UNAVAILABLE(["arangojs"]);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var ArangoDBVectorStore = class extends require_batteries_vector_contract.BaseVectorStore {
|
|
29
|
+
capabilities = {
|
|
30
|
+
transactions: false,
|
|
31
|
+
namedVectors: false,
|
|
32
|
+
rename: false,
|
|
33
|
+
rawSql: false,
|
|
34
|
+
builtInEncoding: false,
|
|
35
|
+
consistency: {
|
|
36
|
+
configurable: false,
|
|
37
|
+
default: "strong",
|
|
38
|
+
modes: ["strong"]
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
#db = null;
|
|
42
|
+
#aql = null;
|
|
43
|
+
#dims = /* @__PURE__ */ new Map();
|
|
44
|
+
#indexed = /* @__PURE__ */ new Set();
|
|
45
|
+
get #opts() {
|
|
46
|
+
return this.options;
|
|
47
|
+
}
|
|
48
|
+
static isAvailable() {
|
|
49
|
+
return typeof process !== "undefined";
|
|
50
|
+
}
|
|
51
|
+
isAvailable() {
|
|
52
|
+
return typeof process !== "undefined";
|
|
53
|
+
}
|
|
54
|
+
async connect() {
|
|
55
|
+
if (this.#db) return;
|
|
56
|
+
const arango = await getArango();
|
|
57
|
+
this.#aql = arango.aql;
|
|
58
|
+
const c = this.#opts.connection;
|
|
59
|
+
const dbName = c.database ?? "vector";
|
|
60
|
+
try {
|
|
61
|
+
const auth = c.username ? {
|
|
62
|
+
username: c.username,
|
|
63
|
+
password: c.password ?? ""
|
|
64
|
+
} : void 0;
|
|
65
|
+
const sys = new arango.Database({
|
|
66
|
+
url: c.url,
|
|
67
|
+
auth
|
|
68
|
+
});
|
|
69
|
+
if (!await sys.listDatabases().then((dbs) => dbs.includes(dbName))) await sys.createDatabase(dbName);
|
|
70
|
+
this.#db = new arango.Database({
|
|
71
|
+
url: c.url,
|
|
72
|
+
databaseName: dbName,
|
|
73
|
+
auth
|
|
74
|
+
});
|
|
75
|
+
} catch (err) {
|
|
76
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_CONNECTION_FAILED([String(err)]);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async close() {
|
|
80
|
+
this.#db = null;
|
|
81
|
+
this.#aql = null;
|
|
82
|
+
}
|
|
83
|
+
async #ensure() {
|
|
84
|
+
if (!this.#db) await this.connect();
|
|
85
|
+
return this.#db;
|
|
86
|
+
}
|
|
87
|
+
async createCollection(spec, ifNotExists) {
|
|
88
|
+
const db = await this.#ensure();
|
|
89
|
+
this.#dims.set(spec.collection, spec.vector.dimensions);
|
|
90
|
+
try {
|
|
91
|
+
const col = db.collection(spec.collection);
|
|
92
|
+
if (await col.exists() && !ifNotExists) {
|
|
93
|
+
await col.drop();
|
|
94
|
+
this.#indexed.delete(spec.collection);
|
|
95
|
+
}
|
|
96
|
+
if (!await col.exists()) {
|
|
97
|
+
await col.create();
|
|
98
|
+
this.#indexed.delete(spec.collection);
|
|
99
|
+
}
|
|
100
|
+
} catch (err) {
|
|
101
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_COLLECTION_FAILED(["createCollection", String(err)]);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async #ensureVectorIndex(collection) {
|
|
105
|
+
if (this.#indexed.has(collection)) return;
|
|
106
|
+
const col = (await this.#ensure()).collection(collection);
|
|
107
|
+
const metric = this.#opts.metric ?? "cosine";
|
|
108
|
+
const dim = this.#dims.get(collection) ?? this.#opts.dimensions;
|
|
109
|
+
if (dim === void 0) return;
|
|
110
|
+
try {
|
|
111
|
+
await col.ensureIndex({
|
|
112
|
+
type: "vector",
|
|
113
|
+
fields: ["vec"],
|
|
114
|
+
params: {
|
|
115
|
+
metric: metric === "euclidean" ? "l2" : "cosine",
|
|
116
|
+
dimension: dim,
|
|
117
|
+
nLists: this.#opts.connection.nLists ?? 1
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
this.#indexed.add(collection);
|
|
121
|
+
} catch {}
|
|
122
|
+
}
|
|
123
|
+
async dropCollection(collection, ifExists) {
|
|
124
|
+
const db = await this.#ensure();
|
|
125
|
+
try {
|
|
126
|
+
const col = db.collection(collection);
|
|
127
|
+
if (await col.exists()) await col.drop();
|
|
128
|
+
else if (!ifExists) throw new Error("collection not found: " + collection);
|
|
129
|
+
this.#dims.delete(collection);
|
|
130
|
+
} catch (err) {
|
|
131
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_COLLECTION_FAILED(["dropCollection", String(err)]);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async hasCollection(collection) {
|
|
135
|
+
const db = await this.#ensure();
|
|
136
|
+
try {
|
|
137
|
+
return await db.collection(collection).exists();
|
|
138
|
+
} catch {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async renameCollection(_from, _to) {
|
|
143
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_UNSUPPORTED_OPERATION(["renameCollection", "arangodb"]);
|
|
144
|
+
}
|
|
145
|
+
async executeUpsert(plan) {
|
|
146
|
+
if (plan.records.length === 0) return;
|
|
147
|
+
require_batteries_vector_validation.validateRecords(plan.records);
|
|
148
|
+
const db = await this.#ensure();
|
|
149
|
+
const expected = this.#opts.dimensions ?? this.#dims.get(plan.collection);
|
|
150
|
+
try {
|
|
151
|
+
const col = db.collection(plan.collection);
|
|
152
|
+
for (const r of plan.records) {
|
|
153
|
+
let vector = r.vector;
|
|
154
|
+
if (!vector && r.document) {
|
|
155
|
+
const [v] = await this.encode([r.document], "document");
|
|
156
|
+
vector = v;
|
|
157
|
+
}
|
|
158
|
+
if (!vector) throw new require_batteries_vector_exceptions.E_VECTOR_STORE_UPSERT_FAILED(["Record missing vector and document"]);
|
|
159
|
+
if (expected !== void 0 && vector.length !== expected) throw new require_batteries_vector_exceptions.E_VECTOR_STORE_DIMENSION_MISMATCH([expected, vector.length]);
|
|
160
|
+
const doc = {
|
|
161
|
+
_key: r.id,
|
|
162
|
+
vec: vector,
|
|
163
|
+
document: r.document ?? "",
|
|
164
|
+
metadata: r.metadata ? JSON.stringify(r.metadata) : "{}"
|
|
165
|
+
};
|
|
166
|
+
await col.save(doc, { overwriteMode: "replace" });
|
|
167
|
+
}
|
|
168
|
+
await this.#ensureVectorIndex(plan.collection);
|
|
169
|
+
} catch (err) {
|
|
170
|
+
if (require_tool_registry.isInstanceOf(err, "E_VECTOR_STORE_DIMENSION_MISMATCH", require_batteries_vector_exceptions.E_VECTOR_STORE_DIMENSION_MISMATCH) || require_tool_registry.isInstanceOf(err, "E_VECTOR_STORE_UPSERT_FAILED", require_batteries_vector_exceptions.E_VECTOR_STORE_UPSERT_FAILED)) throw err;
|
|
171
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_UPSERT_FAILED([String(err)]);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async executeSearch(plan) {
|
|
175
|
+
const db = await this.#ensure();
|
|
176
|
+
const aql = this.#aql;
|
|
177
|
+
const metric = this.#opts.metric ?? "cosine";
|
|
178
|
+
let queryVector;
|
|
179
|
+
if (plan.near) {
|
|
180
|
+
if ("vector" in plan.near) queryVector = plan.near.vector;
|
|
181
|
+
else if ("serverText" in plan.near) {
|
|
182
|
+
const [v] = await this.encode([plan.near.serverText], "query");
|
|
183
|
+
queryVector = v;
|
|
184
|
+
} else if ("id" in plan.near) {
|
|
185
|
+
const col = db.collection(plan.collection);
|
|
186
|
+
try {
|
|
187
|
+
queryVector = (await col.document(plan.near.id)).vec;
|
|
188
|
+
} catch {
|
|
189
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_SEARCH_FAILED(["Referenced id not found: " + plan.near.id]);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const offset = plan.offset ?? 0;
|
|
194
|
+
try {
|
|
195
|
+
let rows;
|
|
196
|
+
if (queryVector) {
|
|
197
|
+
const useL2 = metric === "euclidean";
|
|
198
|
+
const fn = useL2 ? "L2_DISTANCE" : "COSINE_SIMILARITY";
|
|
199
|
+
const dir = useL2 ? "ASC" : "DESC";
|
|
200
|
+
const k = plan.filter ? 1e5 : plan.topK + offset;
|
|
201
|
+
const query = `FOR d IN @@col LET __score = ${fn}(d.vec, @qv) SORT __score ${dir} LIMIT @k RETURN { id: d._key, vec: d.vec, document: d.document, metadata: d.metadata, score: __score }`;
|
|
202
|
+
rows = await (await db.query(query, {
|
|
203
|
+
"@col": plan.collection,
|
|
204
|
+
"qv": queryVector,
|
|
205
|
+
k
|
|
206
|
+
})).all();
|
|
207
|
+
return (plan.filter ? rows.filter((row) => require_batteries_vector_filters.evaluateFilter(plan.filter, this.#parseMeta(row.metadata))) : rows).slice(offset, offset + plan.topK).map((row) => this.#project(row, plan, true));
|
|
208
|
+
} else {
|
|
209
|
+
rows = await (await db.query(aql`FOR d IN ${db.collection(plan.collection)} RETURN { id: d._key, vec: d.vec, document: d.document, metadata: d.metadata }`)).all();
|
|
210
|
+
return (plan.filter ? rows.filter((row) => require_batteries_vector_filters.evaluateFilter(plan.filter, this.#parseMeta(row.metadata))) : rows).slice(offset, offset + plan.topK).map((row) => this.#project(row, plan, false));
|
|
211
|
+
}
|
|
212
|
+
} catch (err) {
|
|
213
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_SEARCH_FAILED([String(err)]);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
#parseMeta(val) {
|
|
217
|
+
if (typeof val === "string") try {
|
|
218
|
+
return JSON.parse(val);
|
|
219
|
+
} catch {
|
|
220
|
+
return {};
|
|
221
|
+
}
|
|
222
|
+
if (val && typeof val === "object") return val;
|
|
223
|
+
return {};
|
|
224
|
+
}
|
|
225
|
+
#project(row, plan, isKnn) {
|
|
226
|
+
const proj = plan.projection;
|
|
227
|
+
const out = {};
|
|
228
|
+
if (proj.id) out.id = row.id;
|
|
229
|
+
if (proj.vector && Array.isArray(row.vec)) out.vector = row.vec.map(Number);
|
|
230
|
+
if (proj.document) out.document = row.document ?? void 0;
|
|
231
|
+
if (proj.metadata) out.metadata = this.#parseMeta(row.metadata);
|
|
232
|
+
if (isKnn && row.score !== void 0 && row.score !== null) out.score = (this.#opts.metric ?? "cosine") === "euclidean" ? 1 / (1 + Number(row.score)) : Number(row.score);
|
|
233
|
+
return out;
|
|
234
|
+
}
|
|
235
|
+
async executeDelete(plan) {
|
|
236
|
+
const db = await this.#ensure();
|
|
237
|
+
const aql = this.#aql;
|
|
238
|
+
try {
|
|
239
|
+
const col = db.collection(plan.collection);
|
|
240
|
+
if (plan.ids && plan.ids.length > 0) await col.removeAll(plan.ids).catch(async () => {
|
|
241
|
+
for (const id of plan.ids) await col.remove(id).catch(() => void 0);
|
|
242
|
+
});
|
|
243
|
+
else if (plan.filter) {
|
|
244
|
+
const targets = (await (await db.query(aql`FOR d IN ${col} RETURN { id: d._key, metadata: d.metadata }`)).all()).filter((row) => require_batteries_vector_filters.evaluateFilter(plan.filter, this.#parseMeta(row.metadata))).map((row) => row.id);
|
|
245
|
+
if (targets.length > 0) await col.removeAll(targets).catch(async () => {
|
|
246
|
+
for (const id of targets) await col.remove(id).catch(() => void 0);
|
|
247
|
+
});
|
|
248
|
+
} else await col.truncate();
|
|
249
|
+
} catch (err) {
|
|
250
|
+
throw new require_batteries_vector_exceptions.E_VECTOR_STORE_DELETE_FAILED([String(err)]);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
//#endregion
|
|
255
|
+
exports.ArangoDBVectorStore = ArangoDBVectorStore;
|
|
256
|
+
|
|
257
|
+
//# sourceMappingURL=arangodb.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arangodb.cjs","names":["#opts","#db","#aql","#ensure","#dims","#indexed","#ensureVectorIndex","#parseMeta","#project"],"sources":["../../../src/batteries/vector/arangodb/index.ts"],"sourcesContent":["/**\n * @module @nhtio/adk/batteries/vector/arangodb\n *\n * ArangoDB adapter (experimental vector index, 3.12.4+). Each collection is an ArangoDB\n * document collection keyed by `_key`; a `vector` index on `vec` enables KNN via\n * `APPROX_NEAR_COSINE` / `APPROX_NEAR_L2`. Metadata is a JSON string attribute filtered with\n * the neutral filter tree's JS reference evaluator for exact cross-adapter parity.\n *\n * Driver: `arangojs` (pure JS). Requires the server started with\n * `--experimental-vector-index=true`. All values are passed as AQL bind parameters.\n */\n\nimport { evaluateFilter } from '../filters'\nimport { BaseVectorStore } from '../contract'\nimport { validateRecords } from '../validation'\nimport { isInstanceOf } from '@nhtio/adk/guards'\nimport {\n E_VECTOR_STORE_DRIVER_UNAVAILABLE,\n E_VECTOR_STORE_CONNECTION_FAILED,\n E_VECTOR_STORE_COLLECTION_FAILED,\n E_VECTOR_STORE_UPSERT_FAILED,\n E_VECTOR_STORE_SEARCH_FAILED,\n E_VECTOR_STORE_DELETE_FAILED,\n E_VECTOR_STORE_DIMENSION_MISMATCH,\n E_VECTOR_STORE_UNSUPPORTED_OPERATION,\n} from '../exceptions'\nimport type { SearchPlan, UpsertPlan, DeletePlan, CollectionSpec } from '../plan'\nimport type {\n VectorMatch,\n VectorStoreCapabilities,\n BaseVectorStoreOptions,\n VectorMetadata,\n} from '../types'\n\nexport interface ArangoDBVectorStoreOptions extends BaseVectorStoreOptions {\n connection: {\n url: string\n username?: string\n password?: string\n database?: string\n nLists?: number\n }\n}\n\nconst getArango = async () => {\n try {\n const mod = await import('arangojs')\n return mod\n } catch {\n throw new E_VECTOR_STORE_DRIVER_UNAVAILABLE(['arangojs'])\n }\n}\n\nexport class ArangoDBVectorStore extends BaseVectorStore {\n readonly capabilities: VectorStoreCapabilities = {\n transactions: false,\n namedVectors: false,\n rename: false,\n rawSql: false,\n builtInEncoding: false,\n // Document writes are synchronous (visible on resolve). The option is a no-op.\n consistency: { configurable: false, default: 'strong', modes: ['strong'] },\n }\n\n #db: any | null = null\n #aql: any | null = null\n #dims: Map<string, number> = new Map()\n // ArangoDB's IVF vector index can't be created on an empty collection (\"not ready\") and\n // needs nLists <= doc count. We therefore create the index lazily after the first upsert.\n #indexed: Set<string> = new Set()\n\n get #opts(): ArangoDBVectorStoreOptions {\n return this.options as ArangoDBVectorStoreOptions\n }\n\n static isAvailable(): boolean {\n return typeof process !== 'undefined'\n }\n isAvailable(): boolean {\n return typeof process !== 'undefined'\n }\n\n async connect(): Promise<void> {\n if (this.#db) return\n const arango = await getArango()\n this.#aql = arango.aql\n const c = this.#opts.connection\n const dbName = c.database ?? 'vector'\n try {\n const auth = c.username ? { username: c.username, password: c.password ?? '' } : undefined\n const sys = new arango.Database({ url: c.url, auth })\n const exists = await sys.listDatabases().then((dbs: string[]) => dbs.includes(dbName))\n if (!exists) {\n await sys.createDatabase(dbName)\n }\n this.#db = new arango.Database({ url: c.url, databaseName: dbName, auth })\n } catch (err) {\n throw new E_VECTOR_STORE_CONNECTION_FAILED([String(err)])\n }\n }\n\n async close(): Promise<void> {\n this.#db = null\n this.#aql = null\n }\n\n async #ensure(): Promise<any> {\n if (!this.#db) await this.connect()\n return this.#db!\n }\n\n async createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise<void> {\n const db = await this.#ensure()\n this.#dims.set(spec.collection, spec.vector.dimensions)\n try {\n const col = db.collection(spec.collection)\n const exists = await col.exists()\n if (exists && !ifNotExists) {\n await col.drop()\n this.#indexed.delete(spec.collection)\n }\n if (!(await col.exists())) {\n await col.create()\n this.#indexed.delete(spec.collection)\n }\n // The vector index is created lazily on first upsert (see #ensureVectorIndex): ArangoDB\n // rejects creating it on an empty collection (\"vector index not ready\").\n } catch (err) {\n throw new E_VECTOR_STORE_COLLECTION_FAILED(['createCollection', String(err)])\n }\n }\n\n // Create the IVF vector index once the collection has data (idempotent per collection).\n async #ensureVectorIndex(collection: string): Promise<void> {\n if (this.#indexed.has(collection)) return\n const db = await this.#ensure()\n const col = db.collection(collection)\n const metric = this.#opts.metric ?? 'cosine'\n const dim = this.#dims.get(collection) ?? this.#opts.dimensions\n if (dim === undefined) return\n try {\n await col.ensureIndex({\n type: 'vector',\n fields: ['vec'],\n params: {\n metric: metric === 'euclidean' ? 'l2' : 'cosine',\n dimension: dim,\n nLists: this.#opts.connection.nLists ?? 1,\n },\n })\n this.#indexed.add(collection)\n } catch {\n // If it still isn't ready (too few docs), leave it; executeSearch falls back to a\n // brute-force AQL scan so correctness holds regardless of the index.\n }\n }\n\n async dropCollection(collection: string, ifExists: boolean): Promise<void> {\n const db = await this.#ensure()\n try {\n const col = db.collection(collection)\n if (await col.exists()) {\n await col.drop()\n } else if (!ifExists) {\n throw new Error('collection not found: ' + collection)\n }\n this.#dims.delete(collection)\n } catch (err) {\n throw new E_VECTOR_STORE_COLLECTION_FAILED(['dropCollection', String(err)])\n }\n }\n\n async hasCollection(collection: string): Promise<boolean> {\n const db = await this.#ensure()\n try {\n return await db.collection(collection).exists()\n } catch {\n return false\n }\n }\n\n async renameCollection(_from: string, _to: string): Promise<void> {\n throw new E_VECTOR_STORE_UNSUPPORTED_OPERATION(['renameCollection', 'arangodb'])\n }\n\n async executeUpsert(plan: UpsertPlan): Promise<void> {\n if (plan.records.length === 0) return\n validateRecords(plan.records)\n const db = await this.#ensure()\n const expected = this.#opts.dimensions ?? this.#dims.get(plan.collection)\n try {\n const col = db.collection(plan.collection)\n for (const r of plan.records) {\n let vector = r.vector\n if (!vector && r.document) {\n const [v] = await this.encode([r.document], 'document')\n vector = v\n }\n if (!vector) {\n throw new E_VECTOR_STORE_UPSERT_FAILED(['Record missing vector and document'])\n }\n if (expected !== undefined && vector.length !== expected) {\n throw new E_VECTOR_STORE_DIMENSION_MISMATCH([expected, vector.length])\n }\n const doc = {\n _key: r.id,\n vec: vector,\n document: r.document ?? '',\n metadata: r.metadata ? JSON.stringify(r.metadata) : '{}',\n }\n await col.save(doc, { overwriteMode: 'replace' })\n }\n // Now that the collection has data, ensure the IVF vector index exists.\n await this.#ensureVectorIndex(plan.collection)\n } catch (err) {\n if (\n isInstanceOf(err, 'E_VECTOR_STORE_DIMENSION_MISMATCH', E_VECTOR_STORE_DIMENSION_MISMATCH) ||\n isInstanceOf(err, 'E_VECTOR_STORE_UPSERT_FAILED', E_VECTOR_STORE_UPSERT_FAILED)\n ) {\n throw err\n }\n throw new E_VECTOR_STORE_UPSERT_FAILED([String(err)])\n }\n }\n\n async executeSearch(plan: SearchPlan): Promise<VectorMatch[]> {\n const db = await this.#ensure()\n const aql = this.#aql\n const metric = this.#opts.metric ?? 'cosine'\n let queryVector: number[] | undefined\n if (plan.near) {\n if ('vector' in plan.near) {\n queryVector = plan.near.vector\n } else if ('serverText' in plan.near) {\n const [v] = await this.encode([plan.near.serverText], 'query')\n queryVector = v\n } else if ('id' in plan.near) {\n const col = db.collection(plan.collection)\n try {\n const doc = await col.document(plan.near.id)\n queryVector = doc.vec as number[]\n } catch {\n throw new E_VECTOR_STORE_SEARCH_FAILED(['Referenced id not found: ' + plan.near.id])\n }\n }\n }\n\n const offset = plan.offset ?? 0\n try {\n let rows: any[]\n if (queryVector) {\n // Use the exact AQL distance functions (COSINE_SIMILARITY / L2_DISTANCE) rather than the\n // APPROX_NEAR_* index functions: they need no index, are always correct, and avoid\n // ArangoDB's IVF \"not ready\" / nLists-vs-doc-count constraints. The IVF index is still\n // created lazily on upsert for production-scale ANN; here correctness comes first.\n const useL2 = metric === 'euclidean'\n const fn = useL2 ? 'L2_DISTANCE' : 'COSINE_SIMILARITY'\n const dir = useL2 ? 'ASC' : 'DESC'\n const k = plan.filter ? 100000 : plan.topK + offset\n const query =\n `FOR d IN @@col ` +\n `LET __score = ${fn}(d.vec, @qv) ` +\n `SORT __score ${dir} LIMIT @k ` +\n `RETURN { id: d._key, vec: d.vec, document: d.document, metadata: d.metadata, score: __score }`\n const cursor = await db.query(query, {\n '@col': plan.collection,\n 'qv': queryVector,\n k,\n })\n rows = await cursor.all()\n const filtered = plan.filter\n ? rows.filter((row) => evaluateFilter(plan.filter!, this.#parseMeta(row.metadata)))\n : rows\n return filtered\n .slice(offset, offset + plan.topK)\n .map((row) => this.#project(row, plan, true))\n } else {\n const cursor = await db.query(\n aql`FOR d IN ${db.collection(plan.collection)} RETURN { id: d._key, vec: d.vec, document: d.document, metadata: d.metadata }`\n )\n rows = await cursor.all()\n const filtered = plan.filter\n ? rows.filter((row) => evaluateFilter(plan.filter!, this.#parseMeta(row.metadata)))\n : rows\n return filtered\n .slice(offset, offset + plan.topK)\n .map((row) => this.#project(row, plan, false))\n }\n } catch (err) {\n throw new E_VECTOR_STORE_SEARCH_FAILED([String(err)])\n }\n }\n\n #parseMeta(val: unknown): VectorMetadata {\n if (typeof val === 'string') {\n try {\n return JSON.parse(val) as VectorMetadata\n } catch {\n return {}\n }\n }\n if (val && typeof val === 'object') return val as VectorMetadata\n return {}\n }\n\n #project(row: any, plan: SearchPlan, isKnn: boolean): VectorMatch {\n const proj = plan.projection\n const out: VectorMatch = {}\n if (proj.id) out.id = row.id as string\n if (proj.vector && Array.isArray(row.vec)) out.vector = (row.vec as number[]).map(Number)\n if (proj.document) out.document = (row.document ?? undefined) as string | undefined\n if (proj.metadata) out.metadata = this.#parseMeta(row.metadata)\n if (isKnn && row.score !== undefined && row.score !== null) {\n // APPROX_NEAR_COSINE returns cosine similarity in [0,1]; L2 returns a distance.\n const m = this.#opts.metric ?? 'cosine'\n out.score = m === 'euclidean' ? 1 / (1 + Number(row.score)) : Number(row.score)\n }\n return out\n }\n\n async executeDelete(plan: DeletePlan): Promise<void> {\n const db = await this.#ensure()\n const aql = this.#aql\n try {\n const col = db.collection(plan.collection)\n if (plan.ids && plan.ids.length > 0) {\n await col.removeAll(plan.ids).catch(async () => {\n for (const id of plan.ids!) await col.remove(id).catch(() => undefined)\n })\n } else if (plan.filter) {\n const cursor = await db.query(\n aql`FOR d IN ${col} RETURN { id: d._key, metadata: d.metadata }`\n )\n const rows = await cursor.all()\n const targets = rows\n .filter((row: any) => evaluateFilter(plan.filter!, this.#parseMeta(row.metadata)))\n .map((row: any) => row.id as string)\n if (targets.length > 0) {\n await col.removeAll(targets).catch(async () => {\n for (const id of targets) await col.remove(id).catch(() => undefined)\n })\n }\n } else {\n await col.truncate()\n }\n } catch (err) {\n throw new E_VECTOR_STORE_DELETE_FAILED([String(err)])\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,YAAY,YAAY;CAC5B,IAAI;EAEF,OAAO,MADW,OAAO;CAE3B,QAAQ;EACN,MAAM,IA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