@oscharko-dev/keiko 0.2.0-beta.7 → 0.2.0-beta.9
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/dist/ui/csp-hashes.json +14 -14
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +2 -2
- package/dist/ui/static/__next._full.txt +3 -3
- package/dist/ui/static/__next._head.txt +1 -1
- package/dist/ui/static/__next._index.txt +2 -2
- package/dist/ui/static/__next._tree.txt +2 -2
- package/dist/ui/static/_next/static/chunks/06-q1ntr51v8r.js +1 -0
- package/dist/ui/static/_next/static/chunks/0y9qlvrxsyign.js +109 -0
- package/dist/ui/static/_next/static/chunks/1h0v66-p9cx19.css +1 -0
- package/dist/ui/static/_next/static/chunks/3ewv4mguqzooj.js +1 -0
- package/dist/ui/static/_not-found/__next._full.txt +2 -2
- package/dist/ui/static/_not-found/__next._head.txt +1 -1
- package/dist/ui/static/_not-found/__next._index.txt +2 -2
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
- package/dist/ui/static/_not-found/__next._tree.txt +2 -2
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +2 -2
- package/dist/ui/static/fonts/OFL.txt +93 -0
- package/dist/ui/static/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +3 -3
- package/dist/ui/static/launch/__next._full.txt +3 -3
- package/dist/ui/static/launch/__next._head.txt +1 -1
- package/dist/ui/static/launch/__next._index.txt +2 -2
- package/dist/ui/static/launch/__next._tree.txt +2 -2
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
- package/dist/ui/static/launch/__next.launch.txt +1 -1
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +3 -3
- package/dist/ui/static/local-knowledge/__next._full.txt +3 -3
- package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._index.txt +2 -2
- package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +3 -3
- package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._index.txt +2 -2
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +2 -2
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +2 -2
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +3 -3
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +3 -3
- package/dist/ui/static/memoriaviva/__next._full.txt +2 -2
- package/dist/ui/static/memoriaviva/__next._head.txt +1 -1
- package/dist/ui/static/memoriaviva/__next._index.txt +2 -2
- package/dist/ui/static/memoriaviva/__next._tree.txt +2 -2
- package/dist/ui/static/memoriaviva/__next.memoriaviva.__PAGE__.txt +1 -1
- package/dist/ui/static/memoriaviva/__next.memoriaviva.txt +1 -1
- package/dist/ui/static/memoriaviva/consolidation/__next._full.txt +2 -2
- package/dist/ui/static/memoriaviva/consolidation/__next._head.txt +1 -1
- package/dist/ui/static/memoriaviva/consolidation/__next._index.txt +2 -2
- package/dist/ui/static/memoriaviva/consolidation/__next._tree.txt +2 -2
- package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.consolidation.__PAGE__.txt +1 -1
- package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.consolidation.txt +1 -1
- package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.txt +1 -1
- package/dist/ui/static/memoriaviva/consolidation.html +1 -1
- package/dist/ui/static/memoriaviva/consolidation.txt +2 -2
- package/dist/ui/static/memoriaviva/detail/__next._full.txt +2 -2
- package/dist/ui/static/memoriaviva/detail/__next._head.txt +1 -1
- package/dist/ui/static/memoriaviva/detail/__next._index.txt +2 -2
- package/dist/ui/static/memoriaviva/detail/__next._tree.txt +2 -2
- package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.detail.__PAGE__.txt +1 -1
- package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.detail.txt +1 -1
- package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.txt +1 -1
- package/dist/ui/static/memoriaviva/detail.html +1 -1
- package/dist/ui/static/memoriaviva/detail.txt +2 -2
- package/dist/ui/static/memoriaviva/review-queue/__next._full.txt +2 -2
- package/dist/ui/static/memoriaviva/review-queue/__next._head.txt +1 -1
- package/dist/ui/static/memoriaviva/review-queue/__next._index.txt +2 -2
- package/dist/ui/static/memoriaviva/review-queue/__next._tree.txt +2 -2
- package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.review-queue.__PAGE__.txt +1 -1
- package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.review-queue.txt +1 -1
- package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.txt +1 -1
- package/dist/ui/static/memoriaviva/review-queue.html +1 -1
- package/dist/ui/static/memoriaviva/review-queue.txt +2 -2
- package/dist/ui/static/memoriaviva.html +1 -1
- package/dist/ui/static/memoriaviva.txt +2 -2
- package/dist/ui/static/sw.js +7 -3
- package/node_modules/@oscharko-dev/keiko-cli/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/memory.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/memory.js +4 -5
- package/node_modules/@oscharko-dev/keiko-cli/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts +36 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/schema.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/schema.js +13 -3
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/store.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/figmaSnapshot/store.js +46 -2
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/index.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-evidence/dist/qualityIntelligence/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/pdf-parser.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/pdf-parser.js +0 -10
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/types.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/types.js +3 -3
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/maintenance.d.ts +2 -16
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/maintenance.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/maintenance.js +49 -48
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/retention.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/retention.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/retention.js +15 -0
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/decay.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/decay.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/decay.js +22 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.js +87 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts +4 -2
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.js +4 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/ranking.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/ranking.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/ranking.js +140 -21
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/recency.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/recency.js +4 -10
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/retrieve.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/retrieve.js +11 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/strength.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/strength.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/strength.js +51 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/types.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/types.js +7 -0
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/access.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/access.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/access.js +31 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.js +16 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/types.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.js +4 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/figma/screenIrTestBaseline.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/figma/screenIrTestBaseline.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/figma/screenIrTestBaseline.js +9 -5
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testDesignModel.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testDesignModel.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testDesignModel.js +116 -21
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testQualityRubric.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testQualityRubric.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/testQualityRubric.js +12 -0
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/domain/validation.js +8 -7
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/generation/parseGeneratedCandidates.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/generation/parseGeneratedCandidates.js +29 -7
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/generation/prompt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/generation/prompt.js +61 -24
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-sdk/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-sdk/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +44 -65
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +333 -70
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +410 -18
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +7 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +4 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +8 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.js +34 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts +12 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +127 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.js +40 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts +16 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.js +72 -50
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.js +84 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.js +11 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConnector.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConnector.js +9 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaScopedPagination.d.ts +6 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaScopedPagination.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaScopedPagination.js +10 -9
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotBuilder.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotBuilder.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotBuilder.js +62 -26
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotHash.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotHash.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotHash.js +6 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotTypes.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotTypes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts +33 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.js +263 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotScreenIds.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotScreenIds.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotScreenIds.js +75 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.js +13 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelSelection.d.ts +6 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelSelection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelSelection.js +12 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.js +34 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runIngestion.d.ts +4 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runIngestion.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runIngestion.js +222 -35
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +68 -16
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +7 -1
- package/node_modules/@oscharko-dev/keiko-server/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.js +45 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.js +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.js +140 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.js +21 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.js +86 -40
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/rank.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/rank.js +9 -0
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/.tsbuildinfo +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.js +23 -6
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.js +24 -3
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts +34 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.js +342 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts +6 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.js +57 -9
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +1 -1
- package/package.json +2 -1
- package/dist/ui/static/_next/static/chunks/0-qhhdvxg2j_y.js +0 -1
- package/dist/ui/static/_next/static/chunks/0ke4ratkgvcxo.css +0 -1
- package/dist/ui/static/_next/static/chunks/3vf3oh2-sl2nc.js +0 -1
- package/dist/ui/static/_next/static/chunks/3wmd4-2vznp2g.js +0 -106
- /package/dist/ui/static/_next/static/{frhs0YcUqCPLHal-wHjDP → a5sUbXeTgQ9A2LRTMu_Q_}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{frhs0YcUqCPLHal-wHjDP → a5sUbXeTgQ9A2LRTMu_Q_}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{frhs0YcUqCPLHal-wHjDP → a5sUbXeTgQ9A2LRTMu_Q_}/_ssgManifest.js +0 -0
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
// 2. Run consolidation on the accepted subset; persist auto-applicable relationship edges and
|
|
7
7
|
// return unresolved review items for MemoriaViva or CLI operators. Conflict and merge review
|
|
8
8
|
// items are NEVER auto-applied here.
|
|
9
|
-
// 3. Compute the maintenance plan and apply it: promote (-> accepted),
|
|
10
|
-
//
|
|
9
|
+
// 3. Compute the maintenance plan and apply it: promote (-> accepted), archive (-> archived),
|
|
10
|
+
// forget (vault delete + tombstone + reason). Confidence is immutable provenance and is never
|
|
11
|
+
// patched here (O-V2): reuse strengthens memories live in retrieval ranking, and disuse-decay
|
|
12
|
+
// is computed on the fly via the strength curve that gates archive/forget.
|
|
11
13
|
// 4. Emit one audit event per applied effect and return the counts.
|
|
12
14
|
//
|
|
13
15
|
// CSRF: the server dispatch layer enforces x-keiko-csrf for POST, so this route is guarded without
|
|
@@ -21,8 +23,6 @@ import { recordMemoryAudit } from "./memory-audit-handler.js";
|
|
|
21
23
|
function emptyCounts() {
|
|
22
24
|
return {
|
|
23
25
|
promoted: 0,
|
|
24
|
-
reinforced: 0,
|
|
25
|
-
decayed: 0,
|
|
26
26
|
archived: 0,
|
|
27
27
|
forgotten: 0,
|
|
28
28
|
superseded: 0,
|
|
@@ -44,24 +44,20 @@ function resolveVault(deps) {
|
|
|
44
44
|
}
|
|
45
45
|
return deps.memoryVault;
|
|
46
46
|
}
|
|
47
|
-
function emitAudit(evidenceStore, kind, surface, summary, extra) {
|
|
47
|
+
function emitAudit(evidenceStore, nowMs, kind, surface, summary, extra) {
|
|
48
48
|
if (evidenceStore === undefined)
|
|
49
49
|
return;
|
|
50
50
|
const event = {
|
|
51
51
|
schemaVersion: "1",
|
|
52
52
|
kind,
|
|
53
53
|
eventId: randomUUID(),
|
|
54
|
-
occurredAt:
|
|
54
|
+
occurredAt: nowMs,
|
|
55
55
|
initiatorSurface: surface,
|
|
56
56
|
summary,
|
|
57
57
|
...extra,
|
|
58
58
|
};
|
|
59
59
|
recordMemoryAudit({ evidenceStore }, event);
|
|
60
60
|
}
|
|
61
|
-
// Patch a record's confidence by rebuilding the provenance envelope (confidence lives there).
|
|
62
|
-
function patchConfidence(vault, record, confidence) {
|
|
63
|
-
vault.updateMemory(record.id, { provenance: { ...record.provenance, confidence } }, Date.now());
|
|
64
|
-
}
|
|
65
61
|
function recordsById(records) {
|
|
66
62
|
const map = new Map();
|
|
67
63
|
for (const record of records)
|
|
@@ -82,9 +78,9 @@ function applyEdges(vault, edges) {
|
|
|
82
78
|
}
|
|
83
79
|
return created;
|
|
84
80
|
}
|
|
85
|
-
function runConsolidationPass(vault, records, counts) {
|
|
81
|
+
function runConsolidationPass(vault, nowMs, records, counts) {
|
|
86
82
|
const result = runConsolidation(records, {
|
|
87
|
-
nowMs
|
|
83
|
+
nowMs,
|
|
88
84
|
newEdgeId: () => randomUUID(),
|
|
89
85
|
newReviewItemId: () => randomUUID(),
|
|
90
86
|
});
|
|
@@ -94,48 +90,41 @@ function runConsolidationPass(vault, records, counts) {
|
|
|
94
90
|
counts.reviewItems.push(...result.reviewItems);
|
|
95
91
|
}
|
|
96
92
|
// ─── Plan application ──────────────────────────────────────────────────────────
|
|
97
|
-
// Applies the
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
// Applies the archive / forget effects on the post-consolidation snapshot. Promotions are applied
|
|
94
|
+
// SEPARATELY and BEFORE consolidation (see runMemoryMaintenance) so that freshly-accepted memories
|
|
95
|
+
// are visible to conflict detection within the same maintenance pass.
|
|
96
|
+
//
|
|
97
|
+
// Confidence is NEVER mutated here (#204, O-V2): reinforcement-on-reuse is realised live in
|
|
98
|
+
// retrieval ranking, and disuse-decay is computed on the fly via the strength curve that already
|
|
99
|
+
// gates archive/forget — so provenance stays intact and every run is idempotent.
|
|
100
|
+
function applyFadeEffects(vault, evidenceStore, nowMs, plan, byId, counts) {
|
|
101
|
+
applyArchives(vault, evidenceStore, nowMs, plan.archive, byId, counts);
|
|
102
|
+
applyForgets(vault, evidenceStore, nowMs, plan.forget, byId, counts);
|
|
103
|
+
}
|
|
104
|
+
function applyPromotions(vault, evidenceStore, nowMs, ids, byId, counts) {
|
|
107
105
|
for (const id of ids) {
|
|
108
106
|
const record = byId.get(id);
|
|
109
107
|
if (record === undefined)
|
|
110
108
|
continue;
|
|
111
|
-
vault.updateMemory(id, { status: "accepted" },
|
|
109
|
+
vault.updateMemory(id, { status: "accepted" }, nowMs);
|
|
112
110
|
counts.promoted += 1;
|
|
113
|
-
emitAudit(evidenceStore, "memory:accepted", "memory-center", "Promoted a strong proposed memory.", { memoryId: id, scope: record.scope });
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function applyConfidencePatches(vault, patches, byId, bump) {
|
|
117
|
-
for (const patch of patches) {
|
|
118
|
-
const record = byId.get(patch.id);
|
|
119
|
-
if (record === undefined)
|
|
120
|
-
continue;
|
|
121
|
-
patchConfidence(vault, record, patch.confidence);
|
|
122
|
-
bump(1);
|
|
111
|
+
emitAudit(evidenceStore, nowMs, "memory:accepted", "memory-center", "Promoted a strong proposed memory.", { memoryId: id, scope: record.scope });
|
|
123
112
|
}
|
|
124
113
|
}
|
|
125
|
-
function applyArchives(vault, evidenceStore, ids, byId, counts) {
|
|
114
|
+
function applyArchives(vault, evidenceStore, nowMs, ids, byId, counts) {
|
|
126
115
|
for (const id of ids) {
|
|
127
116
|
const record = byId.get(id);
|
|
128
117
|
if (record === undefined)
|
|
129
118
|
continue;
|
|
130
|
-
vault.updateMemory(id, { status: "archived" },
|
|
119
|
+
vault.updateMemory(id, { status: "archived" }, nowMs);
|
|
131
120
|
counts.archived += 1;
|
|
132
|
-
emitAudit(evidenceStore, "memory:archived", "retention", "Archived a faded memory.", {
|
|
121
|
+
emitAudit(evidenceStore, nowMs, "memory:archived", "retention", "Archived a faded memory.", {
|
|
133
122
|
memoryId: id,
|
|
134
123
|
scope: record.scope,
|
|
135
124
|
});
|
|
136
125
|
}
|
|
137
126
|
}
|
|
138
|
-
function applyForgets(vault, evidenceStore, forgets, byId, counts) {
|
|
127
|
+
function applyForgets(vault, evidenceStore, nowMs, forgets, byId, counts) {
|
|
139
128
|
for (const forget of forgets) {
|
|
140
129
|
const record = byId.get(forget.id);
|
|
141
130
|
if (record === undefined)
|
|
@@ -144,20 +133,21 @@ function applyForgets(vault, evidenceStore, forgets, byId, counts) {
|
|
|
144
133
|
tombstone: true,
|
|
145
134
|
forgetterSurface: "memory-maintenance",
|
|
146
135
|
reason: forget.reason,
|
|
147
|
-
nowMs
|
|
136
|
+
nowMs,
|
|
148
137
|
});
|
|
149
138
|
counts.forgotten += 1;
|
|
150
|
-
emitAudit(evidenceStore, "memory:forgotten", "retention", `Forgot a memory (${forget.reason}).`, {
|
|
139
|
+
emitAudit(evidenceStore, nowMs, "memory:forgotten", "retention", `Forgot a memory (${forget.reason}).`, {
|
|
151
140
|
memoryId: forget.id,
|
|
152
141
|
scope: record.scope,
|
|
153
142
|
tombstoned: true,
|
|
154
143
|
});
|
|
155
144
|
}
|
|
156
145
|
}
|
|
157
|
-
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
|
|
146
|
+
export function runMemoryMaintenance(vault, evidenceStore, options) {
|
|
147
|
+
// ONE clock for the whole pass: both plan phases and every vault write / audit timestamp use the
|
|
148
|
+
// same nowMs, so selection is consistent within a run and fully replay-stable when nowMs is
|
|
149
|
+
// injected (the deterministic-verification invariant the rest of the stack honours).
|
|
150
|
+
const nowMs = options?.nowMs ?? Date.now();
|
|
161
151
|
const counts = emptyCounts();
|
|
162
152
|
// Phase 1 — promote strong `proposed` memories FIRST. Consolidation and conflict detection only
|
|
163
153
|
// inspect `accepted` records, so without this a vault full of freshly-captured `proposed`
|
|
@@ -165,22 +155,54 @@ export function runMemoryMaintenance(vault, evidenceStore) {
|
|
|
165
155
|
// resolved. Promoting up front makes a single "Run maintenance" fully effective.
|
|
166
156
|
const beforePromote = vault.listMemories({ includeExpired: true });
|
|
167
157
|
const promoteStats = vault.getAccessStats();
|
|
168
|
-
const promotePlan = planMemoryMaintenance(beforePromote, promoteStats, { nowMs
|
|
169
|
-
applyPromotions(vault, evidenceStore, promotePlan.promote, recordsById(beforePromote), counts);
|
|
158
|
+
const promotePlan = planMemoryMaintenance(beforePromote, promoteStats, { nowMs });
|
|
159
|
+
applyPromotions(vault, evidenceStore, nowMs, promotePlan.promote, recordsById(beforePromote), counts);
|
|
170
160
|
// Phase 2 — consolidate the now-accepted set: link safe near-duplicate metadata and surface
|
|
171
161
|
// conflicts / merges as explicit review items. Status mutations require a later governed review.
|
|
172
162
|
const accepted = vault
|
|
173
163
|
.listMemories({ includeExpired: true })
|
|
174
164
|
.filter((record) => record.status === "accepted");
|
|
175
|
-
runConsolidationPass(vault, accepted, counts);
|
|
176
|
-
// Phase 3 —
|
|
177
|
-
//
|
|
165
|
+
runConsolidationPass(vault, nowMs, accepted, counts);
|
|
166
|
+
// Phase 3 — archive / forget on the post-consolidation snapshot. The access stats feed the
|
|
167
|
+
// strength model; confidence itself is never mutated (O-V2).
|
|
178
168
|
const all = vault.listMemories({ includeExpired: true });
|
|
179
169
|
const accessStats = vault.getAccessStats();
|
|
180
|
-
const plan = planMemoryMaintenance(all, accessStats, { nowMs
|
|
181
|
-
|
|
170
|
+
const plan = planMemoryMaintenance(all, accessStats, { nowMs });
|
|
171
|
+
applyFadeEffects(vault, evidenceStore, nowMs, plan, recordsById(all), counts);
|
|
182
172
|
return counts;
|
|
183
173
|
}
|
|
174
|
+
// ─── Bounded autonomous maintenance (#204, O-V4) ───────────────────────────────
|
|
175
|
+
// The strength/decay/forget pass only "lives" if it actually runs. Rather than a free-running
|
|
176
|
+
// background loop (forbidden by the no-unbounded-hidden-activity invariant), maintenance is fired
|
|
177
|
+
// opportunistically — once memory is used — and rate-limited to at most once per interval. The pass
|
|
178
|
+
// itself is already bounded (maxForgetPerRun) and audited, so an autonomous fire is governed.
|
|
179
|
+
export const MEMORY_AUTO_MAINTENANCE_MIN_INTERVAL_MS = 6 * 60 * 60 * 1000; // 6 hours
|
|
180
|
+
// Pure: due iff never run, or the interval has elapsed. A non-finite/negative interval is treated as
|
|
181
|
+
// "never auto-run" so a misconfiguration can only DISABLE, never spin.
|
|
182
|
+
export function isMaintenanceDue(lastRunAtMs, nowMs, minIntervalMs = MEMORY_AUTO_MAINTENANCE_MIN_INTERVAL_MS) {
|
|
183
|
+
if (!Number.isFinite(minIntervalMs) || minIntervalMs <= 0)
|
|
184
|
+
return false;
|
|
185
|
+
if (lastRunAtMs === undefined)
|
|
186
|
+
return true;
|
|
187
|
+
return nowMs - lastRunAtMs >= minIntervalMs;
|
|
188
|
+
}
|
|
189
|
+
// Runs ONE bounded maintenance pass iff enabled AND due, advancing the cursor BEFORE running so a
|
|
190
|
+
// re-entrant call within the same tick cannot double-fire. Returns the result, or null when skipped.
|
|
191
|
+
// Never throws: a maintenance fault must not break the caller (e.g. a chat turn); it is swallowed
|
|
192
|
+
// after advancing the cursor so a persistently-failing pass cannot hot-loop.
|
|
193
|
+
export function maybeRunAutoMaintenance(vault, evidenceStore, state, options) {
|
|
194
|
+
if (!options.enabled)
|
|
195
|
+
return null;
|
|
196
|
+
if (!isMaintenanceDue(state.lastRunAtMs, options.nowMs, options.minIntervalMs))
|
|
197
|
+
return null;
|
|
198
|
+
state.lastRunAtMs = options.nowMs;
|
|
199
|
+
try {
|
|
200
|
+
return runMemoryMaintenance(vault, evidenceStore, { nowMs: options.nowMs });
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
184
206
|
export function handleRunMaintenance(ctx, deps) {
|
|
185
207
|
void ctx;
|
|
186
208
|
const vault = resolveVault(deps);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MemoryId, MemoryScope } from "@oscharko-dev/keiko-contracts/memory";
|
|
2
|
+
import { type RankingFusionMode } from "@oscharko-dev/keiko-memory-retrieval";
|
|
3
|
+
import type { MemoryVaultStore } from "@oscharko-dev/keiko-memory-vault";
|
|
4
|
+
import type { UiHandlerDeps } from "./deps.js";
|
|
5
|
+
export declare function conversationFusionMode(deps: UiHandlerDeps): RankingFusionMode;
|
|
6
|
+
export interface ConversationRetrievalSignals {
|
|
7
|
+
readonly semanticById?: ReadonlyMap<MemoryId, number> | undefined;
|
|
8
|
+
readonly strengthById: ReadonlyMap<MemoryId, number>;
|
|
9
|
+
readonly embeddingById: ReadonlyMap<MemoryId, Float32Array>;
|
|
10
|
+
}
|
|
11
|
+
export declare function buildConversationRetrievalSignals(deps: UiHandlerDeps, vault: MemoryVaultStore, queryText: string | undefined, scopes: readonly MemoryScope[], nowMs: number, safeForSecondaryModel: boolean): Promise<ConversationRetrievalSignals>;
|
|
12
|
+
//# sourceMappingURL=memory-retrieval-signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-retrieval-signals.d.ts","sourceRoot":"","sources":["../src/memory-retrieval-signals.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAgB,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAE7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAwD/C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,aAAa,GAAG,iBAAiB,CAE7E;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAClE,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAIrD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;CAC7D;AAED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,gBAAgB,EACvB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,KAAK,EAAE,MAAM,EACb,qBAAqB,EAAE,OAAO,GAC7B,OAAO,CAAC,4BAA4B,CAAC,CAkBvC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Shared conversation-retrieval signal builder (#204, O-F4).
|
|
2
|
+
//
|
|
3
|
+
// Both conversation retrieval surfaces — the desktop chat path (chat-handlers) and the BFF
|
|
4
|
+
// /api/memory/context route (memory-conv-handlers) — need the same two model/usage-derived ranking
|
|
5
|
+
// signals on top of the pure lexical ranker:
|
|
6
|
+
// - semanticById: per-memory cosine of the query embedding to each candidate's stored vector
|
|
7
|
+
// (embedding-based recall), gated by the secondary-model egress check.
|
|
8
|
+
// - strengthById: per-memory reinforcement strength from the vault's access counters (O-P1).
|
|
9
|
+
// Previously only the chat path built them; the BFF route silently ran lexical-only. Centralising
|
|
10
|
+
// them here keeps the two surfaces from drifting (the same class of duplication C3 guards for
|
|
11
|
+
// suppression) and gives any future consumer of the route the stronger embedding signal by default.
|
|
12
|
+
//
|
|
13
|
+
// Pure of policy: the caller decides whether the query is egress-safe and passes that in. Graceful:
|
|
14
|
+
// no embedding model => semanticById undefined (byte-identical lexical fallback); empty access
|
|
15
|
+
// history => strengthById empty (the ranker zeroes its weight).
|
|
16
|
+
import { buildStrengthById, DEFAULT_LIST_BY_SCOPE_MAX_RESULTS, DEFAULT_STALE_CONFIDENCE_THRESHOLD, isMemorySuppressed, } from "@oscharko-dev/keiko-memory-retrieval";
|
|
17
|
+
import { cosineSimilarity, embedMemoryText } from "./memory-embedding.js";
|
|
18
|
+
// A candidate is worth scoring iff the ranker could surface it. A superset of the ranked set is
|
|
19
|
+
// harmless: ids the ranker filters out simply never read their semantic score.
|
|
20
|
+
function isSemanticRetrievalCandidate(record, nowMs) {
|
|
21
|
+
if (record.status === "superseded")
|
|
22
|
+
return false;
|
|
23
|
+
return !isMemorySuppressed(record, nowMs, DEFAULT_STALE_CONFIDENCE_THRESHOLD).suppressed;
|
|
24
|
+
}
|
|
25
|
+
function gatherCandidateIds(vault, scopes, nowMs) {
|
|
26
|
+
const ids = [];
|
|
27
|
+
const seen = new Set();
|
|
28
|
+
for (const scope of scopes) {
|
|
29
|
+
for (const record of vault.listMemoriesByScope(scope, {
|
|
30
|
+
includeExpired: true,
|
|
31
|
+
limit: DEFAULT_LIST_BY_SCOPE_MAX_RESULTS,
|
|
32
|
+
})) {
|
|
33
|
+
if (!isSemanticRetrievalCandidate(record, nowMs))
|
|
34
|
+
continue;
|
|
35
|
+
if (seen.has(record.id))
|
|
36
|
+
continue;
|
|
37
|
+
seen.add(record.id);
|
|
38
|
+
ids.push(record.id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return ids;
|
|
42
|
+
}
|
|
43
|
+
// Per-memory semantic score map for the candidate set, or undefined when no embedding model is
|
|
44
|
+
// configured (query embedding null) — that undefined drives the byte-identical lexical fallback in
|
|
45
|
+
// the ranker. A candidate whose stored vector is missing is omitted (semantic subscore 0 for it).
|
|
46
|
+
// Query-cosine scores for the candidate set, computed from the already-fetched embeddings. Gated by
|
|
47
|
+
// the egress check (it embeds the query). Returns undefined when no model / no query embedding.
|
|
48
|
+
async function semanticScoresFrom(deps, queryText, candidateIds, embeddings) {
|
|
49
|
+
const queryEmbedding = await embedMemoryText(deps, queryText);
|
|
50
|
+
if (queryEmbedding === null)
|
|
51
|
+
return undefined;
|
|
52
|
+
const scores = new Map();
|
|
53
|
+
for (const id of candidateIds) {
|
|
54
|
+
const stored = embeddings.get(id);
|
|
55
|
+
if (stored === undefined)
|
|
56
|
+
continue;
|
|
57
|
+
scores.set(id, cosineSimilarity(queryEmbedding.vector, stored.vector));
|
|
58
|
+
}
|
|
59
|
+
return scores;
|
|
60
|
+
}
|
|
61
|
+
// Signal-fusion mode for the conversation retrieval surfaces (#204, O-F2). Opt-in via env to keep
|
|
62
|
+
// the release on the byte-identical weighted-sum default; set KEIKO_MEMORY_FUSION=rrf to enable
|
|
63
|
+
// rank-based Reciprocal Rank Fusion across both the chat and BFF paths.
|
|
64
|
+
export function conversationFusionMode(deps) {
|
|
65
|
+
return deps.env.KEIKO_MEMORY_FUSION === "rrf" ? "rrf" : "weighted-sum";
|
|
66
|
+
}
|
|
67
|
+
export async function buildConversationRetrievalSignals(deps, vault, queryText, scopes, nowMs, safeForSecondaryModel) {
|
|
68
|
+
const strengthById = buildStrengthById(vault.getAccessStats(), nowMs);
|
|
69
|
+
const candidateIds = gatherCandidateIds(vault, scopes, nowMs);
|
|
70
|
+
const embeddings = candidateIds.length > 0
|
|
71
|
+
? vault.getEmbeddings(candidateIds)
|
|
72
|
+
: new Map();
|
|
73
|
+
const embeddingById = new Map();
|
|
74
|
+
for (const [id, row] of embeddings)
|
|
75
|
+
embeddingById.set(id, row.vector);
|
|
76
|
+
const semanticById = safeForSecondaryModel && queryText !== undefined && queryText.length > 0 && embeddings.size > 0
|
|
77
|
+
? await semanticScoresFrom(deps, queryText, candidateIds, embeddings)
|
|
78
|
+
: undefined;
|
|
79
|
+
return {
|
|
80
|
+
strengthById,
|
|
81
|
+
embeddingById,
|
|
82
|
+
...(semanticById !== undefined ? { semanticById } : {}),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-salience.d.ts","sourceRoot":"","sources":["../src/memory-salience.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAU3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-salience.d.ts","sourceRoot":"","sources":["../src/memory-salience.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAU3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,kCAAkC,CAAC;AA0H1C,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;CAC5D;AAID,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,SAAS,4BAA4B,EAAE,CAAC,CA2ClD"}
|
|
@@ -13,7 +13,7 @@ import { extractSalientMemories, memoryTextEgressRejectionReason, } from "@oscha
|
|
|
13
13
|
import { currentRedactionSecrets } from "./deps.js";
|
|
14
14
|
import { conversationMemoryScopes, } from "./memory-conversation-context.js";
|
|
15
15
|
import { buildMemoryRecordFromProposal } from "./memory-record-builders.js";
|
|
16
|
-
import {
|
|
16
|
+
import { insertSalienceMemoryWithNoveltyGate } from "./memory-embedding.js";
|
|
17
17
|
import { isPersistableMemoryCandidate, memoryCapturePolicyForDeps, SENSITIVE_MEMORY_REJECTION_REASON, } from "./memory-capture-policy.js";
|
|
18
18
|
// Mirror of chat-handlers' private scopeLabel (decision 3 — mirrored rather than exported to keep
|
|
19
19
|
// the modules decoupled). Pure and trivial.
|
|
@@ -78,9 +78,10 @@ function redactedErrorMessage(error, deps) {
|
|
|
78
78
|
return redact(message, currentRedactionSecrets(deps));
|
|
79
79
|
}
|
|
80
80
|
// Persists one salience candidate and returns its wire action, or null when the outcome is not a
|
|
81
|
-
// candidate
|
|
82
|
-
//
|
|
83
|
-
//
|
|
81
|
+
// candidate, no record could be built, or the candidate was merged into an existing semantic
|
|
82
|
+
// near-duplicate (#204, O-F1) instead of stored. Embed-on-capture happens INSIDE the novelty gate:
|
|
83
|
+
// the body is embedded once, used to detect a near-duplicate, and stored only when the record is
|
|
84
|
+
// actually inserted. Graceful when no embedding model is configured (plain insert, no dedup).
|
|
84
85
|
async function persistCandidate(deps, outcome, vault) {
|
|
85
86
|
if (outcome.kind !== "candidate") {
|
|
86
87
|
return null;
|
|
@@ -93,8 +94,12 @@ async function persistCandidate(deps, outcome, vault) {
|
|
|
93
94
|
if (record === null) {
|
|
94
95
|
return null;
|
|
95
96
|
}
|
|
96
|
-
const inserted = vault
|
|
97
|
-
|
|
97
|
+
const { inserted } = await insertSalienceMemoryWithNoveltyGate(deps, vault, record);
|
|
98
|
+
if (inserted === null) {
|
|
99
|
+
// Near-duplicate of an existing in-scope memory: the canonical was reinforced, nothing new to
|
|
100
|
+
// surface. Over-capture is bounded at the encode boundary rather than deferred to a decay pass.
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
98
103
|
return {
|
|
99
104
|
kind: "candidate",
|
|
100
105
|
proposalId: String(inserted.id),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figmaConnector.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaConnector.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE7F,OAAO,EAIL,KAAK,kBAAkB,EAGvB,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"figmaConnector.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaConnector.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE7F,OAAO,EAIL,KAAK,kBAAkB,EAGvB,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAC;AAYpC,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAIvC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAExC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,kGAAkG;IAClG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACvF;;;;OAIG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC5F;AAgOD,eAAO,MAAM,oBAAoB,GAAI,MAAM,kBAAkB,KAAG,cAiB/D,CAAC"}
|
package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConnector.js
CHANGED
|
@@ -18,9 +18,14 @@ import { resolveReadiness } from "./figmaReadiness.js";
|
|
|
18
18
|
import { classifyTokenFailure, resolveFigmaToken } from "./figmaTokenSource.js";
|
|
19
19
|
import { DEFAULT_SCOPED_PAGINATION_LIMITS, paginateScopedDocument, resolveScopedPaginationLimits, } from "./figmaScopedPagination.js";
|
|
20
20
|
const FIGMA_API_ORIGIN = "https://api.figma.com";
|
|
21
|
-
const DEFAULT_DEPTH =
|
|
21
|
+
const DEFAULT_DEPTH = 2;
|
|
22
22
|
const DEFAULT_MAX_NODE_COUNT = 5000;
|
|
23
23
|
const EPOCH = "1970-01-01T00:00:00.000Z";
|
|
24
|
+
const DEEP_FETCH_FAIL_SOFT_RETRY_POLICY = {
|
|
25
|
+
maxRetries: 0,
|
|
26
|
+
baseDelayMs: 500,
|
|
27
|
+
maxDelayMs: 500,
|
|
28
|
+
};
|
|
24
29
|
const resolveToken = (deps) => resolveFigmaToken({
|
|
25
30
|
vaultToken: deps.vaultToken,
|
|
26
31
|
configToken: deps.config?.accessToken,
|
|
@@ -96,9 +101,9 @@ const DEEP_FETCH_ABORT_CODES = new Set([
|
|
|
96
101
|
// One scoped `nodes?ids=&depth=` fetch (with 429 backoff), returning the raw document. No oversize
|
|
97
102
|
// guard here — the shallow path applies it; the deep path is bounded by the pagination budgets. The
|
|
98
103
|
// token flows into the header only.
|
|
99
|
-
const fetchDocumentAt = async (rt, token, fileKey, nodeId, fetchDepth, version) => {
|
|
104
|
+
const fetchDocumentAt = async (rt, token, fileKey, nodeId, fetchDepth, version, retryPolicy = rt.retryPolicy) => {
|
|
100
105
|
const requestUrl = buildScopedUrl(fileKey, nodeId, fetchDepth, version);
|
|
101
|
-
const response = await fetchWithBackoff(() => rt.deps.http({ url: requestUrl, headers: { "X-Figma-Token": token } }),
|
|
106
|
+
const response = await fetchWithBackoff(() => rt.deps.http({ url: requestUrl, headers: { "X-Figma-Token": token } }), retryPolicy, rt.sleep);
|
|
102
107
|
if (response.status < 200 || response.status >= 300) {
|
|
103
108
|
throw statusToError(response.status, response.json);
|
|
104
109
|
}
|
|
@@ -134,7 +139,7 @@ const doFetchScopedNodes = async (rt, url, options) => {
|
|
|
134
139
|
const makeDeepFetcher = (rt, token, target, version) => {
|
|
135
140
|
return async (nodeId) => {
|
|
136
141
|
try {
|
|
137
|
-
return await fetchDocumentAt(rt, token, target.fileKey, nodeId, rt.paginationLimits.pageDepth, version);
|
|
142
|
+
return await fetchDocumentAt(rt, token, target.fileKey, nodeId, rt.paginationLimits.pageDepth, version, DEEP_FETCH_FAIL_SOFT_RETRY_POLICY);
|
|
138
143
|
}
|
|
139
144
|
catch (err) {
|
|
140
145
|
if (err instanceof FigmaConnectorError && DEEP_FETCH_ABORT_CODES.has(err.code))
|
|
@@ -37,11 +37,12 @@ export interface ScopedPaginationLimits {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Defaults balanced for Figma's cost-based rate limit on real, latency-bound boards (NOT tuned to any
|
|
40
|
-
* sample board's content). `pageDepth=8`
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
40
|
+
* sample board's content). `pageDepth=8` captures typical screen bodies in one bounded request, while
|
|
41
|
+
* a small shared pool of 2 in-flight fetches avoids bursty high-cost 429s. The per-screen and
|
|
42
|
+
* per-board caps deliberately keep the worst-case live build below 100 deep scoped fetches by
|
|
43
|
+
* default, so a pasted whole-canvas Release section remains reviewable in the browser instead of
|
|
44
|
+
* turning into a minutes-long request storm. Operators can raise these budgets per deployment through
|
|
45
|
+
* KEIKO_FIGMA_* env vars when their Figma plan and proxy allow it.
|
|
45
46
|
*/
|
|
46
47
|
export declare const DEFAULT_SCOPED_PAGINATION_LIMITS: ScopedPaginationLimits;
|
|
47
48
|
/** Hard safety ceilings: operators may tune pagination, but never past these finite bounds. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figmaScopedPagination.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaScopedPagination.ts"],"names":[],"mappings":"AAyBA,qGAAqG;AACrG,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;mFACmF;AACnF,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;mGAE+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,+FAA+F;IAC/F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED
|
|
1
|
+
{"version":3,"file":"figmaScopedPagination.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaScopedPagination.ts"],"names":[],"mappings":"AAyBA,qGAAqG;AACrG,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;mFACmF;AACnF,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;mGAE+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,+FAA+F;IAC/F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE,sBAM9C,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,gCAAgC,EAAE,sBAM9C,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,UAAU,OAAO,CAAC,sBAAsB,CAAC,KACxC,sBAgBF,CAAC;AAEF,wGAAwG;AACxG,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,2FAA2F;IAC3F,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACvC;AA0CD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY,KAAG,SAAS,YAAY,EAY7E,CAAC;AA4KF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,YAAY,EACzB,WAAW,iBAAiB,EAC5B,SAAQ,sBAAyD,KAChE,OAAO,CAAC,eAAe,CAsCzB,CAAC"}
|
|
@@ -24,18 +24,19 @@
|
|
|
24
24
|
// assembled tree (and a budget cut-off truncates the same deterministic tail every run).
|
|
25
25
|
/**
|
|
26
26
|
* Defaults balanced for Figma's cost-based rate limit on real, latency-bound boards (NOT tuned to any
|
|
27
|
-
* sample board's content). `pageDepth=8`
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
27
|
+
* sample board's content). `pageDepth=8` captures typical screen bodies in one bounded request, while
|
|
28
|
+
* a small shared pool of 2 in-flight fetches avoids bursty high-cost 429s. The per-screen and
|
|
29
|
+
* per-board caps deliberately keep the worst-case live build below 100 deep scoped fetches by
|
|
30
|
+
* default, so a pasted whole-canvas Release section remains reviewable in the browser instead of
|
|
31
|
+
* turning into a minutes-long request storm. Operators can raise these budgets per deployment through
|
|
32
|
+
* KEIKO_FIGMA_* env vars when their Figma plan and proxy allow it.
|
|
32
33
|
*/
|
|
33
34
|
export const DEFAULT_SCOPED_PAGINATION_LIMITS = {
|
|
34
35
|
pageDepth: 8,
|
|
35
|
-
maxNodesPerScreen:
|
|
36
|
-
maxFetchesPerScreen:
|
|
37
|
-
maxScreensDeep:
|
|
38
|
-
fetchConcurrency:
|
|
36
|
+
maxNodesPerScreen: 8_000,
|
|
37
|
+
maxFetchesPerScreen: 6,
|
|
38
|
+
maxScreensDeep: 16,
|
|
39
|
+
fetchConcurrency: 2,
|
|
39
40
|
};
|
|
40
41
|
/** Hard safety ceilings: operators may tune pagination, but never past these finite bounds. */
|
|
41
42
|
export const SCOPED_PAGINATION_LIMIT_CEILINGS = {
|
|
@@ -24,7 +24,8 @@ export interface BuildFigmaSnapshotInput {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Render the screens and assemble the immutable Figma Snapshot. Render failures degrade to a
|
|
27
|
-
* `skippedScreens` entry (partial render); a non-2xx `/v1/images` call is
|
|
27
|
+
* `skippedScreens` entry plus structural-only IR (partial render); a non-2xx `/v1/images` call is
|
|
28
|
+
* a hard coded error.
|
|
28
29
|
*/
|
|
29
30
|
export declare const buildFigmaSnapshot: (input: BuildFigmaSnapshotInput) => Promise<FigmaSnapshot>;
|
|
30
31
|
//# sourceMappingURL=figmaSnapshotBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figmaSnapshotBuilder.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaSnapshotBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"figmaSnapshotBuilder.d.ts","sourceRoot":"","sources":["../../../src/qualityIntelligence/figma/figmaSnapshotBuilder.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAiBzF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,wBAAwB,CAAC,cAAc,CAAC;IACrD,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,gEAAgE;IAChE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,qEAAqE;IACrE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,+FAA+F;IAC/F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,wFAAwF;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,qFAAqF;IACrF,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC;AAuSD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,uBAAuB,KAC7B,OAAO,CAAC,aAAa,CAyCvB,CAAC"}
|