@ash-cloud/ash-ai 0.1.16 → 0.1.18
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.cjs +1008 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +360 -12
- package/dist/index.d.ts +360 -12
- package/dist/index.js +1007 -42
- package/dist/index.js.map +1 -1
- package/dist/playground.js +689 -684
- package/dist/{schema-DSLyNeoS.d.cts → schema-CAoHu2Rx.d.cts} +159 -2
- package/dist/{schema-DSLyNeoS.d.ts → schema-CAoHu2Rx.d.ts} +159 -2
- package/dist/schema.cjs +36 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +34 -2
- package/dist/schema.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
2
3
|
import * as fs from 'fs/promises';
|
|
3
4
|
import * as hono_types from 'hono/types';
|
|
4
5
|
import * as hono from 'hono';
|
|
5
6
|
import { Hono, Context, MiddlewareHandler } from 'hono';
|
|
7
|
+
import { Writable } from 'stream';
|
|
6
8
|
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
7
9
|
import { OpenAPIObject } from 'openapi3-ts/oas31';
|
|
8
10
|
import * as _hono_node_server from '@hono/node-server';
|
|
9
11
|
export { serve } from '@hono/node-server';
|
|
10
12
|
import * as drizzle_orm_postgres_js from 'drizzle-orm/postgres-js';
|
|
11
13
|
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-
|
|
13
|
-
import { Writable } from 'stream';
|
|
14
|
+
export { A as AttachmentRow, M as MessageRow, b as NewAttachmentRow, a as NewMessageRow, c as NewQueueItemRow, e as NewSessionEventRow, N as NewSessionRow, g as NewStreamEventRow, Q as QueueItemRow, d as SessionEventRow, S as SessionRow, f as StreamEventRow, s as schema } from './schema-CAoHu2Rx.cjs';
|
|
14
15
|
import 'drizzle-orm';
|
|
15
16
|
import 'drizzle-orm/pg-core';
|
|
16
17
|
|
|
@@ -543,6 +544,7 @@ interface PaginatedResult<T> {
|
|
|
543
544
|
interface ListSessionsOptions extends PaginationOptions {
|
|
544
545
|
agentName?: string;
|
|
545
546
|
status?: SessionStatus;
|
|
547
|
+
resourceId?: string;
|
|
546
548
|
}
|
|
547
549
|
interface ListMessagesOptions extends PaginationOptions {
|
|
548
550
|
sessionId?: SessionId;
|
|
@@ -1315,6 +1317,15 @@ declare const EventCategory: {
|
|
|
1315
1317
|
readonly WEBHOOK: "webhook";
|
|
1316
1318
|
};
|
|
1317
1319
|
type EventCategory = (typeof EventCategory)[keyof typeof EventCategory];
|
|
1320
|
+
/**
|
|
1321
|
+
* Event source for distinguishing event origins in the timeline
|
|
1322
|
+
*/
|
|
1323
|
+
declare const EventSource: {
|
|
1324
|
+
readonly AGENT: "agent";
|
|
1325
|
+
readonly SYSTEM: "system";
|
|
1326
|
+
readonly DERIVED: "derived";
|
|
1327
|
+
};
|
|
1328
|
+
type EventSource = (typeof EventSource)[keyof typeof EventSource];
|
|
1318
1329
|
/**
|
|
1319
1330
|
* File sync operation types
|
|
1320
1331
|
*/
|
|
@@ -1390,6 +1401,7 @@ interface SessionEvent {
|
|
|
1390
1401
|
sessionId: SessionId;
|
|
1391
1402
|
eventType: string;
|
|
1392
1403
|
category: EventCategory;
|
|
1404
|
+
eventSource: EventSource;
|
|
1393
1405
|
startedAt: Date;
|
|
1394
1406
|
endedAt?: Date;
|
|
1395
1407
|
durationMs?: number;
|
|
@@ -1407,6 +1419,7 @@ interface SessionEvent {
|
|
|
1407
1419
|
interface CreateSessionEventOptions {
|
|
1408
1420
|
eventType: string;
|
|
1409
1421
|
category: EventCategory;
|
|
1422
|
+
eventSource?: EventSource;
|
|
1410
1423
|
startedAt: Date;
|
|
1411
1424
|
endedAt?: Date;
|
|
1412
1425
|
durationMs?: number;
|
|
@@ -1423,9 +1436,41 @@ interface CreateSessionEventOptions {
|
|
|
1423
1436
|
interface ListSessionEventsOptions extends PaginationOptions {
|
|
1424
1437
|
category?: EventCategory;
|
|
1425
1438
|
eventType?: string;
|
|
1439
|
+
/** Filter by event source (agent, system, derived) */
|
|
1440
|
+
eventSource?: EventSource;
|
|
1426
1441
|
/** Filter events involving this file path (matches file events and Read/Write/Edit tool calls) */
|
|
1427
1442
|
filePath?: string;
|
|
1428
1443
|
}
|
|
1444
|
+
/**
|
|
1445
|
+
* A stream event persisted to storage for SSE relay.
|
|
1446
|
+
* Events are written during agent execution and read by the relay
|
|
1447
|
+
* to deliver SSE to clients, enabling reliable reconnection.
|
|
1448
|
+
*/
|
|
1449
|
+
interface StoredStreamEvent {
|
|
1450
|
+
/** Unique identifier */
|
|
1451
|
+
id: string;
|
|
1452
|
+
/** Session this event belongs to */
|
|
1453
|
+
sessionId: SessionId;
|
|
1454
|
+
/** Monotonically increasing sequence number per session, used as cursor for reconnection */
|
|
1455
|
+
sequence: number;
|
|
1456
|
+
/** The StreamEvent.type (e.g., 'text_delta', 'tool_use', 'session_end') */
|
|
1457
|
+
eventType: string;
|
|
1458
|
+
/** Full serialized StreamEvent payload */
|
|
1459
|
+
payload: StreamEvent;
|
|
1460
|
+
/** Number of events batched (1 for non-batched, N for aggregated text deltas) */
|
|
1461
|
+
batchCount: number;
|
|
1462
|
+
/** When this event was stored */
|
|
1463
|
+
createdAt: Date;
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Options for reading stream events from storage
|
|
1467
|
+
*/
|
|
1468
|
+
interface ReadStreamEventsOptions {
|
|
1469
|
+
/** Cursor: return events with sequence > afterSequence */
|
|
1470
|
+
afterSequence?: number;
|
|
1471
|
+
/** Maximum number of events to return */
|
|
1472
|
+
limit?: number;
|
|
1473
|
+
}
|
|
1429
1474
|
|
|
1430
1475
|
/**
|
|
1431
1476
|
* Base Error Types for Agent SDK Harness
|
|
@@ -1712,6 +1757,43 @@ interface EventStorage {
|
|
|
1712
1757
|
*/
|
|
1713
1758
|
getNextEventSequence(sessionId: SessionId): Promise<number>;
|
|
1714
1759
|
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Storage interface for stream events used by the SSE relay system.
|
|
1762
|
+
* Events are written during agent execution and read by the relay
|
|
1763
|
+
* to deliver SSE to clients, enabling reliable reconnection.
|
|
1764
|
+
*/
|
|
1765
|
+
interface StreamEventStorage {
|
|
1766
|
+
initialize(): Promise<void>;
|
|
1767
|
+
close(): Promise<void>;
|
|
1768
|
+
/**
|
|
1769
|
+
* Append one or more events to a session's stream.
|
|
1770
|
+
* Events are assigned monotonically increasing sequence numbers.
|
|
1771
|
+
*/
|
|
1772
|
+
appendEvents(sessionId: SessionId, events: Array<{
|
|
1773
|
+
eventType: string;
|
|
1774
|
+
payload: StreamEvent;
|
|
1775
|
+
batchCount?: number;
|
|
1776
|
+
}>): Promise<StoredStreamEvent[]>;
|
|
1777
|
+
/**
|
|
1778
|
+
* Read events from a session's stream, optionally starting after a given sequence.
|
|
1779
|
+
* Results are ordered by sequence number ascending.
|
|
1780
|
+
*/
|
|
1781
|
+
readEvents(sessionId: SessionId, options?: ReadStreamEventsOptions): Promise<StoredStreamEvent[]>;
|
|
1782
|
+
/**
|
|
1783
|
+
* Get the latest sequence number for a session (0 if no events).
|
|
1784
|
+
*/
|
|
1785
|
+
getLatestSequence(sessionId: SessionId): Promise<number>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Delete all stream events for a session (cleanup on session deletion).
|
|
1788
|
+
*/
|
|
1789
|
+
deleteSessionEvents(sessionId: SessionId): Promise<void>;
|
|
1790
|
+
/**
|
|
1791
|
+
* Clean up old stream events across all sessions.
|
|
1792
|
+
* @param maxAgeMs - Delete events older than this many milliseconds
|
|
1793
|
+
* @returns Number of events deleted
|
|
1794
|
+
*/
|
|
1795
|
+
cleanupOldEvents(maxAgeMs: number): Promise<number>;
|
|
1796
|
+
}
|
|
1715
1797
|
|
|
1716
1798
|
/**
|
|
1717
1799
|
* Credential Management
|
|
@@ -2481,6 +2563,13 @@ interface AgentHarnessConfig extends AgentConfig$1 {
|
|
|
2481
2563
|
* Only used if customExecutor is not provided.
|
|
2482
2564
|
*/
|
|
2483
2565
|
backend?: AgentBackend;
|
|
2566
|
+
/**
|
|
2567
|
+
* Optional stream event storage for SSE relay.
|
|
2568
|
+
* When configured, events from send() are written to storage AND yielded to the consumer.
|
|
2569
|
+
* This enables the relay pattern: agent writes to storage, relay reads from storage,
|
|
2570
|
+
* allowing reliable client reconnection via GET /sessions/:id/stream?after=N.
|
|
2571
|
+
*/
|
|
2572
|
+
streamEventStorage?: StreamEventStorage;
|
|
2484
2573
|
}
|
|
2485
2574
|
/**
|
|
2486
2575
|
* Result of stopping a session execution
|
|
@@ -2557,6 +2646,8 @@ declare class AgentHarness {
|
|
|
2557
2646
|
private sessionSkillDirs;
|
|
2558
2647
|
/** Tracks active executions by session ID for stop/interrupt capability */
|
|
2559
2648
|
private activeExecutions;
|
|
2649
|
+
/** EventEmitters for same-process SSE relay fast-path, keyed by session ID */
|
|
2650
|
+
private sessionEmitters;
|
|
2560
2651
|
constructor(config: AgentHarnessConfig);
|
|
2561
2652
|
/**
|
|
2562
2653
|
* Initialize the agent harness and storage
|
|
@@ -2610,6 +2701,16 @@ declare class AgentHarness {
|
|
|
2610
2701
|
* Get the session manager for advanced operations
|
|
2611
2702
|
*/
|
|
2612
2703
|
getSessionManager(): SessionManager;
|
|
2704
|
+
/**
|
|
2705
|
+
* Get the stream event storage (if configured)
|
|
2706
|
+
*/
|
|
2707
|
+
getStreamEventStorage(): StreamEventStorage | undefined;
|
|
2708
|
+
/**
|
|
2709
|
+
* Get the EventEmitter for a session's stream events.
|
|
2710
|
+
* Used by the relay endpoint for same-process fast-path.
|
|
2711
|
+
* Returns undefined if no active execution or no streamEventStorage configured.
|
|
2712
|
+
*/
|
|
2713
|
+
getSessionEmitter(sessionId: SessionId): EventEmitter | undefined;
|
|
2613
2714
|
private ensureInitialized;
|
|
2614
2715
|
private createActiveSession;
|
|
2615
2716
|
/**
|
|
@@ -2777,6 +2878,26 @@ declare class MemoryQueueStorage implements QueueStorage {
|
|
|
2777
2878
|
clear(): void;
|
|
2778
2879
|
}
|
|
2779
2880
|
|
|
2881
|
+
/**
|
|
2882
|
+
* In-memory implementation of StreamEventStorage for development and testing.
|
|
2883
|
+
* Data is lost when the process exits.
|
|
2884
|
+
*/
|
|
2885
|
+
declare class MemoryStreamEventStorage implements StreamEventStorage {
|
|
2886
|
+
private events;
|
|
2887
|
+
private nextSequence;
|
|
2888
|
+
initialize(): Promise<void>;
|
|
2889
|
+
close(): Promise<void>;
|
|
2890
|
+
appendEvents(sessionId: SessionId, events: Array<{
|
|
2891
|
+
eventType: string;
|
|
2892
|
+
payload: StreamEvent;
|
|
2893
|
+
batchCount?: number;
|
|
2894
|
+
}>): Promise<StoredStreamEvent[]>;
|
|
2895
|
+
readEvents(sessionId: SessionId, options?: ReadStreamEventsOptions): Promise<StoredStreamEvent[]>;
|
|
2896
|
+
getLatestSequence(sessionId: SessionId): Promise<number>;
|
|
2897
|
+
deleteSessionEvents(sessionId: SessionId): Promise<void>;
|
|
2898
|
+
cleanupOldEvents(maxAgeMs: number): Promise<number>;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2780
2901
|
/**
|
|
2781
2902
|
* Queue Processor
|
|
2782
2903
|
*
|
|
@@ -4810,6 +4931,36 @@ interface WebhookConfig {
|
|
|
4810
4931
|
* Useful for including project IDs, tenant IDs, or other context.
|
|
4811
4932
|
*/
|
|
4812
4933
|
metadata?: Record<string, unknown>;
|
|
4934
|
+
/**
|
|
4935
|
+
* Glob patterns for file paths to exclude from webhooks.
|
|
4936
|
+
* Merged with built-in default ignores (e.g. agent-runner.js).
|
|
4937
|
+
* Supports single-segment wildcards and double-star recursive matching.
|
|
4938
|
+
*/
|
|
4939
|
+
ignorePaths?: string[];
|
|
4940
|
+
/**
|
|
4941
|
+
* Batch window in milliseconds.
|
|
4942
|
+
* When set, webhook events are collected during this window and sent
|
|
4943
|
+
* as a single `file_sync_batch` payload. Within a batch, duplicate
|
|
4944
|
+
* file paths are deduplicated (latest event wins).
|
|
4945
|
+
* Default: undefined (no batching, each event sent immediately)
|
|
4946
|
+
*/
|
|
4947
|
+
batchWindowMs?: number;
|
|
4948
|
+
}
|
|
4949
|
+
/**
|
|
4950
|
+
* File sync event shape sent in webhook payloads.
|
|
4951
|
+
* Mirrors FileSyncEvent but replaces raw Buffer content with a pre-signed S3 download URL.
|
|
4952
|
+
*/
|
|
4953
|
+
interface WebhookFileSyncEvent {
|
|
4954
|
+
operation: FileSyncEvent['operation'];
|
|
4955
|
+
source: FileSyncEvent['source'];
|
|
4956
|
+
canonicalPath: string;
|
|
4957
|
+
basePath: string;
|
|
4958
|
+
sandboxPath: string;
|
|
4959
|
+
fileSize?: number;
|
|
4960
|
+
success: boolean;
|
|
4961
|
+
error?: string;
|
|
4962
|
+
/** Pre-signed S3 download URL (replaces raw previousContent/newContent) */
|
|
4963
|
+
downloadUrl?: string;
|
|
4813
4964
|
}
|
|
4814
4965
|
/**
|
|
4815
4966
|
* Payload sent to webhook endpoints
|
|
@@ -4824,10 +4975,28 @@ interface WebhookPayload {
|
|
|
4824
4975
|
/** Custom metadata from webhook config */
|
|
4825
4976
|
metadata?: Record<string, unknown>;
|
|
4826
4977
|
/** File sync event data (for file_sync events) */
|
|
4827
|
-
fileSyncEvent?:
|
|
4978
|
+
fileSyncEvent?: WebhookFileSyncEvent;
|
|
4828
4979
|
/** File change event data (for file_change events from watchers) */
|
|
4829
4980
|
fileChangeEvent?: FileChangeEvent;
|
|
4830
4981
|
}
|
|
4982
|
+
/**
|
|
4983
|
+
* Batch payload sent when batchWindowMs is configured.
|
|
4984
|
+
* Collects multiple events into a single HTTP request.
|
|
4985
|
+
*/
|
|
4986
|
+
interface WebhookBatchPayload {
|
|
4987
|
+
/** Event type — always 'file_sync_batch' for batch payloads */
|
|
4988
|
+
event: 'file_sync_batch';
|
|
4989
|
+
/** Timestamp when the batch was flushed */
|
|
4990
|
+
timestamp: string;
|
|
4991
|
+
/** Session ID */
|
|
4992
|
+
sessionId: string;
|
|
4993
|
+
/** Custom metadata from webhook config */
|
|
4994
|
+
metadata?: Record<string, unknown>;
|
|
4995
|
+
/** File sync events in this batch */
|
|
4996
|
+
fileSyncEvents: WebhookFileSyncEvent[];
|
|
4997
|
+
/** File change events in this batch */
|
|
4998
|
+
fileChangeEvents: FileChangeEvent[];
|
|
4999
|
+
}
|
|
4831
5000
|
/**
|
|
4832
5001
|
* Result of writing a file to a sandbox
|
|
4833
5002
|
*/
|
|
@@ -5056,6 +5225,8 @@ declare class SandboxFileSync {
|
|
|
5056
5225
|
private localWatchers;
|
|
5057
5226
|
private fileChangeSubscribers;
|
|
5058
5227
|
private sequenceNumbers;
|
|
5228
|
+
private batchTimer;
|
|
5229
|
+
private batchQueue;
|
|
5059
5230
|
constructor(options: SandboxFileSyncOptions);
|
|
5060
5231
|
/**
|
|
5061
5232
|
* Set the file event callback
|
|
@@ -5076,6 +5247,20 @@ declare class SandboxFileSync {
|
|
|
5076
5247
|
* Remove webhook configuration
|
|
5077
5248
|
*/
|
|
5078
5249
|
removeWebhook(): void;
|
|
5250
|
+
/**
|
|
5251
|
+
* Check if a file path should be excluded from webhook notifications.
|
|
5252
|
+
* Tests against DEFAULT_WEBHOOK_IGNORE patterns and any user-configured ignorePaths.
|
|
5253
|
+
*/
|
|
5254
|
+
private shouldIgnorePath;
|
|
5255
|
+
/**
|
|
5256
|
+
* Route a webhook payload through batching (if configured) or send immediately.
|
|
5257
|
+
* When batchWindowMs is set, payloads are queued and deduplicated by file path.
|
|
5258
|
+
*/
|
|
5259
|
+
private enqueueOrSendWebhook;
|
|
5260
|
+
/**
|
|
5261
|
+
* Flush all queued webhook payloads as a single batch request.
|
|
5262
|
+
*/
|
|
5263
|
+
private flushWebhookBatch;
|
|
5079
5264
|
/**
|
|
5080
5265
|
* Extract hostname from URL for display (security - don't expose full URL)
|
|
5081
5266
|
*/
|
|
@@ -5092,7 +5277,9 @@ declare class SandboxFileSync {
|
|
|
5092
5277
|
*/
|
|
5093
5278
|
private sendWebhook;
|
|
5094
5279
|
/**
|
|
5095
|
-
* Send a file sync event webhook
|
|
5280
|
+
* Send a file sync event webhook.
|
|
5281
|
+
* Strips raw Buffer content (previousContent/newContent) and replaces with a
|
|
5282
|
+
* pre-signed S3 download URL when the file exists in storage.
|
|
5096
5283
|
*/
|
|
5097
5284
|
private sendFileSyncWebhook;
|
|
5098
5285
|
/**
|
|
@@ -5480,6 +5667,53 @@ declare function shouldUseSandbox(): boolean;
|
|
|
5480
5667
|
* @returns A CustomExecutor function for use with AgentHarness
|
|
5481
5668
|
*/
|
|
5482
5669
|
declare function createVercelSandboxExecutor(apiKey: string): CustomExecutor;
|
|
5670
|
+
/**
|
|
5671
|
+
* Options for pre-warming a sandbox before the user sends a message.
|
|
5672
|
+
*/
|
|
5673
|
+
interface WarmSandboxOptions {
|
|
5674
|
+
/** Session ID to warm a sandbox for */
|
|
5675
|
+
sessionId: string;
|
|
5676
|
+
/** Sandbox runtime (default: 'node22') */
|
|
5677
|
+
runtime?: 'node22' | 'python3.13';
|
|
5678
|
+
/** Sandbox timeout in seconds (default: 600) */
|
|
5679
|
+
timeout?: number;
|
|
5680
|
+
/** Number of vCPUs (default: 4) */
|
|
5681
|
+
vcpus?: number;
|
|
5682
|
+
/** Startup script to run after SDK installation */
|
|
5683
|
+
startupScript?: string;
|
|
5684
|
+
/** URL to a .claude config zip to install */
|
|
5685
|
+
configFileUrl?: string;
|
|
5686
|
+
/** Environment variables to set in the sandbox */
|
|
5687
|
+
envVars?: Record<string, string>;
|
|
5688
|
+
}
|
|
5689
|
+
/**
|
|
5690
|
+
* Result of warming a sandbox.
|
|
5691
|
+
*/
|
|
5692
|
+
interface WarmSandboxResult {
|
|
5693
|
+
/** The Vercel sandbox ID */
|
|
5694
|
+
sandboxId: string;
|
|
5695
|
+
/** Whether the sandbox is ready for use */
|
|
5696
|
+
ready: boolean;
|
|
5697
|
+
}
|
|
5698
|
+
/**
|
|
5699
|
+
* Pre-warm a sandbox for a session before the user sends their first message.
|
|
5700
|
+
*
|
|
5701
|
+
* This acquires a sandbox (from the pool if available, or creates one on-demand),
|
|
5702
|
+
* installs the SDK if needed, runs an optional startup script, and downloads an
|
|
5703
|
+
* optional config file. The result is cached so that when `getOrCreateSandbox()`
|
|
5704
|
+
* is called during the actual message, the pre-warmed sandbox is returned instantly.
|
|
5705
|
+
*
|
|
5706
|
+
* @example
|
|
5707
|
+
* ```typescript
|
|
5708
|
+
* // When user opens the chat UI, warm a sandbox immediately
|
|
5709
|
+
* const result = await warmSandboxForSession({ sessionId: session.id });
|
|
5710
|
+
* console.log('Sandbox ready:', result.sandboxId);
|
|
5711
|
+
*
|
|
5712
|
+
* // Later, when user sends a message, sandbox is already warm
|
|
5713
|
+
* for await (const event of session.send('hello')) { ... }
|
|
5714
|
+
* ```
|
|
5715
|
+
*/
|
|
5716
|
+
declare function warmSandboxForSession(options: WarmSandboxOptions): Promise<WarmSandboxResult>;
|
|
5483
5717
|
|
|
5484
5718
|
/**
|
|
5485
5719
|
* Pre-Warmed Sandbox Pool
|
|
@@ -5591,6 +5825,10 @@ interface SandboxPoolStatus {
|
|
|
5591
5825
|
running: boolean;
|
|
5592
5826
|
/** Last maintenance cycle timestamp */
|
|
5593
5827
|
lastMaintenanceAt: number | null;
|
|
5828
|
+
/** Consecutive warmup failures (0 = healthy) */
|
|
5829
|
+
consecutiveFailures: number;
|
|
5830
|
+
/** Whether warmup is suspended due to too many failures */
|
|
5831
|
+
warmupSuspended: boolean;
|
|
5594
5832
|
/** Configuration */
|
|
5595
5833
|
config: {
|
|
5596
5834
|
minPoolSize: number;
|
|
@@ -5618,6 +5856,14 @@ declare class SandboxPool {
|
|
|
5618
5856
|
private lastMaintenanceAt;
|
|
5619
5857
|
private metricsCallback?;
|
|
5620
5858
|
private startPromise;
|
|
5859
|
+
/** Consecutive warmup failure count (reset on success) */
|
|
5860
|
+
private consecutiveFailures;
|
|
5861
|
+
/** Timestamp of last warmup attempt — used for backoff */
|
|
5862
|
+
private lastWarmupAttemptAt;
|
|
5863
|
+
/** Max consecutive failures before stopping attempts entirely until manual restart */
|
|
5864
|
+
private static readonly MAX_CONSECUTIVE_FAILURES;
|
|
5865
|
+
/** Base backoff delay in ms (doubles each failure: 30s, 60s, 120s, 240s…) */
|
|
5866
|
+
private static readonly BACKOFF_BASE_MS;
|
|
5621
5867
|
constructor(config?: SandboxPoolConfig);
|
|
5622
5868
|
/**
|
|
5623
5869
|
* Start the pool and begin warming sandboxes
|
|
@@ -5679,7 +5925,9 @@ declare class SandboxPool {
|
|
|
5679
5925
|
*/
|
|
5680
5926
|
private triggerReplenishment;
|
|
5681
5927
|
/**
|
|
5682
|
-
* Replenish pool if below min size
|
|
5928
|
+
* Replenish pool if below min size.
|
|
5929
|
+
* Applies exponential backoff when warmups keep failing to avoid
|
|
5930
|
+
* a tight failure loop that wastes resources and floods metrics.
|
|
5683
5931
|
*/
|
|
5684
5932
|
private replenishPool;
|
|
5685
5933
|
/**
|
|
@@ -6356,6 +6604,66 @@ declare function createSandboxLogger(options?: {
|
|
|
6356
6604
|
consoleEnabled?: boolean;
|
|
6357
6605
|
}): SandboxLogger;
|
|
6358
6606
|
|
|
6607
|
+
interface StreamEventWriterOptions {
|
|
6608
|
+
storage: StreamEventStorage;
|
|
6609
|
+
sessionId: SessionId;
|
|
6610
|
+
/** Optional EventEmitter for same-process fast-path (EC2 optimization) */
|
|
6611
|
+
emitter?: EventEmitter;
|
|
6612
|
+
/** Flush interval for text_delta batching in ms (default: 100) */
|
|
6613
|
+
flushIntervalMs?: number;
|
|
6614
|
+
/** Max chars before flushing text_delta batch (default: 500) */
|
|
6615
|
+
maxBatchChars?: number;
|
|
6616
|
+
}
|
|
6617
|
+
declare class StreamEventWriter {
|
|
6618
|
+
private storage;
|
|
6619
|
+
private sessionId;
|
|
6620
|
+
private emitter?;
|
|
6621
|
+
private flushIntervalMs;
|
|
6622
|
+
private maxBatchChars;
|
|
6623
|
+
private pendingDelta;
|
|
6624
|
+
private pendingDeltaCount;
|
|
6625
|
+
private flushTimer;
|
|
6626
|
+
private closed;
|
|
6627
|
+
constructor(options: StreamEventWriterOptions);
|
|
6628
|
+
/**
|
|
6629
|
+
* Write a stream event. Text deltas are batched; all other events are written immediately.
|
|
6630
|
+
*/
|
|
6631
|
+
write(event: StreamEvent): Promise<void>;
|
|
6632
|
+
/**
|
|
6633
|
+
* Flush any pending text_delta events to storage as a single batched event.
|
|
6634
|
+
*/
|
|
6635
|
+
flush(): Promise<void>;
|
|
6636
|
+
/**
|
|
6637
|
+
* Close the writer, flushing any remaining events.
|
|
6638
|
+
*/
|
|
6639
|
+
close(): Promise<void>;
|
|
6640
|
+
private writeToStorage;
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6643
|
+
interface StreamEventRelayOptions {
|
|
6644
|
+
storage: StreamEventStorage;
|
|
6645
|
+
sessionId: SessionId;
|
|
6646
|
+
/** Start replaying after this sequence number (default: 0, meaning from beginning) */
|
|
6647
|
+
afterSequence?: number;
|
|
6648
|
+
/** Optional EventEmitter for same-process fast-path */
|
|
6649
|
+
emitter?: EventEmitter;
|
|
6650
|
+
/** Polling interval when no emitter is available (default: 100ms) */
|
|
6651
|
+
pollIntervalMs?: number;
|
|
6652
|
+
/** Heartbeat interval in ms (default: 15000) */
|
|
6653
|
+
heartbeatIntervalMs?: number;
|
|
6654
|
+
/** AbortSignal for cancellation */
|
|
6655
|
+
signal?: AbortSignal;
|
|
6656
|
+
}
|
|
6657
|
+
/**
|
|
6658
|
+
* Subscribe to a session's stream events.
|
|
6659
|
+
* Returns an AsyncGenerator that yields StreamEvents in order.
|
|
6660
|
+
*
|
|
6661
|
+
* Phase 1 (catch-up): Reads all events from storage after `afterSequence`.
|
|
6662
|
+
* Phase 2 (real-time): Listens to EventEmitter if available, else polls storage.
|
|
6663
|
+
* Terminates on terminal events or abort signal.
|
|
6664
|
+
*/
|
|
6665
|
+
declare function streamEventRelay(options: StreamEventRelayOptions): AsyncGenerator<StreamEvent, void, unknown>;
|
|
6666
|
+
|
|
6359
6667
|
/**
|
|
6360
6668
|
* Lifecycle hooks for session events
|
|
6361
6669
|
*/
|
|
@@ -6416,6 +6724,16 @@ interface HarnessServerConfig {
|
|
|
6416
6724
|
* Lifecycle hooks for session events (e.g., workspace management)
|
|
6417
6725
|
*/
|
|
6418
6726
|
hooks?: HarnessServerHooks$1;
|
|
6727
|
+
/**
|
|
6728
|
+
* Sandbox pool configuration.
|
|
6729
|
+
* If provided, the pool is initialized during server startup and shut down on close.
|
|
6730
|
+
*/
|
|
6731
|
+
sandbox?: {
|
|
6732
|
+
/** Pool configuration */
|
|
6733
|
+
pool?: SandboxPoolConfig;
|
|
6734
|
+
/** Auto-initialize pool on server startup (default: true if pool config provided) */
|
|
6735
|
+
autoInitPool?: boolean;
|
|
6736
|
+
};
|
|
6419
6737
|
/**
|
|
6420
6738
|
* Queue processor configuration
|
|
6421
6739
|
*/
|
|
@@ -6482,11 +6800,11 @@ declare function createHarnessServer(config: HarnessServerConfig): {
|
|
|
6482
6800
|
*/
|
|
6483
6801
|
getStoredAgents(): Promise<StoredAgent[]>;
|
|
6484
6802
|
/**
|
|
6485
|
-
* Initialize storage, agents,
|
|
6803
|
+
* Initialize storage, agents, start queue processor, and optionally init sandbox pool
|
|
6486
6804
|
*/
|
|
6487
6805
|
initialize(): Promise<void>;
|
|
6488
6806
|
/**
|
|
6489
|
-
* Close storage, agents,
|
|
6807
|
+
* Close storage, agents, stop queue processor, and shutdown sandbox pool
|
|
6490
6808
|
*/
|
|
6491
6809
|
close(): Promise<void>;
|
|
6492
6810
|
};
|
|
@@ -6547,6 +6865,16 @@ interface OpenAPIServerConfig {
|
|
|
6547
6865
|
* Lifecycle hooks for session events (e.g., workspace management)
|
|
6548
6866
|
*/
|
|
6549
6867
|
hooks?: HarnessServerHooks;
|
|
6868
|
+
/**
|
|
6869
|
+
* Sandbox pool configuration.
|
|
6870
|
+
* If provided, the pool is initialized during server startup and shut down on close.
|
|
6871
|
+
*/
|
|
6872
|
+
sandbox?: {
|
|
6873
|
+
/** Pool configuration */
|
|
6874
|
+
pool?: SandboxPoolConfig;
|
|
6875
|
+
/** Auto-initialize pool on server startup (default: true if pool config provided) */
|
|
6876
|
+
autoInitPool?: boolean;
|
|
6877
|
+
};
|
|
6550
6878
|
/**
|
|
6551
6879
|
* API documentation configuration
|
|
6552
6880
|
*/
|
|
@@ -6612,11 +6940,11 @@ declare function createOpenAPIServer(config: OpenAPIServerConfig): {
|
|
|
6612
6940
|
*/
|
|
6613
6941
|
getStoredAgents(): Promise<StoredAgent[]>;
|
|
6614
6942
|
/**
|
|
6615
|
-
* Initialize storage and
|
|
6943
|
+
* Initialize storage, agents, and optionally init sandbox pool
|
|
6616
6944
|
*/
|
|
6617
6945
|
initialize(): Promise<void>;
|
|
6618
6946
|
/**
|
|
6619
|
-
* Close storage and
|
|
6947
|
+
* Close storage, agents, and shutdown sandbox pool
|
|
6620
6948
|
*/
|
|
6621
6949
|
close(): Promise<void>;
|
|
6622
6950
|
/**
|
|
@@ -9923,7 +10251,7 @@ interface PostgresStorageConfig {
|
|
|
9923
10251
|
/**
|
|
9924
10252
|
* PostgreSQL storage implementation using Drizzle ORM
|
|
9925
10253
|
*/
|
|
9926
|
-
declare class PostgresStorage implements SessionStorage, TransactionalStorage, AgentStorage {
|
|
10254
|
+
declare class PostgresStorage implements SessionStorage, TransactionalStorage, AgentStorage, StreamEventStorage {
|
|
9927
10255
|
private client;
|
|
9928
10256
|
private db;
|
|
9929
10257
|
private initialized;
|
|
@@ -9979,6 +10307,16 @@ declare class PostgresStorage implements SessionStorage, TransactionalStorage, A
|
|
|
9979
10307
|
deleteAgent(agentId: AgentId): Promise<boolean>;
|
|
9980
10308
|
listAgents(options?: ListAgentsOptions): Promise<PaginatedResult<StoredAgent>>;
|
|
9981
10309
|
getActiveAgents(): Promise<StoredAgent[]>;
|
|
10310
|
+
appendEvents(sessionId: SessionId, events: Array<{
|
|
10311
|
+
eventType: string;
|
|
10312
|
+
payload: StreamEvent;
|
|
10313
|
+
batchCount?: number;
|
|
10314
|
+
}>): Promise<StoredStreamEvent[]>;
|
|
10315
|
+
readEvents(sessionId: SessionId, options?: ReadStreamEventsOptions): Promise<StoredStreamEvent[]>;
|
|
10316
|
+
getLatestSequence(sessionId: SessionId): Promise<number>;
|
|
10317
|
+
deleteSessionEvents(sessionId: SessionId): Promise<void>;
|
|
10318
|
+
cleanupOldEvents(maxAgeMs: number): Promise<number>;
|
|
10319
|
+
private rowToStoredStreamEvent;
|
|
9982
10320
|
/**
|
|
9983
10321
|
* Get the underlying Drizzle database instance
|
|
9984
10322
|
* Useful for extensions that need direct database access
|
|
@@ -10065,7 +10403,7 @@ interface SupabaseStorageConfig {
|
|
|
10065
10403
|
* Supabase storage implementation using Supabase JS client.
|
|
10066
10404
|
* Uses PostgREST API which avoids direct database connection issues.
|
|
10067
10405
|
*/
|
|
10068
|
-
declare class SupabaseStorage implements SessionStorage, TransactionalStorage, AgentStorage, EventStorage {
|
|
10406
|
+
declare class SupabaseStorage implements SessionStorage, TransactionalStorage, AgentStorage, EventStorage, StreamEventStorage {
|
|
10069
10407
|
private client;
|
|
10070
10408
|
private initialized;
|
|
10071
10409
|
private tenantId;
|
|
@@ -10109,6 +10447,16 @@ declare class SupabaseStorage implements SessionStorage, TransactionalStorage, A
|
|
|
10109
10447
|
getSessionEvents(sessionId: SessionId, options?: ListSessionEventsOptions): Promise<PaginatedResult<SessionEvent>>;
|
|
10110
10448
|
deleteSessionEvents(sessionId: SessionId): Promise<void>;
|
|
10111
10449
|
getNextEventSequence(sessionId: SessionId): Promise<number>;
|
|
10450
|
+
appendEvents(sessionId: SessionId, events: Array<{
|
|
10451
|
+
eventType: string;
|
|
10452
|
+
payload: StreamEvent;
|
|
10453
|
+
batchCount?: number;
|
|
10454
|
+
}>): Promise<StoredStreamEvent[]>;
|
|
10455
|
+
readEvents(sessionId: SessionId, options?: ReadStreamEventsOptions): Promise<StoredStreamEvent[]>;
|
|
10456
|
+
getLatestSequence(sessionId: SessionId): Promise<number>;
|
|
10457
|
+
deleteStreamEvents(sessionId: SessionId): Promise<void>;
|
|
10458
|
+
cleanupOldEvents(maxAgeMs: number): Promise<number>;
|
|
10459
|
+
private rowToStoredStreamEvent;
|
|
10112
10460
|
}
|
|
10113
10461
|
|
|
10114
10462
|
/**
|
|
@@ -10449,4 +10797,4 @@ declare class AshCloud {
|
|
|
10449
10797
|
*/
|
|
10450
10798
|
declare function createAshCloud(options?: Partial<AshCloudOptions>): AshCloud;
|
|
10451
10799
|
|
|
10452
|
-
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, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxCommandResult, 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, 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, executeCommandInSandbox, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getCachedSandbox, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, 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 };
|
|
10800
|
+
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, EventSource, 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, MemoryStreamEventStorage, 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, type ReadStreamEventsOptions, type RequestLoggerOptions, type ResumeSessionOptions, type RuntimeConfig, RuntimeConfigBuilder, RuntimePresets, S3BundleStore, type S3BundleStoreConfig, S3FileStore, type S3FileStoreConfig, SENSITIVE_PATHS, type SandboxCommandResult, 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 StoredStreamEvent, type StreamEvent, type StreamEventRelayOptions, type StreamEventStorage, StreamEventType, StreamEventWriter, type StreamEventWriterOptions, 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 WarmSandboxOptions, type WarmSandboxResult, type WebFetchAction, type WebSearchAction, type WebhookBatchPayload, type WebhookConfig, type WebhookDeliveryEventData, type WebhookFileSyncEvent, 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, 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, executeCommandInSandbox, extractTextContent, extractTextFromMessage, fileEntrySchema, formatToolName, generateDockerCommand, generateMcpServerPackage, generateMcpServers, generateProxyEnv, generateToolSummary, getActionIcon, getActionLabel, getAllHeartbeatStatuses, getApiKeyEnvVar, getCachedSandbox, getDefaultModel, getFileWatcherManager, getHeartbeatStatus, getInSandboxWatcherManager, getOrCreateSandbox, 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, streamEventRelay, updateToolCallWithResult, warmSandboxForSession, writeFileToSandbox };
|