1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! # adk-code
//!
//! First-class code execution substrate for ADK-Rust.
//!
//! This crate provides a typed executor abstraction, a truthful sandbox capability model,
//! and shared execution backends for agent tools, Studio code nodes, and generated projects.
//!
//! ## Overview
//!
//! `adk-code` owns:
//!
//! - Execution request and result types ([`ExecutionRequest`], [`ExecutionResult`])
//! - Backend interface ([`CodeExecutor`] trait)
//! - Sandbox policy model ([`SandboxPolicy`], [`BackendCapabilities`])
//! - Request validation helpers ([`validate_policy`], [`validate_request`])
//! - Workspace abstraction for collaborative project builds ([`Workspace`], [`CollaborationEvent`])
//! - Built-in execution backends (Rust sandbox, embedded JS, WASM guest, container)
//!
//! ## Product Direction
//!
//! The primary code-execution path is Rust-first:
//!
//! - Author Rust code
//! - Execute it live in a sandbox via [`CodeExecutor`]
//! - Export the same Rust body into generated projects
//!
//! Secondary support includes embedded JavaScript for lightweight transforms,
//! WASM guest modules for portable sandboxed plugins, and container-backed
//! execution for broader multi-language isolation.
//!
//! ## Quick Start
//!
//! ```rust
//! use adk_code::{
//! ExecutionLanguage, ExecutionPayload, ExecutionRequest,
//! ExecutionResult, ExecutionStatus, SandboxPolicy,
//! };
//!
//! let request = ExecutionRequest {
//! language: ExecutionLanguage::Rust,
//! payload: ExecutionPayload::Source {
//! code: r#"
//! fn run(input: serde_json::Value) -> serde_json::Value {
//! serde_json::json!({ "greeting": "hello" })
//! }
//! "#.to_string(),
//! },
//! argv: vec![],
//! stdin: None,
//! input: None,
//! sandbox: SandboxPolicy::strict_rust(),
//! identity: None,
//! };
//!
//! assert_eq!(request.language, ExecutionLanguage::Rust);
//! ```
//!
//! ## Crate Relationships
//!
//! - Depends on `adk-core` for shared error types
//! - `adk-tool` depends on this crate for language-preset tool wrappers
//! - `adk-studio` depends on this crate for live runner and code generation
pub use CodeTool;
pub use DockerExecutor;
pub use *;
pub use ;
pub use *;
pub use *;
pub use *;
pub use ;
pub use ;
pub use *;
pub use *;
pub use *;
pub use *;