@remnic/core 10.0.117 → 10.0.118

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.
@@ -2,7 +2,7 @@ import {
2
2
  ExtractionDrain,
3
3
  TurnIngestionCoordinator,
4
4
  shouldSkipImplicitExtraction
5
- } from "./chunk-N56BTEXA.js";
5
+ } from "./chunk-IRFCIJTX.js";
6
6
  import {
7
7
  headerConnector,
8
8
  renderExtractionConversation,
@@ -447,4 +447,4 @@ export {
447
447
  ClaimBufferStorage,
448
448
  BufferDrainRunner
449
449
  };
450
- //# sourceMappingURL=chunk-N7WTIHT2.js.map
450
+ //# sourceMappingURL=chunk-VXMSMY65.js.map
package/dist/cli.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  runWorkProductStatusCliCommand,
92
92
  runWorkProjectCliCommand,
93
93
  runWorkTaskCliCommand
94
- } from "./chunk-N56BTEXA.js";
94
+ } from "./chunk-IRFCIJTX.js";
95
95
  import "./chunk-6P7U3HWG.js";
96
96
  import "./chunk-PQM3B54K.js";
97
97
  import "./chunk-B3DR2JBZ.js";
@@ -8,7 +8,7 @@ import {
8
8
  shouldSkipImplicitExtraction,
9
9
  stripInlineExplicitCaptureNotes,
10
10
  validateExplicitCaptureInput
11
- } from "./chunk-N56BTEXA.js";
11
+ } from "./chunk-IRFCIJTX.js";
12
12
  import "./chunk-6P7U3HWG.js";
13
13
  import "./chunk-PQM3B54K.js";
14
14
  import "./chunk-B3DR2JBZ.js";
package/dist/index.js CHANGED
@@ -259,7 +259,7 @@ import {
259
259
  writeManifest,
260
260
  writeMeetingEpisodeMemory,
261
261
  writeTimelineState
262
- } from "./chunk-N56BTEXA.js";
262
+ } from "./chunk-IRFCIJTX.js";
263
263
  import "./chunk-6P7U3HWG.js";
264
264
  import "./chunk-PQM3B54K.js";
265
265
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BufferDrainRunner
3
- } from "../chunk-N7WTIHT2.js";
4
- import "../chunk-N56BTEXA.js";
3
+ } from "../chunk-VXMSMY65.js";
4
+ import "../chunk-IRFCIJTX.js";
5
5
  import "../chunk-6P7U3HWG.js";
6
6
  import "../chunk-PQM3B54K.js";
7
7
  import "../chunk-B3DR2JBZ.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  BufferDrainRunner,
3
3
  ClaimBufferStorage
4
- } from "../chunk-N7WTIHT2.js";
5
- import "../chunk-N56BTEXA.js";
4
+ } from "../chunk-VXMSMY65.js";
5
+ import "../chunk-IRFCIJTX.js";
6
6
  import "../chunk-6P7U3HWG.js";
7
7
  import "../chunk-PQM3B54K.js";
8
8
  import "../chunk-B3DR2JBZ.js";
@@ -6,7 +6,7 @@ import {
6
6
  mergeGraphExpandedResults,
7
7
  qmdStartupCollectionChecksWithTimeout,
8
8
  resolveEffectiveIdentityInjectionMode
9
- } from "./chunk-N56BTEXA.js";
9
+ } from "./chunk-IRFCIJTX.js";
10
10
  import "./chunk-6P7U3HWG.js";
11
11
  import "./chunk-PQM3B54K.js";
12
12
  import "./chunk-B3DR2JBZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRecallNavigation
3
- } from "./chunk-N56BTEXA.js";
3
+ } from "./chunk-IRFCIJTX.js";
4
4
  import "./chunk-6P7U3HWG.js";
5
5
  import "./chunk-PQM3B54K.js";
6
6
  import "./chunk-B3DR2JBZ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "10.0.117",
3
+ "version": "10.0.118",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3386,7 +3386,7 @@
3386
3386
  "core"
3387
3387
  ],
3388
3388
  "peerDependencies": {
3389
- "@remnic/coding-graph": "^10.0.117"
3389
+ "@remnic/coding-graph": "^10.0.118"
3390
3390
  },
3391
3391
  "peerDependenciesMeta": {
3392
3392
  "@remnic/coding-graph": {
@@ -174,6 +174,44 @@ test("MCP reports a missing storage target as a non-retryable storage_target_req
174
174
  assert.deepEqual(result.result?.structuredContent, { code: "storage_target_required", retryable: false }, JSON.stringify(response));
175
175
  });
176
176
 
177
+ test("#3381: MCP returns the missing storage target explanation and does not log it as an internal error", async () => {
178
+ const failure = new Error("accepted capture requires an explicit storage target");
179
+ failure.name = "StorageTargetRequiredError";
180
+ // SAFETY: the mock overrides only observe; every other MCP dispatch path is unreachable in this test.
181
+ const service = Object.assign({} as EngramAccessService, {
182
+ observe: async () => {
183
+ throw failure;
184
+ },
185
+ });
186
+ const errorLines: string[] = [];
187
+ initLogger(
188
+ {
189
+ info() {},
190
+ warn() {},
191
+ error(msg: string) {
192
+ errorLines.push(msg);
193
+ },
194
+ },
195
+ false,
196
+ { timestamps: false },
197
+ );
198
+ try {
199
+ const outcome = readCallToolOutcome(
200
+ await new EngramMcpServer(service).handleRequest(
201
+ makeToolRequest("engram.observe", {
202
+ sessionKey: "no-target-session",
203
+ messages: [{ role: "user", content: "cannot succeed on retry" }],
204
+ }),
205
+ ),
206
+ );
207
+ assert.equal(outcome.isError, true);
208
+ assert.equal(outcome.text, failure.message, "a request fault must explain itself, not read as an internal error");
209
+ assert.deepEqual(errorLines, [], "a request fault is not a server error");
210
+ } finally {
211
+ resetLogger();
212
+ }
213
+ });
214
+
177
215
  // ──────────────────────────────────────────────────────────────────────────
178
216
  // Finding 2 (#396 new): invalid MCP briefing format values must be rejected
179
217
  // ──────────────────────────────────────────────────────────────────────────
package/src/access-mcp.ts CHANGED
@@ -100,10 +100,16 @@ function throwMcpAbort(signal: AbortSignal | undefined, message: string): void {
100
100
  /**
101
101
  * Map tools/call failures to a client-safe message. Unexpected backend/fs
102
102
  * errors become a stable generic string; detail stays in the server log.
103
- * Intended EngramAccessInputError / EngramAccessForbiddenError stay readable.
103
+ * Intended EngramAccessInputError / EngramAccessForbiddenError stay readable, and
104
+ * so does a missing storage target: it is a request fault, as on HTTP (400),
105
+ * not a server error (#3381).
104
106
  */
105
107
  function mcpToolErrorMessage(err: Error): string {
106
- if (err instanceof EngramAccessInputError || err instanceof EngramAccessForbiddenError) {
108
+ if (
109
+ err instanceof EngramAccessInputError ||
110
+ err instanceof EngramAccessForbiddenError ||
111
+ err.name === "StorageTargetRequiredError"
112
+ ) {
107
113
  return err.message;
108
114
  }
109
115
  log.error("engram MCP tools/call internal error", err);