Skip to content

Commit 41cc065

Browse files
committed
start with public tags
1 parent cf14c7c commit 41cc065

File tree

5 files changed

+140
-6
lines changed

5 files changed

+140
-6
lines changed

agents/etc/agents.api.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/// <reference types="node" />
88

99
import { AudioFrame } from '@livekit/rtc-node';
10+
import type { AudioSource } from '@livekit/rtc-node';
1011
import type { E2EEOptions } from '@livekit/rtc-node';
1112
import { EventEmitter } from 'node:events';
1213
import { JobType } from '@livekit/protocol';
@@ -31,6 +32,16 @@ export interface Agent {
3132
// @public (undocumented)
3233
const AGENT_STATE_ATTRIBUTE = "lk.agent.state";
3334

35+
// @public (undocumented)
36+
class AgentPlayout extends EventEmitter {
37+
constructor(audioSource: AudioSource, sampleRate: number, numChannels: number, inFrameSize: number, outFrameSize: number);
38+
// Warning: (ae-incompatible-release-tags) The symbol "play" is marked as @public, but its signature references "AsyncIterableQueue" which is marked as @internal
39+
// Warning: (ae-incompatible-release-tags) The symbol "play" is marked as @public, but its signature references "AsyncIterableQueue" which is marked as @internal
40+
//
41+
// (undocumented)
42+
play(itemId: string, contentIndex: number, transcriptionFwd: TranscriptionForwarder, textStream: AsyncIterableQueue<string>, audioStream: AsyncIterableQueue<AudioFrame>): PlayoutHandle;
43+
}
44+
3445
// @public (undocumented)
3546
type AgentState = 'initializing' | 'thinking' | 'listening' | 'speaking';
3647

@@ -297,7 +308,10 @@ declare namespace multimodal {
297308
RealtimeModel,
298309
AgentState,
299310
AGENT_STATE_ATTRIBUTE,
300-
MultimodalAgent
311+
MultimodalAgent,
312+
proto_2 as proto,
313+
PlayoutHandle,
314+
AgentPlayout
301315
}
302316
}
303317
export { multimodal }
@@ -346,6 +360,35 @@ const oaiParams: (p: z.AnyZodObject) => {
346360
required_properties: string[];
347361
};
348362

363+
// @public (undocumented)
364+
class PlayoutHandle extends EventEmitter {
365+
constructor(audioSource: AudioSource, sampleRate: number, itemId: string, contentIndex: number, transcriptionFwd: TranscriptionForwarder);
366+
// (undocumented)
367+
get audioSamples(): number;
368+
// (undocumented)
369+
get contentIndex(): number;
370+
// (undocumented)
371+
get done(): boolean;
372+
// @internal (undocumented)
373+
doneFut: Future;
374+
// (undocumented)
375+
interrupt(): void;
376+
// (undocumented)
377+
get interrupted(): boolean;
378+
// @internal (undocumented)
379+
intFut: Future;
380+
// (undocumented)
381+
get itemId(): string;
382+
// @internal (undocumented)
383+
pushedDuration: number;
384+
// (undocumented)
385+
get textChars(): number;
386+
// @internal (undocumented)
387+
totalPlayedTime: number | undefined;
388+
// @internal (undocumented)
389+
transcriptionFwd: TranscriptionForwarder;
390+
}
391+
349392
// @public (undocumented)
350393
abstract class Plugin_2 {
351394
constructor(title: string, version: string);
@@ -362,6 +405,9 @@ abstract class Plugin_2 {
362405
}
363406
export { Plugin_2 as Plugin }
364407

408+
// @public (undocumented)
409+
const proto_2: {};
410+
365411
// Warning: (ae-internal-missing-underscore) The name "Queue" should be prefixed with an underscore because the declaration is marked as @internal
366412
//
367413
// @internal (undocumented)

agents/src/multimodal/agent_playout.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import type { AudioSource } from '@livekit/rtc-node';
66
import { EventEmitter } from 'node:events';
77
import { AudioByteStream } from '../audio.js';
88
import type { TranscriptionForwarder } from '../transcription.js';
9-
import { type AsyncIterableQueue, CancellablePromise, Future, gracefullyCancel } from '../utils.js';
9+
import { CancellablePromise, Future, gracefullyCancel } from '../utils.js';
10+
import type { AsyncIterableQueue } from '../utils.js';
1011

1112
export const proto = {};
1213

agents/src/multimodal/multimodal_agent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import type * as llm from '../llm/index.js';
2121
import { log } from '../log.js';
2222
import { BasicTranscriptionForwarder } from '../transcription.js';
2323
import { findMicroTrackId } from '../utils.js';
24-
import { AgentPlayout, type PlayoutHandle } from './agent_playout.js';
24+
import type { PlayoutHandle } from './agent_playout.js';
25+
import { AgentPlayout } from './agent_playout.js';
2526

2627
/**
2728
* @internal

plugins/openai/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
import * as realtime from './realtime/index.js';
5-
6-
export { realtime };
4+
export * as realtime from './realtime/index.js';

0 commit comments

Comments
 (0)