@remnic/core 9.6.24 → 9.6.26

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.
@@ -173,7 +173,7 @@ type RawExcerptInternals = {
173
173
  };
174
174
 
175
175
  const SESSION_KEY = "pi-geek:abc123";
176
- const PROJECT_TAG = "Blend/Supply";
176
+ const PROJECT_TAG = "Acme/Webshop";
177
177
 
178
178
  function overlayNamespace(): string {
179
179
  return combineNamespaces(
@@ -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("blend-supply"), "tag:blend-supply");
62
- assert.notEqual(projectTagProjectId("blend/supply"), projectTagProjectId("blend-supply"));
63
- assert.match(projectTagProjectId("blend/supply"), /^tag:blend-supply-[0-9a-f]{8}$/);
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: "blend-supply",
42
+ projectTag: "acme-webshop",
43
43
  });
44
44
  assert.equal(result.success, true);
45
45
  if (result.success) {
46
- assert.equal(result.data.projectTag, "blend-supply");
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: "blend-supply",
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: "worthington-direct",
92
+ projectTag: "globex-storefront",
93
93
  });
94
94
  assert.equal(result.success, true);
95
95
  if (result.success) {
96
- assert.equal(result.data.projectTag, "worthington-direct");
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: "blend-supply",
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:blend-supply");
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:blend-supply");
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: "blend/supply",
202
+ projectTag: "acme/webshop",
203
203
  });
204
204
  await call(mcp, "engram.set_coding_context", {
205
205
  sessionKey: "session-B",
206
- projectTag: "blend-supply",
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:blend-supply-[0-9a-f]{8}$/);
211
- assert.equal(calls[1]!.ctx?.projectId, "tag:blend-supply");
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: "blend-supply",
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: "blend-supply",
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: "worthington-direct",
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:worthington-direct");
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: "blend-supply" });
324
+ await maybeAttach("session-X", { projectTag: "acme-webshop" });
325
325
  assert.equal(calls.length, 1);
326
- assert.equal(calls[0]!.ctx?.projectId, "tag:blend-supply");
327
- assert.equal(calls[0]!.ctx?.rootPath, "tag:blend-supply");
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: "blend-supply" });
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: "blend-supply" });
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: "blend-supply" });
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 "Blend/Supply". Both the
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("Blend/Supply");
99
+ const projectId = projectTagProjectId("Acme/Webshop");
100
100
  const codingContext = {
101
101
  projectId,
102
102
  branch: null,