@psiclawops/hypermem 0.9.0 → 0.9.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/ARCHITECTURE.md +2 -2
- package/CHANGELOG.md +10 -1
- package/docs/ROADMAP.md +12 -3
- package/memory-plugin/package.json +3 -3
- package/package.json +2 -1
- package/plugin/package.json +4 -4
- package/dist/adaptive-lifecycle.d.ts +0 -81
- package/dist/adaptive-lifecycle.d.ts.map +0 -1
- package/dist/adaptive-lifecycle.js +0 -190
- package/dist/background-indexer.d.ts +0 -161
- package/dist/background-indexer.d.ts.map +0 -1
- package/dist/background-indexer.js +0 -1263
- package/dist/budget-policy.d.ts +0 -22
- package/dist/budget-policy.d.ts.map +0 -1
- package/dist/budget-policy.js +0 -32
- package/dist/cache.d.ts +0 -148
- package/dist/cache.d.ts.map +0 -1
- package/dist/cache.js +0 -571
- package/dist/compaction-fence.d.ts +0 -97
- package/dist/compaction-fence.d.ts.map +0 -1
- package/dist/compaction-fence.js +0 -174
- package/dist/composition-snapshot-integrity.d.ts +0 -36
- package/dist/composition-snapshot-integrity.d.ts.map +0 -1
- package/dist/composition-snapshot-integrity.js +0 -131
- package/dist/composition-snapshot-runtime.d.ts +0 -59
- package/dist/composition-snapshot-runtime.d.ts.map +0 -1
- package/dist/composition-snapshot-runtime.js +0 -250
- package/dist/composition-snapshot-store.d.ts +0 -44
- package/dist/composition-snapshot-store.d.ts.map +0 -1
- package/dist/composition-snapshot-store.js +0 -117
- package/dist/compositor-utils.d.ts +0 -31
- package/dist/compositor-utils.d.ts.map +0 -1
- package/dist/compositor-utils.js +0 -47
- package/dist/compositor.d.ts +0 -518
- package/dist/compositor.d.ts.map +0 -1
- package/dist/compositor.js +0 -4280
- package/dist/content-hash.d.ts +0 -43
- package/dist/content-hash.d.ts.map +0 -1
- package/dist/content-hash.js +0 -75
- package/dist/content-type-classifier.d.ts +0 -41
- package/dist/content-type-classifier.d.ts.map +0 -1
- package/dist/content-type-classifier.js +0 -181
- package/dist/context-backfill.d.ts +0 -46
- package/dist/context-backfill.d.ts.map +0 -1
- package/dist/context-backfill.js +0 -113
- package/dist/context-store.d.ts +0 -131
- package/dist/context-store.d.ts.map +0 -1
- package/dist/context-store.js +0 -279
- package/dist/contradiction-audit-store.d.ts +0 -54
- package/dist/contradiction-audit-store.d.ts.map +0 -1
- package/dist/contradiction-audit-store.js +0 -88
- package/dist/contradiction-detector.d.ts +0 -78
- package/dist/contradiction-detector.d.ts.map +0 -1
- package/dist/contradiction-detector.js +0 -362
- package/dist/contradiction-resolution-policy.d.ts +0 -21
- package/dist/contradiction-resolution-policy.d.ts.map +0 -1
- package/dist/contradiction-resolution-policy.js +0 -17
- package/dist/cross-agent.d.ts +0 -74
- package/dist/cross-agent.d.ts.map +0 -1
- package/dist/cross-agent.js +0 -271
- package/dist/db.d.ts +0 -131
- package/dist/db.d.ts.map +0 -1
- package/dist/db.js +0 -410
- package/dist/degradation.d.ts +0 -102
- package/dist/degradation.d.ts.map +0 -1
- package/dist/degradation.js +0 -141
- package/dist/desired-state-store.d.ts +0 -100
- package/dist/desired-state-store.d.ts.map +0 -1
- package/dist/desired-state-store.js +0 -222
- package/dist/doc-chunk-store.d.ts +0 -159
- package/dist/doc-chunk-store.d.ts.map +0 -1
- package/dist/doc-chunk-store.js +0 -441
- package/dist/doc-chunker.d.ts +0 -99
- package/dist/doc-chunker.d.ts.map +0 -1
- package/dist/doc-chunker.js +0 -324
- package/dist/dreaming-promoter.d.ts +0 -124
- package/dist/dreaming-promoter.d.ts.map +0 -1
- package/dist/dreaming-promoter.js +0 -447
- package/dist/episode-store.d.ts +0 -49
- package/dist/episode-store.d.ts.map +0 -1
- package/dist/episode-store.js +0 -135
- package/dist/expertise-store.d.ts +0 -129
- package/dist/expertise-store.d.ts.map +0 -1
- package/dist/expertise-store.js +0 -342
- package/dist/fact-store.d.ts +0 -90
- package/dist/fact-store.d.ts.map +0 -1
- package/dist/fact-store.js +0 -283
- package/dist/fleet-store.d.ts +0 -144
- package/dist/fleet-store.d.ts.map +0 -1
- package/dist/fleet-store.js +0 -276
- package/dist/fos-mod.d.ts +0 -178
- package/dist/fos-mod.d.ts.map +0 -1
- package/dist/fos-mod.js +0 -416
- package/dist/hybrid-retrieval.d.ts +0 -102
- package/dist/hybrid-retrieval.d.ts.map +0 -1
- package/dist/hybrid-retrieval.js +0 -429
- package/dist/image-eviction.d.ts +0 -49
- package/dist/image-eviction.d.ts.map +0 -1
- package/dist/image-eviction.js +0 -251
- package/dist/index.d.ts +0 -727
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1495
- package/dist/keystone-scorer.d.ts +0 -51
- package/dist/keystone-scorer.d.ts.map +0 -1
- package/dist/keystone-scorer.js +0 -52
- package/dist/knowledge-graph.d.ts +0 -110
- package/dist/knowledge-graph.d.ts.map +0 -1
- package/dist/knowledge-graph.js +0 -305
- package/dist/knowledge-lint.d.ts +0 -31
- package/dist/knowledge-lint.d.ts.map +0 -1
- package/dist/knowledge-lint.js +0 -155
- package/dist/knowledge-store.d.ts +0 -75
- package/dist/knowledge-store.d.ts.map +0 -1
- package/dist/knowledge-store.js +0 -270
- package/dist/library-schema.d.ts +0 -31
- package/dist/library-schema.d.ts.map +0 -1
- package/dist/library-schema.js +0 -1357
- package/dist/message-store.d.ts +0 -181
- package/dist/message-store.d.ts.map +0 -1
- package/dist/message-store.js +0 -577
- package/dist/metrics-dashboard.d.ts +0 -131
- package/dist/metrics-dashboard.d.ts.map +0 -1
- package/dist/metrics-dashboard.js +0 -298
- package/dist/obsidian-exporter.d.ts +0 -57
- package/dist/obsidian-exporter.d.ts.map +0 -1
- package/dist/obsidian-exporter.js +0 -274
- package/dist/obsidian-watcher.d.ts +0 -147
- package/dist/obsidian-watcher.d.ts.map +0 -1
- package/dist/obsidian-watcher.js +0 -403
- package/dist/open-domain.d.ts +0 -46
- package/dist/open-domain.d.ts.map +0 -1
- package/dist/open-domain.js +0 -125
- package/dist/preference-store.d.ts +0 -54
- package/dist/preference-store.d.ts.map +0 -1
- package/dist/preference-store.js +0 -109
- package/dist/preservation-gate.d.ts +0 -82
- package/dist/preservation-gate.d.ts.map +0 -1
- package/dist/preservation-gate.js +0 -150
- package/dist/proactive-pass.d.ts +0 -63
- package/dist/proactive-pass.d.ts.map +0 -1
- package/dist/proactive-pass.js +0 -293
- package/dist/profiles.d.ts +0 -46
- package/dist/profiles.d.ts.map +0 -1
- package/dist/profiles.js +0 -262
- package/dist/provider-translator.d.ts +0 -50
- package/dist/provider-translator.d.ts.map +0 -1
- package/dist/provider-translator.js +0 -403
- package/dist/rate-limiter.d.ts +0 -76
- package/dist/rate-limiter.d.ts.map +0 -1
- package/dist/rate-limiter.js +0 -179
- package/dist/repair-tool-pairs.d.ts +0 -38
- package/dist/repair-tool-pairs.d.ts.map +0 -1
- package/dist/repair-tool-pairs.js +0 -209
- package/dist/replay-recovery.d.ts +0 -29
- package/dist/replay-recovery.d.ts.map +0 -1
- package/dist/replay-recovery.js +0 -82
- package/dist/reranker.d.ts +0 -95
- package/dist/reranker.d.ts.map +0 -1
- package/dist/reranker.js +0 -308
- package/dist/retrieval-policy.d.ts +0 -51
- package/dist/retrieval-policy.d.ts.map +0 -1
- package/dist/retrieval-policy.js +0 -77
- package/dist/schema.d.ts +0 -15
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -327
- package/dist/secret-scanner.d.ts +0 -51
- package/dist/secret-scanner.d.ts.map +0 -1
- package/dist/secret-scanner.js +0 -248
- package/dist/seed.d.ts +0 -108
- package/dist/seed.d.ts.map +0 -1
- package/dist/seed.js +0 -179
- package/dist/session-flusher.d.ts +0 -53
- package/dist/session-flusher.d.ts.map +0 -1
- package/dist/session-flusher.js +0 -69
- package/dist/session-topic-map.d.ts +0 -41
- package/dist/session-topic-map.d.ts.map +0 -1
- package/dist/session-topic-map.js +0 -77
- package/dist/spawn-context.d.ts +0 -54
- package/dist/spawn-context.d.ts.map +0 -1
- package/dist/spawn-context.js +0 -159
- package/dist/system-store.d.ts +0 -73
- package/dist/system-store.d.ts.map +0 -1
- package/dist/system-store.js +0 -182
- package/dist/temporal-store.d.ts +0 -81
- package/dist/temporal-store.d.ts.map +0 -1
- package/dist/temporal-store.js +0 -149
- package/dist/tool-artifact-store.d.ts +0 -98
- package/dist/tool-artifact-store.d.ts.map +0 -1
- package/dist/tool-artifact-store.js +0 -244
- package/dist/topic-detector.d.ts +0 -35
- package/dist/topic-detector.d.ts.map +0 -1
- package/dist/topic-detector.js +0 -249
- package/dist/topic-store.d.ts +0 -51
- package/dist/topic-store.d.ts.map +0 -1
- package/dist/topic-store.js +0 -175
- package/dist/topic-synthesizer.d.ts +0 -71
- package/dist/topic-synthesizer.d.ts.map +0 -1
- package/dist/topic-synthesizer.js +0 -426
- package/dist/trigger-registry.d.ts +0 -63
- package/dist/trigger-registry.d.ts.map +0 -1
- package/dist/trigger-registry.js +0 -171
- package/dist/types.d.ts +0 -1085
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -9
- package/dist/vector-store.d.ts +0 -180
- package/dist/vector-store.d.ts.map +0 -1
- package/dist/vector-store.js +0 -1041
- package/dist/version.d.ts +0 -34
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -44
- package/dist/wiki-page-emitter.d.ts +0 -65
- package/dist/wiki-page-emitter.d.ts.map +0 -1
- package/dist/wiki-page-emitter.js +0 -258
- package/dist/work-store.d.ts +0 -112
- package/dist/work-store.d.ts.map +0 -1
- package/dist/work-store.js +0 -273
- package/memory-plugin/dist/index.d.ts +0 -24
- package/memory-plugin/dist/index.d.ts.map +0 -1
- package/memory-plugin/dist/index.js +0 -350
- package/memory-plugin/dist/index.js.map +0 -1
- package/node_modules/sqlite-vec/README.md +0 -1
- package/node_modules/sqlite-vec/index.cjs +0 -46
- package/node_modules/sqlite-vec/index.d.ts +0 -17
- package/node_modules/sqlite-vec/index.mjs +0 -47
- package/node_modules/sqlite-vec/package.json +0 -1
- package/node_modules/sqlite-vec-linux-x64/README.md +0 -1
- package/node_modules/sqlite-vec-linux-x64/package.json +0 -1
- package/node_modules/sqlite-vec-linux-x64/vec0.so +0 -0
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/locales/index.cjs +0 -17
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -6
- package/node_modules/zod/mini/index.cjs +0 -32
- package/node_modules/zod/mini/index.d.cts +0 -3
- package/node_modules/zod/mini/index.d.ts +0 -3
- package/node_modules/zod/mini/index.js +0 -3
- package/node_modules/zod/mini/package.json +0 -6
- package/node_modules/zod/package.json +0 -135
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -3
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -32
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -70
- package/node_modules/zod/src/v4/classic/errors.ts +0 -82
- package/node_modules/zod/src/v4/classic/external.ts +0 -51
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -643
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -82
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2409
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -276
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -365
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -661
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -595
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -734
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -270
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -640
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -223
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -427
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -282
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -632
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -570
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1175
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2990
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -361
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -183
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -219
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1798
- package/node_modules/zod/src/v4/core/checks.ts +0 -1293
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -138
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -448
- package/node_modules/zod/src/v4/core/index.ts +0 -16
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -667
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
- package/node_modules/zod/src/v4/core/parse.ts +0 -195
- package/node_modules/zod/src/v4/core/regexes.ts +0 -183
- package/node_modules/zod/src/v4/core/registries.ts +0 -105
- package/node_modules/zod/src/v4/core/schemas.ts +0 -4538
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -83
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -67
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -613
- package/node_modules/zod/src/v4/core/util.ts +0 -966
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -115
- package/node_modules/zod/src/v4/locales/az.ts +0 -111
- package/node_modules/zod/src/v4/locales/be.ts +0 -176
- package/node_modules/zod/src/v4/locales/bg.ts +0 -128
- package/node_modules/zod/src/v4/locales/ca.ts +0 -116
- package/node_modules/zod/src/v4/locales/cs.ts +0 -118
- package/node_modules/zod/src/v4/locales/da.ts +0 -123
- package/node_modules/zod/src/v4/locales/de.ts +0 -116
- package/node_modules/zod/src/v4/locales/en.ts +0 -119
- package/node_modules/zod/src/v4/locales/eo.ts +0 -118
- package/node_modules/zod/src/v4/locales/es.ts +0 -141
- package/node_modules/zod/src/v4/locales/fa.ts +0 -126
- package/node_modules/zod/src/v4/locales/fi.ts +0 -121
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
- package/node_modules/zod/src/v4/locales/fr.ts +0 -116
- package/node_modules/zod/src/v4/locales/he.ts +0 -246
- package/node_modules/zod/src/v4/locales/hu.ts +0 -117
- package/node_modules/zod/src/v4/locales/hy.ts +0 -164
- package/node_modules/zod/src/v4/locales/id.ts +0 -115
- package/node_modules/zod/src/v4/locales/index.ts +0 -49
- package/node_modules/zod/src/v4/locales/is.ts +0 -119
- package/node_modules/zod/src/v4/locales/it.ts +0 -116
- package/node_modules/zod/src/v4/locales/ja.ts +0 -114
- package/node_modules/zod/src/v4/locales/ka.ts +0 -123
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -119
- package/node_modules/zod/src/v4/locales/ko.ts +0 -121
- package/node_modules/zod/src/v4/locales/lt.ts +0 -239
- package/node_modules/zod/src/v4/locales/mk.ts +0 -118
- package/node_modules/zod/src/v4/locales/ms.ts +0 -115
- package/node_modules/zod/src/v4/locales/nl.ts +0 -121
- package/node_modules/zod/src/v4/locales/no.ts +0 -116
- package/node_modules/zod/src/v4/locales/ota.ts +0 -117
- package/node_modules/zod/src/v4/locales/pl.ts +0 -118
- package/node_modules/zod/src/v4/locales/ps.ts +0 -126
- package/node_modules/zod/src/v4/locales/pt.ts +0 -116
- package/node_modules/zod/src/v4/locales/ru.ts +0 -176
- package/node_modules/zod/src/v4/locales/sl.ts +0 -118
- package/node_modules/zod/src/v4/locales/sv.ts +0 -119
- package/node_modules/zod/src/v4/locales/ta.ts +0 -118
- package/node_modules/zod/src/v4/locales/th.ts +0 -119
- package/node_modules/zod/src/v4/locales/tr.ts +0 -111
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -117
- package/node_modules/zod/src/v4/locales/ur.ts +0 -119
- package/node_modules/zod/src/v4/locales/uz.ts +0 -116
- package/node_modules/zod/src/v4/locales/vi.ts +0 -117
- package/node_modules/zod/src/v4/locales/yo.ts +0 -124
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
- package/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -66
- package/node_modules/zod/src/v4/mini/parse.ts +0 -14
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1916
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -529
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -963
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -347
- package/node_modules/zod/src/v4-mini/index.ts +0 -3
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -6
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3777
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3695
- package/node_modules/zod/v4/classic/checks.cjs +0 -33
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -61
- package/node_modules/zod/v4/classic/compat.d.cts +0 -50
- package/node_modules/zod/v4/classic/compat.d.ts +0 -50
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/errors.cjs +0 -74
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -48
- package/node_modules/zod/v4/classic/external.cjs +0 -73
- package/node_modules/zod/v4/classic/external.d.cts +0 -15
- package/node_modules/zod/v4/classic/external.d.ts +0 -15
- package/node_modules/zod/v4/classic/external.js +0 -20
- package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -610
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.js +0 -584
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/package.json +0 -6
- package/node_modules/zod/v4/classic/parse.cjs +0 -41
- package/node_modules/zod/v4/classic/parse.d.cts +0 -31
- package/node_modules/zod/v4/classic/parse.d.ts +0 -31
- package/node_modules/zod/v4/classic/parse.js +0 -15
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1272
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -739
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -739
- package/node_modules/zod/v4/classic/schemas.js +0 -1157
- package/node_modules/zod/v4/core/api.cjs +0 -1222
- package/node_modules/zod/v4/core/api.d.cts +0 -304
- package/node_modules/zod/v4/core/api.d.ts +0 -304
- package/node_modules/zod/v4/core/api.js +0 -1082
- package/node_modules/zod/v4/core/checks.cjs +0 -601
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -575
- package/node_modules/zod/v4/core/core.cjs +0 -83
- package/node_modules/zod/v4/core/core.d.cts +0 -70
- package/node_modules/zod/v4/core/core.d.ts +0 -70
- package/node_modules/zod/v4/core/core.js +0 -76
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -213
- package/node_modules/zod/v4/core/errors.d.cts +0 -220
- package/node_modules/zod/v4/core/errors.d.ts +0 -220
- package/node_modules/zod/v4/core/errors.js +0 -182
- package/node_modules/zod/v4/core/index.cjs +0 -47
- package/node_modules/zod/v4/core/index.d.cts +0 -16
- package/node_modules/zod/v4/core/index.d.ts +0 -16
- package/node_modules/zod/v4/core/index.js +0 -16
- package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.js +0 -95
- package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -648
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.js +0 -605
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/package.json +0 -6
- package/node_modules/zod/v4/core/parse.cjs +0 -131
- package/node_modules/zod/v4/core/parse.d.cts +0 -49
- package/node_modules/zod/v4/core/parse.d.ts +0 -49
- package/node_modules/zod/v4/core/parse.js +0 -93
- package/node_modules/zod/v4/core/regexes.cjs +0 -166
- package/node_modules/zod/v4/core/regexes.d.cts +0 -79
- package/node_modules/zod/v4/core/regexes.d.ts +0 -79
- package/node_modules/zod/v4/core/regexes.js +0 -133
- package/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -2124
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1146
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1146
- package/node_modules/zod/v4/core/schemas.js +0 -2093
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -446
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.js +0 -437
- package/node_modules/zod/v4/core/util.cjs +0 -710
- package/node_modules/zod/v4/core/util.d.cts +0 -199
- package/node_modules/zod/v4/core/util.d.ts +0 -199
- package/node_modules/zod/v4/core/util.js +0 -651
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -133
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -106
- package/node_modules/zod/v4/locales/az.cjs +0 -132
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -105
- package/node_modules/zod/v4/locales/be.cjs +0 -183
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -156
- package/node_modules/zod/v4/locales/bg.cjs +0 -147
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -4
- package/node_modules/zod/v4/locales/bg.js +0 -120
- package/node_modules/zod/v4/locales/ca.cjs +0 -134
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -107
- package/node_modules/zod/v4/locales/cs.cjs +0 -138
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -111
- package/node_modules/zod/v4/locales/da.cjs +0 -142
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -115
- package/node_modules/zod/v4/locales/de.cjs +0 -135
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -108
- package/node_modules/zod/v4/locales/en.cjs +0 -136
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.js +0 -109
- package/node_modules/zod/v4/locales/eo.cjs +0 -136
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -4
- package/node_modules/zod/v4/locales/eo.js +0 -109
- package/node_modules/zod/v4/locales/es.cjs +0 -159
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -132
- package/node_modules/zod/v4/locales/fa.cjs +0 -141
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -114
- package/node_modules/zod/v4/locales/fi.cjs +0 -139
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -112
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -107
- package/node_modules/zod/v4/locales/fr.cjs +0 -135
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -108
- package/node_modules/zod/v4/locales/he.cjs +0 -241
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -214
- package/node_modules/zod/v4/locales/hu.cjs +0 -135
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -108
- package/node_modules/zod/v4/locales/hy.cjs +0 -174
- package/node_modules/zod/v4/locales/hy.d.cts +0 -5
- package/node_modules/zod/v4/locales/hy.d.ts +0 -4
- package/node_modules/zod/v4/locales/hy.js +0 -147
- package/node_modules/zod/v4/locales/id.cjs +0 -133
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -106
- package/node_modules/zod/v4/locales/index.cjs +0 -104
- package/node_modules/zod/v4/locales/index.d.cts +0 -49
- package/node_modules/zod/v4/locales/index.d.ts +0 -49
- package/node_modules/zod/v4/locales/index.js +0 -49
- package/node_modules/zod/v4/locales/is.cjs +0 -136
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -4
- package/node_modules/zod/v4/locales/is.js +0 -109
- package/node_modules/zod/v4/locales/it.cjs +0 -135
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -108
- package/node_modules/zod/v4/locales/ja.cjs +0 -134
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -107
- package/node_modules/zod/v4/locales/ka.cjs +0 -139
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -4
- package/node_modules/zod/v4/locales/ka.js +0 -112
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -137
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -110
- package/node_modules/zod/v4/locales/ko.cjs +0 -138
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -111
- package/node_modules/zod/v4/locales/lt.cjs +0 -230
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -4
- package/node_modules/zod/v4/locales/lt.js +0 -203
- package/node_modules/zod/v4/locales/mk.cjs +0 -136
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -109
- package/node_modules/zod/v4/locales/ms.cjs +0 -134
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -107
- package/node_modules/zod/v4/locales/nl.cjs +0 -137
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -110
- package/node_modules/zod/v4/locales/no.cjs +0 -135
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -108
- package/node_modules/zod/v4/locales/ota.cjs +0 -136
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -109
- package/node_modules/zod/v4/locales/package.json +0 -6
- package/node_modules/zod/v4/locales/pl.cjs +0 -136
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -109
- package/node_modules/zod/v4/locales/ps.cjs +0 -141
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -114
- package/node_modules/zod/v4/locales/pt.cjs +0 -135
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -108
- package/node_modules/zod/v4/locales/ru.cjs +0 -183
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -156
- package/node_modules/zod/v4/locales/sl.cjs +0 -136
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -109
- package/node_modules/zod/v4/locales/sv.cjs +0 -137
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -110
- package/node_modules/zod/v4/locales/ta.cjs +0 -137
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -110
- package/node_modules/zod/v4/locales/th.cjs +0 -137
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -110
- package/node_modules/zod/v4/locales/tr.cjs +0 -132
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.js +0 -105
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -135
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -108
- package/node_modules/zod/v4/locales/ur.cjs +0 -137
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -110
- package/node_modules/zod/v4/locales/uz.cjs +0 -136
- package/node_modules/zod/v4/locales/uz.d.cts +0 -5
- package/node_modules/zod/v4/locales/uz.d.ts +0 -4
- package/node_modules/zod/v4/locales/uz.js +0 -109
- package/node_modules/zod/v4/locales/vi.cjs +0 -135
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -108
- package/node_modules/zod/v4/locales/yo.cjs +0 -134
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -107
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -109
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -107
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -52
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -22
- package/node_modules/zod/v4/mini/external.cjs +0 -63
- package/node_modules/zod/v4/mini/external.d.cts +0 -12
- package/node_modules/zod/v4/mini/external.d.ts +0 -12
- package/node_modules/zod/v4/mini/external.js +0 -14
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -64
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -34
- package/node_modules/zod/v4/mini/package.json +0 -6
- package/node_modules/zod/v4/mini/parse.cjs +0 -16
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -1046
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -427
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -427
- package/node_modules/zod/v4/mini/schemas.js +0 -925
- package/node_modules/zod/v4/package.json +0 -6
- package/node_modules/zod/v4-mini/index.cjs +0 -32
- package/node_modules/zod/v4-mini/index.d.cts +0 -3
- package/node_modules/zod/v4-mini/index.d.ts +0 -3
- package/node_modules/zod/v4-mini/index.js +0 -3
- package/node_modules/zod/v4-mini/package.json +0 -6
- package/plugin/dist/index.d.ts +0 -208
- package/plugin/dist/index.d.ts.map +0 -1
- package/plugin/dist/index.js +0 -3474
- package/plugin/dist/index.js.map +0 -1
package/dist/content-hash.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Content Hash
|
|
3
|
-
*
|
|
4
|
-
* Content-addressed hashing for fact/knowledge deduplication.
|
|
5
|
-
* Uses BLAKE3 (via @noble/hashes) for fast, collision-resistant fingerprints.
|
|
6
|
-
*
|
|
7
|
-
* Dedup semantics are per-agent: the same content stored by two different
|
|
8
|
-
* agents is intentional and should not be merged. Check with:
|
|
9
|
-
* WHERE content_hash = ? AND agent_id = ?
|
|
10
|
-
*/
|
|
11
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
12
|
-
/**
|
|
13
|
-
* Compute a BLAKE3 content hash for deduplication.
|
|
14
|
-
* Returns a 64-character hex string (32 bytes).
|
|
15
|
-
*
|
|
16
|
-
* Normalization: collapses whitespace, trims, lowercases
|
|
17
|
-
* before hashing. This catches trivial reformatting differences
|
|
18
|
-
* that shouldn't create duplicate facts.
|
|
19
|
-
*/
|
|
20
|
-
export declare function contentHash(text: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* SQL migration statements for adding content_hash columns and indexes.
|
|
23
|
-
*
|
|
24
|
-
* Use non-unique indexes — different agents may legitimately store identical
|
|
25
|
-
* facts. Dedup check is always scoped per agent:
|
|
26
|
-
* WHERE content_hash = ? AND agent_id = ?
|
|
27
|
-
*/
|
|
28
|
-
export declare const SCHEMA_MIGRATIONS: {
|
|
29
|
-
addFactsContentHash: string;
|
|
30
|
-
addKnowledgeContentHash: string;
|
|
31
|
-
indexFactsContentHash: string;
|
|
32
|
-
indexKnowledgeContentHash: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Backfill content_hash for existing rows that have NULL hashes.
|
|
36
|
-
* Meant to run once after schema migration.
|
|
37
|
-
* Returns count of rows updated.
|
|
38
|
-
*
|
|
39
|
-
* Defensive: returns 0 if the content_hash column does not exist on the
|
|
40
|
-
* target table (e.g. migration hasn't run yet or table is missing).
|
|
41
|
-
*/
|
|
42
|
-
export declare function backfillContentHashes(db: DatabaseSync, table: 'facts' | 'knowledge'): number;
|
|
43
|
-
//# sourceMappingURL=content-hash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../src/content-hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,OAAO,GAAG,WAAW,GAC3B,MAAM,CAgCR"}
|
package/dist/content-hash.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Content Hash
|
|
3
|
-
*
|
|
4
|
-
* Content-addressed hashing for fact/knowledge deduplication.
|
|
5
|
-
* Uses BLAKE3 (via @noble/hashes) for fast, collision-resistant fingerprints.
|
|
6
|
-
*
|
|
7
|
-
* Dedup semantics are per-agent: the same content stored by two different
|
|
8
|
-
* agents is intentional and should not be merged. Check with:
|
|
9
|
-
* WHERE content_hash = ? AND agent_id = ?
|
|
10
|
-
*/
|
|
11
|
-
import { blake3 } from '@noble/hashes/blake3.js';
|
|
12
|
-
/**
|
|
13
|
-
* Compute a BLAKE3 content hash for deduplication.
|
|
14
|
-
* Returns a 64-character hex string (32 bytes).
|
|
15
|
-
*
|
|
16
|
-
* Normalization: collapses whitespace, trims, lowercases
|
|
17
|
-
* before hashing. This catches trivial reformatting differences
|
|
18
|
-
* that shouldn't create duplicate facts.
|
|
19
|
-
*/
|
|
20
|
-
export function contentHash(text) {
|
|
21
|
-
const normalized = text.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
22
|
-
const bytes = new TextEncoder().encode(normalized);
|
|
23
|
-
return Buffer.from(blake3(bytes)).toString('hex');
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* SQL migration statements for adding content_hash columns and indexes.
|
|
27
|
-
*
|
|
28
|
-
* Use non-unique indexes — different agents may legitimately store identical
|
|
29
|
-
* facts. Dedup check is always scoped per agent:
|
|
30
|
-
* WHERE content_hash = ? AND agent_id = ?
|
|
31
|
-
*/
|
|
32
|
-
export const SCHEMA_MIGRATIONS = {
|
|
33
|
-
addFactsContentHash: `ALTER TABLE facts ADD COLUMN content_hash TEXT`,
|
|
34
|
-
addKnowledgeContentHash: `ALTER TABLE knowledge ADD COLUMN content_hash TEXT`,
|
|
35
|
-
indexFactsContentHash: `CREATE INDEX IF NOT EXISTS idx_facts_content_hash ON facts(content_hash)`,
|
|
36
|
-
indexKnowledgeContentHash: `CREATE INDEX IF NOT EXISTS idx_knowledge_content_hash ON knowledge(content_hash)`,
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Backfill content_hash for existing rows that have NULL hashes.
|
|
40
|
-
* Meant to run once after schema migration.
|
|
41
|
-
* Returns count of rows updated.
|
|
42
|
-
*
|
|
43
|
-
* Defensive: returns 0 if the content_hash column does not exist on the
|
|
44
|
-
* target table (e.g. migration hasn't run yet or table is missing).
|
|
45
|
-
*/
|
|
46
|
-
export function backfillContentHashes(db, table) {
|
|
47
|
-
// Defensive: verify the column exists before querying it.
|
|
48
|
-
const pragmaRows = db
|
|
49
|
-
.prepare(`PRAGMA table_info(${table})`)
|
|
50
|
-
.all();
|
|
51
|
-
const hasColumn = pragmaRows.some((r) => r['name'] === 'content_hash');
|
|
52
|
-
if (!hasColumn)
|
|
53
|
-
return 0;
|
|
54
|
-
const rows = db
|
|
55
|
-
.prepare(`SELECT id, content FROM ${table} WHERE content_hash IS NULL`)
|
|
56
|
-
.all();
|
|
57
|
-
if (rows.length === 0)
|
|
58
|
-
return 0;
|
|
59
|
-
const update = db.prepare(`UPDATE ${table} SET content_hash = ? WHERE id = ?`);
|
|
60
|
-
// Single transaction for the entire batch — much faster than autocommit per row.
|
|
61
|
-
// Node 22 DatabaseSync does not have .transaction(); use manual BEGIN/COMMIT.
|
|
62
|
-
db.exec('BEGIN');
|
|
63
|
-
try {
|
|
64
|
-
for (const row of rows) {
|
|
65
|
-
update.run(contentHash(row.content), row.id);
|
|
66
|
-
}
|
|
67
|
-
db.exec('COMMIT');
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
db.exec('ROLLBACK');
|
|
71
|
-
throw err;
|
|
72
|
-
}
|
|
73
|
-
return rows.length;
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=content-hash.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content Type Classifier
|
|
3
|
-
*
|
|
4
|
-
* Classifies message content by signal type: decision, spec, preference,
|
|
5
|
-
* skill, attribute, discussion, ack, or noise. Used by:
|
|
6
|
-
* - Keystone history slot (P2.1) for decisional weight scoring
|
|
7
|
-
* - Background indexer for extraction priority
|
|
8
|
-
* - Compaction for retention decisions
|
|
9
|
-
*
|
|
10
|
-
* Ported from ClawText content-type-classifier.ts — adapted for
|
|
11
|
-
* hypermem's NeutralMessage interface.
|
|
12
|
-
*
|
|
13
|
-
* No LLM dependency. Pure pattern matching + heuristics.
|
|
14
|
-
*/
|
|
15
|
-
export type ContentType = 'decision' | 'spec' | 'preference' | 'skill' | 'attribute' | 'discussion' | 'ack' | 'noise';
|
|
16
|
-
export interface ContentTypeResult {
|
|
17
|
-
type: ContentType;
|
|
18
|
-
confidence: number;
|
|
19
|
-
/** Approximate half-life in days. Infinity = never decays. 0 = discard immediately. */
|
|
20
|
-
halfLifeDays: number;
|
|
21
|
-
}
|
|
22
|
-
/** Signal value weight for context assembly prioritization (0–1). */
|
|
23
|
-
export declare const SIGNAL_WEIGHT: Record<ContentType, number>;
|
|
24
|
-
/**
|
|
25
|
-
* Classify a message's content by signal type.
|
|
26
|
-
*
|
|
27
|
-
* @param content - Raw text content of the message
|
|
28
|
-
* @returns Classification with type, confidence, and decay half-life
|
|
29
|
-
*/
|
|
30
|
-
export declare function classifyContentType(content: string): ContentTypeResult;
|
|
31
|
-
/**
|
|
32
|
-
* Convenience: classify and return the signal weight (0–1).
|
|
33
|
-
* Higher = more valuable for context retention.
|
|
34
|
-
*/
|
|
35
|
-
export declare function signalWeight(content: string): number;
|
|
36
|
-
/**
|
|
37
|
-
* Convenience: is this message worth keeping in context?
|
|
38
|
-
* Returns false for ack and noise.
|
|
39
|
-
*/
|
|
40
|
-
export declare function isSignalBearing(content: string): boolean;
|
|
41
|
-
//# sourceMappingURL=content-type-classifier.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-type-classifier.d.ts","sourceRoot":"","sources":["../src/content-type-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,GACX,YAAY,GACZ,KAAK,GACL,OAAO,CAAC;AAEZ,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qEAAqE;AACrE,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CASrD,CAAC;AAwGF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAmDtE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxD"}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content Type Classifier
|
|
3
|
-
*
|
|
4
|
-
* Classifies message content by signal type: decision, spec, preference,
|
|
5
|
-
* skill, attribute, discussion, ack, or noise. Used by:
|
|
6
|
-
* - Keystone history slot (P2.1) for decisional weight scoring
|
|
7
|
-
* - Background indexer for extraction priority
|
|
8
|
-
* - Compaction for retention decisions
|
|
9
|
-
*
|
|
10
|
-
* Ported from ClawText content-type-classifier.ts — adapted for
|
|
11
|
-
* hypermem's NeutralMessage interface.
|
|
12
|
-
*
|
|
13
|
-
* No LLM dependency. Pure pattern matching + heuristics.
|
|
14
|
-
*/
|
|
15
|
-
/** Signal value weight for context assembly prioritization (0–1). */
|
|
16
|
-
export const SIGNAL_WEIGHT = {
|
|
17
|
-
decision: 1.0,
|
|
18
|
-
spec: 0.85,
|
|
19
|
-
preference: 0.8,
|
|
20
|
-
skill: 0.6,
|
|
21
|
-
attribute: 0.5,
|
|
22
|
-
discussion: 0.4,
|
|
23
|
-
ack: 0.0,
|
|
24
|
-
noise: 0.0,
|
|
25
|
-
};
|
|
26
|
-
// ─── Patterns ───────────────────────────────────────────────────
|
|
27
|
-
const DECISION_PATTERNS = [
|
|
28
|
-
/\bdecided\b/i,
|
|
29
|
-
/\bthe approach is\b/i,
|
|
30
|
-
/\bwe(?:'|')ll go with\b/i,
|
|
31
|
-
/\bthe plan is\b/i,
|
|
32
|
-
/\bapproved\b/i,
|
|
33
|
-
/\bconfirmed\b/i,
|
|
34
|
-
/\bshipped\b/i,
|
|
35
|
-
/\bmerged\b/i,
|
|
36
|
-
/\bdeployed\b/i,
|
|
37
|
-
/\b(?:decision|verdict|ruling|conclusion)\s*:/i,
|
|
38
|
-
/🟢\s*GREEN/,
|
|
39
|
-
/🔴\s*RED/,
|
|
40
|
-
/🟡\s*YELLOW/,
|
|
41
|
-
];
|
|
42
|
-
const SPEC_PATTERNS = [
|
|
43
|
-
/```[\s\S]*?```/m,
|
|
44
|
-
/\binterface\s+[A-Za-z0-9_]+/,
|
|
45
|
-
/\btype\s+[A-Za-z0-9_]+\s*=/,
|
|
46
|
-
/\barchitecture\b/i,
|
|
47
|
-
/\bapi\b/i,
|
|
48
|
-
/\bcontract\b/i,
|
|
49
|
-
/\bschema\b/i,
|
|
50
|
-
/\bmigration\b/i,
|
|
51
|
-
/\bspec\b/i,
|
|
52
|
-
];
|
|
53
|
-
const PREFERENCE_PATTERNS = [
|
|
54
|
-
/\b(?:i|we)\s+(?:prefer|like|love|favor)\b/i,
|
|
55
|
-
/\bmy\s+preferred\b/i,
|
|
56
|
-
/\bpreference\b/i,
|
|
57
|
-
/\bi(?:'|')d\s+rather\b/i,
|
|
58
|
-
/\bdefault\s+to\b/i,
|
|
59
|
-
/\b(?:always|usually)\s+use\b/i,
|
|
60
|
-
];
|
|
61
|
-
const SKILL_PATTERNS = [
|
|
62
|
-
/\b(?:i|we)\s+(?:know|understand|can|able to)\b/i,
|
|
63
|
-
/\b(?:experienced|proficient|expert)\s+with\b/i,
|
|
64
|
-
/\b(?:skill|strength|competenc(?:y|ies))\b/i,
|
|
65
|
-
/\b(?:familiar|comfortable)\s+with\b/i,
|
|
66
|
-
];
|
|
67
|
-
const ATTRIBUTE_PATTERNS = [
|
|
68
|
-
/\b(?:i|we)\s+(?:am|are)\b/i,
|
|
69
|
-
/\bmy\s+(?:role|timezone|location|name|pronouns|schedule|availability)\b/i,
|
|
70
|
-
/\b(?:timezone|pronouns|role|availability|schedule)\s*:/i,
|
|
71
|
-
/\b(?:working\s+hours|hard\s+stop|deadline)\b/i,
|
|
72
|
-
];
|
|
73
|
-
const NOISE_PATTERNS = [
|
|
74
|
-
/\bheartbeat\b/i,
|
|
75
|
-
/\braw log\b/i,
|
|
76
|
-
/^\[[A-Z_]+\]/m,
|
|
77
|
-
/\b(system|daemon|telemetry)\s+message\b/i,
|
|
78
|
-
/\btraceback\b/i,
|
|
79
|
-
/\bstdout\b/i,
|
|
80
|
-
/\bstderr\b/i,
|
|
81
|
-
/^NO_REPLY$/,
|
|
82
|
-
/^HEARTBEAT_OK$/,
|
|
83
|
-
];
|
|
84
|
-
const ACK_PHRASES = new Set([
|
|
85
|
-
'ok',
|
|
86
|
-
'okay',
|
|
87
|
-
'yes',
|
|
88
|
-
'sounds good',
|
|
89
|
-
'lets do it',
|
|
90
|
-
"let's do it",
|
|
91
|
-
'perfect',
|
|
92
|
-
'nice',
|
|
93
|
-
'got it',
|
|
94
|
-
'acknowledged',
|
|
95
|
-
'roger',
|
|
96
|
-
'done',
|
|
97
|
-
'thanks',
|
|
98
|
-
'thank you',
|
|
99
|
-
'ty',
|
|
100
|
-
'lgtm',
|
|
101
|
-
'👍',
|
|
102
|
-
]);
|
|
103
|
-
const HALF_LIFE = {
|
|
104
|
-
decision: Number.POSITIVE_INFINITY,
|
|
105
|
-
spec: 180,
|
|
106
|
-
preference: 180,
|
|
107
|
-
skill: 120,
|
|
108
|
-
attribute: 30,
|
|
109
|
-
discussion: 60,
|
|
110
|
-
ack: 0,
|
|
111
|
-
noise: 0,
|
|
112
|
-
};
|
|
113
|
-
// ─── Classifier ─────────────────────────────────────────────────
|
|
114
|
-
function normalized(content) {
|
|
115
|
-
return content.trim().toLowerCase().replace(/[.!?]+$/g, '');
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Classify a message's content by signal type.
|
|
119
|
-
*
|
|
120
|
-
* @param content - Raw text content of the message
|
|
121
|
-
* @returns Classification with type, confidence, and decay half-life
|
|
122
|
-
*/
|
|
123
|
-
export function classifyContentType(content) {
|
|
124
|
-
const raw = String(content ?? '');
|
|
125
|
-
const body = raw.trim();
|
|
126
|
-
const lc = normalized(body);
|
|
127
|
-
if (!body) {
|
|
128
|
-
return { type: 'noise', confidence: 0.95, halfLifeDays: HALF_LIFE.noise };
|
|
129
|
-
}
|
|
130
|
-
// Noise first — fast path for system/control messages
|
|
131
|
-
if (NOISE_PATTERNS.some((rx) => rx.test(body))) {
|
|
132
|
-
return { type: 'noise', confidence: 0.85, halfLifeDays: HALF_LIFE.noise };
|
|
133
|
-
}
|
|
134
|
-
// Short acks — "ok", "sounds good", etc.
|
|
135
|
-
if (body.length < 40 && ACK_PHRASES.has(lc)) {
|
|
136
|
-
return { type: 'ack', confidence: 0.95, halfLifeDays: HALF_LIFE.ack };
|
|
137
|
-
}
|
|
138
|
-
// Decisions — highest value signal
|
|
139
|
-
if (DECISION_PATTERNS.some((rx) => rx.test(body))) {
|
|
140
|
-
return { type: 'decision', confidence: 0.9, halfLifeDays: HALF_LIFE.decision };
|
|
141
|
-
}
|
|
142
|
-
// Specs — code blocks, type definitions, architecture
|
|
143
|
-
if (SPEC_PATTERNS.some((rx) => rx.test(body))) {
|
|
144
|
-
return { type: 'spec', confidence: 0.82, halfLifeDays: HALF_LIFE.spec };
|
|
145
|
-
}
|
|
146
|
-
// Preferences — user likes, defaults
|
|
147
|
-
if (PREFERENCE_PATTERNS.some((rx) => rx.test(body))) {
|
|
148
|
-
return { type: 'preference', confidence: 0.8, halfLifeDays: HALF_LIFE.preference };
|
|
149
|
-
}
|
|
150
|
-
// Skills — capabilities, knowledge
|
|
151
|
-
if (SKILL_PATTERNS.some((rx) => rx.test(body))) {
|
|
152
|
-
return { type: 'skill', confidence: 0.78, halfLifeDays: HALF_LIFE.skill };
|
|
153
|
-
}
|
|
154
|
-
// Attributes — identity, schedule, role
|
|
155
|
-
if (ATTRIBUTE_PATTERNS.some((rx) => rx.test(body))) {
|
|
156
|
-
return { type: 'attribute', confidence: 0.72, halfLifeDays: HALF_LIFE.attribute };
|
|
157
|
-
}
|
|
158
|
-
// Questions and exploratory discussion
|
|
159
|
-
if (/\?$/.test(body) || /\b(why|how|maybe|could|should|explore|question)\b/i.test(body)) {
|
|
160
|
-
return { type: 'discussion', confidence: 0.75, halfLifeDays: HALF_LIFE.discussion };
|
|
161
|
-
}
|
|
162
|
-
// Default: generic discussion
|
|
163
|
-
return { type: 'discussion', confidence: 0.6, halfLifeDays: HALF_LIFE.discussion };
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Convenience: classify and return the signal weight (0–1).
|
|
167
|
-
* Higher = more valuable for context retention.
|
|
168
|
-
*/
|
|
169
|
-
export function signalWeight(content) {
|
|
170
|
-
const { type } = classifyContentType(content);
|
|
171
|
-
return SIGNAL_WEIGHT[type];
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Convenience: is this message worth keeping in context?
|
|
175
|
-
* Returns false for ack and noise.
|
|
176
|
-
*/
|
|
177
|
-
export function isSignalBearing(content) {
|
|
178
|
-
const { type } = classifyContentType(content);
|
|
179
|
-
return type !== 'ack' && type !== 'noise';
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=content-type-classifier.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Context Backfill
|
|
3
|
-
*
|
|
4
|
-
* One-time migration that creates context rows for existing conversations
|
|
5
|
-
* that don't yet have an active context. Designed to be idempotent — running
|
|
6
|
-
* it multiple times produces the same result without modifying existing data.
|
|
7
|
-
*
|
|
8
|
-
* Also provides parent chain backfill (Phase 2): reconstructs parent_id/depth
|
|
9
|
-
* for legacy flat conversations that were created before the Turn DAG model.
|
|
10
|
-
*/
|
|
11
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
12
|
-
/**
|
|
13
|
-
* Backfill active contexts for all existing conversations.
|
|
14
|
-
*
|
|
15
|
-
* For each conversation without an active context:
|
|
16
|
-
* 1. Creates an active context via getOrCreateActiveContext
|
|
17
|
-
* 2. If the conversation has messages, advances the head pointer
|
|
18
|
-
* to the highest message ID
|
|
19
|
-
*
|
|
20
|
-
* @returns counts of created and skipped conversations
|
|
21
|
-
*/
|
|
22
|
-
export declare function backfillContexts(db: DatabaseSync): {
|
|
23
|
-
created: number;
|
|
24
|
-
skipped: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Backfill parent_id and depth for existing messages that lack them.
|
|
28
|
-
*
|
|
29
|
-
* Reconstructs a linear chain per conversation ordered by message_index:
|
|
30
|
-
* - first message: parent_id = NULL, depth = 0
|
|
31
|
-
* - each subsequent: parent_id = previous.id, depth = previous.depth + 1
|
|
32
|
-
*
|
|
33
|
-
* Idempotent: only touches messages where parent_id IS NULL AND depth = 0
|
|
34
|
-
* AND there is more than one message or the message is not the first.
|
|
35
|
-
* In practice, we simply skip messages that already have parent_id set.
|
|
36
|
-
*
|
|
37
|
-
* Also stamps context_id on messages that lack it, using the active context
|
|
38
|
-
* for their conversation.
|
|
39
|
-
*
|
|
40
|
-
* @returns counts of messages updated and conversations processed
|
|
41
|
-
*/
|
|
42
|
-
export declare function backfillParentChains(db: DatabaseSync): {
|
|
43
|
-
conversationsProcessed: number;
|
|
44
|
-
messagesUpdated: number;
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=context-backfill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-backfill.d.ts","sourceRoot":"","sources":["../src/context-backfill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAwCvF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,GACf;IAAE,sBAAsB,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CA+D7D"}
|
package/dist/context-backfill.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Context Backfill
|
|
3
|
-
*
|
|
4
|
-
* One-time migration that creates context rows for existing conversations
|
|
5
|
-
* that don't yet have an active context. Designed to be idempotent — running
|
|
6
|
-
* it multiple times produces the same result without modifying existing data.
|
|
7
|
-
*
|
|
8
|
-
* Also provides parent chain backfill (Phase 2): reconstructs parent_id/depth
|
|
9
|
-
* for legacy flat conversations that were created before the Turn DAG model.
|
|
10
|
-
*/
|
|
11
|
-
import { getOrCreateActiveContext, updateContextHead } from './context-store.js';
|
|
12
|
-
/**
|
|
13
|
-
* Backfill active contexts for all existing conversations.
|
|
14
|
-
*
|
|
15
|
-
* For each conversation without an active context:
|
|
16
|
-
* 1. Creates an active context via getOrCreateActiveContext
|
|
17
|
-
* 2. If the conversation has messages, advances the head pointer
|
|
18
|
-
* to the highest message ID
|
|
19
|
-
*
|
|
20
|
-
* @returns counts of created and skipped conversations
|
|
21
|
-
*/
|
|
22
|
-
export function backfillContexts(db) {
|
|
23
|
-
let created = 0;
|
|
24
|
-
let skipped = 0;
|
|
25
|
-
const conversations = db
|
|
26
|
-
.prepare('SELECT id, agent_id, session_key FROM conversations')
|
|
27
|
-
.all();
|
|
28
|
-
for (const conv of conversations) {
|
|
29
|
-
// Check if an active context already exists for this conversation
|
|
30
|
-
const existing = db
|
|
31
|
-
.prepare("SELECT id FROM contexts WHERE conversation_id = ? AND status = 'active'")
|
|
32
|
-
.get(conv.id);
|
|
33
|
-
if (existing) {
|
|
34
|
-
skipped++;
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
// Find the max message ID for this conversation (may be null if no messages)
|
|
38
|
-
const maxRow = db
|
|
39
|
-
.prepare('SELECT MAX(id) as max_id FROM messages WHERE conversation_id = ?')
|
|
40
|
-
.get(conv.id);
|
|
41
|
-
const maxId = maxRow?.max_id ?? null;
|
|
42
|
-
// Create the active context
|
|
43
|
-
const context = getOrCreateActiveContext(db, conv.agent_id, conv.session_key, conv.id);
|
|
44
|
-
// If conversation has messages, advance head to the latest
|
|
45
|
-
if (maxId !== null) {
|
|
46
|
-
updateContextHead(db, context.id, maxId);
|
|
47
|
-
}
|
|
48
|
-
created++;
|
|
49
|
-
}
|
|
50
|
-
return { created, skipped };
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Backfill parent_id and depth for existing messages that lack them.
|
|
54
|
-
*
|
|
55
|
-
* Reconstructs a linear chain per conversation ordered by message_index:
|
|
56
|
-
* - first message: parent_id = NULL, depth = 0
|
|
57
|
-
* - each subsequent: parent_id = previous.id, depth = previous.depth + 1
|
|
58
|
-
*
|
|
59
|
-
* Idempotent: only touches messages where parent_id IS NULL AND depth = 0
|
|
60
|
-
* AND there is more than one message or the message is not the first.
|
|
61
|
-
* In practice, we simply skip messages that already have parent_id set.
|
|
62
|
-
*
|
|
63
|
-
* Also stamps context_id on messages that lack it, using the active context
|
|
64
|
-
* for their conversation.
|
|
65
|
-
*
|
|
66
|
-
* @returns counts of messages updated and conversations processed
|
|
67
|
-
*/
|
|
68
|
-
export function backfillParentChains(db) {
|
|
69
|
-
let conversationsProcessed = 0;
|
|
70
|
-
let messagesUpdated = 0;
|
|
71
|
-
// Get all conversations that have at least one non-first message without parent_id.
|
|
72
|
-
// This is the idempotency guard: after backfill, all messages at index > 0
|
|
73
|
-
// have parent_id set. The first message (index 0) legitimately has parent_id = NULL.
|
|
74
|
-
const conversations = db
|
|
75
|
-
.prepare(`SELECT DISTINCT conversation_id
|
|
76
|
-
FROM messages
|
|
77
|
-
WHERE message_index > 0 AND parent_id IS NULL
|
|
78
|
-
ORDER BY conversation_id`)
|
|
79
|
-
.all();
|
|
80
|
-
const updateStmt = db.prepare('UPDATE messages SET parent_id = ?, depth = ?, context_id = COALESCE(context_id, ?) WHERE id = ?');
|
|
81
|
-
for (const { conversation_id: convId } of conversations) {
|
|
82
|
-
// Get active context for this conversation (if any)
|
|
83
|
-
const ctxRow = db
|
|
84
|
-
.prepare("SELECT id FROM contexts WHERE conversation_id = ? AND status = 'active' LIMIT 1")
|
|
85
|
-
.get(convId);
|
|
86
|
-
const contextId = ctxRow?.id ?? null;
|
|
87
|
-
// Get all messages for this conversation without parent_id, ordered by message_index
|
|
88
|
-
const messages = db
|
|
89
|
-
.prepare('SELECT id, message_index FROM messages WHERE conversation_id = ? AND parent_id IS NULL ORDER BY message_index ASC')
|
|
90
|
-
.all(convId);
|
|
91
|
-
if (messages.length === 0)
|
|
92
|
-
continue;
|
|
93
|
-
// Also get the last message that already HAS a parent_id (if any),
|
|
94
|
-
// so we can chain the backfilled messages after it.
|
|
95
|
-
const lastChainedRow = db
|
|
96
|
-
.prepare('SELECT id, depth FROM messages WHERE conversation_id = ? AND parent_id IS NOT NULL ORDER BY message_index DESC LIMIT 1')
|
|
97
|
-
.get(convId);
|
|
98
|
-
let prevId = lastChainedRow?.id ?? null;
|
|
99
|
-
let prevDepth = lastChainedRow?.depth ?? -1;
|
|
100
|
-
// If there's no prior chain AND the first unlinked message is truly
|
|
101
|
-
// message_index 0, start the chain from scratch
|
|
102
|
-
for (const msg of messages) {
|
|
103
|
-
const depth = prevDepth + 1;
|
|
104
|
-
updateStmt.run(prevId, depth, contextId, msg.id);
|
|
105
|
-
prevId = msg.id;
|
|
106
|
-
prevDepth = depth;
|
|
107
|
-
messagesUpdated++;
|
|
108
|
-
}
|
|
109
|
-
conversationsProcessed++;
|
|
110
|
-
}
|
|
111
|
-
return { conversationsProcessed, messagesUpdated };
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=context-backfill.js.map
|
package/dist/context-store.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Context Store
|
|
3
|
-
*
|
|
4
|
-
* Manages the `contexts` table — a durable record of agent conversation
|
|
5
|
-
* contexts that tracks which session is active, what the current head
|
|
6
|
-
* message is, and supports archival and forking.
|
|
7
|
-
*
|
|
8
|
-
* Each agent + session pair has at most one active context at a time.
|
|
9
|
-
* Contexts are the anchor point for the compositor: they track the
|
|
10
|
-
* head message (most recent message included in composed context) and
|
|
11
|
-
* link back to the underlying conversation.
|
|
12
|
-
*
|
|
13
|
-
* Design principles:
|
|
14
|
-
* - All functions take DatabaseSync as first arg (standalone, no classes)
|
|
15
|
-
* - Fully idempotent — safe to call on every startup
|
|
16
|
-
* - Head pointer is monotone-forward (never moves backward)
|
|
17
|
-
* - Archive is idempotent (no-op if already archived)
|
|
18
|
-
*/
|
|
19
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
20
|
-
export interface Context {
|
|
21
|
-
id: number;
|
|
22
|
-
agentId: string;
|
|
23
|
-
sessionKey: string;
|
|
24
|
-
conversationId: number;
|
|
25
|
-
headMessageId: number | null;
|
|
26
|
-
parentContextId: number | null;
|
|
27
|
-
status: 'active' | 'archived' | 'forked';
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
metadataJson: string | null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Add the contexts table and related indexes to an existing messages.db.
|
|
34
|
-
* Also ALTERs the messages table to add a context_id foreign key column.
|
|
35
|
-
* Idempotent — safe to call on every startup.
|
|
36
|
-
*/
|
|
37
|
-
export declare function ensureContextSchema(db: DatabaseSync): void;
|
|
38
|
-
/**
|
|
39
|
-
* Get the active context for an agent + session pair.
|
|
40
|
-
* Returns null if no active context exists.
|
|
41
|
-
*/
|
|
42
|
-
export declare function getActiveContext(db: DatabaseSync, agentId: string, sessionKey: string): Context | null;
|
|
43
|
-
/**
|
|
44
|
-
* Get the active context for an agent + session, creating one if none exists.
|
|
45
|
-
*
|
|
46
|
-
* If an active context already exists, returns it unchanged.
|
|
47
|
-
* Otherwise INSERTs a new context with status='active', head_message_id=NULL,
|
|
48
|
-
* and the given conversationId.
|
|
49
|
-
*
|
|
50
|
-
* Idempotent — safe to call repeatedly.
|
|
51
|
-
*/
|
|
52
|
-
export declare function getOrCreateActiveContext(db: DatabaseSync, agentId: string, sessionKey: string, conversationId: number): Context;
|
|
53
|
-
/**
|
|
54
|
-
* Update the head message pointer for a context.
|
|
55
|
-
*
|
|
56
|
-
* Monotone forward: only updates if messageId > current head_message_id
|
|
57
|
-
* (or current is NULL). This prevents accidental regression of the head
|
|
58
|
-
* pointer, matching the compaction-fence monotone progress pattern.
|
|
59
|
-
*/
|
|
60
|
-
export declare function updateContextHead(db: DatabaseSync, contextId: number, messageId: number): void;
|
|
61
|
-
/**
|
|
62
|
-
* Archive a context, setting its status to 'archived'.
|
|
63
|
-
* Idempotent — no-op if already archived.
|
|
64
|
-
*/
|
|
65
|
-
export declare function archiveContext(db: DatabaseSync, contextId: number): void;
|
|
66
|
-
/**
|
|
67
|
-
* Get any context by id, regardless of status.
|
|
68
|
-
* Returns null if not found.
|
|
69
|
-
*
|
|
70
|
-
* @boundary INSPECTION ONLY — not a mining entry point.
|
|
71
|
-
* @policy See specs/DAG_HELPER_POLICY.md for helper classifications.
|
|
72
|
-
* Do not use this function to retrieve messages for active composition or
|
|
73
|
-
* historical mining. Use getArchivedContext + mineArchivedContext for archived
|
|
74
|
-
* mining, and getActiveContext for composition-path access.
|
|
75
|
-
*/
|
|
76
|
-
export declare function getContextById(db: DatabaseSync, contextId: number): Context | null;
|
|
77
|
-
/**
|
|
78
|
-
* Get all archived or forked contexts for an agent.
|
|
79
|
-
* Optionally filter by sessionKey and/or limit.
|
|
80
|
-
* Returns in reverse-chronological order (most recently updated first).
|
|
81
|
-
*
|
|
82
|
-
* @policy See specs/DAG_HELPER_POLICY.md. This is the operator-safe
|
|
83
|
-
* archived-context enumeration path.
|
|
84
|
-
*/
|
|
85
|
-
export declare function getArchivedContexts(db: DatabaseSync, agentId: string, opts?: {
|
|
86
|
-
sessionKey?: string;
|
|
87
|
-
limit?: number;
|
|
88
|
-
}): Context[];
|
|
89
|
-
/**
|
|
90
|
-
* Get an archived or forked context by id.
|
|
91
|
-
* Returns null if the context does not exist OR if it is active.
|
|
92
|
-
*
|
|
93
|
-
* @policy See specs/DAG_HELPER_POLICY.md. This is the operator-safe
|
|
94
|
-
* single-context lookup path.
|
|
95
|
-
*/
|
|
96
|
-
export declare function getArchivedContext(db: DatabaseSync, contextId: number): Context | null;
|
|
97
|
-
/**
|
|
98
|
-
* Walk the parent_context_id chain upward from the given context.
|
|
99
|
-
* Returns contexts in leaf-to-root order (starting context first).
|
|
100
|
-
* Includes the starting context itself.
|
|
101
|
-
* Caps traversal depth at 100 to avoid corrupt loops.
|
|
102
|
-
*
|
|
103
|
-
* @boundary STATUS-CROSSING BY DESIGN — this function traverses across
|
|
104
|
-
* active, archived, and forked contexts without filtering by status.
|
|
105
|
-
* @policy See specs/DAG_HELPER_POLICY.md for the call-site filtering rule.
|
|
106
|
-
* If you need only archived/forked contexts in the lineage chain, filter
|
|
107
|
-
* the returned array at the call site (e.g. `.filter(c => c.status !== 'active')`).
|
|
108
|
-
*/
|
|
109
|
-
export declare function getContextLineage(db: DatabaseSync, contextId: number): Context[];
|
|
110
|
-
/**
|
|
111
|
-
* Get direct fork children of a context (contexts with parent_context_id = parentContextId).
|
|
112
|
-
* Returns in ascending creation order.
|
|
113
|
-
*
|
|
114
|
-
* @boundary STATUS-CROSSING BY DESIGN — returns children regardless of their status
|
|
115
|
-
* (may include active, archived, or forked children).
|
|
116
|
-
* @policy See specs/DAG_HELPER_POLICY.md for the call-site filtering rule.
|
|
117
|
-
* Filter at the call site if archived-only results are needed.
|
|
118
|
-
*/
|
|
119
|
-
export declare function getForkChildren(db: DatabaseSync, parentContextId: number): Context[];
|
|
120
|
-
/**
|
|
121
|
-
* Rotate a session's active context: archive the current active context
|
|
122
|
-
* and create a new one, optionally linking back via parent_context_id.
|
|
123
|
-
*
|
|
124
|
-
* Used on session restarts/rotations so the new context starts with a
|
|
125
|
-
* clean head pointer instead of inheriting the stale tail.
|
|
126
|
-
*
|
|
127
|
-
* Returns the newly created active context.
|
|
128
|
-
* If no active context exists, simply creates one (no archive step).
|
|
129
|
-
*/
|
|
130
|
-
export declare function rotateSessionContext(db: DatabaseSync, agentId: string, sessionKey: string, conversationId: number): Context;
|
|
131
|
-
//# sourceMappingURL=context-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-store.d.ts","sourceRoot":"","sources":["../src/context-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAyBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAmC1D;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,GAAG,IAAI,CAShB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,OAAO,CAwBT;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,IAAI,CAeN;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,GAChB,IAAI,CAMN;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,GAAG,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IACL,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACA,OAAO,EAAE,CAkBX;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,GAAG,IAAI,CAOhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,EAAE,CAqBX;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,YAAY,EAChB,eAAe,EAAE,MAAM,GACtB,OAAO,EAAE,CAMX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,OAAO,CA2BT"}
|