UNPKG

@promptbook/remote-client

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

66 lines (65 loc) 2.08 kB
/** * Default Google Calendar OAuth scopes when commitment content does not list any. * * @private internal USE CALENDAR constant */ export declare const DEFAULT_GOOGLE_CALENDAR_SCOPES: readonly ["https://www.googleapis.com/auth/calendar"]; /** * Calendar provider types currently supported by USE CALENDAR. * * @private internal utility of USE CALENDAR commitment */ export type CalendarProviderType = 'google'; /** * Canonical calendar reference resolved from commitment content. * * @private internal utility of USE CALENDAR commitment */ export type CalendarReference = { provider: CalendarProviderType; url: string; calendarId: string; scopes: string[]; tokenRef?: string; }; /** * Parsed `USE CALENDAR` payload. * * @private internal utility of USE CALENDAR commitment */ export type ParsedUseCalendarCommitmentContent = { calendar: CalendarReference | null; calendarUrlRaw: string | null; instructions: string; }; /** * Parses one Google Calendar URL/reference into canonical details. * * Supported input forms: * - `https://calendar.google.com/...` * - `calendar.google.com/...` * * @private internal utility of USE CALENDAR commitment */ export declare function parseGoogleCalendarReference(rawReference: string): CalendarReference | null; /** * Parses `USE CALENDAR` commitment content into calendar reference + optional instructions. * * @private internal utility of USE CALENDAR commitment */ export declare function parseUseCalendarCommitmentContent(content: string): ParsedUseCalendarCommitmentContent; /** * Extracts canonical calendar references from parsed commitments. * * @private internal utility of USE CALENDAR commitment */ export declare function extractUseCalendarReferencesFromCommitments(commitments: ReadonlyArray<{ type: string; content: string; }>): CalendarReference[]; /** * Attempts to resolve one concrete Google Calendar id from URL. * * @private internal utility of USE CALENDAR commitment */ export declare function parseGoogleCalendarIdFromUrl(url: URL): string | null;