@nopeek/agent-bridge 0.5.2 → 0.5.4

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/bot.d.ts CHANGED
@@ -7,6 +7,8 @@ export interface BotInfo {
7
7
  ownerId?: string;
8
8
  /** Server-mediated backend from runtime/bots or adopt_bot (optional). */
9
9
  backend?: BrainBackend;
10
+ /** runtime/bots serializes via Views.bot, which names the field brainBackend. */
11
+ brainBackend?: BrainBackend | null;
10
12
  }
11
13
  export declare class BotRunner {
12
14
  readonly info: BotInfo;
package/dist/bridge.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { BridgeConfig, BrainSpec } from "./config.js";
2
- export declare const VERSION = "0.5.2";
2
+ export declare const VERSION = "0.5.4";
3
3
  export interface PairRequest {
4
4
  pairingSecret: string;
5
5
  appId: string;
package/dist/bridge.js CHANGED
@@ -11,10 +11,10 @@ import { saveSettings } from "./config.js";
11
11
  import { BotRunner } from "./bot.js";
12
12
  import { ControlSocket } from "./control.js";
13
13
  import { resolveBrain } from "./brain.js";
14
- import { provisionSoul } from "./backends.js";
14
+ import { provisionSoul, provisionHermesProfile } from "./backends.js";
15
15
  import { reportCapabilities } from "./capabilities.js";
16
16
  import { isBrainBackend } from "./config.js";
17
- export const VERSION = "0.5.2";
17
+ export const VERSION = "0.5.4";
18
18
  /** How often to re-probe + report brain availability to the server. */
19
19
  const CAPABILITIES_INTERVAL_MS = 5 * 60_000;
20
20
  export class PairError extends Error {
@@ -173,7 +173,18 @@ export class BridgeApp {
173
173
  // recorded but does not drive this bot until the override is cleared.
174
174
  return;
175
175
  }
176
- if (backend !== "echo") {
176
+ // Provision per backend, EAGERLY picking Hermes on the phone should make
177
+ // the bot's profile appear in `hermes profile list` immediately, not on its
178
+ // first message (hermesBrain still provisions lazily as a fallback).
179
+ if (backend === "hermes") {
180
+ try {
181
+ provisionHermesProfile(handle);
182
+ }
183
+ catch (err) {
184
+ console.error(`[bridge] hermes profile provisioning for @${handle} failed: ${err.message}`);
185
+ }
186
+ }
187
+ else if (backend !== "echo") {
177
188
  try {
178
189
  provisionSoul(handle, this.cfg.homeDir);
179
190
  }
@@ -295,8 +306,9 @@ export class BridgeApp {
295
306
  for (const info of list) {
296
307
  // Record any server-mediated backend BEFORE starting the runner so its
297
308
  // first brain resolution already sees it (local overrides still win).
298
- if (info.backend)
299
- this.applyServerBackend(info.handle, info.backend);
309
+ const serverBackend = info.backend ?? info.brainBackend;
310
+ if (serverBackend)
311
+ this.applyServerBackend(info.handle, serverBackend);
300
312
  this.startBot(info);
301
313
  }
302
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nopeek/agent-bridge",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Run your own agents as E2EE NoPeek bots. Pairs with a one-time code, runs every bot you own, and pipes messages to any command or webhook.",
5
5
  "type": "module",
6
6
  "license": "MIT",