@remnic/core 9.69.69 → 9.69.70
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-authorization-probe.js +2 -2
- package/dist/access-boundary.js +1 -1
- package/dist/access-cli.js +16 -16
- package/dist/access-extraction-force-flush.js +1 -1
- package/dist/access-http-briefing.js +2 -2
- package/dist/access-http-query.js +1 -1
- package/dist/access-http.js +13 -13
- package/dist/access-identity-continuity-surface.js +1 -1
- package/dist/access-lcm-surface.js +1 -1
- package/dist/access-mcp.js +8 -8
- package/dist/access-namespace-preflight.js +1 -1
- package/dist/access-observe-write-surface.d.ts.map +1 -1
- package/dist/access-observe-write-surface.js +1 -1
- package/dist/access-operations-batch.js +2 -2
- package/dist/access-operations.js +7 -7
- 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/access-surface-catalog.js +3 -3
- package/dist/{chunk-MZQ2MBET.js → chunk-2R72MVH7.js} +2 -1
- package/dist/{chunk-MZQ2MBET.js.map → chunk-2R72MVH7.js.map} +1 -1
- package/dist/{chunk-NPA73KGP.js → chunk-4FLIMX4B.js} +2 -2
- package/dist/{chunk-YZH4O4NA.js → chunk-66NK4G3A.js} +2 -2
- package/dist/{chunk-3R34HFBY.js → chunk-6LQ7GDTI.js} +2 -2
- package/dist/{chunk-FZ4BU3WD.js → chunk-EGXTKSSA.js} +2 -2
- package/dist/{chunk-4M375K73.js → chunk-GULV5LFB.js} +2 -2
- package/dist/{chunk-DQEM4LDV.js → chunk-GXHUFKAG.js} +2 -2
- package/dist/{chunk-C7K7YV65.js → chunk-IKDP2PN5.js} +5 -4
- package/dist/chunk-IKDP2PN5.js.map +1 -0
- package/dist/{chunk-A5IRUJMX.js → chunk-JHAFEGED.js} +8 -8
- package/dist/{chunk-DUWNHPZ2.js → chunk-KTYBS2UG.js} +4 -4
- package/dist/{chunk-SYBHLTFW.js → chunk-NGN2VAKB.js} +2 -2
- package/dist/{chunk-WTD4JHFP.js → chunk-PT7D26KT.js} +3 -3
- package/dist/{chunk-ZMU7UK2Q.js → chunk-SQIEPKIU.js} +2 -2
- package/dist/{chunk-YED2GFH6.js → chunk-T5TAT2XL.js} +2 -2
- package/dist/{chunk-2LT2GSTI.js → chunk-WIQDQQPW.js} +2 -2
- package/dist/{chunk-S4W66FQ7.js → chunk-YLZPCYCB.js} +2 -2
- package/dist/cli.js +14 -14
- package/dist/external-wiki-access.js +2 -2
- package/dist/index.js +16 -16
- package/dist/memory-browse-operations.js +2 -2
- package/dist/orchestration/turn-ingestion.d.ts +6 -0
- package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
- package/dist/orchestrator.d.ts +2 -0
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +16 -16
- package/dist/recall-navigation-operations.js +2 -2
- package/dist/recall-navigation.js +1 -1
- package/dist/support-passport/index.js +4 -4
- package/package.json +2 -2
- package/src/access-observe-write-surface.ts +4 -7
- package/src/access-service-observe-scope.test.ts +68 -1
- package/src/orchestration/turn-ingestion.ts +7 -0
- package/src/orchestrator.ts +2 -0
- package/dist/chunk-C7K7YV65.js.map +0 -1
- /package/dist/{chunk-NPA73KGP.js.map → chunk-4FLIMX4B.js.map} +0 -0
- /package/dist/{chunk-YZH4O4NA.js.map → chunk-66NK4G3A.js.map} +0 -0
- /package/dist/{chunk-3R34HFBY.js.map → chunk-6LQ7GDTI.js.map} +0 -0
- /package/dist/{chunk-FZ4BU3WD.js.map → chunk-EGXTKSSA.js.map} +0 -0
- /package/dist/{chunk-4M375K73.js.map → chunk-GULV5LFB.js.map} +0 -0
- /package/dist/{chunk-DQEM4LDV.js.map → chunk-GXHUFKAG.js.map} +0 -0
- /package/dist/{chunk-A5IRUJMX.js.map → chunk-JHAFEGED.js.map} +0 -0
- /package/dist/{chunk-DUWNHPZ2.js.map → chunk-KTYBS2UG.js.map} +0 -0
- /package/dist/{chunk-SYBHLTFW.js.map → chunk-NGN2VAKB.js.map} +0 -0
- /package/dist/{chunk-WTD4JHFP.js.map → chunk-PT7D26KT.js.map} +0 -0
- /package/dist/{chunk-ZMU7UK2Q.js.map → chunk-SQIEPKIU.js.map} +0 -0
- /package/dist/{chunk-YED2GFH6.js.map → chunk-T5TAT2XL.js.map} +0 -0
- /package/dist/{chunk-2LT2GSTI.js.map → chunk-WIQDQQPW.js.map} +0 -0
- /package/dist/{chunk-S4W66FQ7.js.map → chunk-YLZPCYCB.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SUPPORT_PASSPORT_MODEL_RESULT_PATH,
|
|
5
5
|
SupportPassportModelBridge,
|
|
6
6
|
parseSupportPassportModelJob
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-SQIEPKIU.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_SUPPORT_PASSPORT_CONFIG,
|
|
10
10
|
parseSupportPassportConfig
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
buildSupportPassportPublicRequestHandler,
|
|
15
15
|
composeSupportPassportExternalRequestHandlers,
|
|
16
16
|
normalizeSupportPassportNetworkAddress
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-6LQ7GDTI.js";
|
|
18
|
+
import "../chunk-GXHUFKAG.js";
|
|
19
19
|
import {
|
|
20
20
|
SUPPORT_PASSPORT_DRAFT_MAX_CONTENT_CHARACTERS,
|
|
21
21
|
SUPPORT_PASSPORT_DRAFT_MAX_MEMORIES,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
notifySupportPassportCommitted,
|
|
57
57
|
resolveSupportPassportModelRoutePlan,
|
|
58
58
|
syncDirectoryForDurability
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-2R72MVH7.js";
|
|
60
60
|
import "../chunk-W4F3C7N7.js";
|
|
61
61
|
import "../chunk-MPC7TYTZ.js";
|
|
62
62
|
import "../chunk-ZHXSOMYH.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.69.
|
|
3
|
+
"version": "9.69.70",
|
|
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
|
"core"
|
|
3318
3318
|
],
|
|
3319
3319
|
"peerDependencies": {
|
|
3320
|
-
"@remnic/coding-graph": "^9.69.
|
|
3320
|
+
"@remnic/coding-graph": "^9.69.70"
|
|
3321
3321
|
},
|
|
3322
3322
|
"peerDependenciesMeta": {
|
|
3323
3323
|
"@remnic/coding-graph": {
|
|
@@ -864,14 +864,10 @@ export class AccessObserveWriteSurface {
|
|
|
864
864
|
const principalOverride =
|
|
865
865
|
typeof scope.principal === "string" && scope.principal.length > 0 ? scope.principal : undefined;
|
|
866
866
|
// Fire-and-forget: queue extraction in the background so the HTTP
|
|
867
|
-
// response returns immediately
|
|
868
|
-
// enqueue-only; extraction involves LLM calls that can take
|
|
869
|
-
// minutes under load and should not block the caller.
|
|
867
|
+
// response returns immediately; extraction LLM calls can take minutes.
|
|
870
868
|
//
|
|
871
|
-
// Backpressure: the orchestrator's
|
|
872
|
-
//
|
|
873
|
-
// queueBufferedExtraction). Fire-and-forget here just decouples
|
|
874
|
-
// the HTTP response from the queue drain.
|
|
869
|
+
// Backpressure: the orchestrator's queue limits extraction concurrency
|
|
870
|
+
// (one per session); this just decouples the HTTP response from the drain.
|
|
875
871
|
if (!observePreparation.isCancelled()) {
|
|
876
872
|
try {
|
|
877
873
|
const observeAbortController = new AbortController();
|
|
@@ -879,6 +875,7 @@ export class AccessObserveWriteSurface {
|
|
|
879
875
|
archiveLcm: false,
|
|
880
876
|
writeNamespaceOverride,
|
|
881
877
|
principalOverride,
|
|
878
|
+
scopeProfileWritePlan: scope.scopeProfilePlan,
|
|
882
879
|
abortSignal: observeAbortController.signal,
|
|
883
880
|
...(typeof request.authenticatedPrincipal === "string" && request.authenticatedPrincipal.trim().length > 0
|
|
884
881
|
? { sessionOwnerPrincipal: request.authenticatedPrincipal.trim() }
|
|
@@ -37,6 +37,7 @@ import { PendingObserveExtractionTracker } from "./access-observe-helpers.js";
|
|
|
37
37
|
|
|
38
38
|
import { tokenCapabilityStore } from "./access-token-capabilities.js";
|
|
39
39
|
import { resolveAuthorizedNamespaceWritablePreflight } from "./access-namespace-preflight.js";
|
|
40
|
+
import type { ResolvedScopeProfilePlan } from "./namespaces/scope-profiles.js";
|
|
40
41
|
import { Orchestrator } from "./orchestrator.js";
|
|
41
42
|
import type { StorageManager } from "./storage.js";
|
|
42
43
|
import type { EngramAccessObserveRequest } from "./access-service.js";
|
|
@@ -67,6 +68,7 @@ interface ObserveProbe {
|
|
|
67
68
|
sessionKeys: string[];
|
|
68
69
|
writeNamespaceOverride?: string;
|
|
69
70
|
principalOverride?: string;
|
|
71
|
+
scopeProfileWritePlan?: ResolvedScopeProfilePlan | null;
|
|
70
72
|
}>;
|
|
71
73
|
objectiveStateNamespaces: string[];
|
|
72
74
|
}
|
|
@@ -125,12 +127,17 @@ function makeObserveProbe(overrides: Partial<PluginConfig> = {}): ObserveProbe {
|
|
|
125
127
|
},
|
|
126
128
|
ingestReplayBatch: async (
|
|
127
129
|
turns: Array<{ sessionKey: string }>,
|
|
128
|
-
options: {
|
|
130
|
+
options: {
|
|
131
|
+
writeNamespaceOverride?: string;
|
|
132
|
+
principalOverride?: string;
|
|
133
|
+
scopeProfileWritePlan?: ResolvedScopeProfilePlan | null;
|
|
134
|
+
} = {},
|
|
129
135
|
) => {
|
|
130
136
|
extractionCalls.push({
|
|
131
137
|
sessionKeys: turns.map((t) => t.sessionKey),
|
|
132
138
|
writeNamespaceOverride: options.writeNamespaceOverride,
|
|
133
139
|
principalOverride: options.principalOverride,
|
|
140
|
+
scopeProfileWritePlan: options.scopeProfileWritePlan,
|
|
134
141
|
});
|
|
135
142
|
},
|
|
136
143
|
} as unknown as Orchestrator;
|
|
@@ -1213,3 +1220,63 @@ test("#1501 memorySearch collection names stay constrained to active scope profi
|
|
|
1213
1220
|
);
|
|
1214
1221
|
assert.equal(searchedNamespaces, null);
|
|
1215
1222
|
});
|
|
1223
|
+
|
|
1224
|
+
test("#3051 observe forwards the resolved scope-profile write plan to extraction (autoPromote userGlobal)", async () => {
|
|
1225
|
+
const probe = makeObserveProbe({
|
|
1226
|
+
namespacePolicies: [
|
|
1227
|
+
{ name: "pi-observer", readPrincipals: ["pi-observer"], writePrincipals: ["pi-observer"] },
|
|
1228
|
+
{ name: "pi-observer-global", readPrincipals: ["pi-observer"], writePrincipals: ["pi-observer"] },
|
|
1229
|
+
],
|
|
1230
|
+
principalFromSessionKeyMode: "prefix",
|
|
1231
|
+
principalFromSessionKeyRules: [{ match: "pi-observer:", principal: "pi-observer" }],
|
|
1232
|
+
scopeProfiles: {
|
|
1233
|
+
userGlobalProfile: {
|
|
1234
|
+
readOrder: ["userGlobal"],
|
|
1235
|
+
writeDefault: "userGlobal",
|
|
1236
|
+
promotionTargets: ["userGlobal"],
|
|
1237
|
+
userGlobal: { namespaceTemplate: "pi-observer-global" },
|
|
1238
|
+
autoPromote: {
|
|
1239
|
+
enabled: true,
|
|
1240
|
+
targets: ["userGlobal"],
|
|
1241
|
+
categories: ["fact", "correction", "decision", "preference"],
|
|
1242
|
+
minConfidenceTier: "explicit",
|
|
1243
|
+
},
|
|
1244
|
+
},
|
|
1245
|
+
},
|
|
1246
|
+
defaultScopeProfile: "userGlobalProfile",
|
|
1247
|
+
} as Partial<PluginConfig>);
|
|
1248
|
+
const service = new EngramAccessService(probe.orch);
|
|
1249
|
+
|
|
1250
|
+
const res = await service.observe(
|
|
1251
|
+
observeRequest({
|
|
1252
|
+
sessionKey: "pi-observer:abc123",
|
|
1253
|
+
authenticatedPrincipal: "pi-observer",
|
|
1254
|
+
}),
|
|
1255
|
+
);
|
|
1256
|
+
|
|
1257
|
+
assert.ok(probe.extractionCalls.length >= 1);
|
|
1258
|
+
assert.equal(probe.extractionCalls[0].writeNamespaceOverride, res.effectiveNamespace);
|
|
1259
|
+
assert.ok(
|
|
1260
|
+
probe.extractionCalls[0].scopeProfileWritePlan,
|
|
1261
|
+
"namespaces ON + scope profile: ingestReplayBatch must receive the resolved plan, or autoPromote gates never fire",
|
|
1262
|
+
);
|
|
1263
|
+
assert.equal(probe.extractionCalls[0].scopeProfileWritePlan?.profileId, "userGlobalProfile");
|
|
1264
|
+
assert.equal(probe.extractionCalls[0].scopeProfileWritePlan?.writeNamespace, res.effectiveNamespace);
|
|
1265
|
+
});
|
|
1266
|
+
|
|
1267
|
+
test("#3051 observe omits the scope-profile write plan when namespaces are disabled", async () => {
|
|
1268
|
+
const probe = makeObserveProbe({
|
|
1269
|
+
namespacesEnabled: false,
|
|
1270
|
+
namespacePolicies: [],
|
|
1271
|
+
} as Partial<PluginConfig>);
|
|
1272
|
+
const service = new EngramAccessService(probe.orch);
|
|
1273
|
+
|
|
1274
|
+
await service.observe(observeRequest({}));
|
|
1275
|
+
|
|
1276
|
+
assert.ok(probe.extractionCalls.length >= 1);
|
|
1277
|
+
assert.equal(
|
|
1278
|
+
probe.extractionCalls[0].scopeProfileWritePlan,
|
|
1279
|
+
undefined,
|
|
1280
|
+
"single-store mode must not receive a scope-profile write plan",
|
|
1281
|
+
);
|
|
1282
|
+
});
|
|
@@ -237,6 +237,12 @@ export class TurnIngestionCoordinator {
|
|
|
237
237
|
* `principalOverride` (issue #570 PR 4).
|
|
238
238
|
*/
|
|
239
239
|
principalOverride?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Forward the observe surface's resolved scope-profile write plan so
|
|
242
|
+
* autoPromote gates see a plan instead of treating "explicit write
|
|
243
|
+
* namespace, no plan" as non-promotable (#3051). Mirrors force-flush.
|
|
244
|
+
*/
|
|
245
|
+
scopeProfileWritePlan?: ResolvedScopeProfilePlan | null;
|
|
240
246
|
/**
|
|
241
247
|
* Persist the authenticated principal that owns the replay session.
|
|
242
248
|
* Access observe supplies this from the transport auth boundary; replay
|
|
@@ -335,6 +341,7 @@ export class TurnIngestionCoordinator {
|
|
|
335
341
|
abortSignal: options.abortSignal,
|
|
336
342
|
writeNamespaceOverride: options.writeNamespaceOverride,
|
|
337
343
|
principalOverride: options.principalOverride,
|
|
344
|
+
scopeProfileWritePlan: options.scopeProfileWritePlan,
|
|
338
345
|
onTaskSettled: (err) => (err ? reject(err) : resolve()),
|
|
339
346
|
}).catch(reject);
|
|
340
347
|
}),
|
package/src/orchestrator.ts
CHANGED
|
@@ -2987,6 +2987,8 @@ export class Orchestrator {
|
|
|
2987
2987
|
* `principalOverride` (issue #570 PR 4).
|
|
2988
2988
|
*/
|
|
2989
2989
|
principalOverride?: string;
|
|
2990
|
+
/** Forward the observe surface's resolved scope-profile write plan (#3051). */
|
|
2991
|
+
scopeProfileWritePlan?: ResolvedScopeProfilePlan | null;
|
|
2990
2992
|
/** Persist the authenticated session owner on buffered turns. */
|
|
2991
2993
|
sessionOwnerPrincipal?: string;
|
|
2992
2994
|
} = {},
|