@remnic/core 10.0.119 → 10.0.120
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-MSXAR3M5.js → chunk-6N5E5G2C.js} +2 -2
- package/dist/{chunk-HH6L3KV5.js → chunk-I4MAV5UZ.js} +1 -1
- package/dist/chunk-I4MAV5UZ.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.js +2 -2
- package/dist/orchestration/buffer-drain-runner.js +2 -2
- package/dist/orchestration/drain-extraction.d.ts +2 -1
- package/dist/orchestration/drain-extraction.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/orchestration/drain-extraction.test.ts +71 -0
- package/src/orchestration/drain-extraction.ts +2 -1
- package/dist/chunk-HH6L3KV5.js.map +0 -1
- /package/dist/{chunk-MSXAR3M5.js.map → chunk-6N5E5G2C.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
runWorkProductStatusCliCommand,
|
|
92
92
|
runWorkProjectCliCommand,
|
|
93
93
|
runWorkTaskCliCommand
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-I4MAV5UZ.js";
|
|
95
95
|
import "./chunk-6P7U3HWG.js";
|
|
96
96
|
import "./chunk-PQM3B54K.js";
|
|
97
97
|
import "./chunk-B3DR2JBZ.js";
|
package/dist/explicit-capture.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
shouldSkipImplicitExtraction,
|
|
9
9
|
stripInlineExplicitCaptureNotes,
|
|
10
10
|
validateExplicitCaptureInput
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I4MAV5UZ.js";
|
|
12
12
|
import "./chunk-6P7U3HWG.js";
|
|
13
13
|
import "./chunk-PQM3B54K.js";
|
|
14
14
|
import "./chunk-B3DR2JBZ.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BufferDrainRunner,
|
|
3
3
|
ClaimBufferStorage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-6N5E5G2C.js";
|
|
5
|
+
import "../chunk-I4MAV5UZ.js";
|
|
6
6
|
import "../chunk-6P7U3HWG.js";
|
|
7
7
|
import "../chunk-PQM3B54K.js";
|
|
8
8
|
import "../chunk-B3DR2JBZ.js";
|
|
@@ -8,7 +8,8 @@ import type { RevalidationFastChatCompletion } from "./dependency-revalidation.j
|
|
|
8
8
|
* client, so a drain extraction has its own request lane: it is never queued
|
|
9
9
|
* behind summaries, consolidation or live extraction on the shared client
|
|
10
10
|
* (production waits reached 40 minutes). The client also does not retry after
|
|
11
|
-
* a timed-out attempt (`localLlmRetry5xxCount: 0`
|
|
11
|
+
* a failed or timed-out attempt (`localLlmRetry5xxCount: 0` turns off the plain
|
|
12
|
+
* 5xx retry too, since both share one attempt loop): the breaker and per-key
|
|
12
13
|
* backoff own retrying, and a second 600 s attempt only held the engine slot.
|
|
13
14
|
* Rate-limit retries have their own budget and are unchanged.
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drain-extraction.d.ts","sourceRoot":"","sources":["../../src/orchestration/drain-extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAEnF
|
|
1
|
+
{"version":3,"file":"drain-extraction.d.ts","sourceRoot":"","sources":["../../src/orchestration/drain-extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAEnF;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,8BAA8B,GACjD,gBAAgB,CAKlB"}
|
package/dist/orchestrator.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
mergeGraphExpandedResults,
|
|
7
7
|
qmdStartupCollectionChecksWithTimeout,
|
|
8
8
|
resolveEffectiveIdentityInjectionMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I4MAV5UZ.js";
|
|
10
10
|
import "./chunk-6P7U3HWG.js";
|
|
11
11
|
import "./chunk-PQM3B54K.js";
|
|
12
12
|
import "./chunk-B3DR2JBZ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.120",
|
|
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.
|
|
3389
|
+
"@remnic/coding-graph": "^10.0.120"
|
|
3390
3390
|
},
|
|
3391
3391
|
"peerDependenciesMeta": {
|
|
3392
3392
|
"@remnic/coding-graph": {
|
|
@@ -108,3 +108,74 @@ test("the orchestrator's claim-drain coordinator extracts with one attempt", asy
|
|
|
108
108
|
await cleanupDir(memoryDir);
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
+
|
|
112
|
+
function liveEngineOf(orchestrator: Orchestrator): ExtractionEngine {
|
|
113
|
+
// The extraction field is orchestrator-private: read the own property and narrow it by class, with no cast.
|
|
114
|
+
const live: unknown = Object.getOwnPropertyDescriptor(orchestrator, "extraction")?.value;
|
|
115
|
+
assert.ok(live instanceof ExtractionEngine, "the orchestrator's live extraction engine");
|
|
116
|
+
return live;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const emptyExtractionResponse = () =>
|
|
120
|
+
new Response(
|
|
121
|
+
JSON.stringify({
|
|
122
|
+
choices: [{ message: { content: JSON.stringify({ facts: [], entities: [], questions: [], profileUpdates: [] }) } }],
|
|
123
|
+
usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
|
|
124
|
+
}),
|
|
125
|
+
{ status: 200, headers: { "content-type": "application/json" } },
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
test("a drain extraction starts while a live extraction holds the shared client", async () => {
|
|
129
|
+
const memoryDir = await mkTempMemoryDir("drain-extraction-lane");
|
|
130
|
+
const orchestrator = new Orchestrator(
|
|
131
|
+
makeLifecycleConfig(memoryDir, {
|
|
132
|
+
localLlmEnabled: true,
|
|
133
|
+
localLlmModel: "fixture-local",
|
|
134
|
+
localLlmUrl: "http://127.0.0.1:1234",
|
|
135
|
+
localLlmFallback: false,
|
|
136
|
+
// The held live request ends at the client's own timeout, or at destroy() below. Retries are off
|
|
137
|
+
// so a drain engine that shared the live client would still pass the one-attempt test.
|
|
138
|
+
localLlmTimeoutMs: 5_000,
|
|
139
|
+
localLlmRetry5xxCount: 0,
|
|
140
|
+
slowLogEnabled: false,
|
|
141
|
+
}),
|
|
142
|
+
);
|
|
143
|
+
const liveStarted = Promise.withResolvers<void>();
|
|
144
|
+
let liveSettled = false;
|
|
145
|
+
let liveSettledWhenDrainStarted: boolean | undefined;
|
|
146
|
+
const original = globalThis.fetch;
|
|
147
|
+
let chat = 0;
|
|
148
|
+
// SAFETY: the client only calls fetch(url, init); the stub keeps that call shape and returns a Response.
|
|
149
|
+
globalThis.fetch = ((url: string | URL | Request, init?: RequestInit) => {
|
|
150
|
+
if (!String(url).endsWith("/chat/completions")) {
|
|
151
|
+
return Promise.resolve(new Response(modelsBody, { status: 200, headers: { "content-type": "application/json" } }));
|
|
152
|
+
}
|
|
153
|
+
chat += 1;
|
|
154
|
+
if (chat === 1) {
|
|
155
|
+
liveStarted.resolve();
|
|
156
|
+
return neverAnswers(init).catch((err: Error) => {
|
|
157
|
+
liveSettled = true;
|
|
158
|
+
throw err;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
liveSettledWhenDrainStarted ??= liveSettled;
|
|
162
|
+
return Promise.resolve(emptyExtractionResponse());
|
|
163
|
+
}) as typeof fetch;
|
|
164
|
+
try {
|
|
165
|
+
const live = liveEngineOf(orchestrator).extract(TURNS);
|
|
166
|
+
await liveStarted.promise;
|
|
167
|
+
await orchestrator.extractionRunCoordinatorForBuffer(orchestrator.buffer).runExtraction(TURNS, {
|
|
168
|
+
skipCharThreshold: true,
|
|
169
|
+
skipUserTurnThreshold: true,
|
|
170
|
+
clearBufferAfterExtraction: false,
|
|
171
|
+
bufferKey: "drain-lane",
|
|
172
|
+
});
|
|
173
|
+
assert.equal(liveSettledWhenDrainStarted, false, "the drain's model call started while the live request was still held");
|
|
174
|
+
await orchestrator.destroy();
|
|
175
|
+
await live;
|
|
176
|
+
} finally {
|
|
177
|
+
globalThis.fetch = original;
|
|
178
|
+
await orchestrator.destroy().catch(() => undefined);
|
|
179
|
+
await cleanupDir(memoryDir);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
@@ -10,7 +10,8 @@ import type { RevalidationFastChatCompletion } from "./dependency-revalidation.j
|
|
|
10
10
|
* client, so a drain extraction has its own request lane: it is never queued
|
|
11
11
|
* behind summaries, consolidation or live extraction on the shared client
|
|
12
12
|
* (production waits reached 40 minutes). The client also does not retry after
|
|
13
|
-
* a timed-out attempt (`localLlmRetry5xxCount: 0`
|
|
13
|
+
* a failed or timed-out attempt (`localLlmRetry5xxCount: 0` turns off the plain
|
|
14
|
+
* 5xx retry too, since both share one attempt loop): the breaker and per-key
|
|
14
15
|
* backoff own retrying, and a second 600 s attempt only held the engine slot.
|
|
15
16
|
* Rate-limit retries have their own budget and are unchanged.
|
|
16
17
|
*/
|