@remnic/core 9.15.1 → 9.15.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/dist/access-admin-ops-surface.d.ts +8 -8
- package/dist/access-admin-ops-surface.js +7 -7
- package/dist/access-boundary.d.ts +8 -8
- package/dist/access-boundary.js +7 -7
- package/dist/access-cli.js +33 -33
- package/dist/access-http.d.ts +8 -8
- package/dist/access-http.js +11 -11
- package/dist/access-identity-continuity-surface.d.ts +6 -6
- package/dist/access-identity-continuity-surface.js +7 -7
- package/dist/access-lcm-surface.d.ts +8 -8
- package/dist/access-lcm-surface.js +7 -7
- package/dist/access-mcp.d.ts +8 -8
- package/dist/access-mcp.js +10 -10
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-DgJtZCmU.d.ts → access-namespace-preflight-B9e5GnyZ.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +7 -7
- package/dist/access-observe-write-surface.d.ts +8 -8
- package/dist/access-observe-write-surface.js +7 -7
- package/dist/access-operations-batch.js +8 -8
- package/dist/access-operations.d.ts +11 -11
- package/dist/access-operations.js +9 -9
- package/dist/access-recall-concurrency.d.ts +8 -8
- package/dist/access-recall-concurrency.js +7 -7
- package/dist/access-recall-response.d.ts +8 -8
- package/dist/access-recall-response.js +7 -7
- package/dist/access-recall-surface.d.ts +8 -8
- package/dist/access-recall-surface.js +7 -7
- package/dist/access-schema.d.ts +76 -76
- package/dist/{access-service-bw2p9ULX.d.ts → access-service-DgmJd_A-.d.ts} +6 -6
- package/dist/access-service.d.ts +8 -8
- package/dist/access-service.js +7 -7
- package/dist/access-surface-catalog.d.ts +8 -8
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +6 -6
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +3 -3
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-BWqHb5HT.d.ts → catalog-g_dfT6oL.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +4 -4
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-H3MDWWGN.js → chunk-42DJZZUB.js} +2 -2
- package/dist/{chunk-JRXN5LYL.js → chunk-47WFEKT7.js} +2 -2
- package/dist/{chunk-I7DUEPE2.js → chunk-4E5H4FPC.js} +3 -3
- package/dist/{chunk-FFF4XIGB.js → chunk-5HFIHWOF.js} +17 -17
- package/dist/{chunk-MUQ3BD2C.js → chunk-5MDE5MIC.js} +2 -2
- package/dist/{chunk-QLOOCKKE.js → chunk-6EJL2O3G.js} +2 -2
- package/dist/{chunk-WSHJAY5M.js → chunk-B57BIBXI.js} +2 -2
- package/dist/{chunk-KN6UGAQB.js → chunk-B6NCHYAK.js} +7 -2
- package/dist/chunk-B6NCHYAK.js.map +1 -0
- package/dist/{chunk-FMMZQDCT.js → chunk-BNH2VVWP.js} +2 -2
- package/dist/{chunk-6KIQT7RG.js → chunk-BZ52BJ6C.js} +2 -2
- package/dist/chunk-BZ52BJ6C.js.map +1 -0
- package/dist/{chunk-63P3PJED.js → chunk-CXFVZ3PK.js} +18 -18
- package/dist/{chunk-7FNHLCQE.js → chunk-EEUZQQRJ.js} +2 -2
- package/dist/{chunk-YVKF3HEW.js → chunk-FJ5IQ3SI.js} +1 -1
- package/dist/chunk-FJ5IQ3SI.js.map +1 -0
- package/dist/{chunk-BOP256DB.js → chunk-GQOKO77V.js} +2 -2
- package/dist/{chunk-CCNSCRJ2.js → chunk-H4MDUPER.js} +2 -2
- package/dist/{chunk-XKFXY3ZA.js → chunk-IRX5UCGN.js} +3 -3
- package/dist/{chunk-HWFK24UD.js → chunk-JN4N2TMQ.js} +7 -7
- package/dist/chunk-JN4N2TMQ.js.map +1 -0
- package/dist/{chunk-YEU4VEU4.js → chunk-JTW4TGPV.js} +2 -2
- package/dist/{chunk-RRHEV5HA.js → chunk-KLXG4BBO.js} +2 -2
- package/dist/{chunk-YS7KIG3A.js → chunk-NAY25BGS.js} +6 -6
- package/dist/{chunk-RWSLO24I.js → chunk-O7ACJAHR.js} +9 -2
- package/dist/{chunk-RWSLO24I.js.map → chunk-O7ACJAHR.js.map} +1 -1
- package/dist/{chunk-SWVW42CG.js → chunk-OOGGUXAG.js} +2 -2
- package/dist/{chunk-XII2XSHL.js → chunk-P53HGVJS.js} +2 -2
- package/dist/{chunk-U3ZAVRP3.js → chunk-PXJEL55X.js} +2 -2
- package/dist/{chunk-XMAD32BW.js → chunk-RRS5CDB6.js} +2 -2
- package/dist/{chunk-3QAH2S33.js → chunk-SYCVU556.js} +3 -3
- package/dist/{chunk-SW2KEZNX.js → chunk-T4EAQPQQ.js} +2 -2
- package/dist/{chunk-BVC242OS.js → chunk-T4OTDMX4.js} +2 -2
- package/dist/{chunk-ZNFVYUYF.js → chunk-U6QWUFSM.js} +2 -2
- package/dist/{chunk-SDZWOEZH.js → chunk-UJIBXOJA.js} +5 -5
- package/dist/{chunk-CQMEM5CC.js → chunk-WIKOHCQZ.js} +2 -2
- package/dist/{chunk-CVZYPFEH.js → chunk-XJT6LNLY.js} +3 -3
- package/dist/{chunk-46OH3OVK.js → chunk-YXTSUIXC.js} +5 -1
- package/dist/chunk-YXTSUIXC.js.map +1 -0
- package/dist/{cli-DzPVFfGe.d.ts → cli-BXCd2cgK.d.ts} +5 -5
- package/dist/cli.d.ts +10 -10
- package/dist/cli.js +24 -24
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +3 -3
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +3 -3
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +3 -3
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +6 -6
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction.d.ts +3 -2
- package/dist/extraction.js +6 -4
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +418 -418
- package/dist/index.js +33 -33
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-llm.js +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/mcp-memory-inspector-app.d.ts +8 -8
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +4 -4
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +3 -3
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +2 -2
- package/dist/operator-toolkit.js +8 -8
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +3 -3
- package/dist/orchestration/maintenance.js +6 -6
- package/dist/{orchestrator-CQJ8U7En.d.ts → orchestrator-BHfWtvEJ.d.ts} +5 -5
- package/dist/orchestrator.d.ts +6 -6
- package/dist/orchestrator.js +33 -33
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-Cn-kvYeV.d.ts → pipeline-CBYcnmDC.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-oh9VXz1d.d.ts → qmd-BIq-jrV4.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/schemas.d.ts +54 -54
- package/dist/{scope-profiles-EpJG7yKP.d.ts → scope-profiles-DDno-uvy.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/index.d.ts +1 -1
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-DILZEQq3.d.ts → semantic-consolidation-7RIJFDwY.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +9 -9
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-NIyKYD8g.d.ts → storage-DkphZiOJ.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +2 -2
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +2 -2
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-D_fG2ix8.d.ts → types-2q_MRFcM.d.ts} +6 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +3 -3
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-service.ts +0 -46
- package/src/config.test.ts +7 -0
- package/src/config.ts +6 -0
- package/src/extraction-thinking.test.ts +44 -0
- package/src/extraction.ts +12 -0
- package/src/local-llm-thinking.test.ts +13 -1
- package/src/local-llm.ts +2 -1
- package/src/orchestration/qmd-result-resolver.test.ts +103 -0
- package/src/orchestration/qmd-result-resolver.ts +11 -0
- package/src/types.ts +6 -0
- package/dist/chunk-46OH3OVK.js.map +0 -1
- package/dist/chunk-6KIQT7RG.js.map +0 -1
- package/dist/chunk-HWFK24UD.js.map +0 -1
- package/dist/chunk-KN6UGAQB.js.map +0 -1
- package/dist/chunk-YVKF3HEW.js.map +0 -1
- /package/dist/{chunk-H3MDWWGN.js.map → chunk-42DJZZUB.js.map} +0 -0
- /package/dist/{chunk-JRXN5LYL.js.map → chunk-47WFEKT7.js.map} +0 -0
- /package/dist/{chunk-I7DUEPE2.js.map → chunk-4E5H4FPC.js.map} +0 -0
- /package/dist/{chunk-FFF4XIGB.js.map → chunk-5HFIHWOF.js.map} +0 -0
- /package/dist/{chunk-MUQ3BD2C.js.map → chunk-5MDE5MIC.js.map} +0 -0
- /package/dist/{chunk-QLOOCKKE.js.map → chunk-6EJL2O3G.js.map} +0 -0
- /package/dist/{chunk-WSHJAY5M.js.map → chunk-B57BIBXI.js.map} +0 -0
- /package/dist/{chunk-FMMZQDCT.js.map → chunk-BNH2VVWP.js.map} +0 -0
- /package/dist/{chunk-63P3PJED.js.map → chunk-CXFVZ3PK.js.map} +0 -0
- /package/dist/{chunk-7FNHLCQE.js.map → chunk-EEUZQQRJ.js.map} +0 -0
- /package/dist/{chunk-BOP256DB.js.map → chunk-GQOKO77V.js.map} +0 -0
- /package/dist/{chunk-CCNSCRJ2.js.map → chunk-H4MDUPER.js.map} +0 -0
- /package/dist/{chunk-XKFXY3ZA.js.map → chunk-IRX5UCGN.js.map} +0 -0
- /package/dist/{chunk-YEU4VEU4.js.map → chunk-JTW4TGPV.js.map} +0 -0
- /package/dist/{chunk-RRHEV5HA.js.map → chunk-KLXG4BBO.js.map} +0 -0
- /package/dist/{chunk-YS7KIG3A.js.map → chunk-NAY25BGS.js.map} +0 -0
- /package/dist/{chunk-SWVW42CG.js.map → chunk-OOGGUXAG.js.map} +0 -0
- /package/dist/{chunk-XII2XSHL.js.map → chunk-P53HGVJS.js.map} +0 -0
- /package/dist/{chunk-U3ZAVRP3.js.map → chunk-PXJEL55X.js.map} +0 -0
- /package/dist/{chunk-XMAD32BW.js.map → chunk-RRS5CDB6.js.map} +0 -0
- /package/dist/{chunk-3QAH2S33.js.map → chunk-SYCVU556.js.map} +0 -0
- /package/dist/{chunk-SW2KEZNX.js.map → chunk-T4EAQPQQ.js.map} +0 -0
- /package/dist/{chunk-BVC242OS.js.map → chunk-T4OTDMX4.js.map} +0 -0
- /package/dist/{chunk-ZNFVYUYF.js.map → chunk-U6QWUFSM.js.map} +0 -0
- /package/dist/{chunk-SDZWOEZH.js.map → chunk-UJIBXOJA.js.map} +0 -0
- /package/dist/{chunk-CQMEM5CC.js.map → chunk-WIKOHCQZ.js.map} +0 -0
- /package/dist/{chunk-CVZYPFEH.js.map → chunk-XJT6LNLY.js.map} +0 -0
package/dist/types.js
CHANGED
package/dist/verified-recall.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compareVerifiedEpisodeResults,
|
|
3
3
|
searchVerifiedEpisodes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6EJL2O3G.js";
|
|
5
5
|
import "./chunk-B7RWBZXW.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-O7ACJAHR.js";
|
|
7
7
|
import "./chunk-B3ABVQ36.js";
|
|
8
8
|
import "./chunk-2QMKMVHH.js";
|
|
9
9
|
import "./chunk-DEBHXHJR.js";
|
|
@@ -11,7 +11,7 @@ import "./chunk-DNHVPZOD.js";
|
|
|
11
11
|
import "./chunk-6CIAGZ6X.js";
|
|
12
12
|
import "./chunk-J6A3CX5N.js";
|
|
13
13
|
import "./chunk-V57NLO5P.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FJ5IQ3SI.js";
|
|
15
15
|
import "./chunk-XKGPIWGI.js";
|
|
16
16
|
import "./chunk-EGGE52UU.js";
|
|
17
17
|
import "./chunk-GCASGYIO.js";
|
package/dist/write-envelope.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.15.
|
|
3
|
+
"version": "9.15.3",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
"core"
|
|
3046
3046
|
],
|
|
3047
3047
|
"peerDependencies": {
|
|
3048
|
-
"@remnic/coding-graph": "^9.15.
|
|
3048
|
+
"@remnic/coding-graph": "^9.15.3"
|
|
3049
3049
|
},
|
|
3050
3050
|
"peerDependenciesMeta": {
|
|
3051
3051
|
"@remnic/coding-graph": {
|
package/src/access-service.ts
CHANGED
|
@@ -281,52 +281,6 @@ import { EngramAccessInputError, NamespaceNotWritableError } from "./access-erro
|
|
|
281
281
|
// working after these classes moved to ./access-errors (issue #1888).
|
|
282
282
|
export { EngramAccessInputError, NamespaceNotWritableError } from "./access-errors.js";
|
|
283
283
|
|
|
284
|
-
function qmdCollectionPathParts(resultPath: string): {
|
|
285
|
-
collection: string;
|
|
286
|
-
relativePath: string;
|
|
287
|
-
} | null {
|
|
288
|
-
if (!resultPath || nodePath.isAbsolute(resultPath)) return null;
|
|
289
|
-
const normalized = resultPath.replace(/\\/g, "/").replace(/^\/+/, "");
|
|
290
|
-
const slashIndex = normalized.indexOf("/");
|
|
291
|
-
if (slashIndex <= 0 || slashIndex >= normalized.length - 1) return null;
|
|
292
|
-
const collection = normalized.slice(0, slashIndex);
|
|
293
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(collection)) return null;
|
|
294
|
-
return {
|
|
295
|
-
collection,
|
|
296
|
-
relativePath: normalized.slice(slashIndex + 1),
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
function qmdResultPathCandidates(
|
|
301
|
-
storageDir: string,
|
|
302
|
-
resultPath: string,
|
|
303
|
-
): string[] {
|
|
304
|
-
const candidates = new Set<string>();
|
|
305
|
-
const storageRoot = nodePath.resolve(storageDir);
|
|
306
|
-
const addCandidate = (candidate: string) => {
|
|
307
|
-
const resolved = nodePath.resolve(candidate);
|
|
308
|
-
if (isPathInsideStorageRoot(storageRoot, resolved)) {
|
|
309
|
-
candidates.add(resolved);
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
const addRelativeCandidates = (relativePath: string) => {
|
|
313
|
-
const normalized = relativePath.replace(/\\/g, "/").replace(/^\/+/, "");
|
|
314
|
-
if (!normalized) return;
|
|
315
|
-
addCandidate(nodePath.join(storageRoot, normalized));
|
|
316
|
-
if (/^\d{4}-\d{2}-\d{2}\//.test(normalized)) {
|
|
317
|
-
addCandidate(nodePath.join(storageRoot, "facts", normalized));
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
if (nodePath.isAbsolute(resultPath)) {
|
|
322
|
-
addCandidate(resultPath);
|
|
323
|
-
} else {
|
|
324
|
-
addRelativeCandidates(resultPath);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
return [...candidates];
|
|
328
|
-
}
|
|
329
|
-
|
|
330
284
|
export type AccessProfilingReportRequest = {
|
|
331
285
|
format?: string;
|
|
332
286
|
limit?: number;
|
package/src/config.test.ts
CHANGED
|
@@ -1179,6 +1179,13 @@ test('parseConfig localLlmDisableThinking "0"/"no"/"off" all coerce to false', (
|
|
|
1179
1179
|
assert.equal(parseConfig({ localLlmDisableThinking: "off" }).localLlmDisableThinking, false);
|
|
1180
1180
|
});
|
|
1181
1181
|
|
|
1182
|
+
test("parseConfig localLlmThinkingThresholdChars defaults conservatively and accepts zero to disable (#1997)", () => {
|
|
1183
|
+
assert.equal(parseConfig({}).localLlmThinkingThresholdChars, 3_000);
|
|
1184
|
+
assert.equal(parseConfig({ localLlmThinkingThresholdChars: 0 }).localLlmThinkingThresholdChars, 0);
|
|
1185
|
+
assert.equal(parseConfig({ localLlmThinkingThresholdChars: "3000" }).localLlmThinkingThresholdChars, 3_000);
|
|
1186
|
+
assert.equal(parseConfig({ localLlmThinkingThresholdChars: 3_000 }).localLlmThinkingThresholdChars, 3_000);
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1182
1189
|
test("parseConfig procedural numeric fields coerce from CLI-style strings (issue #519)", () => {
|
|
1183
1190
|
const result = parseConfig({
|
|
1184
1191
|
openaiApiKey: "sk-test",
|
package/src/config.ts
CHANGED
|
@@ -2856,6 +2856,12 @@ export function parseConfig(
|
|
|
2856
2856
|
["", "none", "low", "medium", "high", "max"].includes(cfg.localLlmReasoningEffort)
|
|
2857
2857
|
? cfg.localLlmReasoningEffort
|
|
2858
2858
|
: "none",
|
|
2859
|
+
localLlmThinkingThresholdChars: (() => {
|
|
2860
|
+
const threshold = coerceNumber(cfg.localLlmThinkingThresholdChars);
|
|
2861
|
+
return threshold !== undefined && Number.isInteger(threshold) && threshold >= 0
|
|
2862
|
+
? threshold
|
|
2863
|
+
: 3_000;
|
|
2864
|
+
})(),
|
|
2859
2865
|
// Extraction retry/backoff + circuit breaker (extraction hot-loop hardening)
|
|
2860
2866
|
extractionRetryEnabled: coerceBooleanLike(cfg.extractionRetryEnabled) ?? true,
|
|
2861
2867
|
extractionRetryScheduleMs:
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import { shouldEnableLocalExtractionThinking } from "./extraction.js";
|
|
5
|
+
import type { PluginConfig } from "./types.js";
|
|
6
|
+
|
|
7
|
+
function config(overrides: Partial<PluginConfig> = {}): PluginConfig {
|
|
8
|
+
return {
|
|
9
|
+
localLlmDisableThinking: true,
|
|
10
|
+
localLlmThinkingThresholdChars: 3_000,
|
|
11
|
+
...overrides,
|
|
12
|
+
} as PluginConfig;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
test("short local extraction enables thinking when configured (#1997)", () => {
|
|
16
|
+
assert.equal(shouldEnableLocalExtractionThinking(config(), 2_999), true);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test("length-aware local thinking stays disabled at the threshold and above (#1997)", () => {
|
|
20
|
+
assert.equal(shouldEnableLocalExtractionThinking(config(), 3_000), false);
|
|
21
|
+
assert.equal(shouldEnableLocalExtractionThinking(config(), 3_001), false);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test("disabled threshold and explicit global opt-out preserve existing behavior (#1997)", () => {
|
|
25
|
+
assert.equal(shouldEnableLocalExtractionThinking(config({ localLlmThinkingThresholdChars: 0 }), 1), false);
|
|
26
|
+
assert.equal(shouldEnableLocalExtractionThinking(config({ localLlmDisableThinking: false }), 1), false);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("four-transcript selection matrix keeps short sparse cases in thinking mode (#1997)", () => {
|
|
30
|
+
const cases = [
|
|
31
|
+
{ name: "sparse commitment", transcript: "A".repeat(750), thinking: true },
|
|
32
|
+
{ name: "sparse correction", transcript: "B".repeat(1_600), thinking: true },
|
|
33
|
+
{ name: "dense technical discussion", transcript: "C".repeat(3_000), thinking: false },
|
|
34
|
+
{ name: "dense multi-turn discussion", transcript: "D".repeat(6_000), thinking: false },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
for (const scenario of cases) {
|
|
38
|
+
assert.equal(
|
|
39
|
+
shouldEnableLocalExtractionThinking(config(), scenario.transcript.length),
|
|
40
|
+
scenario.thinking,
|
|
41
|
+
scenario.name,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
});
|
package/src/extraction.ts
CHANGED
|
@@ -147,6 +147,15 @@ function normalizeProfileUpdateKey(update: string): string {
|
|
|
147
147
|
return update.trim().toLowerCase();
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
export function shouldEnableLocalExtractionThinking(
|
|
151
|
+
config: Pick<PluginConfig, "localLlmDisableThinking" | "localLlmThinkingThresholdChars">,
|
|
152
|
+
conversationChars: number,
|
|
153
|
+
): boolean {
|
|
154
|
+
return config.localLlmDisableThinking &&
|
|
155
|
+
config.localLlmThinkingThresholdChars > 0 &&
|
|
156
|
+
conversationChars < config.localLlmThinkingThresholdChars;
|
|
157
|
+
}
|
|
158
|
+
|
|
150
159
|
export class ExtractionEngine {
|
|
151
160
|
private client: OpenAI | null;
|
|
152
161
|
private localLlm: LocalLlmClient;
|
|
@@ -1523,6 +1532,9 @@ ${truncatedConversation}`;
|
|
|
1523
1532
|
temperature: 0.1,
|
|
1524
1533
|
maxTokens: contextSizes.maxOutputTokens,
|
|
1525
1534
|
operation: "extraction",
|
|
1535
|
+
disableThinking: shouldEnableLocalExtractionThinking(this.config, conversation.length)
|
|
1536
|
+
? false
|
|
1537
|
+
: undefined,
|
|
1526
1538
|
priority: "background",
|
|
1527
1539
|
},
|
|
1528
1540
|
);
|
|
@@ -83,7 +83,7 @@ function captureFetchBodies(): {
|
|
|
83
83
|
async function runOneChatCompletion(
|
|
84
84
|
client: LocalLlmClient,
|
|
85
85
|
operation: string | null = "extraction",
|
|
86
|
-
options: { forceDisableThinking?: boolean } = {},
|
|
86
|
+
options: { forceDisableThinking?: boolean; disableThinking?: boolean } = {},
|
|
87
87
|
): Promise<void> {
|
|
88
88
|
await client.chatCompletion(
|
|
89
89
|
[{ role: "user", content: "hello" }],
|
|
@@ -344,3 +344,15 @@ test("disableThinking=false never injects chat_template_kwargs, regardless of ba
|
|
|
344
344
|
}
|
|
345
345
|
assert.equal("chat_template_kwargs" in (bodies[0] ?? {}), false);
|
|
346
346
|
});
|
|
347
|
+
|
|
348
|
+
test("request-level thinking override leaves short extraction thinking enabled (#1997)", async () => {
|
|
349
|
+
const client = new LocalLlmClient(createConfig());
|
|
350
|
+
primeClient(client, { thinking: true, detected: "ollama" });
|
|
351
|
+
const { restore, bodies } = captureFetchBodies();
|
|
352
|
+
try {
|
|
353
|
+
await runOneChatCompletion(client, "extraction", { disableThinking: false });
|
|
354
|
+
} finally {
|
|
355
|
+
restore();
|
|
356
|
+
}
|
|
357
|
+
assert.equal("reasoning_effort" in (bodies[0] ?? {}), false);
|
|
358
|
+
});
|
package/src/local-llm.ts
CHANGED
|
@@ -220,6 +220,7 @@ interface LocalLlmChatCompletionOptions {
|
|
|
220
220
|
timeoutMs?: number;
|
|
221
221
|
operation?: string;
|
|
222
222
|
forceDisableThinking?: boolean;
|
|
223
|
+
disableThinking?: boolean;
|
|
223
224
|
priority?: LocalLlmRequestPriority;
|
|
224
225
|
}
|
|
225
226
|
|
|
@@ -989,7 +990,7 @@ export class LocalLlmClient {
|
|
|
989
990
|
// backend hasn't been positively identified as thinking-capable.
|
|
990
991
|
const shouldSuppressThinking =
|
|
991
992
|
options.forceDisableThinking === true ||
|
|
992
|
-
(this._disableThinking &&
|
|
993
|
+
((options.disableThinking ?? this._disableThinking) &&
|
|
993
994
|
THINKING_SUPPRESSED_OPERATIONS.has(operation));
|
|
994
995
|
if (
|
|
995
996
|
shouldSuppressThinking &&
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
import { parseConfig } from "../config.js";
|
|
8
|
+
import { StorageManager } from "../index.js";
|
|
9
|
+
import {
|
|
10
|
+
QmdResultResolver,
|
|
11
|
+
qmdResultPathCandidates,
|
|
12
|
+
} from "./qmd-result-resolver.js";
|
|
13
|
+
|
|
14
|
+
test("qmdResultPathCandidates probes the facts/ fallback for relative date paths", () => {
|
|
15
|
+
const root = path.join(os.tmpdir(), "remnic-resolver-rel");
|
|
16
|
+
const candidates = qmdResultPathCandidates(root, "2026-07-21/fact-x.md");
|
|
17
|
+
assert.deepEqual(
|
|
18
|
+
candidates.sort(),
|
|
19
|
+
[
|
|
20
|
+
path.join(root, "2026-07-21", "fact-x.md"),
|
|
21
|
+
path.join(root, "facts", "2026-07-21", "fact-x.md"),
|
|
22
|
+
].sort(),
|
|
23
|
+
"relative date paths probe both the literal and the facts/ location",
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("qmdResultPathCandidates probes the facts/ fallback for absolute date paths inside the storage root (issue #2111)", () => {
|
|
28
|
+
const root = path.join(os.tmpdir(), "remnic-resolver-abs");
|
|
29
|
+
const absolute = path.join(root, "2026-07-21", "fact-x.md");
|
|
30
|
+
const candidates = qmdResultPathCandidates(root, absolute);
|
|
31
|
+
assert.deepEqual(
|
|
32
|
+
candidates.sort(),
|
|
33
|
+
[absolute, path.join(root, "facts", "2026-07-21", "fact-x.md")].sort(),
|
|
34
|
+
"pre-absolutized date paths must probe the facts/ location too",
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("qmdResultPathCandidates keeps non-date absolute paths literal", () => {
|
|
39
|
+
const root = path.join(os.tmpdir(), "remnic-resolver-abs-nondate");
|
|
40
|
+
const absolute = path.join(root, "entities", "person-x.md");
|
|
41
|
+
assert.deepEqual(
|
|
42
|
+
qmdResultPathCandidates(root, absolute),
|
|
43
|
+
[absolute],
|
|
44
|
+
"non-date absolute paths must not grow a facts/ variant",
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("qmdResultPathCandidates rejects absolute paths outside the storage root", () => {
|
|
49
|
+
const root = path.join(os.tmpdir(), "remnic-resolver-abs-outside");
|
|
50
|
+
const outside = path.join(os.tmpdir(), "elsewhere", "2026-07-21", "fact-x.md");
|
|
51
|
+
assert.deepEqual(
|
|
52
|
+
qmdResultPathCandidates(root, outside),
|
|
53
|
+
[],
|
|
54
|
+
"containment must drop escaping paths, including their facts/ variant",
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test("readQmdResultMemory resolves an absolute date path whose file lives under facts/ (issue #2111)", async () => {
|
|
59
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-resolver-e2e-"));
|
|
60
|
+
try {
|
|
61
|
+
const storage = new StorageManager(dir);
|
|
62
|
+
await storage.ensureDirectories();
|
|
63
|
+
const factDir = path.join(dir, "facts", "2026-07-21");
|
|
64
|
+
await mkdir(factDir, { recursive: true });
|
|
65
|
+
const factPath = path.join(factDir, "fact-cookie-note.md");
|
|
66
|
+
await writeFile(
|
|
67
|
+
factPath,
|
|
68
|
+
[
|
|
69
|
+
"---",
|
|
70
|
+
"id: fact-cookie-note",
|
|
71
|
+
"category: fact",
|
|
72
|
+
"created: 2026-07-21T00:00:00.000Z",
|
|
73
|
+
"updated: 2026-07-21T00:00:00.000Z",
|
|
74
|
+
"status: active",
|
|
75
|
+
"---",
|
|
76
|
+
"",
|
|
77
|
+
"The storefront manages a uniqueId cookie with a 90-day expiration.",
|
|
78
|
+
"",
|
|
79
|
+
].join("\n"),
|
|
80
|
+
"utf8",
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const config = parseConfig({ memoryDir: dir });
|
|
84
|
+
const resolver = new QmdResultResolver({
|
|
85
|
+
getConfig: () => config,
|
|
86
|
+
storageFor: async () => storage,
|
|
87
|
+
storageDirNamespace: () => config.defaultNamespace,
|
|
88
|
+
qmdCollectionNamespaceFromPrefix: () => null,
|
|
89
|
+
namespaceFromPath: () => config.defaultNamespace,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Daemon-mode shape: the result path is already absolutized against the
|
|
93
|
+
// storage root but is missing the facts/ segment because the hot-facts
|
|
94
|
+
// collection was registered at the facts/ subtree.
|
|
95
|
+
const preAbsolutized = path.join(dir, "2026-07-21", "fact-cookie-note.md");
|
|
96
|
+
const memory = await resolver.readQmdResultMemory(preAbsolutized, storage);
|
|
97
|
+
assert.ok(memory, "the memory must resolve via the facts/ fallback");
|
|
98
|
+
assert.equal(memory.frontmatter.id, "fact-cookie-note");
|
|
99
|
+
assert.equal(path.resolve(memory.path), path.resolve(factPath));
|
|
100
|
+
} finally {
|
|
101
|
+
await rm(dir, { recursive: true, force: true });
|
|
102
|
+
}
|
|
103
|
+
});
|
|
@@ -84,6 +84,17 @@ export function qmdResultPathCandidates(
|
|
|
84
84
|
|
|
85
85
|
if (path.isAbsolute(resultPath)) {
|
|
86
86
|
addCandidate(resultPath);
|
|
87
|
+
// Daemon-mode results can arrive pre-absolutized against the storage
|
|
88
|
+
// root while the file lives under facts/<date>/ (hot-facts collection
|
|
89
|
+
// registered at the facts/ subtree — issue #2111). Mirror the relative
|
|
90
|
+
// branch's facts/ fallback; addCandidate re-checks containment.
|
|
91
|
+
const relative = path.relative(storageRoot, path.resolve(resultPath));
|
|
92
|
+
if (relative && !relative.startsWith("..") && !path.isAbsolute(relative)) {
|
|
93
|
+
const normalized = relative.split(path.sep).join("/");
|
|
94
|
+
if (/^\d{4}-\d{2}-\d{2}\//.test(normalized)) {
|
|
95
|
+
addCandidate(path.join(storageRoot, "facts", normalized));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
87
98
|
} else {
|
|
88
99
|
addRelativeCandidates(resultPath);
|
|
89
100
|
}
|
package/src/types.ts
CHANGED
|
@@ -1624,6 +1624,12 @@ export interface PluginConfig extends BoundedJsonlStateConfig {
|
|
|
1624
1624
|
* `chat_template_kwargs`, so this is the only think-off dialect it honors.
|
|
1625
1625
|
* Issue #1996. */
|
|
1626
1626
|
localLlmReasoningEffort: string;
|
|
1627
|
+
/**
|
|
1628
|
+
* Maximum transcript length that re-enables thinking for local extraction.
|
|
1629
|
+
* Set to `0` to keep thinking suppressed for every extraction. Default:
|
|
1630
|
+
* `3000`. Consolidation is unaffected.
|
|
1631
|
+
*/
|
|
1632
|
+
localLlmThinkingThresholdChars: number;
|
|
1627
1633
|
// Extraction retry/backoff + circuit breaker (extraction hot-loop hardening)
|
|
1628
1634
|
/** Master gate. When false, restores pre-change behavior (extractor called on every triggered observe; no gate). */
|
|
1629
1635
|
extractionRetryEnabled: boolean;
|