@securecoms/agent-bridge 0.18.0 → 0.20.0

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/bin.js CHANGED
@@ -7531,6 +7531,8 @@ function checkConfiguredPaths(skillsJson, statFn = (p) => {
7531
7531
  if (d?.sqlite) paths.push(d.sqlite);
7532
7532
  if (d?.postgresUrlFile) paths.push(d.postgresUrlFile);
7533
7533
  }
7534
+ const search = skillsJson.search;
7535
+ if (search?.keyFile) paths.push(search.keyFile);
7534
7536
  return paths.map((path) => {
7535
7537
  let st;
7536
7538
  try {
@@ -7560,11 +7562,12 @@ function readLocalReport(home, identityId) {
7560
7562
  }
7561
7563
  if (!doc || typeof doc !== "object" || Array.isArray(doc)) return null;
7562
7564
  const hasSearchKey = doc.has_search_key === true;
7565
+ const hasLlmKey = doc.has_llm_key === true;
7563
7566
  const raw = doc.persona;
7564
7567
  const persona = raw && typeof raw === "object" && !Array.isArray(raw) ? Object.fromEntries(
7565
7568
  Object.entries(raw).filter(([, v]) => typeof v === "string")
7566
7569
  ) : {};
7567
- return { persona, has_search_key: hasSearchKey };
7570
+ return { persona, has_search_key: hasSearchKey, has_llm_key: hasLlmKey };
7568
7571
  }
7569
7572
  function readManagedMemory(home, identityId) {
7570
7573
  const p = join8(runtimeConfigDir(home, identityId), MEMORY_FILE);
@@ -8226,7 +8229,10 @@ var BridgeAgent = class _BridgeAgent {
8226
8229
  // is an environment value on that process, invisible to the daemon and
8227
8230
  // to the backend. The backend needs it to generate a truthful tool
8228
8231
  // paragraph, so it rides along here.
8229
- has_search_key: local?.has_search_key ?? false
8232
+ has_search_key: local?.has_search_key ?? false,
8233
+ // Same idea, for the BYOK LLM key file: only the runtime can see
8234
+ // whether one is configured in its own environment.
8235
+ has_llm_key: local?.has_llm_key ?? false
8230
8236
  };
8231
8237
  const posted = await this.fetchImpl(`${base}/report`, {
8232
8238
  method: "POST",
package/dist/index.js CHANGED
@@ -7378,6 +7378,8 @@ function checkConfiguredPaths(skillsJson, statFn = (p) => {
7378
7378
  if (d?.sqlite) paths.push(d.sqlite);
7379
7379
  if (d?.postgresUrlFile) paths.push(d.postgresUrlFile);
7380
7380
  }
7381
+ const search = skillsJson.search;
7382
+ if (search?.keyFile) paths.push(search.keyFile);
7381
7383
  return paths.map((path) => {
7382
7384
  let st;
7383
7385
  try {
@@ -7407,11 +7409,12 @@ function readLocalReport(home, identityId) {
7407
7409
  }
7408
7410
  if (!doc || typeof doc !== "object" || Array.isArray(doc)) return null;
7409
7411
  const hasSearchKey = doc.has_search_key === true;
7412
+ const hasLlmKey = doc.has_llm_key === true;
7410
7413
  const raw = doc.persona;
7411
7414
  const persona = raw && typeof raw === "object" && !Array.isArray(raw) ? Object.fromEntries(
7412
7415
  Object.entries(raw).filter(([, v]) => typeof v === "string")
7413
7416
  ) : {};
7414
- return { persona, has_search_key: hasSearchKey };
7417
+ return { persona, has_search_key: hasSearchKey, has_llm_key: hasLlmKey };
7415
7418
  }
7416
7419
  function readManagedMemory(home, identityId) {
7417
7420
  const p = join6(runtimeConfigDir(home, identityId), MEMORY_FILE);
@@ -8073,7 +8076,10 @@ var BridgeAgent = class _BridgeAgent {
8073
8076
  // is an environment value on that process, invisible to the daemon and
8074
8077
  // to the backend. The backend needs it to generate a truthful tool
8075
8078
  // paragraph, so it rides along here.
8076
- has_search_key: local?.has_search_key ?? false
8079
+ has_search_key: local?.has_search_key ?? false,
8080
+ // Same idea, for the BYOK LLM key file: only the runtime can see
8081
+ // whether one is configured in its own environment.
8082
+ has_llm_key: local?.has_llm_key ?? false
8077
8083
  };
8078
8084
  const posted = await this.fetchImpl(`${base}/report`, {
8079
8085
  method: "POST",
@@ -33,6 +33,7 @@ export declare const LOCAL_REPORT_FILE = "local-config.json";
33
33
  export interface LocalReport {
34
34
  persona: Record<string, string>;
35
35
  has_search_key: boolean;
36
+ has_llm_key: boolean;
36
37
  }
37
38
  export declare function readLocalReport(home: string, identityId: string): LocalReport | null;
38
39
  export declare function readManagedMemory(home: string, identityId: string): string | null;
@@ -0,0 +1 @@
1
+ export declare const BRIDGE_VERSION = "0.20.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securecoms/agent-bridge",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",