@remnic/core 9.69.28 → 9.69.30
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 +1 -1
- package/dist/access-admin-ops-surface.js +58 -58
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +1 -1
- package/dist/access-authorization-probe.js +59 -59
- package/dist/access-boundary.d.ts +1 -1
- package/dist/access-boundary.js +58 -58
- package/dist/access-cli.js +133 -132
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.js +4 -4
- package/dist/access-extraction-force-flush.d.ts +1 -1
- package/dist/access-extraction-force-flush.js +58 -58
- package/dist/access-http-briefing.d.ts +1 -1
- package/dist/access-http-briefing.js +59 -59
- package/dist/access-http-lcm-compaction.d.ts +1 -1
- package/dist/access-http-lifecycle-flush.d.ts +1 -1
- package/dist/access-http-offline-stream.d.ts +1 -1
- package/dist/access-http-query.js +60 -60
- package/dist/access-http.d.ts +2 -2
- package/dist/access-http.js +76 -76
- package/dist/access-identity-continuity-surface.js +58 -58
- package/dist/access-lcm-surface.d.ts +1 -1
- package/dist/access-lcm-surface.js +58 -58
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-mcp.js +66 -66
- package/dist/access-namespace-preflight.js +58 -58
- package/dist/access-observe-transcript.js +4 -4
- package/dist/access-observe-write-surface.d.ts +1 -1
- package/dist/access-observe-write-surface.js +58 -58
- package/dist/access-offline-manifest.js +8 -8
- package/dist/access-operations-batch.js +60 -60
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-operations.js +65 -65
- package/dist/access-recall-concurrency.d.ts +1 -1
- package/dist/access-recall-concurrency.js +58 -58
- package/dist/access-recall-response.d.ts +1 -1
- package/dist/access-recall-response.js +58 -58
- package/dist/access-recall-surface.d.ts +1 -1
- package/dist/access-recall-surface.js +58 -58
- package/dist/access-schema.d.ts +91 -91
- package/dist/access-schema.js +3 -3
- package/dist/access-service-helpers.d.ts +1 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-service.js +58 -58
- package/dist/access-surface-catalog.d.ts +1 -1
- package/dist/access-surface-catalog.js +60 -60
- package/dist/active-recall.js +11 -11
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-WNGG2GC2.js → auto-sync-NSHLUAQI.js} +7 -7
- package/dist/briefing.js +19 -19
- package/dist/buffer.js +9 -9
- package/dist/calibration.js +4 -4
- package/dist/causal-consolidation.js +21 -21
- package/dist/{chunk-OO42R444.js → chunk-2MFH376S.js} +3 -3
- package/dist/{chunk-NXH34IPL.js → chunk-353KGBKY.js} +2 -2
- package/dist/{chunk-DZD3WGCD.js → chunk-3JVLGJCY.js} +2 -2
- package/dist/{chunk-NOPN47AL.js → chunk-47DEYNMR.js} +2 -2
- package/dist/chunk-4NZQ7IID.js +63 -0
- package/dist/chunk-4NZQ7IID.js.map +1 -0
- package/dist/{chunk-2OO6TPQG.js → chunk-4UDQUPT5.js} +2 -2
- package/dist/{chunk-IE57QQSZ.js → chunk-565C6ZFO.js} +2 -2
- package/dist/{chunk-C6XEXTSJ.js → chunk-5ABN4WVL.js} +44 -44
- package/dist/{chunk-W7OU4I3Y.js → chunk-666OOKB7.js} +2 -2
- package/dist/{chunk-EYIEWJNI.js → chunk-6KH5NLQS.js} +2 -2
- package/dist/{chunk-R55WAWS3.js → chunk-7DUFJAOE.js} +40 -40
- package/dist/{chunk-EMDLM3LW.js → chunk-7IRZK6MM.js} +2 -2
- package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
- package/dist/{chunk-RFWEDCRC.js → chunk-7VJXIDOC.js} +12 -12
- package/dist/{chunk-IVKIODHO.js → chunk-A7XEPMQ6.js} +5 -5
- package/dist/{chunk-K6MV3TRQ.js → chunk-ADXCCZL2.js} +2 -2
- package/dist/{chunk-GC65K6DI.js → chunk-AOCP6JA7.js} +4 -4
- package/dist/{chunk-JBPKEARU.js → chunk-AU7Q3LSC.js} +4 -4
- package/dist/{chunk-ND6IQGSZ.js → chunk-BA6WOZOT.js} +2 -2
- package/dist/{chunk-JI7U6AS3.js → chunk-C6FQJ52H.js} +2 -2
- package/dist/{chunk-IN673LEP.js → chunk-CARRTDKC.js} +2 -2
- package/dist/{chunk-HLTAZTN7.js → chunk-CBCNKKZD.js} +2 -2
- package/dist/{chunk-DXFG2VGN.js → chunk-CGC5UQCF.js} +2 -2
- package/dist/{chunk-YSSAGB2O.js → chunk-CLLPJ6QT.js} +5 -5
- package/dist/{chunk-U6S754L6.js → chunk-D5LORF7A.js} +3 -3
- package/dist/{chunk-C24UZSFW.js → chunk-DBQWVT2H.js} +2 -2
- package/dist/{chunk-XSTNGNJP.js → chunk-DCJ3YFIC.js} +2 -2
- package/dist/{chunk-2YDWI2LO.js → chunk-DITMGZOL.js} +2 -2
- package/dist/{chunk-LVE64P5Y.js → chunk-E2ZHGBAK.js} +2 -2
- package/dist/{chunk-WW3MR6T3.js → chunk-ENMTJRXA.js} +7 -7
- package/dist/{chunk-COUYFFID.js → chunk-EYMOJ3J6.js} +2 -2
- package/dist/{chunk-INBOGQ3E.js → chunk-EZZV7OQL.js} +2 -2
- package/dist/{chunk-MT47LH5L.js → chunk-FBMYGNOC.js} +2 -2
- package/dist/{chunk-N3SS45OW.js → chunk-FCSZ4K2X.js} +3 -3
- package/dist/{chunk-TWF35IC6.js → chunk-FDLDOEO6.js} +28 -23
- package/dist/chunk-FDLDOEO6.js.map +1 -0
- package/dist/{chunk-PKS56ZRR.js → chunk-FGGYSN4P.js} +2 -2
- package/dist/{chunk-ZMNT26KV.js → chunk-FHQSPTPZ.js} +2 -2
- package/dist/{chunk-6GUG4YNM.js → chunk-GGRRF4PZ.js} +2 -2
- package/dist/{chunk-YIHKAUS4.js → chunk-GTWHVXPA.js} +3 -3
- package/dist/{chunk-UY2RORVF.js → chunk-GVG3JYBI.js} +4 -4
- package/dist/{chunk-I3OQBP23.js → chunk-GY5WZBA6.js} +2 -2
- package/dist/{chunk-3GCK6ONU.js → chunk-HK32G473.js} +2 -2
- package/dist/{chunk-OVAJKCN3.js → chunk-HY55QQD7.js} +2 -2
- package/dist/{chunk-YJETZFLJ.js → chunk-I27RSQRR.js} +2 -2
- package/dist/{chunk-QIEUU4UK.js → chunk-I55KAVET.js} +2 -2
- package/dist/{chunk-UY7VPC6Q.js → chunk-IA2YSHTX.js} +15 -15
- package/dist/{chunk-UEEN7GXR.js → chunk-IY2FVXM6.js} +3 -3
- package/dist/{chunk-NVOFMARR.js → chunk-JDDXXZWW.js} +2 -2
- package/dist/{chunk-2AMEUKCG.js → chunk-JEIXTYVG.js} +2 -2
- package/dist/{chunk-ODW5GDFE.js → chunk-JT3EB7ZL.js} +2 -2
- package/dist/{chunk-XR67IAXP.js → chunk-KLMESRPV.js} +5 -5
- package/dist/{chunk-7LCGFUMB.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/{chunk-3K7V3HE6.js → chunk-KXRX7YC2.js} +2 -2
- package/dist/{chunk-7RZJWZ46.js → chunk-LEPOP46W.js} +5 -5
- package/dist/{chunk-54WHLA65.js → chunk-LRICZIGN.js} +3 -3
- package/dist/{chunk-EWCNCQOU.js → chunk-LWA7MDVO.js} +2 -2
- package/dist/{chunk-EZKSOM5K.js → chunk-MFJBANPX.js} +2 -2
- package/dist/{chunk-OB3XMWX5.js → chunk-MKWKYHXJ.js} +4 -4
- package/dist/{chunk-HMKPFW7R.js → chunk-MPAJFFP3.js} +2 -2
- package/dist/{chunk-4P43SE4H.js → chunk-MPYD657E.js} +2 -2
- package/dist/{chunk-NLDVVWCL.js → chunk-NDNTNE3S.js} +2 -2
- package/dist/{chunk-5ISVONB7.js → chunk-NWWXSJX5.js} +2 -2
- package/dist/{chunk-QBC33MPY.js → chunk-NZXEK3UF.js} +2 -2
- package/dist/{chunk-MYB6DWE5.js → chunk-OGELWNYC.js} +6 -6
- package/dist/{chunk-IES4QHLM.js → chunk-OXNU333D.js} +5 -5
- package/dist/{chunk-JUC24CTX.js → chunk-P2QRMMVQ.js} +6 -1
- package/dist/chunk-P2QRMMVQ.js.map +1 -0
- package/dist/{chunk-MSSJSC2V.js → chunk-PEOTOFH5.js} +2 -2
- package/dist/{chunk-OYHGTHVX.js → chunk-PHNAB54Q.js} +2 -2
- package/dist/{chunk-R5T5FB2R.js → chunk-PLBW64UM.js} +62 -62
- package/dist/{chunk-BD7JTBYP.js → chunk-PSPABFN2.js} +4 -4
- package/dist/{chunk-WOOTZ6DH.js → chunk-PV36INNL.js} +3 -3
- package/dist/{chunk-QW3FMKT2.js → chunk-QDY6KYTN.js} +3 -3
- package/dist/{chunk-6TZWGQTT.js → chunk-RAVRDTP7.js} +5 -5
- package/dist/{chunk-BIVJCVT2.js → chunk-RBGREYVJ.js} +2 -2
- package/dist/{chunk-GGRD3JEH.js → chunk-ROGRI25A.js} +2 -2
- package/dist/{chunk-HTPQJ32S.js → chunk-ROKKIMON.js} +2 -2
- package/dist/{chunk-5KND6CSX.js → chunk-RSVEP77Y.js} +2 -2
- package/dist/{chunk-SV4Z2S67.js → chunk-S5G2LAL7.js} +4 -4
- package/dist/{chunk-5PTRLTK2.js → chunk-S65WXHNK.js} +2 -2
- package/dist/{chunk-XPFC6D45.js → chunk-S7DPKM5W.js} +41 -31
- package/dist/chunk-S7DPKM5W.js.map +1 -0
- package/dist/{chunk-3FEH4C4V.js → chunk-SB6PSOP7.js} +1 -1
- package/dist/{chunk-S2DU3UBN.js → chunk-SH2ZWEWB.js} +6 -6
- package/dist/{chunk-Z5XE7AMC.js → chunk-SMOFBBPU.js} +2 -2
- package/dist/{chunk-GRCREL6Q.js → chunk-SQJ3SDIW.js} +11 -11
- package/dist/{chunk-YFDJVB2K.js → chunk-T7CJQVRZ.js} +2 -2
- package/dist/{chunk-EIJR4PZL.js → chunk-TEYN7ZYF.js} +5 -5
- package/dist/{chunk-JALOAKSZ.js → chunk-TLPZ6MKZ.js} +4 -4
- package/dist/{chunk-BHHONFSK.js → chunk-U34EHBPL.js} +2 -2
- package/dist/{chunk-DFEODULB.js → chunk-V2HHAAPI.js} +2 -2
- package/dist/{chunk-KEF46KL2.js → chunk-V6EGNVUT.js} +3 -3
- package/dist/{chunk-ESNFSSO4.js → chunk-VGXM5B4H.js} +2 -2
- package/dist/{chunk-MJUCDM3C.js → chunk-VLXBE57O.js} +2 -2
- package/dist/{chunk-YGTSOVCR.js → chunk-VP67GZ7T.js} +2 -2
- package/dist/{chunk-ALBYEXFX.js → chunk-VZWXFXLX.js} +2 -2
- package/dist/{chunk-NC7RM2XS.js → chunk-W64HKJJM.js} +3 -3
- package/dist/{chunk-OMLGLMWL.js → chunk-WHBVXTUI.js} +9 -9
- package/dist/{chunk-4KMGFWQY.js → chunk-WJBZMNNS.js} +8 -8
- package/dist/{chunk-WFZBRS6N.js → chunk-X74UAWSI.js} +2 -2
- package/dist/{chunk-EGALNSZ4.js → chunk-XU6OEECT.js} +3 -3
- package/dist/{chunk-4FIH6MPS.js → chunk-YHLWPYHT.js} +3 -3
- package/dist/{chunk-PAZY2ZKP.js → chunk-YQAXP5AC.js} +2 -2
- package/dist/{chunk-ZNR5SVUI.js → chunk-YUMDFDUA.js} +3 -3
- package/dist/{chunk-7HYPN2GC.js → chunk-ZG74PWRW.js} +2 -2
- package/dist/{chunk-TDYAIXHK.js → chunk-ZHXSOMYH.js} +4 -4
- package/dist/{chunk-TNSCIPBQ.js → chunk-ZNJSBIP4.js} +4 -4
- package/dist/{cli-BqMNkQn5.d.ts → cli-DD0P-lu8.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +101 -101
- package/dist/coding/export-okf-codegraph.js +21 -21
- package/dist/compounding/engine.js +20 -20
- package/dist/config-discovery.d.ts +26 -0
- package/dist/config-discovery.js +11 -0
- package/dist/config-security.js +2 -2
- package/dist/config.js +11 -11
- package/dist/connectors/codex-materialize-runner.js +20 -20
- package/dist/connectors/codex-materialize.js +3 -3
- package/dist/connectors/index.js +23 -23
- package/dist/convergence-refresh.js +21 -21
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +21 -21
- package/dist/deep-recall-http-glue.d.ts +1 -1
- package/dist/deep-recall-http-glue.js +4 -4
- package/dist/deep-recall-mcp-tools.d.ts +1 -1
- package/dist/deep-recall-policy-llm.js +5 -5
- package/dist/deep-recall.js +2 -2
- package/dist/embedding-fallback.js +2 -2
- package/dist/emit-legacy-tools.js +3 -3
- package/dist/entity-retrieval.js +19 -19
- package/dist/external-wiki-access.d.ts +1 -1
- package/dist/external-wiki-access.js +59 -59
- package/dist/external-wiki-config.js +3 -3
- package/dist/external-wiki-mcp-tools.d.ts +1 -1
- package/dist/extraction-faithfulness.js +5 -5
- package/dist/extraction-judge.js +5 -5
- package/dist/extraction-source-grounding.js +3 -3
- package/dist/extraction.js +34 -34
- package/dist/fallback-llm.js +4 -4
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/index.d.ts +680 -678
- package/dist/index.js +151 -142
- package/dist/live-connectors-runner.js +5 -5
- package/dist/local-llm.js +3 -3
- package/dist/location/index.js +24 -24
- package/dist/maintenance/memory-governance.js +19 -19
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +19 -19
- package/dist/maintenance/rebuild-memory-projection.js +20 -20
- package/dist/mcp-memory-inspector-app.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +1 -1
- package/dist/memory-subject.d.ts +1 -1
- package/dist/migrate/from-engram.js +2 -2
- package/dist/namespaces/migrate.js +20 -20
- package/dist/namespaces/search.js +11 -11
- package/dist/namespaces/storage.js +19 -19
- package/dist/offline-sync-impression-drain.js +6 -6
- package/dist/operator-doctor-corpus.js +22 -22
- package/dist/operator-toolkit.js +38 -38
- package/dist/opik-exporter.js +1 -1
- package/dist/orchestration/maintenance.js +33 -33
- package/dist/orchestrator.js +133 -132
- package/dist/provenance.js +2 -2
- package/dist/{public-http-ByX2eTla.d.ts → public-http-C4i8Opxc.d.ts} +1 -1
- package/dist/qmd.js +2 -2
- package/dist/recall-planner-llm.js +4 -4
- package/dist/reconcile/manifest.js +1 -1
- package/dist/resolve-provider-secret.js +2 -2
- package/dist/resume-bundles.js +12 -12
- package/dist/runtime/env.d.ts +9 -1
- package/dist/runtime/env.js +3 -1
- package/dist/schemas.d.ts +152 -152
- package/dist/sdk-compat.js +1 -1
- package/dist/search/factory.js +10 -10
- package/dist/search/index.js +15 -15
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/orama-backend.js +2 -2
- package/dist/semantic-consolidation.js +21 -21
- package/dist/semantic-rule-promotion.js +19 -19
- package/dist/semantic-rule-verifier.js +19 -19
- package/dist/shared-context/manager.d.ts +6 -6
- package/dist/shared-context/manager.js +3 -3
- package/dist/source-agent-qualifier.js +31 -31
- package/dist/standup/build.js +20 -20
- package/dist/{state-store-Z3EN56O5.js → state-store-I5HLZTZT.js} +4 -4
- package/dist/state-store-I5HLZTZT.js.map +1 -0
- package/dist/storage.js +18 -18
- package/dist/summarizer.js +7 -7
- package/dist/support-passport/index.d.ts +4 -4
- package/dist/support-passport/index.js +61 -61
- package/dist/tokens.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 +20 -20
- package/dist/transfer/types.d.ts +78 -78
- package/dist/utils/path.js +2 -2
- package/dist/verified-recall.js +19 -19
- package/dist/who-knows-cli.d.ts +1 -1
- package/dist/who-knows-cli.js +20 -20
- package/dist/who-knows.d.ts +1 -1
- package/dist/who-knows.js +19 -19
- package/package.json +2 -2
- package/src/activity/digest.test.ts +107 -1
- package/src/activity/digest.ts +76 -51
- package/src/config-discovery.test.ts +63 -0
- package/src/config-discovery.ts +90 -0
- package/src/index.ts +2 -0
- package/src/reconcile/manifest.ts +59 -50
- package/src/runtime/env.ts +11 -0
- package/dist/chunk-JUC24CTX.js.map +0 -1
- package/dist/chunk-TWF35IC6.js.map +0 -1
- package/dist/chunk-XPFC6D45.js.map +0 -1
- package/dist/{access-service-GrdVg_-Z.d.ts → access-service-DWdY9Mlk.d.ts} +58 -58
- /package/dist/{auto-sync-WNGG2GC2.js.map → auto-sync-NSHLUAQI.js.map} +0 -0
- /package/dist/{chunk-OO42R444.js.map → chunk-2MFH376S.js.map} +0 -0
- /package/dist/{chunk-NXH34IPL.js.map → chunk-353KGBKY.js.map} +0 -0
- /package/dist/{chunk-DZD3WGCD.js.map → chunk-3JVLGJCY.js.map} +0 -0
- /package/dist/{chunk-NOPN47AL.js.map → chunk-47DEYNMR.js.map} +0 -0
- /package/dist/{chunk-2OO6TPQG.js.map → chunk-4UDQUPT5.js.map} +0 -0
- /package/dist/{chunk-IE57QQSZ.js.map → chunk-565C6ZFO.js.map} +0 -0
- /package/dist/{chunk-C6XEXTSJ.js.map → chunk-5ABN4WVL.js.map} +0 -0
- /package/dist/{chunk-W7OU4I3Y.js.map → chunk-666OOKB7.js.map} +0 -0
- /package/dist/{chunk-EYIEWJNI.js.map → chunk-6KH5NLQS.js.map} +0 -0
- /package/dist/{chunk-R55WAWS3.js.map → chunk-7DUFJAOE.js.map} +0 -0
- /package/dist/{chunk-EMDLM3LW.js.map → chunk-7IRZK6MM.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
- /package/dist/{chunk-RFWEDCRC.js.map → chunk-7VJXIDOC.js.map} +0 -0
- /package/dist/{chunk-IVKIODHO.js.map → chunk-A7XEPMQ6.js.map} +0 -0
- /package/dist/{chunk-K6MV3TRQ.js.map → chunk-ADXCCZL2.js.map} +0 -0
- /package/dist/{chunk-GC65K6DI.js.map → chunk-AOCP6JA7.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-AU7Q3LSC.js.map} +0 -0
- /package/dist/{chunk-ND6IQGSZ.js.map → chunk-BA6WOZOT.js.map} +0 -0
- /package/dist/{chunk-JI7U6AS3.js.map → chunk-C6FQJ52H.js.map} +0 -0
- /package/dist/{chunk-IN673LEP.js.map → chunk-CARRTDKC.js.map} +0 -0
- /package/dist/{chunk-HLTAZTN7.js.map → chunk-CBCNKKZD.js.map} +0 -0
- /package/dist/{chunk-DXFG2VGN.js.map → chunk-CGC5UQCF.js.map} +0 -0
- /package/dist/{chunk-YSSAGB2O.js.map → chunk-CLLPJ6QT.js.map} +0 -0
- /package/dist/{chunk-U6S754L6.js.map → chunk-D5LORF7A.js.map} +0 -0
- /package/dist/{chunk-C24UZSFW.js.map → chunk-DBQWVT2H.js.map} +0 -0
- /package/dist/{chunk-XSTNGNJP.js.map → chunk-DCJ3YFIC.js.map} +0 -0
- /package/dist/{chunk-2YDWI2LO.js.map → chunk-DITMGZOL.js.map} +0 -0
- /package/dist/{chunk-LVE64P5Y.js.map → chunk-E2ZHGBAK.js.map} +0 -0
- /package/dist/{chunk-WW3MR6T3.js.map → chunk-ENMTJRXA.js.map} +0 -0
- /package/dist/{chunk-COUYFFID.js.map → chunk-EYMOJ3J6.js.map} +0 -0
- /package/dist/{chunk-INBOGQ3E.js.map → chunk-EZZV7OQL.js.map} +0 -0
- /package/dist/{chunk-MT47LH5L.js.map → chunk-FBMYGNOC.js.map} +0 -0
- /package/dist/{chunk-N3SS45OW.js.map → chunk-FCSZ4K2X.js.map} +0 -0
- /package/dist/{chunk-PKS56ZRR.js.map → chunk-FGGYSN4P.js.map} +0 -0
- /package/dist/{chunk-ZMNT26KV.js.map → chunk-FHQSPTPZ.js.map} +0 -0
- /package/dist/{chunk-6GUG4YNM.js.map → chunk-GGRRF4PZ.js.map} +0 -0
- /package/dist/{chunk-YIHKAUS4.js.map → chunk-GTWHVXPA.js.map} +0 -0
- /package/dist/{chunk-UY2RORVF.js.map → chunk-GVG3JYBI.js.map} +0 -0
- /package/dist/{chunk-I3OQBP23.js.map → chunk-GY5WZBA6.js.map} +0 -0
- /package/dist/{chunk-3GCK6ONU.js.map → chunk-HK32G473.js.map} +0 -0
- /package/dist/{chunk-OVAJKCN3.js.map → chunk-HY55QQD7.js.map} +0 -0
- /package/dist/{chunk-YJETZFLJ.js.map → chunk-I27RSQRR.js.map} +0 -0
- /package/dist/{chunk-QIEUU4UK.js.map → chunk-I55KAVET.js.map} +0 -0
- /package/dist/{chunk-UY7VPC6Q.js.map → chunk-IA2YSHTX.js.map} +0 -0
- /package/dist/{chunk-UEEN7GXR.js.map → chunk-IY2FVXM6.js.map} +0 -0
- /package/dist/{chunk-NVOFMARR.js.map → chunk-JDDXXZWW.js.map} +0 -0
- /package/dist/{chunk-2AMEUKCG.js.map → chunk-JEIXTYVG.js.map} +0 -0
- /package/dist/{chunk-ODW5GDFE.js.map → chunk-JT3EB7ZL.js.map} +0 -0
- /package/dist/{chunk-XR67IAXP.js.map → chunk-KLMESRPV.js.map} +0 -0
- /package/dist/{chunk-7LCGFUMB.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-3K7V3HE6.js.map → chunk-KXRX7YC2.js.map} +0 -0
- /package/dist/{chunk-7RZJWZ46.js.map → chunk-LEPOP46W.js.map} +0 -0
- /package/dist/{chunk-54WHLA65.js.map → chunk-LRICZIGN.js.map} +0 -0
- /package/dist/{chunk-EWCNCQOU.js.map → chunk-LWA7MDVO.js.map} +0 -0
- /package/dist/{chunk-EZKSOM5K.js.map → chunk-MFJBANPX.js.map} +0 -0
- /package/dist/{chunk-OB3XMWX5.js.map → chunk-MKWKYHXJ.js.map} +0 -0
- /package/dist/{chunk-HMKPFW7R.js.map → chunk-MPAJFFP3.js.map} +0 -0
- /package/dist/{chunk-4P43SE4H.js.map → chunk-MPYD657E.js.map} +0 -0
- /package/dist/{chunk-NLDVVWCL.js.map → chunk-NDNTNE3S.js.map} +0 -0
- /package/dist/{chunk-5ISVONB7.js.map → chunk-NWWXSJX5.js.map} +0 -0
- /package/dist/{chunk-QBC33MPY.js.map → chunk-NZXEK3UF.js.map} +0 -0
- /package/dist/{chunk-MYB6DWE5.js.map → chunk-OGELWNYC.js.map} +0 -0
- /package/dist/{chunk-IES4QHLM.js.map → chunk-OXNU333D.js.map} +0 -0
- /package/dist/{chunk-MSSJSC2V.js.map → chunk-PEOTOFH5.js.map} +0 -0
- /package/dist/{chunk-OYHGTHVX.js.map → chunk-PHNAB54Q.js.map} +0 -0
- /package/dist/{chunk-R5T5FB2R.js.map → chunk-PLBW64UM.js.map} +0 -0
- /package/dist/{chunk-BD7JTBYP.js.map → chunk-PSPABFN2.js.map} +0 -0
- /package/dist/{chunk-WOOTZ6DH.js.map → chunk-PV36INNL.js.map} +0 -0
- /package/dist/{chunk-QW3FMKT2.js.map → chunk-QDY6KYTN.js.map} +0 -0
- /package/dist/{chunk-6TZWGQTT.js.map → chunk-RAVRDTP7.js.map} +0 -0
- /package/dist/{chunk-BIVJCVT2.js.map → chunk-RBGREYVJ.js.map} +0 -0
- /package/dist/{chunk-GGRD3JEH.js.map → chunk-ROGRI25A.js.map} +0 -0
- /package/dist/{chunk-HTPQJ32S.js.map → chunk-ROKKIMON.js.map} +0 -0
- /package/dist/{chunk-5KND6CSX.js.map → chunk-RSVEP77Y.js.map} +0 -0
- /package/dist/{chunk-SV4Z2S67.js.map → chunk-S5G2LAL7.js.map} +0 -0
- /package/dist/{chunk-5PTRLTK2.js.map → chunk-S65WXHNK.js.map} +0 -0
- /package/dist/{chunk-3FEH4C4V.js.map → chunk-SB6PSOP7.js.map} +0 -0
- /package/dist/{chunk-S2DU3UBN.js.map → chunk-SH2ZWEWB.js.map} +0 -0
- /package/dist/{chunk-Z5XE7AMC.js.map → chunk-SMOFBBPU.js.map} +0 -0
- /package/dist/{chunk-GRCREL6Q.js.map → chunk-SQJ3SDIW.js.map} +0 -0
- /package/dist/{chunk-YFDJVB2K.js.map → chunk-T7CJQVRZ.js.map} +0 -0
- /package/dist/{chunk-EIJR4PZL.js.map → chunk-TEYN7ZYF.js.map} +0 -0
- /package/dist/{chunk-JALOAKSZ.js.map → chunk-TLPZ6MKZ.js.map} +0 -0
- /package/dist/{chunk-BHHONFSK.js.map → chunk-U34EHBPL.js.map} +0 -0
- /package/dist/{chunk-DFEODULB.js.map → chunk-V2HHAAPI.js.map} +0 -0
- /package/dist/{chunk-KEF46KL2.js.map → chunk-V6EGNVUT.js.map} +0 -0
- /package/dist/{chunk-ESNFSSO4.js.map → chunk-VGXM5B4H.js.map} +0 -0
- /package/dist/{chunk-MJUCDM3C.js.map → chunk-VLXBE57O.js.map} +0 -0
- /package/dist/{chunk-YGTSOVCR.js.map → chunk-VP67GZ7T.js.map} +0 -0
- /package/dist/{chunk-ALBYEXFX.js.map → chunk-VZWXFXLX.js.map} +0 -0
- /package/dist/{chunk-NC7RM2XS.js.map → chunk-W64HKJJM.js.map} +0 -0
- /package/dist/{chunk-OMLGLMWL.js.map → chunk-WHBVXTUI.js.map} +0 -0
- /package/dist/{chunk-4KMGFWQY.js.map → chunk-WJBZMNNS.js.map} +0 -0
- /package/dist/{chunk-WFZBRS6N.js.map → chunk-X74UAWSI.js.map} +0 -0
- /package/dist/{chunk-EGALNSZ4.js.map → chunk-XU6OEECT.js.map} +0 -0
- /package/dist/{chunk-4FIH6MPS.js.map → chunk-YHLWPYHT.js.map} +0 -0
- /package/dist/{chunk-PAZY2ZKP.js.map → chunk-YQAXP5AC.js.map} +0 -0
- /package/dist/{chunk-ZNR5SVUI.js.map → chunk-YUMDFDUA.js.map} +0 -0
- /package/dist/{chunk-7HYPN2GC.js.map → chunk-ZG74PWRW.js.map} +0 -0
- /package/dist/{chunk-TDYAIXHK.js.map → chunk-ZHXSOMYH.js.map} +0 -0
- /package/dist/{chunk-TNSCIPBQ.js.map → chunk-ZNJSBIP4.js.map} +0 -0
- /package/dist/{state-store-Z3EN56O5.js.map → config-discovery.js.map} +0 -0
package/dist/who-knows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bA as WHO_KNOWS_AUTHORSHIP_BONUS, bB as WHO_KNOWS_DEFAULT_LIMIT, bC as WHO_KNOWS_MAX_EVIDENCE, bD as WHO_KNOWS_MAX_LIMIT, bE as WHO_KNOWS_MCP_TOOLS, bF as WhoKnowsEntity, bG as WhoKnowsEvidence, bH as WhoKnowsHit, bI as WhoKnowsHttpOutcome, W as WhoKnowsResult, bJ as WhoKnowsStorage, bT as computeWhoKnows, bZ as handleWhoKnowsHttpQuery, c2 as loadWhoKnowsEntities, c9 as tokenizeTopic, ca as validateWhoKnowsInput } from './access-service-
|
|
1
|
+
export { bA as WHO_KNOWS_AUTHORSHIP_BONUS, bB as WHO_KNOWS_DEFAULT_LIMIT, bC as WHO_KNOWS_MAX_EVIDENCE, bD as WHO_KNOWS_MAX_LIMIT, bE as WHO_KNOWS_MCP_TOOLS, bF as WhoKnowsEntity, bG as WhoKnowsEvidence, bH as WhoKnowsHit, bI as WhoKnowsHttpOutcome, W as WhoKnowsResult, bJ as WhoKnowsStorage, bT as computeWhoKnows, bZ as handleWhoKnowsHttpQuery, c2 as loadWhoKnowsEntities, c9 as tokenizeTopic, ca as validateWhoKnowsInput } from './access-service-DWdY9Mlk.js';
|
|
2
2
|
import './types-YY-eKKU7.js';
|
|
3
3
|
import './orchestrator-DgyvFfPR.js';
|
|
4
4
|
import './recall-state.js';
|
package/dist/who-knows.js
CHANGED
|
@@ -9,25 +9,25 @@ import {
|
|
|
9
9
|
loadWhoKnowsEntities,
|
|
10
10
|
tokenizeTopic,
|
|
11
11
|
validateWhoKnowsInput
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EZZV7OQL.js";
|
|
13
|
+
import "./chunk-GVG3JYBI.js";
|
|
14
14
|
import "./chunk-UHVXE24Y.js";
|
|
15
15
|
import "./chunk-46WM6JX2.js";
|
|
16
16
|
import "./chunk-D5F7TKMH.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-BD7JTBYP.js";
|
|
20
|
-
import "./chunk-OB3XMWX5.js";
|
|
21
|
-
import "./chunk-CYEPCZN5.js";
|
|
22
|
-
import "./chunk-TNSCIPBQ.js";
|
|
17
|
+
import "./chunk-FHQSPTPZ.js";
|
|
18
|
+
import "./chunk-7VJXIDOC.js";
|
|
23
19
|
import "./chunk-YQNNHLCG.js";
|
|
24
|
-
import "./chunk-4O6WRBGE.js";
|
|
25
20
|
import "./chunk-6KTXE6A3.js";
|
|
21
|
+
import "./chunk-PSPABFN2.js";
|
|
22
|
+
import "./chunk-MKWKYHXJ.js";
|
|
23
|
+
import "./chunk-CYEPCZN5.js";
|
|
24
|
+
import "./chunk-ZNJSBIP4.js";
|
|
26
25
|
import "./chunk-GUMZC2BO.js";
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-4O6WRBGE.js";
|
|
27
|
+
import "./chunk-LEPOP46W.js";
|
|
28
|
+
import "./chunk-72A4L5JJ.js";
|
|
28
29
|
import "./chunk-A7Q43EUZ.js";
|
|
29
30
|
import "./chunk-ET356KSB.js";
|
|
30
|
-
import "./chunk-72A4L5JJ.js";
|
|
31
31
|
import "./chunk-S2V7RUCL.js";
|
|
32
32
|
import "./chunk-SO7SV523.js";
|
|
33
33
|
import "./chunk-SCU65EZI.js";
|
|
@@ -35,11 +35,11 @@ import "./chunk-MRPOZBJC.js";
|
|
|
35
35
|
import "./chunk-S2HLHAZ4.js";
|
|
36
36
|
import "./chunk-DM2T26WE.js";
|
|
37
37
|
import "./chunk-LDXUBPMO.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-DCJ3YFIC.js";
|
|
39
39
|
import "./chunk-AAD2ZS6P.js";
|
|
40
40
|
import "./chunk-H272ZPQ3.js";
|
|
41
|
-
import "./chunk-YXZG5TVN.js";
|
|
42
41
|
import "./chunk-3ONXXHQO.js";
|
|
42
|
+
import "./chunk-YXZG5TVN.js";
|
|
43
43
|
import "./chunk-5GINB5LC.js";
|
|
44
44
|
import "./chunk-3WU7XOFN.js";
|
|
45
45
|
import "./chunk-G7D6GZ5J.js";
|
|
@@ -49,7 +49,7 @@ import "./chunk-RBOJCG4T.js";
|
|
|
49
49
|
import "./chunk-R7QY5ZVB.js";
|
|
50
50
|
import "./chunk-5WITETWU.js";
|
|
51
51
|
import "./chunk-6CIAGZ6X.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-DBQWVT2H.js";
|
|
53
53
|
import "./chunk-JXN77SGO.js";
|
|
54
54
|
import "./chunk-ZLQ37WJX.js";
|
|
55
55
|
import "./chunk-IUM3VSHI.js";
|
|
@@ -57,13 +57,13 @@ import "./chunk-3QQTXYZ6.js";
|
|
|
57
57
|
import "./chunk-BT7NVCML.js";
|
|
58
58
|
import "./chunk-C64XATK7.js";
|
|
59
59
|
import "./chunk-42JKGUFJ.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-TLPZ6MKZ.js";
|
|
61
|
+
import "./chunk-I55KAVET.js";
|
|
62
62
|
import "./chunk-L2EXJQJP.js";
|
|
63
63
|
import "./chunk-45GF7Y3V.js";
|
|
64
64
|
import "./chunk-RGMVMVMF.js";
|
|
65
65
|
import "./chunk-N7RWREIQ.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-353KGBKY.js";
|
|
67
67
|
import "./chunk-ZIKENA2C.js";
|
|
68
68
|
import "./chunk-VYCOJKSX.js";
|
|
69
69
|
import "./chunk-6Q3ZTEF6.js";
|
|
@@ -94,8 +94,8 @@ import "./chunk-P7FMDTKL.js";
|
|
|
94
94
|
import "./chunk-VUFL7X3H.js";
|
|
95
95
|
import "./chunk-JUOZ62Y7.js";
|
|
96
96
|
import "./chunk-O75CRYGF.js";
|
|
97
|
-
import "./chunk-
|
|
98
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-6KH5NLQS.js";
|
|
98
|
+
import "./chunk-P2QRMMVQ.js";
|
|
99
99
|
import "./chunk-2Z24E5W2.js";
|
|
100
100
|
import "./chunk-BTTPKDIL.js";
|
|
101
101
|
import "./chunk-FF4KLI5W.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.69.
|
|
3
|
+
"version": "9.69.30",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3247,7 +3247,7 @@
|
|
|
3247
3247
|
"core"
|
|
3248
3248
|
],
|
|
3249
3249
|
"peerDependencies": {
|
|
3250
|
-
"@remnic/coding-graph": "^9.69.
|
|
3250
|
+
"@remnic/coding-graph": "^9.69.30"
|
|
3251
3251
|
},
|
|
3252
3252
|
"peerDependenciesMeta": {
|
|
3253
3253
|
"@remnic/coding-graph": {
|
|
@@ -106,7 +106,12 @@ test("isValidActivityDate rejects impossible and malformed calendar days", () =>
|
|
|
106
106
|
assert.equal(isValidActivityDate("2026-00-10"), false);
|
|
107
107
|
assert.equal(isValidActivityDate("not-a-date"), false);
|
|
108
108
|
assert.equal(isValidActivityDate("2026-3-10"), false); // wrong shape
|
|
109
|
-
|
|
109
|
+
// Astronomical year zero: Intl formats it as 1 BC, so day windows would
|
|
110
|
+
// pad it to 0001 and land on the wrong boundary. Validation rejects it.
|
|
111
|
+
assert.equal(isValidActivityDate("0000-01-01"), false);
|
|
112
|
+
assert.equal(isValidActivityDate("0001-01-01"), true); // first supported year
|
|
113
|
+
assert.equal(isValidActivityDate("0999-01-01"), true); // unpadded Intl year, still correct
|
|
114
|
+
});
|
|
110
115
|
|
|
111
116
|
test("activityDigestPath rejects path-traversal / invalid dates", () => {
|
|
112
117
|
assert.equal(activityDigestPath("/mem", "2026-03-10"), "/mem/activity/2026-03-10.md");
|
|
@@ -117,6 +122,13 @@ test("activityDigestPath rejects path-traversal / invalid dates", () => {
|
|
|
117
122
|
test("activityDayWindow rejects an impossible date", () => {
|
|
118
123
|
assert.throws(() => activityDayWindow("2026-02-30", "UTC"), RangeError);
|
|
119
124
|
assert.throws(() => activityDayWindow("../evil", "UTC"), RangeError);
|
|
125
|
+
assert.throws(() => activityDayWindow("0000-01-01", "UTC"), RangeError);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("activityDayWindow keeps year 0001 boundaries correct", () => {
|
|
129
|
+
const w = activityDayWindow("0001-01-01", "UTC");
|
|
130
|
+
assert.equal(w.startUtc, "0001-01-01T00:00:00.000Z");
|
|
131
|
+
assert.equal(w.endUtc, "0001-01-02T00:00:00.000Z");
|
|
120
132
|
});
|
|
121
133
|
|
|
122
134
|
test("parseActivityDigest rejects a non-numeric snapshotCount/formatVersion", () => {
|
|
@@ -196,6 +208,100 @@ test("activityDayWindow gives an entirely skipped civil date no interval", () =>
|
|
|
196
208
|
assert.notDeepEqual(w, dec31);
|
|
197
209
|
});
|
|
198
210
|
|
|
211
|
+
// Read the local wall clock and offset directly through Intl so these
|
|
212
|
+
// historical-LMT tests derive every expectation from the runtime's own tzdata
|
|
213
|
+
// instead of hard-coding one tzdata release's seconds: ICU bundles differ
|
|
214
|
+
// (Asia/Manila's 1844 LMT is −15:56:08 on recent tzdata, −15:56:00 on older
|
|
215
|
+
// ones), and a hard-coded instant fails the bundle that lacks it.
|
|
216
|
+
function localStampAt(ms: number, timezone: string): string {
|
|
217
|
+
const parts = new Intl.DateTimeFormat("en-CA", {
|
|
218
|
+
timeZone: timezone,
|
|
219
|
+
year: "numeric",
|
|
220
|
+
month: "2-digit",
|
|
221
|
+
day: "2-digit",
|
|
222
|
+
hour: "2-digit",
|
|
223
|
+
minute: "2-digit",
|
|
224
|
+
second: "2-digit",
|
|
225
|
+
hourCycle: "h23",
|
|
226
|
+
}).formatToParts(new Date(ms));
|
|
227
|
+
const get = (type: string): string => parts.find((part) => part.type === type)?.value ?? "";
|
|
228
|
+
return `${get("year").padStart(4, "0")}-${get("month")}-${get("day")}T${get("hour")}:${get("minute")}:${get("second")}`;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function offsetMsAt(ms: number, timezone: string): number {
|
|
232
|
+
return Date.parse(`${localStampAt(ms, timezone)}Z`) - ms;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
test("activityDayWindow resolves second-granularity transitions exactly (Asia/Manila 1844)", () => {
|
|
236
|
+
// Manila's 1844 date-line change carried seconds where tzdata records them
|
|
237
|
+
// (LMT −15:56:08 on recent ICU bundles): the wall clock jumped from
|
|
238
|
+
// 1844-12-31T00:00:00 straight to 1845-01-01, so civil 1844-12-31 never
|
|
239
|
+
// existed and no midnight of it occurred. Offsets with a seconds component
|
|
240
|
+
// must not truncate to whole minutes: pre-fix, the skipped date owned a
|
|
241
|
+
// 60000 ms window starting locally on 1844-12-30.
|
|
242
|
+
const tz = "Asia/Manila";
|
|
243
|
+
const lmt = offsetMsAt(Date.parse("1844-12-15T12:00:00Z"), tz); // LMT in force mid-December
|
|
244
|
+
const after = offsetMsAt(Date.parse("1845-06-01T12:00:00Z"), tz); // post-change LMT in force mid-1845
|
|
245
|
+
const iso = (ms: number): string => new Date(ms).toISOString();
|
|
246
|
+
const skip = activityDayWindow("1844-12-31", tz);
|
|
247
|
+
assert.equal(skip.endUtc, skip.startUtc); // zero-width: the day never existed, syncs nothing
|
|
248
|
+
assert.equal(skip.startUtc, iso(Date.parse("1844-12-31T00:00:00Z") - lmt)); // the transition instant this tzdata carries
|
|
249
|
+
const before = activityDayWindow("1844-12-30", tz);
|
|
250
|
+
assert.equal(before.startUtc, iso(Date.parse("1844-12-30T00:00:00Z") - lmt)); // exact local midnight at the seconds-carrying LMT
|
|
251
|
+
assert.equal(Date.parse(before.endUtc) - Date.parse(before.startUtc), 24 * 3_600_000); // one LMT offset the whole day
|
|
252
|
+
assert.equal(before.endUtc, skip.startUtc); // contiguous into the skip
|
|
253
|
+
const next = activityDayWindow("1845-01-01", tz);
|
|
254
|
+
assert.equal(next.startUtc, skip.startUtc); // no interval shared with the skip
|
|
255
|
+
assert.equal(next.endUtc, iso(Date.parse("1845-01-02T00:00:00Z") - after));
|
|
256
|
+
// Consistency at the skip instant: the transition is the first instant of
|
|
257
|
+
// 1845-01-01, and the last pre-transition instant still belongs to Dec 30.
|
|
258
|
+
assert.equal(activityDateInTimezone(new Date(skip.startUtc), tz), "1845-01-01");
|
|
259
|
+
assert.equal(activityDateInTimezone(new Date(Date.parse(skip.startUtc) - 1), tz), "1844-12-30");
|
|
260
|
+
assert.equal(activityDateInTimezone(new Date(Date.parse(before.endUtc) - 1), tz), "1844-12-30");
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
test("activityDayWindow keeps the first midnight across a rollback that repeats it", () => {
|
|
264
|
+
// America/Cancun dropped LMT −05:47:04 for −06:00 exactly at local midnight
|
|
265
|
+
// 1922-01-01T00:00:00, rolling the clock back to 1921-12-31T23:47:04: local
|
|
266
|
+
// midnight occurred twice. The day must start at the FIRST one, not at the
|
|
267
|
+
// later repeated midnight under the new whole-minute offset — pre-fix, the
|
|
268
|
+
// minute-truncated LMT candidate failed the exact-stamp check and 12m56s of
|
|
269
|
+
// the day were misattributed to the prior date.
|
|
270
|
+
const tz = "America/Cancun";
|
|
271
|
+
const lmt = offsetMsAt(Date.parse("1921-12-15T12:00:00Z"), tz); // LMT in force mid-December
|
|
272
|
+
const after = offsetMsAt(Date.parse("1922-06-01T12:00:00Z"), tz); // whole-minute offset in force mid-1922
|
|
273
|
+
const iso = (ms: number): string => new Date(ms).toISOString();
|
|
274
|
+
const firstMidnight = Date.parse("1922-01-01T00:00:00Z") - lmt;
|
|
275
|
+
const repeatedMidnight = Date.parse("1922-01-01T00:00:00Z") - after;
|
|
276
|
+
const w = activityDayWindow("1922-01-01", tz);
|
|
277
|
+
// The start is an exact local midnight whichever occurrence this tzdata renders.
|
|
278
|
+
assert.equal(localStampAt(Date.parse(w.startUtc), tz), "1922-01-01T00:00:00");
|
|
279
|
+
// When this tzdata carries the seconds-exact LMT midnight (it exists as a
|
|
280
|
+
// real instant), it is the earlier occurrence and must win.
|
|
281
|
+
if (localStampAt(firstMidnight, tz) === "1922-01-01T00:00:00") {
|
|
282
|
+
assert.equal(w.startUtc, iso(firstMidnight));
|
|
283
|
+
assert.ok(Date.parse(w.startUtc) < repeatedMidnight); // not the later repeated midnight
|
|
284
|
+
}
|
|
285
|
+
assert.equal(w.endUtc, iso(Date.parse("1922-01-02T00:00:00Z") - after));
|
|
286
|
+
// The rolled-back stretch stays inside Jan 1, and Dec 31 keeps its own day,
|
|
287
|
+
// ending at the first instant whose local stamp reaches Jan 1.
|
|
288
|
+
const dec31 = activityDayWindow("1921-12-31", tz);
|
|
289
|
+
assert.equal(dec31.endUtc, w.startUtc);
|
|
290
|
+
assert.equal(Date.parse(dec31.endUtc) - Date.parse(dec31.startUtc), 24 * 3_600_000);
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
test("activityDayWindow pads pre-1000 years before the local-date comparison", () => {
|
|
294
|
+
// Intl.DateTimeFormat formats years before 1000 unpadded: the year 0999
|
|
295
|
+
// comes back as "999". Pre-fix, `localStamp` rejected the valid midnight
|
|
296
|
+
// ("999-01-01T00:00:00" ≠ "0999-01-01T00:00:00") and the fallback's
|
|
297
|
+
// lexicographic comparison treated "998-12-31" as ≥ "0999-01-01", so
|
|
298
|
+
// activityDayWindow("0999-01-01", "UTC") resolved its start to
|
|
299
|
+
// 0998-12-31T00:00:00.000Z — fetching and attributing an extra day.
|
|
300
|
+
const w = activityDayWindow("0999-01-01", "UTC");
|
|
301
|
+
assert.equal(w.startUtc, "0999-01-01T00:00:00.000Z");
|
|
302
|
+
assert.equal(w.endUtc, "0999-01-02T00:00:00.000Z");
|
|
303
|
+
});
|
|
304
|
+
|
|
199
305
|
test("timeline keeps a second machine's span even with the same app/window", () => {
|
|
200
306
|
const a = snap({ machine: "A", capturedAtUtc: "2026-03-10T14:00:00.000Z", app: "Chrome", windowTitle: "Doc", contentHash: "a1", text: "" });
|
|
201
307
|
const b = snap({ machine: "B", capturedAtUtc: "2026-03-10T14:00:30.000Z", app: "Chrome", windowTitle: "Doc", contentHash: "b1", text: "" });
|
package/src/activity/digest.ts
CHANGED
|
@@ -28,6 +28,10 @@ const DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
|
28
28
|
|
|
29
29
|
export function isValidActivityDate(date: string): boolean {
|
|
30
30
|
if (typeof date !== "string" || !DATE_PATTERN.test(date)) return false;
|
|
31
|
+
// Year 0000 passes the round-trip below but Intl formats it as astronomical
|
|
32
|
+
// year 1 BC, so zonedDayStartIso's padded year yields 0001 and day windows
|
|
33
|
+
// land on the wrong boundary. Reject it here, at validation.
|
|
34
|
+
if (date.startsWith("0000-")) return false;
|
|
31
35
|
// Reject impossible calendar days (e.g. 2026-02-30, 2026-13-01): the UTC
|
|
32
36
|
// round-trip must reproduce the same Y-M-D, else Date normalized an overflow.
|
|
33
37
|
const parsed = new Date(`${date}T00:00:00Z`);
|
|
@@ -65,68 +69,89 @@ export function assertValidTimezone(timezone: string): void {
|
|
|
65
69
|
|
|
66
70
|
function zonedDayStartIso(date: string, timezone: string): string {
|
|
67
71
|
// The first UTC instant whose local wall-clock is this date at 00:00. Probe
|
|
68
|
-
// several instants across the day to collect every offset in play
|
|
69
|
-
// offset only if constructing local midnight with it lands
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
72
|
+
// several instants across the day to collect every offset in play, keep an
|
|
73
|
+
// offset only if constructing local midnight with it lands on an exact
|
|
74
|
+
// local midnight, then take the EARLIEST such instant — the FIRST 00:00
|
|
75
|
+
// across a rollback that repeats local midnight (America/Cancun dropped
|
|
76
|
+
// LMT −05:47:04 for −06:00 exactly at local midnight 1922-01-01, so 00:00
|
|
77
|
+
// occurred twice; the day must start at the first one).
|
|
73
78
|
// Probe the previous UTC day too: for zones east of UTC the requested date's
|
|
74
79
|
// UTC instants all fall after local midnight, so the pre-transition offset
|
|
75
80
|
// valid at the real local 00:00 is only observable on the prior UTC day.
|
|
81
|
+
const wall = new Intl.DateTimeFormat("en-CA", {
|
|
82
|
+
timeZone: timezone,
|
|
83
|
+
year: "numeric",
|
|
84
|
+
month: "2-digit",
|
|
85
|
+
day: "2-digit",
|
|
86
|
+
hour: "2-digit",
|
|
87
|
+
minute: "2-digit",
|
|
88
|
+
second: "2-digit",
|
|
89
|
+
hourCycle: "h23",
|
|
90
|
+
});
|
|
91
|
+
const localStamp = (ms: number): string => {
|
|
92
|
+
const parts = wall.formatToParts(new Date(ms));
|
|
93
|
+
const get = (type: string): string => parts.find((part) => part.type === type)?.value ?? "";
|
|
94
|
+
// Intl formats pre-1000 years unpadded ("999" for 0999). Pad back to the
|
|
95
|
+
// four-digit form the equality and ordering comparisons below assume,
|
|
96
|
+
// or "998-12-31" compares greater than "0999-01-01".
|
|
97
|
+
const year = get("year").padStart(4, "0");
|
|
98
|
+
return `${year}-${get("month")}-${get("day")}T${get("hour")}:${get("minute")}:${get("second")}`;
|
|
99
|
+
};
|
|
100
|
+
const localDate = (ms: number): string => localStamp(ms).slice(0, 10);
|
|
101
|
+
// Derive each probe's offset at FULL precision (seconds included) from the
|
|
102
|
+
// rendered wall clock, never from a longOffset string: those strings
|
|
103
|
+
// truncate to whole minutes while historical LMT offsets carry seconds
|
|
104
|
+
// (America/Cancun was −05:47:04; Asia/Manila −15:56:08). A candidate built
|
|
105
|
+
// from a truncated offset lands off the true midnight instant, the
|
|
106
|
+
// exact-stamp check below rejects it, and a midnight repeated by a
|
|
107
|
+
// rollback silently resolves to the later occurrence under the new
|
|
108
|
+
// whole-minute offset — misattributing the gap between the two.
|
|
109
|
+
const offsetMs = (ms: number): number | null => {
|
|
110
|
+
const wallAsUtc = Date.parse(`${localStamp(ms)}Z`);
|
|
111
|
+
return Number.isFinite(wallAsUtc) ? wallAsUtc - ms : null;
|
|
112
|
+
};
|
|
113
|
+
const midnightUtc = Date.parse(`${date}T00:00:00Z`);
|
|
76
114
|
const prevDate = shiftIsoDate(date, -1);
|
|
77
|
-
const probeOffsets = new Set(
|
|
78
|
-
[
|
|
79
|
-
`${prevDate}T12:00:00Z`,
|
|
80
|
-
`${prevDate}T23:00:00Z`,
|
|
81
|
-
`${date}T00:00:00Z`,
|
|
82
|
-
`${date}T12:00:00Z`,
|
|
83
|
-
`${date}T23:00:00Z`,
|
|
84
|
-
].map((iso) => timezoneOffsetIso(new Date(iso), timezone)),
|
|
85
|
-
);
|
|
86
115
|
let best: number | null = null;
|
|
87
|
-
for (const
|
|
88
|
-
|
|
116
|
+
for (const iso of [
|
|
117
|
+
`${prevDate}T12:00:00Z`,
|
|
118
|
+
`${prevDate}T23:00:00Z`,
|
|
119
|
+
`${date}T00:00:00Z`,
|
|
120
|
+
`${date}T12:00:00Z`,
|
|
121
|
+
`${date}T23:00:00Z`,
|
|
122
|
+
]) {
|
|
123
|
+
const offset = offsetMs(Date.parse(iso));
|
|
124
|
+
if (offset === null) continue;
|
|
125
|
+
const candidate = midnightUtc - offset;
|
|
89
126
|
if (!Number.isFinite(candidate)) continue;
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// instant
|
|
93
|
-
|
|
127
|
+
// Accept only an EXACT local midnight. This rejects a wall-clock midnight
|
|
128
|
+
// that never occurred (spring-forward at 00:00, Egypt 2026) and one whose
|
|
129
|
+
// instant the transition already carried past (Asia/Manila's LMT midnight
|
|
130
|
+
// of 1844-12-31 lands on the post-transition clock as 1845-01-01).
|
|
131
|
+
if (localStamp(candidate) !== `${date}T00:00:00`) continue;
|
|
94
132
|
if (best === null || candidate < best) best = candidate;
|
|
95
133
|
}
|
|
96
134
|
if (best === null) {
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
if (best === null) {
|
|
112
|
-
// The ENTIRE civil date was skipped — no local wall-clock time on it
|
|
113
|
-
// exists (Pacific/Apia 2011-12-30 is the canonical case: the date-line
|
|
114
|
-
// jump went 2011-12-29 23:59:59-10:00 → 2011-12-31 00:00:00+14:00).
|
|
115
|
-
// Extending the never-backdate convention above, resolve the day start
|
|
116
|
-
// to the transition instant: the earliest instant whose local calendar
|
|
117
|
-
// date reaches `date`. Local date is monotone non-decreasing in the UTC
|
|
118
|
-
// instant (a fall-back never crosses local midnight backwards), so
|
|
119
|
-
// binary-search a 48h bracket at minute granularity. The bracket is
|
|
120
|
-
// safe: `<date>T00:00Z − 24h` is always locally before `date`, and
|
|
121
|
-
// `<date>T00:00Z + 24h` is always locally on/after it.
|
|
122
|
-
let lo = Date.parse(`${date}T00:00:00Z`) - 24 * 3_600_000;
|
|
135
|
+
// No exact local midnight: either local midnight was skipped by a
|
|
136
|
+
// spring-forward (00:00 → 01:00) or the ENTIRE civil date never existed
|
|
137
|
+
// (Pacific/Apia 2011-12-30; Asia/Manila 1844-12-31). Extending the
|
|
138
|
+
// never-backdate convention, resolve the day start to the first instant
|
|
139
|
+
// whose local calendar date reaches `date`. Local date is monotone
|
|
140
|
+
// non-decreasing in the UTC instant (a fall-back never crosses local
|
|
141
|
+
// midnight backwards), so binary-search a 48h bracket down to the
|
|
142
|
+
// millisecond — transitions can carry seconds (Manila's landed at
|
|
143
|
+
// :56:08, not on a minute boundary), so minute granularity mis-resolves
|
|
144
|
+
// by up to 59s and hands the skipped date a window of its own. The
|
|
145
|
+
// bracket is safe: `<date>T00:00Z − 24h` is always locally before
|
|
146
|
+
// `date`, and `<date>T00:00Z + 24h` is always locally on/after it.
|
|
147
|
+
let lo = midnightUtc - 24 * 3_600_000;
|
|
123
148
|
let hi = lo + 48 * 3_600_000;
|
|
124
|
-
while (
|
|
125
|
-
const mid = lo + Math.floor((hi - lo) / 2
|
|
126
|
-
if (
|
|
127
|
-
else lo = mid;
|
|
149
|
+
while (lo < hi) {
|
|
150
|
+
const mid = lo + Math.floor((hi - lo) / 2);
|
|
151
|
+
if (localDate(mid) >= date) hi = mid;
|
|
152
|
+
else lo = mid + 1;
|
|
128
153
|
}
|
|
129
|
-
best =
|
|
154
|
+
best = lo;
|
|
130
155
|
}
|
|
131
156
|
if (best === null || !Number.isFinite(best)) {
|
|
132
157
|
throw new RangeError(`activity: could not resolve a local day start for "${date}" in "${timezone}".`);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared config discovery (issue #2796).
|
|
3
|
+
*
|
|
4
|
+
* The server and CLI resolve their config through `discoverConfigPath`; the
|
|
5
|
+
* OpenClaw bridge probes `configPathCandidates` directly. These tests pin the
|
|
6
|
+
* identity the P1 fix restored: for every home-reference form, both surfaces
|
|
7
|
+
* must land on the same file.
|
|
8
|
+
*/
|
|
9
|
+
import assert from "node:assert/strict";
|
|
10
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
11
|
+
import os from "node:os";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import test from "node:test";
|
|
14
|
+
|
|
15
|
+
import { configPathCandidates, discoverConfigPath } from "./config-discovery.js";
|
|
16
|
+
|
|
17
|
+
const ORIGINAL_ENV = {
|
|
18
|
+
HOME: process.env.HOME,
|
|
19
|
+
REMNIC_CONFIG_PATH: process.env.REMNIC_CONFIG_PATH,
|
|
20
|
+
ENGRAM_CONFIG_PATH: process.env.ENGRAM_CONFIG_PATH,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function restoreEnv(): void {
|
|
24
|
+
for (const [key, value] of Object.entries(ORIGINAL_ENV)) {
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
delete process.env[key];
|
|
27
|
+
} else {
|
|
28
|
+
process.env[key] = value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
test("env config paths expand every home-reference form on both surfaces", async () => {
|
|
34
|
+
const home = await mkdtemp(path.join(os.tmpdir(), "remnic-discovery-home-"));
|
|
35
|
+
try {
|
|
36
|
+
process.env.HOME = home;
|
|
37
|
+
delete process.env.ENGRAM_CONFIG_PATH;
|
|
38
|
+
const expected = path.join(home, "opt", "remnic.json");
|
|
39
|
+
for (const form of ["$HOME/opt/remnic.json", "${HOME}/opt/remnic.json", "~/opt/remnic.json"]) {
|
|
40
|
+
process.env.REMNIC_CONFIG_PATH = form;
|
|
41
|
+
// The bridge probes candidates[0]; the server/CLI resolver returns the
|
|
42
|
+
// explicit path. Same form in, same file out — a daemon the server can
|
|
43
|
+
// discover is never invisible to the bridge.
|
|
44
|
+
assert.equal(configPathCandidates()[0], expected, `configPathCandidates: ${form}`);
|
|
45
|
+
assert.equal(discoverConfigPath().path, expected, `discoverConfigPath: ${form}`);
|
|
46
|
+
assert.equal(discoverConfigPath().explicit, true, `explicit: ${form}`);
|
|
47
|
+
}
|
|
48
|
+
} finally {
|
|
49
|
+
restoreEnv();
|
|
50
|
+
await rm(home, { recursive: true, force: true });
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
test("no env override leaves auto-discovery candidates only", () => {
|
|
54
|
+
try {
|
|
55
|
+
delete process.env.REMNIC_CONFIG_PATH;
|
|
56
|
+
delete process.env.ENGRAM_CONFIG_PATH;
|
|
57
|
+
const candidates = configPathCandidates();
|
|
58
|
+
assert.equal(candidates[0], path.join(process.cwd(), "remnic.config.json"));
|
|
59
|
+
assert.ok(!candidates[0].includes("$HOME"));
|
|
60
|
+
} finally {
|
|
61
|
+
restoreEnv();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Remnic config-file discovery (issue #2796).
|
|
3
|
+
*
|
|
4
|
+
* One implementation of the candidate order every surface uses: explicit
|
|
5
|
+
* `--config` path, then `REMNIC_CONFIG_PATH`/`ENGRAM_CONFIG_PATH`, then the
|
|
6
|
+
* first existing candidate under cwd, then the home default. The standalone
|
|
7
|
+
* server boots from this order and the CLI resolves `--config`-less commands
|
|
8
|
+
* through it, so the two can never drift onto different files.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import fs from "node:fs";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
|
|
14
|
+
import { readCompatEnv, resolveHomeDir } from "./runtime/env.js";
|
|
15
|
+
|
|
16
|
+
export interface DiscoveredConfigPath {
|
|
17
|
+
path: string;
|
|
18
|
+
explicit: boolean;
|
|
19
|
+
source: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Expand a leading home reference — `~`, `~\`, `$HOME`, or `${HOME}` — to the
|
|
24
|
+
* resolved home directory. Union of the historical server (tilde only) and
|
|
25
|
+
* CLI (tilde plus `$HOME` forms) behaviors; every other path passes through
|
|
26
|
+
* unchanged.
|
|
27
|
+
*/
|
|
28
|
+
function expandHomeReference(p: string): string {
|
|
29
|
+
if (p === "~" || p.startsWith("~/") || p.startsWith("~\\")) {
|
|
30
|
+
return resolveHomeDir() + p.slice(1);
|
|
31
|
+
}
|
|
32
|
+
const home = resolveHomeDir();
|
|
33
|
+
if (p === "$HOME" || p.startsWith("$HOME/") || p.startsWith("$HOME\\")) {
|
|
34
|
+
return home + p.slice(5);
|
|
35
|
+
}
|
|
36
|
+
if (p === "${HOME}" || p.startsWith("${HOME}/") || p.startsWith("${HOME}\\")) {
|
|
37
|
+
return home + p.slice(7);
|
|
38
|
+
}
|
|
39
|
+
return p;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The ordered candidates every probing surface walks: the expanded
|
|
44
|
+
* `REMNIC_CONFIG_PATH`/`ENGRAM_CONFIG_PATH` value (if set), then the cwd
|
|
45
|
+
* files, then the home defaults. The standalone server and the CLI resolve to
|
|
46
|
+
* the single file `discoverConfigPath` picks; the OpenClaw bridge probes each
|
|
47
|
+
* candidate's endpoint. One list, so a daemon the server can discover is never
|
|
48
|
+
* invisible to the bridge.
|
|
49
|
+
*/
|
|
50
|
+
export function configPathCandidates(): string[] {
|
|
51
|
+
const envPath = readCompatEnv("REMNIC_CONFIG_PATH", "ENGRAM_CONFIG_PATH");
|
|
52
|
+
return [
|
|
53
|
+
...(envPath ? [path.resolve(expandHomeReference(envPath))] : []),
|
|
54
|
+
...autoDiscoveryCandidates(),
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function autoDiscoveryCandidates(): string[] {
|
|
59
|
+
const homeDir = resolveHomeDir();
|
|
60
|
+
return [
|
|
61
|
+
path.join(process.cwd(), "remnic.config.json"),
|
|
62
|
+
path.join(process.cwd(), "engram.config.json"),
|
|
63
|
+
path.join(homeDir, ".config", "remnic", "config.json"),
|
|
64
|
+
path.join(homeDir, ".config", "engram", "config.json"),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function discoverConfigPath(cliPath?: string): DiscoveredConfigPath {
|
|
69
|
+
if (cliPath) {
|
|
70
|
+
return { path: path.resolve(expandHomeReference(cliPath)), explicit: true, source: "--config" };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const envPath = readCompatEnv("REMNIC_CONFIG_PATH", "ENGRAM_CONFIG_PATH");
|
|
74
|
+
if (envPath) {
|
|
75
|
+
return {
|
|
76
|
+
path: path.resolve(expandHomeReference(envPath)),
|
|
77
|
+
explicit: true,
|
|
78
|
+
source: "REMNIC_CONFIG_PATH/ENGRAM_CONFIG_PATH",
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const candidates = autoDiscoveryCandidates();
|
|
83
|
+
for (const candidate of candidates) {
|
|
84
|
+
if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) {
|
|
85
|
+
return { path: candidate, explicit: false, source: "auto-discovery" };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return { path: candidates[2], explicit: false, source: "auto-discovery" };
|
|
90
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,8 @@ export { resolvePluginEntry, type PluginEntryResolverOptions } from "./plugin-en
|
|
|
18
18
|
|
|
19
19
|
export { parseConfig, isOpenaiApiKeyDisabled, resolveEnvVars } from "./config.js";
|
|
20
20
|
export { resolveRemnicConfigRecord } from "./config-record.js";
|
|
21
|
+
export { readCompatEnv } from "./runtime/env.js";
|
|
22
|
+
export { configPathCandidates, discoverConfigPath, type DiscoveredConfigPath } from "./config-discovery.js";
|
|
21
23
|
export * from "./external-wiki.js";
|
|
22
24
|
export * from "./external-wiki-cli.js";
|
|
23
25
|
export {
|