@byokit/realtime 0.3.1 → 0.3.2
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/chatgpt.js +2 -2
- package/dist/child.js +2 -2
- package/dist/client.js +1 -1
- package/dist/index.js +7 -7
- package/dist/node.js +6 -6
- package/dist/providers/gemini.js +2 -2
- package/dist/providers/openai.js +2 -2
- package/dist/providers/xai.js +2 -2
- package/dist/rn-webrtc.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/webrtc.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -258,4 +258,4 @@ Credentials, endpoint restrictions and redirect rejection are unchanged.
|
|
|
258
258
|
The identity option allows a consumer to compare signaling latency; offline
|
|
259
259
|
tests prove startup ordering, not a reduction in the remote provider's POST time.
|
|
260
260
|
|
|
261
|
-
For an explicitly live microphone and subscription-provider proof, run [the bounded voice demo](../../examples/realtime-voice/README.md). It signs in through accounts,
|
|
261
|
+
For an explicitly live microphone and subscription-provider proof, run [the bounded voice demo](../../examples/realtime-voice/README.md). It signs in through accounts, keeping the sign-in at this computer's machine store, and records connection facts and turn counts. Offline tests do not establish a live pass.
|
package/dist/chatgpt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cleanProse, cleanProseBytes } from
|
|
2
|
-
import { MAX_REALTIME_SDP_BYTES } from
|
|
1
|
+
import { cleanProse, cleanProseBytes } from './prose.js';
|
|
2
|
+
import { MAX_REALTIME_SDP_BYTES } from './frames.js';
|
|
3
3
|
export const CHATGPT_SIGNALING_URL = 'https://chatgpt.com/backend-api/codex/realtime/calls?intent=quicksilver&architecture=avas';
|
|
4
4
|
function emit(frame) { process.stdout.write(`${JSON.stringify(frame)}\n`); }
|
|
5
5
|
export async function boundedBody(response, max = MAX_REALTIME_SDP_BYTES) {
|
package/dist/child.js
CHANGED
|
@@ -8,8 +8,8 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
8
8
|
};
|
|
9
9
|
import { createInterface } from 'node:readline';
|
|
10
10
|
import { randomUUID } from 'node:crypto';
|
|
11
|
-
import { parseRealtimeClientFrame } from
|
|
12
|
-
import { createChatgptAdapter } from
|
|
11
|
+
import { parseRealtimeClientFrame } from './frames.js';
|
|
12
|
+
import { createChatgptAdapter } from './chatgpt.js';
|
|
13
13
|
const input = createInterface({ input: process.stdin, crlfDelay: Infinity });
|
|
14
14
|
let adapter;
|
|
15
15
|
const pending = new Map();
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseRealtimeClientFrame, parseRealtimeHostFrame, realtimePcm16ByteLength } from
|
|
1
|
+
import { parseRealtimeClientFrame, parseRealtimeHostFrame, realtimePcm16ByteLength } from './frames.js';
|
|
2
2
|
/** Provider-blind client with bounded reconnects and exclusive media ownership. */
|
|
3
3
|
export function realtimeClient(options) {
|
|
4
4
|
const audio = options.audio;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export { providers } from
|
|
1
|
+
export * from './frames.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './words.js';
|
|
4
|
+
export * from './prose.js';
|
|
5
|
+
export * from './client.js';
|
|
6
|
+
export * from './auth.js';
|
|
7
|
+
export { providers } from './catalogue.js';
|
package/dist/node.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { createInterface } from 'node:readline';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { parseRealtimeClientFrame, parseRealtimeHostFrame } from
|
|
5
|
-
import { RealtimeError } from
|
|
6
|
-
import { cleanProseBytes } from
|
|
7
|
-
import { realtimeAuthCheck } from
|
|
8
|
-
export { toolBridge, appBridge, delegationHandler } from
|
|
9
|
-
export { realtimeAuthCheck } from
|
|
4
|
+
import { parseRealtimeClientFrame, parseRealtimeHostFrame } from './frames.js';
|
|
5
|
+
import { RealtimeError } from './types.js';
|
|
6
|
+
import { cleanProseBytes } from './prose.js';
|
|
7
|
+
import { realtimeAuthCheck } from './auth.js';
|
|
8
|
+
export { toolBridge, appBridge, delegationHandler } from './tools.js';
|
|
9
|
+
export { realtimeAuthCheck } from './auth.js';
|
|
10
10
|
/** Provider sockets and SDP signaling run in a kit-owned child, never in the app process. */
|
|
11
11
|
export function realtimeEngine(options) {
|
|
12
12
|
if (!['chatgpt', 'openai', 'gemini', 'xai'].includes(options.engine))
|
package/dist/providers/gemini.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from 'ws';
|
|
2
|
-
import { responseFence } from
|
|
3
|
-
import { cleanProse, providerRefusal as refusal } from
|
|
2
|
+
import { responseFence } from '../policy.js';
|
|
3
|
+
import { cleanProse, providerRefusal as refusal } from '../prose.js';
|
|
4
4
|
// Lifted wire behavior; this module is loaded only by the kit child process.
|
|
5
5
|
export function createAdapter(options) {
|
|
6
6
|
const MODEL = options.model ?? 'gemini-3.8-live';
|
package/dist/providers/openai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from 'ws';
|
|
2
|
-
import { responseFence } from
|
|
3
|
-
import { cleanProse, providerRefusal as refusal } from
|
|
2
|
+
import { responseFence } from '../policy.js';
|
|
3
|
+
import { cleanProse, providerRefusal as refusal } from '../prose.js';
|
|
4
4
|
// Lifted wire behavior; this module is loaded only by the kit child process.
|
|
5
5
|
export function createAdapter(options) {
|
|
6
6
|
const MODEL = options.model ?? 'gpt-realtime-2.1';
|
package/dist/providers/xai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from 'ws';
|
|
2
|
-
import { responseFence } from
|
|
3
|
-
import { cleanProse, providerRefusal as refusal } from
|
|
2
|
+
import { responseFence } from '../policy.js';
|
|
3
|
+
import { cleanProse, providerRefusal as refusal } from '../prose.js';
|
|
4
4
|
// Lifted wire behavior; this module is loaded only by the kit child process.
|
|
5
5
|
export function createAdapter(options) {
|
|
6
6
|
const MODEL = options.model ?? 'grok-voice-think-fast-2.0';
|
package/dist/rn-webrtc.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { cleanProseBytes } from
|
|
2
|
+
import { cleanProseBytes } from './prose.js';
|
|
3
3
|
/** Bounded, deduplicated tool execution. Product authorization stays in handlers. */
|
|
4
4
|
export function toolBridge(options) {
|
|
5
5
|
const lifetime = new AbortController();
|
package/dist/webrtc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_REALTIME_SDP_BYTES, MAX_REALTIME_WEBRTC_DATA_BYTES } from
|
|
1
|
+
import { MAX_REALTIME_SDP_BYTES, MAX_REALTIME_WEBRTC_DATA_BYTES } from './frames.js';
|
|
2
2
|
function sdp(value) {
|
|
3
3
|
if (typeof value !== 'string' || !value.startsWith('v=0') || value.includes('\0') || new TextEncoder().encode(value).length > MAX_REALTIME_SDP_BYTES)
|
|
4
4
|
throw new Error('Invalid voice connection answer.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byokit/realtime",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Realtime voice sessions with host-held credentials and injected audio.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"ws": "8.
|
|
46
|
+
"ws": "8.22.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react-native-webrtc": "124.0.8"
|