@remnic/core 10.0.40 → 10.0.42
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 +3 -3
- package/dist/access-authorization-probe.js +4 -4
- package/dist/access-boundary.js +3 -3
- package/dist/access-cli.js +20 -20
- package/dist/access-extraction-force-flush.js +3 -3
- package/dist/access-http-briefing.js +4 -4
- package/dist/access-http-query.js +3 -3
- package/dist/access-http.js +15 -15
- package/dist/access-identity-continuity-surface.js +3 -3
- package/dist/access-lcm-surface.js +3 -3
- package/dist/access-mcp.js +10 -10
- package/dist/access-namespace-preflight.js +3 -3
- package/dist/access-observe-write-surface.js +3 -3
- package/dist/access-operations-batch.js +4 -4
- package/dist/access-operations.js +9 -9
- package/dist/access-recall-concurrency.js +3 -3
- package/dist/access-recall-response.js +3 -3
- package/dist/access-recall-surface.js +3 -3
- package/dist/access-service.d.ts +1 -0
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +3 -3
- package/dist/access-surface-catalog.js +5 -5
- package/dist/{chunk-NBEM5QEH.js → chunk-3ALI4FY6.js} +3 -3
- package/dist/{chunk-M7KGIW5F.js → chunk-4KS4IHKH.js} +2 -2
- package/dist/{chunk-GRN4BVPM.js → chunk-BEAW464C.js} +2 -2
- package/dist/{chunk-WJMAWDAU.js → chunk-CJKLRBLT.js} +2 -2
- package/dist/{chunk-IJJWM2ZA.js → chunk-CMUNW67K.js} +2 -2
- package/dist/{chunk-2T6KEOUL.js → chunk-DB3RMRV7.js} +2 -2
- package/dist/{chunk-RPHCSMTQ.js → chunk-F22JNLX3.js} +5 -5
- package/dist/{chunk-NFJWB27H.js → chunk-F7MP76CB.js} +2 -2
- package/dist/{chunk-IF6EG22P.js → chunk-HWEWQC6J.js} +2 -2
- package/dist/{chunk-LB6HIXQC.js → chunk-JRFB6PQY.js} +2 -2
- package/dist/{chunk-5TJEOU6Y.js → chunk-LKRXGOQW.js} +18 -8
- package/dist/{chunk-5TJEOU6Y.js.map → chunk-LKRXGOQW.js.map} +1 -1
- package/dist/{chunk-Y473XFTD.js → chunk-M2YC4YFA.js} +2 -2
- package/dist/{chunk-QFD7OANX.js → chunk-MGRXFPBA.js} +4 -3
- package/dist/chunk-MGRXFPBA.js.map +1 -0
- package/dist/{chunk-GLB6VV3J.js → chunk-OUYYEPXD.js} +3 -3
- package/dist/{chunk-EPEDMEHO.js → chunk-SEVMJSQW.js} +2 -2
- package/dist/{chunk-HSNV4CSW.js → chunk-TOCDY4BJ.js} +4 -4
- package/dist/{chunk-XLUMO5H2.js → chunk-UTA4O5MJ.js} +8 -8
- package/dist/{chunk-PW63SXFM.js → chunk-ZI4LCS7K.js} +2 -2
- package/dist/{chunk-I7CWAJHX.js → chunk-ZN7VA5RL.js} +2 -2
- package/dist/{chunk-HN35OH2C.js → chunk-ZPSNLMSX.js} +2 -2
- package/dist/cli.js +16 -16
- package/dist/connectors/index.js +1 -1
- package/dist/external-wiki-access.js +4 -4
- package/dist/extraction.js +4 -4
- package/dist/index.js +20 -20
- package/dist/memory-browse-operations.js +4 -4
- package/dist/orchestrator.js +20 -20
- package/dist/recall-navigation-operations.js +4 -4
- package/dist/recall-navigation.js +3 -3
- package/dist/runtime/daemon-health.d.ts.map +1 -1
- package/dist/source-agent-qualifier.js +3 -3
- package/dist/support-passport/index.js +6 -6
- package/package.json +3 -3
- package/src/access-service.ts +2 -0
- package/src/runtime/daemon-health.test.ts +85 -0
- package/src/runtime/daemon-health.ts +20 -7
- package/dist/chunk-QFD7OANX.js.map +0 -1
- /package/dist/{chunk-NBEM5QEH.js.map → chunk-3ALI4FY6.js.map} +0 -0
- /package/dist/{chunk-M7KGIW5F.js.map → chunk-4KS4IHKH.js.map} +0 -0
- /package/dist/{chunk-GRN4BVPM.js.map → chunk-BEAW464C.js.map} +0 -0
- /package/dist/{chunk-WJMAWDAU.js.map → chunk-CJKLRBLT.js.map} +0 -0
- /package/dist/{chunk-IJJWM2ZA.js.map → chunk-CMUNW67K.js.map} +0 -0
- /package/dist/{chunk-2T6KEOUL.js.map → chunk-DB3RMRV7.js.map} +0 -0
- /package/dist/{chunk-RPHCSMTQ.js.map → chunk-F22JNLX3.js.map} +0 -0
- /package/dist/{chunk-NFJWB27H.js.map → chunk-F7MP76CB.js.map} +0 -0
- /package/dist/{chunk-IF6EG22P.js.map → chunk-HWEWQC6J.js.map} +0 -0
- /package/dist/{chunk-LB6HIXQC.js.map → chunk-JRFB6PQY.js.map} +0 -0
- /package/dist/{chunk-Y473XFTD.js.map → chunk-M2YC4YFA.js.map} +0 -0
- /package/dist/{chunk-GLB6VV3J.js.map → chunk-OUYYEPXD.js.map} +0 -0
- /package/dist/{chunk-EPEDMEHO.js.map → chunk-SEVMJSQW.js.map} +0 -0
- /package/dist/{chunk-HSNV4CSW.js.map → chunk-TOCDY4BJ.js.map} +0 -0
- /package/dist/{chunk-XLUMO5H2.js.map → chunk-UTA4O5MJ.js.map} +0 -0
- /package/dist/{chunk-PW63SXFM.js.map → chunk-ZI4LCS7K.js.map} +0 -0
- /package/dist/{chunk-I7CWAJHX.js.map → chunk-ZN7VA5RL.js.map} +0 -0
- /package/dist/{chunk-HN35OH2C.js.map → chunk-ZPSNLMSX.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.42",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3317,7 +3317,7 @@
|
|
|
3317
3317
|
"meilisearch": "^0.46.0",
|
|
3318
3318
|
"node-gyp": "^12.3.0",
|
|
3319
3319
|
"openai": "^6.0.0",
|
|
3320
|
-
"undici": "^6.
|
|
3320
|
+
"undici": "^6.29.1",
|
|
3321
3321
|
"zod": "^3.25.28",
|
|
3322
3322
|
"zod-to-json-schema": "^3.25.2"
|
|
3323
3323
|
},
|
|
@@ -3347,7 +3347,7 @@
|
|
|
3347
3347
|
"core"
|
|
3348
3348
|
],
|
|
3349
3349
|
"peerDependencies": {
|
|
3350
|
-
"@remnic/coding-graph": "^10.0.
|
|
3350
|
+
"@remnic/coding-graph": "^10.0.42"
|
|
3351
3351
|
},
|
|
3352
3352
|
"peerDependenciesMeta": {
|
|
3353
3353
|
"@remnic/coding-graph": {
|
package/src/access-service.ts
CHANGED
|
@@ -603,6 +603,7 @@ export interface EngramAccessTimelineResponse {
|
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
export interface EngramAccessEntitySummary {
|
|
606
|
+
id: string;
|
|
606
607
|
name: string;
|
|
607
608
|
type: string;
|
|
608
609
|
updated: string;
|
|
@@ -3534,6 +3535,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
3534
3535
|
if (!haystack.includes(query)) continue;
|
|
3535
3536
|
}
|
|
3536
3537
|
entities.push({
|
|
3538
|
+
id: name,
|
|
3537
3539
|
name: entity.name,
|
|
3538
3540
|
type: entity.type,
|
|
3539
3541
|
updated: entity.updated,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { once } from "node:events";
|
|
3
|
+
import test from "node:test";
|
|
4
|
+
import { Worker } from "node:worker_threads";
|
|
5
|
+
import { checkDaemonHealth } from "./daemon-health.js";
|
|
6
|
+
|
|
7
|
+
test("checkDaemonHealth probes /live without waiting on diagnostic /health", { timeout: 30_000 }, async (t) => {
|
|
8
|
+
// The synchronous probe blocks this thread, so HTTP must run on a worker.
|
|
9
|
+
const worker = new Worker(`
|
|
10
|
+
const { parentPort } = require("node:worker_threads");
|
|
11
|
+
const { createServer } = require("node:http");
|
|
12
|
+
const paths = [];
|
|
13
|
+
const server = createServer((request, response) => {
|
|
14
|
+
paths.push(request.url);
|
|
15
|
+
if (request.url === "/engram/v1/health") return;
|
|
16
|
+
response.writeHead(request.headers.authorization === "Bearer test-token" ? 200 : 401).end();
|
|
17
|
+
});
|
|
18
|
+
server.listen(0, "127.0.0.1", () => parentPort.postMessage(server.address().port));
|
|
19
|
+
parentPort.on("message", () => parentPort.postMessage(paths));
|
|
20
|
+
`, { eval: true });
|
|
21
|
+
t.after(() => worker.terminate());
|
|
22
|
+
let port = 0;
|
|
23
|
+
[port] = await once(worker, "message");
|
|
24
|
+
assert.ok(Number.isInteger(port) && port > 0 && port <= 65535);
|
|
25
|
+
assert.equal(checkDaemonHealth("127.0.0.1", port, "test-token"), true);
|
|
26
|
+
assert.equal(checkDaemonHealth("127.0.0.1", port, "wrong-token"), false);
|
|
27
|
+
const paths = once(worker, "message");
|
|
28
|
+
worker.postMessage("paths");
|
|
29
|
+
assert.deepEqual((await paths)[0], [
|
|
30
|
+
"/engram/v1/live",
|
|
31
|
+
"/engram/v1/live",
|
|
32
|
+
"/engram/v1/live",
|
|
33
|
+
]);
|
|
34
|
+
await worker.terminate();
|
|
35
|
+
assert.equal(checkDaemonHealth("127.0.0.1", port, "test-token"), false);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("checkDaemonHealth retries legacy /health only on 404 (#3257)", { timeout: 30_000 }, async (t) => {
|
|
39
|
+
const worker = new Worker(`
|
|
40
|
+
const { parentPort } = require("node:worker_threads");
|
|
41
|
+
const { createServer } = require("node:http");
|
|
42
|
+
const paths = [];
|
|
43
|
+
const server = createServer((request, response) => {
|
|
44
|
+
paths.push(request.url);
|
|
45
|
+
if (request.url === "/engram/v1/live") return response.writeHead(404).end();
|
|
46
|
+
response.writeHead(200).end();
|
|
47
|
+
});
|
|
48
|
+
server.listen(0, "127.0.0.1", () => parentPort.postMessage(server.address().port));
|
|
49
|
+
parentPort.on("message", () => parentPort.postMessage(paths));
|
|
50
|
+
`, { eval: true });
|
|
51
|
+
t.after(() => worker.terminate());
|
|
52
|
+
let port = 0;
|
|
53
|
+
[port] = await once(worker, "message");
|
|
54
|
+
assert.equal(checkDaemonHealth("127.0.0.1", port, "test-token"), true);
|
|
55
|
+
const paths = once(worker, "message");
|
|
56
|
+
worker.postMessage("paths");
|
|
57
|
+
assert.deepEqual((await paths)[0], [
|
|
58
|
+
"/engram/v1/live",
|
|
59
|
+
"/engram/v1/health",
|
|
60
|
+
]);
|
|
61
|
+
await worker.terminate();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test("checkDaemonHealth treats 503 as final with no legacy retry (#3257)", { timeout: 30_000 }, async (t) => {
|
|
65
|
+
const worker = new Worker(`
|
|
66
|
+
const { parentPort } = require("node:worker_threads");
|
|
67
|
+
const { createServer } = require("node:http");
|
|
68
|
+
const paths = [];
|
|
69
|
+
const server = createServer((request, response) => {
|
|
70
|
+
paths.push(request.url);
|
|
71
|
+
if (request.url === "/engram/v1/live") return response.writeHead(503).end();
|
|
72
|
+
response.writeHead(200).end();
|
|
73
|
+
});
|
|
74
|
+
server.listen(0, "127.0.0.1", () => parentPort.postMessage(server.address().port));
|
|
75
|
+
parentPort.on("message", () => parentPort.postMessage(paths));
|
|
76
|
+
`, { eval: true });
|
|
77
|
+
t.after(() => worker.terminate());
|
|
78
|
+
let port = 0;
|
|
79
|
+
[port] = await once(worker, "message");
|
|
80
|
+
assert.equal(checkDaemonHealth("127.0.0.1", port, "test-token"), false);
|
|
81
|
+
const paths = once(worker, "message");
|
|
82
|
+
worker.postMessage("paths");
|
|
83
|
+
assert.deepEqual((await paths)[0], ["/engram/v1/live"]);
|
|
84
|
+
await worker.terminate();
|
|
85
|
+
});
|
|
@@ -16,6 +16,9 @@ export function checkDaemonHealth(
|
|
|
16
16
|
if (!Number.isFinite(safePort) || safePort < 1 || safePort > 65535) return false;
|
|
17
17
|
|
|
18
18
|
const bareHost = host.startsWith("[") && host.endsWith("]") ? host.slice(1, -1) : host;
|
|
19
|
+
// One 3 s aggregate budget: /engram/v1/live, and only a 404 (daemon older
|
|
20
|
+
// than the live route) retries the legacy diagnostic path with the
|
|
21
|
+
// remaining time. 401/503/other statuses are final answers, never re-probed.
|
|
19
22
|
const script = [
|
|
20
23
|
"const env = process['env'];",
|
|
21
24
|
"const protocol = env.REMNIC_HEALTH_PROTOCOL;",
|
|
@@ -23,13 +26,23 @@ export function checkDaemonHealth(
|
|
|
23
26
|
"const transport = require(protocol);",
|
|
24
27
|
"const headers = {};",
|
|
25
28
|
"if (env.REMNIC_HEALTH_TOKEN) headers['authorization'] = 'Bearer ' + env.REMNIC_HEALTH_TOKEN;",
|
|
26
|
-
"const
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"const exitFor = (status) => process.exit(status === 200 ? 0 : status === 401 ? 2 : 1);",
|
|
30
|
+
"const attempt = (path, timeoutMs, onStatus) => {",
|
|
31
|
+
" const req = transport.get({",
|
|
32
|
+
" host: env.REMNIC_HEALTH_HOST,",
|
|
33
|
+
" port: parseInt(env.REMNIC_HEALTH_PORT, 10),",
|
|
34
|
+
" path, headers, timeout: timeoutMs,",
|
|
35
|
+
" }, (res) => { res.resume(); onStatus(res.statusCode); });",
|
|
36
|
+
" req.on('error', () => process.exit(1));",
|
|
37
|
+
" req.on('timeout', () => { req.destroy(); process.exit(1); });",
|
|
38
|
+
"};",
|
|
39
|
+
"const deadline = Date.now() + 3000;",
|
|
40
|
+
"attempt('/engram/v1/live', 3000, (status) => {",
|
|
41
|
+
" if (status !== 404) exitFor(status);",
|
|
42
|
+
" const remaining = deadline - Date.now();",
|
|
43
|
+
" if (remaining <= 0) process.exit(1);",
|
|
44
|
+
" attempt('/engram/v1/health', remaining, exitFor);",
|
|
45
|
+
"});",
|
|
33
46
|
].join("\n");
|
|
34
47
|
const env: NodeJS.ProcessEnv = mergeEnv({
|
|
35
48
|
REMNIC_HEALTH_HOST: bareHost,
|