turncli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package turncli is the agent's command line for its turn: `turn end` records how the turn ended, `turn answer` reads the user's answer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Answer

func Answer(ctx context.Context, env func(string) string, args []string, out, errw io.Writer, c Agent, h harness.Set) int

Answer prints the user's answers to the caller's gates, as task_read words them.

func End

func End(ctx context.Context, env func(string) string, args []string, out, errw io.Writer, c Agent, h harness.Set) int

End stores the record in the file for the turn it names, and deletes the file once stored. A record the command line can tell is malformed never reaches the daemon.

Types

type Agent

type Agent interface {
	EndTurn(ctx context.Context, handle string, r api.TurnEndRequest) (api.TurnEnded, error)
	TurnAnswer(ctx context.Context, handle, arg string, gate int64) (api.TurnText, error)
}

Agent is the part of AgentAPI the agent's commands call.

Jump to

Keyboard shortcuts

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