@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,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sync/async store bridge (PRD-018b NEC-001).
|
|
3
|
+
*
|
|
4
|
+
* The re-association ladder (`ladder.ts`) and the `RegistrationService`
|
|
5
|
+
* (`service.ts`) are written entirely against the SYNCHRONOUS `HiveGraphStore`
|
|
6
|
+
* seam: the ladder computes `nextSeq`, reads by path/hash, and appends rows with
|
|
7
|
+
* no `await` in its control flow. The only durable substrate, Deep Lake
|
|
8
|
+
* (`deeplake-store.ts`), implements the ASYNC twin `AsyncHiveGraphStore` because
|
|
9
|
+
* it does real HTTP I/O and cannot honor the synchronous contract. That mismatch
|
|
10
|
+
* is why the update-on-change pipeline was never wired into the running daemon
|
|
11
|
+
* (change-detection review C1): even a one-line wiring change was impossible.
|
|
12
|
+
*
|
|
13
|
+
* `StoreBridge` closes that gap. It presents the synchronous `HiveGraphStore`
|
|
14
|
+
* the service consumes, backed by an in-memory mirror (`InMemoryHiveGraphStore`)
|
|
15
|
+
* so every read the ladder issues is served synchronously and correctly, and it
|
|
16
|
+
* mirrors each write through to the async durable store in the exact order the
|
|
17
|
+
* ladder produced them. This is the same shape the brooding path already uses to
|
|
18
|
+
* reconcile the two interfaces; it is not a new second scheme.
|
|
19
|
+
*
|
|
20
|
+
* Three contracts (PRD-018b AC-018b.4):
|
|
21
|
+
* - hydration: {@link StoreBridge.hydrate} seeds the mirror from the durable
|
|
22
|
+
* store's latest-version-per-nectar (plus identities) at boot, after
|
|
23
|
+
* auto-brood settles, so cold catch-up runs against a warm mirror and seq
|
|
24
|
+
* numbering continues from the persisted state;
|
|
25
|
+
* - write-through ordering: a ladder action applies to the mirror
|
|
26
|
+
* synchronously and enqueues the identical durable write onto a single
|
|
27
|
+
* serialized queue, so durable writes land in ladder order (never
|
|
28
|
+
* interleaved, never reordered);
|
|
29
|
+
* - failure surfacing: a durable write that rejects does NOT silently vanish;
|
|
30
|
+
* it increments {@link StoreBridge.durableFlushFailures}, records the error,
|
|
31
|
+
* and is reported through the injected `onFlushError`. It does not poison the
|
|
32
|
+
* queue (later writes still flush) and it never throws back into the
|
|
33
|
+
* synchronous ladder (which has already committed the write to the mirror,
|
|
34
|
+
* the in-process source of truth). Automatic re-drive of a failed durable
|
|
35
|
+
* write is deliberately left to the enricher/brood write-pattern decision
|
|
36
|
+
* (PRD-018g) rather than inventing a second scheme here.
|
|
37
|
+
*/
|
|
38
|
+
import type { HiveGraphRow, HiveGraphVersionRow, Tenancy } from "../hive-graph/model.js";
|
|
39
|
+
import type { AsyncHiveGraphStore, HiveGraphStore, LatestVersion } from "../hive-graph/store.js";
|
|
40
|
+
/** The write kinds mirrored through to the durable store, for the failure report label. */
|
|
41
|
+
export type DurableWriteOp = "insertIdentity" | "touchIdentity" | "appendVersion" | "deleteNectar";
|
|
42
|
+
export interface StoreBridgeOptions {
|
|
43
|
+
/** The durable async store every mirror write is flushed through to (Deep Lake). */
|
|
44
|
+
readonly durable: AsyncHiveGraphStore;
|
|
45
|
+
/**
|
|
46
|
+
* Surfaces a failed durable flush (AC-018b.4). Called once per rejected
|
|
47
|
+
* durable write with the error and the write kind. The daemon wires this to
|
|
48
|
+
* `/health` and the log; a failed flush is never silently dropped.
|
|
49
|
+
*/
|
|
50
|
+
onFlushError?(err: unknown, op: DurableWriteOp): void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A synchronous {@link HiveGraphStore} facade over an async durable store. Reads
|
|
54
|
+
* hit an in-memory mirror; writes apply to the mirror synchronously and are
|
|
55
|
+
* flushed to the durable store in order. Exposes {@link hydrate} to seed the
|
|
56
|
+
* mirror and {@link whenFlushed} to await the durable queue draining (used by
|
|
57
|
+
* the shutdown drain and by tests).
|
|
58
|
+
*/
|
|
59
|
+
export declare class StoreBridge implements HiveGraphStore {
|
|
60
|
+
private readonly mirror;
|
|
61
|
+
private readonly durable;
|
|
62
|
+
private readonly onFlushError;
|
|
63
|
+
/** The serialized durable-write queue. Every enqueue chains onto this so writes flush in order. */
|
|
64
|
+
private tail;
|
|
65
|
+
private pending;
|
|
66
|
+
private failures;
|
|
67
|
+
private lastError;
|
|
68
|
+
/**
|
|
69
|
+
* Nectars whose durable `insertIdentity` flush has failed (CodeRabbit PR-18
|
|
70
|
+
* finding #8, layer a). If an identity's durable insert fails but a LATER
|
|
71
|
+
* `appendVersion`/`touchIdentity`/`deleteNectar` for the same nectar still
|
|
72
|
+
* flushed durably, `hive_graph_versions` (or a touch) would land with no
|
|
73
|
+
* matching `hive_graph` row - an orphan the read path can never resolve
|
|
74
|
+
* (reads join through identities). Every later write for a nectar in this
|
|
75
|
+
* set is parked (never sent durably) instead, so the orphan is never
|
|
76
|
+
* created in the first place. Bridge lifetime only; not persisted (a fresh
|
|
77
|
+
* bridge re-derives it from a fresh `insertIdentity` failure, should one
|
|
78
|
+
* happen again).
|
|
79
|
+
*/
|
|
80
|
+
private readonly failedIdentityNectars;
|
|
81
|
+
constructor(opts: StoreBridgeOptions);
|
|
82
|
+
/**
|
|
83
|
+
* Seed the mirror from the durable store's latest-version-per-nectar so the
|
|
84
|
+
* ladder starts warm (AC-018b.4 hydration): identities and the single latest
|
|
85
|
+
* version per nectar are enough for every read the ladder issues, and the
|
|
86
|
+
* mirror's `nextSeq` (MAX(seq)+1) continues correctly from the persisted
|
|
87
|
+
* seq. Idempotent: a nectar already in the mirror is skipped, so a re-hydrate
|
|
88
|
+
* never double-appends. Does NOT re-flush anything (the rows are already
|
|
89
|
+
* durable); it writes only to the mirror.
|
|
90
|
+
*/
|
|
91
|
+
hydrate(tenancy: Tenancy): Promise<void>;
|
|
92
|
+
/** Resolves once every durable write enqueued so far has settled (success or surfaced failure). */
|
|
93
|
+
whenFlushed(): Promise<void>;
|
|
94
|
+
/** How many durable flushes have failed since construction (surfaced to `/health`). */
|
|
95
|
+
get durableFlushFailures(): number;
|
|
96
|
+
/** The most recent durable-flush error, or null when none has failed. */
|
|
97
|
+
get lastFlushError(): unknown;
|
|
98
|
+
/** Durable writes enqueued but not yet settled. */
|
|
99
|
+
get pendingDurableWrites(): number;
|
|
100
|
+
/**
|
|
101
|
+
* Chain one durable write onto the serialized queue. The op's rejection is
|
|
102
|
+
* caught HERE (never rethrown into the synchronous ladder, and never left to
|
|
103
|
+
* become an unhandled rejection), so the queue keeps draining and every
|
|
104
|
+
* failure is surfaced exactly once.
|
|
105
|
+
*
|
|
106
|
+
* `nectar` is checked against {@link failedIdentityNectars} at RUN time (not
|
|
107
|
+
* enqueue time): because the queue is strictly serialized, by the time this
|
|
108
|
+
* op's turn comes up, an earlier `insertIdentity` for the same nectar has
|
|
109
|
+
* already settled, so the set is guaranteed up to date (CodeRabbit PR-18
|
|
110
|
+
* finding #8, layer a). Only `appendVersion`/`touchIdentity` are parkable -
|
|
111
|
+
* they are the writes that would ADD data referencing a still-missing
|
|
112
|
+
* identity. `deleteNectar` is exempt and always flows through: it is
|
|
113
|
+
* cleanup, not a write that can orphan anything (the durable `deleteNectar`
|
|
114
|
+
* contract is itself a no-op when the identity does not exist), and letting
|
|
115
|
+
* it through is what clears the nectar out of {@link failedIdentityNectars}
|
|
116
|
+
* again on success.
|
|
117
|
+
*/
|
|
118
|
+
private enqueue;
|
|
119
|
+
insertIdentity(row: HiveGraphRow): void;
|
|
120
|
+
touchIdentity(nectar: string, lastUpdateDate: string): void;
|
|
121
|
+
appendVersion(row: HiveGraphVersionRow): void;
|
|
122
|
+
deleteNectar(tenancy: Tenancy, nectar: string): void;
|
|
123
|
+
getIdentity(nectar: string): HiveGraphRow | undefined;
|
|
124
|
+
nextSeq(nectar: string): number;
|
|
125
|
+
latestVersion(nectar: string): HiveGraphVersionRow | undefined;
|
|
126
|
+
listLatestVersions(tenancy: Tenancy): LatestVersion[];
|
|
127
|
+
listLatestDescribedVersions(tenancy: Tenancy): LatestVersion[];
|
|
128
|
+
latestVersionByPath(tenancy: Tenancy, path: string): LatestVersion | undefined;
|
|
129
|
+
latestVersionByHash(tenancy: Tenancy, contentHash: string): LatestVersion | undefined;
|
|
130
|
+
listIdentities(tenancy: Tenancy): HiveGraphRow[];
|
|
131
|
+
listVersionNectars(tenancy: Tenancy): string[];
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=store-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-bridge.d.ts","sourceRoot":"","sources":["../../src/registration/store-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoC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O;IAgCf,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IAKvC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI;IAK3D,aAAa,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;IAK7C,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAOpD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIrD,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI/B,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAI9D,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,EAAE;IAIrD,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,EAAE;IAI9D,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI9E,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIrF,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,EAAE;IAIhD,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE;CAG/C"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { InMemoryHiveGraphStore } from "../hive-graph/memory-store.js";
|
|
2
|
+
/**
|
|
3
|
+
* A synchronous {@link HiveGraphStore} facade over an async durable store. Reads
|
|
4
|
+
* hit an in-memory mirror; writes apply to the mirror synchronously and are
|
|
5
|
+
* flushed to the durable store in order. Exposes {@link hydrate} to seed the
|
|
6
|
+
* mirror and {@link whenFlushed} to await the durable queue draining (used by
|
|
7
|
+
* the shutdown drain and by tests).
|
|
8
|
+
*/
|
|
9
|
+
export class StoreBridge {
|
|
10
|
+
mirror = new InMemoryHiveGraphStore();
|
|
11
|
+
durable;
|
|
12
|
+
onFlushError;
|
|
13
|
+
/** The serialized durable-write queue. Every enqueue chains onto this so writes flush in order. */
|
|
14
|
+
tail = Promise.resolve();
|
|
15
|
+
pending = 0;
|
|
16
|
+
failures = 0;
|
|
17
|
+
lastError = null;
|
|
18
|
+
/**
|
|
19
|
+
* Nectars whose durable `insertIdentity` flush has failed (CodeRabbit PR-18
|
|
20
|
+
* finding #8, layer a). If an identity's durable insert fails but a LATER
|
|
21
|
+
* `appendVersion`/`touchIdentity`/`deleteNectar` for the same nectar still
|
|
22
|
+
* flushed durably, `hive_graph_versions` (or a touch) would land with no
|
|
23
|
+
* matching `hive_graph` row - an orphan the read path can never resolve
|
|
24
|
+
* (reads join through identities). Every later write for a nectar in this
|
|
25
|
+
* set is parked (never sent durably) instead, so the orphan is never
|
|
26
|
+
* created in the first place. Bridge lifetime only; not persisted (a fresh
|
|
27
|
+
* bridge re-derives it from a fresh `insertIdentity` failure, should one
|
|
28
|
+
* happen again).
|
|
29
|
+
*/
|
|
30
|
+
failedIdentityNectars = new Set();
|
|
31
|
+
constructor(opts) {
|
|
32
|
+
this.durable = opts.durable;
|
|
33
|
+
this.onFlushError = opts.onFlushError ?? (() => { });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Seed the mirror from the durable store's latest-version-per-nectar so the
|
|
37
|
+
* ladder starts warm (AC-018b.4 hydration): identities and the single latest
|
|
38
|
+
* version per nectar are enough for every read the ladder issues, and the
|
|
39
|
+
* mirror's `nextSeq` (MAX(seq)+1) continues correctly from the persisted
|
|
40
|
+
* seq. Idempotent: a nectar already in the mirror is skipped, so a re-hydrate
|
|
41
|
+
* never double-appends. Does NOT re-flush anything (the rows are already
|
|
42
|
+
* durable); it writes only to the mirror.
|
|
43
|
+
*/
|
|
44
|
+
async hydrate(tenancy) {
|
|
45
|
+
const latest = await this.durable.listLatestVersions(tenancy);
|
|
46
|
+
for (const lv of latest) {
|
|
47
|
+
if (this.mirror.getIdentity(lv.identity.nectar) !== undefined)
|
|
48
|
+
continue;
|
|
49
|
+
this.mirror.insertIdentity(lv.identity);
|
|
50
|
+
this.mirror.appendVersion(lv.version);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** Resolves once every durable write enqueued so far has settled (success or surfaced failure). */
|
|
54
|
+
whenFlushed() {
|
|
55
|
+
return this.tail.then(() => { });
|
|
56
|
+
}
|
|
57
|
+
/** How many durable flushes have failed since construction (surfaced to `/health`). */
|
|
58
|
+
get durableFlushFailures() {
|
|
59
|
+
return this.failures;
|
|
60
|
+
}
|
|
61
|
+
/** The most recent durable-flush error, or null when none has failed. */
|
|
62
|
+
get lastFlushError() {
|
|
63
|
+
return this.lastError;
|
|
64
|
+
}
|
|
65
|
+
/** Durable writes enqueued but not yet settled. */
|
|
66
|
+
get pendingDurableWrites() {
|
|
67
|
+
return this.pending;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Chain one durable write onto the serialized queue. The op's rejection is
|
|
71
|
+
* caught HERE (never rethrown into the synchronous ladder, and never left to
|
|
72
|
+
* become an unhandled rejection), so the queue keeps draining and every
|
|
73
|
+
* failure is surfaced exactly once.
|
|
74
|
+
*
|
|
75
|
+
* `nectar` is checked against {@link failedIdentityNectars} at RUN time (not
|
|
76
|
+
* enqueue time): because the queue is strictly serialized, by the time this
|
|
77
|
+
* op's turn comes up, an earlier `insertIdentity` for the same nectar has
|
|
78
|
+
* already settled, so the set is guaranteed up to date (CodeRabbit PR-18
|
|
79
|
+
* finding #8, layer a). Only `appendVersion`/`touchIdentity` are parkable -
|
|
80
|
+
* they are the writes that would ADD data referencing a still-missing
|
|
81
|
+
* identity. `deleteNectar` is exempt and always flows through: it is
|
|
82
|
+
* cleanup, not a write that can orphan anything (the durable `deleteNectar`
|
|
83
|
+
* contract is itself a no-op when the identity does not exist), and letting
|
|
84
|
+
* it through is what clears the nectar out of {@link failedIdentityNectars}
|
|
85
|
+
* again on success.
|
|
86
|
+
*/
|
|
87
|
+
enqueue(op, nectar, run) {
|
|
88
|
+
this.pending += 1;
|
|
89
|
+
this.tail = this.tail.then(() => {
|
|
90
|
+
const parkable = op === "appendVersion" || op === "touchIdentity";
|
|
91
|
+
if (parkable && this.failedIdentityNectars.has(nectar)) {
|
|
92
|
+
this.pending -= 1;
|
|
93
|
+
this.failures += 1;
|
|
94
|
+
const err = new Error(`durable ${op} for nectar ${nectar} parked: its identity insert already failed durably (would orphan hive_graph_versions)`);
|
|
95
|
+
this.lastError = err;
|
|
96
|
+
this.onFlushError(err, op);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
return run().then(() => {
|
|
100
|
+
this.pending -= 1;
|
|
101
|
+
if (op === "deleteNectar")
|
|
102
|
+
this.failedIdentityNectars.delete(nectar); // the nectar is gone; nothing left to orphan
|
|
103
|
+
}, (err) => {
|
|
104
|
+
this.pending -= 1;
|
|
105
|
+
this.failures += 1;
|
|
106
|
+
this.lastError = err;
|
|
107
|
+
if (op === "insertIdentity")
|
|
108
|
+
this.failedIdentityNectars.add(nectar);
|
|
109
|
+
this.onFlushError(err, op);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
// ── writes: apply to the mirror, then flush the identical write in order ─────
|
|
114
|
+
insertIdentity(row) {
|
|
115
|
+
this.mirror.insertIdentity(row);
|
|
116
|
+
this.enqueue("insertIdentity", row.nectar, () => this.durable.insertIdentity(row));
|
|
117
|
+
}
|
|
118
|
+
touchIdentity(nectar, lastUpdateDate) {
|
|
119
|
+
this.mirror.touchIdentity(nectar, lastUpdateDate);
|
|
120
|
+
this.enqueue("touchIdentity", nectar, () => this.durable.touchIdentity(nectar, lastUpdateDate));
|
|
121
|
+
}
|
|
122
|
+
appendVersion(row) {
|
|
123
|
+
this.mirror.appendVersion(row);
|
|
124
|
+
this.enqueue("appendVersion", row.nectar, () => this.durable.appendVersion(row));
|
|
125
|
+
}
|
|
126
|
+
deleteNectar(tenancy, nectar) {
|
|
127
|
+
this.mirror.deleteNectar(tenancy, nectar);
|
|
128
|
+
this.enqueue("deleteNectar", nectar, () => this.durable.deleteNectar(tenancy, nectar));
|
|
129
|
+
}
|
|
130
|
+
// ── reads: served synchronously from the mirror ──────────────────────────────
|
|
131
|
+
getIdentity(nectar) {
|
|
132
|
+
return this.mirror.getIdentity(nectar);
|
|
133
|
+
}
|
|
134
|
+
nextSeq(nectar) {
|
|
135
|
+
return this.mirror.nextSeq(nectar);
|
|
136
|
+
}
|
|
137
|
+
latestVersion(nectar) {
|
|
138
|
+
return this.mirror.latestVersion(nectar);
|
|
139
|
+
}
|
|
140
|
+
listLatestVersions(tenancy) {
|
|
141
|
+
return this.mirror.listLatestVersions(tenancy);
|
|
142
|
+
}
|
|
143
|
+
listLatestDescribedVersions(tenancy) {
|
|
144
|
+
return this.mirror.listLatestDescribedVersions(tenancy);
|
|
145
|
+
}
|
|
146
|
+
latestVersionByPath(tenancy, path) {
|
|
147
|
+
return this.mirror.latestVersionByPath(tenancy, path);
|
|
148
|
+
}
|
|
149
|
+
latestVersionByHash(tenancy, contentHash) {
|
|
150
|
+
return this.mirror.latestVersionByHash(tenancy, contentHash);
|
|
151
|
+
}
|
|
152
|
+
listIdentities(tenancy) {
|
|
153
|
+
return this.mirror.listIdentities(tenancy);
|
|
154
|
+
}
|
|
155
|
+
listVersionNectars(tenancy) {
|
|
156
|
+
return this.mirror.listVersionNectars(tenancy);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=store-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-bridge.js","sourceRoot":"","sources":["../../src/registration/store-bridge.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAgBvE;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IACL,MAAM,GAAG,IAAI,sBAAsB,EAAE,CAAC;IACtC,OAAO,CAAsB;IAC7B,YAAY,CAA6C;IAE1E,mG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AM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,aAAa,CAAC,MAAc;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,kBAAkB,CAAC,OAAgB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,2BAA2B,CAAC,OAAgB;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,mBAAmB,CAAC,OAAgB,EAAE,IAAY;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,mBAAmB,CAAC,OAAgB,EAAE,WAAmB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAED,cAAc,CAAC,OAAgB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,kBAAkB,CAAC,OAAgB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step-4 fuzzy fingerprint + distance, pure TypeScript, zero runtime deps (PRD-006d AC-14/AC-17).
|
|
3
|
+
*
|
|
4
|
+
* PRD-006d flags the TLSH implementation as "native addon OR WASM build -
|
|
5
|
+
* DEFAULT - confirm before implementation" and Nectar's ethos is zero
|
|
6
|
+
* runtime dependencies (Node built-ins only). The native-addon / WASM options
|
|
7
|
+
* therefore remain a flagged DEFAULT for later; this module ships the in-repo,
|
|
8
|
+
* pure-TS DEFAULT so step 4 works today with no new dependency.
|
|
9
|
+
*
|
|
10
|
+
* The algorithm is a locality-sensitive near-duplicate fingerprint in the TLSH
|
|
11
|
+
* family (a quartile-bucketed byte-trigram histogram), NOT byte-exact Trend
|
|
12
|
+
* Micro TLSH. It satisfies the AC's behavior exactly: it produces a fixed-length
|
|
13
|
+
* fingerprint, a distance between two fingerprints, size-buckets candidates by
|
|
14
|
+
* +/-20%, and yields a scored confidence. Correctness of the near-duplicate
|
|
15
|
+
* behavior (identical -> distance 0; a small edit -> small distance; unrelated
|
|
16
|
+
* -> large distance) is what matters here, per the PRD's own guidance. The
|
|
17
|
+
* `native addon or WASM` swap keeps the same fingerprint/distance interface, so
|
|
18
|
+
* it can replace this module later without touching the ladder.
|
|
19
|
+
*
|
|
20
|
+
* DELIBERATE SPEC GAP (AC-16): NO confidence threshold is pinned in this module.
|
|
21
|
+
* The distance-to-confidence mapping uses only the algorithm's theoretical
|
|
22
|
+
* maximum distance as its normalization denominator (not a tuned cutoff). The
|
|
23
|
+
* accept/review band edges are supplied by the caller via {@link FuzzyConfig};
|
|
24
|
+
* the operator default below is explicitly a tunable operator default (tuned
|
|
25
|
+
* during brooding, PRD-007), NOT a spec-pinned threshold.
|
|
26
|
+
*/
|
|
27
|
+
import type { FuzzyStep } from "./ladder.js";
|
|
28
|
+
/** Fingerprint format tag. Distinguishes this in-repo digest from a byte-exact TLSH string. */
|
|
29
|
+
export declare const FINGERPRINT_PREFIX = "H1";
|
|
30
|
+
/** Theoretical maximum distance; the normalization denominator for confidence (algorithmic, not a threshold). */
|
|
31
|
+
export declare const MAX_DISTANCE: number;
|
|
32
|
+
/**
|
|
33
|
+
* Compute the locality-sensitive fingerprint of the given content. Deterministic
|
|
34
|
+
* (no randomness), so identical bytes always produce an identical string.
|
|
35
|
+
*/
|
|
36
|
+
export declare function computeFingerprint(content: string | Uint8Array): string;
|
|
37
|
+
/**
|
|
38
|
+
* Distance between two fingerprints. 0 for identical content; small for a small
|
|
39
|
+
* edit; large for unrelated content. Returns {@link MAX_DISTANCE} when either
|
|
40
|
+
* fingerprint is malformed (treated as maximally distant, never a false match).
|
|
41
|
+
*/
|
|
42
|
+
export declare function fingerprintDistance(a: string, b: string): number;
|
|
43
|
+
/**
|
|
44
|
+
* Map a fingerprint distance to a [0,1] confidence. `maxDistance` is the
|
|
45
|
+
* normalization denominator; it defaults to the fixed {@link MAX_DISTANCE} so
|
|
46
|
+
* existing callers that score two same-order-of-magnitude-sized inputs (or
|
|
47
|
+
* that pre-compute their own denominator) are unaffected. Step 4 itself always
|
|
48
|
+
* passes a size-aware denominator via {@link achievableMaxDistance} (NEC-010) -
|
|
49
|
+
* see that function's docstring for why a fixed denominator over-inflates
|
|
50
|
+
* confidence for small inputs.
|
|
51
|
+
*/
|
|
52
|
+
export declare function distanceToConfidence(distance: number, maxDistance?: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* NEC-010 fix: the size-aware achievable maximum total distance for comparing
|
|
55
|
+
* two contents. Only the body term scales down for small inputs
|
|
56
|
+
* ({@link achievableBodyDistance}); `LEN_MAX`/`CHK_MAX` stay fixed because the
|
|
57
|
+
* length code and checksum are stable signals regardless of content size (they
|
|
58
|
+
* are not trigram-histogram evidence). This is the denominator step 4 feeds
|
|
59
|
+
* {@link distanceToConfidence} so a tiny input's confidence reflects how much
|
|
60
|
+
* distance the digest could actually have produced, not the corpus-wide
|
|
61
|
+
* theoretical maximum.
|
|
62
|
+
*/
|
|
63
|
+
export declare function achievableMaxDistance(sizeA: number, sizeB: number): number;
|
|
64
|
+
/** The +/-20% size-bucket half-width from the corpus (brooding-pipeline.md), an algorithmic optimization, not a threshold. */
|
|
65
|
+
export declare const SIZE_BUCKET_TOLERANCE = 0.2;
|
|
66
|
+
/**
|
|
67
|
+
* Minimum content length (bytes) for a meaningful fuzzy comparison. Content
|
|
68
|
+
* shorter than one byte-trigram records no trigram, so distinct tiny contents
|
|
69
|
+
* would collapse to the same fingerprint (distance 0, perfect confidence) and
|
|
70
|
+
* could be auto-carried without evidence.
|
|
71
|
+
*
|
|
72
|
+
* This is the absolute floor against a distance-0 fingerprint collapse, NOT
|
|
73
|
+
* the evidence floor the fuzzy step actually gates on - see
|
|
74
|
+
* {@link MIN_FUZZY_EVIDENCE_BYTES} (NEC-010), which is strictly larger and
|
|
75
|
+
* supersedes this one for the step-4 abstain decision. Kept as a named
|
|
76
|
+
* constant for the narrower guarantee it documents.
|
|
77
|
+
*/
|
|
78
|
+
export declare const MIN_FUZZY_BYTES = 3;
|
|
79
|
+
/**
|
|
80
|
+
* NEC-010 fix (evidence gate, AC-018d.2): the byte floor below which a
|
|
81
|
+
* content's trigram histogram carries too little evidence for a meaningful
|
|
82
|
+
* fuzzy comparison, regardless of the computed digest distance. The
|
|
83
|
+
* change-detection review found that two unrelated ~10-byte files can score
|
|
84
|
+
* confidence >= 0.879 under the old fixed-`MAX_DISTANCE` mapping - well above
|
|
85
|
+
* the `highConfidence` default of 0.85 - because so few trigrams exist that
|
|
86
|
+
* the quartile-coded body is little more than an 8-of-128 occupancy bitmap.
|
|
87
|
+
* `MIN_FUZZY_BYTES` (3) only blocks a literal fingerprint collapse; this floor
|
|
88
|
+
* is deliberately much larger (in the review's suggested 50-100 byte
|
|
89
|
+
* neighborhood) so the fuzzy step abstains outright on any input too small to
|
|
90
|
+
* carry real signal, INDEPENDENT of {@link achievableMaxDistance}'s
|
|
91
|
+
* normalization fix (defense in depth: AC-018d.1's ~10-byte case is caught by
|
|
92
|
+
* both). Content at or above this floor - including every existing
|
|
93
|
+
* `tlsh.test.ts` fixture (roughly 1000+ bytes) - is unaffected (AC-018d.3).
|
|
94
|
+
* This is the mapping/gate, not the tunable `highConfidence`/`reviewFloor`
|
|
95
|
+
* band edges (`DEFAULT_TUNABLE_FUZZY_CONFIG`), which stay operator-tunable.
|
|
96
|
+
*/
|
|
97
|
+
export declare const MIN_FUZZY_EVIDENCE_BYTES = 50;
|
|
98
|
+
/**
|
|
99
|
+
* The step-4 confidence bands. Supplied by the caller (the daemon config), NOT
|
|
100
|
+
* pinned by the corpus or PRD-006d. `highConfidence` is the auto-carry floor;
|
|
101
|
+
* `reviewFloor` is the floor for surfacing to `review-matches`; below it the
|
|
102
|
+
* file falls through to a fresh mint (step 5).
|
|
103
|
+
*/
|
|
104
|
+
export interface FuzzyConfig {
|
|
105
|
+
readonly highConfidence: number;
|
|
106
|
+
readonly reviewFloor: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* OPERATOR DEFAULT, tunable during brooding (PRD-007). This is NOT a
|
|
110
|
+
* spec-pinned threshold: PRD-006d and identity-and-reassociation.md deliberately
|
|
111
|
+
* pin no number ("configurable, default tuned during brooding"). These values
|
|
112
|
+
* exist only so the daemon has a runnable fuzzy step out of the box; an operator
|
|
113
|
+
* overrides them via daemon config, and brooding calibrates them against the
|
|
114
|
+
* actual codebase's near-duplicate distribution. Do NOT treat these as the spec.
|
|
115
|
+
*/
|
|
116
|
+
export declare const DEFAULT_TUNABLE_FUZZY_CONFIG: FuzzyConfig;
|
|
117
|
+
/**
|
|
118
|
+
* Build the concrete, pure-TS step-4 fuzzy matcher. Size-buckets the candidates
|
|
119
|
+
* by +/-20% of the new content's byte length, fingerprints the new content,
|
|
120
|
+
* scores each in-bucket candidate that carries a fingerprint, and bands the best
|
|
121
|
+
* score by the injected {@link FuzzyConfig}. The band edges come from `config`;
|
|
122
|
+
* this function pins none.
|
|
123
|
+
*/
|
|
124
|
+
export declare function createTlshFuzzyStep(config: FuzzyConfig): FuzzyStep;
|
|
125
|
+
//# sourceMappingURL=tlsh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tlsh.d.ts","sourceRoot":"","sources":["../../src/registration/tlsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAgC,MAAM,aAAa,CAAC;AAE3E,+FAA+F;AAC/F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAWvC,iHAAiH;AACjH,eAAO,M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