taskpacket

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package taskpacket serializes portable task packets for agent handoff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(packet Packet) error

Types

type Packet

type Packet struct {
	Objective          string     `json:"objective"`
	Scope              Scope      `json:"scope"`
	ScopePath          string     `json:"scope_path,omitempty"`
	Repo               string     `json:"repo"`
	Worktree           string     `json:"worktree,omitempty"`
	BranchPolicy       string     `json:"branch_policy"`
	AcceptanceTests    []string   `json:"acceptance_tests,omitempty"`
	AcceptanceCriteria []string   `json:"acceptance_criteria,omitempty"`
	Resources          []Resource `json:"resources,omitempty"`
	Model              string     `json:"model,omitempty"`
	Provider           string     `json:"provider,omitempty"`
	PermissionProfile  string     `json:"permission_profile,omitempty"`
	CommitPolicy       string     `json:"commit_policy"`
	ReportingContract  string     `json:"reporting_contract,omitempty"`
	ReportingTargets   []string   `json:"reporting_targets,omitempty"`
	EscalationPolicy   string     `json:"escalation_policy,omitempty"`
	RecoveryPolicy     string     `json:"recovery_policy,omitempty"`
	VerificationPlan   []string   `json:"verification_plan,omitempty"`
}

func Parse

func Parse(data []byte) (Packet, error)

func (*Packet) UnmarshalJSON

func (p *Packet) UnmarshalJSON(data []byte) error

type ResolvedScope

type ResolvedScope struct {
	Scope        Scope  `json:"scope"`
	Path         string `json:"path,omitempty"`
	AbsolutePath string `json:"absolute_path,omitempty"`
}

func ResolveScope

func ResolveScope(workspace string, packet Packet) (ResolvedScope, error)

type Resource

type Resource struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type Scope

type Scope string
const (
	ScopeWorkspace  Scope = "workspace"
	ScopeModule     Scope = "module"
	ScopeSingleFile Scope = "single_file"
	ScopeCustom     Scope = "custom"
)

type ValidationError

type ValidationError struct {
	Errors []string `json:"errors"`
}

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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