@remnic/core 10.0.97 → 10.0.99
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-admin-ops-surface.js +1 -1
- package/dist/access-cli.js +1 -1
- package/dist/access-extraction-force-flush.js +1 -1
- package/dist/access-http-briefing.js +1 -1
- package/dist/access-http-query.js +1 -1
- package/dist/access-http.js +1 -1
- package/dist/access-identity-continuity-surface.js +1 -1
- package/dist/access-lcm-surface.js +1 -1
- package/dist/access-mcp.js +1 -1
- package/dist/access-observe-write-surface.js +1 -1
- package/dist/access-operations-batch.js +1 -1
- package/dist/access-operations.js +1 -1
- package/dist/access-recall-concurrency.js +1 -1
- package/dist/access-recall-response.js +1 -1
- package/dist/access-recall-surface.js +1 -1
- package/dist/access-service.js +1 -1
- package/dist/{chunk-AMRGZOIP.js → chunk-UBJ5RPDM.js} +2 -2
- package/dist/{chunk-3ETADXEP.js → chunk-VZMRKYNR.js} +40 -3
- package/dist/chunk-VZMRKYNR.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/explicit-capture.js +1 -1
- package/dist/index.js +1 -1
- package/dist/orchestration/backlog-scheduler.d.ts +6 -1
- package/dist/orchestration/backlog-scheduler.d.ts.map +1 -1
- package/dist/orchestration/backlog-scheduler.js +20 -4
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +2 -2
- package/dist/orchestration/orchestrator-init.d.ts +3 -0
- package/dist/orchestration/orchestrator-init.d.ts.map +1 -1
- package/dist/orchestration/task-exit.d.ts +15 -0
- package/dist/orchestration/task-exit.d.ts.map +1 -0
- package/dist/orchestration/turn-ingestion.d.ts +1 -7
- package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +1 -1
- package/dist/recall-navigation.js +1 -1
- package/package.json +2 -2
- package/src/backlog-scheduler.test.ts +48 -0
- package/src/orchestration/backlog-scheduler.ts +23 -2
- package/src/orchestration/extraction-queue-bounded-retention.test.ts +20 -0
- package/src/orchestration/orchestrator-init.ts +25 -0
- package/src/orchestration/task-exit.ts +27 -0
- package/src/orchestration/turn-ingestion.ts +7 -9
- package/src/orchestrator-init.test.ts +132 -1
- package/src/orchestrator.ts +3 -0
- package/dist/chunk-3ETADXEP.js.map +0 -1
- /package/dist/{chunk-AMRGZOIP.js.map → chunk-UBJ5RPDM.js.map} +0 -0
package/dist/access-cli.js
CHANGED
package/dist/access-http.js
CHANGED
package/dist/access-mcp.js
CHANGED
package/dist/access-service.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ExtractionDrain,
|
|
3
3
|
TurnIngestionCoordinator,
|
|
4
4
|
shouldSkipImplicitExtraction
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VZMRKYNR.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-
|
|
450
|
+
//# sourceMappingURL=chunk-UBJ5RPDM.js.map
|
|
@@ -21076,6 +21076,26 @@ var ExtractionSnapshotSharingRegistry = class {
|
|
|
21076
21076
|
}
|
|
21077
21077
|
};
|
|
21078
21078
|
|
|
21079
|
+
// src/orchestration/task-exit.ts
|
|
21080
|
+
function createTaskExit(onExit) {
|
|
21081
|
+
let started = false;
|
|
21082
|
+
let reported = false;
|
|
21083
|
+
const report = () => {
|
|
21084
|
+
if (reported) return;
|
|
21085
|
+
reported = true;
|
|
21086
|
+
onExit?.();
|
|
21087
|
+
};
|
|
21088
|
+
return {
|
|
21089
|
+
start: () => {
|
|
21090
|
+
started = true;
|
|
21091
|
+
},
|
|
21092
|
+
settled: () => {
|
|
21093
|
+
if (!started) report();
|
|
21094
|
+
},
|
|
21095
|
+
report
|
|
21096
|
+
};
|
|
21097
|
+
}
|
|
21098
|
+
|
|
21079
21099
|
// src/orchestration/turn-ingestion.ts
|
|
21080
21100
|
function isFlushPlanRecoveryTurn(turn) {
|
|
21081
21101
|
const provenance = turn.importProvenance;
|
|
@@ -21527,6 +21547,7 @@ var TurnIngestionCoordinator = class {
|
|
|
21527
21547
|
const extractionDeadlineMs = typeof options.extractionDeadlineMs === "number" && Number.isFinite(options.extractionDeadlineMs) ? options.extractionDeadlineMs : void 0;
|
|
21528
21548
|
let timeout;
|
|
21529
21549
|
let settled = false;
|
|
21550
|
+
const exit = createTaskExit(options.onTaskExit);
|
|
21530
21551
|
const clearQueueWaitTimer = () => {
|
|
21531
21552
|
if (timeout) {
|
|
21532
21553
|
clearTimeout(timeout);
|
|
@@ -21546,6 +21567,7 @@ var TurnIngestionCoordinator = class {
|
|
|
21546
21567
|
clearQueueWaitTimer();
|
|
21547
21568
|
clearAbortListener();
|
|
21548
21569
|
options.onTaskSettled?.(error, result);
|
|
21570
|
+
exit.settled();
|
|
21549
21571
|
return true;
|
|
21550
21572
|
};
|
|
21551
21573
|
if (options.abortSignal) {
|
|
@@ -21581,6 +21603,7 @@ var TurnIngestionCoordinator = class {
|
|
|
21581
21603
|
const sharingNode = automaticSnapshotSharingEligible(options) && turnsToExtract.length > 0 ? this.snapshotSharing.admit(bufferKey, turnsToExtract) : void 0;
|
|
21582
21604
|
const queuedTurnsSource = sharingNode ? { chain: sharingNode } : { direct: turnsToExtract };
|
|
21583
21605
|
const accepted = this.deps.extractionQueueCoordinator.enqueue(async (preemptHandle) => {
|
|
21606
|
+
exit.start();
|
|
21584
21607
|
try {
|
|
21585
21608
|
await this.deps.extractionQueueCoordinator.runPreemptable(preemptHandle, preemptable, options.abortSignal, async (abortSignal) => {
|
|
21586
21609
|
if (settled) return;
|
|
@@ -21709,13 +21732,13 @@ var TurnIngestionCoordinator = class {
|
|
|
21709
21732
|
});
|
|
21710
21733
|
} finally {
|
|
21711
21734
|
if (sharingNode) this.snapshotSharing.release(sharingNode);
|
|
21712
|
-
|
|
21735
|
+
exit.report();
|
|
21713
21736
|
}
|
|
21714
21737
|
}, { front: options.preemptRunning === true, key: bufferKey });
|
|
21715
21738
|
if (!accepted) {
|
|
21716
21739
|
if (sharingNode) this.snapshotSharing.release(sharingNode);
|
|
21717
21740
|
settleTask(new Error("extraction queue is stopped"));
|
|
21718
|
-
|
|
21741
|
+
exit.report();
|
|
21719
21742
|
return;
|
|
21720
21743
|
}
|
|
21721
21744
|
log.debug(`queued extraction from ${reason}`);
|
|
@@ -22578,6 +22601,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
22578
22601
|
correctionRecoveryChain = Promise.resolve();
|
|
22579
22602
|
startupEpochAbort;
|
|
22580
22603
|
startupStorageWrites = /* @__PURE__ */ new Set();
|
|
22604
|
+
startupWarmups = /* @__PURE__ */ new Set();
|
|
22581
22605
|
/** Retire the current lifecycle without constructing a lazy coordinator. */
|
|
22582
22606
|
retireStartupEpoch() {
|
|
22583
22607
|
this.startupEpochAbort?.controller.abort();
|
|
@@ -22594,6 +22618,10 @@ var OrchestratorInitCoordinator = class {
|
|
|
22594
22618
|
this.startupStorageWrites.delete(write);
|
|
22595
22619
|
}
|
|
22596
22620
|
}
|
|
22621
|
+
/** Wait for background startup warm-ups; destroy() only, never the deferredReady gate. */
|
|
22622
|
+
async drainStartupWarmups() {
|
|
22623
|
+
await Promise.allSettled([...this.startupWarmups]);
|
|
22624
|
+
}
|
|
22597
22625
|
async drainEntityMigrations() {
|
|
22598
22626
|
await Promise.allSettled([...this.startupStorageWrites]);
|
|
22599
22627
|
const drains = [this.deps.storage.drainEntityCanonicalIdMigration()];
|
|
@@ -22991,6 +23019,14 @@ var OrchestratorInitCoordinator = class {
|
|
|
22991
23019
|
this.deps.deferredSyncSucceeded = true;
|
|
22992
23020
|
}
|
|
22993
23021
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
23022
|
+
const factHashWarm = (async () => {
|
|
23023
|
+
const storage = await this.deps.storageRouter.storageFor(this.deps.config.defaultNamespace);
|
|
23024
|
+
await storage.isFactContentHashAuthoritative();
|
|
23025
|
+
})().catch((err) => {
|
|
23026
|
+
log.debug(`fact-hash index startup warm-up failed (non-fatal): ${err}`);
|
|
23027
|
+
});
|
|
23028
|
+
this.startupWarmups.add(factHashWarm);
|
|
23029
|
+
void factHashWarm.finally(() => this.startupWarmups.delete(factHashWarm));
|
|
22994
23030
|
const warmupPromises = [];
|
|
22995
23031
|
if (this.deps.qmd.isAvailable()) {
|
|
22996
23032
|
const warmupNs = this.deps.config.defaultNamespace;
|
|
@@ -28052,6 +28088,7 @@ var Orchestrator = class {
|
|
|
28052
28088
|
} catch (err) {
|
|
28053
28089
|
bufferFlushError = err;
|
|
28054
28090
|
}
|
|
28091
|
+
await this._orchestratorInitCoordinator?.drainStartupWarmups();
|
|
28055
28092
|
const extractionDrainError = await drainExtractionAndShutdownDependencyPropagation(
|
|
28056
28093
|
this.extractionQueueCoordinator,
|
|
28057
28094
|
this._dependencyPropagationDelivery
|
|
@@ -67163,4 +67200,4 @@ export {
|
|
|
67163
67200
|
EngramAccessService,
|
|
67164
67201
|
AccessAdminOpsSurface
|
|
67165
67202
|
};
|
|
67166
|
-
//# sourceMappingURL=chunk-
|
|
67203
|
+
//# sourceMappingURL=chunk-VZMRKYNR.js.map
|