@agentvault/muse-bridge 0.1.21 → 0.1.23

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.
@@ -1,4 +1,5 @@
1
1
  import { type MuseProvider, type MuseSpawnEnv } from "./muse-spawn.js";
2
+ import { type MuseProviderAdapter, type MuseProviderAdapterOptions } from "./muse-provider.js";
2
3
  export type Flag = boolean | (() => boolean);
3
4
  export interface MuseChild {
4
5
  stdout?: {
@@ -26,6 +27,9 @@ export interface MuseDriverOpts {
26
27
  dataDir: string;
27
28
  spawnFn?: MuseSpawnFn;
28
29
  turnTimeoutMs?: number;
30
+ log?: (message: string) => void;
31
+ /** Test seam for fake children; production always uses the fixed Meta adapter. */
32
+ providerAdapterFactory?: (opts: MuseProviderAdapterOptions) => Promise<MuseProviderAdapter>;
29
33
  }
30
34
  /**
31
35
  * Per-wake `muse exec --json` child. Parses stdout JSONL; the turn ends on
@@ -39,6 +43,7 @@ export declare class MuseDriver {
39
43
  private current;
40
44
  private child;
41
45
  private probed;
46
+ private adapter;
42
47
  constructor(opts: MuseDriverOpts);
43
48
  /** Load or create `<dataDir>/muse-session-id`. Does not spawn muse. */
44
49
  start(): Promise<string>;
@@ -0,0 +1,13 @@
1
+ export interface MuseProviderAdapter {
2
+ baseUrl: string;
3
+ close(): Promise<void>;
4
+ }
5
+ export interface MuseProviderAdapterOptions {
6
+ timeoutMs: number;
7
+ log?: (message: string) => void;
8
+ /** Test transport only: even injected transports receive the fixed Meta URL. */
9
+ fetchForTests?: typeof fetch;
10
+ }
11
+ /** A per-turn loopback endpoint. It never chooses an upstream from client input. */
12
+ export declare function createMuseProviderAdapter(opts: MuseProviderAdapterOptions): Promise<MuseProviderAdapter>;
13
+ //# sourceMappingURL=muse-provider.d.ts.map
@@ -38,6 +38,7 @@ export declare class MuseSession implements RoomSession {
38
38
  idle(): Promise<void>;
39
39
  private log;
40
40
  private run;
41
+ private failureNotice;
41
42
  /**
42
43
  * Room/DM fallback only when this turn authorised a reply AND the model
43
44
  * never called `say`. Echo provider payload.text is prefixed `echo:` — that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/muse-bridge",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "type": "module",
5
5
  "description": "AgentVault Muse Bridge — daemon bridging a Muse agent into E2E-encrypted AgentVault direct messages and rooms.",
6
6
  "main": "dist/index.js",