aibroker 0.6.4 → 0.7.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.
@@ -14,28 +14,27 @@
14
14
  * Provide the screenshot handler so ws-gateway can trigger screenshots
15
15
  * for navigation commands without a circular import.
16
16
  */
17
- export declare function setScreenshotHandler(handler: (source?: "whatsapp" | "pailot") => Promise<void>): void;
17
+ export declare function setScreenshotHandler(handler: (source?: "whatsapp" | "pailot", sessionId?: string) => Promise<void>): void;
18
+ /** Set the voice batch session from external callers (MQTT path). */
19
+ export declare function setVoiceBatchSession(sessionId: string): void;
20
+ export declare function transcribeAndRoute(audioBase64: string, onMessage: (text: string, timestamp: number) => void | Promise<void>, messageId?: string): Promise<void>;
18
21
  /**
19
22
  * Start the WebSocket gateway.
20
23
  * @param onMessage — the same handleMessage(text, timestamp) used by the transport
21
24
  */
22
25
  export declare function startWsGateway(onMessage: (text: string, timestamp: number) => void | Promise<void>): void;
23
- export declare function broadcastText(text: string, sessionId?: string, opts?: {
24
- skipSessionGate?: boolean;
25
- }): void;
26
+ export declare function broadcastText(text: string, sessionId?: string, direct?: boolean): void;
26
27
  /**
27
28
  * Broadcast a voice note to all connected PAILot clients.
28
29
  * Converts OGG Opus to M4A (AAC) since iOS can't play OGG natively.
29
30
  * @param sessionId — iTerm session ID of the originating Claude session
30
31
  */
31
- export declare function broadcastVoice(audioBuffer: Buffer, transcript: string, sessionId?: string, opts?: {
32
- skipSessionGate?: boolean;
33
- }): Promise<void>;
32
+ export declare function broadcastVoice(audioBuffer: Buffer, transcript: string, sessionId?: string, direct?: boolean): Promise<void>;
34
33
  /**
35
34
  * Broadcast a screenshot/image to all connected PAILot clients.
36
35
  * @param sessionId — iTerm session ID of the originating Claude session
37
36
  */
38
- export declare function broadcastImage(imageBuffer: Buffer, caption?: string, sessionId?: string): void;
37
+ export declare function broadcastImage(imageBuffer: Buffer, caption?: string, sessionId?: string, direct?: boolean): void;
39
38
  /**
40
39
  * Broadcast a status change to all connected PAILot clients.
41
40
  * Used to signal compaction, reconnection, etc.
@@ -49,4 +48,9 @@ export declare function hasPailotClients(): boolean;
49
48
  * Stop the WebSocket gateway.
50
49
  */
51
50
  export declare function stopWsGateway(): void;
51
+ /**
52
+ * Handle a command from MQTT (no WebSocket needed).
53
+ * Replicates the WS command dispatcher for MQTT-only clients.
54
+ */
55
+ export declare function handleMqttCommand(command: string, args?: Record<string, unknown>): void;
52
56
  //# sourceMappingURL=gateway.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../../src/adapters/pailot/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA8LH;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAErG;AAylBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CA6PzG;AAuBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BrJ;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,M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