playground / Exports
playground
Table of contents
Classes
- PlaygroundBlockCollector
- CodeExecutor
- ExecutionSubscriber
- DefaultExternalWorkflowStore
- RealTimeLLMTracker
- PlaygroundHistoryPlugin
- PlaygroundStatisticsPlugin
- ProjectManager
- PlaygroundExecutor
- UniversalToolFactory
- PlaygroundWebSocketClient
- WorkflowSubscriberEventService
Interfaces
- IToolHooks
- IBlockMetadata
- IBlockMessage
- IBlockDataCollector
- IToolExecutionTrackingData
- IDelegationTrackingData
- IBlockTreeNode
- IExecutionResult
- IErrorInfo
- IAgentContext
- IPlaygroundConfig
- IExternalWorkflowStore
- IManualAgentData
- IManualUserInputData
- IConversationEvent
- IAgentBlock
- IVisualizationData
- IPlaygroundHistoryPluginOptions
- IProjectConfig
- IPlaygroundProject
- IProjectMetadata
- IPlaygroundTool
- IPlaygroundPlugin
- IPlaygroundAgentConfig
- IPlaygroundExecutorResult
- IPlaygroundUiError
- IUniversalToolFactoryOptions
- IPlaygroundWebSocketMessage
- IPlaygroundConnectionStatus
- IPlaygroundWebSocketAuthenticatedEvent
- IPlaygroundWebSocketConnectionEvent
- IPlaygroundWebSocketErrorEvent
Type Aliases
- SimpleLogger
- TBlockCollectionEvent
- TBlockCollectionListener
- TPlaygroundEventType
- TPlaygroundProvider
- TPlaygroundMode
- TPlaygroundUiErrorKind
- TPlaygroundWebSocketMessageType
- TPlaygroundWebSocketEventPayload
- TPlaygroundWebSocketEventHandler
Functions
- createBlockTrackingHooks
- createDelegationTrackingHooks
- validatePlaygroundConfig
- getPlaygroundConfig
- isFeatureEnabled
- validateFirebaseConfig
- logConfigurationStatus
- generateDemoExecutionData
- generateComplexDemoData
- injectRemoteExecutor
- createPlaygroundSandbox
- generateMockEnvironment
- requiresTransformation
- previewTransformation
- extractProviderInfo
- PlaygroundApp
- PlaygroundDemo
Type Aliases
SimpleLogger
Ƭ SimpleLogger: AbstractLogger
Simple logger type - convenience alias for AbstractLogger
This is a type alias that extends AbstractLogger for backward compatibility and convenience. It provides the same interface as AbstractLogger.
TYPE HIERARCHY: AbstractLogger (interface) ← Base type ↓ SimpleLogger (alias) ← This type ↓ SilentLogger, ConsoleLogger (implementations)
Defined in
agents/dist/node/index.d.ts:1744
TBlockCollectionEvent
Ƭ TBlockCollectionEvent: { type: "block_added" ; block: IBlockMessage } | { type: "block_updated" ; blockId: string ; updates: Partial<IBlockMetadata> } | { type: "block_removed" ; blockId: string } | { type: "blocks_cleared" }
Block collection events for real-time updates
Defined in
playground/src/lib/playground/block-tracking/types.ts:253
TBlockCollectionListener
Ƭ TBlockCollectionListener: (event: TBlockCollectionEvent) => void
Block collection listener
Type declaration
▸ (event): void
Parameters
| Name | Type |
|---|---|
event | TBlockCollectionEvent |
Returns
void
Defined in
playground/src/lib/playground/block-tracking/types.ts:262
TPlaygroundEventType
Ƭ TPlaygroundEventType: "user_message" | "assistant_response" | "tool_call_start" | "tool_call_complete" | "tool_call_error" | "execution_start" | "execution_complete" | "execution_error"
Defined in
playground/src/lib/playground/plugins/playground-history-plugin.ts:4
TPlaygroundProvider
Ƭ TPlaygroundProvider: "openai" | "anthropic" | "google"
Defined in
playground/src/lib/playground/project-manager.ts:9
TPlaygroundMode
Ƭ TPlaygroundMode: "agent"
Defined in
playground/src/lib/playground/robota-executor.ts:88
TPlaygroundUiErrorKind
Ƭ TPlaygroundUiErrorKind: "user_message" | "recoverable" | "fatal"
Defined in
playground/src/lib/playground/robota-executor.ts:90
TPlaygroundWebSocketMessageType
Ƭ TPlaygroundWebSocketMessageType: "playground_update" | "auth" | "ping" | "pong"
Defined in
playground/src/lib/playground/websocket-client.ts:11
TPlaygroundWebSocketEventPayload
Ƭ TPlaygroundWebSocketEventPayload: IPlaygroundWebSocketMessage | IPlaygroundWebSocketAuthenticatedEvent | IPlaygroundWebSocketConnectionEvent | IPlaygroundWebSocketErrorEvent
Defined in
playground/src/lib/playground/websocket-client.ts:45
TPlaygroundWebSocketEventHandler
Ƭ TPlaygroundWebSocketEventHandler: (payload: TPlaygroundWebSocketEventPayload) => void
Type declaration
▸ (payload): void
Parameters
| Name | Type |
|---|---|
payload | TPlaygroundWebSocketEventPayload |
Returns
void
Defined in
playground/src/lib/playground/websocket-client.ts:51
Functions
createBlockTrackingHooks
▸ createBlockTrackingHooks(blockCollector, logger?, options?): IToolHooks
Create block tracking hooks that implement the universal IToolHooks interface This connects the SDK's universal hook system to the web app's block visualization
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
blockCollector | IBlockDataCollector | undefined | The block collector instance |
logger | AbstractLogger | DefaultConsoleLogger | Optional logger for debugging |
options | Object | {} | Additional configuration options |
options.parentBlockId? | string | undefined | Parent block ID for nested tool calls |
options.level? | number | undefined | Level for hierarchical nesting |
options.blockTypeMapping? | Record<string, TBlockType> | undefined | Custom block type mapping |
Returns
Defined in
playground/src/lib/playground/block-tracking/block-hooks.ts:24
createDelegationTrackingHooks
▸ createDelegationTrackingHooks(blockCollector, logger?, options?): IToolHooks
Create delegation tracking hooks for team agent scenarios Tracks when agents delegate tasks to other agents
Parameters
| Name | Type | Default value |
|---|---|---|
blockCollector | IBlockDataCollector | undefined |
logger | AbstractLogger | DefaultConsoleLogger |
options | Object | {} |
options.parentBlockId? | string | undefined |
options.level? | number | undefined |
Returns
Defined in
playground/src/lib/playground/block-tracking/block-hooks.ts:280
validatePlaygroundConfig
▸ validatePlaygroundConfig(): IPlaygroundConfig
Validate and parse playground configuration from environment variables
Returns
Defined in
playground/src/lib/playground/config-validation.ts:24
getPlaygroundConfig
▸ getPlaygroundConfig(): IPlaygroundConfig
Get playground configuration with validation
Returns
Defined in
playground/src/lib/playground/config-validation.ts:68
isFeatureEnabled
▸ isFeatureEnabled(feature): boolean
Check if playground feature is enabled
Parameters
| Name | Type |
|---|---|
feature | "remoteExecution" | "streaming" | "tools" |
Returns
boolean
Defined in
playground/src/lib/playground/config-validation.ts:75
validateFirebaseConfig
▸ validateFirebaseConfig(): Object
Validate Firebase configuration for playground
Returns
Object
| Name | Type |
|---|---|
valid | boolean |
missingVars | string[] |
Defined in
playground/src/lib/playground/config-validation.ts:83
logConfigurationStatus
▸ logConfigurationStatus(): void
Development helper to log configuration status
Returns
void
Defined in
playground/src/lib/playground/config-validation.ts:107
generateDemoExecutionData
▸ generateDemoExecutionData(blockCollector): void
Generate demo execution data for testing the tree visualization
Parameters
| Name | Type |
|---|---|
blockCollector | PlaygroundBlockCollector |
Returns
void
Defined in
playground/src/lib/playground/demo-execution-data.ts:8
generateComplexDemoData
▸ generateComplexDemoData(blockCollector): void
Generate a second demo scenario - Complex multi-tool execution
Parameters
| Name | Type |
|---|---|
blockCollector | PlaygroundBlockCollector |
Returns
void
Defined in
playground/src/lib/playground/demo-execution-data.ts:287
injectRemoteExecutor
▸ injectRemoteExecutor(userCode, config): string
Transform user code to inject RemoteExecutor into all AI providers
Parameters
| Name | Type | Description |
|---|---|---|
userCode | string | Original user code from the playground editor |
config | IPlaygroundConfig | Playground configuration with server details |
Returns
string
Transformed code with RemoteExecutor injection
Defined in
playground/src/lib/playground/remote-injection.ts:41
createPlaygroundSandbox
▸ createPlaygroundSandbox(config): Object
Create a sandbox environment for secure code execution
Parameters
| Name | Type |
|---|---|
config | IPlaygroundConfig |
Returns
Object
| Name | Type |
|---|---|
execute | (code: string) => Promise<{ result: any ; logs: string[] }> |
cleanup | () => void |
Defined in
playground/src/lib/playground/remote-injection.ts:467
generateMockEnvironment
▸ generateMockEnvironment(): Record<string, string>
Generate mock environment variables for playground
Returns
Record<string, string>
Defined in
playground/src/lib/playground/remote-injection.ts:578
requiresTransformation
▸ requiresTransformation(code): boolean
Check if code requires transformation for playground
Parameters
| Name | Type |
|---|---|
code | string |
Returns
boolean
Defined in
playground/src/lib/playground/remote-injection.ts:590
previewTransformation
▸ previewTransformation(code, config): Object
Preview transformed code for debugging
Parameters
| Name | Type |
|---|---|
code | string |
config | IPlaygroundConfig |
Returns
Object
| Name | Type |
|---|---|
original | string |
transformed | string |
changes | string[] |
Defined in
playground/src/lib/playground/remote-injection.ts:603
extractProviderInfo
▸ extractProviderInfo(code): Object
Extract provider information from code
Parameters
| Name | Type |
|---|---|
code | string |
Returns
Object
| Name | Type |
|---|---|
providers | string[] |
models | string[] |
hasTools | boolean |
hasPlugins | boolean |
Defined in
playground/src/lib/playground/remote-injection.ts:627
PlaygroundApp
▸ PlaygroundApp(props): React.ReactElement
Parameters
| Name | Type |
|---|---|
props | Object |
props.createEventService | (workflowSubscriber: WorkflowEventSubscriber, logger: AbstractLogger) => IEventService |
Returns
React.ReactElement
Defined in
playground/src/playground/components/PlaygroundApp.tsx:504
PlaygroundDemo
▸ PlaygroundDemo(): JSX.Element
PlaygroundDemo
No-login demo page component. This intentionally does not call any LLM providers. It renders deterministic demo execution data using the block-tracking visualizer.
Returns
JSX.Element