@psiclawops/hypermem 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/INSTALL.md +11 -2
- package/README.md +24 -24
- package/dist/adaptive-lifecycle.d.ts +81 -0
- package/dist/adaptive-lifecycle.d.ts.map +1 -0
- package/dist/adaptive-lifecycle.js +190 -0
- package/dist/background-indexer.d.ts +161 -0
- package/dist/background-indexer.d.ts.map +1 -0
- package/dist/background-indexer.js +1263 -0
- package/dist/budget-policy.d.ts +22 -0
- package/dist/budget-policy.d.ts.map +1 -0
- package/dist/budget-policy.js +32 -0
- package/dist/cache.d.ts +148 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +571 -0
- package/dist/compaction-fence.d.ts +97 -0
- package/dist/compaction-fence.d.ts.map +1 -0
- package/dist/compaction-fence.js +174 -0
- package/dist/composition-snapshot-integrity.d.ts +36 -0
- package/dist/composition-snapshot-integrity.d.ts.map +1 -0
- package/dist/composition-snapshot-integrity.js +131 -0
- package/dist/composition-snapshot-runtime.d.ts +59 -0
- package/dist/composition-snapshot-runtime.d.ts.map +1 -0
- package/dist/composition-snapshot-runtime.js +250 -0
- package/dist/composition-snapshot-store.d.ts +44 -0
- package/dist/composition-snapshot-store.d.ts.map +1 -0
- package/dist/composition-snapshot-store.js +117 -0
- package/dist/compositor.d.ts +518 -0
- package/dist/compositor.d.ts.map +1 -0
- package/dist/compositor.js +4280 -0
- package/dist/content-type-classifier.d.ts +41 -0
- package/dist/content-type-classifier.d.ts.map +1 -0
- package/dist/content-type-classifier.js +181 -0
- package/dist/context-backfill.d.ts +46 -0
- package/dist/context-backfill.d.ts.map +1 -0
- package/dist/context-backfill.js +113 -0
- package/dist/context-store.d.ts +131 -0
- package/dist/context-store.d.ts.map +1 -0
- package/dist/context-store.js +279 -0
- package/dist/contradiction-audit-store.d.ts +54 -0
- package/dist/contradiction-audit-store.d.ts.map +1 -0
- package/dist/contradiction-audit-store.js +88 -0
- package/dist/contradiction-detector.d.ts +78 -0
- package/dist/contradiction-detector.d.ts.map +1 -0
- package/dist/contradiction-detector.js +362 -0
- package/dist/contradiction-resolution-policy.d.ts +21 -0
- package/dist/contradiction-resolution-policy.d.ts.map +1 -0
- package/dist/contradiction-resolution-policy.js +17 -0
- package/dist/cross-agent.d.ts +74 -0
- package/dist/cross-agent.d.ts.map +1 -0
- package/dist/cross-agent.js +271 -0
- package/dist/db.d.ts +131 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +410 -0
- package/dist/degradation.d.ts +102 -0
- package/dist/degradation.d.ts.map +1 -0
- package/dist/degradation.js +141 -0
- package/dist/desired-state-store.d.ts +100 -0
- package/dist/desired-state-store.d.ts.map +1 -0
- package/dist/desired-state-store.js +222 -0
- package/dist/doc-chunk-store.d.ts +159 -0
- package/dist/doc-chunk-store.d.ts.map +1 -0
- package/dist/doc-chunk-store.js +441 -0
- package/dist/doc-chunker.d.ts +99 -0
- package/dist/doc-chunker.d.ts.map +1 -0
- package/dist/doc-chunker.js +324 -0
- package/dist/dreaming-promoter.d.ts +124 -0
- package/dist/dreaming-promoter.d.ts.map +1 -0
- package/dist/dreaming-promoter.js +447 -0
- package/dist/episode-store.d.ts +49 -0
- package/dist/episode-store.d.ts.map +1 -0
- package/dist/episode-store.js +135 -0
- package/dist/expertise-store.d.ts +129 -0
- package/dist/expertise-store.d.ts.map +1 -0
- package/dist/expertise-store.js +342 -0
- package/dist/fact-store.d.ts +90 -0
- package/dist/fact-store.d.ts.map +1 -0
- package/dist/fact-store.js +283 -0
- package/dist/fleet-store.d.ts +144 -0
- package/dist/fleet-store.d.ts.map +1 -0
- package/dist/fleet-store.js +276 -0
- package/dist/fos-mod.d.ts +178 -0
- package/dist/fos-mod.d.ts.map +1 -0
- package/dist/fos-mod.js +416 -0
- package/dist/hybrid-retrieval.d.ts +102 -0
- package/dist/hybrid-retrieval.d.ts.map +1 -0
- package/dist/hybrid-retrieval.js +429 -0
- package/dist/image-eviction.d.ts +49 -0
- package/dist/image-eviction.d.ts.map +1 -0
- package/dist/image-eviction.js +251 -0
- package/dist/index.d.ts +735 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1542 -0
- package/dist/keystone-scorer.d.ts +51 -0
- package/dist/keystone-scorer.d.ts.map +1 -0
- package/dist/keystone-scorer.js +52 -0
- package/dist/knowledge-graph.d.ts +110 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +305 -0
- package/dist/knowledge-lint.d.ts +31 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +155 -0
- package/dist/knowledge-store.d.ts +75 -0
- package/dist/knowledge-store.d.ts.map +1 -0
- package/dist/knowledge-store.js +270 -0
- package/dist/library-schema.d.ts +31 -0
- package/dist/library-schema.d.ts.map +1 -0
- package/dist/library-schema.js +1357 -0
- package/dist/message-store.d.ts +181 -0
- package/dist/message-store.d.ts.map +1 -0
- package/dist/message-store.js +577 -0
- package/dist/metrics-dashboard.d.ts +131 -0
- package/dist/metrics-dashboard.d.ts.map +1 -0
- package/dist/metrics-dashboard.js +298 -0
- package/dist/obsidian-exporter.d.ts +57 -0
- package/dist/obsidian-exporter.d.ts.map +1 -0
- package/dist/obsidian-exporter.js +274 -0
- package/dist/obsidian-watcher.d.ts +147 -0
- package/dist/obsidian-watcher.d.ts.map +1 -0
- package/dist/obsidian-watcher.js +403 -0
- package/dist/open-domain.d.ts +46 -0
- package/dist/open-domain.d.ts.map +1 -0
- package/dist/open-domain.js +125 -0
- package/dist/preference-store.d.ts +54 -0
- package/dist/preference-store.d.ts.map +1 -0
- package/dist/preference-store.js +109 -0
- package/dist/preservation-gate.d.ts +82 -0
- package/dist/preservation-gate.d.ts.map +1 -0
- package/dist/preservation-gate.js +150 -0
- package/dist/proactive-pass.d.ts +63 -0
- package/dist/proactive-pass.d.ts.map +1 -0
- package/dist/proactive-pass.js +293 -0
- package/dist/profiles.d.ts +46 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +262 -0
- package/dist/provider-translator.d.ts +50 -0
- package/dist/provider-translator.d.ts.map +1 -0
- package/dist/provider-translator.js +403 -0
- package/dist/rate-limiter.d.ts +76 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/rate-limiter.js +179 -0
- package/dist/repair-tool-pairs.d.ts +38 -0
- package/dist/repair-tool-pairs.d.ts.map +1 -0
- package/dist/repair-tool-pairs.js +209 -0
- package/dist/replay-recovery.d.ts +29 -0
- package/dist/replay-recovery.d.ts.map +1 -0
- package/dist/replay-recovery.js +82 -0
- package/dist/reranker.d.ts +95 -0
- package/dist/reranker.d.ts.map +1 -0
- package/dist/reranker.js +308 -0
- package/dist/retrieval-policy.d.ts +51 -0
- package/dist/retrieval-policy.d.ts.map +1 -0
- package/dist/retrieval-policy.js +77 -0
- package/dist/schema.d.ts +15 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +327 -0
- package/dist/secret-scanner.d.ts +51 -0
- package/dist/secret-scanner.d.ts.map +1 -0
- package/dist/secret-scanner.js +248 -0
- package/dist/seed.d.ts +108 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +179 -0
- package/dist/session-flusher.d.ts +53 -0
- package/dist/session-flusher.d.ts.map +1 -0
- package/dist/session-flusher.js +69 -0
- package/dist/session-topic-map.d.ts +41 -0
- package/dist/session-topic-map.d.ts.map +1 -0
- package/dist/session-topic-map.js +77 -0
- package/dist/spawn-context.d.ts +54 -0
- package/dist/spawn-context.d.ts.map +1 -0
- package/dist/spawn-context.js +159 -0
- package/dist/system-store.d.ts +73 -0
- package/dist/system-store.d.ts.map +1 -0
- package/dist/system-store.js +182 -0
- package/dist/temporal-store.d.ts +81 -0
- package/dist/temporal-store.d.ts.map +1 -0
- package/dist/temporal-store.js +149 -0
- package/dist/tool-artifact-store.d.ts +98 -0
- package/dist/tool-artifact-store.d.ts.map +1 -0
- package/dist/tool-artifact-store.js +244 -0
- package/dist/topic-detector.d.ts +35 -0
- package/dist/topic-detector.d.ts.map +1 -0
- package/dist/topic-detector.js +249 -0
- package/dist/topic-store.d.ts +51 -0
- package/dist/topic-store.d.ts.map +1 -0
- package/dist/topic-store.js +175 -0
- package/dist/topic-synthesizer.d.ts +71 -0
- package/dist/topic-synthesizer.d.ts.map +1 -0
- package/dist/topic-synthesizer.js +426 -0
- package/dist/trigger-registry.d.ts +63 -0
- package/dist/trigger-registry.d.ts.map +1 -0
- package/dist/trigger-registry.js +171 -0
- package/dist/types.d.ts +1085 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/vector-store.d.ts +180 -0
- package/dist/vector-store.d.ts.map +1 -0
- package/dist/vector-store.js +1041 -0
- package/dist/version.d.ts +34 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +44 -0
- package/dist/wiki-page-emitter.d.ts +65 -0
- package/dist/wiki-page-emitter.d.ts.map +1 -0
- package/dist/wiki-page-emitter.js +258 -0
- package/dist/work-store.d.ts +112 -0
- package/dist/work-store.d.ts.map +1 -0
- package/dist/work-store.js +273 -0
- package/docs/MEMORY_MD_AUTHORING.md +3 -3
- package/docs/ROADMAP.md +2 -2
- package/install.sh +34 -0
- package/memory-plugin/dist/index.d.ts +24 -0
- package/memory-plugin/dist/index.js +378 -0
- package/memory-plugin/package.json +4 -2
- package/node_modules/sqlite-vec/README.md +1 -0
- package/node_modules/sqlite-vec/index.cjs +46 -0
- package/node_modules/sqlite-vec/index.d.ts +17 -0
- package/node_modules/sqlite-vec/index.mjs +47 -0
- package/node_modules/sqlite-vec/package.json +1 -0
- package/node_modules/sqlite-vec-linux-x64/README.md +1 -0
- package/node_modules/sqlite-vec-linux-x64/package.json +1 -0
- package/node_modules/sqlite-vec-linux-x64/vec0.so +0 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +6 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +6 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +632 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2990 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +138 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4538 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/node_modules/zod/src/v4/core/util.ts +966 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +6 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +6 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/node_modules/zod/v4/core/api.cjs +1222 -0
- package/node_modules/zod/v4/core/api.d.cts +304 -0
- package/node_modules/zod/v4/core/api.d.ts +304 -0
- package/node_modules/zod/v4/core/api.js +1082 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +83 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +76 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +213 -0
- package/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/node_modules/zod/v4/core/errors.js +182 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +6 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/node_modules/zod/v4/core/regexes.js +133 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2124 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/node_modules/zod/v4/core/schemas.js +2093 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/node_modules/zod/v4/core/util.cjs +710 -0
- package/node_modules/zod/v4/core/util.d.cts +199 -0
- package/node_modules/zod/v4/core/util.d.ts +199 -0
- package/node_modules/zod/v4/core/util.js +651 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/en.cjs +136 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +109 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +108 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +104 -0
- package/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/node_modules/zod/v4/locales/index.js +49 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +6 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +109 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +6 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/node_modules/zod/v4/mini/schemas.js +925 -0
- package/node_modules/zod/v4/package.json +6 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +6 -0
- package/package.json +5 -2
- package/plugin/dist/index.d.ts +208 -0
- package/plugin/dist/index.d.ts.map +1 -0
- package/plugin/dist/index.js +3474 -0
- package/plugin/dist/index.js.map +1 -0
- package/plugin/package.json +4 -2
package/dist/fos-mod.js
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hypermem FOS/MOD — Fleet Output Standard & Model Output Directives
|
|
3
|
+
*
|
|
4
|
+
* Provides per-model output calibration injected into the context window.
|
|
5
|
+
* Thread-safe: no module-scoped state. All functions take explicit db parameter.
|
|
6
|
+
*
|
|
7
|
+
* FOS (Fleet Output Standard): shared rules applied to all agents.
|
|
8
|
+
* MOD (Model Output Directive): per-model corrections and calibrations.
|
|
9
|
+
*/
|
|
10
|
+
// ── Token budget constants ────────────────────────────────────
|
|
11
|
+
const FOS_TOKEN_BUDGET = 250;
|
|
12
|
+
const MOD_TOKEN_BUDGET = 150;
|
|
13
|
+
// ── Internal helpers ──────────────────────────────────────────
|
|
14
|
+
function tryParseJson(val, fallback) {
|
|
15
|
+
if (!val)
|
|
16
|
+
return fallback;
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(val);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return fallback;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Rough token estimate: 4 chars per token on average.
|
|
26
|
+
*/
|
|
27
|
+
function estimateTokens(text) {
|
|
28
|
+
return Math.ceil(text.length / 4);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Truncate an array of strings to fit within a token budget.
|
|
32
|
+
* Never cuts mid-item: drops complete items from the end.
|
|
33
|
+
*/
|
|
34
|
+
function truncateLines(lines, budget) {
|
|
35
|
+
const result = [];
|
|
36
|
+
let total = 0;
|
|
37
|
+
for (const line of lines) {
|
|
38
|
+
const cost = estimateTokens(line) + 1; // +1 for newline
|
|
39
|
+
if (total + cost > budget)
|
|
40
|
+
break;
|
|
41
|
+
result.push(line);
|
|
42
|
+
total += cost;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
function parseRow(row) {
|
|
47
|
+
return {
|
|
48
|
+
id: row.id,
|
|
49
|
+
name: row.name,
|
|
50
|
+
directives: tryParseJson(row.directives, {}),
|
|
51
|
+
task_variants: tryParseJson(row.task_variants, {}),
|
|
52
|
+
token_budget: row.token_budget ?? FOS_TOKEN_BUDGET,
|
|
53
|
+
active: row.active,
|
|
54
|
+
source: row.source,
|
|
55
|
+
version: row.version,
|
|
56
|
+
last_validated_at: row.last_validated_at || null,
|
|
57
|
+
created_at: row.created_at,
|
|
58
|
+
updated_at: row.updated_at,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function parseMODRow(row) {
|
|
62
|
+
return {
|
|
63
|
+
id: row.id,
|
|
64
|
+
match_pattern: row.match_pattern,
|
|
65
|
+
priority: row.priority ?? 0,
|
|
66
|
+
corrections: tryParseJson(row.corrections, []),
|
|
67
|
+
calibration: tryParseJson(row.calibration, []),
|
|
68
|
+
task_overrides: tryParseJson(row.task_overrides, {}),
|
|
69
|
+
token_budget: row.token_budget ?? MOD_TOKEN_BUDGET,
|
|
70
|
+
version: row.version ?? 1,
|
|
71
|
+
source: row.source || 'builtin',
|
|
72
|
+
enabled: row.enabled ?? 1,
|
|
73
|
+
last_validated_at: row.last_validated_at || null,
|
|
74
|
+
created_at: row.created_at,
|
|
75
|
+
updated_at: row.updated_at,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// ── Core API ──────────────────────────────────────────────────
|
|
79
|
+
/**
|
|
80
|
+
* Get the active FOS profile.
|
|
81
|
+
* Returns null if no active profile exists or tables don't exist yet.
|
|
82
|
+
*/
|
|
83
|
+
export function getActiveFOS(db) {
|
|
84
|
+
try {
|
|
85
|
+
const row = db.prepare("SELECT * FROM fleet_output_standard WHERE active = 1 ORDER BY version DESC LIMIT 1").get();
|
|
86
|
+
return row ? parseRow(row) : null;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Table doesn't exist yet (pre-migration)
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Match a MOD for the given model ID.
|
|
95
|
+
*
|
|
96
|
+
* Match hierarchy (in order):
|
|
97
|
+
* 1. Exact match on id (case-sensitive)
|
|
98
|
+
* 2. Glob pattern match — longest pattern wins ties
|
|
99
|
+
* 3. Wildcard '*' fallback
|
|
100
|
+
* 4. null
|
|
101
|
+
*
|
|
102
|
+
* Only enabled=1 MODs are considered. Higher priority wins on equal pattern length.
|
|
103
|
+
*/
|
|
104
|
+
export function matchMOD(modelId, db) {
|
|
105
|
+
if (!modelId)
|
|
106
|
+
return null;
|
|
107
|
+
try {
|
|
108
|
+
const rows = db.prepare("SELECT * FROM model_output_directives WHERE enabled = 1 ORDER BY priority DESC, id ASC").all();
|
|
109
|
+
if (rows.length === 0)
|
|
110
|
+
return null;
|
|
111
|
+
const mods = rows.map(parseMODRow);
|
|
112
|
+
const model = modelId.toLowerCase();
|
|
113
|
+
// 1. Exact match on id
|
|
114
|
+
for (const mod of mods) {
|
|
115
|
+
if (mod.id.toLowerCase() === model)
|
|
116
|
+
return mod;
|
|
117
|
+
}
|
|
118
|
+
// 2. Glob match — collect all matching patterns, pick longest
|
|
119
|
+
// Supports: prefix* (e.g., 'gpt-5.4*'), *suffix, *wildcard*
|
|
120
|
+
const globMatches = [];
|
|
121
|
+
for (const mod of mods) {
|
|
122
|
+
const pattern = mod.match_pattern;
|
|
123
|
+
if (pattern === '*')
|
|
124
|
+
continue; // wildcard handled separately
|
|
125
|
+
if (globMatch(pattern, modelId)) {
|
|
126
|
+
globMatches.push({ mod, patternLen: pattern.length });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (globMatches.length > 0) {
|
|
130
|
+
// Sort by pattern length descending (longer = more specific), then priority descending
|
|
131
|
+
globMatches.sort((a, b) => {
|
|
132
|
+
if (b.patternLen !== a.patternLen)
|
|
133
|
+
return b.patternLen - a.patternLen;
|
|
134
|
+
return b.mod.priority - a.mod.priority;
|
|
135
|
+
});
|
|
136
|
+
return globMatches[0].mod;
|
|
137
|
+
}
|
|
138
|
+
// 3. Wildcard '*' fallback
|
|
139
|
+
for (const mod of mods) {
|
|
140
|
+
if (mod.match_pattern === '*')
|
|
141
|
+
return mod;
|
|
142
|
+
}
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Table doesn't exist yet
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Simple glob matching: supports * as wildcard substring.
|
|
152
|
+
* Pattern like 'gpt-5.4*' matches 'gpt-5.4', 'gpt-5.4-turbo', etc.
|
|
153
|
+
* Case-insensitive.
|
|
154
|
+
*/
|
|
155
|
+
function globMatch(pattern, value) {
|
|
156
|
+
const p = pattern.toLowerCase();
|
|
157
|
+
const v = value.toLowerCase();
|
|
158
|
+
if (!p.includes('*'))
|
|
159
|
+
return p === v;
|
|
160
|
+
const parts = p.split('*');
|
|
161
|
+
let pos = 0;
|
|
162
|
+
for (let i = 0; i < parts.length; i++) {
|
|
163
|
+
const part = parts[i];
|
|
164
|
+
if (i === 0) {
|
|
165
|
+
// First segment must match at start
|
|
166
|
+
if (!v.startsWith(part))
|
|
167
|
+
return false;
|
|
168
|
+
pos = part.length;
|
|
169
|
+
}
|
|
170
|
+
else if (i === parts.length - 1) {
|
|
171
|
+
// Last segment must match at end
|
|
172
|
+
if (!v.endsWith(part))
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
const idx = v.indexOf(part, pos);
|
|
177
|
+
if (idx === -1)
|
|
178
|
+
return false;
|
|
179
|
+
pos = idx + part.length;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Render the light-tier output profile.
|
|
186
|
+
* Standalone: no compositor concepts, no fleet terminology, no DB required.
|
|
187
|
+
* ~100 tokens. Covers anti-sycophancy, em dash ban, AI vocab ban, length targets,
|
|
188
|
+
* anti-pagination, and evidence calibration.
|
|
189
|
+
*/
|
|
190
|
+
export function renderLightFOS() {
|
|
191
|
+
return [
|
|
192
|
+
'## Output Standard',
|
|
193
|
+
'- Lead with the answer. Conclusion first, reasoning after.',
|
|
194
|
+
'- No sycophantic openings: never start with "Great question", "Certainly", "Absolutely", "Of course".',
|
|
195
|
+
'- No em dashes. Use commas, colons, semicolons, or periods.',
|
|
196
|
+
'- Avoid AI vocabulary: delve, tapestry, pivotal, fostering, leverage, robust, noteworthy, realm, harness, showcase.',
|
|
197
|
+
'- Simple answers: 1-3 sentences. Analysis: 200-500 words. Code: code first, explain only non-obvious parts.',
|
|
198
|
+
'- Every sentence states a fact, makes a decision, or advances an argument. Cut filler.',
|
|
199
|
+
'- Do not paginate short answers. No headers, sections, or bullet lists unless the content requires structure.',
|
|
200
|
+
'- Numbers over adjectives. Match confidence to evidence.',
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
/** @deprecated Use renderLightFOS */
|
|
204
|
+
export function renderStarterFOS() {
|
|
205
|
+
return renderLightFOS();
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Resolve the effective output standard tier given compositor config.
|
|
209
|
+
* MOD is only eligible at the 'fleet' tier.
|
|
210
|
+
*/
|
|
211
|
+
export function resolveOutputTier(outputProfile, enableFOS, enableMOD) {
|
|
212
|
+
// Legacy path: if outputProfile is not set, honor enableFOS/enableMOD directly
|
|
213
|
+
if (outputProfile === undefined) {
|
|
214
|
+
return {
|
|
215
|
+
tier: 'full',
|
|
216
|
+
fos: enableFOS !== false,
|
|
217
|
+
mod: enableMOD !== false,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
// Backward compat: map old names to new
|
|
221
|
+
const tier = outputProfile === 'starter' ? 'light'
|
|
222
|
+
: outputProfile === 'fleet' ? 'full'
|
|
223
|
+
: outputProfile;
|
|
224
|
+
switch (tier) {
|
|
225
|
+
case 'light':
|
|
226
|
+
return { tier: 'light', fos: false, mod: false };
|
|
227
|
+
case 'standard':
|
|
228
|
+
return { tier: 'standard', fos: true, mod: false };
|
|
229
|
+
case 'full':
|
|
230
|
+
return { tier: 'full', fos: true, mod: enableMOD !== false };
|
|
231
|
+
default:
|
|
232
|
+
return { tier: 'full', fos: true, mod: enableMOD !== false };
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
export function renderFOS(fos, taskContext) {
|
|
236
|
+
const budget = fos.token_budget || FOS_TOKEN_BUDGET;
|
|
237
|
+
const d = fos.directives;
|
|
238
|
+
const lines = ['## Output Standard (Fleet)'];
|
|
239
|
+
// Structural rules
|
|
240
|
+
if (d.structural?.length) {
|
|
241
|
+
for (const rule of d.structural) {
|
|
242
|
+
lines.push(`- ${rule}`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
// Anti-patterns — condense into one line for density
|
|
246
|
+
if (d.anti_patterns?.length) {
|
|
247
|
+
lines.push(`Never: ${d.anti_patterns.join('; ')}`);
|
|
248
|
+
}
|
|
249
|
+
// Density targets — check for task variant override first
|
|
250
|
+
const variant = taskContext ? fos.task_variants[taskContext] : undefined;
|
|
251
|
+
if (variant) {
|
|
252
|
+
if (variant.density_target) {
|
|
253
|
+
lines.push(`Density: ${variant.density_target}`);
|
|
254
|
+
}
|
|
255
|
+
if (variant.structure) {
|
|
256
|
+
lines.push(`Structure: ${variant.structure}`);
|
|
257
|
+
}
|
|
258
|
+
if (variant.list_cap) {
|
|
259
|
+
lines.push(`List cap: ${variant.list_cap}`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else if (d.density_targets) {
|
|
263
|
+
const parts = Object.entries(d.density_targets)
|
|
264
|
+
.map(([k, v]) => `${k[0].toUpperCase() + k.slice(1)}: ${v}`)
|
|
265
|
+
.join('. ');
|
|
266
|
+
if (parts)
|
|
267
|
+
lines.push(parts + '.');
|
|
268
|
+
}
|
|
269
|
+
// Voice rules
|
|
270
|
+
if (d.voice?.length) {
|
|
271
|
+
for (const rule of d.voice) {
|
|
272
|
+
lines.push(`- ${rule}`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return truncateLines(lines, budget);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Render a MOD record into prompt lines.
|
|
279
|
+
*
|
|
280
|
+
* Output format:
|
|
281
|
+
* ## Output Calibration (gpt-5.4)
|
|
282
|
+
* Known tendencies: 2x verbosity, 1.8x list length vs target.
|
|
283
|
+
* - Actively compress. Cut first drafts in half.
|
|
284
|
+
* - Do not open with I. No preamble before the answer.
|
|
285
|
+
*
|
|
286
|
+
* Respects token_budget (default 150 tokens). Never cuts mid-sentence.
|
|
287
|
+
*/
|
|
288
|
+
export function renderMOD(mod, fos, modelId, taskContext) {
|
|
289
|
+
const budget = mod.token_budget || MOD_TOKEN_BUDGET;
|
|
290
|
+
const lines = [`## Output Calibration (${modelId})`];
|
|
291
|
+
// Calibration summary first (tendencies are the "known state")
|
|
292
|
+
if (mod.calibration.length > 0) {
|
|
293
|
+
const tendencies = mod.calibration.map(c => c.model_tendency).join(', ');
|
|
294
|
+
lines.push(`Known tendencies: ${tendencies}`);
|
|
295
|
+
}
|
|
296
|
+
// Calibration adjustments
|
|
297
|
+
for (const cal of mod.calibration) {
|
|
298
|
+
if (cal.adjustment) {
|
|
299
|
+
lines.push(`- ${cal.adjustment}`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// Corrections — hard severity first, then medium
|
|
303
|
+
const sorted = [...mod.corrections].sort((a, b) => {
|
|
304
|
+
const order = { hard: 0, medium: 1, soft: 2 };
|
|
305
|
+
return (order[a.severity] ?? 2) - (order[b.severity] ?? 2);
|
|
306
|
+
});
|
|
307
|
+
for (const correction of sorted) {
|
|
308
|
+
lines.push(`- ${correction.rule}`);
|
|
309
|
+
}
|
|
310
|
+
// Task-specific overrides (if taskContext provided and overrides exist)
|
|
311
|
+
if (taskContext && mod.task_overrides[taskContext]) {
|
|
312
|
+
const override = mod.task_overrides[taskContext];
|
|
313
|
+
for (const [, v] of Object.entries(override)) {
|
|
314
|
+
lines.push(`- [${taskContext}] ${v}`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
void fos; // fos reserved for future cross-calibration
|
|
318
|
+
return truncateLines(lines, budget);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Build a rolling summary of the last N verified tool actions from the message window.
|
|
322
|
+
*
|
|
323
|
+
* Scans for tool_use/tool_result pairs (matched by tool_use_id / callId).
|
|
324
|
+
* Renders as:
|
|
325
|
+
* ## Recent Actions
|
|
326
|
+
* - tool_name: result_summary
|
|
327
|
+
* ...
|
|
328
|
+
*
|
|
329
|
+
* Pressure-aware:
|
|
330
|
+
* <80% → 5 actions
|
|
331
|
+
* 80-90% → 3 actions
|
|
332
|
+
* 90-95% → 1 action
|
|
333
|
+
* ≥95% → empty string (drop entirely)
|
|
334
|
+
*
|
|
335
|
+
* Token budget: 150 tokens total.
|
|
336
|
+
* Gate: returns '' when pressurePct >= 95.
|
|
337
|
+
*/
|
|
338
|
+
export function buildActionVerificationSummary(messages, pressurePct) {
|
|
339
|
+
if (pressurePct >= 95)
|
|
340
|
+
return '';
|
|
341
|
+
const maxActions = pressurePct < 80 ? 5 :
|
|
342
|
+
pressurePct < 90 ? 3 : 1;
|
|
343
|
+
// Build an index of tool_use → result by scanning all messages
|
|
344
|
+
// tool_use: messages with toolCalls
|
|
345
|
+
// tool_result: messages with toolResults
|
|
346
|
+
// Match by tool_use_id (NeutralToolCall.id === NeutralToolResult.callId)
|
|
347
|
+
// Collect all tool_use entries in order (newest first)
|
|
348
|
+
const toolPairs = [];
|
|
349
|
+
// Walk newest to oldest to get the most recent actions first
|
|
350
|
+
for (let i = messages.length - 1; i >= 0 && toolPairs.length < maxActions; i--) {
|
|
351
|
+
const msg = messages[i];
|
|
352
|
+
if (!msg.toolCalls || msg.toolCalls.length === 0)
|
|
353
|
+
continue;
|
|
354
|
+
for (const tc of msg.toolCalls) {
|
|
355
|
+
if (toolPairs.length >= maxActions)
|
|
356
|
+
break;
|
|
357
|
+
// Find the matching tool_result by callId
|
|
358
|
+
let resultContent;
|
|
359
|
+
// Search forward from this message for the result
|
|
360
|
+
for (let j = i; j < messages.length; j++) {
|
|
361
|
+
const resultMsg = messages[j];
|
|
362
|
+
if (!resultMsg.toolResults)
|
|
363
|
+
continue;
|
|
364
|
+
const match = resultMsg.toolResults.find(r => r.callId === tc.id);
|
|
365
|
+
if (match) {
|
|
366
|
+
resultContent = match.content ?? '';
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// Only include verified pairs (tool_use + matching tool_result)
|
|
371
|
+
if (resultContent === undefined)
|
|
372
|
+
continue;
|
|
373
|
+
// Truncate result to 100 chars
|
|
374
|
+
const raw = resultContent.replace(/\s+/g, ' ').trim();
|
|
375
|
+
const summary = raw.length > 100 ? raw.slice(0, 100) + '\u2026' : raw;
|
|
376
|
+
toolPairs.push({ name: tc.name, resultSummary: summary });
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (toolPairs.length === 0)
|
|
380
|
+
return '';
|
|
381
|
+
const TOKEN_BUDGET = 150;
|
|
382
|
+
const lines = ['## Recent Actions'];
|
|
383
|
+
for (const pair of toolPairs) {
|
|
384
|
+
const line = `- ${pair.name}: ${pair.resultSummary}`;
|
|
385
|
+
const currentCost = estimateTokens(lines.join('\n') + '\n' + line);
|
|
386
|
+
if (currentCost > TOKEN_BUDGET)
|
|
387
|
+
break;
|
|
388
|
+
lines.push(line);
|
|
389
|
+
}
|
|
390
|
+
// If only the header was added (no pairs fit), return empty
|
|
391
|
+
if (lines.length <= 1)
|
|
392
|
+
return '';
|
|
393
|
+
return lines.join('\n');
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Record output metrics for analytics.
|
|
397
|
+
* Best-effort: logs errors but never throws.
|
|
398
|
+
*/
|
|
399
|
+
export function recordOutputMetrics(db, metrics) {
|
|
400
|
+
try {
|
|
401
|
+
const now = new Date().toISOString();
|
|
402
|
+
db.prepare(`
|
|
403
|
+
INSERT OR REPLACE INTO output_metrics (
|
|
404
|
+
id, timestamp, agent_id, session_key, model_id, provider,
|
|
405
|
+
fos_version, mod_version, mod_id, task_type,
|
|
406
|
+
output_tokens, input_tokens, cache_read_tokens,
|
|
407
|
+
corrections_fired, latency_ms, created_at
|
|
408
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
409
|
+
`).run(metrics.id, metrics.timestamp, metrics.agent_id, metrics.session_key, metrics.model_id, metrics.provider, metrics.fos_version ?? null, metrics.mod_version ?? null, metrics.mod_id ?? null, metrics.task_type ?? null, metrics.output_tokens, metrics.input_tokens ?? null, metrics.cache_read_tokens ?? null, JSON.stringify(metrics.corrections_fired ?? []), metrics.latency_ms ?? null, now);
|
|
410
|
+
}
|
|
411
|
+
catch (err) {
|
|
412
|
+
// Non-fatal — metrics are optional
|
|
413
|
+
console.warn('[fos-mod] recordOutputMetrics failed:', err.message);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
//# sourceMappingURL=fos-mod.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hypermem Hybrid Retrieval — FTS5 + KNN Score Fusion
|
|
3
|
+
*
|
|
4
|
+
* Merges keyword (FTS5/BM25) and semantic (KNN/vector) results into a
|
|
5
|
+
* single ranked list using Reciprocal Rank Fusion (RRF). This avoids
|
|
6
|
+
* vocabulary mismatch (KNN-only misses exact terms) and semantic gap
|
|
7
|
+
* (FTS5-only misses paraphrases).
|
|
8
|
+
*
|
|
9
|
+
* Architecture:
|
|
10
|
+
* - FTS5 results from library.db (facts_fts, knowledge_fts, episodes_fts)
|
|
11
|
+
* - KNN results from vectors.db via VectorStore
|
|
12
|
+
* - RRF merges both ranked lists with configurable k constant
|
|
13
|
+
* - Deduplication by (sourceTable, sourceId)
|
|
14
|
+
* - Token-budgeted output for compositor consumption
|
|
15
|
+
*/
|
|
16
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
17
|
+
import type { VectorStore } from './vector-store.js';
|
|
18
|
+
import type { RerankerProvider } from './reranker.js';
|
|
19
|
+
export type RerankerStatus = 'applied' | 'bypass_no_provider' | 'bypass_below_threshold' | 'failed' | 'timeout';
|
|
20
|
+
export interface RerankerTelemetry {
|
|
21
|
+
/** Provider name (e.g. 'zeroentropy', 'openrouter', 'ollama') or null when no provider. */
|
|
22
|
+
provider: string | null;
|
|
23
|
+
/** Number of fused candidates seen by the reranker hook. */
|
|
24
|
+
candidates: number;
|
|
25
|
+
/** Outcome for this invocation. */
|
|
26
|
+
status: RerankerStatus;
|
|
27
|
+
}
|
|
28
|
+
export interface HybridSearchResult {
|
|
29
|
+
sourceTable: string;
|
|
30
|
+
sourceId: number;
|
|
31
|
+
content: string;
|
|
32
|
+
domain?: string;
|
|
33
|
+
agentId?: string;
|
|
34
|
+
metadata?: string;
|
|
35
|
+
/** ISO timestamp from source row — used for recency decay (TUNE-015) */
|
|
36
|
+
createdAt?: string;
|
|
37
|
+
/** Combined RRF score (higher = more relevant) */
|
|
38
|
+
score: number;
|
|
39
|
+
/** Which retrieval paths contributed */
|
|
40
|
+
sources: ('fts' | 'knn')[];
|
|
41
|
+
}
|
|
42
|
+
export interface HybridSearchOptions {
|
|
43
|
+
/** Content types to search. Default: ['facts', 'knowledge', 'episodes'] */
|
|
44
|
+
tables?: string[];
|
|
45
|
+
/** Max results to return. Default: 10 */
|
|
46
|
+
limit?: number;
|
|
47
|
+
/** Max KNN distance (filters low-quality vectors). Default: 1.2 */
|
|
48
|
+
maxKnnDistance?: number;
|
|
49
|
+
/** RRF k constant. Higher = less weight to top ranks. Default: 60 */
|
|
50
|
+
rrfK?: number;
|
|
51
|
+
/** Agent ID filter for FTS queries */
|
|
52
|
+
agentId?: string;
|
|
53
|
+
/** Weight for FTS results in fusion. Default: 1.0 */
|
|
54
|
+
ftsWeight?: number;
|
|
55
|
+
/** Weight for KNN results in fusion. Default: 1.0 */
|
|
56
|
+
knnWeight?: number;
|
|
57
|
+
/** Minimum number of FTS terms to attempt a query (skip if fewer). Default: 1 */
|
|
58
|
+
minFtsTerms?: number;
|
|
59
|
+
/** Pre-computed embedding for the query — skips Ollama call in VectorStore.search() */
|
|
60
|
+
precomputedEmbedding?: Float32Array;
|
|
61
|
+
/**
|
|
62
|
+
* Optional reranker applied after RRF fusion. Only runs on the fused path
|
|
63
|
+
* (both FTS and KNN produced results). FTS-only and KNN-only branches are
|
|
64
|
+
* unchanged. Null/undefined disables reranking.
|
|
65
|
+
*/
|
|
66
|
+
reranker?: RerankerProvider | null;
|
|
67
|
+
/**
|
|
68
|
+
* Minimum fused-candidate count required to invoke the reranker.
|
|
69
|
+
* Below this, the reranker is bypassed and original RRF order is returned.
|
|
70
|
+
* Default: 2.
|
|
71
|
+
*/
|
|
72
|
+
rerankerMinCandidates?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Max documents sent to the reranker. Clamps provider cost when the fused
|
|
75
|
+
* candidate list is large. Defaults to fused.length (all candidates).
|
|
76
|
+
*/
|
|
77
|
+
rerankerMaxDocuments?: number;
|
|
78
|
+
/** Top-K passed to the reranker. Defaults to the sliced candidate count. */
|
|
79
|
+
rerankerTopK?: number;
|
|
80
|
+
/**
|
|
81
|
+
* External guard timeout for the reranker call in ms. Provider timeouts are
|
|
82
|
+
* enforced inside each RerankerProvider; this is a belt-and-suspenders
|
|
83
|
+
* ceiling that also distinguishes 'timeout' from 'failed' in telemetry.
|
|
84
|
+
* Default: 3000.
|
|
85
|
+
*/
|
|
86
|
+
rerankerTimeoutMs?: number;
|
|
87
|
+
/** Optional telemetry sink. When omitted, falls back to emitRerankerLog. */
|
|
88
|
+
onRerankerTelemetry?: (ev: RerankerTelemetry) => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Build an FTS5 query from a natural language string.
|
|
92
|
+
* Extracts meaningful words, removes stop words, uses OR conjunction.
|
|
93
|
+
*/
|
|
94
|
+
export declare function buildFtsQuery(input: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* Hybrid search combining FTS5 keyword search and KNN vector search.
|
|
97
|
+
*
|
|
98
|
+
* When vectorStore is null, falls back to FTS5-only.
|
|
99
|
+
* When FTS5 query is empty (all stop words), falls back to KNN-only.
|
|
100
|
+
*/
|
|
101
|
+
export declare function hybridSearch(libraryDb: DatabaseSync, vectorStore: VectorStore | null, query: string, opts?: HybridSearchOptions): Promise<HybridSearchResult[]>;
|
|
102
|
+
//# sourceMappingURL=hybrid-retrieval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hybrid-retrieval.d.ts","sourceRoot":"","sources":["../src/hybrid-retrieval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQtD,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,oBAAoB,GACpB,wBAAwB,GACxB,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,iBAAiB;IAChC,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,EAAE,cAAc,CAAC;CACxB;AAcD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,YAAY,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACvD;AAqBD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBnD;AA8ND;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,WAAW,GAAG,IAAI,EAC/B,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,mBAAmB,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgJ/B"}
|