export { useSoma, useSomaAgents, useSomaConversations, useSomaFileContent, useSomaFiles, useSomaSkills } from './hooks/index.mjs'; export { A as AgentSkillPanel, S as SomaChat, a as SomaChatColors, b as SomaChatMessage, c as SomaChatProps, d as SomaConversationList, e as SomaCopilot, f as SomaFileBrowser, g as SomaFileViewer, h as SomaSkillEditor } from './index-CrnEhFSg.mjs'; import React from 'react'; export { S as SomaAgent, b as SomaConversation, c as SomaFile, d as SomaMessage, e as SomaSkill, f as SomaStreamEvent, U as UseSomaOptions, a as UseSomaReturn } from './index-CrbUs5kv.mjs'; declare function SomaPanel(): React.JSX.Element; interface SkillManagerProps { token: string; somaUrl?: string; onSkillAssigned?: () => void; } declare function SkillManager({ token, somaUrl, onSkillAssigned }: SkillManagerProps): React.JSX.Element; interface WorkspaceFile { name: string; type: 'file' | 'dir'; size: number; ext?: string; } interface UserWorkspaceProps { /** Tipo de owner: 'user' | 'agent' | 'org' */ ownerType?: 'user' | 'agent' | 'org'; /** ID del usuario/agente/org */ ownerId: string; /** Org ID para workspace compartido */ orgId?: string; /** URL base de Soma */ baseUrl?: string; /** API key o factory de auth headers */ authHeaders?: () => Record; /** Color scheme override */ colors?: Partial; /** Callback al seleccionar archivo */ onSelectFile?: (file: WorkspaceFile) => void; /** Mostrar uploader */ showUpload?: boolean; } interface UserWorkspaceColors { bg: string; surface: string; border: string; text: string; textSecondary: string; primary: string; error: string; success: string; radius: string; } declare function useUserWorkspace(options: { ownerType: 'user' | 'agent' | 'org'; ownerId: string; orgId?: string; baseUrl?: string; authHeaders?: () => Record; }): { files: WorkspaceFile[]; loading: boolean; error: string | null; currentPath: string; setCurrentPath: React.Dispatch>; fetchFiles: (path?: string) => Promise; navigateTo: (dirName: string) => void; navigateUp: () => void; upload: (name: string, data: string, path?: string) => Promise; deleteFile: (name: string) => Promise; }; declare function UserWorkspace({ ownerType, ownerId, orgId, baseUrl, authHeaders, colors: colorOverrides, onSelectFile, showUpload, }: UserWorkspaceProps): React.JSX.Element; interface UserFileDropZoneProps { /** Called when files are successfully uploaded */ onUploaded?: () => void; /** Upload function: (name, base64data, path?) => Promise */ onUpload: (name: string, base64data: string, path?: string) => Promise; /** Current directory path for upload */ currentPath?: string; /** Accepted file extensions */ accept?: string; /** Custom colors */ colors?: { bg?: string; border?: string; primary?: string; text?: string; textSecondary?: string; }; /** Disable drag-and-drop */ disableDrag?: boolean; } /** * Drag-and-drop file upload zone. * Generic — works with any upload backend. * Drop here, use in sidebar or main content area. */ declare function UserFileDropZone({ onUploaded, onUpload, currentPath, accept, colors: cOverride, disableDrag, }: UserFileDropZoneProps): React.JSX.Element; /** * SandboxProvider — abstraction for agent file storage. * * Implement this interface to plug any storage backend (S3, GCS, local FS, memory) * into SomaFileBrowser without depending on Soma's REST API. */ interface SandboxFile { name: string; type: 'file' | 'dir'; size: number; ext?: string; } interface SandboxProvider { /** List files and directories at the given path */ listFiles(path: string): Promise; /** Read file content as string */ readFile(path: string): Promise; /** Write content to a file, creating parent directories as needed */ writeFile(path: string, content: string): Promise; /** Delete a file or empty directory */ deleteFile(path: string): Promise; /** Create a directory */ mkdir(path: string): Promise; /** Optional: get Git-like commit history */ history?(path: string): Promise>; } /** * RestSandboxProvider — connects to Soma's /api/v1/files REST API. * * This is the default provider when no custom sandbox is passed to SomaFileBrowser. */ interface RestSandboxOptions { baseUrl?: string; apiKey?: string; authHeaders?: () => Record; } declare function createRestSandboxProvider(options?: RestSandboxOptions): SandboxProvider; /** * MemorySandboxProvider — in-memory file storage for tests and demos. */ declare function createMemorySandboxProvider(): SandboxProvider; export { type SandboxFile, type SandboxProvider, SkillManager, SomaPanel, UserFileDropZone, type UserFileDropZoneProps, UserWorkspace, type UserWorkspaceColors, type UserWorkspaceProps, type WorkspaceFile, createMemorySandboxProvider, createRestSandboxProvider, useUserWorkspace };