wednesdayai 0.4.12-dev.715 → 0.4.12-dev.717
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/{agent-turn-enqueue-Dwz_R_DW.js → agent-turn-enqueue-Cqo34Swm.js} +4 -4
- package/dist/{agent-turn-enqueue-Da7B-J9y.js → agent-turn-enqueue-N-q0v3mc.js} +4 -4
- package/dist/{agent-turn-execute-DvP2nf2J.js → agent-turn-execute-Bw9hhkAP.js} +69 -24
- package/dist/{agent-turn-recovery-adapter-SdyNUgzD.js → agent-turn-recovery-adapter-BkIal4FW.js} +1 -1
- package/dist/{agent-turn-recovery-adapter-DF3vdyE5.js → agent-turn-recovery-adapter-CLY2Dn04.js} +1 -1
- package/dist/{agent-turn-runner-D20dK54z.js → agent-turn-runner-BsdyAURQ.js} +1 -1
- package/dist/{agent-turn-runner-CzcuyJfX.js → agent-turn-runner-CImqp_RN.js} +1 -1
- package/dist/{agent-turn-runner-PbFFnq5P.js → agent-turn-runner-CUCOdxhH.js} +1 -1
- package/dist/{agent-turn-runner-DFZxbjaC.js → agent-turn-runner-Vd3aTCni.js} +1 -1
- package/dist/{agents-D7wjsCEZ.js → agents-BBoIqOw6.js} +4 -4
- package/dist/{agents.config-iUjxdoPw.js → agents.config-C8RJrfbr.js} +1 -1
- package/dist/{agents.config-C-pTu-0T.js → agents.config-Ctnm8o8d.js} +1 -1
- package/dist/{audio-preflight-nrbQcAOS.js → audio-preflight-BKQpd1eU.js} +6 -6
- package/dist/{audio-preflight-BZFphz4E.js → audio-preflight-bEi-KkBn.js} +6 -6
- package/dist/{audio-transcription-runner-C2Q9mEhB.js → audio-transcription-runner-BD7UgbNj.js} +1 -1
- package/dist/{audio-transcription-runner-D-d42kdt.js → audio-transcription-runner-CGTNNwbm.js} +1 -1
- package/dist/{audit-BlUclRcb.js → audit-BM8WZyx6.js} +3 -3
- package/dist/{audit-C_g-UVNn.js → audit-CcNEpaG6.js} +3 -3
- package/dist/{auth-choice-ZsDU-57A.js → auth-choice-DTg-b2da.js} +1 -1
- package/dist/{auth-choice-D9ydQCkO.js → auth-choice-VnJYar-i.js} +1 -1
- package/dist/{banner-U4ziIXHD.js → banner-_g-nCJoZ.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +2 -2
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-IkZTBShY.js → channel-options-BX8MFfPW.js} +1 -1
- package/dist/{channel-options-CdXOmeJN.js → channel-options-Dod3uWTl.js} +1 -1
- package/dist/{channels-cli-CUTJf_vC.js → channels-cli-DyfFtAZa.js} +23 -23
- package/dist/{channels-cli-CBBGSlVe.js → channels-cli-MbAArXF1.js} +23 -23
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-DCyFadMx.js → cli-CdrO5h4P.js} +17 -17
- package/dist/{cli-BtY_juql.js → cli-DF91S8Cf.js} +17 -17
- package/dist/{command-queue-B1RxJ6bM.js → command-queue-DmXWCoY0.js} +1 -1
- package/dist/{command-queue-6Jucg1io.js → command-queue-URs9pYSC.js} +1 -1
- package/dist/{command-registry-BMq2CUSD.js → command-registry-C7nkhshN.js} +9 -9
- package/dist/{completion-cli-CATJLvVa.js → completion-cli-CjPs9az4.js} +2 -2
- package/dist/{completion-cli-Dbszfn8D.js → completion-cli-DozvikmZ.js} +1 -1
- package/dist/{config-cli-3a-9iNyI.js → config-cli-Dagtz6FG.js} +1 -1
- package/dist/{config-cli-O9P0EpgL.js → config-cli-Dv1Dad57.js} +1 -1
- package/dist/config.js +9 -9
- package/dist/{configure-DAA_ncD3.js → configure-BbKf530X.js} +5 -5
- package/dist/{configure-Dld8IaT8.js → configure-CBJSHejz.js} +5 -5
- package/dist/{daemon-cli-B3Q460ai.js → daemon-cli-CiPY543O.js} +5 -5
- package/dist/{daemon-cli-C5cAb15Z.js → daemon-cli-YmPcKhvo.js} +5 -5
- package/dist/daemon-cli.js +44 -3
- package/dist/{daemon-install-DGU1qIIK.js → daemon-install-BuETscSF.js} +3 -3
- package/dist/{daemon-install-CBIxgo4p.js → daemon-install-CGg5r1wy.js} +3 -3
- package/dist/{deliver-Bhlx9VG9.js → deliver-8xg5ISEI.js} +1 -1
- package/dist/{deliver-DT4v-Go0.js → deliver-C5SDo7TP.js} +1 -1
- package/dist/{diagnostic-BTSirPP0.js → diagnostic-D7DvV7NT.js} +1 -1
- package/dist/{diagnostic-DRvqMPW7.js → diagnostic-Dv8UWiI0.js} +1 -1
- package/dist/{diagnostics-C4-TUVnm.js → diagnostics-C6ntZHc3.js} +1 -1
- package/dist/{diagnostics-FIcvxigK.js → diagnostics-Ds3p_NPY.js} +1 -1
- package/dist/{dm-policy-shared-BE04dZam.js → dm-policy-shared-BLJbsZzf.js} +1 -1
- package/dist/{doctor-completion-BJpzpRx6.js → doctor-completion-CJYV2FQ5.js} +1 -1
- package/dist/{doctor-completion-Ca_SREXp.js → doctor-completion-D4T2GzR7.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{exec-approvals-cli-t7rAulRf.js → exec-approvals-cli-BAJ3sxzP.js} +3 -3
- package/dist/{exec-approvals-cli-DsXabPF_.js → exec-approvals-cli-DIUYxvM0.js} +3 -3
- package/dist/extensionAPI.js +2 -2
- package/dist/{gateway-cli-BTuK5wC4.js → gateway-cli-Cyivh-5T.js} +121 -84
- package/dist/{gateway-cli-BYqWX_fq.js → gateway-cli-DtFDQj5d.js} +121 -84
- package/dist/{health-fB9rLTPD.js → health-Cooqit6V.js} +2 -2
- package/dist/{health-DFWpyp9O.js → health-DFat5vO5.js} +2 -2
- package/dist/{hooks-cli-DKZeKlmX.js → hooks-cli-CB-96Su8.js} +19 -19
- package/dist/{hooks-cli-CriP6g_q.js → hooks-cli-yNAgxRQS.js} +19 -19
- package/dist/index.js +21 -21
- package/dist/{inspect-DVHAPbcZ.js → inspect-BXlZnWkg.js} +1 -1
- package/dist/{inspect-gvjq38z1.js → inspect-LfUprDjx.js} +1 -1
- package/dist/{installs-CBHXvqKf.js → installs-CdLdL1gD.js} +1 -1
- package/dist/{installs-CnAcm0ba.js → installs-CpnJwZZ_.js} +1 -1
- package/dist/{lifecycle-core-BdCcww82.js → lifecycle-core-CuMY0U_8.js} +3 -3
- package/dist/{lifecycle-core-B3-ezmTx.js → lifecycle-core-M-5Z8Xml.js} +3 -3
- package/dist/llm-slug-generator.js +2 -2
- package/dist/{models-DXRXVywP.js → models-Dlat36jl.js} +1 -1
- package/dist/{models-cli-C7bSvLGL.js → models-cli-DMjHkAqq.js} +17 -17
- package/dist/{models-cli-h6ejcNF7.js → models-cli-vjFaOcNS.js} +18 -18
- package/dist/{node-cli-CS8E71Vc.js → node-cli-Csimlxec.js} +8 -8
- package/dist/{node-cli-CPo0jR3t.js → node-cli-dh4qWKpT.js} +8 -8
- package/dist/{node-service-BnwLXY5x.js → node-service-BnyKZNqa.js} +1 -1
- package/dist/{node-service-r64yexlb.js → node-service-Ys7JZFz-.js} +1 -1
- package/dist/{npm-pack-install-CFiN84Qw.js → npm-pack-install-B7wQANiM.js} +1 -1
- package/dist/{npm-pack-install-bdyXL1bZ.js → npm-pack-install-DcBobJp3.js} +1 -1
- package/dist/{npm-resolution-CaEc_FBL.js → npm-resolution-B0rqOBgy.js} +2 -2
- package/dist/{npm-resolution-B7regLLc.js → npm-resolution-SdoNL0ud.js} +2 -2
- package/dist/{onboard-B1WwaAdf.js → onboard-DuNuHUvh.js} +3 -3
- package/dist/{onboard-B_6H9HpS.js → onboard-_pVU_O8s.js} +3 -3
- package/dist/{onboard-channels-BWrbGzK9.js → onboard-channels-28JqVvAv.js} +2 -2
- package/dist/{onboard-channels-CxiuviBR.js → onboard-channels-P7F-dNwm.js} +2 -2
- package/dist/{onboarding-DemzhSFH.js → onboarding-BBb8ZbfX.js} +3 -3
- package/dist/{onboarding-D9VO9_5U.js → onboarding-BcI8N4WK.js} +3 -3
- package/dist/{onboarding.finalize-C8Pqseaq.js → onboarding.finalize-BXkz7oPa.js} +26 -26
- package/dist/{onboarding.finalize-DeJ35Prz.js → onboarding.finalize-D9fyrhAS.js} +25 -25
- package/dist/{operator-commands-Dwtv8SyF.js → operator-commands-CIz47IKl.js} +2 -2
- package/dist/{operator-commands-BRKxpjt9.js → operator-commands-CtYCnspr.js} +2 -2
- package/dist/{pi-embedded-BcRvgwKi.js → pi-embedded-Qyba-Rws.js} +22 -1
- package/dist/{pi-embedded-helpers-D19zTumt.js → pi-embedded-helpers-BU47jdPO.js} +1 -1
- package/dist/{pi-embedded-helpers-DEHXX7Dr.js → pi-embedded-helpers-i0-tPaxH.js} +1 -1
- package/dist/{pi-embedded-recovery-adapter-MaU4SQ3X.js → pi-embedded-recovery-adapter-1Lgt8q1h.js} +2 -2
- package/dist/{pi-embedded-recovery-adapter-licel-RD.js → pi-embedded-recovery-adapter-B2AFWrYt.js} +2 -2
- package/dist/{pi-embedded-recovery-adapter-ZV9u5snz.js → pi-embedded-recovery-adapter-CNdSU-s7.js} +8 -8
- package/dist/{pi-embedded-recovery-adapter-DB4blfKA.js → pi-embedded-recovery-adapter-DL78oCTf.js} +8 -8
- package/dist/{pi-embedded-utils-oIHgFob3.js → pi-embedded-utils-8OzPnJMh.js} +1 -1
- package/dist/{pi-embedded-utils-BhOMYPQU.js → pi-embedded-utils-BtOzugyp.js} +1 -1
- package/dist/{pi-embedded-DsDG-ETP.js → pi-embedded-wjGM_bNN.js} +22 -1
- package/dist/{pi-tools.policy-4GqIom7_.js → pi-tools.policy-DPm2eos4.js} +1 -1
- package/dist/{plugin-registry-CxDNClOG.js → plugin-registry-CC8YsXPr.js} +1 -1
- package/dist/{plugin-registry-alYBvHFE.js → plugin-registry-CPS5bO_-.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BLF4nZUv.js → agent-scope-BYp_CjdU.js} +2 -2
- package/dist/plugin-sdk/{agent-scope-BQYVQxfQ.js → agent-scope-DU8uJiiv.js} +2 -2
- package/dist/plugin-sdk/agent-turn-execute-BCE3FS2s.js +61 -0
- package/dist/plugin-sdk/agent-turn-execute-DIrSWfHZ.js +61 -0
- package/dist/plugin-sdk/{agent-turn-runner-YBWX_qXk.js → agent-turn-runner-B9_FKVSu.js} +6 -6
- package/dist/plugin-sdk/{agent-turn-runner-CDA8JPSH.js → agent-turn-runner-CmDXH4Z8.js} +6 -6
- package/dist/plugin-sdk/agent-turn-runner-gf0ARmuP.js +11 -0
- package/dist/plugin-sdk/{api-key-rotation-XDUKz2gd.js → api-key-rotation-CDNf_4cI.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-BW3rq9Tg.js → api-key-rotation-Oe0hkmVQ.js} +2 -2
- package/dist/plugin-sdk/{artifacts-HAYpGlG1.js → artifacts-BMLMg3MG.js} +1 -1
- package/dist/plugin-sdk/{artifacts-C8xK4Y3e.js → artifacts-Dk-7TtTn.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Bi8RI9zM.js → audio-preflight-8hRbl8Io.js} +22 -22
- package/dist/plugin-sdk/{audio-preflight-BS29OWk3.js → audio-preflight-BmKL6FNP.js} +2 -2
- package/dist/plugin-sdk/audio-preflight-DlGohKMs.js +28 -0
- package/dist/plugin-sdk/{audio-transcription-runner-CGgNZVZv.js → audio-transcription-runner-CUsZFiEA.js} +11 -11
- package/dist/plugin-sdk/{audio-transcription-runner-BNafitZj.js → audio-transcription-runner-TBjJv_mZ.js} +10 -10
- package/dist/plugin-sdk/{auth-profiles-CCJQoedi.js → auth-profiles-DHZjW8Vk.js} +5 -5
- package/dist/plugin-sdk/{auth-profiles-CIKTWees.js → auth-profiles-OgKl-vr-.js} +5 -5
- package/dist/plugin-sdk/{channel-activity-BKwRzYJb.js → channel-activity-Dr4PYej7.js} +3 -3
- package/dist/plugin-sdk/{channel-activity-Ck83U_es.js → channel-activity-OIauZrkN.js} +3 -3
- package/dist/plugin-sdk/{chrome-D0eLSqkP.js → chrome-BDy1zYAr.js} +4 -4
- package/dist/plugin-sdk/{chrome-CT_6RvJg.js → chrome-VZ0Zuu2w.js} +4 -4
- package/dist/plugin-sdk/{chunk-DI-5pBck.js → chunk-BTSnO1wn.js} +6 -6
- package/dist/plugin-sdk/{chunk-D6yDhUpF.js → chunk-BWz-lIzS.js} +4 -4
- package/dist/plugin-sdk/{chunk-CDvvv9SU.js → chunk-DGQdf0JN.js} +3 -3
- package/dist/plugin-sdk/{command-detection-B3xgM_Na.js → command-detection-DdTnFMU3.js} +106 -85
- package/dist/plugin-sdk/{command-queue-BnJsJc_w.js → command-queue-CeaLVs8O.js} +8 -8
- package/dist/plugin-sdk/{command-queue-CHiQj9Ji.js → command-queue-DFSOdqCK.js} +1 -1
- package/dist/plugin-sdk/{command-queue-DH8k55DC.js → command-queue-D_UFlrwC.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-Do_g2It_.js → commands-registry-8sy0wsK_.js} +6 -6
- package/dist/plugin-sdk/{commands-registry-DpLk11E7.js → commands-registry-N6f_lsxF.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-DuwlD_aI.js → commands-registry-XW2hmbAE.js} +3 -3
- package/dist/plugin-sdk/{config-CQNfmIC8.js → config-Biusjzx-.js} +7 -7
- package/dist/plugin-sdk/{deliver-_UyigkEK.js → deliver-B7W4NNsR.js} +11 -11
- package/dist/plugin-sdk/{deliver-L6eu6zyG.js → deliver-BgHA8c9F.js} +11 -11
- package/dist/plugin-sdk/deliver-CJP9TznW.js +32 -0
- package/dist/plugin-sdk/deliver-DBCz1GqU.js +32 -0
- package/dist/plugin-sdk/{diagnostic-Dk57KVjE.js → diagnostic-BRUM6uNI.js} +7 -7
- package/dist/plugin-sdk/{diagnostic-DfxuMWHd.js → diagnostic-Bni_8VyY.js} +7 -7
- package/dist/plugin-sdk/{diagnostic-C7lPoqyv.js → diagnostic-D6hSjxiv.js} +5 -5
- package/dist/plugin-sdk/{diagnostic-session-state-BjuWxrAM.js → diagnostic-session-state-BsHrQ7U3.js} +1 -1
- package/dist/plugin-sdk/{fetch-D1jXg-ju.js → fetch-C1vgNaXJ.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-DnwfMurj.js → fetch-guard-B2Wnl9Vi.js} +4 -4
- package/dist/plugin-sdk/{fetch-guard-CZT8FU1i.js → fetch-guard-C1a1KfEb.js} +3 -3
- package/dist/plugin-sdk/{fetch-DFZXuu3W.js → fetch-hEreHolP.js} +7 -7
- package/dist/plugin-sdk/{fetch-timeout-D7XVWfxj.js → fetch-timeout-A1m6BOhm.js} +1 -1
- package/dist/plugin-sdk/{fs-safe-B0JgGdXa.js → fs-safe-CbZ6uRVv.js} +3 -3
- package/dist/plugin-sdk/{fs-safe-BQ5cHy9G.js → fs-safe-ClebEeLz.js} +3 -3
- package/dist/plugin-sdk/{hook-runner-global-WRI53ibi.js → hook-runner-global-BvxlnAyu.js} +3 -3
- package/dist/plugin-sdk/{image-ops-0TjWNKUx.js → image-ops-Bm03YsK2.js} +1 -1
- package/dist/plugin-sdk/{image-ops-kuILYHZv.js → image-ops-DY_SZfXk.js} +1 -1
- package/dist/plugin-sdk/{inbound-context-Bfr5DkdO.js → inbound-context-Cmgtf5my.js} +1 -1
- package/dist/plugin-sdk/index.js +54 -54
- package/dist/plugin-sdk/{ir-CbL0sVL2.js → ir-1CthVxHv.js} +5 -5
- package/dist/plugin-sdk/{ir-Bm7oqkwT.js → ir-BNohi6ZW.js} +5 -5
- package/dist/plugin-sdk/{local-roots-D-CHzVr1.js → local-roots-Bm7nDW20.js} +7 -7
- package/dist/plugin-sdk/{logger-D5s3kiib.js → logger-BkzoyfHW.js} +1 -1
- package/dist/plugin-sdk/{logger-BSK-0Yjx.js → logger-D6KsqbNW.js} +1 -1
- package/dist/plugin-sdk/{manager-D2jffdjH.js → manager-B_vK9MbM.js} +8 -8
- package/dist/plugin-sdk/manager-ByaW_O4Y.js +16 -0
- package/dist/plugin-sdk/{manager-CHBt3PC-.js → manager-C4CJpRd9.js} +8 -8
- package/dist/plugin-sdk/manager-CPcI0Fhz.js +16 -0
- package/dist/plugin-sdk/{markdown-tables-CBGsimjo.js → markdown-tables-DZM4NfLU.js} +3 -3
- package/dist/plugin-sdk/{markdown-tables-DIWQQ2W1.js → markdown-tables-G4vK24xc.js} +2 -2
- package/dist/plugin-sdk/markdown-tables-J4hZ7eWU.js +10 -0
- package/dist/plugin-sdk/{outbound-attachment-CtKKNyms.js → outbound-attachment-Cw7T2Mrt.js} +2 -2
- package/dist/plugin-sdk/{outbound-attachment-C5x2htXW.js → outbound-attachment-GMgXpDQm.js} +2 -2
- package/dist/plugin-sdk/{outbound-message-hooks-2YmJP9k-.js → outbound-message-hooks-BUHUdpjM.js} +3 -3
- package/dist/plugin-sdk/{path-alias-guards-CHfCMaeX.js → path-alias-guards-CVybi_GQ.js} +1 -1
- package/dist/plugin-sdk/{path-alias-guards-BIPHhakQ.js → path-alias-guards-Dft7g-_v.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-CELD3Ns3.js → pi-embedded-helpers-B-OOYT64.js} +11 -11
- package/dist/plugin-sdk/{pi-embedded-helpers-BRymkO_1.js → pi-embedded-helpers-B_jgacW8.js} +11 -11
- package/dist/plugin-sdk/{pi-embedded-utils-AFQ-oCFM.js → pi-embedded-utils-BoSGTbYO.js} +3 -3
- package/dist/plugin-sdk/{pi-embedded-utils-BHmc3RVS.js → pi-embedded-utils-DOXEm_H8.js} +3 -3
- package/dist/plugin-sdk/{pi-model-discovery-C37z3zkx.js → pi-model-discovery-DF6l-F8s.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-6BBajZds.js → pi-model-discovery-DWUrLRLg.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-4X7_2_nP.js → pi-model-discovery-DWw1ReX-.js} +6 -6
- package/dist/plugin-sdk/provider-dispatcher-Byy-KtUn.js +61 -0
- package/dist/plugin-sdk/provider-dispatcher-CAfyX0H-.js +61 -0
- package/dist/plugin-sdk/provider-image-B_dJDOl5.js +22 -0
- package/dist/plugin-sdk/{provider-image-DBye3Ln5.js → provider-image-CEQrHWYz.js} +5 -5
- package/dist/plugin-sdk/provider-image-L_SRDPHU.js +22 -0
- package/dist/plugin-sdk/{provider-image-CbZOYl0b.js → provider-image-zNa1Cccq.js} +5 -5
- package/dist/plugin-sdk/{proxy-DJ2nskkh.js → proxy-BWc9guJs.js} +1 -1
- package/dist/plugin-sdk/{proxy-CjNR_U3u.js → proxy-CXI1ycJj.js} +2 -2
- package/dist/plugin-sdk/proxy-DwbYzxBy.js +7 -0
- package/dist/plugin-sdk/{proxy-env-ubutfW07.js → proxy-env-B3rQCyUO.js} +2 -2
- package/dist/plugin-sdk/{proxy-fetch-CuQpjpkI.js → proxy-fetch-BYkGxQnh.js} +1 -1
- package/dist/plugin-sdk/{proxy-fetch-Cv4b428x.js → proxy-fetch-CNBkczcW.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-BJrhPMHJ.js → pw-ai-DQv6Xhce.js} +10 -10
- package/dist/plugin-sdk/{pw-ai-hVucoF_I.js → pw-ai-JJrE-B1e.js} +10 -10
- package/dist/plugin-sdk/{qmd-manager-Bv5B9pi9.js → qmd-manager-CkQhKIXI.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-DhW_frb3.js → qmd-manager-CpV0SFnY.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-NpBeKA8F.js → query-expansion-CwmHvvV_.js} +3 -3
- package/dist/plugin-sdk/{query-expansion-CWwH9pqd.js → query-expansion-DjZsVofz.js} +3 -3
- package/dist/plugin-sdk/{recorder-C3qdhG-p.js → recorder-BU_faNrp.js} +4 -4
- package/dist/plugin-sdk/{recorder-DdbAQ2HO.js → recorder-BXZMRSjO.js} +4 -4
- package/dist/plugin-sdk/{redact-CUjmZn2Y.js → redact-C88Ryyfs.js} +1 -1
- package/dist/plugin-sdk/{redact-BEcZiZI1.js → redact-CdcLrd0n.js} +1 -1
- package/dist/plugin-sdk/{registry-BXmLBUZj.js → registry-tm0HFWKN.js} +7 -7
- package/dist/plugin-sdk/replies-B9uDLFOE.js +25 -0
- package/dist/plugin-sdk/replies-BFjGWAPs.js +25 -0
- package/dist/plugin-sdk/{replies-CjeAGcJx.js → replies-CS2GXrd-.js} +4 -4
- package/dist/plugin-sdk/{replies-Dw3jvqpR.js → replies-l2hZAzbt.js} +4 -4
- package/dist/plugin-sdk/{reply-directives-BS8Ge06Z.js → reply-directives-BwxzQXmX.js} +2 -2
- package/dist/plugin-sdk/{reply-directives-OuX5Mba_.js → reply-directives-hfOVgXpA.js} +2 -2
- package/dist/plugin-sdk/{reply-prefix-C83iSHUo.js → reply-prefix-BKQgC6Vj.js} +2 -2
- package/dist/plugin-sdk/reply-prefix-BQMEQam1.js +7 -0
- package/dist/plugin-sdk/{reply-prefix-Dt1hESHJ.js → reply-prefix-qLQRxqrf.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-BpLuk-wC.js → resolve-route-50KoArP9.js} +4 -4
- package/dist/plugin-sdk/{resolve-route-DiQTL1qI.js → resolve-route-6v1HVvWk.js} +6 -6
- package/dist/plugin-sdk/{resolve-route-BLBv69wV.js → resolve-route-tqQv32nr.js} +5 -5
- package/dist/plugin-sdk/runs-BQhYekhr.js +25 -0
- package/dist/plugin-sdk/runs-CPA1-H-2.js +25 -0
- package/dist/plugin-sdk/{runs-D6fAvItC.js → runs-CiohhBb8.js} +7 -7
- package/dist/plugin-sdk/{runs-CPWQbljV.js → runs-H2FY7UEk.js} +8 -8
- package/dist/plugin-sdk/{send-CpXGZgrS.js → send-BMSqETcU.js} +6 -6
- package/dist/plugin-sdk/{send-BwoWjRrJ.js → send-BMhuEEtY.js} +9 -9
- package/dist/plugin-sdk/{send-BUAw8fe4.js → send-BjR1QHnz.js} +7 -7
- package/dist/plugin-sdk/{send-B2Kip2qd.js → send-CEtGyK32.js} +8 -8
- package/dist/plugin-sdk/{send-DE9YP1gQ.js → send-CF3PEjRy.js} +14 -14
- package/dist/plugin-sdk/send-CRtSAH8I.js +25 -0
- package/dist/plugin-sdk/send-CeWqZTK0.js +23 -0
- package/dist/plugin-sdk/{send-BDwTyH6I.js → send-Cv2CGnsK.js} +8 -8
- package/dist/plugin-sdk/{send-Ce2XBaKF.js → send-Cx6gHjnA.js} +6 -6
- package/dist/plugin-sdk/send-CzcKgBBf.js +25 -0
- package/dist/plugin-sdk/send-CzxwgKvR.js +27 -0
- package/dist/plugin-sdk/{send-R0HB1-l-.js → send-DG4MQPPm.js} +13 -13
- package/dist/plugin-sdk/{send-CE_6VOiQ.js → send-DM6RpDCL.js} +7 -7
- package/dist/plugin-sdk/{send-GMYUhBtJ.js → send-DO0C4Uva.js} +19 -19
- package/dist/plugin-sdk/{send-D_2cxLLi.js → send-DUJMd2d7.js} +20 -20
- package/dist/plugin-sdk/{send-CfSEKKlU.js → send-DdPdUcD0.js} +6 -6
- package/dist/plugin-sdk/send-DuCB2xbl.js +23 -0
- package/dist/plugin-sdk/send-Dvna5ey-.js +27 -0
- package/dist/plugin-sdk/send-DyYaWr3E.js +24 -0
- package/dist/plugin-sdk/send-xPV0QIjh.js +24 -0
- package/dist/plugin-sdk/{session-meta-BU2WXD0N.js → session-meta-CiqJP0pO.js} +2 -2
- package/dist/plugin-sdk/session-meta-n4SCcAbJ.js +10 -0
- package/dist/plugin-sdk/{session-meta-D3W538Wj.js → session-meta-oR-S9C5J.js} +3 -3
- package/dist/plugin-sdk/skill-commands-BOV3NIbU.js +14 -0
- package/dist/plugin-sdk/{skill-commands-ByVQek_m.js → skill-commands-Bh43SlDc.js} +6 -6
- package/dist/plugin-sdk/{skill-commands-BYfWIPfV.js → skill-commands-CE_SkRQk.js} +5 -5
- package/dist/plugin-sdk/{skills-BGgry_YW.js → skills-CatBv8W4.js} +6 -6
- package/dist/plugin-sdk/{skills-BuJjEYto.js → skills-CjW6uGTa.js} +6 -6
- package/dist/plugin-sdk/src/config/sessions/run-pending-writes.d.ts +22 -0
- package/dist/plugin-sdk/{ssrf-DiAz1Z_z.js → ssrf-BUCEDxp5.js} +2 -2
- package/dist/plugin-sdk/{store-C6ZLKWUS.js → store-6JKvp2Zu.js} +2 -2
- package/dist/plugin-sdk/{store-Bl3Yjf_w.js → store-yBNTHg3N.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-CZBK6615.js +61 -0
- package/dist/plugin-sdk/subagent-registry-DwnBzoKn.js +61 -0
- package/dist/plugin-sdk/{subsystem-B2x33s9h.js → subsystem-CUUKL6Fr.js} +4 -4
- package/dist/plugin-sdk/{subsystem-0F3fEqJW.js → subsystem-CchgWuXK.js} +4 -4
- package/dist/plugin-sdk/{tables-BCSRuiq_.js → tables-BPCP4CpE.js} +1 -1
- package/dist/plugin-sdk/{tables-CTmQQyfU.js → tables-DKYi6grj.js} +1 -1
- package/dist/plugin-sdk/testing.js +55 -55
- package/dist/plugin-sdk/{tokens-O0pGqOuf.js → tokens-Cioh8xR5.js} +1 -1
- package/dist/plugin-sdk/{tokens-DxJSOoJn.js → tokens-ysZUkYZZ.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-BG8uP1aD.js → tool-loop-detection-BN0lIxLx.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-Buouaxew.js → tool-loop-detection-LsvZ1dIY.js} +1 -1
- package/dist/plugin-sdk/{tools-CmHC6oYK.js → tools-4rcPGSNh.js} +114 -93
- package/dist/plugin-sdk/{user-run-recording-juCW_uQ-.js → user-run-recording-BMaK7jNR.js} +2 -2
- package/dist/plugin-sdk/user-run-recording-DiKcNdjn.js +11 -0
- package/dist/plugin-sdk/{user-run-recording-iS-qLIN9.js → user-run-recording-DlpzQk0X.js} +3 -3
- package/dist/{plugins-cli-DRuMDJWf.js → plugins-cli-Cpq4XXoA.js} +22 -22
- package/dist/{plugins-cli-DnMc_Sn3.js → plugins-cli-yjyVyPjc.js} +22 -22
- package/dist/{program-Gb3aULCK.js → program-CB5O-AyY.js} +23 -23
- package/dist/{program-context-CJuzphrY.js → program-context-DxwZAeg4.js} +24 -24
- package/dist/{prompt-select-styled-Db6swA6j.js → prompt-select-styled-1UYyuvWX.js} +12 -12
- package/dist/{prompt-select-styled-C-FwsHQX.js → prompt-select-styled-CfTLn2TL.js} +12 -12
- package/dist/{provider-image-RxbXQIow.js → provider-image-CZlpEJVI.js} +1 -1
- package/dist/{provider-image-XyDuLsir.js → provider-image-UXLX6qTH.js} +1 -1
- package/dist/{push-apns-BGOaVxug.js → push-apns-DYlVj3Sd.js} +2 -2
- package/dist/{push-apns-Mp5OOpUH.js → push-apns-uBiZYT2e.js} +2 -2
- package/dist/{pw-ai-DmE1ofBV.js → pw-ai-2o8dgziH.js} +1 -1
- package/dist/{pw-ai-QjFlAu_X.js → pw-ai-CZJk6UyG.js} +1 -1
- package/dist/{reconcile-bundled-jiPnEB1a.js → reconcile-bundled-Dx64x8xr.js} +1 -1
- package/dist/{reconcile-bundled-BMWDZl32.js → reconcile-bundled-oQwTCU_A.js} +1 -1
- package/dist/{recovery-adapter-BMqm3Nm4.js → recovery-adapter-BT7EyQzh.js} +8 -8
- package/dist/{recovery-adapter-NtvPZ47M.js → recovery-adapter-BcPtMfaC.js} +1 -1
- package/dist/{recovery-adapter-DvFGPqmC.js → recovery-adapter-BvRiQZIb.js} +8 -8
- package/dist/{recovery-adapter-B_wvSNpI.js → recovery-adapter-CTqGLqLj.js} +1 -1
- package/dist/{register.agent-B5_L0CjL.js → register.agent-DpYKNZhv.js} +22 -22
- package/dist/{register.agent-kUHQvJ5-.js → register.agent-DxsC-Szl.js} +23 -23
- package/dist/{register.configure-BbDac1C1.js → register.configure-DUg0MNnJ.js} +26 -26
- package/dist/{register.configure-CgSKgJn_.js → register.configure-PJZ3F6Y4.js} +26 -26
- package/dist/{register.maintenance-YmHWu7iX.js → register.maintenance-9XyX4HYf.js} +29 -29
- package/dist/{register.maintenance-Co2DeyQ1.js → register.maintenance-BBM-rluy.js} +28 -28
- package/dist/{register.message-8tfreZAx.js → register.message-B3NWvxgd.js} +18 -18
- package/dist/{register.message-BWeca9Pc.js → register.message-D-e6_UXf.js} +18 -18
- package/dist/{register.onboard-Cs4xO4E5.js → register.onboard-CEzQdSxa.js} +2 -2
- package/dist/{register.onboard-4mSx6LtC.js → register.onboard-id-BqwSw.js} +2 -2
- package/dist/{register.setup-BkZyVbO-.js → register.setup-BKBe-Sjp.js} +2 -2
- package/dist/{register.setup-DCRrXbdT.js → register.setup-BiOdr528.js} +2 -2
- package/dist/{register.status-health-sessions-CgAKAaPq.js → register.status-health-sessions-BVIHCaPP.js} +24 -24
- package/dist/{register.status-health-sessions-DK12_BeX.js → register.status-health-sessions-CeRiMlKm.js} +24 -24
- package/dist/{register.subclis-CKq7CiVv.js → register.subclis-IXr-WEhq.js} +16 -16
- package/dist/{reply-BIZ2zaUq.js → reply-BzUdF5qW.js} +69 -24
- package/dist/{run-main-Bjfr1wYn.js → run-main-CsSM1uCJ.js} +30 -30
- package/dist/{runs-Yajg-SST.js → runs-DVNBpgv0.js} +3 -3
- package/dist/{runs-CUs5xDZ_.js → runs-i5IuTzQX.js} +3 -3
- package/dist/{sandbox-DfzTmaAX.js → sandbox-QsMPF2u6.js} +1 -1
- package/dist/{sandbox-Ft7cM-PQ.js → sandbox-bbN1dfIo.js} +1 -1
- package/dist/{sandbox-cli-DvMqiG0-.js → sandbox-cli-CuG1HCrw.js} +2 -2
- package/dist/{sandbox-cli-DyRvKmR5.js → sandbox-cli-nx3ctiYX.js} +2 -2
- package/dist/{security-cli-p_5UwabW.js → security-cli-BfZEQFxV.js} +4 -4
- package/dist/{security-cli-Brok3WFE.js → security-cli-BmfAwh-0.js} +4 -4
- package/dist/{send-DzSRMjOr.js → send-BKkvuHI9.js} +1 -1
- package/dist/{send-Cy2xiH02.js → send-CvkM5xAx.js} +1 -1
- package/dist/{server-l9oy68N_.js → server-BMSgu_SV.js} +4 -4
- package/dist/{server-CywvGQHz.js → server-DRVR_pkr.js} +4 -4
- package/dist/{server-context-Dezs5R_M.js → server-context-Bbi-nqKD.js} +2 -2
- package/dist/{server-context-97Vej0yV.js → server-context-CTilcbO4.js} +2 -2
- package/dist/{server-lifecycle-CHhQugi7.js → server-lifecycle-BIOS9ErD.js} +1 -1
- package/dist/{server-lifecycle-DcVZS1ln.js → server-lifecycle-DrAGY_SC.js} +1 -1
- package/dist/{server-node-events-BG6KvV6u.js → server-node-events-B3c2ctcO.js} +18 -18
- package/dist/{server-node-events-BaFY8QcO.js → server-node-events-lwnuZDvV.js} +18 -18
- package/dist/{service-Hy5BSgmp.js → service-C_LTJsJU.js} +1 -1
- package/dist/{service-RnhuB5cG.js → service-Dkcqg-rd.js} +1 -1
- package/dist/{sessions-BQYQBpX0.js → sessions-Cy_VVMEN.js} +4 -4
- package/dist/{sessions-CuDbhYmU.js → sessions-DCXadUdD.js} +4 -4
- package/dist/{shared-Bc-7t0_-.js → shared-6Uo_6p6X.js} +1 -1
- package/dist/{shared-CJd0QML9.js → shared-Cj18nzyW.js} +1 -1
- package/dist/{status-BYesh62t.js → status-Czr0TmiN.js} +7 -7
- package/dist/{status-DlD1uBWJ.js → status-DJsk1JjI.js} +7 -7
- package/dist/{systemd-B5tdOLBg.js → systemd-BJqlwupF.js} +1 -1
- package/dist/{systemd-DsBMxUv1.js → systemd-D6tSdsgx.js} +1 -1
- package/dist/{systemd-hints-DH86kn6U.js → systemd-hints-Cp0IfOPD.js} +45 -4
- package/dist/{systemd-hints-WHzM5Tf8.js → systemd-hints-DzBfweRH.js} +45 -4
- package/dist/{systemd-linger-BPzLwumk.js → systemd-linger-Dk1GWduD.js} +1 -1
- package/dist/{systemd-linger-EvpJ4ZxF.js → systemd-linger-NvIOU-Ez.js} +1 -1
- package/dist/{task-pipeline-boot-D9T_Earg.js → task-pipeline-boot-CcSZVGUe.js} +17 -17
- package/dist/{task-pipeline-boot-CaVeITev.js → task-pipeline-boot-UcskPjY2.js} +17 -17
- package/dist/{tui-naozJ5Qh.js → tui-WSQKUD4o.js} +1 -1
- package/dist/{tui-cli-hVvCHoLU.js → tui-cli-C3Sopj4_.js} +4 -4
- package/dist/{tui-cli-Dn_Is1pu.js → tui-cli-CpRsjtOO.js} +4 -4
- package/dist/{tui-Bo4LZvgz.js → tui-dccCFhet.js} +1 -1
- package/dist/{update-CXf5cJ0D.js → update-D86-cS_v.js} +1 -1
- package/dist/{update-CAXQiGSa.js → update-DJaR3w6x.js} +1 -1
- package/dist/{update-cli-BB7ybH-w.js → update-cli-B4_xRNut.js} +33 -33
- package/dist/{update-cli-BYDYDEO5.js → update-cli-DDmfG1gm.js} +34 -34
- package/dist/{update-runner-BYv_ec3N.js → update-runner-DqE_9Axt.js} +1 -1
- package/dist/{update-runner-JoI-EXBr.js → update-runner-DwM4xj8C.js} +1 -1
- package/dist/{validation-cli-ZFUB2tzh.js → validation-cli-C8XHeLjI.js} +18 -18
- package/dist/{validation-cli-CGimO4ZJ.js → validation-cli-jSmCMkkm.js} +18 -18
- package/dist/{with-timeout-Cl_OttOS.js → with-timeout-BvxLQUTs.js} +2 -2
- package/dist/{with-timeout-NhJMC1fC.js → with-timeout-CII3PkDO.js} +2 -2
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/learning-core/src/bounded-store-reads.conformance.test.ts +23 -411
- package/extensions/learning-core/src/bounded-store-reads.pg.integration.test.ts +52 -0
- package/extensions/learning-core/src/bounded-store-reads.test-helpers.ts +387 -0
- package/extensions/learning-core/src/lesson-store-conformance.pg.integration.test.ts +77 -0
- package/extensions/learning-core/src/lesson-store-conformance.test-helpers.ts +1406 -0
- package/extensions/learning-core/src/lesson-store-conformance.test.ts +27 -1509
- package/extensions/learning-core/src/lesson-store-postgres.test.ts +9 -7
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/plugin-sdk/agent-turn-execute-C4MQxaT2.js +0 -61
- package/dist/plugin-sdk/agent-turn-execute-Cjl_kBtQ.js +0 -61
- package/dist/plugin-sdk/agent-turn-runner-e_lJzDgA.js +0 -11
- package/dist/plugin-sdk/audio-preflight-DE04bi4M.js +0 -28
- package/dist/plugin-sdk/deliver-D4fWK65M.js +0 -32
- package/dist/plugin-sdk/deliver-DuDcszu1.js +0 -32
- package/dist/plugin-sdk/manager-BlYRVNJI.js +0 -16
- package/dist/plugin-sdk/manager-Bqpqu2GS.js +0 -16
- package/dist/plugin-sdk/markdown-tables-cZSKCBuW.js +0 -10
- package/dist/plugin-sdk/provider-dispatcher-D7HHFW68.js +0 -61
- package/dist/plugin-sdk/provider-dispatcher-D7bchiJq.js +0 -61
- package/dist/plugin-sdk/provider-image-Bumd1GBG.js +0 -22
- package/dist/plugin-sdk/provider-image-CNlYbRab.js +0 -22
- package/dist/plugin-sdk/proxy-D2uiu68M.js +0 -7
- package/dist/plugin-sdk/replies-0gHRQjbA.js +0 -25
- package/dist/plugin-sdk/replies-XUkqz_7S.js +0 -25
- package/dist/plugin-sdk/reply-prefix-MU3uY52y.js +0 -7
- package/dist/plugin-sdk/runs-B3DB63tB.js +0 -25
- package/dist/plugin-sdk/runs-R28wdt7j.js +0 -25
- package/dist/plugin-sdk/send-C28pxKhC.js +0 -27
- package/dist/plugin-sdk/send-COofA0BG.js +0 -23
- package/dist/plugin-sdk/send-Cg2VXcO0.js +0 -27
- package/dist/plugin-sdk/send-DAs6FmWB.js +0 -23
- package/dist/plugin-sdk/send-NUHfC-G_.js +0 -25
- package/dist/plugin-sdk/send-Tm5-7bLz.js +0 -24
- package/dist/plugin-sdk/send-UIQH_kN6.js +0 -25
- package/dist/plugin-sdk/send-tASIQF-Q.js +0 -24
- package/dist/plugin-sdk/session-meta-Dd1ZONel.js +0 -10
- package/dist/plugin-sdk/skill-commands-C7ZE3rKj.js +0 -14
- package/dist/plugin-sdk/subagent-registry-2P8D5Trx.js +0 -61
- package/dist/plugin-sdk/subagent-registry-DxZN7H_j.js +0 -61
- package/dist/plugin-sdk/user-run-recording-BMikDBXR.js +0 -11
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import type { DatabaseSync } from "node:sqlite";
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import { readRankingPool, RANKING_SCAN_MAX_ROWS } from "./consolidation-judge.js";
|
|
5
|
+
import { withCandidateDefaults } from "./extraction-candidate.js";
|
|
6
|
+
import { createLearningOverview } from "./gateway-methods.js";
|
|
7
|
+
import { withLessonDefaults } from "./lesson-record.js";
|
|
8
|
+
import type { PgClientLike, PgPoolLike } from "./lesson-store-postgres.js";
|
|
9
|
+
import type { SqliteDatabaseLike } from "./lesson-store-sqlite.js";
|
|
10
|
+
import {
|
|
11
|
+
LESSON_EXCERPT_MAX_BYTES,
|
|
12
|
+
LESSON_PAGE_MAX_BYTES,
|
|
13
|
+
type ExtractionCandidate,
|
|
14
|
+
type LessonStore,
|
|
15
|
+
type SkillProposal,
|
|
16
|
+
} from "./types.js";
|
|
17
|
+
|
|
18
|
+
// Spec "Bounded store reads, scans, and success evidence": verification asserts rows AND bytes
|
|
19
|
+
// read, not just result length. Every SQL leg runs through a meter that counts the rows the
|
|
20
|
+
// database handed back and the payload bytes among them, so a materialize-then-filter read (the
|
|
21
|
+
// pre-change readPayloads path) fails here even when its result is correct.
|
|
22
|
+
|
|
23
|
+
type Meter = { rows: number; payloadBytes: number; excerptBytes: number };
|
|
24
|
+
|
|
25
|
+
function newMeter(): Meter {
|
|
26
|
+
return { rows: 0, payloadBytes: 0, excerptBytes: 0 };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// One wrapped handle per test (the stores memoise schema init on the handle), metering into
|
|
30
|
+
// whichever meter the last make() installed.
|
|
31
|
+
let activeMeter: Meter = newMeter();
|
|
32
|
+
|
|
33
|
+
function countRows(rows: unknown[]): void {
|
|
34
|
+
const meter = activeMeter;
|
|
35
|
+
for (const row of rows) {
|
|
36
|
+
meter.rows += 1;
|
|
37
|
+
for (const [column, value] of Object.entries(row as Record<string, unknown>)) {
|
|
38
|
+
if (column === "payload_json") {
|
|
39
|
+
meter.payloadBytes += Buffer.byteLength(
|
|
40
|
+
typeof value === "string" ? value : JSON.stringify(value),
|
|
41
|
+
);
|
|
42
|
+
} else if (column === "excerpt" && value instanceof Uint8Array) {
|
|
43
|
+
meter.excerptBytes += value.length;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function meteredSqlite(db: DatabaseSync): SqliteDatabaseLike {
|
|
50
|
+
return {
|
|
51
|
+
exec: (sql) => db.exec(sql),
|
|
52
|
+
prepare(sql) {
|
|
53
|
+
const statement = db.prepare(sql);
|
|
54
|
+
return {
|
|
55
|
+
run: (...params) => statement.run(...(params as never[])),
|
|
56
|
+
get: (...params) => {
|
|
57
|
+
const row = statement.get(...(params as never[]));
|
|
58
|
+
countRows(row === undefined ? [] : [row]);
|
|
59
|
+
return row;
|
|
60
|
+
},
|
|
61
|
+
all: (...params) => {
|
|
62
|
+
const rows = statement.all(...(params as never[]));
|
|
63
|
+
countRows(rows);
|
|
64
|
+
return rows;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function meteredPool(pool: PgPoolLike): PgPoolLike {
|
|
72
|
+
const wrap = async (result: Promise<{ rows: Record<string, unknown>[] }>) => {
|
|
73
|
+
const settled = await result;
|
|
74
|
+
countRows(settled.rows);
|
|
75
|
+
return settled;
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
query: (sql, values) => wrap(pool.query(sql, values)),
|
|
79
|
+
async connect(): Promise<PgClientLike> {
|
|
80
|
+
const client = await pool.connect();
|
|
81
|
+
return {
|
|
82
|
+
query: (sql, values) => wrap(client.query(sql, values)),
|
|
83
|
+
release: () => client.release(),
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const RUN_TOKEN = crypto.randomUUID().replaceAll("-", "");
|
|
90
|
+
export const TEST_SCHEMA = `plugin_learning_core_bounded_${RUN_TOKEN}`;
|
|
91
|
+
export const NOW = "2026-06-01T00:00:00.000Z";
|
|
92
|
+
export const PAST = "2026-05-01T00:00:00.000Z";
|
|
93
|
+
const FUTURE = "2027-01-01T00:00:00.000Z";
|
|
94
|
+
|
|
95
|
+
export type SqlLeg = {
|
|
96
|
+
label: string;
|
|
97
|
+
/** Fixture sizes; the live leg is smaller only to keep a shared server fast. */
|
|
98
|
+
scale: number;
|
|
99
|
+
make: (meter: Meter) => LessonStore;
|
|
100
|
+
/** A store scoped to one row's own scope, over the same metered handle `make` reads through. */
|
|
101
|
+
writer: (scope: { workspaceId: string; agentId: string }) => LessonStore;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export function metering<T>(meter: Meter, value: T): T {
|
|
105
|
+
activeMeter = meter;
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function iso(ms: number): string {
|
|
110
|
+
return new Date(Date.parse(PAST) + ms).toISOString();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function candidate(
|
|
114
|
+
index: number,
|
|
115
|
+
status: ExtractionCandidate["status"],
|
|
116
|
+
): ExtractionCandidate {
|
|
117
|
+
return withCandidateDefaults(
|
|
118
|
+
{
|
|
119
|
+
sessionId: `session-${String(index).padStart(6, "0")}`,
|
|
120
|
+
agentId: `agent-${index % 3}`,
|
|
121
|
+
workspaceId: `ws-${index % 2}`,
|
|
122
|
+
excerpt: `candidate ${index} ${"x".repeat(900)}`,
|
|
123
|
+
tags: index % 2 === 0 ? ["correction"] : ["failure"],
|
|
124
|
+
status,
|
|
125
|
+
},
|
|
126
|
+
iso(index * 1000),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function lesson(
|
|
131
|
+
index: number,
|
|
132
|
+
text: string,
|
|
133
|
+
opts?: { invalidAt?: string; validFrom?: string },
|
|
134
|
+
) {
|
|
135
|
+
const at = iso(index * 1000);
|
|
136
|
+
return withLessonDefaults(
|
|
137
|
+
{
|
|
138
|
+
id: `lesson-${String(index).padStart(6, "0")}`,
|
|
139
|
+
scope: { agentId: `agent-${index % 3}`, workspaceId: `ws-${index % 2}` },
|
|
140
|
+
kind: "procedure" as const,
|
|
141
|
+
text,
|
|
142
|
+
confidence: 0.9,
|
|
143
|
+
occurrences: 1,
|
|
144
|
+
distinctSessionIds: [`s-${index}`],
|
|
145
|
+
evidence: [],
|
|
146
|
+
createdAt: at,
|
|
147
|
+
updatedAt: at,
|
|
148
|
+
...(opts?.validFrom ? { validFrom: opts.validFrom } : {}),
|
|
149
|
+
...(opts?.invalidAt ? { invalidAt: opts.invalidAt } : {}),
|
|
150
|
+
},
|
|
151
|
+
at,
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function proposal(index: number, status: SkillProposal["status"]): SkillProposal {
|
|
156
|
+
return {
|
|
157
|
+
id: `proposal-${index}`,
|
|
158
|
+
lessonIds: [`lesson-${String(index).padStart(6, "0")}`],
|
|
159
|
+
status,
|
|
160
|
+
skillName: `skill-${index}`,
|
|
161
|
+
title: `Proposal ${index}`,
|
|
162
|
+
body: "b".repeat(4000),
|
|
163
|
+
scannerFindings: [],
|
|
164
|
+
createdAt: iso(index),
|
|
165
|
+
updatedAt: iso(index),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Mixed 1-, 2- and 3-byte characters, so a byte cut can land inside a character.
|
|
170
|
+
const LONG_TEXT = `${"é".repeat(3000)}${"界".repeat(2000)} tail`;
|
|
171
|
+
|
|
172
|
+
async function seedScoped(
|
|
173
|
+
writer: (scope: { workspaceId: string; agentId: string }) => LessonStore,
|
|
174
|
+
items: Array<{
|
|
175
|
+
scope: { workspaceId: string; agentId: string };
|
|
176
|
+
write: (store: LessonStore) => Promise<void>;
|
|
177
|
+
}>,
|
|
178
|
+
): Promise<void> {
|
|
179
|
+
for (const item of items) {
|
|
180
|
+
await item.write(writer(item.scope));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function registerBoundedSqlLegSuite(leg: SqlLeg): void {
|
|
185
|
+
describe(`bounded SQL store reads — ${leg.label}`, () => {
|
|
186
|
+
// Writes go through a store scoped to the row's own scope (as production capture does), reads
|
|
187
|
+
// through the unscoped store the gateway and the passes use.
|
|
188
|
+
const scopedWriter = (meter: Meter) => (scope: { workspaceId: string; agentId: string }) => {
|
|
189
|
+
activeMeter = meter;
|
|
190
|
+
return leg.writer(scope);
|
|
191
|
+
};
|
|
192
|
+
const scopeOf = (index: number) => ({
|
|
193
|
+
agentId: `agent-${index % 3}`,
|
|
194
|
+
workspaceId: `ws-${index % 2}`,
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("pending candidates: rows and payload bytes read are the pending set only, keyset-paged", async () => {
|
|
198
|
+
const total = Math.round(2000 * leg.scale);
|
|
199
|
+
const pendingEvery = 100;
|
|
200
|
+
const seedMeter = newMeter();
|
|
201
|
+
const writer = scopedWriter(seedMeter);
|
|
202
|
+
const all: ExtractionCandidate[] = [];
|
|
203
|
+
for (let index = 0; index < total; index += 1) {
|
|
204
|
+
const entry = candidate(index, index % pendingEvery === 0 ? "pending" : "processed");
|
|
205
|
+
all.push(entry);
|
|
206
|
+
await writer(scopeOf(index)).upsertCandidate(entry);
|
|
207
|
+
}
|
|
208
|
+
const expected = all.filter((entry) => entry.status === "pending");
|
|
209
|
+
const pendingBytes = expected.reduce(
|
|
210
|
+
(sum, entry) => sum + Buffer.byteLength(JSON.stringify(entry)),
|
|
211
|
+
0,
|
|
212
|
+
);
|
|
213
|
+
const allBytes = all.reduce(
|
|
214
|
+
(sum, entry) => sum + Buffer.byteLength(JSON.stringify(entry)),
|
|
215
|
+
0,
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const meter = newMeter();
|
|
219
|
+
const store = leg.make(meter);
|
|
220
|
+
const pending = await store.listPendingCandidates();
|
|
221
|
+
expect(pending.map((entry) => entry.sessionId)).toEqual(
|
|
222
|
+
expected.map((entry) => entry.sessionId),
|
|
223
|
+
);
|
|
224
|
+
expect(meter.rows, "rows read must be the pending rows, not every candidate").toBe(
|
|
225
|
+
expected.length,
|
|
226
|
+
);
|
|
227
|
+
// jsonb re-serialization may reorder keys but never grows a row by more than its key quotes.
|
|
228
|
+
expect(meter.payloadBytes).toBeLessThanOrEqual(pendingBytes * 1.1);
|
|
229
|
+
expect(meter.payloadBytes).toBeLessThan(allBytes / 20);
|
|
230
|
+
|
|
231
|
+
// Keyset pages: LIMIT applies in SQL, pages chain without gaps or repeats, tags filter.
|
|
232
|
+
const pageMeter = newMeter();
|
|
233
|
+
const paged = leg.make(pageMeter);
|
|
234
|
+
const first = await paged.listPendingCandidatesPage({ limit: 7 });
|
|
235
|
+
expect(pageMeter.rows).toBe(7);
|
|
236
|
+
const seen = [...first.candidates];
|
|
237
|
+
let cursor = first.nextCursor;
|
|
238
|
+
while (cursor) {
|
|
239
|
+
const page = await paged.listPendingCandidatesPage({ after: cursor, limit: 7 });
|
|
240
|
+
seen.push(...page.candidates);
|
|
241
|
+
cursor = page.nextCursor;
|
|
242
|
+
}
|
|
243
|
+
expect(seen.map((entry) => entry.sessionId)).toEqual(
|
|
244
|
+
expected.map((entry) => entry.sessionId),
|
|
245
|
+
);
|
|
246
|
+
const tagged = await paged.listPendingCandidates({ tags: ["failure"] });
|
|
247
|
+
expect(tagged.map((entry) => entry.sessionId)).toEqual(
|
|
248
|
+
expected.filter((entry) => entry.tags.includes("failure")).map((entry) => entry.sessionId),
|
|
249
|
+
);
|
|
250
|
+
const limited = await paged.listPendingCandidates({ limit: 3 });
|
|
251
|
+
expect(limited.map((entry) => entry.sessionId)).toEqual(
|
|
252
|
+
expected.slice(0, 3).map((entry) => entry.sessionId),
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
it("similar-lesson ranking reads { id, excerpt } pages: no payload bytes, 2 KiB rows, 256 KiB pages", async () => {
|
|
257
|
+
const activeCount = Math.round(450 * leg.scale);
|
|
258
|
+
const seedMeter = newMeter();
|
|
259
|
+
const writer = scopedWriter(seedMeter);
|
|
260
|
+
const activeIds: string[] = [];
|
|
261
|
+
for (let index = 0; index < activeCount; index += 1) {
|
|
262
|
+
const entry = lesson(index, index % 5 === 0 ? `short ${index}` : `${LONG_TEXT} ${index}`);
|
|
263
|
+
activeIds.push(entry.id);
|
|
264
|
+
await writer(scopeOf(index)).upsertLesson(entry);
|
|
265
|
+
}
|
|
266
|
+
// Inactive rows the SQL predicate must drop: invalidated, and not yet valid.
|
|
267
|
+
for (let index = activeCount; index < activeCount + 40; index += 1) {
|
|
268
|
+
await writer(scopeOf(index)).upsertLesson(
|
|
269
|
+
lesson(index, LONG_TEXT, index % 2 === 0 ? { invalidAt: PAST } : { validFrom: FUTURE }),
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const meter = newMeter();
|
|
274
|
+
const store = leg.make(meter);
|
|
275
|
+
const first = await store.listActiveLessonsPage({ now: NOW, limit: 200 });
|
|
276
|
+
expect(meter.payloadBytes, "no payload_json may leave the database").toBe(0);
|
|
277
|
+
expect(first.lessons.length).toBeLessThanOrEqual(200);
|
|
278
|
+
expect(first.nextCursor).toBeDefined();
|
|
279
|
+
const firstBytes = first.lessons.reduce(
|
|
280
|
+
(sum, entry) => sum + Buffer.byteLength(entry.excerpt),
|
|
281
|
+
0,
|
|
282
|
+
);
|
|
283
|
+
expect(firstBytes).toBeLessThanOrEqual(LESSON_PAGE_MAX_BYTES);
|
|
284
|
+
expect(
|
|
285
|
+
meter.excerptBytes,
|
|
286
|
+
"the database returned at most one page of excerpts",
|
|
287
|
+
).toBeLessThanOrEqual(LESSON_PAGE_MAX_BYTES);
|
|
288
|
+
for (const entry of first.lessons) {
|
|
289
|
+
expect(Buffer.byteLength(entry.excerpt)).toBeLessThanOrEqual(LESSON_EXCERPT_MAX_BYTES);
|
|
290
|
+
expect(entry.excerpt).not.toContain("�");
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const walkMeter = newMeter();
|
|
294
|
+
const walker = leg.make(walkMeter);
|
|
295
|
+
const pool = await readRankingPool(walker, NOW);
|
|
296
|
+
expect(pool.truncated).toBe(false);
|
|
297
|
+
expect(pool.lessons.map((entry) => entry.id).toSorted()).toEqual(activeIds.toSorted());
|
|
298
|
+
expect(walkMeter.rows, "every active row read exactly once, inactive never").toBe(
|
|
299
|
+
activeCount,
|
|
300
|
+
);
|
|
301
|
+
expect(walkMeter.payloadBytes).toBe(0);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
it("the ranking scan stops at its 2,000-row ceiling", async () => {
|
|
305
|
+
if (leg.label.includes("live")) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const writer = scopedWriter(newMeter());
|
|
309
|
+
for (let index = 0; index < RANKING_SCAN_MAX_ROWS + 50; index += 1) {
|
|
310
|
+
await writer(scopeOf(index)).upsertLesson(lesson(index, `tiny ${index}`));
|
|
311
|
+
}
|
|
312
|
+
const meter = newMeter();
|
|
313
|
+
const pool = await readRankingPool(leg.make(meter), NOW);
|
|
314
|
+
expect(pool.truncated).toBe(true);
|
|
315
|
+
expect(pool.lessons).toHaveLength(RANKING_SCAN_MAX_ROWS);
|
|
316
|
+
expect(meter.rows).toBe(RANKING_SCAN_MAX_ROWS);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it("overview counts are SQL aggregates: a handful of rows, no payload bytes", async () => {
|
|
320
|
+
const seedMeter = newMeter();
|
|
321
|
+
const writer = scopedWriter(seedMeter);
|
|
322
|
+
const lessons = Math.round(300 * leg.scale);
|
|
323
|
+
const items: Parameters<typeof seedScoped>[1] = [];
|
|
324
|
+
for (let index = 0; index < lessons; index += 1) {
|
|
325
|
+
items.push({
|
|
326
|
+
scope: scopeOf(index),
|
|
327
|
+
write: (store) =>
|
|
328
|
+
store.upsertLesson(
|
|
329
|
+
lesson(index, "t", index % 10 === 0 ? { invalidAt: PAST } : undefined),
|
|
330
|
+
),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
const statuses: SkillProposal["status"][] = ["pending", "applied", "rejected", "quarantined"];
|
|
334
|
+
for (let index = 0; index < 40; index += 1) {
|
|
335
|
+
items.push({
|
|
336
|
+
scope: scopeOf(index),
|
|
337
|
+
write: (store) => store.upsertProposal(proposal(index, statuses[index % 4])),
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
await seedScoped(writer, items);
|
|
341
|
+
|
|
342
|
+
const meter = newMeter();
|
|
343
|
+
const store = leg.make(meter);
|
|
344
|
+
const counts = await store.countOverview({ now: NOW });
|
|
345
|
+
expect(counts).toEqual({
|
|
346
|
+
proposals: { pending: 10, applied: 10, rejected: 10, quarantined: 10 },
|
|
347
|
+
lessons: lessons - lessons / 10,
|
|
348
|
+
scopes: 6,
|
|
349
|
+
truncated: false,
|
|
350
|
+
});
|
|
351
|
+
expect(meter.payloadBytes).toBe(0);
|
|
352
|
+
expect(meter.rows).toBeLessThanOrEqual(8);
|
|
353
|
+
|
|
354
|
+
// The real entry point: learning.overview over the same store.
|
|
355
|
+
const calls: Array<{ ok: boolean; payload?: unknown }> = [];
|
|
356
|
+
const handlerMeter = newMeter();
|
|
357
|
+
await createLearningOverview({
|
|
358
|
+
readResolution: async () => ({}),
|
|
359
|
+
lessonStore: () => leg.make(handlerMeter),
|
|
360
|
+
now: () => NOW,
|
|
361
|
+
})({
|
|
362
|
+
params: {},
|
|
363
|
+
respond: (ok: boolean, payload?: unknown) => calls.push({ ok, payload }),
|
|
364
|
+
} as never);
|
|
365
|
+
expect(calls[0]).toMatchObject({
|
|
366
|
+
ok: true,
|
|
367
|
+
payload: { lessons: counts.lessons, scopes: 6, truncated: false },
|
|
368
|
+
});
|
|
369
|
+
expect(handlerMeter.payloadBytes).toBe(0);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
it("getLesson and getLessonsByIds read only the named rows", async () => {
|
|
373
|
+
const writer = scopedWriter(newMeter());
|
|
374
|
+
for (let index = 0; index < 200; index += 1) {
|
|
375
|
+
await writer(scopeOf(index)).upsertLesson(lesson(index, LONG_TEXT));
|
|
376
|
+
}
|
|
377
|
+
const meter = newMeter();
|
|
378
|
+
const store = leg.make(meter);
|
|
379
|
+
const found = await store.getLessonsByIds(["lesson-000003", "lesson-000150", "missing"]);
|
|
380
|
+
expect(found.map((entry) => entry.id).toSorted()).toEqual(["lesson-000003", "lesson-000150"]);
|
|
381
|
+
expect(meter.rows).toBe(2);
|
|
382
|
+
const one = newMeter();
|
|
383
|
+
expect((await leg.make(one).getLesson("lesson-000007"))?.id).toBe("lesson-000007");
|
|
384
|
+
expect(one.rows).toBe(1);
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { afterAll, afterEach, beforeAll, describe, expect } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
PG_TABLE,
|
|
4
|
+
registerLessonStoreConformance,
|
|
5
|
+
RUN_ID,
|
|
6
|
+
TEST_SCHEMA,
|
|
7
|
+
type Backend,
|
|
8
|
+
} from "./lesson-store-conformance.test-helpers.js";
|
|
9
|
+
import {
|
|
10
|
+
createDefaultLearningPgPool,
|
|
11
|
+
PostgresLessonStore,
|
|
12
|
+
type PgPoolLike,
|
|
13
|
+
} from "./lesson-store-postgres.js";
|
|
14
|
+
|
|
15
|
+
// Live-server leg of the LessonStore conformance suite (`pnpm test:pg`): the contract the fs-jsonl,
|
|
16
|
+
// sqlite and in-memory-double legs run in lesson-store-conformance.test.ts, against a real
|
|
17
|
+
// Postgres. This leg, not the double, is the authority on real dialect behaviour.
|
|
18
|
+
const databaseUrl = process.env.OPENCLAW_DATABASE_URL;
|
|
19
|
+
const live = process.env.OPENCLAW_LIVE_PG_TEST === "1" && Boolean(databaseUrl);
|
|
20
|
+
|
|
21
|
+
type ClosablePool = PgPoolLike & { end?: () => Promise<void> };
|
|
22
|
+
let sharedPool: ClosablePool;
|
|
23
|
+
|
|
24
|
+
async function cleanupPostgresRows(): Promise<void> {
|
|
25
|
+
// The table only exists once the postgres leg has run its DDL; probing avoids swallowing a
|
|
26
|
+
// real error in a bare catch.
|
|
27
|
+
const probe = await sharedPool.query("SELECT to_regclass($1) AS reg", [PG_TABLE]);
|
|
28
|
+
if (!probe.rows[0]?.reg) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
await sharedPool.query(`DELETE FROM ${PG_TABLE} WHERE workspace_id LIKE $1`, [`${RUN_ID}%`]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const liveBackend: Backend = {
|
|
35
|
+
name: "postgres",
|
|
36
|
+
label: "postgres (live server)",
|
|
37
|
+
make: async (scope) => new PostgresLessonStore({ pool: sharedPool, schema: TEST_SCHEMA, scope }),
|
|
38
|
+
snapshot: async () => {
|
|
39
|
+
const result = await sharedPool.query(
|
|
40
|
+
`SELECT * FROM ${PG_TABLE} WHERE workspace_id LIKE $1
|
|
41
|
+
ORDER BY workspace_id, agent_id, record_type, record_id`,
|
|
42
|
+
[`${RUN_ID}%`],
|
|
43
|
+
);
|
|
44
|
+
return JSON.stringify(result.rows);
|
|
45
|
+
},
|
|
46
|
+
assertSearchIndex: async () => {
|
|
47
|
+
const cols = await sharedPool.query(
|
|
48
|
+
`SELECT column_name FROM information_schema.columns
|
|
49
|
+
WHERE table_schema = $1 AND table_name = 'learning_records' AND column_name = 'search_tsv'`,
|
|
50
|
+
[TEST_SCHEMA],
|
|
51
|
+
);
|
|
52
|
+
expect(cols.rows.length).toBeGreaterThan(0);
|
|
53
|
+
const idx = await sharedPool.query(
|
|
54
|
+
`SELECT indexname FROM pg_indexes
|
|
55
|
+
WHERE schemaname = $1 AND tablename = 'learning_records' AND indexdef ILIKE '%gin%'`,
|
|
56
|
+
[TEST_SCHEMA],
|
|
57
|
+
);
|
|
58
|
+
expect(idx.rows.length).toBeGreaterThan(0);
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
describe.skipIf(!live)("live postgres", () => {
|
|
63
|
+
beforeAll(() => {
|
|
64
|
+
sharedPool = createDefaultLearningPgPool(databaseUrl!);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
afterEach(async () => {
|
|
68
|
+
await cleanupPostgresRows();
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
afterAll(async () => {
|
|
72
|
+
await sharedPool.query(`DROP SCHEMA IF EXISTS ${TEST_SCHEMA} CASCADE`);
|
|
73
|
+
await sharedPool.end?.();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
registerLessonStoreConformance(liveBackend);
|
|
77
|
+
});
|