@oscharko-dev/keiko 1.2.2 → 1.2.4
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/README.md +23 -1
- package/dist/ui/csp-hashes.json +7 -7
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +11 -11
- package/dist/ui/static/__next._full.txt +13 -13
- package/dist/ui/static/__next._tree.txt +2 -2
- package/dist/ui/static/_next/static/chunks/02bjsbh-9ecdm.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0e0h-sia4dm93.js → 0ayn-v91zdo92.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0bdxksp1lm2a5.js +1 -0
- package/dist/ui/static/_next/static/chunks/0n-psjjwvzg-y.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2ywljh6s1u2zd.js → 0oqmbh9n57323.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0ry6tlbur8za2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{38rjnjhuttjqs.js → 0t52lzhbto4gq.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0y0r5znrj9qw-.js → 0t86l4mcivsdr.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0vmq9d1ffbg71.js +1 -0
- package/dist/ui/static/_next/static/chunks/{32jgtvf2y-f54.js → 0w4i9kmhas6-y.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0ta8ifx4mr6gi.js → 0wojcemvzg4nk.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{15tj-r-c7bs-p.js → 0ye5xoo8-mxeh.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1-1m1qynx41o-.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2pg4yzdak17yp.js → 12j_451pxuj5o.js} +1 -1
- package/dist/ui/static/_next/static/chunks/12u-0ugq__zxv.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2m7wxgg82-7yj.js → 12ud0_l8bk00z.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3ya92_ies62hp.js → 15vd6rpxiqu8w.js} +1 -1
- package/dist/ui/static/_next/static/chunks/17i88c7695qwe.js +1 -0
- package/dist/ui/static/_next/static/chunks/{21rpgm75hndoe.js → 19us2pnpa8mf8.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3umqj2wkb8goj.js → 1acedjbs6wiqp.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1dlqcgl3v1lh5.js +1 -0
- package/dist/ui/static/_next/static/chunks/1f54omp_06bxq.js +1 -0
- package/dist/ui/static/_next/static/chunks/{363iuc3t94rie.js → 1glj9-10j7vd_.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1grn549_xc1mq.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0650rzqxvrg4k.js → 1gy2m1qvi454c.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1ienlzel5zdck.js +4 -0
- package/dist/ui/static/_next/static/chunks/1opvpvx_garm7.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0pf5ot48kepng.js → 1ufk9opowqajn.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1vyr9w4t1aogr.js +1 -0
- package/dist/ui/static/_next/static/chunks/20b456jf1ggzu.css +1 -0
- package/dist/ui/static/_next/static/chunks/21cazq_lp5oc5.js +3 -0
- package/dist/ui/static/_next/static/chunks/23p0wg8gdznqm.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0_yx8_bs1t-27.js → 27shxliy4x9l4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2tlvii78gzv6c.js → 2czfxmx_ca_k5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0c2x58oypfxql.css → 2dhcqxcousm45.css} +1 -0
- package/dist/ui/static/_next/static/chunks/{3-pcgkdsv7x4z.js → 2fqo-2fl7ca59.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2i0hotqh6q4q5.js +3 -0
- package/dist/ui/static/_next/static/chunks/{0gns083_remf0.js → 2p_w_st_gm1rp.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{43z5mfwx4lk4w.js → 2rmh79cv9y7fu.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3payvp5ps2fne.css → 32r3kzj8vl9xl.css} +10 -1
- package/dist/ui/static/_next/static/chunks/{4014adorwuv48.js → 35r_4m36s2mm5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{02ycexmxeqhmx.css → 3951w1st9l_ix.css} +15 -25
- package/dist/ui/static/_next/static/chunks/{1s3u1scfdjjd9.js → 3961pv_qwa3xb.js} +1 -1
- package/dist/ui/static/_next/static/chunks/39xl_71ucgzrs.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0t10yxd1t9qeg.js → 3bafzdsn1osq1.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1g_d_8a7vlqgu.js → 3i6zr4x280jq4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3lf8dguq57yfu.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2v4u52qc4tcdm.js → 3llyc6xz08_ky.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3lq95b69wn18x.js +1 -0
- package/dist/ui/static/_next/static/chunks/3q-u4cmxbxbxy.js +1 -0
- package/dist/ui/static/_next/static/chunks/{42otn3fqwlbyi.js → 3zidi31cpe2oi.js} +1 -1
- package/dist/ui/static/_next/static/chunks/41t1if3rqvyu-.js +3 -0
- package/dist/ui/static/_next/static/chunks/43yycpcn9jmo0.js +1 -0
- package/dist/ui/static/_next/static/chunks/44sjj140gf9z8.js +1 -0
- package/dist/ui/static/_not-found/__next._full.txt +9 -9
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +8 -8
- package/dist/ui/static/_not-found/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +9 -9
- package/dist/ui/static/atlassian-connectors/__next._full.txt +13 -13
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +10 -10
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +13 -13
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +13 -13
- package/dist/ui/static/launch/__next._full.txt +13 -13
- package/dist/ui/static/launch/__next._tree.txt +2 -2
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +11 -11
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +13 -13
- package/dist/ui/static/local-knowledge/__next._full.txt +13 -13
- package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +11 -11
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +11 -11
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +10 -10
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +11 -11
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +13 -13
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +28 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts +21 -7
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.js +24 -8
- package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-cli/package.json +15 -15
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +21 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +22 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +65 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +76 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +78 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +100 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.js +9 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +11 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +17 -9
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.js +23 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-log.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-log.js +32 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-routes.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-routes.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-draft-routes.js +66 -0
- 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 +10 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.js +58 -22
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.js +5 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +9 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-turn-serializer.d.ts +8 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-turn-serializer.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-turn-serializer.js +63 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.js +6 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +26 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.js +5 -24
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-repair.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-repair.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.js +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.js +50 -18
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.js +18 -3
- 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 +69 -45
- 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 +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-selection-quality.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-preview-service.js +3 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-selection-admission.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-selection-admission.js +10 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chatDrafts.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chatDrafts.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chatDrafts.js +33 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.js +24 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.js +9 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +21 -2
- package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
- package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts +1 -1
- 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 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.js +58 -1
- 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 +14 -14
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/references.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/references.js +4 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/request-command-patterns.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/request-command-patterns.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/request-command-patterns.js +5 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/index.js +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillDraft.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillDraft.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillDraft.js +19 -10
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillSources.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillSources.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/promptEnhancer/markdownSkillSources.js +75 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.js +32 -1
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.js +117 -20
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importPathSuffix.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importPathSuffix.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importPathSuffix.js +51 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchCachedLexical.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchCachedLexical.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchCachedLexical.js +6 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.js +22 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchQueryTerms.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchQueryTerms.js +18 -4
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts +2 -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 +4 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapterRequestContext.js +2 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexQueryMatch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexQueryMatch.js +11 -0
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
- package/package.json +29 -27
- package/release-impact.catalog.json +164 -23
- package/vendor/oscharko-dev-keiko-activity-log-1.2.4.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-cli-1.2.2.tgz → oscharko-dev-keiko-cli-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-1.2.2.tgz → oscharko-dev-keiko-connectors-1.2.4.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.2.4.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-1.2.2.tgz → oscharko-dev-keiko-evaluations-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-1.2.2.tgz → oscharko-dev-keiko-evidence-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-git-1.2.2.tgz → oscharko-dev-keiko-git-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-harness-1.2.2.tgz → oscharko-dev-keiko-harness-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-local-knowledge-1.2.2.tgz → oscharko-dev-keiko-local-knowledge-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-1.2.2.tgz → oscharko-dev-keiko-memory-capture-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-1.2.2.tgz → oscharko-dev-keiko-memory-consolidation-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-1.2.2.tgz → oscharko-dev-keiko-memory-governance-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-1.2.2.tgz → oscharko-dev-keiko-memory-retrieval-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-1.2.2.tgz → oscharko-dev-keiko-memory-vault-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-model-gateway-1.2.2.tgz → oscharko-dev-keiko-model-gateway-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-1.2.2.tgz → oscharko-dev-keiko-quality-intelligence-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-1.2.2.tgz → oscharko-dev-keiko-sandbox-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-1.2.2.tgz → oscharko-dev-keiko-sdk-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-security-1.2.2.tgz → oscharko-dev-keiko-security-1.2.4.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-server-1.2.4.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tool-catalog-1.2.2.tgz → oscharko-dev-keiko-tool-catalog-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-tools-1.2.2.tgz → oscharko-dev-keiko-tools-1.2.4.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-verification-1.2.2.tgz → oscharko-dev-keiko-verification-1.2.4.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-workflows-1.2.4.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workspace-1.2.4.tgz +0 -0
- package/dist/ui/static/_next/static/chunks/00h6kszysb2wr.js +0 -1
- package/dist/ui/static/_next/static/chunks/08f-iwu6ug6k3.js +0 -3
- package/dist/ui/static/_next/static/chunks/0e3x-8o_fjsn_.js +0 -1
- package/dist/ui/static/_next/static/chunks/0eeyfcixqqfab.js +0 -1
- package/dist/ui/static/_next/static/chunks/0eyoirips0ket.js +0 -1
- package/dist/ui/static/_next/static/chunks/0ji_km0dqy8qj.js +0 -1
- package/dist/ui/static/_next/static/chunks/0jtp8te-03j1-.js +0 -1
- package/dist/ui/static/_next/static/chunks/0sjewje-u3bqg.js +0 -1
- package/dist/ui/static/_next/static/chunks/1c0u0qq0vwkc4.js +0 -1
- package/dist/ui/static/_next/static/chunks/1lm4kkulhv0b_.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pe5ee9wh-qwa.js +0 -1
- package/dist/ui/static/_next/static/chunks/1qcpuq815jtog.js +0 -3
- package/dist/ui/static/_next/static/chunks/1zqfkyeqq5cl8.js +0 -1
- package/dist/ui/static/_next/static/chunks/21s3ugswalpzt.js +0 -1
- package/dist/ui/static/_next/static/chunks/2go0k_akgnv11.js +0 -1
- package/dist/ui/static/_next/static/chunks/2oq1uk07ft9l0.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_m42xgt33mnw.js +0 -4
- package/dist/ui/static/_next/static/chunks/3cpuzx4fetu6y.js +0 -1
- package/dist/ui/static/_next/static/chunks/3d27ozm1boe_5.js +0 -3
- package/dist/ui/static/_next/static/chunks/3fwt6-8rc2mya.js +0 -1
- package/dist/ui/static/_next/static/chunks/3hb_wkp14tb6b.js +0 -1
- package/dist/ui/static/_next/static/chunks/3ifa0dznjb9z9.js +0 -1
- package/dist/ui/static/_next/static/chunks/3q-93bizla3k1.js +0 -1
- package/vendor/oscharko-dev-keiko-activity-log-1.2.2.tgz +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.2.2.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.2.2.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-1.2.2.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workspace-1.2.2.tgz +0 -0
- /package/dist/ui/static/_next/static/{Z7PX-H79azsma78__tTUN → i1pRTTqyOTQStJLPAXgGm}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{Z7PX-H79azsma78__tTUN → i1pRTTqyOTQStJLPAXgGm}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{Z7PX-H79azsma78__tTUN → i1pRTTqyOTQStJLPAXgGm}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { deriveChatGroundingScopeIdentity } from "./store/chat-grounding-scope-identity.js";
|
|
2
|
+
import { logChatScopeUpdate } from "./chat-scope-update-log.js";
|
|
1
3
|
import { AbortRaceError, raceAbort } from "./abort-race.js";
|
|
2
4
|
export const CHAT_TURN_WAIT_CANCELLED = Symbol("chat-turn-wait-cancelled");
|
|
3
5
|
function waitForPredecessor(predecessor, signal) {
|
|
@@ -28,11 +30,16 @@ function releaseTurn(tails, chatId, gate, releaseGate) {
|
|
|
28
30
|
}
|
|
29
31
|
export function createChatTurnSerializer() {
|
|
30
32
|
const tails = new Map();
|
|
31
|
-
const
|
|
33
|
+
const generations = new Map();
|
|
34
|
+
const runExclusive = async (chatId, signal, operation, generation) => {
|
|
35
|
+
const unregister = registerGeneration(generations, chatId, signal, generation);
|
|
32
36
|
const predecessor = tails.get(chatId) ?? Promise.resolve();
|
|
33
37
|
let releaseGate;
|
|
34
38
|
const gate = new Promise((resolve) => {
|
|
35
|
-
releaseGate =
|
|
39
|
+
releaseGate = () => {
|
|
40
|
+
unregister();
|
|
41
|
+
resolve();
|
|
42
|
+
};
|
|
36
43
|
});
|
|
37
44
|
tails.set(chatId, gate);
|
|
38
45
|
if (!(await waitForPredecessor(predecessor, signal))) {
|
|
@@ -54,16 +61,45 @@ export function createChatTurnSerializer() {
|
|
|
54
61
|
}, () => {
|
|
55
62
|
releaseTurn(tails, chatId, gate, releaseGate);
|
|
56
63
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
return settleTurn(work, signal);
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
runExclusive,
|
|
68
|
+
interruptGenerations: (chatId) => interruptGenerations(generations.get(chatId)),
|
|
69
|
+
hasGenerations: (chatId) => activeGenerations(generations.get(chatId)).length > 0,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function settleTurn(work, signal) {
|
|
73
|
+
try {
|
|
74
|
+
return await raceAbort(work, signal);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (error instanceof AbortRaceError)
|
|
78
|
+
return CHAT_TURN_WAIT_CANCELLED;
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function activeGenerations(generations) {
|
|
83
|
+
return [...(generations ?? [])].filter(({ signal }) => !signal.aborted);
|
|
84
|
+
}
|
|
85
|
+
function interruptGenerations(generations) {
|
|
86
|
+
const pending = activeGenerations(generations);
|
|
87
|
+
for (const { controller } of pending)
|
|
88
|
+
controller.abort("connected sources changed");
|
|
89
|
+
return pending.length;
|
|
90
|
+
}
|
|
91
|
+
function registerGeneration(generations, chatId, signal, controller) {
|
|
92
|
+
if (controller === undefined)
|
|
93
|
+
return () => undefined;
|
|
94
|
+
const entries = generations.get(chatId) ?? new Set();
|
|
95
|
+
const entry = { controller, signal };
|
|
96
|
+
entries.add(entry);
|
|
97
|
+
generations.set(chatId, entries);
|
|
98
|
+
return () => {
|
|
99
|
+
entries.delete(entry);
|
|
100
|
+
if (entries.size === 0)
|
|
101
|
+
generations.delete(chatId);
|
|
65
102
|
};
|
|
66
|
-
return { runExclusive };
|
|
67
103
|
}
|
|
68
104
|
const serializersByStore = new WeakMap();
|
|
69
105
|
function serializerForStore(store) {
|
|
@@ -74,6 +110,20 @@ function serializerForStore(store) {
|
|
|
74
110
|
serializersByStore.set(store, created);
|
|
75
111
|
return created;
|
|
76
112
|
}
|
|
77
|
-
export function runSerializedChatTurn(deps, chatId, signal, operation) {
|
|
78
|
-
return (deps.chatTurnSerializer ?? serializerForStore(deps.store)).runExclusive(chatId, signal, operation);
|
|
113
|
+
export function runSerializedChatTurn(deps, chatId, signal, operation, generation) {
|
|
114
|
+
return (deps.chatTurnSerializer ?? serializerForStore(deps.store)).runExclusive(chatId, signal, operation, generation);
|
|
115
|
+
}
|
|
116
|
+
export function interruptChatGenerations(deps, chatId) {
|
|
117
|
+
return (deps.chatTurnSerializer ?? serializerForStore(deps.store)).interruptGenerations(chatId);
|
|
118
|
+
}
|
|
119
|
+
export function hasChatGenerations(deps, chatId) {
|
|
120
|
+
return (deps.chatTurnSerializer ?? serializerForStore(deps.store)).hasGenerations(chatId);
|
|
121
|
+
}
|
|
122
|
+
export function interruptChangedChatGenerations(deps, previous, current, correlationId, patch = {}) {
|
|
123
|
+
if (previous === undefined ||
|
|
124
|
+
deriveChatGroundingScopeIdentity(previous) === deriveChatGroundingScopeIdentity(current))
|
|
125
|
+
return;
|
|
126
|
+
const count = interruptChatGenerations(deps, current.id);
|
|
127
|
+
if (count > 0)
|
|
128
|
+
logChatScopeUpdate("cancellation-requested", previous, current, patch, correlationId, count);
|
|
79
129
|
}
|
|
@@ -3,6 +3,8 @@ import { type CompactionDigest } from "@oscharko-dev/keiko-workflows/context-bud
|
|
|
3
3
|
import type { ChatMessage } from "./store/index.js";
|
|
4
4
|
import { type GatewayConversationMessage } from "./conversation-gateway.js";
|
|
5
5
|
export interface ConversationCompactionOptions {
|
|
6
|
+
/** Explicit maintenance summarizes the complete eligible history in a single pass. */
|
|
7
|
+
readonly compactAllHistory?: boolean | undefined;
|
|
6
8
|
readonly earlierCompaction?: ContextCompactionRecord | undefined;
|
|
7
9
|
readonly contextProfile?: ContextProfile | undefined;
|
|
8
10
|
readonly effectiveInputBudget?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-compaction.d.ts","sourceRoot":"","sources":["../src/conversation-compaction.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IA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AM,EAAE,GAAG,SAAS,CAAC;CACnE;AA2BD,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,IAAI,GAAE,6BAAkC,GACvC,6BAA6B,CAgC/B;AA2QD,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,gBAAgB,EACxB,YAAY,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,GACrD,SAAS,MAAM,EAAE,CA0CnB;AA0LD,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,uBAAuB,EAC/B,UAAU,EAAE,sBAAsB,GAAG,SAAS,GAC7C,MAAM,CAWR;AAcD,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,WAAW,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,GACzD,WAAW,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAErD"}
|
|
@@ -35,7 +35,8 @@ export function conversationForGatewayWithCompaction(messages, opts = {}) {
|
|
|
35
35
|
const earlier = opts.earlierCompaction;
|
|
36
36
|
const fullVerbatimMessages = buildInitialMessages(systemMessage, filtered, earlier);
|
|
37
37
|
const fullVerbatimTokens = countGatewayPromptTokens({ messages: fullVerbatimMessages }, tokenAccounting);
|
|
38
|
-
if (fullVerbatimTokens <= effectiveInputBudget
|
|
38
|
+
if (fullVerbatimTokens <= effectiveInputBudget &&
|
|
39
|
+
(opts.compactAllHistory !== true || filtered.length === 0)) {
|
|
39
40
|
return { messages: fullVerbatimMessages, compaction: earlier };
|
|
40
41
|
}
|
|
41
42
|
const prepared = prepareDroppedTurns(filtered, tokenAccounting);
|
|
@@ -53,11 +54,12 @@ function selectCompactionOutcome(prepared, system, effectiveInputBudget, opts, t
|
|
|
53
54
|
tokenAccounting,
|
|
54
55
|
earlier,
|
|
55
56
|
allowTrimming: false,
|
|
57
|
+
compactAllHistory: opts.compactAllHistory === true,
|
|
56
58
|
};
|
|
57
59
|
const complete = selectCompaction(prepared, system, budget);
|
|
58
60
|
if (complete !== undefined)
|
|
59
61
|
return buildCompactedOutcome(prepared, system, complete, tokenAccounting, earlier);
|
|
60
|
-
if (earlier !== undefined) {
|
|
62
|
+
if (earlier !== undefined && (opts.compactAllHistory !== true || prepared.length === 0)) {
|
|
61
63
|
const refitted = refitEarlierCheckpoint(prepared, system, earlier, effectiveInputBudget, tokenAccounting);
|
|
62
64
|
if (refitted !== undefined)
|
|
63
65
|
return refitted;
|
|
@@ -102,7 +104,8 @@ function selectCompaction(prepared, systemMessage, budget) {
|
|
|
102
104
|
return undefined;
|
|
103
105
|
const tokenPrefix = buildTokenPrefix(prepared);
|
|
104
106
|
const maxDropCount = budget.preserveNewestTurn ? prepared.length - 1 : prepared.length;
|
|
105
|
-
|
|
107
|
+
const firstDropCount = budget.compactAllHistory ? Math.max(1, maxDropCount) : 1;
|
|
108
|
+
for (let dropCount = firstDropCount; dropCount <= maxDropCount; dropCount += 1) {
|
|
106
109
|
const selection = selectCompactionCandidate(prepared, tokenPrefix, dropCount, {
|
|
107
110
|
...budget,
|
|
108
111
|
systemContent,
|
|
@@ -16,7 +16,7 @@ export declare const PROBE_GATEWAY_BUSY_WARNING = "The gateway answered with a t
|
|
|
16
16
|
export declare function probeInconclusive(probe: GatewayReadinessProbeResult): boolean;
|
|
17
17
|
export declare function longContextTokens(options: GatewayReadinessOptions | undefined, capability: ModelCapability | undefined): number;
|
|
18
18
|
export declare const LONG_CONTEXT_PROBE_TIMEOUT_FLOOR_MS = 300000;
|
|
19
|
-
export declare const WORKBENCH_PROBE_TIMEOUT_FLOOR_MS =
|
|
19
|
+
export declare const WORKBENCH_PROBE_TIMEOUT_FLOOR_MS = 300000;
|
|
20
20
|
export declare function probeProvider(provider: ModelProviderConfig, name: GatewayReadinessProbeName, options: GatewayReadinessOptions | undefined): ModelProviderConfig;
|
|
21
21
|
export declare const TESTED_CONTEXT_TOKENS_PATTERN: RegExp;
|
|
22
22
|
export declare const EMBEDDING_EVIDENCE_PATTERN: RegExp;
|
|
@@ -53,7 +53,7 @@ export declare function initializeConfiguredConversationReadiness(deps: UiHandle
|
|
|
53
53
|
export declare function awaitInitializedConversationReadiness(deps: UiHandlerDeps, modelId: string, correlationId?: string): Promise<void>;
|
|
54
54
|
export declare const NOT_READY_REPROBE_COOLDOWN_MS = 30000;
|
|
55
55
|
export declare function ensureOnDemandConversationReadiness(deps: UiHandlerDeps, modelId: string, correlationId?: string, backgroundAttempt?: number): Promise<void>;
|
|
56
|
-
export declare const CHAT_MODEL_WALK_BUDGET_MS =
|
|
56
|
+
export declare const CHAT_MODEL_WALK_BUDGET_MS = 300000;
|
|
57
57
|
export declare function ensureAnyConversationReadyChatModel(deps: UiHandlerDeps, requestedModelId: string, correlationId?: string): Promise<void>;
|
|
58
58
|
export declare function awaitAnyInitializedConversationReadyChatModel(deps: UiHandlerDeps, requestedModelId: string, correlationId?: string): Promise<void>;
|
|
59
59
|
export declare function handleGatewayReadiness(ctx: RouteContext, deps: UiHandlerDeps): Promise<RouteResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-readiness.d.ts","sourceRoot":"","sources":["../src/gateway-readiness.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"gateway-readiness.d.ts","sourceRoot":"","sources":["../src/gateway-readiness.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,MAAM,mCAAmC,CAAC;AAM3C,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAehD,OAAO,KAAK,EACV,aAAa,EAGd,MAAM,WAAW,CAAC;AAUnB,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,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Bf;AA2CD,eAAO,MAAM,6BAA6B,QAAS,CAAC;AA+DpD,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,EACtB,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CAiCf;AAqGD,eAAO,MAAM,yBAAyB,SAA2B,CAAC;AA6BlE,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,aAAa,EACnB,gBAAgB,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,wBAAsB,6CAA6C,CACjE,IAAI,EAAE,aAAa,EACnB,gBAAgB,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAOf;AAwBD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,WAAW,CAAC,CAMtB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TimeoutError, TransportError } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
2
2
|
import { isConversationEligibleModel, listConfiguredCapabilities, requestGatewayReadinessChatCompletion, requestOpenAIEmbedding, selectConfiguredModel, toolCallingConfigurationFingerprint, vectorL2Norm, } from "@oscharko-dev/keiko-model-gateway";
|
|
3
|
-
import { GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS } from "@oscharko-dev/keiko-model-gateway/internal/resilience";
|
|
3
|
+
import { GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS, GATEWAY_SILENCE_FLOOR_MS, } from "@oscharko-dev/keiko-model-gateway/internal/resilience";
|
|
4
4
|
import { readJsonCapped, readSseStream } from "@oscharko-dev/keiko-model-gateway/internal/http";
|
|
5
5
|
import { activityLogEvent, defineActivityLogOperation, withActivityLogParentCorrelation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
6
6
|
import { gatewayVerificationFromProbeOutcome } from "@oscharko-dev/keiko-contracts/runtime/gateway-verification";
|
|
7
7
|
import { maxUtf8BytesForTokenBudget } from "@oscharko-dev/keiko-contracts/runtime/context-engineering";
|
|
8
8
|
import { codingWorkbenchModelEligibility, isCodingWorkbenchReadinessCandidate, preferredConversationModelOrder, selectCodingWorkbenchReadinessCandidate, } from "@oscharko-dev/keiko-contracts/runtime/gateway";
|
|
9
9
|
import { CODING_WORKBENCH_MINIMUM_CODING_CONTEXT_PROMPT_TOKENS } from "@oscharko-dev/keiko-contracts/runtime/coding-workbench";
|
|
10
|
-
import {
|
|
10
|
+
import { conversationReadinessAgeMs, currentConversationReady, currentGatewayConfig, } from "./deps.js";
|
|
11
11
|
import { newCorrelationId } from "./correlation.js";
|
|
12
12
|
import { emitServerDiagnostic, serverDiagnosticFromError } from "./diagnostics-log.js";
|
|
13
13
|
import { requestRerankerProbe, rerankerProbePassed } from "./gateway-reranker-probe.js";
|
|
@@ -634,6 +634,19 @@ function providerWarning(errorValue) {
|
|
|
634
634
|
return (inconclusiveProbeError(errorValue) ??
|
|
635
635
|
"The provider could not complete this probe. Chat configuration was not changed.");
|
|
636
636
|
}
|
|
637
|
+
function nativeProbeAbortReason(error) {
|
|
638
|
+
// Node's native HTTP transport wraps the signal reason in Error(ABORT_ERR), not DOMException.
|
|
639
|
+
// Preserve that deadline/cancellation reason so a slow gateway does not refute readiness (#4038).
|
|
640
|
+
if (error instanceof Error &&
|
|
641
|
+
error.name === "AbortError" &&
|
|
642
|
+
"code" in error &&
|
|
643
|
+
error.code === "ABORT_ERR") {
|
|
644
|
+
return error.cause instanceof DOMException
|
|
645
|
+
? error.cause
|
|
646
|
+
: new DOMException("Gateway readiness probe cancelled.", "AbortError");
|
|
647
|
+
}
|
|
648
|
+
return error;
|
|
649
|
+
}
|
|
637
650
|
// Every probe's `catch` used to collapse an actionable cause — an auth rejection, a DNS/TLS failure,
|
|
638
651
|
// a missing model — into the same two operator-facing sentences, and nothing anywhere else recorded
|
|
639
652
|
// it. A readiness run is the product's ONLY live evidence about the gateway (F-01), so an
|
|
@@ -643,15 +656,16 @@ function providerWarning(errorValue) {
|
|
|
643
656
|
// Content-free: error class, machine code, gateway request id — never a probe body, an endpoint,
|
|
644
657
|
// or a credential.
|
|
645
658
|
function reportProbeFailure(deps, correlationId, name, start, evidence, probeError) {
|
|
659
|
+
const failure = nativeProbeAbortReason(probeError);
|
|
646
660
|
emitServerDiagnostic(deps.diagnostics, serverDiagnosticFromError({
|
|
647
661
|
correlationId,
|
|
648
662
|
operation: "gateway.readiness",
|
|
649
663
|
source: `gateway-readiness.${name}`,
|
|
650
|
-
error:
|
|
664
|
+
error: failure,
|
|
651
665
|
summary: "A gateway readiness probe could not be completed.",
|
|
652
666
|
redact: (message) => String(deps.redactor(message)),
|
|
653
667
|
}));
|
|
654
|
-
return result(name, "failed", start, evidence, providerWarning(
|
|
668
|
+
return result(name, "failed", start, evidence, providerWarning(failure));
|
|
655
669
|
}
|
|
656
670
|
function unsupportedStatus(response) {
|
|
657
671
|
return (response.status === 400 ||
|
|
@@ -1015,7 +1029,8 @@ async function probeLongContext(deps, config, provider, capability, options, cor
|
|
|
1015
1029
|
// budget, and a probe that abandons a slow gateway proves nothing and used to lock the Workbench
|
|
1016
1030
|
// out for six hours. The floors below are lower bounds on the configured provider timeout.
|
|
1017
1031
|
export const LONG_CONTEXT_PROBE_TIMEOUT_FLOOR_MS = 300_000;
|
|
1018
|
-
|
|
1032
|
+
// Automatic readiness must tolerate the same initial silence as the interactive answer it gates.
|
|
1033
|
+
export const WORKBENCH_PROBE_TIMEOUT_FLOOR_MS = GATEWAY_SILENCE_FLOOR_MS;
|
|
1019
1034
|
function probeTimeoutFloorMs(name, options) {
|
|
1020
1035
|
if (name === "long_context")
|
|
1021
1036
|
return LONG_CONTEXT_PROBE_TIMEOUT_FLOOR_MS;
|
|
@@ -1694,7 +1709,9 @@ function monitorConversationInitialization(deps, modelId, generation, parentCorr
|
|
|
1694
1709
|
}
|
|
1695
1710
|
const MAX_CONVERSATION_RECOVERY_DELAY_MS = 5 * 60_000;
|
|
1696
1711
|
function conversationReadinessRenewAfterMs() {
|
|
1697
|
-
|
|
1712
|
+
// Renewal cadence is independent of the provider deadline. Subtracting a longer deadline
|
|
1713
|
+
// from freshness can make this negative and cause continuous successful re-probes (#4038).
|
|
1714
|
+
return 2 * 60_000;
|
|
1698
1715
|
}
|
|
1699
1716
|
function conversationRecoveryDelay(deps, holder, modelId, attempt) {
|
|
1700
1717
|
const observation = holder.verifiedCapability(modelId);
|
|
@@ -1948,7 +1965,9 @@ async function runOnDemandReadinessProbe(deps, holder, modelId, correlationId, b
|
|
|
1948
1965
|
// 0.3.11 embedding ladder, applied here). A probe that outlives the budget keeps running in
|
|
1949
1966
|
// the shared in-flight map — its observation lands for the NEXT attempt — but this request
|
|
1950
1967
|
// stops waiting.
|
|
1951
|
-
|
|
1968
|
+
// Admission must not stop waiting before the supported interactive silence window (#4038).
|
|
1969
|
+
// This remains one aggregate budget across all candidates, never a per-model allowance.
|
|
1970
|
+
export const CHAT_MODEL_WALK_BUDGET_MS = GATEWAY_SILENCE_FLOOR_MS;
|
|
1952
1971
|
async function settledWithinBudget(probe, budgetMs) {
|
|
1953
1972
|
let timer;
|
|
1954
1973
|
const expired = new Promise((resolve) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitChangeRoutes.d.ts","sourceRoot":"","sources":["../src/gitChangeRoutes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gitChangeRoutes.d.ts","sourceRoot":"","sources":["../src/gitChangeRoutes.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAGV,sBAAsB,EAGvB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,qDAAqD,CAAC;AAK7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiV9E,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAEhE;AAsGD,KAAK,yBAAyB,GAC1B,sBAAsB,GACtB,2BAA2B,GAC3B,gCAAgC,GAChC,iCAAiC,GACjC,uBAAuB,CAAC;AAyB5B,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,yBAAyB,GAAG,oBAAoB,CAEjG;AA0PD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,WAAW,CAAC,CA4BtB;AAwID,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,WAAW,CAAC,CAmCtB;AAID,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAG5D,CAAC"}
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// refinement. Two mutating routes:
|
|
3
|
-
//
|
|
4
|
-
// POST /api/git-change/connect — resolve an exact server-side base/head comparison, or one
|
|
5
|
-
// existing same-repository open pull request, capture its immutable snapshot, record a
|
|
6
|
-
// `reads-context` relationship (chat -> git-change) through the existing relationship engine,
|
|
7
|
-
// and persist the resulting scope on the chat row.
|
|
8
|
-
// POST /api/git-change/refresh — re-check a connected scope's snapshot against the live
|
|
9
|
-
// repository. `reads-context` is immutable/non-reconnectable (relationships.ts lifecycle
|
|
10
|
-
// flags), so a changed comparison archives the existing relationship and creates a NEW one
|
|
11
|
-
// (contract correction 4) rather than mutating it; the chat's scope entry is updated to
|
|
12
|
-
// "current" or "stale" accordingly.
|
|
13
|
-
//
|
|
14
|
-
// V1 selection (issue text, Baseline Delta): an exact server-resolved local base/head comparison,
|
|
15
|
-
// or one existing same-repository PR whose commits are available in the trusted checkout. Detached
|
|
16
|
-
// or unborn heads, missing refs and ambiguous PR matches block with a closed reason. This route
|
|
17
|
-
// neither fetches nor silently adopts a remote-only head — the existing explicit Git refresh flow
|
|
18
|
-
// owns that. "Same repository" keys on `remoteDigest` (contract correction 6), never
|
|
19
|
-
// `repositoryId`, which is a per-checkout locator only.
|
|
20
|
-
//
|
|
21
|
-
// The browser sends only a chat id and a ref/mode selection — never a filesystem path, a resolved
|
|
22
|
-
// SHA, or a repository identity. The trusted repository root is the CHAT's own already-validated
|
|
23
|
-
// `projectPath` (set at project-creation time), matched by the exact same membership check the
|
|
24
|
-
// snapshot service itself performs internally, never a fresh browser-authored root.
|
|
1
|
+
import { interruptChangedChatGenerations } from "./chat-turn-serializer.js";
|
|
25
2
|
import { isGitChangeSnapshot } from "@oscharko-dev/keiko-contracts/runtime/git-change-snapshot";
|
|
26
3
|
import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
27
4
|
import { defaultGitProcessRunner } from "@oscharko-dev/keiko-git";
|
|
@@ -462,6 +439,7 @@ function persistConnectedScope(ctx, deps, chatId, captured, correlationId) {
|
|
|
462
439
|
return errResult(503, "GIT_CHANGE_ENGINE_UNAVAILABLE");
|
|
463
440
|
const now = Date.now();
|
|
464
441
|
const scope = buildScope(mutation.relationship.id, captured.snapshot, captured.remoteDigest, captured.prNumber, now);
|
|
442
|
+
const previous = deps.store.findChatById(chatId);
|
|
465
443
|
let chat;
|
|
466
444
|
try {
|
|
467
445
|
// Appends against the list as it is at write time, not against the array captured before
|
|
@@ -481,6 +459,7 @@ function persistConnectedScope(ctx, deps, chatId, captured, correlationId) {
|
|
|
481
459
|
}
|
|
482
460
|
throw error;
|
|
483
461
|
}
|
|
462
|
+
interruptChangedChatGenerations(deps, previous, chat, correlationId);
|
|
484
463
|
logGitChangeConnected(deps, correlationId, scope);
|
|
485
464
|
const result = { status: "connected", scope, chat };
|
|
486
465
|
return { status: 200, body: result };
|
|
@@ -596,11 +575,13 @@ function persistStaleScope(ctx, deps, chatId, found, captured, correlationId) {
|
|
|
596
575
|
...buildScope(mutation.relationship.id, captured.snapshot, captured.remoteDigest, found.scope.pullRequestNumber, found.scope.connectedAtMs),
|
|
597
576
|
descriptionStatus: "stale",
|
|
598
577
|
};
|
|
578
|
+
const previous = deps.store.findChatById(chatId);
|
|
599
579
|
const committed = replaceStaleScope(deps, workspaceId, chatId, found, staleScope);
|
|
600
580
|
if (!("chat" in committed)) {
|
|
601
581
|
logGitChangeBlocked(deps, correlationId, "relationship-conflict");
|
|
602
582
|
return committed;
|
|
603
583
|
}
|
|
584
|
+
interruptChangedChatGenerations(deps, previous, committed.chat, correlationId);
|
|
604
585
|
logGitChangeStale(deps, correlationId, staleScope);
|
|
605
586
|
const result = {
|
|
606
587
|
status: "stale",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grounded-answer-repair.d.ts","sourceRoot":"","sources":["../src/grounded-answer-repair.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAU9B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAClB,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,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IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAClB,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC,GACtF,SAAS,CAAC;IACd,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,IAAI,CACjB,gBAAgB,EAChB,QAAQ,GAAG,2BAA2B,GAAG,0BAA0B,CACpE,GAAG;QACF,QAAQ,CAAC,QAAQ,CAAC,EACd,IAAI,CACF,gBAAgB,EACd,QAAQ,GACR,yBAAyB,GACzB,uBAAuB,GACvB,0BAA0B,GAC1B,+BAA+B,GAC/B,yBAAyB,CAC5B,GACD,SAAS,CAAC;KACf,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AACD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAsED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,qBAAqB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAkB/B;AA4BD,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,qBAAqB,GAAG,oBAAoB,CAKjG"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { findCitationMarkerGroups } from "@oscharko-dev/keiko-contracts/runtime/citation-markers";
|
|
2
2
|
import { normalizeGroundedAnswerPayload, combinedGroundedSynthesisFields, retainFailedGroundedSynthesis, } from "./grounded-answer.js";
|
|
3
3
|
import { buildPackCitationIndex, groundedAnswerSourceText, parseInlineCitations, reconcileInlineCitations, reconcileNumericCitations, } from "./grounded-faithfulness.js";
|
|
4
|
-
import { validateCitationRepair } from "./grounded-citation-repair.js";
|
|
4
|
+
import { fitsCitationRepairTextLimit, validateCitationRepair } from "./grounded-citation-repair.js";
|
|
5
5
|
function repairDisposition(ctx) {
|
|
6
6
|
if (!hasSubstantiveEvidenceAnswer(ctx))
|
|
7
7
|
return "not-needed";
|
|
8
8
|
if (hasParsedRepairCitations(ctx))
|
|
9
9
|
return "not-needed";
|
|
10
|
+
if (!fitsCitationRepairTextLimit(ctx.answer.content))
|
|
11
|
+
return "skipped-capability";
|
|
10
12
|
if (repairInvoker(ctx) === undefined)
|
|
11
13
|
return "skipped-capability";
|
|
12
14
|
if (ctx.deps.answerer?.remainingSynthesisCalls?.() === 0)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PackCitationIndex } from "./grounded-faithfulness.js";
|
|
2
|
+
export declare function fitsCitationRepairTextLimit(text: string): boolean;
|
|
2
3
|
export declare function buildCitationRepairPrompt(answerText: string, kind?: "file" | "numeric"): string;
|
|
3
4
|
export declare function validateCitationRepair(original: string, repaired: string, index: PackCitationIndex, numericMarkers?: ReadonlySet<number>): boolean;
|
|
4
5
|
//# sourceMappingURL=grounded-citation-repair.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grounded-citation-repair.d.ts","sourceRoot":"","sources":["../src/grounded-citation-repair.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"grounded-citation-repair.d.ts","sourceRoot":"","sources":["../src/grounded-citation-repair.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AAOpC,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjE;AAOD,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,MAAM,GAAG,SAAkB,GAChC,MAAM,CAQR;AAyFD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,iBAAiB,EACxB,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,OAAO,CAWT"}
|
|
@@ -5,6 +5,9 @@ const REPAIR_TEXT_MAX = 131_072;
|
|
|
5
5
|
const INSERTION_MAX = 32;
|
|
6
6
|
const MARKER_BODY_LENGTH_RE = /^.{1,512}$/su;
|
|
7
7
|
const PADDING_MAX = 16;
|
|
8
|
+
export function fitsCitationRepairTextLimit(text) {
|
|
9
|
+
return text.length <= REPAIR_TEXT_MAX;
|
|
10
|
+
}
|
|
8
11
|
export function buildCitationRepairPrompt(answerText, kind = "file") {
|
|
9
12
|
return [
|
|
10
13
|
`Return the original answer verbatim; only insert supported ${kind === "file" ? "[path:line-range]" : "[n]"} citation markers.`,
|
|
@@ -98,7 +101,7 @@ function unchangedWithInsertions(original, repaired, insertions) {
|
|
|
98
101
|
return left === original.length && inserted > 0;
|
|
99
102
|
}
|
|
100
103
|
export function validateCitationRepair(original, repaired, index, numericMarkers) {
|
|
101
|
-
if (original
|
|
104
|
+
if (!fitsCitationRepairTextLimit(original) || !fitsCitationRepairTextLimit(repaired))
|
|
102
105
|
return false;
|
|
103
106
|
if (splitOwnAssessment(original).assessment !== splitOwnAssessment(repaired).assessment)
|
|
104
107
|
return false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ContextPackDiagnostics, type EvidenceAtom } from "@oscharko-dev/keiko-contracts/connected-context";
|
|
2
2
|
import type { ContentEvidenceIdentity } from "./grounded-evidence-selection.js";
|
|
3
3
|
export interface ContextualFallbackCandidate extends ContentEvidenceIdentity {
|
|
4
4
|
readonly scopePath: string;
|
|
@@ -7,4 +7,6 @@ export interface ContextualFallbackCandidate extends ContentEvidenceIdentity {
|
|
|
7
7
|
export declare function captureContextualFallbackCandidates(atoms: readonly EvidenceAtom[], diagnostics: ContextPackDiagnostics | undefined): readonly ContextualFallbackCandidate[];
|
|
8
8
|
/** An omitted/replaced atom or a different query cannot inherit the earlier producer's position. */
|
|
9
9
|
export declare function currentContextualFallbackOrder(candidates: readonly ContextualFallbackCandidate[], atoms: readonly EvidenceAtom[]): readonly string[];
|
|
10
|
+
/** A peer must match the same query groups, not merely the same number of unrelated groups. */
|
|
11
|
+
export declare function currentContextualFallbackGroups(candidates: readonly ContextualFallbackCandidate[], atoms: readonly EvidenceAtom[]): ReadonlyMap<string, string>;
|
|
10
12
|
//# sourceMappingURL=grounded-contextual-fallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grounded-contextual-fallback.d.ts","sourceRoot":"","sources":["../src/grounded-contextual-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"grounded-contextual-fallback.d.ts","sourceRoot":"","sources":["../src/grounded-contextual-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAClB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AA2BD,8FAA8F;AAC9F,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,WAAW,EAAE,sBAAsB,GAAG,SAAS,GAC9C,SAAS,2BAA2B,EAAE,CAqBxC;AAoBD,oGAAoG;AACpG,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,SAAS,2BAA2B,EAAE,EAClD,KAAK,EAAE,SAAS,YAAY,EAAE,GAC7B,SAAS,MAAM,EAAE,CAEnB;AAED,+FAA+F;AAC/F,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,SAAS,2BAA2B,EAAE,EAClD,KAAK,EAAE,SAAS,YAAY,EAAE,GAC7B,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAW7B"}
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import { isLexicalQueryGroupKey, } from "@oscharko-dev/keiko-contracts/connected-context";
|
|
2
|
+
function contentPeerIdentity(atom) {
|
|
3
|
+
const group = atom.metrics?.lexicalQueryGroupKey;
|
|
4
|
+
return isLexicalQueryGroupKey(group)
|
|
5
|
+
? JSON.stringify([atom.provenance.queryFingerprint, group])
|
|
6
|
+
: undefined;
|
|
7
|
+
}
|
|
8
|
+
function withRetainedContentPeers(ranked, retained) {
|
|
9
|
+
const rankedPaths = new Set(ranked.map((atom) => atom.scopePath));
|
|
10
|
+
const groups = new Set(ranked.flatMap((atom) => contentPeerIdentity(atom) ?? []));
|
|
11
|
+
// Diagnostics show only a bounded preview. A retained same-query content peer must not
|
|
12
|
+
// disappear merely because generic path matches fill that preview. Keep its seeds first;
|
|
13
|
+
// additional peers keep producer order and still face the existing final three-file grant.
|
|
14
|
+
return [
|
|
15
|
+
...ranked,
|
|
16
|
+
...[...retained.values()].filter((atom) => {
|
|
17
|
+
const identity = contentPeerIdentity(atom);
|
|
18
|
+
return !rankedPaths.has(atom.scopePath) && identity !== undefined && groups.has(identity);
|
|
19
|
+
}),
|
|
20
|
+
];
|
|
21
|
+
}
|
|
1
22
|
/** Capture the lexical producer's ordering with its actual same-search content identities. */
|
|
2
23
|
export function captureContextualFallbackCandidates(atoms, diagnostics) {
|
|
3
24
|
if (atoms.some((atom) => atom.provenance.tool.startsWith("repo.semanticSearch")))
|
|
@@ -10,32 +31,43 @@ export function captureContextualFallbackCandidates(atoms, diagnostics) {
|
|
|
10
31
|
!byPath.has(atom.scopePath))
|
|
11
32
|
byPath.set(atom.scopePath, atom);
|
|
12
33
|
}
|
|
13
|
-
|
|
34
|
+
const ranked = (diagnostics?.rankedCandidates ?? []).flatMap((candidate) => {
|
|
14
35
|
const atom = byPath.get(candidate.scopePath);
|
|
15
|
-
return atom === undefined
|
|
16
|
-
? []
|
|
17
|
-
: [
|
|
18
|
-
{
|
|
19
|
-
scopePath: atom.scopePath,
|
|
20
|
-
stableId: atom.stableId,
|
|
21
|
-
queryFingerprint: atom.provenance.queryFingerprint,
|
|
22
|
-
},
|
|
23
|
-
];
|
|
36
|
+
return atom === undefined ? [] : [atom];
|
|
24
37
|
});
|
|
38
|
+
return withRetainedContentPeers(ranked, byPath).map((atom) => ({
|
|
39
|
+
scopePath: atom.scopePath,
|
|
40
|
+
stableId: atom.stableId,
|
|
41
|
+
queryFingerprint: atom.provenance.queryFingerprint,
|
|
42
|
+
}));
|
|
25
43
|
}
|
|
26
|
-
|
|
27
|
-
export function currentContextualFallbackOrder(candidates, atoms) {
|
|
44
|
+
function currentContextualFallbackAtoms(candidates, atoms) {
|
|
28
45
|
if (atoms.some((atom) => atom.provenance.tool.startsWith("repo.semanticSearch")))
|
|
29
46
|
return [];
|
|
30
47
|
const current = new Map(atoms.map((atom) => [atom.stableId, atom]));
|
|
31
|
-
return candidates
|
|
32
|
-
.filter((candidate) => {
|
|
48
|
+
return candidates.flatMap((candidate) => {
|
|
33
49
|
const atom = current.get(candidate.stableId);
|
|
34
|
-
return
|
|
50
|
+
return atom?.scopePath === candidate.scopePath &&
|
|
35
51
|
atom.lineRange !== undefined &&
|
|
36
52
|
atom.provenance.kind === "lexical-search" &&
|
|
37
53
|
atom.provenance.tool === "repo.searchText" &&
|
|
38
|
-
atom.provenance.queryFingerprint === candidate.queryFingerprint
|
|
39
|
-
|
|
40
|
-
|
|
54
|
+
atom.provenance.queryFingerprint === candidate.queryFingerprint
|
|
55
|
+
? [atom]
|
|
56
|
+
: [];
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** An omitted/replaced atom or a different query cannot inherit the earlier producer's position. */
|
|
60
|
+
export function currentContextualFallbackOrder(candidates, atoms) {
|
|
61
|
+
return currentContextualFallbackAtoms(candidates, atoms).map((atom) => atom.scopePath);
|
|
62
|
+
}
|
|
63
|
+
/** A peer must match the same query groups, not merely the same number of unrelated groups. */
|
|
64
|
+
export function currentContextualFallbackGroups(candidates, atoms) {
|
|
65
|
+
const current = currentContextualFallbackAtoms(candidates, atoms);
|
|
66
|
+
if (new Set(current.map((atom) => atom.provenance.queryFingerprint)).size !== 1) {
|
|
67
|
+
return new Map();
|
|
68
|
+
}
|
|
69
|
+
return new Map(current.flatMap((atom) => {
|
|
70
|
+
const group = atom.metrics?.lexicalQueryGroupKey;
|
|
71
|
+
return group === undefined ? [] : [[atom.scopePath, group]];
|
|
72
|
+
}));
|
|
41
73
|
}
|
package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grounded-diagnostic-references.d.ts","sourceRoot":"","sources":["../src/grounded-diagnostic-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,iDAAiD,CAAC;AAEzD,OAAO,
|
|
1
|
+
{"version":3,"file":"grounded-diagnostic-references.d.ts","sourceRoot":"","sources":["../src/grounded-diagnostic-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAA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ClC,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,KAAK,+BAA+B,CAAC;IAChG,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,OAAO,CAAC;IAC7C,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpE,QAAQ,CAAC,uBAAuB,EAAE,8BAA8B,CAAC,yBAAyB,CAAC,CAAC;CAC7F;AAqFD,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC;IAC1F,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,8BAA8B,CAAC;CACtD,CAAC,CAiCD"}
|
|
@@ -2,7 +2,7 @@ import { isPathWithinSelectedScope, } from "@oscharko-dev/keiko-contracts/connec
|
|
|
2
2
|
import { extractRetrievalChannels, } from "@oscharko-dev/keiko-workflows";
|
|
3
3
|
import { testSourcePairingAdapter, } from "@oscharko-dev/keiko-workspace/code-intelligence";
|
|
4
4
|
import { GROUNDED_TRACE_SEARCH_LIMITS } from "./grounded-symbol-trace.js";
|
|
5
|
-
import { admitExplicitPaths, normalizedExplicitReferencePath, EXPLICIT_PATH_REJECTION_REASONS, } from "./grounded-explicit-paths.js";
|
|
5
|
+
import { admitExplicitPaths, explicitPathReferences, normalizedExplicitReferencePath, EXPLICIT_PATH_REJECTION_REASONS, } from "./grounded-explicit-paths.js";
|
|
6
6
|
function mergedAdmission(a, b) {
|
|
7
7
|
const selections = [...a.selections, ...b.selections];
|
|
8
8
|
return {
|
|
@@ -45,8 +45,24 @@ function frameWithinSelectedScope(reference, inputs, admission) {
|
|
|
45
45
|
}
|
|
46
46
|
return isPathWithinSelectedScope(inputs.scope, new Set(inputs.scope.relativePaths), path);
|
|
47
47
|
}
|
|
48
|
+
function sourceAdmissionReferences(planned, questionText) {
|
|
49
|
+
if (planned === undefined)
|
|
50
|
+
return undefined;
|
|
51
|
+
const primary = planned[0]?.origin === "diagnostic" ? planned.slice(0, 1) : [];
|
|
52
|
+
const references = [...primary, ...explicitPathReferences(questionText), ...planned];
|
|
53
|
+
const seen = new Set();
|
|
54
|
+
return references.filter((reference) => {
|
|
55
|
+
const identity = `${reference.path}:${String(reference.line ?? "")}`;
|
|
56
|
+
if (seen.has(identity))
|
|
57
|
+
return false;
|
|
58
|
+
seen.add(identity);
|
|
59
|
+
return true;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
48
62
|
export async function admitDiagnosticReferences(inputs) {
|
|
49
|
-
const
|
|
63
|
+
const channels = extractRetrievalChannels(inputs.query.text, 8);
|
|
64
|
+
const references = sourceAdmissionReferences(inputs.plan.references, channels.questionText);
|
|
65
|
+
const admission = await admitExplicitPaths({ ...inputs, references });
|
|
50
66
|
const diagnostic = admission.selections.filter((reference) => reference.origin === "diagnostic");
|
|
51
67
|
const pairs = await primaryDiagnosticPair(inputs, diagnostic[0], admission.selections.map((selection) => selection.path));
|
|
52
68
|
const existing = new Set(admission.selections.map((reference) => reference.path));
|
|
@@ -56,7 +72,6 @@ export async function admitDiagnosticReferences(inputs) {
|
|
|
56
72
|
.filter((atom) => !existing.has(atom.scopePath))
|
|
57
73
|
.map((atom) => ({ path: atom.scopePath, origin: "diagnostic" })),
|
|
58
74
|
});
|
|
59
|
-
const channels = extractRetrievalChannels(inputs.query.text, 8);
|
|
60
75
|
return {
|
|
61
76
|
admission: mergedAdmission(admission, paired),
|
|
62
77
|
observation: {
|