@remnic/core 10.0.74 → 10.0.76
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/access-admin-ops-surface.js +46 -45
- package/dist/access-authorization-probe.js +47 -46
- package/dist/access-boundary.js +46 -45
- package/dist/access-cli.js +102 -101
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +46 -45
- package/dist/access-http-briefing.js +47 -46
- package/dist/access-http-query.js +48 -47
- package/dist/access-http.js +65 -64
- package/dist/access-identity-continuity-surface.js +46 -45
- package/dist/access-lcm-surface.js +46 -45
- package/dist/access-mcp.js +55 -54
- package/dist/access-namespace-preflight.js +46 -45
- package/dist/access-observe-write-category.js +6 -6
- package/dist/access-observe-write-surface.js +46 -45
- package/dist/access-offline-manifest.js +5 -5
- package/dist/access-operations-batch.js +47 -46
- package/dist/access-operations.js +54 -53
- package/dist/access-recall-concurrency.js +46 -45
- package/dist/access-recall-response.js +46 -45
- package/dist/access-recall-surface.js +46 -45
- package/dist/access-schema.js +5 -5
- package/dist/access-service.js +46 -45
- package/dist/access-surface-catalog.js +48 -47
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/active-recall.js +16 -16
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-ANOJDQD4.js → auto-sync-XHSS3XPL.js} +5 -5
- package/dist/briefing.js +13 -13
- package/dist/buffer.js +3 -3
- package/dist/calibration.js +5 -4
- package/dist/calibration.js.map +1 -1
- package/dist/causal-consolidation.js +14 -14
- package/dist/{chunk-NHTEEGE4.js → chunk-233S3MXC.js} +3 -3
- package/dist/{chunk-N7NAGECH.js → chunk-36B5VPRU.js} +2 -2
- package/dist/{chunk-LC55ZXLR.js → chunk-3GGCMRO7.js} +2 -2
- package/dist/{chunk-RZED7FAU.js → chunk-3M7YP42P.js} +2 -2
- package/dist/{chunk-KPCTZB3U.js → chunk-3MBSD53O.js} +2 -2
- package/dist/{chunk-VWHWWIFS.js → chunk-4DLZ2ITE.js} +2 -2
- package/dist/{chunk-WN2DASTS.js → chunk-5BE3FLKL.js} +4 -4
- package/dist/{chunk-45SFSQON.js → chunk-5IQL4N37.js} +9 -9
- package/dist/{chunk-CIL4GHMD.js → chunk-6Q6AQ36B.js} +2 -2
- package/dist/{chunk-XV7PJVQO.js → chunk-6RPPZL7W.js} +2 -2
- package/dist/{chunk-EQ6EMJRG.js → chunk-6Y5ANLDH.js} +2 -2
- package/dist/{chunk-V33ETCF6.js → chunk-7FFGWIBN.js} +2 -2
- package/dist/{chunk-5RW247F5.js → chunk-AY2UK5XK.js} +14 -9
- package/dist/chunk-AY2UK5XK.js.map +1 -0
- package/dist/{chunk-5QV6CE6K.js → chunk-B36ACJG7.js} +2 -2
- package/dist/{chunk-2WDFLORC.js → chunk-BZTA7DR4.js} +3 -3
- package/dist/{chunk-5XOCAJHC.js → chunk-C44DRDZM.js} +2 -2
- package/dist/{chunk-UIFWZMO7.js → chunk-CLVILSBR.js} +7 -7
- package/dist/{chunk-KH2HB3OW.js → chunk-COIQ5N4J.js} +2 -2
- package/dist/{chunk-CU5N4RDI.js → chunk-DANFOVQG.js} +2 -2
- package/dist/{chunk-FU2ZLXVN.js → chunk-DEGE32C3.js} +2 -2
- package/dist/{chunk-YIJECSIX.js → chunk-DJDJBMFX.js} +9 -2
- package/dist/chunk-DJDJBMFX.js.map +1 -0
- package/dist/{chunk-LUXVW5UU.js → chunk-E22CQZ3H.js} +14 -14
- package/dist/{chunk-DVDRKCZK.js → chunk-ELUG6NKQ.js} +2 -2
- package/dist/{chunk-DLLQMNYQ.js → chunk-F3FNXE7C.js} +3 -3
- package/dist/{chunk-YIXWY4OZ.js → chunk-FETPTCQZ.js} +2 -2
- package/dist/{chunk-WPPAXTW6.js → chunk-FGUWCE5I.js} +2 -2
- package/dist/{chunk-FDUCIUQ5.js → chunk-FJ2VJTGA.js} +2 -2
- package/dist/{chunk-ENPJX3BB.js → chunk-FMFCQRDM.js} +3 -3
- package/dist/{chunk-BNU5TQLR.js → chunk-FOQ7TW2T.js} +2 -2
- package/dist/{chunk-DHQLVS7J.js → chunk-FP2AT4WL.js} +2 -2
- package/dist/{chunk-DLZGSZVC.js → chunk-FYQUUIPI.js} +4 -4
- package/dist/{chunk-XTN54NML.js → chunk-G3T6YMBO.js} +4 -4
- package/dist/{chunk-MUH7RR6T.js → chunk-G5NH3SSX.js} +5 -5
- package/dist/{chunk-G7I2RQ64.js → chunk-GCJA5KKT.js} +2 -2
- package/dist/{chunk-A2BH2VE2.js → chunk-GWOFCHPN.js} +2 -2
- package/dist/{chunk-TJ5YGCPV.js → chunk-GXVK754R.js} +2 -2
- package/dist/{chunk-Y2ZGT4W7.js → chunk-HB5TNQMM.js} +2 -2
- package/dist/{chunk-QYLEE4UQ.js → chunk-HCFNZWFB.js} +2 -2
- package/dist/{chunk-F4ZHKDBW.js → chunk-HLWXCDUQ.js} +2 -2
- package/dist/{chunk-Q2QPHGEC.js → chunk-HR6NTVYZ.js} +51 -66
- package/dist/{chunk-Q2QPHGEC.js.map → chunk-HR6NTVYZ.js.map} +1 -1
- package/dist/{chunk-62O7YWBR.js → chunk-HTDXNIO6.js} +2 -2
- package/dist/{chunk-4RASUAN3.js → chunk-HXFIILGF.js} +4 -4
- package/dist/{chunk-6EKP7BJW.js → chunk-I4LJJ44E.js} +2 -2
- package/dist/{chunk-STDAR7M7.js → chunk-IBQ7LGUJ.js} +6 -6
- package/dist/{chunk-PUP7NTNB.js → chunk-IRFQKR4Y.js} +2 -2
- package/dist/{chunk-BEQU6QGW.js → chunk-IVXOYE43.js} +2 -2
- package/dist/{chunk-WXPBDEMW.js → chunk-JDQEQE2R.js} +2 -2
- package/dist/{chunk-CAVXVGYK.js → chunk-KAED7IBB.js} +2 -2
- package/dist/{chunk-OFOV6TTZ.js → chunk-KNZDGZSY.js} +2 -2
- package/dist/{chunk-KFZ3A2EA.js → chunk-L4QYW2HO.js} +2 -2
- package/dist/{chunk-IXBIL5WY.js → chunk-LJUQPT5G.js} +3 -3
- package/dist/{chunk-4SOISEZ3.js → chunk-MBENRPMY.js} +10 -10
- package/dist/chunk-MJFL75J6.js +42 -0
- package/dist/chunk-MJFL75J6.js.map +1 -0
- package/dist/{chunk-OKBGLAAI.js → chunk-N6GEGRCT.js} +2 -2
- package/dist/{chunk-U2A56LLF.js → chunk-OBQ2NZAR.js} +10 -10
- package/dist/{chunk-WGRAB3KB.js → chunk-ORVPS4ZW.js} +2 -2
- package/dist/{chunk-PFUXPTBT.js → chunk-P3AQ2YSX.js} +4 -4
- package/dist/{chunk-DE4U5PTV.js → chunk-P4TEQSIZ.js} +2 -2
- package/dist/{chunk-DQVT45LZ.js → chunk-P7HNMNN2.js} +7 -7
- package/dist/{chunk-ZG4GNPRE.js → chunk-PBE7NFB5.js} +5 -5
- package/dist/{chunk-T64HVBAP.js → chunk-PLGBPFEO.js} +2 -2
- package/dist/{chunk-5MA7ZLPD.js → chunk-QNUNAXBE.js} +35 -1
- package/dist/chunk-QNUNAXBE.js.map +1 -0
- package/dist/{chunk-GO2GCJ7S.js → chunk-R24RYSQX.js} +41 -41
- package/dist/{chunk-YJX3K5LK.js → chunk-RXGFITWS.js} +4 -4
- package/dist/{chunk-JEX2JL3U.js → chunk-SHVLNI4L.js} +2 -2
- package/dist/{chunk-LIGA5KHG.js → chunk-SY4AFWUZ.js} +31 -31
- package/dist/{chunk-GI47WZWA.js → chunk-SYDPJUFR.js} +2 -2
- package/dist/{chunk-55NKJDKX.js → chunk-SZBZOUHR.js} +2 -2
- package/dist/{chunk-UEY5TPEE.js → chunk-T6C3G67T.js} +2 -2
- package/dist/{chunk-HPCWJMMQ.js → chunk-TD5VTVPT.js} +5 -5
- package/dist/{chunk-E3NBMTTX.js → chunk-TLTBACYX.js} +2 -2
- package/dist/{chunk-AVVCPA7U.js → chunk-UCPH56YX.js} +2 -2
- package/dist/{chunk-GJOBCNST.js → chunk-VEQVXNWR.js} +4 -4
- package/dist/{chunk-2H3SITYD.js → chunk-VEWTHVX2.js} +2 -2
- package/dist/{chunk-K5Y42U2P.js → chunk-VPEMGBTI.js} +2 -2
- package/dist/{chunk-5JBVPJCT.js → chunk-WIAXVBQH.js} +2 -2
- package/dist/{chunk-KWUMXJN7.js → chunk-X53HJENJ.js} +2 -2
- package/dist/{chunk-KY3KJUNN.js → chunk-XC7OYOQC.js} +6 -6
- package/dist/{chunk-43FLJLT2.js → chunk-Y5HZFIQO.js} +1 -1
- package/dist/{chunk-DOJBV6WR.js → chunk-YK6SFDP2.js} +4 -4
- package/dist/{chunk-WBMT3C6A.js → chunk-Z3CKK5RR.js} +3 -3
- package/dist/{chunk-RQHIN3PY.js → chunk-ZG57BEUS.js} +2 -2
- package/dist/{chunk-MOJ4UDA3.js → chunk-ZZSFRWKD.js} +2 -2
- package/dist/cli.js +78 -77
- package/dist/coding/export-okf-codegraph.js +12 -12
- package/dist/compounding/engine.js +14 -14
- package/dist/config.js +16 -16
- package/dist/connectors/codex-materialize-runner.js +13 -13
- package/dist/connectors/index.js +13 -13
- package/dist/convergence-refresh.js +15 -15
- package/dist/corpus-watermark.js +15 -15
- package/dist/deep-recall-http-glue.js +6 -6
- package/dist/deep-recall-policy-llm.js +3 -3
- package/dist/deep-recall.js +2 -2
- package/dist/entity-retrieval.js +13 -13
- package/dist/external-wiki-access.js +47 -46
- package/dist/extraction-faithfulness.js +3 -3
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction.js +21 -20
- package/dist/fallback-llm-codex-subscription.d.ts.map +1 -1
- package/dist/fallback-llm-codex-subscription.js +1 -1
- package/dist/fallback-llm.js +2 -2
- package/dist/{first-start-migration-A6PHIBUQ.js → first-start-migration-QVD22WWS.js} +4 -4
- package/dist/harmonic-retrieval.js +13 -13
- package/dist/index.js +127 -126
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +5 -5
- package/dist/local-llm-native-schema.d.ts +50 -0
- package/dist/local-llm-native-schema.d.ts.map +1 -0
- package/dist/local-llm-native-schema.js +8 -0
- package/dist/local-llm-native-schema.js.map +1 -0
- package/dist/local-llm.d.ts +1 -0
- package/dist/local-llm.d.ts.map +1 -1
- package/dist/local-llm.js +4 -3
- package/dist/location/index.js +15 -15
- package/dist/maintenance/memory-governance.js +13 -13
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -13
- package/dist/maintenance/rebuild-memory-projection-runner.js +15 -15
- package/dist/maintenance/rebuild-memory-projection.js +14 -14
- package/dist/memory-browse-operations.js +47 -46
- package/dist/memory-browse.js +3 -3
- package/dist/model-registry.d.ts +11 -0
- package/dist/model-registry.d.ts.map +1 -1
- package/dist/model-registry.js +1 -1
- package/dist/namespaces/migrate.js +14 -14
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.js +13 -13
- package/dist/offline-sync-changeset-generations.js +3 -3
- package/dist/offline-sync-embedding-generation.js +2 -2
- package/dist/offline-sync-snapshot-stream.js +5 -5
- package/dist/offline-sync.js +7 -7
- package/dist/operator-doctor-corpus.js +16 -16
- package/dist/operator-toolkit.js +25 -25
- package/dist/orchestration/backlog-scheduler.d.ts +8 -0
- package/dist/orchestration/backlog-scheduler.d.ts.map +1 -1
- package/dist/orchestration/backlog-scheduler.js +115 -103
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +103 -102
- package/dist/orchestration/extraction-queue-coordinator.d.ts +4 -9
- package/dist/orchestration/extraction-queue-coordinator.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +26 -25
- package/dist/orchestrator.js +102 -101
- package/dist/recall-navigation-operations.js +47 -46
- package/dist/recall-navigation.js +46 -45
- package/dist/recall-planner-llm.js +2 -2
- package/dist/recall-state-view-admission.js +3 -3
- package/dist/recall-why-service.js +3 -3
- package/dist/resume-bundles.js +16 -16
- package/dist/search/factory.js +6 -6
- package/dist/search/index.js +11 -11
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/orama-backend.js +2 -2
- package/dist/semantic-consolidation.js +14 -14
- package/dist/semantic-rule-promotion.js +13 -13
- package/dist/semantic-rule-verifier.js +13 -13
- package/dist/source-agent-qualifier.js +16 -16
- package/dist/standup/build.js +13 -13
- package/dist/storage.js +12 -12
- package/dist/summarizer.js +7 -6
- package/dist/support-passport/index.js +49 -48
- package/dist/transfer/export-okf.js +13 -13
- package/dist/verified-recall.js +13 -13
- package/dist/who-knows-cli.js +14 -14
- package/dist/who-knows.js +13 -13
- package/package.json +2 -2
- package/src/backlog-scheduler.test.ts +104 -0
- package/src/fallback-llm-codex-subscription.ts +10 -1
- package/src/local-llm-json-schema-fallback.test.ts +315 -0
- package/src/local-llm-native-schema.ts +78 -0
- package/src/local-llm.ts +8 -9
- package/src/model-registry.ts +40 -0
- package/src/orchestration/backlog-scheduler.ts +32 -0
- package/src/orchestration/extraction-queue-coordinator.ts +4 -19
- package/src/orchestrator-extraction-queue.test.ts +70 -13
- package/dist/chunk-5MA7ZLPD.js.map +0 -1
- package/dist/chunk-5RW247F5.js.map +0 -1
- package/dist/chunk-YIJECSIX.js.map +0 -1
- /package/dist/{auto-sync-ANOJDQD4.js.map → auto-sync-XHSS3XPL.js.map} +0 -0
- /package/dist/{chunk-NHTEEGE4.js.map → chunk-233S3MXC.js.map} +0 -0
- /package/dist/{chunk-N7NAGECH.js.map → chunk-36B5VPRU.js.map} +0 -0
- /package/dist/{chunk-LC55ZXLR.js.map → chunk-3GGCMRO7.js.map} +0 -0
- /package/dist/{chunk-RZED7FAU.js.map → chunk-3M7YP42P.js.map} +0 -0
- /package/dist/{chunk-KPCTZB3U.js.map → chunk-3MBSD53O.js.map} +0 -0
- /package/dist/{chunk-VWHWWIFS.js.map → chunk-4DLZ2ITE.js.map} +0 -0
- /package/dist/{chunk-WN2DASTS.js.map → chunk-5BE3FLKL.js.map} +0 -0
- /package/dist/{chunk-45SFSQON.js.map → chunk-5IQL4N37.js.map} +0 -0
- /package/dist/{chunk-CIL4GHMD.js.map → chunk-6Q6AQ36B.js.map} +0 -0
- /package/dist/{chunk-XV7PJVQO.js.map → chunk-6RPPZL7W.js.map} +0 -0
- /package/dist/{chunk-EQ6EMJRG.js.map → chunk-6Y5ANLDH.js.map} +0 -0
- /package/dist/{chunk-V33ETCF6.js.map → chunk-7FFGWIBN.js.map} +0 -0
- /package/dist/{chunk-5QV6CE6K.js.map → chunk-B36ACJG7.js.map} +0 -0
- /package/dist/{chunk-2WDFLORC.js.map → chunk-BZTA7DR4.js.map} +0 -0
- /package/dist/{chunk-5XOCAJHC.js.map → chunk-C44DRDZM.js.map} +0 -0
- /package/dist/{chunk-UIFWZMO7.js.map → chunk-CLVILSBR.js.map} +0 -0
- /package/dist/{chunk-KH2HB3OW.js.map → chunk-COIQ5N4J.js.map} +0 -0
- /package/dist/{chunk-CU5N4RDI.js.map → chunk-DANFOVQG.js.map} +0 -0
- /package/dist/{chunk-FU2ZLXVN.js.map → chunk-DEGE32C3.js.map} +0 -0
- /package/dist/{chunk-LUXVW5UU.js.map → chunk-E22CQZ3H.js.map} +0 -0
- /package/dist/{chunk-DVDRKCZK.js.map → chunk-ELUG6NKQ.js.map} +0 -0
- /package/dist/{chunk-DLLQMNYQ.js.map → chunk-F3FNXE7C.js.map} +0 -0
- /package/dist/{chunk-YIXWY4OZ.js.map → chunk-FETPTCQZ.js.map} +0 -0
- /package/dist/{chunk-WPPAXTW6.js.map → chunk-FGUWCE5I.js.map} +0 -0
- /package/dist/{chunk-FDUCIUQ5.js.map → chunk-FJ2VJTGA.js.map} +0 -0
- /package/dist/{chunk-ENPJX3BB.js.map → chunk-FMFCQRDM.js.map} +0 -0
- /package/dist/{chunk-BNU5TQLR.js.map → chunk-FOQ7TW2T.js.map} +0 -0
- /package/dist/{chunk-DHQLVS7J.js.map → chunk-FP2AT4WL.js.map} +0 -0
- /package/dist/{chunk-DLZGSZVC.js.map → chunk-FYQUUIPI.js.map} +0 -0
- /package/dist/{chunk-XTN54NML.js.map → chunk-G3T6YMBO.js.map} +0 -0
- /package/dist/{chunk-MUH7RR6T.js.map → chunk-G5NH3SSX.js.map} +0 -0
- /package/dist/{chunk-G7I2RQ64.js.map → chunk-GCJA5KKT.js.map} +0 -0
- /package/dist/{chunk-A2BH2VE2.js.map → chunk-GWOFCHPN.js.map} +0 -0
- /package/dist/{chunk-TJ5YGCPV.js.map → chunk-GXVK754R.js.map} +0 -0
- /package/dist/{chunk-Y2ZGT4W7.js.map → chunk-HB5TNQMM.js.map} +0 -0
- /package/dist/{chunk-QYLEE4UQ.js.map → chunk-HCFNZWFB.js.map} +0 -0
- /package/dist/{chunk-F4ZHKDBW.js.map → chunk-HLWXCDUQ.js.map} +0 -0
- /package/dist/{chunk-62O7YWBR.js.map → chunk-HTDXNIO6.js.map} +0 -0
- /package/dist/{chunk-4RASUAN3.js.map → chunk-HXFIILGF.js.map} +0 -0
- /package/dist/{chunk-6EKP7BJW.js.map → chunk-I4LJJ44E.js.map} +0 -0
- /package/dist/{chunk-STDAR7M7.js.map → chunk-IBQ7LGUJ.js.map} +0 -0
- /package/dist/{chunk-PUP7NTNB.js.map → chunk-IRFQKR4Y.js.map} +0 -0
- /package/dist/{chunk-BEQU6QGW.js.map → chunk-IVXOYE43.js.map} +0 -0
- /package/dist/{chunk-WXPBDEMW.js.map → chunk-JDQEQE2R.js.map} +0 -0
- /package/dist/{chunk-CAVXVGYK.js.map → chunk-KAED7IBB.js.map} +0 -0
- /package/dist/{chunk-OFOV6TTZ.js.map → chunk-KNZDGZSY.js.map} +0 -0
- /package/dist/{chunk-KFZ3A2EA.js.map → chunk-L4QYW2HO.js.map} +0 -0
- /package/dist/{chunk-IXBIL5WY.js.map → chunk-LJUQPT5G.js.map} +0 -0
- /package/dist/{chunk-4SOISEZ3.js.map → chunk-MBENRPMY.js.map} +0 -0
- /package/dist/{chunk-OKBGLAAI.js.map → chunk-N6GEGRCT.js.map} +0 -0
- /package/dist/{chunk-U2A56LLF.js.map → chunk-OBQ2NZAR.js.map} +0 -0
- /package/dist/{chunk-WGRAB3KB.js.map → chunk-ORVPS4ZW.js.map} +0 -0
- /package/dist/{chunk-PFUXPTBT.js.map → chunk-P3AQ2YSX.js.map} +0 -0
- /package/dist/{chunk-DE4U5PTV.js.map → chunk-P4TEQSIZ.js.map} +0 -0
- /package/dist/{chunk-DQVT45LZ.js.map → chunk-P7HNMNN2.js.map} +0 -0
- /package/dist/{chunk-ZG4GNPRE.js.map → chunk-PBE7NFB5.js.map} +0 -0
- /package/dist/{chunk-T64HVBAP.js.map → chunk-PLGBPFEO.js.map} +0 -0
- /package/dist/{chunk-GO2GCJ7S.js.map → chunk-R24RYSQX.js.map} +0 -0
- /package/dist/{chunk-YJX3K5LK.js.map → chunk-RXGFITWS.js.map} +0 -0
- /package/dist/{chunk-JEX2JL3U.js.map → chunk-SHVLNI4L.js.map} +0 -0
- /package/dist/{chunk-LIGA5KHG.js.map → chunk-SY4AFWUZ.js.map} +0 -0
- /package/dist/{chunk-GI47WZWA.js.map → chunk-SYDPJUFR.js.map} +0 -0
- /package/dist/{chunk-55NKJDKX.js.map → chunk-SZBZOUHR.js.map} +0 -0
- /package/dist/{chunk-UEY5TPEE.js.map → chunk-T6C3G67T.js.map} +0 -0
- /package/dist/{chunk-HPCWJMMQ.js.map → chunk-TD5VTVPT.js.map} +0 -0
- /package/dist/{chunk-E3NBMTTX.js.map → chunk-TLTBACYX.js.map} +0 -0
- /package/dist/{chunk-AVVCPA7U.js.map → chunk-UCPH56YX.js.map} +0 -0
- /package/dist/{chunk-GJOBCNST.js.map → chunk-VEQVXNWR.js.map} +0 -0
- /package/dist/{chunk-2H3SITYD.js.map → chunk-VEWTHVX2.js.map} +0 -0
- /package/dist/{chunk-K5Y42U2P.js.map → chunk-VPEMGBTI.js.map} +0 -0
- /package/dist/{chunk-5JBVPJCT.js.map → chunk-WIAXVBQH.js.map} +0 -0
- /package/dist/{chunk-KWUMXJN7.js.map → chunk-X53HJENJ.js.map} +0 -0
- /package/dist/{chunk-KY3KJUNN.js.map → chunk-XC7OYOQC.js.map} +0 -0
- /package/dist/{chunk-43FLJLT2.js.map → chunk-Y5HZFIQO.js.map} +0 -0
- /package/dist/{chunk-DOJBV6WR.js.map → chunk-YK6SFDP2.js.map} +0 -0
- /package/dist/{chunk-WBMT3C6A.js.map → chunk-Z3CKK5RR.js.map} +0 -0
- /package/dist/{chunk-RQHIN3PY.js.map → chunk-ZG57BEUS.js.map} +0 -0
- /package/dist/{chunk-MOJ4UDA3.js.map → chunk-ZZSFRWKD.js.map} +0 -0
- /package/dist/{first-start-migration-A6PHIBUQ.js.map → first-start-migration-QVD22WWS.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/orchestration/backlog-scheduler.ts"],"sourcesContent":["/**\n * Daemon-owned extraction backlog scheduler.\n *\n * ONE bounded in-process loop that owns ALL persisted extraction backlog:\n * at startup (existing drain claims + buffered sessions), on every poll tick\n * (new persisted work), and by retrying keys that are still pending — with\n * bounded memory (per-key COUNTS only; candidate scans never retain turn\n * payloads) and bounded outstanding work (the extraction queue's own\n * maxConcurrency gates submissions, so live foreground work keeps its share\n * of the queue).\n *\n * Claim authority: an existing claim — including an EMPTY ack tombstone — is\n * authoritative over the live buffer's in-memory copy. A tombstoned key is\n * never re-claimed or counted as work; new ingress consumes the tombstone\n * through the native save handover, which is what makes the key a candidate\n * again. Claim creation is fenced: the key is reserved synchronously on the\n * extraction queue BEFORE the async claim decision, so a queued live task for\n * the same key cannot start past the claimed-session gate until the decision\n * settles; live capture continues via the native merge-into-claim protocol.\n *\n * Failed, deferred, or policy-denied outcomes keep their turns durable in the\n * claim and re-submit after backoff (exponential from `retryBaseMs` to\n * `retryMaxMs`, reset by progress; denials wait the full max) — never a busy\n * retry. `stop()` aborts in-flight drains at their chunk boundary and leaves\n * every claim retryable; a restarted daemon's scheduler adopts them.\n */\n\nimport { hostname } from \"node:os\";\nimport { log } from \"../logger.js\";\nimport type { Orchestrator } from \"../orchestrator.js\";\nimport type { BufferDrainClaims, DrainLease } from \"../storage/buffer-drain-claims.js\";\nimport { BufferDrainRunner } from \"./buffer-drain-runner.js\";\nimport type { DrainRunnerEvent, DrainSessionOutcome } from \"./buffer-drain-runner.js\";\nimport type { ExtractionQueueCoordinator } from \"./extraction-queue-coordinator.js\";\n\n/** What the scheduler needs from its host (structurally satisfied by the\n * orchestrator wiring); injectable so tests drive ticks deterministically. */\nexport interface BacklogSchedulerDeps {\n queue: Pick<ExtractionQueueCoordinator, \"tryReserveKey\" | \"releaseKeyReservation\" | \"maxConcurrency\">;\n claims: Pick<BufferDrainClaims, \"list\" | \"listPage\" | \"claimFromSessionFile\" | \"isClaimed\">;\n /** Live per-key pending counts (counts only — never turn payloads). May be\n * async: hosts with a lazily-loaded buffer load it here (idempotent). */\n liveBufferCounts():\n | Map<string, { turns: number; retainedTurns: number }>\n | Promise<Map<string, { turns: number; retainedTurns: number }>>;\n /** A fresh lease for claims this scheduler takes. */\n lease(): DrainLease;\n /** Drain one key to quiescence (BufferDrainRunner.drainSession). */\n drainKey(\n key: string,\n options: { ownerId: string; signal: AbortSignal; onEvent?: (event: DrainRunnerEvent) => void }\n ): Promise<DrainSessionOutcome>;\n /** Test seam: monotonic-ish clock for backoff windows. */\n now?(): number;\n}\n\nexport interface BacklogSchedulerOptions {\n ownerId?: string;\n /** Scan cadence in ms (startup + new-work + retry checks). */\n pollMs?: number;\n retryBaseMs?: number;\n retryMaxMs?: number;\n now?: () => number;\n}\n\nexport interface BacklogSchedulerCounters {\n /** Keys submitted to the drain (claimed or adopted) this process lifetime. */\n claimed: number;\n /** Outcomes with genuinely empty claims (durable outputs preceded ack). */\n processed: number;\n /** Sum of durable outputs (memories + entities) across processed drains. */\n durableOutputs: number;\n /** Re-submissions after a failed/deferred/denied outcome. */\n retried: number;\n denied: { keys: number; turns: number };\n failed: number;\n}\n\nexport type BacklogKeyState = \"inflight\" | \"backoff\" | \"denied\";\n\nexport interface BacklogKeySnapshot {\n key: string;\n state: BacklogKeyState;\n turnsRemaining?: number;\n reason?: string;\n}\n\nexport interface BacklogSchedulerSnapshot {\n counters: BacklogSchedulerCounters;\n inFlight: string[];\n reservedKeys: string[];\n keys: BacklogKeySnapshot[];\n}\n\ninterface KeyState {\n state: BacklogKeyState;\n nextAttemptMs: number;\n /** Last observed remaining turns; progress resets the backoff exponent. */\n turnsRemaining: number;\n reason?: string;\n backoffExponent: number;\n}\n\nconst DEFAULT_POLL_MS = 15_000;\nconst DEFAULT_RETRY_BASE_MS = 30_000;\nconst DEFAULT_RETRY_MAX_MS = 15 * 60_000;\n\nexport class BacklogScheduler {\n private readonly deps: BacklogSchedulerDeps;\n private readonly options: Required<Omit<BacklogSchedulerOptions, \"now\">> & Pick<BacklogSchedulerOptions, \"now\">;\n private readonly keys = new Map<string, KeyState>();\n private readonly inFlight = new Map<string, { controller: AbortController; settled: Promise<void> }>();\n private readonly reserved = new Set<string>();\n private readonly counters: BacklogSchedulerCounters = {\n claimed: 0,\n processed: 0,\n durableOutputs: 0,\n retried: 0,\n denied: { keys: 0, turns: 0 },\n failed: 0,\n };\n private claimCursor: string | undefined;\n private timer: ReturnType<typeof setInterval> | undefined;\n private ticking = false;\n private stopped = true;\n\n constructor(deps: BacklogSchedulerDeps, options: BacklogSchedulerOptions = {}) {\n this.deps = deps;\n this.options = {\n ownerId: options.ownerId ?? `daemon-drain-${process.pid}`,\n pollMs: options.pollMs ?? DEFAULT_POLL_MS,\n retryBaseMs: options.retryBaseMs ?? DEFAULT_RETRY_BASE_MS,\n retryMaxMs: options.retryMaxMs ?? DEFAULT_RETRY_MAX_MS,\n now: options.now,\n };\n }\n\n /** Idempotent. Starts the poll timer (unref'd) and runs an initial tick. */\n start(): void {\n if (!this.stopped) return;\n this.stopped = false;\n this.timer = setInterval(() => void this.tick(), this.options.pollMs);\n this.timer.unref?.();\n void this.tick();\n }\n\n /** Idempotent. Stops the timer, aborts in-flight drains (their claims stay\n * retryable) and waits for them to settle. */\n async stop(): Promise<void> {\n if (this.stopped) return;\n this.stopped = true;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = undefined;\n }\n const aborts: Promise<void>[] = [];\n for (const entry of this.inFlight.values()) {\n entry.controller.abort(new Error(\"backlog scheduler stopping\"));\n aborts.push(entry.settled);\n }\n await Promise.allSettled(aborts);\n }\n\n /** Bounded snapshot for ops/watchers: counters + per-key states + live sets. */\n snapshot(): BacklogSchedulerSnapshot {\n return {\n counters: {\n claimed: this.counters.claimed,\n processed: this.counters.processed,\n durableOutputs: this.counters.durableOutputs,\n retried: this.counters.retried,\n denied: { ...this.counters.denied },\n failed: this.counters.failed,\n },\n inFlight: [...this.inFlight.keys()],\n reservedKeys: [...this.reserved],\n keys: [...this.keys.entries()].map(([key, state]) => ({\n key,\n state: state.state,\n turnsRemaining: state.turnsRemaining,\n reason: state.reason,\n })),\n };\n }\n\n /** One scan+submit pass (tests drive this instead of the timer). Waits out\n * any in-progress tick first so the pass always actually scans. */\n async tickForTest(): Promise<void> {\n // setImmediate: yields to the event loop so pending I/O (a slow first\n // scan) can finish; a microtask spin would starve it.\n while (this.ticking) await new Promise((resolve) => setImmediate(resolve));\n await this.tick();\n }\n\n /** Await the settle (slot release) of everything currently in flight,\n * optionally excluding one still-gated key (tests). */\n async settleForTest(exclude?: string): Promise<void> {\n for (;;) {\n const pending = [...this.inFlight.entries()].filter(([key]) => key !== exclude).map(([, entry]) => entry.settled);\n if (pending.length === 0) return;\n await Promise.allSettled(pending);\n }\n }\n\n private now(): number {\n return this.options.now?.() ?? Date.now();\n }\n\n private async tick(): Promise<void> {\n if (this.ticking || this.stopped) return;\n this.ticking = true;\n const cursorBeforeTick = this.claimCursor;\n try {\n // stop() may land while discovery's I/O is pending: re-check before\n // submitting anything, and again per candidate.\n // A discovery failure (EACCES/EIO on the claims dir) must not reject\n // into a detached timer callback: it would be an unhandled rejection\n // that terminates the server. Log, skip this pass, retry next poll.\n let candidates: { key: string; needsClaim: boolean }[];\n try {\n candidates = await this.discoverCandidates();\n } catch (err) {\n // Discovery may have listed a page before it failed: the page cursor\n // already moved, so restore it — otherwise those claims wait for the\n // cursor to wrap instead of the next poll.\n this.claimCursor = cursorBeforeTick;\n log.warn(\n `backlog drain: discovery failed; retrying next poll: ${err instanceof Error ? err.message : String(err)}`\n );\n return;\n }\n if (this.stopped) return;\n const dropped = this.submitCandidates(candidates);\n // The concurrency bound stopped submission mid-page: rewind the page\n // cursor so the unsubmitted claims are re-listed on the next tick\n // (already-submitted ones are gated by inFlight and key backoff).\n if (dropped) this.claimCursor = cursorBeforeTick;\n } finally {\n this.ticking = false;\n }\n }\n\n /** Bounded discovery: ONE page of existing claims with pending turns */\n private async discoverCandidates(): Promise<{ key: string; needsClaim: boolean }[]> {\n const out: { key: string; needsClaim: boolean }[] = [];\n const seen = new Set<string>();\n const pageLimit = Math.max(this.submissionLimit() * 4, 16);\n const page = await this.deps.claims.listPage(this.claimCursor, pageLimit);\n for (const listed of page.entries) {\n seen.add(listed.key);\n out.push({ key: listed.key, needsClaim: false });\n }\n this.claimCursor = page.nextCursor;\n for (const [key, counts] of await this.deps.liveBufferCounts()) {\n if (counts.turns + counts.retainedTurns <= 0) continue;\n if (seen.has(key) || this.deps.claims.isClaimed(key)) continue;\n seen.add(key);\n out.push({ key, needsClaim: true });\n }\n return out;\n }\n\n /** Submission bound: the queue's own concurrency limit, read with the\n * documented \"0 disables\" contract — a zero limit submits nothing. */\n private submissionLimit(): number {\n if (this.deps.queue.maxConcurrency <= 0) return 0;\n return this.deps.queue.maxConcurrency;\n }\n\n /** Submit discovery candidates within the queue's concurrency bound. */\n private submitCandidates(candidates: { key: string; needsClaim: boolean }[]): boolean {\n let dropped = false;\n for (const candidate of candidates) {\n if (this.stopped || this.inFlight.size >= this.submissionLimit()) {\n dropped = true;\n break;\n }\n if (!this.candidateEligible(candidate)) continue;\n // Fence the claim decision: reserve the key synchronously BEFORE the\n // async rename so no queued task for it can pass the claimed gate in\n // the meantime. Release happens when the decision settles.\n if (candidate.needsClaim) {\n if (!this.deps.queue.tryReserveKey(candidate.key)) continue;\n this.reserved.add(candidate.key);\n }\n void this.submit(candidate.key, candidate.needsClaim);\n }\n return dropped;\n }\n\n /** inFlight is the authority for \"already submitted\" — key state only\n * exists once an outcome landed (backoff/denied gating below). */\n private candidateEligible(candidate: { key: string; needsClaim: boolean }): boolean {\n if (this.stopped || this.inFlight.size >= this.submissionLimit()) return false;\n if (this.inFlight.has(candidate.key)) return false;\n const state = this.keys.get(candidate.key);\n return !(state && this.now() < state.nextAttemptMs);\n }\n\n /** Claim (when needed), then drain one key; the reservation spans the async\n * claim decision, the queue entry carries the key afterwards. */\n private async submit(key: string, needsClaim: boolean): Promise<void> {\n const controller = new AbortController();\n const { promise: settled, resolve: settle } = Promise.withResolvers<void>();\n this.inFlight.set(key, { controller, settled });\n try {\n if (!(await this.claimForSubmit(key, needsClaim))) return;\n // Stopped between the claim decision and the task: leave the claim\n // with its lease (it expires; the next start adopts) — never drain.\n if (this.stopped) return;\n await this.drainClaimedKey(key, controller.signal);\n } catch (err) {\n // Claim/drain failures are scheduler-level: the claim content is\n // untouched — count failed and back off (never an unhandled rejection\n // in the detached submission).\n this.counters.failed += 1;\n const message = err instanceof Error ? err.message : String(err);\n // SAFETY: a thrown non-Error (incl. null) carries no retry hint; the\n // optional chain reads the hint off Error throws only.\n this.setBackoff(key, (err as { turnsRemaining?: number } | null | undefined)?.turnsRemaining ?? 0, message);\n log.warn(`backlog drain: ${key} submission failed: ${message}`);\n } finally {\n this.inFlight.delete(key);\n this.reserved.delete(key);\n this.deps.queue.releaseKeyReservation(key);\n settle();\n }\n }\n\n /** after all — the key goes quiet without a task. \"claimed\": ours. */\n private async claimForSubmit(key: string, needsClaim: boolean): Promise<boolean> {\n if (!needsClaim) return true;\n try {\n const outcome = await this.deps.claims.claimFromSessionFile(key, this.deps.lease());\n if (outcome === \"empty\") {\n this.keys.delete(key);\n return false;\n }\n return true;\n } finally {\n this.reserved.delete(key);\n this.deps.queue.releaseKeyReservation(key);\n }\n }\n\n /** Drain one claimed key. drainKey reports failures as outcomes; a thrown\n * error still means the claim content is intact — count it failed and\n * back off. */\n private async drainClaimedKey(key: string, signal: AbortSignal): Promise<void> {\n this.counters.claimed += 1;\n try {\n const outcome = await this.deps.drainKey(key, {\n ownerId: this.options.ownerId,\n signal,\n });\n this.applyOutcome(key, outcome);\n } catch (err) {\n this.counters.failed += 1;\n const message = err instanceof Error ? err.message : String(err);\n // SAFETY: a thrown non-Error (incl. null) carries no retry hint; the\n // optional chain reads the hint off Error throws only.\n this.setBackoff(key, (err as { turnsRemaining?: number } | null | undefined)?.turnsRemaining ?? 0, message);\n log.warn(`backlog drain: ${key} threw: ${message}`);\n }\n }\n\n private applyOutcome(key: string, outcome: DrainSessionOutcome): void {\n const deniedTurns = outcome.denied?.reduce((sum, entry) => sum + entry.turns, 0) ?? 0;\n const previous = this.keys.get(key);\n const progressed = outcome.turnsRemaining < (previous?.turnsRemaining ?? Number.POSITIVE_INFINITY);\n if (outcome.status === \"drained\") {\n // The claim is now an empty tombstone: authoritative, nothing pending.\n // New ingress consumes it via the native save path and re-candidates.\n this.keys.delete(key);\n this.counters.processed += 1;\n this.counters.durableOutputs += outcome.durableOutputCount;\n log.info(\n `backlog drain: ${key} drained (${outcome.turnsAtStart} turn(s), ${outcome.durableOutputCount} durable output(s))`\n );\n return;\n }\n this.recordNonDrainedCounters(previous, outcome, deniedTurns);\n const denied = deniedTurns > 0 && outcome.turnsRemaining > 0;\n this.keys.set(key, this.nextKeyState(previous, outcome, denied, progressed));\n log.info(\n `backlog drain: ${key} ${outcome.status} (${outcome.turnsRemaining} turn(s) remaining` +\n `${denied ? `, denied: ${deniedTurns}` : \"\"}${outcome.reason ? `, ${outcome.reason}` : \"\"})`\n );\n }\n\n /** Denied backlog counters for a non-drained outcome. */\n private recordNonDrainedCounters(\n previous: KeyState | undefined,\n outcome: DrainSessionOutcome,\n deniedTurns: number\n ): void {\n if (deniedTurns > 0) {\n this.counters.denied.keys += 1;\n this.counters.denied.turns += deniedTurns;\n }\n if (outcome.status === \"failed\") this.counters.failed += 1;\n else if (previous !== undefined && (previous.state === \"backoff\" || previous.state === \"denied\"))\n this.counters.retried += 1;\n }\n\n /** The post-drain key state: denial waits the full max window (its content\n * is valid but currently unauthorized); progress resets the exponent. */\n private nextKeyState(\n previous: KeyState | undefined,\n outcome: DrainSessionOutcome,\n denied: boolean,\n progressed: boolean\n ): KeyState {\n return {\n state: denied ? \"denied\" : \"backoff\",\n nextAttemptMs: this.now() + this.backoffMs(previous, progressed && !denied),\n turnsRemaining: outcome.turnsRemaining,\n reason: outcome.reason,\n backoffExponent: this.nextBackoffExponent(denied, progressed, previous),\n };\n }\n\n private nextBackoffExponent(denied: boolean, progressed: boolean, previous: KeyState | undefined): number {\n return denied || !progressed ? (previous?.backoffExponent ?? 0) + 1 : 0;\n }\n\n private backoffMs(previous: KeyState | undefined, progressed: boolean): number {\n if (previous?.state === \"denied\") return this.options.retryMaxMs;\n const exponent = progressed ? 0 : (previous?.backoffExponent ?? 0) + 1;\n return Math.min(this.options.retryBaseMs * 2 ** exponent, this.options.retryMaxMs);\n }\n\n private setBackoff(key: string, turnsRemaining: number, reason: string): void {\n const previous = this.keys.get(key);\n this.keys.set(key, {\n state: \"backoff\",\n nextAttemptMs: this.now() + this.backoffMs(previous, false),\n turnsRemaining,\n reason,\n backoffExponent: (previous?.backoffExponent ?? 0) + 1,\n });\n }\n}\n\n/** Lease lifetime for claims the scheduler takes (matches the runner default). */\nconst SCHEDULER_LEASE_MS = 120_000;\n\n/** Wire the scheduler to an orchestrator's own queue, claim store, live buffer\n * counts and drain runner — the daemon's single ownership point. */\nexport function wireBacklogScheduler(\n orchestrator: Orchestrator,\n options: BacklogSchedulerOptions = {}\n): BacklogScheduler {\n const ownerId = options.ownerId ?? `daemon-drain-${process.pid}`;\n const runner = new BufferDrainRunner(orchestrator);\n return new BacklogScheduler(\n {\n queue: orchestrator.extractionQueueCoordinator,\n claims: orchestrator.storage.bufferDrainClaims(),\n liveBufferCounts: async () => {\n // The daemon's buffer may be lazy: ensure the persisted state is in\n // memory before counting (load is guarded/idempotent).\n await orchestrator.buffer.load();\n return orchestrator.buffer.entryCounts();\n },\n lease: () => {\n const now = new Date().toISOString();\n return {\n ownerId,\n pid: process.pid,\n host: hostname(),\n acquiredAt: now,\n heartbeatAt: now,\n leaseMs: SCHEDULER_LEASE_MS,\n };\n },\n drainKey: (key, drainOptions) => runner.drainSession(key, drainOptions),\n },\n { ...options, ownerId }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,gBAAgB;AA4EzB,IAAM,kBAAkB;AACxB,IAAM,wBAAwB;AAC9B,IAAM,uBAAuB,KAAK;AAE3B,IAAM,mBAAN,MAAuB;AAAA,EACX;AAAA,EACA;AAAA,EACA,OAAO,oBAAI,IAAsB;AAAA,EACjC,WAAW,oBAAI,IAAqE;AAAA,EACpF,WAAW,oBAAI,I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AAA,EAEQ,WAAW,KAAa,gBAAwB,QAAsB;AAC5E,UAAM,WAAW,KAAK,KAAK,IAAI,GAAG;AAClC,SAAK,KAAK,IAAI,KAAK;AAAA,MACjB,OAAO;AAAA,MACP,eAAe,KAAK,IAAI,IAAI,KAAK,UAAU,UAAU,KAAK;AAAA,MAC1D;AAAA,MACA;AAAA,MACA,kBAAkB,UAAU,mBAAmB,KAAK;AAAA,IACtD,CAAC;AAAA,EACH;AACF;AAGA,IAAM,qBAAqB;AAIpB,SAAS,qBACd,cACA,UAAmC,CAAC,GAClB;AAClB,QAAM,UAAU,QAAQ,WAAW,gBAAgB,QAAQ,GAAG;AAC9D,QAAM,SAAS,IAAI,kBAAkB,YAAY;AACjD,SAAO,IAAI;AAAA,IACT;AAAA,MACE,OAAO,aAAa;AAAA,MACpB,QAAQ,aAAa,QAAQ,kBAAkB;AAAA,MAC/C,kBAAkB,YAAY;AAG5B,cAAM,aAAa,OAAO,KAAK;AAC/B,eAAO,aAAa,OAAO,YAAY;AAAA,MACzC;AAAA,MACA,OAAO,MAAM;AACX,cAAM,OAAM,oBAAI,KAAK,GAAE,YAAY;AACnC,eAAO;AAAA,UACL;AAAA,UACA,KAAK,QAAQ;AAAA,UACb,MAAM,SAAS;AAAA,UACf,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,UAAU,CAAC,KAAK,iBAAiB,OAAO,aAAa,KAAK,YAAY;AAAA,IACxE;AAAA,IACA,EAAE,GAAG,SAAS,QAAQ;AAAA,EACxB;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/orchestration/backlog-scheduler.ts"],"sourcesContent":["/**\n * Daemon-owned extraction backlog scheduler.\n *\n * ONE bounded in-process loop that owns ALL persisted extraction backlog:\n * at startup (existing drain claims + buffered sessions), on every poll tick\n * (new persisted work), and by retrying keys that are still pending — with\n * bounded memory (per-key COUNTS only; candidate scans never retain turn\n * payloads) and bounded outstanding work (the extraction queue's own\n * maxConcurrency gates submissions, so live foreground work keeps its share\n * of the queue).\n *\n * Claim authority: an existing claim — including an EMPTY ack tombstone — is\n * authoritative over the live buffer's in-memory copy. A tombstoned key is\n * never re-claimed or counted as work; new ingress consumes the tombstone\n * through the native save handover, which is what makes the key a candidate\n * again. Claim creation is fenced: the key is reserved synchronously on the\n * extraction queue BEFORE the async claim decision, so a queued live task for\n * the same key cannot start past the claimed-session gate until the decision\n * settles; live capture continues via the native merge-into-claim protocol.\n *\n * Failed, deferred, or policy-denied outcomes keep their turns durable in the\n * claim and re-submit after backoff (exponential from `retryBaseMs` to\n * `retryMaxMs`, reset by progress; denials wait the full max) — never a busy\n * retry. `stop()` aborts in-flight drains at their chunk boundary and leaves\n * every claim retryable; a restarted daemon's scheduler adopts them.\n */\n\nimport { hostname } from \"node:os\";\nimport { log } from \"../logger.js\";\nimport type { Orchestrator } from \"../orchestrator.js\";\nimport type { BufferDrainClaims, DrainLease } from \"../storage/buffer-drain-claims.js\";\nimport { BufferDrainRunner } from \"./buffer-drain-runner.js\";\nimport type { DrainRunnerEvent, DrainSessionOutcome } from \"./buffer-drain-runner.js\";\nimport type { ExtractionQueueCoordinator } from \"./extraction-queue-coordinator.js\";\nimport type { ProviderBreakerSnapshot } from \"./provider-breaker.js\";\n\n/** What the scheduler needs from its host (structurally satisfied by the\n * orchestrator wiring); injectable so tests drive ticks deterministically. */\nexport interface BacklogSchedulerDeps {\n queue: Pick<ExtractionQueueCoordinator, \"tryReserveKey\" | \"releaseKeyReservation\" | \"maxConcurrency\">;\n claims: Pick<BufferDrainClaims, \"list\" | \"listPage\" | \"claimFromSessionFile\" | \"isClaimed\">;\n /** Live per-key pending counts (counts only — never turn payloads). May be\n * async: hosts with a lazily-loaded buffer load it here (idempotent). */\n liveBufferCounts():\n | Map<string, { turns: number; retainedTurns: number }>\n | Promise<Map<string, { turns: number; retainedTurns: number }>>;\n /** A fresh lease for claims this scheduler takes. */\n lease(): DrainLease;\n /** Drain one key to quiescence (BufferDrainRunner.drainSession). */\n drainKey(\n key: string,\n options: { ownerId: string; signal: AbortSignal; onEvent?: (event: DrainRunnerEvent) => void }\n ): Promise<DrainSessionOutcome>;\n /** Shared provider circuit-breaker snapshot (the same instance the run\n * coordinator gates attempts on). While OPEN inside its cooldown window\n * the scheduler skips submission entirely — claims stay durable, and the\n * breaker's single half-open probe (one attempt through once the window\n * lapses) keeps recovery automatic. Optional: hosts without a breaker\n * never skip. */\n breakerSnapshot?(): ProviderBreakerSnapshot;\n /** Test seam: monotonic-ish clock for backoff windows. */\n now?(): number;\n}\n\nexport interface BacklogSchedulerOptions {\n ownerId?: string;\n /** Scan cadence in ms (startup + new-work + retry checks). */\n pollMs?: number;\n retryBaseMs?: number;\n retryMaxMs?: number;\n now?: () => number;\n}\n\nexport interface BacklogSchedulerCounters {\n /** Keys submitted to the drain (claimed or adopted) this process lifetime. */\n claimed: number;\n /** Outcomes with genuinely empty claims (durable outputs preceded ack). */\n processed: number;\n /** Sum of durable outputs (memories + entities) across processed drains. */\n durableOutputs: number;\n /** Re-submissions after a failed/deferred/denied outcome. */\n retried: number;\n denied: { keys: number; turns: number };\n failed: number;\n}\n\nexport type BacklogKeyState = \"inflight\" | \"backoff\" | \"denied\";\n\nexport interface BacklogKeySnapshot {\n key: string;\n state: BacklogKeyState;\n turnsRemaining?: number;\n reason?: string;\n}\n\nexport interface BacklogSchedulerSnapshot {\n counters: BacklogSchedulerCounters;\n inFlight: string[];\n reservedKeys: string[];\n keys: BacklogKeySnapshot[];\n}\n\ninterface KeyState {\n state: BacklogKeyState;\n nextAttemptMs: number;\n /** Last observed remaining turns; progress resets the backoff exponent. */\n turnsRemaining: number;\n reason?: string;\n backoffExponent: number;\n}\n\nconst DEFAULT_POLL_MS = 15_000;\nconst DEFAULT_RETRY_BASE_MS = 30_000;\nconst DEFAULT_RETRY_MAX_MS = 15 * 60_000;\n\nexport class BacklogScheduler {\n private readonly deps: BacklogSchedulerDeps;\n private readonly options: Required<Omit<BacklogSchedulerOptions, \"now\">> & Pick<BacklogSchedulerOptions, \"now\">;\n private readonly keys = new Map<string, KeyState>();\n private readonly inFlight = new Map<string, { controller: AbortController; settled: Promise<void> }>();\n private readonly reserved = new Set<string>();\n private readonly counters: BacklogSchedulerCounters = {\n claimed: 0,\n processed: 0,\n durableOutputs: 0,\n retried: 0,\n denied: { keys: 0, turns: 0 },\n failed: 0,\n };\n private claimCursor: string | undefined;\n private timer: ReturnType<typeof setInterval> | undefined;\n private ticking = false;\n private stopped = true;\n\n constructor(deps: BacklogSchedulerDeps, options: BacklogSchedulerOptions = {}) {\n this.deps = deps;\n this.options = {\n ownerId: options.ownerId ?? `daemon-drain-${process.pid}`,\n pollMs: options.pollMs ?? DEFAULT_POLL_MS,\n retryBaseMs: options.retryBaseMs ?? DEFAULT_RETRY_BASE_MS,\n retryMaxMs: options.retryMaxMs ?? DEFAULT_RETRY_MAX_MS,\n now: options.now,\n };\n }\n\n /** Idempotent. Starts the poll timer (unref'd) and runs an initial tick. */\n start(): void {\n if (!this.stopped) return;\n this.stopped = false;\n this.timer = setInterval(() => void this.tick(), this.options.pollMs);\n this.timer.unref?.();\n void this.tick();\n }\n\n /** Idempotent. Stops the timer, aborts in-flight drains (their claims stay\n * retryable) and waits for them to settle. */\n async stop(): Promise<void> {\n if (this.stopped) return;\n this.stopped = true;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = undefined;\n }\n const aborts: Promise<void>[] = [];\n for (const entry of this.inFlight.values()) {\n entry.controller.abort(new Error(\"backlog scheduler stopping\"));\n aborts.push(entry.settled);\n }\n await Promise.allSettled(aborts);\n }\n\n /** Bounded snapshot for ops/watchers: counters + per-key states + live sets. */\n snapshot(): BacklogSchedulerSnapshot {\n return {\n counters: {\n claimed: this.counters.claimed,\n processed: this.counters.processed,\n durableOutputs: this.counters.durableOutputs,\n retried: this.counters.retried,\n denied: { ...this.counters.denied },\n failed: this.counters.failed,\n },\n inFlight: [...this.inFlight.keys()],\n reservedKeys: [...this.reserved],\n keys: [...this.keys.entries()].map(([key, state]) => ({\n key,\n state: state.state,\n turnsRemaining: state.turnsRemaining,\n reason: state.reason,\n })),\n };\n }\n\n /** One scan+submit pass (tests drive this instead of the timer). Waits out\n * any in-progress tick first so the pass always actually scans. */\n async tickForTest(): Promise<void> {\n // setImmediate: yields to the event loop so pending I/O (a slow first\n // scan) can finish; a microtask spin would starve it.\n while (this.ticking) await new Promise((resolve) => setImmediate(resolve));\n await this.tick();\n }\n\n /** Await the settle (slot release) of everything currently in flight,\n * optionally excluding one still-gated key (tests). */\n async settleForTest(exclude?: string): Promise<void> {\n for (;;) {\n const pending = [...this.inFlight.entries()].filter(([key]) => key !== exclude).map(([, entry]) => entry.settled);\n if (pending.length === 0) return;\n await Promise.allSettled(pending);\n }\n }\n\n private now(): number {\n return this.options.now?.() ?? Date.now();\n }\n\n private async tick(): Promise<void> {\n if (this.ticking || this.stopped) return;\n this.ticking = true;\n const cursorBeforeTick = this.claimCursor;\n try {\n // Fast bail: a breaker already open must not pay discovery I/O\n // (listPage reads and parses claim bodies on every poll). The\n // submitCandidates guard below still catches a breaker that opens\n // while discovery awaits.\n const breakerBeforeDiscovery = this.deps.breakerSnapshot?.();\n if (\n breakerBeforeDiscovery &&\n breakerBeforeDiscovery.state === \"open\" &&\n this.now() < breakerBeforeDiscovery.openUntilMs\n ) {\n return;\n }\n // stop() may land while discovery's I/O is pending: re-check before\n // submitting anything, and again per candidate.\n // A discovery failure (EACCES/EIO on the claims dir) must not reject\n // into a detached timer callback: it would be an unhandled rejection\n // that terminates the server. Log, skip this pass, retry next poll.\n let candidates: { key: string; needsClaim: boolean }[];\n try {\n candidates = await this.discoverCandidates();\n } catch (err) {\n // Discovery may have listed a page before it failed: the page cursor\n // already moved, so restore it — otherwise those claims wait for the\n // cursor to wrap instead of the next poll.\n this.claimCursor = cursorBeforeTick;\n log.warn(\n `backlog drain: discovery failed; retrying next poll: ${err instanceof Error ? err.message : String(err)}`\n );\n return;\n }\n if (this.stopped) return;\n const dropped = this.submitCandidates(candidates);\n // The concurrency bound stopped submission mid-page: rewind the page\n // cursor so the unsubmitted claims are re-listed on the next tick\n // (already-submitted ones are gated by inFlight and key backoff).\n if (dropped) this.claimCursor = cursorBeforeTick;\n } finally {\n this.ticking = false;\n }\n }\n\n /** Bounded discovery: ONE page of existing claims with pending turns */\n private async discoverCandidates(): Promise<{ key: string; needsClaim: boolean }[]> {\n const out: { key: string; needsClaim: boolean }[] = [];\n const seen = new Set<string>();\n const pageLimit = Math.max(this.submissionLimit() * 4, 16);\n const page = await this.deps.claims.listPage(this.claimCursor, pageLimit);\n for (const listed of page.entries) {\n seen.add(listed.key);\n out.push({ key: listed.key, needsClaim: false });\n }\n this.claimCursor = page.nextCursor;\n for (const [key, counts] of await this.deps.liveBufferCounts()) {\n if (counts.turns + counts.retainedTurns <= 0) continue;\n if (seen.has(key) || this.deps.claims.isClaimed(key)) continue;\n seen.add(key);\n out.push({ key, needsClaim: true });\n }\n return out;\n }\n\n /** Submission bound: the queue's own concurrency limit, read with the\n * documented \"0 disables\" contract — a zero limit submits nothing. */\n private submissionLimit(): number {\n if (this.deps.queue.maxConcurrency <= 0) return 0;\n return this.deps.queue.maxConcurrency;\n }\n\n /** Submit discovery candidates within the queue's concurrency bound. */\n private submitCandidates(candidates: { key: string; needsClaim: boolean }[]): boolean {\n // Breaker-open churn guard: a full attempt reads the claim, rebuilds the\n // buffer/coordinator and re-renders chunks before the breaker fails it\n // fast — pure heap pressure per poll during a provider stall. Skip while\n // the window is open; once it lapses, submissions resume and the\n // breaker's half-open probe runs as usual.\n const breaker = this.deps.breakerSnapshot?.();\n if (breaker && breaker.state === \"open\" && this.now() < breaker.openUntilMs) {\n return true;\n }\n let dropped = false;\n for (const candidate of candidates) {\n if (this.stopped || this.inFlight.size >= this.submissionLimit()) {\n dropped = true;\n break;\n }\n if (!this.candidateEligible(candidate)) continue;\n // Fence the claim decision: reserve the key synchronously BEFORE the\n // async rename so no queued task for it can pass the claimed gate in\n // the meantime. Release happens when the decision settles.\n if (candidate.needsClaim) {\n if (!this.deps.queue.tryReserveKey(candidate.key)) continue;\n this.reserved.add(candidate.key);\n }\n void this.submit(candidate.key, candidate.needsClaim);\n }\n return dropped;\n }\n\n /** inFlight is the authority for \"already submitted\" — key state only\n * exists once an outcome landed (backoff/denied gating below). */\n private candidateEligible(candidate: { key: string; needsClaim: boolean }): boolean {\n if (this.stopped || this.inFlight.size >= this.submissionLimit()) return false;\n if (this.inFlight.has(candidate.key)) return false;\n const state = this.keys.get(candidate.key);\n return !(state && this.now() < state.nextAttemptMs);\n }\n\n /** Claim (when needed), then drain one key; the reservation spans the async\n * claim decision, the queue entry carries the key afterwards. */\n private async submit(key: string, needsClaim: boolean): Promise<void> {\n const controller = new AbortController();\n const { promise: settled, resolve: settle } = Promise.withResolvers<void>();\n this.inFlight.set(key, { controller, settled });\n try {\n if (!(await this.claimForSubmit(key, needsClaim))) return;\n // Stopped between the claim decision and the task: leave the claim\n // with its lease (it expires; the next start adopts) — never drain.\n if (this.stopped) return;\n await this.drainClaimedKey(key, controller.signal);\n } catch (err) {\n // Claim/drain failures are scheduler-level: the claim content is\n // untouched — count failed and back off (never an unhandled rejection\n // in the detached submission).\n this.counters.failed += 1;\n const message = err instanceof Error ? err.message : String(err);\n // SAFETY: a thrown non-Error (incl. null) carries no retry hint; the\n // optional chain reads the hint off Error throws only.\n this.setBackoff(key, (err as { turnsRemaining?: number } | null | undefined)?.turnsRemaining ?? 0, message);\n log.warn(`backlog drain: ${key} submission failed: ${message}`);\n } finally {\n this.inFlight.delete(key);\n this.reserved.delete(key);\n this.deps.queue.releaseKeyReservation(key);\n settle();\n }\n }\n\n /** after all — the key goes quiet without a task. \"claimed\": ours. */\n private async claimForSubmit(key: string, needsClaim: boolean): Promise<boolean> {\n if (!needsClaim) return true;\n try {\n const outcome = await this.deps.claims.claimFromSessionFile(key, this.deps.lease());\n if (outcome === \"empty\") {\n this.keys.delete(key);\n return false;\n }\n return true;\n } finally {\n this.reserved.delete(key);\n this.deps.queue.releaseKeyReservation(key);\n }\n }\n\n /** Drain one claimed key. drainKey reports failures as outcomes; a thrown\n * error still means the claim content is intact — count it failed and\n * back off. */\n private async drainClaimedKey(key: string, signal: AbortSignal): Promise<void> {\n this.counters.claimed += 1;\n try {\n const outcome = await this.deps.drainKey(key, {\n ownerId: this.options.ownerId,\n signal,\n });\n this.applyOutcome(key, outcome);\n } catch (err) {\n this.counters.failed += 1;\n const message = err instanceof Error ? err.message : String(err);\n // SAFETY: a thrown non-Error (incl. null) carries no retry hint; the\n // optional chain reads the hint off Error throws only.\n this.setBackoff(key, (err as { turnsRemaining?: number } | null | undefined)?.turnsRemaining ?? 0, message);\n log.warn(`backlog drain: ${key} threw: ${message}`);\n }\n }\n\n private applyOutcome(key: string, outcome: DrainSessionOutcome): void {\n const deniedTurns = outcome.denied?.reduce((sum, entry) => sum + entry.turns, 0) ?? 0;\n const previous = this.keys.get(key);\n const progressed = outcome.turnsRemaining < (previous?.turnsRemaining ?? Number.POSITIVE_INFINITY);\n if (outcome.status === \"drained\") {\n // The claim is now an empty tombstone: authoritative, nothing pending.\n // New ingress consumes it via the native save path and re-candidates.\n this.keys.delete(key);\n this.counters.processed += 1;\n this.counters.durableOutputs += outcome.durableOutputCount;\n log.info(\n `backlog drain: ${key} drained (${outcome.turnsAtStart} turn(s), ${outcome.durableOutputCount} durable output(s))`\n );\n return;\n }\n this.recordNonDrainedCounters(previous, outcome, deniedTurns);\n const denied = deniedTurns > 0 && outcome.turnsRemaining > 0;\n this.keys.set(key, this.nextKeyState(previous, outcome, denied, progressed));\n log.info(\n `backlog drain: ${key} ${outcome.status} (${outcome.turnsRemaining} turn(s) remaining` +\n `${denied ? `, denied: ${deniedTurns}` : \"\"}${outcome.reason ? `, ${outcome.reason}` : \"\"})`\n );\n }\n\n /** Denied backlog counters for a non-drained outcome. */\n private recordNonDrainedCounters(\n previous: KeyState | undefined,\n outcome: DrainSessionOutcome,\n deniedTurns: number\n ): void {\n if (deniedTurns > 0) {\n this.counters.denied.keys += 1;\n this.counters.denied.turns += deniedTurns;\n }\n if (outcome.status === \"failed\") this.counters.failed += 1;\n else if (previous !== undefined && (previous.state === \"backoff\" || previous.state === \"denied\"))\n this.counters.retried += 1;\n }\n\n /** The post-drain key state: denial waits the full max window (its content\n * is valid but currently unauthorized); progress resets the exponent. */\n private nextKeyState(\n previous: KeyState | undefined,\n outcome: DrainSessionOutcome,\n denied: boolean,\n progressed: boolean\n ): KeyState {\n return {\n state: denied ? \"denied\" : \"backoff\",\n nextAttemptMs: this.now() + this.backoffMs(previous, progressed && !denied),\n turnsRemaining: outcome.turnsRemaining,\n reason: outcome.reason,\n backoffExponent: this.nextBackoffExponent(denied, progressed, previous),\n };\n }\n\n private nextBackoffExponent(denied: boolean, progressed: boolean, previous: KeyState | undefined): number {\n return denied || !progressed ? (previous?.backoffExponent ?? 0) + 1 : 0;\n }\n\n private backoffMs(previous: KeyState | undefined, progressed: boolean): number {\n if (previous?.state === \"denied\") return this.options.retryMaxMs;\n const exponent = progressed ? 0 : (previous?.backoffExponent ?? 0) + 1;\n return Math.min(this.options.retryBaseMs * 2 ** exponent, this.options.retryMaxMs);\n }\n\n private setBackoff(key: string, turnsRemaining: number, reason: string): void {\n const previous = this.keys.get(key);\n this.keys.set(key, {\n state: \"backoff\",\n nextAttemptMs: this.now() + this.backoffMs(previous, false),\n turnsRemaining,\n reason,\n backoffExponent: (previous?.backoffExponent ?? 0) + 1,\n });\n }\n}\n\n/** Lease lifetime for claims the scheduler takes (matches the runner default). */\nconst SCHEDULER_LEASE_MS = 120_000;\n\n/** Wire the scheduler to an orchestrator's own queue, claim store, live buffer\n * counts and drain runner — the daemon's single ownership point. */\nexport function wireBacklogScheduler(\n orchestrator: Orchestrator,\n options: BacklogSchedulerOptions = {}\n): BacklogScheduler {\n const ownerId = options.ownerId ?? `daemon-drain-${process.pid}`;\n const runner = new BufferDrainRunner(orchestrator);\n return new BacklogScheduler(\n {\n queue: orchestrator.extractionQueueCoordinator,\n claims: orchestrator.storage.bufferDrainClaims(),\n liveBufferCounts: async () => {\n // The daemon's buffer may be lazy: ensure the persisted state is in\n // memory before counting (load is guarded/idempotent).\n await orchestrator.buffer.load();\n return orchestrator.buffer.entryCounts();\n },\n lease: () => {\n const now = new Date().toISOString();\n return {\n ownerId,\n pid: process.pid,\n host: hostname(),\n acquiredAt: now,\n heartbeatAt: now,\n leaseMs: SCHEDULER_LEASE_MS,\n };\n },\n drainKey: (key, drainOptions) => runner.drainSession(key, drainOptions),\n // The orchestrator's one shared provider breaker (foreground and every\n // claim-backed drain accumulate toward the same threshold).\n breakerSnapshot: () => orchestrator.getExtractionResilienceStatus().breaker,\n },\n { ...options, ownerId }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,gBAAgB;AAoFzB,IAAM,kBAAkB;AACxB,IAAM,wBAAwB;AAC9B,IAA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ACb,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,UAAU,CAAC,KAAK,iBAAiB,OAAO,aAAa,KAAK,YAAY;AAAA;AAAA;AAAA,MAGtE,iBAAiB,MAAM,aAAa,8BAA8B,EAAE;AAAA,IACtE;AAAA,IACA,EAAE,GAAG,SAAS,QAAQ;AAAA,EACxB;AACF;","names":[]}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BufferDrainRunner,
|
|
3
3
|
ClaimBufferStorage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-TD5VTVPT.js";
|
|
5
|
+
import "../chunk-HR6NTVYZ.js";
|
|
6
|
+
import "../chunk-B36ACJG7.js";
|
|
7
|
+
import "../chunk-PLGBPFEO.js";
|
|
8
8
|
import "../chunk-5PHOU5QI.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-MBENRPMY.js";
|
|
10
10
|
import "../chunk-I74SUMNI.js";
|
|
11
11
|
import "../chunk-ILNPU5W5.js";
|
|
12
|
-
import "../chunk-VWHWWIFS.js";
|
|
13
12
|
import "../chunk-VZAKYDMJ.js";
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-4DLZ2ITE.js";
|
|
14
|
+
import "../chunk-IRFQKR4Y.js";
|
|
15
15
|
import "../chunk-666A3MOW.js";
|
|
16
|
+
import "../chunk-RZN4LQ5Y.js";
|
|
16
17
|
import "../chunk-VDC6RZI4.js";
|
|
17
18
|
import "../chunk-UWK5OXUJ.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-PBE7NFB5.js";
|
|
20
|
+
import "../chunk-DDA47TES.js";
|
|
19
21
|
import "../chunk-AQNHEDXP.js";
|
|
20
22
|
import "../chunk-SDL22RRW.js";
|
|
21
23
|
import "../chunk-7N4KAIGN.js";
|
|
22
24
|
import "../chunk-QNN4FYBD.js";
|
|
23
25
|
import "../chunk-UXPUUL3G.js";
|
|
24
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-V5OCT34X.js";
|
|
25
27
|
import "../chunk-TECVW3JP.js";
|
|
26
28
|
import "../chunk-C5JF6EZ7.js";
|
|
27
29
|
import "../chunk-KBL3JJR6.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-IXBIL5WY.js";
|
|
30
|
+
import "../chunk-LJUQPT5G.js";
|
|
30
31
|
import "../chunk-5KBIOI4G.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-XV7PJVQO.js";
|
|
32
|
+
import "../chunk-6RPPZL7W.js";
|
|
33
33
|
import "../chunk-47DU4SGJ.js";
|
|
34
34
|
import "../chunk-3Q3XD3NO.js";
|
|
35
|
+
import "../chunk-GCBIXUPT.js";
|
|
35
36
|
import "../chunk-ECZU5BJH.js";
|
|
36
37
|
import "../chunk-KVDUKH5E.js";
|
|
37
38
|
import "../chunk-VHF73MGU.js";
|
|
38
39
|
import "../chunk-4EX5WZ4M.js";
|
|
39
40
|
import "../chunk-YRFAYOFQ.js";
|
|
40
|
-
import "../chunk-GCBIXUPT.js";
|
|
41
41
|
import "../chunk-T67LUYCR.js";
|
|
42
42
|
import "../chunk-LJLGH2DE.js";
|
|
43
43
|
import "../chunk-ODZKV2F7.js";
|
|
@@ -45,11 +45,11 @@ import "../chunk-6TCXIRP5.js";
|
|
|
45
45
|
import "../chunk-XMYWYJM2.js";
|
|
46
46
|
import "../chunk-ZOKZIR5K.js";
|
|
47
47
|
import "../chunk-5IZL4DCV.js";
|
|
48
|
+
import "../chunk-X7XN6YU4.js";
|
|
48
49
|
import "../chunk-X7J56GPG.js";
|
|
49
50
|
import "../chunk-LUDXM7MD.js";
|
|
50
51
|
import "../chunk-2KHIBLO5.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-N7NAGECH.js";
|
|
52
|
+
import "../chunk-36B5VPRU.js";
|
|
53
53
|
import "../chunk-DBB5JPSL.js";
|
|
54
54
|
import "../chunk-3D75XIYO.js";
|
|
55
55
|
import "../chunk-G2DF5MI7.js";
|
|
@@ -58,10 +58,10 @@ import "../chunk-EURPSF4Y.js";
|
|
|
58
58
|
import "../chunk-MGN2RQRG.js";
|
|
59
59
|
import "../chunk-EVWDNKQA.js";
|
|
60
60
|
import "../chunk-ROI7BK7H.js";
|
|
61
|
-
import "../chunk-23L3IXFD.js";
|
|
62
|
-
import "../chunk-3GPTTA4J.js";
|
|
63
61
|
import "../chunk-LD72P4YS.js";
|
|
62
|
+
import "../chunk-23L3IXFD.js";
|
|
64
63
|
import "../chunk-573TEZCD.js";
|
|
64
|
+
import "../chunk-3GPTTA4J.js";
|
|
65
65
|
import "../chunk-M4DB6ZNN.js";
|
|
66
66
|
import "../chunk-IBJ6U753.js";
|
|
67
67
|
import "../chunk-APYY5CX3.js";
|
|
@@ -72,8 +72,8 @@ import "../chunk-PHRLJFWZ.js";
|
|
|
72
72
|
import "../chunk-64NJRYU2.js";
|
|
73
73
|
import "../chunk-OH7QLI6W.js";
|
|
74
74
|
import "../chunk-LZIOY7ZU.js";
|
|
75
|
-
import "../chunk-
|
|
76
|
-
import "../chunk-
|
|
75
|
+
import "../chunk-XC7OYOQC.js";
|
|
76
|
+
import "../chunk-6Y5ANLDH.js";
|
|
77
77
|
import "../chunk-54V4BZWP.js";
|
|
78
78
|
import "../chunk-2CGLBUW3.js";
|
|
79
79
|
import "../chunk-QT5MGENX.js";
|
|
@@ -85,7 +85,7 @@ import "../chunk-QJ2AX6DU.js";
|
|
|
85
85
|
import "../chunk-JE26AUX6.js";
|
|
86
86
|
import "../chunk-CIIHIAJ2.js";
|
|
87
87
|
import "../chunk-D5SSBCYY.js";
|
|
88
|
-
import "../chunk-
|
|
88
|
+
import "../chunk-GXVK754R.js";
|
|
89
89
|
import "../chunk-BVRZSI7Q.js";
|
|
90
90
|
import "../chunk-77R7BQZ2.js";
|
|
91
91
|
import "../chunk-AIYXVWUH.js";
|
|
@@ -102,7 +102,7 @@ import "../chunk-LUPVCGYK.js";
|
|
|
102
102
|
import "../chunk-BUYVPUEM.js";
|
|
103
103
|
import "../chunk-IAIPNEHD.js";
|
|
104
104
|
import "../chunk-DGFU5MSX.js";
|
|
105
|
-
import "../chunk-
|
|
105
|
+
import "../chunk-7FFGWIBN.js";
|
|
106
106
|
import "../chunk-S57QBPTA.js";
|
|
107
107
|
import "../chunk-GKUA4MGB.js";
|
|
108
108
|
import "../chunk-WJ6S54ES.js";
|
|
@@ -115,15 +115,16 @@ import "../chunk-VEWZZM3H.js";
|
|
|
115
115
|
import "../chunk-5IIQU4JZ.js";
|
|
116
116
|
import "../chunk-PYIR4SSB.js";
|
|
117
117
|
import "../chunk-7G5NTS7F.js";
|
|
118
|
-
import "../chunk-
|
|
118
|
+
import "../chunk-HB5TNQMM.js";
|
|
119
119
|
import "../chunk-4NZQ7IID.js";
|
|
120
120
|
import "../chunk-3I4FUAVJ.js";
|
|
121
|
-
import "../chunk-
|
|
121
|
+
import "../chunk-SY4AFWUZ.js";
|
|
122
|
+
import "../chunk-MMACM5G2.js";
|
|
122
123
|
import "../chunk-54BGIBCR.js";
|
|
123
124
|
import "../chunk-H4CKS5B2.js";
|
|
124
|
-
import "../chunk-MMACM5G2.js";
|
|
125
125
|
import "../chunk-FXZTL7F7.js";
|
|
126
|
-
import "../chunk-
|
|
126
|
+
import "../chunk-UP6MOYCB.js";
|
|
127
|
+
import "../chunk-I4LJJ44E.js";
|
|
127
128
|
import "../chunk-BV2TIZ4F.js";
|
|
128
129
|
import "../chunk-HDDRVXX4.js";
|
|
129
130
|
import "../chunk-PYHOAXTI.js";
|
|
@@ -133,14 +134,13 @@ import "../chunk-2DL3OFLD.js";
|
|
|
133
134
|
import "../chunk-G4IAEX6D.js";
|
|
134
135
|
import "../chunk-2NLLXCJG.js";
|
|
135
136
|
import "../chunk-765K3SAT.js";
|
|
136
|
-
import "../chunk-UP6MOYCB.js";
|
|
137
137
|
import "../chunk-TBUEE7XF.js";
|
|
138
138
|
import "../chunk-FGDKJJZS.js";
|
|
139
139
|
import "../chunk-AJVLDJU6.js";
|
|
140
140
|
import "../chunk-SZDLX763.js";
|
|
141
141
|
import "../chunk-PYIFUBRK.js";
|
|
142
142
|
import "../chunk-EDR6CVWZ.js";
|
|
143
|
-
import "../chunk-
|
|
143
|
+
import "../chunk-3MBSD53O.js";
|
|
144
144
|
import "../chunk-WHCD4Z3D.js";
|
|
145
145
|
import "../chunk-YQJCWR4R.js";
|
|
146
146
|
import "../chunk-7IGMKQWK.js";
|
|
@@ -148,24 +148,24 @@ import "../chunk-HSSERO3E.js";
|
|
|
148
148
|
import "../chunk-NOUJNHWG.js";
|
|
149
149
|
import "../chunk-I7TR2OCU.js";
|
|
150
150
|
import "../chunk-2524MOWK.js";
|
|
151
|
-
import "../chunk-
|
|
151
|
+
import "../chunk-GCJA5KKT.js";
|
|
152
152
|
import "../chunk-HL4DB7TO.js";
|
|
153
153
|
import "../chunk-WLT6LTQP.js";
|
|
154
154
|
import "../chunk-EOU6V4IN.js";
|
|
155
155
|
import "../chunk-VHSQU3RO.js";
|
|
156
|
-
import "../chunk-
|
|
157
|
-
import "../chunk-
|
|
156
|
+
import "../chunk-COIQ5N4J.js";
|
|
157
|
+
import "../chunk-X53HJENJ.js";
|
|
158
158
|
import "../chunk-HZNURRDS.js";
|
|
159
159
|
import "../chunk-B2NXOVZN.js";
|
|
160
160
|
import "../chunk-HDN7IVIO.js";
|
|
161
161
|
import "../chunk-ADYP7HXE.js";
|
|
162
|
+
import "../chunk-3T74IZB3.js";
|
|
162
163
|
import "../chunk-2LA3H54D.js";
|
|
163
|
-
import "../chunk-
|
|
164
|
-
import "../chunk-
|
|
164
|
+
import "../chunk-P7HNMNN2.js";
|
|
165
|
+
import "../chunk-Z3CKK5RR.js";
|
|
165
166
|
import "../chunk-KFY3SGN7.js";
|
|
166
167
|
import "../chunk-CMTINOFS.js";
|
|
167
|
-
import "../chunk-
|
|
168
|
-
import "../chunk-62O7YWBR.js";
|
|
168
|
+
import "../chunk-HTDXNIO6.js";
|
|
169
169
|
import "../chunk-I6ORDT54.js";
|
|
170
170
|
import "../chunk-BCCG7VWM.js";
|
|
171
171
|
import "../chunk-GGRRF4PZ.js";
|
|
@@ -178,19 +178,19 @@ import "../chunk-YNDLCWXS.js";
|
|
|
178
178
|
import "../chunk-AUDJPF4N.js";
|
|
179
179
|
import "../chunk-44442YCH.js";
|
|
180
180
|
import "../chunk-Y4Z4I6WK.js";
|
|
181
|
-
import "../chunk-
|
|
181
|
+
import "../chunk-F3FNXE7C.js";
|
|
182
182
|
import "../chunk-KJTKLXTH.js";
|
|
183
183
|
import "../chunk-2DQ2XREU.js";
|
|
184
184
|
import "../chunk-OKTXM5H4.js";
|
|
185
185
|
import "../chunk-3ICAWZUU.js";
|
|
186
186
|
import "../chunk-ZAJLJ35W.js";
|
|
187
|
-
import "../chunk-
|
|
187
|
+
import "../chunk-L4QYW2HO.js";
|
|
188
188
|
import "../chunk-5JMAGU26.js";
|
|
189
189
|
import "../chunk-YBPYIAA5.js";
|
|
190
190
|
import "../chunk-HK6KYIF6.js";
|
|
191
191
|
import "../chunk-2GBFKHBZ.js";
|
|
192
192
|
import "../chunk-6TBIWIAG.js";
|
|
193
|
-
import "../chunk-
|
|
193
|
+
import "../chunk-T6C3G67T.js";
|
|
194
194
|
import "../chunk-MPDLLLOG.js";
|
|
195
195
|
import "../chunk-YN2DQ2D6.js";
|
|
196
196
|
import "../chunk-MYVPLJOO.js";
|
|
@@ -234,41 +234,41 @@ import "../chunk-43HUVDTD.js";
|
|
|
234
234
|
import "../chunk-4RA3C3EV.js";
|
|
235
235
|
import "../chunk-B32WYRXX.js";
|
|
236
236
|
import "../chunk-3NF4QUNZ.js";
|
|
237
|
-
import "../chunk-
|
|
237
|
+
import "../chunk-E22CQZ3H.js";
|
|
238
238
|
import "../chunk-V7IZKJI3.js";
|
|
239
239
|
import "../chunk-TB6CBZ5V.js";
|
|
240
240
|
import "../chunk-XW2T4QAW.js";
|
|
241
|
-
import "../chunk-
|
|
241
|
+
import "../chunk-G3T6YMBO.js";
|
|
242
|
+
import "../chunk-SI36RWC3.js";
|
|
242
243
|
import "../chunk-3JKYQBLC.js";
|
|
243
244
|
import "../chunk-7RKSJVOQ.js";
|
|
244
245
|
import "../chunk-HCAGBFE7.js";
|
|
245
|
-
import "../chunk-SI36RWC3.js";
|
|
246
246
|
import "../chunk-NJAIR57U.js";
|
|
247
247
|
import "../chunk-2TGIKMMZ.js";
|
|
248
248
|
import "../chunk-SDESKFKT.js";
|
|
249
249
|
import "../chunk-3HSRWJTC.js";
|
|
250
|
-
import "../chunk-
|
|
251
|
-
import "../chunk-
|
|
252
|
-
import "../chunk-
|
|
250
|
+
import "../chunk-FETPTCQZ.js";
|
|
251
|
+
import "../chunk-SZBZOUHR.js";
|
|
252
|
+
import "../chunk-VEWTHVX2.js";
|
|
253
253
|
import "../chunk-SRT6SHVZ.js";
|
|
254
|
-
import "../chunk-
|
|
254
|
+
import "../chunk-VEQVXNWR.js";
|
|
255
255
|
import "../chunk-TE6S7KDF.js";
|
|
256
256
|
import "../chunk-EIB4FJVR.js";
|
|
257
257
|
import "../chunk-MZUQVWVC.js";
|
|
258
258
|
import "../chunk-A5KNZSNA.js";
|
|
259
259
|
import "../chunk-HUSTM6PU.js";
|
|
260
260
|
import "../chunk-D24OXEPB.js";
|
|
261
|
-
import "../chunk-
|
|
262
|
-
import "../chunk-
|
|
263
|
-
import "../chunk-
|
|
264
|
-
import "../chunk-
|
|
265
|
-
import "../chunk-
|
|
266
|
-
import "../chunk-
|
|
267
|
-
import "../chunk-
|
|
261
|
+
import "../chunk-IBQ7LGUJ.js";
|
|
262
|
+
import "../chunk-SYDPJUFR.js";
|
|
263
|
+
import "../chunk-ZG57BEUS.js";
|
|
264
|
+
import "../chunk-233S3MXC.js";
|
|
265
|
+
import "../chunk-N6GEGRCT.js";
|
|
266
|
+
import "../chunk-3GGCMRO7.js";
|
|
267
|
+
import "../chunk-VPEMGBTI.js";
|
|
268
268
|
import "../chunk-7T4TOGMS.js";
|
|
269
269
|
import "../chunk-7YQ6ESEA.js";
|
|
270
270
|
import "../chunk-ZXF3O7P4.js";
|
|
271
|
-
import "../chunk-
|
|
271
|
+
import "../chunk-RXGFITWS.js";
|
|
272
272
|
import "../chunk-PQM3B54K.js";
|
|
273
273
|
import "../chunk-K36RMINQ.js";
|
|
274
274
|
import "../chunk-2RUTN7PR.js";
|
|
@@ -279,15 +279,15 @@ import "../chunk-2FLFJTCI.js";
|
|
|
279
279
|
import "../chunk-JATHBCAV.js";
|
|
280
280
|
import "../chunk-ZQUVBZI4.js";
|
|
281
281
|
import "../chunk-5R627MYY.js";
|
|
282
|
-
import "../chunk-
|
|
283
|
-
import "../chunk-
|
|
282
|
+
import "../chunk-KNZDGZSY.js";
|
|
283
|
+
import "../chunk-DEGE32C3.js";
|
|
284
284
|
import "../chunk-AB3A7EFH.js";
|
|
285
285
|
import "../chunk-KIUVEMBI.js";
|
|
286
|
-
import "../chunk-
|
|
286
|
+
import "../chunk-KAED7IBB.js";
|
|
287
287
|
import "../chunk-2BPPGNAQ.js";
|
|
288
288
|
import "../chunk-DJSJ4ULL.js";
|
|
289
|
-
import "../chunk-
|
|
290
|
-
import "../chunk-
|
|
289
|
+
import "../chunk-FP2AT4WL.js";
|
|
290
|
+
import "../chunk-R24RYSQX.js";
|
|
291
291
|
import "../chunk-W4F3C7N7.js";
|
|
292
292
|
import "../chunk-MPC7TYTZ.js";
|
|
293
293
|
import "../chunk-2R7OCBRR.js";
|
|
@@ -295,38 +295,38 @@ import "../chunk-IFBSZGW3.js";
|
|
|
295
295
|
import "../chunk-OGXXGHW6.js";
|
|
296
296
|
import "../chunk-RJWL3RHB.js";
|
|
297
297
|
import "../chunk-VQ7B2Q6M.js";
|
|
298
|
-
import "../chunk-DVDRKCZK.js";
|
|
299
298
|
import "../chunk-BANSBRNX.js";
|
|
299
|
+
import "../chunk-ELUG6NKQ.js";
|
|
300
300
|
import "../chunk-JWX2Q6HS.js";
|
|
301
301
|
import "../chunk-GNVZQ5JN.js";
|
|
302
302
|
import "../chunk-YN2UN7N3.js";
|
|
303
|
-
import "../chunk-
|
|
303
|
+
import "../chunk-G5NH3SSX.js";
|
|
304
304
|
import "../chunk-HNOSWPKG.js";
|
|
305
305
|
import "../chunk-WWDO7ZWM.js";
|
|
306
306
|
import "../chunk-5Y43VGYB.js";
|
|
307
307
|
import "../chunk-YUTT4ZTI.js";
|
|
308
|
-
import "../chunk-
|
|
308
|
+
import "../chunk-3M7YP42P.js";
|
|
309
309
|
import "../chunk-5HFVWYHL.js";
|
|
310
310
|
import "../chunk-MUHGYV2V.js";
|
|
311
|
+
import "../chunk-5KVT6G5U.js";
|
|
311
312
|
import "../chunk-KIW3OOZE.js";
|
|
312
313
|
import "../chunk-KZSGBWOJ.js";
|
|
313
314
|
import "../chunk-YE4JBZO5.js";
|
|
314
315
|
import "../chunk-7O5EW7KX.js";
|
|
315
|
-
import "../chunk-5KVT6G5U.js";
|
|
316
|
-
import "../chunk-VYDGHJIN.js";
|
|
317
|
-
import "../chunk-H7XKCNR6.js";
|
|
318
316
|
import "../chunk-EWJZZDRG.js";
|
|
319
317
|
import "../chunk-SOBJ6NEY.js";
|
|
320
318
|
import "../chunk-7O2MC42R.js";
|
|
321
|
-
import "../chunk-
|
|
322
|
-
import "../chunk-
|
|
319
|
+
import "../chunk-VYDGHJIN.js";
|
|
320
|
+
import "../chunk-H7XKCNR6.js";
|
|
321
|
+
import "../chunk-ZZSFRWKD.js";
|
|
323
322
|
import "../chunk-B6SPPYGJ.js";
|
|
323
|
+
import "../chunk-FMFCQRDM.js";
|
|
324
324
|
import "../chunk-UD7UNYRD.js";
|
|
325
325
|
import "../chunk-IISBCCWR.js";
|
|
326
|
-
import "../chunk-
|
|
327
|
-
import "../chunk-
|
|
326
|
+
import "../chunk-FOQ7TW2T.js";
|
|
327
|
+
import "../chunk-ORVPS4ZW.js";
|
|
328
328
|
import "../chunk-2YA5N2BY.js";
|
|
329
|
-
import "../chunk-
|
|
329
|
+
import "../chunk-C44DRDZM.js";
|
|
330
330
|
import "../chunk-HUDPXTXW.js";
|
|
331
331
|
import "../chunk-AZEZSQ5R.js";
|
|
332
332
|
import "../chunk-VPEIWMUT.js";
|
|
@@ -335,23 +335,23 @@ import "../chunk-JX3E4XCW.js";
|
|
|
335
335
|
import "../chunk-QA3Y2O6H.js";
|
|
336
336
|
import "../chunk-V27FK6D6.js";
|
|
337
337
|
import "../chunk-DOWACHYO.js";
|
|
338
|
-
import "../chunk-
|
|
338
|
+
import "../chunk-QNUNAXBE.js";
|
|
339
339
|
import "../chunk-LTHVM4XN.js";
|
|
340
340
|
import "../chunk-RZH5RVJC.js";
|
|
341
341
|
import "../chunk-C37ZRXX7.js";
|
|
342
342
|
import "../chunk-NVKO5YKP.js";
|
|
343
343
|
import "../chunk-3X5OPDPF.js";
|
|
344
|
-
import "../chunk-
|
|
344
|
+
import "../chunk-HXFIILGF.js";
|
|
345
|
+
import "../chunk-WTWQA7BB.js";
|
|
345
346
|
import "../chunk-VZIAVM72.js";
|
|
346
347
|
import "../chunk-HRATODNO.js";
|
|
347
|
-
import "../chunk-WTWQA7BB.js";
|
|
348
348
|
import "../chunk-LXATZLSC.js";
|
|
349
|
-
import "../chunk-
|
|
349
|
+
import "../chunk-TLTBACYX.js";
|
|
350
350
|
import "../chunk-RF2SMMPP.js";
|
|
351
|
-
import "../chunk-
|
|
352
|
-
import "../chunk-
|
|
353
|
-
import "../chunk-
|
|
354
|
-
import "../chunk-
|
|
351
|
+
import "../chunk-GWOFCHPN.js";
|
|
352
|
+
import "../chunk-HCFNZWFB.js";
|
|
353
|
+
import "../chunk-BZTA7DR4.js";
|
|
354
|
+
import "../chunk-DANFOVQG.js";
|
|
355
355
|
import "../chunk-UFGFMWAD.js";
|
|
356
356
|
import "../chunk-BFBS7OFQ.js";
|
|
357
357
|
import "../chunk-QGJSBU4R.js";
|
|
@@ -360,20 +360,21 @@ import "../chunk-LXY5VVGM.js";
|
|
|
360
360
|
import "../chunk-GKCXTSFF.js";
|
|
361
361
|
import "../chunk-2LSZVONP.js";
|
|
362
362
|
import "../chunk-ZY2MNJR6.js";
|
|
363
|
-
import "../chunk-
|
|
363
|
+
import "../chunk-IVXOYE43.js";
|
|
364
364
|
import "../chunk-3UXOZBHV.js";
|
|
365
365
|
import "../chunk-J6GZ2254.js";
|
|
366
|
-
import "../chunk-
|
|
367
|
-
import "../chunk-
|
|
366
|
+
import "../chunk-P4TEQSIZ.js";
|
|
367
|
+
import "../chunk-Y5HZFIQO.js";
|
|
368
368
|
import "../chunk-CSAKJVXW.js";
|
|
369
369
|
import "../chunk-K2XUWZBM.js";
|
|
370
370
|
import "../chunk-OD4FM2U7.js";
|
|
371
|
-
import "../chunk-
|
|
371
|
+
import "../chunk-AY2UK5XK.js";
|
|
372
|
+
import "../chunk-QEDLJDHP.js";
|
|
372
373
|
import "../chunk-U4LUIE6Y.js";
|
|
373
374
|
import "../chunk-T6OZW2WR.js";
|
|
374
375
|
import "../chunk-5YQXWVCP.js";
|
|
375
|
-
import "../chunk-
|
|
376
|
-
import "../chunk-
|
|
376
|
+
import "../chunk-MJFL75J6.js";
|
|
377
|
+
import "../chunk-FGUWCE5I.js";
|
|
377
378
|
import "../chunk-X2KO4FK5.js";
|
|
378
379
|
import "../chunk-GZFKCLRC.js";
|
|
379
380
|
import "../chunk-EKUI7I2X.js";
|
|
@@ -393,22 +394,22 @@ import "../chunk-ZCUTSMR2.js";
|
|
|
393
394
|
import "../chunk-QDW3E4RD.js";
|
|
394
395
|
import "../chunk-6L63IN3M.js";
|
|
395
396
|
import "../chunk-ZJP66Q4I.js";
|
|
396
|
-
import "../chunk-
|
|
397
|
-
import "../chunk-QGVCFVX6.js";
|
|
397
|
+
import "../chunk-5IQL4N37.js";
|
|
398
398
|
import "../chunk-UHVXE24Y.js";
|
|
399
|
+
import "../chunk-QGVCFVX6.js";
|
|
399
400
|
import "../chunk-IGOW4TJE.js";
|
|
400
401
|
import "../chunk-G6OFEGUR.js";
|
|
401
402
|
import "../chunk-7PMOCQOL.js";
|
|
402
|
-
import "../chunk-
|
|
403
|
-
import "../chunk-
|
|
404
|
-
import "../chunk-DOJBV6WR.js";
|
|
405
|
-
import "../chunk-PFUXPTBT.js";
|
|
406
|
-
import "../chunk-CYEPCZN5.js";
|
|
407
|
-
import "../chunk-DLZGSZVC.js";
|
|
403
|
+
import "../chunk-SHVLNI4L.js";
|
|
404
|
+
import "../chunk-OBQ2NZAR.js";
|
|
408
405
|
import "../chunk-OVZIYLBZ.js";
|
|
409
|
-
import "../chunk-WNEVEMJ3.js";
|
|
410
406
|
import "../chunk-EXYT52NR.js";
|
|
407
|
+
import "../chunk-YK6SFDP2.js";
|
|
408
|
+
import "../chunk-P3AQ2YSX.js";
|
|
409
|
+
import "../chunk-CYEPCZN5.js";
|
|
410
|
+
import "../chunk-FYQUUIPI.js";
|
|
411
411
|
import "../chunk-Y5NLBXPV.js";
|
|
412
|
+
import "../chunk-WNEVEMJ3.js";
|
|
412
413
|
import "../chunk-TFA6HPOA.js";
|
|
413
414
|
import "../chunk-F4TWWUMP.js";
|
|
414
415
|
import "../chunk-72A4L5JJ.js";
|
|
@@ -421,7 +422,7 @@ import "../chunk-S2HLHAZ4.js";
|
|
|
421
422
|
import "../chunk-DM2T26WE.js";
|
|
422
423
|
import "../chunk-LDXUBPMO.js";
|
|
423
424
|
import "../chunk-FF6N7BXC.js";
|
|
424
|
-
import "../chunk-
|
|
425
|
+
import "../chunk-JDQEQE2R.js";
|
|
425
426
|
import "../chunk-AAD2ZS6P.js";
|
|
426
427
|
import "../chunk-BV2BRHD4.js";
|
|
427
428
|
import "../chunk-ZIKENA2C.js";
|
|
@@ -453,11 +454,11 @@ import "../chunk-C64XATK7.js";
|
|
|
453
454
|
import "../chunk-42JKGUFJ.js";
|
|
454
455
|
import "../chunk-23G5P7TA.js";
|
|
455
456
|
import "../chunk-4KLQI3L2.js";
|
|
456
|
-
import "../chunk-
|
|
457
|
+
import "../chunk-UCPH56YX.js";
|
|
457
458
|
import "../chunk-I55KAVET.js";
|
|
458
459
|
import "../chunk-L2EXJQJP.js";
|
|
459
460
|
import "../chunk-45GF7Y3V.js";
|
|
460
|
-
import "../chunk-
|
|
461
|
+
import "../chunk-DJDJBMFX.js";
|
|
461
462
|
import "../chunk-E2AWJ7KQ.js";
|
|
462
463
|
import "../chunk-W5BIQOAJ.js";
|
|
463
464
|
import "../chunk-HADD45AR.js";
|
|
@@ -484,13 +485,13 @@ import "../chunk-AQEJKOKI.js";
|
|
|
484
485
|
import "../chunk-4RNBLLZR.js";
|
|
485
486
|
import "../chunk-WZU5AGO6.js";
|
|
486
487
|
import "../chunk-YLXETSAH.js";
|
|
487
|
-
import "../chunk-
|
|
488
|
+
import "../chunk-WIAXVBQH.js";
|
|
488
489
|
import "../chunk-2D7BTSDW.js";
|
|
489
490
|
import "../chunk-353C5UNV.js";
|
|
490
491
|
import "../chunk-JRVMCZE3.js";
|
|
491
492
|
import "../chunk-BT7NVCML.js";
|
|
492
493
|
import "../chunk-IZJQNDGI.js";
|
|
493
|
-
import "../chunk-
|
|
494
|
+
import "../chunk-6Q6AQ36B.js";
|
|
494
495
|
import "../chunk-KQAFEZQX.js";
|
|
495
496
|
import "../chunk-WEHSQBFR.js";
|
|
496
497
|
import "../chunk-X7Y7WX73.js";
|
|
@@ -501,7 +502,7 @@ import "../chunk-FP2373TW.js";
|
|
|
501
502
|
import "../chunk-Z2YFLXHU.js";
|
|
502
503
|
import "../chunk-I4WBNM3M.js";
|
|
503
504
|
import "../chunk-SOAU2OE2.js";
|
|
504
|
-
import "../chunk-
|
|
505
|
+
import "../chunk-FJ2VJTGA.js";
|
|
505
506
|
import "../chunk-A7BM2JTH.js";
|
|
506
507
|
import "../chunk-QUMKDRCF.js";
|
|
507
508
|
import "../chunk-TIGYOZBU.js";
|
|
@@ -523,15 +524,15 @@ import "../chunk-BTNNL7ZW.js";
|
|
|
523
524
|
import "../chunk-JDSVLVCG.js";
|
|
524
525
|
import "../chunk-5GKPFL3S.js";
|
|
525
526
|
import "../chunk-JAKIDQB2.js";
|
|
526
|
-
import "../chunk-
|
|
527
|
+
import "../chunk-CLVILSBR.js";
|
|
527
528
|
import "../chunk-UI3NYK34.js";
|
|
528
529
|
import "../chunk-XXR4A33N.js";
|
|
529
530
|
import "../chunk-UWMZT2TY.js";
|
|
530
|
-
import "../chunk-
|
|
531
|
-
import "../chunk-
|
|
531
|
+
import "../chunk-HLWXCDUQ.js";
|
|
532
|
+
import "../chunk-5BE3FLKL.js";
|
|
533
|
+
import "../chunk-63LFM77Z.js";
|
|
532
534
|
import "../chunk-LDWE7OZS.js";
|
|
533
535
|
import "../chunk-GCGJW34D.js";
|
|
534
|
-
import "../chunk-63LFM77Z.js";
|
|
535
536
|
import "../chunk-XZ66U5M3.js";
|
|
536
537
|
import "../chunk-SWRRZNHM.js";
|
|
537
538
|
import "../chunk-JNA7LFMQ.js";
|
|
@@ -82,15 +82,10 @@ export declare class ExtractionQueueCoordinator {
|
|
|
82
82
|
/** How many tasks may run at once (test seam + diagnostics). */
|
|
83
83
|
get maxConcurrency(): number;
|
|
84
84
|
/**
|
|
85
|
-
* Enqueue a task and start the processor when capacity is free.
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* Per-key coalescing: a queued-not-started task for key K is superseded by
|
|
90
|
-
* a newer enqueue for K instead of stacking another full turn snapshot
|
|
91
|
-
* behind it (extraction reads live state at run time, so the newest
|
|
92
|
-
* closure is the authoritative one). Keyless tasks are independent work
|
|
93
|
-
* and never coalesce.
|
|
85
|
+
* Enqueue a task and start the processor when capacity is free. Each task
|
|
86
|
+
* keeps its own captured work and settlement; keyed tasks serialize behind
|
|
87
|
+
* other tasks for that key. A front task may jump the queue but does not
|
|
88
|
+
* discard queued work.
|
|
94
89
|
*/
|
|
95
90
|
enqueue(task: ExtractionQueueTask, options?: ExtractionQueueEnqueueOptions): boolean;
|
|
96
91
|
/**
|