/** * Core Channels (retired) * DO NOT MODIFY THIS FILE - You may break the project functionality * * Workspace channels no longer exist. This module stays only so apps built * against earlier framework versions keep working: `postToChannel()` still * sends its message to the platform, which files it as an app event in the * workspace activity feed and on the app's timeline. New code should call * `emitEvent()` from `@runworkai/framework/events` instead. * When running outside a workspace (standalone mode), calls are silently skipped. */ /** @deprecated Channels are retired; use `emitEvent()` from `@runworkai/framework/events`. */ export interface PostToChannelParams { /** Former channel name; kept for compatibility and ignored by the platform. */ channel: string; /** Markdown message content */ content: string; /** Optional structured metadata attached to the message */ metadata?: Record; } interface ChannelEnv { WORKSPACE_API_URL?: string; WORKSPACE_API_KEY?: string; WORKSPACE_ID?: string; APP_ID?: string; APP_NAME?: string; DEPLOYMENT_MODE?: 'preview' | 'production'; WorkspaceObject?: DurableObjectNamespace; } /** * Any context that supports waitUntil - compatible with both * ExecutionContext (Hono route handlers) and DurableObjectState (DOs). */ type WaitUntilContext = Pick; /** * @deprecated Channels are retired. The message is still delivered as an app * event that appears in the workspace activity feed and on the app's timeline; * use `emitEvent()` from `@runworkai/framework/events` for new code. * Fire-and-forget: uses ctx.waitUntil so it doesn't block the response. * Silently skips if workspace env vars are not configured (standalone mode). */ export declare function postToChannel(ctx: WaitUntilContext, env: ChannelEnv, params: PostToChannelParams): void; export {};