@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/message-store.js
DELETED
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Message Store
|
|
3
|
-
*
|
|
4
|
-
* CRUD operations for conversations and messages in SQLite.
|
|
5
|
-
* All messages are stored in provider-neutral format.
|
|
6
|
-
* This is the write-through layer: Redis → here.
|
|
7
|
-
*/
|
|
8
|
-
import { getOrCreateActiveContext, updateContextHead, getArchivedContext } from './context-store.js';
|
|
9
|
-
function nowIso() {
|
|
10
|
-
return new Date().toISOString();
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Parse a stored message row from SQLite into a StoredMessage object.
|
|
14
|
-
*/
|
|
15
|
-
function parseMessageRow(row) {
|
|
16
|
-
return {
|
|
17
|
-
id: row.id,
|
|
18
|
-
conversationId: row.conversation_id,
|
|
19
|
-
agentId: row.agent_id,
|
|
20
|
-
role: row.role,
|
|
21
|
-
textContent: row.text_content || null,
|
|
22
|
-
toolCalls: row.tool_calls ? JSON.parse(row.tool_calls) : null,
|
|
23
|
-
toolResults: row.tool_results ? JSON.parse(row.tool_results) : null,
|
|
24
|
-
topicId: typeof row.topic_id === 'string' && row.topic_id.length > 0
|
|
25
|
-
? row.topic_id
|
|
26
|
-
: undefined,
|
|
27
|
-
metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
|
|
28
|
-
messageIndex: row.message_index,
|
|
29
|
-
tokenCount: row.token_count || null,
|
|
30
|
-
isHeartbeat: row.is_heartbeat === 1,
|
|
31
|
-
createdAt: row.created_at,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function parseConversationRow(row) {
|
|
35
|
-
return {
|
|
36
|
-
id: row.id,
|
|
37
|
-
sessionKey: row.session_key,
|
|
38
|
-
sessionId: row.session_id || null,
|
|
39
|
-
agentId: row.agent_id,
|
|
40
|
-
channelType: row.channel_type,
|
|
41
|
-
channelId: row.channel_id || null,
|
|
42
|
-
provider: row.provider || null,
|
|
43
|
-
model: row.model || null,
|
|
44
|
-
status: row.status,
|
|
45
|
-
messageCount: row.message_count,
|
|
46
|
-
tokenCountIn: row.token_count_in,
|
|
47
|
-
tokenCountOut: row.token_count_out,
|
|
48
|
-
createdAt: row.created_at,
|
|
49
|
-
updatedAt: row.updated_at,
|
|
50
|
-
endedAt: row.ended_at || null,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export class MessageStore {
|
|
54
|
-
db;
|
|
55
|
-
constructor(db) {
|
|
56
|
-
this.db = db;
|
|
57
|
-
}
|
|
58
|
-
// ─── Conversation Operations ─────────────────────────────────
|
|
59
|
-
/**
|
|
60
|
-
* Get or create a conversation for a session.
|
|
61
|
-
*/
|
|
62
|
-
getOrCreateConversation(agentId, sessionKey, opts) {
|
|
63
|
-
const existing = this.db
|
|
64
|
-
.prepare('SELECT * FROM conversations WHERE session_key = ?')
|
|
65
|
-
.get(sessionKey);
|
|
66
|
-
if (existing) {
|
|
67
|
-
return parseConversationRow(existing);
|
|
68
|
-
}
|
|
69
|
-
const now = nowIso();
|
|
70
|
-
const channelType = opts?.channelType || this.inferChannelType(sessionKey);
|
|
71
|
-
const result = this.db.prepare(`
|
|
72
|
-
INSERT INTO conversations (session_key, agent_id, channel_type, channel_id, provider, model, created_at, updated_at)
|
|
73
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
74
|
-
`).run(sessionKey, agentId, channelType, opts?.channelId || null, opts?.provider || null, opts?.model || null, now, now);
|
|
75
|
-
// node:sqlite returns { changes, lastInsertRowid }
|
|
76
|
-
const id = result.lastInsertRowid;
|
|
77
|
-
// Ensure an active context exists for the new conversation (fire-and-forget side effect)
|
|
78
|
-
getOrCreateActiveContext(this.db, agentId, sessionKey, id);
|
|
79
|
-
return {
|
|
80
|
-
id,
|
|
81
|
-
sessionKey,
|
|
82
|
-
sessionId: null,
|
|
83
|
-
agentId,
|
|
84
|
-
channelType,
|
|
85
|
-
channelId: opts?.channelId || null,
|
|
86
|
-
provider: opts?.provider || null,
|
|
87
|
-
model: opts?.model || null,
|
|
88
|
-
status: 'active',
|
|
89
|
-
messageCount: 0,
|
|
90
|
-
tokenCountIn: 0,
|
|
91
|
-
tokenCountOut: 0,
|
|
92
|
-
createdAt: now,
|
|
93
|
-
updatedAt: now,
|
|
94
|
-
endedAt: null,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get a conversation by session key.
|
|
99
|
-
*/
|
|
100
|
-
getConversation(sessionKey) {
|
|
101
|
-
const row = this.db
|
|
102
|
-
.prepare('SELECT * FROM conversations WHERE session_key = ?')
|
|
103
|
-
.get(sessionKey);
|
|
104
|
-
return row ? parseConversationRow(row) : null;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Get all conversations for an agent, optionally filtered.
|
|
108
|
-
*/
|
|
109
|
-
getConversations(agentId, opts) {
|
|
110
|
-
let sql = 'SELECT * FROM conversations WHERE agent_id = ?';
|
|
111
|
-
const params = [agentId];
|
|
112
|
-
if (opts?.status) {
|
|
113
|
-
sql += ' AND status = ?';
|
|
114
|
-
params.push(opts.status);
|
|
115
|
-
}
|
|
116
|
-
if (opts?.channelType) {
|
|
117
|
-
sql += ' AND channel_type = ?';
|
|
118
|
-
params.push(opts.channelType);
|
|
119
|
-
}
|
|
120
|
-
sql += ' ORDER BY updated_at DESC';
|
|
121
|
-
if (opts?.limit) {
|
|
122
|
-
sql += ' LIMIT ?';
|
|
123
|
-
params.push(opts.limit);
|
|
124
|
-
}
|
|
125
|
-
const rows = this.db.prepare(sql).all(...params);
|
|
126
|
-
return rows.map(parseConversationRow);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Update conversation metadata.
|
|
130
|
-
*/
|
|
131
|
-
updateConversation(conversationId, updates) {
|
|
132
|
-
const sets = ['updated_at = ?'];
|
|
133
|
-
const params = [nowIso()];
|
|
134
|
-
if (updates.provider !== undefined) {
|
|
135
|
-
sets.push('provider = ?');
|
|
136
|
-
params.push(updates.provider);
|
|
137
|
-
}
|
|
138
|
-
if (updates.model !== undefined) {
|
|
139
|
-
sets.push('model = ?');
|
|
140
|
-
params.push(updates.model);
|
|
141
|
-
}
|
|
142
|
-
if (updates.status !== undefined) {
|
|
143
|
-
sets.push('status = ?');
|
|
144
|
-
params.push(updates.status);
|
|
145
|
-
}
|
|
146
|
-
if (updates.endedAt !== undefined) {
|
|
147
|
-
sets.push('ended_at = ?');
|
|
148
|
-
params.push(updates.endedAt);
|
|
149
|
-
}
|
|
150
|
-
params.push(conversationId);
|
|
151
|
-
this.db.prepare(`UPDATE conversations SET ${sets.join(', ')} WHERE id = ?`).run(...params);
|
|
152
|
-
}
|
|
153
|
-
// ─── Message Operations ──────────────────────────────────────
|
|
154
|
-
/**
|
|
155
|
-
* Record a message to the database.
|
|
156
|
-
* Returns the stored message with its assigned ID.
|
|
157
|
-
*
|
|
158
|
-
* Phase 2 (Turn DAG): automatically sets parent_id and depth.
|
|
159
|
-
* - parent_id = context.head_message_id (the previous message on this branch)
|
|
160
|
-
* - depth = parent.depth + 1 (or 0 if first message)
|
|
161
|
-
*/
|
|
162
|
-
recordMessage(conversationId, agentId, message, opts) {
|
|
163
|
-
const now = nowIso();
|
|
164
|
-
// Get next message index
|
|
165
|
-
const lastRow = this.db
|
|
166
|
-
.prepare('SELECT MAX(message_index) AS max_idx FROM messages WHERE conversation_id = ?')
|
|
167
|
-
.get(conversationId);
|
|
168
|
-
const messageIndex = (lastRow?.max_idx ?? -1) + 1;
|
|
169
|
-
// Phase 2 (Turn DAG): resolve parent_id and depth from context head
|
|
170
|
-
let parentId = null;
|
|
171
|
-
let depth = 0;
|
|
172
|
-
if (opts?.contextId) {
|
|
173
|
-
const headRow = this.db
|
|
174
|
-
.prepare('SELECT head_message_id FROM contexts WHERE id = ?')
|
|
175
|
-
.get(opts.contextId);
|
|
176
|
-
if (headRow?.head_message_id != null) {
|
|
177
|
-
parentId = headRow.head_message_id;
|
|
178
|
-
const parentDepthRow = this.db
|
|
179
|
-
.prepare('SELECT depth FROM messages WHERE id = ?')
|
|
180
|
-
.get(parentId);
|
|
181
|
-
depth = (parentDepthRow?.depth ?? -1) + 1;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
const result = this.db.prepare(`
|
|
185
|
-
INSERT INTO messages (conversation_id, agent_id, role, text_content, tool_calls, tool_results, metadata, token_count, message_index, is_heartbeat, created_at, context_id, parent_id, depth, topic_id)
|
|
186
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
187
|
-
`).run(conversationId, agentId, message.role, message.textContent, message.toolCalls ? JSON.stringify(message.toolCalls) : null, message.toolResults ? JSON.stringify(message.toolResults) : null, message.metadata ? JSON.stringify(message.metadata) : null, opts?.tokenCount || null, messageIndex, opts?.isHeartbeat ? 1 : 0, now, opts?.contextId ?? null, parentId, depth, message.topicId ?? null);
|
|
188
|
-
const id = result.lastInsertRowid;
|
|
189
|
-
// Update context head pointer if contextId was provided
|
|
190
|
-
if (opts?.contextId) {
|
|
191
|
-
updateContextHead(this.db, opts.contextId, Number(id));
|
|
192
|
-
}
|
|
193
|
-
// Update conversation counters
|
|
194
|
-
const tokenDelta = opts?.tokenCount || 0;
|
|
195
|
-
const isOutput = message.role === 'assistant';
|
|
196
|
-
this.db.prepare(`
|
|
197
|
-
UPDATE conversations
|
|
198
|
-
SET message_count = message_count + 1,
|
|
199
|
-
token_count_in = token_count_in + ?,
|
|
200
|
-
token_count_out = token_count_out + ?,
|
|
201
|
-
updated_at = ?
|
|
202
|
-
WHERE id = ?
|
|
203
|
-
`).run(isOutput ? 0 : tokenDelta, isOutput ? tokenDelta : 0, now, conversationId);
|
|
204
|
-
return {
|
|
205
|
-
id,
|
|
206
|
-
conversationId,
|
|
207
|
-
agentId,
|
|
208
|
-
role: message.role,
|
|
209
|
-
textContent: message.textContent,
|
|
210
|
-
toolCalls: message.toolCalls,
|
|
211
|
-
toolResults: message.toolResults,
|
|
212
|
-
topicId: message.topicId,
|
|
213
|
-
metadata: message.metadata,
|
|
214
|
-
messageIndex,
|
|
215
|
-
tokenCount: opts?.tokenCount || null,
|
|
216
|
-
isHeartbeat: opts?.isHeartbeat || false,
|
|
217
|
-
createdAt: now,
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Get recent messages for a conversation.
|
|
222
|
-
*/
|
|
223
|
-
getRecentMessages(conversationId, limit = 50, minMessageId) {
|
|
224
|
-
const params = [conversationId];
|
|
225
|
-
let sql = 'SELECT * FROM messages WHERE conversation_id = ?';
|
|
226
|
-
if (minMessageId != null) {
|
|
227
|
-
sql += ' AND id >= ?';
|
|
228
|
-
params.push(minMessageId);
|
|
229
|
-
}
|
|
230
|
-
sql += ' ORDER BY message_index DESC LIMIT ?';
|
|
231
|
-
params.push(limit);
|
|
232
|
-
const rows = this.db.prepare(sql).all(...params);
|
|
233
|
-
// Reverse to get chronological order
|
|
234
|
-
return rows.reverse().map(parseMessageRow);
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Get recent messages scoped to a topic (P3.4, Option B).
|
|
238
|
-
* Returns messages matching the topic_id OR with topic_id IS NULL
|
|
239
|
-
* (legacy messages created before topic tracking was introduced).
|
|
240
|
-
* This is transition-safe: no legacy messages are silently dropped.
|
|
241
|
-
*/
|
|
242
|
-
getRecentMessagesByTopic(conversationId, topicId, limit = 50, minMessageId) {
|
|
243
|
-
const params = [conversationId, topicId];
|
|
244
|
-
let sql = 'SELECT * FROM messages WHERE conversation_id = ? AND (topic_id = ? OR topic_id IS NULL)';
|
|
245
|
-
if (minMessageId != null) {
|
|
246
|
-
sql += ' AND id >= ?';
|
|
247
|
-
params.push(minMessageId);
|
|
248
|
-
}
|
|
249
|
-
sql += ' ORDER BY message_index DESC LIMIT ?';
|
|
250
|
-
params.push(limit);
|
|
251
|
-
const rows = this.db.prepare(sql).all(...params);
|
|
252
|
-
// Reverse to get chronological order
|
|
253
|
-
return rows.reverse().map(parseMessageRow);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Get messages across all conversations for an agent (cross-session query).
|
|
257
|
-
*/
|
|
258
|
-
getAgentMessages(agentId, opts) {
|
|
259
|
-
let sql = 'SELECT * FROM messages WHERE agent_id = ?';
|
|
260
|
-
const params = [agentId];
|
|
261
|
-
if (opts?.since) {
|
|
262
|
-
sql += ' AND created_at > ?';
|
|
263
|
-
params.push(opts.since);
|
|
264
|
-
}
|
|
265
|
-
if (opts?.excludeHeartbeats) {
|
|
266
|
-
sql += ' AND is_heartbeat = 0';
|
|
267
|
-
}
|
|
268
|
-
sql += ' ORDER BY created_at DESC';
|
|
269
|
-
if (opts?.limit) {
|
|
270
|
-
sql += ' LIMIT ?';
|
|
271
|
-
params.push(opts.limit);
|
|
272
|
-
}
|
|
273
|
-
const rows = this.db.prepare(sql).all(...params);
|
|
274
|
-
return rows.map(parseMessageRow);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Full-text search across all messages for an agent.
|
|
278
|
-
*/
|
|
279
|
-
searchMessages(agentId, query, limit = 20) {
|
|
280
|
-
// Per-agent DB contains only one agent's data, so agent_id filter is
|
|
281
|
-
// redundant and catastrophically slows FTS (forces full result scan +
|
|
282
|
-
// join before LIMIT). Omitted by design — see bench/data-access-bench.mjs.
|
|
283
|
-
// Two-phase query: FTS subquery runs first (fast LIMIT inside FTS),
|
|
284
|
-
// then join the small result set for metadata retrieval.
|
|
285
|
-
// Direct JOIN + WHERE MATCH + ORDER BY rank + LIMIT forces SQLite to
|
|
286
|
-
// materialize the full FTS join before applying LIMIT — catastrophic
|
|
287
|
-
// on large message DBs. See: specs/HYPERMEM_INCIDENT_HISTORY.md Incident 3.
|
|
288
|
-
const rows = this.db.prepare(`
|
|
289
|
-
WITH fts_matches AS (
|
|
290
|
-
SELECT rowid, rank FROM messages_fts WHERE messages_fts MATCH ? ORDER BY rank LIMIT ?
|
|
291
|
-
)
|
|
292
|
-
SELECT m.* FROM messages m JOIN fts_matches ON m.id = fts_matches.rowid ORDER BY fts_matches.rank
|
|
293
|
-
`).all(query, limit);
|
|
294
|
-
return rows.map(parseMessageRow);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Get recent turns for a session, in chronological order, with tool calls stripped.
|
|
298
|
-
* Joins messages through conversations to find by session_key.
|
|
299
|
-
* Returns up to `n` turns (capped at 50).
|
|
300
|
-
*/
|
|
301
|
-
getRecentTurns(sessionKey, n) {
|
|
302
|
-
const limit = Math.min(n, 50);
|
|
303
|
-
try {
|
|
304
|
-
const rows = this.db.prepare(`
|
|
305
|
-
SELECT m.role, m.text_content, m.created_at, m.message_index
|
|
306
|
-
FROM messages m
|
|
307
|
-
JOIN conversations c ON m.conversation_id = c.id
|
|
308
|
-
WHERE c.session_key = ?
|
|
309
|
-
AND m.role IN ('user', 'assistant')
|
|
310
|
-
ORDER BY m.message_index DESC
|
|
311
|
-
LIMIT ?
|
|
312
|
-
`).all(sessionKey, limit);
|
|
313
|
-
// Reverse to chronological order
|
|
314
|
-
rows.reverse();
|
|
315
|
-
return rows.map(row => ({
|
|
316
|
-
role: row.role,
|
|
317
|
-
// text_content only — tool calls are stored separately and excluded here
|
|
318
|
-
content: row.text_content ?? '',
|
|
319
|
-
timestamp: row.created_at
|
|
320
|
-
? new Date(row.created_at).getTime()
|
|
321
|
-
: Date.now(),
|
|
322
|
-
seq: row.message_index,
|
|
323
|
-
}));
|
|
324
|
-
}
|
|
325
|
-
catch (err) {
|
|
326
|
-
console.warn('[hypermem:message-store] getRecentTurns failed:', err.message);
|
|
327
|
-
return [];
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Get messages by walking the parent_id chain from a head message backward.
|
|
332
|
-
* This is the DAG-native read path introduced in Phase 3.
|
|
333
|
-
*
|
|
334
|
-
* Walks from headMessageId backward through parent_id links, collecting
|
|
335
|
-
* up to `limit` messages in chronological order.
|
|
336
|
-
*
|
|
337
|
-
* Falls back to getRecentMessages if the head message has no parent chain
|
|
338
|
-
* (e.g., legacy data before backfill).
|
|
339
|
-
*
|
|
340
|
-
* @boundary SHARED DAG PRIMITIVE — not for direct call at mining call sites.
|
|
341
|
-
* @policy See specs/DAG_HELPER_POLICY.md for operator-boundary rules.
|
|
342
|
-
* Use mineArchivedContext / mineArchivedContexts for archived context mining,
|
|
343
|
-
* and the active-composition paths for live session history. Direct call sites
|
|
344
|
-
* outside this class should be limited to exceptional diagnostic use.
|
|
345
|
-
*/
|
|
346
|
-
getHistoryByDAGWalk(headMessageId, limit = 50) {
|
|
347
|
-
try {
|
|
348
|
-
// Use recursive CTE to walk backward from head
|
|
349
|
-
const rows = this.db.prepare(`
|
|
350
|
-
WITH RECURSIVE chain AS (
|
|
351
|
-
SELECT id, parent_id, depth, conversation_id, agent_id, role,
|
|
352
|
-
text_content, tool_calls, tool_results, metadata,
|
|
353
|
-
message_index, token_count, is_heartbeat, created_at,
|
|
354
|
-
1 AS chain_pos
|
|
355
|
-
FROM messages
|
|
356
|
-
WHERE id = ?
|
|
357
|
-
|
|
358
|
-
UNION ALL
|
|
359
|
-
|
|
360
|
-
SELECT m.id, m.parent_id, m.depth, m.conversation_id, m.agent_id, m.role,
|
|
361
|
-
m.text_content, m.tool_calls, m.tool_results, m.metadata,
|
|
362
|
-
m.message_index, m.token_count, m.is_heartbeat, m.created_at,
|
|
363
|
-
c.chain_pos + 1
|
|
364
|
-
FROM messages m
|
|
365
|
-
JOIN chain c ON m.id = c.parent_id
|
|
366
|
-
WHERE c.chain_pos < ?
|
|
367
|
-
)
|
|
368
|
-
SELECT * FROM chain ORDER BY depth ASC, message_index ASC
|
|
369
|
-
`).all(headMessageId, limit);
|
|
370
|
-
if (rows.length === 0)
|
|
371
|
-
return [];
|
|
372
|
-
return rows.map(parseMessageRow);
|
|
373
|
-
}
|
|
374
|
-
catch {
|
|
375
|
-
// DAG walk failed (e.g., no parent chain) — return empty, caller should fall back
|
|
376
|
-
return [];
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Get messages scoped to a specific context_id.
|
|
381
|
-
* Used by keystone/FTS/topic recall to constrain results to the active branch.
|
|
382
|
-
*/
|
|
383
|
-
getMessagesByContextId(contextId, limit = 200, opts) {
|
|
384
|
-
let sql = 'SELECT * FROM messages WHERE context_id = ?';
|
|
385
|
-
const params = [contextId];
|
|
386
|
-
if (opts?.excludeHeartbeats) {
|
|
387
|
-
sql += ' AND is_heartbeat = 0';
|
|
388
|
-
}
|
|
389
|
-
if (opts?.requireText) {
|
|
390
|
-
sql += " AND text_content IS NOT NULL AND text_content != ''";
|
|
391
|
-
}
|
|
392
|
-
sql += ' ORDER BY message_index DESC LIMIT ?';
|
|
393
|
-
params.push(limit);
|
|
394
|
-
const rows = this.db.prepare(sql).all(...params);
|
|
395
|
-
return rows.reverse().map(parseMessageRow);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Full-text search constrained to a specific context_id.
|
|
399
|
-
* Phase 3: replaces unscoped searchMessages for composition paths.
|
|
400
|
-
*/
|
|
401
|
-
searchMessagesByContextId(contextId, query, limit = 20) {
|
|
402
|
-
try {
|
|
403
|
-
const rows = this.db.prepare(`
|
|
404
|
-
WITH fts_matches AS (
|
|
405
|
-
SELECT rowid, rank FROM messages_fts WHERE messages_fts MATCH ? ORDER BY rank LIMIT ?
|
|
406
|
-
)
|
|
407
|
-
SELECT m.* FROM messages m
|
|
408
|
-
JOIN fts_matches ON m.id = fts_matches.rowid
|
|
409
|
-
WHERE m.context_id = ?
|
|
410
|
-
ORDER BY fts_matches.rank
|
|
411
|
-
`).all(query, limit * 3, contextId);
|
|
412
|
-
return rows.slice(0, limit).map(parseMessageRow);
|
|
413
|
-
}
|
|
414
|
-
catch {
|
|
415
|
-
return [];
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Get message count for a conversation.
|
|
420
|
-
*/
|
|
421
|
-
getMessageCount(conversationId) {
|
|
422
|
-
const row = this.db
|
|
423
|
-
.prepare('SELECT COUNT(*) AS count FROM messages WHERE conversation_id = ?')
|
|
424
|
-
.get(conversationId);
|
|
425
|
-
return row.count;
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Get the full message chain for an archived or forked context.
|
|
429
|
-
*
|
|
430
|
-
* Throws if the context does not exist or is active (not archived/forked).
|
|
431
|
-
* Returns an empty array if the context has no head message.
|
|
432
|
-
* Delegates to getHistoryByDAGWalk for the actual chain retrieval.
|
|
433
|
-
*/
|
|
434
|
-
getArchivedChain(contextId, limit) {
|
|
435
|
-
const context = getArchivedContext(this.db, contextId);
|
|
436
|
-
if (!context) {
|
|
437
|
-
throw new Error('getArchivedChain: context must be archived or forked');
|
|
438
|
-
}
|
|
439
|
-
if (context.headMessageId === null) {
|
|
440
|
-
return [];
|
|
441
|
-
}
|
|
442
|
-
return this.getHistoryByDAGWalk(context.headMessageId, limit ?? 200);
|
|
443
|
-
}
|
|
444
|
-
// ─── Archived Mining (Phase 4 Sprint 2 / Sprint 3) ─────────────
|
|
445
|
-
/**
|
|
446
|
-
* Default maximum number of contextIds accepted by mineArchivedContexts.
|
|
447
|
-
* Callers may supply a lower value but not a higher one.
|
|
448
|
-
*/
|
|
449
|
-
static ARCHIVED_MULTI_CONTEXT_DEFAULT_MAX = 20;
|
|
450
|
-
/**
|
|
451
|
-
* Hard ceiling for mineArchivedContexts.
|
|
452
|
-
* Values above this are clamped to this number regardless of caller intent.
|
|
453
|
-
* This prevents unbounded DB fan-out on misconfigured or adversarial inputs.
|
|
454
|
-
*/
|
|
455
|
-
static ARCHIVED_MULTI_CONTEXT_HARD_CEILING = 50;
|
|
456
|
-
// ─── Archived Mining (Phase 4 Sprint 2) ───────────────────────
|
|
457
|
-
/**
|
|
458
|
-
* Mine messages from a single archived or forked context.
|
|
459
|
-
*
|
|
460
|
-
* - Rejects active or missing contexts with a clear error.
|
|
461
|
-
* - Hard-caps limit at 200.
|
|
462
|
-
* - Defaults excludeHeartbeats to true.
|
|
463
|
-
* - Optionally filters by ftsQuery (client-side substring match for Sprint 3; SQL FTS is deferred).
|
|
464
|
-
* - Routes through getHistoryByDAGWalk for DAG-native retrieval.
|
|
465
|
-
* - Returns ArchivedMiningResult<StoredMessage[]> with isHistorical: true.
|
|
466
|
-
*
|
|
467
|
-
* This method does NOT widen active composition — it only operates on
|
|
468
|
-
* explicitly non-active (archived/forked) contexts.
|
|
469
|
-
*/
|
|
470
|
-
mineArchivedContext(query) {
|
|
471
|
-
const { contextId, limit, excludeHeartbeats = true, ftsQuery } = query;
|
|
472
|
-
const context = getArchivedContext(this.db, contextId);
|
|
473
|
-
if (!context) {
|
|
474
|
-
throw new Error(`mineArchivedContext: context ${contextId} does not exist or is not archived/forked. ` +
|
|
475
|
-
`Only archived or forked contexts may be mined.`);
|
|
476
|
-
}
|
|
477
|
-
// Hard cap at 200
|
|
478
|
-
const effectiveLimit = Math.min(limit ?? 200, 200);
|
|
479
|
-
let messages = [];
|
|
480
|
-
if (context.headMessageId !== null) {
|
|
481
|
-
messages = this.getHistoryByDAGWalk(context.headMessageId, effectiveLimit);
|
|
482
|
-
}
|
|
483
|
-
// Apply heartbeat filter (default: exclude)
|
|
484
|
-
if (excludeHeartbeats) {
|
|
485
|
-
messages = messages.filter(m => !m.isHeartbeat);
|
|
486
|
-
}
|
|
487
|
-
// Client-side ftsQuery filter (substring match for Sprint 2)
|
|
488
|
-
if (ftsQuery && ftsQuery.trim().length > 0) {
|
|
489
|
-
const q = ftsQuery.trim().toLowerCase();
|
|
490
|
-
messages = messages.filter(m => (m.textContent ?? '').toLowerCase().includes(q));
|
|
491
|
-
}
|
|
492
|
-
return {
|
|
493
|
-
isHistorical: true,
|
|
494
|
-
contextId: context.id,
|
|
495
|
-
agentId: context.agentId,
|
|
496
|
-
sessionKey: context.sessionKey,
|
|
497
|
-
contextStatus: context.status,
|
|
498
|
-
contextUpdatedAt: context.updatedAt,
|
|
499
|
-
data: messages,
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Mine messages from multiple archived or forked contexts.
|
|
504
|
-
*
|
|
505
|
-
* ## maxContexts gate (Phase 4 Sprint 3, Task 1)
|
|
506
|
-
* Accepts an optional `maxContexts` in opts to control how many contextIds
|
|
507
|
-
* are accepted in a single call:
|
|
508
|
-
* - Default: ARCHIVED_MULTI_CONTEXT_DEFAULT_MAX (20).
|
|
509
|
-
* - Hard ceiling: ARCHIVED_MULTI_CONTEXT_HARD_CEILING (50).
|
|
510
|
-
* - A caller-supplied value above the hard ceiling is clamped to the ceiling
|
|
511
|
-
* (not rejected), so callers need not know the exact constant.
|
|
512
|
-
* - A caller-supplied value at or below the ceiling is used as-is.
|
|
513
|
-
* - If contextIds.length exceeds the effective max, this method THROWS
|
|
514
|
-
* immediately — it does NOT soft-skip or truncate.
|
|
515
|
-
*
|
|
516
|
-
* ## Other behaviors (unchanged from Sprint 2)
|
|
517
|
-
* - Soft-skips active or missing contextIds with a warning (does not throw).
|
|
518
|
-
* - Preserves input order in the result array.
|
|
519
|
-
* - Applies per-context limit and same filters as mineArchivedContext.
|
|
520
|
-
* - Returns one ArchivedMiningResult per valid archived context.
|
|
521
|
-
*
|
|
522
|
-
* This method does NOT widen active composition — it only operates on
|
|
523
|
-
* explicitly non-active (archived/forked) contexts.
|
|
524
|
-
*/
|
|
525
|
-
mineArchivedContexts(contextIds, opts) {
|
|
526
|
-
// ── maxContexts gate ──────────────────────────────────────────────────
|
|
527
|
-
const { maxContexts: callerMax, ...perContextOpts } = opts ?? {};
|
|
528
|
-
const effectiveMax = callerMax !== undefined
|
|
529
|
-
? Math.min(callerMax, MessageStore.ARCHIVED_MULTI_CONTEXT_HARD_CEILING)
|
|
530
|
-
: MessageStore.ARCHIVED_MULTI_CONTEXT_DEFAULT_MAX;
|
|
531
|
-
if (contextIds.length > effectiveMax) {
|
|
532
|
-
throw new Error(`mineArchivedContexts: too many contextIds (${contextIds.length}). ` +
|
|
533
|
-
`Effective limit is ${effectiveMax} ` +
|
|
534
|
-
`(hard ceiling: ${MessageStore.ARCHIVED_MULTI_CONTEXT_HARD_CEILING}, ` +
|
|
535
|
-
`default: ${MessageStore.ARCHIVED_MULTI_CONTEXT_DEFAULT_MAX}). ` +
|
|
536
|
-
`Pass fewer contextIds or supply a higher maxContexts (max: ${MessageStore.ARCHIVED_MULTI_CONTEXT_HARD_CEILING}).`);
|
|
537
|
-
}
|
|
538
|
-
// ── end gate ─────────────────────────────────────────────────────────
|
|
539
|
-
const results = [];
|
|
540
|
-
for (const contextId of contextIds) {
|
|
541
|
-
const context = getArchivedContext(this.db, contextId);
|
|
542
|
-
if (!context) {
|
|
543
|
-
console.warn(`[hypermem:message-store] mineArchivedContexts: skipping contextId ${contextId} ` +
|
|
544
|
-
`— does not exist or is not archived/forked (may be active or missing).`);
|
|
545
|
-
continue;
|
|
546
|
-
}
|
|
547
|
-
try {
|
|
548
|
-
results.push(this.mineArchivedContext({ contextId, ...perContextOpts }));
|
|
549
|
-
}
|
|
550
|
-
catch (err) {
|
|
551
|
-
console.warn(`[hypermem:message-store] mineArchivedContexts: skipping contextId ${contextId} ` +
|
|
552
|
-
`— ${err.message}`);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
return results;
|
|
556
|
-
}
|
|
557
|
-
// ─── Helpers ─────────────────────────────────────────────────
|
|
558
|
-
/**
|
|
559
|
-
* Infer channel type from session key format.
|
|
560
|
-
*/
|
|
561
|
-
inferChannelType(sessionKey) {
|
|
562
|
-
if (sessionKey.includes(':webchat:'))
|
|
563
|
-
return 'webchat';
|
|
564
|
-
if (sessionKey.includes(':discord:'))
|
|
565
|
-
return 'discord';
|
|
566
|
-
if (sessionKey.includes(':telegram:'))
|
|
567
|
-
return 'telegram';
|
|
568
|
-
if (sessionKey.includes(':signal:'))
|
|
569
|
-
return 'signal';
|
|
570
|
-
if (sessionKey.includes(':subagent:') || sessionKey.includes(':spawn:'))
|
|
571
|
-
return 'subagent';
|
|
572
|
-
if (sessionKey.includes(':heartbeat'))
|
|
573
|
-
return 'heartbeat';
|
|
574
|
-
return 'other';
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
//# sourceMappingURL=message-store.js.map
|