@remnic/core 9.69.33 → 9.69.35
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.d.ts +14 -11
- package/dist/access-admin-ops-surface.js +65 -60
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +14 -11
- package/dist/access-authorization-probe.js +66 -61
- package/dist/access-boundary.d.ts +14 -11
- package/dist/access-boundary.js +65 -60
- package/dist/access-cli.js +137 -133
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +3 -1
- package/dist/access-coding-context-resolution.js +3 -3
- package/dist/access-extraction-force-flush.d.ts +14 -11
- package/dist/access-extraction-force-flush.js +65 -60
- package/dist/access-health-types.d.ts +3 -1
- package/dist/access-http-briefing.d.ts +14 -11
- package/dist/access-http-briefing.js +66 -61
- package/dist/access-http-lcm-compaction.d.ts +14 -11
- package/dist/access-http-lifecycle-flush.d.ts +14 -11
- package/dist/access-http-offline-stream.d.ts +14 -11
- package/dist/access-http-query.d.ts +4 -2
- package/dist/access-http-query.js +67 -62
- package/dist/access-http.d.ts +15 -12
- package/dist/access-http.js +86 -82
- package/dist/access-identity-continuity-surface.d.ts +12 -9
- package/dist/access-identity-continuity-surface.js +65 -60
- package/dist/access-lcm-surface.d.ts +14 -11
- package/dist/access-lcm-surface.js +65 -60
- package/dist/access-mcp.d.ts +14 -11
- package/dist/access-mcp.js +74 -70
- package/dist/access-memory-search-fanout.d.ts +4 -2
- package/dist/{access-namespace-preflight-DMR-jOMS.d.ts → access-namespace-preflight-D8qri11P.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +5 -3
- package/dist/access-namespace-preflight.js +65 -60
- package/dist/access-observe-transcript.d.ts +12 -9
- package/dist/access-observe-transcript.js +3 -3
- package/dist/access-observe-write-surface.d.ts +16 -13
- package/dist/access-observe-write-surface.js +65 -60
- package/dist/access-offline-manifest.d.ts +48 -11
- package/dist/access-offline-manifest.js +18 -16
- package/dist/access-operations-batch.js +68 -64
- package/dist/access-operations.d.ts +15 -12
- package/dist/access-operations.js +73 -69
- package/dist/access-recall-concurrency.d.ts +14 -11
- package/dist/access-recall-concurrency.js +65 -60
- package/dist/access-recall-response.d.ts +14 -11
- package/dist/access-recall-response.js +65 -60
- package/dist/access-recall-surface.d.ts +14 -11
- package/dist/access-recall-surface.js +65 -60
- package/dist/access-schema.d.ts +56 -13
- package/dist/access-schema.js +15 -1
- package/dist/{access-service-CJQoQvRa.d.ts → access-service-CKu5ixg9.d.ts} +52 -50
- package/dist/access-service-helpers.d.ts +14 -11
- package/dist/access-service.d.ts +14 -11
- package/dist/access-service.js +65 -60
- package/dist/access-surface-catalog.d.ts +14 -11
- package/dist/access-surface-catalog.js +67 -62
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +5 -3
- package/dist/action-confidence.d.ts +3 -1
- package/dist/active-memory-bridge.d.ts +3 -1
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.d.ts +3 -1
- package/dist/active-recall.js +12 -10
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +3 -1
- package/dist/adapters/index.d.ts +46 -1
- package/dist/adapters/index.js +10 -6
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +3 -1
- package/dist/artifact-search.d.ts +3 -1
- package/dist/{auto-sync-NSHLUAQI.js → auto-sync-4YFATLFQ.js} +10 -9
- package/dist/{auto-sync-NSHLUAQI.js.map → auto-sync-4YFATLFQ.js.map} +1 -1
- package/dist/behavior-learner.d.ts +3 -1
- package/dist/behavior-signals.d.ts +3 -1
- package/dist/bootstrap.d.ts +12 -9
- package/dist/briefing-window.d.ts +4 -2
- package/dist/briefing.d.ts +4 -2
- package/dist/briefing.js +26 -25
- package/dist/buffer-surprise-report.d.ts +3 -1
- package/dist/buffer-turn-helpers.d.ts +3 -1
- package/dist/buffer.d.ts +4 -2
- package/dist/buffer.js +11 -10
- package/dist/bulk-import/index.d.ts +5 -3
- package/dist/calibration.d.ts +3 -1
- package/dist/calibration.js +3 -2
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +3 -1
- package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-ZCXUPLNJ.js} +2 -2
- package/dist/{catalog-8O9KY9eA.d.ts → catalog-Bq1AxZwF.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +3 -1
- package/dist/causal-consolidation.d.ts +3 -1
- package/dist/causal-consolidation.js +27 -26
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +3 -1
- package/dist/{chunk-CDKHKZL5.js → chunk-2524MOWK.js} +2 -2
- package/dist/{chunk-HVAEXYPL.js → chunk-255PC37A.js} +47 -25
- package/dist/chunk-255PC37A.js.map +1 -0
- package/dist/{chunk-2C3S7J2S.js → chunk-2BQ4ZIWC.js} +741 -28
- package/dist/chunk-2BQ4ZIWC.js.map +1 -0
- package/dist/{chunk-RKBLRTNT.js → chunk-2YLMUME2.js} +2 -2
- package/dist/{chunk-QOIOACIE.js → chunk-326KUXIR.js} +15 -648
- package/dist/chunk-326KUXIR.js.map +1 -0
- package/dist/{chunk-DBQWVT2H.js → chunk-3CBI2ZSA.js} +2 -2
- package/dist/{chunk-MWFGUESQ.js → chunk-3FJKJ5UZ.js} +2 -2
- package/dist/{chunk-NZXEK3UF.js → chunk-3Q3N35W7.js} +2 -2
- package/dist/{chunk-YYGZJPOK.js → chunk-42DJ235G.js} +2 -2
- package/dist/{chunk-SO7SV523.js → chunk-4MDKNUV4.js} +1 -1
- package/dist/chunk-4MDKNUV4.js.map +1 -0
- package/dist/chunk-5HYUUFMQ.js +1280 -0
- package/dist/chunk-5HYUUFMQ.js.map +1 -0
- package/dist/{chunk-2JVJ7UHC.js → chunk-5JG5EBVL.js} +4 -2
- package/dist/chunk-5JG5EBVL.js.map +1 -0
- package/dist/{chunk-HV7OY4DM.js → chunk-5VAF4ID4.js} +643 -202
- package/dist/chunk-5VAF4ID4.js.map +1 -0
- package/dist/{chunk-N7RWREIQ.js → chunk-65RENJGB.js} +6 -1
- package/dist/chunk-65RENJGB.js.map +1 -0
- package/dist/{chunk-JTH2SE6B.js → chunk-6J6K3STG.js} +8 -8
- package/dist/{chunk-H4VH5VIB.js → chunk-776GVKL7.js} +2 -2
- package/dist/{chunk-BUTCAMJM.js → chunk-A2YQL2FF.js} +5 -5
- package/dist/chunk-A5UQ52YQ.js +211 -0
- package/dist/chunk-A5UQ52YQ.js.map +1 -0
- package/dist/{chunk-X2NFFBTO.js → chunk-A7GQBJP5.js} +4 -4
- package/dist/{chunk-CGC5UQCF.js → chunk-AKE4GGQ3.js} +2 -2
- package/dist/{chunk-B325AGLK.js → chunk-AZSKROVQ.js} +2 -2
- package/dist/{chunk-I5DZ3WGR.js → chunk-BJETIR53.js} +3 -3
- package/dist/{chunk-JT3EB7ZL.js → chunk-BNGHPYZU.js} +5 -5
- package/dist/chunk-BRZWWUCJ.js +13 -0
- package/dist/{chunk-FYDW33ZB.js.map → chunk-BRZWWUCJ.js.map} +1 -1
- package/dist/{chunk-3JVLGJCY.js → chunk-C6KRO3SU.js} +2 -2
- package/dist/{chunk-5NANRSCD.js → chunk-CNV2A557.js} +5 -5
- package/dist/{chunk-PBGVVDLY.js → chunk-DK4X5B6I.js} +2 -2
- package/dist/{chunk-MFDTVQJX.js → chunk-DVOBLPSQ.js} +22 -7
- package/dist/chunk-DVOBLPSQ.js.map +1 -0
- package/dist/{chunk-N2ZNPHA3.js → chunk-ECKG5WSI.js} +2 -2
- package/dist/{chunk-PYLL63BF.js → chunk-EEBQFG5E.js} +9 -9
- package/dist/{chunk-ET356KSB.js → chunk-F4TWWUMP.js} +2 -2
- package/dist/{chunk-RHQMKJFG.js → chunk-F6IVBYFS.js} +55 -51
- package/dist/{chunk-RHQMKJFG.js.map → chunk-F6IVBYFS.js.map} +1 -1
- package/dist/{chunk-CLLPJ6QT.js → chunk-FQXJAC3T.js} +2 -2
- package/dist/{chunk-JGHXXQ2G.js → chunk-FVJ4D6L7.js} +2 -2
- package/dist/{chunk-DD5JFCWM.js → chunk-GCBIXUPT.js} +2 -2
- package/dist/{chunk-MN3LK3KN.js → chunk-GLZH5VEN.js} +2 -2
- package/dist/{chunk-S7T2TY65.js → chunk-HC4GFLMQ.js} +3 -3
- package/dist/{chunk-EQHDH4C2.js → chunk-HUT2JR6I.js} +3 -3
- package/dist/{chunk-UUQG7HAD.js → chunk-HXSAWV3A.js} +4 -4
- package/dist/{chunk-XXIHX75O.js → chunk-J7PB5UQ4.js} +3 -3
- package/dist/{chunk-UGPUYIET.js → chunk-JHZCXUQI.js} +221 -400
- package/dist/chunk-JHZCXUQI.js.map +1 -0
- package/dist/{chunk-LTIZHLV7.js → chunk-JR6H5CYS.js} +2 -2
- package/dist/{chunk-FCSZ4K2X.js → chunk-JR6PP7UM.js} +3 -3
- package/dist/{chunk-TCUKRAMK.js → chunk-JRWW7GM6.js} +10 -10
- package/dist/{chunk-Q726HSJO.js → chunk-JSRVXI6E.js} +16 -15
- package/dist/chunk-JSRVXI6E.js.map +1 -0
- package/dist/{chunk-DB5TGMLZ.js → chunk-JZ2CHRLB.js} +6 -4
- package/dist/{chunk-DB5TGMLZ.js.map → chunk-JZ2CHRLB.js.map} +1 -1
- package/dist/{chunk-JEIXTYVG.js → chunk-L2QLDZJC.js} +46 -17
- package/dist/chunk-L2QLDZJC.js.map +1 -0
- package/dist/{chunk-PL7FYKHT.js → chunk-L2WQVSKP.js} +2 -2
- package/dist/{chunk-JSN44KIB.js → chunk-LEMD7WZJ.js} +9 -9
- package/dist/{chunk-VZWXFXLX.js → chunk-LMCD5W5B.js} +2 -2
- package/dist/{chunk-7BMXZCOT.js → chunk-LNDLXMH6.js} +3 -3
- package/dist/{chunk-3QQTXYZ6.js → chunk-LSLCFCCQ.js} +2 -1
- package/dist/chunk-LSLCFCCQ.js.map +1 -0
- package/dist/{chunk-EONF76DT.js → chunk-LYDJRF45.js} +2 -2
- package/dist/{chunk-MKD3OMPS.js → chunk-M3MYMWXG.js} +2 -2
- package/dist/{chunk-VGXM5B4H.js → chunk-MNIPH6LD.js} +2 -2
- package/dist/{chunk-A7XEPMQ6.js → chunk-MVAQ2WM3.js} +6 -6
- package/dist/chunk-MVAQ2WM3.js.map +1 -0
- package/dist/{chunk-6N3TQFZU.js → chunk-NN4JEFON.js} +3 -3
- package/dist/chunk-NPNSKE76.js +220 -0
- package/dist/chunk-NPNSKE76.js.map +1 -0
- package/dist/{chunk-MOZXTRC2.js → chunk-OQ7SSRXP.js} +19 -19
- package/dist/{chunk-XU6OEECT.js → chunk-OQQXGYMX.js} +3 -3
- package/dist/{chunk-4MHYKEOM.js → chunk-OS2AT2JU.js} +10 -10
- package/dist/{chunk-N57A4KPV.js → chunk-P3ONDDIJ.js} +2 -2
- package/dist/chunk-PCEYGOSL.js +66 -0
- package/dist/chunk-PCEYGOSL.js.map +1 -0
- package/dist/{chunk-R3HKWWUB.js → chunk-PHP3MUGF.js} +2 -2
- package/dist/{chunk-EEOUMG3J.js → chunk-PWPIERBM.js} +38 -6
- package/dist/chunk-PWPIERBM.js.map +1 -0
- package/dist/chunk-Q4AUIFUA.js +111 -0
- package/dist/chunk-Q4AUIFUA.js.map +1 -0
- package/dist/{chunk-P3SB5BNT.js → chunk-QATYVTP7.js} +2 -2
- package/dist/{chunk-LSYDG6MJ.js → chunk-QBLDCI6E.js} +2 -2
- package/dist/{chunk-KCB7F4J7.js → chunk-QURNMKME.js} +2 -2
- package/dist/{chunk-XOVKXJEP.js → chunk-R3TLVTWW.js} +3 -3
- package/dist/{chunk-XXE5P6HJ.js → chunk-RRZKTSFG.js} +2 -2
- package/dist/{chunk-44T3Y7SZ.js → chunk-RUXPVSML.js} +5 -5
- package/dist/{chunk-DCJ3YFIC.js → chunk-S2ULTQZR.js} +2 -2
- package/dist/{chunk-H272ZPQ3.js → chunk-SHEHQBCG.js} +124 -23
- package/dist/chunk-SHEHQBCG.js.map +1 -0
- package/dist/{chunk-EEC4PCG5.js → chunk-SZDLX763.js} +2 -2
- package/dist/{chunk-E2ZHGBAK.js → chunk-T2JSUEH6.js} +2 -2
- package/dist/{chunk-227UFSEQ.js → chunk-TFA6HPOA.js} +2 -2
- package/dist/{chunk-BA6WOZOT.js → chunk-TK4FHQRN.js} +4 -4
- package/dist/{chunk-W27OW7AB.js → chunk-TKFSXDOB.js} +2 -2
- package/dist/chunk-TLHNF6GA.js +647 -0
- package/dist/chunk-TLHNF6GA.js.map +1 -0
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-FDLDOEO6.js → chunk-UBG4GAEP.js} +51 -6
- package/dist/chunk-UBG4GAEP.js.map +1 -0
- package/dist/{chunk-CETXNLEX.js → chunk-UDZYNIDJ.js} +2 -2
- package/dist/{chunk-H5AFCNGA.js → chunk-UJX4I26O.js} +2 -2
- package/dist/{chunk-E6TDQRF6.js → chunk-UYUCCQ46.js} +2 -2
- package/dist/{chunk-BLUYQFRH.js → chunk-VELCIWJZ.js} +15 -11
- package/dist/chunk-VELCIWJZ.js.map +1 -0
- package/dist/{chunk-OQDPBRQ6.js → chunk-VYXDUPYE.js} +2 -2
- package/dist/{chunk-ZG74PWRW.js → chunk-VZAKYDMJ.js} +2 -2
- package/dist/chunk-W6IJMWTZ.js +72 -0
- package/dist/chunk-W6IJMWTZ.js.map +1 -0
- package/dist/{chunk-NB5BCFUY.js → chunk-WHHEPAO3.js} +4 -4
- package/dist/{chunk-H3TKENU4.js → chunk-WIKO4SCR.js} +5 -5
- package/dist/{chunk-TX2UTLXC.js → chunk-WPDKBUWX.js} +2 -2
- package/dist/{chunk-YFLLGRXO.js → chunk-X2QPKLPL.js} +2 -2
- package/dist/{chunk-PFFZWDPE.js → chunk-XCOV45MO.js} +3 -3
- package/dist/{chunk-5BCNEBEN.js → chunk-XPJNT6PI.js} +4 -4
- package/dist/chunk-XW2T4QAW.js +1 -0
- package/dist/{chunk-J7HFPA6O.js → chunk-Y63ZFP4X.js} +2 -2
- package/dist/{chunk-D223ZDQV.js → chunk-YEDVOYL2.js} +2 -2
- package/dist/{chunk-TLPZ6MKZ.js → chunk-YEN4TREG.js} +541 -5
- package/dist/chunk-YEN4TREG.js.map +1 -0
- package/dist/{chunk-22FVR2KE.js → chunk-YJ6VCDMZ.js} +6 -2
- package/dist/chunk-YJ6VCDMZ.js.map +1 -0
- package/dist/{chunk-RC5DXXWC.js → chunk-YM7YN37H.js} +2 -2
- package/dist/{chunk-BPJNF7J2.js → chunk-YNN26CIZ.js} +2 -2
- package/dist/{chunk-VLXBE57O.js → chunk-YVGXH72Y.js} +2 -2
- package/dist/{chunk-YQAXP5AC.js → chunk-YXLUTALO.js} +5 -5
- package/dist/{chunk-DGGB65KC.js → chunk-Z7ACR6MJ.js} +3 -3
- package/dist/{chunk-X35W4S3L.js → chunk-ZBEGS7OB.js} +4 -4
- package/dist/{chunk-O75CRYGF.js → chunk-ZEFVK7XC.js} +1 -1
- package/dist/chunk-ZEFVK7XC.js.map +1 -0
- package/dist/{chunk-XUE46UYW.js → chunk-ZLN7AROH.js} +6 -6
- package/dist/{chunk-E6JA6XWY.js → chunk-ZTG4P7NZ.js} +1013 -1317
- package/dist/chunk-ZTG4P7NZ.js.map +1 -0
- package/dist/{chunk-HK32G473.js → chunk-ZWEZXVYH.js} +2 -2
- package/dist/{cli-D57e2Mqt.d.ts → cli-Bk7Ctql4.d.ts} +5 -5
- package/dist/cli-fallback.d.ts +11 -4
- package/dist/cli-fallback.js +5 -1
- package/dist/cli.d.ts +16 -13
- package/dist/cli.js +107 -103
- package/dist/coding/export-okf-codegraph.d.ts +3 -1
- package/dist/coding/export-okf-codegraph.js +32 -30
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/pre-action-gate.d.ts +3 -1
- package/dist/compat/checks.js +2 -2
- package/dist/compat/codex-cli-fallback.d.ts +1 -1
- package/dist/compat/codex-cli-fallback.js +5 -1
- package/dist/compat/codex-cli-fallback.js.map +1 -1
- package/dist/compounding/engine.d.ts +4 -2
- package/dist/compounding/engine.js +27 -26
- package/dist/compounding/preference-consolidator.d.ts +3 -1
- package/dist/compression-optimizer.d.ts +3 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.js +12 -10
- package/dist/connectors/codex-materialize-runner.d.ts +3 -1
- package/dist/connectors/codex-materialize-runner.js +26 -25
- package/dist/connectors/codex-materialize.d.ts +3 -1
- package/dist/connectors/index.d.ts +3 -1
- package/dist/connectors/index.js +28 -27
- package/dist/consolidation-provenance-check.d.ts +4 -2
- package/dist/consolidation-undo.d.ts +4 -2
- package/dist/contradiction/index.d.ts +5 -3
- package/dist/contradiction/index.js +5 -5
- package/dist/{contradiction-scan-NOYMFG66.js → contradiction-scan-GVD4JJ7B.js} +3 -3
- package/dist/converge-config.d.ts +3 -1
- package/dist/convergence-refresh.d.ts +4 -2
- package/dist/convergence-refresh.js +28 -27
- package/dist/conversation-index/backend.d.ts +3 -1
- package/dist/conversation-index/backend.js +3 -3
- package/dist/conversation-index/chunker.d.ts +3 -1
- package/dist/conversation-index/faiss-adapter.d.ts +3 -1
- package/dist/conversation-index/faiss-adapter.js +2 -2
- package/dist/conversation-index/indexer.d.ts +3 -1
- package/dist/conversation-index/search.d.ts +3 -1
- package/dist/corpus-watermark.d.ts +3 -1
- package/dist/corpus-watermark.js +29 -28
- package/dist/cross-lingual-recall.d.ts +3 -1
- package/dist/day-summary.d.ts +3 -1
- package/dist/deep-recall-http-glue.d.ts +14 -11
- package/dist/deep-recall-http-glue.js +12 -2
- package/dist/deep-recall-mcp-tools.d.ts +14 -11
- package/dist/deep-recall-policy-llm.d.ts +3 -1
- package/dist/deep-recall-policy-llm.js +4 -3
- package/dist/deep-recall-seeds.d.ts +3 -1
- package/dist/delinearize.d.ts +3 -1
- package/dist/dependency-propagation-config.d.ts +3 -1
- package/dist/{dependency-propagation-delivery-CmniEsUK.d.ts → dependency-propagation-delivery-DLiAtj25.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +3 -1
- package/dist/direct-answer.d.ts +3 -1
- package/dist/embedding-fallback.d.ts +3 -1
- package/dist/enrichment/index.d.ts +3 -1
- package/dist/entity-origin-fields.d.ts +3 -1
- package/dist/entity-retrieval.d.ts +4 -2
- package/dist/entity-retrieval.js +26 -25
- package/dist/entity-schema.d.ts +3 -1
- package/dist/episodic-context.d.ts +3 -1
- package/dist/eval-trajectory-contracts.d.ts +3 -1
- package/dist/eval-trajectory-store.d.ts +3 -1
- package/dist/eval-trajectory.d.ts +3 -1
- package/dist/explicit-capture.d.ts +12 -9
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +14 -11
- package/dist/external-wiki-access.js +66 -61
- package/dist/external-wiki-collection-registration.d.ts +3 -1
- package/dist/external-wiki-collection.d.ts +3 -1
- package/dist/external-wiki-mcp-tools.d.ts +14 -11
- package/dist/extraction-error-classification.d.ts +3 -1
- package/dist/extraction-faithfulness.d.ts +3 -1
- package/dist/extraction-faithfulness.js +4 -3
- package/dist/extraction-judge-telemetry.d.ts +3 -1
- package/dist/extraction-judge-training.d.ts +3 -1
- package/dist/extraction-judge.d.ts +3 -1
- package/dist/extraction-judge.js +5 -4
- package/dist/extraction-liveness.d.ts +3 -1
- package/dist/extraction-normalization.d.ts +3 -1
- package/dist/extraction-prompt.d.ts +3 -1
- package/dist/extraction-source-grounding-rules.d.ts +3 -1
- package/dist/extraction-source-grounding.d.ts +3 -1
- package/dist/extraction.d.ts +3 -1
- package/dist/extraction.js +38 -36
- package/dist/fallback-llm.d.ts +3 -1
- package/dist/fallback-llm.js +3 -2
- package/dist/{first-start-migration-RC345GPL.js → first-start-migration-L3UFX5CU.js} +3 -3
- package/dist/generic-recall-paths-DbitKJI5.d.ts +23 -0
- package/dist/graph-append-error.d.ts +3 -1
- package/dist/graph-dashboard-diff.d.ts +3 -1
- package/dist/graph-dashboard-key.d.ts +3 -1
- package/dist/graph-dashboard-parser.d.ts +3 -1
- package/dist/graph-edge-reinforcement.d.ts +3 -1
- package/dist/graph-jsonl.d.ts +3 -1
- package/dist/graph-path-reconstruction.d.ts +3 -1
- package/dist/graph-path-scoring.d.ts +3 -1
- package/dist/graph-snapshot.d.ts +3 -1
- package/dist/graph.d.ts +3 -1
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/importance.d.ts +3 -1
- package/dist/importers/index.d.ts +3 -1
- package/dist/importers/test-utils.d.ts +3 -1
- package/dist/in-flight-reads.d.ts +3 -1
- package/dist/{index-BTAsSkPG.d.ts → index-BINUgPFo.d.ts} +2 -2
- package/dist/index.d.ts +303 -245
- package/dist/index.js +316 -214
- package/dist/intent.d.ts +3 -1
- package/dist/lcm/engine.d.ts +3 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +3 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +3 -1
- package/dist/lifecycle.d.ts +3 -1
- package/dist/live-connectors-runner.d.ts +3 -1
- package/dist/local-llm-config.d.ts +26 -0
- package/dist/local-llm-config.js +1 -0
- package/dist/local-llm.d.ts +5 -1
- package/dist/local-llm.js +3 -3
- package/dist/local-model-endpoint.d.ts +3 -1
- package/dist/location/index.d.ts +5 -3
- package/dist/location/index.js +29 -28
- package/dist/maintenance/memory-governance.d.ts +3 -1
- package/dist/maintenance/memory-governance.js +26 -25
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +26 -25
- package/dist/maintenance/rebuild-memory-projection.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-projection.js +27 -26
- package/dist/{maintenance-DCvQGTzL.d.ts → maintenance-ag1gYztC.d.ts} +378 -4
- package/dist/mcp-memory-inspector-app.d.ts +14 -11
- package/dist/memory-action-policy.d.ts +3 -1
- package/dist/memory-cache.d.ts +3 -1
- package/dist/memory-controller.d.ts +3 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +3 -1
- package/dist/memory-projection-store.d.ts +3 -1
- package/dist/memory-provenance.d.ts +3 -1
- package/dist/memory-snapshot.d.ts +3 -1
- package/dist/memory-subject-cli.d.ts +14 -11
- package/dist/memory-subject.d.ts +14 -11
- package/dist/memory-worth-outcomes.d.ts +4 -2
- package/dist/migrate/from-engram.js +2 -2
- package/dist/models-json.d.ts +3 -1
- package/dist/namespaces/migrate.d.ts +5 -3
- package/dist/namespaces/migrate.js +27 -26
- package/dist/namespaces/principal.d.ts +3 -1
- package/dist/namespaces/search.d.ts +3 -1
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.d.ts +5 -3
- package/dist/namespaces/storage.js +26 -25
- package/dist/native-knowledge.d.ts +3 -1
- package/dist/network/tailscale.js +2 -2
- package/dist/offline-sync-impression-drain.d.ts +3 -1
- package/dist/offline-sync-impression-drain.js +6 -6
- package/dist/operator-doctor-corpus.d.ts +3 -1
- package/dist/operator-doctor-corpus.js +30 -29
- package/dist/operator-doctor-replica.d.ts +3 -1
- package/dist/operator-toolkit.d.ts +5 -3
- package/dist/operator-toolkit.js +44 -42
- package/dist/orchestration/compression-guideline-coordinator.d.ts +4 -2
- package/dist/orchestration/maintenance.d.ts +6 -4
- package/dist/orchestration/maintenance.js +44 -39
- package/dist/{orchestrator-CvCsp1tz.d.ts → orchestrator-Cf3G-3Ed.d.ts} +17 -29
- package/dist/orchestrator.d.ts +12 -9
- package/dist/orchestrator.js +141 -135
- package/dist/patterns-cli.d.ts +3 -1
- package/dist/{pipeline-JAdwKBS7.d.ts → pipeline-AwB03fw_.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +3 -1
- package/dist/proactive-contention.d.ts +3 -1
- package/dist/provenance.d.ts +3 -1
- package/dist/{public-http-h-yWu9rj.d.ts → public-http-BetSQn7q.d.ts} +1 -1
- package/dist/{qmd-Cvw9RWKr.d.ts → qmd-Bfaydrfm.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +4 -2
- package/dist/qmd-recall-cache.d.ts +3 -1
- package/dist/qmd.d.ts +4 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +3 -1
- package/dist/recall-disclosure-escalation.d.ts +3 -1
- package/dist/recall-explain-renderer.d.ts +3 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +3 -1
- package/dist/recall-navigate-access.d.ts +3 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +3 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +3 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +3 -1
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +57 -0
- package/dist/recall-state-view-admission.js +39 -0
- package/dist/recall-state-view-admission.js.map +1 -0
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.d.ts +18 -1
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.d.ts +1 -1
- package/dist/recall-state-view-wire.js +3 -3
- package/dist/recall-state-view.d.ts +1 -0
- package/dist/recall-state-view.js +1 -1
- package/dist/recall-state.d.ts +3 -1
- package/dist/recall-tag-filter.d.ts +3 -1
- package/dist/recall-timings.d.ts +3 -1
- package/dist/recall-xray-cli.d.ts +3 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +3 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +10 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +12 -2
- package/dist/reconcile/cursor.js +6 -4
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.d.ts +38 -2
- package/dist/reconcile/manifest.js +15 -5
- package/dist/reconcile/plan.d.ts +3 -1
- package/dist/replay/normalizers/chatgpt.d.ts +3 -1
- package/dist/replay/normalizers/claude.d.ts +3 -1
- package/dist/replay/normalizers/openclaw.d.ts +3 -1
- package/dist/replay/normalizers/shared.d.ts +3 -1
- package/dist/replay/runner.d.ts +3 -1
- package/dist/replay/types.d.ts +3 -1
- package/dist/replica-divergence.d.ts +3 -1
- package/dist/replica-peers-config.d.ts +3 -1
- package/dist/{resolution-VKATP2HT.js → resolution-OHJZG45O.js} +6 -6
- package/dist/resolution-OHJZG45O.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +3 -1
- package/dist/resume-bundles.js +13 -11
- package/dist/retrieval-agents.d.ts +4 -2
- package/dist/retrieval-tiers.d.ts +3 -1
- package/dist/routing/engine.d.ts +3 -1
- package/dist/routing/store.d.ts +3 -1
- package/dist/runtime/child-process.d.ts +1 -1
- package/dist/runtime/child-process.js +1 -1
- package/dist/salvage-envelope.d.ts +3 -1
- package/dist/salvage-envelope.js +2 -2
- package/dist/{scope-profiles-BShpTPeV.d.ts → scope-profiles-nxTKvjE-.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +3 -1
- package/dist/search/factory.d.ts +3 -1
- package/dist/search/factory.js +7 -7
- package/dist/search/index.d.ts +3 -1
- package/dist/search/index.js +11 -11
- package/dist/search/lancedb-backend.d.ts +3 -1
- package/dist/search/meilisearch-backend.d.ts +3 -1
- package/dist/search/noop-backend.d.ts +3 -1
- package/dist/search/orama-backend.d.ts +3 -1
- package/dist/search/port.d.ts +3 -1
- package/dist/search/remote-backend.d.ts +3 -1
- package/dist/{semantic-consolidation-CusOpe9F.d.ts → semantic-consolidation-C83DVakV.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +4 -2
- package/dist/semantic-consolidation.js +27 -26
- package/dist/semantic-rule-promotion.js +26 -25
- package/dist/semantic-rule-verifier.d.ts +3 -1
- package/dist/semantic-rule-verifier.js +26 -25
- package/dist/{service-BbuVh1eS.d.ts → service-q-xtOoAr.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +3 -1
- package/dist/session-observer-state.d.ts +3 -1
- package/dist/shared-context/manager.d.ts +3 -1
- package/dist/signal.d.ts +3 -1
- package/dist/source-agent-qualifier.d.ts +3 -1
- package/dist/source-agent-qualifier.js +35 -33
- package/dist/standup/build.js +26 -25
- package/dist/{storage-BBLLuVTF.d.ts → storage-Ca0MbTfm.d.ts} +67 -6
- package/dist/storage.d.ts +5 -3
- package/dist/storage.js +25 -24
- package/dist/subject-config.d.ts +3 -1
- package/dist/subject-config.js +2 -2
- package/dist/summarizer.d.ts +3 -1
- package/dist/summarizer.js +6 -6
- package/dist/summary-snapshot.d.ts +3 -1
- package/dist/support-passport/index.d.ts +50 -15
- package/dist/support-passport/index.js +73 -64
- package/dist/temporal-supersession.d.ts +4 -2
- package/dist/temporal-timeline-recall.d.ts +3 -1
- package/dist/temporal-validity.d.ts +3 -1
- package/dist/threading.d.ts +3 -1
- package/dist/tier-migration.d.ts +4 -2
- package/dist/tier-routing.d.ts +3 -1
- package/dist/tier-routing.js +2 -2
- package/dist/{tier-stats-KA6OZX2C.js → tier-stats-VK5PCO2L.js} +3 -3
- package/dist/topics.d.ts +3 -1
- package/dist/transcript.d.ts +3 -1
- package/dist/transfer/capsule-import.js +1 -1
- package/dist/transfer/export-okf.d.ts +3 -1
- package/dist/transfer/export-okf.js +27 -26
- package/dist/transfer/types.d.ts +24 -24
- package/dist/trust-score-stage.d.ts +3 -1
- package/dist/trust-score.d.ts +3 -1
- package/dist/{types-igV4-sbB.d.ts → types-yDgWDkrJ.d.ts} +60 -34
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +3 -1
- package/dist/verified-recall.js +26 -25
- package/dist/who-knows-cli.d.ts +14 -11
- package/dist/who-knows-cli.js +27 -26
- package/dist/who-knows.d.ts +14 -11
- package/dist/who-knows.js +26 -25
- package/dist/write-envelope.d.ts +5 -2
- package/dist/write-envelope.js +3 -1
- package/package.json +2 -2
- package/src/access-category-alias.test.ts +216 -0
- package/src/access-mcp.test.ts +73 -0
- package/src/access-mcp.ts +6 -6
- package/src/access-observe-write-surface.ts +19 -4
- package/src/access-offline-manifest.ts +297 -16
- package/src/access-recall-surface.ts +5 -5
- package/src/access-schema.ts +76 -7
- package/src/access-service.ts +11 -2
- package/src/activity/config.test.ts +124 -1
- package/src/activity/config.ts +150 -18
- package/src/activity/index.ts +3 -0
- package/src/activity/journal-extract-storage.test.ts +129 -0
- package/src/activity/journal-extract.test.ts +314 -0
- package/src/activity/journal-extract.ts +247 -0
- package/src/activity/journal-heading.test.ts +24 -1
- package/src/activity/journal-heading.ts +36 -0
- package/src/activity/journal-read.test.ts +242 -0
- package/src/activity/journal-read.ts +183 -0
- package/src/activity/journal-source.test.ts +15 -15
- package/src/activity/journal-source.ts +21 -14
- package/src/activity/journal-state.lock-worker.ts +30 -0
- package/src/activity/journal-state.test.ts +144 -0
- package/src/activity/journal-state.ts +107 -0
- package/src/activity/journal-strip.test.ts +106 -52
- package/src/activity/journal-strip.ts +35 -10
- package/src/activity/journal-vault-integration.test.ts +230 -0
- package/src/activity/journal-vault-provenance.test.ts +9 -7
- package/src/activity/journal-vault-provenance.ts +4 -10
- package/src/activity/journal-vault-read.test.ts +3 -2
- package/src/activity/journal-vault-read.ts +9 -139
- package/src/activity/journal.test.ts +74 -23
- package/src/activity/runner.test.ts +116 -1
- package/src/activity/runner.ts +25 -0
- package/src/activity/scheduler.ts +4 -0
- package/src/activity/store.test.ts +18 -0
- package/src/activity/store.ts +14 -0
- package/src/activity/sync-registration.ts +4 -0
- package/src/activity/timeline/analysis-metadata.ts +2 -0
- package/src/activity/timeline/analysis-provider.ts +140 -0
- package/src/activity/timeline/analysis-run.test.ts +419 -0
- package/src/activity/timeline/analysis-run.ts +106 -0
- package/src/activity/timeline/analysis.ts +66 -37
- package/src/activity/timeline/corrections.ts +9 -0
- package/src/activity/timeline/index.ts +3 -0
- package/src/activity/timeline/query.test.ts +71 -0
- package/src/activity/timeline/query.ts +57 -8
- package/src/activity/timeline/regenerate.test.ts +505 -0
- package/src/activity/timeline/regenerate.ts +373 -0
- package/src/activity/types.ts +40 -5
- package/src/adapters/grok-opencode.test.ts +146 -0
- package/src/adapters/grok.ts +53 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/opencode.ts +52 -0
- package/src/adapters/registry.ts +4 -0
- package/src/cli-fallback.ts +13 -4
- package/src/config.test.ts +27 -1
- package/src/config.ts +17 -1
- package/src/dedup/merge.test.ts +732 -25
- package/src/fallback-llm.test.ts +53 -0
- package/src/fallback-llm.ts +12 -0
- package/src/index.ts +2 -0
- package/src/local-llm-config.ts +25 -0
- package/src/local-llm.ts +3 -1
- package/src/orchestration/dependency-propagation-recovery-replay.ts +1 -1
- package/src/orchestration/extraction-persist-deps.ts +9 -0
- package/src/orchestration/extraction-persist-promotion.test.ts +265 -6
- package/src/orchestration/extraction-persist-promotion.ts +42 -3
- package/src/orchestration/extraction-persist.ts +3 -3
- package/src/orchestration/harmonic-construction-persist.test.ts +115 -4
- package/src/orchestration/harmonic-construction-persist.ts +34 -6
- package/src/orchestration/maintenance.ts +1 -0
- package/src/orchestration/orchestrator-helpers.ts +6 -0
- package/src/orchestration/recall-entry.ts +16 -0
- package/src/orchestration/recall-internal-deps.ts +14 -0
- package/src/orchestration/recall-internal.ts +41 -58
- package/src/orchestration/recall-result-formatter.ts +11 -1
- package/src/orchestration/recall-search-pipeline.ts +121 -11
- package/src/orchestration/recall-state-view-pipeline.test.ts +211 -0
- package/src/orchestration/semantic-merge-commit-effects.ts +76 -17
- package/src/orchestration/semantic-merge-persist.ts +121 -16
- package/src/orchestration/semantic-merge-promotion-payload.ts +133 -54
- package/src/orchestrator.ts +7 -35
- package/src/providers/codex-subscription.test.ts +666 -0
- package/src/providers/codex-subscription.ts +743 -0
- package/src/recall-disclosure.test.ts +20 -0
- package/src/recall-state-view-admission.ts +114 -0
- package/src/recall-state-view-asof.test.ts +176 -0
- package/src/recall-state-view-call.test.ts +175 -0
- package/src/recall-state-view-config.test.ts +16 -0
- package/src/recall-state-view-widen.test.ts +70 -0
- package/src/recall-state-view-widen.ts +28 -7
- package/src/recall-state-view-wire.ts +3 -1
- package/src/recall-state-view-zero-diff.test.ts +20 -11
- package/src/recall-state-view.test.ts +142 -0
- package/src/recall-state-view.ts +72 -24
- package/src/recall-xray-renderer.test.ts +27 -0
- package/src/recall-xray-renderer.ts +4 -0
- package/src/recall-xray.ts +13 -0
- package/src/reconcile/cursor.ts +23 -33
- package/src/reconcile/manifest.ts +96 -11
- package/src/reconcile-identity-cache.test.ts +378 -0
- package/src/runtime/child-process.ts +1 -1
- package/src/storage/cas-revision-host.ts +75 -0
- package/src/storage/cas-revision-store.test.ts +459 -0
- package/src/storage/cas-revision-store.ts +661 -0
- package/src/storage/deletion-revision-store.ts +80 -6
- package/src/storage/tombstone-blocked-capture-index.ts +15 -0
- package/src/storage/tombstone-blocked-capture-mutation.ts +67 -7
- package/src/storage/tombstone-blocked-capture-sync.ts +55 -20
- package/src/storage-contract/failure-semantics.test.ts +1 -1
- package/src/storage-frontmatter-cas.test.ts +698 -1
- package/src/storage-replay.test.ts +166 -3
- package/src/storage.ts +41 -41
- package/src/support-passport/card-projection.ts +82 -33
- package/src/temporal-supersession.test.ts +10 -10
- package/src/types.ts +10 -29
- package/src/write-envelope.ts +1 -1
- package/dist/chunk-22FVR2KE.js.map +0 -1
- package/dist/chunk-2C3S7J2S.js.map +0 -1
- package/dist/chunk-2JVJ7UHC.js.map +0 -1
- package/dist/chunk-2QSZNTDO.js +0 -56
- package/dist/chunk-2QSZNTDO.js.map +0 -1
- package/dist/chunk-3QQTXYZ6.js.map +0 -1
- package/dist/chunk-5VCDKQWQ.js +0 -560
- package/dist/chunk-5VCDKQWQ.js.map +0 -1
- package/dist/chunk-A7XEPMQ6.js.map +0 -1
- package/dist/chunk-BLUYQFRH.js.map +0 -1
- package/dist/chunk-E6JA6XWY.js.map +0 -1
- package/dist/chunk-EEOUMG3J.js.map +0 -1
- package/dist/chunk-FDLDOEO6.js.map +0 -1
- package/dist/chunk-FYDW33ZB.js +0 -13
- package/dist/chunk-H272ZPQ3.js.map +0 -1
- package/dist/chunk-HV7OY4DM.js.map +0 -1
- package/dist/chunk-HVAEXYPL.js.map +0 -1
- package/dist/chunk-JEIXTYVG.js.map +0 -1
- package/dist/chunk-LRICZIGN.js +0 -52
- package/dist/chunk-LRICZIGN.js.map +0 -1
- package/dist/chunk-MFDTVQJX.js.map +0 -1
- package/dist/chunk-N7RWREIQ.js.map +0 -1
- package/dist/chunk-O75CRYGF.js.map +0 -1
- package/dist/chunk-Q726HSJO.js.map +0 -1
- package/dist/chunk-QOIOACIE.js.map +0 -1
- package/dist/chunk-SEDEKFYQ.js +0 -1
- package/dist/chunk-SO7SV523.js.map +0 -1
- package/dist/chunk-TLPZ6MKZ.js.map +0 -1
- package/dist/chunk-UGPUYIET.js.map +0 -1
- package/src/activity/journal-mode.test.ts +0 -32
- package/src/activity/journal-mode.ts +0 -20
- /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-ZCXUPLNJ.js.map} +0 -0
- /package/dist/{chunk-CDKHKZL5.js.map → chunk-2524MOWK.js.map} +0 -0
- /package/dist/{chunk-RKBLRTNT.js.map → chunk-2YLMUME2.js.map} +0 -0
- /package/dist/{chunk-DBQWVT2H.js.map → chunk-3CBI2ZSA.js.map} +0 -0
- /package/dist/{chunk-MWFGUESQ.js.map → chunk-3FJKJ5UZ.js.map} +0 -0
- /package/dist/{chunk-NZXEK3UF.js.map → chunk-3Q3N35W7.js.map} +0 -0
- /package/dist/{chunk-YYGZJPOK.js.map → chunk-42DJ235G.js.map} +0 -0
- /package/dist/{chunk-JTH2SE6B.js.map → chunk-6J6K3STG.js.map} +0 -0
- /package/dist/{chunk-H4VH5VIB.js.map → chunk-776GVKL7.js.map} +0 -0
- /package/dist/{chunk-BUTCAMJM.js.map → chunk-A2YQL2FF.js.map} +0 -0
- /package/dist/{chunk-X2NFFBTO.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-CGC5UQCF.js.map → chunk-AKE4GGQ3.js.map} +0 -0
- /package/dist/{chunk-B325AGLK.js.map → chunk-AZSKROVQ.js.map} +0 -0
- /package/dist/{chunk-I5DZ3WGR.js.map → chunk-BJETIR53.js.map} +0 -0
- /package/dist/{chunk-JT3EB7ZL.js.map → chunk-BNGHPYZU.js.map} +0 -0
- /package/dist/{chunk-3JVLGJCY.js.map → chunk-C6KRO3SU.js.map} +0 -0
- /package/dist/{chunk-5NANRSCD.js.map → chunk-CNV2A557.js.map} +0 -0
- /package/dist/{chunk-PBGVVDLY.js.map → chunk-DK4X5B6I.js.map} +0 -0
- /package/dist/{chunk-N2ZNPHA3.js.map → chunk-ECKG5WSI.js.map} +0 -0
- /package/dist/{chunk-PYLL63BF.js.map → chunk-EEBQFG5E.js.map} +0 -0
- /package/dist/{chunk-ET356KSB.js.map → chunk-F4TWWUMP.js.map} +0 -0
- /package/dist/{chunk-CLLPJ6QT.js.map → chunk-FQXJAC3T.js.map} +0 -0
- /package/dist/{chunk-JGHXXQ2G.js.map → chunk-FVJ4D6L7.js.map} +0 -0
- /package/dist/{chunk-DD5JFCWM.js.map → chunk-GCBIXUPT.js.map} +0 -0
- /package/dist/{chunk-MN3LK3KN.js.map → chunk-GLZH5VEN.js.map} +0 -0
- /package/dist/{chunk-S7T2TY65.js.map → chunk-HC4GFLMQ.js.map} +0 -0
- /package/dist/{chunk-EQHDH4C2.js.map → chunk-HUT2JR6I.js.map} +0 -0
- /package/dist/{chunk-UUQG7HAD.js.map → chunk-HXSAWV3A.js.map} +0 -0
- /package/dist/{chunk-XXIHX75O.js.map → chunk-J7PB5UQ4.js.map} +0 -0
- /package/dist/{chunk-LTIZHLV7.js.map → chunk-JR6H5CYS.js.map} +0 -0
- /package/dist/{chunk-FCSZ4K2X.js.map → chunk-JR6PP7UM.js.map} +0 -0
- /package/dist/{chunk-TCUKRAMK.js.map → chunk-JRWW7GM6.js.map} +0 -0
- /package/dist/{chunk-PL7FYKHT.js.map → chunk-L2WQVSKP.js.map} +0 -0
- /package/dist/{chunk-JSN44KIB.js.map → chunk-LEMD7WZJ.js.map} +0 -0
- /package/dist/{chunk-VZWXFXLX.js.map → chunk-LMCD5W5B.js.map} +0 -0
- /package/dist/{chunk-7BMXZCOT.js.map → chunk-LNDLXMH6.js.map} +0 -0
- /package/dist/{chunk-EONF76DT.js.map → chunk-LYDJRF45.js.map} +0 -0
- /package/dist/{chunk-MKD3OMPS.js.map → chunk-M3MYMWXG.js.map} +0 -0
- /package/dist/{chunk-VGXM5B4H.js.map → chunk-MNIPH6LD.js.map} +0 -0
- /package/dist/{chunk-6N3TQFZU.js.map → chunk-NN4JEFON.js.map} +0 -0
- /package/dist/{chunk-MOZXTRC2.js.map → chunk-OQ7SSRXP.js.map} +0 -0
- /package/dist/{chunk-XU6OEECT.js.map → chunk-OQQXGYMX.js.map} +0 -0
- /package/dist/{chunk-4MHYKEOM.js.map → chunk-OS2AT2JU.js.map} +0 -0
- /package/dist/{chunk-N57A4KPV.js.map → chunk-P3ONDDIJ.js.map} +0 -0
- /package/dist/{chunk-R3HKWWUB.js.map → chunk-PHP3MUGF.js.map} +0 -0
- /package/dist/{chunk-P3SB5BNT.js.map → chunk-QATYVTP7.js.map} +0 -0
- /package/dist/{chunk-LSYDG6MJ.js.map → chunk-QBLDCI6E.js.map} +0 -0
- /package/dist/{chunk-KCB7F4J7.js.map → chunk-QURNMKME.js.map} +0 -0
- /package/dist/{chunk-XOVKXJEP.js.map → chunk-R3TLVTWW.js.map} +0 -0
- /package/dist/{chunk-XXE5P6HJ.js.map → chunk-RRZKTSFG.js.map} +0 -0
- /package/dist/{chunk-44T3Y7SZ.js.map → chunk-RUXPVSML.js.map} +0 -0
- /package/dist/{chunk-DCJ3YFIC.js.map → chunk-S2ULTQZR.js.map} +0 -0
- /package/dist/{chunk-EEC4PCG5.js.map → chunk-SZDLX763.js.map} +0 -0
- /package/dist/{chunk-E2ZHGBAK.js.map → chunk-T2JSUEH6.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-TFA6HPOA.js.map} +0 -0
- /package/dist/{chunk-BA6WOZOT.js.map → chunk-TK4FHQRN.js.map} +0 -0
- /package/dist/{chunk-W27OW7AB.js.map → chunk-TKFSXDOB.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-CETXNLEX.js.map → chunk-UDZYNIDJ.js.map} +0 -0
- /package/dist/{chunk-H5AFCNGA.js.map → chunk-UJX4I26O.js.map} +0 -0
- /package/dist/{chunk-E6TDQRF6.js.map → chunk-UYUCCQ46.js.map} +0 -0
- /package/dist/{chunk-OQDPBRQ6.js.map → chunk-VYXDUPYE.js.map} +0 -0
- /package/dist/{chunk-ZG74PWRW.js.map → chunk-VZAKYDMJ.js.map} +0 -0
- /package/dist/{chunk-NB5BCFUY.js.map → chunk-WHHEPAO3.js.map} +0 -0
- /package/dist/{chunk-H3TKENU4.js.map → chunk-WIKO4SCR.js.map} +0 -0
- /package/dist/{chunk-TX2UTLXC.js.map → chunk-WPDKBUWX.js.map} +0 -0
- /package/dist/{chunk-YFLLGRXO.js.map → chunk-X2QPKLPL.js.map} +0 -0
- /package/dist/{chunk-PFFZWDPE.js.map → chunk-XCOV45MO.js.map} +0 -0
- /package/dist/{chunk-5BCNEBEN.js.map → chunk-XPJNT6PI.js.map} +0 -0
- /package/dist/{chunk-SEDEKFYQ.js.map → chunk-XW2T4QAW.js.map} +0 -0
- /package/dist/{chunk-J7HFPA6O.js.map → chunk-Y63ZFP4X.js.map} +0 -0
- /package/dist/{chunk-D223ZDQV.js.map → chunk-YEDVOYL2.js.map} +0 -0
- /package/dist/{chunk-RC5DXXWC.js.map → chunk-YM7YN37H.js.map} +0 -0
- /package/dist/{chunk-BPJNF7J2.js.map → chunk-YNN26CIZ.js.map} +0 -0
- /package/dist/{chunk-VLXBE57O.js.map → chunk-YVGXH72Y.js.map} +0 -0
- /package/dist/{chunk-YQAXP5AC.js.map → chunk-YXLUTALO.js.map} +0 -0
- /package/dist/{chunk-DGGB65KC.js.map → chunk-Z7ACR6MJ.js.map} +0 -0
- /package/dist/{chunk-X35W4S3L.js.map → chunk-ZBEGS7OB.js.map} +0 -0
- /package/dist/{chunk-XUE46UYW.js.map → chunk-ZLN7AROH.js.map} +0 -0
- /package/dist/{chunk-HK32G473.js.map → chunk-ZWEZXVYH.js.map} +0 -0
- /package/dist/{contradiction-scan-NOYMFG66.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
- /package/dist/{first-start-migration-RC345GPL.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
- /package/dist/{resolution-VKATP2HT.js.map → local-llm-config.js.map} +0 -0
- /package/dist/{tier-stats-KA6OZX2C.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
startLocationAutoSync
|
|
3
|
+
} from "./chunk-776GVKL7.js";
|
|
1
4
|
import {
|
|
2
5
|
ensureContradictionScanCron,
|
|
3
6
|
ensureDaySummaryCron,
|
|
@@ -7,28 +10,41 @@ import {
|
|
|
7
10
|
ensureProceduralMiningCron,
|
|
8
11
|
graphEdgeDecayCadenceToCronExpr
|
|
9
12
|
} from "./chunk-666A3MOW.js";
|
|
10
|
-
import {
|
|
11
|
-
startLocationAutoSync
|
|
12
|
-
} from "./chunk-H4VH5VIB.js";
|
|
13
13
|
import {
|
|
14
14
|
rebuildMemoryLifecycleLedger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QURNMKME.js";
|
|
16
16
|
import {
|
|
17
17
|
planNamespaceMaintenance,
|
|
18
18
|
runNamespaceMaintenanceBatchPlan
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZBEGS7OB.js";
|
|
20
20
|
import {
|
|
21
21
|
rebuildMemoryProjection
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WHHEPAO3.js";
|
|
23
|
+
import {
|
|
24
|
+
DEFAULT_TIMELINE_CATEGORIES,
|
|
25
|
+
TIMELINE_RESERVED_IDLE,
|
|
26
|
+
TIMELINE_RESERVED_PAUSE,
|
|
27
|
+
TIMELINE_RESERVED_UNKNOWN,
|
|
28
|
+
analyzeTimelineCards,
|
|
29
|
+
buildAnalysisRunMetadata,
|
|
30
|
+
timelineAnalysisCompleteFromClients,
|
|
31
|
+
validateActivityBaseUrl,
|
|
32
|
+
validateTimelineCategories
|
|
33
|
+
} from "./chunk-5HYUUFMQ.js";
|
|
34
|
+
import {
|
|
35
|
+
LocalLlmClient
|
|
36
|
+
} from "./chunk-MVAQ2WM3.js";
|
|
23
37
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
FallbackLlmClient,
|
|
39
|
+
fallbackLlmRuntimeContextFromConfig
|
|
40
|
+
} from "./chunk-YEN4TREG.js";
|
|
26
41
|
import {
|
|
27
42
|
activityDateInTimezone,
|
|
28
43
|
activityDayWindow,
|
|
29
44
|
activityDigestPath,
|
|
30
45
|
composeActivityDigestBody,
|
|
31
46
|
composeActivityDigestMeta,
|
|
47
|
+
hashActivityBody,
|
|
32
48
|
isValidActivityDate,
|
|
33
49
|
serializeActivityDigest
|
|
34
50
|
} from "./chunk-353C5UNV.js";
|
|
@@ -76,7 +92,7 @@ import {
|
|
|
76
92
|
// src/orchestration/maintenance.ts
|
|
77
93
|
import { existsSync } from "fs";
|
|
78
94
|
import { appendFile, lstat, mkdir as mkdir3, readFile as readFile2, readdir, realpath, stat, writeFile as writeFile2 } from "fs/promises";
|
|
79
|
-
import
|
|
95
|
+
import path5 from "path";
|
|
80
96
|
|
|
81
97
|
// src/maintenance/day-summary-cron.ts
|
|
82
98
|
function resolveDaySummaryCronModel(config) {
|
|
@@ -407,6 +423,17 @@ var ActivityStore = class _ActivityStore {
|
|
|
407
423
|
tx(ids);
|
|
408
424
|
return ids.length;
|
|
409
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* First and last stored capture instants (canonical UTC strings), or null
|
|
428
|
+
* when no snapshots exist. Backs the unbounded timeline search window.
|
|
429
|
+
*/
|
|
430
|
+
snapshotCaptureExtent() {
|
|
431
|
+
const row = this.db.prepare("SELECT MIN(captured_at_utc) AS first, MAX(captured_at_utc) AS last FROM activity_snapshots").get();
|
|
432
|
+
if (!isRecord(row) || typeof row.first !== "string" || typeof row.last !== "string") {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
return { firstUtc: row.first, lastUtc: row.last };
|
|
436
|
+
}
|
|
410
437
|
close() {
|
|
411
438
|
this.db.close();
|
|
412
439
|
}
|
|
@@ -601,8 +628,8 @@ function responsePage(value, machine) {
|
|
|
601
628
|
nextCursor
|
|
602
629
|
};
|
|
603
630
|
}
|
|
604
|
-
function requestUrl(baseUrl,
|
|
605
|
-
const url = new URL(
|
|
631
|
+
function requestUrl(baseUrl, path6, query) {
|
|
632
|
+
const url = new URL(path6, baseUrl);
|
|
606
633
|
const parts = Object.entries(query).filter((entry) => entry[1] !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
|
|
607
634
|
url.search = parts.join("&");
|
|
608
635
|
return url.toString();
|
|
@@ -654,6 +681,651 @@ var ActivityHttpSourceClient = class {
|
|
|
654
681
|
}
|
|
655
682
|
};
|
|
656
683
|
|
|
684
|
+
// src/activity/timeline/regenerate.ts
|
|
685
|
+
import { randomBytes } from "crypto";
|
|
686
|
+
import { mkdirSync as mkdirSync3, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
|
|
687
|
+
import path4 from "path";
|
|
688
|
+
|
|
689
|
+
// src/activity/timeline/corrections.ts
|
|
690
|
+
import { mkdirSync as mkdirSync2 } from "fs";
|
|
691
|
+
import path3 from "path";
|
|
692
|
+
function timelineCorrectionDatabasePath(memoryDir) {
|
|
693
|
+
return path3.join(memoryDir, "state", "activity-timeline.sqlite");
|
|
694
|
+
}
|
|
695
|
+
function rowToCorrection(row) {
|
|
696
|
+
return {
|
|
697
|
+
cardId: row.card_id,
|
|
698
|
+
categoryId: row.category_id ?? void 0,
|
|
699
|
+
title: row.title ?? void 0,
|
|
700
|
+
editedAtUtc: row.edited_at_utc
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
var TimelineCorrectionStore = class _TimelineCorrectionStore {
|
|
704
|
+
db;
|
|
705
|
+
constructor(db) {
|
|
706
|
+
this.db = db;
|
|
707
|
+
}
|
|
708
|
+
static open(memoryDir) {
|
|
709
|
+
mkdirSync2(path3.join(memoryDir, "state"), { recursive: true });
|
|
710
|
+
const db = openBetterSqlite3(timelineCorrectionDatabasePath(memoryDir));
|
|
711
|
+
db.pragma("journal_mode = WAL");
|
|
712
|
+
db.pragma("busy_timeout = 5000");
|
|
713
|
+
db.exec(`
|
|
714
|
+
CREATE TABLE IF NOT EXISTS timeline_corrections (
|
|
715
|
+
card_id TEXT PRIMARY KEY,
|
|
716
|
+
category_id TEXT,
|
|
717
|
+
title TEXT,
|
|
718
|
+
edited_at_utc TEXT NOT NULL
|
|
719
|
+
);
|
|
720
|
+
`);
|
|
721
|
+
return new _TimelineCorrectionStore(db);
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Persist one correction. `categoryId`, when set, must exist in `categories`
|
|
725
|
+
* (defaults to the built-in registry) — an unknown category is a malformed
|
|
726
|
+
* edit and must fail rather than silently strand the card.
|
|
727
|
+
*/
|
|
728
|
+
upsert(correction, categories = DEFAULT_TIMELINE_CATEGORIES) {
|
|
729
|
+
validateTimelineCategories(categories);
|
|
730
|
+
if (typeof correction.cardId !== "string" || correction.cardId.length === 0) {
|
|
731
|
+
throw new RangeError("timeline correction requires a non-empty cardId");
|
|
732
|
+
}
|
|
733
|
+
if (typeof correction.editedAtUtc !== "string" || Number.isNaN(Date.parse(correction.editedAtUtc))) {
|
|
734
|
+
throw new RangeError("timeline correction requires a valid editedAtUtc instant");
|
|
735
|
+
}
|
|
736
|
+
if (correction.categoryId === void 0 && correction.title === void 0 || correction.title !== void 0 && correction.title.length === 0) {
|
|
737
|
+
throw new RangeError("timeline correction must set a categoryId and/or a non-empty title");
|
|
738
|
+
}
|
|
739
|
+
if (correction.categoryId !== void 0 && !categories.some((category) => category.id === correction.categoryId)) {
|
|
740
|
+
throw new RangeError(`timeline correction targets unknown category: ${correction.categoryId}`);
|
|
741
|
+
}
|
|
742
|
+
this.db.prepare(
|
|
743
|
+
`INSERT INTO timeline_corrections (card_id, category_id, title, edited_at_utc)
|
|
744
|
+
VALUES (?, ?, ?, ?)
|
|
745
|
+
ON CONFLICT(card_id) DO UPDATE SET category_id = excluded.category_id, title = excluded.title, edited_at_utc = excluded.edited_at_utc`
|
|
746
|
+
).run(correction.cardId, correction.categoryId ?? null, correction.title ?? null, correction.editedAtUtc);
|
|
747
|
+
}
|
|
748
|
+
get(cardId) {
|
|
749
|
+
const row = this.db.prepare("SELECT card_id, category_id, title, edited_at_utc FROM timeline_corrections WHERE card_id = ?").get(cardId);
|
|
750
|
+
return row === void 0 ? void 0 : rowToCorrection(row);
|
|
751
|
+
}
|
|
752
|
+
/** All corrections ordered by card id (deterministic listing). */
|
|
753
|
+
list() {
|
|
754
|
+
return this.db.prepare("SELECT card_id, category_id, title, edited_at_utc FROM timeline_corrections ORDER BY card_id ASC").all().map((row) => rowToCorrection(row));
|
|
755
|
+
}
|
|
756
|
+
/** Explicitly reset a card to its derived values; true when a correction existed. */
|
|
757
|
+
reset(cardId) {
|
|
758
|
+
return this.db.prepare("DELETE FROM timeline_corrections WHERE card_id = ?").run(cardId).changes > 0;
|
|
759
|
+
}
|
|
760
|
+
close() {
|
|
761
|
+
this.db.close();
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
function correctionsForCards(cards, corrections) {
|
|
765
|
+
const ids = new Set(cards.map((card) => card.id));
|
|
766
|
+
return corrections.filter((correction) => ids.has(correction.cardId));
|
|
767
|
+
}
|
|
768
|
+
function applyTimelineCorrections(cards, corrections) {
|
|
769
|
+
const byCardId = new Map(corrections.map((correction) => [correction.cardId, correction]));
|
|
770
|
+
return cards.map((card) => {
|
|
771
|
+
const correction = byCardId.get(card.id);
|
|
772
|
+
if (correction === void 0) return card;
|
|
773
|
+
return {
|
|
774
|
+
id: card.id,
|
|
775
|
+
kind: card.kind,
|
|
776
|
+
title: correction.title ?? card.title,
|
|
777
|
+
summary: card.summary,
|
|
778
|
+
categoryId: correction.categoryId ?? card.categoryId,
|
|
779
|
+
confidence: 1,
|
|
780
|
+
startUtc: card.startUtc,
|
|
781
|
+
endUtc: card.endUtc,
|
|
782
|
+
dayKey: card.dayKey,
|
|
783
|
+
timezone: card.timezone,
|
|
784
|
+
machine: card.machine,
|
|
785
|
+
evidenceIds: card.evidenceIds,
|
|
786
|
+
evidenceRange: card.evidenceRange,
|
|
787
|
+
manualEdit: {
|
|
788
|
+
...correction.categoryId !== void 0 ? { categoryId: correction.categoryId } : {},
|
|
789
|
+
...correction.title !== void 0 ? { title: correction.title } : {},
|
|
790
|
+
editedAtUtc: correction.editedAtUtc
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// src/activity/timeline/build.ts
|
|
797
|
+
import { createHash } from "crypto";
|
|
798
|
+
|
|
799
|
+
// src/activity/timeline/classify.ts
|
|
800
|
+
var DOMAIN_CONFIDENCE = 0.85;
|
|
801
|
+
var APP_CONFIDENCE = 0.9;
|
|
802
|
+
var TITLE_CONFIDENCE = 0.7;
|
|
803
|
+
var UNKNOWN_CONFIDENCE = 0;
|
|
804
|
+
var RULES = [
|
|
805
|
+
{ categoryId: "development", domains: ["github.com", "gitlab.com", "stackoverflow.com", "linear.app", "atlassian.net"] },
|
|
806
|
+
{ categoryId: "communication", domains: ["mail.google.com", "gmail.com", "outlook.com", "outlook.office.com", "slack.com"] },
|
|
807
|
+
{ categoryId: "design", domains: ["figma.com", "canva.com"] },
|
|
808
|
+
{ categoryId: "documents", domains: ["docs.google.com", "notion.so", "dropbox.com"] },
|
|
809
|
+
{ categoryId: "entertainment", domains: ["youtube.com", "netflix.com", "spotify.com"] },
|
|
810
|
+
{ categoryId: "data", domains: ["metabase", "tableau", "grafana"] },
|
|
811
|
+
{ categoryId: "development", apps: ["code", "cursor", "neovim", "vim", "emacs", "xcode", "intellij", "terminal", "iterm", "warp", "wezterm", "kitty", "alacritty", "zed", "sublime", "datagrip"] },
|
|
812
|
+
{ categoryId: "communication", apps: ["slack", "discord", "teams", "mail", "outlook", "thunderbird", "messages", "signal", "whatsapp", "telegram", "zoom", "facetime", "meet"] },
|
|
813
|
+
{ categoryId: "design", apps: ["figma", "sketch", "photoshop", "illustrator", "indesign", "premiere", "after effects", "davinci", "blender", "ableton", "logic pro", "final cut"] },
|
|
814
|
+
{ categoryId: "documents", apps: ["word", "pages", "notion", "obsidian", "notes", "typora", "bear", "preview", "acrobat"] },
|
|
815
|
+
{ categoryId: "data", apps: ["excel", "numbers", "sheets", "tableau"] },
|
|
816
|
+
{ categoryId: "admin", apps: ["finder", "settings", "system preferences", "activity monitor", "files", "explorer"] },
|
|
817
|
+
{ categoryId: "entertainment", apps: ["spotify", "music", "youtube", "vlc", "quicktime", "steam", "netflix", "podcast", "tv"] },
|
|
818
|
+
{ categoryId: "browsing", apps: ["chrome", "safari", "firefox", "edge", "arc", "brave", "browser"] },
|
|
819
|
+
{ categoryId: "development", titles: ["pull request", "merge conflict", "terminal \u2014", "repository"] },
|
|
820
|
+
{ categoryId: "communication", titles: ["inbox"] },
|
|
821
|
+
{ categoryId: "data", titles: ["spreadsheet", "pivot table"] }
|
|
822
|
+
];
|
|
823
|
+
function classifyTimelineObservation(observation, categories) {
|
|
824
|
+
const app = observation.app.toLowerCase();
|
|
825
|
+
const title = observation.windowTitle.toLowerCase();
|
|
826
|
+
const domain = observation.browserUrl === void 0 ? "" : hostOf(observation.browserUrl);
|
|
827
|
+
for (const rule of RULES) {
|
|
828
|
+
if (rule.domains !== void 0 && domain !== "" && rule.domains.some((pattern) => domain.includes(pattern))) {
|
|
829
|
+
return checkedRule(rule, DOMAIN_CONFIDENCE, categories);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
for (const rule of RULES) {
|
|
833
|
+
if (rule.apps !== void 0 && rule.apps.some((pattern) => app.includes(pattern))) {
|
|
834
|
+
return checkedRule(rule, APP_CONFIDENCE, categories);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
for (const rule of RULES) {
|
|
838
|
+
if (rule.titles !== void 0 && rule.titles.some((pattern) => title.includes(pattern))) {
|
|
839
|
+
return checkedRule(rule, TITLE_CONFIDENCE, categories);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
return { categoryId: TIMELINE_RESERVED_UNKNOWN, confidence: UNKNOWN_CONFIDENCE };
|
|
843
|
+
}
|
|
844
|
+
function checkedRule(rule, confidence, categories) {
|
|
845
|
+
if (!categories.some((category) => category.id === rule.categoryId)) {
|
|
846
|
+
throw new RangeError(`timeline classification rule targets unknown category: ${rule.categoryId}`);
|
|
847
|
+
}
|
|
848
|
+
return { categoryId: rule.categoryId, confidence };
|
|
849
|
+
}
|
|
850
|
+
function hostOf(url) {
|
|
851
|
+
try {
|
|
852
|
+
return new URL(url).hostname.toLowerCase();
|
|
853
|
+
} catch {
|
|
854
|
+
return url.toLowerCase();
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
// src/activity/timeline/build.ts
|
|
859
|
+
var TIMELINE_FORMAT_VERSION = 1;
|
|
860
|
+
var TIMELINE_MERGE_GAP_MS = 12e4;
|
|
861
|
+
var TIMELINE_MAX_DWELL_MS = 15 * 6e4;
|
|
862
|
+
function canonicalMs(iso) {
|
|
863
|
+
const parsed = Date.parse(iso);
|
|
864
|
+
return Number.isFinite(parsed) ? parsed : Number.NaN;
|
|
865
|
+
}
|
|
866
|
+
function isoOf(ms) {
|
|
867
|
+
return new Date(ms).toISOString();
|
|
868
|
+
}
|
|
869
|
+
function evidenceKeyOf(observation) {
|
|
870
|
+
return `${observation.machine}|${isoOf(canonicalMs(observation.capturedAtUtc))}|${observation.contentHash}`;
|
|
871
|
+
}
|
|
872
|
+
function stableCardId(identity) {
|
|
873
|
+
return `tlc_${createHash("sha256").update(identity, "utf8").digest("hex").slice(0, 16)}`;
|
|
874
|
+
}
|
|
875
|
+
function formatDurationMinutes(ms) {
|
|
876
|
+
return `${Math.round(ms / 6e4)}m`;
|
|
877
|
+
}
|
|
878
|
+
function unionIntervals(intervals) {
|
|
879
|
+
const sorted = [...intervals].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
|
|
880
|
+
const merged = [];
|
|
881
|
+
for (const interval of sorted) {
|
|
882
|
+
const last = merged[merged.length - 1];
|
|
883
|
+
if (last !== void 0 && interval[0] <= last[1]) {
|
|
884
|
+
last[1] = Math.max(last[1], interval[1]);
|
|
885
|
+
} else {
|
|
886
|
+
merged.push([interval[0], interval[1]]);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
return merged;
|
|
890
|
+
}
|
|
891
|
+
function subtractInterval(start, end, cutStart, cutEnd) {
|
|
892
|
+
if (cutEnd <= start || cutStart >= end) return [[start, end]];
|
|
893
|
+
const pieces = [];
|
|
894
|
+
if (cutStart > start) pieces.push([start, cutStart]);
|
|
895
|
+
if (cutEnd < end) pieces.push([cutEnd, end]);
|
|
896
|
+
return pieces;
|
|
897
|
+
}
|
|
898
|
+
function mergeTrack(machine, track, pauses) {
|
|
899
|
+
const cards = [];
|
|
900
|
+
let current = [];
|
|
901
|
+
const pauseStartsAfter = (fromMs, toMs) => pauses.some(([ps, pe]) => ps >= fromMs && ps < toMs && pe > ps);
|
|
902
|
+
for (const observation of track) {
|
|
903
|
+
const last = current[current.length - 1];
|
|
904
|
+
if (last !== void 0) {
|
|
905
|
+
const gap = canonicalMs(observation.capturedAtUtc) - canonicalMs(last.capturedAtUtc);
|
|
906
|
+
const sameKey = observation.app === last.app && observation.windowTitle === last.windowTitle;
|
|
907
|
+
const pauseBetween = pauseStartsAfter(canonicalMs(last.capturedAtUtc), canonicalMs(observation.capturedAtUtc));
|
|
908
|
+
if (!sameKey || gap > TIMELINE_MERGE_GAP_MS || pauseBetween) {
|
|
909
|
+
cards.push({ machine, observations: current });
|
|
910
|
+
current = [];
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
current.push(observation);
|
|
914
|
+
}
|
|
915
|
+
if (current.length > 0) cards.push({ machine, observations: current });
|
|
916
|
+
return cards;
|
|
917
|
+
}
|
|
918
|
+
function buildTimelineDay(input) {
|
|
919
|
+
const categories = input.categories ?? DEFAULT_TIMELINE_CATEGORIES;
|
|
920
|
+
validateTimelineCategories(categories);
|
|
921
|
+
const window = activityDayWindow(input.date, input.timezone);
|
|
922
|
+
const dayStartMs = Date.parse(window.startUtc);
|
|
923
|
+
const dayEndMs = Date.parse(window.endUtc);
|
|
924
|
+
const observations = input.observations.filter((observation) => Number.isFinite(canonicalMs(observation.capturedAtUtc))).filter((observation) => {
|
|
925
|
+
const ms = canonicalMs(observation.capturedAtUtc);
|
|
926
|
+
return ms >= dayStartMs && ms < dayEndMs;
|
|
927
|
+
});
|
|
928
|
+
for (const pause of input.pauses ?? []) {
|
|
929
|
+
const startMs = canonicalMs(pause.startUtc);
|
|
930
|
+
const endMs = canonicalMs(pause.endUtc);
|
|
931
|
+
if (!Number.isFinite(startMs) || !Number.isFinite(endMs) || startMs >= endMs) {
|
|
932
|
+
throw new RangeError("timeline pause must be a valid half-open [startUtc, endUtc) interval");
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
const pauseIntervals = unionIntervals(
|
|
936
|
+
(input.pauses ?? []).map((pause) => [canonicalMs(pause.startUtc), canonicalMs(pause.endUtc)]).map(([startMs, endMs]) => [Math.max(startMs, dayStartMs), Math.min(endMs, dayEndMs)]).filter(([startMs, endMs]) => endMs > startMs)
|
|
937
|
+
);
|
|
938
|
+
const tracks = /* @__PURE__ */ new Map();
|
|
939
|
+
for (const observation of observations) {
|
|
940
|
+
const track = tracks.get(observation.machine) ?? [];
|
|
941
|
+
track.push(observation);
|
|
942
|
+
tracks.set(observation.machine, track);
|
|
943
|
+
}
|
|
944
|
+
for (const track of tracks.values()) {
|
|
945
|
+
track.sort(
|
|
946
|
+
(a, b) => canonicalMs(a.capturedAtUtc) - canonicalMs(b.capturedAtUtc) || (a.contentHash < b.contentHash ? -1 : a.contentHash > b.contentHash ? 1 : 0)
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
const cards = [];
|
|
950
|
+
const machines = [...tracks.keys()].sort();
|
|
951
|
+
for (const machine of machines) {
|
|
952
|
+
const track = tracks.get(machine) ?? [];
|
|
953
|
+
const merged = mergeTrack(machine, track, pauseIntervals);
|
|
954
|
+
const trackIntervals = [];
|
|
955
|
+
for (let index = 0; index < merged.length; index++) {
|
|
956
|
+
const group = merged[index];
|
|
957
|
+
const first = group.observations[0];
|
|
958
|
+
const last = group.observations[group.observations.length - 1];
|
|
959
|
+
const startMs = canonicalMs(first.capturedAtUtc);
|
|
960
|
+
const lastMs = canonicalMs(last.capturedAtUtc);
|
|
961
|
+
const nextObsMs = index + 1 < merged.length ? canonicalMs(merged[index + 1].observations[0].capturedAtUtc) : Number.POSITIVE_INFINITY;
|
|
962
|
+
const pauseStartMs = pauseIntervals.find(([ps]) => ps > lastMs)?.[0] ?? Number.POSITIVE_INFINITY;
|
|
963
|
+
const endMs = Math.max(lastMs, Math.min(lastMs + TIMELINE_MAX_DWELL_MS, nextObsMs, pauseStartMs, dayEndMs));
|
|
964
|
+
trackIntervals.push([startMs, endMs]);
|
|
965
|
+
const evidenceIds = group.observations.map((observation) => observation.id);
|
|
966
|
+
const classification = classifyTimelineObservation(first, categories);
|
|
967
|
+
cards.push({
|
|
968
|
+
id: stableCardId(`activity|${machine}|${evidenceKeyOf(first)}|${evidenceKeyOf(last)}`),
|
|
969
|
+
kind: "activity",
|
|
970
|
+
title: first.windowTitle.length > 0 ? first.windowTitle : first.app,
|
|
971
|
+
summary: `${first.app} \xB7 ${machine} \xB7 ${evidenceIds.length} obs \xB7 ${formatDurationMinutes(endMs - startMs)}`,
|
|
972
|
+
categoryId: classification.categoryId,
|
|
973
|
+
confidence: classification.confidence,
|
|
974
|
+
startUtc: isoOf(startMs),
|
|
975
|
+
endUtc: isoOf(endMs),
|
|
976
|
+
dayKey: input.date,
|
|
977
|
+
timezone: input.timezone,
|
|
978
|
+
machine,
|
|
979
|
+
evidenceIds,
|
|
980
|
+
evidenceRange: { firstKey: evidenceKeyOf(first), lastKey: evidenceKeyOf(last) }
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
for (let index = 0; index + 1 < trackIntervals.length; index++) {
|
|
984
|
+
const gapStart = trackIntervals[index][1];
|
|
985
|
+
const gapEnd = trackIntervals[index + 1][0];
|
|
986
|
+
if (gapEnd <= gapStart) continue;
|
|
987
|
+
let pieces = [[gapStart, gapEnd]];
|
|
988
|
+
for (const [pauseStart, pauseEnd] of pauseIntervals) {
|
|
989
|
+
pieces = pieces.flatMap(([start, end]) => subtractInterval(start, end, pauseStart, pauseEnd));
|
|
990
|
+
}
|
|
991
|
+
for (const [start, end] of pieces) {
|
|
992
|
+
cards.push({
|
|
993
|
+
id: stableCardId(`idle|${machine}|${isoOf(start)}|${isoOf(end)}`),
|
|
994
|
+
kind: "idle",
|
|
995
|
+
title: "Idle",
|
|
996
|
+
summary: `${formatDurationMinutes(end - start)} gap on ${machine}`,
|
|
997
|
+
categoryId: TIMELINE_RESERVED_IDLE,
|
|
998
|
+
confidence: 1,
|
|
999
|
+
startUtc: isoOf(start),
|
|
1000
|
+
endUtc: isoOf(end),
|
|
1001
|
+
dayKey: input.date,
|
|
1002
|
+
timezone: input.timezone,
|
|
1003
|
+
machine,
|
|
1004
|
+
evidenceIds: [],
|
|
1005
|
+
evidenceRange: null
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
for (const [pauseStart, pauseEnd] of pauseIntervals) {
|
|
1011
|
+
const reason = (input.pauses ?? []).find((pause) => canonicalMs(pause.startUtc) === pauseStart)?.reason;
|
|
1012
|
+
cards.push({
|
|
1013
|
+
id: stableCardId(`pause|${isoOf(pauseStart)}|${isoOf(pauseEnd)}`),
|
|
1014
|
+
kind: "pause",
|
|
1015
|
+
title: "Paused",
|
|
1016
|
+
summary: reason === void 0 ? `${formatDurationMinutes(pauseEnd - pauseStart)} user pause` : `${formatDurationMinutes(pauseEnd - pauseStart)} user pause \u2014 ${reason}`,
|
|
1017
|
+
categoryId: TIMELINE_RESERVED_PAUSE,
|
|
1018
|
+
confidence: 1,
|
|
1019
|
+
startUtc: isoOf(pauseStart),
|
|
1020
|
+
endUtc: isoOf(pauseEnd),
|
|
1021
|
+
dayKey: input.date,
|
|
1022
|
+
timezone: input.timezone,
|
|
1023
|
+
machine: null,
|
|
1024
|
+
evidenceIds: [],
|
|
1025
|
+
evidenceRange: null
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
cards.sort((a, b) => a.startUtc < b.startUtc ? -1 : a.startUtc > b.startUtc ? 1 : a.endUtc < b.endUtc ? -1 : a.endUtc > b.endUtc ? 1 : (a.machine ?? "") < (b.machine ?? "") ? -1 : (a.machine ?? "") > (b.machine ?? "") ? 1 : a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
1029
|
+
return {
|
|
1030
|
+
formatVersion: TIMELINE_FORMAT_VERSION,
|
|
1031
|
+
date: input.date,
|
|
1032
|
+
timezone: input.timezone,
|
|
1033
|
+
startUtc: window.startUtc,
|
|
1034
|
+
endUtc: window.endUtc,
|
|
1035
|
+
cards
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
function serializeTimelineDay(day) {
|
|
1039
|
+
return JSON.stringify(day);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
// src/activity/timeline/analysis-run.ts
|
|
1043
|
+
async function runTimelineCardAnalysis(input) {
|
|
1044
|
+
const { startUtc, endUtc } = activityDayWindow(input.date, input.timezone);
|
|
1045
|
+
if (!input.config.enabled) {
|
|
1046
|
+
return { status: "disabled", cards: input.cards };
|
|
1047
|
+
}
|
|
1048
|
+
const start = Date.parse(startUtc);
|
|
1049
|
+
const end = Date.parse(endUtc);
|
|
1050
|
+
const observations = input.observations.filter((observation) => {
|
|
1051
|
+
const captured = Date.parse(observation.capturedAtUtc);
|
|
1052
|
+
return Number.isFinite(captured) && captured >= start && captured < end;
|
|
1053
|
+
});
|
|
1054
|
+
const result = await analyzeTimelineCards({
|
|
1055
|
+
enabled: true,
|
|
1056
|
+
cards: input.cards,
|
|
1057
|
+
observations,
|
|
1058
|
+
provider: input.config.provider,
|
|
1059
|
+
model: input.config.model,
|
|
1060
|
+
complete: timelineAnalysisCompleteFromClients({
|
|
1061
|
+
localLlm: input.deps.localLlm ?? null,
|
|
1062
|
+
remoteLlm: input.deps.remoteLlm ?? null
|
|
1063
|
+
}),
|
|
1064
|
+
...input.config.timeoutMs === void 0 ? {} : { timeoutMs: input.config.timeoutMs },
|
|
1065
|
+
date: input.date,
|
|
1066
|
+
timezone: input.timezone,
|
|
1067
|
+
...input.categories === void 0 ? {} : { categories: input.categories },
|
|
1068
|
+
...input.config.preferences === void 0 ? {} : { preferences: input.config.preferences },
|
|
1069
|
+
...input.corrections === void 0 ? {} : { priorEdits: input.corrections },
|
|
1070
|
+
...input.signal === void 0 ? {} : { signal: input.signal }
|
|
1071
|
+
});
|
|
1072
|
+
if (result.status !== "ok") {
|
|
1073
|
+
return {
|
|
1074
|
+
status: result.status,
|
|
1075
|
+
cards: result.cards,
|
|
1076
|
+
...result.failure === void 0 ? {} : { failure: result.failure }
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
return {
|
|
1080
|
+
status: "ok",
|
|
1081
|
+
cards: result.cards,
|
|
1082
|
+
metadata: buildAnalysisRunMetadata({
|
|
1083
|
+
provider: result.provider ?? "unknown",
|
|
1084
|
+
model: result.model ?? "unknown",
|
|
1085
|
+
promptVersion: String(result.promptVersion ?? "v0"),
|
|
1086
|
+
observationCount: observations.length
|
|
1087
|
+
})
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
// src/activity/timeline/regenerate.ts
|
|
1092
|
+
var TIMELINE_DAY_FORMAT_VERSION = 1;
|
|
1093
|
+
var TIMELINE_DAY_DIR = path4.join("activity", "timeline");
|
|
1094
|
+
var inflight = /* @__PURE__ */ new Map();
|
|
1095
|
+
function requireToken(value, name) {
|
|
1096
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
1097
|
+
throw new TypeError(`${name} must be a non-empty string`);
|
|
1098
|
+
}
|
|
1099
|
+
return value.trim();
|
|
1100
|
+
}
|
|
1101
|
+
function timelineDayPath(memoryDir, date) {
|
|
1102
|
+
const root = requireToken(memoryDir, "memoryDir");
|
|
1103
|
+
if (!isValidActivityDate(date)) {
|
|
1104
|
+
throw new RangeError("date must be a real YYYY-MM-DD day");
|
|
1105
|
+
}
|
|
1106
|
+
return path4.join(path4.resolve(root), TIMELINE_DAY_DIR, `${date}.json`);
|
|
1107
|
+
}
|
|
1108
|
+
function snapshotToObservation(snapshot) {
|
|
1109
|
+
if (typeof snapshot.id !== "number") return null;
|
|
1110
|
+
return {
|
|
1111
|
+
id: snapshot.id,
|
|
1112
|
+
machine: snapshot.machine,
|
|
1113
|
+
capturedAtUtc: snapshot.capturedAtUtc,
|
|
1114
|
+
app: snapshot.app,
|
|
1115
|
+
windowTitle: snapshot.windowTitle,
|
|
1116
|
+
...snapshot.browserUrl === void 0 ? {} : { browserUrl: snapshot.browserUrl },
|
|
1117
|
+
contentHash: snapshot.contentHash
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
function localDatesForUtcRange(fromMs, toMs, timezone) {
|
|
1121
|
+
if (!Number.isFinite(fromMs) || !Number.isFinite(toMs) || toMs <= fromMs) return [];
|
|
1122
|
+
const dates = [];
|
|
1123
|
+
let date = activityDateInTimezone(new Date(fromMs), timezone);
|
|
1124
|
+
const last = activityDateInTimezone(new Date(toMs - 1), timezone);
|
|
1125
|
+
while (dates.length < 3660) {
|
|
1126
|
+
dates.push(date);
|
|
1127
|
+
if (date === last) break;
|
|
1128
|
+
const { endUtc } = activityDayWindow(date, timezone);
|
|
1129
|
+
date = activityDateInTimezone(new Date(Date.parse(endUtc)), timezone);
|
|
1130
|
+
}
|
|
1131
|
+
return dates;
|
|
1132
|
+
}
|
|
1133
|
+
function listPersistedTimelineDates(memoryDir) {
|
|
1134
|
+
let entries;
|
|
1135
|
+
try {
|
|
1136
|
+
entries = readdirSync(path4.join(path4.resolve(requireToken(memoryDir, "memoryDir")), TIMELINE_DAY_DIR));
|
|
1137
|
+
} catch {
|
|
1138
|
+
return [];
|
|
1139
|
+
}
|
|
1140
|
+
const dates = [];
|
|
1141
|
+
for (const entry of entries) {
|
|
1142
|
+
const day = entry.endsWith(".json") ? entry.slice(0, -".json".length) : entry;
|
|
1143
|
+
if (isValidActivityDate(day)) dates.push(day);
|
|
1144
|
+
}
|
|
1145
|
+
return dates.sort();
|
|
1146
|
+
}
|
|
1147
|
+
function resolveTimelineLoadDates(input) {
|
|
1148
|
+
const { window, timezone, today, store, persistedDates } = input;
|
|
1149
|
+
if (window.from !== void 0 || window.to !== void 0) {
|
|
1150
|
+
const fromMs = window.from === void 0 ? Date.now() : Date.parse(window.from);
|
|
1151
|
+
const toMs = window.to === void 0 ? fromMs + 1 : Date.parse(window.to);
|
|
1152
|
+
if (!Number.isFinite(fromMs) || !Number.isFinite(toMs)) return [];
|
|
1153
|
+
return localDatesForUtcRange(fromMs, toMs > fromMs ? toMs : fromMs + 1, timezone);
|
|
1154
|
+
}
|
|
1155
|
+
const days = new Set(persistedDates);
|
|
1156
|
+
days.add(today);
|
|
1157
|
+
const extent = store.snapshotCaptureExtent();
|
|
1158
|
+
if (extent !== null) {
|
|
1159
|
+
const firstMs = Date.parse(extent.firstUtc);
|
|
1160
|
+
const lastMs = Date.parse(extent.lastUtc);
|
|
1161
|
+
if (Number.isFinite(firstMs) && Number.isFinite(lastMs) && lastMs >= firstMs) {
|
|
1162
|
+
for (const day of localDatesForUtcRange(firstMs, lastMs + 1, timezone)) days.add(day);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
return [...days].sort();
|
|
1166
|
+
}
|
|
1167
|
+
function timelineAnalysisClientsFromConfig(config) {
|
|
1168
|
+
return {
|
|
1169
|
+
localLlm: new LocalLlmClient(config),
|
|
1170
|
+
remoteLlm: new FallbackLlmClient(
|
|
1171
|
+
config.gatewayConfig,
|
|
1172
|
+
fallbackLlmRuntimeContextFromConfig(config)
|
|
1173
|
+
)
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
function resolveClients(input) {
|
|
1177
|
+
if (input.deps !== void 0) return input.deps;
|
|
1178
|
+
if (input.pluginConfig !== void 0) return timelineAnalysisClientsFromConfig(input.pluginConfig);
|
|
1179
|
+
return {};
|
|
1180
|
+
}
|
|
1181
|
+
function sourceHash(input) {
|
|
1182
|
+
return hashActivityBody(
|
|
1183
|
+
JSON.stringify({
|
|
1184
|
+
observations: input.observations.map((observation) => ({
|
|
1185
|
+
id: observation.id,
|
|
1186
|
+
contentHash: observation.contentHash,
|
|
1187
|
+
capturedAtUtc: observation.capturedAtUtc
|
|
1188
|
+
})),
|
|
1189
|
+
analysis: {
|
|
1190
|
+
enabled: input.analysis.enabled,
|
|
1191
|
+
provider: input.analysis.provider ?? null,
|
|
1192
|
+
model: input.analysis.model ?? null,
|
|
1193
|
+
timeoutMs: input.analysis.timeoutMs ?? null,
|
|
1194
|
+
preferences: input.analysis.preferences ?? null
|
|
1195
|
+
},
|
|
1196
|
+
corrections: input.corrections
|
|
1197
|
+
})
|
|
1198
|
+
);
|
|
1199
|
+
}
|
|
1200
|
+
function readPersisted(filePath) {
|
|
1201
|
+
try {
|
|
1202
|
+
const parsed = JSON.parse(readFileSync(filePath, "utf8"));
|
|
1203
|
+
if (parsed?.formatVersion !== TIMELINE_DAY_FORMAT_VERSION || !Array.isArray(parsed.cards)) {
|
|
1204
|
+
return null;
|
|
1205
|
+
}
|
|
1206
|
+
return parsed;
|
|
1207
|
+
} catch (error) {
|
|
1208
|
+
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
1209
|
+
return null;
|
|
1210
|
+
}
|
|
1211
|
+
return null;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
function persistDay(filePath, payload) {
|
|
1215
|
+
const text = `${JSON.stringify(payload)}
|
|
1216
|
+
`;
|
|
1217
|
+
try {
|
|
1218
|
+
if (readFileSync(filePath, "utf8") === text) return false;
|
|
1219
|
+
} catch (error) {
|
|
1220
|
+
if (!(typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT")) {
|
|
1221
|
+
throw error;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
mkdirSync3(path4.dirname(filePath), { recursive: true, mode: 448 });
|
|
1225
|
+
const tmpPath = `${filePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1226
|
+
writeFileSync(tmpPath, text, { encoding: "utf8", mode: 384 });
|
|
1227
|
+
try {
|
|
1228
|
+
renameSync(tmpPath, filePath);
|
|
1229
|
+
} catch (error) {
|
|
1230
|
+
try {
|
|
1231
|
+
unlinkSync(tmpPath);
|
|
1232
|
+
} catch {
|
|
1233
|
+
}
|
|
1234
|
+
throw error;
|
|
1235
|
+
}
|
|
1236
|
+
return true;
|
|
1237
|
+
}
|
|
1238
|
+
function toResult(filePath, written, analyzed, day) {
|
|
1239
|
+
return {
|
|
1240
|
+
status: day.status,
|
|
1241
|
+
cards: day.cards,
|
|
1242
|
+
path: filePath,
|
|
1243
|
+
written,
|
|
1244
|
+
analyzed,
|
|
1245
|
+
...day.metadata === void 0 ? {} : { metadata: day.metadata },
|
|
1246
|
+
...day.failure === void 0 ? {} : { failure: day.failure }
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
function isCachedDayFinal(status, analysisEnabled) {
|
|
1250
|
+
if (analysisEnabled) {
|
|
1251
|
+
return status === "ok" || status === "provider_failed" || status === "invalid_output";
|
|
1252
|
+
}
|
|
1253
|
+
return status === "disabled";
|
|
1254
|
+
}
|
|
1255
|
+
async function regenerateUncached(input) {
|
|
1256
|
+
const date = requireToken(input.date, "date");
|
|
1257
|
+
const timezone = requireToken(input.timezone, "timezone");
|
|
1258
|
+
const filePath = timelineDayPath(input.memoryDir, date);
|
|
1259
|
+
if (!input.timelineEnabled) {
|
|
1260
|
+
return toResult(filePath, false, false, { status: "timeline_disabled", cards: [] });
|
|
1261
|
+
}
|
|
1262
|
+
const { startUtc, endUtc } = activityDayWindow(date, timezone);
|
|
1263
|
+
const observations = input.store.listSnapshotsForDay(null, startUtc, endUtc).map(snapshotToObservation).filter((observation) => observation !== null);
|
|
1264
|
+
let corrections = input.corrections;
|
|
1265
|
+
let opened;
|
|
1266
|
+
if (corrections === void 0) {
|
|
1267
|
+
opened = TimelineCorrectionStore.open(input.memoryDir);
|
|
1268
|
+
corrections = opened.list();
|
|
1269
|
+
}
|
|
1270
|
+
try {
|
|
1271
|
+
const rawCards = buildTimelineDay({ date, timezone, observations }).cards;
|
|
1272
|
+
corrections = correctionsForCards(rawCards, corrections);
|
|
1273
|
+
const built = applyTimelineCorrections(rawCards, corrections);
|
|
1274
|
+
const hash = sourceHash({ observations, analysis: input.analysis, corrections });
|
|
1275
|
+
const prior = readPersisted(filePath);
|
|
1276
|
+
if (prior !== null && prior.sourceHash === hash && isCachedDayFinal(prior.status, input.analysis.enabled)) {
|
|
1277
|
+
return toResult(filePath, false, false, prior);
|
|
1278
|
+
}
|
|
1279
|
+
const deterministic = {
|
|
1280
|
+
formatVersion: TIMELINE_DAY_FORMAT_VERSION,
|
|
1281
|
+
date,
|
|
1282
|
+
timezone,
|
|
1283
|
+
sourceHash: hash,
|
|
1284
|
+
status: input.analysis.enabled ? "pending" : "disabled",
|
|
1285
|
+
cards: built
|
|
1286
|
+
};
|
|
1287
|
+
persistDay(filePath, deterministic);
|
|
1288
|
+
if (!input.analysis.enabled) {
|
|
1289
|
+
return toResult(filePath, true, false, deterministic);
|
|
1290
|
+
}
|
|
1291
|
+
const deps = resolveClients(input);
|
|
1292
|
+
const analyzed = await runTimelineCardAnalysis({
|
|
1293
|
+
date,
|
|
1294
|
+
timezone,
|
|
1295
|
+
cards: built,
|
|
1296
|
+
observations,
|
|
1297
|
+
corrections,
|
|
1298
|
+
config: input.analysis,
|
|
1299
|
+
deps,
|
|
1300
|
+
...input.signal === void 0 ? {} : { signal: input.signal }
|
|
1301
|
+
});
|
|
1302
|
+
const next = {
|
|
1303
|
+
formatVersion: TIMELINE_DAY_FORMAT_VERSION,
|
|
1304
|
+
date,
|
|
1305
|
+
timezone,
|
|
1306
|
+
sourceHash: hash,
|
|
1307
|
+
status: analyzed.status,
|
|
1308
|
+
cards: analyzed.cards,
|
|
1309
|
+
...analyzed.metadata === void 0 ? {} : { metadata: analyzed.metadata },
|
|
1310
|
+
...analyzed.failure === void 0 ? {} : { failure: analyzed.failure }
|
|
1311
|
+
};
|
|
1312
|
+
persistDay(filePath, next);
|
|
1313
|
+
return toResult(filePath, true, analyzed.status === "ok", next);
|
|
1314
|
+
} finally {
|
|
1315
|
+
opened?.close();
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
async function regenerateTimelineDay(input) {
|
|
1319
|
+
const key = `${path4.resolve(requireToken(input.memoryDir, "memoryDir"))}\0${input.date}`;
|
|
1320
|
+
const pending = inflight.get(key);
|
|
1321
|
+
if (pending !== void 0) return pending;
|
|
1322
|
+
const run = regenerateUncached(input).finally(() => {
|
|
1323
|
+
if (inflight.get(key) === run) inflight.delete(key);
|
|
1324
|
+
});
|
|
1325
|
+
inflight.set(key, run);
|
|
1326
|
+
return run;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
657
1329
|
// src/activity/runner.ts
|
|
658
1330
|
function previousIsoDate(date) {
|
|
659
1331
|
const parsed = /* @__PURE__ */ new Date(`${date}T00:00:00Z`);
|
|
@@ -740,6 +1412,24 @@ async function runActivitySyncOnce(options) {
|
|
|
740
1412
|
results.push(item);
|
|
741
1413
|
if (options.signal?.aborted) break;
|
|
742
1414
|
}
|
|
1415
|
+
if (options.config.timeline.enabled && !options.signal?.aborted) {
|
|
1416
|
+
for (const date of dates) {
|
|
1417
|
+
try {
|
|
1418
|
+
await regenerateTimelineDay({
|
|
1419
|
+
date,
|
|
1420
|
+
timezone: options.config.timezone,
|
|
1421
|
+
memoryDir: options.memoryDir,
|
|
1422
|
+
store,
|
|
1423
|
+
timelineEnabled: true,
|
|
1424
|
+
analysis: options.config.timeline.analysis,
|
|
1425
|
+
...options.pluginConfig === void 0 ? {} : { pluginConfig: options.pluginConfig },
|
|
1426
|
+
...options.analysisDeps === void 0 ? {} : { deps: options.analysisDeps },
|
|
1427
|
+
...options.signal === void 0 ? {} : { signal: options.signal }
|
|
1428
|
+
});
|
|
1429
|
+
} catch {
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
743
1433
|
} finally {
|
|
744
1434
|
if (ownStore) store.close();
|
|
745
1435
|
}
|
|
@@ -779,7 +1469,8 @@ var ActivitySyncScheduler = class {
|
|
|
779
1469
|
config: this.config,
|
|
780
1470
|
memoryDir: this.memoryDir,
|
|
781
1471
|
signal,
|
|
782
|
-
...options.reindexSearch === void 0 ? {} : { reindexSearch: options.reindexSearch }
|
|
1472
|
+
...options.reindexSearch === void 0 ? {} : { reindexSearch: options.reindexSearch },
|
|
1473
|
+
...options.pluginConfig === void 0 ? {} : { pluginConfig: options.pluginConfig }
|
|
783
1474
|
}));
|
|
784
1475
|
this.setTimer = options.setTimer ?? ((fn, ms) => {
|
|
785
1476
|
const timer = setInterval(fn, ms);
|
|
@@ -865,6 +1556,7 @@ var ActivitySyncRegistrar = class {
|
|
|
865
1556
|
// Strict refresh after each digest write (rule 31): bypasses the
|
|
866
1557
|
// min-interval gate and throws on a real failure.
|
|
867
1558
|
reindexSearch: (sig) => refreshActivityIndex(this.deps.getQmd(), this.deps.qmdCollection, sig),
|
|
1559
|
+
...this.deps.pluginConfig === void 0 ? {} : { pluginConfig: this.deps.pluginConfig },
|
|
868
1560
|
// A failed reindex (QMD down) leaves the next unchanged-digest tick
|
|
869
1561
|
// skipping afterWrites, so route the retry through the durable,
|
|
870
1562
|
// throttled QMD path — but never after teardown.
|
|
@@ -918,6 +1610,7 @@ var MaintenanceScheduler = class {
|
|
|
918
1610
|
secureStoreEnabled: resolveRecallAuxiliaryCapabilities(deps.config).secureStore,
|
|
919
1611
|
getQmd: () => deps.getQmd(),
|
|
920
1612
|
requestReindexRetry: () => this.requestQmdMaintenanceForTool("activity-reindex-retry"),
|
|
1613
|
+
pluginConfig: deps.config,
|
|
921
1614
|
...deps.onActivitySynced ? { onSynced: deps.onActivitySynced } : {}
|
|
922
1615
|
});
|
|
923
1616
|
}
|
|
@@ -1015,7 +1708,7 @@ var MaintenanceScheduler = class {
|
|
|
1015
1708
|
}
|
|
1016
1709
|
async autoRegisterDaySummaryCron() {
|
|
1017
1710
|
const home = resolveHomeDir();
|
|
1018
|
-
const jobsPath =
|
|
1711
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1019
1712
|
try {
|
|
1020
1713
|
if (!existsSync(jobsPath)) {
|
|
1021
1714
|
log.debug("day-summary cron: jobs.json not found, skipping auto-register");
|
|
@@ -1045,7 +1738,7 @@ var MaintenanceScheduler = class {
|
|
|
1045
1738
|
}
|
|
1046
1739
|
async autoRegisterNightlyGovernanceCron() {
|
|
1047
1740
|
const home = resolveHomeDir();
|
|
1048
|
-
const jobsPath =
|
|
1741
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1049
1742
|
try {
|
|
1050
1743
|
if (!existsSync(jobsPath)) {
|
|
1051
1744
|
log.debug("nightly governance cron: jobs.json not found, skipping auto-register");
|
|
@@ -1067,7 +1760,7 @@ var MaintenanceScheduler = class {
|
|
|
1067
1760
|
}
|
|
1068
1761
|
async autoRegisterProceduralMiningCron() {
|
|
1069
1762
|
const home = resolveHomeDir();
|
|
1070
|
-
const jobsPath =
|
|
1763
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1071
1764
|
try {
|
|
1072
1765
|
if (!existsSync(jobsPath)) {
|
|
1073
1766
|
log.debug("procedural mining cron: jobs.json not found, skipping auto-register");
|
|
@@ -1087,7 +1780,7 @@ var MaintenanceScheduler = class {
|
|
|
1087
1780
|
}
|
|
1088
1781
|
async autoRegisterContradictionScanCron() {
|
|
1089
1782
|
const home = resolveHomeDir();
|
|
1090
|
-
const jobsPath =
|
|
1783
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1091
1784
|
try {
|
|
1092
1785
|
if (!existsSync(jobsPath)) {
|
|
1093
1786
|
log.debug("contradiction scan cron: jobs.json not found, skipping auto-register");
|
|
@@ -1107,7 +1800,7 @@ var MaintenanceScheduler = class {
|
|
|
1107
1800
|
}
|
|
1108
1801
|
async autoRegisterPatternReinforcementCron() {
|
|
1109
1802
|
const home = resolveHomeDir();
|
|
1110
|
-
const jobsPath =
|
|
1803
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1111
1804
|
try {
|
|
1112
1805
|
if (!existsSync(jobsPath)) {
|
|
1113
1806
|
log.debug("pattern reinforcement cron: jobs.json not found, skipping auto-register");
|
|
@@ -1127,7 +1820,7 @@ var MaintenanceScheduler = class {
|
|
|
1127
1820
|
}
|
|
1128
1821
|
async autoRegisterGraphEdgeDecayCron() {
|
|
1129
1822
|
const home = resolveHomeDir();
|
|
1130
|
-
const jobsPath =
|
|
1823
|
+
const jobsPath = path5.join(home, ".openclaw", "cron", "jobs.json");
|
|
1131
1824
|
try {
|
|
1132
1825
|
if (!existsSync(jobsPath)) {
|
|
1133
1826
|
log.debug("graph edge decay cron: jobs.json not found, skipping auto-register");
|
|
@@ -1399,7 +2092,7 @@ var MaintenanceScheduler = class {
|
|
|
1399
2092
|
*/
|
|
1400
2093
|
async hasOverCapEncryptedLifecycleLedger(targets) {
|
|
1401
2094
|
for (const target of targets) {
|
|
1402
|
-
const ledgerPath =
|
|
2095
|
+
const ledgerPath = path5.join(target.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
1403
2096
|
let size;
|
|
1404
2097
|
try {
|
|
1405
2098
|
size = (await stat(ledgerPath)).size;
|
|
@@ -1451,7 +2144,7 @@ var MaintenanceScheduler = class {
|
|
|
1451
2144
|
* containment guard on every spill file it reads or deletes.
|
|
1452
2145
|
*/
|
|
1453
2146
|
async drainPendingLifecycleAppendsForPath(memoryDir) {
|
|
1454
|
-
const ledgerPath =
|
|
2147
|
+
const ledgerPath = path5.join(memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
1455
2148
|
const spillDir = pendingLifecycleLedgerDir(ledgerPath);
|
|
1456
2149
|
let spillFiles;
|
|
1457
2150
|
let claimedOrphans;
|
|
@@ -1465,7 +2158,7 @@ var MaintenanceScheduler = class {
|
|
|
1465
2158
|
if (spillFiles.length === 0 && claimedOrphans.length === 0) return;
|
|
1466
2159
|
const io = {
|
|
1467
2160
|
writeSecure: async (filePath, payload) => {
|
|
1468
|
-
await mkdir3(
|
|
2161
|
+
await mkdir3(path5.dirname(filePath), { recursive: true });
|
|
1469
2162
|
await writeFile2(filePath, payload, "utf-8");
|
|
1470
2163
|
},
|
|
1471
2164
|
readSecure: async (filePath) => {
|
|
@@ -1486,7 +2179,7 @@ var MaintenanceScheduler = class {
|
|
|
1486
2179
|
await appendFile(ledgerPath, payload, "utf-8");
|
|
1487
2180
|
},
|
|
1488
2181
|
async () => {
|
|
1489
|
-
await mkdir3(
|
|
2182
|
+
await mkdir3(path5.dirname(ledgerPath), { recursive: true });
|
|
1490
2183
|
}
|
|
1491
2184
|
);
|
|
1492
2185
|
} catch (err) {
|
|
@@ -1504,7 +2197,7 @@ var MaintenanceScheduler = class {
|
|
|
1504
2197
|
const targets = [];
|
|
1505
2198
|
const seen = /* @__PURE__ */ new Set();
|
|
1506
2199
|
const addTarget = (memoryDir, storage) => {
|
|
1507
|
-
const key =
|
|
2200
|
+
const key = path5.resolve(memoryDir);
|
|
1508
2201
|
if (seen.has(key)) return;
|
|
1509
2202
|
seen.add(key);
|
|
1510
2203
|
targets.push({ memoryDir, storage });
|
|
@@ -1533,7 +2226,7 @@ var MaintenanceScheduler = class {
|
|
|
1533
2226
|
}
|
|
1534
2227
|
}
|
|
1535
2228
|
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
1536
|
-
const namespacesBase =
|
|
2229
|
+
const namespacesBase = path5.join(this.deps.config.memoryDir, "namespaces");
|
|
1537
2230
|
let memoryDirReal;
|
|
1538
2231
|
try {
|
|
1539
2232
|
memoryDirReal = await realpath(this.deps.config.memoryDir);
|
|
@@ -1558,7 +2251,7 @@ var MaintenanceScheduler = class {
|
|
|
1558
2251
|
}
|
|
1559
2252
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
1560
2253
|
if (!entry.isDirectory() || entry.isSymbolicLink()) continue;
|
|
1561
|
-
const childPath =
|
|
2254
|
+
const childPath = path5.join(namespacesBase, entry.name);
|
|
1562
2255
|
try {
|
|
1563
2256
|
assertPathInsideRoot(memoryDirReal, await realpath(childPath), childPath);
|
|
1564
2257
|
} catch (err) {
|
|
@@ -1570,7 +2263,7 @@ var MaintenanceScheduler = class {
|
|
|
1570
2263
|
if (resolveNamespaceStorage && routeNamespace !== null) {
|
|
1571
2264
|
try {
|
|
1572
2265
|
const storage = await resolveNamespaceStorage(routeNamespace);
|
|
1573
|
-
if (
|
|
2266
|
+
if (path5.resolve(storage.dir) === path5.resolve(childPath)) {
|
|
1574
2267
|
addTarget(storage.dir, storage);
|
|
1575
2268
|
continue;
|
|
1576
2269
|
}
|
|
@@ -1601,7 +2294,7 @@ var MaintenanceScheduler = class {
|
|
|
1601
2294
|
* an over-cap rewrite never arms the throttle.
|
|
1602
2295
|
*/
|
|
1603
2296
|
async compactLifecycleLedgerTarget(target, threshold) {
|
|
1604
|
-
const ledgerPath =
|
|
2297
|
+
const ledgerPath = path5.join(target.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
1605
2298
|
let size = 0;
|
|
1606
2299
|
try {
|
|
1607
2300
|
size = (await stat(ledgerPath)).size;
|
|
@@ -1723,10 +2416,30 @@ export {
|
|
|
1723
2416
|
activityCursorKey,
|
|
1724
2417
|
syncActivitySource,
|
|
1725
2418
|
ActivityHttpSourceClient,
|
|
2419
|
+
timelineCorrectionDatabasePath,
|
|
2420
|
+
TimelineCorrectionStore,
|
|
2421
|
+
correctionsForCards,
|
|
2422
|
+
applyTimelineCorrections,
|
|
2423
|
+
classifyTimelineObservation,
|
|
2424
|
+
TIMELINE_FORMAT_VERSION,
|
|
2425
|
+
TIMELINE_MERGE_GAP_MS,
|
|
2426
|
+
TIMELINE_MAX_DWELL_MS,
|
|
2427
|
+
buildTimelineDay,
|
|
2428
|
+
serializeTimelineDay,
|
|
2429
|
+
runTimelineCardAnalysis,
|
|
2430
|
+
TIMELINE_DAY_FORMAT_VERSION,
|
|
2431
|
+
TIMELINE_DAY_DIR,
|
|
2432
|
+
timelineDayPath,
|
|
2433
|
+
snapshotToObservation,
|
|
2434
|
+
localDatesForUtcRange,
|
|
2435
|
+
listPersistedTimelineDates,
|
|
2436
|
+
resolveTimelineLoadDates,
|
|
2437
|
+
timelineAnalysisClientsFromConfig,
|
|
2438
|
+
regenerateTimelineDay,
|
|
1726
2439
|
resolveActivitySyncDates,
|
|
1727
2440
|
runActivitySyncOnce,
|
|
1728
2441
|
ACTIVITY_SYNC_DEFAULT_INTERVAL_MS,
|
|
1729
2442
|
ActivitySyncScheduler,
|
|
1730
2443
|
MaintenanceScheduler
|
|
1731
2444
|
};
|
|
1732
|
-
//# sourceMappingURL=chunk-
|
|
2445
|
+
//# sourceMappingURL=chunk-2BQ4ZIWC.js.map
|