@remnic/core 9.7.6 → 9.7.8

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.
Files changed (45) hide show
  1. package/dist/access-boundary.d.ts +2 -0
  2. package/dist/access-boundary.js +1 -1
  3. package/dist/access-cli.js +7 -7
  4. package/dist/access-http.js +5 -5
  5. package/dist/access-mcp.d.ts +2 -0
  6. package/dist/access-mcp.js +4 -4
  7. package/dist/access-operations-batch.js +2 -2
  8. package/dist/access-operations.d.ts +3 -3
  9. package/dist/access-operations.js +3 -3
  10. package/dist/access-schema.d.ts +64 -64
  11. package/dist/{chunk-TBQ4CFIP.js → chunk-57INMZ6F.js} +1 -1
  12. package/dist/chunk-57INMZ6F.js.map +1 -0
  13. package/dist/{chunk-BFCQPJ5B.js → chunk-CHVU4RE5.js} +24 -6
  14. package/dist/chunk-CHVU4RE5.js.map +1 -0
  15. package/dist/{chunk-3CRHW42H.js → chunk-FYKIEOG6.js} +2 -2
  16. package/dist/{chunk-ESE55PZJ.js → chunk-NMMKRVUF.js} +10 -6
  17. package/dist/chunk-NMMKRVUF.js.map +1 -0
  18. package/dist/{chunk-3UPBVNBX.js → chunk-Q6JPMCPO.js} +3 -3
  19. package/dist/{chunk-P2UA6XQG.js → chunk-UHGHTOR5.js} +5 -5
  20. package/dist/chunk-UHGHTOR5.js.map +1 -0
  21. package/dist/{chunk-H67QFYUK.js → chunk-UJBESW6X.js} +918 -146
  22. package/dist/chunk-UJBESW6X.js.map +1 -0
  23. package/dist/cli.js +6 -6
  24. package/dist/connectors/index.d.ts +7 -0
  25. package/dist/connectors/index.js +1 -1
  26. package/dist/index.js +7 -7
  27. package/dist/orchestrator.js +7 -7
  28. package/dist/schemas.d.ts +74 -74
  29. package/dist/shared-context/manager.d.ts +8 -8
  30. package/dist/transfer/types.d.ts +66 -66
  31. package/package.json +2 -2
  32. package/src/access-boundary.ts +2 -0
  33. package/src/access-http.ts +15 -2
  34. package/src/access-mcp-cancellation.test.ts +405 -0
  35. package/src/access-mcp.ts +25 -1
  36. package/src/access-operations-batch.ts +3 -3
  37. package/src/connectors/hermes-shim.ts +523 -0
  38. package/src/connectors/index.ts +769 -15
  39. package/dist/chunk-BFCQPJ5B.js.map +0 -1
  40. package/dist/chunk-ESE55PZJ.js.map +0 -1
  41. package/dist/chunk-H67QFYUK.js.map +0 -1
  42. package/dist/chunk-P2UA6XQG.js.map +0 -1
  43. package/dist/chunk-TBQ4CFIP.js.map +0 -1
  44. /package/dist/{chunk-3CRHW42H.js.map → chunk-FYKIEOG6.js.map} +0 -0
  45. /package/dist/{chunk-3UPBVNBX.js.map → chunk-Q6JPMCPO.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2MR3MFQB.js";
4
4
  import {
5
5
  defineOperation
6
- } from "./chunk-TBQ4CFIP.js";
6
+ } from "./chunk-57INMZ6F.js";
7
7
  import {
8
8
  CorrectionContractError,
9
9
  DECISION_SUBCOMMANDS,
@@ -464,4 +464,4 @@ export {
464
464
  codegraphIngestTracesOperation,
465
465
  REGISTERED_OPERATIONS
466
466
  };
467
- //# sourceMappingURL=chunk-3CRHW42H.js.map
467
+ //# sourceMappingURL=chunk-FYKIEOG6.js.map
@@ -13,7 +13,7 @@ import {
13
13
  processChatMessage,
14
14
  sessionBelongsToPrincipal,
15
15
  subscribeChatTranscript
16
- } from "./chunk-BFCQPJ5B.js";
16
+ } from "./chunk-CHVU4RE5.js";
17
17
  import {
18
18
  validateRequest
19
19
  } from "./chunk-2MR3MFQB.js";
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-35NN3ZFA.js";
29
29
  import {
30
30
  getOperation
31
- } from "./chunk-TBQ4CFIP.js";
31
+ } from "./chunk-57INMZ6F.js";
32
32
  import {
33
33
  assertOperationAllowed,
34
34
  enforceNamespaceAllowList,
@@ -766,7 +766,7 @@ var EngramAccessHttpServer = class {
766
766
  return;
767
767
  }
768
768
  if (req.method === "POST" && pathname === "/mcp") {
769
- await this.handleMcpRequest(req, res);
769
+ await this.handleMcpRequest(req, res, abortSignal);
770
770
  return;
771
771
  }
772
772
  if (req.method === "GET" && pathname === "/engram/v1/health") {
@@ -2413,7 +2413,7 @@ var EngramAccessHttpServer = class {
2413
2413
  req.once("close", cleanup);
2414
2414
  req.once("error", cleanup);
2415
2415
  }
2416
- async handleMcpRequest(req, res) {
2416
+ async handleMcpRequest(req, res, abortSignal) {
2417
2417
  const headerVersion = req.headers["mcp-protocol-version"];
2418
2418
  if (typeof headerVersion === "string" && headerVersion.length > 0) {
2419
2419
  if (!MCP_SUPPORTED_PROTOCOL_VERSIONS.includes(headerVersion)) {
@@ -2473,7 +2473,8 @@ var EngramAccessHttpServer = class {
2473
2473
  sessionId,
2474
2474
  correlationId: mcpCorrelationId,
2475
2475
  enforceWriteQuota: observeSelfEnforcesQuota ? () => this.ensureWriteRateLimitAvailable() : void 0,
2476
- sourceConnector: this.resolveConnector(req)
2476
+ sourceConnector: this.resolveConnector(req),
2477
+ abortSignal
2477
2478
  });
2478
2479
  if (isMcpWrite && response !== null) {
2479
2480
  const result = response.result;
@@ -2485,6 +2486,9 @@ var EngramAccessHttpServer = class {
2485
2486
  this.recordWriteRateLimitHit();
2486
2487
  }
2487
2488
  }
2489
+ if (abortSignal.aborted) {
2490
+ throw isAbortError(abortSignal.reason) ? abortSignal.reason : abortError("HTTP client disconnected");
2491
+ }
2488
2492
  if (response === null) {
2489
2493
  res.statusCode = 202;
2490
2494
  res.end();
@@ -2968,4 +2972,4 @@ function positiveIntQueryParam(value, label) {
2968
2972
  export {
2969
2973
  EngramAccessHttpServer
2970
2974
  };
2971
- //# sourceMappingURL=chunk-ESE55PZJ.js.map
2975
+ //# sourceMappingURL=chunk-NMMKRVUF.js.map