@ash-cloud/ash-ai 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -9,7 +9,7 @@ import * as _hono_node_server from '@hono/node-server';
9
9
  export { serve } from '@hono/node-server';
10
10
  import * as drizzle_orm_postgres_js from 'drizzle-orm/postgres-js';
11
11
  import postgres from 'postgres';
12
- export { A as AttachmentRow, M as MessageRow, b as NewAttachmentRow, a as NewMessageRow, c as NewQueueItemRow, e as NewSessionEventRow, N as NewSessionRow, Q as QueueItemRow, d as SessionEventRow, S as SessionRow, s as schema } from './schema-B7RbjHWi.cjs';
12
+ export { A as AttachmentRow, M as MessageRow, b as NewAttachmentRow, a as NewMessageRow, c as NewQueueItemRow, e as NewSessionEventRow, N as NewSessionRow, Q as QueueItemRow, d as SessionEventRow, S as SessionRow, s as schema } from './schema-DSLyNeoS.cjs';
13
13
  import { Writable } from 'stream';
14
14
  import 'drizzle-orm';
15
15
  import 'drizzle-orm/pg-core';
@@ -1312,35 +1312,63 @@ declare const EventCategory: {
1312
1312
  readonly ERROR: "error";
1313
1313
  readonly FILE: "file";
1314
1314
  readonly INPUT: "input";
1315
+ readonly WEBHOOK: "webhook";
1315
1316
  };
1316
1317
  type EventCategory = (typeof EventCategory)[keyof typeof EventCategory];
1317
1318
  /**
1318
1319
  * File sync operation types
1319
1320
  */
1320
- type FileSyncOperation = 'push' | 'pull' | 'sync_to_sandbox' | 'sync_from_sandbox' | 'delete';
1321
+ type FileSyncOperation = 'client_uploaded_to_ash_storage' | 'agent_sandbox_saved_to_ash_storage' | 'ash_storage_synced_to_agent_sandbox' | 'read_from_agent_sandbox' | 'deleted_from_ash_storage' | 'deleted_from_agent_sandbox';
1321
1322
  /**
1322
- * Direction of file sync
1323
+ * Who initiated the file sync operation
1323
1324
  */
1324
- type FileSyncDirection = 'to_s3' | 'from_s3' | 'to_sandbox' | 'from_sandbox';
1325
- /**
1326
- * Source of the file sync operation
1327
- */
1328
- type FileSyncSource = 'external' | 'internal';
1325
+ type FileSyncSource = 'client_api' | 'ash_file_sync';
1329
1326
  /**
1330
1327
  * Event data for file sync operations
1331
1328
  */
1332
1329
  interface FileSyncEventData {
1330
+ /** The specific operation that occurred - fully describes source and destination */
1333
1331
  operation: FileSyncOperation;
1334
- direction: FileSyncDirection;
1332
+ /** Who initiated this operation */
1335
1333
  source: FileSyncSource;
1334
+ /** Path of the file */
1336
1335
  filePath: string;
1336
+ /** Size of the file in bytes */
1337
1337
  fileSize?: number;
1338
+ /** Whether the operation succeeded */
1338
1339
  success: boolean;
1340
+ /** Error message if operation failed */
1339
1341
  error?: string;
1342
+ /** Git unified diff for text files */
1340
1343
  diff?: string;
1344
+ /** Whether this is a text file (vs binary) */
1341
1345
  isTextFile?: boolean;
1346
+ /** Previous file size for showing size change */
1342
1347
  previousSize?: number;
1343
1348
  }
1349
+ /**
1350
+ * Event data for webhook delivery tracking
1351
+ */
1352
+ interface WebhookDeliveryEventData {
1353
+ /** Type of webhook being delivered */
1354
+ webhookType: 'file_sync' | 'file_change';
1355
+ /** Target URL hostname (full URL not stored for security) */
1356
+ targetUrl: string;
1357
+ /** Whether the webhook was delivered successfully */
1358
+ success: boolean;
1359
+ /** HTTP status code from the webhook response */
1360
+ statusCode?: number;
1361
+ /** Error message if delivery failed */
1362
+ error?: string;
1363
+ /** Time taken to deliver the webhook in milliseconds */
1364
+ durationMs: number;
1365
+ /** Number of retry attempts made */
1366
+ retryCount?: number;
1367
+ /** File path that triggered this webhook (if applicable) */
1368
+ filePath?: string;
1369
+ /** Operation that triggered this webhook */
1370
+ operation?: string;
1371
+ }
1344
1372
  /**
1345
1373
  * A single event in the session timeline
1346
1374
  */
@@ -4945,6 +4973,13 @@ interface PushOptions {
4945
4973
  * Use '.' to write to sandbox working directory root.
4946
4974
  */
4947
4975
  targetPath?: string;
4976
+ /**
4977
+ * Who is initiating this push operation.
4978
+ * - 'client_api': External client/API is pushing files
4979
+ * - 'ash_file_sync': Ash's internal file sync system
4980
+ * Default: 'client_api'
4981
+ */
4982
+ source?: 'client_api' | 'ash_file_sync';
4948
4983
  }
4949
4984
  /**
4950
4985
  * Result of a file pull operation
@@ -4955,6 +4990,20 @@ interface FilePullResult {
4955
4990
  s3Written: boolean;
4956
4991
  error?: string;
4957
4992
  }
4993
+ /**
4994
+ * Options for pull operations
4995
+ */
4996
+ interface PullOptions {
4997
+ /**
4998
+ * Override the sandbox source path for reading files.
4999
+ * Default uses sandboxBasePath (.claude/files).
5000
+ * Use '.' to read from sandbox working directory root.
5001
+ *
5002
+ * This is useful when watching files edited by the agent,
5003
+ * which are at the sandbox root rather than in sandboxBasePath.
5004
+ */
5005
+ targetPath?: string;
5006
+ }
4958
5007
  /**
4959
5008
  * Result of a sync operation
4960
5009
  */
@@ -4967,10 +5016,12 @@ interface SyncResult {
4967
5016
  }
4968
5017
  /**
4969
5018
  * Event emitted during file sync operations
5019
+ * Operation names are fully explicit about source and destination
4970
5020
  */
4971
5021
  interface FileSyncEvent {
4972
- operation: 'push' | 'pull' | 'sync_to_sandbox' | 'sync_from_sandbox' | 'delete';
4973
- direction: 'to_s3' | 'from_s3' | 'to_sandbox' | 'from_sandbox';
5022
+ operation: 'client_uploaded_to_ash_storage' | 'agent_sandbox_saved_to_ash_storage' | 'ash_storage_synced_to_agent_sandbox' | 'read_from_agent_sandbox' | 'deleted_from_ash_storage' | 'deleted_from_agent_sandbox';
5023
+ /** Who initiated this operation */
5024
+ source: 'client_api' | 'ash_file_sync';
4974
5025
  filePath: string;
4975
5026
  fileSize?: number;
4976
5027
  success: boolean;
@@ -5007,6 +5058,16 @@ interface FileWatchOptions {
5007
5058
  * Local path to watch (required if useLocalWatcher is true)
5008
5059
  */
5009
5060
  localPath?: string;
5061
+ /**
5062
+ * Path(s) to watch in the sandbox.
5063
+ * Default: ['.'] (watch entire working directory to capture agent file edits)
5064
+ *
5065
+ * When watching '.', all file changes in the sandbox are detected,
5066
+ * including files edited by the agent (like src/Root.tsx).
5067
+ *
5068
+ * Set to [sandboxBasePath] to only watch files pushed via the API.
5069
+ */
5070
+ watchPaths?: string[];
5010
5071
  }
5011
5072
  /**
5012
5073
  * Options for creating a SandboxFileSync instance
@@ -5095,9 +5156,19 @@ declare class SandboxFileSync {
5095
5156
  * Remove webhook configuration
5096
5157
  */
5097
5158
  removeWebhook(): void;
5159
+ /**
5160
+ * Extract hostname from URL for display (security - don't expose full URL)
5161
+ */
5162
+ private extractHostname;
5163
+ /**
5164
+ * Persist webhook delivery event to the session timeline
5165
+ */
5166
+ private persistWebhookDelivery;
5098
5167
  /**
5099
5168
  * Send a webhook notification
5100
5169
  * @param payload - The webhook payload to send
5170
+ * @param sessionId - Session ID for persisting delivery events
5171
+ * @returns WebhookDeliveryResult with success/failure info
5101
5172
  */
5102
5173
  private sendWebhook;
5103
5174
  /**
@@ -5137,7 +5208,7 @@ declare class SandboxFileSync {
5137
5208
  * @param sessionId - Session ID
5138
5209
  * @param path - File path (stored in S3 and used as relative path in sandbox)
5139
5210
  * @param content - File content
5140
- * @param options - Push options (e.g., targetPath to override sandbox location)
5211
+ * @param options - Push options (e.g., targetPath, source)
5141
5212
  * @param previousContent - Optional previous content for diff computation
5142
5213
  */
5143
5214
  pushFile(sessionId: string, path: string, content: Buffer, options?: PushOptions, previousContent?: Buffer): Promise<FilePushResult>;
@@ -5156,8 +5227,12 @@ declare class SandboxFileSync {
5156
5227
  /**
5157
5228
  * Pull a file from sandbox to S3
5158
5229
  * Reads from sandbox and writes to S3
5230
+ *
5231
+ * @param sessionId - Session ID
5232
+ * @param path - File path (relative to sandbox)
5233
+ * @param options - Pull options (e.g., targetPath to override sandbox location)
5159
5234
  */
5160
- pullFile(sessionId: string, path: string): Promise<FilePullResult>;
5235
+ pullFile(sessionId: string, path: string, options?: PullOptions): Promise<FilePullResult>;
5161
5236
  /**
5162
5237
  * Read a file (tries sandbox first, falls back to S3)
5163
5238
  */
@@ -10412,4 +10487,4 @@ declare class AshCloud {
10412
10487
  */
10413
10488
  declare function createAshCloud(options?: Partial<AshCloudOptions>): AshCloud;
10414
10489
 
10415
- export { AVAILABLE_MODELS, type ActionType, type ActiveSession, type AgentBackend, type AgentConfig$1 as AgentConfig, AgentConfigSchema, AgentError, AgentHarness, type AgentHarnessConfig, type AgentHooks, type AgentId, AgentStatus, type AgentStorage, type AgentsRouterOptions$1 as AgentsRouterOptions, AshCloud, AshCloudApiError, AshCloudClient, type AshCloudConfig, type AshCloudError, type AshCloudOptions, type AssistantMessageEntry, type Attachment, type AttachmentConfig, AttachmentConfigSchema, type AttachmentId, AttachmentStorage, type AttachmentStorageConfig, type BackendConfig, type BulkStorage, type BundleStore, type ClaudeAgentOptions, type ClaudeContentBlock, type ClaudeMessage, ClaudeSdkClient, type ClaudeStreamEvent, type ClaudeV2Session, CloudSandbox, type CloudSandboxConfig, CloudStorage, type CloudStorageConfig, type CommandRunAction, type CommandRunResult, ConfigBuilder, ConfigError, type CreateAgentOptions, type CreateQueueItemOptions, type CreateSessionEventOptions, type CreateSessionOptions, CredentialManager, type CredentialManagerConfig, type CredentialStorage, type CustomExecutor, DEFAULT_MODELS, DEFAULT_SANDBOX_PROVIDER_CONFIG, type DiscoveredSkill, type DockerConfig, type EncryptedCredential, type EntryListener, type ErrorEntry, type ErrorEvent, EventCategory, type EventMiddleware, type EventStorage, type FileChangeCallback, type FileChangeEvent, type FileChangeType, type FileContent$1 as FileContent, type FileEditAction, type FileEntry, type FileMetadata, type FileProvider, type FileProviderOptions, type FilePullResult, type FilePushResult, type FileReadAction, type FileStore, type FileSyncDirection, type FileSyncEvent, type FileSyncEventData, type FileSyncOperation, type FileSyncSource, type FileWatchOptions, FileWatcherManager, type FileWatcherOptions, type FileWatcherStatus, type FileWriteAction, GCSBundleStore, type GCSBundleStoreConfig, GeminiCliClient, type GeminiCliOptions, type GenericToolAction, type GetOrCreateSandboxOptions, GitHubFileProvider, type GitHubSkillConfig, type GitHubSkillResult, type GitHubSkillSource, type GitRepo, type GlobAction, type AgentConfig as HarnessAgentConfig, type HarnessConfig, HarnessConfigSchema, HarnessError, HarnessErrorCode, type HarnessErrorOptions, HarnessEventEmitter, type HarnessEventHandler, type HarnessEventPayloads, type HarnessEventType, type HarnessServer, type HarnessServerConfig, type HarnessServerHooks, type ImageContent, InSandboxWatcher, InSandboxWatcherManager, type InSandboxWatcherOptions, type ListAgentsOptions, type ListMessagesOptions, type ListQueueItemsOptions, type ListSessionEventsOptions, type ListSessionsOptions, type LoadStateResult, LocalBundleStore, LocalFileProvider, LocalSandbox, type LocalSandboxConfig, type LocalSkillSource, type LogContext, type LogEntry, type LogLevel, type Logger, type LoggerConfig, type ManagedWorkspace, type McpAuth, McpConfigBuilder, type McpGenerationResult, type McpHttpServerConfig, McpPresets, type McpServerConfig, type McpServerInfo, type McpServerStatus, McpServers, type McpStatusEvent, type McpStdioServerConfig, type McpTool, type McpToolAction, type McpTransportType, MemoryBundleStore, MemoryCredentialStorage, MemoryQueueStorage, MemoryRateLimitStore, MemoryStorage, type Message, type MessageContent, type MessageEvent, type MessageId, MessageRole, type NormalizedEntry, type NormalizedEntryType, type NormalizedToolCall, NotFoundError, type OpenAPIServer, type OpenAPIServerConfig, type PaginatedResult, type PaginationOptions, type PooledSandbox, PostgresQueueStorage, type PostgresQueueStorageConfig, PostgresStorage, type PostgresStorageConfig, ProviderSandbox, type ProviderSandboxConfig, type ProxyConfig, type QueueItem, QueueItemStatus, QueueProcessor, type QueueProcessorCallbacks, type QueueProcessorConfig, type QueueRouterOptions, type QueueStats, type QueueStorage, type RateLimitConfig, type RateLimitResult, type RateLimitStore, RemoteFileWatcherManager, type RemoteFileWatcherOptions, RemoteSandboxFileWatcher, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxConfig, type SandboxConnection, type SandboxFileOperations, SandboxFileSync, type SandboxFileSyncOptions, SandboxFileWatcher, SandboxGitRepo, type SandboxHeartbeatStatus, type SandboxLogCallback, type SandboxLogCategory$1 as SandboxLogCategory, type SandboxLogEntry$1 as SandboxLogEntry, type SandboxLogEvent, type SandboxLogLevel$1 as SandboxLogLevel, SandboxLogger, SandboxPool, type SandboxPoolConfig, type SandboxPoolMetricsCallback, type SandboxPoolStatus, type SandboxProviderConfig, type SandboxProviderType, type SandboxReadResult, type SandboxWithState, type SandboxWriteResult, type SaveStateResult, type SearchAction, type SendMessageOptions, type SendMessageRequest, type SendMessageResult, type ServerConfig, ServerConfigSchema, type Session, type SessionEndEvent, SessionError, type SessionEvent, type SessionId, SessionManager, type SessionQueueStatus, type SessionStartEvent, SessionStatus, type SessionStoppedEvent, type SessionStorage, type SessionsRouterOptions$1 as SessionsRouterOptions, SkillCatalog, type SkillConfig, SkillManager, type SkillManagerOptions, type SkillSource, type SkillsConfig, type StartServerOptions, type StopSessionResult, type StorageConfig$1 as StorageConfig, StorageConfigSchema, StorageError, type StoredAgent, type StreamEvent, StreamEventType, SupabaseBundleStore, type SupabaseBundleStoreConfig, SupabaseStorage, type SupabaseStorageConfig, type SyncResult, type TextContent, type TextDeltaEvent, type ThinkingDeltaEvent, type ThinkingEntry, type TodoItem, type TodoStatus, type TodoWriteAction, type ToolCallEntry, ToolCallProcessor, ToolError, type ToolResult, type ToolResultContent, type ToolResultEvent, type ToolStatus, type ToolUseContent, type ToolUseEvent, type TransactionalStorage, type TurnCompleteEvent, type UpdateAgentOptions, type UserMessageEntry, ValidationError, type WebFetchAction, type WebSearchAction, type WebhookConfig, type WebhookPayload, Workspace, type CommandResult as WorkspaceCommandResult, type WorkspaceConfig, type WorkspaceHook, type WorkspaceLoadResult, WorkspaceManager, type WorkspaceSaveResult, type WorkspaceSessionConfig, attachmentSchema, attachmentToDataUrl, checkSecurityConfig, claudeClient, cleanupAllSandboxes, configureMcp, configureRuntime, convertClaudeMessage, createAgentsRouter$1 as createAgentsRouter, createAshCloud, createBackendExecutor, createCloudSandbox, createConfig, createCredentialManager, createOpenAPIServer as createDocumentedServer, createE2BSandbox, createEventHandler, createEventMiddlewareChain, createFileWatcher, createFileWatcherManager, createGCSBundleStore, createGeminiExecutor, createGitHubFileProvider, createGitRepo, createHarnessServer, createInSandboxWatcher, createInSandboxWatcherManager, createLocalBundleStore, createLocalFileProvider, createLocalSandbox, createLogger, createMemoryBundleStore, createMinioBundleStore, createMinioFileStore, createModalSandbox, createAgentsRouter as createOpenAPIAgentsRouter, createOpenAPIServer, createSessionsRouter as createOpenAPISessionsRouter, createSkillsRouter as createOpenAPISkillsRouter, createProviderSandbox, createQueueProcessor, createQueueRouter, createR2BundleStore, createR2FileStore, createRemoteFileWatcher, createRemoteFileWatcherManager, createS3BundleStore, createS3FileStore, createSandboxFileOperations, createSandboxFileSync, createSandboxLogger, createSandboxOptions, createSessionWorkspace, createSessionsRouter$1 as createSessionsRouter, createSkillCatalog, createSkillManager, createSupabaseBundleStore, createSupabaseBundleStoreFromEnv, createToolCall, createToolCallProcessor, createVercelSandbox, createVercelSandboxExecutor, createWorkspace, createWorkspaceHooks, createWorkspaceManager, dataUrlToBuffer, defineAgent, defineConfig, ensureSandboxPoolInitialized, env, envOptional, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, getRemoteFileWatcherManager, getSandboxCacheStats, getSandboxPool, getWorkspaceManager, gitHubSkillSourceSchema, globalEventEmitter, hasErrorCode, hashStartupScript, httpMcpWithAuth, initializeSandboxPool, introspectMcpServer, invalidateSandbox, isCommandRunAction, isDocumentMimeType, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isHarnessError, isHttpMcpConfig, isImageMimeType, isMcpToolAction, isSandboxExpiredError, isSandboxRunning, isSearchAction, isSensitivePath, isStdioMcpConfig, isTodoWriteAction, isToolCallEntry, isValidModel, isWebFetchAction, isWebSearchAction, listFilesInSandbox, loadConfig, loadGitHubSkill, loadGitHubSkills, loadWorkspaceState, localSkillSourceSchema, log, mapClaudeOptionsToGemini, mapToolToActionType, markConfigInstalled, markSdkInstalled, markStartupScriptRan, mcpAuthToHeaders, messageContentSchema, messageSchema, needsStartupScriptRerun, normalizeGitHubConfigs, normalizeMcpServers, normalizeMessages, normalizeToolResult, onHeartbeat, schemas as openApiSchemas, parseCommandResult, parseGitHubUrl, parseMcpToolName, processStreamEvents, rateLimit, rateLimiters, readFileFromSandbox, rekeySessionId, releaseSandbox, requestLogger, saveWorkspaceState, sessionSchema, shouldUseSandbox, shutdownSandboxPool, skillConfigSchema, skillSourceSchema, sseMcpWithAuth, startServer, updateToolCallWithResult, writeFileToSandbox };
10490
+ export { AVAILABLE_MODELS, type ActionType, type ActiveSession, type AgentBackend, type AgentConfig$1 as AgentConfig, AgentConfigSchema, AgentError, AgentHarness, type AgentHarnessConfig, type AgentHooks, type AgentId, AgentStatus, type AgentStorage, type AgentsRouterOptions$1 as AgentsRouterOptions, AshCloud, AshCloudApiError, AshCloudClient, type AshCloudConfig, type AshCloudError, type AshCloudOptions, type AssistantMessageEntry, type Attachment, type AttachmentConfig, AttachmentConfigSchema, type AttachmentId, AttachmentStorage, type AttachmentStorageConfig, type BackendConfig, type BulkStorage, type BundleStore, type ClaudeAgentOptions, type ClaudeContentBlock, type ClaudeMessage, ClaudeSdkClient, type ClaudeStreamEvent, type ClaudeV2Session, CloudSandbox, type CloudSandboxConfig, CloudStorage, type CloudStorageConfig, type CommandRunAction, type CommandRunResult, ConfigBuilder, ConfigError, type CreateAgentOptions, type CreateQueueItemOptions, type CreateSessionEventOptions, type CreateSessionOptions, CredentialManager, type CredentialManagerConfig, type CredentialStorage, type CustomExecutor, DEFAULT_MODELS, DEFAULT_SANDBOX_PROVIDER_CONFIG, type DiscoveredSkill, type DockerConfig, type EncryptedCredential, type EntryListener, type ErrorEntry, type ErrorEvent, EventCategory, type EventMiddleware, type EventStorage, type FileChangeCallback, type FileChangeEvent, type FileChangeType, type FileContent$1 as FileContent, type FileEditAction, type FileEntry, type FileMetadata, type FileProvider, type FileProviderOptions, type FilePullResult, type FilePushResult, type FileReadAction, type FileStore, type FileSyncEvent, type FileSyncEventData, type FileSyncOperation, type FileSyncSource, type FileWatchOptions, FileWatcherManager, type FileWatcherOptions, type FileWatcherStatus, type FileWriteAction, GCSBundleStore, type GCSBundleStoreConfig, GeminiCliClient, type GeminiCliOptions, type GenericToolAction, type GetOrCreateSandboxOptions, GitHubFileProvider, type GitHubSkillConfig, type GitHubSkillResult, type GitHubSkillSource, type GitRepo, type GlobAction, type AgentConfig as HarnessAgentConfig, type HarnessConfig, HarnessConfigSchema, HarnessError, HarnessErrorCode, type HarnessErrorOptions, HarnessEventEmitter, type HarnessEventHandler, type HarnessEventPayloads, type HarnessEventType, type HarnessServer, type HarnessServerConfig, type HarnessServerHooks, type ImageContent, InSandboxWatcher, InSandboxWatcherManager, type InSandboxWatcherOptions, type ListAgentsOptions, type ListMessagesOptions, type ListQueueItemsOptions, type ListSessionEventsOptions, type ListSessionsOptions, type LoadStateResult, LocalBundleStore, LocalFileProvider, LocalSandbox, type LocalSandboxConfig, type LocalSkillSource, type LogContext, type LogEntry, type LogLevel, type Logger, type LoggerConfig, type ManagedWorkspace, type McpAuth, McpConfigBuilder, type McpGenerationResult, type McpHttpServerConfig, McpPresets, type McpServerConfig, type McpServerInfo, type McpServerStatus, McpServers, type McpStatusEvent, type McpStdioServerConfig, type McpTool, type McpToolAction, type McpTransportType, MemoryBundleStore, MemoryCredentialStorage, MemoryQueueStorage, MemoryRateLimitStore, MemoryStorage, type Message, type MessageContent, type MessageEvent, type MessageId, MessageRole, type NormalizedEntry, type NormalizedEntryType, type NormalizedToolCall, NotFoundError, type OpenAPIServer, type OpenAPIServerConfig, type PaginatedResult, type PaginationOptions, type PooledSandbox, PostgresQueueStorage, type PostgresQueueStorageConfig, PostgresStorage, type PostgresStorageConfig, ProviderSandbox, type ProviderSandboxConfig, type ProxyConfig, type PullOptions, type PushOptions, type QueueItem, QueueItemStatus, QueueProcessor, type QueueProcessorCallbacks, type QueueProcessorConfig, type QueueRouterOptions, type QueueStats, type QueueStorage, type RateLimitConfig, type RateLimitResult, type RateLimitStore, RemoteFileWatcherManager, type RemoteFileWatcherOptions, RemoteSandboxFileWatcher, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxConfig, type SandboxConnection, type SandboxFileOperations, SandboxFileSync, type SandboxFileSyncOptions, SandboxFileWatcher, SandboxGitRepo, type SandboxHeartbeatStatus, type SandboxLogCallback, type SandboxLogCategory$1 as SandboxLogCategory, type SandboxLogEntry$1 as SandboxLogEntry, type SandboxLogEvent, type SandboxLogLevel$1 as SandboxLogLevel, SandboxLogger, SandboxPool, type SandboxPoolConfig, type SandboxPoolMetricsCallback, type SandboxPoolStatus, type SandboxProviderConfig, type SandboxProviderType, type SandboxReadResult, type SandboxWithState, type SandboxWriteResult, type SaveStateResult, type SearchAction, type SendMessageOptions, type SendMessageRequest, type SendMessageResult, type ServerConfig, ServerConfigSchema, type Session, type SessionEndEvent, SessionError, type SessionEvent, type SessionId, SessionManager, type SessionQueueStatus, type SessionStartEvent, SessionStatus, type SessionStoppedEvent, type SessionStorage, type SessionsRouterOptions$1 as SessionsRouterOptions, SkillCatalog, type SkillConfig, SkillManager, type SkillManagerOptions, type SkillSource, type SkillsConfig, type StartServerOptions, type StopSessionResult, type StorageConfig$1 as StorageConfig, StorageConfigSchema, StorageError, type StoredAgent, type StreamEvent, StreamEventType, SupabaseBundleStore, type SupabaseBundleStoreConfig, SupabaseStorage, type SupabaseStorageConfig, type SyncResult, type TextContent, type TextDeltaEvent, type ThinkingDeltaEvent, type ThinkingEntry, type TodoItem, type TodoStatus, type TodoWriteAction, type ToolCallEntry, ToolCallProcessor, ToolError, type ToolResult, type ToolResultContent, type ToolResultEvent, type ToolStatus, type ToolUseContent, type ToolUseEvent, type TransactionalStorage, type TurnCompleteEvent, type UpdateAgentOptions, type UserMessageEntry, ValidationError, type WebFetchAction, type WebSearchAction, type WebhookConfig, type WebhookDeliveryEventData, type WebhookPayload, Workspace, type CommandResult as WorkspaceCommandResult, type WorkspaceConfig, type WorkspaceHook, type WorkspaceLoadResult, WorkspaceManager, type WorkspaceSaveResult, type WorkspaceSessionConfig, attachmentSchema, attachmentToDataUrl, checkSecurityConfig, claudeClient, cleanupAllSandboxes, configureMcp, configureRuntime, convertClaudeMessage, createAgentsRouter$1 as createAgentsRouter, createAshCloud, createBackendExecutor, createCloudSandbox, createConfig, createCredentialManager, createOpenAPIServer as createDocumentedServer, createE2BSandbox, createEventHandler, createEventMiddlewareChain, createFileWatcher, createFileWatcherManager, createGCSBundleStore, createGeminiExecutor, createGitHubFileProvider, createGitRepo, createHarnessServer, createInSandboxWatcher, createInSandboxWatcherManager, createLocalBundleStore, createLocalFileProvider, createLocalSandbox, createLogger, createMemoryBundleStore, createMinioBundleStore, createMinioFileStore, createModalSandbox, createAgentsRouter as createOpenAPIAgentsRouter, createOpenAPIServer, createSessionsRouter as createOpenAPISessionsRouter, createSkillsRouter as createOpenAPISkillsRouter, createProviderSandbox, createQueueProcessor, createQueueRouter, createR2BundleStore, createR2FileStore, createRemoteFileWatcher, createRemoteFileWatcherManager, createS3BundleStore, createS3FileStore, createSandboxFileOperations, createSandboxFileSync, createSandboxLogger, createSandboxOptions, createSessionWorkspace, createSessionsRouter$1 as createSessionsRouter, createSkillCatalog, createSkillManager, createSupabaseBundleStore, createSupabaseBundleStoreFromEnv, createToolCall, createToolCallProcessor, createVercelSandbox, createVercelSandboxExecutor, createWorkspace, createWorkspaceHooks, createWorkspaceManager, dataUrlToBuffer, defineAgent, defineConfig, ensureSandboxPoolInitialized, env, envOptional, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, getRemoteFileWatcherManager, getSandboxCacheStats, getSandboxPool, getWorkspaceManager, gitHubSkillSourceSchema, globalEventEmitter, hasErrorCode, hashStartupScript, httpMcpWithAuth, initializeSandboxPool, introspectMcpServer, invalidateSandbox, isCommandRunAction, isDocumentMimeType, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isHarnessError, isHttpMcpConfig, isImageMimeType, isMcpToolAction, isSandboxExpiredError, isSandboxRunning, isSearchAction, isSensitivePath, isStdioMcpConfig, isTodoWriteAction, isToolCallEntry, isValidModel, isWebFetchAction, isWebSearchAction, listFilesInSandbox, loadConfig, loadGitHubSkill, loadGitHubSkills, loadWorkspaceState, localSkillSourceSchema, log, mapClaudeOptionsToGemini, mapToolToActionType, markConfigInstalled, markSdkInstalled, markStartupScriptRan, mcpAuthToHeaders, messageContentSchema, messageSchema, needsStartupScriptRerun, normalizeGitHubConfigs, normalizeMcpServers, normalizeMessages, normalizeToolResult, onHeartbeat, schemas as openApiSchemas, parseCommandResult, parseGitHubUrl, parseMcpToolName, processStreamEvents, rateLimit, rateLimiters, readFileFromSandbox, rekeySessionId, releaseSandbox, requestLogger, saveWorkspaceState, sessionSchema, shouldUseSandbox, shutdownSandboxPool, skillConfigSchema, skillSourceSchema, sseMcpWithAuth, startServer, updateToolCallWithResult, writeFileToSandbox };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import * as _hono_node_server from '@hono/node-server';
9
9
  export { serve } from '@hono/node-server';
10
10
  import * as drizzle_orm_postgres_js from 'drizzle-orm/postgres-js';
11
11
  import postgres from 'postgres';
12
- export { A as AttachmentRow, M as MessageRow, b as NewAttachmentRow, a as NewMessageRow, c as NewQueueItemRow, e as NewSessionEventRow, N as NewSessionRow, Q as QueueItemRow, d as SessionEventRow, S as SessionRow, s as schema } from './schema-B7RbjHWi.js';
12
+ export { A as AttachmentRow, M as MessageRow, b as NewAttachmentRow, a as NewMessageRow, c as NewQueueItemRow, e as NewSessionEventRow, N as NewSessionRow, Q as QueueItemRow, d as SessionEventRow, S as SessionRow, s as schema } from './schema-DSLyNeoS.js';
13
13
  import { Writable } from 'stream';
14
14
  import 'drizzle-orm';
15
15
  import 'drizzle-orm/pg-core';
@@ -1312,35 +1312,63 @@ declare const EventCategory: {
1312
1312
  readonly ERROR: "error";
1313
1313
  readonly FILE: "file";
1314
1314
  readonly INPUT: "input";
1315
+ readonly WEBHOOK: "webhook";
1315
1316
  };
1316
1317
  type EventCategory = (typeof EventCategory)[keyof typeof EventCategory];
1317
1318
  /**
1318
1319
  * File sync operation types
1319
1320
  */
1320
- type FileSyncOperation = 'push' | 'pull' | 'sync_to_sandbox' | 'sync_from_sandbox' | 'delete';
1321
+ type FileSyncOperation = 'client_uploaded_to_ash_storage' | 'agent_sandbox_saved_to_ash_storage' | 'ash_storage_synced_to_agent_sandbox' | 'read_from_agent_sandbox' | 'deleted_from_ash_storage' | 'deleted_from_agent_sandbox';
1321
1322
  /**
1322
- * Direction of file sync
1323
+ * Who initiated the file sync operation
1323
1324
  */
1324
- type FileSyncDirection = 'to_s3' | 'from_s3' | 'to_sandbox' | 'from_sandbox';
1325
- /**
1326
- * Source of the file sync operation
1327
- */
1328
- type FileSyncSource = 'external' | 'internal';
1325
+ type FileSyncSource = 'client_api' | 'ash_file_sync';
1329
1326
  /**
1330
1327
  * Event data for file sync operations
1331
1328
  */
1332
1329
  interface FileSyncEventData {
1330
+ /** The specific operation that occurred - fully describes source and destination */
1333
1331
  operation: FileSyncOperation;
1334
- direction: FileSyncDirection;
1332
+ /** Who initiated this operation */
1335
1333
  source: FileSyncSource;
1334
+ /** Path of the file */
1336
1335
  filePath: string;
1336
+ /** Size of the file in bytes */
1337
1337
  fileSize?: number;
1338
+ /** Whether the operation succeeded */
1338
1339
  success: boolean;
1340
+ /** Error message if operation failed */
1339
1341
  error?: string;
1342
+ /** Git unified diff for text files */
1340
1343
  diff?: string;
1344
+ /** Whether this is a text file (vs binary) */
1341
1345
  isTextFile?: boolean;
1346
+ /** Previous file size for showing size change */
1342
1347
  previousSize?: number;
1343
1348
  }
1349
+ /**
1350
+ * Event data for webhook delivery tracking
1351
+ */
1352
+ interface WebhookDeliveryEventData {
1353
+ /** Type of webhook being delivered */
1354
+ webhookType: 'file_sync' | 'file_change';
1355
+ /** Target URL hostname (full URL not stored for security) */
1356
+ targetUrl: string;
1357
+ /** Whether the webhook was delivered successfully */
1358
+ success: boolean;
1359
+ /** HTTP status code from the webhook response */
1360
+ statusCode?: number;
1361
+ /** Error message if delivery failed */
1362
+ error?: string;
1363
+ /** Time taken to deliver the webhook in milliseconds */
1364
+ durationMs: number;
1365
+ /** Number of retry attempts made */
1366
+ retryCount?: number;
1367
+ /** File path that triggered this webhook (if applicable) */
1368
+ filePath?: string;
1369
+ /** Operation that triggered this webhook */
1370
+ operation?: string;
1371
+ }
1344
1372
  /**
1345
1373
  * A single event in the session timeline
1346
1374
  */
@@ -4945,6 +4973,13 @@ interface PushOptions {
4945
4973
  * Use '.' to write to sandbox working directory root.
4946
4974
  */
4947
4975
  targetPath?: string;
4976
+ /**
4977
+ * Who is initiating this push operation.
4978
+ * - 'client_api': External client/API is pushing files
4979
+ * - 'ash_file_sync': Ash's internal file sync system
4980
+ * Default: 'client_api'
4981
+ */
4982
+ source?: 'client_api' | 'ash_file_sync';
4948
4983
  }
4949
4984
  /**
4950
4985
  * Result of a file pull operation
@@ -4955,6 +4990,20 @@ interface FilePullResult {
4955
4990
  s3Written: boolean;
4956
4991
  error?: string;
4957
4992
  }
4993
+ /**
4994
+ * Options for pull operations
4995
+ */
4996
+ interface PullOptions {
4997
+ /**
4998
+ * Override the sandbox source path for reading files.
4999
+ * Default uses sandboxBasePath (.claude/files).
5000
+ * Use '.' to read from sandbox working directory root.
5001
+ *
5002
+ * This is useful when watching files edited by the agent,
5003
+ * which are at the sandbox root rather than in sandboxBasePath.
5004
+ */
5005
+ targetPath?: string;
5006
+ }
4958
5007
  /**
4959
5008
  * Result of a sync operation
4960
5009
  */
@@ -4967,10 +5016,12 @@ interface SyncResult {
4967
5016
  }
4968
5017
  /**
4969
5018
  * Event emitted during file sync operations
5019
+ * Operation names are fully explicit about source and destination
4970
5020
  */
4971
5021
  interface FileSyncEvent {
4972
- operation: 'push' | 'pull' | 'sync_to_sandbox' | 'sync_from_sandbox' | 'delete';
4973
- direction: 'to_s3' | 'from_s3' | 'to_sandbox' | 'from_sandbox';
5022
+ operation: 'client_uploaded_to_ash_storage' | 'agent_sandbox_saved_to_ash_storage' | 'ash_storage_synced_to_agent_sandbox' | 'read_from_agent_sandbox' | 'deleted_from_ash_storage' | 'deleted_from_agent_sandbox';
5023
+ /** Who initiated this operation */
5024
+ source: 'client_api' | 'ash_file_sync';
4974
5025
  filePath: string;
4975
5026
  fileSize?: number;
4976
5027
  success: boolean;
@@ -5007,6 +5058,16 @@ interface FileWatchOptions {
5007
5058
  * Local path to watch (required if useLocalWatcher is true)
5008
5059
  */
5009
5060
  localPath?: string;
5061
+ /**
5062
+ * Path(s) to watch in the sandbox.
5063
+ * Default: ['.'] (watch entire working directory to capture agent file edits)
5064
+ *
5065
+ * When watching '.', all file changes in the sandbox are detected,
5066
+ * including files edited by the agent (like src/Root.tsx).
5067
+ *
5068
+ * Set to [sandboxBasePath] to only watch files pushed via the API.
5069
+ */
5070
+ watchPaths?: string[];
5010
5071
  }
5011
5072
  /**
5012
5073
  * Options for creating a SandboxFileSync instance
@@ -5095,9 +5156,19 @@ declare class SandboxFileSync {
5095
5156
  * Remove webhook configuration
5096
5157
  */
5097
5158
  removeWebhook(): void;
5159
+ /**
5160
+ * Extract hostname from URL for display (security - don't expose full URL)
5161
+ */
5162
+ private extractHostname;
5163
+ /**
5164
+ * Persist webhook delivery event to the session timeline
5165
+ */
5166
+ private persistWebhookDelivery;
5098
5167
  /**
5099
5168
  * Send a webhook notification
5100
5169
  * @param payload - The webhook payload to send
5170
+ * @param sessionId - Session ID for persisting delivery events
5171
+ * @returns WebhookDeliveryResult with success/failure info
5101
5172
  */
5102
5173
  private sendWebhook;
5103
5174
  /**
@@ -5137,7 +5208,7 @@ declare class SandboxFileSync {
5137
5208
  * @param sessionId - Session ID
5138
5209
  * @param path - File path (stored in S3 and used as relative path in sandbox)
5139
5210
  * @param content - File content
5140
- * @param options - Push options (e.g., targetPath to override sandbox location)
5211
+ * @param options - Push options (e.g., targetPath, source)
5141
5212
  * @param previousContent - Optional previous content for diff computation
5142
5213
  */
5143
5214
  pushFile(sessionId: string, path: string, content: Buffer, options?: PushOptions, previousContent?: Buffer): Promise<FilePushResult>;
@@ -5156,8 +5227,12 @@ declare class SandboxFileSync {
5156
5227
  /**
5157
5228
  * Pull a file from sandbox to S3
5158
5229
  * Reads from sandbox and writes to S3
5230
+ *
5231
+ * @param sessionId - Session ID
5232
+ * @param path - File path (relative to sandbox)
5233
+ * @param options - Pull options (e.g., targetPath to override sandbox location)
5159
5234
  */
5160
- pullFile(sessionId: string, path: string): Promise<FilePullResult>;
5235
+ pullFile(sessionId: string, path: string, options?: PullOptions): Promise<FilePullResult>;
5161
5236
  /**
5162
5237
  * Read a file (tries sandbox first, falls back to S3)
5163
5238
  */
@@ -10412,4 +10487,4 @@ declare class AshCloud {
10412
10487
  */
10413
10488
  declare function createAshCloud(options?: Partial<AshCloudOptions>): AshCloud;
10414
10489
 
10415
- export { AVAILABLE_MODELS, type ActionType, type ActiveSession, type AgentBackend, type AgentConfig$1 as AgentConfig, AgentConfigSchema, AgentError, AgentHarness, type AgentHarnessConfig, type AgentHooks, type AgentId, AgentStatus, type AgentStorage, type AgentsRouterOptions$1 as AgentsRouterOptions, AshCloud, AshCloudApiError, AshCloudClient, type AshCloudConfig, type AshCloudError, type AshCloudOptions, type AssistantMessageEntry, type Attachment, type AttachmentConfig, AttachmentConfigSchema, type AttachmentId, AttachmentStorage, type AttachmentStorageConfig, type BackendConfig, type BulkStorage, type BundleStore, type ClaudeAgentOptions, type ClaudeContentBlock, type ClaudeMessage, ClaudeSdkClient, type ClaudeStreamEvent, type ClaudeV2Session, CloudSandbox, type CloudSandboxConfig, CloudStorage, type CloudStorageConfig, type CommandRunAction, type CommandRunResult, ConfigBuilder, ConfigError, type CreateAgentOptions, type CreateQueueItemOptions, type CreateSessionEventOptions, type CreateSessionOptions, CredentialManager, type CredentialManagerConfig, type CredentialStorage, type CustomExecutor, DEFAULT_MODELS, DEFAULT_SANDBOX_PROVIDER_CONFIG, type DiscoveredSkill, type DockerConfig, type EncryptedCredential, type EntryListener, type ErrorEntry, type ErrorEvent, EventCategory, type EventMiddleware, type EventStorage, type FileChangeCallback, type FileChangeEvent, type FileChangeType, type FileContent$1 as FileContent, type FileEditAction, type FileEntry, type FileMetadata, type FileProvider, type FileProviderOptions, type FilePullResult, type FilePushResult, type FileReadAction, type FileStore, type FileSyncDirection, type FileSyncEvent, type FileSyncEventData, type FileSyncOperation, type FileSyncSource, type FileWatchOptions, FileWatcherManager, type FileWatcherOptions, type FileWatcherStatus, type FileWriteAction, GCSBundleStore, type GCSBundleStoreConfig, GeminiCliClient, type GeminiCliOptions, type GenericToolAction, type GetOrCreateSandboxOptions, GitHubFileProvider, type GitHubSkillConfig, type GitHubSkillResult, type GitHubSkillSource, type GitRepo, type GlobAction, type AgentConfig as HarnessAgentConfig, type HarnessConfig, HarnessConfigSchema, HarnessError, HarnessErrorCode, type HarnessErrorOptions, HarnessEventEmitter, type HarnessEventHandler, type HarnessEventPayloads, type HarnessEventType, type HarnessServer, type HarnessServerConfig, type HarnessServerHooks, type ImageContent, InSandboxWatcher, InSandboxWatcherManager, type InSandboxWatcherOptions, type ListAgentsOptions, type ListMessagesOptions, type ListQueueItemsOptions, type ListSessionEventsOptions, type ListSessionsOptions, type LoadStateResult, LocalBundleStore, LocalFileProvider, LocalSandbox, type LocalSandboxConfig, type LocalSkillSource, type LogContext, type LogEntry, type LogLevel, type Logger, type LoggerConfig, type ManagedWorkspace, type McpAuth, McpConfigBuilder, type McpGenerationResult, type McpHttpServerConfig, McpPresets, type McpServerConfig, type McpServerInfo, type McpServerStatus, McpServers, type McpStatusEvent, type McpStdioServerConfig, type McpTool, type McpToolAction, type McpTransportType, MemoryBundleStore, MemoryCredentialStorage, MemoryQueueStorage, MemoryRateLimitStore, MemoryStorage, type Message, type MessageContent, type MessageEvent, type MessageId, MessageRole, type NormalizedEntry, type NormalizedEntryType, type NormalizedToolCall, NotFoundError, type OpenAPIServer, type OpenAPIServerConfig, type PaginatedResult, type PaginationOptions, type PooledSandbox, PostgresQueueStorage, type PostgresQueueStorageConfig, PostgresStorage, type PostgresStorageConfig, ProviderSandbox, type ProviderSandboxConfig, type ProxyConfig, type QueueItem, QueueItemStatus, QueueProcessor, type QueueProcessorCallbacks, type QueueProcessorConfig, type QueueRouterOptions, type QueueStats, type QueueStorage, type RateLimitConfig, type RateLimitResult, type RateLimitStore, RemoteFileWatcherManager, type RemoteFileWatcherOptions, RemoteSandboxFileWatcher, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxConfig, type SandboxConnection, type SandboxFileOperations, SandboxFileSync, type SandboxFileSyncOptions, SandboxFileWatcher, SandboxGitRepo, type SandboxHeartbeatStatus, type SandboxLogCallback, type SandboxLogCategory$1 as SandboxLogCategory, type SandboxLogEntry$1 as SandboxLogEntry, type SandboxLogEvent, type SandboxLogLevel$1 as SandboxLogLevel, SandboxLogger, SandboxPool, type SandboxPoolConfig, type SandboxPoolMetricsCallback, type SandboxPoolStatus, type SandboxProviderConfig, type SandboxProviderType, type SandboxReadResult, type SandboxWithState, type SandboxWriteResult, type SaveStateResult, type SearchAction, type SendMessageOptions, type SendMessageRequest, type SendMessageResult, type ServerConfig, ServerConfigSchema, type Session, type SessionEndEvent, SessionError, type SessionEvent, type SessionId, SessionManager, type SessionQueueStatus, type SessionStartEvent, SessionStatus, type SessionStoppedEvent, type SessionStorage, type SessionsRouterOptions$1 as SessionsRouterOptions, SkillCatalog, type SkillConfig, SkillManager, type SkillManagerOptions, type SkillSource, type SkillsConfig, type StartServerOptions, type StopSessionResult, type StorageConfig$1 as StorageConfig, StorageConfigSchema, StorageError, type StoredAgent, type StreamEvent, StreamEventType, SupabaseBundleStore, type SupabaseBundleStoreConfig, SupabaseStorage, type SupabaseStorageConfig, type SyncResult, type TextContent, type TextDeltaEvent, type ThinkingDeltaEvent, type ThinkingEntry, type TodoItem, type TodoStatus, type TodoWriteAction, type ToolCallEntry, ToolCallProcessor, ToolError, type ToolResult, type ToolResultContent, type ToolResultEvent, type ToolStatus, type ToolUseContent, type ToolUseEvent, type TransactionalStorage, type TurnCompleteEvent, type UpdateAgentOptions, type UserMessageEntry, ValidationError, type WebFetchAction, type WebSearchAction, type WebhookConfig, type WebhookPayload, Workspace, type CommandResult as WorkspaceCommandResult, type WorkspaceConfig, type WorkspaceHook, type WorkspaceLoadResult, WorkspaceManager, type WorkspaceSaveResult, type WorkspaceSessionConfig, attachmentSchema, attachmentToDataUrl, checkSecurityConfig, claudeClient, cleanupAllSandboxes, configureMcp, configureRuntime, convertClaudeMessage, createAgentsRouter$1 as createAgentsRouter, createAshCloud, createBackendExecutor, createCloudSandbox, createConfig, createCredentialManager, createOpenAPIServer as createDocumentedServer, createE2BSandbox, createEventHandler, createEventMiddlewareChain, createFileWatcher, createFileWatcherManager, createGCSBundleStore, createGeminiExecutor, createGitHubFileProvider, createGitRepo, createHarnessServer, createInSandboxWatcher, createInSandboxWatcherManager, createLocalBundleStore, createLocalFileProvider, createLocalSandbox, createLogger, createMemoryBundleStore, createMinioBundleStore, createMinioFileStore, createModalSandbox, createAgentsRouter as createOpenAPIAgentsRouter, createOpenAPIServer, createSessionsRouter as createOpenAPISessionsRouter, createSkillsRouter as createOpenAPISkillsRouter, createProviderSandbox, createQueueProcessor, createQueueRouter, createR2BundleStore, createR2FileStore, createRemoteFileWatcher, createRemoteFileWatcherManager, createS3BundleStore, createS3FileStore, createSandboxFileOperations, createSandboxFileSync, createSandboxLogger, createSandboxOptions, createSessionWorkspace, createSessionsRouter$1 as createSessionsRouter, createSkillCatalog, createSkillManager, createSupabaseBundleStore, createSupabaseBundleStoreFromEnv, createToolCall, createToolCallProcessor, createVercelSandbox, createVercelSandboxExecutor, createWorkspace, createWorkspaceHooks, createWorkspaceManager, dataUrlToBuffer, defineAgent, defineConfig, ensureSandboxPoolInitialized, env, envOptional, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, getRemoteFileWatcherManager, getSandboxCacheStats, getSandboxPool, getWorkspaceManager, gitHubSkillSourceSchema, globalEventEmitter, hasErrorCode, hashStartupScript, httpMcpWithAuth, initializeSandboxPool, introspectMcpServer, invalidateSandbox, isCommandRunAction, isDocumentMimeType, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isHarnessError, isHttpMcpConfig, isImageMimeType, isMcpToolAction, isSandboxExpiredError, isSandboxRunning, isSearchAction, isSensitivePath, isStdioMcpConfig, isTodoWriteAction, isToolCallEntry, isValidModel, isWebFetchAction, isWebSearchAction, listFilesInSandbox, loadConfig, loadGitHubSkill, loadGitHubSkills, loadWorkspaceState, localSkillSourceSchema, log, mapClaudeOptionsToGemini, mapToolToActionType, markConfigInstalled, markSdkInstalled, markStartupScriptRan, mcpAuthToHeaders, messageContentSchema, messageSchema, needsStartupScriptRerun, normalizeGitHubConfigs, normalizeMcpServers, normalizeMessages, normalizeToolResult, onHeartbeat, schemas as openApiSchemas, parseCommandResult, parseGitHubUrl, parseMcpToolName, processStreamEvents, rateLimit, rateLimiters, readFileFromSandbox, rekeySessionId, releaseSandbox, requestLogger, saveWorkspaceState, sessionSchema, shouldUseSandbox, shutdownSandboxPool, skillConfigSchema, skillSourceSchema, sseMcpWithAuth, startServer, updateToolCallWithResult, writeFileToSandbox };
10490
+ export { AVAILABLE_MODELS, type ActionType, type ActiveSession, type AgentBackend, type AgentConfig$1 as AgentConfig, AgentConfigSchema, AgentError, AgentHarness, type AgentHarnessConfig, type AgentHooks, type AgentId, AgentStatus, type AgentStorage, type AgentsRouterOptions$1 as AgentsRouterOptions, AshCloud, AshCloudApiError, AshCloudClient, type AshCloudConfig, type AshCloudError, type AshCloudOptions, type AssistantMessageEntry, type Attachment, type AttachmentConfig, AttachmentConfigSchema, type AttachmentId, AttachmentStorage, type AttachmentStorageConfig, type BackendConfig, type BulkStorage, type BundleStore, type ClaudeAgentOptions, type ClaudeContentBlock, type ClaudeMessage, ClaudeSdkClient, type ClaudeStreamEvent, type ClaudeV2Session, CloudSandbox, type CloudSandboxConfig, CloudStorage, type CloudStorageConfig, type CommandRunAction, type CommandRunResult, ConfigBuilder, ConfigError, type CreateAgentOptions, type CreateQueueItemOptions, type CreateSessionEventOptions, type CreateSessionOptions, CredentialManager, type CredentialManagerConfig, type CredentialStorage, type CustomExecutor, DEFAULT_MODELS, DEFAULT_SANDBOX_PROVIDER_CONFIG, type DiscoveredSkill, type DockerConfig, type EncryptedCredential, type EntryListener, type ErrorEntry, type ErrorEvent, EventCategory, type EventMiddleware, type EventStorage, type FileChangeCallback, type FileChangeEvent, type FileChangeType, type FileContent$1 as FileContent, type FileEditAction, type FileEntry, type FileMetadata, type FileProvider, type FileProviderOptions, type FilePullResult, type FilePushResult, type FileReadAction, type FileStore, type FileSyncEvent, type FileSyncEventData, type FileSyncOperation, type FileSyncSource, type FileWatchOptions, FileWatcherManager, type FileWatcherOptions, type FileWatcherStatus, type FileWriteAction, GCSBundleStore, type GCSBundleStoreConfig, GeminiCliClient, type GeminiCliOptions, type GenericToolAction, type GetOrCreateSandboxOptions, GitHubFileProvider, type GitHubSkillConfig, type GitHubSkillResult, type GitHubSkillSource, type GitRepo, type GlobAction, type AgentConfig as HarnessAgentConfig, type HarnessConfig, HarnessConfigSchema, HarnessError, HarnessErrorCode, type HarnessErrorOptions, HarnessEventEmitter, type HarnessEventHandler, type HarnessEventPayloads, type HarnessEventType, type HarnessServer, type HarnessServerConfig, type HarnessServerHooks, type ImageContent, InSandboxWatcher, InSandboxWatcherManager, type InSandboxWatcherOptions, type ListAgentsOptions, type ListMessagesOptions, type ListQueueItemsOptions, type ListSessionEventsOptions, type ListSessionsOptions, type LoadStateResult, LocalBundleStore, LocalFileProvider, LocalSandbox, type LocalSandboxConfig, type LocalSkillSource, type LogContext, type LogEntry, type LogLevel, type Logger, type LoggerConfig, type ManagedWorkspace, type McpAuth, McpConfigBuilder, type McpGenerationResult, type McpHttpServerConfig, McpPresets, type McpServerConfig, type McpServerInfo, type McpServerStatus, McpServers, type McpStatusEvent, type McpStdioServerConfig, type McpTool, type McpToolAction, type McpTransportType, MemoryBundleStore, MemoryCredentialStorage, MemoryQueueStorage, MemoryRateLimitStore, MemoryStorage, type Message, type MessageContent, type MessageEvent, type MessageId, MessageRole, type NormalizedEntry, type NormalizedEntryType, type NormalizedToolCall, NotFoundError, type OpenAPIServer, type OpenAPIServerConfig, type PaginatedResult, type PaginationOptions, type PooledSandbox, PostgresQueueStorage, type PostgresQueueStorageConfig, PostgresStorage, type PostgresStorageConfig, ProviderSandbox, type ProviderSandboxConfig, type ProxyConfig, type PullOptions, type PushOptions, type QueueItem, QueueItemStatus, QueueProcessor, type QueueProcessorCallbacks, type QueueProcessorConfig, type QueueRouterOptions, type QueueStats, type QueueStorage, type RateLimitConfig, type RateLimitResult, type RateLimitStore, RemoteFileWatcherManager, type RemoteFileWatcherOptions, RemoteSandboxFileWatcher, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxConfig, type SandboxConnection, type SandboxFileOperations, SandboxFileSync, type SandboxFileSyncOptions, SandboxFileWatcher, SandboxGitRepo, type SandboxHeartbeatStatus, type SandboxLogCallback, type SandboxLogCategory$1 as SandboxLogCategory, type SandboxLogEntry$1 as SandboxLogEntry, type SandboxLogEvent, type SandboxLogLevel$1 as SandboxLogLevel, SandboxLogger, SandboxPool, type SandboxPoolConfig, type SandboxPoolMetricsCallback, type SandboxPoolStatus, type SandboxProviderConfig, type SandboxProviderType, type SandboxReadResult, type SandboxWithState, type SandboxWriteResult, type SaveStateResult, type SearchAction, type SendMessageOptions, type SendMessageRequest, type SendMessageResult, type ServerConfig, ServerConfigSchema, type Session, type SessionEndEvent, SessionError, type SessionEvent, type SessionId, SessionManager, type SessionQueueStatus, type SessionStartEvent, SessionStatus, type SessionStoppedEvent, type SessionStorage, type SessionsRouterOptions$1 as SessionsRouterOptions, SkillCatalog, type SkillConfig, SkillManager, type SkillManagerOptions, type SkillSource, type SkillsConfig, type StartServerOptions, type StopSessionResult, type StorageConfig$1 as StorageConfig, StorageConfigSchema, StorageError, type StoredAgent, type StreamEvent, StreamEventType, SupabaseBundleStore, type SupabaseBundleStoreConfig, SupabaseStorage, type SupabaseStorageConfig, type SyncResult, type TextContent, type TextDeltaEvent, type ThinkingDeltaEvent, type ThinkingEntry, type TodoItem, type TodoStatus, type TodoWriteAction, type ToolCallEntry, ToolCallProcessor, ToolError, type ToolResult, type ToolResultContent, type ToolResultEvent, type ToolStatus, type ToolUseContent, type ToolUseEvent, type TransactionalStorage, type TurnCompleteEvent, type UpdateAgentOptions, type UserMessageEntry, ValidationError, type WebFetchAction, type WebSearchAction, type WebhookConfig, type WebhookDeliveryEventData, type WebhookPayload, Workspace, type CommandResult as WorkspaceCommandResult, type WorkspaceConfig, type WorkspaceHook, type WorkspaceLoadResult, WorkspaceManager, type WorkspaceSaveResult, type WorkspaceSessionConfig, attachmentSchema, attachmentToDataUrl, checkSecurityConfig, claudeClient, cleanupAllSandboxes, configureMcp, configureRuntime, convertClaudeMessage, createAgentsRouter$1 as createAgentsRouter, createAshCloud, createBackendExecutor, createCloudSandbox, createConfig, createCredentialManager, createOpenAPIServer as createDocumentedServer, createE2BSandbox, createEventHandler, createEventMiddlewareChain, createFileWatcher, createFileWatcherManager, createGCSBundleStore, createGeminiExecutor, createGitHubFileProvider, createGitRepo, createHarnessServer, createInSandboxWatcher, createInSandboxWatcherManager, createLocalBundleStore, createLocalFileProvider, createLocalSandbox, createLogger, createMemoryBundleStore, createMinioBundleStore, createMinioFileStore, createModalSandbox, createAgentsRouter as createOpenAPIAgentsRouter, createOpenAPIServer, createSessionsRouter as createOpenAPISessionsRouter, createSkillsRouter as createOpenAPISkillsRouter, createProviderSandbox, createQueueProcessor, createQueueRouter, createR2BundleStore, createR2FileStore, createRemoteFileWatcher, createRemoteFileWatcherManager, createS3BundleStore, createS3FileStore, createSandboxFileOperations, createSandboxFileSync, createSandboxLogger, createSandboxOptions, createSessionWorkspace, createSessionsRouter$1 as createSessionsRouter, createSkillCatalog, createSkillManager, createSupabaseBundleStore, createSupabaseBundleStoreFromEnv, createToolCall, createToolCallProcessor, createVercelSandbox, createVercelSandboxExecutor, createWorkspace, createWorkspaceHooks, createWorkspaceManager, dataUrlToBuffer, defineAgent, defineConfig, ensureSandboxPoolInitialized, env, envOptional, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, getRemoteFileWatcherManager, getSandboxCacheStats, getSandboxPool, getWorkspaceManager, gitHubSkillSourceSchema, globalEventEmitter, hasErrorCode, hashStartupScript, httpMcpWithAuth, initializeSandboxPool, introspectMcpServer, invalidateSandbox, isCommandRunAction, isDocumentMimeType, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isHarnessError, isHttpMcpConfig, isImageMimeType, isMcpToolAction, isSandboxExpiredError, isSandboxRunning, isSearchAction, isSensitivePath, isStdioMcpConfig, isTodoWriteAction, isToolCallEntry, isValidModel, isWebFetchAction, isWebSearchAction, listFilesInSandbox, loadConfig, loadGitHubSkill, loadGitHubSkills, loadWorkspaceState, localSkillSourceSchema, log, mapClaudeOptionsToGemini, mapToolToActionType, markConfigInstalled, markSdkInstalled, markStartupScriptRan, mcpAuthToHeaders, messageContentSchema, messageSchema, needsStartupScriptRerun, normalizeGitHubConfigs, normalizeMcpServers, normalizeMessages, normalizeToolResult, onHeartbeat, schemas as openApiSchemas, parseCommandResult, parseGitHubUrl, parseMcpToolName, processStreamEvents, rateLimit, rateLimiters, readFileFromSandbox, rekeySessionId, releaseSandbox, requestLogger, saveWorkspaceState, sessionSchema, shouldUseSandbox, shutdownSandboxPool, skillConfigSchema, skillSourceSchema, sseMcpWithAuth, startServer, updateToolCallWithResult, writeFileToSandbox };