@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 +2 -0
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +17 -5
- package/package.json +1 -1
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
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.
|
|
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
|
-
|
|
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
|
-
|
|
299
|
-
|
|
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.
|
|
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",
|