Documentation
¶
Index ¶
- func SessionMCPBindingFromContext(ctx context.Context) string
- func WithSessionMCPBinding(ctx context.Context, id string) context.Context
- type HTTPMCPServer
- type SSEMCPServer
- type SessionMCPProvider
- type SessionMCPReleaser
- type SessionMCPServer
- type SessionMCPTurnProvider
- type SessionRestoreConn
- type SessionRestoreParams
- type SessionRestorer
- type StdioMCPServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SessionMCPBindingFromContext ¶ added in v0.4.40
Types ¶
type HTTPMCPServer ¶ added in v0.3.6
HTTPMCPServer is HTTP transport configuration (requires agent mcp_capabilities.http).
type SSEMCPServer ¶ added in v0.3.6
SSEMCPServer is SSE transport configuration (requires agent mcp_capabilities.sse).
type SessionMCPProvider ¶
type SessionMCPProvider interface {
SessionMCPServers(ctx context.Context) ([]SessionMCPServer, error)
}
SessionMCPProvider supplies per-turn MCP servers for agent/acp-remote. Implementations should read session context from ctx (TurnEnvelope, workspace, etc.). This is separate from project mcp.json, which remote agents load on their own.
type SessionMCPReleaser ¶ added in v0.4.40
SessionMCPReleaser releases connection-scoped resources when an ACP bridge is retired. The context carries the same session/agent/workspace identity as Begin.
type SessionMCPServer ¶
type SessionMCPServer struct {
Stdio *StdioMCPServer
HTTP *HTTPMCPServer
SSE *SSEMCPServer
}
SessionMCPServer describes one harness-provided MCP server for an ACP session. Set exactly one of Stdio, HTTP, or SSE. ACP inline transport may be added later.
type SessionMCPTurnProvider ¶ added in v0.4.40
type SessionMCPTurnProvider interface {
BeginMCPTurn(context.Context) (context.Context, func() error, error)
}
SessionMCPTurnProvider optionally binds an MCP connection to a host turn. Begin must run on every turn, including when the remote ACP session is reused. The returned context is used for session setup and prompting. End is idempotent, cancels tool work, and returns any turn-fatal tool error.
type SessionRestoreConn ¶ added in v0.4.20
type SessionRestoreConn interface {
ResumeSession(context.Context, acpsdk.ResumeSessionRequest) (acpsdk.ResumeSessionResponse, error)
LoadSession(context.Context, acpsdk.LoadSessionRequest) (acpsdk.LoadSessionResponse, error)
}
SessionRestoreConn is the subset of the ACP client used to re-attach sessions.
type SessionRestoreParams ¶ added in v0.4.20
type SessionRestoreParams struct {
HarnessSessionID agentkit.SessionID
AgentID agentkit.AgentID
ACPSessionID acpsdk.SessionId
Cwd string
McpServers []acpsdk.McpServer
AgentCapabilities acpsdk.AgentCapabilities
}
SessionRestoreParams describes a persisted ACP session bind before re-attach.
type SessionRestorer ¶ added in v0.4.20
type SessionRestorer interface {
Restore(ctx context.Context, conn SessionRestoreConn, params SessionRestoreParams) (restored bool, err error)
}
SessionRestorer customizes how agent/acp-remote re-attaches to a saved ACP session id (bind file) before falling back to session/new and harness history replay.