import * as react from 'react'; import { JSX, ReactNode, HTMLAttributes } from 'react'; import { I18nRuntime } from '@tutti-os/ui-i18n-runtime'; import { A as AgentGuiI18nLocale, T as TranslateFn } from '../runtime.d-Dwf44VKc.js'; import { e as WorkspaceAgentActivityStatus, b as AgentConversationPromptVM, h as WorkspaceLinkAction, d as AgentInteractionResponseInput } from '../workspaceLinkActions.d-gJPVQnM0.js'; import { AgentSessionEngine, AgentActivityNeedsAttentionItem, WorkspaceAgentConsumerSession, AgentActivitySnapshot, AgentSessionEngineState } from '@tutti-os/agent-activity-core'; export { WorkspaceAgentConsumerCounts, WorkspaceAgentConsumerSession, selectWorkspaceAgentConsumerCounts, selectWorkspaceAgentConsumerSession, selectWorkspaceAgentConsumerSessions } from '@tutti-os/agent-activity-core'; import { a as PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, P as PLAN_IMPLEMENTATION_ACTION_FEEDBACK, b as PLAN_IMPLEMENTATION_ACTION_SKIP } from '../planImplementationPresentation.d-BxVOLt6A.js'; export { c as PLAN_IMPLEMENTATION_PROMPT } from '../planImplementationPresentation.d-BxVOLt6A.js'; import '@tutti-os/workspace-issue-manager/core'; declare function useTranslation(): { i18n: I18nRuntime; locale: AgentGuiI18nLocale; t: TranslateFn; }; /** * Structural surface the binding needs from an engine instance. Matches * AgentSessionEngine from @tutti-os/agent-activity-core, but stays structural * so focused tests and future engine slices can bind without the full engine. * * Contract: `subscribe` and `getSnapshot` must be stable, this-free function * references for the lifetime of the instance (the engine factory returns * closures, satisfying this by construction). A fresh `subscribe` identity per * render would force useSyncExternalStore to resubscribe on every render. */ interface EngineStateStore { getSnapshot(): TState; subscribe(listener: () => void): () => void; } declare function useEngineSelector(engine: EngineStateStore, selector: (state: TState) => TSelected, isEqual?: (a: TSelected, b: TSelected) => boolean): TSelected; type AgentPlanPromptAction = typeof PLAN_IMPLEMENTATION_ACTION_IMPLEMENT | typeof PLAN_IMPLEMENTATION_ACTION_FEEDBACK | typeof PLAN_IMPLEMENTATION_ACTION_SKIP; declare function dispatchAgentPlanPromptAction(input: { action: AgentPlanPromptAction; agentSessionId: string; engine: AgentSessionEngine; feedbackText?: string; nowUnixMs?: () => number; requestId: string; workspaceId: string; }): boolean; type WorkspaceAgentMessageCenterDigestPrimaryKind = "input-required" | "error" | "outcome" | "progress" | "summary"; interface WorkspaceAgentMessageCenterDigestPrimary { kind: WorkspaceAgentMessageCenterDigestPrimaryKind; summary: string; occurredAtUnixMs: number | null; } interface WorkspaceAgentMessageCenterDigest { primary: WorkspaceAgentMessageCenterDigestPrimary; } declare function isWaitingMessageCenterItem(item: WorkspaceAgentMessageCenterItem): boolean; declare function isInteractiveMessageCenterItem(item: WorkspaceAgentMessageCenterItem): boolean; declare function selectMessageCenterAttentionDeckItems(items: readonly WorkspaceAgentMessageCenterItem[]): WorkspaceAgentMessageCenterItem[]; interface WorkspaceAgentMessageCenterModel { waitingCount: number; items: WorkspaceAgentMessageCenterItem[]; counts: WorkspaceAgentMessageCenterCounts; } interface WorkspaceAgentMessageCenterCounts { all: number; working: number; waiting: number; completed: number; failed: number; } interface WorkspaceAgentMessageCenterItem { id: string; agentSessionId: string; agentTargetId?: string | null; agentName?: string | null; agentAvatarUrl?: string | null; provider: string; userId: string | null; title: string; imported?: boolean; identity: WorkspaceAgentMessageCenterIdentity | null; cwd: string; status: WorkspaceAgentActivityStatus; digest: WorkspaceAgentMessageCenterDigest; lastAgentMessageSummary: string; lastAgentMessageAtUnixMs: number | null; pendingInteractionTarget: WorkspaceAgentMessageCenterInteractionTarget | null; pendingPrompt: AgentConversationPromptVM | null; needsAttentionKind: AgentActivityNeedsAttentionItem["kind"] | null; needsAttentionSummary: string | null; latestTurnOutcome?: WorkspaceAgentMessageCenterTurnOutcome | null; sortTimeUnixMs: number; } interface WorkspaceAgentMessageCenterInteractionTarget { agentSessionId: string; requestId: string; turnId: string; } interface WorkspaceAgentMessageCenterTurnOutcome { notificationKey: string; status: "completed" | "failed"; turnId: string | null; } interface BuildWorkspaceAgentMessageCenterOptions { agentPresentations?: readonly WorkspaceAgentMessageCenterAgentPresentation[]; avoidGroupingEdits?: boolean; identityBySessionId?: Record; /** * Canonical Agent Session ids to keep in the model even when * `session.visible === false`. * Ambient surfaces (the global Message Center) never list hidden sessions; * a surface whose subject IS a specific session (e.g. the Issue task card * over a hidden delegate run) opts that exact session in so its pending * prompts stay renderable and answerable. */ includeHiddenSessionIds?: readonly string[]; itemCutoffUnixMs?: number | null; promptFallbackLabels?: WorkspaceAgentMessageCenterPromptFallbackLabels; workspaceRoot?: string | null; } interface WorkspaceAgentMessageCenterAgentPresentation { agentTargetId: string; iconUrl?: string | null; name: string; } interface WorkspaceAgentMessageCenterIdentity { userName: string; userAvatarUrl?: string; agentName: string; agentAvatarUrl?: string; } interface WorkspaceAgentMessageCenterPromptFallbackLabels { constraintHeader: string; inputHeader: string; question: string; title: string; } declare function MessageCenterOpenChatButton({ actionsAccessory, alwaysVisible, item, label, onOpenChat, provider }: { actionsAccessory?: ReactNode; alwaysVisible?: boolean; item: WorkspaceAgentMessageCenterItem; label: string; onOpenChat: (input: { agentSessionId: string; provider: string; }) => void; provider: string; }): JSX.Element; declare function MessageCenterIdentityLabel({ agentAvatarUrl, agentName, identity, provider }: { agentAvatarUrl?: string | null; agentName?: string | null; identity: WorkspaceAgentMessageCenterIdentity | null; provider: string; }): JSX.Element; declare function MessageCenterIdentityAvatarMark({ agentAvatarUrl, identity, provider, userId }: { agentAvatarUrl?: string | null; identity: WorkspaceAgentMessageCenterIdentity | null; provider: string; userId?: string | null; }): JSX.Element; declare function MessageCenterIdentityAvatarStack({ agentAvatarUrl, userAvatarUrl: rawUserAvatarUrl, userName }: { agentAvatarUrl: string; userAvatarUrl?: string; userName: string; }): JSX.Element; type MessageCenterStatusTone = "amber" | "blue" | "green" | "neutral" | "red"; declare function messageCenterStatusTone(item: WorkspaceAgentMessageCenterItem): MessageCenterStatusTone; declare function messageCenterStatusToneClass(tone: MessageCenterStatusTone): string; declare function messageCenterStackPreviewText(item: WorkspaceAgentMessageCenterItem): string; /** * 收起态预览只展示纯文本 + 一个静态(不可点击)的 mention 图标,复用 * AgentMessageMarkdown 里那套富文本 chip 的视觉样式,但不渲染成 —— * 这块预览本身嵌套在外层切换展开/收起的