@remnic/core 10.0.121 → 10.0.123
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 +90 -88
- package/dist/access-cli.js +90 -88
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +90 -88
- package/dist/access-http-briefing.js +90 -88
- package/dist/access-http-query.js +90 -88
- package/dist/access-http.js +90 -88
- package/dist/access-identity-continuity-surface.js +90 -88
- package/dist/access-lcm-surface.js +90 -88
- package/dist/access-mcp.js +90 -88
- package/dist/access-observe-write-category.js +8 -8
- package/dist/access-observe-write-surface.js +90 -88
- package/dist/access-offline-manifest.js +5 -5
- package/dist/access-operations-batch.js +90 -88
- package/dist/access-operations.js +90 -88
- package/dist/access-recall-concurrency.js +90 -88
- package/dist/access-recall-response.js +90 -88
- package/dist/access-recall-surface.js +90 -88
- package/dist/access-schema.js +7 -7
- package/dist/access-service.js +90 -88
- package/dist/active-recall.js +16 -16
- package/dist/adapters/devin.d.ts +22 -0
- package/dist/adapters/devin.d.ts.map +1 -0
- package/dist/adapters/devin.js +9 -0
- package/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +9 -5
- package/dist/adapters/registry.d.ts.map +1 -1
- package/dist/adapters/registry.js +3 -2
- package/dist/briefing.js +11 -11
- package/dist/calibration.js +3 -3
- package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/causal-consolidation.js +12 -12
- package/dist/{chunk-SEOJHETP.js → chunk-2NGTY22Z.js} +7 -6
- package/dist/{chunk-SEOJHETP.js.map → chunk-2NGTY22Z.js.map} +1 -1
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-FCTVE5LR.js → chunk-3B7EF4MP.js} +3 -3
- package/dist/{chunk-LMOMY73A.js → chunk-3OEZA5TR.js} +2 -2
- package/dist/{chunk-K6TY4CE2.js → chunk-3S7VJJTG.js} +2 -2
- package/dist/{chunk-NOWVCYNK.js → chunk-53VLXNAO.js} +2 -2
- package/dist/chunk-6O3SGRJD.js +1 -0
- package/dist/chunk-6O3SGRJD.js.map +1 -0
- package/dist/{chunk-5RONA5FF.js → chunk-7DFJ4JX2.js} +4 -4
- package/dist/{chunk-BUKK5SWA.js → chunk-7LCGFUMB.js} +4 -4
- package/dist/{chunk-5PCUUGLT.js → chunk-7P72BY4F.js} +2 -2
- package/dist/{chunk-T45PJYFQ.js → chunk-AC6F3ADA.js} +2 -2
- package/dist/{chunk-OGLKGZ43.js → chunk-AM5ZNSUK.js} +2 -2
- package/dist/{chunk-QPHUVP2P.js → chunk-B5LNHYSG.js} +2 -2
- package/dist/{chunk-DE75UQ57.js → chunk-CHZMU6HA.js} +2 -2
- package/dist/{chunk-2XEUUKDW.js → chunk-CKUDZMC3.js} +2 -2
- package/dist/{chunk-HBNMJ26J.js → chunk-EGLJALMG.js} +5 -5
- package/dist/{chunk-DF7YDJIM.js → chunk-EOJF66EQ.js} +2 -2
- package/dist/{chunk-CPWYYRJ2.js → chunk-GFZRBHLH.js} +2 -2
- package/dist/{chunk-WQGVW3G3.js → chunk-GSRRD7ZJ.js} +2 -2
- package/dist/{chunk-4RASUAN3.js → chunk-HXFIILGF.js} +4 -4
- package/dist/{chunk-L5PM7B3I.js → chunk-IFFCHE3O.js} +1 -1
- package/dist/{chunk-L5PM7B3I.js.map → chunk-IFFCHE3O.js.map} +1 -1
- package/dist/{chunk-4VAUQBFJ.js → chunk-IWULSPDY.js} +3 -3
- package/dist/{chunk-33ZUPQRA.js → chunk-JLUOSKCU.js} +2 -2
- package/dist/{chunk-6GOJZ3J6.js → chunk-JWFBN2LM.js} +2 -2
- package/dist/{chunk-FOBC27IU.js → chunk-KBO44266.js} +8 -8
- package/dist/{chunk-EL6VOZBN.js → chunk-KU3K2WNM.js} +10 -10
- package/dist/{chunk-RDCKC5MI.js → chunk-LP326T2D.js} +3 -3
- package/dist/{chunk-WRTLTOHA.js → chunk-MFKWQJRQ.js} +2 -2
- package/dist/{chunk-6TDEZRCX.js → chunk-NMQF4CAA.js} +2 -2
- package/dist/{chunk-5HIYPMHC.js → chunk-PJIJA3MK.js} +3 -3
- package/dist/{chunk-N72KBIZ2.js → chunk-Q5Q3IHPP.js} +16 -10
- package/dist/chunk-Q5Q3IHPP.js.map +1 -0
- package/dist/{chunk-MPNLLPJK.js → chunk-QQ4GEUCX.js} +2 -2
- package/dist/{chunk-LOULFH66.js → chunk-R6DTQYSK.js} +3 -3
- package/dist/{chunk-FSBJJUW3.js → chunk-SC76A2ZT.js} +10 -10
- package/dist/{chunk-C2NKFGZA.js → chunk-SMCMHPFY.js} +2 -2
- package/dist/{chunk-WTQHJ6NE.js → chunk-T4Q57NRP.js} +2 -2
- package/dist/{chunk-QCP75JGO.js → chunk-TFA6HPOA.js} +5 -5
- package/dist/{chunk-ZZ5S2SFB.js → chunk-TS3ILFYM.js} +3 -3
- package/dist/{chunk-ZUFOTAOD.js → chunk-TVMPYREI.js} +8 -8
- package/dist/{chunk-6Q2BIF5F.js → chunk-UDUJIKFQ.js} +3 -3
- package/dist/{chunk-P7FC7N5Z.js → chunk-UJAOI56X.js} +2 -2
- package/dist/{chunk-ITUZ54A5.js → chunk-UTY3HL57.js} +2 -2
- package/dist/chunk-V24YLFJW.js +72 -0
- package/dist/chunk-V24YLFJW.js.map +1 -0
- package/dist/{chunk-X6QQNDIW.js → chunk-VIWACB5U.js} +4 -4
- package/dist/{chunk-GBHURLXI.js → chunk-VKS2WV2M.js} +2 -2
- package/dist/{chunk-SH4R3FVM.js → chunk-VYX7W6EB.js} +2 -2
- package/dist/{chunk-JLH6HOJX.js → chunk-WGYORDDM.js} +122 -122
- package/dist/{chunk-FA7SLQ5X.js → chunk-WUQH7BDU.js} +1 -1
- package/dist/chunk-WUQH7BDU.js.map +1 -0
- package/dist/{chunk-CNCN5UN4.js → chunk-WY7QVTBD.js} +2 -2
- package/dist/{chunk-VOF42L6Q.js → chunk-X33UXMUS.js} +3 -3
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-SED6JMID.js → chunk-XN3F3V5H.js} +7 -7
- package/dist/{chunk-SAM4RDS4.js → chunk-Y6RTVJJK.js} +2 -2
- package/dist/{chunk-2UE5JB3G.js → chunk-Y7LKZQ4T.js} +2 -2
- package/dist/{chunk-4L7R2ING.js → chunk-Z7GJNZTY.js} +2 -2
- package/dist/{chunk-SVP57SAR.js → chunk-ZBK3UBMB.js} +4 -4
- package/dist/{chunk-G3T6YMBO.js → chunk-ZGEBQW2J.js} +8 -4
- package/dist/{chunk-G3T6YMBO.js.map → chunk-ZGEBQW2J.js.map} +1 -1
- package/dist/chunk-ZTJPFACY.js +33 -0
- package/dist/chunk-ZTJPFACY.js.map +1 -0
- package/dist/cli.js +90 -88
- package/dist/coding/export-okf-codegraph.js +10 -10
- package/dist/compounding/engine.js +12 -12
- package/dist/config.js +16 -16
- package/dist/connectors/codex-materialize-runner.js +11 -11
- package/dist/connectors/index.js +11 -11
- package/dist/convergence-refresh.js +13 -13
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +13 -13
- package/dist/deep-recall-http-glue.js +8 -8
- package/dist/deep-recall.js +2 -2
- package/dist/entity-retrieval.js +11 -11
- package/dist/explicit-capture.js +90 -88
- package/dist/extraction-error-classification.d.ts +2 -0
- package/dist/extraction-error-classification.d.ts.map +1 -1
- package/dist/extraction-error-classification.js +1 -1
- package/dist/extraction-reply-diagnostic.d.ts +31 -0
- package/dist/extraction-reply-diagnostic.d.ts.map +1 -0
- package/dist/extraction-reply-diagnostic.js +13 -0
- package/dist/extraction-reply-diagnostic.js.map +1 -0
- package/dist/extraction.d.ts +0 -1
- package/dist/extraction.d.ts.map +1 -1
- package/dist/extraction.js +18 -17
- package/dist/{first-start-migration-FILJH3RO.js → first-start-migration-U4K2P7KF.js} +4 -4
- package/dist/harmonic-retrieval.js +11 -11
- package/dist/index.js +120 -118
- package/dist/lcm/index.js +3 -3
- package/dist/local-llm-helpers.d.ts +1 -0
- package/dist/local-llm-helpers.d.ts.map +1 -1
- package/dist/local-llm-helpers.js +1 -1
- package/dist/local-llm.js +3 -3
- package/dist/location/index.js +12 -12
- package/dist/maintenance/memory-governance.js +11 -11
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
- package/dist/maintenance/rebuild-memory-projection-runner.js +13 -13
- package/dist/maintenance/rebuild-memory-projection.js +12 -12
- package/dist/namespaces/migrate.js +12 -12
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.js +11 -11
- 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 +14 -14
- package/dist/operator-toolkit.js +23 -23
- package/dist/orchestration/backlog-scheduler.js +91 -89
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +91 -89
- package/dist/orchestration/maintenance.js +22 -22
- package/dist/orchestrator.js +90 -88
- package/dist/recall-navigation.js +90 -88
- package/dist/resume-bundles.js +19 -19
- package/dist/search/factory.js +5 -5
- package/dist/search/index.js +9 -9
- package/dist/semantic-consolidation.js +12 -12
- package/dist/semantic-rule-promotion.js +11 -11
- package/dist/semantic-rule-verifier.js +11 -11
- package/dist/source-agent-qualifier.js +11 -11
- package/dist/standup/build.js +11 -11
- package/dist/storage.js +10 -10
- package/dist/summarizer.js +4 -4
- package/dist/support-passport/index.js +4 -4
- package/dist/transcript.js +2 -2
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.js +11 -11
- package/dist/verified-recall.js +11 -11
- package/dist/who-knows-cli.js +12 -12
- package/dist/who-knows.js +11 -11
- package/package.json +12 -2
- package/src/adapters/devin.test.ts +75 -0
- package/src/adapters/devin.ts +45 -0
- package/src/adapters/grok-opencode.test.ts +1 -0
- package/src/adapters/index.ts +1 -0
- package/src/adapters/registry.ts +2 -0
- package/src/extraction-error-classification.ts +2 -0
- package/src/extraction-reply-diagnostic-wiring.test.ts +87 -0
- package/src/extraction-reply-diagnostic.test.ts +130 -0
- package/src/extraction-reply-diagnostic.ts +105 -0
- package/src/extraction.ts +7 -16
- package/src/local-llm-headers-timeout.test.ts +24 -1
- package/src/local-llm-helpers.ts +1 -1
- package/src/local-llm.ts +3 -3
- package/dist/chunk-FA7SLQ5X.js.map +0 -1
- package/dist/chunk-N72KBIZ2.js.map +0 -1
- package/dist/chunk-XW2T4QAW.js +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → adapters/devin.js.map} +0 -0
- /package/dist/{chunk-XW2T4QAW.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-FCTVE5LR.js.map → chunk-3B7EF4MP.js.map} +0 -0
- /package/dist/{chunk-LMOMY73A.js.map → chunk-3OEZA5TR.js.map} +0 -0
- /package/dist/{chunk-K6TY4CE2.js.map → chunk-3S7VJJTG.js.map} +0 -0
- /package/dist/{chunk-NOWVCYNK.js.map → chunk-53VLXNAO.js.map} +0 -0
- /package/dist/{chunk-5RONA5FF.js.map → chunk-7DFJ4JX2.js.map} +0 -0
- /package/dist/{chunk-BUKK5SWA.js.map → chunk-7LCGFUMB.js.map} +0 -0
- /package/dist/{chunk-5PCUUGLT.js.map → chunk-7P72BY4F.js.map} +0 -0
- /package/dist/{chunk-T45PJYFQ.js.map → chunk-AC6F3ADA.js.map} +0 -0
- /package/dist/{chunk-OGLKGZ43.js.map → chunk-AM5ZNSUK.js.map} +0 -0
- /package/dist/{chunk-QPHUVP2P.js.map → chunk-B5LNHYSG.js.map} +0 -0
- /package/dist/{chunk-DE75UQ57.js.map → chunk-CHZMU6HA.js.map} +0 -0
- /package/dist/{chunk-2XEUUKDW.js.map → chunk-CKUDZMC3.js.map} +0 -0
- /package/dist/{chunk-HBNMJ26J.js.map → chunk-EGLJALMG.js.map} +0 -0
- /package/dist/{chunk-DF7YDJIM.js.map → chunk-EOJF66EQ.js.map} +0 -0
- /package/dist/{chunk-CPWYYRJ2.js.map → chunk-GFZRBHLH.js.map} +0 -0
- /package/dist/{chunk-WQGVW3G3.js.map → chunk-GSRRD7ZJ.js.map} +0 -0
- /package/dist/{chunk-4RASUAN3.js.map → chunk-HXFIILGF.js.map} +0 -0
- /package/dist/{chunk-4VAUQBFJ.js.map → chunk-IWULSPDY.js.map} +0 -0
- /package/dist/{chunk-33ZUPQRA.js.map → chunk-JLUOSKCU.js.map} +0 -0
- /package/dist/{chunk-6GOJZ3J6.js.map → chunk-JWFBN2LM.js.map} +0 -0
- /package/dist/{chunk-FOBC27IU.js.map → chunk-KBO44266.js.map} +0 -0
- /package/dist/{chunk-EL6VOZBN.js.map → chunk-KU3K2WNM.js.map} +0 -0
- /package/dist/{chunk-RDCKC5MI.js.map → chunk-LP326T2D.js.map} +0 -0
- /package/dist/{chunk-WRTLTOHA.js.map → chunk-MFKWQJRQ.js.map} +0 -0
- /package/dist/{chunk-6TDEZRCX.js.map → chunk-NMQF4CAA.js.map} +0 -0
- /package/dist/{chunk-5HIYPMHC.js.map → chunk-PJIJA3MK.js.map} +0 -0
- /package/dist/{chunk-MPNLLPJK.js.map → chunk-QQ4GEUCX.js.map} +0 -0
- /package/dist/{chunk-LOULFH66.js.map → chunk-R6DTQYSK.js.map} +0 -0
- /package/dist/{chunk-FSBJJUW3.js.map → chunk-SC76A2ZT.js.map} +0 -0
- /package/dist/{chunk-C2NKFGZA.js.map → chunk-SMCMHPFY.js.map} +0 -0
- /package/dist/{chunk-WTQHJ6NE.js.map → chunk-T4Q57NRP.js.map} +0 -0
- /package/dist/{chunk-QCP75JGO.js.map → chunk-TFA6HPOA.js.map} +0 -0
- /package/dist/{chunk-ZZ5S2SFB.js.map → chunk-TS3ILFYM.js.map} +0 -0
- /package/dist/{chunk-ZUFOTAOD.js.map → chunk-TVMPYREI.js.map} +0 -0
- /package/dist/{chunk-6Q2BIF5F.js.map → chunk-UDUJIKFQ.js.map} +0 -0
- /package/dist/{chunk-P7FC7N5Z.js.map → chunk-UJAOI56X.js.map} +0 -0
- /package/dist/{chunk-ITUZ54A5.js.map → chunk-UTY3HL57.js.map} +0 -0
- /package/dist/{chunk-X6QQNDIW.js.map → chunk-VIWACB5U.js.map} +0 -0
- /package/dist/{chunk-GBHURLXI.js.map → chunk-VKS2WV2M.js.map} +0 -0
- /package/dist/{chunk-SH4R3FVM.js.map → chunk-VYX7W6EB.js.map} +0 -0
- /package/dist/{chunk-JLH6HOJX.js.map → chunk-WGYORDDM.js.map} +0 -0
- /package/dist/{chunk-CNCN5UN4.js.map → chunk-WY7QVTBD.js.map} +0 -0
- /package/dist/{chunk-VOF42L6Q.js.map → chunk-X33UXMUS.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-SED6JMID.js.map → chunk-XN3F3V5H.js.map} +0 -0
- /package/dist/{chunk-SAM4RDS4.js.map → chunk-Y6RTVJJK.js.map} +0 -0
- /package/dist/{chunk-2UE5JB3G.js.map → chunk-Y7LKZQ4T.js.map} +0 -0
- /package/dist/{chunk-4L7R2ING.js.map → chunk-Z7GJNZTY.js.map} +0 -0
- /package/dist/{chunk-SVP57SAR.js.map → chunk-ZBK3UBMB.js.map} +0 -0
- /package/dist/{first-start-migration-FILJH3RO.js.map → first-start-migration-U4K2P7KF.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 { randomUUID } from \"node:crypto\";\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 /** Create a fresh lease for a unique owner token. */\n lease(ownerId: string): 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 /** Optional label prefix; each scheduler instance adds a unique token. */\n ownerId?: string;\n /** Scan cadence in ms (startup + new-work + retry checks). */\n pollMs?: number;\n retryBaseMs?: number;\n retryMaxMs?: number;\n /** Bound on `stop()`'s wait for aborted drains to settle. */\n stopSettleTimeoutMs?: 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// Aborted drains normally settle within seconds (a chunk boundary); this only\n// bounds the pathological case, well inside the daemon's stop budget.\nconst DEFAULT_STOP_SETTLE_TIMEOUT_MS = 30_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\"}-${randomUUID()}`,\n pollMs: options.pollMs ?? DEFAULT_POLL_MS,\n retryBaseMs: options.retryBaseMs ?? DEFAULT_RETRY_BASE_MS,\n retryMaxMs: options.retryMaxMs ?? DEFAULT_RETRY_MAX_MS,\n stopSettleTimeoutMs: options.stopSettleTimeoutMs ?? DEFAULT_STOP_SETTLE_TIMEOUT_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 up to `stopSettleTimeoutMs` for them to settle. A\n * drain that ignores abort is named in a warning and left behind: the\n * caller's later shutdown phases (orchestrator flush and dispose) must\n * still run before the service manager's kill. */\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 const bound = Promise.withResolvers<\"timeout\">();\n const boundTimer = setTimeout(() => bound.resolve(\"timeout\"), this.options.stopSettleTimeoutMs);\n try {\n const result = await Promise.race([Promise.allSettled(aborts), bound.promise]);\n if (result === \"timeout\") {\n log.warn(\n `backlog scheduler stop: ${this.inFlight.size} drain(s) ignored abort for ${this.options.stopSettleTimeoutMs}ms; ` +\n `continuing shutdown (stuck keys: ${[...this.inFlight.keys()].join(\", \")})`,\n );\n }\n } finally {\n clearTimeout(boundTimer);\n }\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, this.options.ownerId))) 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, this.options.ownerId);\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, ownerId: string): Promise<boolean> {\n if (!needsClaim) return true;\n try {\n const outcome = await this.deps.claims.claimFromSessionFile(key, this.deps.lease(ownerId));\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, ownerId: string): Promise<void> {\n this.counters.claimed += 1;\n try {\n const outcome = await this.deps.drainKey(key, {\n 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 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: (ownerId) => {\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\n );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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;AAAA;AAAA,MAGtE,iBAAiB,MAAM,aAAa,8BAA8B,EAAE;AAAA,IACtE;AAAA,IACA;AAAA,EACF;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 { randomUUID } from \"node:crypto\";\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 /** Create a fresh lease for a unique owner token. */\n lease(ownerId: string): 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 /** Optional label prefix; each scheduler instance adds a unique token. */\n ownerId?: string;\n /** Scan cadence in ms (startup + new-work + retry checks). */\n pollMs?: number;\n retryBaseMs?: number;\n retryMaxMs?: number;\n /** Bound on `stop()`'s wait for aborted drains to settle. */\n stopSettleTimeoutMs?: 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// Aborted drains normally settle within seconds (a chunk boundary); this only\n// bounds the pathological case, well inside the daemon's stop budget.\nconst DEFAULT_STOP_SETTLE_TIMEOUT_MS = 30_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\"}-${randomUUID()}`,\n pollMs: options.pollMs ?? DEFAULT_POLL_MS,\n retryBaseMs: options.retryBaseMs ?? DEFAULT_RETRY_BASE_MS,\n retryMaxMs: options.retryMaxMs ?? DEFAULT_RETRY_MAX_MS,\n stopSettleTimeoutMs: options.stopSettleTimeoutMs ?? DEFAULT_STOP_SETTLE_TIMEOUT_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 up to `stopSettleTimeoutMs` for them to settle. A\n * drain that ignores abort is named in a warning and left behind: the\n * caller's later shutdown phases (orchestrator flush and dispose) must\n * still run before the service manager's kill. */\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 const bound = Promise.withResolvers<\"timeout\">();\n const boundTimer = setTimeout(() => bound.resolve(\"timeout\"), this.options.stopSettleTimeoutMs);\n try {\n const result = await Promise.race([Promise.allSettled(aborts), bound.promise]);\n if (result === \"timeout\") {\n log.warn(\n `backlog scheduler stop: ${this.inFlight.size} drain(s) ignored abort for ${this.options.stopSettleTimeoutMs}ms; ` +\n `continuing shutdown (stuck keys: ${[...this.inFlight.keys()].join(\", \")})`,\n );\n }\n } finally {\n clearTimeout(boundTimer);\n }\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, this.options.ownerId))) 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, this.options.ownerId);\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, ownerId: string): Promise<boolean> {\n if (!needsClaim) return true;\n try {\n const outcome = await this.deps.claims.claimFromSessionFile(key, this.deps.lease(ownerId));\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, ownerId: string): Promise<void> {\n this.counters.claimed += 1;\n try {\n const outcome = await this.deps.drainKey(key, {\n 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 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: (ownerId) => {\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\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AAuFzB,IAAM,kBAAkB;AACxB,IAAM,wBAAwB;AAC9B,IAAM,uBAAuB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H;AACF;AAGA,IAAM,qBAAqB;AAIpB,SAAS,qBACd,cACA,UAAmC,CAAC,GAClB;AAClB,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,CAAC,YAAY;AAClB,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;AAAA;AAAA,MAGtE,iBAAiB,MAAM,aAAa,8BAA8B,EAAE;AAAA,IACtE;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,134 +1,136 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BufferDrainRunner,
|
|
3
3
|
ClaimBufferStorage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-3B7EF4MP.js";
|
|
5
|
+
import "../chunk-WGYORDDM.js";
|
|
6
6
|
import "../chunk-TH6OYP6I.js";
|
|
7
7
|
import "../chunk-PQM3B54K.js";
|
|
8
8
|
import "../chunk-B3DR2JBZ.js";
|
|
9
|
+
import "../chunk-W4F3C7N7.js";
|
|
10
|
+
import "../chunk-MPC7TYTZ.js";
|
|
9
11
|
import "../chunk-MMACM5G2.js";
|
|
10
12
|
import "../chunk-54BGIBCR.js";
|
|
11
13
|
import "../chunk-H4CKS5B2.js";
|
|
12
14
|
import "../chunk-FXZTL7F7.js";
|
|
13
15
|
import "../chunk-HDDRVXX4.js";
|
|
14
16
|
import "../chunk-PYHOAXTI.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-HBNMJ26J.js";
|
|
17
|
+
import "../chunk-2NLLXCJG.js";
|
|
18
|
+
import "../chunk-EGLJALMG.js";
|
|
18
19
|
import "../chunk-QV2VZKD5.js";
|
|
19
20
|
import "../chunk-UP6MOYCB.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-UTY3HL57.js";
|
|
21
22
|
import "../chunk-BV2TIZ4F.js";
|
|
22
23
|
import "../chunk-Z734BLO3.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-EOJF66EQ.js";
|
|
25
|
+
import "../chunk-VYX7W6EB.js";
|
|
24
26
|
import "../chunk-OZKVVUJB.js";
|
|
25
27
|
import "../chunk-2DL3OFLD.js";
|
|
26
28
|
import "../chunk-G4IAEX6D.js";
|
|
27
|
-
import "../chunk-OWHERGF2.js";
|
|
28
29
|
import "../chunk-765K3SAT.js";
|
|
29
30
|
import "../chunk-IFBSZGW3.js";
|
|
30
|
-
import "../chunk-DF7YDJIM.js";
|
|
31
31
|
import "../chunk-FGDKJJZS.js";
|
|
32
32
|
import "../chunk-AJVLDJU6.js";
|
|
33
33
|
import "../chunk-TBUEE7XF.js";
|
|
34
|
+
import "../chunk-SZDLX763.js";
|
|
34
35
|
import "../chunk-PYIFUBRK.js";
|
|
35
36
|
import "../chunk-5PHOU5QI.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-KU3K2WNM.js";
|
|
37
38
|
import "../chunk-I74SUMNI.js";
|
|
38
39
|
import "../chunk-ILNPU5W5.js";
|
|
40
|
+
import "../chunk-3OEZA5TR.js";
|
|
39
41
|
import "../chunk-WHCD4Z3D.js";
|
|
40
42
|
import "../chunk-VZAKYDMJ.js";
|
|
41
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-7IGMKQWK.js";
|
|
42
44
|
import "../chunk-666A3MOW.js";
|
|
43
45
|
import "../chunk-EDR6CVWZ.js";
|
|
44
46
|
import "../chunk-YQJCWR4R.js";
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-LMOMY73A.js";
|
|
47
|
-
import "../chunk-VOF42L6Q.js";
|
|
48
|
-
import "../chunk-7IGMKQWK.js";
|
|
49
|
-
import "../chunk-KBL3JJR6.js";
|
|
50
|
-
import "../chunk-RZN4LQ5Y.js";
|
|
47
|
+
import "../chunk-3S7VJJTG.js";
|
|
51
48
|
import "../chunk-VDC6RZI4.js";
|
|
52
|
-
import "../chunk-UWK5OXUJ.js";
|
|
53
49
|
import "../chunk-K3FH3LAQ.js";
|
|
54
50
|
import "../chunk-QNN4FYBD.js";
|
|
55
51
|
import "../chunk-UXPUUL3G.js";
|
|
56
52
|
import "../chunk-DDA47TES.js";
|
|
57
53
|
import "../chunk-AQNHEDXP.js";
|
|
54
|
+
import "../chunk-UWK5OXUJ.js";
|
|
55
|
+
import "../chunk-X33UXMUS.js";
|
|
56
|
+
import "../chunk-KBL3JJR6.js";
|
|
57
|
+
import "../chunk-RZN4LQ5Y.js";
|
|
58
58
|
import "../chunk-SDL22RRW.js";
|
|
59
59
|
import "../chunk-7N4KAIGN.js";
|
|
60
60
|
import "../chunk-V5OCT34X.js";
|
|
61
61
|
import "../chunk-OIG4ZFMB.js";
|
|
62
62
|
import "../chunk-TECVW3JP.js";
|
|
63
63
|
import "../chunk-C5JF6EZ7.js";
|
|
64
|
+
import "../chunk-K2VRKCPA.js";
|
|
65
|
+
import "../chunk-I7TR2OCU.js";
|
|
66
|
+
import "../chunk-VQ7B2Q6M.js";
|
|
64
67
|
import "../chunk-2524MOWK.js";
|
|
65
|
-
import "../chunk-
|
|
68
|
+
import "../chunk-UDUJIKFQ.js";
|
|
66
69
|
import "../chunk-JVBAPAWZ.js";
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-
|
|
70
|
+
import "../chunk-6O3SGRJD.js";
|
|
71
|
+
import "../chunk-ZGEBQW2J.js";
|
|
72
|
+
import "../chunk-ZTJPFACY.js";
|
|
73
|
+
import "../chunk-HCAGBFE7.js";
|
|
69
74
|
import "../chunk-SI36RWC3.js";
|
|
70
75
|
import "../chunk-HSSERO3E.js";
|
|
71
76
|
import "../chunk-NOUJNHWG.js";
|
|
72
|
-
import "../chunk-K2VRKCPA.js";
|
|
73
|
-
import "../chunk-I7TR2OCU.js";
|
|
74
|
-
import "../chunk-VQ7B2Q6M.js";
|
|
75
77
|
import "../chunk-BANSBRNX.js";
|
|
76
78
|
import "../chunk-TB6CBZ5V.js";
|
|
77
79
|
import "../chunk-3JKYQBLC.js";
|
|
78
80
|
import "../chunk-7RKSJVOQ.js";
|
|
79
|
-
import "../chunk-HCAGBFE7.js";
|
|
80
81
|
import "../chunk-NJAIR57U.js";
|
|
81
82
|
import "../chunk-3Q3XD3NO.js";
|
|
82
83
|
import "../chunk-WLT6LTQP.js";
|
|
83
84
|
import "../chunk-EOU6V4IN.js";
|
|
84
|
-
import "../chunk-
|
|
85
|
+
import "../chunk-JLUOSKCU.js";
|
|
85
86
|
import "../chunk-HL4DB7TO.js";
|
|
86
|
-
import "../chunk-
|
|
87
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-JWFBN2LM.js";
|
|
88
|
+
import "../chunk-AM5ZNSUK.js";
|
|
88
89
|
import "../chunk-GNVZQ5JN.js";
|
|
89
90
|
import "../chunk-YN2UN7N3.js";
|
|
90
91
|
import "../chunk-JWX2Q6HS.js";
|
|
91
92
|
import "../chunk-47DU4SGJ.js";
|
|
93
|
+
import "../chunk-C73N66PR.js";
|
|
92
94
|
import "../chunk-ECZU5BJH.js";
|
|
93
95
|
import "../chunk-KVDUKH5E.js";
|
|
94
96
|
import "../chunk-VHF73MGU.js";
|
|
95
97
|
import "../chunk-4EX5WZ4M.js";
|
|
96
98
|
import "../chunk-VHSQU3RO.js";
|
|
97
99
|
import "../chunk-YRFAYOFQ.js";
|
|
98
|
-
import "../chunk-
|
|
99
|
-
import "../chunk-5PCUUGLT.js";
|
|
100
|
+
import "../chunk-7P72BY4F.js";
|
|
100
101
|
import "../chunk-HNOSWPKG.js";
|
|
101
102
|
import "../chunk-77NTFICT.js";
|
|
102
103
|
import "../chunk-LJLGH2DE.js";
|
|
103
104
|
import "../chunk-ODZKV2F7.js";
|
|
104
105
|
import "../chunk-WWDO7ZWM.js";
|
|
105
|
-
import "../chunk-
|
|
106
|
-
import "../chunk-
|
|
106
|
+
import "../chunk-GSRRD7ZJ.js";
|
|
107
|
+
import "../chunk-CKUDZMC3.js";
|
|
107
108
|
import "../chunk-ZKE4CO6B.js";
|
|
108
|
-
import "../chunk-
|
|
109
|
+
import "../chunk-IWULSPDY.js";
|
|
109
110
|
import "../chunk-B2NXOVZN.js";
|
|
110
|
-
import "../chunk-
|
|
111
|
+
import "../chunk-7DFJ4JX2.js";
|
|
112
|
+
import "../chunk-PQVLF42S.js";
|
|
111
113
|
import "../chunk-ADJXJKU6.js";
|
|
112
114
|
import "../chunk-GE5J2T67.js";
|
|
113
|
-
import "../chunk-PQVLF42S.js";
|
|
114
115
|
import "../chunk-5Y43VGYB.js";
|
|
115
116
|
import "../chunk-XMYWYJM2.js";
|
|
116
117
|
import "../chunk-ZOKZIR5K.js";
|
|
117
118
|
import "../chunk-5IZL4DCV.js";
|
|
118
119
|
import "../chunk-5CO5G4MN.js";
|
|
120
|
+
import "../chunk-X7XN6YU4.js";
|
|
119
121
|
import "../chunk-X7J56GPG.js";
|
|
120
122
|
import "../chunk-LUDXM7MD.js";
|
|
121
123
|
import "../chunk-2KHIBLO5.js";
|
|
122
124
|
import "../chunk-SPHBQTWE.js";
|
|
123
125
|
import "../chunk-5HFVWYHL.js";
|
|
124
126
|
import "../chunk-NHVAX7MH.js";
|
|
125
|
-
import "../chunk-X7XN6YU4.js";
|
|
126
127
|
import "../chunk-MUHGYV2V.js";
|
|
127
128
|
import "../chunk-CEN6DW6X.js";
|
|
128
129
|
import "../chunk-DUTLMAUC.js";
|
|
129
130
|
import "../chunk-DBB5JPSL.js";
|
|
130
131
|
import "../chunk-3D75XIYO.js";
|
|
131
132
|
import "../chunk-G2DF5MI7.js";
|
|
133
|
+
import "../chunk-5KVT6G5U.js";
|
|
132
134
|
import "../chunk-WXDTOE6F.js";
|
|
133
135
|
import "../chunk-TE6S7KDF.js";
|
|
134
136
|
import "../chunk-2YODOG2O.js";
|
|
@@ -136,33 +138,32 @@ import "../chunk-KIW3OOZE.js";
|
|
|
136
138
|
import "../chunk-V2KGDESV.js";
|
|
137
139
|
import "../chunk-YE4JBZO5.js";
|
|
138
140
|
import "../chunk-7O5EW7KX.js";
|
|
139
|
-
import "../chunk-
|
|
141
|
+
import "../chunk-R4BBGPI2.js";
|
|
142
|
+
import "../chunk-SOBJ6NEY.js";
|
|
143
|
+
import "../chunk-XNRLRNQF.js";
|
|
140
144
|
import "../chunk-IIK2PD3F.js";
|
|
141
145
|
import "../chunk-PH5ZQM35.js";
|
|
142
146
|
import "../chunk-VYDGHJIN.js";
|
|
143
147
|
import "../chunk-H7XKCNR6.js";
|
|
144
|
-
import "../chunk-R4BBGPI2.js";
|
|
145
|
-
import "../chunk-SOBJ6NEY.js";
|
|
146
|
-
import "../chunk-XNRLRNQF.js";
|
|
147
148
|
import "../chunk-MGN2RQRG.js";
|
|
148
149
|
import "../chunk-EVWDNKQA.js";
|
|
150
|
+
import "../chunk-3T74IZB3.js";
|
|
149
151
|
import "../chunk-2LA3H54D.js";
|
|
150
152
|
import "../chunk-ROI7BK7H.js";
|
|
151
|
-
import "../chunk-
|
|
152
|
-
import "../chunk-
|
|
153
|
+
import "../chunk-TVMPYREI.js";
|
|
154
|
+
import "../chunk-53VLXNAO.js";
|
|
153
155
|
import "../chunk-KFY3SGN7.js";
|
|
154
156
|
import "../chunk-CMTINOFS.js";
|
|
155
|
-
import "../chunk-
|
|
156
|
-
import "../chunk-ZZ5S2SFB.js";
|
|
157
|
-
import "../chunk-GBHURLXI.js";
|
|
157
|
+
import "../chunk-VKS2WV2M.js";
|
|
158
158
|
import "../chunk-32CA7B6L.js";
|
|
159
159
|
import "../chunk-7IWRLYFJ.js";
|
|
160
|
+
import "../chunk-TS3ILFYM.js";
|
|
161
|
+
import "../chunk-LD72P4YS.js";
|
|
160
162
|
import "../chunk-23L3IXFD.js";
|
|
163
|
+
import "../chunk-573TEZCD.js";
|
|
161
164
|
import "../chunk-3GPTTA4J.js";
|
|
162
165
|
import "../chunk-UD7UNYRD.js";
|
|
163
166
|
import "../chunk-IISBCCWR.js";
|
|
164
|
-
import "../chunk-LD72P4YS.js";
|
|
165
|
-
import "../chunk-573TEZCD.js";
|
|
166
167
|
import "../chunk-M4DB6ZNN.js";
|
|
167
168
|
import "../chunk-UYHDMCY2.js";
|
|
168
169
|
import "../chunk-EIB4FJVR.js";
|
|
@@ -178,18 +179,18 @@ import "../chunk-UOBPK2OS.js";
|
|
|
178
179
|
import "../chunk-2YA5N2BY.js";
|
|
179
180
|
import "../chunk-3HSRWJTC.js";
|
|
180
181
|
import "../chunk-D6IGZYTN.js";
|
|
181
|
-
import "../chunk-
|
|
182
|
+
import "../chunk-Z7GJNZTY.js";
|
|
182
183
|
import "../chunk-HUDPXTXW.js";
|
|
183
184
|
import "../chunk-AZEZSQ5R.js";
|
|
184
185
|
import "../chunk-YAZNBMNF.js";
|
|
186
|
+
import "../chunk-OM5ESBES.js";
|
|
185
187
|
import "../chunk-XXSOVESA.js";
|
|
186
188
|
import "../chunk-PHRLJFWZ.js";
|
|
187
189
|
import "../chunk-64NJRYU2.js";
|
|
188
190
|
import "../chunk-U2PSE7MB.js";
|
|
189
191
|
import "../chunk-BPPUH5JM.js";
|
|
190
|
-
import "../chunk-OM5ESBES.js";
|
|
191
192
|
import "../chunk-LZIOY7ZU.js";
|
|
192
|
-
import "../chunk-
|
|
193
|
+
import "../chunk-Q5Q3IHPP.js";
|
|
193
194
|
import "../chunk-EI6V5UXY.js";
|
|
194
195
|
import "../chunk-KNAF3A7Y.js";
|
|
195
196
|
import "../chunk-UA2NDTIU.js";
|
|
@@ -205,13 +206,14 @@ import "../chunk-3SL52JKD.js";
|
|
|
205
206
|
import "../chunk-QJ2AX6DU.js";
|
|
206
207
|
import "../chunk-JE26AUX6.js";
|
|
207
208
|
import "../chunk-A6CXG5WI.js";
|
|
209
|
+
import "../chunk-D3ZKHLN2.js";
|
|
208
210
|
import "../chunk-BVRZSI7Q.js";
|
|
209
211
|
import "../chunk-LTHVM4XN.js";
|
|
210
|
-
import "../chunk-
|
|
212
|
+
import "../chunk-V24YLFJW.js";
|
|
211
213
|
import "../chunk-PT4DZDJA.js";
|
|
212
214
|
import "../chunk-MLAMXQAW.js";
|
|
213
215
|
import "../chunk-AIYXVWUH.js";
|
|
214
|
-
import "../chunk-
|
|
216
|
+
import "../chunk-IFFCHE3O.js";
|
|
215
217
|
import "../chunk-C7SRUWBW.js";
|
|
216
218
|
import "../chunk-OZKOPQCM.js";
|
|
217
219
|
import "../chunk-PWFCHOB3.js";
|
|
@@ -230,7 +232,7 @@ import "../chunk-YVVQUAOO.js";
|
|
|
230
232
|
import "../chunk-LUPVCGYK.js";
|
|
231
233
|
import "../chunk-C37ZRXX7.js";
|
|
232
234
|
import "../chunk-DGFU5MSX.js";
|
|
233
|
-
import "../chunk-
|
|
235
|
+
import "../chunk-SMCMHPFY.js";
|
|
234
236
|
import "../chunk-NVKO5YKP.js";
|
|
235
237
|
import "../chunk-WJ6S54ES.js";
|
|
236
238
|
import "../chunk-MKYRCCSN.js";
|
|
@@ -247,19 +249,19 @@ import "../chunk-OB72KNMF.js";
|
|
|
247
249
|
import "../chunk-CIO7GCWE.js";
|
|
248
250
|
import "../chunk-PYIR4SSB.js";
|
|
249
251
|
import "../chunk-6SRYCJ5I.js";
|
|
250
|
-
import "../chunk-
|
|
252
|
+
import "../chunk-MFKWQJRQ.js";
|
|
251
253
|
import "../chunk-HUSTM6PU.js";
|
|
252
254
|
import "../chunk-SPAKBUJY.js";
|
|
253
255
|
import "../chunk-RF2SMMPP.js";
|
|
254
256
|
import "../chunk-3X5OPDPF.js";
|
|
255
|
-
import "../chunk-
|
|
257
|
+
import "../chunk-HXFIILGF.js";
|
|
258
|
+
import "../chunk-WTWQA7BB.js";
|
|
256
259
|
import "../chunk-VZIAVM72.js";
|
|
257
260
|
import "../chunk-HRATODNO.js";
|
|
258
|
-
import "../chunk-WTWQA7BB.js";
|
|
259
261
|
import "../chunk-VEWZZM3H.js";
|
|
260
|
-
import "../chunk-
|
|
261
|
-
import "../chunk-
|
|
262
|
-
import "../chunk-
|
|
262
|
+
import "../chunk-CHZMU6HA.js";
|
|
263
|
+
import "../chunk-PJIJA3MK.js";
|
|
264
|
+
import "../chunk-NMQF4CAA.js";
|
|
263
265
|
import "../chunk-UFGFMWAD.js";
|
|
264
266
|
import "../chunk-FL3O34XF.js";
|
|
265
267
|
import "../chunk-YNDLCWXS.js";
|
|
@@ -267,10 +269,10 @@ import "../chunk-AUDJPF4N.js";
|
|
|
267
269
|
import "../chunk-44442YCH.js";
|
|
268
270
|
import "../chunk-Y4Z4I6WK.js";
|
|
269
271
|
import "../chunk-7G5NTS7F.js";
|
|
270
|
-
import "../chunk-
|
|
271
|
-
import "../chunk-
|
|
272
|
+
import "../chunk-T4Q57NRP.js";
|
|
273
|
+
import "../chunk-R6DTQYSK.js";
|
|
272
274
|
import "../chunk-KJTKLXTH.js";
|
|
273
|
-
import "../chunk-
|
|
275
|
+
import "../chunk-B5LNHYSG.js";
|
|
274
276
|
import "../chunk-2DQ2XREU.js";
|
|
275
277
|
import "../chunk-3I4FUAVJ.js";
|
|
276
278
|
import "../chunk-OKTXM5H4.js";
|
|
@@ -278,8 +280,8 @@ import "../chunk-ZUMHQEW4.js";
|
|
|
278
280
|
import "../chunk-D24OXEPB.js";
|
|
279
281
|
import "../chunk-ZAJLJ35W.js";
|
|
280
282
|
import "../chunk-4NZQ7IID.js";
|
|
281
|
-
import "../chunk-
|
|
282
|
-
import "../chunk-
|
|
283
|
+
import "../chunk-Y6RTVJJK.js";
|
|
284
|
+
import "../chunk-AC6F3ADA.js";
|
|
283
285
|
import "../chunk-3UXOZBHV.js";
|
|
284
286
|
import "../chunk-AL3TCNSJ.js";
|
|
285
287
|
import "../chunk-5JMAGU26.js";
|
|
@@ -295,16 +297,16 @@ import "../chunk-HA6V3CLH.js";
|
|
|
295
297
|
import "../chunk-CSAKJVXW.js";
|
|
296
298
|
import "../chunk-K2XUWZBM.js";
|
|
297
299
|
import "../chunk-OD4FM2U7.js";
|
|
298
|
-
import "../chunk-
|
|
300
|
+
import "../chunk-2NGTY22Z.js";
|
|
301
|
+
import "../chunk-QEDLJDHP.js";
|
|
299
302
|
import "../chunk-U4LUIE6Y.js";
|
|
300
|
-
import "../chunk-
|
|
303
|
+
import "../chunk-WUQH7BDU.js";
|
|
301
304
|
import "../chunk-5YQXWVCP.js";
|
|
302
305
|
import "../chunk-MJFL75J6.js";
|
|
303
|
-
import "../chunk-QEDLJDHP.js";
|
|
304
306
|
import "../chunk-YN2DQ2D6.js";
|
|
305
307
|
import "../chunk-FKBGK3NC.js";
|
|
306
308
|
import "../chunk-ZY2MNJR6.js";
|
|
307
|
-
import "../chunk-
|
|
309
|
+
import "../chunk-Y7LKZQ4T.js";
|
|
308
310
|
import "../chunk-EKUI7I2X.js";
|
|
309
311
|
import "../chunk-ENQCH3SW.js";
|
|
310
312
|
import "../chunk-6ZELOK6O.js";
|
|
@@ -328,13 +330,13 @@ import "../chunk-43HUVDTD.js";
|
|
|
328
330
|
import "../chunk-4RA3C3EV.js";
|
|
329
331
|
import "../chunk-TOTT6S2V.js";
|
|
330
332
|
import "../chunk-YMFPFXEX.js";
|
|
331
|
-
import "../chunk-
|
|
333
|
+
import "../chunk-VIWACB5U.js";
|
|
332
334
|
import "../chunk-ZKOPY4WW.js";
|
|
333
335
|
import "../chunk-62OKGIJA.js";
|
|
334
336
|
import "../chunk-OIGJZHDU.js";
|
|
335
337
|
import "../chunk-QNJQCLI6.js";
|
|
336
|
-
import "../chunk-IMULTENA.js";
|
|
337
338
|
import "../chunk-FEHIOYML.js";
|
|
339
|
+
import "../chunk-IMULTENA.js";
|
|
338
340
|
import "../chunk-P32IDSHD.js";
|
|
339
341
|
import "../chunk-3AUDELZL.js";
|
|
340
342
|
import "../chunk-LI4APB6M.js";
|
|
@@ -369,33 +371,33 @@ import "../chunk-ZCUTSMR2.js";
|
|
|
369
371
|
import "../chunk-QDW3E4RD.js";
|
|
370
372
|
import "../chunk-GMO3BGOF.js";
|
|
371
373
|
import "../chunk-ZJP66Q4I.js";
|
|
372
|
-
import "../chunk-
|
|
374
|
+
import "../chunk-SC76A2ZT.js";
|
|
373
375
|
import "../chunk-QGVCFVX6.js";
|
|
374
|
-
import "../chunk-UHVXE24Y.js";
|
|
375
376
|
import "../chunk-O3JG4PD3.js";
|
|
376
|
-
import "../chunk-
|
|
377
|
+
import "../chunk-UHVXE24Y.js";
|
|
377
378
|
import "../chunk-KNT3BZZH.js";
|
|
378
|
-
import "../chunk-
|
|
379
|
-
import "../chunk-
|
|
379
|
+
import "../chunk-G6OFEGUR.js";
|
|
380
|
+
import "../chunk-QQ4GEUCX.js";
|
|
381
|
+
import "../chunk-KBO44266.js";
|
|
382
|
+
import "../chunk-PFUXPTBT.js";
|
|
383
|
+
import "../chunk-CYEPCZN5.js";
|
|
380
384
|
import "../chunk-DLZGSZVC.js";
|
|
381
385
|
import "../chunk-OVZIYLBZ.js";
|
|
382
386
|
import "../chunk-EXYT52NR.js";
|
|
383
387
|
import "../chunk-DOJBV6WR.js";
|
|
384
|
-
import "../chunk-PFUXPTBT.js";
|
|
385
388
|
import "../chunk-WNEVEMJ3.js";
|
|
386
389
|
import "../chunk-Y5NLBXPV.js";
|
|
387
|
-
import "../chunk-
|
|
388
|
-
import "../chunk-QCP75JGO.js";
|
|
389
|
-
import "../chunk-A7Q43EUZ.js";
|
|
390
|
+
import "../chunk-TFA6HPOA.js";
|
|
390
391
|
import "../chunk-F4TWWUMP.js";
|
|
391
392
|
import "../chunk-72A4L5JJ.js";
|
|
393
|
+
import "../chunk-A7Q43EUZ.js";
|
|
392
394
|
import "../chunk-S2V7RUCL.js";
|
|
393
395
|
import "../chunk-PPUNC7UX.js";
|
|
394
396
|
import "../chunk-X3724WL4.js";
|
|
395
397
|
import "../chunk-MRPOZBJC.js";
|
|
396
398
|
import "../chunk-L76BQSWB.js";
|
|
397
|
-
import "../chunk-LDXUBPMO.js";
|
|
398
399
|
import "../chunk-DM2T26WE.js";
|
|
400
|
+
import "../chunk-LDXUBPMO.js";
|
|
399
401
|
import "../chunk-FF6N7BXC.js";
|
|
400
402
|
import "../chunk-JNDMIAJ4.js";
|
|
401
403
|
import "../chunk-AAD2ZS6P.js";
|
|
@@ -444,7 +446,7 @@ import "../chunk-RMMA44HE.js";
|
|
|
444
446
|
import "../chunk-T4KY6UYF.js";
|
|
445
447
|
import "../chunk-P3WRNWWM.js";
|
|
446
448
|
import "../chunk-SYOIVK7K.js";
|
|
447
|
-
import "../chunk-
|
|
449
|
+
import "../chunk-WY7QVTBD.js";
|
|
448
450
|
import "../chunk-M2XR6B6V.js";
|
|
449
451
|
import "../chunk-JDY34KBL.js";
|
|
450
452
|
import "../chunk-U5I2G4VU.js";
|
|
@@ -481,16 +483,16 @@ import "../chunk-4RNBLLZR.js";
|
|
|
481
483
|
import "../chunk-C5LWPYS3.js";
|
|
482
484
|
import "../chunk-WZU5AGO6.js";
|
|
483
485
|
import "../chunk-EAHNSQ7H.js";
|
|
484
|
-
import "../chunk-
|
|
486
|
+
import "../chunk-GFZRBHLH.js";
|
|
485
487
|
import "../chunk-4IVRQMZW.js";
|
|
486
488
|
import "../chunk-353C5UNV.js";
|
|
487
489
|
import "../chunk-X26YOFGS.js";
|
|
488
490
|
import "../chunk-BT7NVCML.js";
|
|
489
491
|
import "../chunk-TOSPNM4T.js";
|
|
490
|
-
import "../chunk-
|
|
491
|
-
import "../chunk-
|
|
492
|
+
import "../chunk-LP326T2D.js";
|
|
493
|
+
import "../chunk-7LCGFUMB.js";
|
|
494
|
+
import "../chunk-X7Y7WX73.js";
|
|
492
495
|
import "../chunk-WEHSQBFR.js";
|
|
493
|
-
import "../chunk-UVYI6VIX.js";
|
|
494
496
|
import "../chunk-J4EB7DNW.js";
|
|
495
497
|
import "../chunk-BJMBJZ2Y.js";
|
|
496
498
|
import "../chunk-UKJAGEXH.js";
|
|
@@ -501,15 +503,15 @@ import "../chunk-SOAU2OE2.js";
|
|
|
501
503
|
import "../chunk-HLUHEMN4.js";
|
|
502
504
|
import "../chunk-5FVVY2EB.js";
|
|
503
505
|
import "../chunk-BTNNL7ZW.js";
|
|
504
|
-
import "../chunk-
|
|
506
|
+
import "../chunk-XN3F3V5H.js";
|
|
505
507
|
import "../chunk-UI3NYK34.js";
|
|
506
508
|
import "../chunk-XXR4A33N.js";
|
|
507
509
|
import "../chunk-UWMZT2TY.js";
|
|
508
|
-
import "../chunk-
|
|
509
|
-
import "../chunk-
|
|
510
|
+
import "../chunk-UJAOI56X.js";
|
|
511
|
+
import "../chunk-ZBK3UBMB.js";
|
|
512
|
+
import "../chunk-63LFM77Z.js";
|
|
510
513
|
import "../chunk-LDWE7OZS.js";
|
|
511
514
|
import "../chunk-GCGJW34D.js";
|
|
512
|
-
import "../chunk-63LFM77Z.js";
|
|
513
515
|
import "../chunk-SWRRZNHM.js";
|
|
514
516
|
import "../chunk-XZ66U5M3.js";
|
|
515
517
|
import "../chunk-JNA7LFMQ.js";
|