@remnic/core 9.6.24 → 9.6.25
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 +3 -3
- package/dist/access-http.js +2 -2
- package/dist/access-mcp.js +1 -1
- package/dist/{chunk-KEY3FEMP.js → chunk-43VNWTBB.js} +3 -3
- package/dist/{chunk-A2OFRQ5B.js → chunk-N6VIXDT7.js} +2 -2
- package/dist/{chunk-D3D677BV.js → chunk-QLYLTKUG.js} +4 -4
- package/dist/{chunk-D3D677BV.js.map → chunk-QLYLTKUG.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/orchestrator.js +3 -3
- package/package.json +2 -2
- package/src/access-http.test.ts +2 -2
- package/src/access-mcp.test.ts +2 -2
- package/src/access-mcp.ts +3 -3
- package/src/access-service-coding-write.test.ts +18 -18
- package/src/access-service-lcm-forgery.test.ts +5 -5
- package/src/access-service-observe-lcm-parity.test.ts +25 -25
- package/src/access-service-observe-scope.test.ts +16 -16
- package/src/access-service-project-tag.test.ts +2 -2
- package/src/access-service-raw-excerpt-read-gate.test.ts +1 -1
- package/src/coding/coding-namespace.test.ts +3 -3
- package/src/coding/wire-coding-context.test.ts +22 -22
- package/src/issue-1492-coding-mode-consistency.test.ts +2 -2
- /package/dist/{chunk-KEY3FEMP.js.map → chunk-43VNWTBB.js.map} +0 -0
- /package/dist/{chunk-A2OFRQ5B.js.map → chunk-N6VIXDT7.js.map} +0 -0
|
@@ -58,9 +58,9 @@ test("projectNamespaceName: empty input falls back to 'unknown'", () => {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
test("projectTagProjectId: lossy tags get hash disambiguators", () => {
|
|
61
|
-
assert.equal(projectTagProjectId("
|
|
62
|
-
assert.notEqual(projectTagProjectId("
|
|
63
|
-
assert.match(projectTagProjectId("
|
|
61
|
+
assert.equal(projectTagProjectId("acme-webshop"), "tag:acme-webshop");
|
|
62
|
+
assert.notEqual(projectTagProjectId("acme/webshop"), projectTagProjectId("acme-webshop"));
|
|
63
|
+
assert.match(projectTagProjectId("acme/webshop"), /^tag:acme-webshop-[0-9a-f]{8}$/);
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
test("projectNamespaceName: length-capped to 64 chars, no trailing dash", () => {
|
|
@@ -39,11 +39,11 @@ test("recall schema accepts projectTag field", () => {
|
|
|
39
39
|
const result = validateRequest<RecallRequest>("recall", {
|
|
40
40
|
query: "test query",
|
|
41
41
|
sessionKey: "sess-1",
|
|
42
|
-
projectTag: "
|
|
42
|
+
projectTag: "acme-webshop",
|
|
43
43
|
});
|
|
44
44
|
assert.equal(result.success, true);
|
|
45
45
|
if (result.success) {
|
|
46
|
-
assert.equal(result.data.projectTag, "
|
|
46
|
+
assert.equal(result.data.projectTag, "acme-webshop");
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -52,7 +52,7 @@ test("recall schema accepts both cwd and projectTag", () => {
|
|
|
52
52
|
query: "test query",
|
|
53
53
|
sessionKey: "sess-1",
|
|
54
54
|
cwd: "/home/user/project",
|
|
55
|
-
projectTag: "
|
|
55
|
+
projectTag: "acme-webshop",
|
|
56
56
|
});
|
|
57
57
|
assert.equal(result.success, true);
|
|
58
58
|
});
|
|
@@ -89,11 +89,11 @@ test("observe schema accepts projectTag field", () => {
|
|
|
89
89
|
const result = validateRequest<ObserveRequest>("observe", {
|
|
90
90
|
sessionKey: "sess-1",
|
|
91
91
|
messages: [{ role: "user", content: "hello" }],
|
|
92
|
-
projectTag: "
|
|
92
|
+
projectTag: "globex-storefront",
|
|
93
93
|
});
|
|
94
94
|
assert.equal(result.success, true);
|
|
95
95
|
if (result.success) {
|
|
96
|
-
assert.equal(result.data.projectTag, "
|
|
96
|
+
assert.equal(result.data.projectTag, "globex-storefront");
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -185,13 +185,13 @@ test("set_coding_context with projectTag creates tag-based context", async () =>
|
|
|
185
185
|
const { mcp, calls } = makeMcp();
|
|
186
186
|
const result = await call(mcp, "engram.set_coding_context", {
|
|
187
187
|
sessionKey: "session-A",
|
|
188
|
-
projectTag: "
|
|
188
|
+
projectTag: "acme-webshop",
|
|
189
189
|
});
|
|
190
190
|
assert.deepEqual(result, { ok: true });
|
|
191
191
|
assert.equal(calls.length, 1);
|
|
192
|
-
assert.equal(calls[0]!.ctx?.projectId, "tag:
|
|
192
|
+
assert.equal(calls[0]!.ctx?.projectId, "tag:acme-webshop");
|
|
193
193
|
assert.equal(calls[0]!.ctx?.branch, null);
|
|
194
|
-
assert.equal(calls[0]!.ctx?.rootPath, "tag:
|
|
194
|
+
assert.equal(calls[0]!.ctx?.rootPath, "tag:acme-webshop");
|
|
195
195
|
assert.equal(calls[0]!.ctx?.defaultBranch, null);
|
|
196
196
|
});
|
|
197
197
|
|
|
@@ -199,16 +199,16 @@ test("set_coding_context with projectTag disambiguates lossy tags", async () =>
|
|
|
199
199
|
const { mcp, calls } = makeMcp();
|
|
200
200
|
await call(mcp, "engram.set_coding_context", {
|
|
201
201
|
sessionKey: "session-A",
|
|
202
|
-
projectTag: "
|
|
202
|
+
projectTag: "acme/webshop",
|
|
203
203
|
});
|
|
204
204
|
await call(mcp, "engram.set_coding_context", {
|
|
205
205
|
sessionKey: "session-B",
|
|
206
|
-
projectTag: "
|
|
206
|
+
projectTag: "acme-webshop",
|
|
207
207
|
});
|
|
208
208
|
|
|
209
209
|
assert.notEqual(calls[0]!.ctx?.projectId, calls[1]!.ctx?.projectId);
|
|
210
|
-
assert.match(calls[0]!.ctx?.projectId ?? "", /^tag:
|
|
211
|
-
assert.equal(calls[1]!.ctx?.projectId, "tag:
|
|
210
|
+
assert.match(calls[0]!.ctx?.projectId ?? "", /^tag:acme-webshop-[0-9a-f]{8}$/);
|
|
211
|
+
assert.equal(calls[1]!.ctx?.projectId, "tag:acme-webshop");
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
test("set_coding_context with codingContext takes precedence over projectTag", async () => {
|
|
@@ -221,7 +221,7 @@ test("set_coding_context with codingContext takes precedence over projectTag", a
|
|
|
221
221
|
rootPath: "/work/proj",
|
|
222
222
|
defaultBranch: "main",
|
|
223
223
|
},
|
|
224
|
-
projectTag: "
|
|
224
|
+
projectTag: "acme-webshop",
|
|
225
225
|
});
|
|
226
226
|
assert.equal(calls.length, 1);
|
|
227
227
|
assert.equal(calls[0]!.ctx?.projectId, "origin:abcd1234");
|
|
@@ -242,7 +242,7 @@ test("set_coding_context with codingContext=null clears (even with projectTag pr
|
|
|
242
242
|
await call(mcp, "engram.set_coding_context", {
|
|
243
243
|
sessionKey: "session-A",
|
|
244
244
|
codingContext: null,
|
|
245
|
-
projectTag: "
|
|
245
|
+
projectTag: "acme-webshop",
|
|
246
246
|
});
|
|
247
247
|
assert.equal(calls.length, 1);
|
|
248
248
|
assert.equal(calls[0]!.ctx, null);
|
|
@@ -252,11 +252,11 @@ test("set_coding_context projectTag via canonical alias remnic.*", async () => {
|
|
|
252
252
|
const { mcp, calls } = makeMcp();
|
|
253
253
|
const result = await call(mcp, "remnic.set_coding_context", {
|
|
254
254
|
sessionKey: "session-B",
|
|
255
|
-
projectTag: "
|
|
255
|
+
projectTag: "globex-storefront",
|
|
256
256
|
});
|
|
257
257
|
assert.deepEqual(result, { ok: true });
|
|
258
258
|
assert.equal(calls.length, 1);
|
|
259
|
-
assert.equal(calls[0]!.ctx?.projectId, "tag:
|
|
259
|
+
assert.equal(calls[0]!.ctx?.projectId, "tag:globex-storefront");
|
|
260
260
|
});
|
|
261
261
|
|
|
262
262
|
// ──────────────────────────────────────────────────────────────────────────
|
|
@@ -321,10 +321,10 @@ test("maybeAttachCodingContext: projectTag attaches tag-based context", async ()
|
|
|
321
321
|
): Promise<void>;
|
|
322
322
|
}).maybeAttachCodingContext.bind(service);
|
|
323
323
|
|
|
324
|
-
await maybeAttach("session-X", { projectTag: "
|
|
324
|
+
await maybeAttach("session-X", { projectTag: "acme-webshop" });
|
|
325
325
|
assert.equal(calls.length, 1);
|
|
326
|
-
assert.equal(calls[0]!.ctx?.projectId, "tag:
|
|
327
|
-
assert.equal(calls[0]!.ctx?.rootPath, "tag:
|
|
326
|
+
assert.equal(calls[0]!.ctx?.projectId, "tag:acme-webshop");
|
|
327
|
+
assert.equal(calls[0]!.ctx?.rootPath, "tag:acme-webshop");
|
|
328
328
|
});
|
|
329
329
|
|
|
330
330
|
test("maybeAttachCodingContext: skips when session already has context", async () => {
|
|
@@ -351,7 +351,7 @@ test("maybeAttachCodingContext: skips when session already has context", async (
|
|
|
351
351
|
): Promise<void>;
|
|
352
352
|
}).maybeAttachCodingContext.bind(service);
|
|
353
353
|
|
|
354
|
-
await maybeAttach("session-X", { projectTag: "
|
|
354
|
+
await maybeAttach("session-X", { projectTag: "acme-webshop" });
|
|
355
355
|
assert.equal(calls.length, 0, "should not overwrite existing context");
|
|
356
356
|
});
|
|
357
357
|
|
|
@@ -379,7 +379,7 @@ test("maybeAttachCodingContext: skips when projectScope disabled", async () => {
|
|
|
379
379
|
): Promise<void>;
|
|
380
380
|
}).maybeAttachCodingContext.bind(service);
|
|
381
381
|
|
|
382
|
-
await maybeAttach("session-X", { projectTag: "
|
|
382
|
+
await maybeAttach("session-X", { projectTag: "acme-webshop" });
|
|
383
383
|
assert.equal(calls.length, 0, "should not attach when projectScope is disabled");
|
|
384
384
|
});
|
|
385
385
|
|
|
@@ -407,7 +407,7 @@ test("maybeAttachCodingContext: skips when no sessionKey", async () => {
|
|
|
407
407
|
): Promise<void>;
|
|
408
408
|
}).maybeAttachCodingContext.bind(service);
|
|
409
409
|
|
|
410
|
-
await maybeAttach(undefined, { projectTag: "
|
|
410
|
+
await maybeAttach(undefined, { projectTag: "acme-webshop" });
|
|
411
411
|
assert.equal(calls.length, 0, "should not attach without sessionKey");
|
|
412
412
|
});
|
|
413
413
|
|
|
@@ -90,13 +90,13 @@ async function walkCollectDirs(root: string, out: Set<string>): Promise<void> {
|
|
|
90
90
|
// ─── Symptom A: coding-namespace derivation is stable across write/read ────
|
|
91
91
|
|
|
92
92
|
test("#1492 Symptom A: a project-scoped session derives ONE stable overlay namespace — the write/read convergence point", () => {
|
|
93
|
-
// The reporter's scenario: user "pi-geek" in project "
|
|
93
|
+
// The reporter's scenario: user "pi-geek" in project "Acme/Webshop". Both the
|
|
94
94
|
// observe write path and the recall read path must resolve the SAME scoped
|
|
95
95
|
// namespace. They do so by combining the principal base with the project
|
|
96
96
|
// overlay through exactly ONE helper (combineNamespaces); a second ad-hoc
|
|
97
97
|
// combination is what caused the original drift.
|
|
98
98
|
const principal = "pi-geek";
|
|
99
|
-
const projectId = projectTagProjectId("
|
|
99
|
+
const projectId = projectTagProjectId("Acme/Webshop");
|
|
100
100
|
const codingContext = {
|
|
101
101
|
projectId,
|
|
102
102
|
branch: null,
|
|
File without changes
|
|
File without changes
|