ipc

package
v0.191.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentErrorMessage

type AgentErrorMessage struct {
	Type    string `json:"type"` // "agent_error"
	Message string `json:"message"`
}

AgentErrorMessage is emitted by the agent on stdout when a fatal error occurs before exiting. The channel manager forwards this to the user-facing channel so users aren't left waiting in silence when the agent process fails.

type ApprovalRequest

type ApprovalRequest struct {
	Type       string `json:"type"` // "approval_request"
	ToolName   string `json:"tool_name"`
	ToolArgs   string `json:"tool_args"`
	ToolCallID string `json:"tool_call_id"`
}

ApprovalRequest is emitted by the agent on stdout when a tool needs user approval. The channel manager detects this JSON line, prompts the user, and writes an ApprovalResponse to stdin.

type ApprovalResponse

type ApprovalResponse struct {
	Type       string `json:"type"` // "approval_response"
	ToolCallID string `json:"tool_call_id"`
	Approved   bool   `json:"approved"`
	Scope      string `json:"scope,omitempty"`
}

ApprovalResponse is written to the agent's stdin by the channel manager after user decision.

type ComputerUseControlMessage

type ComputerUseControlMessage struct {
	Type   string `json:"type"`   // "computer_use_control"
	Action string `json:"action"` // "pause" or "resume"
}

ComputerUseControlMessage is written to the agent's stdin by a host UI to pause or resume computer-use execution. Follows the same IPC pattern as ApprovalResponse.

type UserQuestionRequest added in v0.191.0

type UserQuestionRequest struct {
	Type       string          `json:"type"` // "user_question_request"
	ToolCallID string          `json:"tool_call_id"`
	Questions  json.RawMessage `json:"questions"`
}

UserQuestionRequest is emitted on stdout when the AskUserQuestion tool asks the user to pick from a small form. Questions carries the tool's own []agentdomain.UserQuestion, kept as raw JSON so ipc stays dependency-free.

type UserQuestionResponse added in v0.191.0

type UserQuestionResponse struct {
	Type       string          `json:"type"` // "user_question_response"
	ToolCallID string          `json:"tool_call_id"`
	Answers    json.RawMessage `json:"answers,omitempty"`
	Cancelled  bool            `json:"cancelled,omitempty"`
}

UserQuestionResponse is written to the agent's stdin by the host UI after the user submits or dismisses the form. Answers is the host's []agentdomain.UserQuestionAnswer; Cancelled reports a dismissal.

Jump to

Keyboard shortcuts

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