File size: 3,045 Bytes
8eaf022
a1a1b60
8eaf022
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a1a1b60
 
 
 
 
8eaf022
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a1a1b60
 
 
 
 
8eaf022
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import type { JsonValue, SessionSummary, WorldAction, WorldObservation } from "../types.js";
import type { HutterLectureSpeakInput, HutterLectureStartInput, HutterLectureState, HutterMessage, HutterMessageInput, HutterResult, HutterResultInput, HutterState } from "../hutter/hutterRuntime.js";
export type SessionDetails = {
    session: SessionSummary;
    recentObservations: WorldObservation[];
};
export type BridgeUrlOptions = {
    sessionId: string;
    iframeApiUrl?: string;
};
export type RuntimeClient = {
    listSessions(): Promise<SessionSummary[]>;
    getSession(sessionId: string): Promise<SessionDetails>;
    enqueueAction(sessionId: string, action: WorldAction): Promise<unknown>;
    say(sessionId: string, text: string, options?: {
        channel?: "local" | "bubble";
        voice?: boolean;
    }): Promise<unknown>;
    speak(sessionId: string, text: string): Promise<unknown>;
    sendAgentMessage(targetSessionId: string, fromSessionId: string, message: string, data?: JsonValue): Promise<unknown>;
    createBridgeUrl(options: BridgeUrlOptions): Promise<string>;
    getHutterState(): Promise<HutterState>;
    getHutterEntity(entityId: string): Promise<unknown>;
    submitHutterResult(input: HutterResultInput): Promise<HutterResult>;
    postHutterMessage(input: HutterMessageInput): Promise<HutterMessage>;
    getHutterLecture(): Promise<HutterLectureState>;
    startHutterLecture(input: HutterLectureStartInput): Promise<HutterLectureState>;
    nextHutterLectureSlide(): Promise<HutterLectureState>;
    stopHutterLecture(): Promise<HutterLectureState>;
    addHutterLectureTranscript(input: HutterLectureSpeakInput): Promise<HutterLectureState>;
};
export declare class HttpRuntimeClient implements RuntimeClient {
    private readonly baseUrl;
    private readonly controlToken;
    constructor(baseUrl?: string);
    listSessions(): Promise<SessionSummary[]>;
    getSession(sessionId: string): Promise<SessionDetails>;
    enqueueAction(sessionId: string, action: WorldAction): Promise<unknown>;
    say(sessionId: string, text: string, options?: {
        channel?: "local" | "bubble";
        voice?: boolean;
    }): Promise<unknown>;
    speak(sessionId: string, text: string): Promise<unknown>;
    sendAgentMessage(targetSessionId: string, fromSessionId: string, message: string, data?: JsonValue): Promise<unknown>;
    createBridgeUrl(options: BridgeUrlOptions): Promise<string>;
    getHutterState(): Promise<HutterState>;
    getHutterEntity(entityId: string): Promise<unknown>;
    submitHutterResult(input: HutterResultInput): Promise<HutterResult>;
    postHutterMessage(input: HutterMessageInput): Promise<HutterMessage>;
    getHutterLecture(): Promise<HutterLectureState>;
    startHutterLecture(input: HutterLectureStartInput): Promise<HutterLectureState>;
    nextHutterLectureSlide(): Promise<HutterLectureState>;
    stopHutterLecture(): Promise<HutterLectureState>;
    addHutterLectureTranscript(input: HutterLectureSpeakInput): Promise<HutterLectureState>;
    private request;
}