ipc

package
v0.225.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RunAgentInputFrameType = "run_agent_input"

RunAgentInputFrameType is the stdin frame that starts or continues a run with new user messages. Its body is an AG-UI RunAgentInput.

View Source
const UserMessageRequestID = "stdin"

UserMessageRequestID tags queue entries that came from a run input on stdin so the renderer can tell them apart from background-job result notes.

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 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