/** * CloudConnectionGrantRequest content type — agent → device "please link * " prompt for a cloud (OAuth) provider. The receiving device * surfaces a card / sheet, the user completes the OAuth flow, and the * resulting grant is published via `profile.metadata` (no on-wire reply * codec — the manifest is the persisted source of truth). * * Mirrors the iOS `CloudConnectionGrantRequestCodec`: * - Content type: convos.org/connection_grant_request:1.0 * - Payload: JSON-encoded `CloudConnectionGrantRequest` * - Fallback: `"The assistant asked to connect "` * - shouldPush: false (silent — the device renders a card on receipt) */ import type { ContentTypeId, EncodedContent } from "@xmtp/node-bindings"; import type { ContentCodec } from "@xmtp/content-type-primitives"; import type { DecodedMessage } from "@xmtp/node-sdk"; export declare const ContentTypeCloudConnectionGrantRequest: ContentTypeId; /** Highest schema version this codec understands. */ export declare const CLOUD_CONNECTION_GRANT_REQUEST_SUPPORTED_VERSION = 1; /** Cap on the `reason` field. iOS truncates symmetrically on encode and decode. */ export declare const CLOUD_CONNECTION_GRANT_REQUEST_MAX_REASON_LENGTH = 500; export interface CloudConnectionGrantRequest { /** Schema version. Must equal `CLOUD_CONNECTION_GRANT_REQUEST_SUPPORTED_VERSION` (1). */ version: number; /** * Cloud service identifier — the Composio toolkit slug (e.g. `"strava"`, * `"googlecalendar"`). Used by the device to render a service-specific * link card and to resolve the OAuth provider implementation. iOS, the * CLI, the agent runtime, the backend, and Composio all use the same * slug end-to-end (no canonical ↔ slug translation layer). */ service: string; /** Inbox ID of the agent (or other party) requesting the grant. */ requestedByInboxId: string; /** Inbox ID of the user expected to complete the OAuth flow. */ targetInboxId: string; /** * Free-form human-readable reason rendered on the picker card. * Truncated to `CLOUD_CONNECTION_GRANT_REQUEST_MAX_REASON_LENGTH` on * encode and decode (matches iOS). */ reason: string; } export declare class CloudConnectionGrantRequestCodec implements ContentCodec { get contentType(): ContentTypeId; encode(content: CloudConnectionGrantRequest): EncodedContent; decode(content: EncodedContent): CloudConnectionGrantRequest; fallback(content: CloudConnectionGrantRequest): string | undefined; shouldPush(_content: CloudConnectionGrantRequest): boolean; } export declare function isCloudConnectionGrantRequestMessage(message: DecodedMessage): boolean; export declare function getCloudConnectionGrantRequestContent(message: DecodedMessage): CloudConnectionGrantRequest | undefined;