Documentation
¶
Index ¶
- Constants
- func Bootstrap(ctx context.Context, profile string, endpoint *link.Link) error
- func Connect(ctx context.Context, profile string) (link.Transport, error)
- func PrintHelp(stdout io.Writer) error
- func ReportSharing(ctx context.Context, endpoint *link.Link, origin string, ...) error
- func Run(args []string, config Options) (int, error)
- func RunCLI(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer, ...) (int, error)
- func RunContext(ctx context.Context, args []string, config Options) (int, error)
- func RunIdentity(ctx context.Context, args []string, stdout io.Writer) (int, error)
- func RunInstalledCommand(ctx context.Context, action string, args []string) error
- func RunLink(ctx context.Context, args []string, stdin *bufio.Reader, interactive bool, ...) error
- func RunMenu(ctx context.Context, input *bufio.Reader, output io.Writer) (string, error)
- func RunShare(ctx context.Context, args []string, stdout, stderr io.Writer) error
- func RunTask(ctx context.Context, options TaskOptions, output io.Writer) (int, error)
- type CLIHandlers
- type Options
- type Server
- type ServiceOptions
- type Target
- type Task
- type TaskOptions
- type TaskResult
Constants ¶
const CLIUsage = `` /* 703-byte string literal not displayed */
const IdentityUsage = "" /* 164-byte string literal not displayed */
const LinkUsage = "" /* 140-byte string literal not displayed */
const MaxTaskRequest = 1024 * 1024
const MaxTaskResponse = 8 * 1024 * 1024
const ServiceUsage = "" /* 333-byte string literal not displayed */
const TaskUsage = "" /* 656-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect attaches a Client to the running Node's owner-only control socket. The control channel carries commands and subscriptions, not binary streams. Closing a controller never shuts down the Node or replays admitted work.
func ReportSharing ¶
func RunCLI ¶
func RunCLI(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer, handlers CLIHandlers) (int, error)
RunCLI dispatches Host commands. Legacy task commands keep their established parsers; new interactive flows use this small command table.
func RunContext ¶
RunContext leaves cancellation and signal handling with the caller.
func RunIdentity ¶
RunIdentity uses the owner-only Host control transport and the same durable admission as remote controllers. Uncertain results include their original ID.
func RunInstalledCommand ¶
Types ¶
type CLIHandlers ¶
type ServiceOptions ¶
type ServiceOptions struct {
Profile string
Network link.NetworkScope
Bootstrap bool
PairingService string
Telemetry *bool
// contains filtered or unexported fields
}
func ParseService ¶
func ParseService(args []string) (ServiceOptions, bool, error)
func (ServiceOptions) Environment ¶
func (options ServiceOptions) Environment(name string) string
Environment reads the process environment for the Node's telemetry. The `--telemetry off` choice answers as the environment opt-out; `on` adds nothing, so an environment opt-out and the saved preference keep precedence.
type Target ¶
type Target struct {
Kind string
Session protocol.SessionID
ExpectedRevision *uint64
Worktree protocol.WorktreeID
Config *protocol.SessionConfig
Execution protocol.ConversationExecution
Team *protocol.TeamSelection
Association *protocol.ConversationAssociation
}
func (Target) MarshalJSON ¶
func (*Target) UnmarshalJSON ¶
type Task ¶
type Task struct {
Command string
Version uint8
Request protocol.RequestID
Target Target
Message protocol.ConversationInput
Title string
Wait bool
Timeout uint64
Session *protocol.SessionID
Turn *protocol.TurnID
}
func (Task) MarshalJSON ¶
func (Task) Result ¶
func (task Task) Result() TaskResult
func (*Task) UnmarshalJSON ¶
type TaskOptions ¶
type TaskResult ¶
type TaskResult struct {
Version uint8 `json:"version"`
Node *protocol.NodeID `json:"node"`
Request *protocol.RequestID `json:"request"`
Session *protocol.SessionID `json:"session"`
Turn *protocol.TurnID `json:"turn"`
Revision *uint64 `json:"revision"`
State string `json:"state"`
Text string `json:"text"`
Error *protocol.Fault `json:"error"`
Approvals []protocol.ConversationApproval `json:"approvals"`
Questions []protocol.ConversationQuestion `json:"questions"`
}
func (TaskResult) ExitCode ¶
func (result TaskResult) ExitCode() int
func (*TaskResult) UnmarshalJSON ¶
func (result *TaskResult) UnmarshalJSON(body []byte) error