@legioncodeinc/nectar 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +662 -0
- package/README.md +307 -0
- package/dist/api/daemon-api-wiring.d.ts +72 -0
- package/dist/api/daemon-api-wiring.d.ts.map +1 -0
- package/dist/api/daemon-api-wiring.js +150 -0
- package/dist/api/daemon-api-wiring.js.map +1 -0
- package/dist/api/hive-graph-api.d.ts +136 -0
- package/dist/api/hive-graph-api.d.ts.map +1 -0
- package/dist/api/hive-graph-api.js +234 -0
- package/dist/api/hive-graph-api.js.map +1 -0
- package/dist/api/loopback-client.d.ts +27 -0
- package/dist/api/loopback-client.d.ts.map +1 -0
- package/dist/api/loopback-client.js +87 -0
- package/dist/api/loopback-client.js.map +1 -0
- package/dist/api/router.d.ts +172 -0
- package/dist/api/router.d.ts.map +1 -0
- package/dist/api/router.js +212 -0
- package/dist/api/router.js.map +1 -0
- package/dist/api/status-query.d.ts +49 -0
- package/dist/api/status-query.d.ts.map +1 -0
- package/dist/api/status-query.js +103 -0
- package/dist/api/status-query.js.map +1 -0
- package/dist/brood-guard.d.ts +24 -0
- package/dist/brood-guard.d.ts.map +1 -0
- package/dist/brood-guard.js +19 -0
- package/dist/brood-guard.js.map +1 -0
- package/dist/brood-prereqs.d.ts +62 -0
- package/dist/brood-prereqs.d.ts.map +1 -0
- package/dist/brood-prereqs.js +87 -0
- package/dist/brood-prereqs.js.map +1 -0
- package/dist/brooding/bucketing.d.ts +68 -0
- package/dist/brooding/bucketing.d.ts.map +1 -0
- package/dist/brooding/bucketing.js +122 -0
- package/dist/brooding/bucketing.js.map +1 -0
- package/dist/brooding/cli.d.ts +78 -0
- package/dist/brooding/cli.d.ts.map +1 -0
- package/dist/brooding/cli.js +140 -0
- package/dist/brooding/cli.js.map +1 -0
- package/dist/brooding/constants.d.ts +75 -0
- package/dist/brooding/constants.d.ts.map +1 -0
- package/dist/brooding/constants.js +91 -0
- package/dist/brooding/constants.js.map +1 -0
- package/dist/brooding/cost.d.ts +110 -0
- package/dist/brooding/cost.d.ts.map +1 -0
- package/dist/brooding/cost.js +96 -0
- package/dist/brooding/cost.js.map +1 -0
- package/dist/brooding/describe.d.ts +152 -0
- package/dist/brooding/describe.d.ts.map +1 -0
- package/dist/brooding/describe.js +281 -0
- package/dist/brooding/describe.js.map +1 -0
- package/dist/brooding/discovery.d.ts +116 -0
- package/dist/brooding/discovery.d.ts.map +1 -0
- package/dist/brooding/discovery.js +179 -0
- package/dist/brooding/discovery.js.map +1 -0
- package/dist/brooding/index.d.ts +23 -0
- package/dist/brooding/index.d.ts.map +1 -0
- package/dist/brooding/index.js +33 -0
- package/dist/brooding/index.js.map +1 -0
- package/dist/brooding/pipeline-async.d.ts +97 -0
- package/dist/brooding/pipeline-async.d.ts.map +1 -0
- package/dist/brooding/pipeline-async.js +364 -0
- package/dist/brooding/pipeline-async.js.map +1 -0
- package/dist/brooding/pipeline.d.ts +198 -0
- package/dist/brooding/pipeline.d.ts.map +1 -0
- package/dist/brooding/pipeline.js +454 -0
- package/dist/brooding/pipeline.js.map +1 -0
- package/dist/brooding/precheck.d.ts +52 -0
- package/dist/brooding/precheck.d.ts.map +1 -0
- package/dist/brooding/precheck.js +143 -0
- package/dist/brooding/precheck.js.map +1 -0
- package/dist/brooding/resumability.d.ts +57 -0
- package/dist/brooding/resumability.d.ts.map +1 -0
- package/dist/brooding/resumability.js +46 -0
- package/dist/brooding/resumability.js.map +1 -0
- package/dist/cli.d.ts +139 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +912 -0
- package/dist/cli.js.map +1 -0
- package/dist/config-file.d.ts +52 -0
- package/dist/config-file.d.ts.map +1 -0
- package/dist/config-file.js +130 -0
- package/dist/config-file.js.map +1 -0
- package/dist/config.d.ts +49 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +98 -0
- package/dist/config.js.map +1 -0
- package/dist/daemon.d.ts +265 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +664 -0
- package/dist/daemon.js.map +1 -0
- package/dist/doctor-registry.d.ts +134 -0
- package/dist/doctor-registry.d.ts.map +1 -0
- package/dist/doctor-registry.js +173 -0
- package/dist/doctor-registry.js.map +1 -0
- package/dist/embeddings/cohere-portkey.d.ts +67 -0
- package/dist/embeddings/cohere-portkey.d.ts.map +1 -0
- package/dist/embeddings/cohere-portkey.js +171 -0
- package/dist/embeddings/cohere-portkey.js.map +1 -0
- package/dist/embeddings/config.d.ts +74 -0
- package/dist/embeddings/config.d.ts.map +1 -0
- package/dist/embeddings/config.js +131 -0
- package/dist/embeddings/config.js.map +1 -0
- package/dist/embeddings/guard.d.ts +34 -0
- package/dist/embeddings/guard.d.ts.map +1 -0
- package/dist/embeddings/guard.js +67 -0
- package/dist/embeddings/guard.js.map +1 -0
- package/dist/embeddings/hosted-portkey.d.ts +73 -0
- package/dist/embeddings/hosted-portkey.d.ts.map +1 -0
- package/dist/embeddings/hosted-portkey.js +179 -0
- package/dist/embeddings/hosted-portkey.js.map +1 -0
- package/dist/embeddings/http.d.ts +33 -0
- package/dist/embeddings/http.d.ts.map +1 -0
- package/dist/embeddings/http.js +19 -0
- package/dist/embeddings/http.js.map +1 -0
- package/dist/embeddings/index.d.ts +17 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +17 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/local-nomic.d.ts +78 -0
- package/dist/embeddings/local-nomic.d.ts.map +1 -0
- package/dist/embeddings/local-nomic.js +126 -0
- package/dist/embeddings/local-nomic.js.map +1 -0
- package/dist/embeddings/provider.d.ts +79 -0
- package/dist/embeddings/provider.d.ts.map +1 -0
- package/dist/embeddings/provider.js +50 -0
- package/dist/embeddings/provider.js.map +1 -0
- package/dist/enricher/config.d.ts +43 -0
- package/dist/enricher/config.d.ts.map +1 -0
- package/dist/enricher/config.js +34 -0
- package/dist/enricher/config.js.map +1 -0
- package/dist/enricher/content-cache.d.ts +29 -0
- package/dist/enricher/content-cache.d.ts.map +1 -0
- package/dist/enricher/content-cache.js +24 -0
- package/dist/enricher/content-cache.js.map +1 -0
- package/dist/enricher/cycle.d.ts +71 -0
- package/dist/enricher/cycle.d.ts.map +1 -0
- package/dist/enricher/cycle.js +319 -0
- package/dist/enricher/cycle.js.map +1 -0
- package/dist/enricher/describe.d.ts +61 -0
- package/dist/enricher/describe.d.ts.map +1 -0
- package/dist/enricher/describe.js +175 -0
- package/dist/enricher/describe.js.map +1 -0
- package/dist/enricher/failure.d.ts +25 -0
- package/dist/enricher/failure.d.ts.map +1 -0
- package/dist/enricher/failure.js +46 -0
- package/dist/enricher/failure.js.map +1 -0
- package/dist/enricher/index.d.ts +22 -0
- package/dist/enricher/index.d.ts.map +1 -0
- package/dist/enricher/index.js +22 -0
- package/dist/enricher/index.js.map +1 -0
- package/dist/enricher/jaccard.d.ts +11 -0
- package/dist/enricher/jaccard.d.ts.map +1 -0
- package/dist/enricher/jaccard.js +29 -0
- package/dist/enricher/jaccard.js.map +1 -0
- package/dist/enricher/loop.d.ts +22 -0
- package/dist/enricher/loop.d.ts.map +1 -0
- package/dist/enricher/loop.js +34 -0
- package/dist/enricher/loop.js.map +1 -0
- package/dist/enricher/meaningful-change.d.ts +28 -0
- package/dist/enricher/meaningful-change.d.ts.map +1 -0
- package/dist/enricher/meaningful-change.js +41 -0
- package/dist/enricher/meaningful-change.js.map +1 -0
- package/dist/enricher/observability.d.ts +22 -0
- package/dist/enricher/observability.d.ts.map +1 -0
- package/dist/enricher/observability.js +55 -0
- package/dist/enricher/observability.js.map +1 -0
- package/dist/enricher/pending-query.d.ts +35 -0
- package/dist/enricher/pending-query.d.ts.map +1 -0
- package/dist/enricher/pending-query.js +54 -0
- package/dist/enricher/pending-query.js.map +1 -0
- package/dist/enricher/sql-update.d.ts +7 -0
- package/dist/enricher/sql-update.d.ts.map +1 -0
- package/dist/enricher/sql-update.js +22 -0
- package/dist/enricher/sql-update.js.map +1 -0
- package/dist/enricher/store-adapter.d.ts +98 -0
- package/dist/enricher/store-adapter.d.ts.map +1 -0
- package/dist/enricher/store-adapter.js +129 -0
- package/dist/enricher/store-adapter.js.map +1 -0
- package/dist/enricher/store.d.ts +58 -0
- package/dist/enricher/store.d.ts.map +1 -0
- package/dist/enricher/store.js +126 -0
- package/dist/enricher/store.js.map +1 -0
- package/dist/enricher/tokenize.d.ts +10 -0
- package/dist/enricher/tokenize.d.ts.map +1 -0
- package/dist/enricher/tokenize.js +28 -0
- package/dist/enricher/tokenize.js.map +1 -0
- package/dist/errors.d.ts +41 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +56 -0
- package/dist/errors.js.map +1 -0
- package/dist/health.d.ts +147 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +168 -0
- package/dist/health.js.map +1 -0
- package/dist/hive-graph/deeplake-credentials.d.ts +68 -0
- package/dist/hive-graph/deeplake-credentials.d.ts.map +1 -0
- package/dist/hive-graph/deeplake-credentials.js +135 -0
- package/dist/hive-graph/deeplake-credentials.js.map +1 -0
- package/dist/hive-graph/deeplake-heal.d.ts +63 -0
- package/dist/hive-graph/deeplake-heal.d.ts.map +1 -0
- package/dist/hive-graph/deeplake-heal.js +118 -0
- package/dist/hive-graph/deeplake-heal.js.map +1 -0
- package/dist/hive-graph/deeplake-store.d.ts +199 -0
- package/dist/hive-graph/deeplake-store.d.ts.map +1 -0
- package/dist/hive-graph/deeplake-store.js +541 -0
- package/dist/hive-graph/deeplake-store.js.map +1 -0
- package/dist/hive-graph/deeplake-transport.d.ts +89 -0
- package/dist/hive-graph/deeplake-transport.d.ts.map +1 -0
- package/dist/hive-graph/deeplake-transport.js +145 -0
- package/dist/hive-graph/deeplake-transport.js.map +1 -0
- package/dist/hive-graph/hash.d.ts +3 -0
- package/dist/hive-graph/hash.d.ts.map +1 -0
- package/dist/hive-graph/hash.js +12 -0
- package/dist/hive-graph/hash.js.map +1 -0
- package/dist/hive-graph/memory-store.d.ts +39 -0
- package/dist/hive-graph/memory-store.d.ts.map +1 -0
- package/dist/hive-graph/memory-store.js +125 -0
- package/dist/hive-graph/memory-store.js.map +1 -0
- package/dist/hive-graph/model.d.ts +109 -0
- package/dist/hive-graph/model.d.ts.map +1 -0
- package/dist/hive-graph/model.js +36 -0
- package/dist/hive-graph/model.js.map +1 -0
- package/dist/hive-graph/paths.d.ts +7 -0
- package/dist/hive-graph/paths.d.ts.map +1 -0
- package/dist/hive-graph/paths.js +26 -0
- package/dist/hive-graph/paths.js.map +1 -0
- package/dist/hive-graph/project-scope.d.ts +99 -0
- package/dist/hive-graph/project-scope.d.ts.map +1 -0
- package/dist/hive-graph/project-scope.js +286 -0
- package/dist/hive-graph/project-scope.js.map +1 -0
- package/dist/hive-graph/schema.d.ts +53 -0
- package/dist/hive-graph/schema.d.ts.map +1 -0
- package/dist/hive-graph/schema.js +139 -0
- package/dist/hive-graph/schema.js.map +1 -0
- package/dist/hive-graph/search-types.d.ts +82 -0
- package/dist/hive-graph/search-types.d.ts.map +1 -0
- package/dist/hive-graph/search-types.js +2 -0
- package/dist/hive-graph/search-types.js.map +1 -0
- package/dist/hive-graph/search.d.ts +51 -0
- package/dist/hive-graph/search.d.ts.map +1 -0
- package/dist/hive-graph/search.js +417 -0
- package/dist/hive-graph/search.js.map +1 -0
- package/dist/hive-graph/sql-guards.d.ts +99 -0
- package/dist/hive-graph/sql-guards.d.ts.map +1 -0
- package/dist/hive-graph/sql-guards.js +129 -0
- package/dist/hive-graph/sql-guards.js.map +1 -0
- package/dist/hive-graph/store.d.ts +151 -0
- package/dist/hive-graph/store.d.ts.map +1 -0
- package/dist/hive-graph/store.js +2 -0
- package/dist/hive-graph/store.js.map +1 -0
- package/dist/hive-graph/ulid.d.ts +14 -0
- package/dist/hive-graph/ulid.d.ts.map +1 -0
- package/dist/hive-graph/ulid.js +109 -0
- package/dist/hive-graph/ulid.js.map +1 -0
- package/dist/hivedoctor-registry.d.ts +111 -0
- package/dist/hivedoctor-registry.d.ts.map +1 -0
- package/dist/hivedoctor-registry.js +143 -0
- package/dist/hivedoctor-registry.js.map +1 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/lock.d.ts +66 -0
- package/dist/lock.d.ts.map +1 -0
- package/dist/lock.js +282 -0
- package/dist/lock.js.map +1 -0
- package/dist/poll-loop.d.ts +71 -0
- package/dist/poll-loop.d.ts.map +1 -0
- package/dist/poll-loop.js +130 -0
- package/dist/poll-loop.js.map +1 -0
- package/dist/portkey/config.d.ts +46 -0
- package/dist/portkey/config.d.ts.map +1 -0
- package/dist/portkey/config.js +68 -0
- package/dist/portkey/config.js.map +1 -0
- package/dist/portkey/describe-model.d.ts +53 -0
- package/dist/portkey/describe-model.d.ts.map +1 -0
- package/dist/portkey/describe-model.js +56 -0
- package/dist/portkey/describe-model.js.map +1 -0
- package/dist/portkey/headers.d.ts +31 -0
- package/dist/portkey/headers.d.ts.map +1 -0
- package/dist/portkey/headers.js +37 -0
- package/dist/portkey/headers.js.map +1 -0
- package/dist/portkey/transport.d.ts +89 -0
- package/dist/portkey/transport.d.ts.map +1 -0
- package/dist/portkey/transport.js +167 -0
- package/dist/portkey/transport.js.map +1 -0
- package/dist/projection/format.d.ts +51 -0
- package/dist/projection/format.d.ts.map +1 -0
- package/dist/projection/format.js +81 -0
- package/dist/projection/format.js.map +1 -0
- package/dist/projection/generate.d.ts +31 -0
- package/dist/projection/generate.d.ts.map +1 -0
- package/dist/projection/generate.js +83 -0
- package/dist/projection/generate.js.map +1 -0
- package/dist/projection/inherit.d.ts +27 -0
- package/dist/projection/inherit.d.ts.map +1 -0
- package/dist/projection/inherit.js +128 -0
- package/dist/projection/inherit.js.map +1 -0
- package/dist/projection/load.d.ts +47 -0
- package/dist/projection/load.d.ts.map +1 -0
- package/dist/projection/load.js +258 -0
- package/dist/projection/load.js.map +1 -0
- package/dist/projection/store-adapter.d.ts +42 -0
- package/dist/projection/store-adapter.d.ts.map +1 -0
- package/dist/projection/store-adapter.js +42 -0
- package/dist/projection/store-adapter.js.map +1 -0
- package/dist/projection/write.d.ts +79 -0
- package/dist/projection/write.d.ts.map +1 -0
- package/dist/projection/write.js +122 -0
- package/dist/projection/write.js.map +1 -0
- package/dist/registration/classify.d.ts +33 -0
- package/dist/registration/classify.d.ts.map +1 -0
- package/dist/registration/classify.js +32 -0
- package/dist/registration/classify.js.map +1 -0
- package/dist/registration/copy-detect.d.ts +22 -0
- package/dist/registration/copy-detect.d.ts.map +1 -0
- package/dist/registration/copy-detect.js +12 -0
- package/dist/registration/copy-detect.js.map +1 -0
- package/dist/registration/disk-fs.d.ts +41 -0
- package/dist/registration/disk-fs.d.ts.map +1 -0
- package/dist/registration/disk-fs.js +175 -0
- package/dist/registration/disk-fs.js.map +1 -0
- package/dist/registration/fs-watch.d.ts +114 -0
- package/dist/registration/fs-watch.d.ts.map +1 -0
- package/dist/registration/fs-watch.js +266 -0
- package/dist/registration/fs-watch.js.map +1 -0
- package/dist/registration/ignore.d.ts +77 -0
- package/dist/registration/ignore.d.ts.map +1 -0
- package/dist/registration/ignore.js +249 -0
- package/dist/registration/ignore.js.map +1 -0
- package/dist/registration/ladder.d.ts +211 -0
- package/dist/registration/ladder.d.ts.map +1 -0
- package/dist/registration/ladder.js +378 -0
- package/dist/registration/ladder.js.map +1 -0
- package/dist/registration/paths-safe.d.ts +21 -0
- package/dist/registration/paths-safe.d.ts.map +1 -0
- package/dist/registration/paths-safe.js +88 -0
- package/dist/registration/paths-safe.js.map +1 -0
- package/dist/registration/prune-cli.d.ts +48 -0
- package/dist/registration/prune-cli.d.ts.map +1 -0
- package/dist/registration/prune-cli.js +57 -0
- package/dist/registration/prune-cli.js.map +1 -0
- package/dist/registration/review-cli.d.ts +42 -0
- package/dist/registration/review-cli.d.ts.map +1 -0
- package/dist/registration/review-cli.js +110 -0
- package/dist/registration/review-cli.js.map +1 -0
- package/dist/registration/review-store.d.ts +73 -0
- package/dist/registration/review-store.d.ts.map +1 -0
- package/dist/registration/review-store.js +243 -0
- package/dist/registration/review-store.js.map +1 -0
- package/dist/registration/service.d.ts +196 -0
- package/dist/registration/service.d.ts.map +1 -0
- package/dist/registration/service.js +384 -0
- package/dist/registration/service.js.map +1 -0
- package/dist/registration/store-bridge.d.ts +133 -0
- package/dist/registration/store-bridge.d.ts.map +1 -0
- package/dist/registration/store-bridge.js +159 -0
- package/dist/registration/store-bridge.js.map +1 -0
- package/dist/registration/tlsh.d.ts +125 -0
- package/dist/registration/tlsh.d.ts.map +1 -0
- package/dist/registration/tlsh.js +274 -0
- package/dist/registration/tlsh.js.map +1 -0
- package/dist/server.d.ts +26 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +156 -0
- package/dist/server.js.map +1 -0
- package/dist/service/argv.d.ts +52 -0
- package/dist/service/argv.d.ts.map +1 -0
- package/dist/service/argv.js +127 -0
- package/dist/service/argv.js.map +1 -0
- package/dist/service/command-runner.d.ts +54 -0
- package/dist/service/command-runner.d.ts.map +1 -0
- package/dist/service/command-runner.js +55 -0
- package/dist/service/command-runner.js.map +1 -0
- package/dist/service/index.d.ts +83 -0
- package/dist/service/index.d.ts.map +1 -0
- package/dist/service/index.js +270 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/platform.d.ts +110 -0
- package/dist/service/platform.d.ts.map +1 -0
- package/dist/service/platform.js +157 -0
- package/dist/service/platform.js.map +1 -0
- package/dist/service/templates.d.ts +88 -0
- package/dist/service/templates.d.ts.map +1 -0
- package/dist/service/templates.js +212 -0
- package/dist/service/templates.js.map +1 -0
- package/dist/source-graph/deeplake-credentials.d.ts +57 -0
- package/dist/source-graph/deeplake-credentials.d.ts.map +1 -0
- package/dist/source-graph/deeplake-credentials.js +109 -0
- package/dist/source-graph/deeplake-credentials.js.map +1 -0
- package/dist/source-graph/deeplake-heal.d.ts +53 -0
- package/dist/source-graph/deeplake-heal.d.ts.map +1 -0
- package/dist/source-graph/deeplake-heal.js +41 -0
- package/dist/source-graph/deeplake-heal.js.map +1 -0
- package/dist/source-graph/deeplake-store.d.ts +151 -0
- package/dist/source-graph/deeplake-store.d.ts.map +1 -0
- package/dist/source-graph/deeplake-store.js +389 -0
- package/dist/source-graph/deeplake-store.js.map +1 -0
- package/dist/source-graph/deeplake-transport.d.ts +74 -0
- package/dist/source-graph/deeplake-transport.d.ts.map +1 -0
- package/dist/source-graph/deeplake-transport.js +107 -0
- package/dist/source-graph/deeplake-transport.js.map +1 -0
- package/dist/source-graph/hash.d.ts +3 -0
- package/dist/source-graph/hash.d.ts.map +1 -0
- package/dist/source-graph/hash.js +12 -0
- package/dist/source-graph/hash.js.map +1 -0
- package/dist/source-graph/memory-store.d.ts +32 -0
- package/dist/source-graph/memory-store.d.ts.map +1 -0
- package/dist/source-graph/memory-store.js +81 -0
- package/dist/source-graph/memory-store.js.map +1 -0
- package/dist/source-graph/model.d.ts +102 -0
- package/dist/source-graph/model.d.ts.map +1 -0
- package/dist/source-graph/model.js +36 -0
- package/dist/source-graph/model.js.map +1 -0
- package/dist/source-graph/paths.d.ts +7 -0
- package/dist/source-graph/paths.d.ts.map +1 -0
- package/dist/source-graph/paths.js +26 -0
- package/dist/source-graph/paths.js.map +1 -0
- package/dist/source-graph/schema.d.ts +44 -0
- package/dist/source-graph/schema.d.ts.map +1 -0
- package/dist/source-graph/schema.js +123 -0
- package/dist/source-graph/schema.js.map +1 -0
- package/dist/source-graph/sql-guards.d.ts +99 -0
- package/dist/source-graph/sql-guards.d.ts.map +1 -0
- package/dist/source-graph/sql-guards.js +129 -0
- package/dist/source-graph/sql-guards.js.map +1 -0
- package/dist/source-graph/store.d.ts +101 -0
- package/dist/source-graph/store.d.ts.map +1 -0
- package/dist/source-graph/store.js +2 -0
- package/dist/source-graph/store.js.map +1 -0
- package/dist/source-graph/ulid.d.ts +9 -0
- package/dist/source-graph/ulid.d.ts.map +1 -0
- package/dist/source-graph/ulid.js +61 -0
- package/dist/source-graph/ulid.js.map +1 -0
- package/dist/telemetry/checkin.d.ts +66 -0
- package/dist/telemetry/checkin.d.ts.map +1 -0
- package/dist/telemetry/checkin.js +142 -0
- package/dist/telemetry/checkin.js.map +1 -0
- package/dist/telemetry/db.d.ts +34 -0
- package/dist/telemetry/db.d.ts.map +1 -0
- package/dist/telemetry/db.js +122 -0
- package/dist/telemetry/db.js.map +1 -0
- package/dist/telemetry/index.d.ts +76 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +98 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/logs.d.ts +83 -0
- package/dist/telemetry/logs.d.ts.map +1 -0
- package/dist/telemetry/logs.js +110 -0
- package/dist/telemetry/logs.js.map +1 -0
- package/dist/telemetry/metrics.d.ts +82 -0
- package/dist/telemetry/metrics.d.ts.map +1 -0
- package/dist/telemetry/metrics.js +148 -0
- package/dist/telemetry/metrics.js.map +1 -0
- package/dist/telemetry-usage/emit.d.ts +105 -0
- package/dist/telemetry-usage/emit.d.ts.map +1 -0
- package/dist/telemetry-usage/emit.js +267 -0
- package/dist/telemetry-usage/emit.js.map +1 -0
- package/dist/telemetry-usage/posthog-key.d.ts +22 -0
- package/dist/telemetry-usage/posthog-key.d.ts.map +1 -0
- package/dist/telemetry-usage/posthog-key.js +22 -0
- package/dist/telemetry-usage/posthog-key.js.map +1 -0
- package/dist/worker.d.ts +69 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +91 -0
- package/dist/worker.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** nectar's OWN explicit project override (precedence 1). */
|
|
2
|
+
export declare const ENV_PROJECT_ID: "NECTAR_PROJECT_ID";
|
|
3
|
+
/** Honeycomb's project pin, DETECTED (never required) when present (precedence 2). */
|
|
4
|
+
export declare const DETECTED_HONEYCOMB_PROJECT_ID: "HONEYCOMB_PROJECT_ID";
|
|
5
|
+
/** The reserved per-workspace inbox project id (mirrors the family literal). */
|
|
6
|
+
export declare const UNSORTED_PROJECT_ID: "__unsorted__";
|
|
7
|
+
/** The shared deeplake-family projects cache file, beside `credentials.json`. */
|
|
8
|
+
export declare const PROJECTS_CACHE_FILE_NAME: "projects.json";
|
|
9
|
+
/** The cache schema version this reader understands. */
|
|
10
|
+
export declare const PROJECTS_CACHE_SCHEMA_VERSION: 1;
|
|
11
|
+
/** A folder-to-project binding (longest-prefix matched against the cwd). */
|
|
12
|
+
export interface FolderBinding {
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly projectId: string;
|
|
15
|
+
}
|
|
16
|
+
/** A cached registry project (for the offline git-signal branch). */
|
|
17
|
+
export interface CachedProject {
|
|
18
|
+
readonly projectId: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** The canonicalized `host/owner/repo` remote, or "" when none. */
|
|
21
|
+
readonly remoteSignal: string;
|
|
22
|
+
readonly boundPaths: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
/** The validated (or empty) projects cache. */
|
|
25
|
+
export interface ProjectsCache {
|
|
26
|
+
readonly schemaVersion: typeof PROJECTS_CACHE_SCHEMA_VERSION;
|
|
27
|
+
readonly org: string;
|
|
28
|
+
readonly workspace: string;
|
|
29
|
+
readonly bindings: readonly FolderBinding[];
|
|
30
|
+
readonly projects: readonly CachedProject[];
|
|
31
|
+
}
|
|
32
|
+
/** The empty cache a missing/malformed/mismatched file falls soft to. */
|
|
33
|
+
export declare function emptyProjectsCache(org?: string, workspace?: string): ProjectsCache;
|
|
34
|
+
/** Resolve the cache directory (`~/.deeplake`), overridable for tests. */
|
|
35
|
+
export declare function projectsCacheDir(dir?: string): string;
|
|
36
|
+
/** Resolve the full cache path within the (possibly overridden) dir. */
|
|
37
|
+
export declare function projectsCachePath(dir?: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Load + hand-validate the untrusted `projects.json`. FAIL-SOFT: any missing
|
|
40
|
+
* file, parse error, wrong schema version, malformed row, or dangerous key
|
|
41
|
+
* shape reads as the empty cache. When `expect` is provided, a cache synced for
|
|
42
|
+
* a different org/workspace also reads as empty (it would carry the wrong
|
|
43
|
+
* projects), mirroring honeycomb's tenancy guard.
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadProjectsCache(options?: {
|
|
46
|
+
dir?: string;
|
|
47
|
+
expect?: {
|
|
48
|
+
org: string;
|
|
49
|
+
workspace: string;
|
|
50
|
+
};
|
|
51
|
+
}): ProjectsCache;
|
|
52
|
+
/**
|
|
53
|
+
* Fold a raw git remote URL into the canonical `host/owner/repo` identity the
|
|
54
|
+
* registry stores in `remoteSignal`, so the SAME repo reached as
|
|
55
|
+
* `git@github.com:org/x.git`, `https://github.com/org/x`, or
|
|
56
|
+
* `ssh://git@github.com/org/x.git` produces ONE string. Mirrors honeycomb's
|
|
57
|
+
* `canonicalizeRemote` (`honeycomb/src/hooks/shared/project-resolver.ts`) rule
|
|
58
|
+
* for rule; pure, no IO. An input with no usable host+path returns "".
|
|
59
|
+
*/
|
|
60
|
+
export declare function canonicalizeRemote(rawRemote: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Read the cwd's `origin` remote signal straight from `.git/config` with
|
|
63
|
+
* `node:fs` (no shell-out, per the zero-dependency ethos). Walks up from `cwd`
|
|
64
|
+
* to the repository root; understands both a `.git` DIRECTORY and a `.git`
|
|
65
|
+
* FILE (a linked worktree's `gitdir: <path>` indirection). FAIL-SOFT: any
|
|
66
|
+
* missing/unreadable/parse-defying config reads as "" (no git signal).
|
|
67
|
+
*/
|
|
68
|
+
export declare function readGitRemoteSignal(cwd: string): string;
|
|
69
|
+
/** Extract the `[remote "origin"]` url from a git config text; "" when absent. */
|
|
70
|
+
export declare function originUrlFromConfig(configText: string): string;
|
|
71
|
+
/** How the scope was resolved, in ladder order. */
|
|
72
|
+
export type ProjectScopeSource = "env" | "detected-honeycomb-env" | "binding" | "git-signal" | "inbox";
|
|
73
|
+
export interface ResolvedProjectScope {
|
|
74
|
+
readonly projectId: string;
|
|
75
|
+
readonly source: ProjectScopeSource;
|
|
76
|
+
}
|
|
77
|
+
export interface ResolveProjectScopeOptions {
|
|
78
|
+
/** The working directory the scope is resolved for. */
|
|
79
|
+
readonly cwd: string;
|
|
80
|
+
/** Env snapshot (default: `process.env`). */
|
|
81
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
82
|
+
/** Cache dir override (tests). Default `~/.deeplake`. */
|
|
83
|
+
readonly cacheDir?: string;
|
|
84
|
+
/** Tenancy guard for the cache (org/workspace the caller authenticated as). */
|
|
85
|
+
readonly expect?: {
|
|
86
|
+
org: string;
|
|
87
|
+
workspace: string;
|
|
88
|
+
};
|
|
89
|
+
/** Injectable git-signal reader (tests). Default {@link readGitRemoteSignal}. */
|
|
90
|
+
readonly gitRemoteSignal?: (cwd: string) => string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Resolve the project scope for `cwd` per the ladder in the module doc.
|
|
94
|
+
* NEVER throws and NEVER returns an empty id: the terminal fallback is the
|
|
95
|
+
* workspace `__unsorted__` inbox, so callers (recall, registration, the
|
|
96
|
+
* projection CLI) always have a usable, correctly-scoped project id.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resolveProjectScope(options: ResolveProjectScopeOptions): ResolvedProjectScope;
|
|
99
|
+
//# sourceMappingURL=project-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-scope.d.ts","sourceRoot":"","sources":["../../src/hive-graph/project-scope.ts"],"names":[],"mappings":"AAyCA,6DAA6D;AAC7D,eAAO,MAAM,cAAc,EAAG,mBAA4B,CAAC;AAE3D,sFAAsF;AACtF,eAAO,MAAM,6BAA6B,EAAG,sBAA+B,CAAC;AAE7E,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,EAAG,cAAuB,CAAC;AAE3D,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,EAAG,CAAU,CAAC;AAExD,4EAA4E;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AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAsBD,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAe9D;AAaD,mDAAmD;AACnD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,wBAAwB,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;AAEvG,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,WAAW,0BAA0B;IACzC,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,iFAAiF;IACjF,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACpD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,oBAAoB,CAmC7F"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-project scope resolution for nectar (ADR-0002: nectar and honeycomb are
|
|
3
|
+
* SEPARATE, separately-installable products; nectar never imports honeycomb and
|
|
4
|
+
* never REQUIRES a honeycomb-owned environment variable).
|
|
5
|
+
*
|
|
6
|
+
* This module answers "what project is THIS invocation in?" the same way
|
|
7
|
+
* honeycomb's resolver does (mirrored from
|
|
8
|
+
* `honeycomb/src/hooks/shared/project-resolver.ts`, never imported), over the
|
|
9
|
+
* SHARED Deep Lake family surfaces on disk:
|
|
10
|
+
*
|
|
11
|
+
* - `~/.deeplake/projects.json`: the folder-to-project bindings + cached
|
|
12
|
+
* registry projects the deeplake family syncs. Carries no secret. Untrusted
|
|
13
|
+
* input: hand-validated (this repo is zero-runtime-dependency; no zod) and
|
|
14
|
+
* FAIL-SOFT: a missing, malformed, or tenancy-mismatched cache reads as
|
|
15
|
+
* empty, never a throw.
|
|
16
|
+
* - the repository's own `.git/config` (read directly with `node:fs`, no
|
|
17
|
+
* shell-out) for the canonical remote signal.
|
|
18
|
+
*
|
|
19
|
+
* Precedence (a superset of honeycomb's ladder, with nectar's own env first):
|
|
20
|
+
* 1. `NECTAR_PROJECT_ID` - nectar's OWN explicit override (source: "env").
|
|
21
|
+
* 2. `HONEYCOMB_PROJECT_ID` - DETECTED when honeycomb is installed alongside
|
|
22
|
+
* and has pinned a project; honored as a convenience, never required
|
|
23
|
+
* (source: "detected-honeycomb-env").
|
|
24
|
+
* 3. Folder binding - LONGEST-PREFIX path match of the cwd against the cache
|
|
25
|
+
* `bindings` (a child binding wins over a parent) (source: "binding").
|
|
26
|
+
* 4. Git-remote signal - the cwd's canonicalized `origin` remote matched
|
|
27
|
+
* against the cached registry projects' `remoteSignal` (source: "git-signal").
|
|
28
|
+
* 5. The workspace `__unsorted__` inbox - resolution NEVER fails; recall and
|
|
29
|
+
* registration are never dropped for lack of a binding (source: "inbox").
|
|
30
|
+
*
|
|
31
|
+
* Resolution is a PURE function of `(cwd, env snapshot, cache snapshot, git
|
|
32
|
+
* config snapshot)`: no module-level current-project singleton, so concurrent
|
|
33
|
+
* harness sessions in different folders each resolve their own scope, exactly
|
|
34
|
+
* like honeycomb's per-session discipline.
|
|
35
|
+
*/
|
|
36
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
37
|
+
import { homedir } from "node:os";
|
|
38
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
39
|
+
import { CREDENTIALS_DIR_NAME } from "./deeplake-credentials.js";
|
|
40
|
+
/** nectar's OWN explicit project override (precedence 1). */
|
|
41
|
+
export const ENV_PROJECT_ID = "NECTAR_PROJECT_ID";
|
|
42
|
+
/** Honeycomb's project pin, DETECTED (never required) when present (precedence 2). */
|
|
43
|
+
export const DETECTED_HONEYCOMB_PROJECT_ID = "HONEYCOMB_PROJECT_ID";
|
|
44
|
+
/** The reserved per-workspace inbox project id (mirrors the family literal). */
|
|
45
|
+
export const UNSORTED_PROJECT_ID = "__unsorted__";
|
|
46
|
+
/** The shared deeplake-family projects cache file, beside `credentials.json`. */
|
|
47
|
+
export const PROJECTS_CACHE_FILE_NAME = "projects.json";
|
|
48
|
+
/** The cache schema version this reader understands. */
|
|
49
|
+
export const PROJECTS_CACHE_SCHEMA_VERSION = 1;
|
|
50
|
+
/** The empty cache a missing/malformed/mismatched file falls soft to. */
|
|
51
|
+
export function emptyProjectsCache(org = "", workspace = "") {
|
|
52
|
+
return { schemaVersion: PROJECTS_CACHE_SCHEMA_VERSION, org, workspace, bindings: [], projects: [] };
|
|
53
|
+
}
|
|
54
|
+
/** Resolve the cache directory (`~/.deeplake`), overridable for tests. */
|
|
55
|
+
export function projectsCacheDir(dir) {
|
|
56
|
+
return dir ?? join(homedir(), CREDENTIALS_DIR_NAME);
|
|
57
|
+
}
|
|
58
|
+
/** Resolve the full cache path within the (possibly overridden) dir. */
|
|
59
|
+
export function projectsCachePath(dir) {
|
|
60
|
+
return join(projectsCacheDir(dir), PROJECTS_CACHE_FILE_NAME);
|
|
61
|
+
}
|
|
62
|
+
function isStr(v) {
|
|
63
|
+
return typeof v === "string";
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Load + hand-validate the untrusted `projects.json`. FAIL-SOFT: any missing
|
|
67
|
+
* file, parse error, wrong schema version, malformed row, or dangerous key
|
|
68
|
+
* shape reads as the empty cache. When `expect` is provided, a cache synced for
|
|
69
|
+
* a different org/workspace also reads as empty (it would carry the wrong
|
|
70
|
+
* projects), mirroring honeycomb's tenancy guard.
|
|
71
|
+
*/
|
|
72
|
+
export function loadProjectsCache(options = {}) {
|
|
73
|
+
const path = projectsCachePath(options.dir);
|
|
74
|
+
let parsed;
|
|
75
|
+
try {
|
|
76
|
+
if (!existsSync(path))
|
|
77
|
+
return emptyProjectsCache();
|
|
78
|
+
parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return emptyProjectsCache();
|
|
82
|
+
}
|
|
83
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
|
|
84
|
+
return emptyProjectsCache();
|
|
85
|
+
const rec = parsed;
|
|
86
|
+
if (rec.schemaVersion !== PROJECTS_CACHE_SCHEMA_VERSION)
|
|
87
|
+
return emptyProjectsCache();
|
|
88
|
+
if (!isStr(rec.org) || !isStr(rec.workspace))
|
|
89
|
+
return emptyProjectsCache();
|
|
90
|
+
if (!Array.isArray(rec.bindings) || !Array.isArray(rec.projects))
|
|
91
|
+
return emptyProjectsCache();
|
|
92
|
+
const bindings = [];
|
|
93
|
+
for (const b of rec.bindings) {
|
|
94
|
+
if (typeof b !== "object" || b === null)
|
|
95
|
+
return emptyProjectsCache();
|
|
96
|
+
const br = b;
|
|
97
|
+
if (!isStr(br.path) || !isStr(br.projectId))
|
|
98
|
+
return emptyProjectsCache();
|
|
99
|
+
bindings.push({ path: br.path, projectId: br.projectId });
|
|
100
|
+
}
|
|
101
|
+
const projects = [];
|
|
102
|
+
for (const p of rec.projects) {
|
|
103
|
+
if (typeof p !== "object" || p === null)
|
|
104
|
+
return emptyProjectsCache();
|
|
105
|
+
const pr = p;
|
|
106
|
+
if (!isStr(pr.projectId) || !isStr(pr.name) || !isStr(pr.remoteSignal) || !Array.isArray(pr.boundPaths)) {
|
|
107
|
+
return emptyProjectsCache();
|
|
108
|
+
}
|
|
109
|
+
if (!pr.boundPaths.every(isStr))
|
|
110
|
+
return emptyProjectsCache();
|
|
111
|
+
projects.push({
|
|
112
|
+
projectId: pr.projectId,
|
|
113
|
+
name: pr.name,
|
|
114
|
+
remoteSignal: pr.remoteSignal,
|
|
115
|
+
boundPaths: pr.boundPaths,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (options.expect !== undefined && (rec.org !== options.expect.org || rec.workspace !== options.expect.workspace)) {
|
|
119
|
+
return emptyProjectsCache(rec.org, rec.workspace);
|
|
120
|
+
}
|
|
121
|
+
return { schemaVersion: PROJECTS_CACHE_SCHEMA_VERSION, org: rec.org, workspace: rec.workspace, bindings, projects };
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Fold a raw git remote URL into the canonical `host/owner/repo` identity the
|
|
125
|
+
* registry stores in `remoteSignal`, so the SAME repo reached as
|
|
126
|
+
* `git@github.com:org/x.git`, `https://github.com/org/x`, or
|
|
127
|
+
* `ssh://git@github.com/org/x.git` produces ONE string. Mirrors honeycomb's
|
|
128
|
+
* `canonicalizeRemote` (`honeycomb/src/hooks/shared/project-resolver.ts`) rule
|
|
129
|
+
* for rule; pure, no IO. An input with no usable host+path returns "".
|
|
130
|
+
*/
|
|
131
|
+
export function canonicalizeRemote(rawRemote) {
|
|
132
|
+
const raw = rawRemote.trim();
|
|
133
|
+
if (raw === "")
|
|
134
|
+
return "";
|
|
135
|
+
let rest = raw;
|
|
136
|
+
const schemeMatch = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.exec(rest);
|
|
137
|
+
if (schemeMatch) {
|
|
138
|
+
rest = rest.slice(schemeMatch[0].length);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const scpMatch = /^([^/:]+):(.+)$/.exec(rest);
|
|
142
|
+
if (scpMatch)
|
|
143
|
+
rest = `${scpMatch[1]}/${scpMatch[2]}`;
|
|
144
|
+
}
|
|
145
|
+
const firstSlash = rest.indexOf("/");
|
|
146
|
+
if (firstSlash === -1)
|
|
147
|
+
return "";
|
|
148
|
+
let authority = rest.slice(0, firstSlash);
|
|
149
|
+
const pathPart = rest.slice(firstSlash + 1);
|
|
150
|
+
const at = authority.lastIndexOf("@");
|
|
151
|
+
if (at !== -1)
|
|
152
|
+
authority = authority.slice(at + 1);
|
|
153
|
+
const colon = authority.indexOf(":");
|
|
154
|
+
if (colon !== -1)
|
|
155
|
+
authority = authority.slice(0, colon);
|
|
156
|
+
const host = authority.toLowerCase();
|
|
157
|
+
if (host === "")
|
|
158
|
+
return "";
|
|
159
|
+
let path = pathPart.replace(/\/+$/, "");
|
|
160
|
+
path = path.replace(/\.git$/i, "");
|
|
161
|
+
const segments = path
|
|
162
|
+
.split("/")
|
|
163
|
+
.map((s) => s.trim().toLowerCase())
|
|
164
|
+
.filter((s) => s.length > 0);
|
|
165
|
+
if (segments.length === 0)
|
|
166
|
+
return "";
|
|
167
|
+
return `${host}/${segments.join("/")}`;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Read the cwd's `origin` remote signal straight from `.git/config` with
|
|
171
|
+
* `node:fs` (no shell-out, per the zero-dependency ethos). Walks up from `cwd`
|
|
172
|
+
* to the repository root; understands both a `.git` DIRECTORY and a `.git`
|
|
173
|
+
* FILE (a linked worktree's `gitdir: <path>` indirection). FAIL-SOFT: any
|
|
174
|
+
* missing/unreadable/parse-defying config reads as "" (no git signal).
|
|
175
|
+
*/
|
|
176
|
+
export function readGitRemoteSignal(cwd) {
|
|
177
|
+
try {
|
|
178
|
+
let dir = resolve(cwd);
|
|
179
|
+
for (;;) {
|
|
180
|
+
const dotGit = join(dir, ".git");
|
|
181
|
+
if (existsSync(dotGit)) {
|
|
182
|
+
const configPath = gitConfigPathFor(dotGit, dir);
|
|
183
|
+
if (configPath === "")
|
|
184
|
+
return "";
|
|
185
|
+
return canonicalizeRemote(originUrlFromConfig(readFileSync(configPath, "utf8")));
|
|
186
|
+
}
|
|
187
|
+
const parent = dirname(dir);
|
|
188
|
+
if (parent === dir)
|
|
189
|
+
return "";
|
|
190
|
+
dir = parent;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return "";
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** Resolve the config file for a `.git` entry (directory, or worktree `gitdir:` file). */
|
|
198
|
+
function gitConfigPathFor(dotGit, repoDir) {
|
|
199
|
+
try {
|
|
200
|
+
const direct = join(dotGit, "config");
|
|
201
|
+
if (existsSync(direct))
|
|
202
|
+
return direct;
|
|
203
|
+
// A linked worktree keeps `.git` as a FILE: `gitdir: <path>`; the shared
|
|
204
|
+
// config lives two levels up from `<gitdir>/worktrees/<name>`.
|
|
205
|
+
const content = readFileSync(dotGit, "utf8");
|
|
206
|
+
const m = /^gitdir:\s*(.+)\s*$/m.exec(content);
|
|
207
|
+
if (m === null)
|
|
208
|
+
return "";
|
|
209
|
+
const gitdir = isAbsolute(m[1] ?? "") ? (m[1] ?? "") : resolve(repoDir, m[1] ?? "");
|
|
210
|
+
const worktreeConfig = join(gitdir, "config");
|
|
211
|
+
if (existsSync(worktreeConfig))
|
|
212
|
+
return worktreeConfig;
|
|
213
|
+
const commonConfig = resolve(gitdir, "..", "..", "config");
|
|
214
|
+
return existsSync(commonConfig) ? commonConfig : "";
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return "";
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/** Extract the `[remote "origin"]` url from a git config text; "" when absent. */
|
|
221
|
+
export function originUrlFromConfig(configText) {
|
|
222
|
+
const lines = configText.split(/\r?\n/);
|
|
223
|
+
let inOrigin = false;
|
|
224
|
+
for (const line of lines) {
|
|
225
|
+
const trimmed = line.trim();
|
|
226
|
+
const section = /^\[(.+)\]$/.exec(trimmed);
|
|
227
|
+
if (section !== null) {
|
|
228
|
+
inOrigin = /^remote\s+"origin"$/.test(section[1] ?? "");
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (!inOrigin)
|
|
232
|
+
continue;
|
|
233
|
+
const kv = /^url\s*=\s*(.+)$/.exec(trimmed);
|
|
234
|
+
if (kv !== null)
|
|
235
|
+
return (kv[1] ?? "").trim();
|
|
236
|
+
}
|
|
237
|
+
return "";
|
|
238
|
+
}
|
|
239
|
+
/** Normalize a path for prefix comparison (forward slashes, no trailing slash, lowercased drive-insensitively on win32 shapes). */
|
|
240
|
+
function normalizeForPrefix(p) {
|
|
241
|
+
const forward = resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
|
|
242
|
+
return process.platform === "win32" ? forward.toLowerCase() : forward;
|
|
243
|
+
}
|
|
244
|
+
/** True when `candidate` equals `prefix` or sits beneath it (segment-safe). */
|
|
245
|
+
function isPathWithin(candidate, prefix) {
|
|
246
|
+
return candidate === prefix || candidate.startsWith(`${prefix}/`);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Resolve the project scope for `cwd` per the ladder in the module doc.
|
|
250
|
+
* NEVER throws and NEVER returns an empty id: the terminal fallback is the
|
|
251
|
+
* workspace `__unsorted__` inbox, so callers (recall, registration, the
|
|
252
|
+
* projection CLI) always have a usable, correctly-scoped project id.
|
|
253
|
+
*/
|
|
254
|
+
export function resolveProjectScope(options) {
|
|
255
|
+
const env = options.env ?? process.env;
|
|
256
|
+
const own = (env[ENV_PROJECT_ID] ?? "").trim();
|
|
257
|
+
if (own !== "")
|
|
258
|
+
return { projectId: own, source: "env" };
|
|
259
|
+
const detected = (env[DETECTED_HONEYCOMB_PROJECT_ID] ?? "").trim();
|
|
260
|
+
if (detected !== "")
|
|
261
|
+
return { projectId: detected, source: "detected-honeycomb-env" };
|
|
262
|
+
const cache = loadProjectsCache({ dir: options.cacheDir, expect: options.expect });
|
|
263
|
+
const cwdNorm = normalizeForPrefix(options.cwd);
|
|
264
|
+
let best = null;
|
|
265
|
+
let bestLen = -1;
|
|
266
|
+
for (const b of cache.bindings) {
|
|
267
|
+
const prefix = normalizeForPrefix(b.path);
|
|
268
|
+
if (isPathWithin(cwdNorm, prefix) && prefix.length > bestLen) {
|
|
269
|
+
best = b;
|
|
270
|
+
bestLen = prefix.length;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (best !== null && best.projectId.trim() !== "") {
|
|
274
|
+
return { projectId: best.projectId, source: "binding" };
|
|
275
|
+
}
|
|
276
|
+
const readSignal = options.gitRemoteSignal ?? readGitRemoteSignal;
|
|
277
|
+
const signal = readSignal(options.cwd);
|
|
278
|
+
if (signal !== "") {
|
|
279
|
+
const match = cache.projects.find((p) => p.remoteSignal === signal);
|
|
280
|
+
if (match !== undefined && match.projectId.trim() !== "") {
|
|
281
|
+
return { projectId: match.projectId, source: "git-signal" };
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return { projectId: UNSORTED_PROJECT_ID, source: "inbox" };
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=project-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-scope.js","sourceRoot":"","sources":["../../src/hive-graph/project-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,mBAA4B,CAAC;AAE3D,sFAAsF;AACtF,MAAM,CAAC,MAAM,6BAA6B,GAAG,sBAA+B,CAAC;AAE7E,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAuB,CAAC;AAE3D,iFAAiF;AACjF,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAwB,CAAC;AAEjE,wDAAwD;AACxD,MAAM,CAAC,MAAM,6BAA6B,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C,CAAC;QACpE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACzD,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type SqlType = "TEXT" | "BIGINT" | "REAL" | "FLOAT4[]";
|
|
2
|
+
export interface ColumnDef {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly type: SqlType;
|
|
5
|
+
/** NOT NULL columns must carry a `default` (the load-time guard). Nullable columns omit it. */
|
|
6
|
+
readonly notNull: boolean;
|
|
7
|
+
readonly default?: string | number;
|
|
8
|
+
}
|
|
9
|
+
export interface CatalogTable {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
/** Scope is `tenant` for both tables (explicit org/workspace/project columns), mirroring `codebase`. */
|
|
12
|
+
readonly scope: "tenant";
|
|
13
|
+
/** How writes reconcile: identity is upserted, versions are append-only. */
|
|
14
|
+
readonly writePattern: "update-or-insert" | "append-only";
|
|
15
|
+
readonly columns: readonly ColumnDef[];
|
|
16
|
+
}
|
|
17
|
+
/** `hive_graph` (identity + provenance). All TEXT NOT NULL with defaults; `kind` defaults to 'file'. */
|
|
18
|
+
export declare const HIVE_GRAPH_COLUMNS: readonly ColumnDef[];
|
|
19
|
+
/** `hive_graph_versions` (content + description chain). `embedding` + `confidence` + `fingerprint` are nullable. */
|
|
20
|
+
export declare const HIVE_GRAPH_VERSIONS_COLUMNS: readonly ColumnDef[];
|
|
21
|
+
export declare const HIVE_GRAPH_TABLE: CatalogTable;
|
|
22
|
+
export declare const HIVE_GRAPH_VERSIONS_TABLE: CatalogTable;
|
|
23
|
+
/** The `hive-graph` catalog group appended to the daemon's CATALOG aggregation. */
|
|
24
|
+
export declare const HIVE_GRAPH_CATALOG_GROUP: {
|
|
25
|
+
readonly name: "hive-graph";
|
|
26
|
+
readonly tables: readonly [CatalogTable, CatalogTable];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The load-time guard (mirrors honeycomb `schema.ts:80-100`): valid identifiers,
|
|
30
|
+
* no duplicate columns, and every NOT NULL column carries a DEFAULT. Throws on
|
|
31
|
+
* violation. Returns the table unchanged so it can wrap a definition inline.
|
|
32
|
+
*/
|
|
33
|
+
export declare function assertValidCatalogTable(table: CatalogTable): CatalogTable;
|
|
34
|
+
/**
|
|
35
|
+
* Render `CREATE TABLE IF NOT EXISTS "<name>" (...) USING deeplake` from a
|
|
36
|
+
* `CatalogTable`, mirroring honeycomb's `buildCreateTableSql`
|
|
37
|
+
* (`src/daemon/storage/schema.ts:110-114`). `IF NOT EXISTS` is what makes two
|
|
38
|
+
* concurrent healers converge: the second create is a harmless no-op, not a
|
|
39
|
+
* duplicate-table error. The table name is validated through `sqlIdent`;
|
|
40
|
+
* column names are validated at load by `assertValidCatalogTable`, so they are
|
|
41
|
+
* safe to interpolate via {@link columnClause}.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildCreateTableSql(table: CatalogTable): string;
|
|
44
|
+
/**
|
|
45
|
+
* Render `ALTER TABLE "<name>" ADD COLUMN <col>` for one additive column, the
|
|
46
|
+
* catalog heal path for a column added to the definition after the table already
|
|
47
|
+
* exists (PRD-018i / `hive-graph-schema.md:145-149`). The table name is validated
|
|
48
|
+
* through `sqlIdent`; the column clause reuses {@link columnClause} (identifier
|
|
49
|
+
* validated, default rendered as a guarded literal), so a healable column is only
|
|
50
|
+
* ever an additive nullable one whose clause carries no NOT NULL surprise.
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildAddColumnSql(table: CatalogTable, col: ColumnDef): string;
|
|
53
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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 -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hive Graph table definitions (PRD-005), transcribed from the DDL in
|
|
3
|
+
* `library/knowledge/private/data/hive-graph-schema.md`.
|
|
4
|
+
*
|
|
5
|
+
* These `ColumnDef[]` arrays are the catalog contract the Deep Lake adapter
|
|
6
|
+
* (`deeplake-store.ts`) registers (mirroring honeycomb's `CatalogTable` /
|
|
7
|
+
* `ColumnDef` and its load-time guard: valid identifiers, no duplicates, and
|
|
8
|
+
* every NOT NULL column carries a DEFAULT, except the nullable
|
|
9
|
+
* `embedding`/`confidence`/`fingerprint`). Both tables self-create on first write via
|
|
10
|
+
* `deeplake-heal.ts`'s `withHeal`; there is no DDL pre-step.
|
|
11
|
+
*/
|
|
12
|
+
import { sqlIdent, sqlStr } from "./sql-guards.js";
|
|
13
|
+
/** `hive_graph` (identity + provenance). All TEXT NOT NULL with defaults; `kind` defaults to 'file'. */
|
|
14
|
+
export const HIVE_GRAPH_COLUMNS = [
|
|
15
|
+
{ name: "nectar", type: "TEXT", notNull: true, default: "" },
|
|
16
|
+
{ name: "kind", type: "TEXT", notNull: true, default: "file" },
|
|
17
|
+
{ name: "created_at", type: "TEXT", notNull: true, default: "" },
|
|
18
|
+
{ name: "derived_from_nectar", type: "TEXT", notNull: true, default: "" },
|
|
19
|
+
{ name: "fork_content_hash", type: "TEXT", notNull: true, default: "" },
|
|
20
|
+
{ name: "org_id", type: "TEXT", notNull: true, default: "" },
|
|
21
|
+
{ name: "workspace_id", type: "TEXT", notNull: true, default: "" },
|
|
22
|
+
{ name: "project_id", type: "TEXT", notNull: true, default: "" },
|
|
23
|
+
{ name: "last_update_date", type: "TEXT", notNull: true, default: "" },
|
|
24
|
+
];
|
|
25
|
+
/** `hive_graph_versions` (content + description chain). `embedding` + `confidence` + `fingerprint` are nullable. */
|
|
26
|
+
export const HIVE_GRAPH_VERSIONS_COLUMNS = [
|
|
27
|
+
{ name: "nectar", type: "TEXT", notNull: true, default: "" },
|
|
28
|
+
{ name: "content_hash", type: "TEXT", notNull: true, default: "" },
|
|
29
|
+
{ name: "seq", type: "BIGINT", notNull: true, default: 0 },
|
|
30
|
+
{ name: "path", type: "TEXT", notNull: true, default: "" },
|
|
31
|
+
{ name: "filename", type: "TEXT", notNull: true, default: "" },
|
|
32
|
+
{ name: "ext", type: "TEXT", notNull: true, default: "" },
|
|
33
|
+
{ name: "size_bytes", type: "BIGINT", notNull: true, default: 0 },
|
|
34
|
+
{ name: "mtime_observed", type: "TEXT", notNull: true, default: "" },
|
|
35
|
+
{ name: "title", type: "TEXT", notNull: true, default: "" },
|
|
36
|
+
{ name: "description", type: "TEXT", notNull: true, default: "" },
|
|
37
|
+
{ name: "concepts", type: "TEXT", notNull: true, default: "[]" },
|
|
38
|
+
{ name: "embedding", type: "FLOAT4[]", notNull: false },
|
|
39
|
+
{ name: "confidence", type: "REAL", notNull: false },
|
|
40
|
+
{ name: "fingerprint", type: "TEXT", notNull: false },
|
|
41
|
+
{ name: "described_at", type: "TEXT", notNull: true, default: "" },
|
|
42
|
+
{ name: "describe_model", type: "TEXT", notNull: true, default: "" },
|
|
43
|
+
// Nullable embedding-model provenance (PRD-018i / NEC-018). Added additively to
|
|
44
|
+
// pre-existing tables via `healMissingColumn`; old rows read back null. This is
|
|
45
|
+
// the ONLY schema change in the PRD-018 close-out.
|
|
46
|
+
{ name: "embed_model", type: "TEXT", notNull: false },
|
|
47
|
+
{ name: "describe_status", type: "TEXT", notNull: true, default: "pending" },
|
|
48
|
+
{ name: "observed_at", type: "TEXT", notNull: true, default: "" },
|
|
49
|
+
{ name: "org_id", type: "TEXT", notNull: true, default: "" },
|
|
50
|
+
{ name: "workspace_id", type: "TEXT", notNull: true, default: "" },
|
|
51
|
+
{ name: "project_id", type: "TEXT", notNull: true, default: "" },
|
|
52
|
+
{ name: "last_update_date", type: "TEXT", notNull: true, default: "" },
|
|
53
|
+
];
|
|
54
|
+
export const HIVE_GRAPH_TABLE = {
|
|
55
|
+
name: "hive_graph",
|
|
56
|
+
scope: "tenant",
|
|
57
|
+
writePattern: "update-or-insert",
|
|
58
|
+
columns: HIVE_GRAPH_COLUMNS,
|
|
59
|
+
};
|
|
60
|
+
export const HIVE_GRAPH_VERSIONS_TABLE = {
|
|
61
|
+
name: "hive_graph_versions",
|
|
62
|
+
scope: "tenant",
|
|
63
|
+
writePattern: "append-only",
|
|
64
|
+
columns: HIVE_GRAPH_VERSIONS_COLUMNS,
|
|
65
|
+
};
|
|
66
|
+
/** The `hive-graph` catalog group appended to the daemon's CATALOG aggregation. */
|
|
67
|
+
export const HIVE_GRAPH_CATALOG_GROUP = {
|
|
68
|
+
name: "hive-graph",
|
|
69
|
+
tables: [HIVE_GRAPH_TABLE, HIVE_GRAPH_VERSIONS_TABLE],
|
|
70
|
+
};
|
|
71
|
+
const IDENT_RE = /^[a-z_][a-z0-9_]*$/;
|
|
72
|
+
/**
|
|
73
|
+
* The load-time guard (mirrors honeycomb `schema.ts:80-100`): valid identifiers,
|
|
74
|
+
* no duplicate columns, and every NOT NULL column carries a DEFAULT. Throws on
|
|
75
|
+
* violation. Returns the table unchanged so it can wrap a definition inline.
|
|
76
|
+
*/
|
|
77
|
+
export function assertValidCatalogTable(table) {
|
|
78
|
+
if (!IDENT_RE.test(table.name)) {
|
|
79
|
+
throw new Error(`invalid table name: ${table.name}`);
|
|
80
|
+
}
|
|
81
|
+
const seen = new Set();
|
|
82
|
+
for (const col of table.columns) {
|
|
83
|
+
if (!IDENT_RE.test(col.name)) {
|
|
84
|
+
throw new Error(`invalid column identifier: ${table.name}.${col.name}`);
|
|
85
|
+
}
|
|
86
|
+
if (seen.has(col.name)) {
|
|
87
|
+
throw new Error(`duplicate column: ${table.name}.${col.name}`);
|
|
88
|
+
}
|
|
89
|
+
seen.add(col.name);
|
|
90
|
+
if (col.notNull && col.default === undefined) {
|
|
91
|
+
throw new Error(`NOT NULL column without DEFAULT: ${table.name}.${col.name}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return table;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Render one column's SQL clause (`<name> <type>[ NOT NULL][ DEFAULT <lit>]`)
|
|
98
|
+
* from a `ColumnDef`. The identifier is validated through `sqlIdent`; a
|
|
99
|
+
* string `default` is rendered as a quoted literal via `sqlStr` (the TEXT
|
|
100
|
+
* columns' defaults, e.g. `''`, `'file'`, `'[]'`, `'pending'`), a numeric
|
|
101
|
+
* `default` is inlined bare (the BIGINT columns' `0`). `FLOAT4[]`/`REAL`
|
|
102
|
+
* columns in this catalog are always nullable and carry no default.
|
|
103
|
+
*/
|
|
104
|
+
function columnClause(col) {
|
|
105
|
+
const name = sqlIdent(col.name);
|
|
106
|
+
const notNull = col.notNull ? " NOT NULL" : "";
|
|
107
|
+
let defaultClause = "";
|
|
108
|
+
if (col.default !== undefined) {
|
|
109
|
+
defaultClause = typeof col.default === "number" ? ` DEFAULT ${col.default}` : ` DEFAULT '${sqlStr(col.default)}'`;
|
|
110
|
+
}
|
|
111
|
+
return `${name} ${col.type}${notNull}${defaultClause}`;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Render `CREATE TABLE IF NOT EXISTS "<name>" (...) USING deeplake` from a
|
|
115
|
+
* `CatalogTable`, mirroring honeycomb's `buildCreateTableSql`
|
|
116
|
+
* (`src/daemon/storage/schema.ts:110-114`). `IF NOT EXISTS` is what makes two
|
|
117
|
+
* concurrent healers converge: the second create is a harmless no-op, not a
|
|
118
|
+
* duplicate-table error. The table name is validated through `sqlIdent`;
|
|
119
|
+
* column names are validated at load by `assertValidCatalogTable`, so they are
|
|
120
|
+
* safe to interpolate via {@link columnClause}.
|
|
121
|
+
*/
|
|
122
|
+
export function buildCreateTableSql(table) {
|
|
123
|
+
const safeName = sqlIdent(table.name);
|
|
124
|
+
const colSql = table.columns.map(columnClause).join(", ");
|
|
125
|
+
return `CREATE TABLE IF NOT EXISTS "${safeName}" (${colSql}) USING deeplake`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Render `ALTER TABLE "<name>" ADD COLUMN <col>` for one additive column, the
|
|
129
|
+
* catalog heal path for a column added to the definition after the table already
|
|
130
|
+
* exists (PRD-018i / `hive-graph-schema.md:145-149`). The table name is validated
|
|
131
|
+
* through `sqlIdent`; the column clause reuses {@link columnClause} (identifier
|
|
132
|
+
* validated, default rendered as a guarded literal), so a healable column is only
|
|
133
|
+
* ever an additive nullable one whose clause carries no NOT NULL surprise.
|
|
134
|
+
*/
|
|
135
|
+
export function buildAddColumnSql(table, col) {
|
|
136
|
+
const safeName = sqlIdent(table.name);
|
|
137
|
+
return `ALTER TABLE "${safeName}" ADD COLUMN ${columnClause(col)}`;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/hive-graph/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAqBnD,wGAAwG;AACxG,MAAM,CAAC,MAAM,kBAAkB,GAAyB;IACtD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5D,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;IAC9D,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAChE,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IACzE,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,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