ipc

package
v0.193.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 1 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

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