@howaboua/pi-durable-gippity-voice 0.11.0 → 0.13.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.
Files changed (40) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +4 -2
  3. package/dist/activation.js +1795 -897
  4. package/dist/index.js +1787 -889
  5. package/dist/{packages/gippity-voice/src → internal/voice}/agent-observation.d.ts +2 -2
  6. package/dist/internal/voice/browser-provider.d.ts +65 -0
  7. package/dist/internal/voice/browser-settings.d.ts +24 -0
  8. package/dist/internal/voice/handoff-contract.d.ts +28 -0
  9. package/dist/internal/voice/lan-client-sdk.d.ts +1 -0
  10. package/dist/internal/voice/lan-listener-proof.d.ts +2 -0
  11. package/dist/packages/execution/src/invocation-state.d.ts +1 -1
  12. package/dist/packages/execution/src/invocation.d.ts +79 -2
  13. package/dist/packages/execution/src/native-tools.d.ts +18 -7
  14. package/dist/packages/execution/src/nested-call.d.ts +11 -3
  15. package/dist/packages/execution/src/nested-park.d.ts +9 -0
  16. package/dist/packages/execution/src/nested-result.d.ts +1 -1
  17. package/dist/packages/execution/src/tool-contract.d.ts +8 -1
  18. package/dist/packages/execution/src/tool-namespaces.d.ts +31 -0
  19. package/dist/packages/execution/src/tool-origin.d.ts +9 -1
  20. package/dist/packages/gippity-voice/src/controller.d.ts +10 -3
  21. package/dist/packages/gippity-voice/src/voice/browser-reservation.d.ts +30 -0
  22. package/dist/packages/gippity-voice/src/voice/conversation/peer.d.ts +2 -0
  23. package/dist/packages/gippity-voice/src/voice/conversation/session.d.ts +1 -0
  24. package/dist/packages/gippity-voice/src/voice/handoff-departure.d.ts +5 -0
  25. package/dist/packages/gippity-voice/src/voice/handoff-peer.d.ts +12 -0
  26. package/dist/packages/gippity-voice/src/voice/handoff-wire.d.ts +1 -1
  27. package/dist/packages/gippity-voice/src/voice/lan/browser-clients.d.ts +1 -0
  28. package/dist/packages/gippity-voice/src/voice/lan/browser-peer.d.ts +4 -0
  29. package/dist/packages/gippity-voice/src/voice/lan/browser-session.d.ts +6 -2
  30. package/dist/packages/gippity-voice/src/voice/lan/pcm-bridge.d.ts +25 -0
  31. package/dist/packages/gippity-voice/src/voice/lan/playback-drain.d.ts +8 -0
  32. package/dist/packages/gippity-voice/src/voice/lan/protocol.d.ts +4 -0
  33. package/dist/packages/gippity-voice/src/voice/lan/server.d.ts +1 -1
  34. package/dist/packages/gippity-voice/src/voice/lan/takeover.d.ts +2 -3
  35. package/dist/packages/gippity-voice/src/voice/lan/unified-settings.d.ts +3 -0
  36. package/package.json +10 -10
  37. /package/dist/{packages/gippity-voice/src → internal/voice}/deferred.d.ts +0 -0
  38. /package/dist/{packages/gippity-voice/src/voice/lan/activity.d.ts → internal/voice/lan-activity.d.ts} +0 -0
  39. /package/dist/{packages/gippity-voice/src/voice/lan/draft.d.ts → internal/voice/lan-draft.d.ts} +0 -0
  40. /package/dist/{packages/gippity-voice/src/voice/lan → internal/voice}/remote-json.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ import { WebSocket } from "ws";
2
+ /** One ordered final-playback marker, owned by the exact audio socket. */
3
+ export declare class LanPlaybackDrain {
4
+ private pending;
5
+ wait(socket: WebSocket, signal: AbortSignal, seal: () => Promise<void>): Promise<void>;
6
+ acknowledge(socket: WebSocket, id: string): void;
7
+ cancel(): void;
8
+ }
@@ -2,6 +2,10 @@ export type LanVoiceAudioCommand = {
2
2
  type: "start";
3
3
  mode: "conversation" | "dictation";
4
4
  takeoverToken?: string;
5
+ playbackDrain?: boolean;
6
+ } | {
7
+ type: "drained";
8
+ id: string;
5
9
  } | {
6
10
  type: "mute";
7
11
  muted: boolean;
@@ -1,4 +1,4 @@
1
- import type { Context } from "@earendil-works/chord";
1
+ import type { Context } from "@earendil-works/chord/context";
2
2
  import type { EntryRecord } from "@earendil-works/pi-durable";
3
3
  import type { GippityVoiceControls } from "../../controller.ts";
4
4
  import type { AudioLease, GippityAppFiles, GippityAudioHost, GippityLanPermission, GippityPresentation } from "../../host.ts";
@@ -7,13 +7,12 @@ export interface LanTakeoverOffer extends LanTakeoverIdentity {
7
7
  }
8
8
  export interface PreparedLanTakeover {
9
9
  offer: LanTakeoverOffer;
10
- certificate: GippityLanPermission;
10
+ verify(value: unknown, signal: AbortSignal): Promise<void>;
11
+ claim(value: unknown): string;
11
12
  }
12
13
  export declare function prepareLanTakeover(certificate: GippityLanPermission): PreparedLanTakeover;
13
14
  export declare function decodeLanTakeoverOffer(value: unknown): LanTakeoverOffer;
14
15
  export declare function assertLanTakeoverIdentity(source: LanTakeoverIdentity, target: LanTakeoverIdentity): void;
15
- /** The destination must reach this exact listener through its own loopback. */
16
- export declare function verifyLanTakeoverListener(certificate: string | Buffer, value: unknown, signal?: AbortSignal): Promise<void>;
17
16
  /** Only the reconnect carrying the source token may use the prepared snapshot. */
18
17
  export declare class LanTakeoverArrival<T> {
19
18
  private pending;
@@ -0,0 +1,3 @@
1
+ import { type GippityControlConfig, type VoiceContextModel } from "../../config.ts";
2
+ export declare function gippityBrowserFields(config: GippityControlConfig["voice"], models: readonly VoiceContextModel[], contextAllowed: boolean): import("../../../../../internal/voice/browser-settings.ts").BrowserVoiceSetting[];
3
+ export declare function decodeGippityBrowserSettings(patch: Record<string, unknown>, config: GippityControlConfig["voice"], models: readonly VoiceContextModel[], contextAllowed: boolean): Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-durable-gippity-voice",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Codex Live and OpenAI Realtime WebRTC voice and dictation for Pi Durable",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,17 +39,17 @@
39
39
  "build:native": "node scripts/build-voice-helper.mjs"
40
40
  },
41
41
  "dependencies": {
42
- "typebox": "1.3.27",
43
- "undici": "8.10.2",
44
- "ws": "8.21.3",
45
- "@howaboua/pi-durable-components": "0.11.0",
46
- "@earendil-works/pi-schema": "1.5.0"
42
+ "typebox": "1.4.7",
43
+ "undici": "8.14.0",
44
+ "ws": "8.23.1",
45
+ "@howaboua/pi-durable-components": "0.13.0",
46
+ "@earendil-works/pi-schema": "1.8.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@earendil-works/chord": "1.5.0",
50
- "@earendil-works/pi-ai": "1.5.0",
51
- "@earendil-works/pi-durable": "1.5.0",
52
- "@modelcontextprotocol/sdk": ">=1.25.2 <2"
49
+ "@earendil-works/chord": "1.8.0",
50
+ "@earendil-works/pi-ai": "1.8.0",
51
+ "@earendil-works/pi-durable": "1.8.0",
52
+ "@modelcontextprotocol/sdk": ">=1.32.2 <2"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"