@remnic/core 9.3.670 → 9.3.672
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-cli.js +22 -22
- package/dist/access-http.d.ts +4 -4
- package/dist/access-http.js +13 -13
- package/dist/access-mcp.d.ts +4 -4
- package/dist/access-mcp.js +12 -12
- package/dist/{access-service-BCuaiNHa.d.ts → access-service-S9oGKPZc.d.ts} +2 -2
- package/dist/access-service.d.ts +4 -4
- package/dist/access-service.js +11 -11
- 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 +3 -3
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +3 -3
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.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/{chunk-UOBLE67F.js → chunk-3IE22DJ2.js} +4 -4
- package/dist/{chunk-BQJUPECT.js → chunk-3OKWZT7F.js} +2 -2
- package/dist/{chunk-XS2CWEHZ.js → chunk-4QZ7H6FN.js} +2 -2
- package/dist/chunk-52LZ42LI.js +25 -0
- package/dist/chunk-52LZ42LI.js.map +1 -0
- package/dist/{chunk-2MXEVL75.js → chunk-6VP3YUCS.js} +2 -2
- package/dist/{chunk-UVUTV7CM.js → chunk-7O5CFNN4.js} +8 -8
- package/dist/{chunk-WXXLSZHA.js → chunk-ATRB6Q25.js} +2 -2
- package/dist/{chunk-46WUVFOD.js → chunk-AYGT6VBC.js} +4 -4
- package/dist/{chunk-KOXGLQS7.js → chunk-B6IUW76R.js} +2 -2
- package/dist/{chunk-AARDBQTA.js → chunk-CTCPB57O.js} +2 -2
- package/dist/{chunk-Q2LQZYQ7.js → chunk-CXKETYZ7.js} +3 -3
- package/dist/{chunk-23EBQ27U.js → chunk-EJYFPRED.js} +2 -2
- package/dist/{chunk-WKMCC4NQ.js → chunk-EUM7CZFM.js} +2 -2
- package/dist/{chunk-AZBV4RRY.js → chunk-FMSDA2D3.js} +1 -1
- package/dist/chunk-FMSDA2D3.js.map +1 -0
- package/dist/{chunk-QHWJG5C5.js → chunk-FP4ISXI3.js} +5 -5
- package/dist/{chunk-SXYCVRLK.js → chunk-GSTYVG5L.js} +3 -3
- package/dist/{chunk-CRO4LCQ6.js → chunk-KJOYHNS7.js} +5 -5
- package/dist/{chunk-XMWF6AU3.js → chunk-LVTTO3VC.js} +2 -2
- package/dist/{chunk-TJ7HH5LB.js → chunk-LZSMQHXC.js} +2 -2
- package/dist/{chunk-PIA4C3AJ.js → chunk-M3WF2AB6.js} +14 -14
- package/dist/{chunk-CTAV55JM.js → chunk-MLVMBV2C.js} +75 -1
- package/dist/chunk-MLVMBV2C.js.map +1 -0
- package/dist/{chunk-QZ7ODIVL.js → chunk-MNUPGYIV.js} +2 -2
- package/dist/{chunk-MR4PJ277.js → chunk-MTJ2LFAJ.js} +2 -2
- package/dist/{chunk-2TCHDANJ.js → chunk-NXBXM7Q6.js} +2 -2
- package/dist/{chunk-TIJYQXDI.js → chunk-OHX52AOS.js} +2 -2
- package/dist/{chunk-PEPHBH2W.js → chunk-PYTATYUV.js} +2 -2
- package/dist/{chunk-JTPXSXHC.js → chunk-V4ZHKCGA.js} +2 -2
- package/dist/{chunk-OI4BXFSB.js → chunk-VL5JJOOY.js} +2 -2
- package/dist/{chunk-A5TEHAR4.js → chunk-ZCVPFDHB.js} +3 -3
- package/dist/{chunk-MPXYHC35.js → chunk-ZQJHKN7J.js} +20 -20
- package/dist/{chunk-4T7P2HLJ.js → chunk-ZUPFMHJA.js} +3 -3
- package/dist/{cli-C98xlwYA.d.ts → cli-B2Ve7R22.d.ts} +3 -3
- package/dist/cli.d.ts +5 -5
- package/dist/cli.js +26 -26
- package/dist/coding/optional-coding-graph.d.ts +63 -0
- package/dist/coding/optional-coding-graph.js +119 -0
- package/dist/coding/optional-coding-graph.js.map +1 -0
- package/dist/coding-graph-types-Dd2tGrnm.d.ts +106 -0
- package/dist/compounding/engine.d.ts +1 -1
- 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 +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +1 -1
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +2 -2
- 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 +1 -1
- package/dist/entity-retrieval.js +3 -3
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +3 -3
- 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 +1 -1
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +39 -33
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +2 -2
- 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 +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.js +3 -3
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/mcp-memory-inspector-app.d.ts +4 -4
- 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 +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +1 -1
- package/dist/namespaces/migrate.js +8 -8
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +1 -1
- package/dist/namespaces/storage.js +3 -3
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +11 -11
- package/dist/{orchestrator-DyP9QYsh.d.ts → orchestrator-7zPqGupX.d.ts} +2 -2
- package/dist/orchestrator.d.ts +3 -3
- package/dist/orchestrator.js +18 -18
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.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-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-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/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- package/dist/retrieval-agents.d.ts +1 -1
- 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/schemas.d.ts +22 -22
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- 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-BICZvQ3C.d.ts → semantic-consolidation-BX9Z9_aK.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 +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/storage.js +2 -2
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.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 +1 -1
- 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 +12 -12
- package/dist/{types-D96bCB3C.d.ts → types-D3pm4NhH.d.ts} +30 -1
- 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/package.json +19 -1
- package/src/coding/coding-graph-types.ts +180 -0
- package/src/coding/coding-knowledge-config.ts +111 -0
- package/src/coding/decision-records.test.ts +434 -0
- package/src/coding/decision-records.ts +507 -0
- package/src/coding/optional-coding-graph-cache.test.ts +86 -0
- package/src/coding/optional-coding-graph-cacheread.test.ts +78 -0
- package/src/coding/optional-coding-graph-concurrent.test.ts +48 -0
- package/src/coding/optional-coding-graph-incompatible.test.ts +98 -0
- package/src/coding/optional-coding-graph-probe.test.ts +34 -0
- package/src/coding/optional-coding-graph.test.ts +117 -0
- package/src/coding/optional-coding-graph.ts +370 -0
- package/src/config.test.ts +118 -0
- package/src/config.ts +3 -2
- package/src/index.ts +22 -0
- package/src/types.ts +35 -0
- package/dist/chunk-AZBV4RRY.js.map +0 -1
- package/dist/chunk-CTAV55JM.js.map +0 -1
- /package/dist/{chunk-UOBLE67F.js.map → chunk-3IE22DJ2.js.map} +0 -0
- /package/dist/{chunk-BQJUPECT.js.map → chunk-3OKWZT7F.js.map} +0 -0
- /package/dist/{chunk-XS2CWEHZ.js.map → chunk-4QZ7H6FN.js.map} +0 -0
- /package/dist/{chunk-2MXEVL75.js.map → chunk-6VP3YUCS.js.map} +0 -0
- /package/dist/{chunk-UVUTV7CM.js.map → chunk-7O5CFNN4.js.map} +0 -0
- /package/dist/{chunk-WXXLSZHA.js.map → chunk-ATRB6Q25.js.map} +0 -0
- /package/dist/{chunk-46WUVFOD.js.map → chunk-AYGT6VBC.js.map} +0 -0
- /package/dist/{chunk-KOXGLQS7.js.map → chunk-B6IUW76R.js.map} +0 -0
- /package/dist/{chunk-AARDBQTA.js.map → chunk-CTCPB57O.js.map} +0 -0
- /package/dist/{chunk-Q2LQZYQ7.js.map → chunk-CXKETYZ7.js.map} +0 -0
- /package/dist/{chunk-23EBQ27U.js.map → chunk-EJYFPRED.js.map} +0 -0
- /package/dist/{chunk-WKMCC4NQ.js.map → chunk-EUM7CZFM.js.map} +0 -0
- /package/dist/{chunk-QHWJG5C5.js.map → chunk-FP4ISXI3.js.map} +0 -0
- /package/dist/{chunk-SXYCVRLK.js.map → chunk-GSTYVG5L.js.map} +0 -0
- /package/dist/{chunk-CRO4LCQ6.js.map → chunk-KJOYHNS7.js.map} +0 -0
- /package/dist/{chunk-XMWF6AU3.js.map → chunk-LVTTO3VC.js.map} +0 -0
- /package/dist/{chunk-TJ7HH5LB.js.map → chunk-LZSMQHXC.js.map} +0 -0
- /package/dist/{chunk-PIA4C3AJ.js.map → chunk-M3WF2AB6.js.map} +0 -0
- /package/dist/{chunk-QZ7ODIVL.js.map → chunk-MNUPGYIV.js.map} +0 -0
- /package/dist/{chunk-MR4PJ277.js.map → chunk-MTJ2LFAJ.js.map} +0 -0
- /package/dist/{chunk-2TCHDANJ.js.map → chunk-NXBXM7Q6.js.map} +0 -0
- /package/dist/{chunk-TIJYQXDI.js.map → chunk-OHX52AOS.js.map} +0 -0
- /package/dist/{chunk-PEPHBH2W.js.map → chunk-PYTATYUV.js.map} +0 -0
- /package/dist/{chunk-JTPXSXHC.js.map → chunk-V4ZHKCGA.js.map} +0 -0
- /package/dist/{chunk-OI4BXFSB.js.map → chunk-VL5JJOOY.js.map} +0 -0
- /package/dist/{chunk-A5TEHAR4.js.map → chunk-ZCVPFDHB.js.map} +0 -0
- /package/dist/{chunk-MPXYHC35.js.map → chunk-ZQJHKN7J.js.map} +0 -0
- /package/dist/{chunk-4T7P2HLJ.js.map → chunk-ZUPFMHJA.js.map} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CODING_GRAPH_ENGINE_VERSION,
|
|
3
|
+
TIER_1_LANGUAGES
|
|
4
|
+
} from "../chunk-52LZ42LI.js";
|
|
5
|
+
import "../chunk-PZ5AY32C.js";
|
|
6
|
+
|
|
7
|
+
// src/coding/optional-coding-graph.ts
|
|
8
|
+
var SPECIFIER = "@remnic/coding-graph";
|
|
9
|
+
function buildCodingGraphInstallHint() {
|
|
10
|
+
return "The `@remnic/coding-graph` engine is optional and not installed in this environment.\n\nInstall it alongside @remnic/core to enable codebase-graph features:\n npm install @remnic/coding-graph\n\nOr add it to a project (pnpm / yarn):\n pnpm add @remnic/coding-graph\n yarn add @remnic/coding-graph\n";
|
|
11
|
+
}
|
|
12
|
+
function notInstalledError() {
|
|
13
|
+
return new Error(buildCodingGraphInstallHint());
|
|
14
|
+
}
|
|
15
|
+
function incompatibleModuleError(actual) {
|
|
16
|
+
const keys = actual && typeof actual === "object" ? Object.keys(actual).slice(0, 8).join(", ") || "(none)" : typeof actual;
|
|
17
|
+
return new Error(
|
|
18
|
+
`\`@remnic/coding-graph\` is present but its module shape does not match the expected contract. The installed build may be stale, broken, or from an incompatible version. Try reinstalling it (\`npm install --force @remnic/coding-graph\`) or pinning to a known working version. Detected exports: ${keys}.`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function isSpecifierNotFoundErrorForCodingGraph(err, specifier = SPECIFIER) {
|
|
22
|
+
if (!err || typeof err !== "object") {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const code = err.code;
|
|
26
|
+
if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const message = err.message;
|
|
30
|
+
if (typeof message !== "string") {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
if (message.includes(`'${specifier}'`)) return true;
|
|
34
|
+
if (message.includes(`"${specifier}"`)) return true;
|
|
35
|
+
const escaped = specifier.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
36
|
+
const boundaryRegex = new RegExp(
|
|
37
|
+
`(?:^|[\\s"'\`\\(])${escaped}(?:[\\s"'\`\\)]|$)`
|
|
38
|
+
);
|
|
39
|
+
return boundaryRegex.test(message);
|
|
40
|
+
}
|
|
41
|
+
function isLoadedCodingGraphModule(value) {
|
|
42
|
+
if (!value || typeof value !== "object") return false;
|
|
43
|
+
const candidate = value;
|
|
44
|
+
return typeof candidate.createCodingGraphEngine === "function" && typeof candidate.CodingGraphError === "function" && typeof candidate.ENGINE_VERSION === "string" && Array.isArray(candidate.TIER_1_LANGUAGES);
|
|
45
|
+
}
|
|
46
|
+
async function tryImportCodingGraphModule() {
|
|
47
|
+
let mod;
|
|
48
|
+
try {
|
|
49
|
+
mod = await import(SPECIFIER);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
if (isSpecifierNotFoundErrorForCodingGraph(err)) {
|
|
52
|
+
return { kind: "missing" };
|
|
53
|
+
}
|
|
54
|
+
return { kind: "broken", cause: err };
|
|
55
|
+
}
|
|
56
|
+
if (!isLoadedCodingGraphModule(mod)) {
|
|
57
|
+
return { kind: "incompatible", actual: mod };
|
|
58
|
+
}
|
|
59
|
+
return { kind: "ok", module: mod };
|
|
60
|
+
}
|
|
61
|
+
async function loadCodingGraphEngineFactory() {
|
|
62
|
+
if (cachedLoadResult !== void 0 && cachedLoadResult !== null) {
|
|
63
|
+
return cachedLoadResult.createCodingGraphEngine;
|
|
64
|
+
}
|
|
65
|
+
const outcome = await tryImportCodingGraphModule();
|
|
66
|
+
switch (outcome.kind) {
|
|
67
|
+
case "ok":
|
|
68
|
+
cachedLoadResult = outcome.module;
|
|
69
|
+
return outcome.module.createCodingGraphEngine;
|
|
70
|
+
case "missing":
|
|
71
|
+
throw notInstalledError();
|
|
72
|
+
case "incompatible":
|
|
73
|
+
throw incompatibleModuleError(outcome.actual);
|
|
74
|
+
case "broken":
|
|
75
|
+
throw outcome.cause instanceof Error ? outcome.cause : new Error(`@remnic/coding-graph failed to load: ${String(outcome.cause)}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function startProbeOnce() {
|
|
79
|
+
if (inFlightProbe !== null) {
|
|
80
|
+
return inFlightProbe;
|
|
81
|
+
}
|
|
82
|
+
const p = tryImportCodingGraphModule().then((outcome) => {
|
|
83
|
+
if (outcome.kind === "ok") {
|
|
84
|
+
cachedLoadResult = outcome.module;
|
|
85
|
+
return outcome.module;
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}).catch(() => {
|
|
89
|
+
return null;
|
|
90
|
+
});
|
|
91
|
+
inFlightProbe = p;
|
|
92
|
+
p.finally(() => {
|
|
93
|
+
if (inFlightProbe === p) {
|
|
94
|
+
inFlightProbe = null;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return p;
|
|
98
|
+
}
|
|
99
|
+
var cachedLoadResult;
|
|
100
|
+
var inFlightProbe = null;
|
|
101
|
+
async function isCodingGraphInstalled() {
|
|
102
|
+
return await tryLoadCodingGraphModule() !== null;
|
|
103
|
+
}
|
|
104
|
+
async function tryLoadCodingGraphModule() {
|
|
105
|
+
if (cachedLoadResult !== void 0 && cachedLoadResult !== null) {
|
|
106
|
+
return cachedLoadResult;
|
|
107
|
+
}
|
|
108
|
+
return startProbeOnce();
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
CODING_GRAPH_ENGINE_VERSION,
|
|
112
|
+
TIER_1_LANGUAGES,
|
|
113
|
+
buildCodingGraphInstallHint,
|
|
114
|
+
isCodingGraphInstalled,
|
|
115
|
+
isSpecifierNotFoundErrorForCodingGraph,
|
|
116
|
+
loadCodingGraphEngineFactory,
|
|
117
|
+
tryLoadCodingGraphModule
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=optional-coding-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/coding/optional-coding-graph.ts"],"sourcesContent":["// Lazy loader for the optional @remnic/coding-graph package.\n//\n// Remnic's core is installed à-la-carte: users who only need memory\n// features should not have to install codebase-graph tooling, so\n// @remnic/coding-graph is an optional peer dependency, not a bundled\n// dependency. Any code path that actually needs the graph engine calls\n// loadCodingGraphEngineFactory() or one of the try* helpers; the loader\n// either returns the engine factory or throws a user-facing install hint.\n//\n// Justification for the dynamic import:\n// CLAUDE.md rule 57 / AGENTS.md rule 44 require à-la-carte optional\n// workspace packages to be loaded via a *computed-specifier* dynamic\n// import. Static `import \"@remnic/coding-graph\"` would either fail the\n// base install when the optional package is absent or — worse — force\n// the bundler to bundle it into @remnic/core's dist. Concat'ing the\n// specifier from string literals keeps the dynamic import a runtime\n// call. The same pattern is canonical in\n// packages/remnic-cli/src/optional-bench.ts and\n// packages/remnic-cli/src/optional-module-loader.ts; we mirror it here\n// because core, not the CLI, owns the engine entry point.\n//\n// Type-source direction:\n// The CodingGraphEngine interface and supporting IR types live in\n// packages/remnic-core/src/coding/coding-graph-types.ts (a local\n// types-only module). They are owned by core; @remnic/coding-graph\n// imports them and implements against them. This breaks the type\n// cycle that would otherwise require core to resolve\n// @remnic/coding-graph at compile time. Core's tsup DTS phase emits\n// declarations against the package's compiled output — this would\n// fail in CI's fresh base install where the optional peer is not\n// symlinked. With the types owned locally, the loader types its\n// dynamic-import result through the local shape (validated at runtime\n// via a structural check, not via TS) so the base install compiles.\n//\n// Failure-mode policy:\n// - Missing optional package → install hint (loadCodingGraphEngineFactory\n// throws the canonical user-facing message).\n// - Present-but-mismatched install (the optional package resolves to a\n// module that does not satisfy the structural contract) →\n// `module_load_failed` Error on the loadFactory path; probe paths\n// return null with no throw (graceful degradation). User sees a\n// real diagnostic telling them the install is broken — NOT the\n// \"npm install @remnic/coding-graph\" install hint, which would\n// mislead users into re-installing a package that is already there.\n// - Present-but-broken install (transitive dep missing, loader\n// fault, etc.) → underlying import error is rethrown on the\n// loadFactory path; probe paths swallow and return null.\n// - Three separate cache slots, kept strictly disjoint:\n// (a) `cachedLoadResult` — successful-module cache, read by both\n// loadFactory and tryLoad. Never populated on missing or\n// broken installs (preserves the \"users see the real\n// diagnostic\" invariant).\n// (b) `inFlightProbe` — in-flight promise slot shared by concurrent\n// probe callers; cleared once settled.\n// (c) (No \"absent result\" cache.) loadFactory ALWAYS attempts a\n// fresh import on a fresh call — never serves a stale\n// decision from a previous attempt.\n\nimport {\n CODING_GRAPH_ENGINE_VERSION,\n TIER_1_LANGUAGES,\n type CodingGraphEngine,\n type CodingGraphErrorCode,\n type CodingGraphLanguage,\n type CreateCodingGraphEngineOptions,\n type FileIR,\n type ParseFileInput,\n type ParseResult,\n type SymbolIR,\n} from \"./coding-graph-types.js\";\n\nconst SPECIFIER = \"@remnic/\" + \"coding-graph\";\n\n/**\n * Structural minimal shape of `@remnic/coding-graph`'s public surface,\n * as seen by core after a successful dynamic import. We narrow to\n * `unknown` first (since the dynamic import returns `any` at runtime)\n * and then to this interface only after the runtime check below.\n */\ninterface LoadedCodingGraphModule {\n ENGINE_VERSION: string;\n TIER_1_LANGUAGES: readonly CodingGraphLanguage[];\n CodingGraphError: new (\n code: CodingGraphErrorCode,\n message: string,\n engineVersion?: string,\n ) => Error;\n createCodingGraphEngine: (\n options?: CreateCodingGraphEngineOptions,\n ) => CodingGraphEngine;\n}\n\n/**\n * Outcome of a single import attempt. The probe path collapses\n * \"missing\" and \"incompatible\" into `null` (graceful degradation);\n * the loader path distinguishes the two so users get an accurate\n * diagnostic instead of a misleading install hint on a broken install.\n */\ntype ImportAttemptOutcome =\n | { readonly kind: \"ok\"; readonly module: LoadedCodingGraphModule }\n | { readonly kind: \"missing\" }\n | { readonly kind: \"incompatible\"; readonly actual: unknown }\n | { readonly kind: \"broken\"; readonly cause: unknown };\n\n/**\n * Build the user-facing install hint message. Exported so tests can assert\n * on the exact text (CLAUDE.md rule 51 / issue #1551 prove-fail-before).\n */\nexport function buildCodingGraphInstallHint(): string {\n return (\n \"The `@remnic/coding-graph` engine is optional and not installed in this environment.\\n\" +\n \"\\n\" +\n \"Install it alongside @remnic/core to enable codebase-graph features:\\n\" +\n \" npm install @remnic/coding-graph\\n\" +\n \"\\n\" +\n \"Or add it to a project (pnpm / yarn):\\n\" +\n \" pnpm add @remnic/coding-graph\\n\" +\n \" yarn add @remnic/coding-graph\\n\"\n );\n}\n\nfunction notInstalledError(): Error {\n return new Error(buildCodingGraphInstallHint());\n}\n\n/**\n * Build the present-but-incompatible diagnostic. The user has the\n * package installed but it does not satisfy the structural contract;\n * \"npm install @remnic/coding-graph\" would NOT help them (the package\n * is already there). Tell them to reinstall or open an issue.\n */\nfunction incompatibleModuleError(actual: unknown): Error {\n const keys =\n actual && typeof actual === \"object\"\n ? Object.keys(actual).slice(0, 8).join(\", \") || \"(none)\"\n : typeof actual;\n return new Error(\n \"`@remnic/coding-graph` is present but its module shape does not match \" +\n \"the expected contract. The installed build may be stale, broken, or \" +\n \"from an incompatible version. Try reinstalling it \" +\n \"(`npm install --force @remnic/coding-graph`) or pinning to a known \" +\n `working version. Detected exports: ${keys}.`,\n );\n}\n\n/**\n * Return true when `err` is a module-not-found failure for exactly the\n * `@remnic/coding-graph` specifier. Same boundary-aware regex as\n * packages/remnic-cli/src/optional-module-loader.ts so transitive\n * misses (a broken @remnic/coding-graph release) bubble up rather than\n * being mis-reported as \"run npm install\".\n *\n * Exported for tests; the production loaders call the internal alias\n * below.\n */\nexport function isSpecifierNotFoundErrorForCodingGraph(\n err: unknown,\n specifier: string = SPECIFIER,\n): boolean {\n if (!err || typeof err !== \"object\") {\n return false;\n }\n const code = (err as { code?: unknown }).code;\n if (code !== \"ERR_MODULE_NOT_FOUND\" && code !== \"MODULE_NOT_FOUND\") {\n return false;\n }\n const message = (err as { message?: unknown }).message;\n if (typeof message !== \"string\") {\n return false;\n }\n if (message.includes(`'${specifier}'`)) return true;\n if (message.includes(`\"${specifier}\"`)) return true;\n // Boundary guard so \"@remnic/coding-graph\" does not match\n // \"@remnic/coding-graph-foo\".\n const escaped = specifier.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const boundaryRegex = new RegExp(\n `(?:^|[\\\\s\"'\\`\\\\(])${escaped}(?:[\\\\s\"'\\`\\\\)]|$)`,\n );\n return boundaryRegex.test(message);\n}\n\n/**\n * Narrow a dynamic import result to the local LoadedCodingGraphModule\n * shape via a runtime structural check (never inline-as casting).\n * The cast-through-unknown double-step satisfies the rule that\n * \"unchecked casts\" must be justified; here the check is the runtime\n * predicate below.\n */\nfunction isLoadedCodingGraphModule(value: unknown): value is LoadedCodingGraphModule {\n if (!value || typeof value !== \"object\") return false;\n const candidate = value as Record<string, unknown>;\n return (\n typeof candidate.createCodingGraphEngine === \"function\" &&\n typeof candidate.CodingGraphError === \"function\" &&\n typeof candidate.ENGINE_VERSION === \"string\" &&\n Array.isArray(candidate.TIER_1_LANGUAGES)\n );\n}\n\n/**\n * Single import attempt. Returns a tagged-outcome object so callers\n * can distinguish \"not installed\" from \"incompatible build\" from\n * \"broken transitive dep\" — each gets its own diagnostic on the\n * user-facing path.\n *\n * Never reads from any cache; the calling function decides whether\n * to consult the success cache first.\n */\nasync function tryImportCodingGraphModule(): Promise<ImportAttemptOutcome> {\n // The dynamic `import()` with a runtime-concatenated specifier is the\n // documented à-la-carte loader pattern. See file header.\n let mod: unknown;\n try {\n // Cast through `unknown` is justified here: the dynamic import below\n // is the LOADING BOUNDARY between core (no compile-time dependency on\n // @remnic/coding-graph by design — see file header) and the optional\n // package whose shape we have documented locally. We validate the\n // structural shape before using any of the cast fields, so the cast\n // asserts the boundary, not specific fields.\n mod = (await import(SPECIFIER)) as unknown;\n } catch (err) {\n if (isSpecifierNotFoundErrorForCodingGraph(err)) {\n return { kind: \"missing\" };\n }\n // Non-specifier error (broken transitive dep, loader fault, etc.)\n // is wrapped so the loader can surface the diagnostic on a fresh\n // attempt and the probe path can still swallow.\n return { kind: \"broken\", cause: err };\n }\n if (!isLoadedCodingGraphModule(mod)) {\n return { kind: \"incompatible\", actual: mod };\n }\n return { kind: \"ok\", module: mod };\n}\n\n/**\n * Load `@remnic/coding-graph` if installed and return its\n * `createCodingGraphEngine` factory. Throws a user-facing diagnostic\n * that distinguishes three failure modes:\n * - missing → install hint (canonical \"npm install ...\" message).\n * - incompatible → \"package shape mismatch\" diagnostic.\n * - broken → rethrows the original import error.\n *\n * Reuses the cached success path so repeated calls in the same\n * process do not re-import. On success the resolved module is cached\n * and shared with the try* helpers; a failure never poisons the cache\n * so each call attempts a fresh import.\n */\nexport async function loadCodingGraphEngineFactory(): Promise<\n (options?: CreateCodingGraphEngineOptions) => CodingGraphEngine\n> {\n // Fast path: a previous successful load populated cachedLoadResult.\n // Reading it here matches the CLI `loadBenchModule` pattern and the\n // probe path's convention of sharing the success result (Cursor\n // Bugbot P3 round 5: \"Loader skips success cache\"). The fast path is\n // intentionally read-only — we never write the success cache from\n // the probe or fail-fast paths, so a probe that returned null cannot\n // convert into a stale loader result here.\n if (cachedLoadResult !== undefined && cachedLoadResult !== null) {\n return cachedLoadResult.createCodingGraphEngine;\n }\n // Fresh attempt — never inherited from a probe failure. Users see\n // the real diagnostic on broken installs.\n const outcome = await tryImportCodingGraphModule();\n switch (outcome.kind) {\n case \"ok\":\n cachedLoadResult = outcome.module;\n return outcome.module.createCodingGraphEngine;\n case \"missing\":\n throw notInstalledError();\n case \"incompatible\":\n throw incompatibleModuleError(outcome.actual);\n case \"broken\":\n throw outcome.cause instanceof Error\n ? outcome.cause\n : new Error(`@remnic/coding-graph failed to load: ${String(outcome.cause)}`);\n }\n}\n\n/**\n * Run the probe attempt with a Promise slot so concurrent callers\n * await the same in-flight import (Cursor Bugbot P2 round 4).\n * Successful results are also written into `cachedLoadResult` so a\n * SUBSEQUENT loadCodingGraphEngineFactory skips the import (the\n * success-cache fast path above). All non-ok outcomes (missing,\n * incompatible, broken) are collapsed to `null` so the probe stays\n * boolean-safe for gate-off consumers.\n */\nfunction startProbeOnce(): Promise<LoadedCodingGraphModule | null> {\n if (inFlightProbe !== null) {\n return inFlightProbe;\n }\n const p = tryImportCodingGraphModule()\n .then((outcome) => {\n if (outcome.kind === \"ok\") {\n cachedLoadResult = outcome.module;\n return outcome.module;\n }\n return null;\n })\n .catch(() => {\n // Defensive: tryImportCodingGraphModule does not reject in\n // practice (we wrap all throws), but a future refactor could\n // regress it — keep the probe boolean-safe.\n return null as LoadedCodingGraphModule | null;\n });\n inFlightProbe = p;\n // Once settled, clear the in-flight slot so a future call after a\n // long delay still re-attempts. The successful module result lives\n // on in cachedLoadResult if it succeeded.\n p.finally(() => {\n if (inFlightProbe === p) {\n inFlightProbe = null;\n }\n });\n return p;\n}\n\n// ---------------------------------------------------------------------------\n// Cache slots — see file header for the failure-mode policy that justifies\n// these being three separate slots.\n// ---------------------------------------------------------------------------\nlet cachedLoadResult: LoadedCodingGraphModule | null | undefined;\nlet inFlightProbe: Promise<LoadedCodingGraphModule | null> | null = null;\n\n/**\n * Return `true` only when `@remnic/coding-graph` is installed AND\n * importable in a usable shape. Returns `false` for missing, broken,\n * or incompatible installs. Never throws.\n */\nexport async function isCodingGraphInstalled(): Promise<boolean> {\n return (await tryLoadCodingGraphModule()) !== null;\n}\n\n/**\n * Return the engine factory module if `@remnic/coding-graph` is\n * installed AND importable in a usable shape, or `null` otherwise.\n * Use this for graceful-degradation code paths. Never throws.\n *\n * Uses an in-flight-promise slot so concurrent callers share the same\n * import attempt, then caches the successful result so subsequent\n * loadFactory calls skip the import.\n */\nexport async function tryLoadCodingGraphModule(): Promise<LoadedCodingGraphModule | null> {\n // Fast path: a previous loadFactory call stored a successful module.\n if (cachedLoadResult !== undefined && cachedLoadResult !== null) {\n return cachedLoadResult;\n }\n return startProbeOnce();\n}\n\n// ---------------------------------------------------------------------------\n// Re-export the engine contract types and stable constants so callers can\n// stay in `core` (no host prefix; the engine contract is owned by core).\n// ---------------------------------------------------------------------------\nexport {\n CODING_GRAPH_ENGINE_VERSION,\n TIER_1_LANGUAGES,\n};\n\nexport type {\n CodingGraphEngine,\n CodingGraphErrorCode,\n CodingGraphLanguage,\n CreateCodingGraphEngineOptions,\n FileIR,\n ParseFileInput,\n ParseResult,\n SymbolIR,\n};\n"],"mappings":";;;;;;;AAuEA,IAAM,YAAY;AAqCX,SAAS,8BAAsC;AACpD,SACE;AASJ;AAEA,SAAS,oBAA2B;AAClC,SAAO,IAAI,MAAM,4BAA4B,CAAC;AAChD;AAQA,SAAS,wBAAwB,QAAwB;AACvD,QAAM,OACJ,UAAU,OAAO,WAAW,WACxB,OAAO,KAAK,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,KAAK,WAC9C,OAAO;AACb,SAAO,IAAI;AAAA,IACT,ySAIwC,IAAI;AAAA,EAC9C;AACF;AAYO,SAAS,uCACd,KACA,YAAoB,WACX;AACT,MAAI,CAAC,OAAO,OAAO,QAAQ,UAAU;AACnC,WAAO;AAAA,EACT;AACA,QAAM,OAAQ,IAA2B;AACzC,MAAI,SAAS,0BAA0B,SAAS,oBAAoB;AAClE,WAAO;AAAA,EACT;AACA,QAAM,UAAW,IAA8B;AAC/C,MAAI,OAAO,YAAY,UAAU;AAC/B,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,SAAS,IAAI,SAAS,GAAG,EAAG,QAAO;AAC/C,MAAI,QAAQ,SAAS,IAAI,SAAS,GAAG,EAAG,QAAO;AAG/C,QAAM,UAAU,UAAU,QAAQ,uBAAuB,MAAM;AAC/D,QAAM,gBAAgB,IAAI;AAAA,IACxB,qBAAqB,OAAO;AAAA,EAC9B;AACA,SAAO,cAAc,KAAK,OAAO;AACnC;AASA,SAAS,0BAA0B,OAAkD;AACnF,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;AAChD,QAAM,YAAY;AAClB,SACE,OAAO,UAAU,4BAA4B,cAC7C,OAAO,UAAU,qBAAqB,cACtC,OAAO,UAAU,mBAAmB,YACpC,MAAM,QAAQ,UAAU,gBAAgB;AAE5C;AAWA,eAAe,6BAA4D;AAGzE,MAAI;AACJ,MAAI;AAOF,UAAO,MAAM,OAAO;AAAA,EACtB,SAAS,KAAK;AACZ,QAAI,uCAAuC,GAAG,GAAG;AAC/C,aAAO,EAAE,MAAM,UAAU;AAAA,IAC3B;AAIA,WAAO,EAAE,MAAM,UAAU,OAAO,IAAI;AAAA,EACtC;AACA,MAAI,CAAC,0BAA0B,GAAG,GAAG;AACnC,WAAO,EAAE,MAAM,gBAAgB,QAAQ,IAAI;AAAA,EAC7C;AACA,SAAO,EAAE,MAAM,MAAM,QAAQ,IAAI;AACnC;AAeA,eAAsB,+BAEpB;AAQA,MAAI,qBAAqB,UAAa,qBAAqB,MAAM;AAC/D,WAAO,iBAAiB;AAAA,EAC1B;AAGA,QAAM,UAAU,MAAM,2BAA2B;AACjD,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK;AACH,yBAAmB,QAAQ;AAC3B,aAAO,QAAQ,OAAO;AAAA,IACxB,KAAK;AACH,YAAM,kBAAkB;AAAA,IAC1B,KAAK;AACH,YAAM,wBAAwB,QAAQ,MAAM;AAAA,IAC9C,KAAK;AACH,YAAM,QAAQ,iBAAiB,QAC3B,QAAQ,QACR,IAAI,MAAM,wCAAwC,OAAO,QAAQ,KAAK,CAAC,EAAE;AAAA,EACjF;AACF;AAWA,SAAS,iBAA0D;AACjE,MAAI,kBAAkB,MAAM;AAC1B,WAAO;AAAA,EACT;AACA,QAAM,IAAI,2BAA2B,EAClC,KAAK,CAAC,YAAY;AACjB,QAAI,QAAQ,SAAS,MAAM;AACzB,yBAAmB,QAAQ;AAC3B,aAAO,QAAQ;AAAA,IACjB;AACA,WAAO;AAAA,EACT,CAAC,EACA,MAAM,MAAM;AAIX,WAAO;AAAA,EACT,CAAC;AACH,kBAAgB;AAIhB,IAAE,QAAQ,MAAM;AACd,QAAI,kBAAkB,GAAG;AACvB,sBAAgB;AAAA,IAClB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAMA,IAAI;AACJ,IAAI,gBAAgE;AAOpE,eAAsB,yBAA2C;AAC/D,SAAQ,MAAM,yBAAyB,MAAO;AAChD;AAWA,eAAsB,2BAAoE;AAExF,MAAI,qBAAqB,UAAa,qBAAqB,MAAM;AAC/D,WAAO;AAAA,EACT;AACA,SAAO,eAAe;AACxB;","names":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
declare const CODING_GRAPH_ENGINE_VERSION: "0.1.0-pr1";
|
|
2
|
+
declare const TIER_1_LANGUAGES: readonly ["typescript", "tsx", "javascript", "python", "go", "rust", "java", "c", "cpp", "csharp", "ruby", "php", "kotlin", "swift", "bash"];
|
|
3
|
+
type CodingGraphLanguage = (typeof TIER_1_LANGUAGES)[number];
|
|
4
|
+
type CodingGraphErrorCode = "not_implemented" | "module_load_failed";
|
|
5
|
+
interface CodingGraphEngine {
|
|
6
|
+
/** Engine version reported at construction time. */
|
|
7
|
+
readonly engineVersion: string;
|
|
8
|
+
/** Tier-1 languages this build supports (PR2 narrows by grammar availability). */
|
|
9
|
+
readonly supportedLanguages: readonly CodingGraphLanguage[];
|
|
10
|
+
/**
|
|
11
|
+
* Parse a single source file and emit its FileIR.
|
|
12
|
+
*
|
|
13
|
+
* PR1 throws `CodingGraphError("not_implemented", …)`. PR2 will return
|
|
14
|
+
* `ParseResult`; failure paths come back as
|
|
15
|
+
* `{ ok: false, code: "parse_failed", path, message }` (rule 44) rather
|
|
16
|
+
* than partial / silent IR.
|
|
17
|
+
*/
|
|
18
|
+
parseFile(input: ParseFileInput): Promise<ParseResult>;
|
|
19
|
+
/** Engine lifecycle — release any cached parsers/grammars. */
|
|
20
|
+
dispose(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
interface ParseFileInput {
|
|
23
|
+
/** Repository-relative path (forward slashes; no leading `./`). */
|
|
24
|
+
readonly path: string;
|
|
25
|
+
/** Raw file bytes; hashing happens inside the engine (rule 23). */
|
|
26
|
+
readonly content: Uint8Array;
|
|
27
|
+
/**
|
|
28
|
+
* Optional override. When omitted the engine sniffs the language from
|
|
29
|
+
* `path` extensions against its built-in tier-1 list (PR2).
|
|
30
|
+
*/
|
|
31
|
+
readonly language?: CodingGraphLanguage;
|
|
32
|
+
}
|
|
33
|
+
type ParseResult = {
|
|
34
|
+
readonly ok: true;
|
|
35
|
+
readonly ir: FileIR;
|
|
36
|
+
} | {
|
|
37
|
+
readonly ok: false;
|
|
38
|
+
readonly code: "parse_failed";
|
|
39
|
+
readonly path: string;
|
|
40
|
+
readonly message: string;
|
|
41
|
+
};
|
|
42
|
+
interface FileIR {
|
|
43
|
+
readonly path: string;
|
|
44
|
+
readonly language: CodingGraphLanguage;
|
|
45
|
+
/** SHA-256 of the raw bytes; rule 23 — every consumer hashes the same form. */
|
|
46
|
+
readonly contentHash: string;
|
|
47
|
+
readonly symbols: readonly SymbolIR[];
|
|
48
|
+
readonly imports: readonly ImportIR[];
|
|
49
|
+
readonly exports: readonly ExportIR[];
|
|
50
|
+
readonly callSites: readonly CallSiteIR[];
|
|
51
|
+
readonly routes: readonly RouteIR[];
|
|
52
|
+
}
|
|
53
|
+
interface SymbolIR {
|
|
54
|
+
readonly kind: "function" | "class" | "method" | "interface" | "enum" | "type" | "module";
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly qualifiedName: string;
|
|
57
|
+
/** Half-open byte span `[startByte, endByte)`. Rule 35. */
|
|
58
|
+
readonly span: {
|
|
59
|
+
readonly startByte: number;
|
|
60
|
+
readonly endByte: number;
|
|
61
|
+
};
|
|
62
|
+
readonly parentQualifiedName?: string;
|
|
63
|
+
}
|
|
64
|
+
interface ImportIR {
|
|
65
|
+
/** Raw module specifier as written in source. */
|
|
66
|
+
readonly module: string;
|
|
67
|
+
readonly importedNames: readonly string[];
|
|
68
|
+
readonly span: {
|
|
69
|
+
readonly startByte: number;
|
|
70
|
+
readonly endByte: number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
interface ExportIR {
|
|
74
|
+
readonly name: string;
|
|
75
|
+
readonly span: {
|
|
76
|
+
readonly startByte: number;
|
|
77
|
+
readonly endByte: number;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface CallSiteIR {
|
|
81
|
+
readonly calleeNameCandidates: readonly string[];
|
|
82
|
+
readonly span: {
|
|
83
|
+
readonly startByte: number;
|
|
84
|
+
readonly endByte: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
interface RouteIR {
|
|
88
|
+
/** HTTP verb in upper-case, or framework-native verb (e.g. "ANY"). */
|
|
89
|
+
readonly verb: string;
|
|
90
|
+
readonly pathTemplate: string;
|
|
91
|
+
readonly handlerQualifiedName: string;
|
|
92
|
+
readonly span: {
|
|
93
|
+
readonly startByte: number;
|
|
94
|
+
readonly endByte: number;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Reserved for PR2. Declared now so the public surface is stable; the
|
|
99
|
+
* options object is intentionally empty in PR1.
|
|
100
|
+
*/
|
|
101
|
+
interface CreateCodingGraphEngineOptions {
|
|
102
|
+
/** Reserved for PR2: extra grammar directory supplied by the operator. */
|
|
103
|
+
readonly grammarDir?: never;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { type CreateCodingGraphEngineOptions as C, type FileIR as F, type ParseFileInput as P, type SymbolIR as S, TIER_1_LANGUAGES as T, type CodingGraphEngine as a, type CodingGraphLanguage as b, type CodingGraphErrorCode as c, CODING_GRAPH_ENGINE_VERSION as d, type ParseResult as e };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from '../storage.js';
|
|
2
|
-
import { P as PluginConfig } from '../types-
|
|
2
|
+
import { P as PluginConfig } from '../types-D3pm4NhH.js';
|
|
3
3
|
import { SharedFeedbackEntry } from '../shared-context/manager.js';
|
|
4
4
|
import '../page-versioning.js';
|
|
5
5
|
import '../consolidation-operator.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompoundingEngine,
|
|
3
3
|
defaultTierMigrationCycleBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-B6IUW76R.js";
|
|
5
5
|
import "../chunk-DRD2Q7HQ.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-EUM7CZFM.js";
|
|
7
7
|
import "../chunk-M7XQSUBB.js";
|
|
8
8
|
import "../chunk-5UZXUTVO.js";
|
|
9
9
|
import "../chunk-5GPPACXK.js";
|
|
10
10
|
import "../chunk-J6A3CX5N.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-FMSDA2D3.js";
|
|
12
12
|
import "../chunk-AWJ2FHCF.js";
|
|
13
13
|
import "../chunk-42JKGUFJ.js";
|
|
14
14
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a8 as CompressionGuidelineOptimizerEventCounts, a9 as CompressionGuidelineOptimizerActionSummary, aa as CompressionGuidelineOptimizerRuleUpdate, ab as MemoryActionType, m as MemoryActionEvent, C as CompressionGuidelineOptimizerState } from './types-
|
|
1
|
+
import { a8 as CompressionGuidelineOptimizerEventCounts, a9 as CompressionGuidelineOptimizerActionSummary, aa as CompressionGuidelineOptimizerRuleUpdate, ab as MemoryActionType, m as MemoryActionEvent, C as CompressionGuidelineOptimizerState } from './types-D3pm4NhH.js';
|
|
2
2
|
import './types-ByK7T3L6.js';
|
|
3
3
|
import './index-DJ9QWMw-.js';
|
|
4
4
|
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PluginConfig, g as MemoryFile } from '../types-
|
|
1
|
+
import { P as PluginConfig, g as MemoryFile } from '../types-D3pm4NhH.js';
|
|
2
2
|
import { RolloutSummaryInput, MaterializeResult } from './codex-materialize.js';
|
|
3
3
|
import '../types-ByK7T3L6.js';
|
|
4
4
|
import '../index-DJ9QWMw-.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runCodexMaterialize,
|
|
3
3
|
runPostConsolidationMaterialize
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-CTCPB57O.js";
|
|
5
5
|
import "../chunk-LN4YGHTM.js";
|
|
6
6
|
import "../chunk-3UXOZBHV.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-EUM7CZFM.js";
|
|
8
8
|
import "../chunk-M7XQSUBB.js";
|
|
9
9
|
import "../chunk-5UZXUTVO.js";
|
|
10
10
|
import "../chunk-5GPPACXK.js";
|
|
11
11
|
import "../chunk-J6A3CX5N.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-FMSDA2D3.js";
|
|
13
13
|
import "../chunk-AWJ2FHCF.js";
|
|
14
14
|
import "../chunk-42JKGUFJ.js";
|
|
15
15
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { MATERIALIZE_VERSION, MaterializeOptions, MaterializeResult, MemoryMdValidation, RolloutSummaryInput, SENTINEL_FILE, TMP_DIR, approximateTokenCount, describeMemoriesDir, ensureSentinel, materializeForNamespace, renderMemoryMd, renderMemorySummary, renderRawMemories, renderRolloutSummary, truncateToTokenBudget, validateMemoryMd } from './codex-materialize.js';
|
|
2
2
|
export { RunMaterializeOptions, runCodexMaterialize } from './codex-materialize-runner.js';
|
|
3
|
-
import { P as PluginConfig } from '../types-
|
|
3
|
+
import { P as PluginConfig } from '../types-D3pm4NhH.js';
|
|
4
4
|
import '../types-ByK7T3L6.js';
|
|
5
5
|
import '../index-DJ9QWMw-.js';
|
|
6
6
|
|
package/dist/connectors/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import "../chunk-UG274TNV.js";
|
|
28
28
|
import {
|
|
29
29
|
runCodexMaterialize
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-CTCPB57O.js";
|
|
31
31
|
import {
|
|
32
32
|
MATERIALIZE_VERSION,
|
|
33
33
|
SENTINEL_FILE,
|
|
@@ -48,12 +48,12 @@ import {
|
|
|
48
48
|
coerceInstallExtension
|
|
49
49
|
} from "../chunk-PHK3HARR.js";
|
|
50
50
|
import "../chunk-O75CRYGF.js";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-EUM7CZFM.js";
|
|
52
52
|
import "../chunk-M7XQSUBB.js";
|
|
53
53
|
import "../chunk-5UZXUTVO.js";
|
|
54
54
|
import "../chunk-5GPPACXK.js";
|
|
55
55
|
import "../chunk-J6A3CX5N.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-FMSDA2D3.js";
|
|
57
57
|
import "../chunk-AWJ2FHCF.js";
|
|
58
58
|
import "../chunk-42JKGUFJ.js";
|
|
59
59
|
import "../chunk-RULE4VG5.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import './page-versioning.js';
|
|
3
3
|
import './consolidation-operator.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-D3pm4NhH.js';
|
|
5
5
|
import './types-ByK7T3L6.js';
|
|
6
6
|
import './index-DJ9QWMw-.js';
|
|
7
7
|
import './memory-projection-store.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import { VersioningConfig } from './page-versioning.js';
|
|
3
3
|
import './consolidation-operator.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-D3pm4NhH.js';
|
|
5
5
|
import './types-ByK7T3L6.js';
|
|
6
6
|
import './index-DJ9QWMw-.js';
|
|
7
7
|
import './memory-projection-store.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from '../storage.js';
|
|
2
|
-
import { h as MemoryStatus, P as PluginConfig, M as MemoryCategory } from '../types-
|
|
2
|
+
import { h as MemoryStatus, P as PluginConfig, M as MemoryCategory } from '../types-D3pm4NhH.js';
|
|
3
3
|
import { S as SemanticDedupLookup } from '../semantic-DJR8_DMQ.js';
|
|
4
4
|
import { LocalLlmClient } from '../local-llm.js';
|
|
5
5
|
import { FallbackLlmClient } from '../fallback-llm.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchBackend, SearchExecutionOptions } from '../search/port.js';
|
|
2
2
|
import { ConversationChunk } from './chunker.js';
|
|
3
3
|
import { C as ConversationSearchResult, F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-D3pm4NhH.js';
|
|
5
5
|
import '../types-ByK7T3L6.js';
|
|
6
6
|
import '../index-DJ9QWMw-.js';
|
|
7
7
|
import '../runtime/child-process.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createConversationIndexBackend
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-KJOYHNS7.js";
|
|
4
|
+
import "../chunk-OIF36KGD.js";
|
|
4
5
|
import "../chunk-7DTASS5T.js";
|
|
5
6
|
import "../chunk-E6ZDCOHM.js";
|
|
6
|
-
import "../chunk-OIF36KGD.js";
|
|
7
7
|
import "../chunk-O75CRYGF.js";
|
|
8
8
|
import "../chunk-2ODBA7MQ.js";
|
|
9
9
|
import "../chunk-PZ5AY32C.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './chunker.js';
|
|
2
2
|
export { b as FaissAdapterConfig, c as FaissAdapterError, F as FaissConversationIndexAdapter, d as FaissHealthResult, e as FaissInspectResult, f as failOpenFaissHealth, r as resolveDefaultFaissScriptPath } from '../faiss-adapter-BHecI1fF.js';
|
|
3
3
|
import '../runtime/child-process.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-D3pm4NhH.js';
|
|
5
5
|
import '../types-ByK7T3L6.js';
|
|
6
6
|
import '../index-DJ9QWMw-.js';
|
|
7
7
|
import '../search/port.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
|
|
2
2
|
import { ConversationChunk } from './chunker.js';
|
|
3
3
|
import '../search/port.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-D3pm4NhH.js';
|
|
5
5
|
import '../types-ByK7T3L6.js';
|
|
6
6
|
import '../index-DJ9QWMw-.js';
|
|
7
7
|
import '../runtime/child-process.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../search/port.js';
|
|
2
2
|
export { C as ConversationSearchResult, s as searchConversationIndex, a as searchConversationIndexFaissFailOpen } from '../faiss-adapter-BHecI1fF.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-D3pm4NhH.js';
|
|
4
4
|
import '../types-ByK7T3L6.js';
|
|
5
5
|
import '../index-DJ9QWMw-.js';
|
|
6
6
|
import './chunker.js';
|
package/dist/day-summary.d.ts
CHANGED
package/dist/delinearize.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MemoryFile, P as PluginConfig } from './types-
|
|
1
|
+
import { g as MemoryFile, P as PluginConfig } from './types-D3pm4NhH.js';
|
|
2
2
|
import { TrustZoneName } from './trust-zones.js';
|
|
3
3
|
import { T as Taxonomy } from './types-DJhqDJUV.js';
|
|
4
4
|
import { DirectAnswerResult } from './direct-answer.js';
|
package/dist/direct-answer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryCategory, a5 as ImportanceLevel } from '../types-
|
|
1
|
+
import { M as MemoryCategory, a5 as ImportanceLevel } from '../types-D3pm4NhH.js';
|
|
2
2
|
import { LoggerBackend } from '../logger.js';
|
|
3
3
|
import '../types-ByK7T3L6.js';
|
|
4
4
|
import '../index-DJ9QWMw-.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
|
-
import { P as PluginConfig, _ as TranscriptEntry } from './types-
|
|
2
|
+
import { P as PluginConfig, _ as TranscriptEntry } from './types-D3pm4NhH.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
4
|
import './consolidation-operator.js';
|
|
5
5
|
import './memory-projection-store.js';
|
package/dist/entity-retrieval.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
entityIndexVersion,
|
|
4
4
|
entityRecentTranscriptLookbackHours,
|
|
5
5
|
readRecentEntityTranscriptEntries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MNUPGYIV.js";
|
|
7
7
|
import "./chunk-BEUDU7Y4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-EUM7CZFM.js";
|
|
9
9
|
import "./chunk-M7XQSUBB.js";
|
|
10
10
|
import "./chunk-5UZXUTVO.js";
|
|
11
11
|
import "./chunk-5GPPACXK.js";
|
|
12
12
|
import "./chunk-J6A3CX5N.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-FMSDA2D3.js";
|
|
14
14
|
import "./chunk-AWJ2FHCF.js";
|
|
15
15
|
import "./chunk-42JKGUFJ.js";
|
|
16
16
|
import "./chunk-RULE4VG5.js";
|
package/dist/entity-schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as EntitySchemaDefinition, ae as EntitySchemaSectionDefinition, E as EntityStructuredSection } from './types-
|
|
1
|
+
import { ad as EntitySchemaDefinition, ae as EntitySchemaSectionDefinition, E as EntityStructuredSection } from './types-D3pm4NhH.js';
|
|
2
2
|
import './types-ByK7T3L6.js';
|
|
3
3
|
import './index-DJ9QWMw-.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Orchestrator } from './orchestrator-
|
|
2
|
-
import { M as MemoryCategory, P as PluginConfig } from './types-
|
|
1
|
+
import { O as Orchestrator } from './orchestrator-7zPqGupX.js';
|
|
2
|
+
import { M as MemoryCategory, P as PluginConfig } from './types-D3pm4NhH.js';
|
|
3
3
|
import './briefing.js';
|
|
4
4
|
import './storage.js';
|
|
5
5
|
import './page-versioning.js';
|
|
@@ -38,7 +38,7 @@ import './lcm/archive.js';
|
|
|
38
38
|
import './lcm/summarizer.js';
|
|
39
39
|
import './lcm/dag.js';
|
|
40
40
|
import './lcm/queue.js';
|
|
41
|
-
import './semantic-consolidation-
|
|
41
|
+
import './semantic-consolidation-BX9Z9_aK.js';
|
|
42
42
|
import './connectors/codex-materialize.js';
|
|
43
43
|
import './logger.js';
|
|
44
44
|
import './conversation-index/backend.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as ImportanceLevel, P as PluginConfig } from './types-
|
|
1
|
+
import { a5 as ImportanceLevel, P as PluginConfig } from './types-D3pm4NhH.js';
|
|
2
2
|
import { LocalLlmClient } from './local-llm.js';
|
|
3
3
|
import { FallbackLlmClient } from './fallback-llm.js';
|
|
4
4
|
import './types-ByK7T3L6.js';
|
package/dist/extraction.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocalLlmClient } from './local-llm.js';
|
|
2
2
|
import { ContradictionVerificationResult, SuggestedLinks, MemorySummaryResult } from './schemas.js';
|
|
3
|
-
import { P as PluginConfig, G as GatewayConfig, Z as BufferTurn, af as ExtractionResult, g as MemoryFile, ag as ConsolidationResult, ah as DaySummaryResult } from './types-
|
|
3
|
+
import { P as PluginConfig, G as GatewayConfig, Z as BufferTurn, af as ExtractionResult, g as MemoryFile, ag as ConsolidationResult, ah as DaySummaryResult } from './types-D3pm4NhH.js';
|
|
4
4
|
import { ModelRegistry } from './model-registry.js';
|
|
5
5
|
import { ProfilingCollector } from './profiling.js';
|
|
6
6
|
import './types-ByK7T3L6.js';
|
package/dist/fallback-llm.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GatewayConfig, f as AgentPersonaModelConfig, P as PluginConfig } from './types-
|
|
1
|
+
import { G as GatewayConfig, f as AgentPersonaModelConfig, P as PluginConfig } from './types-D3pm4NhH.js';
|
|
2
2
|
import { GetRuntimeAuthForModelFn, ResolveApiKeyFn } from './resolve-provider-secret.js';
|
|
3
3
|
import './types-ByK7T3L6.js';
|
|
4
4
|
import './index-DJ9QWMw-.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as ContinuityIncidentRecord, r as ContinuityIncidentCloseInput, p as ContinuityIncidentOpenInput, s as ContinuityImprovementLoop, u as ContinuityLoopReviewInput, t as ContinuityLoopUpsertInput } from './types-
|
|
1
|
+
import { q as ContinuityIncidentRecord, r as ContinuityIncidentCloseInput, p as ContinuityIncidentOpenInput, s as ContinuityImprovementLoop, u as ContinuityLoopReviewInput, t as ContinuityLoopUpsertInput } from './types-D3pm4NhH.js';
|
|
2
2
|
import './types-ByK7T3L6.js';
|
|
3
3
|
import './index-DJ9QWMw-.js';
|
|
4
4
|
|