@nopeek/agent-bridge 0.8.0 → 0.8.1
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/bridge.d.ts +1 -1
- package/dist/bridge.js +20 -1
- package/package.json +1 -1
package/dist/bridge.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BridgeConfig, Pairing, BrainSpec, BrainBackend } from "./config.js";
|
|
2
2
|
import { BotRunner } from "./bot.js";
|
|
3
|
-
export declare const VERSION
|
|
3
|
+
export declare const VERSION: string;
|
|
4
4
|
export interface PairRequest {
|
|
5
5
|
pairingSecret: string;
|
|
6
6
|
appId: string;
|
package/dist/bridge.js
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
// persist to <home>/settings.json — no restart, no terminal. Brains
|
|
9
9
|
// (brainMap/serverBackends) are GLOBAL per machine: handles are globally
|
|
10
10
|
// unique, so a handle→brain map needs no per-account scoping.
|
|
11
|
+
import { readFileSync } from "node:fs";
|
|
11
12
|
import { hostname } from "node:os";
|
|
13
|
+
import { dirname, join } from "node:path";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
12
15
|
import { spawn } from "node:child_process";
|
|
13
16
|
import { saveSettings } from "./config.js";
|
|
14
17
|
import { BotRunner, SayError } from "./bot.js";
|
|
@@ -19,7 +22,23 @@ import { reportCapabilities } from "./capabilities.js";
|
|
|
19
22
|
import { lastHermesApiHealth, probeHermesApi } from "./hermes-http.js";
|
|
20
23
|
import { lastTurnGlobal, turnSnapshot } from "./last-turn.js";
|
|
21
24
|
import { isBrainBackend } from "./config.js";
|
|
22
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Read from package.json rather than hardcoded, because the hardcoded copy
|
|
27
|
+
* DRIFTED: 0.8.0 shipped to npm still reporting "0.7.25", which made the one
|
|
28
|
+
* question that matters after an upgrade — "is the fix actually running?" —
|
|
29
|
+
* impossible to answer from /status. One source of truth, checked by a test.
|
|
30
|
+
*/
|
|
31
|
+
function readVersion() {
|
|
32
|
+
try {
|
|
33
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
34
|
+
// dist/bridge.js -> ../package.json ; src/bridge.ts -> ../package.json
|
|
35
|
+
return String(JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8")).version || "");
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return "unknown";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const VERSION = readVersion();
|
|
23
42
|
function hermesApiStatus(cfg) {
|
|
24
43
|
const api = lastHermesApiHealth();
|
|
25
44
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nopeek/agent-bridge",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Run your own agents as E2EE NoPeek bots. Pairs with one-time codes (multiple accounts per computer), runs every bot each account owns, and pipes messages to any command or webhook.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|