memorix 1.10.0 → 1.10.1
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/CHANGELOG.md +11 -0
- package/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/cli/index.js +176 -46
- package/dist/index.js +160 -45
- package/dist/maintenance-runner.js +56 -2
- package/dist/media-audio-runner.js +56 -2
- package/dist/media-video-runner.js +56 -2
- package/dist/memcode-runtime/CHANGELOG.md +11 -0
- package/dist/sdk.js +159 -44
- package/dist/vector-backfill-runner.js +56 -2
- package/docs/1.2.0-EVALUATION-HARNESS.md +18 -0
- package/docs/CONFIGURATION.md +25 -0
- package/docs/DEVELOPMENT.md +4 -3
- package/docs/README.md +2 -2
- package/docs/ROADMAP-1.9.12-2.0.md +13 -6
- package/package.json +1 -1
- package/plugins/antigravity/memorix/plugin.json +1 -1
- package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
- package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
- package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/copilot/memorix/plugin.json +1 -1
- package/plugins/gemini/memorix/gemini-extension.json +1 -1
- package/plugins/hermes/memorix/plugin.yaml +1 -1
- package/plugins/omp/memorix/package.json +1 -1
- package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/pi/memorix/package.json +1 -1
- package/server.json +2 -2
- package/src/cli/commands/init.ts +6 -2
- package/src/cli/tui/ConfigureView.tsx +2 -0
- package/src/codegraph/auto-context.ts +17 -0
- package/src/codegraph/context-pack.ts +15 -0
- package/src/compact/engine.ts +11 -0
- package/src/config/dotenv-loader.ts +1 -0
- package/src/config/resolved-config.ts +5 -2
- package/src/config/yaml-loader.ts +2 -2
- package/src/dashboard/server.ts +3 -0
- package/src/knowledge/context-assembly.ts +13 -0
- package/src/knowledge/context-receipt.ts +32 -0
- package/src/knowledge/workset.ts +8 -0
- package/src/llm/provider.ts +2 -1
- package/src/multimodal/image-loader.ts +2 -2
- package/src/search/derived-view-receipt.ts +22 -0
- package/src/store/orama-store.ts +62 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ All notable changes to this project will be documented in this file.
|
|
|
6
6
|
|
|
7
7
|
No unreleased changes.
|
|
8
8
|
|
|
9
|
+
## [1.10.1] - 2026-10-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **Cheaper Inference memory preset** -- optional background memory LLM
|
|
13
|
+
processing through an OpenAI-compatible endpoint, with an isolated
|
|
14
|
+
`CHEAPER_INFERENCE_API_KEY`, CLI/TUI setup and bilingual configuration
|
|
15
|
+
guidance.
|
|
16
|
+
- **Derived-view receipts** -- context and search receipts now expose
|
|
17
|
+
privacy-safe FTS, Orama, embedding, and CodeGraph freshness, generation,
|
|
18
|
+
rebuild status, and bounded failure reasons.
|
|
19
|
+
|
|
9
20
|
## [1.10.0] - 2026-10-23
|
|
10
21
|
|
|
11
22
|
### Added
|
package/README.md
CHANGED
|
@@ -537,6 +537,8 @@ For Requesty, choose Requesty in `memorix init` or set `provider = "requesty"` i
|
|
|
537
537
|
|
|
538
538
|
For [API Route](https://www.api-route.com), choose API Route in `memorix init` or set `provider = "apiroute"` in `[memory.llm]`. The preset uses `https://global.api-route.com/v1` and `deepseek-v4.1-flash`, with your own `API_ROUTE_API_KEY` or `MEMORIX_LLM_API_KEY`. It is opt-in memory LLM processing; embeddings and memcode's model registry are configured separately. See [configuration](docs/CONFIGURATION.md#api-route-memory-preset).
|
|
539
539
|
|
|
540
|
+
For [Cheaper Inference](https://cheaperinference.com), choose Cheaper Inference in `memorix init` or set `provider = "cheaperinference"` in `[memory.llm]`. The preset uses `https://api.cheaperinference.com/v1` and `gpt-5.4-mini`, with your own `CHEAPER_INFERENCE_API_KEY` or `MEMORIX_LLM_API_KEY`. It is opt-in memory LLM processing; embeddings and memcode's model registry are configured separately. See [configuration](docs/CONFIGURATION.md#cheaper-inference-memory-preset).
|
|
541
|
+
|
|
540
542
|
For controlled MiniMax media generation, set `MINIMAX_API_KEY` (global) or
|
|
541
543
|
`MINIMAX_CN_API_KEY` (China region) in your environment or `.env`. The media
|
|
542
544
|
library never stores that key, a signed output URL, or base64 payloads. CLI
|
package/README.zh-CN.md
CHANGED
|
@@ -510,6 +510,8 @@ OpenAI-compatible 的 `https://api.atlascloud.ai/v1` endpoint,并读取
|
|
|
510
510
|
|
|
511
511
|
使用 [API Route](https://www.api-route.com) 时,可在 `memorix init` 中选择 API Route,或在 `[memory.llm]` 中设置 `provider = "apiroute"`。预设使用 `https://global.api-route.com/v1` 和 `deepseek-v4.1-flash`,密钥读取自己的 `API_ROUTE_API_KEY` 或 `MEMORIX_LLM_API_KEY`。这是显式启用的记忆 LLM 处理;embedding 和 memcode 模型注册表仍需单独配置。详见[配置说明](docs/CONFIGURATION.md#api-route-memory-preset)。
|
|
512
512
|
|
|
513
|
+
使用 [Cheaper Inference](https://cheaperinference.com) 时,可在 `memorix init` 中选择 Cheaper Inference,或在 `[memory.llm]` 中设置 `provider = "cheaperinference"`。预设使用 `https://api.cheaperinference.com/v1` 和 `gpt-5.4-mini`,密钥读取自己的 `CHEAPER_INFERENCE_API_KEY` 或 `MEMORIX_LLM_API_KEY`。这是显式启用的记忆 LLM 处理;embedding 和 memcode 模型注册表仍需单独配置。详见[配置说明](docs/CONFIGURATION.md#cheaper-inference-memory-preset)。
|
|
514
|
+
|
|
513
515
|
受控 MiniMax 媒体生成可在环境变量或 `.env` 中设置全局 `MINIMAX_API_KEY`,或中国区 `MINIMAX_CN_API_KEY`。媒体库不会保存该 key、临时签名 URL 或 base64 负载。CLI 生成本身就是显式操作;若要让 MCP 中的 Agent 发起生成,还必须明确设置 `MEMORIX_MCP_MEDIA_GENERATION=1`。
|
|
514
516
|
|
|
515
517
|
<h2 id="docker"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-docker.svg"><img src="assets/tags/section-docker.svg" alt="Docker" height="32" /></picture></h2>
|
package/dist/cli/index.js
CHANGED
|
@@ -3232,7 +3232,7 @@ ${import_picocolors.default.gray(m3)} ${s4}
|
|
|
3232
3232
|
|
|
3233
3233
|
// src/cli/version.ts
|
|
3234
3234
|
function getCliVersion() {
|
|
3235
|
-
return true ? "1.10.
|
|
3235
|
+
return true ? "1.10.1" : pkg.version;
|
|
3236
3236
|
}
|
|
3237
3237
|
var init_version = __esm({
|
|
3238
3238
|
"src/cli/version.ts"() {
|
|
@@ -22145,7 +22145,8 @@ function getResolvedConfig(options = {}) {
|
|
|
22145
22145
|
const isAtlasCloud = memoryLlmProvider === "atlascloud";
|
|
22146
22146
|
const isRequesty = memoryLlmProvider === "requesty";
|
|
22147
22147
|
const isApiRoute = memoryLlmProvider === "apiroute";
|
|
22148
|
-
const
|
|
22148
|
+
const isCheaperInference = memoryLlmProvider === "cheaperinference";
|
|
22149
|
+
const usesPresetKeyOnly = isAtlasCloud || isRequesty || isApiRoute || isCheaperInference;
|
|
22149
22150
|
const memoryLlmApiKey = first(
|
|
22150
22151
|
process.env.MEMORIX_LLM_API_KEY,
|
|
22151
22152
|
process.env.MEMORIX_API_KEY,
|
|
@@ -22153,7 +22154,7 @@ function getResolvedConfig(options = {}) {
|
|
|
22153
22154
|
yaml.llm?.apiKey,
|
|
22154
22155
|
legacy.llm?.apiKey,
|
|
22155
22156
|
// Never borrow another provider's credentials for these gateway presets.
|
|
22156
|
-
isAtlasCloud ? process.env.ATLASCLOUD_API_KEY : isRequesty ? process.env.REQUESTY_API_KEY : isApiRoute ? process.env.API_ROUTE_API_KEY : process.env.OPENAI_API_KEY,
|
|
22157
|
+
isAtlasCloud ? process.env.ATLASCLOUD_API_KEY : isRequesty ? process.env.REQUESTY_API_KEY : isApiRoute ? process.env.API_ROUTE_API_KEY : isCheaperInference ? process.env.CHEAPER_INFERENCE_API_KEY : process.env.OPENAI_API_KEY,
|
|
22157
22158
|
usesPresetKeyOnly ? void 0 : process.env.ANTHROPIC_API_KEY,
|
|
22158
22159
|
usesPresetKeyOnly ? void 0 : openRouterMemoryLlmApiKey
|
|
22159
22160
|
);
|
|
@@ -22337,6 +22338,7 @@ function getEnvSourceNames() {
|
|
|
22337
22338
|
"OPENROUTER_API_KEY",
|
|
22338
22339
|
"REQUESTY_API_KEY",
|
|
22339
22340
|
"API_ROUTE_API_KEY",
|
|
22341
|
+
"CHEAPER_INFERENCE_API_KEY",
|
|
22340
22342
|
"ATLASCLOUD_API_KEY"
|
|
22341
22343
|
].filter((name) => process.env[name]);
|
|
22342
22344
|
}
|
|
@@ -25331,6 +25333,7 @@ var init_provider2 = __esm({
|
|
|
25331
25333
|
openrouter: { baseUrl: "https://openrouter.ai/api/v1", model: "openai/gpt-4.1-nano" },
|
|
25332
25334
|
requesty: { baseUrl: "https://router.requesty.ai/v1", model: "openai/gpt-4.1-nano" },
|
|
25333
25335
|
apiroute: { baseUrl: "https://global.api-route.com/v1", model: "deepseek-v4.1-flash" },
|
|
25336
|
+
cheaperinference: { baseUrl: "https://api.cheaperinference.com/v1", model: "gpt-5.4-mini" },
|
|
25334
25337
|
atlascloud: { baseUrl: "https://api.atlascloud.ai/v1", model: "deepseek-ai/deepseek-v3.2" },
|
|
25335
25338
|
custom: { baseUrl: "http://localhost:11434/v1", model: "llama3" }
|
|
25336
25339
|
};
|
|
@@ -187804,6 +187807,7 @@ __export(orama_store_exports, {
|
|
|
187804
187807
|
getLastSearchMode: () => getLastSearchMode,
|
|
187805
187808
|
getObservationCount: () => getObservationCount2,
|
|
187806
187809
|
getObservationsByIds: () => getObservationsByIds,
|
|
187810
|
+
getSearchDerivedViews: () => getSearchDerivedViews,
|
|
187807
187811
|
getTimeline: () => getTimeline,
|
|
187808
187812
|
getVectorDimensions: () => getVectorDimensions,
|
|
187809
187813
|
hasObservationVector: () => hasObservationVector,
|
|
@@ -187833,6 +187837,56 @@ function getLastSearchDiagnostics(projectId) {
|
|
|
187833
187837
|
const diagnostics = lastSearchDiagnosticsByProject.get(projectId ?? SEARCH_MODE_DEFAULT_KEY);
|
|
187834
187838
|
return diagnostics ? { ...diagnostics } : void 0;
|
|
187835
187839
|
}
|
|
187840
|
+
function getSearchDerivedViews() {
|
|
187841
|
+
const views = {};
|
|
187842
|
+
const store2 = getOptionalObservationStore();
|
|
187843
|
+
if (store2) {
|
|
187844
|
+
try {
|
|
187845
|
+
const generation = store2.getGeneration();
|
|
187846
|
+
if (store2.hasLexicalIndex?.()) {
|
|
187847
|
+
views.fts = { generation, freshness: "current", rebuildStatus: "idle" };
|
|
187848
|
+
} else {
|
|
187849
|
+
views.fts = {
|
|
187850
|
+
generation,
|
|
187851
|
+
freshness: "unknown",
|
|
187852
|
+
rebuildStatus: "unavailable",
|
|
187853
|
+
failureReason: store2.getBackendReason?.() ?? "persistent lexical index unavailable"
|
|
187854
|
+
};
|
|
187855
|
+
}
|
|
187856
|
+
} catch (error40) {
|
|
187857
|
+
views.fts = {
|
|
187858
|
+
freshness: "unknown",
|
|
187859
|
+
rebuildStatus: "failed",
|
|
187860
|
+
failureReason: error40 instanceof Error ? error40.message.slice(0, 240) : String(error40).slice(0, 240)
|
|
187861
|
+
};
|
|
187862
|
+
}
|
|
187863
|
+
} else {
|
|
187864
|
+
views.fts = {
|
|
187865
|
+
freshness: "unknown",
|
|
187866
|
+
rebuildStatus: "unavailable",
|
|
187867
|
+
failureReason: "observation store is not initialized"
|
|
187868
|
+
};
|
|
187869
|
+
}
|
|
187870
|
+
views.orama = db ? { generation: dbGeneration, freshness: "current", rebuildStatus: "idle" } : {
|
|
187871
|
+
generation: dbGeneration,
|
|
187872
|
+
freshness: "unknown",
|
|
187873
|
+
rebuildStatus: "unavailable",
|
|
187874
|
+
failureReason: "Orama index is not initialized"
|
|
187875
|
+
};
|
|
187876
|
+
const configuredEmbeddingMode = process.env.MEMORIX_EMBEDDING?.trim().toLowerCase();
|
|
187877
|
+
if (configuredEmbeddingMode === "off") {
|
|
187878
|
+
views.embedding = { freshness: "current", rebuildStatus: "disabled" };
|
|
187879
|
+
} else if (embeddingEnabled) {
|
|
187880
|
+
views.embedding = { freshness: "current", rebuildStatus: "idle" };
|
|
187881
|
+
} else {
|
|
187882
|
+
views.embedding = {
|
|
187883
|
+
freshness: "unknown",
|
|
187884
|
+
rebuildStatus: "unavailable",
|
|
187885
|
+
failureReason: "embedding provider is not initialized"
|
|
187886
|
+
};
|
|
187887
|
+
}
|
|
187888
|
+
return views;
|
|
187889
|
+
}
|
|
187836
187890
|
function rememberSearchDiagnostics(key, value) {
|
|
187837
187891
|
if (!lastSearchDiagnosticsByProject.has(key) && lastSearchDiagnosticsByProject.size >= MAX_SEARCH_MODE_KEYS) {
|
|
187838
187892
|
const oldest = lastSearchDiagnosticsByProject.keys().next().value;
|
|
@@ -189435,6 +189489,14 @@ This project does have stored Memorix memories, but none matched the current que
|
|
|
189435
189489
|
}
|
|
189436
189490
|
const totalTokens = countTextTokens(formatted);
|
|
189437
189491
|
const diagnostics = getLastSearchDiagnostics(options.projectId);
|
|
189492
|
+
const derivedViews = getSearchDerivedViews();
|
|
189493
|
+
if (diagnostics?.fallbackUsed && diagnostics.fallbackReason) {
|
|
189494
|
+
derivedViews.embedding = {
|
|
189495
|
+
freshness: "stale",
|
|
189496
|
+
rebuildStatus: "failed",
|
|
189497
|
+
failureReason: diagnostics.fallbackReason
|
|
189498
|
+
};
|
|
189499
|
+
}
|
|
189438
189500
|
return {
|
|
189439
189501
|
entries,
|
|
189440
189502
|
formatted,
|
|
@@ -189449,6 +189511,7 @@ This project does have stored Memorix memories, but none matched the current que
|
|
|
189449
189511
|
omittedByTokenBudget: diagnostics?.omittedByTokenBudget ?? 0,
|
|
189450
189512
|
fallbackUsed: diagnostics?.fallbackUsed ?? false,
|
|
189451
189513
|
...diagnostics?.fallbackReason ? { fallbackReason: diagnostics.fallbackReason } : {},
|
|
189514
|
+
derivedViews,
|
|
189452
189515
|
tokenCount: totalTokens,
|
|
189453
189516
|
elapsedMs: Math.max(0, Date.now() - startedAt)
|
|
189454
189517
|
}
|
|
@@ -193327,6 +193390,8 @@ function buildInitTomlConfig(options) {
|
|
|
193327
193390
|
lines.push('# model = "openai/gpt-4o-mini"');
|
|
193328
193391
|
} else if (options.llmProvider === "apiroute") {
|
|
193329
193392
|
lines.push('model = "deepseek-v4.1-flash"');
|
|
193393
|
+
} else if (options.llmProvider === "cheaperinference") {
|
|
193394
|
+
lines.push('model = "gpt-5.4-mini"');
|
|
193330
193395
|
} else if (options.llmProvider === "atlascloud") {
|
|
193331
193396
|
lines.push('model = "deepseek-ai/deepseek-v3.2"');
|
|
193332
193397
|
}
|
|
@@ -193463,6 +193528,7 @@ var init_init = __esm({
|
|
|
193463
193528
|
{ value: "openrouter", label: "OpenRouter", hint: "multi-provider" },
|
|
193464
193529
|
{ value: "requesty", label: "Requesty", hint: "multi-provider" },
|
|
193465
193530
|
{ value: "apiroute", label: "API Route", hint: "multi-provider" },
|
|
193531
|
+
{ value: "cheaperinference", label: "Cheaper Inference", hint: "multi-provider" },
|
|
193466
193532
|
{ value: "atlascloud", label: "Atlas Cloud", hint: "DeepSeek V3.2" },
|
|
193467
193533
|
{ value: "custom", label: "Custom", hint: "OpenAI-compatible endpoint" }
|
|
193468
193534
|
]
|
|
@@ -193517,7 +193583,7 @@ var init_init = __esm({
|
|
|
193517
193583
|
];
|
|
193518
193584
|
if (llmProvider !== "none") {
|
|
193519
193585
|
envLines.push("# LLM API key");
|
|
193520
|
-
if (llmProvider === "openai" || llmProvider === "custom" || llmProvider === "atlascloud" || llmProvider === "apiroute") {
|
|
193586
|
+
if (llmProvider === "openai" || llmProvider === "custom" || llmProvider === "atlascloud" || llmProvider === "apiroute" || llmProvider === "cheaperinference") {
|
|
193521
193587
|
envLines.push("MEMORIX_LLM_API_KEY=sk-your-key-here");
|
|
193522
193588
|
} else if (llmProvider === "anthropic") {
|
|
193523
193589
|
envLines.push("MEMORIX_LLM_API_KEY=sk-ant-your-key-here");
|
|
@@ -193553,6 +193619,7 @@ var init_init = __esm({
|
|
|
193553
193619
|
envLines.push("# OPENROUTER_API_KEY=sk-or-...");
|
|
193554
193620
|
envLines.push("# REQUESTY_API_KEY=rqsty-...");
|
|
193555
193621
|
envLines.push("# API_ROUTE_API_KEY=sk-...");
|
|
193622
|
+
envLines.push("# CHEAPER_INFERENCE_API_KEY=ci_live_...");
|
|
193556
193623
|
envLines.push("");
|
|
193557
193624
|
mkdirSync3(targetDir, { recursive: true });
|
|
193558
193625
|
writeFileSync3(targetPath, tomlContent, "utf-8");
|
|
@@ -199787,6 +199854,10 @@ async function buildTaskWorkset(input) {
|
|
|
199787
199854
|
budget: { maxTokens }
|
|
199788
199855
|
});
|
|
199789
199856
|
const omittedReceipt = receiptOmissions(rendered.omittedItems, base.hiddenCautionMemoryCount);
|
|
199857
|
+
const derivedViews = {
|
|
199858
|
+
...getSearchDerivedViews(),
|
|
199859
|
+
...input.retrieval?.derivedViews ?? {}
|
|
199860
|
+
};
|
|
199790
199861
|
const retrieval = {
|
|
199791
199862
|
mode: input.retrieval?.mode ?? (input.semanticCode ? "hybrid" : "unknown"),
|
|
199792
199863
|
...input.retrieval?.codeProvider || input.providerQuality?.selected ? { codeProvider: input.retrieval?.codeProvider ?? input.providerQuality?.selected } : {},
|
|
@@ -199794,7 +199865,8 @@ async function buildTaskWorkset(input) {
|
|
|
199794
199865
|
...input.retrieval?.fallbackReason ? { fallbackReason: input.retrieval.fallbackReason } : {},
|
|
199795
199866
|
candidateCount: governed.plan.decisions.length,
|
|
199796
199867
|
selectedCount: rendered.selected.length,
|
|
199797
|
-
omittedCount: omittedReceipt.reduce((total, omission) => total + omission.count, 0)
|
|
199868
|
+
omittedCount: omittedReceipt.reduce((total, omission) => total + omission.count, 0),
|
|
199869
|
+
derivedViews
|
|
199798
199870
|
};
|
|
199799
199871
|
const receipt = {
|
|
199800
199872
|
version: "1.3",
|
|
@@ -199853,6 +199925,7 @@ var init_workset = __esm({
|
|
|
199853
199925
|
init_workflows2();
|
|
199854
199926
|
init_long_term();
|
|
199855
199927
|
init_governor();
|
|
199928
|
+
init_orama_store();
|
|
199856
199929
|
CONTINUATION_DETAIL_TOKEN_BUDGET = 20;
|
|
199857
199930
|
}
|
|
199858
199931
|
});
|
|
@@ -202165,6 +202238,60 @@ var init_session = __esm({
|
|
|
202165
202238
|
}
|
|
202166
202239
|
});
|
|
202167
202240
|
|
|
202241
|
+
// src/knowledge/context-receipt.ts
|
|
202242
|
+
var context_receipt_exports = {};
|
|
202243
|
+
__export(context_receipt_exports, {
|
|
202244
|
+
buildBoundedContextReceipt: () => buildBoundedContextReceipt,
|
|
202245
|
+
buildCodeGraphDerivedView: () => buildCodeGraphDerivedView
|
|
202246
|
+
});
|
|
202247
|
+
function buildCodeGraphDerivedView(input) {
|
|
202248
|
+
const provider2 = input.providerQuality;
|
|
202249
|
+
const snapshot = input.snapshot;
|
|
202250
|
+
const externalFailure = provider2?.external.state !== void 0 && !["ready", "disabled", "not-detected"].includes(provider2.external.state);
|
|
202251
|
+
if (snapshot?.id) {
|
|
202252
|
+
return {
|
|
202253
|
+
...snapshot.sourceEpoch !== void 0 ? { generation: snapshot.sourceEpoch } : {},
|
|
202254
|
+
freshness: snapshot.incomplete ? "stale" : "current",
|
|
202255
|
+
rebuildStatus: snapshot.incomplete ? "failed" : "idle",
|
|
202256
|
+
...snapshot.incomplete ? { failureReason: "latest CodeGraph snapshot is incomplete" } : externalFailure && provider2?.external.reason ? { failureReason: provider2.external.reason.slice(0, 240) } : {}
|
|
202257
|
+
};
|
|
202258
|
+
}
|
|
202259
|
+
return {
|
|
202260
|
+
freshness: "unknown",
|
|
202261
|
+
rebuildStatus: externalFailure ? "failed" : "unavailable",
|
|
202262
|
+
...provider2?.external.reason ? { failureReason: provider2.external.reason.slice(0, 240) } : { failureReason: "CodeGraph snapshot is not initialized" }
|
|
202263
|
+
};
|
|
202264
|
+
}
|
|
202265
|
+
function buildBoundedContextReceipt(input) {
|
|
202266
|
+
const provider2 = input.providerQuality ?? input.workset.provenance.codeProvider;
|
|
202267
|
+
return {
|
|
202268
|
+
schemaVersion: "1",
|
|
202269
|
+
task: input.workset.task,
|
|
202270
|
+
brief: input.workset.prompt,
|
|
202271
|
+
receipt: input.workset.receipt,
|
|
202272
|
+
code: {
|
|
202273
|
+
selected: provider2?.selected ?? "lite",
|
|
202274
|
+
quality: provider2?.selectedQuality ?? "heuristic",
|
|
202275
|
+
externalState: provider2?.external.state ?? "not-detected",
|
|
202276
|
+
...input.workset.provenance.snapshotId ? { snapshotId: input.workset.provenance.snapshotId } : {}
|
|
202277
|
+
},
|
|
202278
|
+
...input.workset.agentLoadout ? { loadout: input.workset.agentLoadout } : {},
|
|
202279
|
+
...input.workset.continuity ? {
|
|
202280
|
+
continuity: {
|
|
202281
|
+
taskId: input.workset.continuity.taskId,
|
|
202282
|
+
status: input.workset.continuity.status,
|
|
202283
|
+
outcome: input.workset.continuity.outcome
|
|
202284
|
+
}
|
|
202285
|
+
} : {}
|
|
202286
|
+
};
|
|
202287
|
+
}
|
|
202288
|
+
var init_context_receipt = __esm({
|
|
202289
|
+
"src/knowledge/context-receipt.ts"() {
|
|
202290
|
+
"use strict";
|
|
202291
|
+
init_esm_shims();
|
|
202292
|
+
}
|
|
202293
|
+
});
|
|
202294
|
+
|
|
202168
202295
|
// src/store/compaction-checkpoint-store.ts
|
|
202169
202296
|
var compaction_checkpoint_store_exports = {};
|
|
202170
202297
|
__export(compaction_checkpoint_store_exports, {
|
|
@@ -203054,7 +203181,19 @@ async function buildAutoProjectContext(input) {
|
|
|
203054
203181
|
retrieval: {
|
|
203055
203182
|
mode: semanticOutline ? "hybrid" : "lexical",
|
|
203056
203183
|
codeProvider: providerQuality2.selected,
|
|
203057
|
-
...externalCaution ? { fallbackReason: externalCaution } : {}
|
|
203184
|
+
...externalCaution ? { fallbackReason: externalCaution } : {},
|
|
203185
|
+
derivedViews: {
|
|
203186
|
+
graph: buildCodeGraphDerivedView({
|
|
203187
|
+
providerQuality: providerQuality2,
|
|
203188
|
+
...latestSnapshot ? {
|
|
203189
|
+
snapshot: {
|
|
203190
|
+
id: latestSnapshot.id,
|
|
203191
|
+
sourceEpoch: latestSnapshot.sourceEpoch,
|
|
203192
|
+
incomplete: latestSnapshot.completeness.skippedOversizedFiles > 0 || (latestSnapshot.completeness.unreadableFiles ?? 0) > 0 || latestSnapshot.completeness.removalScanDeferred
|
|
203193
|
+
}
|
|
203194
|
+
} : {}
|
|
203195
|
+
})
|
|
203196
|
+
}
|
|
203058
203197
|
},
|
|
203059
203198
|
currentFacts: worksetFactLines(currentFacts),
|
|
203060
203199
|
...continuation ? { continuation } : {},
|
|
@@ -203384,47 +203523,13 @@ var init_auto_context = __esm({
|
|
|
203384
203523
|
init_long_term();
|
|
203385
203524
|
init_visibility();
|
|
203386
203525
|
init_session_store();
|
|
203526
|
+
init_context_receipt();
|
|
203387
203527
|
init_task_lens();
|
|
203388
203528
|
DEFAULT_MAX_AGE_MS = 10 * 60 * 1e3;
|
|
203389
203529
|
COMPACT_CHECKPOINT_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
203390
203530
|
}
|
|
203391
203531
|
});
|
|
203392
203532
|
|
|
203393
|
-
// src/knowledge/context-receipt.ts
|
|
203394
|
-
var context_receipt_exports = {};
|
|
203395
|
-
__export(context_receipt_exports, {
|
|
203396
|
-
buildBoundedContextReceipt: () => buildBoundedContextReceipt
|
|
203397
|
-
});
|
|
203398
|
-
function buildBoundedContextReceipt(input) {
|
|
203399
|
-
const provider2 = input.providerQuality ?? input.workset.provenance.codeProvider;
|
|
203400
|
-
return {
|
|
203401
|
-
schemaVersion: "1",
|
|
203402
|
-
task: input.workset.task,
|
|
203403
|
-
brief: input.workset.prompt,
|
|
203404
|
-
receipt: input.workset.receipt,
|
|
203405
|
-
code: {
|
|
203406
|
-
selected: provider2?.selected ?? "lite",
|
|
203407
|
-
quality: provider2?.selectedQuality ?? "heuristic",
|
|
203408
|
-
externalState: provider2?.external.state ?? "not-detected",
|
|
203409
|
-
...input.workset.provenance.snapshotId ? { snapshotId: input.workset.provenance.snapshotId } : {}
|
|
203410
|
-
},
|
|
203411
|
-
...input.workset.agentLoadout ? { loadout: input.workset.agentLoadout } : {},
|
|
203412
|
-
...input.workset.continuity ? {
|
|
203413
|
-
continuity: {
|
|
203414
|
-
taskId: input.workset.continuity.taskId,
|
|
203415
|
-
status: input.workset.continuity.status,
|
|
203416
|
-
outcome: input.workset.continuity.outcome
|
|
203417
|
-
}
|
|
203418
|
-
} : {}
|
|
203419
|
-
};
|
|
203420
|
-
}
|
|
203421
|
-
var init_context_receipt = __esm({
|
|
203422
|
-
"src/knowledge/context-receipt.ts"() {
|
|
203423
|
-
"use strict";
|
|
203424
|
-
init_esm_shims();
|
|
203425
|
-
}
|
|
203426
|
-
});
|
|
203427
|
-
|
|
203428
203533
|
// src/cli/fallback-budget.ts
|
|
203429
203534
|
import { createHash as createHash18 } from "crypto";
|
|
203430
203535
|
function fallbackRequestKey(projectId, task) {
|
|
@@ -203649,6 +203754,15 @@ function formatContextReceipt(receipt) {
|
|
|
203649
203754
|
if (receipt.retrieval.fallbackUsed) {
|
|
203650
203755
|
lines.push(`- Fallback: ${receipt.retrieval.fallbackReason ?? "retrieval fallback used"}`);
|
|
203651
203756
|
}
|
|
203757
|
+
if (receipt.retrieval.derivedViews) {
|
|
203758
|
+
lines.push("", "Derived views");
|
|
203759
|
+
for (const [name, view] of Object.entries(receipt.retrieval.derivedViews)) {
|
|
203760
|
+
if (!view) continue;
|
|
203761
|
+
const generation = view.generation === void 0 ? "" : `, generation=${view.generation}`;
|
|
203762
|
+
const reason = view.failureReason ? `, reason=${view.failureReason}` : "";
|
|
203763
|
+
lines.push(`- ${name}: ${view.freshness}/${view.rebuildStatus}${generation}${reason}`);
|
|
203764
|
+
}
|
|
203765
|
+
}
|
|
203652
203766
|
if (receipt.selected.length > 0) {
|
|
203653
203767
|
lines.push("", "Selected evidence");
|
|
203654
203768
|
for (const item of receipt.selected.slice(0, 20)) {
|
|
@@ -203918,7 +204032,19 @@ async function attachTaskWorkset(input) {
|
|
|
203918
204032
|
...input.providerQuality ? { providerQuality: input.providerQuality } : {},
|
|
203919
204033
|
retrieval: {
|
|
203920
204034
|
mode: semanticCode ? "hybrid" : "unknown",
|
|
203921
|
-
...input.providerQuality?.selected ? { codeProvider: input.providerQuality.selected } : {}
|
|
204035
|
+
...input.providerQuality?.selected ? { codeProvider: input.providerQuality.selected } : {},
|
|
204036
|
+
derivedViews: {
|
|
204037
|
+
graph: buildCodeGraphDerivedView({
|
|
204038
|
+
providerQuality: input.providerQuality,
|
|
204039
|
+
...input.snapshot ? {
|
|
204040
|
+
snapshot: {
|
|
204041
|
+
id: input.snapshot.id,
|
|
204042
|
+
sourceEpoch: input.snapshot.sourceEpoch,
|
|
204043
|
+
incomplete: input.snapshot.incomplete
|
|
204044
|
+
}
|
|
204045
|
+
} : {}
|
|
204046
|
+
})
|
|
204047
|
+
}
|
|
203922
204048
|
},
|
|
203923
204049
|
reliableMemory: input.pack.memories.filter((memory) => memory.status === "current").map((memory) => ({
|
|
203924
204050
|
id: memory.id,
|
|
@@ -203990,6 +204116,7 @@ var init_context_pack = __esm({
|
|
|
203990
204116
|
"use strict";
|
|
203991
204117
|
init_esm_shims();
|
|
203992
204118
|
init_freshness2();
|
|
204119
|
+
init_context_receipt();
|
|
203993
204120
|
init_workset();
|
|
203994
204121
|
init_exclude3();
|
|
203995
204122
|
init_semantic_context();
|
|
@@ -209677,7 +209804,7 @@ var init_tool_profile = __esm({
|
|
|
209677
209804
|
function getMcpServerInfo() {
|
|
209678
209805
|
return {
|
|
209679
209806
|
name: "memorix",
|
|
209680
|
-
version: true ? "1.10.
|
|
209807
|
+
version: true ? "1.10.1" : "1.0.1"
|
|
209681
209808
|
};
|
|
209682
209809
|
}
|
|
209683
209810
|
function createMcpDiscoverResult(capabilities, serverInfo) {
|
|
@@ -226005,7 +226132,8 @@ async function handleApi(req, res, dataDir, projectId, projectName, baseDir, pro
|
|
|
226005
226132
|
"ANTHROPIC_API_KEY",
|
|
226006
226133
|
...resolved.memory.llm.provider === "openrouter" || resolved.memory.llm.baseUrl?.includes("openrouter.ai") ? ["OPENROUTER_API_KEY"] : [],
|
|
226007
226134
|
...resolved.memory.llm.provider === "requesty" ? ["REQUESTY_API_KEY"] : [],
|
|
226008
|
-
...resolved.memory.llm.provider === "apiroute" ? ["API_ROUTE_API_KEY"] : []
|
|
226135
|
+
...resolved.memory.llm.provider === "apiroute" ? ["API_ROUTE_API_KEY"] : [],
|
|
226136
|
+
...resolved.memory.llm.provider === "cheaperinference" ? ["CHEAPER_INFERENCE_API_KEY"] : []
|
|
226009
226137
|
];
|
|
226010
226138
|
if (llmKey) {
|
|
226011
226139
|
const src2 = resolveDashboardKeySource({ value: llmKey, envKeys: memoryKeyEnv, configSource });
|
|
@@ -266397,7 +266525,7 @@ async function analyzeImage(input) {
|
|
|
266397
266525
|
const config2 = getLLMConfig();
|
|
266398
266526
|
if (!OPENAI_COMPATIBLE_PROVIDERS.has(config2.provider)) {
|
|
266399
266527
|
throw new Error(
|
|
266400
|
-
`Image analysis requires an OpenAI-compatible provider (openai, openrouter, requesty, apiroute, or custom). Current provider "${config2.provider}" uses a different API shape. Set MEMORIX_LLM_PROVIDER=openai or configure an OpenAI-compatible base URL.`
|
|
266528
|
+
`Image analysis requires an OpenAI-compatible provider (openai, openrouter, requesty, apiroute, cheaperinference, or custom). Current provider "${config2.provider}" uses a different API shape. Set MEMORIX_LLM_PROVIDER=openai or configure an OpenAI-compatible base URL.`
|
|
266401
266529
|
);
|
|
266402
266530
|
}
|
|
266403
266531
|
const bytes = decodeBase64ImagePayload(input.base64, MAX_VISION_IMAGE_BYTES);
|
|
@@ -266436,7 +266564,7 @@ var init_image_loader = __esm({
|
|
|
266436
266564
|
init_provider2();
|
|
266437
266565
|
init_secret_filter();
|
|
266438
266566
|
init_image_payload();
|
|
266439
|
-
OPENAI_COMPATIBLE_PROVIDERS = /* @__PURE__ */ new Set(["openai", "openrouter", "requesty", "apiroute", "custom"]);
|
|
266567
|
+
OPENAI_COMPATIBLE_PROVIDERS = /* @__PURE__ */ new Set(["openai", "openrouter", "requesty", "apiroute", "cheaperinference", "custom"]);
|
|
266440
266568
|
MAX_VISION_PROMPT_CHARS = 12e3;
|
|
266441
266569
|
MAX_VISION_DESCRIPTION_CHARS = 12e3;
|
|
266442
266570
|
MAX_VISION_LABELS = 50;
|
|
@@ -290778,6 +290906,7 @@ function ConfigureView({ onBack }) {
|
|
|
290778
290906
|
{ key: "openrouter", label: "OpenRouter", hint: "multi-provider" },
|
|
290779
290907
|
{ key: "requesty", label: "Requesty", hint: "multi-provider" },
|
|
290780
290908
|
{ key: "apiroute", label: "API Route", hint: "multi-provider" },
|
|
290909
|
+
{ key: "cheaperinference", label: "Cheaper Inference", hint: "multi-provider" },
|
|
290781
290910
|
{ key: "atlascloud", label: "Atlas Cloud", hint: "DeepSeek V3.2" },
|
|
290782
290911
|
{ key: "custom", label: "Custom endpoint", hint: "OpenAI-compatible" },
|
|
290783
290912
|
{ key: "disable", label: "Disable LLM", hint: "free heuristic mode", color: COLORS.warning },
|
|
@@ -291073,6 +291202,7 @@ function getDefaultModel(provider2) {
|
|
|
291073
291202
|
if (provider2 === "openrouter") return "openai/gpt-4o-mini";
|
|
291074
291203
|
if (provider2 === "requesty") return "openai/gpt-4o-mini";
|
|
291075
291204
|
if (provider2 === "apiroute") return "deepseek-v4.1-flash";
|
|
291205
|
+
if (provider2 === "cheaperinference") return "gpt-5.4-mini";
|
|
291076
291206
|
if (provider2 === "atlascloud") return "deepseek-ai/deepseek-v3.2";
|
|
291077
291207
|
return "gpt-4o-mini";
|
|
291078
291208
|
}
|