task

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package task defines the unit of work that flows through dispatch: produced by API clients or by agents spawning sub-tasks, carried by a queue, and consumed by agent execution nodes. It is a leaf package — every other layer speaks these types without depending on one another.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewID

func NewID() string

NewID returns a fresh 128-bit hex task ID.

Types

type Result

type Result struct {
	TaskID string `json:"task_id"`
	NodeID string `json:"node_id,omitempty"`
	Output []byte `json:"output,omitempty"`
	Error  string `json:"error,omitempty"`
}

Result is the outcome of executing a Task on a node. Error carries a failure as a string so results survive any transport.

type Task

type Task struct {
	// ID identifies the task across producers and consumers. Producers
	// may leave it empty; the control plane assigns one on submission.
	ID string `json:"id,omitempty"`
	// Tool is the registered tool name to invoke.
	Tool string `json:"tool"`
	// Input is the opaque payload handed to the tool.
	Input []byte `json:"input,omitempty"`
}

Task asks a deployment to invoke one named tool with an opaque input.

Jump to

Keyboard shortcuts

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