@remnic/core 9.3.768 → 9.3.769
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-cli.js +5 -5
- package/dist/access-http.d.ts +51 -1
- package/dist/access-http.js +2 -2
- package/dist/access-mcp.d.ts +7 -1
- package/dist/access-mcp.js +5 -3
- package/dist/access-operations.d.ts +4 -4
- package/dist/access-schema.d.ts +68 -68
- package/dist/{chunk-TVLN5EZZ.js → chunk-CNXMWYLA.js} +78 -3
- package/dist/chunk-CNXMWYLA.js.map +1 -0
- package/dist/{chunk-UG274TNV.js → chunk-E2SPGGUI.js} +13 -8
- package/dist/chunk-E2SPGGUI.js.map +1 -0
- package/dist/{chunk-HBOPSFQQ.js → chunk-EVXI2I6G.js} +3 -3
- package/dist/{chunk-4DLFJJOQ.js → chunk-QMN3CIFS.js} +2 -2
- package/dist/{chunk-J3UJJZKI.js → chunk-SIPZ5UMK.js} +85 -5
- package/dist/chunk-SIPZ5UMK.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/connectors/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -5
- package/dist/orchestrator.js +5 -5
- package/dist/schemas.d.ts +84 -84
- package/dist/shared-context/manager.d.ts +8 -8
- package/dist/tokens.d.ts +3 -1
- package/dist/tokens.js +3 -1
- package/dist/transfer/types.d.ts +66 -66
- package/package.json +2 -2
- package/src/access-http.test.ts +350 -0
- package/src/access-http.ts +160 -6
- package/src/access-mcp.ts +120 -3
- package/src/index.ts +3 -0
- package/src/tokens.test.ts +58 -0
- package/src/tokens.ts +19 -8
- package/dist/chunk-J3UJJZKI.js.map +0 -1
- package/dist/chunk-TVLN5EZZ.js.map +0 -1
- package/dist/chunk-UG274TNV.js.map +0 -1
- /package/dist/{chunk-HBOPSFQQ.js.map → chunk-EVXI2I6G.js.map} +0 -0
- /package/dist/{chunk-4DLFJJOQ.js.map → chunk-QMN3CIFS.js.map} +0 -0
package/dist/access-cli.js
CHANGED
|
@@ -23,13 +23,13 @@ import "./chunk-ABP6QMVM.js";
|
|
|
23
23
|
import "./chunk-HW5EF6LV.js";
|
|
24
24
|
import "./chunk-QPTP6SKC.js";
|
|
25
25
|
import "./chunk-JRZV3767.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-QMN3CIFS.js";
|
|
27
27
|
import "./chunk-V5OCT34X.js";
|
|
28
28
|
import "./chunk-LXOM6IQU.js";
|
|
29
29
|
import "./chunk-VOUOLGIP.js";
|
|
30
30
|
import "./chunk-S75M5ZRK.js";
|
|
31
31
|
import "./chunk-ECZU5BJH.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-E2SPGGUI.js";
|
|
33
33
|
import "./chunk-UHGBNIOS.js";
|
|
34
34
|
import "./chunk-BCDKBDSY.js";
|
|
35
35
|
import "./chunk-YN2UN7N3.js";
|
|
@@ -80,7 +80,7 @@ import "./chunk-LUPVCGYK.js";
|
|
|
80
80
|
import "./chunk-PYPOFEMK.js";
|
|
81
81
|
import "./chunk-LOPZ2DWR.js";
|
|
82
82
|
import "./chunk-VEWZZM3H.js";
|
|
83
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-EVXI2I6G.js";
|
|
84
84
|
import "./chunk-MC4FJXPA.js";
|
|
85
85
|
import "./chunk-LQHDIS7L.js";
|
|
86
86
|
import "./chunk-7F7Z6MOS.js";
|
|
@@ -175,7 +175,7 @@ import "./chunk-KD3QD3A5.js";
|
|
|
175
175
|
import "./chunk-VGUOEDTU.js";
|
|
176
176
|
import "./chunk-H3FZVNRN.js";
|
|
177
177
|
import "./chunk-OADWQ5CR.js";
|
|
178
|
-
import "./chunk-
|
|
178
|
+
import "./chunk-SIPZ5UMK.js";
|
|
179
179
|
import "./chunk-7WV3F5DQ.js";
|
|
180
180
|
import "./chunk-SEDEKFYQ.js";
|
|
181
181
|
import "./chunk-JBPKEARU.js";
|
|
@@ -184,7 +184,7 @@ import "./chunk-J64TK33U.js";
|
|
|
184
184
|
import "./chunk-RSUYKGGZ.js";
|
|
185
185
|
import "./chunk-42NQ7AVG.js";
|
|
186
186
|
import "./chunk-7RXCMVFQ.js";
|
|
187
|
-
import "./chunk-
|
|
187
|
+
import "./chunk-CNXMWYLA.js";
|
|
188
188
|
import "./chunk-D24OXEPB.js";
|
|
189
189
|
import "./chunk-4JG55YV3.js";
|
|
190
190
|
import "./chunk-GLERZDM7.js";
|
package/dist/access-http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IncomingMessage } from 'node:http';
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
2
|
import { F as EngramAccessService } from './access-service-CdW6B2qQ.js';
|
|
3
3
|
import { ResolvedIdentity } from './adapters/types.js';
|
|
4
4
|
import { AdapterRegistry } from './adapters/registry.js';
|
|
@@ -109,6 +109,24 @@ interface EngramAccessHttpServerOptions {
|
|
|
109
109
|
authTokens?: string[];
|
|
110
110
|
/** Dynamic token loader — called on each auth check so new/revoked tokens take effect without restart. */
|
|
111
111
|
authTokensGetter?: () => string[];
|
|
112
|
+
/**
|
|
113
|
+
* Dynamic token-ENTRY loader ({token, connector} pairs from one coherent
|
|
114
|
+
* snapshot). Preferred over `authTokensGetter` when a `tokenPathPolicy`
|
|
115
|
+
* is set: the connector used for the policy decision comes from the SAME
|
|
116
|
+
* entry that validated, so identity can never lag validation.
|
|
117
|
+
*/
|
|
118
|
+
authTokenEntriesGetter?: () => ReadonlyArray<{
|
|
119
|
+
token: string;
|
|
120
|
+
connector?: string;
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* Optional per-request scope policy for tokens sourced from
|
|
124
|
+
* `authTokenEntriesGetter`. Return false to deny the (validated) token
|
|
125
|
+
* for this pathname. Static `authToken`/`authTokens` (operator-supplied)
|
|
126
|
+
* bypass the policy. Entries whose connector is missing FAIL CLOSED when
|
|
127
|
+
* a policy is configured.
|
|
128
|
+
*/
|
|
129
|
+
tokenPathPolicy?: (connector: string, pathname: string | undefined) => boolean;
|
|
112
130
|
principal?: string;
|
|
113
131
|
maxBodyBytes?: number;
|
|
114
132
|
adminConsoleEnabled?: boolean;
|
|
@@ -133,6 +151,26 @@ interface EngramAccessHttpServerOptions {
|
|
|
133
151
|
* existing health behavior.
|
|
134
152
|
*/
|
|
135
153
|
readiness?: () => AccessHttpReadinessState;
|
|
154
|
+
/**
|
|
155
|
+
* When set, every 401 response includes
|
|
156
|
+
* `WWW-Authenticate: Bearer resource_metadata="<value>"` so MCP clients
|
|
157
|
+
* can discover the OAuth 2.0 protected-resource metadata document
|
|
158
|
+
* (RFC 9728). Must be an absolute http(s) URL; constructor throws on
|
|
159
|
+
* anything else. Unset → bare `Bearer`.
|
|
160
|
+
*/
|
|
161
|
+
resourceMetadataUrl?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Optional pre-auth request handler (e.g. OAuth facade mounted by
|
|
164
|
+
* `@remnic/server`). Runs after the admin-console handler and BEFORE
|
|
165
|
+
* bearer authorization. Return true if the request was fully handled
|
|
166
|
+
* (response ended). `ctx.authorized` reports whether the request
|
|
167
|
+
* carries a valid operator bearer token, so the handler can gate
|
|
168
|
+
* operator-only endpoints without owning token validation.
|
|
169
|
+
* Errors thrown by the handler flow into the existing error handling.
|
|
170
|
+
*/
|
|
171
|
+
externalRequestHandler?: (req: IncomingMessage, res: ServerResponse, ctx: {
|
|
172
|
+
authorized: boolean;
|
|
173
|
+
}) => Promise<boolean>;
|
|
136
174
|
}
|
|
137
175
|
interface EngramAccessHttpServerStatus {
|
|
138
176
|
running: boolean;
|
|
@@ -191,6 +229,8 @@ declare class EngramAccessHttpServer {
|
|
|
191
229
|
private readonly authToken?;
|
|
192
230
|
private readonly authTokens;
|
|
193
231
|
private readonly authTokensGetter?;
|
|
232
|
+
private readonly authTokenEntriesGetter?;
|
|
233
|
+
private readonly tokenPathPolicy?;
|
|
194
234
|
private readonly authenticatedPrincipal?;
|
|
195
235
|
private readonly maxBodyBytes;
|
|
196
236
|
private readonly adminConsoleEnabled;
|
|
@@ -200,6 +240,8 @@ declare class EngramAccessHttpServer {
|
|
|
200
240
|
private readonly trustPrincipalHeader;
|
|
201
241
|
private readonly adapterRegistry;
|
|
202
242
|
private readonly readiness;
|
|
243
|
+
private readonly resourceMetadataUrl?;
|
|
244
|
+
private readonly externalRequestHandler?;
|
|
203
245
|
private readonly writeRequestTimestamps;
|
|
204
246
|
private readonly mcpServer;
|
|
205
247
|
private server;
|
|
@@ -297,6 +339,14 @@ declare class EngramAccessHttpServer {
|
|
|
297
339
|
private readRequiredNumberHeader;
|
|
298
340
|
private parseOptionalBooleanHeader;
|
|
299
341
|
private readValidatedBody;
|
|
342
|
+
/**
|
|
343
|
+
* Build the WWW-Authenticate challenge string for 401 responses.
|
|
344
|
+
* When `resourceMetadataUrl` is configured, includes the RFC 9728
|
|
345
|
+
* `resource_metadata` parameter so MCP clients (e.g. ChatGPT) can
|
|
346
|
+
* discover the OAuth 2.0 protected-resource metadata document.
|
|
347
|
+
* Otherwise the bare `Bearer` challenge is returned (unchanged).
|
|
348
|
+
*/
|
|
349
|
+
private bearerChallenge;
|
|
300
350
|
private isAuthorized;
|
|
301
351
|
private timingSafeStringEqual;
|
|
302
352
|
private encodeSecret;
|
package/dist/access-http.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EngramAccessHttpServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SIPZ5UMK.js";
|
|
4
4
|
import "./chunk-7WV3F5DQ.js";
|
|
5
5
|
import "./chunk-SEDEKFYQ.js";
|
|
6
6
|
import "./chunk-JBPKEARU.js";
|
|
@@ -9,7 +9,7 @@ import "./chunk-J64TK33U.js";
|
|
|
9
9
|
import "./chunk-RSUYKGGZ.js";
|
|
10
10
|
import "./chunk-42NQ7AVG.js";
|
|
11
11
|
import "./chunk-7RXCMVFQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-CNXMWYLA.js";
|
|
13
13
|
import "./chunk-D24OXEPB.js";
|
|
14
14
|
import "./chunk-4JG55YV3.js";
|
|
15
15
|
import "./chunk-GLERZDM7.js";
|
package/dist/access-mcp.d.ts
CHANGED
|
@@ -113,6 +113,12 @@ type McpRequestOptions = {
|
|
|
113
113
|
*/
|
|
114
114
|
enforceWriteQuota?: () => void | Promise<void>;
|
|
115
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* MCP protocol versions this server understands, ordered newest → oldest.
|
|
118
|
+
* Exported so the HTTP transport can validate the `MCP-Protocol-Version`
|
|
119
|
+
* header and reject requests advertising an unknown version.
|
|
120
|
+
*/
|
|
121
|
+
declare const MCP_SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
116
122
|
declare class EngramMcpServer {
|
|
117
123
|
private readonly service;
|
|
118
124
|
private buffer;
|
|
@@ -226,4 +232,4 @@ declare class EngramMcpServer {
|
|
|
226
232
|
private callTool;
|
|
227
233
|
}
|
|
228
234
|
|
|
229
|
-
export { EngramMcpServer };
|
|
235
|
+
export { EngramMcpServer, MCP_SUPPORTED_PROTOCOL_VERSIONS };
|
package/dist/access-mcp.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EngramMcpServer
|
|
3
|
-
|
|
2
|
+
EngramMcpServer,
|
|
3
|
+
MCP_SUPPORTED_PROTOCOL_VERSIONS
|
|
4
|
+
} from "./chunk-CNXMWYLA.js";
|
|
4
5
|
import "./chunk-D24OXEPB.js";
|
|
5
6
|
import "./chunk-4JG55YV3.js";
|
|
6
7
|
import "./chunk-GLERZDM7.js";
|
|
@@ -136,6 +137,7 @@ import "./chunk-LBLXEFWK.js";
|
|
|
136
137
|
import "./chunk-VFUEZZBS.js";
|
|
137
138
|
import "./chunk-PZ5AY32C.js";
|
|
138
139
|
export {
|
|
139
|
-
EngramMcpServer
|
|
140
|
+
EngramMcpServer,
|
|
141
|
+
MCP_SUPPORTED_PROTOCOL_VERSIONS
|
|
140
142
|
};
|
|
141
143
|
//# sourceMappingURL=access-mcp.js.map
|
|
@@ -127,14 +127,14 @@ interface MemoryStoreOutput {
|
|
|
127
127
|
}
|
|
128
128
|
declare const memoryStoreOperation: BoundOperation<{
|
|
129
129
|
content: string;
|
|
130
|
-
|
|
130
|
+
schemaVersion?: number | undefined;
|
|
131
131
|
sessionKey?: string | undefined;
|
|
132
|
+
tags?: string[] | undefined;
|
|
132
133
|
dryRun?: boolean | undefined;
|
|
133
134
|
category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
|
|
134
|
-
|
|
135
|
-
tags?: string[] | undefined;
|
|
135
|
+
namespace?: string | undefined;
|
|
136
136
|
entityRef?: string | undefined;
|
|
137
|
-
|
|
137
|
+
confidence?: number | undefined;
|
|
138
138
|
cwd?: string | undefined;
|
|
139
139
|
ttl?: string | undefined;
|
|
140
140
|
sourceReason?: string | undefined;
|