🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@nyosegawa/agent-ui-react

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nyosegawa/agent-ui-react - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
+222
dist/chat-DA48t1q0.d.ts
import * as react_jsx_runtime from 'react/jsx-runtime';
import React$1 from 'react';
import { ThreadState, ThreadTokenUsage, AgentThreadView, AgentThreadWaitingReason, AgentThread, PendingServerRequest } from '@nyosegawa/agent-ui-core';
import { G as AgentUserInput, x as AgentResourceKind, v as AgentResolvedResourceBase, a as AgentI18nKey, J as AgentTranscriptItem, z as AgentResourceResolution, K as AgentTranscriptBlock, f as AgentLocale, b as AgentI18nMessages, l as AgentTranscriptEntry } from './normalize-Ba14sx7f.js';
type AgentLocalAttachmentKind = Extract<AgentResourceKind, "image" | "file">;
interface AgentResolvedLocalAttachment extends AgentResolvedResourceBase {
input: AgentUserInput | AgentUserInput[];
}
type AgentLocalAttachmentResolver = (file: File, kind: AgentLocalAttachmentKind) => AgentResolvedLocalAttachment | null | undefined | Promise<AgentResolvedLocalAttachment | null | undefined>;
interface AgentComposerIntegrationAttachment {
id?: string;
input: AgentUserInput | AgentUserInput[];
label: string;
value?: string;
}
type AgentComposerIntegrationResolver = () => AgentComposerIntegrationAttachment | null | undefined | Promise<AgentComposerIntegrationAttachment | null | undefined>;
interface AgentComposerIntegration {
id: string;
label: string;
resolve: AgentComposerIntegrationResolver;
title?: string;
}
type AgentAttachmentChipKind = Extract<AgentResourceKind, "image" | "file" | "integration">;
interface AgentAttachmentChip {
extension?: string;
id: string;
kind: AgentAttachmentChipKind;
label: string;
previewFailed?: boolean;
previewUrl?: string;
sizeLabel?: string;
}
interface AgentAttachmentChipsProps {
attachments: readonly AgentAttachmentChip[];
onPreviewFailed?: (id: string) => void;
onRemove?: (id: string) => void;
}
declare function AgentAttachmentChips({ attachments, onPreviewFailed, onRemove, }: AgentAttachmentChipsProps): react_jsx_runtime.JSX.Element | null;
interface AgentComposerInputProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
shortcutHintId?: string;
}
declare const AgentComposerInput: React$1.ForwardRefExoticComponent<AgentComposerInputProps & React$1.RefAttributes<HTMLTextAreaElement>>;
interface AgentComposerToolbarProps {
className?: string;
end?: React$1.ReactNode;
start?: React$1.ReactNode;
}
declare function AgentComposerToolbar({ className, end, start, }: AgentComposerToolbarProps): react_jsx_runtime.JSX.Element;
declare function AgentComposer(props: AgentComposerProps): react_jsx_runtime.JSX.Element;
interface AgentComposerProps {
composerIntegrations?: readonly AgentComposerIntegration[];
disabled?: boolean;
disabledReason?: string;
placeholder?: string;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
tokenUsage?: ThreadTokenUsage;
threadId?: string;
}
interface AgentComposerPanelProps {
composerIntegrations?: readonly AgentComposerIntegration[];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
thread: ThreadState;
threadId?: string;
}
declare function AgentComposerPanel({ composerIntegrations, resolveLocalAttachment, thread, threadId, }: AgentComposerPanelProps): react_jsx_runtime.JSX.Element;
type AgentWorkingDirectoryResolver = () => Promise<string | null | undefined> | string | null | undefined;
/**
* Compact working-directory selector for the start screen. cwd is a
* thread-start setting, so it sits beneath the starter composer as a context
* pill rather than inside the composer toolbar.
*/
declare function AgentStarterCwd({ onRequestWorkingDirectory, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
}): react_jsx_runtime.JSX.Element;
declare function AgentFirstRun({ onRequestWorkingDirectory, onStartThread, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}): react_jsx_runtime.JSX.Element;
interface AgentStartComposerProps {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}
declare function AgentStartComposer({ onRequestWorkingDirectory, onStartThread, }: AgentStartComposerProps): react_jsx_runtime.JSX.Element;
declare function ThreadList({ activeThreadId, footer, onSelectThread, threads, }: {
activeThreadId?: string;
footer?: React.ReactNode;
onSelectThread?: (threadId: string) => void;
threads: AgentThreadView[];
}): react_jsx_runtime.JSX.Element;
declare function formatThreadStatus(status: string, options?: {
hasTurns?: boolean;
t?: (key: AgentI18nKey) => string;
waitingReasons?: readonly AgentThreadWaitingReason[];
}): string;
declare function threadSubtitle(thread: AgentThread, t?: (key: AgentI18nKey) => string): string;
declare function isUserFacingPath(path: string): boolean;
declare function AgentThreadSidebar({ activeThreadId, collapsed, onCreateThread, onCollapsedChange, onSelectThread, }: {
activeThreadId?: string;
collapsed?: boolean;
onCreateThread?: () => void;
onCollapsedChange?: (collapsed: boolean) => void;
onSelectThread?: (threadId: string) => void;
}): react_jsx_runtime.JSX.Element | null;
type AgentTheme = "light" | "dark" | "system";
interface AgentThemeToggleProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (theme: AgentTheme) => void;
value: AgentTheme;
}
declare function AgentThemeToggle({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentThemeToggleProps): react_jsx_runtime.JSX.Element;
interface AgentShellProps extends React$1.HTMLAttributes<HTMLElement> {
sidebar?: React$1.ReactNode;
theme?: AgentTheme;
}
declare function AgentShell({ children, className, sidebar, theme, ...props }: AgentShellProps): react_jsx_runtime.JSX.Element;
interface AgentThreadUrlRoutingOptions {
basePath?: string;
homePath?: string;
}
type AgentLocalMediaUrlResolver = (path: string, item: AgentTranscriptItem | undefined) => AgentResourceResolution;
declare function AgentContentBlockView({ block, item, output, patch, resolveLocalMediaUrl, }: {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
output?: string;
patch?: unknown;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCommandItem({ block, item, itemId, output, }: {
block?: AgentTranscriptBlock;
item?: AgentTranscriptItem;
itemId?: string;
output?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentFileChangeItem({ block, item, patch, }: {
block?: AgentTranscriptBlock;
item?: AgentTranscriptItem;
patch?: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentReasoningItem({ block }: {
block: AgentTranscriptBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentToolCallItem({ block }: {
block: AgentTranscriptBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentMessageItem({ text }: {
text: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentCommandOutputItem: typeof AgentCommandItem;
declare const AgentDiffItem: typeof AgentFileChangeItem;
interface AgentApprovalComponentProps {
approval: PendingServerRequest;
Default: React$1.ComponentType<AgentApprovalDefaultProps>;
}
interface AgentApprovalDefaultProps {
approval: PendingServerRequest;
}
interface AgentItemDefaultProps {
entry: AgentTranscriptEntry;
}
interface AgentShellComponentProps extends AgentShellProps {
Default: React$1.ComponentType<AgentShellProps>;
}
interface AgentSidebarComponentProps extends React$1.ComponentProps<typeof AgentThreadSidebar> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentThreadSidebar>>;
}
interface AgentEmptyStateComponentProps extends React$1.ComponentProps<typeof AgentFirstRun> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentFirstRun>>;
}
interface AgentComposerPanelComponentProps extends AgentComposerPanelProps {
Default: React$1.ComponentType<AgentComposerPanelProps>;
}
interface AgentBlockDefaultProps {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
}
interface AgentBlockComponentProps extends AgentBlockDefaultProps {
Default: React$1.ComponentType<AgentBlockDefaultProps>;
}
interface AgentComponents {
Approval?: React$1.ComponentType<AgentApprovalComponentProps>;
ComposerPanel?: React$1.ComponentType<AgentComposerPanelComponentProps>;
EmptyState?: React$1.ComponentType<AgentEmptyStateComponentProps>;
Shell?: React$1.ComponentType<AgentShellComponentProps>;
Sidebar?: React$1.ComponentType<AgentSidebarComponentProps>;
blocks?: Partial<Record<AgentTranscriptBlock["kind"], React$1.ComponentType<AgentBlockComponentProps>>>;
}
declare const defaultAgentComponents: {
ComposerPanel: typeof AgentComposerPanel;
EmptyState: typeof AgentFirstRun;
Shell: typeof AgentShell;
Sidebar: typeof AgentThreadSidebar;
};
interface AgentChatProps {
className?: string;
composerIntegrations?: readonly AgentComposerIntegration[];
components?: AgentComponents;
diagnostics?: boolean;
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
sidebar?: boolean;
statusBarEnd?: React$1.ReactNode;
theme?: AgentTheme;
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
threadUrlRouting?: boolean | AgentThreadUrlRoutingOptions;
usage?: boolean;
}
declare function AgentChat({ className, composerIntegrations, components, diagnostics, onRequestWorkingDirectory, resolveLocalAttachment, resolveLocalMediaUrl, sidebar, statusBarEnd, theme, locale, messages, threadUrlRouting, usage, }?: AgentChatProps): react_jsx_runtime.JSX.Element;
export { AgentChat as A, AgentFirstRun as B, type AgentLocalAttachmentKind as C, AgentMessageItem as D, AgentReasoningItem as E, type AgentResolvedLocalAttachment as F, AgentShell as G, type AgentShellProps as H, AgentStartComposer as I, type AgentStartComposerProps as J, AgentStarterCwd as K, type AgentTheme as L, AgentThemeToggle as M, type AgentThemeToggleProps as N, AgentThreadSidebar as O, AgentToolCallItem as P, type AgentWorkingDirectoryResolver as Q, formatThreadStatus as R, isUserFacingPath as S, ThreadList as T, threadSubtitle as U, type AgentChatProps as a, type AgentComponents as b, type AgentItemDefaultProps as c, defaultAgentComponents as d, type AgentLocalMediaUrlResolver as e, type AgentComposerIntegration as f, type AgentLocalAttachmentResolver as g, type AgentAttachmentChip as h, type AgentAttachmentChipKind as i, AgentAttachmentChips as j, type AgentAttachmentChipsProps as k, AgentCommandItem as l, AgentCommandOutputItem as m, AgentComposer as n, AgentComposerInput as o, type AgentComposerInputProps as p, type AgentComposerIntegrationAttachment as q, type AgentComposerIntegrationResolver as r, AgentComposerPanel as s, type AgentComposerPanelProps as t, type AgentComposerProps as u, AgentComposerToolbar as v, type AgentComposerToolbarProps as w, AgentContentBlockView as x, AgentDiffItem as y, AgentFileChangeItem as z };
import * as react_jsx_runtime from 'react/jsx-runtime';
import React$1 from 'react';
import { ThreadState, ThreadTokenUsage, AgentThreadView, AgentThreadWaitingReason, AgentThread, PendingServerRequest } from '@nyosegawa/agent-ui-core';
import { G as AgentUserInput, x as AgentResourceKind, v as AgentResolvedResourceBase, a as AgentI18nKey, J as AgentTranscriptItem, z as AgentResourceResolution, K as AgentTranscriptBlock, f as AgentLocale, b as AgentI18nMessages, l as AgentTranscriptEntry } from './normalize-Ba14sx7f.cjs';
type AgentLocalAttachmentKind = Extract<AgentResourceKind, "image" | "file">;
interface AgentResolvedLocalAttachment extends AgentResolvedResourceBase {
input: AgentUserInput | AgentUserInput[];
}
type AgentLocalAttachmentResolver = (file: File, kind: AgentLocalAttachmentKind) => AgentResolvedLocalAttachment | null | undefined | Promise<AgentResolvedLocalAttachment | null | undefined>;
interface AgentComposerIntegrationAttachment {
id?: string;
input: AgentUserInput | AgentUserInput[];
label: string;
value?: string;
}
type AgentComposerIntegrationResolver = () => AgentComposerIntegrationAttachment | null | undefined | Promise<AgentComposerIntegrationAttachment | null | undefined>;
interface AgentComposerIntegration {
id: string;
label: string;
resolve: AgentComposerIntegrationResolver;
title?: string;
}
type AgentAttachmentChipKind = Extract<AgentResourceKind, "image" | "file" | "integration">;
interface AgentAttachmentChip {
extension?: string;
id: string;
kind: AgentAttachmentChipKind;
label: string;
previewFailed?: boolean;
previewUrl?: string;
sizeLabel?: string;
}
interface AgentAttachmentChipsProps {
attachments: readonly AgentAttachmentChip[];
onPreviewFailed?: (id: string) => void;
onRemove?: (id: string) => void;
}
declare function AgentAttachmentChips({ attachments, onPreviewFailed, onRemove, }: AgentAttachmentChipsProps): react_jsx_runtime.JSX.Element | null;
interface AgentComposerInputProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
shortcutHintId?: string;
}
declare const AgentComposerInput: React$1.ForwardRefExoticComponent<AgentComposerInputProps & React$1.RefAttributes<HTMLTextAreaElement>>;
interface AgentComposerToolbarProps {
className?: string;
end?: React$1.ReactNode;
start?: React$1.ReactNode;
}
declare function AgentComposerToolbar({ className, end, start, }: AgentComposerToolbarProps): react_jsx_runtime.JSX.Element;
declare function AgentComposer(props: AgentComposerProps): react_jsx_runtime.JSX.Element;
interface AgentComposerProps {
composerIntegrations?: readonly AgentComposerIntegration[];
disabled?: boolean;
disabledReason?: string;
placeholder?: string;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
tokenUsage?: ThreadTokenUsage;
threadId?: string;
}
interface AgentComposerPanelProps {
composerIntegrations?: readonly AgentComposerIntegration[];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
thread: ThreadState;
threadId?: string;
}
declare function AgentComposerPanel({ composerIntegrations, resolveLocalAttachment, thread, threadId, }: AgentComposerPanelProps): react_jsx_runtime.JSX.Element;
type AgentWorkingDirectoryResolver = () => Promise<string | null | undefined> | string | null | undefined;
/**
* Compact working-directory selector for the start screen. cwd is a
* thread-start setting, so it sits beneath the starter composer as a context
* pill rather than inside the composer toolbar.
*/
declare function AgentStarterCwd({ onRequestWorkingDirectory, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
}): react_jsx_runtime.JSX.Element;
declare function AgentFirstRun({ onRequestWorkingDirectory, onStartThread, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}): react_jsx_runtime.JSX.Element;
interface AgentStartComposerProps {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}
declare function AgentStartComposer({ onRequestWorkingDirectory, onStartThread, }: AgentStartComposerProps): react_jsx_runtime.JSX.Element;
declare function ThreadList({ activeThreadId, footer, onSelectThread, threads, }: {
activeThreadId?: string;
footer?: React.ReactNode;
onSelectThread?: (threadId: string) => void;
threads: AgentThreadView[];
}): react_jsx_runtime.JSX.Element;
declare function formatThreadStatus(status: string, options?: {
hasTurns?: boolean;
t?: (key: AgentI18nKey) => string;
waitingReasons?: readonly AgentThreadWaitingReason[];
}): string;
declare function threadSubtitle(thread: AgentThread, t?: (key: AgentI18nKey) => string): string;
declare function isUserFacingPath(path: string): boolean;
declare function AgentThreadSidebar({ activeThreadId, collapsed, onCreateThread, onCollapsedChange, onSelectThread, }: {
activeThreadId?: string;
collapsed?: boolean;
onCreateThread?: () => void;
onCollapsedChange?: (collapsed: boolean) => void;
onSelectThread?: (threadId: string) => void;
}): react_jsx_runtime.JSX.Element | null;
type AgentTheme = "light" | "dark" | "system";
interface AgentThemeToggleProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (theme: AgentTheme) => void;
value: AgentTheme;
}
declare function AgentThemeToggle({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentThemeToggleProps): react_jsx_runtime.JSX.Element;
interface AgentShellProps extends React$1.HTMLAttributes<HTMLElement> {
sidebar?: React$1.ReactNode;
theme?: AgentTheme;
}
declare function AgentShell({ children, className, sidebar, theme, ...props }: AgentShellProps): react_jsx_runtime.JSX.Element;
interface AgentThreadUrlRoutingOptions {
basePath?: string;
homePath?: string;
}
type AgentLocalMediaUrlResolver = (path: string, item: AgentTranscriptItem | undefined) => AgentResourceResolution;
declare function AgentContentBlockView({ block, item, output, patch, resolveLocalMediaUrl, }: {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
output?: string;
patch?: unknown;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCommandItem({ block, item, itemId, output, }: {
block?: AgentTranscriptBlock;
item?: AgentTranscriptItem;
itemId?: string;
output?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentFileChangeItem({ block, item, patch, }: {
block?: AgentTranscriptBlock;
item?: AgentTranscriptItem;
patch?: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentReasoningItem({ block }: {
block: AgentTranscriptBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentToolCallItem({ block }: {
block: AgentTranscriptBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentMessageItem({ text }: {
text: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentCommandOutputItem: typeof AgentCommandItem;
declare const AgentDiffItem: typeof AgentFileChangeItem;
interface AgentApprovalComponentProps {
approval: PendingServerRequest;
Default: React$1.ComponentType<AgentApprovalDefaultProps>;
}
interface AgentApprovalDefaultProps {
approval: PendingServerRequest;
}
interface AgentItemDefaultProps {
entry: AgentTranscriptEntry;
}
interface AgentShellComponentProps extends AgentShellProps {
Default: React$1.ComponentType<AgentShellProps>;
}
interface AgentSidebarComponentProps extends React$1.ComponentProps<typeof AgentThreadSidebar> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentThreadSidebar>>;
}
interface AgentEmptyStateComponentProps extends React$1.ComponentProps<typeof AgentFirstRun> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentFirstRun>>;
}
interface AgentComposerPanelComponentProps extends AgentComposerPanelProps {
Default: React$1.ComponentType<AgentComposerPanelProps>;
}
interface AgentBlockDefaultProps {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
}
interface AgentBlockComponentProps extends AgentBlockDefaultProps {
Default: React$1.ComponentType<AgentBlockDefaultProps>;
}
interface AgentComponents {
Approval?: React$1.ComponentType<AgentApprovalComponentProps>;
ComposerPanel?: React$1.ComponentType<AgentComposerPanelComponentProps>;
EmptyState?: React$1.ComponentType<AgentEmptyStateComponentProps>;
Shell?: React$1.ComponentType<AgentShellComponentProps>;
Sidebar?: React$1.ComponentType<AgentSidebarComponentProps>;
blocks?: Partial<Record<AgentTranscriptBlock["kind"], React$1.ComponentType<AgentBlockComponentProps>>>;
}
declare const defaultAgentComponents: {
ComposerPanel: typeof AgentComposerPanel;
EmptyState: typeof AgentFirstRun;
Shell: typeof AgentShell;
Sidebar: typeof AgentThreadSidebar;
};
interface AgentChatProps {
className?: string;
composerIntegrations?: readonly AgentComposerIntegration[];
components?: AgentComponents;
diagnostics?: boolean;
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
sidebar?: boolean;
statusBarEnd?: React$1.ReactNode;
theme?: AgentTheme;
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
threadUrlRouting?: boolean | AgentThreadUrlRoutingOptions;
usage?: boolean;
}
declare function AgentChat({ className, composerIntegrations, components, diagnostics, onRequestWorkingDirectory, resolveLocalAttachment, resolveLocalMediaUrl, sidebar, statusBarEnd, theme, locale, messages, threadUrlRouting, usage, }?: AgentChatProps): react_jsx_runtime.JSX.Element;
export { AgentChat as A, AgentFirstRun as B, type AgentLocalAttachmentKind as C, AgentMessageItem as D, AgentReasoningItem as E, type AgentResolvedLocalAttachment as F, AgentShell as G, type AgentShellProps as H, AgentStartComposer as I, type AgentStartComposerProps as J, AgentStarterCwd as K, type AgentTheme as L, AgentThemeToggle as M, type AgentThemeToggleProps as N, AgentThreadSidebar as O, AgentToolCallItem as P, type AgentWorkingDirectoryResolver as Q, formatThreadStatus as R, isUserFacingPath as S, ThreadList as T, threadSubtitle as U, type AgentChatProps as a, type AgentComponents as b, type AgentItemDefaultProps as c, defaultAgentComponents as d, type AgentLocalMediaUrlResolver as e, type AgentComposerIntegration as f, type AgentLocalAttachmentResolver as g, type AgentAttachmentChip as h, type AgentAttachmentChipKind as i, AgentAttachmentChips as j, type AgentAttachmentChipsProps as k, AgentCommandItem as l, AgentCommandOutputItem as m, AgentComposer as n, AgentComposerInput as o, type AgentComposerInputProps as p, type AgentComposerIntegrationAttachment as q, type AgentComposerIntegrationResolver as r, AgentComposerPanel as s, type AgentComposerPanelProps as t, type AgentComposerProps as u, AgentComposerToolbar as v, type AgentComposerToolbarProps as w, AgentContentBlockView as x, AgentDiffItem as y, AgentFileChangeItem as z };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import { b as AgentAppsRefreshOptions, c as AgentHooksRefreshOptions, d as AgentSkillsRefreshOptions, e as AgentSkillConfigWriteOptions, T as ThreadStartOptions, f as TurnStartOptions, g as AgentRunPolicy, h as ThreadResumeOptions, i as ThreadForkOptions, j as ThreadHistoryParams } from './provider-Clp4jqav.cjs';
export { k as AGENT_FULL_ACCESS_RUN_POLICY, l as AgentApprovalPolicy, m as AgentApprovalsReviewer, n as AgentContextValue, o as AgentJsonValue, p as AgentPersonality, A as AgentProvider, a as AgentProviderProps, q as AgentReasoningSummary, r as AgentSandboxMode, s as AgentSandboxPolicy, t as AgentSortDirection, u as AgentThreadConfigOptions, v as AgentThreadSortKey, w as AgentThreadSource, x as AgentThreadSourceKind, y as AgentThreadStartSource, D as DEFAULT_AGENT_RUN_POLICIES, z as agentRunPolicyTurnOptions, B as effectiveAgentRunPolicies, C as resolvedAgentRunPolicyId, E as useAgentAction, F as useAgentContext } from './provider-Clp4jqav.cjs';
import { G as AgentUserInput } from './normalize-Ba14sx7f.cjs';
export { o as AgentFileResourceRequest, A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, p as AgentImageInput, q as AgentLocalImageInput, r as AgentLocalMediaResourceRequest, f as AgentLocale, s as AgentMentionInput, t as AgentResolvedResource, v as AgentResolvedResourceBase, w as AgentResolvedUrlResource, x as AgentResourceKind, y as AgentResourceRequest, z as AgentResourceResolution, B as AgentResourceResolver, C as AgentSkillInput, D as AgentTextInput, K as AgentTranscriptBlock, L as AgentTranscriptController, M as AgentTranscriptControllerOptions, k as AgentTranscriptDensity, N as AgentTranscriptDensityConfig, O as AgentTranscriptDensityMode, l as AgentTranscriptEntry, J as AgentTranscriptItem, P as AgentTranscriptPendingState, E as AgentUnavailableResource, F as AgentUnknownUserInput, g as agentI18nDictionaries, h as agentLocales, H as agentResourceDisplayName, I as agentResourceUrl, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n, Q as useAgentTranscriptController } from './normalize-Ba14sx7f.cjs';
export { A as AgentBootstrapState, U as UsageWindow, n as normalizeUsageWindows, a as useAgentAccount, u as useAgentBootstrap } from './usage-CpkWgzYb.cjs';
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { AgentApp, ThreadId, ThreadState, ThreadStatus, AgentModel, RequestId, AgentError, ReasoningEffort, AgentRunPolicyId, AgentThreadScope, AgentThreadCollection, AgentThreadView, TurnState } from '@nyosegawa/agent-ui-core';
export { AgentRunPolicyId, AgentThreadResumeDiagnosticReasonCode } from '@nyosegawa/agent-ui-core';
import React, { Dispatch, SetStateAction } from 'react';
import 'react/jsx-runtime';
declare function useAgentApps(threadId?: string): {
apps: AgentApp[];
loadMoreApps: () => Promise<{
apps: AgentApp[];
nextCursor: string | null;
} | undefined>;
nextCursor: string | null | undefined;
refreshApps: (params?: AgentAppsRefreshOptions) => Promise<{
apps: AgentApp[];
nextCursor: string | null;
}>;
};
declare function useAgentSkills(cwd?: string): {
refreshSkills: (params?: AgentSkillsRefreshOptions) => Promise<{
cwd: string;
skills: {
enabled: boolean | undefined;
name: string;
path: string | undefined;
}[];
}[]>;
setSkillEnabled: (params: AgentSkillConfigWriteOptions) => Promise<void>;
skills: _nyosegawa_agent_ui_core.AgentSkill[];
};
declare function useAgentHooks(cwd?: string): {
hooks: _nyosegawa_agent_ui_core.AgentHook[];
refreshHooks: (params?: AgentHooksRefreshOptions) => Promise<{
cwd: string;
hooks: {
cwd: string;
enabled: boolean | undefined;
id: string;
name: string | undefined;
}[];
}[]>;
};
declare function useAgentDiagnostics(): {
auditDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
banners: _nyosegawa_agent_ui_core.StatusBannerState[];
developerDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
diagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
errors: _nyosegawa_agent_ui_core.AgentError[];
protocolNotifications: _nyosegawa_agent_ui_core.ProtocolNotificationState[];
userDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
warnings: _nyosegawa_agent_ui_core.WarningState[];
};
interface AgentThreadStartResult {
threadId: ThreadId;
}
interface AgentThreadStartWithInputResult {
operationId: string;
optimisticTurnId: string;
threadId: ThreadId;
turnId: string;
userMessageId: string;
}
interface AgentThreadStartWithInputOptions {
threadOptions?: ThreadStartOptions;
turnOptions?: TurnStartOptions;
}
interface AgentThreadResumeResult {
activeTurnId?: string;
activity?: ThreadState["activity"];
requestedThreadId?: ThreadId;
runSettings?: AgentThreadResumeRunSettings;
status?: ThreadStatus;
threadId: ThreadId;
}
interface AgentThreadResumeRunSettings {
cwd?: string;
effort?: string;
modelId?: string;
}
interface AgentThreadReadResult {
threadId: ThreadId;
}
interface AgentThreadForkResult {
threadId: ThreadId;
}
interface AgentThreadHistoryResult {
nextCursor: string | null;
threadIds: ThreadId[];
}
interface AgentDirectThreadOpenResult {
readThreadId: ThreadId;
resume: AgentThreadResumeResult;
threadId: ThreadId;
}
interface AgentDirectThreadController {
openThread: (threadId: ThreadId) => Promise<AgentDirectThreadOpenResult>;
previewThread: (threadId: ThreadId) => Promise<ThreadId>;
}
declare function useAgentDirectThreadController(): AgentDirectThreadController;
declare function useAgentModels(): {
models: AgentModel[];
refreshModels: () => Promise<AgentModel[]>;
};
declare function useAgentApprovals(threadId?: ThreadId): {
approvals: _nyosegawa_agent_ui_core.PendingServerRequest[];
approve: (requestId: RequestId, result?: unknown) => Promise<void>;
reject: (requestId: RequestId, message?: string) => Promise<void>;
};
declare function useAgentServerRequests(threadId?: ThreadId): {
requests: _nyosegawa_agent_ui_core.PendingServerRequest[];
respond: (requestId: RequestId, result: unknown) => Promise<void>;
reject: (requestId: RequestId, error: AgentError | string) => Promise<void>;
};
interface QueuedFollowUp {
attachments: QueuedFollowUpAttachment[];
expectedTurnId?: string;
id: string;
input: AgentUserInput[];
text: string;
threadId: ThreadId;
}
interface QueuedFollowUpAttachment {
displayName?: string;
extension?: string;
id: string;
input: AgentUserInput | AgentUserInput[];
kind: "image" | "file" | "integration";
label: string;
previewUrl?: string;
previewUrlRevoke?: boolean;
redactedPath?: string;
sizeLabel?: string;
value?: string;
}
interface AgentComposerController {
activeTurnId?: string;
canSubmit: boolean;
cancelFailedPendingMessage: (operationId: string) => void;
disabledReason?: AgentComposerDisabledReason;
editQueuedFollowUp: (id: string) => QueuedFollowUp | undefined;
error?: string;
failedPendingMessages: AgentComposerFailedPendingMessage[];
followUpErrors: Record<string, string>;
isInterrupting: boolean;
isRunning: boolean;
isSubmitting: boolean;
queuedFollowUps: QueuedFollowUp[];
removeQueuedFollowUp: (id: string) => void;
retryFailedPendingMessage: (operationId: string) => Promise<void>;
sendQueuedFollowUp: (id: string) => Promise<void>;
sendingFollowUpIds: string[];
setError: Dispatch<SetStateAction<string | undefined>>;
setValue: Dispatch<SetStateAction<string>>;
startThreadWithInput: (input: string | AgentUserInput[], options?: AgentThreadStartWithInputOptions) => Promise<AgentThreadStartWithInputResult>;
steerNow: (items?: AgentUserInput[]) => Promise<void>;
stop: () => Promise<void>;
submit: (items?: AgentUserInput[], options?: {
attachments?: QueuedFollowUpAttachment[];
}) => Promise<string | undefined>;
submitMode: AgentComposerSubmitMode;
value: string;
}
type AgentComposerDisabledReason = "approval" | "empty" | "interrupting" | "submitting";
interface AgentComposerFailedPendingMessage {
error?: string;
operationId: string;
threadId: string;
}
type AgentComposerSubmitMode = "queue" | "send" | "stop";
declare function useAgentComposer(threadId?: ThreadId): AgentComposerController;
declare function useAgentComposerController(threadId?: ThreadId): AgentComposerController;
declare function useAgentRunSettings(): {
models: AgentModel[];
policies: readonly AgentRunPolicy[];
runSettings: _nyosegawa_agent_ui_core.RunSettingsState;
selectedModel: AgentModel | undefined;
selectedPolicy: AgentRunPolicy | undefined;
setEffort: (effort: ReasoningEffort) => void;
setModelId: (modelId: string) => void;
setPolicyId: (policyId: AgentRunPolicyId) => void;
supportedEfforts: string[];
};
declare function useAgentThread(threadId?: ThreadId): {
resumeThread: (id: ThreadId, params?: ThreadResumeOptions) => Promise<{
threadId: string;
runSettings?: AgentThreadResumeRunSettings | undefined;
requestedThreadId?: string | undefined;
activity?: "idle" | "failed" | "running" | "waitingForInput" | undefined;
status?: ThreadStatus | undefined;
activeTurnId?: string | undefined;
}>;
startThread: (params?: ThreadStartOptions) => Promise<{
threadId: string;
}>;
thread: ThreadState | undefined;
threadId: string | undefined;
turns: (_nyosegawa_agent_ui_core.TurnState | undefined)[];
};
declare const useAgentThreadController: typeof useAgentThread;
declare function useAgentThreadActions(threadId?: ThreadId): {
archiveThread: () => Promise<void>;
compactThread: () => Promise<void>;
forkThread: (params?: ThreadForkOptions) => Promise<{
threadId: string;
}>;
renameThread: (name: string) => Promise<void>;
rollbackThread: (numTurns?: number) => Promise<void>;
threadId: string | undefined;
unarchiveThread: () => Promise<void>;
};
declare function useAgentThreads(): {
activeThreadId: string | undefined;
setActiveThread: (threadId?: ThreadId) => void;
threads: ThreadState[];
};
declare function useAgentThreadHistory(): {
cursor: string | null | undefined;
error: Error | undefined;
isLoading: boolean;
listThreads: (params?: ThreadHistoryParams) => Promise<{
nextCursor: string | null;
threadIds: string[];
}>;
threads: ThreadState[];
};
declare function useAgentThreadReader(): {
readThread: (threadId: ThreadId, options?: {
activate?: boolean;
includeTurns?: boolean;
}) => Promise<{
threadId: string;
}>;
};
interface AgentThreadListController {
activateThread: (threadId: ThreadId) => Promise<ThreadId>;
collection?: AgentThreadCollection;
error?: AgentError;
hasLoaded: boolean;
invalidate: () => void;
isLoading: boolean;
listThreads: (params?: AgentThreadListRequest) => Promise<AgentThreadListResult>;
loadNextPage: () => Promise<AgentThreadListResult | undefined>;
nextCursor: string | null;
previewThread: (threadId: ThreadId) => Promise<void>;
refresh: () => Promise<AgentThreadListResult>;
resumeThread: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<ThreadId>;
resumeThreadWithResult: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<AgentThreadResumeResult>;
scope: AgentThreadScope;
searchTerm: string;
setSearchTerm: (searchTerm: string) => void;
threads: AgentThreadView[];
}
interface AgentThreadListRequest extends ThreadHistoryParams {
append?: boolean;
}
interface AgentThreadListResult extends AgentThreadHistorySyncedEvent {
stale: boolean;
}
interface AgentThreadListControllerOptions {
onHistorySynced?: (event: AgentThreadHistorySyncedEvent) => void;
}
interface AgentThreadHistorySyncedEvent {
append: boolean;
nextCursor: string | null;
scope: AgentThreadScope;
searchTerm?: string;
syncedAt: number;
threadIds: ThreadId[];
}
declare function useAgentThreadListController(scope?: AgentThreadScope, options?: AgentThreadListControllerOptions): AgentThreadListController;
declare function useAgentTurn(threadId?: ThreadId): {
interruptTurn: (turnId: string) => Promise<void>;
startTurn: (input: string | AgentUserInput[], params?: TurnStartOptions) => Promise<void>;
steerTurn: (expectedTurnId: string, input: string | AgentUserInput[]) => Promise<void>;
};
declare const useAgentTurnController: typeof useAgentTurn;
interface AgentTranscriptScrollControllerOptions {
hiddenItemCount?: number;
onShowEarlierItems?: () => void;
pendingApprovalSelector?: string;
scrollContainerRef?: React.RefObject<HTMLElement | null>;
scrollKey?: string | number;
threadId: string;
turnCount: number;
}
interface AgentTranscriptScrollController {
canShowEarlierItems: boolean;
handleScroll(): void;
jumpToLatest(): void;
jumpToPendingApproval(): void;
scrollContainerRef: React.RefObject<HTMLElement | null>;
showEarlierItems(): void;
showJumpLatest: boolean;
showJumpApproval: boolean;
}
declare function useAgentTranscriptScrollController({ hiddenItemCount, onShowEarlierItems, pendingApprovalSelector, scrollContainerRef, scrollKey, threadId, turnCount, }: AgentTranscriptScrollControllerOptions): AgentTranscriptScrollController;
declare function useAgentUsage(): {
rateLimits: unknown;
refreshUsage: () => Promise<void>;
};
declare const DEFAULT_TRANSCRIPT_ITEM_LIMIT = 48;
declare const TRANSCRIPT_ITEM_INCREMENT = 48;
declare function transcriptItemIds(turn: TurnState): string[];
declare function visibleTranscriptWindow(thread: ThreadState, visibleItemLimit: number, options?: {
pinnedItemIdsByTurnId?: Map<string, string[]>;
}): {
itemIdsByTurnId: Map<string, string[]>;
totalItemCount: number;
visibleItemCount: number;
};
export { AgentAppsRefreshOptions, type AgentComposerController, type AgentComposerDisabledReason, type AgentComposerFailedPendingMessage, type AgentComposerSubmitMode, type AgentDirectThreadController, type AgentDirectThreadOpenResult, AgentHooksRefreshOptions, AgentRunPolicy, AgentSkillConfigWriteOptions, AgentSkillsRefreshOptions, type AgentThreadForkResult, type AgentThreadHistoryResult, type AgentThreadHistorySyncedEvent, type AgentThreadListController, type AgentThreadListControllerOptions, type AgentThreadListRequest, type AgentThreadReadResult, type AgentThreadResumeResult, type AgentThreadResumeRunSettings, type AgentThreadStartResult, type AgentThreadStartWithInputOptions, type AgentThreadStartWithInputResult, type AgentTranscriptScrollController, type AgentTranscriptScrollControllerOptions, AgentUserInput, DEFAULT_TRANSCRIPT_ITEM_LIMIT, type QueuedFollowUp, type QueuedFollowUpAttachment, TRANSCRIPT_ITEM_INCREMENT, ThreadForkOptions, ThreadHistoryParams, ThreadResumeOptions, ThreadStartOptions, TurnStartOptions, transcriptItemIds, useAgentApprovals, useAgentApps, useAgentComposer, useAgentComposerController, useAgentDiagnostics, useAgentDirectThreadController, useAgentHooks, useAgentModels, useAgentRunSettings, useAgentServerRequests, useAgentSkills, useAgentThread, useAgentThreadActions, useAgentThreadController, useAgentThreadHistory, useAgentThreadListController, useAgentThreadReader, useAgentThreads, useAgentTranscriptScrollController, useAgentTurn, useAgentTurnController, useAgentUsage, visibleTranscriptWindow };
import { b as AgentAppsRefreshOptions, c as AgentHooksRefreshOptions, d as AgentSkillsRefreshOptions, e as AgentSkillConfigWriteOptions, T as ThreadStartOptions, f as TurnStartOptions, g as AgentRunPolicy, h as ThreadResumeOptions, i as ThreadForkOptions, j as ThreadHistoryParams } from './provider-Clp4jqav.js';
export { k as AGENT_FULL_ACCESS_RUN_POLICY, l as AgentApprovalPolicy, m as AgentApprovalsReviewer, n as AgentContextValue, o as AgentJsonValue, p as AgentPersonality, A as AgentProvider, a as AgentProviderProps, q as AgentReasoningSummary, r as AgentSandboxMode, s as AgentSandboxPolicy, t as AgentSortDirection, u as AgentThreadConfigOptions, v as AgentThreadSortKey, w as AgentThreadSource, x as AgentThreadSourceKind, y as AgentThreadStartSource, D as DEFAULT_AGENT_RUN_POLICIES, z as agentRunPolicyTurnOptions, B as effectiveAgentRunPolicies, C as resolvedAgentRunPolicyId, E as useAgentAction, F as useAgentContext } from './provider-Clp4jqav.js';
import { G as AgentUserInput } from './normalize-Ba14sx7f.js';
export { o as AgentFileResourceRequest, A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, p as AgentImageInput, q as AgentLocalImageInput, r as AgentLocalMediaResourceRequest, f as AgentLocale, s as AgentMentionInput, t as AgentResolvedResource, v as AgentResolvedResourceBase, w as AgentResolvedUrlResource, x as AgentResourceKind, y as AgentResourceRequest, z as AgentResourceResolution, B as AgentResourceResolver, C as AgentSkillInput, D as AgentTextInput, K as AgentTranscriptBlock, L as AgentTranscriptController, M as AgentTranscriptControllerOptions, k as AgentTranscriptDensity, N as AgentTranscriptDensityConfig, O as AgentTranscriptDensityMode, l as AgentTranscriptEntry, J as AgentTranscriptItem, P as AgentTranscriptPendingState, E as AgentUnavailableResource, F as AgentUnknownUserInput, g as agentI18nDictionaries, h as agentLocales, H as agentResourceDisplayName, I as agentResourceUrl, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n, Q as useAgentTranscriptController } from './normalize-Ba14sx7f.js';
export { A as AgentBootstrapState, U as UsageWindow, n as normalizeUsageWindows, a as useAgentAccount, u as useAgentBootstrap } from './usage-KIdA5WC7.js';
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { AgentApp, ThreadId, ThreadState, ThreadStatus, AgentModel, RequestId, AgentError, ReasoningEffort, AgentRunPolicyId, AgentThreadScope, AgentThreadCollection, AgentThreadView, TurnState } from '@nyosegawa/agent-ui-core';
export { AgentRunPolicyId, AgentThreadResumeDiagnosticReasonCode } from '@nyosegawa/agent-ui-core';
import React, { Dispatch, SetStateAction } from 'react';
import 'react/jsx-runtime';
declare function useAgentApps(threadId?: string): {
apps: AgentApp[];
loadMoreApps: () => Promise<{
apps: AgentApp[];
nextCursor: string | null;
} | undefined>;
nextCursor: string | null | undefined;
refreshApps: (params?: AgentAppsRefreshOptions) => Promise<{
apps: AgentApp[];
nextCursor: string | null;
}>;
};
declare function useAgentSkills(cwd?: string): {
refreshSkills: (params?: AgentSkillsRefreshOptions) => Promise<{
cwd: string;
skills: {
enabled: boolean | undefined;
name: string;
path: string | undefined;
}[];
}[]>;
setSkillEnabled: (params: AgentSkillConfigWriteOptions) => Promise<void>;
skills: _nyosegawa_agent_ui_core.AgentSkill[];
};
declare function useAgentHooks(cwd?: string): {
hooks: _nyosegawa_agent_ui_core.AgentHook[];
refreshHooks: (params?: AgentHooksRefreshOptions) => Promise<{
cwd: string;
hooks: {
cwd: string;
enabled: boolean | undefined;
id: string;
name: string | undefined;
}[];
}[]>;
};
declare function useAgentDiagnostics(): {
auditDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
banners: _nyosegawa_agent_ui_core.StatusBannerState[];
developerDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
diagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
errors: _nyosegawa_agent_ui_core.AgentError[];
protocolNotifications: _nyosegawa_agent_ui_core.ProtocolNotificationState[];
userDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
warnings: _nyosegawa_agent_ui_core.WarningState[];
};
interface AgentThreadStartResult {
threadId: ThreadId;
}
interface AgentThreadStartWithInputResult {
operationId: string;
optimisticTurnId: string;
threadId: ThreadId;
turnId: string;
userMessageId: string;
}
interface AgentThreadStartWithInputOptions {
threadOptions?: ThreadStartOptions;
turnOptions?: TurnStartOptions;
}
interface AgentThreadResumeResult {
activeTurnId?: string;
activity?: ThreadState["activity"];
requestedThreadId?: ThreadId;
runSettings?: AgentThreadResumeRunSettings;
status?: ThreadStatus;
threadId: ThreadId;
}
interface AgentThreadResumeRunSettings {
cwd?: string;
effort?: string;
modelId?: string;
}
interface AgentThreadReadResult {
threadId: ThreadId;
}
interface AgentThreadForkResult {
threadId: ThreadId;
}
interface AgentThreadHistoryResult {
nextCursor: string | null;
threadIds: ThreadId[];
}
interface AgentDirectThreadOpenResult {
readThreadId: ThreadId;
resume: AgentThreadResumeResult;
threadId: ThreadId;
}
interface AgentDirectThreadController {
openThread: (threadId: ThreadId) => Promise<AgentDirectThreadOpenResult>;
previewThread: (threadId: ThreadId) => Promise<ThreadId>;
}
declare function useAgentDirectThreadController(): AgentDirectThreadController;
declare function useAgentModels(): {
models: AgentModel[];
refreshModels: () => Promise<AgentModel[]>;
};
declare function useAgentApprovals(threadId?: ThreadId): {
approvals: _nyosegawa_agent_ui_core.PendingServerRequest[];
approve: (requestId: RequestId, result?: unknown) => Promise<void>;
reject: (requestId: RequestId, message?: string) => Promise<void>;
};
declare function useAgentServerRequests(threadId?: ThreadId): {
requests: _nyosegawa_agent_ui_core.PendingServerRequest[];
respond: (requestId: RequestId, result: unknown) => Promise<void>;
reject: (requestId: RequestId, error: AgentError | string) => Promise<void>;
};
interface QueuedFollowUp {
attachments: QueuedFollowUpAttachment[];
expectedTurnId?: string;
id: string;
input: AgentUserInput[];
text: string;
threadId: ThreadId;
}
interface QueuedFollowUpAttachment {
displayName?: string;
extension?: string;
id: string;
input: AgentUserInput | AgentUserInput[];
kind: "image" | "file" | "integration";
label: string;
previewUrl?: string;
previewUrlRevoke?: boolean;
redactedPath?: string;
sizeLabel?: string;
value?: string;
}
interface AgentComposerController {
activeTurnId?: string;
canSubmit: boolean;
cancelFailedPendingMessage: (operationId: string) => void;
disabledReason?: AgentComposerDisabledReason;
editQueuedFollowUp: (id: string) => QueuedFollowUp | undefined;
error?: string;
failedPendingMessages: AgentComposerFailedPendingMessage[];
followUpErrors: Record<string, string>;
isInterrupting: boolean;
isRunning: boolean;
isSubmitting: boolean;
queuedFollowUps: QueuedFollowUp[];
removeQueuedFollowUp: (id: string) => void;
retryFailedPendingMessage: (operationId: string) => Promise<void>;
sendQueuedFollowUp: (id: string) => Promise<void>;
sendingFollowUpIds: string[];
setError: Dispatch<SetStateAction<string | undefined>>;
setValue: Dispatch<SetStateAction<string>>;
startThreadWithInput: (input: string | AgentUserInput[], options?: AgentThreadStartWithInputOptions) => Promise<AgentThreadStartWithInputResult>;
steerNow: (items?: AgentUserInput[]) => Promise<void>;
stop: () => Promise<void>;
submit: (items?: AgentUserInput[], options?: {
attachments?: QueuedFollowUpAttachment[];
}) => Promise<string | undefined>;
submitMode: AgentComposerSubmitMode;
value: string;
}
type AgentComposerDisabledReason = "approval" | "empty" | "interrupting" | "submitting";
interface AgentComposerFailedPendingMessage {
error?: string;
operationId: string;
threadId: string;
}
type AgentComposerSubmitMode = "queue" | "send" | "stop";
declare function useAgentComposer(threadId?: ThreadId): AgentComposerController;
declare function useAgentComposerController(threadId?: ThreadId): AgentComposerController;
declare function useAgentRunSettings(): {
models: AgentModel[];
policies: readonly AgentRunPolicy[];
runSettings: _nyosegawa_agent_ui_core.RunSettingsState;
selectedModel: AgentModel | undefined;
selectedPolicy: AgentRunPolicy | undefined;
setEffort: (effort: ReasoningEffort) => void;
setModelId: (modelId: string) => void;
setPolicyId: (policyId: AgentRunPolicyId) => void;
supportedEfforts: string[];
};
declare function useAgentThread(threadId?: ThreadId): {
resumeThread: (id: ThreadId, params?: ThreadResumeOptions) => Promise<{
threadId: string;
runSettings?: AgentThreadResumeRunSettings | undefined;
requestedThreadId?: string | undefined;
activity?: "idle" | "failed" | "running" | "waitingForInput" | undefined;
status?: ThreadStatus | undefined;
activeTurnId?: string | undefined;
}>;
startThread: (params?: ThreadStartOptions) => Promise<{
threadId: string;
}>;
thread: ThreadState | undefined;
threadId: string | undefined;
turns: (_nyosegawa_agent_ui_core.TurnState | undefined)[];
};
declare const useAgentThreadController: typeof useAgentThread;
declare function useAgentThreadActions(threadId?: ThreadId): {
archiveThread: () => Promise<void>;
compactThread: () => Promise<void>;
forkThread: (params?: ThreadForkOptions) => Promise<{
threadId: string;
}>;
renameThread: (name: string) => Promise<void>;
rollbackThread: (numTurns?: number) => Promise<void>;
threadId: string | undefined;
unarchiveThread: () => Promise<void>;
};
declare function useAgentThreads(): {
activeThreadId: string | undefined;
setActiveThread: (threadId?: ThreadId) => void;
threads: ThreadState[];
};
declare function useAgentThreadHistory(): {
cursor: string | null | undefined;
error: Error | undefined;
isLoading: boolean;
listThreads: (params?: ThreadHistoryParams) => Promise<{
nextCursor: string | null;
threadIds: string[];
}>;
threads: ThreadState[];
};
declare function useAgentThreadReader(): {
readThread: (threadId: ThreadId, options?: {
activate?: boolean;
includeTurns?: boolean;
}) => Promise<{
threadId: string;
}>;
};
interface AgentThreadListController {
activateThread: (threadId: ThreadId) => Promise<ThreadId>;
collection?: AgentThreadCollection;
error?: AgentError;
hasLoaded: boolean;
invalidate: () => void;
isLoading: boolean;
listThreads: (params?: AgentThreadListRequest) => Promise<AgentThreadListResult>;
loadNextPage: () => Promise<AgentThreadListResult | undefined>;
nextCursor: string | null;
previewThread: (threadId: ThreadId) => Promise<void>;
refresh: () => Promise<AgentThreadListResult>;
resumeThread: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<ThreadId>;
resumeThreadWithResult: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<AgentThreadResumeResult>;
scope: AgentThreadScope;
searchTerm: string;
setSearchTerm: (searchTerm: string) => void;
threads: AgentThreadView[];
}
interface AgentThreadListRequest extends ThreadHistoryParams {
append?: boolean;
}
interface AgentThreadListResult extends AgentThreadHistorySyncedEvent {
stale: boolean;
}
interface AgentThreadListControllerOptions {
onHistorySynced?: (event: AgentThreadHistorySyncedEvent) => void;
}
interface AgentThreadHistorySyncedEvent {
append: boolean;
nextCursor: string | null;
scope: AgentThreadScope;
searchTerm?: string;
syncedAt: number;
threadIds: ThreadId[];
}
declare function useAgentThreadListController(scope?: AgentThreadScope, options?: AgentThreadListControllerOptions): AgentThreadListController;
declare function useAgentTurn(threadId?: ThreadId): {
interruptTurn: (turnId: string) => Promise<void>;
startTurn: (input: string | AgentUserInput[], params?: TurnStartOptions) => Promise<void>;
steerTurn: (expectedTurnId: string, input: string | AgentUserInput[]) => Promise<void>;
};
declare const useAgentTurnController: typeof useAgentTurn;
interface AgentTranscriptScrollControllerOptions {
hiddenItemCount?: number;
onShowEarlierItems?: () => void;
pendingApprovalSelector?: string;
scrollContainerRef?: React.RefObject<HTMLElement | null>;
scrollKey?: string | number;
threadId: string;
turnCount: number;
}
interface AgentTranscriptScrollController {
canShowEarlierItems: boolean;
handleScroll(): void;
jumpToLatest(): void;
jumpToPendingApproval(): void;
scrollContainerRef: React.RefObject<HTMLElement | null>;
showEarlierItems(): void;
showJumpLatest: boolean;
showJumpApproval: boolean;
}
declare function useAgentTranscriptScrollController({ hiddenItemCount, onShowEarlierItems, pendingApprovalSelector, scrollContainerRef, scrollKey, threadId, turnCount, }: AgentTranscriptScrollControllerOptions): AgentTranscriptScrollController;
declare function useAgentUsage(): {
rateLimits: unknown;
refreshUsage: () => Promise<void>;
};
declare const DEFAULT_TRANSCRIPT_ITEM_LIMIT = 48;
declare const TRANSCRIPT_ITEM_INCREMENT = 48;
declare function transcriptItemIds(turn: TurnState): string[];
declare function visibleTranscriptWindow(thread: ThreadState, visibleItemLimit: number, options?: {
pinnedItemIdsByTurnId?: Map<string, string[]>;
}): {
itemIdsByTurnId: Map<string, string[]>;
totalItemCount: number;
visibleItemCount: number;
};
export { AgentAppsRefreshOptions, type AgentComposerController, type AgentComposerDisabledReason, type AgentComposerFailedPendingMessage, type AgentComposerSubmitMode, type AgentDirectThreadController, type AgentDirectThreadOpenResult, AgentHooksRefreshOptions, AgentRunPolicy, AgentSkillConfigWriteOptions, AgentSkillsRefreshOptions, type AgentThreadForkResult, type AgentThreadHistoryResult, type AgentThreadHistorySyncedEvent, type AgentThreadListController, type AgentThreadListControllerOptions, type AgentThreadListRequest, type AgentThreadReadResult, type AgentThreadResumeResult, type AgentThreadResumeRunSettings, type AgentThreadStartResult, type AgentThreadStartWithInputOptions, type AgentThreadStartWithInputResult, type AgentTranscriptScrollController, type AgentTranscriptScrollControllerOptions, AgentUserInput, DEFAULT_TRANSCRIPT_ITEM_LIMIT, type QueuedFollowUp, type QueuedFollowUpAttachment, TRANSCRIPT_ITEM_INCREMENT, ThreadForkOptions, ThreadHistoryParams, ThreadResumeOptions, ThreadStartOptions, TurnStartOptions, transcriptItemIds, useAgentApprovals, useAgentApps, useAgentComposer, useAgentComposerController, useAgentDiagnostics, useAgentDirectThreadController, useAgentHooks, useAgentModels, useAgentRunSettings, useAgentServerRequests, useAgentSkills, useAgentThread, useAgentThreadActions, useAgentThreadController, useAgentThreadHistory, useAgentThreadListController, useAgentThreadReader, useAgentThreads, useAgentTranscriptScrollController, useAgentTurn, useAgentTurnController, useAgentUsage, visibleTranscriptWindow };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import { PendingServerRequest, AgentTranscriptBlockView, AgentItemBlockKind, ThreadId, AgentItemState } from '@nyosegawa/agent-ui-core';
import React, { PropsWithChildren } from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
type AgentUserInput = AgentTextInput | AgentImageInput | AgentLocalImageInput | AgentSkillInput | AgentMentionInput | AgentUnknownUserInput;
interface AgentTextInput {
text: string;
text_elements?: unknown[];
type: "text";
}
interface AgentImageInput {
image_url: string;
type: "image";
}
interface AgentLocalImageInput {
path: string;
type: "localImage";
}
interface AgentSkillInput {
name: string;
path: string;
type: "skill";
}
interface AgentMentionInput {
name: string;
path: string;
type: "mention";
}
interface AgentUnknownUserInput {
type: string;
[key: string]: unknown;
}
interface ApprovalAnchors {
afterTurn: PendingServerRequest[];
byItemId: Record<string, PendingServerRequest[]>;
renderApprovalAnchor: (approval: PendingServerRequest) => React.ReactNode;
}
interface TranscriptApprovalAnchors {
requests: PendingServerRequest[];
renderApprovalAnchor: (approval: PendingServerRequest) => React.ReactNode;
}
type AgentTranscriptDensityMode = "default" | "compact" | "verbose" | "critical-only";
interface AgentTranscriptDensityConfig {
default?: AgentTranscriptDensityMode;
byBlockKind?: Partial<Record<AgentItemBlockKind, AgentTranscriptDensityMode>>;
}
type AgentTranscriptDensity = AgentTranscriptDensityMode | AgentTranscriptDensityConfig;
interface AgentTranscriptPendingState {
status: "failed" | "inProgress";
}
type AgentTranscriptBlock = AgentTranscriptBlockView;
type AgentTranscriptItemStatus = "cancelled" | "completed" | "failed" | "inProgress" | "pending" | "streaming";
interface AgentTranscriptItem {
id: string;
kind: string;
status?: AgentTranscriptItemStatus;
text?: string;
threadId?: string;
turnId?: string;
}
interface AgentTranscriptEntry {
approvals: PendingServerRequest[];
block: AgentTranscriptBlock;
dataKind: string;
density: AgentTranscriptDensityMode;
displayStatus: string;
id: string;
item?: AgentTranscriptItem;
itemId: string;
key: string;
pending?: AgentTranscriptPendingState;
patch?: unknown;
role: "assistant" | "command" | "system" | "tool" | "user";
status: AgentTranscriptItemStatus;
text?: string;
turnId: string;
}
interface AgentTranscriptControllerOptions {
approvalAnchors?: TranscriptApprovalAnchors;
density?: AgentTranscriptDensity;
}
interface AgentTranscriptController {
density: AgentTranscriptDensityMode;
entries: AgentTranscriptEntry[];
entriesByTurnId: Map<string, AgentTranscriptEntry[]>;
hiddenItemCount: number;
showEarlierItems(): void;
threadId?: string;
turnIds: string[];
visibleItemCount: number;
}
declare function useAgentTranscriptController(threadId?: ThreadId, options?: AgentTranscriptControllerOptions): AgentTranscriptController;
type AgentResourceKind = "image" | "file" | "integration" | "url" | "unavailable";
interface AgentResolvedResourceBase {
displayName?: string;
id?: string;
input?: AgentUserInput | AgentUserInput[];
mimeType?: string;
name?: string;
path?: string;
previewUrl?: string;
redactedPath?: string;
reason?: string;
sizeBytes?: number;
url?: string;
}
interface AgentResolvedUrlResource extends AgentResolvedResourceBase {
kind: "url";
}
interface AgentUnavailableResource extends AgentResolvedResourceBase {
kind: "unavailable";
}
type AgentResolvedResource = AgentResolvedUrlResource | AgentUnavailableResource;
interface AgentFileResourceRequest {
file: File;
kind: Extract<AgentResourceKind, "image" | "file">;
source: "file";
}
interface AgentLocalMediaResourceRequest {
item?: AgentItemState;
path: string;
source: "local-media";
}
type AgentResourceRequest = AgentFileResourceRequest | AgentLocalMediaResourceRequest;
type AgentResourceResolution = AgentResolvedResource | null | undefined;
type AgentResourceResolver = (request: AgentResourceRequest) => AgentResourceResolution | Promise<AgentResourceResolution>;
declare function agentResourceUrl(resource: AgentResolvedResourceBase | null | undefined): string | undefined;
declare function agentResourceDisplayName(resource: AgentResolvedResourceBase | null | undefined, fallback?: string): string | undefined;
type AgentLocale = "en" | "ja" | "ko" | "zh-CN" | "es" | "fr";
declare const agentLocales: AgentLocale[];
interface AgentI18nDictionary {
"account.authenticated": string;
"account.authenticating": string;
"account.checking": string;
"account.connecting": string;
"account.cancelLogin": string;
"account.details": string;
"account.email": string;
"account.login": string;
"account.logout": string;
"account.openDeviceLogin": string;
"account.openMenu": string;
"account.plan": string;
"account.status": string;
"account.unauthenticated": string;
"approval.action.approve": string;
"approval.action.approveAria": string;
"approval.action.approveForSession": string;
"approval.action.approveForSessionAria": string;
"approval.action.decline": string;
"approval.action.declineAria": string;
"approval.action.review": string;
"approval.action.reviewAria": string;
"approval.aria.otherPending": string;
"approval.aria.pending": string;
"approval.aria.pendingOne": string;
"approval.count": string;
"approval.kind.attestation": string;
"approval.kind.authRefresh": string;
"approval.kind.command": string;
"approval.kind.dynamicTool": string;
"approval.kind.fileChange": string;
"approval.kind.generic": string;
"approval.kind.mcpInput": string;
"approval.kind.permissions": string;
"approval.kind.userInput": string;
"approval.meta.approvalPolicy": string;
"approval.meta.item": string;
"approval.meta.namespace": string;
"approval.meta.sandbox": string;
"approval.meta.tool": string;
"approval.meta.workingDirectory": string;
"approval.request.command": string;
"approval.request.fileChange": string;
"approval.request.generic": string;
"approval.risk.high": string;
"approval.risk.low": string;
"approval.risk.medium": string;
"approval.riskSuffix": string;
"approval.summary.command": string;
"approval.summary.default": string;
"approval.summary.dynamicTool": string;
"approval.summary.fileChange": string;
"approval.summary.mcpInput": string;
"approval.summary.permissions": string;
"approval.summary.userInput": string;
"aria.actions": string;
"aria.agentContext": string;
"aria.changedFiles": string;
"aria.codeMirrorPatchViewer": string;
"aria.commandOutput": string;
"aria.completedTask": string;
"aria.composerAttachments": string;
"aria.contextUsage": string;
"aria.contextUsageDetails": string;
"aria.criticalStatus": string;
"aria.diffPreview": string;
"aria.dismissThreadHistory": string;
"aria.message": string;
"aria.messageComposer": string;
"aria.openTask": string;
"aria.patchContent": string;
"aria.pendingAttachments": string;
"aria.runControls": string;
"aria.statusDetails": string;
"aria.statusSummary": string;
"aria.threadStartContext": string;
"aria.threads": string;
"aria.tokenUsage": string;
"aria.usageLimits": string;
"aria.usageSummary": string;
"apps.authNeeded": string;
"apps.disabled": string;
"apps.empty": string;
"apps.label": string;
"apps.loadMore": string;
"apps.notInstalled": string;
"apps.unavailable": string;
"common.cancel": string;
"common.close": string;
"common.closeMenu": string;
"common.collapse": string;
"common.default": string;
"common.details": string;
"common.disable": string;
"common.enable": string;
"common.expand": string;
"common.file": string;
"common.files": string;
"common.loading": string;
"common.message": string;
"common.messages": string;
"common.notice": string;
"common.notices": string;
"common.open": string;
"common.refresh": string;
"common.refreshing": string;
"common.serverDefault": string;
"common.syncPending": string;
"common.unknown": string;
"composer.addFollowUp": string;
"composer.attachFile": string;
"composer.attachFiles": string;
"composer.attachedFollowUp": string;
"composer.attachmentRejected": string;
"composer.attachmentRejectedMany": string;
"composer.attachmentRejectedOne": string;
"composer.cannotAcceptFollowUp": string;
"composer.couldNotSendAdditional": string;
"composer.couldNotStart": string;
"composer.couldNotStop": string;
"composer.enterToSend": string;
"composer.dismissFailedMessage": string;
"composer.failedMessageBody": string;
"composer.failedMessages": string;
"composer.failedMessageTitle": string;
"composer.followUpNoActiveTurn": string;
"composer.followUpTurnChanged": string;
"composer.followUpTurnChangedRefresh": string;
"composer.placeholder": string;
"composer.removeAttachment": string;
"composer.resolveApprovalReason": string;
"composer.retryFailedMessage": string;
"composer.send": string;
"composer.sendMessage": string;
"composer.stopCurrentTurn": string;
"context.cachedInput": string;
"context.compactionNotice": string;
"context.contextWindow": string;
"context.input": string;
"context.lastTurn": string;
"context.output": string;
"context.reasoning": string;
"context.title": string;
"context.used": string;
"diagnostics.label": string;
"diagnostics.messageCount": string;
"diagnostics.pluginManifestWarnings": string;
"diagnostics.syncing": string;
"diagnostics.withPluginWarnings": string;
"firstRun.authenticating.body": string;
"firstRun.authenticating.title": string;
"firstRun.bridgeError.body": string;
"firstRun.bridgeError.title": string;
"firstRun.connect.body": string;
"firstRun.connect.cta": string;
"firstRun.connect.title": string;
"firstRun.error": string;
"firstRun.form": string;
"firstRun.placeholder": string;
"firstRun.preparing.body": string;
"firstRun.preparing.cta": string;
"firstRun.preparing.title": string;
"firstRun.startThread": string;
"followUp.attachments": string;
"followUp.attachmentsMany": string;
"followUp.attachmentsOne": string;
"followUp.earlier": string;
"followUp.earlierMany": string;
"followUp.earlierOne": string;
"followUp.earlierQueued": string;
"followUp.edit": string;
"followUp.queued": string;
"followUp.queuedAttachments": string;
"followUp.remove": string;
"followUp.sendNow": string;
"locale.en": string;
"locale.es": string;
"locale.fr": string;
"locale.ja": string;
"locale.ko": string;
"locale.label": string;
"locale.zh-CN": string;
"markdown.completedTask": string;
"markdown.openTask": string;
"run.clearWorkingDirectory": string;
"run.cwd.noRecent": string;
"run.cwd.openFolder": string;
"run.cwd.openFolderAction": string;
"run.cwd.prompt": string;
"run.cwd.recent": string;
"run.cwd.selectFolder": string;
"run.cwd.serverDefault": string;
"run.defaultEffort": string;
"run.defaultModel": string;
"run.effort": string;
"run.effort.high": string;
"run.effort.low": string;
"run.effort.medium": string;
"run.effort.minimal": string;
"run.effort.veryHigh": string;
"run.policy": string;
"run.policy.auto.description": string;
"run.policy.auto.label": string;
"run.policy.full-access.description": string;
"run.policy.full-access.label": string;
"run.policy.read-only.description": string;
"run.policy.read-only.label": string;
"run.policy.review.description": string;
"run.policy.review.label": string;
"run.model": string;
"run.modelAndEffort": string;
"run.modelDefault": string;
"run.noSelectableEffort": string;
"run.serverDefault": string;
"run.workingDirectory": string;
"skills.empty": string;
"skills.label": string;
"status.account": string;
"status.backgroundNotice": string;
"status.configWarning": string;
"status.critical": string;
"status.deprecationNotice": string;
"status.failed": string;
"status.mcpOAuth": string;
"status.modelReroute": string;
"status.rateLimit": string;
"status.title": string;
"status.total": string;
"status.warning": string;
"theme.dark": string;
"theme.label": string;
"theme.light": string;
"theme.system": string;
"thread.action.archive": string;
"thread.action.compact": string;
"thread.action.fork": string;
"thread.action.rename": string;
"thread.action.rollback": string;
"thread.action.unarchive": string;
"thread.closeHistory": string;
"thread.codexSession": string;
"thread.collapseHistory": string;
"thread.empty": string;
"thread.ephemeralSession": string;
"thread.expandHistory": string;
"thread.history": string;
"thread.namePrompt": string;
"thread.new": string;
"thread.noThreadsFound": string;
"thread.openHistory": string;
"thread.search": string;
"thread.searchHistory": string;
"thread.status.complete": string;
"thread.status.failed": string;
"thread.status.needsAttention": string;
"thread.status.needsApproval": string;
"thread.status.needsAttestation": string;
"thread.status.needsAuthentication": string;
"thread.status.needsInput": string;
"thread.status.needsMcpInput": string;
"thread.status.needsPermission": string;
"thread.status.preview": string;
"thread.status.ready": string;
"thread.status.running": string;
"thread.status.stored": string;
"thread.threadCount": string;
"thread.untitled": string;
"timeline.agentTool": string;
"timeline.arguments": string;
"timeline.argumentsPreview": string;
"timeline.assistant": string;
"timeline.collab": string;
"timeline.collabTool": string;
"timeline.command": string;
"timeline.compaction": string;
"timeline.diff": string;
"timeline.earlierHidden": string;
"timeline.error": string;
"timeline.exitCode": string;
"timeline.file": string;
"timeline.fileChange": string;
"timeline.fileChanges": string;
"timeline.files": string;
"timeline.filesChanged": string;
"timeline.from": string;
"timeline.image": string;
"timeline.imageGenerated": string;
"timeline.localMediaUnavailable": string;
"timeline.item": string;
"timeline.items": string;
"timeline.jumpToPendingApproval": string;
"timeline.jumpToLatest": string;
"timeline.lines": string;
"timeline.mcpTool": string;
"timeline.noPatch": string;
"timeline.noTerminalOutput": string;
"timeline.output": string;
"timeline.plan": string;
"timeline.reasoning": string;
"timeline.result": string;
"timeline.resultCaptured": string;
"timeline.resultItems": string;
"timeline.search": string;
"timeline.showEarlier": string;
"timeline.system": string;
"timeline.terminal": string;
"timeline.thinking": string;
"timeline.thread": string;
"timeline.to": string;
"timeline.tool": string;
"timeline.toolCall": string;
"timeline.unknownTool": string;
"timeline.webSearch": string;
"timeline.you": string;
"usage.empty": string;
"usage.inputOutput": string;
"usage.label": string;
"usage.limits": string;
"usage.meterLabel": string;
"usage.namedWindow": string;
"usage.resetAt": string;
"usage.hourWindow": string;
"usage.tokens": string;
"usage.title": string;
"usage.weeklyWindow": string;
}
type AgentI18nKey = keyof AgentI18nDictionary;
type AgentI18nMessages = Partial<AgentI18nDictionary>;
interface AgentI18nValue {
locale: AgentLocale;
t: (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
}
interface AgentI18nProviderProps extends PropsWithChildren {
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
}
declare function AgentI18nProvider({ children, locale, messages, }: AgentI18nProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentI18n(): AgentI18nValue;
declare function interpolate(template: string, vars: Record<string, string | number> | undefined): string;
declare function interpolationVariables(template: string): string[];
declare const agentI18nDictionaries: Record<AgentLocale, AgentI18nDictionary>;
declare function normalizeAgentLocale(locale?: AgentLocale | string): AgentLocale;
export { type AgentI18nDictionary as A, type AgentResourceResolver as B, type AgentSkillInput as C, type AgentTextInput as D, type AgentUnavailableResource as E, type AgentUnknownUserInput as F, type AgentUserInput as G, agentResourceDisplayName as H, agentResourceUrl as I, type AgentTranscriptItem as J, type AgentTranscriptBlock as K, type AgentTranscriptController as L, type AgentTranscriptControllerOptions as M, type AgentTranscriptDensityConfig as N, type AgentTranscriptDensityMode as O, type AgentTranscriptPendingState as P, useAgentTranscriptController as Q, type TranscriptApprovalAnchors as T, type AgentI18nKey as a, type AgentI18nMessages as b, AgentI18nProvider as c, type AgentI18nProviderProps as d, type AgentI18nValue as e, type AgentLocale as f, agentI18nDictionaries as g, agentLocales as h, interpolate as i, interpolationVariables as j, type AgentTranscriptDensity as k, type AgentTranscriptEntry as l, type ApprovalAnchors as m, normalizeAgentLocale as n, type AgentFileResourceRequest as o, type AgentImageInput as p, type AgentLocalImageInput as q, type AgentLocalMediaResourceRequest as r, type AgentMentionInput as s, type AgentResolvedResource as t, useAgentI18n as u, type AgentResolvedResourceBase as v, type AgentResolvedUrlResource as w, type AgentResourceKind as x, type AgentResourceRequest as y, type AgentResourceResolution as z };
import { PendingServerRequest, AgentTranscriptBlockView, AgentItemBlockKind, ThreadId, AgentItemState } from '@nyosegawa/agent-ui-core';
import React, { PropsWithChildren } from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
type AgentUserInput = AgentTextInput | AgentImageInput | AgentLocalImageInput | AgentSkillInput | AgentMentionInput | AgentUnknownUserInput;
interface AgentTextInput {
text: string;
text_elements?: unknown[];
type: "text";
}
interface AgentImageInput {
image_url: string;
type: "image";
}
interface AgentLocalImageInput {
path: string;
type: "localImage";
}
interface AgentSkillInput {
name: string;
path: string;
type: "skill";
}
interface AgentMentionInput {
name: string;
path: string;
type: "mention";
}
interface AgentUnknownUserInput {
type: string;
[key: string]: unknown;
}
interface ApprovalAnchors {
afterTurn: PendingServerRequest[];
byItemId: Record<string, PendingServerRequest[]>;
renderApprovalAnchor: (approval: PendingServerRequest) => React.ReactNode;
}
interface TranscriptApprovalAnchors {
requests: PendingServerRequest[];
renderApprovalAnchor: (approval: PendingServerRequest) => React.ReactNode;
}
type AgentTranscriptDensityMode = "default" | "compact" | "verbose" | "critical-only";
interface AgentTranscriptDensityConfig {
default?: AgentTranscriptDensityMode;
byBlockKind?: Partial<Record<AgentItemBlockKind, AgentTranscriptDensityMode>>;
}
type AgentTranscriptDensity = AgentTranscriptDensityMode | AgentTranscriptDensityConfig;
interface AgentTranscriptPendingState {
status: "failed" | "inProgress";
}
type AgentTranscriptBlock = AgentTranscriptBlockView;
type AgentTranscriptItemStatus = "cancelled" | "completed" | "failed" | "inProgress" | "pending" | "streaming";
interface AgentTranscriptItem {
id: string;
kind: string;
status?: AgentTranscriptItemStatus;
text?: string;
threadId?: string;
turnId?: string;
}
interface AgentTranscriptEntry {
approvals: PendingServerRequest[];
block: AgentTranscriptBlock;
dataKind: string;
density: AgentTranscriptDensityMode;
displayStatus: string;
id: string;
item?: AgentTranscriptItem;
itemId: string;
key: string;
pending?: AgentTranscriptPendingState;
patch?: unknown;
role: "assistant" | "command" | "system" | "tool" | "user";
status: AgentTranscriptItemStatus;
text?: string;
turnId: string;
}
interface AgentTranscriptControllerOptions {
approvalAnchors?: TranscriptApprovalAnchors;
density?: AgentTranscriptDensity;
}
interface AgentTranscriptController {
density: AgentTranscriptDensityMode;
entries: AgentTranscriptEntry[];
entriesByTurnId: Map<string, AgentTranscriptEntry[]>;
hiddenItemCount: number;
showEarlierItems(): void;
threadId?: string;
turnIds: string[];
visibleItemCount: number;
}
declare function useAgentTranscriptController(threadId?: ThreadId, options?: AgentTranscriptControllerOptions): AgentTranscriptController;
type AgentResourceKind = "image" | "file" | "integration" | "url" | "unavailable";
interface AgentResolvedResourceBase {
displayName?: string;
id?: string;
input?: AgentUserInput | AgentUserInput[];
mimeType?: string;
name?: string;
path?: string;
previewUrl?: string;
redactedPath?: string;
reason?: string;
sizeBytes?: number;
url?: string;
}
interface AgentResolvedUrlResource extends AgentResolvedResourceBase {
kind: "url";
}
interface AgentUnavailableResource extends AgentResolvedResourceBase {
kind: "unavailable";
}
type AgentResolvedResource = AgentResolvedUrlResource | AgentUnavailableResource;
interface AgentFileResourceRequest {
file: File;
kind: Extract<AgentResourceKind, "image" | "file">;
source: "file";
}
interface AgentLocalMediaResourceRequest {
item?: AgentItemState;
path: string;
source: "local-media";
}
type AgentResourceRequest = AgentFileResourceRequest | AgentLocalMediaResourceRequest;
type AgentResourceResolution = AgentResolvedResource | null | undefined;
type AgentResourceResolver = (request: AgentResourceRequest) => AgentResourceResolution | Promise<AgentResourceResolution>;
declare function agentResourceUrl(resource: AgentResolvedResourceBase | null | undefined): string | undefined;
declare function agentResourceDisplayName(resource: AgentResolvedResourceBase | null | undefined, fallback?: string): string | undefined;
type AgentLocale = "en" | "ja" | "ko" | "zh-CN" | "es" | "fr";
declare const agentLocales: AgentLocale[];
interface AgentI18nDictionary {
"account.authenticated": string;
"account.authenticating": string;
"account.checking": string;
"account.connecting": string;
"account.cancelLogin": string;
"account.details": string;
"account.email": string;
"account.login": string;
"account.logout": string;
"account.openDeviceLogin": string;
"account.openMenu": string;
"account.plan": string;
"account.status": string;
"account.unauthenticated": string;
"approval.action.approve": string;
"approval.action.approveAria": string;
"approval.action.approveForSession": string;
"approval.action.approveForSessionAria": string;
"approval.action.decline": string;
"approval.action.declineAria": string;
"approval.action.review": string;
"approval.action.reviewAria": string;
"approval.aria.otherPending": string;
"approval.aria.pending": string;
"approval.aria.pendingOne": string;
"approval.count": string;
"approval.kind.attestation": string;
"approval.kind.authRefresh": string;
"approval.kind.command": string;
"approval.kind.dynamicTool": string;
"approval.kind.fileChange": string;
"approval.kind.generic": string;
"approval.kind.mcpInput": string;
"approval.kind.permissions": string;
"approval.kind.userInput": string;
"approval.meta.approvalPolicy": string;
"approval.meta.item": string;
"approval.meta.namespace": string;
"approval.meta.sandbox": string;
"approval.meta.tool": string;
"approval.meta.workingDirectory": string;
"approval.request.command": string;
"approval.request.fileChange": string;
"approval.request.generic": string;
"approval.risk.high": string;
"approval.risk.low": string;
"approval.risk.medium": string;
"approval.riskSuffix": string;
"approval.summary.command": string;
"approval.summary.default": string;
"approval.summary.dynamicTool": string;
"approval.summary.fileChange": string;
"approval.summary.mcpInput": string;
"approval.summary.permissions": string;
"approval.summary.userInput": string;
"aria.actions": string;
"aria.agentContext": string;
"aria.changedFiles": string;
"aria.codeMirrorPatchViewer": string;
"aria.commandOutput": string;
"aria.completedTask": string;
"aria.composerAttachments": string;
"aria.contextUsage": string;
"aria.contextUsageDetails": string;
"aria.criticalStatus": string;
"aria.diffPreview": string;
"aria.dismissThreadHistory": string;
"aria.message": string;
"aria.messageComposer": string;
"aria.openTask": string;
"aria.patchContent": string;
"aria.pendingAttachments": string;
"aria.runControls": string;
"aria.statusDetails": string;
"aria.statusSummary": string;
"aria.threadStartContext": string;
"aria.threads": string;
"aria.tokenUsage": string;
"aria.usageLimits": string;
"aria.usageSummary": string;
"apps.authNeeded": string;
"apps.disabled": string;
"apps.empty": string;
"apps.label": string;
"apps.loadMore": string;
"apps.notInstalled": string;
"apps.unavailable": string;
"common.cancel": string;
"common.close": string;
"common.closeMenu": string;
"common.collapse": string;
"common.default": string;
"common.details": string;
"common.disable": string;
"common.enable": string;
"common.expand": string;
"common.file": string;
"common.files": string;
"common.loading": string;
"common.message": string;
"common.messages": string;
"common.notice": string;
"common.notices": string;
"common.open": string;
"common.refresh": string;
"common.refreshing": string;
"common.serverDefault": string;
"common.syncPending": string;
"common.unknown": string;
"composer.addFollowUp": string;
"composer.attachFile": string;
"composer.attachFiles": string;
"composer.attachedFollowUp": string;
"composer.attachmentRejected": string;
"composer.attachmentRejectedMany": string;
"composer.attachmentRejectedOne": string;
"composer.cannotAcceptFollowUp": string;
"composer.couldNotSendAdditional": string;
"composer.couldNotStart": string;
"composer.couldNotStop": string;
"composer.enterToSend": string;
"composer.dismissFailedMessage": string;
"composer.failedMessageBody": string;
"composer.failedMessages": string;
"composer.failedMessageTitle": string;
"composer.followUpNoActiveTurn": string;
"composer.followUpTurnChanged": string;
"composer.followUpTurnChangedRefresh": string;
"composer.placeholder": string;
"composer.removeAttachment": string;
"composer.resolveApprovalReason": string;
"composer.retryFailedMessage": string;
"composer.send": string;
"composer.sendMessage": string;
"composer.stopCurrentTurn": string;
"context.cachedInput": string;
"context.compactionNotice": string;
"context.contextWindow": string;
"context.input": string;
"context.lastTurn": string;
"context.output": string;
"context.reasoning": string;
"context.title": string;
"context.used": string;
"diagnostics.label": string;
"diagnostics.messageCount": string;
"diagnostics.pluginManifestWarnings": string;
"diagnostics.syncing": string;
"diagnostics.withPluginWarnings": string;
"firstRun.authenticating.body": string;
"firstRun.authenticating.title": string;
"firstRun.bridgeError.body": string;
"firstRun.bridgeError.title": string;
"firstRun.connect.body": string;
"firstRun.connect.cta": string;
"firstRun.connect.title": string;
"firstRun.error": string;
"firstRun.form": string;
"firstRun.placeholder": string;
"firstRun.preparing.body": string;
"firstRun.preparing.cta": string;
"firstRun.preparing.title": string;
"firstRun.startThread": string;
"followUp.attachments": string;
"followUp.attachmentsMany": string;
"followUp.attachmentsOne": string;
"followUp.earlier": string;
"followUp.earlierMany": string;
"followUp.earlierOne": string;
"followUp.earlierQueued": string;
"followUp.edit": string;
"followUp.queued": string;
"followUp.queuedAttachments": string;
"followUp.remove": string;
"followUp.sendNow": string;
"locale.en": string;
"locale.es": string;
"locale.fr": string;
"locale.ja": string;
"locale.ko": string;
"locale.label": string;
"locale.zh-CN": string;
"markdown.completedTask": string;
"markdown.openTask": string;
"run.clearWorkingDirectory": string;
"run.cwd.noRecent": string;
"run.cwd.openFolder": string;
"run.cwd.openFolderAction": string;
"run.cwd.prompt": string;
"run.cwd.recent": string;
"run.cwd.selectFolder": string;
"run.cwd.serverDefault": string;
"run.defaultEffort": string;
"run.defaultModel": string;
"run.effort": string;
"run.effort.high": string;
"run.effort.low": string;
"run.effort.medium": string;
"run.effort.minimal": string;
"run.effort.veryHigh": string;
"run.policy": string;
"run.policy.auto.description": string;
"run.policy.auto.label": string;
"run.policy.full-access.description": string;
"run.policy.full-access.label": string;
"run.policy.read-only.description": string;
"run.policy.read-only.label": string;
"run.policy.review.description": string;
"run.policy.review.label": string;
"run.model": string;
"run.modelAndEffort": string;
"run.modelDefault": string;
"run.noSelectableEffort": string;
"run.serverDefault": string;
"run.workingDirectory": string;
"skills.empty": string;
"skills.label": string;
"status.account": string;
"status.backgroundNotice": string;
"status.configWarning": string;
"status.critical": string;
"status.deprecationNotice": string;
"status.failed": string;
"status.mcpOAuth": string;
"status.modelReroute": string;
"status.rateLimit": string;
"status.title": string;
"status.total": string;
"status.warning": string;
"theme.dark": string;
"theme.label": string;
"theme.light": string;
"theme.system": string;
"thread.action.archive": string;
"thread.action.compact": string;
"thread.action.fork": string;
"thread.action.rename": string;
"thread.action.rollback": string;
"thread.action.unarchive": string;
"thread.closeHistory": string;
"thread.codexSession": string;
"thread.collapseHistory": string;
"thread.empty": string;
"thread.ephemeralSession": string;
"thread.expandHistory": string;
"thread.history": string;
"thread.namePrompt": string;
"thread.new": string;
"thread.noThreadsFound": string;
"thread.openHistory": string;
"thread.search": string;
"thread.searchHistory": string;
"thread.status.complete": string;
"thread.status.failed": string;
"thread.status.needsAttention": string;
"thread.status.needsApproval": string;
"thread.status.needsAttestation": string;
"thread.status.needsAuthentication": string;
"thread.status.needsInput": string;
"thread.status.needsMcpInput": string;
"thread.status.needsPermission": string;
"thread.status.preview": string;
"thread.status.ready": string;
"thread.status.running": string;
"thread.status.stored": string;
"thread.threadCount": string;
"thread.untitled": string;
"timeline.agentTool": string;
"timeline.arguments": string;
"timeline.argumentsPreview": string;
"timeline.assistant": string;
"timeline.collab": string;
"timeline.collabTool": string;
"timeline.command": string;
"timeline.compaction": string;
"timeline.diff": string;
"timeline.earlierHidden": string;
"timeline.error": string;
"timeline.exitCode": string;
"timeline.file": string;
"timeline.fileChange": string;
"timeline.fileChanges": string;
"timeline.files": string;
"timeline.filesChanged": string;
"timeline.from": string;
"timeline.image": string;
"timeline.imageGenerated": string;
"timeline.localMediaUnavailable": string;
"timeline.item": string;
"timeline.items": string;
"timeline.jumpToPendingApproval": string;
"timeline.jumpToLatest": string;
"timeline.lines": string;
"timeline.mcpTool": string;
"timeline.noPatch": string;
"timeline.noTerminalOutput": string;
"timeline.output": string;
"timeline.plan": string;
"timeline.reasoning": string;
"timeline.result": string;
"timeline.resultCaptured": string;
"timeline.resultItems": string;
"timeline.search": string;
"timeline.showEarlier": string;
"timeline.system": string;
"timeline.terminal": string;
"timeline.thinking": string;
"timeline.thread": string;
"timeline.to": string;
"timeline.tool": string;
"timeline.toolCall": string;
"timeline.unknownTool": string;
"timeline.webSearch": string;
"timeline.you": string;
"usage.empty": string;
"usage.inputOutput": string;
"usage.label": string;
"usage.limits": string;
"usage.meterLabel": string;
"usage.namedWindow": string;
"usage.resetAt": string;
"usage.hourWindow": string;
"usage.tokens": string;
"usage.title": string;
"usage.weeklyWindow": string;
}
type AgentI18nKey = keyof AgentI18nDictionary;
type AgentI18nMessages = Partial<AgentI18nDictionary>;
interface AgentI18nValue {
locale: AgentLocale;
t: (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
}
interface AgentI18nProviderProps extends PropsWithChildren {
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
}
declare function AgentI18nProvider({ children, locale, messages, }: AgentI18nProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentI18n(): AgentI18nValue;
declare function interpolate(template: string, vars: Record<string, string | number> | undefined): string;
declare function interpolationVariables(template: string): string[];
declare const agentI18nDictionaries: Record<AgentLocale, AgentI18nDictionary>;
declare function normalizeAgentLocale(locale?: AgentLocale | string): AgentLocale;
export { type AgentI18nDictionary as A, type AgentResourceResolver as B, type AgentSkillInput as C, type AgentTextInput as D, type AgentUnavailableResource as E, type AgentUnknownUserInput as F, type AgentUserInput as G, agentResourceDisplayName as H, agentResourceUrl as I, type AgentTranscriptItem as J, type AgentTranscriptBlock as K, type AgentTranscriptController as L, type AgentTranscriptControllerOptions as M, type AgentTranscriptDensityConfig as N, type AgentTranscriptDensityMode as O, type AgentTranscriptPendingState as P, useAgentTranscriptController as Q, type TranscriptApprovalAnchors as T, type AgentI18nKey as a, type AgentI18nMessages as b, AgentI18nProvider as c, type AgentI18nProviderProps as d, type AgentI18nValue as e, type AgentLocale as f, agentI18nDictionaries as g, agentLocales as h, interpolate as i, interpolationVariables as j, type AgentTranscriptDensity as k, type AgentTranscriptEntry as l, type ApprovalAnchors as m, normalizeAgentLocale as n, type AgentFileResourceRequest as o, type AgentImageInput as p, type AgentLocalImageInput as q, type AgentLocalMediaResourceRequest as r, type AgentMentionInput as s, type AgentResolvedResource as t, useAgentI18n as u, type AgentResolvedResourceBase as v, type AgentResolvedUrlResource as w, type AgentResourceKind as x, type AgentResourceRequest as y, type AgentResourceResolution as z };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import { T as TranscriptApprovalAnchors, k as AgentTranscriptDensity, l as AgentTranscriptEntry, m as ApprovalAnchors, f as AgentLocale } from './normalize-Ba14sx7f.cjs';
export { o as AgentFileResourceRequest, A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, p as AgentImageInput, q as AgentLocalImageInput, r as AgentLocalMediaResourceRequest, s as AgentMentionInput, t as AgentResolvedResource, v as AgentResolvedResourceBase, w as AgentResolvedUrlResource, x as AgentResourceKind, y as AgentResourceRequest, z as AgentResourceResolution, B as AgentResourceResolver, C as AgentSkillInput, D as AgentTextInput, E as AgentUnavailableResource, F as AgentUnknownUserInput, G as AgentUserInput, g as agentI18nDictionaries, h as agentLocales, H as agentResourceDisplayName, I as agentResourceUrl, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n } from './normalize-Ba14sx7f.cjs';
import * as react_jsx_runtime from 'react/jsx-runtime';
import React from 'react';
import { b as AgentComponents, c as AgentItemDefaultProps, e as AgentLocalMediaUrlResolver, f as AgentComposerIntegration, g as AgentLocalAttachmentResolver } from './chat-DxnjmFwK.cjs';
export { h as AgentAttachmentChip, i as AgentAttachmentChipKind, j as AgentAttachmentChips, k as AgentAttachmentChipsProps, l as AgentCommandItem, m as AgentCommandOutputItem, n as AgentComposer, o as AgentComposerInput, p as AgentComposerInputProps, q as AgentComposerIntegrationAttachment, r as AgentComposerIntegrationResolver, s as AgentComposerPanel, t as AgentComposerPanelProps, u as AgentComposerProps, v as AgentComposerToolbar, w as AgentComposerToolbarProps, x as AgentContentBlockView, y as AgentDiffItem, z as AgentFileChangeItem, B as AgentFirstRun, C as AgentLocalAttachmentKind, D as AgentMessageItem, E as AgentReasoningItem, F as AgentResolvedLocalAttachment, G as AgentShell, H as AgentShellProps, I as AgentStartComposer, J as AgentStartComposerProps, K as AgentStarterCwd, L as AgentTheme, M as AgentThemeToggle, N as AgentThemeToggleProps, O as AgentThreadSidebar, P as AgentToolCallItem, Q as AgentWorkingDirectoryResolver, T as ThreadList, R as formatThreadStatus, S as isUserFacingPath, U as threadSubtitle } from './chat-DxnjmFwK.cjs';
import { u as useAgentBootstrap } from './usage-CpkWgzYb.cjs';
export { U as UsageWindow, n as normalizeUsageWindows } from './usage-CpkWgzYb.cjs';
import { PendingServerRequest, ThreadTokenUsage, AgentThreadSummaryView, AgentThreadTranscriptView } from '@nyosegawa/agent-ui-core';
interface AgentComposerSubmitButtonProps {
canSubmit: boolean;
className?: string;
iconSize?: number;
isStopAction: boolean;
label?: string;
title?: string;
}
declare function AgentComposerSubmitButton({ canSubmit, className, iconSize, isStopAction, label, title, }: AgentComposerSubmitButtonProps): react_jsx_runtime.JSX.Element;
interface AgentRunControlsProps {
autoRefresh?: boolean;
variant?: "compact" | "panel";
}
declare function AgentRunControls({ autoRefresh, variant, }?: AgentRunControlsProps): react_jsx_runtime.JSX.Element;
/**
* Policy / model / effort selectors that live directly inside the composer
* toolbar. Working directory is intentionally absent here; cwd is a
* thread-start setting and is shown read-only in the thread header for an
* existing thread.
*/
declare function ComposerRunControls(): react_jsx_runtime.JSX.Element;
declare function AgentMessageList({ footer, approvalAnchors, components, renderItem, density, resolveLocalMediaUrl, scrollKey, threadId, }: {
/**
* Trailing transcript content rendered as the final scroll-area item.
* The default thread view uses it to keep the pending-approval surface
* inside the transcript instead of in a separate scroll pane.
*/
footer?: React.ReactNode;
approvalAnchors?: TranscriptApprovalAnchors;
components?: AgentComponents;
density?: AgentTranscriptDensity;
renderItem?: (entry: AgentTranscriptEntry, Default: React.ComponentType<AgentItemDefaultProps>) => React.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
/** Changing this value scrolls the transcript to its end (e.g. a new approval). */
scrollKey?: string | number;
threadId: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentTranscript: typeof AgentMessageList;
declare function AgentTurn({ approvals, components, entries, renderItem, resolveLocalMediaUrl, }: {
approvals?: ApprovalAnchors;
components?: AgentComponents;
entries?: AgentTranscriptEntry[];
renderItem?: (entry: AgentTranscriptEntry, Default: React.ComponentType<AgentItemDefaultProps>) => React.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiffViewer({ patch }: {
patch: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentApprovalQueue({ approvals: approvalsProp, renderApproval, threadId, }: {
approvals?: PendingServerRequest[];
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentContextUsageIndicator({ tokenUsage, }: {
tokenUsage?: ThreadTokenUsage;
}): react_jsx_runtime.JSX.Element | null;
interface AgentLocaleSelectProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (locale: AgentLocale) => void;
value: AgentLocale;
}
declare function AgentLocaleSelect({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentLocaleSelectProps): react_jsx_runtime.JSX.Element;
interface AgentUsageProps {
autoRefresh?: boolean;
}
declare function AgentUsagePanel({ autoRefresh }?: AgentUsageProps): react_jsx_runtime.JSX.Element;
declare function AgentUsageSummary(): react_jsx_runtime.JSX.Element;
declare function AgentRateLimitBar({ label, percent, }: {
label: string;
percent: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentTokenUsageBar({ inputTokens, outputTokens, totalTokens, }: {
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentSkillsPanel({ cwd }: {
cwd?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentAppsPanel({ threadId }: {
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentStatusBar({ end, onNavigateHome, onOpenThreads, }?: {
end?: React.ReactNode;
onNavigateHome?: () => void;
onOpenThreads?: () => void;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiagnosticsPanel({ bootstrap, }: {
bootstrap: ReturnType<typeof useAgentBootstrap>;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusSummary(): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusDetails({ includeCritical, }: {
includeCritical?: boolean;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCriticalNoticeList(): react_jsx_runtime.JSX.Element | null;
interface AgentThreadViewProps {
composerIntegrations?: readonly AgentComposerIntegration[];
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
renderItem?: React.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}
declare function AgentThreadView({ composerIntegrations, components, renderApproval, renderItem, resolveLocalAttachment, resolveLocalMediaUrl, threadId, }: AgentThreadViewProps): react_jsx_runtime.JSX.Element | null;
declare function AgentThreadSurface({ children, className, }: {
children: React.ReactNode;
className?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentThreadHeader({ thread, threadId, transcript, }: {
thread: AgentThreadSummaryView;
threadId?: string;
transcript?: AgentThreadTranscriptView;
}): react_jsx_runtime.JSX.Element;
/**
* Renders the thread transcript. When a `threadId` is supplied, pending
* approvals with upstream item or turn metadata are anchored immediately after
* that transcript context. Metadata-free approvals fall back to the transcript
* tail so they stay in the scroll area, not a separate pane above the composer.
*/
declare function AgentThreadTimeline({ components, renderApproval, renderItem, resolveLocalMediaUrl, threadId, }: {
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
renderItem?: React.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
export { AgentApprovalQueue, AgentAppsPanel, AgentComposerIntegration, AgentComposerSubmitButton, type AgentComposerSubmitButtonProps, AgentContextUsageIndicator, AgentCriticalNoticeList, AgentDiagnosticsPanel, AgentDiffViewer, AgentLocalAttachmentResolver, AgentLocalMediaUrlResolver, AgentLocale, AgentLocaleSelect, type AgentLocaleSelectProps, AgentMessageList, AgentRateLimitBar, AgentRunControls, type AgentRunControlsProps, AgentSkillsPanel, AgentStatusBar, AgentStatusDetails, AgentStatusSummary, AgentThreadHeader, AgentThreadSurface, AgentThreadTimeline, AgentThreadView, type AgentThreadViewProps, AgentTokenUsageBar, AgentTranscript, AgentTurn, AgentUsagePanel, type AgentUsageProps, AgentUsageSummary, ComposerRunControls, TranscriptApprovalAnchors };
import { T as TranscriptApprovalAnchors, k as AgentTranscriptDensity, l as AgentTranscriptEntry, m as ApprovalAnchors, f as AgentLocale } from './normalize-Ba14sx7f.js';
export { o as AgentFileResourceRequest, A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, p as AgentImageInput, q as AgentLocalImageInput, r as AgentLocalMediaResourceRequest, s as AgentMentionInput, t as AgentResolvedResource, v as AgentResolvedResourceBase, w as AgentResolvedUrlResource, x as AgentResourceKind, y as AgentResourceRequest, z as AgentResourceResolution, B as AgentResourceResolver, C as AgentSkillInput, D as AgentTextInput, E as AgentUnavailableResource, F as AgentUnknownUserInput, G as AgentUserInput, g as agentI18nDictionaries, h as agentLocales, H as agentResourceDisplayName, I as agentResourceUrl, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n } from './normalize-Ba14sx7f.js';
import * as react_jsx_runtime from 'react/jsx-runtime';
import React from 'react';
import { b as AgentComponents, c as AgentItemDefaultProps, e as AgentLocalMediaUrlResolver, f as AgentComposerIntegration, g as AgentLocalAttachmentResolver } from './chat-DA48t1q0.js';
export { h as AgentAttachmentChip, i as AgentAttachmentChipKind, j as AgentAttachmentChips, k as AgentAttachmentChipsProps, l as AgentCommandItem, m as AgentCommandOutputItem, n as AgentComposer, o as AgentComposerInput, p as AgentComposerInputProps, q as AgentComposerIntegrationAttachment, r as AgentComposerIntegrationResolver, s as AgentComposerPanel, t as AgentComposerPanelProps, u as AgentComposerProps, v as AgentComposerToolbar, w as AgentComposerToolbarProps, x as AgentContentBlockView, y as AgentDiffItem, z as AgentFileChangeItem, B as AgentFirstRun, C as AgentLocalAttachmentKind, D as AgentMessageItem, E as AgentReasoningItem, F as AgentResolvedLocalAttachment, G as AgentShell, H as AgentShellProps, I as AgentStartComposer, J as AgentStartComposerProps, K as AgentStarterCwd, L as AgentTheme, M as AgentThemeToggle, N as AgentThemeToggleProps, O as AgentThreadSidebar, P as AgentToolCallItem, Q as AgentWorkingDirectoryResolver, T as ThreadList, R as formatThreadStatus, S as isUserFacingPath, U as threadSubtitle } from './chat-DA48t1q0.js';
import { u as useAgentBootstrap } from './usage-KIdA5WC7.js';
export { U as UsageWindow, n as normalizeUsageWindows } from './usage-KIdA5WC7.js';
import { PendingServerRequest, ThreadTokenUsage, AgentThreadSummaryView, AgentThreadTranscriptView } from '@nyosegawa/agent-ui-core';
interface AgentComposerSubmitButtonProps {
canSubmit: boolean;
className?: string;
iconSize?: number;
isStopAction: boolean;
label?: string;
title?: string;
}
declare function AgentComposerSubmitButton({ canSubmit, className, iconSize, isStopAction, label, title, }: AgentComposerSubmitButtonProps): react_jsx_runtime.JSX.Element;
interface AgentRunControlsProps {
autoRefresh?: boolean;
variant?: "compact" | "panel";
}
declare function AgentRunControls({ autoRefresh, variant, }?: AgentRunControlsProps): react_jsx_runtime.JSX.Element;
/**
* Policy / model / effort selectors that live directly inside the composer
* toolbar. Working directory is intentionally absent here; cwd is a
* thread-start setting and is shown read-only in the thread header for an
* existing thread.
*/
declare function ComposerRunControls(): react_jsx_runtime.JSX.Element;
declare function AgentMessageList({ footer, approvalAnchors, components, renderItem, density, resolveLocalMediaUrl, scrollKey, threadId, }: {
/**
* Trailing transcript content rendered as the final scroll-area item.
* The default thread view uses it to keep the pending-approval surface
* inside the transcript instead of in a separate scroll pane.
*/
footer?: React.ReactNode;
approvalAnchors?: TranscriptApprovalAnchors;
components?: AgentComponents;
density?: AgentTranscriptDensity;
renderItem?: (entry: AgentTranscriptEntry, Default: React.ComponentType<AgentItemDefaultProps>) => React.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
/** Changing this value scrolls the transcript to its end (e.g. a new approval). */
scrollKey?: string | number;
threadId: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentTranscript: typeof AgentMessageList;
declare function AgentTurn({ approvals, components, entries, renderItem, resolveLocalMediaUrl, }: {
approvals?: ApprovalAnchors;
components?: AgentComponents;
entries?: AgentTranscriptEntry[];
renderItem?: (entry: AgentTranscriptEntry, Default: React.ComponentType<AgentItemDefaultProps>) => React.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiffViewer({ patch }: {
patch: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentApprovalQueue({ approvals: approvalsProp, renderApproval, threadId, }: {
approvals?: PendingServerRequest[];
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentContextUsageIndicator({ tokenUsage, }: {
tokenUsage?: ThreadTokenUsage;
}): react_jsx_runtime.JSX.Element | null;
interface AgentLocaleSelectProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (locale: AgentLocale) => void;
value: AgentLocale;
}
declare function AgentLocaleSelect({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentLocaleSelectProps): react_jsx_runtime.JSX.Element;
interface AgentUsageProps {
autoRefresh?: boolean;
}
declare function AgentUsagePanel({ autoRefresh }?: AgentUsageProps): react_jsx_runtime.JSX.Element;
declare function AgentUsageSummary(): react_jsx_runtime.JSX.Element;
declare function AgentRateLimitBar({ label, percent, }: {
label: string;
percent: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentTokenUsageBar({ inputTokens, outputTokens, totalTokens, }: {
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentSkillsPanel({ cwd }: {
cwd?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentAppsPanel({ threadId }: {
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentStatusBar({ end, onNavigateHome, onOpenThreads, }?: {
end?: React.ReactNode;
onNavigateHome?: () => void;
onOpenThreads?: () => void;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiagnosticsPanel({ bootstrap, }: {
bootstrap: ReturnType<typeof useAgentBootstrap>;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusSummary(): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusDetails({ includeCritical, }: {
includeCritical?: boolean;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCriticalNoticeList(): react_jsx_runtime.JSX.Element | null;
interface AgentThreadViewProps {
composerIntegrations?: readonly AgentComposerIntegration[];
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
renderItem?: React.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}
declare function AgentThreadView({ composerIntegrations, components, renderApproval, renderItem, resolveLocalAttachment, resolveLocalMediaUrl, threadId, }: AgentThreadViewProps): react_jsx_runtime.JSX.Element | null;
declare function AgentThreadSurface({ children, className, }: {
children: React.ReactNode;
className?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentThreadHeader({ thread, threadId, transcript, }: {
thread: AgentThreadSummaryView;
threadId?: string;
transcript?: AgentThreadTranscriptView;
}): react_jsx_runtime.JSX.Element;
/**
* Renders the thread transcript. When a `threadId` is supplied, pending
* approvals with upstream item or turn metadata are anchored immediately after
* that transcript context. Metadata-free approvals fall back to the transcript
* tail so they stay in the scroll area, not a separate pane above the composer.
*/
declare function AgentThreadTimeline({ components, renderApproval, renderItem, resolveLocalMediaUrl, threadId, }: {
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React.ReactNode;
renderItem?: React.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
export { AgentApprovalQueue, AgentAppsPanel, AgentComposerIntegration, AgentComposerSubmitButton, type AgentComposerSubmitButtonProps, AgentContextUsageIndicator, AgentCriticalNoticeList, AgentDiagnosticsPanel, AgentDiffViewer, AgentLocalAttachmentResolver, AgentLocalMediaUrlResolver, AgentLocale, AgentLocaleSelect, type AgentLocaleSelectProps, AgentMessageList, AgentRateLimitBar, AgentRunControls, type AgentRunControlsProps, AgentSkillsPanel, AgentStatusBar, AgentStatusDetails, AgentStatusSummary, AgentThreadHeader, AgentThreadSurface, AgentThreadTimeline, AgentThreadView, type AgentThreadViewProps, AgentTokenUsageBar, AgentTranscript, AgentTurn, AgentUsagePanel, type AgentUsageProps, AgentUsageSummary, ComposerRunControls, TranscriptApprovalAnchors };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReasoningEffort, AgentRunPolicyId, AgentEvent, AgentSessionState, AgentTransport } from '@nyosegawa/agent-ui-core';
import { PropsWithChildren } from 'react';
type AgentJsonValue = null | boolean | number | string | AgentJsonValue[] | {
[key: string]: AgentJsonValue | undefined;
};
type AgentApprovalPolicy = "untrusted" | "on-failure" | "on-request" | "never" | {
granular: {
mcp_elicitations: boolean;
request_permissions: boolean;
rules: boolean;
sandbox_approval: boolean;
skill_approval: boolean;
};
};
type AgentApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
type AgentReasoningSummary = "auto" | "concise" | "detailed" | "none";
type AgentPersonality = "none" | "friendly" | "pragmatic";
type AgentSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
type AgentThreadSource = "user" | "subagent" | "memory_consolidation";
type AgentThreadStartSource = "startup" | "clear";
type AgentThreadSortKey = "created_at" | "updated_at";
type AgentSortDirection = "asc" | "desc";
type AgentThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown";
type AgentSandboxPolicy = {
type: "dangerFullAccess";
} | {
networkAccess: boolean;
type: "readOnly";
} | {
networkAccess: "restricted" | "enabled";
type: "externalSandbox";
} | {
excludeSlashTmp: boolean;
excludeTmpdirEnvVar: boolean;
networkAccess: boolean;
type: "workspaceWrite";
writableRoots: string[];
};
interface AgentThreadConfigOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
baseInstructions?: string | null;
config?: {
[key: string]: AgentJsonValue | undefined;
} | null;
cwd?: string | null;
developerInstructions?: string | null;
model?: string | null;
modelProvider?: string | null;
personality?: AgentPersonality | null;
serviceTier?: string | null;
}
interface ThreadStartOptions extends AgentThreadConfigOptions {
ephemeral?: boolean | null;
sandbox?: AgentSandboxMode | null;
sessionStartSource?: AgentThreadStartSource | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadResumeOptions extends AgentThreadConfigOptions {
sandbox?: AgentSandboxMode | null;
}
interface ThreadForkOptions extends AgentThreadConfigOptions {
ephemeral?: boolean;
sandbox?: AgentSandboxMode | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadHistoryParams {
archived?: boolean | null;
cursor?: string | null;
cwd?: string | string[] | null;
limit?: number | null;
modelProviders?: string[] | null;
searchTerm?: string | null;
sortDirection?: AgentSortDirection | null;
sortKey?: AgentThreadSortKey | null;
sourceKinds?: AgentThreadSourceKind[] | null;
useStateDbOnly?: boolean;
}
interface TurnStartOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
cwd?: string | null;
effort?: ReasoningEffort | null;
model?: string | null;
outputSchema?: AgentJsonValue | null;
personality?: AgentPersonality | null;
sandboxPolicy?: AgentSandboxPolicy | null;
serviceTier?: string | null;
summary?: AgentReasoningSummary | null;
}
interface AgentAppsRefreshOptions {
cursor?: string | null;
forceRefetch?: boolean;
limit?: number | null;
threadId?: string | null;
}
interface AgentSkillsRefreshOptions {
cwds?: string[];
forceReload?: boolean;
}
interface AgentSkillConfigWriteOptions {
enabled: boolean;
name?: string | null;
path?: string | null;
}
interface AgentHooksRefreshOptions {
cwds?: string[];
}
interface AgentRunPolicy {
id: AgentRunPolicyId;
label: string;
description: string;
turnOptions: TurnStartOptions;
}
declare const AGENT_FULL_ACCESS_RUN_POLICY: AgentRunPolicy;
declare const DEFAULT_AGENT_RUN_POLICIES: readonly AgentRunPolicy[];
declare function effectiveAgentRunPolicies(policies: readonly AgentRunPolicy[] | undefined): readonly AgentRunPolicy[];
declare function resolvedAgentRunPolicyId(policyId: AgentRunPolicyId | undefined, policies: readonly AgentRunPolicy[]): AgentRunPolicyId | undefined;
declare function agentRunPolicyTurnOptions(policyId: AgentRunPolicyId | undefined, policies?: readonly AgentRunPolicy[]): TurnStartOptions | undefined;
interface AgentContextValue {
dispatch: (event: AgentEvent) => void;
runPolicies: readonly AgentRunPolicy[];
state: AgentSessionState;
transport: AgentTransport;
}
interface AgentProviderProps extends PropsWithChildren {
defaultRunPolicyId?: AgentRunPolicyId;
initialState?: AgentSessionState;
runPolicies?: readonly AgentRunPolicy[];
transport: AgentTransport;
}
declare function AgentProvider({ children, defaultRunPolicyId, initialState, runPolicies, transport, }: AgentProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentContext(): AgentContextValue;
declare function useAgentAction<TArgs extends unknown[], TResult>(action: (...args: TArgs) => Promise<TResult>): (...args: TArgs) => Promise<TResult>;
export { AgentProvider as A, effectiveAgentRunPolicies as B, resolvedAgentRunPolicyId as C, DEFAULT_AGENT_RUN_POLICIES as D, useAgentAction as E, useAgentContext as F, type ThreadStartOptions as T, type AgentProviderProps as a, type AgentAppsRefreshOptions as b, type AgentHooksRefreshOptions as c, type AgentSkillsRefreshOptions as d, type AgentSkillConfigWriteOptions as e, type TurnStartOptions as f, type AgentRunPolicy as g, type ThreadResumeOptions as h, type ThreadForkOptions as i, type ThreadHistoryParams as j, AGENT_FULL_ACCESS_RUN_POLICY as k, type AgentApprovalPolicy as l, type AgentApprovalsReviewer as m, type AgentContextValue as n, type AgentJsonValue as o, type AgentPersonality as p, type AgentReasoningSummary as q, type AgentSandboxMode as r, type AgentSandboxPolicy as s, type AgentSortDirection as t, type AgentThreadConfigOptions as u, type AgentThreadSortKey as v, type AgentThreadSource as w, type AgentThreadSourceKind as x, type AgentThreadStartSource as y, agentRunPolicyTurnOptions as z };
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReasoningEffort, AgentRunPolicyId, AgentEvent, AgentSessionState, AgentTransport } from '@nyosegawa/agent-ui-core';
import { PropsWithChildren } from 'react';
type AgentJsonValue = null | boolean | number | string | AgentJsonValue[] | {
[key: string]: AgentJsonValue | undefined;
};
type AgentApprovalPolicy = "untrusted" | "on-failure" | "on-request" | "never" | {
granular: {
mcp_elicitations: boolean;
request_permissions: boolean;
rules: boolean;
sandbox_approval: boolean;
skill_approval: boolean;
};
};
type AgentApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
type AgentReasoningSummary = "auto" | "concise" | "detailed" | "none";
type AgentPersonality = "none" | "friendly" | "pragmatic";
type AgentSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
type AgentThreadSource = "user" | "subagent" | "memory_consolidation";
type AgentThreadStartSource = "startup" | "clear";
type AgentThreadSortKey = "created_at" | "updated_at";
type AgentSortDirection = "asc" | "desc";
type AgentThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown";
type AgentSandboxPolicy = {
type: "dangerFullAccess";
} | {
networkAccess: boolean;
type: "readOnly";
} | {
networkAccess: "restricted" | "enabled";
type: "externalSandbox";
} | {
excludeSlashTmp: boolean;
excludeTmpdirEnvVar: boolean;
networkAccess: boolean;
type: "workspaceWrite";
writableRoots: string[];
};
interface AgentThreadConfigOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
baseInstructions?: string | null;
config?: {
[key: string]: AgentJsonValue | undefined;
} | null;
cwd?: string | null;
developerInstructions?: string | null;
model?: string | null;
modelProvider?: string | null;
personality?: AgentPersonality | null;
serviceTier?: string | null;
}
interface ThreadStartOptions extends AgentThreadConfigOptions {
ephemeral?: boolean | null;
sandbox?: AgentSandboxMode | null;
sessionStartSource?: AgentThreadStartSource | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadResumeOptions extends AgentThreadConfigOptions {
sandbox?: AgentSandboxMode | null;
}
interface ThreadForkOptions extends AgentThreadConfigOptions {
ephemeral?: boolean;
sandbox?: AgentSandboxMode | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadHistoryParams {
archived?: boolean | null;
cursor?: string | null;
cwd?: string | string[] | null;
limit?: number | null;
modelProviders?: string[] | null;
searchTerm?: string | null;
sortDirection?: AgentSortDirection | null;
sortKey?: AgentThreadSortKey | null;
sourceKinds?: AgentThreadSourceKind[] | null;
useStateDbOnly?: boolean;
}
interface TurnStartOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
cwd?: string | null;
effort?: ReasoningEffort | null;
model?: string | null;
outputSchema?: AgentJsonValue | null;
personality?: AgentPersonality | null;
sandboxPolicy?: AgentSandboxPolicy | null;
serviceTier?: string | null;
summary?: AgentReasoningSummary | null;
}
interface AgentAppsRefreshOptions {
cursor?: string | null;
forceRefetch?: boolean;
limit?: number | null;
threadId?: string | null;
}
interface AgentSkillsRefreshOptions {
cwds?: string[];
forceReload?: boolean;
}
interface AgentSkillConfigWriteOptions {
enabled: boolean;
name?: string | null;
path?: string | null;
}
interface AgentHooksRefreshOptions {
cwds?: string[];
}
interface AgentRunPolicy {
id: AgentRunPolicyId;
label: string;
description: string;
turnOptions: TurnStartOptions;
}
declare const AGENT_FULL_ACCESS_RUN_POLICY: AgentRunPolicy;
declare const DEFAULT_AGENT_RUN_POLICIES: readonly AgentRunPolicy[];
declare function effectiveAgentRunPolicies(policies: readonly AgentRunPolicy[] | undefined): readonly AgentRunPolicy[];
declare function resolvedAgentRunPolicyId(policyId: AgentRunPolicyId | undefined, policies: readonly AgentRunPolicy[]): AgentRunPolicyId | undefined;
declare function agentRunPolicyTurnOptions(policyId: AgentRunPolicyId | undefined, policies?: readonly AgentRunPolicy[]): TurnStartOptions | undefined;
interface AgentContextValue {
dispatch: (event: AgentEvent) => void;
runPolicies: readonly AgentRunPolicy[];
state: AgentSessionState;
transport: AgentTransport;
}
interface AgentProviderProps extends PropsWithChildren {
defaultRunPolicyId?: AgentRunPolicyId;
initialState?: AgentSessionState;
runPolicies?: readonly AgentRunPolicy[];
transport: AgentTransport;
}
declare function AgentProvider({ children, defaultRunPolicyId, initialState, runPolicies, transport, }: AgentProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentContext(): AgentContextValue;
declare function useAgentAction<TArgs extends unknown[], TResult>(action: (...args: TArgs) => Promise<TResult>): (...args: TArgs) => Promise<TResult>;
export { AgentProvider as A, effectiveAgentRunPolicies as B, resolvedAgentRunPolicyId as C, DEFAULT_AGENT_RUN_POLICIES as D, useAgentAction as E, useAgentContext as F, type ThreadStartOptions as T, type AgentProviderProps as a, type AgentAppsRefreshOptions as b, type AgentHooksRefreshOptions as c, type AgentSkillsRefreshOptions as d, type AgentSkillConfigWriteOptions as e, type TurnStartOptions as f, type AgentRunPolicy as g, type ThreadResumeOptions as h, type ThreadForkOptions as i, type ThreadHistoryParams as j, AGENT_FULL_ACCESS_RUN_POLICY as k, type AgentApprovalPolicy as l, type AgentApprovalsReviewer as m, type AgentContextValue as n, type AgentJsonValue as o, type AgentPersonality as p, type AgentReasoningSummary as q, type AgentSandboxMode as r, type AgentSandboxPolicy as s, type AgentSortDirection as t, type AgentThreadConfigOptions as u, type AgentThreadSortKey as v, type AgentThreadSource as w, type AgentThreadSourceKind as x, type AgentThreadStartSource as y, agentRunPolicyTurnOptions as z };
/* --- Failed first-message recovery -------------------------------------- */
.aui-composer-failed-list {
display: grid;
gap: var(--aui-space-200);
min-width: 0;
}
.aui-composer-failed-card {
align-items: start;
background: var(--aui-danger-soft);
border: 1px solid var(--aui-danger-border);
border-radius: var(--aui-radius-md);
display: grid;
gap: var(--aui-space-200);
grid-template-columns: auto minmax(0, 1fr) auto;
min-width: 0;
padding: var(--aui-space-225);
}
.aui-composer-failed-icon {
color: var(--aui-danger);
display: inline-flex;
padding-top: 2px;
}
.aui-composer-failed-copy {
display: grid;
gap: var(--aui-space-075);
min-width: 0;
}
.aui-composer-failed-copy h2,
.aui-composer-failed-copy p {
margin: 0;
}
.aui-composer-failed-copy h2 {
color: var(--aui-danger);
font-size: var(--aui-font-size-sm);
font-weight: 800;
line-height: var(--aui-line-tight);
}
.aui-composer-failed-copy p {
color: var(--aui-fg-muted);
font-size: var(--aui-font-size-sm);
line-height: var(--aui-line-relaxed);
overflow-wrap: anywhere;
}
.aui-composer-failed-actions {
align-items: center;
display: flex;
gap: var(--aui-space-100);
justify-content: flex-end;
min-width: 0;
}
/* --- Composer container-responsive layout -------------------------------- */
@container (max-width: 760px) {
.aui-composer-toolbar {
gap: var(--aui-space-100);
grid-template-columns: minmax(0, 1fr) auto;
}
.aui-composer-toolbar-start,
.aui-composer-toolbar-end {
flex-wrap: nowrap;
}
.aui-composer-settings {
gap: var(--aui-space-100);
}
.aui-composer-toolbar-attach .aui-btn {
min-width: var(--aui-control-height-lg);
padding-inline: 0;
width: var(--aui-control-height-lg);
}
.aui-composer-toolbar-attach .aui-btn[data-composer-integration="true"] {
max-width: min(160px, 42vw);
padding-inline: var(--aui-space-175);
width: auto;
}
.aui-composer-toolbar-attach .aui-btn span {
display: none;
}
.aui-composer-toolbar-attach .aui-btn[data-composer-integration="true"] span {
display: inline;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.aui-composer-tool {
gap: 0;
justify-content: center;
min-height: var(--aui-control-height-lg);
padding: 0;
width: var(--aui-control-height-lg);
}
.aui-composer-tool-label,
.aui-composer-tool > svg:last-child {
display: none;
}
.aui-context-usage summary {
min-width: var(--aui-control-height-lg);
padding-inline: 0;
width: var(--aui-control-height-lg);
}
.aui-context-usage summary span {
display: none;
}
.aui-composer-failed-card {
grid-template-columns: auto minmax(0, 1fr);
}
.aui-composer-failed-actions {
grid-column: 1 / -1;
justify-content: flex-start;
}
}
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { a as AgentI18nKey } from './normalize-Ba14sx7f.cjs';
declare function useAgentAccount(): {
account: _nyosegawa_agent_ui_core.AccountState;
cancelLogin: () => Promise<void>;
login: () => Promise<{
loginId: string | undefined;
userCode: string | undefined;
verificationUrl: string | undefined;
}>;
logout: () => Promise<void>;
readAccount: () => Promise<{
authenticated: boolean;
}>;
};
interface AgentBootstrapState {
errors: Error[];
isBootstrapping: boolean;
status: "idle" | "loading" | "ready" | "error";
}
declare function useAgentBootstrap(): AgentBootstrapState;
interface UsageWindow {
id: string;
label: string;
percent: number;
resetLabel?: string;
valueLabel: string;
}
type UsageTranslator = (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
declare function normalizeUsageWindows(rateLimits: unknown, t?: UsageTranslator): UsageWindow[];
export { type AgentBootstrapState as A, type UsageWindow as U, useAgentAccount as a, normalizeUsageWindows as n, useAgentBootstrap as u };
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { a as AgentI18nKey } from './normalize-Ba14sx7f.js';
declare function useAgentAccount(): {
account: _nyosegawa_agent_ui_core.AccountState;
cancelLogin: () => Promise<void>;
login: () => Promise<{
loginId: string | undefined;
userCode: string | undefined;
verificationUrl: string | undefined;
}>;
logout: () => Promise<void>;
readAccount: () => Promise<{
authenticated: boolean;
}>;
};
interface AgentBootstrapState {
errors: Error[];
isBootstrapping: boolean;
status: "idle" | "loading" | "ready" | "error";
}
declare function useAgentBootstrap(): AgentBootstrapState;
interface UsageWindow {
id: string;
label: string;
percent: number;
resetLabel?: string;
valueLabel: string;
}
type UsageTranslator = (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
declare function normalizeUsageWindows(rateLimits: unknown, t?: UsageTranslator): UsageWindow[];
export { type AgentBootstrapState as A, type UsageWindow as U, useAgentAccount as a, normalizeUsageWindows as n, useAgentBootstrap as u };
+6
-1312

@@ -1,1312 +0,6 @@

import * as react_jsx_runtime from 'react/jsx-runtime';
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { AgentEvent, AgentSessionState, AgentTransport, ReasoningEffort, AgentApp, AgentModel, ThreadId, RequestId, AgentError, ThreadState, ThreadStatus, ExecutionModeId, AgentThreadScope, AgentThreadCollection, AgentThreadView as AgentThreadView$1, PendingServerRequest, AgentItemBlock, AgentItemState, AgentItemBlockKind, ThreadTokenUsage, AgentThread, TurnState } from '@nyosegawa/agent-ui-core';
export { AgentThreadResumeDiagnosticReasonCode } from '@nyosegawa/agent-ui-core';
import React$1, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
interface AgentContextValue {
dispatch: (event: AgentEvent) => void;
state: AgentSessionState;
transport: AgentTransport;
}
interface AgentProviderProps extends PropsWithChildren {
initialState?: AgentSessionState;
transport: AgentTransport;
}
declare function AgentProvider({ children, initialState, transport }: AgentProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentContext(): AgentContextValue;
declare function useAgentAction<TArgs extends unknown[], TResult>(action: (...args: TArgs) => Promise<TResult>): (...args: TArgs) => Promise<TResult>;
type AgentUserInput = AgentTextInput | AgentImageInput | AgentLocalImageInput | AgentSkillInput | AgentMentionInput | AgentUnknownUserInput;
interface AgentTextInput {
text: string;
text_elements?: unknown[];
type: "text";
}
interface AgentImageInput {
image_url: string;
type: "image";
}
interface AgentLocalImageInput {
path: string;
type: "localImage";
}
interface AgentSkillInput {
name: string;
path: string;
type: "skill";
}
interface AgentMentionInput {
name: string;
path: string;
type: "mention";
}
interface AgentUnknownUserInput {
type: string;
[key: string]: unknown;
}
declare function useAgentAccount(): {
account: _nyosegawa_agent_ui_core.AccountState;
cancelLogin: () => Promise<void>;
login: () => Promise<{
loginId: string | undefined;
userCode: string | undefined;
verificationUrl: string | undefined;
}>;
logout: () => Promise<void>;
readAccount: () => Promise<{
authenticated: boolean;
}>;
};
interface AgentBootstrapState {
errors: Error[];
isBootstrapping: boolean;
status: "idle" | "loading" | "ready" | "error";
}
declare function useAgentBootstrap(): AgentBootstrapState;
type AgentJsonValue = null | boolean | number | string | AgentJsonValue[] | {
[key: string]: AgentJsonValue | undefined;
};
type AgentApprovalPolicy = "untrusted" | "on-failure" | "on-request" | "never" | {
granular: {
mcp_elicitations: boolean;
request_permissions: boolean;
rules: boolean;
sandbox_approval: boolean;
skill_approval: boolean;
};
};
type AgentApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
type AgentReasoningSummary = "auto" | "concise" | "detailed" | "none";
type AgentPersonality = "none" | "friendly" | "pragmatic";
type AgentSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
type AgentThreadSource = "user" | "subagent" | "memory_consolidation";
type AgentThreadStartSource = "startup" | "clear";
type AgentThreadSortKey = "created_at" | "updated_at";
type AgentSortDirection = "asc" | "desc";
type AgentThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown";
type AgentSandboxPolicy = {
type: "dangerFullAccess";
} | {
networkAccess: boolean;
type: "readOnly";
} | {
networkAccess: "restricted" | "enabled";
type: "externalSandbox";
} | {
excludeSlashTmp: boolean;
excludeTmpdirEnvVar: boolean;
networkAccess: boolean;
type: "workspaceWrite";
writableRoots: string[];
};
interface AgentThreadConfigOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
baseInstructions?: string | null;
config?: {
[key: string]: AgentJsonValue | undefined;
} | null;
cwd?: string | null;
developerInstructions?: string | null;
model?: string | null;
modelProvider?: string | null;
personality?: AgentPersonality | null;
serviceTier?: string | null;
}
interface ThreadStartOptions extends AgentThreadConfigOptions {
ephemeral?: boolean | null;
sandbox?: AgentSandboxMode | null;
sessionStartSource?: AgentThreadStartSource | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadResumeOptions extends AgentThreadConfigOptions {
sandbox?: AgentSandboxMode | null;
}
interface ThreadForkOptions extends AgentThreadConfigOptions {
ephemeral?: boolean;
sandbox?: AgentSandboxMode | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadHistoryParams {
archived?: boolean | null;
cursor?: string | null;
cwd?: string | string[] | null;
limit?: number | null;
modelProviders?: string[] | null;
searchTerm?: string | null;
sortDirection?: AgentSortDirection | null;
sortKey?: AgentThreadSortKey | null;
sourceKinds?: AgentThreadSourceKind[] | null;
useStateDbOnly?: boolean;
}
interface TurnStartOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
cwd?: string | null;
effort?: ReasoningEffort | null;
model?: string | null;
outputSchema?: AgentJsonValue | null;
personality?: AgentPersonality | null;
sandboxPolicy?: AgentSandboxPolicy | null;
serviceTier?: string | null;
summary?: AgentReasoningSummary | null;
}
interface AgentAppsRefreshOptions {
cursor?: string | null;
forceRefetch?: boolean;
limit?: number | null;
threadId?: string | null;
}
interface AgentSkillsRefreshOptions {
cwds?: string[];
forceReload?: boolean;
}
interface AgentSkillConfigWriteOptions {
enabled: boolean;
name?: string | null;
path?: string | null;
}
interface AgentHooksRefreshOptions {
cwds?: string[];
}
declare function useAgentApps(threadId?: string): {
apps: AgentApp[];
loadMoreApps: () => Promise<{
apps: AgentApp[];
nextCursor: string | null;
} | undefined>;
nextCursor: string | null | undefined;
refreshApps: (params?: AgentAppsRefreshOptions) => Promise<{
apps: AgentApp[];
nextCursor: string | null;
}>;
};
declare function useAgentSkills(cwd?: string): {
refreshSkills: (params?: AgentSkillsRefreshOptions) => Promise<{
cwd: string;
skills: {
enabled: boolean | undefined;
name: string;
path: string | undefined;
}[];
}[]>;
setSkillEnabled: (params: AgentSkillConfigWriteOptions) => Promise<void>;
skills: _nyosegawa_agent_ui_core.AgentSkill[];
};
declare function useAgentHooks(cwd?: string): {
hooks: _nyosegawa_agent_ui_core.AgentHook[];
refreshHooks: (params?: AgentHooksRefreshOptions) => Promise<{
cwd: string;
hooks: {
cwd: string;
enabled: boolean | undefined;
id: string;
name: string | undefined;
}[];
}[]>;
};
declare function useAgentDiagnostics(): {
auditDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
banners: _nyosegawa_agent_ui_core.StatusBannerState[];
developerDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
diagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
errors: _nyosegawa_agent_ui_core.AgentError[];
protocolNotifications: _nyosegawa_agent_ui_core.ProtocolNotificationState[];
userDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
warnings: _nyosegawa_agent_ui_core.WarningState[];
};
declare function useAgentModels(): {
models: AgentModel[];
refreshModels: () => Promise<AgentModel[]>;
};
declare function useAgentApprovals(threadId?: ThreadId): {
approvals: _nyosegawa_agent_ui_core.PendingServerRequest[];
approve: (requestId: RequestId, result?: unknown) => Promise<void>;
reject: (requestId: RequestId, message?: string) => Promise<void>;
};
declare function useAgentServerRequests(threadId?: ThreadId): {
requests: _nyosegawa_agent_ui_core.PendingServerRequest[];
respond: (requestId: RequestId, result: unknown) => Promise<void>;
reject: (requestId: RequestId, error: AgentError | string) => Promise<void>;
};
interface QueuedFollowUp {
attachments: QueuedFollowUpAttachment[];
expectedTurnId?: string;
id: string;
input: AgentUserInput[];
text: string;
threadId: ThreadId;
}
interface QueuedFollowUpAttachment {
displayName?: string;
extension?: string;
id: string;
input?: AgentUserInput | AgentUserInput[];
kind: "image" | "file" | "app" | "plugin";
label: string;
previewUrl?: string;
previewUrlRevoke?: boolean;
redactedPath?: string;
sizeLabel?: string;
value: string;
}
interface AgentThreadStartResult {
threadId: ThreadId;
}
interface AgentThreadStartWithInputResult {
operationId: string;
optimisticTurnId: string;
threadId: ThreadId;
turnId: string;
userMessageId: string;
}
interface AgentThreadStartWithInputOptions {
threadOptions?: ThreadStartOptions;
turnOptions?: TurnStartOptions;
}
interface AgentThreadResumeResult {
activeTurnId?: string;
activity?: ThreadState["activity"];
requestedThreadId?: ThreadId;
runSettings?: AgentThreadResumeRunSettings;
status?: ThreadStatus;
threadId: ThreadId;
}
interface AgentThreadResumeRunSettings {
cwd?: string;
effort?: string;
modelId?: string;
}
interface AgentThreadReadResult {
threadId: ThreadId;
}
interface AgentThreadForkResult {
threadId: ThreadId;
}
interface AgentThreadHistoryResult {
nextCursor: string | null;
threadIds: ThreadId[];
}
interface AgentComposerController {
activeTurnId?: string;
canSubmit: boolean;
cancelFailedPendingMessage: (operationId: string) => void;
disabledReason?: AgentComposerDisabledReason;
editQueuedFollowUp: (id: string) => QueuedFollowUp | undefined;
error?: string;
failedPendingMessages: AgentComposerFailedPendingMessage[];
followUpErrors: Record<string, string>;
isInterrupting: boolean;
isRunning: boolean;
isSubmitting: boolean;
queuedFollowUps: QueuedFollowUp[];
removeQueuedFollowUp: (id: string) => void;
retryFailedPendingMessage: (operationId: string) => Promise<void>;
sendQueuedFollowUp: (id: string) => Promise<void>;
sendingFollowUpIds: string[];
setError: Dispatch<SetStateAction<string | undefined>>;
setValue: Dispatch<SetStateAction<string>>;
startThreadWithInput: (input: string | AgentUserInput[], options?: AgentThreadStartWithInputOptions) => Promise<AgentThreadStartWithInputResult>;
steerNow: (items?: AgentUserInput[]) => Promise<void>;
stop: () => Promise<void>;
submit: (items?: AgentUserInput[], options?: {
attachments?: QueuedFollowUpAttachment[];
}) => Promise<string | undefined>;
submitMode: AgentComposerSubmitMode;
value: string;
}
type AgentComposerDisabledReason = "empty" | "interrupting" | "submitting";
interface AgentComposerFailedPendingMessage {
error?: string;
operationId: string;
threadId: string;
}
type AgentComposerSubmitMode = "queue" | "send" | "stop";
declare function useAgentComposer(threadId?: ThreadId): AgentComposerController;
declare function useAgentComposerController(threadId?: ThreadId): AgentComposerController;
interface AgentExecutionMode {
id: ExecutionModeId;
label: string;
description: string;
turnParams: TurnStartOptions;
}
declare const AGENT_EXECUTION_MODES: AgentExecutionMode[];
declare function useAgentRunSettings(): {
executionModes: AgentExecutionMode[];
models: AgentModel[];
runSettings: _nyosegawa_agent_ui_core.RunSettingsState;
selectedModel: AgentModel | undefined;
setCwd: (cwd: string) => void;
setEffort: (effort: ReasoningEffort) => void;
setExecutionMode: (executionMode: ExecutionModeId) => void;
setModelId: (modelId: string) => void;
supportedEfforts: string[];
};
declare function useAgentThread(threadId?: ThreadId): {
resumeThread: (id: ThreadId, params?: ThreadResumeOptions) => Promise<{
threadId: string;
runSettings?: AgentThreadResumeRunSettings | undefined;
requestedThreadId?: string | undefined;
activity?: "idle" | "failed" | "running" | "waitingForInput" | undefined;
status?: ThreadStatus | undefined;
activeTurnId?: string | undefined;
}>;
startThread: (params?: ThreadStartOptions) => Promise<{
threadId: string;
}>;
thread: ThreadState | undefined;
threadId: string | undefined;
turns: (_nyosegawa_agent_ui_core.TurnState | undefined)[];
};
declare const useAgentThreadController: typeof useAgentThread;
declare function useAgentThreadActions(threadId?: ThreadId): {
archiveThread: () => Promise<void>;
compactThread: () => Promise<void>;
forkThread: (params?: ThreadForkOptions) => Promise<{
threadId: string;
}>;
renameThread: (name: string) => Promise<void>;
rollbackThread: (numTurns?: number) => Promise<void>;
threadId: string | undefined;
unarchiveThread: () => Promise<void>;
};
declare function useAgentThreads(): {
activeThreadId: string | undefined;
setActiveThread: (threadId?: ThreadId) => void;
threads: ThreadState[];
};
declare function useAgentThreadHistory(): {
cursor: string | null | undefined;
error: Error | undefined;
isLoading: boolean;
listThreads: (params?: ThreadHistoryParams) => Promise<{
nextCursor: string | null;
threadIds: string[];
}>;
threads: ThreadState[];
};
declare function useAgentThreadReader(): {
readThread: (threadId: ThreadId, options?: {
activate?: boolean;
includeTurns?: boolean;
}) => Promise<{
threadId: string;
}>;
};
interface AgentThreadListController {
activateThread: (threadId: ThreadId) => Promise<ThreadId>;
collection?: AgentThreadCollection;
error?: AgentError;
hasLoaded: boolean;
invalidate: () => void;
isLoading: boolean;
listThreads: (params?: AgentThreadListRequest) => Promise<AgentThreadListResult>;
loadNextPage: () => Promise<AgentThreadListResult | undefined>;
nextCursor: string | null;
previewThread: (threadId: ThreadId) => Promise<void>;
refresh: () => Promise<AgentThreadListResult>;
resumeThread: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<ThreadId>;
resumeThreadWithResult: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<AgentThreadResumeResult>;
scope: AgentThreadScope;
searchTerm: string;
setSearchTerm: (searchTerm: string) => void;
threads: AgentThreadView$1[];
}
interface AgentThreadListRequest extends ThreadHistoryParams {
append?: boolean;
}
interface AgentThreadListResult extends AgentThreadHistorySyncedEvent {
stale: boolean;
}
interface AgentThreadListControllerOptions {
onHistorySynced?: (event: AgentThreadHistorySyncedEvent) => void;
}
interface AgentThreadHistorySyncedEvent {
append: boolean;
nextCursor: string | null;
scope: AgentThreadScope;
searchTerm?: string;
syncedAt: number;
threadIds: ThreadId[];
}
declare function useAgentThreadListController(scope?: AgentThreadScope, options?: AgentThreadListControllerOptions): AgentThreadListController;
declare function useAgentTurn(threadId?: ThreadId): {
interruptTurn: (turnId: string) => Promise<void>;
startTurn: (input: string | AgentUserInput[], params?: TurnStartOptions) => Promise<void>;
steerTurn: (expectedTurnId: string, input: string | AgentUserInput[]) => Promise<void>;
};
declare const useAgentTurnController: typeof useAgentTurn;
interface AgentTranscriptScrollControllerOptions {
hiddenItemCount?: number;
onShowEarlierItems?: () => void;
pendingApprovalSelector?: string;
scrollContainerRef?: React$1.RefObject<HTMLElement | null>;
scrollKey?: string | number;
threadId: string;
turnCount: number;
}
interface AgentTranscriptScrollController {
canShowEarlierItems: boolean;
handleScroll(): void;
jumpToLatest(): void;
jumpToPendingApproval(): void;
scrollContainerRef: React$1.RefObject<HTMLElement | null>;
showEarlierItems(): void;
showJumpLatest: boolean;
showJumpApproval: boolean;
}
declare function useAgentTranscriptScrollController({ hiddenItemCount, onShowEarlierItems, pendingApprovalSelector, scrollContainerRef, scrollKey, threadId, turnCount, }: AgentTranscriptScrollControllerOptions): AgentTranscriptScrollController;
interface ApprovalAnchors {
afterTurn: PendingServerRequest[];
byItemId: Record<string, PendingServerRequest[]>;
renderApprovalAnchor: (approval: PendingServerRequest) => React$1.ReactNode;
}
interface TranscriptApprovalAnchors {
requests: PendingServerRequest[];
renderApprovalAnchor: (approval: PendingServerRequest) => React$1.ReactNode;
}
type AgentTranscriptDensityMode = "default" | "compact" | "verbose" | "critical-only";
interface AgentTranscriptDensityConfig {
default?: AgentTranscriptDensityMode;
byBlockKind?: Partial<Record<AgentItemBlockKind, AgentTranscriptDensityMode>>;
}
type AgentTranscriptDensity = AgentTranscriptDensityMode | AgentTranscriptDensityConfig;
interface AgentTranscriptPendingState {
status: "failed" | "inProgress";
}
type AgentTranscriptBlock = AgentItemBlock;
type AgentTranscriptItem = AgentItemState;
interface AgentTranscriptEntry {
approvals: PendingServerRequest[];
block: AgentTranscriptBlock;
dataKind: string;
density: AgentTranscriptDensityMode;
displayStatus: string;
id: string;
item?: AgentTranscriptItem;
itemId: string;
key: string;
pending?: AgentTranscriptPendingState;
role: "assistant" | "command" | "system" | "tool" | "user";
status: AgentItemState["status"] | "streaming";
text?: string;
turnId: string;
}
interface AgentTranscriptControllerOptions {
approvalAnchors?: TranscriptApprovalAnchors;
density?: AgentTranscriptDensity;
}
interface AgentTranscriptController {
density: AgentTranscriptDensityMode;
entries: AgentTranscriptEntry[];
entriesByTurnId: Map<string, AgentTranscriptEntry[]>;
hiddenItemCount: number;
showEarlierItems(): void;
visibleItemCount: number;
}
declare function useAgentTranscriptController(threadId?: ThreadId, options?: AgentTranscriptControllerOptions): AgentTranscriptController;
declare function useAgentUsage(): {
rateLimits: unknown;
refreshUsage: () => Promise<void>;
};
type AgentLocale = "en" | "ja" | "ko" | "zh-CN" | "es" | "fr";
declare const agentLocales: AgentLocale[];
interface AgentI18nDictionary {
"account.authenticated": string;
"account.authenticating": string;
"account.checking": string;
"account.connecting": string;
"account.cancelLogin": string;
"account.details": string;
"account.email": string;
"account.login": string;
"account.logout": string;
"account.openDeviceLogin": string;
"account.openMenu": string;
"account.plan": string;
"account.status": string;
"account.unauthenticated": string;
"approval.action.approve": string;
"approval.action.approveAria": string;
"approval.action.approveForSession": string;
"approval.action.approveForSessionAria": string;
"approval.action.decline": string;
"approval.action.declineAria": string;
"approval.action.review": string;
"approval.action.reviewAria": string;
"approval.aria.otherPending": string;
"approval.aria.pending": string;
"approval.aria.pendingOne": string;
"approval.count": string;
"approval.kind.attestation": string;
"approval.kind.authRefresh": string;
"approval.kind.command": string;
"approval.kind.dynamicTool": string;
"approval.kind.fileChange": string;
"approval.kind.generic": string;
"approval.kind.mcpInput": string;
"approval.kind.permissions": string;
"approval.kind.userInput": string;
"approval.meta.approvalPolicy": string;
"approval.meta.item": string;
"approval.meta.namespace": string;
"approval.meta.sandbox": string;
"approval.meta.tool": string;
"approval.meta.workingDirectory": string;
"approval.request.command": string;
"approval.request.fileChange": string;
"approval.request.generic": string;
"approval.risk.high": string;
"approval.risk.low": string;
"approval.risk.medium": string;
"approval.riskSuffix": string;
"approval.summary.command": string;
"approval.summary.default": string;
"approval.summary.dynamicTool": string;
"approval.summary.fileChange": string;
"approval.summary.mcpInput": string;
"approval.summary.permissions": string;
"approval.summary.userInput": string;
"aria.actions": string;
"aria.agentContext": string;
"aria.changedFiles": string;
"aria.codeMirrorPatchViewer": string;
"aria.commandOutput": string;
"aria.completedTask": string;
"aria.composerAttachments": string;
"aria.contextUsage": string;
"aria.contextUsageDetails": string;
"aria.criticalStatus": string;
"aria.diffPreview": string;
"aria.dismissThreadHistory": string;
"aria.message": string;
"aria.messageComposer": string;
"aria.openTask": string;
"aria.patchContent": string;
"aria.pendingAttachments": string;
"aria.runSettings": string;
"aria.statusDetails": string;
"aria.statusSummary": string;
"aria.threadStartContext": string;
"aria.threads": string;
"aria.tokenUsage": string;
"aria.usageLimits": string;
"aria.usageSummary": string;
"apps.authNeeded": string;
"apps.disabled": string;
"apps.empty": string;
"apps.label": string;
"apps.loadMore": string;
"apps.notInstalled": string;
"apps.unavailable": string;
"common.cancel": string;
"common.close": string;
"common.closeMenu": string;
"common.collapse": string;
"common.default": string;
"common.details": string;
"common.disable": string;
"common.enable": string;
"common.expand": string;
"common.file": string;
"common.files": string;
"common.loading": string;
"common.message": string;
"common.messages": string;
"common.notice": string;
"common.notices": string;
"common.open": string;
"common.refresh": string;
"common.refreshing": string;
"common.serverDefault": string;
"common.syncPending": string;
"common.unknown": string;
"composer.addFollowUp": string;
"composer.attachFile": string;
"composer.attachFiles": string;
"composer.attachedFollowUp": string;
"composer.attachmentRejected": string;
"composer.attachmentRejectedMany": string;
"composer.attachmentRejectedOne": string;
"composer.cannotAcceptFollowUp": string;
"composer.couldNotSendAdditional": string;
"composer.couldNotStart": string;
"composer.couldNotStop": string;
"composer.enterToSend": string;
"composer.followUpNoActiveTurn": string;
"composer.followUpTurnChanged": string;
"composer.followUpTurnChangedRefresh": string;
"composer.app": string;
"composer.mentionApp": string;
"composer.mentionPlugin": string;
"composer.plugin": string;
"composer.placeholder": string;
"composer.removeAttachment": string;
"composer.resolveApprovalReason": string;
"composer.send": string;
"composer.sendMessage": string;
"composer.stopCurrentTurn": string;
"context.cachedInput": string;
"context.compactionNotice": string;
"context.contextWindow": string;
"context.input": string;
"context.lastTurn": string;
"context.output": string;
"context.reasoning": string;
"context.title": string;
"context.used": string;
"diagnostics.label": string;
"diagnostics.messageCount": string;
"diagnostics.pluginManifestWarnings": string;
"diagnostics.syncing": string;
"diagnostics.withPluginWarnings": string;
"firstRun.authenticating.body": string;
"firstRun.authenticating.title": string;
"firstRun.bridgeError.body": string;
"firstRun.bridgeError.title": string;
"firstRun.connect.body": string;
"firstRun.connect.cta": string;
"firstRun.connect.title": string;
"firstRun.error": string;
"firstRun.form": string;
"firstRun.placeholder": string;
"firstRun.preparing.body": string;
"firstRun.preparing.cta": string;
"firstRun.preparing.title": string;
"firstRun.startThread": string;
"followUp.attachments": string;
"followUp.attachmentsMany": string;
"followUp.attachmentsOne": string;
"followUp.earlier": string;
"followUp.earlierMany": string;
"followUp.earlierOne": string;
"followUp.earlierQueued": string;
"followUp.edit": string;
"followUp.queued": string;
"followUp.queuedAttachments": string;
"followUp.remove": string;
"followUp.sendNow": string;
"locale.en": string;
"locale.es": string;
"locale.fr": string;
"locale.ja": string;
"locale.ko": string;
"locale.label": string;
"locale.zh-CN": string;
"markdown.completedTask": string;
"markdown.openTask": string;
"run.clearWorkingDirectory": string;
"run.cwd.noRecent": string;
"run.cwd.openFolder": string;
"run.cwd.openFolderAction": string;
"run.cwd.prompt": string;
"run.cwd.recent": string;
"run.cwd.selectFolder": string;
"run.cwd.serverDefault": string;
"run.defaultEffort": string;
"run.defaultModel": string;
"run.effort": string;
"run.effort.high": string;
"run.effort.low": string;
"run.effort.medium": string;
"run.effort.minimal": string;
"run.effort.veryHigh": string;
"run.executionMode": string;
"run.mode": string;
"run.mode.auto.description": string;
"run.mode.auto.label": string;
"run.mode.full-access.description": string;
"run.mode.full-access.label": string;
"run.mode.read-only.description": string;
"run.mode.read-only.label": string;
"run.mode.review.description": string;
"run.mode.review.label": string;
"run.model": string;
"run.modelAndEffort": string;
"run.modelDefault": string;
"run.noSelectableEffort": string;
"run.serverDefault": string;
"run.workingDirectory": string;
"skills.empty": string;
"skills.label": string;
"status.account": string;
"status.backgroundNotice": string;
"status.configWarning": string;
"status.critical": string;
"status.deprecationNotice": string;
"status.failed": string;
"status.mcpOAuth": string;
"status.modelReroute": string;
"status.rateLimit": string;
"status.title": string;
"status.total": string;
"status.warning": string;
"theme.dark": string;
"theme.label": string;
"theme.light": string;
"theme.system": string;
"thread.action.archive": string;
"thread.action.compact": string;
"thread.action.fork": string;
"thread.action.rename": string;
"thread.action.rollback": string;
"thread.action.unarchive": string;
"thread.closeHistory": string;
"thread.codexSession": string;
"thread.collapseHistory": string;
"thread.empty": string;
"thread.ephemeralSession": string;
"thread.expandHistory": string;
"thread.history": string;
"thread.namePrompt": string;
"thread.new": string;
"thread.noThreadsFound": string;
"thread.openHistory": string;
"thread.search": string;
"thread.searchHistory": string;
"thread.status.complete": string;
"thread.status.failed": string;
"thread.status.needsApproval": string;
"thread.status.preview": string;
"thread.status.ready": string;
"thread.status.running": string;
"thread.status.stored": string;
"thread.threadCount": string;
"thread.untitled": string;
"timeline.agentTool": string;
"timeline.arguments": string;
"timeline.argumentsPreview": string;
"timeline.assistant": string;
"timeline.collab": string;
"timeline.collabTool": string;
"timeline.command": string;
"timeline.compaction": string;
"timeline.diff": string;
"timeline.earlierHidden": string;
"timeline.error": string;
"timeline.exitCode": string;
"timeline.file": string;
"timeline.fileChange": string;
"timeline.fileChanges": string;
"timeline.files": string;
"timeline.filesChanged": string;
"timeline.from": string;
"timeline.image": string;
"timeline.imageGenerated": string;
"timeline.localMediaUnavailable": string;
"timeline.item": string;
"timeline.items": string;
"timeline.jumpToPendingApproval": string;
"timeline.jumpToLatest": string;
"timeline.lines": string;
"timeline.mcpTool": string;
"timeline.noPatch": string;
"timeline.noTerminalOutput": string;
"timeline.output": string;
"timeline.plan": string;
"timeline.reasoning": string;
"timeline.result": string;
"timeline.resultCaptured": string;
"timeline.resultItems": string;
"timeline.search": string;
"timeline.showEarlier": string;
"timeline.system": string;
"timeline.terminal": string;
"timeline.thinking": string;
"timeline.thread": string;
"timeline.to": string;
"timeline.tool": string;
"timeline.toolCall": string;
"timeline.unknownTool": string;
"timeline.webSearch": string;
"timeline.you": string;
"usage.empty": string;
"usage.inputOutput": string;
"usage.label": string;
"usage.limits": string;
"usage.meterLabel": string;
"usage.namedWindow": string;
"usage.resetAt": string;
"usage.hourWindow": string;
"usage.tokens": string;
"usage.title": string;
"usage.weeklyWindow": string;
}
type AgentI18nKey = keyof AgentI18nDictionary;
type AgentI18nMessages = Partial<AgentI18nDictionary>;
interface AgentI18nValue {
locale: AgentLocale;
t: (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
}
interface AgentI18nProviderProps extends PropsWithChildren {
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
}
declare function AgentI18nProvider({ children, locale, messages, }: AgentI18nProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentI18n(): AgentI18nValue;
declare function interpolate(template: string, vars: Record<string, string | number> | undefined): string;
declare function interpolationVariables(template: string): string[];
declare const agentI18nDictionaries: Record<AgentLocale, AgentI18nDictionary>;
declare function normalizeAgentLocale(locale?: AgentLocale | string): AgentLocale;
type AgentResourceKind = "image" | "file" | "app" | "plugin" | "url" | "unavailable";
interface AgentResolvedResourceBase {
displayName?: string;
id?: string;
input?: AgentUserInput | AgentUserInput[];
mimeType?: string;
name?: string;
path?: string;
previewUrl?: string;
redactedPath?: string;
reason?: string;
sizeBytes?: number;
url?: string;
}
interface AgentResolvedUrlResource extends AgentResolvedResourceBase {
kind: "url";
}
interface AgentUnavailableResource extends AgentResolvedResourceBase {
kind: "unavailable";
}
type AgentResolvedResource = AgentResolvedUrlResource | AgentUnavailableResource;
interface AgentFileResourceRequest {
file: File;
kind: Extract<AgentResourceKind, "image" | "file">;
source: "file";
}
interface AgentLocalMediaResourceRequest {
item?: AgentItemState;
path: string;
source: "local-media";
}
type AgentResourceRequest = AgentFileResourceRequest | AgentLocalMediaResourceRequest;
type AgentResourceResolution = AgentResolvedResource | null | undefined;
type AgentResourceResolver = (request: AgentResourceRequest) => AgentResourceResolution | Promise<AgentResourceResolution>;
declare function agentResourceUrl(resource: AgentResolvedResourceBase | null | undefined): string | undefined;
declare function agentResourceDisplayName(resource: AgentResolvedResourceBase | null | undefined, fallback?: string): string | undefined;
type ComposerAttachmentKind = Extract<AgentResourceKind, "image" | "file" | "app" | "plugin">;
type AgentLocalAttachmentKind = Extract<AgentResourceKind, "image" | "file">;
interface AgentResolvedLocalAttachment extends AgentResolvedResourceBase {
input: AgentUserInput | AgentUserInput[];
}
type AgentLocalAttachmentResolver = (file: File, kind: AgentLocalAttachmentKind) => AgentResolvedLocalAttachment | null | undefined | Promise<AgentResolvedLocalAttachment | null | undefined>;
type AgentMentionAttachmentKind = Extract<ComposerAttachmentKind, "app" | "plugin">;
interface AgentComposerMentionAttachment {
id?: string;
input?: AgentUserInput;
label: string;
value: string;
}
type AgentComposerMentionResolver = () => AgentComposerMentionAttachment | null | undefined | Promise<AgentComposerMentionAttachment | null | undefined>;
interface AgentComposerSubmitButtonProps {
canSubmit: boolean;
className?: string;
iconSize?: number;
isStopAction: boolean;
label?: string;
title?: string;
}
declare function AgentComposerSubmitButton({ canSubmit, className, iconSize, isStopAction, label, title, }: AgentComposerSubmitButtonProps): react_jsx_runtime.JSX.Element;
type AgentAttachmentChipKind = Extract<AgentResourceKind, "image" | "file" | "app" | "plugin">;
interface AgentAttachmentChip {
extension?: string;
id: string;
kind: AgentAttachmentChipKind;
label: string;
previewFailed?: boolean;
previewUrl?: string;
sizeLabel?: string;
}
interface AgentAttachmentChipsProps {
attachments: readonly AgentAttachmentChip[];
onPreviewFailed?: (id: string) => void;
onRemove?: (id: string) => void;
}
declare function AgentAttachmentChips({ attachments, onPreviewFailed, onRemove, }: AgentAttachmentChipsProps): react_jsx_runtime.JSX.Element | null;
interface AgentComposerInputProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
shortcutHintId?: string;
}
declare const AgentComposerInput: React$1.ForwardRefExoticComponent<AgentComposerInputProps & React$1.RefAttributes<HTMLTextAreaElement>>;
interface AgentComposerToolbarProps {
className?: string;
end?: React$1.ReactNode;
start?: React$1.ReactNode;
}
declare function AgentComposerToolbar({ className, end, start, }: AgentComposerToolbarProps): react_jsx_runtime.JSX.Element;
declare function AgentComposer(props: AgentComposerProps): react_jsx_runtime.JSX.Element;
interface AgentComposerProps {
disabled?: boolean;
disabledReason?: string;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
placeholder?: string;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
tokenUsage?: ThreadTokenUsage;
threadId?: string;
}
interface AgentComposerPanelProps {
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
thread: ThreadState;
threadId?: string;
}
declare function AgentComposerPanel({ onRequestAppMention, onRequestPluginMention, resolveLocalAttachment, thread, threadId, }: AgentComposerPanelProps): react_jsx_runtime.JSX.Element;
type AgentWorkingDirectoryResolver = () => Promise<string | null | undefined> | string | null | undefined;
/**
* Compact working-directory selector for the start screen. cwd is a
* thread-start setting, so it sits beneath the starter composer as a context
* pill rather than inside the composer toolbar.
*/
declare function AgentStarterCwd({ onRequestWorkingDirectory, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
}): react_jsx_runtime.JSX.Element;
interface AgentRunControlsProps {
autoRefresh?: boolean;
/**
* "compact" renders an inline, dense form intended to sit inside another
* surface. "panel" renders the full-width labeled settings form used by the
* empty-state and fixture gallery close-up.
*/
variant?: "compact" | "panel";
}
declare function AgentRunControls({ autoRefresh, variant, }?: AgentRunControlsProps): react_jsx_runtime.JSX.Element;
interface AgentRunSettingsPanelProps {
autoRefresh?: boolean;
}
declare function AgentRunSettingsPanel({ autoRefresh, }?: AgentRunSettingsPanelProps): react_jsx_runtime.JSX.Element;
/**
* Mode / model / effort selectors that live directly inside the composer
* toolbar. Working directory is intentionally absent here; cwd is a
* thread-start setting and is shown read-only in the thread header for an
* existing thread.
*/
declare function ComposerRunSettings(): react_jsx_runtime.JSX.Element;
declare function AgentFirstRun({ onRequestWorkingDirectory, onStartThread, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}): react_jsx_runtime.JSX.Element;
interface AgentStartComposerProps {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}
declare function AgentStartComposer({ onRequestWorkingDirectory, onStartThread, }: AgentStartComposerProps): react_jsx_runtime.JSX.Element;
declare function ThreadList({ activeThreadId, footer, onSelectThread, threads, }: {
activeThreadId?: string;
footer?: React.ReactNode;
onSelectThread?: (threadId: string) => void;
threads: AgentThreadView$1[];
}): react_jsx_runtime.JSX.Element;
declare function formatThreadStatus(status: string, options?: {
hasTurns?: boolean;
t?: (key: AgentI18nKey) => string;
}): string;
declare function threadSubtitle(thread: AgentThread, t?: (key: AgentI18nKey) => string): string;
declare function isUserFacingPath(path: string): boolean;
declare function AgentThreadSidebar({ activeThreadId, collapsed, onCreateThread, onCollapsedChange, onSelectThread, }: {
activeThreadId?: string;
collapsed?: boolean;
onCreateThread?: () => void;
onCollapsedChange?: (collapsed: boolean) => void;
onSelectThread?: (threadId: string) => void;
}): react_jsx_runtime.JSX.Element | null;
type AgentTheme = "light" | "dark" | "system";
interface AgentThemeToggleProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (theme: AgentTheme) => void;
value: AgentTheme;
}
declare function AgentThemeToggle({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentThemeToggleProps): react_jsx_runtime.JSX.Element;
interface AgentThreadUrlRoutingOptions {
basePath?: string;
homePath?: string;
}
type AgentLocalMediaUrlResolver = (path: string, item: AgentItemState | undefined) => AgentResourceResolution;
declare function AgentContentBlockView({ block, item, output, patch, resolveLocalMediaUrl, }: {
block: AgentItemBlock;
item?: AgentItemState;
output?: string;
patch?: unknown;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCommandItem({ block, item, itemId, output, }: {
block?: AgentItemBlock;
item?: AgentItemState;
itemId?: string;
output?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentFileChangeItem({ block, item, patch, }: {
block?: AgentItemBlock;
item?: AgentItemState;
patch?: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentReasoningItem({ block }: {
block: AgentItemBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentToolCallItem({ block }: {
block: AgentItemBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentMessageItem({ text }: {
text: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentCommandOutputItem: typeof AgentCommandItem;
declare const AgentDiffItem: typeof AgentFileChangeItem;
declare function AgentMessageList({ footer, approvalAnchors, components, renderItem, density, resolveLocalMediaUrl, scrollKey, thread, }: {
/**
* Trailing transcript content rendered as the final scroll-area item.
* The default thread view uses it to keep the pending-approval surface
* inside the transcript instead of in a separate scroll pane.
*/
footer?: React$1.ReactNode;
approvalAnchors?: TranscriptApprovalAnchors;
components?: AgentComponents;
density?: AgentTranscriptDensity;
renderItem?: (item: AgentItemState, turn: TurnState, Default: React$1.ComponentType<AgentItemDefaultProps>) => React$1.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
/** Changing this value scrolls the transcript to its end (e.g. a new approval). */
scrollKey?: string | number;
thread: ThreadState;
}): react_jsx_runtime.JSX.Element;
declare const AgentTranscript: typeof AgentMessageList;
declare function AgentTurn({ approvals, components, entries, renderItem, resolveLocalMediaUrl, threadStatus, turn, }: {
approvals?: ApprovalAnchors;
components?: AgentComponents;
entries?: AgentTranscriptEntry[];
renderItem?: (item: AgentItemState, turn: TurnState, Default: React$1.ComponentType<AgentItemDefaultProps>) => React$1.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadStatus: ThreadState["status"];
turn: TurnState;
}): react_jsx_runtime.JSX.Element;
interface AgentApprovalComponentProps {
approval: PendingServerRequest;
Default: React$1.ComponentType<AgentApprovalDefaultProps>;
}
interface AgentApprovalDefaultProps {
approval: PendingServerRequest;
}
interface AgentItemComponentProps {
Default: React$1.ComponentType<AgentItemDefaultProps>;
item: AgentItemState;
turn: TurnState;
}
interface AgentItemDefaultProps {
item: AgentItemState;
turn: TurnState;
}
interface AgentShellComponentProps extends AgentShellProps {
Default: React$1.ComponentType<AgentShellProps>;
}
interface AgentSidebarComponentProps extends React$1.ComponentProps<typeof AgentThreadSidebar> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentThreadSidebar>>;
}
interface AgentEmptyStateComponentProps extends React$1.ComponentProps<typeof AgentFirstRun> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentFirstRun>>;
}
interface AgentComposerPanelComponentProps extends AgentComposerPanelProps {
Default: React$1.ComponentType<AgentComposerPanelProps>;
}
interface AgentBlockDefaultProps {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
}
interface AgentBlockComponentProps extends AgentBlockDefaultProps {
Default: React$1.ComponentType<AgentBlockDefaultProps>;
}
interface AgentComponents {
Approval?: React$1.ComponentType<AgentApprovalComponentProps>;
ComposerPanel?: React$1.ComponentType<AgentComposerPanelComponentProps>;
EmptyState?: React$1.ComponentType<AgentEmptyStateComponentProps>;
Item?: React$1.ComponentType<AgentItemComponentProps>;
Shell?: React$1.ComponentType<AgentShellComponentProps>;
Sidebar?: React$1.ComponentType<AgentSidebarComponentProps>;
blocks?: Partial<Record<AgentTranscriptBlock["kind"], React$1.ComponentType<AgentBlockComponentProps>>>;
}
declare const defaultAgentComponents: {
ComposerPanel: typeof AgentComposerPanel;
EmptyState: typeof AgentFirstRun;
Shell: typeof AgentShell;
Sidebar: typeof AgentThreadSidebar;
};
interface AgentChatProps {
className?: string;
components?: AgentComponents;
diagnostics?: boolean;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
sidebar?: boolean;
statusBarEnd?: React$1.ReactNode;
theme?: AgentTheme;
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
threadUrlRouting?: boolean | AgentThreadUrlRoutingOptions;
usage?: boolean;
}
declare function AgentChat({ className, components, diagnostics, onRequestAppMention, onRequestWorkingDirectory, onRequestPluginMention, resolveLocalAttachment, resolveLocalMediaUrl, sidebar, statusBarEnd, theme, locale, messages, threadUrlRouting, usage, }?: AgentChatProps): react_jsx_runtime.JSX.Element;
interface AgentShellProps extends React$1.HTMLAttributes<HTMLElement> {
sidebar?: React$1.ReactNode;
theme?: AgentTheme;
}
declare function AgentShell({ children, className, sidebar, theme, ...props }: AgentShellProps): react_jsx_runtime.JSX.Element;
interface AgentThreadViewProps {
components?: AgentComponents;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
renderItem?: React$1.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}
declare function AgentThreadView({ components, onRequestAppMention, onRequestPluginMention, renderApproval, renderItem, resolveLocalAttachment, resolveLocalMediaUrl, threadId, }: AgentThreadViewProps): react_jsx_runtime.JSX.Element | null;
declare function AgentThreadSurface({ children, className, }: {
children: React$1.ReactNode;
className?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentThreadHeader({ thread, threadId, }: {
thread: ThreadState;
threadId?: string;
}): react_jsx_runtime.JSX.Element;
/**
* Renders the thread transcript. When a `threadId` is supplied, pending
* approvals with upstream item or turn metadata are anchored immediately after
* that transcript context. Metadata-free approvals fall back to the transcript
* tail so they stay in the scroll area, not a separate pane above the composer.
*/
declare function AgentThreadTimeline({ components, renderApproval, renderItem, resolveLocalMediaUrl, thread, threadId, }: {
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
renderItem?: React$1.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
thread: ThreadState;
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentContextUsageIndicator({ tokenUsage, }: {
tokenUsage?: ThreadTokenUsage;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentApprovalQueue({ approvals: approvalsProp, renderApproval, threadId, }: {
approvals?: PendingServerRequest[];
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
interface AgentUsageProps {
autoRefresh?: boolean;
}
declare function AgentUsagePanel({ autoRefresh }?: AgentUsageProps): react_jsx_runtime.JSX.Element;
declare function AgentUsageSummary(): react_jsx_runtime.JSX.Element;
declare function AgentRateLimitBar({ label, percent, }: {
label: string;
percent: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentTokenUsageBar({ inputTokens, outputTokens, totalTokens, }: {
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentSkillsPanel({ cwd }: {
cwd?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentAppsPanel({ threadId }: {
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentStatusBar({ end, onNavigateHome, onOpenThreads, }?: {
end?: React$1.ReactNode;
onNavigateHome?: () => void;
onOpenThreads?: () => void;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiagnosticsPanel({ bootstrap, }: {
bootstrap: ReturnType<typeof useAgentBootstrap>;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusSummary(): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusDetails({ includeCritical, }: {
includeCritical?: boolean;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCriticalNoticeList(): react_jsx_runtime.JSX.Element | null;
interface AgentWorkspaceProps extends AgentChatProps {
panel?: React$1.ReactNode;
panelClassName?: string;
}
declare function AgentWorkspace({ panel, panelClassName, ...chatProps }: AgentWorkspaceProps): react_jsx_runtime.JSX.Element;
interface AgentLocaleSelectProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (locale: AgentLocale) => void;
value: AgentLocale;
}
declare function AgentLocaleSelect({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentLocaleSelectProps): react_jsx_runtime.JSX.Element;
declare function AgentDiffViewer({ patch }: {
patch: unknown;
}): react_jsx_runtime.JSX.Element;
declare const DEFAULT_TRANSCRIPT_ITEM_LIMIT = 48;
declare const TRANSCRIPT_ITEM_INCREMENT = 48;
declare function transcriptItemIds(turn: TurnState): string[];
declare function visibleTranscriptWindow(thread: ThreadState, visibleItemLimit: number, options?: {
pinnedItemIdsByTurnId?: Map<string, string[]>;
}): {
itemIdsByTurnId: Map<string, string[]>;
totalItemCount: number;
visibleItemCount: number;
};
interface UsageWindow {
id: string;
label: string;
percent: number;
resetLabel?: string;
valueLabel: string;
}
type UsageTranslator = (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
declare function normalizeUsageWindows(rateLimits: unknown, t?: UsageTranslator): UsageWindow[];
export { AGENT_EXECUTION_MODES, type AgentApprovalComponentProps, type AgentApprovalDefaultProps, type AgentApprovalPolicy, AgentApprovalQueue, type AgentApprovalsReviewer, AgentAppsPanel, type AgentAppsRefreshOptions, type AgentAttachmentChip, type AgentAttachmentChipKind, AgentAttachmentChips, type AgentAttachmentChipsProps, type AgentBlockComponentProps, type AgentBlockDefaultProps, type AgentBootstrapState, AgentChat, type AgentChatProps, AgentCommandItem, AgentCommandOutputItem, type AgentComponents, AgentComposer, type AgentComposerController, type AgentComposerDisabledReason, type AgentComposerFailedPendingMessage, AgentComposerInput, type AgentComposerInputProps, type AgentComposerMentionAttachment, type AgentComposerMentionResolver, AgentComposerPanel, type AgentComposerPanelComponentProps, type AgentComposerPanelProps, type AgentComposerProps, AgentComposerSubmitButton, type AgentComposerSubmitButtonProps, type AgentComposerSubmitMode, AgentComposerToolbar, type AgentComposerToolbarProps, AgentContentBlockView, AgentContextUsageIndicator, type AgentContextValue, AgentCriticalNoticeList, AgentDiagnosticsPanel, AgentDiffItem, AgentDiffViewer, type AgentEmptyStateComponentProps, type AgentExecutionMode, AgentFileChangeItem, type AgentFileResourceRequest, AgentFirstRun, type AgentHooksRefreshOptions, type AgentI18nDictionary, type AgentI18nKey, type AgentI18nMessages, AgentI18nProvider, type AgentI18nProviderProps, type AgentI18nValue, type AgentImageInput, type AgentItemComponentProps, type AgentItemDefaultProps, type AgentJsonValue, type AgentLocalAttachmentKind, type AgentLocalAttachmentResolver, type AgentLocalImageInput, type AgentLocalMediaResourceRequest, type AgentLocalMediaUrlResolver, type AgentLocale, AgentLocaleSelect, type AgentLocaleSelectProps, type AgentMentionAttachmentKind, type AgentMentionInput, AgentMessageItem, AgentMessageList, type AgentPersonality, AgentProvider, type AgentProviderProps, AgentRateLimitBar, AgentReasoningItem, type AgentReasoningSummary, type AgentResolvedLocalAttachment, type AgentResolvedResource, type AgentResolvedResourceBase, type AgentResolvedUrlResource, type AgentResourceKind, type AgentResourceRequest, type AgentResourceResolution, type AgentResourceResolver, AgentRunControls, type AgentRunControlsProps, AgentRunSettingsPanel, type AgentRunSettingsPanelProps, type AgentSandboxMode, type AgentSandboxPolicy, AgentShell, type AgentShellComponentProps, type AgentShellProps, type AgentSidebarComponentProps, type AgentSkillConfigWriteOptions, type AgentSkillInput, AgentSkillsPanel, type AgentSkillsRefreshOptions, type AgentSortDirection, AgentStartComposer, type AgentStartComposerProps, AgentStarterCwd, AgentStatusBar, AgentStatusDetails, AgentStatusSummary, type AgentTextInput, type AgentTheme, AgentThemeToggle, type AgentThemeToggleProps, type AgentThreadConfigOptions, type AgentThreadForkResult, AgentThreadHeader, type AgentThreadHistoryResult, type AgentThreadHistorySyncedEvent, type AgentThreadListController, type AgentThreadListControllerOptions, type AgentThreadListRequest, type AgentThreadReadResult, type AgentThreadResumeResult, type AgentThreadResumeRunSettings, AgentThreadSidebar, type AgentThreadSortKey, type AgentThreadSource, type AgentThreadSourceKind, type AgentThreadStartResult, type AgentThreadStartSource, type AgentThreadStartWithInputOptions, type AgentThreadStartWithInputResult, AgentThreadSurface, AgentThreadTimeline, AgentThreadView, type AgentThreadViewProps, AgentTokenUsageBar, AgentToolCallItem, AgentTranscript, type AgentTranscriptBlock, type AgentTranscriptController, type AgentTranscriptControllerOptions, type AgentTranscriptDensity, type AgentTranscriptDensityConfig, type AgentTranscriptDensityMode, type AgentTranscriptEntry, type AgentTranscriptItem, type AgentTranscriptPendingState, type AgentTranscriptScrollController, type AgentTranscriptScrollControllerOptions, AgentTurn, type AgentUnavailableResource, type AgentUnknownUserInput, AgentUsagePanel, type AgentUsageProps, AgentUsageSummary, type AgentUserInput, type AgentWorkingDirectoryResolver, AgentWorkspace, type AgentWorkspaceProps, ComposerRunSettings, DEFAULT_TRANSCRIPT_ITEM_LIMIT, type QueuedFollowUp, type QueuedFollowUpAttachment, TRANSCRIPT_ITEM_INCREMENT, type ThreadForkOptions, type ThreadHistoryParams, ThreadList, type ThreadResumeOptions, type ThreadStartOptions, type TranscriptApprovalAnchors, type TurnStartOptions, type UsageWindow, agentI18nDictionaries, agentLocales, agentResourceDisplayName, agentResourceUrl, defaultAgentComponents, formatThreadStatus, interpolate, interpolationVariables, isUserFacingPath, normalizeAgentLocale, normalizeUsageWindows, threadSubtitle, transcriptItemIds, useAgentAccount, useAgentAction, useAgentApprovals, useAgentApps, useAgentBootstrap, useAgentComposer, useAgentComposerController, useAgentContext, useAgentDiagnostics, useAgentHooks, useAgentI18n, useAgentModels, useAgentRunSettings, useAgentServerRequests, useAgentSkills, useAgentThread, useAgentThreadActions, useAgentThreadController, useAgentThreadHistory, useAgentThreadListController, useAgentThreadReader, useAgentThreads, useAgentTranscriptController, useAgentTranscriptScrollController, useAgentTurn, useAgentTurnController, useAgentUsage, visibleTranscriptWindow };
export { A as AgentProvider, a as AgentProviderProps } from './provider-Clp4jqav.cjs';
export { A as AgentChat, a as AgentChatProps, b as AgentComponents, d as defaultAgentComponents } from './chat-DxnjmFwK.cjs';
export { A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, f as AgentLocale, g as agentI18nDictionaries, h as agentLocales, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n } from './normalize-Ba14sx7f.cjs';
import 'react/jsx-runtime';
import '@nyosegawa/agent-ui-core';
import 'react';

@@ -1,1312 +0,6 @@

import * as react_jsx_runtime from 'react/jsx-runtime';
import * as _nyosegawa_agent_ui_core from '@nyosegawa/agent-ui-core';
import { AgentEvent, AgentSessionState, AgentTransport, ReasoningEffort, AgentApp, AgentModel, ThreadId, RequestId, AgentError, ThreadState, ThreadStatus, ExecutionModeId, AgentThreadScope, AgentThreadCollection, AgentThreadView as AgentThreadView$1, PendingServerRequest, AgentItemBlock, AgentItemState, AgentItemBlockKind, ThreadTokenUsage, AgentThread, TurnState } from '@nyosegawa/agent-ui-core';
export { AgentThreadResumeDiagnosticReasonCode } from '@nyosegawa/agent-ui-core';
import React$1, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
interface AgentContextValue {
dispatch: (event: AgentEvent) => void;
state: AgentSessionState;
transport: AgentTransport;
}
interface AgentProviderProps extends PropsWithChildren {
initialState?: AgentSessionState;
transport: AgentTransport;
}
declare function AgentProvider({ children, initialState, transport }: AgentProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentContext(): AgentContextValue;
declare function useAgentAction<TArgs extends unknown[], TResult>(action: (...args: TArgs) => Promise<TResult>): (...args: TArgs) => Promise<TResult>;
type AgentUserInput = AgentTextInput | AgentImageInput | AgentLocalImageInput | AgentSkillInput | AgentMentionInput | AgentUnknownUserInput;
interface AgentTextInput {
text: string;
text_elements?: unknown[];
type: "text";
}
interface AgentImageInput {
image_url: string;
type: "image";
}
interface AgentLocalImageInput {
path: string;
type: "localImage";
}
interface AgentSkillInput {
name: string;
path: string;
type: "skill";
}
interface AgentMentionInput {
name: string;
path: string;
type: "mention";
}
interface AgentUnknownUserInput {
type: string;
[key: string]: unknown;
}
declare function useAgentAccount(): {
account: _nyosegawa_agent_ui_core.AccountState;
cancelLogin: () => Promise<void>;
login: () => Promise<{
loginId: string | undefined;
userCode: string | undefined;
verificationUrl: string | undefined;
}>;
logout: () => Promise<void>;
readAccount: () => Promise<{
authenticated: boolean;
}>;
};
interface AgentBootstrapState {
errors: Error[];
isBootstrapping: boolean;
status: "idle" | "loading" | "ready" | "error";
}
declare function useAgentBootstrap(): AgentBootstrapState;
type AgentJsonValue = null | boolean | number | string | AgentJsonValue[] | {
[key: string]: AgentJsonValue | undefined;
};
type AgentApprovalPolicy = "untrusted" | "on-failure" | "on-request" | "never" | {
granular: {
mcp_elicitations: boolean;
request_permissions: boolean;
rules: boolean;
sandbox_approval: boolean;
skill_approval: boolean;
};
};
type AgentApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
type AgentReasoningSummary = "auto" | "concise" | "detailed" | "none";
type AgentPersonality = "none" | "friendly" | "pragmatic";
type AgentSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
type AgentThreadSource = "user" | "subagent" | "memory_consolidation";
type AgentThreadStartSource = "startup" | "clear";
type AgentThreadSortKey = "created_at" | "updated_at";
type AgentSortDirection = "asc" | "desc";
type AgentThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown";
type AgentSandboxPolicy = {
type: "dangerFullAccess";
} | {
networkAccess: boolean;
type: "readOnly";
} | {
networkAccess: "restricted" | "enabled";
type: "externalSandbox";
} | {
excludeSlashTmp: boolean;
excludeTmpdirEnvVar: boolean;
networkAccess: boolean;
type: "workspaceWrite";
writableRoots: string[];
};
interface AgentThreadConfigOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
baseInstructions?: string | null;
config?: {
[key: string]: AgentJsonValue | undefined;
} | null;
cwd?: string | null;
developerInstructions?: string | null;
model?: string | null;
modelProvider?: string | null;
personality?: AgentPersonality | null;
serviceTier?: string | null;
}
interface ThreadStartOptions extends AgentThreadConfigOptions {
ephemeral?: boolean | null;
sandbox?: AgentSandboxMode | null;
sessionStartSource?: AgentThreadStartSource | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadResumeOptions extends AgentThreadConfigOptions {
sandbox?: AgentSandboxMode | null;
}
interface ThreadForkOptions extends AgentThreadConfigOptions {
ephemeral?: boolean;
sandbox?: AgentSandboxMode | null;
threadSource?: AgentThreadSource | null;
}
interface ThreadHistoryParams {
archived?: boolean | null;
cursor?: string | null;
cwd?: string | string[] | null;
limit?: number | null;
modelProviders?: string[] | null;
searchTerm?: string | null;
sortDirection?: AgentSortDirection | null;
sortKey?: AgentThreadSortKey | null;
sourceKinds?: AgentThreadSourceKind[] | null;
useStateDbOnly?: boolean;
}
interface TurnStartOptions {
approvalPolicy?: AgentApprovalPolicy | null;
approvalsReviewer?: AgentApprovalsReviewer | null;
cwd?: string | null;
effort?: ReasoningEffort | null;
model?: string | null;
outputSchema?: AgentJsonValue | null;
personality?: AgentPersonality | null;
sandboxPolicy?: AgentSandboxPolicy | null;
serviceTier?: string | null;
summary?: AgentReasoningSummary | null;
}
interface AgentAppsRefreshOptions {
cursor?: string | null;
forceRefetch?: boolean;
limit?: number | null;
threadId?: string | null;
}
interface AgentSkillsRefreshOptions {
cwds?: string[];
forceReload?: boolean;
}
interface AgentSkillConfigWriteOptions {
enabled: boolean;
name?: string | null;
path?: string | null;
}
interface AgentHooksRefreshOptions {
cwds?: string[];
}
declare function useAgentApps(threadId?: string): {
apps: AgentApp[];
loadMoreApps: () => Promise<{
apps: AgentApp[];
nextCursor: string | null;
} | undefined>;
nextCursor: string | null | undefined;
refreshApps: (params?: AgentAppsRefreshOptions) => Promise<{
apps: AgentApp[];
nextCursor: string | null;
}>;
};
declare function useAgentSkills(cwd?: string): {
refreshSkills: (params?: AgentSkillsRefreshOptions) => Promise<{
cwd: string;
skills: {
enabled: boolean | undefined;
name: string;
path: string | undefined;
}[];
}[]>;
setSkillEnabled: (params: AgentSkillConfigWriteOptions) => Promise<void>;
skills: _nyosegawa_agent_ui_core.AgentSkill[];
};
declare function useAgentHooks(cwd?: string): {
hooks: _nyosegawa_agent_ui_core.AgentHook[];
refreshHooks: (params?: AgentHooksRefreshOptions) => Promise<{
cwd: string;
hooks: {
cwd: string;
enabled: boolean | undefined;
id: string;
name: string | undefined;
}[];
}[]>;
};
declare function useAgentDiagnostics(): {
auditDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
banners: _nyosegawa_agent_ui_core.StatusBannerState[];
developerDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
diagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
errors: _nyosegawa_agent_ui_core.AgentError[];
protocolNotifications: _nyosegawa_agent_ui_core.ProtocolNotificationState[];
userDiagnostics: _nyosegawa_agent_ui_core.DiagnosticsState;
warnings: _nyosegawa_agent_ui_core.WarningState[];
};
declare function useAgentModels(): {
models: AgentModel[];
refreshModels: () => Promise<AgentModel[]>;
};
declare function useAgentApprovals(threadId?: ThreadId): {
approvals: _nyosegawa_agent_ui_core.PendingServerRequest[];
approve: (requestId: RequestId, result?: unknown) => Promise<void>;
reject: (requestId: RequestId, message?: string) => Promise<void>;
};
declare function useAgentServerRequests(threadId?: ThreadId): {
requests: _nyosegawa_agent_ui_core.PendingServerRequest[];
respond: (requestId: RequestId, result: unknown) => Promise<void>;
reject: (requestId: RequestId, error: AgentError | string) => Promise<void>;
};
interface QueuedFollowUp {
attachments: QueuedFollowUpAttachment[];
expectedTurnId?: string;
id: string;
input: AgentUserInput[];
text: string;
threadId: ThreadId;
}
interface QueuedFollowUpAttachment {
displayName?: string;
extension?: string;
id: string;
input?: AgentUserInput | AgentUserInput[];
kind: "image" | "file" | "app" | "plugin";
label: string;
previewUrl?: string;
previewUrlRevoke?: boolean;
redactedPath?: string;
sizeLabel?: string;
value: string;
}
interface AgentThreadStartResult {
threadId: ThreadId;
}
interface AgentThreadStartWithInputResult {
operationId: string;
optimisticTurnId: string;
threadId: ThreadId;
turnId: string;
userMessageId: string;
}
interface AgentThreadStartWithInputOptions {
threadOptions?: ThreadStartOptions;
turnOptions?: TurnStartOptions;
}
interface AgentThreadResumeResult {
activeTurnId?: string;
activity?: ThreadState["activity"];
requestedThreadId?: ThreadId;
runSettings?: AgentThreadResumeRunSettings;
status?: ThreadStatus;
threadId: ThreadId;
}
interface AgentThreadResumeRunSettings {
cwd?: string;
effort?: string;
modelId?: string;
}
interface AgentThreadReadResult {
threadId: ThreadId;
}
interface AgentThreadForkResult {
threadId: ThreadId;
}
interface AgentThreadHistoryResult {
nextCursor: string | null;
threadIds: ThreadId[];
}
interface AgentComposerController {
activeTurnId?: string;
canSubmit: boolean;
cancelFailedPendingMessage: (operationId: string) => void;
disabledReason?: AgentComposerDisabledReason;
editQueuedFollowUp: (id: string) => QueuedFollowUp | undefined;
error?: string;
failedPendingMessages: AgentComposerFailedPendingMessage[];
followUpErrors: Record<string, string>;
isInterrupting: boolean;
isRunning: boolean;
isSubmitting: boolean;
queuedFollowUps: QueuedFollowUp[];
removeQueuedFollowUp: (id: string) => void;
retryFailedPendingMessage: (operationId: string) => Promise<void>;
sendQueuedFollowUp: (id: string) => Promise<void>;
sendingFollowUpIds: string[];
setError: Dispatch<SetStateAction<string | undefined>>;
setValue: Dispatch<SetStateAction<string>>;
startThreadWithInput: (input: string | AgentUserInput[], options?: AgentThreadStartWithInputOptions) => Promise<AgentThreadStartWithInputResult>;
steerNow: (items?: AgentUserInput[]) => Promise<void>;
stop: () => Promise<void>;
submit: (items?: AgentUserInput[], options?: {
attachments?: QueuedFollowUpAttachment[];
}) => Promise<string | undefined>;
submitMode: AgentComposerSubmitMode;
value: string;
}
type AgentComposerDisabledReason = "empty" | "interrupting" | "submitting";
interface AgentComposerFailedPendingMessage {
error?: string;
operationId: string;
threadId: string;
}
type AgentComposerSubmitMode = "queue" | "send" | "stop";
declare function useAgentComposer(threadId?: ThreadId): AgentComposerController;
declare function useAgentComposerController(threadId?: ThreadId): AgentComposerController;
interface AgentExecutionMode {
id: ExecutionModeId;
label: string;
description: string;
turnParams: TurnStartOptions;
}
declare const AGENT_EXECUTION_MODES: AgentExecutionMode[];
declare function useAgentRunSettings(): {
executionModes: AgentExecutionMode[];
models: AgentModel[];
runSettings: _nyosegawa_agent_ui_core.RunSettingsState;
selectedModel: AgentModel | undefined;
setCwd: (cwd: string) => void;
setEffort: (effort: ReasoningEffort) => void;
setExecutionMode: (executionMode: ExecutionModeId) => void;
setModelId: (modelId: string) => void;
supportedEfforts: string[];
};
declare function useAgentThread(threadId?: ThreadId): {
resumeThread: (id: ThreadId, params?: ThreadResumeOptions) => Promise<{
threadId: string;
runSettings?: AgentThreadResumeRunSettings | undefined;
requestedThreadId?: string | undefined;
activity?: "idle" | "failed" | "running" | "waitingForInput" | undefined;
status?: ThreadStatus | undefined;
activeTurnId?: string | undefined;
}>;
startThread: (params?: ThreadStartOptions) => Promise<{
threadId: string;
}>;
thread: ThreadState | undefined;
threadId: string | undefined;
turns: (_nyosegawa_agent_ui_core.TurnState | undefined)[];
};
declare const useAgentThreadController: typeof useAgentThread;
declare function useAgentThreadActions(threadId?: ThreadId): {
archiveThread: () => Promise<void>;
compactThread: () => Promise<void>;
forkThread: (params?: ThreadForkOptions) => Promise<{
threadId: string;
}>;
renameThread: (name: string) => Promise<void>;
rollbackThread: (numTurns?: number) => Promise<void>;
threadId: string | undefined;
unarchiveThread: () => Promise<void>;
};
declare function useAgentThreads(): {
activeThreadId: string | undefined;
setActiveThread: (threadId?: ThreadId) => void;
threads: ThreadState[];
};
declare function useAgentThreadHistory(): {
cursor: string | null | undefined;
error: Error | undefined;
isLoading: boolean;
listThreads: (params?: ThreadHistoryParams) => Promise<{
nextCursor: string | null;
threadIds: string[];
}>;
threads: ThreadState[];
};
declare function useAgentThreadReader(): {
readThread: (threadId: ThreadId, options?: {
activate?: boolean;
includeTurns?: boolean;
}) => Promise<{
threadId: string;
}>;
};
interface AgentThreadListController {
activateThread: (threadId: ThreadId) => Promise<ThreadId>;
collection?: AgentThreadCollection;
error?: AgentError;
hasLoaded: boolean;
invalidate: () => void;
isLoading: boolean;
listThreads: (params?: AgentThreadListRequest) => Promise<AgentThreadListResult>;
loadNextPage: () => Promise<AgentThreadListResult | undefined>;
nextCursor: string | null;
previewThread: (threadId: ThreadId) => Promise<void>;
refresh: () => Promise<AgentThreadListResult>;
resumeThread: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<ThreadId>;
resumeThreadWithResult: (threadId: ThreadId, params?: ThreadResumeOptions) => Promise<AgentThreadResumeResult>;
scope: AgentThreadScope;
searchTerm: string;
setSearchTerm: (searchTerm: string) => void;
threads: AgentThreadView$1[];
}
interface AgentThreadListRequest extends ThreadHistoryParams {
append?: boolean;
}
interface AgentThreadListResult extends AgentThreadHistorySyncedEvent {
stale: boolean;
}
interface AgentThreadListControllerOptions {
onHistorySynced?: (event: AgentThreadHistorySyncedEvent) => void;
}
interface AgentThreadHistorySyncedEvent {
append: boolean;
nextCursor: string | null;
scope: AgentThreadScope;
searchTerm?: string;
syncedAt: number;
threadIds: ThreadId[];
}
declare function useAgentThreadListController(scope?: AgentThreadScope, options?: AgentThreadListControllerOptions): AgentThreadListController;
declare function useAgentTurn(threadId?: ThreadId): {
interruptTurn: (turnId: string) => Promise<void>;
startTurn: (input: string | AgentUserInput[], params?: TurnStartOptions) => Promise<void>;
steerTurn: (expectedTurnId: string, input: string | AgentUserInput[]) => Promise<void>;
};
declare const useAgentTurnController: typeof useAgentTurn;
interface AgentTranscriptScrollControllerOptions {
hiddenItemCount?: number;
onShowEarlierItems?: () => void;
pendingApprovalSelector?: string;
scrollContainerRef?: React$1.RefObject<HTMLElement | null>;
scrollKey?: string | number;
threadId: string;
turnCount: number;
}
interface AgentTranscriptScrollController {
canShowEarlierItems: boolean;
handleScroll(): void;
jumpToLatest(): void;
jumpToPendingApproval(): void;
scrollContainerRef: React$1.RefObject<HTMLElement | null>;
showEarlierItems(): void;
showJumpLatest: boolean;
showJumpApproval: boolean;
}
declare function useAgentTranscriptScrollController({ hiddenItemCount, onShowEarlierItems, pendingApprovalSelector, scrollContainerRef, scrollKey, threadId, turnCount, }: AgentTranscriptScrollControllerOptions): AgentTranscriptScrollController;
interface ApprovalAnchors {
afterTurn: PendingServerRequest[];
byItemId: Record<string, PendingServerRequest[]>;
renderApprovalAnchor: (approval: PendingServerRequest) => React$1.ReactNode;
}
interface TranscriptApprovalAnchors {
requests: PendingServerRequest[];
renderApprovalAnchor: (approval: PendingServerRequest) => React$1.ReactNode;
}
type AgentTranscriptDensityMode = "default" | "compact" | "verbose" | "critical-only";
interface AgentTranscriptDensityConfig {
default?: AgentTranscriptDensityMode;
byBlockKind?: Partial<Record<AgentItemBlockKind, AgentTranscriptDensityMode>>;
}
type AgentTranscriptDensity = AgentTranscriptDensityMode | AgentTranscriptDensityConfig;
interface AgentTranscriptPendingState {
status: "failed" | "inProgress";
}
type AgentTranscriptBlock = AgentItemBlock;
type AgentTranscriptItem = AgentItemState;
interface AgentTranscriptEntry {
approvals: PendingServerRequest[];
block: AgentTranscriptBlock;
dataKind: string;
density: AgentTranscriptDensityMode;
displayStatus: string;
id: string;
item?: AgentTranscriptItem;
itemId: string;
key: string;
pending?: AgentTranscriptPendingState;
role: "assistant" | "command" | "system" | "tool" | "user";
status: AgentItemState["status"] | "streaming";
text?: string;
turnId: string;
}
interface AgentTranscriptControllerOptions {
approvalAnchors?: TranscriptApprovalAnchors;
density?: AgentTranscriptDensity;
}
interface AgentTranscriptController {
density: AgentTranscriptDensityMode;
entries: AgentTranscriptEntry[];
entriesByTurnId: Map<string, AgentTranscriptEntry[]>;
hiddenItemCount: number;
showEarlierItems(): void;
visibleItemCount: number;
}
declare function useAgentTranscriptController(threadId?: ThreadId, options?: AgentTranscriptControllerOptions): AgentTranscriptController;
declare function useAgentUsage(): {
rateLimits: unknown;
refreshUsage: () => Promise<void>;
};
type AgentLocale = "en" | "ja" | "ko" | "zh-CN" | "es" | "fr";
declare const agentLocales: AgentLocale[];
interface AgentI18nDictionary {
"account.authenticated": string;
"account.authenticating": string;
"account.checking": string;
"account.connecting": string;
"account.cancelLogin": string;
"account.details": string;
"account.email": string;
"account.login": string;
"account.logout": string;
"account.openDeviceLogin": string;
"account.openMenu": string;
"account.plan": string;
"account.status": string;
"account.unauthenticated": string;
"approval.action.approve": string;
"approval.action.approveAria": string;
"approval.action.approveForSession": string;
"approval.action.approveForSessionAria": string;
"approval.action.decline": string;
"approval.action.declineAria": string;
"approval.action.review": string;
"approval.action.reviewAria": string;
"approval.aria.otherPending": string;
"approval.aria.pending": string;
"approval.aria.pendingOne": string;
"approval.count": string;
"approval.kind.attestation": string;
"approval.kind.authRefresh": string;
"approval.kind.command": string;
"approval.kind.dynamicTool": string;
"approval.kind.fileChange": string;
"approval.kind.generic": string;
"approval.kind.mcpInput": string;
"approval.kind.permissions": string;
"approval.kind.userInput": string;
"approval.meta.approvalPolicy": string;
"approval.meta.item": string;
"approval.meta.namespace": string;
"approval.meta.sandbox": string;
"approval.meta.tool": string;
"approval.meta.workingDirectory": string;
"approval.request.command": string;
"approval.request.fileChange": string;
"approval.request.generic": string;
"approval.risk.high": string;
"approval.risk.low": string;
"approval.risk.medium": string;
"approval.riskSuffix": string;
"approval.summary.command": string;
"approval.summary.default": string;
"approval.summary.dynamicTool": string;
"approval.summary.fileChange": string;
"approval.summary.mcpInput": string;
"approval.summary.permissions": string;
"approval.summary.userInput": string;
"aria.actions": string;
"aria.agentContext": string;
"aria.changedFiles": string;
"aria.codeMirrorPatchViewer": string;
"aria.commandOutput": string;
"aria.completedTask": string;
"aria.composerAttachments": string;
"aria.contextUsage": string;
"aria.contextUsageDetails": string;
"aria.criticalStatus": string;
"aria.diffPreview": string;
"aria.dismissThreadHistory": string;
"aria.message": string;
"aria.messageComposer": string;
"aria.openTask": string;
"aria.patchContent": string;
"aria.pendingAttachments": string;
"aria.runSettings": string;
"aria.statusDetails": string;
"aria.statusSummary": string;
"aria.threadStartContext": string;
"aria.threads": string;
"aria.tokenUsage": string;
"aria.usageLimits": string;
"aria.usageSummary": string;
"apps.authNeeded": string;
"apps.disabled": string;
"apps.empty": string;
"apps.label": string;
"apps.loadMore": string;
"apps.notInstalled": string;
"apps.unavailable": string;
"common.cancel": string;
"common.close": string;
"common.closeMenu": string;
"common.collapse": string;
"common.default": string;
"common.details": string;
"common.disable": string;
"common.enable": string;
"common.expand": string;
"common.file": string;
"common.files": string;
"common.loading": string;
"common.message": string;
"common.messages": string;
"common.notice": string;
"common.notices": string;
"common.open": string;
"common.refresh": string;
"common.refreshing": string;
"common.serverDefault": string;
"common.syncPending": string;
"common.unknown": string;
"composer.addFollowUp": string;
"composer.attachFile": string;
"composer.attachFiles": string;
"composer.attachedFollowUp": string;
"composer.attachmentRejected": string;
"composer.attachmentRejectedMany": string;
"composer.attachmentRejectedOne": string;
"composer.cannotAcceptFollowUp": string;
"composer.couldNotSendAdditional": string;
"composer.couldNotStart": string;
"composer.couldNotStop": string;
"composer.enterToSend": string;
"composer.followUpNoActiveTurn": string;
"composer.followUpTurnChanged": string;
"composer.followUpTurnChangedRefresh": string;
"composer.app": string;
"composer.mentionApp": string;
"composer.mentionPlugin": string;
"composer.plugin": string;
"composer.placeholder": string;
"composer.removeAttachment": string;
"composer.resolveApprovalReason": string;
"composer.send": string;
"composer.sendMessage": string;
"composer.stopCurrentTurn": string;
"context.cachedInput": string;
"context.compactionNotice": string;
"context.contextWindow": string;
"context.input": string;
"context.lastTurn": string;
"context.output": string;
"context.reasoning": string;
"context.title": string;
"context.used": string;
"diagnostics.label": string;
"diagnostics.messageCount": string;
"diagnostics.pluginManifestWarnings": string;
"diagnostics.syncing": string;
"diagnostics.withPluginWarnings": string;
"firstRun.authenticating.body": string;
"firstRun.authenticating.title": string;
"firstRun.bridgeError.body": string;
"firstRun.bridgeError.title": string;
"firstRun.connect.body": string;
"firstRun.connect.cta": string;
"firstRun.connect.title": string;
"firstRun.error": string;
"firstRun.form": string;
"firstRun.placeholder": string;
"firstRun.preparing.body": string;
"firstRun.preparing.cta": string;
"firstRun.preparing.title": string;
"firstRun.startThread": string;
"followUp.attachments": string;
"followUp.attachmentsMany": string;
"followUp.attachmentsOne": string;
"followUp.earlier": string;
"followUp.earlierMany": string;
"followUp.earlierOne": string;
"followUp.earlierQueued": string;
"followUp.edit": string;
"followUp.queued": string;
"followUp.queuedAttachments": string;
"followUp.remove": string;
"followUp.sendNow": string;
"locale.en": string;
"locale.es": string;
"locale.fr": string;
"locale.ja": string;
"locale.ko": string;
"locale.label": string;
"locale.zh-CN": string;
"markdown.completedTask": string;
"markdown.openTask": string;
"run.clearWorkingDirectory": string;
"run.cwd.noRecent": string;
"run.cwd.openFolder": string;
"run.cwd.openFolderAction": string;
"run.cwd.prompt": string;
"run.cwd.recent": string;
"run.cwd.selectFolder": string;
"run.cwd.serverDefault": string;
"run.defaultEffort": string;
"run.defaultModel": string;
"run.effort": string;
"run.effort.high": string;
"run.effort.low": string;
"run.effort.medium": string;
"run.effort.minimal": string;
"run.effort.veryHigh": string;
"run.executionMode": string;
"run.mode": string;
"run.mode.auto.description": string;
"run.mode.auto.label": string;
"run.mode.full-access.description": string;
"run.mode.full-access.label": string;
"run.mode.read-only.description": string;
"run.mode.read-only.label": string;
"run.mode.review.description": string;
"run.mode.review.label": string;
"run.model": string;
"run.modelAndEffort": string;
"run.modelDefault": string;
"run.noSelectableEffort": string;
"run.serverDefault": string;
"run.workingDirectory": string;
"skills.empty": string;
"skills.label": string;
"status.account": string;
"status.backgroundNotice": string;
"status.configWarning": string;
"status.critical": string;
"status.deprecationNotice": string;
"status.failed": string;
"status.mcpOAuth": string;
"status.modelReroute": string;
"status.rateLimit": string;
"status.title": string;
"status.total": string;
"status.warning": string;
"theme.dark": string;
"theme.label": string;
"theme.light": string;
"theme.system": string;
"thread.action.archive": string;
"thread.action.compact": string;
"thread.action.fork": string;
"thread.action.rename": string;
"thread.action.rollback": string;
"thread.action.unarchive": string;
"thread.closeHistory": string;
"thread.codexSession": string;
"thread.collapseHistory": string;
"thread.empty": string;
"thread.ephemeralSession": string;
"thread.expandHistory": string;
"thread.history": string;
"thread.namePrompt": string;
"thread.new": string;
"thread.noThreadsFound": string;
"thread.openHistory": string;
"thread.search": string;
"thread.searchHistory": string;
"thread.status.complete": string;
"thread.status.failed": string;
"thread.status.needsApproval": string;
"thread.status.preview": string;
"thread.status.ready": string;
"thread.status.running": string;
"thread.status.stored": string;
"thread.threadCount": string;
"thread.untitled": string;
"timeline.agentTool": string;
"timeline.arguments": string;
"timeline.argumentsPreview": string;
"timeline.assistant": string;
"timeline.collab": string;
"timeline.collabTool": string;
"timeline.command": string;
"timeline.compaction": string;
"timeline.diff": string;
"timeline.earlierHidden": string;
"timeline.error": string;
"timeline.exitCode": string;
"timeline.file": string;
"timeline.fileChange": string;
"timeline.fileChanges": string;
"timeline.files": string;
"timeline.filesChanged": string;
"timeline.from": string;
"timeline.image": string;
"timeline.imageGenerated": string;
"timeline.localMediaUnavailable": string;
"timeline.item": string;
"timeline.items": string;
"timeline.jumpToPendingApproval": string;
"timeline.jumpToLatest": string;
"timeline.lines": string;
"timeline.mcpTool": string;
"timeline.noPatch": string;
"timeline.noTerminalOutput": string;
"timeline.output": string;
"timeline.plan": string;
"timeline.reasoning": string;
"timeline.result": string;
"timeline.resultCaptured": string;
"timeline.resultItems": string;
"timeline.search": string;
"timeline.showEarlier": string;
"timeline.system": string;
"timeline.terminal": string;
"timeline.thinking": string;
"timeline.thread": string;
"timeline.to": string;
"timeline.tool": string;
"timeline.toolCall": string;
"timeline.unknownTool": string;
"timeline.webSearch": string;
"timeline.you": string;
"usage.empty": string;
"usage.inputOutput": string;
"usage.label": string;
"usage.limits": string;
"usage.meterLabel": string;
"usage.namedWindow": string;
"usage.resetAt": string;
"usage.hourWindow": string;
"usage.tokens": string;
"usage.title": string;
"usage.weeklyWindow": string;
}
type AgentI18nKey = keyof AgentI18nDictionary;
type AgentI18nMessages = Partial<AgentI18nDictionary>;
interface AgentI18nValue {
locale: AgentLocale;
t: (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
}
interface AgentI18nProviderProps extends PropsWithChildren {
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
}
declare function AgentI18nProvider({ children, locale, messages, }: AgentI18nProviderProps): react_jsx_runtime.JSX.Element;
declare function useAgentI18n(): AgentI18nValue;
declare function interpolate(template: string, vars: Record<string, string | number> | undefined): string;
declare function interpolationVariables(template: string): string[];
declare const agentI18nDictionaries: Record<AgentLocale, AgentI18nDictionary>;
declare function normalizeAgentLocale(locale?: AgentLocale | string): AgentLocale;
type AgentResourceKind = "image" | "file" | "app" | "plugin" | "url" | "unavailable";
interface AgentResolvedResourceBase {
displayName?: string;
id?: string;
input?: AgentUserInput | AgentUserInput[];
mimeType?: string;
name?: string;
path?: string;
previewUrl?: string;
redactedPath?: string;
reason?: string;
sizeBytes?: number;
url?: string;
}
interface AgentResolvedUrlResource extends AgentResolvedResourceBase {
kind: "url";
}
interface AgentUnavailableResource extends AgentResolvedResourceBase {
kind: "unavailable";
}
type AgentResolvedResource = AgentResolvedUrlResource | AgentUnavailableResource;
interface AgentFileResourceRequest {
file: File;
kind: Extract<AgentResourceKind, "image" | "file">;
source: "file";
}
interface AgentLocalMediaResourceRequest {
item?: AgentItemState;
path: string;
source: "local-media";
}
type AgentResourceRequest = AgentFileResourceRequest | AgentLocalMediaResourceRequest;
type AgentResourceResolution = AgentResolvedResource | null | undefined;
type AgentResourceResolver = (request: AgentResourceRequest) => AgentResourceResolution | Promise<AgentResourceResolution>;
declare function agentResourceUrl(resource: AgentResolvedResourceBase | null | undefined): string | undefined;
declare function agentResourceDisplayName(resource: AgentResolvedResourceBase | null | undefined, fallback?: string): string | undefined;
type ComposerAttachmentKind = Extract<AgentResourceKind, "image" | "file" | "app" | "plugin">;
type AgentLocalAttachmentKind = Extract<AgentResourceKind, "image" | "file">;
interface AgentResolvedLocalAttachment extends AgentResolvedResourceBase {
input: AgentUserInput | AgentUserInput[];
}
type AgentLocalAttachmentResolver = (file: File, kind: AgentLocalAttachmentKind) => AgentResolvedLocalAttachment | null | undefined | Promise<AgentResolvedLocalAttachment | null | undefined>;
type AgentMentionAttachmentKind = Extract<ComposerAttachmentKind, "app" | "plugin">;
interface AgentComposerMentionAttachment {
id?: string;
input?: AgentUserInput;
label: string;
value: string;
}
type AgentComposerMentionResolver = () => AgentComposerMentionAttachment | null | undefined | Promise<AgentComposerMentionAttachment | null | undefined>;
interface AgentComposerSubmitButtonProps {
canSubmit: boolean;
className?: string;
iconSize?: number;
isStopAction: boolean;
label?: string;
title?: string;
}
declare function AgentComposerSubmitButton({ canSubmit, className, iconSize, isStopAction, label, title, }: AgentComposerSubmitButtonProps): react_jsx_runtime.JSX.Element;
type AgentAttachmentChipKind = Extract<AgentResourceKind, "image" | "file" | "app" | "plugin">;
interface AgentAttachmentChip {
extension?: string;
id: string;
kind: AgentAttachmentChipKind;
label: string;
previewFailed?: boolean;
previewUrl?: string;
sizeLabel?: string;
}
interface AgentAttachmentChipsProps {
attachments: readonly AgentAttachmentChip[];
onPreviewFailed?: (id: string) => void;
onRemove?: (id: string) => void;
}
declare function AgentAttachmentChips({ attachments, onPreviewFailed, onRemove, }: AgentAttachmentChipsProps): react_jsx_runtime.JSX.Element | null;
interface AgentComposerInputProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
shortcutHintId?: string;
}
declare const AgentComposerInput: React$1.ForwardRefExoticComponent<AgentComposerInputProps & React$1.RefAttributes<HTMLTextAreaElement>>;
interface AgentComposerToolbarProps {
className?: string;
end?: React$1.ReactNode;
start?: React$1.ReactNode;
}
declare function AgentComposerToolbar({ className, end, start, }: AgentComposerToolbarProps): react_jsx_runtime.JSX.Element;
declare function AgentComposer(props: AgentComposerProps): react_jsx_runtime.JSX.Element;
interface AgentComposerProps {
disabled?: boolean;
disabledReason?: string;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
placeholder?: string;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
tokenUsage?: ThreadTokenUsage;
threadId?: string;
}
interface AgentComposerPanelProps {
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
thread: ThreadState;
threadId?: string;
}
declare function AgentComposerPanel({ onRequestAppMention, onRequestPluginMention, resolveLocalAttachment, thread, threadId, }: AgentComposerPanelProps): react_jsx_runtime.JSX.Element;
type AgentWorkingDirectoryResolver = () => Promise<string | null | undefined> | string | null | undefined;
/**
* Compact working-directory selector for the start screen. cwd is a
* thread-start setting, so it sits beneath the starter composer as a context
* pill rather than inside the composer toolbar.
*/
declare function AgentStarterCwd({ onRequestWorkingDirectory, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
}): react_jsx_runtime.JSX.Element;
interface AgentRunControlsProps {
autoRefresh?: boolean;
/**
* "compact" renders an inline, dense form intended to sit inside another
* surface. "panel" renders the full-width labeled settings form used by the
* empty-state and fixture gallery close-up.
*/
variant?: "compact" | "panel";
}
declare function AgentRunControls({ autoRefresh, variant, }?: AgentRunControlsProps): react_jsx_runtime.JSX.Element;
interface AgentRunSettingsPanelProps {
autoRefresh?: boolean;
}
declare function AgentRunSettingsPanel({ autoRefresh, }?: AgentRunSettingsPanelProps): react_jsx_runtime.JSX.Element;
/**
* Mode / model / effort selectors that live directly inside the composer
* toolbar. Working directory is intentionally absent here; cwd is a
* thread-start setting and is shown read-only in the thread header for an
* existing thread.
*/
declare function ComposerRunSettings(): react_jsx_runtime.JSX.Element;
declare function AgentFirstRun({ onRequestWorkingDirectory, onStartThread, }: {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}): react_jsx_runtime.JSX.Element;
interface AgentStartComposerProps {
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onStartThread: (prompt?: string) => Promise<void> | void;
}
declare function AgentStartComposer({ onRequestWorkingDirectory, onStartThread, }: AgentStartComposerProps): react_jsx_runtime.JSX.Element;
declare function ThreadList({ activeThreadId, footer, onSelectThread, threads, }: {
activeThreadId?: string;
footer?: React.ReactNode;
onSelectThread?: (threadId: string) => void;
threads: AgentThreadView$1[];
}): react_jsx_runtime.JSX.Element;
declare function formatThreadStatus(status: string, options?: {
hasTurns?: boolean;
t?: (key: AgentI18nKey) => string;
}): string;
declare function threadSubtitle(thread: AgentThread, t?: (key: AgentI18nKey) => string): string;
declare function isUserFacingPath(path: string): boolean;
declare function AgentThreadSidebar({ activeThreadId, collapsed, onCreateThread, onCollapsedChange, onSelectThread, }: {
activeThreadId?: string;
collapsed?: boolean;
onCreateThread?: () => void;
onCollapsedChange?: (collapsed: boolean) => void;
onSelectThread?: (threadId: string) => void;
}): react_jsx_runtime.JSX.Element | null;
type AgentTheme = "light" | "dark" | "system";
interface AgentThemeToggleProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (theme: AgentTheme) => void;
value: AgentTheme;
}
declare function AgentThemeToggle({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentThemeToggleProps): react_jsx_runtime.JSX.Element;
interface AgentThreadUrlRoutingOptions {
basePath?: string;
homePath?: string;
}
type AgentLocalMediaUrlResolver = (path: string, item: AgentItemState | undefined) => AgentResourceResolution;
declare function AgentContentBlockView({ block, item, output, patch, resolveLocalMediaUrl, }: {
block: AgentItemBlock;
item?: AgentItemState;
output?: string;
patch?: unknown;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCommandItem({ block, item, itemId, output, }: {
block?: AgentItemBlock;
item?: AgentItemState;
itemId?: string;
output?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentFileChangeItem({ block, item, patch, }: {
block?: AgentItemBlock;
item?: AgentItemState;
patch?: unknown;
}): react_jsx_runtime.JSX.Element;
declare function AgentReasoningItem({ block }: {
block: AgentItemBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentToolCallItem({ block }: {
block: AgentItemBlock;
}): react_jsx_runtime.JSX.Element;
declare function AgentMessageItem({ text }: {
text: string;
}): react_jsx_runtime.JSX.Element;
declare const AgentCommandOutputItem: typeof AgentCommandItem;
declare const AgentDiffItem: typeof AgentFileChangeItem;
declare function AgentMessageList({ footer, approvalAnchors, components, renderItem, density, resolveLocalMediaUrl, scrollKey, thread, }: {
/**
* Trailing transcript content rendered as the final scroll-area item.
* The default thread view uses it to keep the pending-approval surface
* inside the transcript instead of in a separate scroll pane.
*/
footer?: React$1.ReactNode;
approvalAnchors?: TranscriptApprovalAnchors;
components?: AgentComponents;
density?: AgentTranscriptDensity;
renderItem?: (item: AgentItemState, turn: TurnState, Default: React$1.ComponentType<AgentItemDefaultProps>) => React$1.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
/** Changing this value scrolls the transcript to its end (e.g. a new approval). */
scrollKey?: string | number;
thread: ThreadState;
}): react_jsx_runtime.JSX.Element;
declare const AgentTranscript: typeof AgentMessageList;
declare function AgentTurn({ approvals, components, entries, renderItem, resolveLocalMediaUrl, threadStatus, turn, }: {
approvals?: ApprovalAnchors;
components?: AgentComponents;
entries?: AgentTranscriptEntry[];
renderItem?: (item: AgentItemState, turn: TurnState, Default: React$1.ComponentType<AgentItemDefaultProps>) => React$1.ReactNode;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadStatus: ThreadState["status"];
turn: TurnState;
}): react_jsx_runtime.JSX.Element;
interface AgentApprovalComponentProps {
approval: PendingServerRequest;
Default: React$1.ComponentType<AgentApprovalDefaultProps>;
}
interface AgentApprovalDefaultProps {
approval: PendingServerRequest;
}
interface AgentItemComponentProps {
Default: React$1.ComponentType<AgentItemDefaultProps>;
item: AgentItemState;
turn: TurnState;
}
interface AgentItemDefaultProps {
item: AgentItemState;
turn: TurnState;
}
interface AgentShellComponentProps extends AgentShellProps {
Default: React$1.ComponentType<AgentShellProps>;
}
interface AgentSidebarComponentProps extends React$1.ComponentProps<typeof AgentThreadSidebar> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentThreadSidebar>>;
}
interface AgentEmptyStateComponentProps extends React$1.ComponentProps<typeof AgentFirstRun> {
Default: React$1.ComponentType<React$1.ComponentProps<typeof AgentFirstRun>>;
}
interface AgentComposerPanelComponentProps extends AgentComposerPanelProps {
Default: React$1.ComponentType<AgentComposerPanelProps>;
}
interface AgentBlockDefaultProps {
block: AgentTranscriptBlock;
item?: AgentTranscriptItem;
}
interface AgentBlockComponentProps extends AgentBlockDefaultProps {
Default: React$1.ComponentType<AgentBlockDefaultProps>;
}
interface AgentComponents {
Approval?: React$1.ComponentType<AgentApprovalComponentProps>;
ComposerPanel?: React$1.ComponentType<AgentComposerPanelComponentProps>;
EmptyState?: React$1.ComponentType<AgentEmptyStateComponentProps>;
Item?: React$1.ComponentType<AgentItemComponentProps>;
Shell?: React$1.ComponentType<AgentShellComponentProps>;
Sidebar?: React$1.ComponentType<AgentSidebarComponentProps>;
blocks?: Partial<Record<AgentTranscriptBlock["kind"], React$1.ComponentType<AgentBlockComponentProps>>>;
}
declare const defaultAgentComponents: {
ComposerPanel: typeof AgentComposerPanel;
EmptyState: typeof AgentFirstRun;
Shell: typeof AgentShell;
Sidebar: typeof AgentThreadSidebar;
};
interface AgentChatProps {
className?: string;
components?: AgentComponents;
diagnostics?: boolean;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestWorkingDirectory?: AgentWorkingDirectoryResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
sidebar?: boolean;
statusBarEnd?: React$1.ReactNode;
theme?: AgentTheme;
locale?: AgentLocale | string;
messages?: AgentI18nMessages;
threadUrlRouting?: boolean | AgentThreadUrlRoutingOptions;
usage?: boolean;
}
declare function AgentChat({ className, components, diagnostics, onRequestAppMention, onRequestWorkingDirectory, onRequestPluginMention, resolveLocalAttachment, resolveLocalMediaUrl, sidebar, statusBarEnd, theme, locale, messages, threadUrlRouting, usage, }?: AgentChatProps): react_jsx_runtime.JSX.Element;
interface AgentShellProps extends React$1.HTMLAttributes<HTMLElement> {
sidebar?: React$1.ReactNode;
theme?: AgentTheme;
}
declare function AgentShell({ children, className, sidebar, theme, ...props }: AgentShellProps): react_jsx_runtime.JSX.Element;
interface AgentThreadViewProps {
components?: AgentComponents;
onRequestAppMention?: AgentComposerMentionResolver;
onRequestPluginMention?: AgentComposerMentionResolver;
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
renderItem?: React$1.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalAttachment?: AgentLocalAttachmentResolver;
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
threadId?: string;
}
declare function AgentThreadView({ components, onRequestAppMention, onRequestPluginMention, renderApproval, renderItem, resolveLocalAttachment, resolveLocalMediaUrl, threadId, }: AgentThreadViewProps): react_jsx_runtime.JSX.Element | null;
declare function AgentThreadSurface({ children, className, }: {
children: React$1.ReactNode;
className?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentThreadHeader({ thread, threadId, }: {
thread: ThreadState;
threadId?: string;
}): react_jsx_runtime.JSX.Element;
/**
* Renders the thread transcript. When a `threadId` is supplied, pending
* approvals with upstream item or turn metadata are anchored immediately after
* that transcript context. Metadata-free approvals fall back to the transcript
* tail so they stay in the scroll area, not a separate pane above the composer.
*/
declare function AgentThreadTimeline({ components, renderApproval, renderItem, resolveLocalMediaUrl, thread, threadId, }: {
components?: AgentComponents;
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
renderItem?: React$1.ComponentProps<typeof AgentMessageList>["renderItem"];
resolveLocalMediaUrl?: AgentLocalMediaUrlResolver;
thread: ThreadState;
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentContextUsageIndicator({ tokenUsage, }: {
tokenUsage?: ThreadTokenUsage;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentApprovalQueue({ approvals: approvalsProp, renderApproval, threadId, }: {
approvals?: PendingServerRequest[];
renderApproval?: (approval: PendingServerRequest) => React$1.ReactNode;
threadId?: string;
}): react_jsx_runtime.JSX.Element | null;
interface AgentUsageProps {
autoRefresh?: boolean;
}
declare function AgentUsagePanel({ autoRefresh }?: AgentUsageProps): react_jsx_runtime.JSX.Element;
declare function AgentUsageSummary(): react_jsx_runtime.JSX.Element;
declare function AgentRateLimitBar({ label, percent, }: {
label: string;
percent: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentTokenUsageBar({ inputTokens, outputTokens, totalTokens, }: {
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
}): react_jsx_runtime.JSX.Element;
declare function AgentSkillsPanel({ cwd }: {
cwd?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentAppsPanel({ threadId }: {
threadId?: string;
}): react_jsx_runtime.JSX.Element;
declare function AgentStatusBar({ end, onNavigateHome, onOpenThreads, }?: {
end?: React$1.ReactNode;
onNavigateHome?: () => void;
onOpenThreads?: () => void;
}): react_jsx_runtime.JSX.Element;
declare function AgentDiagnosticsPanel({ bootstrap, }: {
bootstrap: ReturnType<typeof useAgentBootstrap>;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusSummary(): react_jsx_runtime.JSX.Element | null;
declare function AgentStatusDetails({ includeCritical, }: {
includeCritical?: boolean;
}): react_jsx_runtime.JSX.Element | null;
declare function AgentCriticalNoticeList(): react_jsx_runtime.JSX.Element | null;
interface AgentWorkspaceProps extends AgentChatProps {
panel?: React$1.ReactNode;
panelClassName?: string;
}
declare function AgentWorkspace({ panel, panelClassName, ...chatProps }: AgentWorkspaceProps): react_jsx_runtime.JSX.Element;
interface AgentLocaleSelectProps {
"aria-label"?: string;
disabled?: boolean;
onChange: (locale: AgentLocale) => void;
value: AgentLocale;
}
declare function AgentLocaleSelect({ "aria-label": ariaLabel, disabled, onChange, value, }: AgentLocaleSelectProps): react_jsx_runtime.JSX.Element;
declare function AgentDiffViewer({ patch }: {
patch: unknown;
}): react_jsx_runtime.JSX.Element;
declare const DEFAULT_TRANSCRIPT_ITEM_LIMIT = 48;
declare const TRANSCRIPT_ITEM_INCREMENT = 48;
declare function transcriptItemIds(turn: TurnState): string[];
declare function visibleTranscriptWindow(thread: ThreadState, visibleItemLimit: number, options?: {
pinnedItemIdsByTurnId?: Map<string, string[]>;
}): {
itemIdsByTurnId: Map<string, string[]>;
totalItemCount: number;
visibleItemCount: number;
};
interface UsageWindow {
id: string;
label: string;
percent: number;
resetLabel?: string;
valueLabel: string;
}
type UsageTranslator = (key: AgentI18nKey, vars?: Record<string, string | number>) => string;
declare function normalizeUsageWindows(rateLimits: unknown, t?: UsageTranslator): UsageWindow[];
export { AGENT_EXECUTION_MODES, type AgentApprovalComponentProps, type AgentApprovalDefaultProps, type AgentApprovalPolicy, AgentApprovalQueue, type AgentApprovalsReviewer, AgentAppsPanel, type AgentAppsRefreshOptions, type AgentAttachmentChip, type AgentAttachmentChipKind, AgentAttachmentChips, type AgentAttachmentChipsProps, type AgentBlockComponentProps, type AgentBlockDefaultProps, type AgentBootstrapState, AgentChat, type AgentChatProps, AgentCommandItem, AgentCommandOutputItem, type AgentComponents, AgentComposer, type AgentComposerController, type AgentComposerDisabledReason, type AgentComposerFailedPendingMessage, AgentComposerInput, type AgentComposerInputProps, type AgentComposerMentionAttachment, type AgentComposerMentionResolver, AgentComposerPanel, type AgentComposerPanelComponentProps, type AgentComposerPanelProps, type AgentComposerProps, AgentComposerSubmitButton, type AgentComposerSubmitButtonProps, type AgentComposerSubmitMode, AgentComposerToolbar, type AgentComposerToolbarProps, AgentContentBlockView, AgentContextUsageIndicator, type AgentContextValue, AgentCriticalNoticeList, AgentDiagnosticsPanel, AgentDiffItem, AgentDiffViewer, type AgentEmptyStateComponentProps, type AgentExecutionMode, AgentFileChangeItem, type AgentFileResourceRequest, AgentFirstRun, type AgentHooksRefreshOptions, type AgentI18nDictionary, type AgentI18nKey, type AgentI18nMessages, AgentI18nProvider, type AgentI18nProviderProps, type AgentI18nValue, type AgentImageInput, type AgentItemComponentProps, type AgentItemDefaultProps, type AgentJsonValue, type AgentLocalAttachmentKind, type AgentLocalAttachmentResolver, type AgentLocalImageInput, type AgentLocalMediaResourceRequest, type AgentLocalMediaUrlResolver, type AgentLocale, AgentLocaleSelect, type AgentLocaleSelectProps, type AgentMentionAttachmentKind, type AgentMentionInput, AgentMessageItem, AgentMessageList, type AgentPersonality, AgentProvider, type AgentProviderProps, AgentRateLimitBar, AgentReasoningItem, type AgentReasoningSummary, type AgentResolvedLocalAttachment, type AgentResolvedResource, type AgentResolvedResourceBase, type AgentResolvedUrlResource, type AgentResourceKind, type AgentResourceRequest, type AgentResourceResolution, type AgentResourceResolver, AgentRunControls, type AgentRunControlsProps, AgentRunSettingsPanel, type AgentRunSettingsPanelProps, type AgentSandboxMode, type AgentSandboxPolicy, AgentShell, type AgentShellComponentProps, type AgentShellProps, type AgentSidebarComponentProps, type AgentSkillConfigWriteOptions, type AgentSkillInput, AgentSkillsPanel, type AgentSkillsRefreshOptions, type AgentSortDirection, AgentStartComposer, type AgentStartComposerProps, AgentStarterCwd, AgentStatusBar, AgentStatusDetails, AgentStatusSummary, type AgentTextInput, type AgentTheme, AgentThemeToggle, type AgentThemeToggleProps, type AgentThreadConfigOptions, type AgentThreadForkResult, AgentThreadHeader, type AgentThreadHistoryResult, type AgentThreadHistorySyncedEvent, type AgentThreadListController, type AgentThreadListControllerOptions, type AgentThreadListRequest, type AgentThreadReadResult, type AgentThreadResumeResult, type AgentThreadResumeRunSettings, AgentThreadSidebar, type AgentThreadSortKey, type AgentThreadSource, type AgentThreadSourceKind, type AgentThreadStartResult, type AgentThreadStartSource, type AgentThreadStartWithInputOptions, type AgentThreadStartWithInputResult, AgentThreadSurface, AgentThreadTimeline, AgentThreadView, type AgentThreadViewProps, AgentTokenUsageBar, AgentToolCallItem, AgentTranscript, type AgentTranscriptBlock, type AgentTranscriptController, type AgentTranscriptControllerOptions, type AgentTranscriptDensity, type AgentTranscriptDensityConfig, type AgentTranscriptDensityMode, type AgentTranscriptEntry, type AgentTranscriptItem, type AgentTranscriptPendingState, type AgentTranscriptScrollController, type AgentTranscriptScrollControllerOptions, AgentTurn, type AgentUnavailableResource, type AgentUnknownUserInput, AgentUsagePanel, type AgentUsageProps, AgentUsageSummary, type AgentUserInput, type AgentWorkingDirectoryResolver, AgentWorkspace, type AgentWorkspaceProps, ComposerRunSettings, DEFAULT_TRANSCRIPT_ITEM_LIMIT, type QueuedFollowUp, type QueuedFollowUpAttachment, TRANSCRIPT_ITEM_INCREMENT, type ThreadForkOptions, type ThreadHistoryParams, ThreadList, type ThreadResumeOptions, type ThreadStartOptions, type TranscriptApprovalAnchors, type TurnStartOptions, type UsageWindow, agentI18nDictionaries, agentLocales, agentResourceDisplayName, agentResourceUrl, defaultAgentComponents, formatThreadStatus, interpolate, interpolationVariables, isUserFacingPath, normalizeAgentLocale, normalizeUsageWindows, threadSubtitle, transcriptItemIds, useAgentAccount, useAgentAction, useAgentApprovals, useAgentApps, useAgentBootstrap, useAgentComposer, useAgentComposerController, useAgentContext, useAgentDiagnostics, useAgentHooks, useAgentI18n, useAgentModels, useAgentRunSettings, useAgentServerRequests, useAgentSkills, useAgentThread, useAgentThreadActions, useAgentThreadController, useAgentThreadHistory, useAgentThreadListController, useAgentThreadReader, useAgentThreads, useAgentTranscriptController, useAgentTranscriptScrollController, useAgentTurn, useAgentTurnController, useAgentUsage, visibleTranscriptWindow };
export { A as AgentProvider, a as AgentProviderProps } from './provider-Clp4jqav.js';
export { A as AgentChat, a as AgentChatProps, b as AgentComponents, d as defaultAgentComponents } from './chat-DA48t1q0.js';
export { A as AgentI18nDictionary, a as AgentI18nKey, b as AgentI18nMessages, c as AgentI18nProvider, d as AgentI18nProviderProps, e as AgentI18nValue, f as AgentLocale, g as agentI18nDictionaries, h as agentLocales, i as interpolate, j as interpolationVariables, n as normalizeAgentLocale, u as useAgentI18n } from './normalize-Ba14sx7f.js';
import 'react/jsx-runtime';
import '@nyosegawa/agent-ui-core';
import 'react';

@@ -12,3 +12,2 @@ @import "./styles/tokens.css";

@import "./styles/diff-utilities.css";
@import "./styles/workspace.css";
@import "./styles/responsive.css";

@@ -19,2 +18,4 @@ @import "./styles/controls-buttons.css";

@import "./styles/composer.css";
@import "./styles/composer-failed.css";
@import "./styles/composer-responsive.css";
@import "./styles/composer-mobile.css";

@@ -21,0 +22,0 @@ @import "./styles/menu.css";

@@ -23,3 +23,3 @@ /* --- Mobile composer ----------------------------------------------------- */

.aui-composer-toolbar {
flex-wrap: nowrap;
grid-template-columns: minmax(0, 1fr) auto;
}

@@ -34,3 +34,2 @@

.aui-composer-toolbar-start {
flex: 1 1 auto;
min-width: 0;

@@ -40,24 +39,5 @@ }

.aui-composer-toolbar-end {
flex: 0 0 auto;
margin-left: auto;
}
.aui-composer-settings {
flex-wrap: nowrap;
gap: var(--aui-space-100);
}
.aui-composer-tool {
gap: 0;
justify-content: center;
min-height: var(--aui-control-height-lg);
padding: 0;
width: var(--aui-control-height-lg);
}
.aui-composer-tool-label,
.aui-composer-tool > svg:last-child {
display: none;
}
.aui-composer-hint {

@@ -64,0 +44,0 @@ display: none;

@@ -21,2 +21,3 @@ /* --- Composer ------------------------------------------------------------ */

box-shadow: var(--aui-elevation-2);
container-type: inline-size;
display: grid;

@@ -147,4 +148,3 @@ gap: 0;

.aui-follow-up-attachment[data-kind="app"],
.aui-follow-up-attachment[data-kind="plugin"] {
.aui-follow-up-attachment[data-kind="integration"] {
background: var(--aui-primary-soft);

@@ -266,4 +266,3 @@ border-color: var(--aui-primary-border);

.aui-composer-chip[data-kind="app"],
.aui-composer-chip[data-kind="plugin"] {
.aui-composer-chip[data-kind="integration"] {
background: var(--aui-primary-soft);

@@ -339,8 +338,7 @@ border-color: var(--aui-primary-border);

.aui-composer-toolbar {
align-items: center;
align-items: end;
border-top: 0;
display: flex;
flex-wrap: wrap;
display: grid;
gap: var(--aui-space-150);
justify-content: space-between;
grid-template-columns: minmax(0, 1fr) auto;
margin-top: var(--aui-space-200);

@@ -360,3 +358,2 @@ min-width: 0;

.aui-composer-toolbar-start {
flex: 1 1 auto;
flex-wrap: wrap;

@@ -366,3 +363,3 @@ }

.aui-composer-toolbar-end {
flex: 0 0 auto;
justify-self: end;
position: relative;

@@ -469,2 +466,3 @@ }

display: flex;
flex: 0 0 auto;
gap: var(--aui-space-050);

@@ -476,8 +474,10 @@ }

display: flex;
flex-wrap: wrap;
flex: 1 1 auto;
flex-wrap: nowrap;
gap: var(--aui-space-150);
min-width: 0;
overflow: hidden;
}
/* --- Composer tool trigger (mode / model / effort) ---------------------- */
/* --- Composer tool trigger (policy / model / effort) -------------------- */

@@ -495,2 +495,3 @@ .aui-composer-tool {

max-width: 232px;
min-width: 0;
min-height: var(--aui-control-height-md);

@@ -497,0 +498,0 @@ padding: 0 var(--aui-space-225);

@@ -137,6 +137,8 @@ /* --- Button system -------------------------------------------------------- */

background: var(--aui-panel-alt);
border: 1px solid var(--aui-border);
border: 1px solid var(--aui-border-strong);
border-radius: var(--aui-radius-pill);
box-shadow: var(--aui-elevation-1);
display: inline-flex;
gap: var(--aui-space-050);
max-width: 100%;
padding: var(--aui-space-075);

@@ -148,2 +150,3 @@ }

height: var(--aui-control-height-sm);
min-width: 64px;
}

@@ -150,0 +153,0 @@

@@ -121,3 +121,3 @@ /* --- Input shell ---------------------------------------------------------- */

.aui-segment:hover:not([aria-pressed="true"]):not(:disabled) {
.aui-segment:hover:not([aria-pressed="true"]):not([aria-checked="true"]):not(:disabled) {
color: var(--aui-fg);

@@ -131,3 +131,4 @@ }

.aui-segment[aria-pressed="true"] {
.aui-segment[aria-pressed="true"],
.aui-segment[aria-checked="true"] {
background: var(--aui-panel);

@@ -134,0 +135,0 @@ box-shadow: var(--aui-elevation-1), var(--aui-control-shadow);

@@ -1,2 +0,2 @@

/* --- Anchored menu (mode / model / effort) ------------------------------- */
/* --- Anchored menu (policy / model / effort) ----------------------------- */

@@ -3,0 +3,0 @@ .aui-menu {

@@ -17,4 +17,3 @@ /* --- Responsive 900px / mid ---------------------------------------- */

.aui-mode-group,
.aui-field-wide {
.aui-policy-group {
grid-column: 1 / -1;

@@ -97,8 +96,2 @@ }

.aui-workspace {
grid-template-columns: minmax(0, 1fr);
overflow: visible;
padding: 0;
}
.aui-thread-header {

@@ -190,4 +183,3 @@ align-items: flex-start;

.aui-mode-group,
.aui-field-wide {
.aui-policy-group {
grid-column: 1 / -1;

@@ -194,0 +186,0 @@ }

@@ -1,2 +0,2 @@

/* --- Run settings (thread-start panel primitive) ------------------------- */
/* --- Run controls -------------------------------------------------------- */

@@ -11,4 +11,3 @@ .aui-run-controls-compact {

grid-template-columns:
minmax(220px, 1.2fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr)
minmax(220px, 1fr);
minmax(220px, 1.2fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr);
margin-top: 0;

@@ -21,3 +20,3 @@ max-height: min(420px, calc(100vh - 160px));

.aui-run-controls-compact .aui-mode-group legend,
.aui-run-controls-compact .aui-policy-group legend,
.aui-run-controls-compact .aui-field span {

@@ -41,4 +40,3 @@ color: var(--aui-fg-muted);

}
.aui-run-controls-compact .aui-mode-group,
.aui-run-controls-compact .aui-field-wide {
.aui-run-controls-compact .aui-policy-group {
grid-column: 1 / -1;

@@ -45,0 +43,0 @@ }

@@ -12,2 +12,3 @@ /* --- Shell ---------------------------------------------------------- */

overflow: hidden;
overscroll-behavior-x: none;
position: relative;

@@ -14,0 +15,0 @@ }

@@ -11,2 +11,3 @@ /* --- Sidebar -------------------------------------------------------- */

overflow: hidden;
overscroll-behavior-x: none;
padding: var(--aui-space-350) var(--aui-space-300);

@@ -68,4 +69,6 @@ }

min-width: 0;
overflow: auto;
overscroll-behavior: contain;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-x: none;
overscroll-behavior-y: contain;
padding-bottom: var(--aui-space-100);

@@ -72,0 +75,0 @@ }

@@ -166,3 +166,3 @@ /* --- Account status popover ---------------------------------------- */

@media (max-width: 640px) {
@container (max-width: 980px) {
.aui-account-trigger {

@@ -186,1 +186,21 @@ justify-content: center;

}
@media (max-width: 980px) {
.aui-account-trigger {
justify-content: center;
padding: 0;
width: var(--aui-control-height-lg);
}
.aui-account-avatar {
flex: 0 0 22px;
}
.aui-account-plan {
display: none;
}
.aui-account-trigger > svg:last-child {
display: none;
}
}

@@ -13,2 +13,3 @@ /* --- Status bar ----------------------------------------------------- */

color: var(--aui-fg-muted);
container-type: inline-size;
display: flex;

@@ -116,3 +117,3 @@ gap: var(--aui-space-300);

@media (max-width: 640px) {
@container (max-width: 980px) {
.aui-status {

@@ -144,1 +145,29 @@ gap: var(--aui-space-150);

}
@media (max-width: 980px) {
.aui-status {
gap: var(--aui-space-150);
padding: var(--aui-space-175) var(--aui-space-300);
}
.aui-brand {
flex: 0 0 auto;
gap: 0;
min-width: max-content;
padding-inline: var(--aui-space-250);
}
.aui-status-actions {
flex: 1 1 auto;
gap: var(--aui-space-150);
justify-content: flex-end;
min-width: 0;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: none;
}
.aui-status-actions::-webkit-scrollbar {
display: none;
}
}

@@ -203,6 +203,5 @@ /* --- Thread history metadata -------------------------------------------- */

/* The first-run card is narrow, so the thread-start panel stacks: execution
* mode and working directory span the full width, model and effort pair up. */
.aui-first-run:not(.aui-first-run-starter) .aui-run-controls .aui-mode-group,
.aui-first-run:not(.aui-first-run-starter) .aui-run-controls .aui-field-wide {
/* The first-run card is narrow, so the policy selector spans the full width
* while model and effort pair up. */
.aui-first-run:not(.aui-first-run-starter) .aui-run-controls .aui-policy-group {
grid-column: 1 / -1;

@@ -209,0 +208,0 @@ }

@@ -6,13 +6,14 @@ /* --- Secondary chrome (rail) --------------------------------------- */

align-items: center;
background: var(--aui-panel);
border: 1px solid var(--aui-border);
background: var(--aui-panel-alt);
border: 1px solid var(--aui-border-strong);
border-radius: var(--aui-radius-pill);
box-shadow: var(--aui-elevation-1);
display: inline-grid;
gap: var(--aui-space-200);
gap: var(--aui-space-175);
grid-template-columns: auto minmax(0, 1fr);
justify-self: stretch;
justify-self: start;
max-width: 100%;
min-height: var(--aui-control-height-md);
padding: var(--aui-space-125) var(--aui-space-300);
width: 100%;
padding: var(--aui-space-100) var(--aui-space-250);
width: fit-content;
}

@@ -31,4 +32,5 @@

.aui-usage-summary span {
color: var(--aui-fg);
color: var(--aui-fg-strong);
font-size: var(--aui-font-size-sm-plus);
font-weight: 650;
min-width: 0;

@@ -40,2 +42,29 @@ overflow: hidden;

.aui-summary-values {
display: flex;
flex-wrap: wrap;
gap: var(--aui-space-100);
overflow: visible;
text-overflow: clip;
white-space: normal;
}
.aui-summary-value {
align-items: baseline;
background: var(--aui-panel);
border: 1px solid var(--aui-border);
border-radius: var(--aui-radius-pill);
display: inline-flex;
gap: var(--aui-space-100);
min-height: var(--aui-control-height-xs);
padding: 0 var(--aui-space-150);
}
.aui-summary-value em {
color: var(--aui-fg-muted);
font-size: var(--aui-font-size-xs);
font-style: normal;
font-weight: 600;
}
.aui-status-banners {

@@ -361,8 +390,7 @@ background: var(--aui-panel);

grid-template-columns:
minmax(260px, 1.4fr) minmax(150px, 1fr) minmax(120px, 0.7fr)
minmax(180px, 1fr);
minmax(260px, 1.4fr) minmax(150px, 1fr) minmax(120px, 0.7fr);
padding: var(--aui-space-350) var(--aui-space-500) var(--aui-space-400);
}
.aui-mode-group {
.aui-policy-group {
border: 0;

@@ -376,3 +404,3 @@ display: grid;

.aui-mode-group legend,
.aui-policy-group legend,
.aui-field span {

@@ -415,4 +443,3 @@ color: var(--aui-fg-muted);

.aui-skills-panel,
.aui-apps-panel,
.aui-extension-panel {
.aui-apps-panel {
background: var(--aui-panel);

@@ -419,0 +446,0 @@ border: 1px solid var(--aui-border);

@@ -5,2 +5,3 @@ /* --- Chat container ------------------------------------------------- */

background: var(--aui-bg);
container-type: inline-size;
display: grid;

@@ -11,2 +12,3 @@ grid-template-rows: auto minmax(0, 1fr);

overflow: hidden;
overscroll-behavior-x: none;
}

@@ -25,2 +27,3 @@

overflow: hidden;
overscroll-behavior-x: none;
}

@@ -40,2 +43,3 @@

overflow: hidden;
overscroll-behavior-x: none;
}

@@ -49,3 +53,6 @@

min-height: 0;
overflow: auto;
min-width: 0;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-x: none;
padding: var(--aui-space-350);

@@ -70,2 +77,3 @@ }

overflow: hidden;
overscroll-behavior-x: none;
}

@@ -271,2 +279,3 @@

box-shadow: var(--aui-elevation-2);
container-type: inline-size;
display: grid;

@@ -310,6 +319,5 @@ gap: var(--aui-space-250);

align-items: end;
display: flex;
flex-wrap: nowrap;
display: grid;
gap: var(--aui-space-200);
justify-content: space-between;
grid-template-columns: minmax(0, 1fr) auto;
min-width: 0;

@@ -320,3 +328,2 @@ }

align-items: end;
flex-wrap: nowrap;
gap: var(--aui-space-200);

@@ -359,4 +366,6 @@ margin-top: 0;

min-width: 0;
overflow: auto;
overscroll-behavior: contain;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-x: none;
overscroll-behavior-y: contain;
padding: var(--aui-space-450) var(--aui-space-550) var(--aui-space-700);

@@ -363,0 +372,0 @@ scroll-behavior: auto;

{
"name": "@nyosegawa/agent-ui-react",
"version": "1.0.0",
"version": "1.1.0",
"description": "React hooks and components for Agent UI.",

@@ -34,2 +34,22 @@ "license": "MIT",

},
"./headless": {
"import": {
"types": "./dist/headless.d.ts",
"default": "./dist/headless.js"
},
"require": {
"types": "./dist/headless.d.cts",
"default": "./dist/headless.cjs"
}
},
"./primitives": {
"import": {
"types": "./dist/primitives.d.ts",
"default": "./dist/primitives.js"
},
"require": {
"types": "./dist/primitives.d.cts",
"default": "./dist/primitives.cjs"
}
},
"./styles.css": {

@@ -57,4 +77,4 @@ "types": "./dist/styles.css.d.ts",

"@codemirror/view": "^6.42.1",
"@nyosegawa/agent-ui-codex": "^1.0.0",
"@nyosegawa/agent-ui-core": "^1.0.0"
"@nyosegawa/agent-ui-codex": "^1.1.0",
"@nyosegawa/agent-ui-core": "^1.1.0"
},

@@ -61,0 +81,0 @@ "peerDependencies": {

# @nyosegawa/agent-ui-react
React hooks, components, and transcript-first UI primitives for Agent UI.
React preset, headless controllers, and transcript-first UI primitives for Agent UI.

@@ -22,12 +22,20 @@ Use this package when a host application wants to compose Agent UI in a React

This package renders UI primitives and provides React integration. It does not
own routing, persistence, credentials, process lifecycle, or host-specific
product workflows.
This package provides three public entrypoints:
Customize the preset through public props, hooks, controllers, tokens, and the
`components` map. Import `@nyosegawa/agent-ui-react/styles.css` once; do not
depend on private style chunks, internal `.aui-*` selectors, source modules, or
generated Codex payloads as React API.
- `@nyosegawa/agent-ui-react` for the default `AgentProvider` / `AgentChat`
preset.
- `@nyosegawa/agent-ui-react/primitives` for visual building blocks.
- `@nyosegawa/agent-ui-react/headless` for hooks, controllers, and stable
input/resource types.
It does not own routing, persistence, credentials, process lifecycle, or
host-specific product workflows.
Customize the preset through public props, the `components` map, primitives,
headless controllers, and tokens. Import
`@nyosegawa/agent-ui-react/styles.css` once; do not depend on private style
chunks, internal `.aui-*` selectors, source modules, or generated Codex
payloads as React API.
See the repository docs for current package exports and integration guidance:
https://github.com/nyosegawa/agent-ui
/* --- Workspace (preset + host slot) ------------------------------- */
.aui-workspace {
display: grid;
gap: var(--aui-space-300);
grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
min-height: 0;
overflow: hidden;
padding: 0;
}
.aui-workspace > .aui-shell {
min-height: 0;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display