@remnic/core 1.0.1 → 1.0.3
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/LICENSE +21 -0
- package/README.md +48 -0
- package/dist/access-cli.d.ts +13 -3
- package/dist/access-cli.js +90 -75
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +10 -3
- package/dist/access-http.js +25 -18
- package/dist/access-mcp.d.ts +30 -3
- package/dist/access-mcp.js +16 -1
- package/dist/access-schema.d.ts +46 -46
- package/dist/access-schema.js +1 -1
- package/dist/access-service.d.ts +65 -4
- package/dist/access-service.js +21 -15
- package/dist/active-memory-bridge.d.ts +66 -0
- package/dist/active-memory-bridge.js +11 -0
- package/dist/active-recall.d.ts +96 -0
- package/dist/active-recall.js +308 -0
- package/dist/active-recall.js.map +1 -0
- package/dist/behavior-learner.js +1 -1
- package/dist/bootstrap.d.ts +6 -3
- package/dist/bootstrap.js +2 -2
- package/dist/boxes.js +2 -2
- package/dist/briefing.d.ts +169 -0
- package/dist/briefing.js +52 -0
- package/dist/briefing.js.map +1 -0
- package/dist/buffer.d.ts +19 -5
- package/dist/buffer.js +2 -2
- package/dist/calibration.js +6 -6
- package/dist/causal-behavior.js +5 -5
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.d.ts +22 -2
- package/dist/causal-consolidation.js +36 -9
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +6 -6
- package/dist/causal-trajectory-graph.js +1 -1
- package/dist/causal-trajectory.d.ts +14 -1
- package/dist/causal-trajectory.js +5 -1
- package/dist/{chunk-KWBU5S5U.js → chunk-2ODBA7MQ.js} +9 -3
- package/dist/chunk-2ODBA7MQ.js.map +1 -0
- package/dist/{chunk-6UJQNRIO.js → chunk-2VFW5K5U.js} +93 -36
- package/dist/chunk-2VFW5K5U.js.map +1 -0
- package/dist/chunk-3PG3H5TD.js +7 -0
- package/dist/chunk-3PG3H5TD.js.map +1 -0
- package/dist/{chunk-NTTLPF7F.js → chunk-3QFQGRHO.js} +5 -5
- package/dist/chunk-4DJQYKMN.js +187 -0
- package/dist/chunk-4DJQYKMN.js.map +1 -0
- package/dist/chunk-4KAN3GZ3.js +225 -0
- package/dist/chunk-4KAN3GZ3.js.map +1 -0
- package/dist/{chunk-ORZMT74A.js → chunk-4NRAJUDS.js} +11 -1
- package/dist/chunk-4NRAJUDS.js.map +1 -0
- package/dist/{chunk-B7LOFDVE.js → chunk-4WMCPJWX.js} +8 -3
- package/dist/chunk-4WMCPJWX.js.map +1 -0
- package/dist/{chunk-G3AG3KZN.js → chunk-5IZL4DCV.js} +2 -2
- package/dist/{chunk-BRK4ODMI.js → chunk-5NPGSAVB.js} +2 -2
- package/dist/chunk-6MKAMLQL.js +16 -0
- package/dist/chunk-6MKAMLQL.js.map +1 -0
- package/dist/{chunk-ESSMF2FR.js → chunk-6PFRXT4K.js} +15 -6
- package/dist/chunk-6PFRXT4K.js.map +1 -0
- package/dist/chunk-6ZH4TU6I.js +245 -0
- package/dist/chunk-6ZH4TU6I.js.map +1 -0
- package/dist/{chunk-V4YC4LUK.js → chunk-74JR4N5J.js} +175 -63
- package/dist/chunk-74JR4N5J.js.map +1 -0
- package/dist/{chunk-L5RPWGFK.js → chunk-7DHTMOND.js} +2 -2
- package/dist/{chunk-TVVVQQAK.js → chunk-7PA4OZEU.js} +53 -11
- package/dist/chunk-7PA4OZEU.js.map +1 -0
- package/dist/{chunk-Q6FETXJA.js → chunk-7SEAZFFB.js} +2 -2
- package/dist/chunk-ALXMCZEU.js +332 -0
- package/dist/chunk-ALXMCZEU.js.map +1 -0
- package/dist/{chunk-QANCTXQF.js → chunk-AYPYCLR7.js} +3 -3
- package/dist/{chunk-WWIQTB2Y.js → chunk-BKQJBXXX.js} +9 -2
- package/dist/chunk-BKQJBXXX.js.map +1 -0
- package/dist/{chunk-LP47L3ZX.js → chunk-BTY5RRRF.js} +7 -7
- package/dist/{chunk-SCHEKPYH.js → chunk-C2EFFULQ.js} +1 -1
- package/dist/{chunk-GJR6D6KC.js → chunk-D654IBA6.js} +2 -2
- package/dist/{chunk-UV2FO7J4.js → chunk-E6K4NIEU.js} +2 -2
- package/dist/{chunk-T4WRIV2C.js → chunk-EABGC2TL.js} +2 -2
- package/dist/chunk-ECKDIK5F.js +813 -0
- package/dist/chunk-ECKDIK5F.js.map +1 -0
- package/dist/chunk-EJI5XIBB.js +232 -0
- package/dist/chunk-EJI5XIBB.js.map +1 -0
- package/dist/{chunk-ONRU4L2N.js → chunk-FEMOX5AD.js} +2 -2
- package/dist/{chunk-IFFFR3MR.js → chunk-FSFEQI74.js} +3 -3
- package/dist/chunk-G4SK7DSQ.js +121 -0
- package/dist/chunk-G4SK7DSQ.js.map +1 -0
- package/dist/{chunk-UIYZ5T3I.js → chunk-GJQPH5G3.js} +8 -8
- package/dist/{chunk-2PO5ZRKV.js → chunk-GZCUW5IC.js} +16 -3
- package/dist/chunk-GZCUW5IC.js.map +1 -0
- package/dist/{chunk-IZME7KW2.js → chunk-HITJFT7E.js} +24 -10
- package/dist/{chunk-IZME7KW2.js.map → chunk-HITJFT7E.js.map} +1 -1
- package/dist/chunk-IQT3XTKW.js +121 -0
- package/dist/chunk-IQT3XTKW.js.map +1 -0
- package/dist/{chunk-BDFZXRSO.js → chunk-J4IYOZZ5.js} +15 -2
- package/dist/chunk-J4IYOZZ5.js.map +1 -0
- package/dist/{chunk-ZKYI7UVO.js → chunk-JR4ZC3G4.js} +2 -2
- package/dist/{chunk-UCYSTFZR.js → chunk-JRNQ3RNA.js} +2 -2
- package/dist/{chunk-UYSKNO6E.js → chunk-JROGC36Y.js} +15 -4
- package/dist/chunk-JROGC36Y.js.map +1 -0
- package/dist/{chunk-GPGBSNKM.js → chunk-K4FLSOR5.js} +2 -2
- package/dist/{chunk-M5ZBBBJI.js → chunk-KEG4GNGI.js} +2 -2
- package/dist/chunk-KVE7R4CG.js +320 -0
- package/dist/chunk-KVE7R4CG.js.map +1 -0
- package/dist/{chunk-L7WO3MZ4.js → chunk-KWP7T3DP.js} +2 -2
- package/dist/chunk-LAYN4LDC.js +267 -0
- package/dist/chunk-LAYN4LDC.js.map +1 -0
- package/dist/{chunk-PGK3VUHN.js → chunk-MTLYEMJB.js} +3 -2
- package/dist/chunk-MTLYEMJB.js.map +1 -0
- package/dist/{chunk-J47FNDR7.js → chunk-MYQWXITD.js} +7 -7
- package/dist/{chunk-YNI4S5WT.js → chunk-N53K2EXC.js} +2 -2
- package/dist/{chunk-763GUIOU.js → chunk-NBNN5GOB.js} +2 -2
- package/dist/{chunk-CXWFUJR2.js → chunk-NSB3WSYS.js} +125 -6
- package/dist/chunk-NSB3WSYS.js.map +1 -0
- package/dist/{chunk-KL4CP4SB.js → chunk-O5ETUNBT.js} +17 -5
- package/dist/chunk-O5ETUNBT.js.map +1 -0
- package/dist/{chunk-OOSWAUYB.js → chunk-ODWDQNRE.js} +2 -2
- package/dist/{chunk-ISY75RLM.js → chunk-OJFGVJS6.js} +288 -7
- package/dist/chunk-OJFGVJS6.js.map +1 -0
- package/dist/{chunk-HLBYLYRD.js → chunk-PAORGQRI.js} +70 -13
- package/dist/chunk-PAORGQRI.js.map +1 -0
- package/dist/{chunk-ZJLY4QSU.js → chunk-PMB3WGDL.js} +69 -6
- package/dist/chunk-PMB3WGDL.js.map +1 -0
- package/dist/{chunk-J3BT33K7.js → chunk-POBPGDWI.js} +5 -5
- package/dist/{chunk-QWUUMMIK.js → chunk-POMSFKTB.js} +1351 -76
- package/dist/chunk-POMSFKTB.js.map +1 -0
- package/dist/{chunk-OTAVQCSF.js → chunk-PYXS46O7.js} +2 -2
- package/dist/chunk-QDW3E4RD.js +108 -0
- package/dist/chunk-QDW3E4RD.js.map +1 -0
- package/dist/{chunk-YNCQ7E4M.js → chunk-QDYXG4CS.js} +4 -3
- package/dist/chunk-QDYXG4CS.js.map +1 -0
- package/dist/{chunk-XUHI52HK.js → chunk-QKAH5B6E.js} +4 -4
- package/dist/{chunk-HLXVTBF3.js → chunk-QNJMBKFK.js} +3 -2
- package/dist/chunk-QNJMBKFK.js.map +1 -0
- package/dist/chunk-RCICHSHL.js +789 -0
- package/dist/chunk-RCICHSHL.js.map +1 -0
- package/dist/{chunk-HG2NKWR2.js → chunk-S4LX5EBI.js} +2 -2
- package/dist/{chunk-4A24LIM2.js → chunk-S75M5ZRK.js} +2 -2
- package/dist/{chunk-QCCCQT3O.js → chunk-TBBDFYXW.js} +2 -2
- package/dist/chunk-TBBDFYXW.js.map +1 -0
- package/dist/{chunk-U4PV25RD.js → chunk-U2IQTSBY.js} +1 -1
- package/dist/chunk-U2IQTSBY.js.map +1 -0
- package/dist/chunk-U66YHYC7.js +31 -0
- package/dist/chunk-U66YHYC7.js.map +1 -0
- package/dist/{chunk-MWGVGUIS.js → chunk-UEYA6UC7.js} +36 -4
- package/dist/chunk-UEYA6UC7.js.map +1 -0
- package/dist/{chunk-MDDAA2AO.js → chunk-UPMD5XND.js} +2 -2
- package/dist/{chunk-M5KEYE5E.js → chunk-URB2WSKZ.js} +2 -2
- package/dist/chunk-UVJFDP7P.js +202 -0
- package/dist/chunk-UVJFDP7P.js.map +1 -0
- package/dist/{chunk-QY2BHY5O.js → chunk-V7XCAHIB.js} +265 -25
- package/dist/chunk-V7XCAHIB.js.map +1 -0
- package/dist/chunk-W6SL7OFG.js +180 -0
- package/dist/chunk-W6SL7OFG.js.map +1 -0
- package/dist/{chunk-QDOSNLB4.js → chunk-X4WESCKA.js} +17 -15
- package/dist/chunk-X4WESCKA.js.map +1 -0
- package/dist/{chunk-OTFNI3OO.js → chunk-XMGSSBFX.js} +1738 -383
- package/dist/chunk-XMGSSBFX.js.map +1 -0
- package/dist/chunk-YDBIWGNI.js +298 -0
- package/dist/chunk-YDBIWGNI.js.map +1 -0
- package/dist/chunk-YFYL2SIJ.js +7857 -0
- package/dist/chunk-YFYL2SIJ.js.map +1 -0
- package/dist/chunking.js +1 -1
- package/dist/citations.d.ts +67 -0
- package/dist/citations.js +13 -0
- package/dist/citations.js.map +1 -0
- package/dist/cli-DwIBnp2g.d.ts +1240 -0
- package/dist/cli.d.ts +31 -1147
- package/dist/cli.js +149 -7092
- package/dist/cli.js.map +1 -1
- package/dist/codex-materialize-CQlLTzke.d.ts +139 -0
- package/dist/codex-thread-key.d.ts +3 -0
- package/dist/codex-thread-key.js +7 -0
- package/dist/codex-thread-key.js.map +1 -0
- package/dist/config.js +3 -2
- package/dist/connectors/codex/instructions.md +160 -0
- package/dist/connectors/codex/resources/namespace-cheatsheet.md +48 -0
- package/dist/day-summary.d.ts +7 -2
- package/dist/day-summary.js +5 -2
- package/dist/embedding-fallback.d.ts +96 -2
- package/dist/embedding-fallback.js +6 -4
- package/dist/{engine-2A6J4XEX.js → engine-X7X3AAG3.js} +10 -7
- package/dist/engine-X7X3AAG3.js.map +1 -0
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +10 -7
- package/dist/entity-schema.d.ts +11 -0
- package/dist/entity-schema.js +19 -0
- package/dist/entity-schema.js.map +1 -0
- package/dist/explicit-capture.d.ts +6 -3
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-judge.d.ts +66 -0
- package/dist/extraction-judge.js +18 -0
- package/dist/extraction-judge.js.map +1 -0
- package/dist/extraction.d.ts +1 -0
- package/dist/extraction.js +12 -10
- package/dist/fallback-llm.js +4 -4
- package/dist/graph.js +1 -1
- package/dist/importance.d.ts +11 -1
- package/dist/importance.js +3 -1
- package/dist/index.d.ts +1140 -8
- package/dist/index.js +3350 -333
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +2 -1
- package/dist/intent.js +3 -1
- package/dist/lifecycle.js +1 -1
- package/dist/local-llm.js +2 -2
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +1 -1
- package/dist/memory-cache.d.ts +2 -2
- package/dist/memory-cache.js +1 -1
- package/dist/{memory-projection-store-NxMkbocT.d.ts → memory-projection-store-DeSXPh1j.d.ts} +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/model-registry.js +2 -2
- package/dist/models-json.js +2 -2
- package/dist/native-knowledge.js +2 -2
- package/dist/negative.js +2 -2
- package/dist/operator-toolkit.js +20 -16
- package/dist/{orchestrator-CIvLFHx3.d.ts → orchestrator-B9kwlCep.d.ts} +254 -9
- package/dist/orchestrator.d.ts +6 -3
- package/dist/orchestrator.js +70 -58
- package/dist/page-versioning.d.ts +77 -0
- package/dist/page-versioning.js +15 -0
- package/dist/page-versioning.js.map +1 -0
- package/dist/plugin-id.d.ts +37 -0
- package/dist/plugin-id.js +11 -0
- package/dist/plugin-id.js.map +1 -0
- package/dist/policy-runtime.js +2 -2
- package/dist/profiling.js +2 -2
- package/dist/qmd.d.ts +5 -2
- package/dist/qmd.js +3 -3
- package/dist/recall-audit.d.ts +20 -0
- package/dist/recall-audit.js +50 -0
- package/dist/recall-audit.js.map +1 -0
- package/dist/recall-mmr.d.ts +152 -0
- package/dist/recall-mmr.js +17 -0
- package/dist/recall-mmr.js.map +1 -0
- package/dist/recall-qos.js +2 -2
- package/dist/recall-state.js +2 -2
- package/dist/relevance.js +2 -2
- package/dist/resolve-provider-secret.js +2 -2
- package/dist/resume-bundles.js +5 -4
- package/dist/retrieval-agents.js +2 -2
- package/dist/retrieval.js +2 -2
- package/dist/schemas.d.ts +422 -64
- package/dist/schemas.js +3 -1
- package/dist/sdk-compat.d.ts +2 -0
- package/dist/sdk-compat.js +6 -3
- package/dist/sdk-compat.js.map +1 -1
- package/dist/semantic-chunking.d.ts +87 -0
- package/dist/semantic-chunking.js +20 -0
- package/dist/semantic-chunking.js.map +1 -0
- package/dist/semantic-consolidation-DrvSYRdB.d.ts +119 -0
- package/dist/semantic-consolidation.d.ts +4 -42
- package/dist/semantic-consolidation.js +23 -2
- package/dist/semantic-rule-promotion.js +9 -6
- package/dist/semantic-rule-verifier.js +10 -7
- package/dist/session-observer-state.js +2 -2
- package/dist/session-toggles.d.ts +22 -0
- package/dist/session-toggles.js +116 -0
- package/dist/session-toggles.js.map +1 -0
- package/dist/skills-registry.d.ts +47 -0
- package/dist/skills-registry.js +48 -0
- package/dist/skills-registry.js.map +1 -0
- package/dist/source-attribution.d.ts +169 -0
- package/dist/source-attribution.js +27 -0
- package/dist/source-attribution.js.map +1 -0
- package/dist/storage.d.ts +171 -10
- package/dist/storage.js +16 -5
- package/dist/summarizer.js +7 -7
- package/dist/temporal-supersession.d.ts +127 -0
- package/dist/temporal-supersession.js +20 -0
- package/dist/temporal-supersession.js.map +1 -0
- package/dist/threading.js +2 -2
- package/dist/tier-migration.d.ts +2 -1
- package/dist/tier-routing.js +2 -2
- package/dist/tokens.d.ts +21 -1
- package/dist/tokens.js +5 -1
- package/dist/transcript.js +2 -2
- package/dist/types.d.ts +497 -3
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +2 -2
- package/dist/utility-runtime.js +3 -3
- package/dist/verified-recall.js +11 -8
- package/dist/whitespace.d.ts +4 -0
- package/dist/whitespace.js +9 -0
- package/dist/whitespace.js.map +1 -0
- package/package.json +14 -8
- package/dist/chunk-2CJCWDMR.js +0 -87
- package/dist/chunk-2CJCWDMR.js.map +0 -1
- package/dist/chunk-2PO5ZRKV.js.map +0 -1
- package/dist/chunk-6UJQNRIO.js.map +0 -1
- package/dist/chunk-B7LOFDVE.js.map +0 -1
- package/dist/chunk-BDFZXRSO.js.map +0 -1
- package/dist/chunk-CXWFUJR2.js.map +0 -1
- package/dist/chunk-DORBM6OB.js +0 -81
- package/dist/chunk-DORBM6OB.js.map +0 -1
- package/dist/chunk-ESSMF2FR.js.map +0 -1
- package/dist/chunk-HLBYLYRD.js.map +0 -1
- package/dist/chunk-HLXVTBF3.js.map +0 -1
- package/dist/chunk-ISY75RLM.js.map +0 -1
- package/dist/chunk-KL4CP4SB.js.map +0 -1
- package/dist/chunk-KWBU5S5U.js.map +0 -1
- package/dist/chunk-MWGVGUIS.js.map +0 -1
- package/dist/chunk-ORZMT74A.js.map +0 -1
- package/dist/chunk-OTFNI3OO.js.map +0 -1
- package/dist/chunk-PGK3VUHN.js.map +0 -1
- package/dist/chunk-QCCCQT3O.js.map +0 -1
- package/dist/chunk-QDOSNLB4.js.map +0 -1
- package/dist/chunk-QPKFPHOO.js +0 -178
- package/dist/chunk-QPKFPHOO.js.map +0 -1
- package/dist/chunk-QWUUMMIK.js.map +0 -1
- package/dist/chunk-QY2BHY5O.js.map +0 -1
- package/dist/chunk-TVVVQQAK.js.map +0 -1
- package/dist/chunk-U4PV25RD.js.map +0 -1
- package/dist/chunk-UYSKNO6E.js.map +0 -1
- package/dist/chunk-V4YC4LUK.js.map +0 -1
- package/dist/chunk-WWIQTB2Y.js.map +0 -1
- package/dist/chunk-YNCQ7E4M.js.map +0 -1
- package/dist/chunk-ZJLY4QSU.js.map +0 -1
- /package/dist/{engine-2A6J4XEX.js.map → active-memory-bridge.js.map} +0 -0
- /package/dist/{chunk-NTTLPF7F.js.map → chunk-3QFQGRHO.js.map} +0 -0
- /package/dist/{chunk-G3AG3KZN.js.map → chunk-5IZL4DCV.js.map} +0 -0
- /package/dist/{chunk-BRK4ODMI.js.map → chunk-5NPGSAVB.js.map} +0 -0
- /package/dist/{chunk-L5RPWGFK.js.map → chunk-7DHTMOND.js.map} +0 -0
- /package/dist/{chunk-Q6FETXJA.js.map → chunk-7SEAZFFB.js.map} +0 -0
- /package/dist/{chunk-QANCTXQF.js.map → chunk-AYPYCLR7.js.map} +0 -0
- /package/dist/{chunk-LP47L3ZX.js.map → chunk-BTY5RRRF.js.map} +0 -0
- /package/dist/{chunk-SCHEKPYH.js.map → chunk-C2EFFULQ.js.map} +0 -0
- /package/dist/{chunk-GJR6D6KC.js.map → chunk-D654IBA6.js.map} +0 -0
- /package/dist/{chunk-UV2FO7J4.js.map → chunk-E6K4NIEU.js.map} +0 -0
- /package/dist/{chunk-T4WRIV2C.js.map → chunk-EABGC2TL.js.map} +0 -0
- /package/dist/{chunk-ONRU4L2N.js.map → chunk-FEMOX5AD.js.map} +0 -0
- /package/dist/{chunk-IFFFR3MR.js.map → chunk-FSFEQI74.js.map} +0 -0
- /package/dist/{chunk-UIYZ5T3I.js.map → chunk-GJQPH5G3.js.map} +0 -0
- /package/dist/{chunk-ZKYI7UVO.js.map → chunk-JR4ZC3G4.js.map} +0 -0
- /package/dist/{chunk-UCYSTFZR.js.map → chunk-JRNQ3RNA.js.map} +0 -0
- /package/dist/{chunk-GPGBSNKM.js.map → chunk-K4FLSOR5.js.map} +0 -0
- /package/dist/{chunk-M5ZBBBJI.js.map → chunk-KEG4GNGI.js.map} +0 -0
- /package/dist/{chunk-L7WO3MZ4.js.map → chunk-KWP7T3DP.js.map} +0 -0
- /package/dist/{chunk-J47FNDR7.js.map → chunk-MYQWXITD.js.map} +0 -0
- /package/dist/{chunk-YNI4S5WT.js.map → chunk-N53K2EXC.js.map} +0 -0
- /package/dist/{chunk-763GUIOU.js.map → chunk-NBNN5GOB.js.map} +0 -0
- /package/dist/{chunk-OOSWAUYB.js.map → chunk-ODWDQNRE.js.map} +0 -0
- /package/dist/{chunk-J3BT33K7.js.map → chunk-POBPGDWI.js.map} +0 -0
- /package/dist/{chunk-OTAVQCSF.js.map → chunk-PYXS46O7.js.map} +0 -0
- /package/dist/{chunk-XUHI52HK.js.map → chunk-QKAH5B6E.js.map} +0 -0
- /package/dist/{chunk-HG2NKWR2.js.map → chunk-S4LX5EBI.js.map} +0 -0
- /package/dist/{chunk-4A24LIM2.js.map → chunk-S75M5ZRK.js.map} +0 -0
- /package/dist/{chunk-MDDAA2AO.js.map → chunk-UPMD5XND.js.map} +0 -0
- /package/dist/{chunk-M5KEYE5E.js.map → chunk-URB2WSKZ.js.map} +0 -0
|
@@ -6,26 +6,27 @@ import {
|
|
|
6
6
|
ProactiveExtractionResultSchema,
|
|
7
7
|
ProactiveQuestionsResultSchema,
|
|
8
8
|
buildProfileConsolidationResultSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UEYA6UC7.js";
|
|
10
10
|
import {
|
|
11
11
|
ProfilingCollector
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
ModelRegistry
|
|
15
|
-
} from "./chunk-ONRU4L2N.js";
|
|
12
|
+
} from "./chunk-NBNN5GOB.js";
|
|
16
13
|
import {
|
|
17
14
|
LocalLlmClient
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UPMD5XND.js";
|
|
19
16
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./chunk-2PO5ZRKV.js";
|
|
17
|
+
ModelRegistry
|
|
18
|
+
} from "./chunk-FEMOX5AD.js";
|
|
23
19
|
import {
|
|
24
20
|
delinearize
|
|
25
21
|
} from "./chunk-VEWZZM3H.js";
|
|
22
|
+
import {
|
|
23
|
+
buildExtensionsFooterForSummary,
|
|
24
|
+
formatDaySummaryMemories,
|
|
25
|
+
loadDaySummaryPrompt
|
|
26
|
+
} from "./chunk-GZCUW5IC.js";
|
|
26
27
|
import {
|
|
27
28
|
FallbackLlmClient
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QKAH5B6E.js";
|
|
29
30
|
import {
|
|
30
31
|
buildChatCompletionTokenLimit,
|
|
31
32
|
shouldAssumeOpenAiChatCompletions
|
|
@@ -36,12 +37,15 @@ import {
|
|
|
36
37
|
import {
|
|
37
38
|
applyWorkExtractionBoundary
|
|
38
39
|
} from "./chunk-EEQLFRUM.js";
|
|
40
|
+
import {
|
|
41
|
+
normalizeProcedureSteps
|
|
42
|
+
} from "./chunk-QDW3E4RD.js";
|
|
39
43
|
import {
|
|
40
44
|
sanitizeMemoryContent
|
|
41
45
|
} from "./chunk-M62O4P4T.js";
|
|
42
46
|
import {
|
|
43
47
|
log
|
|
44
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-2ODBA7MQ.js";
|
|
45
49
|
|
|
46
50
|
// src/extraction.ts
|
|
47
51
|
import OpenAI from "openai";
|
|
@@ -134,8 +138,9 @@ var ExtractionEngine = class {
|
|
|
134
138
|
return shouldAssumeOpenAiChatCompletions(this.config.openaiBaseUrl);
|
|
135
139
|
}
|
|
136
140
|
sanitizeExtractionResult(result, messageTimestamp) {
|
|
141
|
+
const proceduralOn = this.config.procedural?.enabled === true;
|
|
137
142
|
const ts = messageTimestamp ?? /* @__PURE__ */ new Date();
|
|
138
|
-
const facts = result.facts.map((fact) => {
|
|
143
|
+
const facts = result.facts.filter((fact) => proceduralOn || fact.category !== "procedure").map((fact) => {
|
|
139
144
|
const sanitized = sanitizeMemoryContent(fact.content);
|
|
140
145
|
if (!sanitized.clean) {
|
|
141
146
|
log.warn(`extraction fact sanitized; violations=${sanitized.violations.join(", ")}`);
|
|
@@ -152,12 +157,7 @@ var ExtractionEngine = class {
|
|
|
152
157
|
return result.facts.length > 0 || result.entities.length > 0 || result.questions.length > 0 || result.profileUpdates.length > 0 || (result.relationships?.length ?? 0) > 0;
|
|
153
158
|
}
|
|
154
159
|
normalizeExtractionResultPayload(parsed) {
|
|
155
|
-
const entities = Array.isArray(parsed?.entities) ? parsed.entities.map((e) => (
|
|
156
|
-
name: typeof e?.name === "string" ? e.name : "",
|
|
157
|
-
type: typeof e?.type === "string" ? e.type : "other",
|
|
158
|
-
facts: Array.isArray(e?.facts) ? e.facts.filter((f) => typeof f === "string") : [],
|
|
159
|
-
promptedByQuestion: typeof e?.promptedByQuestion === "string" ? e.promptedByQuestion : void 0
|
|
160
|
-
})).filter((e) => e.name.length > 0) : [];
|
|
160
|
+
const entities = Array.isArray(parsed?.entities) ? parsed.entities.map((e) => this.normalizeEntityUpdate(e)).filter((e) => e.name.length > 0) : [];
|
|
161
161
|
const facts = Array.isArray(parsed?.facts) ? parsed.facts.map((f) => ({
|
|
162
162
|
category: typeof f?.category === "string" ? f.category : "fact",
|
|
163
163
|
content: typeof f?.content === "string" ? f.content : typeof f?.text === "string" ? f.text : "",
|
|
@@ -167,7 +167,8 @@ var ExtractionEngine = class {
|
|
|
167
167
|
promptedByQuestion: typeof f?.promptedByQuestion === "string" ? f.promptedByQuestion : void 0,
|
|
168
168
|
structuredAttributes: f?.structuredAttributes && typeof f.structuredAttributes === "object" && !Array.isArray(f.structuredAttributes) ? Object.fromEntries(
|
|
169
169
|
Object.entries(f.structuredAttributes).filter(([k, v]) => typeof k === "string" && typeof v === "string")
|
|
170
|
-
) : void 0
|
|
170
|
+
) : void 0,
|
|
171
|
+
procedureSteps: Array.isArray(f?.procedureSteps) ? normalizeProcedureSteps(f.procedureSteps) : void 0
|
|
171
172
|
})).filter((f) => f.content.length > 0) : [];
|
|
172
173
|
const questions = Array.isArray(parsed?.questions) ? parsed.questions.map((q) => {
|
|
173
174
|
if (typeof q === "string") return { question: q, context: "", priority: 0.5 };
|
|
@@ -193,6 +194,19 @@ var ExtractionEngine = class {
|
|
|
193
194
|
})) : void 0
|
|
194
195
|
};
|
|
195
196
|
}
|
|
197
|
+
normalizeEntityUpdate(entity) {
|
|
198
|
+
return {
|
|
199
|
+
name: typeof entity?.name === "string" ? entity.name : "",
|
|
200
|
+
type: typeof entity?.type === "string" ? entity.type : "other",
|
|
201
|
+
facts: Array.isArray(entity?.facts) ? entity.facts.filter((fact) => typeof fact === "string") : [],
|
|
202
|
+
structuredSections: Array.isArray(entity?.structuredSections) ? entity.structuredSections.map((section) => ({
|
|
203
|
+
key: typeof section?.key === "string" ? section.key.trim() : "",
|
|
204
|
+
title: typeof section?.title === "string" ? section.title.trim() : "",
|
|
205
|
+
facts: Array.isArray(section?.facts) ? section.facts.filter((fact) => typeof fact === "string").map((fact) => fact.trim()).filter((fact) => fact.length > 0) : []
|
|
206
|
+
})).filter((section) => section.key.length > 0 && section.title.length > 0 && section.facts.length > 0) : void 0,
|
|
207
|
+
promptedByQuestion: typeof entity?.promptedByQuestion === "string" ? entity.promptedByQuestion : void 0
|
|
208
|
+
};
|
|
209
|
+
}
|
|
196
210
|
parseJsonObject(content) {
|
|
197
211
|
const trimmed = content?.trim();
|
|
198
212
|
if (!trimmed) return null;
|
|
@@ -391,7 +405,7 @@ var ExtractionEngine = class {
|
|
|
391
405
|
`Return at most ${maxAdditional} additional high-confidence memory candidates that were omitted from the base extraction.`,
|
|
392
406
|
"Only include information directly supported by the conversation. Do not speculate. Do not repeat the base extraction.",
|
|
393
407
|
"Return only valid JSON with this shape:",
|
|
394
|
-
'{"facts":[{"category":"fact","content":"...","confidence":0.0,"tags":["..."],"entityRef":"optional","promptedByQuestion":"optional"}],"profileUpdates":["..."],"entities":[{"name":"...","type":"person","facts":["..."],"promptedByQuestion":"optional"}],"relationships":[{"source":"...","target":"...","label":"...","promptedByQuestion":"optional"}]}',
|
|
408
|
+
'{"facts":[{"category":"fact","content":"...","confidence":0.0,"tags":["..."],"entityRef":"optional","promptedByQuestion":"optional"}],"profileUpdates":["..."],"entities":[{"name":"...","type":"person","facts":["..."],"structuredSections":[{"key":"beliefs","title":"Beliefs","facts":["..."]}],"promptedByQuestion":"optional"}],"relationships":[{"source":"...","target":"...","label":"...","promptedByQuestion":"optional"}]}',
|
|
395
409
|
"",
|
|
396
410
|
"Base extracted facts (do not repeat):",
|
|
397
411
|
factsPreview || "(none)",
|
|
@@ -480,7 +494,11 @@ var ExtractionEngine = class {
|
|
|
480
494
|
}
|
|
481
495
|
const mergedEntities = base.entities.map((entity) => ({
|
|
482
496
|
...entity,
|
|
483
|
-
facts: [...entity.facts]
|
|
497
|
+
facts: [...entity.facts],
|
|
498
|
+
structuredSections: entity.structuredSections ? entity.structuredSections.map((section) => ({
|
|
499
|
+
...section,
|
|
500
|
+
facts: [...section.facts]
|
|
501
|
+
})) : void 0
|
|
484
502
|
}));
|
|
485
503
|
const entityIndex = new Map(mergedEntities.map((entity, index) => [normalizeEntityKey(entity), index]));
|
|
486
504
|
for (const entity of proactive.entities) {
|
|
@@ -490,6 +508,12 @@ var ExtractionEngine = class {
|
|
|
490
508
|
if (typeof existingIndex === "number") {
|
|
491
509
|
const existing = mergedEntities[existingIndex];
|
|
492
510
|
const nextFacts = new Set(existing.facts.map((fact) => fact.trim()));
|
|
511
|
+
const nextSections = new Map(
|
|
512
|
+
(existing.structuredSections ?? []).map((section) => [section.key, {
|
|
513
|
+
...section,
|
|
514
|
+
facts: [...section.facts]
|
|
515
|
+
}])
|
|
516
|
+
);
|
|
493
517
|
let changed = false;
|
|
494
518
|
for (const fact of entity.facts) {
|
|
495
519
|
const trimmed = fact.trim();
|
|
@@ -497,10 +521,31 @@ var ExtractionEngine = class {
|
|
|
497
521
|
nextFacts.add(trimmed);
|
|
498
522
|
changed = true;
|
|
499
523
|
}
|
|
524
|
+
for (const section of entity.structuredSections ?? []) {
|
|
525
|
+
const existingSection = nextSections.get(section.key);
|
|
526
|
+
if (!existingSection) {
|
|
527
|
+
nextSections.set(section.key, {
|
|
528
|
+
key: section.key,
|
|
529
|
+
title: section.title,
|
|
530
|
+
facts: [...section.facts]
|
|
531
|
+
});
|
|
532
|
+
changed = true;
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
const nextSectionFacts = new Set(existingSection.facts.map((fact) => fact.trim()));
|
|
536
|
+
for (const fact of section.facts) {
|
|
537
|
+
const trimmed = fact.trim();
|
|
538
|
+
if (!trimmed || nextSectionFacts.has(trimmed)) continue;
|
|
539
|
+
nextSectionFacts.add(trimmed);
|
|
540
|
+
changed = true;
|
|
541
|
+
}
|
|
542
|
+
existingSection.facts = Array.from(nextSectionFacts);
|
|
543
|
+
}
|
|
500
544
|
if (changed) {
|
|
501
545
|
mergedEntities[existingIndex] = {
|
|
502
546
|
...existing,
|
|
503
547
|
facts: Array.from(nextFacts),
|
|
548
|
+
structuredSections: Array.from(nextSections.values()),
|
|
504
549
|
source: "proactive",
|
|
505
550
|
promptedByQuestion: existing.promptedByQuestion ?? entity.promptedByQuestion
|
|
506
551
|
};
|
|
@@ -508,7 +553,14 @@ var ExtractionEngine = class {
|
|
|
508
553
|
}
|
|
509
554
|
continue;
|
|
510
555
|
}
|
|
511
|
-
mergedEntities.push({
|
|
556
|
+
mergedEntities.push({
|
|
557
|
+
...entity,
|
|
558
|
+
source: "proactive",
|
|
559
|
+
structuredSections: entity.structuredSections ? entity.structuredSections.map((section) => ({
|
|
560
|
+
...section,
|
|
561
|
+
facts: [...section.facts]
|
|
562
|
+
})) : void 0
|
|
563
|
+
});
|
|
512
564
|
entityIndex.set(key, mergedEntities.length - 1);
|
|
513
565
|
remainingBudget -= 1;
|
|
514
566
|
}
|
|
@@ -834,11 +886,12 @@ Also generate:
|
|
|
834
886
|
1. 1-3 genuine questions you're curious about from this conversation
|
|
835
887
|
2. Profile updates about user patterns/behaviors (if any)
|
|
836
888
|
3. Relationships between entities (max 5). Use normalized names like "person-jane-doe", "company-acme-corp".
|
|
889
|
+
4. For entity facts that fit a durable named heading, include entity.structuredSections with {key, title, facts}.
|
|
837
890
|
|
|
838
891
|
Output JSON:
|
|
839
892
|
{
|
|
840
893
|
"facts": [{"category": "decision", "content": "Chose PostgreSQL over MongoDB for the user service", "importance": 8, "confidence": 0.9, "structuredAttributes": {"chosen": "PostgreSQL", "rejected": "MongoDB"}}, {"category": "commitment", "content": "Must ship v2.0 API by end of March", "importance": 10, "confidence": 1.0, "structuredAttributes": {"deadline": "end of March", "deliverable": "v2.0 API"}}, {"category": "fact", "content": "The store backend uses Redis for session caching", "importance": 6, "confidence": 0.95, "entityRef": "project-acme-store"}, {"category": "principle", "content": "Always run migrations in a transaction to avoid partial schema updates", "importance": 8, "confidence": 0.9}],
|
|
841
|
-
"entities": [{"name": "person-jane-doe", "type": "person", "facts": ["Works at Acme Corp", "Prefers Python over JavaScript"]}, {"name": "project-acme-store", "type": "project", "facts": ["Built with Next.js", "Deployed on Vercel"]}],
|
|
894
|
+
"entities": [{"name": "person-jane-doe", "type": "person", "facts": ["Works at Acme Corp", "Prefers Python over JavaScript"], "structuredSections": [{"key": "beliefs", "title": "Beliefs", "facts": ["Python is a better fit than JavaScript for backend work."]}]}, {"name": "project-acme-store", "type": "project", "facts": ["Built with Next.js", "Deployed on Vercel"]}],
|
|
842
895
|
"profileUpdates": ["User prefers dark mode in all editors"],
|
|
843
896
|
"questions": [{"question": "Which cloud provider hosts the staging environment?", "context": "Came up during deployment discussion", "priority": 0.5}],
|
|
844
897
|
"relationships": [{"source": "person-jane-doe", "target": "company-acme-corp", "label": "works at"}]
|
|
@@ -915,7 +968,7 @@ ${truncatedConversation}`;
|
|
|
915
968
|
Respond with valid JSON matching this schema:
|
|
916
969
|
{
|
|
917
970
|
"facts": [{"category": "decision", "content": "Chose React over Vue for the dashboard rewrite", "importance": 8, "confidence": 0.9, "tags": ["frontend"], "structuredAttributes": {"chosen": "React", "rejected": "Vue"}}, {"category": "fact", "content": "The API gateway uses rate limiting at 1000 req/min", "importance": 6, "confidence": 0.95, "tags": ["infra"], "entityRef": "project-dashboard", "structuredAttributes": {"rate_limit": "1000 req/min"}}],
|
|
918
|
-
"entities": [{"name": "person-sarah-chen", "type": "person", "facts": ["Leads the backend team", "Joined from Google in 2024"]}, {"name": "project-dashboard", "type": "project", "facts": ["React-based admin panel", "Deployed on AWS ECS"]}],
|
|
971
|
+
"entities": [{"name": "person-sarah-chen", "type": "person", "facts": ["Leads the backend team", "Joined from Google in 2024"], "structuredSections": [{"key": "beliefs", "title": "Beliefs", "facts": ["Small teams should own whole systems."]}]}, {"name": "project-dashboard", "type": "project", "facts": ["React-based admin panel", "Deployed on AWS ECS"]}],
|
|
919
972
|
"profileUpdates": ["User prefers TypeScript over plain JavaScript"],
|
|
920
973
|
"questions": [{"question": "What database does the analytics service use?", "context": "Came up during discussion of migration plan", "priority": 0.5}],
|
|
921
974
|
"relationships": [{"source": "person-sarah-chen", "target": "project-dashboard", "label": "leads development of"}]
|
|
@@ -958,7 +1011,9 @@ Respond with valid JSON matching this schema:
|
|
|
958
1011
|
"principle",
|
|
959
1012
|
"commitment",
|
|
960
1013
|
"moment",
|
|
961
|
-
"skill"
|
|
1014
|
+
"skill",
|
|
1015
|
+
"rule",
|
|
1016
|
+
"procedure"
|
|
962
1017
|
]);
|
|
963
1018
|
const allowedEntityTypes = /* @__PURE__ */ new Set([
|
|
964
1019
|
"person",
|
|
@@ -1015,6 +1070,7 @@ Memory categories:
|
|
|
1015
1070
|
- moment: Emotionally significant events or milestones (e.g., "first successful deployment of engram")
|
|
1016
1071
|
- skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${this.config.causalRuleExtractionEnabled ? `
|
|
1017
1072
|
- rule: Causal rules discovered through experience (format: "IF <condition> THEN <action/outcome>", e.g., "IF Shopify API returns 401 THEN the admin token is missing read_products scope")` : ""}
|
|
1073
|
+
- procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to "procedure". Use "content" for a short title that includes explicit trigger phrasing (e.g. "When you deploy to production\u2026", "Whenever you ship a release\u2026"). Add "procedureSteps": an array of at least two objects {"order": number, "intent": "concrete step description"} in execution order. Optional per-step "toolCall": {"kind": "\u2026", "signature": "\u2026"}, "expectedOutcome", "optional": true.
|
|
1018
1074
|
|
|
1019
1075
|
Rules:
|
|
1020
1076
|
- Only extract genuinely NEW information worth remembering across sessions
|
|
@@ -1025,6 +1081,7 @@ Rules:
|
|
|
1025
1081
|
- Entity references should use normalized names (lowercase, hyphenated: "jane-doe", "acme-corp")
|
|
1026
1082
|
- CRITICAL: Entity names must be CANONICAL. Always use the hyphenated multi-word form: "acme-corp" NOT "acmecorp" or "acme". "jane-doe" NOT "janedoe" or "jane". If unsure, prefer the most specific full name.
|
|
1027
1083
|
- Avoid creating entities typed as "other" when a more specific type fits (company, project, tool, person, place)
|
|
1084
|
+
- When entity facts clearly belong under a durable named heading, add them to entity.structuredSections as {key, title, facts}. Example person headings: "Beliefs", "Communication Style", "Building / Working On". Leave structuredSections empty when no stable heading fits.
|
|
1028
1085
|
- Tags should be concise and reusable (e.g., "coding-style", "personal", "tools")
|
|
1029
1086
|
- When a fact contains measurable, categorical, or precisely valued data, include a "structuredAttributes" field with key-value string pairs (e.g., {"price": "29.99", "brand": "Sony"}, {"date": "2024-03-15", "location": "SF"}, {"chosen": "PostgreSQL", "rejected": "MongoDB"}). Only for concrete values, not narrative content.
|
|
1030
1087
|
- Set confidence using these tiers:
|
|
@@ -1134,10 +1191,7 @@ Consolidate the new memories against existing ones.`
|
|
|
1134
1191
|
);
|
|
1135
1192
|
if (fallbackResult) {
|
|
1136
1193
|
log.debug(`consolidation: ${fallbackResult.items.length} decisions via fallback`);
|
|
1137
|
-
const normalizedEntityUpdates = fallbackResult.entityUpdates.map((entity) => (
|
|
1138
|
-
...entity,
|
|
1139
|
-
promptedByQuestion: typeof entity.promptedByQuestion === "string" ? entity.promptedByQuestion : void 0
|
|
1140
|
-
}));
|
|
1194
|
+
const normalizedEntityUpdates = fallbackResult.entityUpdates.map((entity) => this.normalizeEntityUpdate(entity));
|
|
1141
1195
|
return this.sanitizeConsolidationResult({
|
|
1142
1196
|
items: fallbackResult.items.map((item) => ({
|
|
1143
1197
|
...item,
|
|
@@ -1235,11 +1289,7 @@ Respond with valid JSON only, matching this schema:
|
|
|
1235
1289
|
reason: typeof item?.reason === "string" ? item.reason : ""
|
|
1236
1290
|
};
|
|
1237
1291
|
}).filter((item) => item.existingId.length > 0);
|
|
1238
|
-
const normalizedEntityUpdates = Array.isArray(parsed.entityUpdates) ? parsed.entityUpdates.map((entity) => (
|
|
1239
|
-
name: typeof entity?.name === "string" ? entity.name : "",
|
|
1240
|
-
type: typeof entity?.type === "string" ? entity.type : "other",
|
|
1241
|
-
facts: Array.isArray(entity?.facts) ? entity.facts.filter((fact) => typeof fact === "string") : []
|
|
1242
|
-
})).filter((entity) => entity.name.length > 0) : [];
|
|
1292
|
+
const normalizedEntityUpdates = Array.isArray(parsed.entityUpdates) ? parsed.entityUpdates.map((entity) => this.normalizeEntityUpdate(entity)).filter((entity) => entity.name.length > 0) : [];
|
|
1243
1293
|
log.debug(
|
|
1244
1294
|
`consolidation: ${normalizedItems.length} decisions`
|
|
1245
1295
|
);
|
|
@@ -1969,9 +2019,16 @@ Respond with valid JSON matching this schema:
|
|
|
1969
2019
|
const memoryContext = formatDaySummaryMemories(memories);
|
|
1970
2020
|
if (memoryContext.length === 0) return null;
|
|
1971
2021
|
const systemPrompt = await loadDaySummaryPrompt();
|
|
2022
|
+
let extensionsFooter = "";
|
|
2023
|
+
try {
|
|
2024
|
+
extensionsFooter = await buildExtensionsFooterForSummary(this.config);
|
|
2025
|
+
} catch {
|
|
2026
|
+
}
|
|
1972
2027
|
const userPrompt = `Generate an end-of-day summary from this Remnic memory context:
|
|
1973
2028
|
|
|
1974
|
-
${memoryContext}
|
|
2029
|
+
${memoryContext}${extensionsFooter.length > 0 ? `
|
|
2030
|
+
|
|
2031
|
+
${extensionsFooter}` : ""}`;
|
|
1975
2032
|
const traceId = crypto.randomUUID();
|
|
1976
2033
|
const startedAt = Date.now();
|
|
1977
2034
|
this.emit({ kind: "llm_start", traceId, model: this.config.model, operation: "day_summary", input: memoryContext.slice(0, 4e3) });
|
|
@@ -2165,4 +2222,4 @@ ${memoryList}` }
|
|
|
2165
2222
|
export {
|
|
2166
2223
|
ExtractionEngine
|
|
2167
2224
|
};
|
|
2168
|
-
//# sourceMappingURL=chunk-
|
|
2225
|
+
//# sourceMappingURL=chunk-2VFW5K5U.js.map
|