mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
refactor: trim google meet helper exports
This commit is contained in:
@@ -18,7 +18,7 @@ type GoogleCalendarConferenceEntryPoint = {
|
||||
label?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetCalendarEvent = {
|
||||
type GoogleMeetCalendarEvent = {
|
||||
id?: string;
|
||||
summary?: string;
|
||||
description?: string;
|
||||
@@ -44,7 +44,7 @@ export type GoogleMeetCalendarLookupResult = {
|
||||
meetingUri: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetCalendarEventsResult = {
|
||||
type GoogleMeetCalendarEventsResult = {
|
||||
calendarId: string;
|
||||
events: Array<{
|
||||
event: GoogleMeetCalendarEvent;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
export type GoogleMeetTransport = "chrome" | "chrome-node" | "twilio";
|
||||
export type GoogleMeetMode = "realtime" | "transcribe";
|
||||
export type GoogleMeetChromeAudioFormat = "pcm16-24khz" | "g711-ulaw-8khz";
|
||||
type GoogleMeetChromeAudioFormat = "pcm16-24khz" | "g711-ulaw-8khz";
|
||||
export type GoogleMeetToolPolicy = RealtimeVoiceAgentConsultToolPolicy;
|
||||
|
||||
export type GoogleMeetConfig = {
|
||||
@@ -123,7 +123,7 @@ export const DEFAULT_GOOGLE_MEET_AUDIO_OUTPUT_COMMAND = [
|
||||
"BlackHole 2ch",
|
||||
] as const;
|
||||
|
||||
export const LEGACY_GOOGLE_MEET_AUDIO_INPUT_COMMAND = [
|
||||
const LEGACY_GOOGLE_MEET_AUDIO_INPUT_COMMAND = [
|
||||
"rec",
|
||||
"-q",
|
||||
"-t",
|
||||
@@ -139,7 +139,7 @@ export const LEGACY_GOOGLE_MEET_AUDIO_INPUT_COMMAND = [
|
||||
"-",
|
||||
] as const;
|
||||
|
||||
export const LEGACY_GOOGLE_MEET_AUDIO_OUTPUT_COMMAND = [
|
||||
const LEGACY_GOOGLE_MEET_AUDIO_OUTPUT_COMMAND = [
|
||||
"play",
|
||||
"-q",
|
||||
"-t",
|
||||
@@ -155,15 +155,15 @@ export const LEGACY_GOOGLE_MEET_AUDIO_OUTPUT_COMMAND = [
|
||||
"-",
|
||||
] as const;
|
||||
|
||||
export const DEFAULT_GOOGLE_MEET_CHROME_AUDIO_FORMAT: GoogleMeetChromeAudioFormat = "pcm16-24khz";
|
||||
export const DEFAULT_GOOGLE_MEET_BARGE_IN_RMS_THRESHOLD = 650;
|
||||
export const DEFAULT_GOOGLE_MEET_BARGE_IN_PEAK_THRESHOLD = 2500;
|
||||
export const DEFAULT_GOOGLE_MEET_BARGE_IN_COOLDOWN_MS = 900;
|
||||
const DEFAULT_GOOGLE_MEET_CHROME_AUDIO_FORMAT: GoogleMeetChromeAudioFormat = "pcm16-24khz";
|
||||
const DEFAULT_GOOGLE_MEET_BARGE_IN_RMS_THRESHOLD = 650;
|
||||
const DEFAULT_GOOGLE_MEET_BARGE_IN_PEAK_THRESHOLD = 2500;
|
||||
const DEFAULT_GOOGLE_MEET_BARGE_IN_COOLDOWN_MS = 900;
|
||||
|
||||
export const DEFAULT_GOOGLE_MEET_REALTIME_INSTRUCTIONS = `You are joining a private Google Meet as an OpenClaw agent. Keep spoken replies brief and natural. When a question needs deeper reasoning, current information, or tools, call ${REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME} before answering.`;
|
||||
export const DEFAULT_GOOGLE_MEET_REALTIME_INTRO_MESSAGE = "Say exactly: I'm here and listening.";
|
||||
const DEFAULT_GOOGLE_MEET_REALTIME_INSTRUCTIONS = `You are joining a private Google Meet as an OpenClaw agent. Keep spoken replies brief and natural. When a question needs deeper reasoning, current information, or tools, call ${REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME} before answering.`;
|
||||
const DEFAULT_GOOGLE_MEET_REALTIME_INTRO_MESSAGE = "Say exactly: I'm here and listening.";
|
||||
|
||||
export const DEFAULT_GOOGLE_MEET_CONFIG: GoogleMeetConfig = {
|
||||
const DEFAULT_GOOGLE_MEET_CONFIG: GoogleMeetConfig = {
|
||||
enabled: true,
|
||||
defaults: {},
|
||||
preview: {
|
||||
|
||||
@@ -10,7 +10,7 @@ const GOOGLE_MEET_MEDIA_SCOPE =
|
||||
"https://www.googleapis.com/auth/meetings.conference.media.readonly";
|
||||
const GOOGLE_MEET_SPACE_SCOPE = "https://www.googleapis.com/auth/meetings.space.readonly";
|
||||
|
||||
export type GoogleMeetSpace = {
|
||||
type GoogleMeetSpace = {
|
||||
name: string;
|
||||
meetingCode?: string;
|
||||
meetingUri?: string;
|
||||
@@ -18,7 +18,7 @@ export type GoogleMeetSpace = {
|
||||
config?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type GoogleMeetPreflightReport = {
|
||||
type GoogleMeetPreflightReport = {
|
||||
input: string;
|
||||
resolvedSpaceName: string;
|
||||
meetingCode?: string;
|
||||
@@ -29,12 +29,12 @@ export type GoogleMeetPreflightReport = {
|
||||
blockers: string[];
|
||||
};
|
||||
|
||||
export type GoogleMeetCreateSpaceResult = {
|
||||
type GoogleMeetCreateSpaceResult = {
|
||||
space: GoogleMeetSpace;
|
||||
meetingUri: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetConferenceRecord = {
|
||||
type GoogleMeetConferenceRecord = {
|
||||
name: string;
|
||||
space?: string;
|
||||
startTime?: string;
|
||||
@@ -42,7 +42,7 @@ export type GoogleMeetConferenceRecord = {
|
||||
expireTime?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetParticipant = {
|
||||
type GoogleMeetParticipant = {
|
||||
name: string;
|
||||
earliestStartTime?: string;
|
||||
latestEndTime?: string;
|
||||
@@ -58,20 +58,20 @@ export type GoogleMeetParticipant = {
|
||||
};
|
||||
};
|
||||
|
||||
export type GoogleMeetParticipantSession = {
|
||||
type GoogleMeetParticipantSession = {
|
||||
name: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetRecording = {
|
||||
type GoogleMeetRecording = {
|
||||
name: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
driveDestination?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type GoogleMeetTranscript = {
|
||||
type GoogleMeetTranscript = {
|
||||
name: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -80,7 +80,7 @@ export type GoogleMeetTranscript = {
|
||||
documentTextError?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetTranscriptEntry = {
|
||||
type GoogleMeetTranscriptEntry = {
|
||||
name: string;
|
||||
participant?: string;
|
||||
text?: string;
|
||||
@@ -89,13 +89,13 @@ export type GoogleMeetTranscriptEntry = {
|
||||
endTime?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetTranscriptEntries = {
|
||||
type GoogleMeetTranscriptEntries = {
|
||||
transcript: string;
|
||||
entries: GoogleMeetTranscriptEntry[];
|
||||
entriesError?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetSmartNote = {
|
||||
type GoogleMeetSmartNote = {
|
||||
name: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -104,7 +104,7 @@ export type GoogleMeetSmartNote = {
|
||||
documentTextError?: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetArtifactsEntry = {
|
||||
type GoogleMeetArtifactsEntry = {
|
||||
conferenceRecord: GoogleMeetConferenceRecord;
|
||||
participants: GoogleMeetParticipant[];
|
||||
recordings: GoogleMeetRecording[];
|
||||
@@ -127,7 +127,7 @@ export type GoogleMeetLatestConferenceRecordResult = {
|
||||
conferenceRecord?: GoogleMeetConferenceRecord;
|
||||
};
|
||||
|
||||
export type GoogleMeetAttendanceRow = {
|
||||
type GoogleMeetAttendanceRow = {
|
||||
conferenceRecord: string;
|
||||
participant: string;
|
||||
participants?: string[];
|
||||
@@ -392,7 +392,7 @@ export async function createGoogleMeetSpace(params: {
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchGoogleMeetConferenceRecord(params: {
|
||||
async function fetchGoogleMeetConferenceRecord(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
}): Promise<GoogleMeetConferenceRecord> {
|
||||
@@ -409,7 +409,7 @@ export async function fetchGoogleMeetConferenceRecord(params: {
|
||||
return payload;
|
||||
}
|
||||
|
||||
export async function listGoogleMeetConferenceRecords(params: {
|
||||
async function listGoogleMeetConferenceRecords(params: {
|
||||
accessToken: string;
|
||||
meeting?: string;
|
||||
pageSize?: number;
|
||||
@@ -453,7 +453,7 @@ export async function fetchLatestGoogleMeetConferenceRecord(params: {
|
||||
};
|
||||
}
|
||||
|
||||
export async function listGoogleMeetParticipants(params: {
|
||||
async function listGoogleMeetParticipants(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
pageSize?: number;
|
||||
@@ -469,7 +469,7 @@ export async function listGoogleMeetParticipants(params: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function listGoogleMeetParticipantSessions(params: {
|
||||
async function listGoogleMeetParticipantSessions(params: {
|
||||
accessToken: string;
|
||||
participant: string;
|
||||
pageSize?: number;
|
||||
@@ -484,7 +484,7 @@ export async function listGoogleMeetParticipantSessions(params: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function listGoogleMeetRecordings(params: {
|
||||
async function listGoogleMeetRecordings(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
pageSize?: number;
|
||||
@@ -500,7 +500,7 @@ export async function listGoogleMeetRecordings(params: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function listGoogleMeetTranscripts(params: {
|
||||
async function listGoogleMeetTranscripts(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
pageSize?: number;
|
||||
@@ -516,7 +516,7 @@ export async function listGoogleMeetTranscripts(params: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function listGoogleMeetTranscriptEntries(params: {
|
||||
async function listGoogleMeetTranscriptEntries(params: {
|
||||
accessToken: string;
|
||||
transcript: string;
|
||||
pageSize?: number;
|
||||
@@ -531,7 +531,7 @@ export async function listGoogleMeetTranscriptEntries(params: {
|
||||
});
|
||||
}
|
||||
|
||||
export async function listGoogleMeetSmartNotes(params: {
|
||||
async function listGoogleMeetSmartNotes(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
pageSize?: number;
|
||||
|
||||
@@ -4,13 +4,13 @@ import path from "node:path";
|
||||
import { isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
|
||||
import type { GoogleMeetConfig, GoogleMeetMode, GoogleMeetTransport } from "./config.js";
|
||||
|
||||
export type SetupCheck = {
|
||||
type SetupCheck = {
|
||||
id: string;
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type GoogleMeetSetupStatus = {
|
||||
type GoogleMeetSetupStatus = {
|
||||
ok: boolean;
|
||||
checks: SetupCheck[];
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ type VoiceCallSpeakResult = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export type VoiceCallMeetJoinResult = {
|
||||
type VoiceCallMeetJoinResult = {
|
||||
callId: string;
|
||||
dtmfSent: boolean;
|
||||
introSent: boolean;
|
||||
|
||||
Reference in New Issue
Block a user