adk

package
v0.1.0-proto2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitCommand

func AwaitCommand() string

AwaitCommand blocks until a command is received from the supervisor. Returns the command string (e.g. "start", "stop"). In a real implementation, this would read from a QUIC stream or IPC socket.

func ComputeSchemaHash

func ComputeSchemaHash(path string) string

ComputeSchemaHash reads a file and returns its BLAKE3 hash as a hex string. Returns empty string on error to simplify binding logic.

func Initialize

func Initialize(name, version, typeStr string)

Initialize sets up the agent identity.

func InjectCommand

func InjectCommand(cmd string)

InjectCommand is a helper for testing/simulation to push a command into the mailbox.

func SendEvent

func SendEvent(jsonStr string)

SendEvent sends a generic event to the supervisor via QUIC.

func SetSchemaHash

func SetSchemaHash(hash string)

SetSchemaHash sets the schema hash for the agent.

func StartHeartbeat

func StartHeartbeat(id, typeStr string)

StartHeartbeat starts a background goroutine that sends heartbeat events.

func StartQUIC

func StartQUIC(addr string) error

StartQUIC initializes the QUIC connection to the supervisor.

Types

type ChannelManager

type ChannelManager struct {
	// contains filtered or unexported fields
}

ChannelManager manages a string channel for native communication between Go and Python. It is designed to be exposed via gopy.

func NewChannelManager

func NewChannelManager() *ChannelManager

NewChannelManager creates a new manager.

func (*ChannelManager) Close

func (m *ChannelManager) Close()

Close closes the channel.

func (*ChannelManager) Receive

func (m *ChannelManager) Receive(timeoutSeconds int) (string, error)

Receive blocks until a message is received or timeout. Returns the message and an error. If the channel is closed, returns error "channel closed". If timeout occurs, returns error "timeout".

func (*ChannelManager) Send

func (m *ChannelManager) Send(msg string)

Send sends a message to the channel. It is safe to call from multiple goroutines (or Python threads).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL