@remnic/core 10.0.94 → 10.0.95

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 (36) hide show
  1. package/dist/access-admin-ops-surface.js +1 -1
  2. package/dist/access-cli.js +1 -1
  3. package/dist/access-extraction-force-flush.js +1 -1
  4. package/dist/access-http-briefing.js +1 -1
  5. package/dist/access-http-query.js +1 -1
  6. package/dist/access-http.js +1 -1
  7. package/dist/access-identity-continuity-surface.js +1 -1
  8. package/dist/access-lcm-surface.js +1 -1
  9. package/dist/access-mcp.js +1 -1
  10. package/dist/access-observe-write-surface.js +1 -1
  11. package/dist/access-operations-batch.js +1 -1
  12. package/dist/access-operations.js +1 -1
  13. package/dist/access-recall-concurrency.js +1 -1
  14. package/dist/access-recall-response.js +1 -1
  15. package/dist/access-recall-surface.js +1 -1
  16. package/dist/access-service.js +1 -1
  17. package/dist/{chunk-D5S6RL32.js → chunk-DDATG2SF.js} +40 -20
  18. package/dist/{chunk-D5S6RL32.js.map → chunk-DDATG2SF.js.map} +1 -1
  19. package/dist/{chunk-RUTN5MMC.js → chunk-LS7PT3YD.js} +2 -2
  20. package/dist/cli.js +1 -1
  21. package/dist/explicit-capture.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/orchestration/backlog-scheduler.js +2 -2
  24. package/dist/orchestration/buffer-drain-runner.js +2 -2
  25. package/dist/orchestration/extraction-persist-failure.d.ts +25 -1
  26. package/dist/orchestration/extraction-persist-failure.d.ts.map +1 -1
  27. package/dist/orchestration/extraction-persist.d.ts +3 -6
  28. package/dist/orchestration/extraction-persist.d.ts.map +1 -1
  29. package/dist/orchestrator.js +1 -1
  30. package/dist/recall-navigation.js +1 -1
  31. package/package.json +2 -2
  32. package/src/orchestration/extraction-persist-failure.test.ts +90 -0
  33. package/src/orchestration/extraction-persist-failure.ts +39 -1
  34. package/src/orchestration/extraction-persist.ts +29 -21
  35. package/src/orchestrator-persist-branch-failure.test.ts +271 -0
  36. /package/dist/{chunk-RUTN5MMC.js.map → chunk-LS7PT3YD.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccessAdminOpsSurface
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EngramAccessService,
3
3
  Orchestrator
4
- } from "./chunk-D5S6RL32.js";
4
+ } from "./chunk-DDATG2SF.js";
5
5
  import "./chunk-B3DR2JBZ.js";
6
6
  import "./chunk-6P7U3HWG.js";
7
7
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  extractionForceFlush
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  respondBriefingHttp
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -3,7 +3,7 @@ import {
3
3
  optionalNamespaceKindQueryParam,
4
4
  optionalQueryString,
5
5
  positiveIntQueryParam
6
- } from "./chunk-D5S6RL32.js";
6
+ } from "./chunk-DDATG2SF.js";
7
7
  import "./chunk-B3DR2JBZ.js";
8
8
  import "./chunk-6P7U3HWG.js";
9
9
  import "./chunk-H4CKS5B2.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EngramAccessHttpServer,
3
3
  resolveDefaultAdminConsolePublicDir
4
- } from "./chunk-D5S6RL32.js";
4
+ } from "./chunk-DDATG2SF.js";
5
5
  import "./chunk-B3DR2JBZ.js";
6
6
  import "./chunk-6P7U3HWG.js";
7
7
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccessIdentityContinuitySurface
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccessLcmSurface
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -2,7 +2,7 @@ import {
2
2
  EngramMcpServer,
3
3
  MCP_MIGRATED_OPERATIONS,
4
4
  MCP_SUPPORTED_PROTOCOL_VERSIONS
5
- } from "./chunk-D5S6RL32.js";
5
+ } from "./chunk-DDATG2SF.js";
6
6
  import "./chunk-B3DR2JBZ.js";
7
7
  import "./chunk-6P7U3HWG.js";
8
8
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccessObserveWriteSurface
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -1,4 +1,4 @@
1
- import "./chunk-D5S6RL32.js";
1
+ import "./chunk-DDATG2SF.js";
2
2
  import "./chunk-B3DR2JBZ.js";
3
3
  import "./chunk-6P7U3HWG.js";
4
4
  import "./chunk-H4CKS5B2.js";
@@ -22,7 +22,7 @@ import {
22
22
  memoryGetOperation,
23
23
  memorySearchOperation,
24
24
  memoryStoreOperation
25
- } from "./chunk-D5S6RL32.js";
25
+ } from "./chunk-DDATG2SF.js";
26
26
  import "./chunk-B3DR2JBZ.js";
27
27
  import "./chunk-6P7U3HWG.js";
28
28
  import "./chunk-H4CKS5B2.js";
@@ -4,7 +4,7 @@ import {
4
4
  createAndStartFlight,
5
5
  leadRecallFlight,
6
6
  withRecallConcurrency
7
- } from "./chunk-D5S6RL32.js";
7
+ } from "./chunk-DDATG2SF.js";
8
8
  import "./chunk-B3DR2JBZ.js";
9
9
  import "./chunk-6P7U3HWG.js";
10
10
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assembleRecallResponse
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AccessRecallSurface
3
- } from "./chunk-D5S6RL32.js";
3
+ } from "./chunk-DDATG2SF.js";
4
4
  import "./chunk-B3DR2JBZ.js";
5
5
  import "./chunk-6P7U3HWG.js";
6
6
  import "./chunk-H4CKS5B2.js";
@@ -4,7 +4,7 @@ import {
4
4
  buildProjectedGovernanceProposedActions,
5
5
  hasGroupedGovernanceActions,
6
6
  shapeMemorySummary
7
- } from "./chunk-D5S6RL32.js";
7
+ } from "./chunk-DDATG2SF.js";
8
8
  import "./chunk-B3DR2JBZ.js";
9
9
  import "./chunk-6P7U3HWG.js";
10
10
  import "./chunk-H4CKS5B2.js";
@@ -9757,6 +9757,22 @@ async function rethrowAfterCommittedWriteFinalization(finalizeCommittedWrites, c
9757
9757
  );
9758
9758
  throw cause;
9759
9759
  }
9760
+ var CommittedWriteFinalization = class {
9761
+ finalizer;
9762
+ started;
9763
+ bind(finalize) {
9764
+ this.finalizer = (scheduleQmd) => this.started ??= finalize(scheduleQmd);
9765
+ return this.finalizer;
9766
+ }
9767
+ async run(pass) {
9768
+ try {
9769
+ return await pass();
9770
+ } catch (err) {
9771
+ if (!this.finalizer || this.started) throw err;
9772
+ return rethrowAfterCommittedWriteFinalization(this.finalizer, err, "persist pass");
9773
+ }
9774
+ }
9775
+ };
9760
9776
 
9761
9777
  // src/security/injection-screen.ts
9762
9778
  var RULE_WEIGHTS = {
@@ -11283,7 +11299,11 @@ var ExtractionPersistCoordinator = class {
11283
11299
  if (!isDependencyPropagationEnabled(this.config)) return void 0;
11284
11300
  return this.deps.getDependencyPropagationDelivery();
11285
11301
  }
11286
- async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, sourceText, graphCaps = resolveGraphConstructionCapabilities(this.deps.config), lifecycleCaps = resolveMemoryLifecycleCapabilities(this.deps.config)) {
11302
+ persistExtraction(...args) {
11303
+ const finalization = new CommittedWriteFinalization();
11304
+ return finalization.run(() => this.persistExtractionPass(finalization, ...args));
11305
+ }
11306
+ async persistExtractionPass(finalization, result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, sourceText, graphCaps = resolveGraphConstructionCapabilities(this.deps.config), lifecycleCaps = resolveMemoryLifecycleCapabilities(this.deps.config)) {
11287
11307
  const citationEnabled = resolvePipelineProcessingCapabilities(this.deps.config).inlineSourceAttribution === true;
11288
11308
  const citationTemplate = this.deps.config.inlineSourceAttributionFormat;
11289
11309
  const factDedupEnabled = resolveRecallAuxiliaryCapabilities(this.deps.config).factDeduplication;
@@ -11838,7 +11858,7 @@ var ExtractionPersistCoordinator = class {
11838
11858
  0,
11839
11859
  this.deps.config.extractionMaxProfileUpdatesPerRun
11840
11860
  );
11841
- const finalizeCommittedWrites = async (scheduleQmd) => {
11861
+ const finalizeCommittedWrites = finalization.bind(async (scheduleQmd) => {
11842
11862
  await finalizeExtractionCommittedWrites({
11843
11863
  saveContentHashIndexes: () => this.deps.saveContentHashIndexes(),
11844
11864
  behaviorSignalsByStorage: behaviorSignalsByStorage.values(),
@@ -11859,7 +11879,7 @@ var ExtractionPersistCoordinator = class {
11859
11879
  requestQmdMaintenance: () => this.deps.requestQmdMaintenance(),
11860
11880
  scheduleQmd
11861
11881
  });
11862
- };
11882
+ });
11863
11883
  if (facts.length < result.facts.length || entities.length < result.entities.length || questions.length < result.questions.length || profileUpdates.length < result.profileUpdates.length) {
11864
11884
  log.warn(
11865
11885
  `persistExtraction: capped extraction payload to guardrails (facts ${facts.length}/${result.facts.length}, entities ${entities.length}/${result.entities.length}, questions ${questions.length}/${result.questions.length}, profile ${profileUpdates.length}/${result.profileUpdates.length})`
@@ -12488,6 +12508,22 @@ var ExtractionPersistCoordinator = class {
12488
12508
  const parentId = parentWrite.id;
12489
12509
  const tombstoneBlocked2 = parentWrite.tombstoneBlocked;
12490
12510
  const postWriteGuard2 = faithfulnessEnforceStatus === "pending_review" || tombstoneBlocked2;
12511
+ trackBehaviorSignals(
12512
+ targetStorage,
12513
+ buildBehaviorSignalsForMemory({
12514
+ memoryId: parentId,
12515
+ category: writeCategory,
12516
+ content: fact.content,
12517
+ namespace: this.deps.storageDirNamespace(targetStorage.dir),
12518
+ confidence: fact.confidence,
12519
+ source: "extraction"
12520
+ })
12521
+ );
12522
+ trackPersistedId(targetStorage, parentId, {
12523
+ pendingReview: postWriteGuard2,
12524
+ category: writeCategory,
12525
+ harmonicFact
12526
+ });
12491
12527
  const contradictionOutcome = await this.deps.applyDeferredContradictionResolve(
12492
12528
  contradiction,
12493
12529
  targetStorage,
@@ -12562,11 +12598,6 @@ var ExtractionPersistCoordinator = class {
12562
12598
  log.debug(
12563
12599
  `chunked memory ${parentId} into ${chunkResult.chunks.length} chunks`
12564
12600
  );
12565
- trackPersistedId(targetStorage, parentId, {
12566
- pendingReview: postWriteGuard2,
12567
- category: writeCategory,
12568
- harmonicFact
12569
- });
12570
12601
  await anchorSnapshots.replace(targetStorage, parentId, writeCategory, memoryPathById);
12571
12602
  if (!postWriteGuard2 && threadEpisodeIdsForGraph && !threadEpisodeIdsForGraph.includes(parentId)) {
12572
12603
  threadEpisodeIdsForGraph.push(parentId);
@@ -12693,17 +12724,6 @@ var ExtractionPersistCoordinator = class {
12693
12724
  }
12694
12725
  } finally {
12695
12726
  }
12696
- trackBehaviorSignals(
12697
- targetStorage,
12698
- buildBehaviorSignalsForMemory({
12699
- memoryId: parentId,
12700
- category: writeCategory,
12701
- content: fact.content,
12702
- namespace: this.deps.storageDirNamespace(targetStorage.dir),
12703
- confidence: fact.confidence,
12704
- source: "extraction"
12705
- })
12706
- );
12707
12727
  continue;
12708
12728
  }
12709
12729
  }
@@ -67134,4 +67154,4 @@ export {
67134
67154
  EngramAccessService,
67135
67155
  AccessAdminOpsSurface
67136
67156
  };
67137
- //# sourceMappingURL=chunk-D5S6RL32.js.map
67157
+ //# sourceMappingURL=chunk-DDATG2SF.js.map