import type { SuperagentToolCall } from '../types'; import type { DiffLine, ToolWidgetStatus } from './toolWidgetUtils'; /** * Pure logic for the skills / identity / connection-state widgets, mirroring * the web builder's SuggestSkillInstallation, Request3rdPartyConnection, * SetSecrets and FunctionDisplay identity-card behavior. No RN imports — * unit-testable in the node environment (same rule as toolWidgetUtils.ts). */ /** * True when the user declined/cancelled an approval-style tool. Only `stopped` * means a user rejection (ToolRunner's rejected/abort paths); `error` can be an * approved call whose execution failed — the backend sets status="error" without * clearing requires_user_input (tools.py run_tool_call_and_update_results), so * reading error as a decline would hide real failures behind "dismissed". */ export declare function isDeclinedResolution(status: ToolWidgetStatus, toolCall: SuperagentToolCall): boolean; /** * Failure reason for an errored tool call, from results. Covers both shapes the * backend writes: plain strings (prepare_user_input prechecks, ToolRunner * exception paths) and `{message}` objects. Null for non-error statuses and * when no readable text exists. */ export declare function getFailureReason(status: ToolWidgetStatus, toolCall: SuperagentToolCall): string | null; /** * Suggested skill's display name, from the skill info the backend's * prepare_user_input hook enriches into the tool's arguments * (skill_installation/tool.py writes arguments_string because * set_waiting_for_user_input overwrites results). */ export declare function getSuggestedSkillName(args: Record | null): string; /** Row title — stopped/error must not read as completed (automation-widget parity). */ export declare function getActivatePlatformSkillTitle(status: ToolWidgetStatus): string; export declare function isRetiredPaymentsByWixApproval(toolName: string, args: Record | null): boolean; /** * Display name for a connection-style tool call — the native analog of the * web's getConnectionConfig(...).getName() in Request3rdPartyConnection.tsx. * Payment provider names match ToolApprovalCard's getPaymentName so the * waiting card and the settled card never disagree on a name. */ export declare function getConnectionDisplayName(toolName: string, args: Record | null): string; export type SecretSchemaItem = { description: string; name: string; }; /** * Secret NAMES + descriptions from the set_secrets args schema. This is the * only part of a set_secrets call that may ever be rendered — the user's * secret values travel in toolCall.user_input and must never be shown. */ export declare function getSecretSchemaItems(args: Record | null): SecretSchemaItem[]; /** Channel name for the chip; null for 'all' / missing (generic options card). */ export declare function getChannelDisplayName(args: Record | null): string | null; /** Row title — stopped/error must not read as completed (automation-widget parity). */ export declare function getChannelConnectionOptionsTitle(status: ToolWidgetStatus): string; export declare function getIdentityActiveLabel(fileName: string): string; /** Row title — stopped/error must not read as completed (automation-widget parity). */ export declare function getIdentityTitle(status: ToolWidgetStatus, fileName: string): string; /** * Inline diff for an update_identity call. Native has no previous file content * (the web derives it from earlier messages), so this mirrors the web's * fallback: content lines as additions — plus removed rows for memory.md * delete operations, where content is empty and delete_entry_ids says what went. */ export declare function identityDiffLines(args: Record | null): DiffLine[]; //# sourceMappingURL=skillsAndConnectionsUtils.d.ts.map