-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.go
More file actions
20 lines (17 loc) · 805 Bytes
/
engine.go
File metadata and controls
20 lines (17 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package agentrun
import "context"
// Engine starts and validates agent sessions.
//
// Implementations include CLI subprocess engines (engine/cli) and
// API-based engines (engine/api/adk). Use Validate to check that the
// engine's prerequisites are met before calling Start.
type Engine interface {
// Start initializes a session and returns a Process handle.
// The Process immediately begins producing Messages on its Output channel.
// Options override Session fields for this specific invocation.
Start(ctx context.Context, session Session, opts ...Option) (Process, error)
// Validate checks that the engine is available and ready.
// For CLI engines, this verifies the binary exists and is executable.
// For API engines, this checks connectivity and authentication.
Validate() error
}