route

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package route handles file-staged routing requests for agent breathe-on-route.

Plane: shared

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stage

func Stage(agentName string, req Request) error

Stage writes a routing request file for the daemon to consume. If a routing file already exists (agent hasn't breathed yet), it is overwritten and a warning is logged — latest route wins.

Types

type Request

type Request struct {
	TaskUUID    string    `json:"task_uuid"`
	RolePrompt  string    `json:"role_prompt"`
	Trigger     string    `json:"trigger"`
	ProjectPath string    `json:"project_path,omitempty"`
	RoutedBy    string    `json:"routed_by,omitempty"`
	Message     string    `json:"message,omitempty"`
	Team        string    `json:"team,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
}

Request is written to ~/.ttal/routing/<agent>.json by the router. The daemon checks for this file during handleBreathe to compose the restart with routing context.

func Consume

func Consume(agentName string) (*Request, error)

Consume reads and deletes a routing request file. Returns nil, nil if no file exists.

Jump to

Keyboard shortcuts

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