agentsessionsv1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Harness_Describe_FullMethodName = "/agentsessions.v1.Harness/Describe"
	Harness_Connect_FullMethodName  = "/agentsessions.v1.Harness/Connect"
)
View Source
const (
	HarnessRegistry_RegisterHarness_FullMethodName = "/agentsessions.v1.HarnessRegistry/RegisterHarness"
	HarnessRegistry_GetHarness_FullMethodName      = "/agentsessions.v1.HarnessRegistry/GetHarness"
	HarnessRegistry_ListHarnesses_FullMethodName   = "/agentsessions.v1.HarnessRegistry/ListHarnesses"
	HarnessRegistry_RetireHarness_FullMethodName   = "/agentsessions.v1.HarnessRegistry/RetireHarness"
)
View Source
const (
	Sessions_CreateSession_FullMethodName = "/agentsessions.v1.Sessions/CreateSession"
	Sessions_GetSession_FullMethodName    = "/agentsessions.v1.Sessions/GetSession"
	Sessions_ListSessions_FullMethodName  = "/agentsessions.v1.Sessions/ListSessions"
	Sessions_DeleteSession_FullMethodName = "/agentsessions.v1.Sessions/DeleteSession"
	Sessions_Exec_FullMethodName          = "/agentsessions.v1.Sessions/Exec"
	Sessions_Replay_FullMethodName        = "/agentsessions.v1.Sessions/Replay"
	Sessions_Approve_FullMethodName       = "/agentsessions.v1.Sessions/Approve"
	Sessions_Cancel_FullMethodName        = "/agentsessions.v1.Sessions/Cancel"
	Sessions_Suspend_FullMethodName       = "/agentsessions.v1.Sessions/Suspend"
	Sessions_Resume_FullMethodName        = "/agentsessions.v1.Sessions/Resume"
	Sessions_Fork_FullMethodName          = "/agentsessions.v1.Sessions/Fork"
)

Variables

View Source
var (
	Mediation_name = map[int32]string{
		0: "MEDIATION_UNSPECIFIED",
		1: "MEDIATION_IN_HARNESS_REPORTED",
		2: "MEDIATION_CONTROLLER_MEDIATED",
		3: "MEDIATION_REQUIRES_APPROVAL",
	}
	Mediation_value = map[string]int32{
		"MEDIATION_UNSPECIFIED":         0,
		"MEDIATION_IN_HARNESS_REPORTED": 1,
		"MEDIATION_CONTROLLER_MEDIATED": 2,
		"MEDIATION_REQUIRES_APPROVAL":   3,
	}
)

Enum value maps for Mediation.

View Source
var (
	EventKind_name = map[int32]string{
		0:  "EVENT_KIND_UNSPECIFIED",
		1:  "EVENT_INPUT",
		2:  "EVENT_MODEL_CALL",
		3:  "EVENT_OUTPUT",
		4:  "EVENT_TOOL_CALL",
		5:  "EVENT_TOOL_RESULT",
		6:  "EVENT_APPROVAL_REQUEST",
		7:  "EVENT_APPROVAL_RESULT",
		8:  "EVENT_USAGE",
		9:  "EVENT_LIFECYCLE",
		10: "EVENT_END",
		11: "EVENT_ERROR",
		12: "EVENT_EXECUTION_START",
		13: "EVENT_PARKED",
	}
	EventKind_value = map[string]int32{
		"EVENT_KIND_UNSPECIFIED": 0,
		"EVENT_INPUT":            1,
		"EVENT_MODEL_CALL":       2,
		"EVENT_OUTPUT":           3,
		"EVENT_TOOL_CALL":        4,
		"EVENT_TOOL_RESULT":      5,
		"EVENT_APPROVAL_REQUEST": 6,
		"EVENT_APPROVAL_RESULT":  7,
		"EVENT_USAGE":            8,
		"EVENT_LIFECYCLE":        9,
		"EVENT_END":              10,
		"EVENT_ERROR":            11,
		"EVENT_EXECUTION_START":  12,
		"EVENT_PARKED":           13,
	}
)

Enum value maps for EventKind.

View Source
var (
	ToolChoice_Mode_name = map[int32]string{
		0: "MODE_UNSPECIFIED",
		1: "MODE_AUTO",
		2: "MODE_NONE",
		3: "MODE_REQUIRED",
	}
	ToolChoice_Mode_value = map[string]int32{
		"MODE_UNSPECIFIED": 0,
		"MODE_AUTO":        1,
		"MODE_NONE":        2,
		"MODE_REQUIRED":    3,
	}
)

Enum value maps for ToolChoice_Mode.

View Source
var (
	ToolResult_Code_name = map[int32]string{
		0: "CODE_UNSPECIFIED",
		1: "APPROVAL_DENIED",
		2: "EXECUTOR_ERROR",
	}
	ToolResult_Code_value = map[string]int32{
		"CODE_UNSPECIFIED": 0,
		"APPROVAL_DENIED":  1,
		"EXECUTOR_ERROR":   2,
	}
)

Enum value maps for ToolResult_Code.

View Source
var (
	Lifecycle_Kind_name = map[int32]string{
		0: "LIFECYCLE_UNSPECIFIED",
		1: "LIFECYCLE_SUSPEND",
		2: "LIFECYCLE_RESUME",
		3: "LIFECYCLE_FORK",
		4: "LIFECYCLE_BASELINE",
		5: "LIFECYCLE_CANCEL",
		6: "LIFECYCLE_DELETE",
	}
	Lifecycle_Kind_value = map[string]int32{
		"LIFECYCLE_UNSPECIFIED": 0,
		"LIFECYCLE_SUSPEND":     1,
		"LIFECYCLE_RESUME":      2,
		"LIFECYCLE_FORK":        3,
		"LIFECYCLE_BASELINE":    4,
		"LIFECYCLE_CANCEL":      5,
		"LIFECYCLE_DELETE":      6,
	}
)

Enum value maps for Lifecycle_Kind.

View Source
var (
	Resumability_name = map[int32]string{
		0: "RESUMABILITY_UNSPECIFIED",
		1: "RESUMABILITY_STATELESS_REPLAY",
		2: "RESUMABILITY_REQUIRES_MEMORY_SNAPSHOT",
	}
	Resumability_value = map[string]int32{
		"RESUMABILITY_UNSPECIFIED":              0,
		"RESUMABILITY_STATELESS_REPLAY":         1,
		"RESUMABILITY_REQUIRES_MEMORY_SNAPSHOT": 2,
	}
)

Enum value maps for Resumability.

View Source
var (
	HarnessState_name = map[int32]string{
		0: "HARNESS_STATE_UNSPECIFIED",
		1: "HARNESS_STATE_ACTIVE",
		2: "HARNESS_STATE_RETIRED",
	}
	HarnessState_value = map[string]int32{
		"HARNESS_STATE_UNSPECIFIED": 0,
		"HARNESS_STATE_ACTIVE":      1,
		"HARNESS_STATE_RETIRED":     2,
	}
)

Enum value maps for HarnessState.

View Source
var (
	HarnessSource_name = map[int32]string{
		0: "HARNESS_SOURCE_UNSPECIFIED",
		1: "HARNESS_SOURCE_STATIC",
		2: "HARNESS_SOURCE_REGISTERED",
	}
	HarnessSource_value = map[string]int32{
		"HARNESS_SOURCE_UNSPECIFIED": 0,
		"HARNESS_SOURCE_STATIC":      1,
		"HARNESS_SOURCE_REGISTERED":  2,
	}
)

Enum value maps for HarnessSource.

View Source
var (
	RegisterOutcome_name = map[int32]string{
		0: "REGISTER_OUTCOME_UNSPECIFIED",
		1: "REGISTER_OUTCOME_CREATED",
		2: "REGISTER_OUTCOME_UNCHANGED",
		3: "REGISTER_OUTCOME_REACTIVATED",
	}
	RegisterOutcome_value = map[string]int32{
		"REGISTER_OUTCOME_UNSPECIFIED": 0,
		"REGISTER_OUTCOME_CREATED":     1,
		"REGISTER_OUTCOME_UNCHANGED":   2,
		"REGISTER_OUTCOME_REACTIVATED": 3,
	}
)

Enum value maps for RegisterOutcome.

View Source
var (
	ExecState_name = map[int32]string{
		0: "EXEC_STATE_UNSPECIFIED",
		1: "EXEC_PENDING",
		2: "EXEC_RUNNING",
		3: "EXEC_AWAITING",
		4: "EXEC_COMPLETED",
		5: "EXEC_FAILED",
		6: "EXEC_CANCELED",
	}
	ExecState_value = map[string]int32{
		"EXEC_STATE_UNSPECIFIED": 0,
		"EXEC_PENDING":           1,
		"EXEC_RUNNING":           2,
		"EXEC_AWAITING":          3,
		"EXEC_COMPLETED":         4,
		"EXEC_FAILED":            5,
		"EXEC_CANCELED":          6,
	}
)

Enum value maps for ExecState.

View Source
var (
	ComputeState_name = map[int32]string{
		0: "COMPUTE_STATE_UNSPECIFIED",
		1: "COMPUTE_NONE",
		2: "COMPUTE_LIVE",
		3: "COMPUTE_WARM",
		4: "COMPUTE_COLD",
		5: "COMPUTE_TERMINATED",
	}
	ComputeState_value = map[string]int32{
		"COMPUTE_STATE_UNSPECIFIED": 0,
		"COMPUTE_NONE":              1,
		"COMPUTE_LIVE":              2,
		"COMPUTE_WARM":              3,
		"COMPUTE_COLD":              4,
		"COMPUTE_TERMINATED":        5,
	}
)

Enum value maps for ComputeState.

View Source
var (
	DeletionState_name = map[int32]string{
		0: "DELETION_STATE_UNSPECIFIED",
		1: "DELETION_ACTIVE",
		2: "DELETION_PENDING",
	}
	DeletionState_value = map[string]int32{
		"DELETION_STATE_UNSPECIFIED": 0,
		"DELETION_ACTIVE":            1,
		"DELETION_PENDING":           2,
	}
)

Enum value maps for DeletionState.

View Source
var File_common_proto protoreflect.FileDescriptor
View Source
var File_harness_proto protoreflect.FileDescriptor
View Source
var File_harness_registry_proto protoreflect.FileDescriptor
View Source
var File_session_proto protoreflect.FileDescriptor
View Source
var HarnessRegistry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agentsessions.v1.HarnessRegistry",
	HandlerType: (*HarnessRegistryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterHarness",
			Handler:    _HarnessRegistry_RegisterHarness_Handler,
		},
		{
			MethodName: "GetHarness",
			Handler:    _HarnessRegistry_GetHarness_Handler,
		},
		{
			MethodName: "ListHarnesses",
			Handler:    _HarnessRegistry_ListHarnesses_Handler,
		},
		{
			MethodName: "RetireHarness",
			Handler:    _HarnessRegistry_RetireHarness_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "harness_registry.proto",
}

HarnessRegistry_ServiceDesc is the grpc.ServiceDesc for HarnessRegistry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Harness_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agentsessions.v1.Harness",
	HandlerType: (*HarnessServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Describe",
			Handler:    _Harness_Describe_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Connect",
			Handler:       _Harness_Connect_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "harness.proto",
}

Harness_ServiceDesc is the grpc.ServiceDesc for Harness service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Sessions_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agentsessions.v1.Sessions",
	HandlerType: (*SessionsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSession",
			Handler:    _Sessions_CreateSession_Handler,
		},
		{
			MethodName: "GetSession",
			Handler:    _Sessions_GetSession_Handler,
		},
		{
			MethodName: "ListSessions",
			Handler:    _Sessions_ListSessions_Handler,
		},
		{
			MethodName: "DeleteSession",
			Handler:    _Sessions_DeleteSession_Handler,
		},
		{
			MethodName: "Approve",
			Handler:    _Sessions_Approve_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _Sessions_Cancel_Handler,
		},
		{
			MethodName: "Suspend",
			Handler:    _Sessions_Suspend_Handler,
		},
		{
			MethodName: "Resume",
			Handler:    _Sessions_Resume_Handler,
		},
		{
			MethodName: "Fork",
			Handler:    _Sessions_Fork_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Exec",
			Handler:       _Sessions_Exec_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Replay",
			Handler:       _Sessions_Replay_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "session.proto",
}

Sessions_ServiceDesc is the grpc.ServiceDesc for Sessions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHarnessRegistryServer

func RegisterHarnessRegistryServer(s grpc.ServiceRegistrar, srv HarnessRegistryServer)

func RegisterHarnessServer

func RegisterHarnessServer(s grpc.ServiceRegistrar, srv HarnessServer)

func RegisterSessionsServer

func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer)

Types

type ApprovalRef

type ApprovalRef struct {
	ExecutionId string `protobuf:"bytes,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	ToolCallId  string `protobuf:"bytes,2,opt,name=tool_call_id,json=toolCallId,proto3" json:"tool_call_id,omitempty"`
	RequestSeq  int64  `protobuf:"varint,3,opt,name=request_seq,json=requestSeq,proto3" json:"request_seq,omitempty"`
	// contains filtered or unexported fields
}

ApprovalRef identifies an unresolved, host-owned APPROVAL_REQUEST within the enclosing session. All fields are required by the approval protocol and request_seq must be positive. A reference inherited through Fork cannot authorize a new effect in the child session.

func (*ApprovalRef) Descriptor deprecated

func (*ApprovalRef) Descriptor() ([]byte, []int)

Deprecated: Use ApprovalRef.ProtoReflect.Descriptor instead.

func (*ApprovalRef) GetExecutionId

func (x *ApprovalRef) GetExecutionId() string

func (*ApprovalRef) GetRequestSeq

func (x *ApprovalRef) GetRequestSeq() int64

func (*ApprovalRef) GetToolCallId

func (x *ApprovalRef) GetToolCallId() string

func (*ApprovalRef) ProtoMessage

func (*ApprovalRef) ProtoMessage()

func (*ApprovalRef) ProtoReflect

func (x *ApprovalRef) ProtoReflect() protoreflect.Message

func (*ApprovalRef) Reset

func (x *ApprovalRef) Reset()

func (*ApprovalRef) String

func (x *ApprovalRef) String() string

type ApprovalRequest

type ApprovalRequest struct {
	ToolCallId string `protobuf:"bytes,1,opt,name=tool_call_id,json=toolCallId,proto3" json:"tool_call_id,omitempty"`
	Reason     string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

Approval is durable journal state, not a mutable session flag or side table. For a REQUIRES_APPROVAL call the host commits TOOL_CALL then APPROVAL_REQUEST before parking; only the host may commit the request or its later APPROVAL_RESULT. The harness cannot mint requests or decisions by emitting these events. Identity on a decision's Event.actor is recorded provenance only, not authorization. This gate supports STATELESS_REPLAY only; it defines no policy hook, expiry, automatic decision, or Cancel behavior.

func (*ApprovalRequest) Descriptor deprecated

func (*ApprovalRequest) Descriptor() ([]byte, []int)

Deprecated: Use ApprovalRequest.ProtoReflect.Descriptor instead.

func (*ApprovalRequest) GetReason

func (x *ApprovalRequest) GetReason() string

func (*ApprovalRequest) GetToolCallId

func (x *ApprovalRequest) GetToolCallId() string

func (*ApprovalRequest) ProtoMessage

func (*ApprovalRequest) ProtoMessage()

func (*ApprovalRequest) ProtoReflect

func (x *ApprovalRequest) ProtoReflect() protoreflect.Message

func (*ApprovalRequest) Reset

func (x *ApprovalRequest) Reset()

func (*ApprovalRequest) String

func (x *ApprovalRequest) String() string

type ApprovalResult

type ApprovalResult struct {
	ToolCallId string `protobuf:"bytes,1,opt,name=tool_call_id,json=toolCallId,proto3" json:"tool_call_id,omitempty"`
	Approved   bool   `protobuf:"varint,2,opt,name=approved,proto3" json:"approved,omitempty"` // non-optional durable value; request-level decision presence is in ApproveRequest
	Reason     string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	// Positive sequence of the resolved APPROVAL_REQUEST. Zero is retained for legacy decisions;
	// it cannot identify a new durable approval request.
	RequestSeq int64 `protobuf:"varint,4,opt,name=request_seq,json=requestSeq,proto3" json:"request_seq,omitempty"`
	// contains filtered or unexported fields
}

ApprovalResult resolves one request in the enclosing session and Event.execution_id. A committed decision allows recovery via Resume; Approve itself never invokes the executor. The host also sends this body in ControllerFrame.approval before the correlated tool receipt during decided recovery/replay. approved=false is a real denial, not an absent decision.

func (*ApprovalResult) Descriptor deprecated

func (*ApprovalResult) Descriptor() ([]byte, []int)

Deprecated: Use ApprovalResult.ProtoReflect.Descriptor instead.

func (*ApprovalResult) GetApproved

func (x *ApprovalResult) GetApproved() bool

func (*ApprovalResult) GetReason

func (x *ApprovalResult) GetReason() string

func (*ApprovalResult) GetRequestSeq

func (x *ApprovalResult) GetRequestSeq() int64

func (*ApprovalResult) GetToolCallId

func (x *ApprovalResult) GetToolCallId() string

func (*ApprovalResult) ProtoMessage

func (*ApprovalResult) ProtoMessage()

func (*ApprovalResult) ProtoReflect

func (x *ApprovalResult) ProtoReflect() protoreflect.Message

func (*ApprovalResult) Reset

func (x *ApprovalResult) Reset()

func (*ApprovalResult) String

func (x *ApprovalResult) String() string

type ApproveRequest

type ApproveRequest struct {
	Session     string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	ToolCallId  string `protobuf:"bytes,3,opt,name=tool_call_id,json=toolCallId,proto3" json:"tool_call_id,omitempty"`
	RequestSeq  int64  `protobuf:"varint,4,opt,name=request_seq,json=requestSeq,proto3" json:"request_seq,omitempty"`
	// Required presence: false means deny; absent is INVALID_ARGUMENT. Unlike this request, the
	// journal's ApprovalResult.approved remains a non-optional bool for compatibility.
	Approved *bool        `protobuf:"varint,5,opt,name=approved,proto3,oneof" json:"approved,omitempty"`
	Reason   string       `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"`
	Identity *IdentityRef `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

Approve supplies an explicit decision for one unresolved request in a stateless execution. All tuple fields are required and request_seq must be positive. A decision resolves only a request owned by this session, not an inherited parent request. Identity is recorded on the decision's Event.actor as provenance, never checked as authorization. No policy hook, expiry, automatic decision, or Cancel semantics are implied by this API.

func (*ApproveRequest) Descriptor deprecated

func (*ApproveRequest) Descriptor() ([]byte, []int)

Deprecated: Use ApproveRequest.ProtoReflect.Descriptor instead.

func (*ApproveRequest) GetApproved

func (x *ApproveRequest) GetApproved() bool

func (*ApproveRequest) GetExecutionId

func (x *ApproveRequest) GetExecutionId() string

func (*ApproveRequest) GetIdentity

func (x *ApproveRequest) GetIdentity() *IdentityRef

func (*ApproveRequest) GetReason

func (x *ApproveRequest) GetReason() string

func (*ApproveRequest) GetRequestSeq

func (x *ApproveRequest) GetRequestSeq() int64

func (*ApproveRequest) GetSession

func (x *ApproveRequest) GetSession() string

func (*ApproveRequest) GetToolCallId

func (x *ApproveRequest) GetToolCallId() string

func (*ApproveRequest) ProtoMessage

func (*ApproveRequest) ProtoMessage()

func (*ApproveRequest) ProtoReflect

func (x *ApproveRequest) ProtoReflect() protoreflect.Message

func (*ApproveRequest) Reset

func (x *ApproveRequest) Reset()

func (*ApproveRequest) String

func (x *ApproveRequest) String() string

type ApproveResponse

type ApproveResponse struct {
	Session  *Session   `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	Decision *LogRecord `protobuf:"bytes,2,opt,name=decision,proto3" json:"decision,omitempty"`
	// contains filtered or unexported fields
}

A successful Approve commits the decision only, never resumes compute or executes a tool. The caller invokes Resume separately. decision is the committed APPROVAL_RESULT LogRecord; an exact retry returns that same record, not a new decision or receipt.

func (*ApproveResponse) Descriptor deprecated

func (*ApproveResponse) Descriptor() ([]byte, []int)

Deprecated: Use ApproveResponse.ProtoReflect.Descriptor instead.

func (*ApproveResponse) GetDecision

func (x *ApproveResponse) GetDecision() *LogRecord

func (*ApproveResponse) GetSession

func (x *ApproveResponse) GetSession() *Session

func (*ApproveResponse) ProtoMessage

func (*ApproveResponse) ProtoMessage()

func (*ApproveResponse) ProtoReflect

func (x *ApproveResponse) ProtoReflect() protoreflect.Message

func (*ApproveResponse) Reset

func (x *ApproveResponse) Reset()

func (*ApproveResponse) String

func (x *ApproveResponse) String() string

type Cancel

type Cancel struct {
	Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` // USER | TIMEOUT | INTERNAL
	// contains filtered or unexported fields
}

func (*Cancel) Descriptor deprecated

func (*Cancel) Descriptor() ([]byte, []int)

Deprecated: Use Cancel.ProtoReflect.Descriptor instead.

func (*Cancel) GetReason

func (x *Cancel) GetReason() string

func (*Cancel) ProtoMessage

func (*Cancel) ProtoMessage()

func (*Cancel) ProtoReflect

func (x *Cancel) ProtoReflect() protoreflect.Message

func (*Cancel) Reset

func (x *Cancel) Reset()

func (*Cancel) String

func (x *Cancel) String() string

type CancelRequest

type CancelRequest struct {
	Session     string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	Reason      string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` // USER | TIMEOUT | INTERNAL
	// contains filtered or unexported fields
}

func (*CancelRequest) Descriptor deprecated

func (*CancelRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelRequest.ProtoReflect.Descriptor instead.

func (*CancelRequest) GetExecutionId

func (x *CancelRequest) GetExecutionId() string

func (*CancelRequest) GetReason

func (x *CancelRequest) GetReason() string

func (*CancelRequest) GetSession

func (x *CancelRequest) GetSession() string

func (*CancelRequest) ProtoMessage

func (*CancelRequest) ProtoMessage()

func (*CancelRequest) ProtoReflect

func (x *CancelRequest) ProtoReflect() protoreflect.Message

func (*CancelRequest) Reset

func (x *CancelRequest) Reset()

func (*CancelRequest) String

func (x *CancelRequest) String() string

type Capabilities

type Capabilities struct {
	Resumability Resumability `protobuf:"varint,1,opt,name=resumability,proto3,enum=agentsessions.v1.Resumability" json:"resumability,omitempty"`
	ForkSafe     bool         `protobuf:"varint,2,opt,name=fork_safe,json=forkSafe,proto3" json:"fork_safe,omitempty"` // no un-replayable side effects mid-turn
	RequiresGpu  bool         `protobuf:"varint,3,opt,name=requires_gpu,json=requiresGpu,proto3" json:"requires_gpu,omitempty"`
	Streaming    bool         `protobuf:"varint,4,opt,name=streaming,proto3" json:"streaming,omitempty"`
	// reasoning_replay: harness replays opaque reasoning parts verbatim via the provider
	// stateless path; keeps reasoning on STATELESS_REPLAY (no memory-snapshot edge).
	ReasoningReplay bool `protobuf:"varint,5,opt,name=reasoning_replay,json=reasoningReplay,proto3" json:"reasoning_replay,omitempty"`
	// contains filtered or unexported fields
}

func (*Capabilities) Descriptor deprecated

func (*Capabilities) Descriptor() ([]byte, []int)

Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.

func (*Capabilities) GetForkSafe

func (x *Capabilities) GetForkSafe() bool

func (*Capabilities) GetReasoningReplay

func (x *Capabilities) GetReasoningReplay() bool

func (*Capabilities) GetRequiresGpu

func (x *Capabilities) GetRequiresGpu() bool

func (*Capabilities) GetResumability

func (x *Capabilities) GetResumability() Resumability

func (*Capabilities) GetStreaming

func (x *Capabilities) GetStreaming() bool

func (*Capabilities) ProtoMessage

func (*Capabilities) ProtoMessage()

func (*Capabilities) ProtoReflect

func (x *Capabilities) ProtoReflect() protoreflect.Message

func (*Capabilities) Reset

func (x *Capabilities) Reset()

func (*Capabilities) String

func (x *Capabilities) String() string

type ComputeRef

type ComputeRef struct {
	Runtime      string               `protobuf:"bytes,1,opt,name=runtime,proto3" json:"runtime,omitempty"` // "pod" | "kata" | "clh" | "substrate"
	Worker       string               `protobuf:"bytes,2,opt,name=worker,proto3" json:"worker,omitempty"`   // pod/worker id when live/warm; empty when cold
	Snapshot     *SnapshotRef         `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
	Capabilities *RuntimeCapabilities `protobuf:"bytes,4,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	Attributes   map[string]string    `` // backend-specific, e.g. substrate actor/atespace
	/* 147-byte string literal not displayed */
	FenceToken int64 `protobuf:"varint,6,opt,name=fence_token,json=fenceToken,proto3" json:"fence_token,omitempty"` // monotonic; log rejects appends from a superseded incarnation
	// contains filtered or unexported fields
}

func (*ComputeRef) Descriptor deprecated

func (*ComputeRef) Descriptor() ([]byte, []int)

Deprecated: Use ComputeRef.ProtoReflect.Descriptor instead.

func (*ComputeRef) GetAttributes

func (x *ComputeRef) GetAttributes() map[string]string

func (*ComputeRef) GetCapabilities

func (x *ComputeRef) GetCapabilities() *RuntimeCapabilities

func (*ComputeRef) GetFenceToken

func (x *ComputeRef) GetFenceToken() int64

func (*ComputeRef) GetRuntime

func (x *ComputeRef) GetRuntime() string

func (*ComputeRef) GetSnapshot

func (x *ComputeRef) GetSnapshot() *SnapshotRef

func (*ComputeRef) GetWorker

func (x *ComputeRef) GetWorker() string

func (*ComputeRef) ProtoMessage

func (*ComputeRef) ProtoMessage()

func (*ComputeRef) ProtoReflect

func (x *ComputeRef) ProtoReflect() protoreflect.Message

func (*ComputeRef) Reset

func (x *ComputeRef) Reset()

func (*ComputeRef) String

func (x *ComputeRef) String() string

type ComputeState

type ComputeState int32
const (
	ComputeState_COMPUTE_STATE_UNSPECIFIED ComputeState = 0
	ComputeState_COMPUTE_NONE              ComputeState = 1 // no incarnation
	ComputeState_COMPUTE_LIVE              ComputeState = 2
	ComputeState_COMPUTE_WARM              ComputeState = 3 // paused: resident, worker held
	ComputeState_COMPUTE_COLD              ComputeState = 4 // suspended: snapshot in storage, worker freed
	ComputeState_COMPUTE_TERMINATED        ComputeState = 5
)

func (ComputeState) Descriptor

func (ComputeState) Enum

func (x ComputeState) Enum() *ComputeState

func (ComputeState) EnumDescriptor deprecated

func (ComputeState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ComputeState.Descriptor instead.

func (ComputeState) Number

func (ComputeState) String

func (x ComputeState) String() string

func (ComputeState) Type

type ControllerFrame

type ControllerFrame struct {
	Session     string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	// Types that are valid to be assigned to Frame:
	//
	//	*ControllerFrame_Start
	//	*ControllerFrame_Cancel
	//	*ControllerFrame_Approval
	//	*ControllerFrame_Tool
	//	*ControllerFrame_Model
	//	*ControllerFrame_Park
	Frame isControllerFrame_Frame `protobuf_oneof:"frame"`
	// contains filtered or unexported fields
}

ControllerFrame is sent by the host to the harness during an execution. Tool/approval control frames MUST match the Start envelope's session and execution_id and the outstanding tool call id. The session is the effect namespace; a reused tool id in another session is unrelated.

For a STATELESS_REPLAY REQUIRES_APPROVAL call, the host owns the durable request/decision. While unresolved, it sends park after committing the request. The harness checks the full session/execution/call/request tuple, stops this Run, sends one matching EVENT_PARKED, and closes its sending side WITHOUT EVENT_END. The host receives and validates that acknowledgement before closing the stream. Missing/mismatched acknowledgements fail the exchange; the durable unresolved request remains recoverable. The host never journals EVENT_PARKED. This is not Cancel and does not record a completed, failed, or canceled execution.

On decided recovery or replay the host sends approval BEFORE tool, even if a receipt already exists. The harness must correlate approval.tool_call_id/request_seq with the waiting call and receipt.id/approval_request_seq; the receipt's approval_decision_seq must identify the committed decision in that session's journal, which the host validates. Denial requires APPROVAL_DENIED and is_error=true without an executor call. Approval permits a success (CODE_UNSPECIFIED with is_error=false) or EXECUTOR_ERROR with is_error=true. Conflicting decisions or receipt tuples fail closed rather than being served to a different call. The harness may not manufacture durable APPROVAL_REQUEST/APPROVAL_RESULT events. The gate is not supported for memory-snapshot harnesses; reject it before executing an effect rather than pretending a park is a snapshot. Host sink operations for an execution are serialized; callbacks must not re-enter that sink. Once a recorded-prefix identity/correlation mismatch occurs, the execution remains divergent: catching the error cannot authorize a later model/tool effect or mark recovery complete.

func (*ControllerFrame) Descriptor deprecated

func (*ControllerFrame) Descriptor() ([]byte, []int)

Deprecated: Use ControllerFrame.ProtoReflect.Descriptor instead.

func (*ControllerFrame) GetApproval

func (x *ControllerFrame) GetApproval() *ApprovalResult

func (*ControllerFrame) GetCancel

func (x *ControllerFrame) GetCancel() *Cancel

func (*ControllerFrame) GetExecutionId

func (x *ControllerFrame) GetExecutionId() string

func (*ControllerFrame) GetFrame

func (x *ControllerFrame) GetFrame() isControllerFrame_Frame

func (*ControllerFrame) GetModel

func (x *ControllerFrame) GetModel() *ModelResult

func (*ControllerFrame) GetPark

func (x *ControllerFrame) GetPark() *ApprovalRef

func (*ControllerFrame) GetSession

func (x *ControllerFrame) GetSession() string

func (*ControllerFrame) GetStart

func (x *ControllerFrame) GetStart() *Start

func (*ControllerFrame) GetTool

func (x *ControllerFrame) GetTool() *ToolResult

func (*ControllerFrame) ProtoMessage

func (*ControllerFrame) ProtoMessage()

func (*ControllerFrame) ProtoReflect

func (x *ControllerFrame) ProtoReflect() protoreflect.Message

func (*ControllerFrame) Reset

func (x *ControllerFrame) Reset()

func (*ControllerFrame) String

func (x *ControllerFrame) String() string

type ControllerFrame_Approval

type ControllerFrame_Approval struct {
	Approval *ApprovalResult `protobuf:"bytes,5,opt,name=approval,proto3,oneof"` // host-owned committed decision, before the correlated tool receipt
}

type ControllerFrame_Cancel

type ControllerFrame_Cancel struct {
	Cancel *Cancel `protobuf:"bytes,4,opt,name=cancel,proto3,oneof"`
}

type ControllerFrame_Model

type ControllerFrame_Model struct {
	Model *ModelResult `protobuf:"bytes,7,opt,name=model,proto3,oneof"` // served completion for a mediated/replayed model call
}

type ControllerFrame_Park

type ControllerFrame_Park struct {
	Park *ApprovalRef `protobuf:"bytes,8,opt,name=park,proto3,oneof"` // host-owned unresolved request; requires correlated EVENT_PARKED
}

type ControllerFrame_Start

type ControllerFrame_Start struct {
	Start *Start `protobuf:"bytes,3,opt,name=start,proto3,oneof"`
}

type ControllerFrame_Tool

type ControllerFrame_Tool struct {
	Tool *ToolResult `protobuf:"bytes,6,opt,name=tool,proto3,oneof"` // result for a CONTROLLER_MEDIATED or decided REQUIRES_APPROVAL call
}

type CreateSessionRequest

type CreateSessionRequest struct {
	Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionRequest) Descriptor deprecated

func (*CreateSessionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.

func (*CreateSessionRequest) GetSession

func (x *CreateSessionRequest) GetSession() *Session

func (*CreateSessionRequest) ProtoMessage

func (*CreateSessionRequest) ProtoMessage()

func (*CreateSessionRequest) ProtoReflect

func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message

func (*CreateSessionRequest) Reset

func (x *CreateSessionRequest) Reset()

func (*CreateSessionRequest) String

func (x *CreateSessionRequest) String() string

type DataPart

type DataPart struct {
	Data *structpb.Struct `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

DataPart is structured JSON (A2A data part; MCP structuredContent).

func (*DataPart) Descriptor deprecated

func (*DataPart) Descriptor() ([]byte, []int)

Deprecated: Use DataPart.ProtoReflect.Descriptor instead.

func (*DataPart) GetData

func (x *DataPart) GetData() *structpb.Struct

func (*DataPart) ProtoMessage

func (*DataPart) ProtoMessage()

func (*DataPart) ProtoReflect

func (x *DataPart) ProtoReflect() protoreflect.Message

func (*DataPart) Reset

func (x *DataPart) Reset()

func (*DataPart) String

func (x *DataPart) String() string

type DeleteSessionRequest

type DeleteSessionRequest struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSessionRequest) Descriptor deprecated

func (*DeleteSessionRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead.

func (*DeleteSessionRequest) GetUid

func (x *DeleteSessionRequest) GetUid() string

func (*DeleteSessionRequest) ProtoMessage

func (*DeleteSessionRequest) ProtoMessage()

func (*DeleteSessionRequest) ProtoReflect

func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message

func (*DeleteSessionRequest) Reset

func (x *DeleteSessionRequest) Reset()

func (*DeleteSessionRequest) String

func (x *DeleteSessionRequest) String() string

type DeletionState

type DeletionState int32

DeletionState is independent of the execution and compute axes. PENDING is a permanent UID tombstone and durable deletion intent, not confirmation that resources were reclaimed. Until ownership and cleanup are implemented (#88), deletion emits PENDING only: actors, fork-child pins and snapshots remain retained, and no Runtime.Stop is attempted.

const (
	DeletionState_DELETION_STATE_UNSPECIFIED DeletionState = 0
	DeletionState_DELETION_ACTIVE            DeletionState = 1
	DeletionState_DELETION_PENDING           DeletionState = 2
)

func (DeletionState) Descriptor

func (DeletionState) Enum

func (x DeletionState) Enum() *DeletionState

func (DeletionState) EnumDescriptor deprecated

func (DeletionState) EnumDescriptor() ([]byte, []int)

Deprecated: Use DeletionState.Descriptor instead.

func (DeletionState) Number

func (DeletionState) String

func (x DeletionState) String() string

func (DeletionState) Type

type Delta

type Delta struct {
	ExecutionId string `protobuf:"bytes,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	PartIndex   int32  `protobuf:"varint,2,opt,name=part_index,json=partIndex,proto3" json:"part_index,omitempty"` // which content part it accumulates into
	Chunk       string `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"`                           // text chunk; binary/media deltas are a later addition
	Done        bool   `protobuf:"varint,4,opt,name=done,proto3" json:"done,omitempty"`                            // last delta for this part
	// contains filtered or unexported fields
}

Delta is an ephemeral streaming chunk that coalesces into a finalized EVENT_OUTPUT (or reasoning) part. No seq; never hash-chained (§8, A2A TaskArtifactUpdateEvent).

func (*Delta) Descriptor deprecated

func (*Delta) Descriptor() ([]byte, []int)

Deprecated: Use Delta.ProtoReflect.Descriptor instead.

func (*Delta) GetChunk

func (x *Delta) GetChunk() string

func (*Delta) GetDone

func (x *Delta) GetDone() bool

func (*Delta) GetExecutionId

func (x *Delta) GetExecutionId() string

func (*Delta) GetPartIndex

func (x *Delta) GetPartIndex() int32

func (*Delta) ProtoMessage

func (*Delta) ProtoMessage()

func (*Delta) ProtoReflect

func (x *Delta) ProtoReflect() protoreflect.Message

func (*Delta) Reset

func (x *Delta) Reset()

func (*Delta) String

func (x *Delta) String() string

type DescribeRequest

type DescribeRequest struct {
	// contains filtered or unexported fields
}

func (*DescribeRequest) Descriptor deprecated

func (*DescribeRequest) Descriptor() ([]byte, []int)

Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.

func (*DescribeRequest) ProtoMessage

func (*DescribeRequest) ProtoMessage()

func (*DescribeRequest) ProtoReflect

func (x *DescribeRequest) ProtoReflect() protoreflect.Message

func (*DescribeRequest) Reset

func (x *DescribeRequest) Reset()

func (*DescribeRequest) String

func (x *DescribeRequest) String() string

type Error

type Error struct {
	Code        int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // grpc status code
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetDescription

func (x *Error) GetDescription() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Event

type Event struct {
	ExecutionId   string                 `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` // which execution/turn produced this event
	Ts            *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ts,proto3" json:"ts,omitempty"`
	SchemaVersion int32                  `protobuf:"varint,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` // §7: versions the body; replay survives schema skew
	Kind          EventKind              `protobuf:"varint,7,opt,name=kind,proto3,enum=agentsessions.v1.EventKind" json:"kind,omitempty"`
	// Types that are valid to be assigned to Body:
	//
	//	*Event_Message
	//	*Event_Model
	//	*Event_Tool
	//	*Event_Result
	//	*Event_Approval
	//	*Event_ApprovalResult
	//	*Event_Usage
	//	*Event_Lifecycle
	//	*Event_End
	//	*Event_Error
	//	*Event_ExecutionStart
	//	*Event_Parked
	Body  isEvent_Body `protobuf_oneof:"body"`
	Actor *IdentityRef `protobuf:"bytes,18,opt,name=actor,proto3" json:"actor,omitempty"` // emitter principal -> provenance
	// contains filtered or unexported fields
}

Event is the shared journal/stream content unit; EXECUTION_START, APPROVAL_REQUEST and APPROVAL_RESULT are host-owned journal entries. PARKED is transport only, never journaled. Ordering (seq) and integrity (prev_hash / content_hash) are host-assigned and live on LogRecord — the harness, which does not know seq/prev, emits a hash-free Event, so there is no circular hashing. Streaming deltas are transport (see Delta in session.proto) and coalesce into the finalized event (§3).

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetActor

func (x *Event) GetActor() *IdentityRef

func (*Event) GetApproval

func (x *Event) GetApproval() *ApprovalRequest

func (*Event) GetApprovalResult

func (x *Event) GetApprovalResult() *ApprovalResult

func (*Event) GetBody

func (x *Event) GetBody() isEvent_Body

func (*Event) GetEnd

func (x *Event) GetEnd() *HarnessEnd

func (*Event) GetError

func (x *Event) GetError() *Error

func (*Event) GetExecutionId

func (x *Event) GetExecutionId() string

func (*Event) GetExecutionStart

func (x *Event) GetExecutionStart() *ExecutionStart

func (*Event) GetKind

func (x *Event) GetKind() EventKind

func (*Event) GetLifecycle

func (x *Event) GetLifecycle() *Lifecycle

func (*Event) GetMessage

func (x *Event) GetMessage() *Message

func (*Event) GetModel

func (x *Event) GetModel() *ModelCall

func (*Event) GetParked

func (x *Event) GetParked() *ApprovalRef

func (*Event) GetResult

func (x *Event) GetResult() *ToolResult

func (*Event) GetSchemaVersion

func (x *Event) GetSchemaVersion() int32

func (*Event) GetTool

func (x *Event) GetTool() *ToolCall

func (*Event) GetTs

func (x *Event) GetTs() *timestamppb.Timestamp

func (*Event) GetUsage

func (x *Event) GetUsage() *Usage

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventKind

type EventKind int32
const (
	EventKind_EVENT_KIND_UNSPECIFIED EventKind = 0
	EventKind_EVENT_INPUT            EventKind = 1 // a user/producer message
	EventKind_EVENT_MODEL_CALL       EventKind = 2 // model-call metadata (+ input_hash); output is an OUTPUT message
	EventKind_EVENT_OUTPUT           EventKind = 3 // a finalized assistant message; streaming deltas are transport, not logged
	EventKind_EVENT_TOOL_CALL        EventKind = 4
	EventKind_EVENT_TOOL_RESULT      EventKind = 5
	EventKind_EVENT_APPROVAL_REQUEST EventKind = 6
	EventKind_EVENT_APPROVAL_RESULT  EventKind = 7
	EventKind_EVENT_USAGE            EventKind = 8
	EventKind_EVENT_LIFECYCLE        EventKind = 9
	EventKind_EVENT_END              EventKind = 10
	EventKind_EVENT_ERROR            EventKind = 11
	EventKind_EVENT_EXECUTION_START  EventKind = 12 // host-owned config/cursor/input count, before inputs and harness effects
	// Harness acknowledgement of ControllerFrame.park with the exact ApprovalRef. Transport only:
	// the host MUST NOT journal/hash-chain it or treat it as a terminal execution outcome.
	EventKind_EVENT_PARKED EventKind = 13
)

func (EventKind) Descriptor

func (EventKind) Descriptor() protoreflect.EnumDescriptor

func (EventKind) Enum

func (x EventKind) Enum() *EventKind

func (EventKind) EnumDescriptor deprecated

func (EventKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventKind.Descriptor instead.

func (EventKind) Number

func (x EventKind) Number() protoreflect.EnumNumber

func (EventKind) String

func (x EventKind) String() string

func (EventKind) Type

type Event_Approval

type Event_Approval struct {
	Approval *ApprovalRequest `protobuf:"bytes,12,opt,name=approval,proto3,oneof"`
}

type Event_ApprovalResult

type Event_ApprovalResult struct {
	ApprovalResult *ApprovalResult `protobuf:"bytes,13,opt,name=approval_result,json=approvalResult,proto3,oneof"`
}

type Event_End

type Event_End struct {
	End *HarnessEnd `protobuf:"bytes,16,opt,name=end,proto3,oneof"`
}

type Event_Error

type Event_Error struct {
	Error *Error `protobuf:"bytes,17,opt,name=error,proto3,oneof"`
}

type Event_ExecutionStart

type Event_ExecutionStart struct {
	ExecutionStart *ExecutionStart `protobuf:"bytes,19,opt,name=execution_start,json=executionStart,proto3,oneof"`
}

type Event_Lifecycle

type Event_Lifecycle struct {
	Lifecycle *Lifecycle `protobuf:"bytes,15,opt,name=lifecycle,proto3,oneof"`
}

type Event_Message

type Event_Message struct {
	Message *Message `protobuf:"bytes,8,opt,name=message,proto3,oneof"`
}

type Event_Model

type Event_Model struct {
	Model *ModelCall `protobuf:"bytes,9,opt,name=model,proto3,oneof"`
}

type Event_Parked

type Event_Parked struct {
	// EVENT_PARKED echoes the park reference; Event.execution_id must match its execution_id.
	Parked *ApprovalRef `protobuf:"bytes,20,opt,name=parked,proto3,oneof"`
}

type Event_Result

type Event_Result struct {
	Result *ToolResult `protobuf:"bytes,11,opt,name=result,proto3,oneof"`
}

type Event_Tool

type Event_Tool struct {
	Tool *ToolCall `protobuf:"bytes,10,opt,name=tool,proto3,oneof"`
}

type Event_Usage

type Event_Usage struct {
	Usage *Usage `protobuf:"bytes,14,opt,name=usage,proto3,oneof"`
}

type ExecRequest

type ExecRequest struct {

	// The session to run against. Empty creates one first, using the server defaults and the harness
	// below, and returns it as the stream's first frame. A caller that wants to set a project, name,
	// or model still calls CreateSession; this exists so the common case is one call rather than
	// three (create, read the cursor, exec).
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// Input messages for a new turn. While this session owns an unreceipted approval call,
	// new inputs are FAILED_PRECONDITION, including after a decision but before its receipt.
	// For an existing current approval-bearing, non-terminal execution, empty inputs recover
	// that recorded invocation via Resume, without a new EXECUTION_START. Recorded inputs,
	// config, harness, version and resume cursor win over this request's invocation overrides.
	// Pending requests return a paused Session without runtime IO; a call-only crash cut repairs
	// the request first. expected_last_seq is checked under the session guard before runtime IO
	// or repair, and deadline_unix bounds recovery. Other inputless Exec calls retain their
	// ordinary new-turn behavior; use Resume for general interrupted-turn recovery.
	Inputs []*Message `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// Cursor handed to the harness as Start.resume_from_seq. The host does not interpret it; only a
	// harness knows what resuming from a sequence means for its own state. To re-read committed
	// records after a disconnect, use Replay, which is the read path for exactly that. Non-zero cursors
	// are journaled in EXECUTION_START and restored during controller replay/interrupted resume.
	ResumeFromSeq int64 `protobuf:"varint,3,opt,name=resume_from_seq,json=resumeFromSeq,proto3" json:"resume_from_seq,omitempty"`
	// Empty = the session's harness. A different harness runs this turn only, unless either one is
	// a registered harness (see HarnessRegistry): then the session is pinned and the call is
	// FAILED_PRECONDITION. A stored REQUIRES_MEMORY_SNAPSHOT harness also refuses a
	// STATELESS_REPLAY override before any fence or journal write: parking only the override
	// cannot checkpoint the stored harness's live memory.
	Harness string `protobuf:"bytes,4,opt,name=harness,proto3" json:"harness,omitempty"`
	// Opaque per-execution config, passed through to Start.config. Non-empty bytes are journaled
	// verbatim in EXECUTION_START before the harness runs, and restored for controller replay/resume.
	// Do not put credentials here: config is durable journal content exposed by Replay.
	Config []byte `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"`
	// Single-writer CAS: the host commits this execution's first event only if the log head equals
	// expected_last_seq. A mismatch is ABORTED, meaning another writer advanced the log.
	// A deleted session returns FAILED_PRECONDITION regardless of this cursor's value.
	//
	// It is optional because the guarantee should be opt-in rather than the price of a simple call.
	// Unset means "append at whatever the head is now", which is what a caller with a single writer
	// wants. Set means the strict check, and 0 is a real value there: it asserts the session has no
	// events yet. That distinction is why this carries explicit presence instead of treating 0 as
	// "unset" -- a caller could not otherwise say "this must be the first turn".
	ExpectedLastSeq *int64 `protobuf:"varint,6,opt,name=expected_last_seq,json=expectedLastSeq,proto3,oneof" json:"expected_last_seq,omitempty"`
	DeadlineUnix    int64  `protobuf:"varint,7,opt,name=deadline_unix,json=deadlineUnix,proto3" json:"deadline_unix,omitempty"` // optional execution deadline (unix seconds); host cancels past it
	// contains filtered or unexported fields
}

func (*ExecRequest) Descriptor deprecated

func (*ExecRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead.

func (*ExecRequest) GetConfig

func (x *ExecRequest) GetConfig() []byte

func (*ExecRequest) GetDeadlineUnix

func (x *ExecRequest) GetDeadlineUnix() int64

func (*ExecRequest) GetExpectedLastSeq

func (x *ExecRequest) GetExpectedLastSeq() int64

func (*ExecRequest) GetHarness

func (x *ExecRequest) GetHarness() string

func (*ExecRequest) GetInputs

func (x *ExecRequest) GetInputs() []*Message

func (*ExecRequest) GetResumeFromSeq

func (x *ExecRequest) GetResumeFromSeq() int64

func (*ExecRequest) GetSession

func (x *ExecRequest) GetSession() string

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) ProtoReflect

func (x *ExecRequest) ProtoReflect() protoreflect.Message

func (*ExecRequest) Reset

func (x *ExecRequest) Reset()

func (*ExecRequest) String

func (x *ExecRequest) String() string

type ExecState

type ExecState int32

ExecState is the execution/turn axis; ComputeState is the incarnation axis. The two are modeled explicitly (§6 of the replay contract) and reported independently: there is no flattened lifecycle enum, because collapsing them loses which axis actually moved.

const (
	ExecState_EXEC_STATE_UNSPECIFIED ExecState = 0
	ExecState_EXEC_PENDING           ExecState = 1
	ExecState_EXEC_RUNNING           ExecState = 2
	ExecState_EXEC_AWAITING          ExecState = 3 // blocked on approval/input, resolved from the log
	ExecState_EXEC_COMPLETED         ExecState = 4
	ExecState_EXEC_FAILED            ExecState = 5
	ExecState_EXEC_CANCELED          ExecState = 6
)

func (ExecState) Descriptor

func (ExecState) Descriptor() protoreflect.EnumDescriptor

func (ExecState) Enum

func (x ExecState) Enum() *ExecState

func (ExecState) EnumDescriptor deprecated

func (ExecState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ExecState.Descriptor instead.

func (ExecState) Number

func (x ExecState) Number() protoreflect.EnumNumber

func (ExecState) String

func (x ExecState) String() string

func (ExecState) Type

type ExecUpdate

type ExecUpdate struct {

	// Types that are valid to be assigned to Update:
	//
	//	*ExecUpdate_Record
	//	*ExecUpdate_Delta
	//	*ExecUpdate_Session
	Update isExecUpdate_Update `protobuf_oneof:"update"`
	// contains filtered or unexported fields
}

ExecUpdate is what the live Exec stream carries: the session, a committed LogRecord, or an ephemeral streaming Delta (transport only — not logged, not hash-chained).

func (*ExecUpdate) Descriptor deprecated

func (*ExecUpdate) Descriptor() ([]byte, []int)

Deprecated: Use ExecUpdate.ProtoReflect.Descriptor instead.

func (*ExecUpdate) GetDelta

func (x *ExecUpdate) GetDelta() *Delta

func (*ExecUpdate) GetRecord

func (x *ExecUpdate) GetRecord() *LogRecord

func (*ExecUpdate) GetSession

func (x *ExecUpdate) GetSession() *Session

func (*ExecUpdate) GetUpdate

func (x *ExecUpdate) GetUpdate() isExecUpdate_Update

func (*ExecUpdate) ProtoMessage

func (*ExecUpdate) ProtoMessage()

func (*ExecUpdate) ProtoReflect

func (x *ExecUpdate) ProtoReflect() protoreflect.Message

func (*ExecUpdate) Reset

func (x *ExecUpdate) Reset()

func (*ExecUpdate) String

func (x *ExecUpdate) String() string

type ExecUpdate_Delta

type ExecUpdate_Delta struct {
	Delta *Delta `protobuf:"bytes,2,opt,name=delta,proto3,oneof"`
}

type ExecUpdate_Record

type ExecUpdate_Record struct {
	Record *LogRecord `protobuf:"bytes,1,opt,name=record,proto3,oneof"`
}

type ExecUpdate_Session

type ExecUpdate_Session struct {
	// The session this execution runs against, sent as the FIRST frame of every Exec stream. It is
	// how a caller learns the uid of a session Exec created for it, and it reports the cursor
	// the turn started from. A successful approval park or approval-bearing no-input recovery
	// also sends a FINAL current Session before OK stream closure. That frame carries the latest
	// cursor and pending approval, when present; use the latest Session and committed record
	// cursors for the next CAS, not the initial frame alone. A pause is not a terminal END/ERROR,
	// and a pending query alone is not proof that compute has been made cold.
	//
	// It is sent before the turn runs, so a failed execution still tells the caller which session
	// it was against. A caller therefore sees this frame BEFORE any error, and must read the
	// stream to completion rather than treating the first receive as the result.
	Session *Session `protobuf:"bytes,3,opt,name=session,proto3,oneof"`
}

type ExecutionStart

type ExecutionStart struct {
	Config        []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	ResumeFromSeq int64  `protobuf:"varint,2,opt,name=resume_from_seq,json=resumeFromSeq,proto3" json:"resume_from_seq,omitempty"` // harness cursor, distinct from the append CAS cursor
	// Expected number of INPUT events for this invocation, always set by new writers (including zero).
	// Replay/resume reject a completed or selected invocation with a missing/negative count or a
	// different committed INPUT count before running the harness. An incomplete trailing invocation
	// is skipped by completed replay. Count-less experimental start markers fail closed; truly
	// markerless legacy executions retain their existing reconstruction behavior.
	InputCount *int64 `protobuf:"varint,3,opt,name=input_count,json=inputCount,proto3,oneof" json:"input_count,omitempty"`
	// Host-resolved registry name used for this execution, not necessarily HarnessDescriptor.id.
	// Interrupted Resume resolves this exact name; absent legacy names use the session harness.
	Harness string `protobuf:"bytes,4,opt,name=harness,proto3" json:"harness,omitempty"`
	// Advertised, opaque harness replay-compatibility version. Empty means unknown/unversioned.
	// When nonempty, controller replay and interrupted resume require an exact served-version
	// match (including rejection of an empty served version) before running the harness.
	// Empty recorded versions retain existing behavior; this field is opt-in, not required.
	HarnessVersion string `protobuf:"bytes,5,opt,name=harness_version,json=harnessVersion,proto3" json:"harness_version,omitempty"`
	// contains filtered or unexported fields
}

ExecutionStart is host-owned invocation state, committed before inputs and harness execution. The host emits it for every new execution, including default-config and inputless turns. Logs without this event reconstruct with empty config and a zero cursor. Older discarded non-empty values cannot be recovered. Config is opaque: preserve bytes verbatim, never parse it.

func (*ExecutionStart) Descriptor deprecated

func (*ExecutionStart) Descriptor() ([]byte, []int)

Deprecated: Use ExecutionStart.ProtoReflect.Descriptor instead.

func (*ExecutionStart) GetConfig

func (x *ExecutionStart) GetConfig() []byte

func (*ExecutionStart) GetHarness

func (x *ExecutionStart) GetHarness() string

func (*ExecutionStart) GetHarnessVersion

func (x *ExecutionStart) GetHarnessVersion() string

func (*ExecutionStart) GetInputCount

func (x *ExecutionStart) GetInputCount() int64

func (*ExecutionStart) GetResumeFromSeq

func (x *ExecutionStart) GetResumeFromSeq() int64

func (*ExecutionStart) ProtoMessage

func (*ExecutionStart) ProtoMessage()

func (*ExecutionStart) ProtoReflect

func (x *ExecutionStart) ProtoReflect() protoreflect.Message

func (*ExecutionStart) Reset

func (x *ExecutionStart) Reset()

func (*ExecutionStart) String

func (x *ExecutionStart) String() string

type FilePart

type FilePart struct {
	Mime string `protobuf:"bytes,1,opt,name=mime,proto3" json:"mime,omitempty"`
	// Types that are valid to be assigned to Source:
	//
	//	*FilePart_Bytes
	//	*FilePart_Uri
	Source isFilePart_Source `protobuf_oneof:"source"`
	Name   string            `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`     // optional display name
	Digest string            `protobuf:"bytes,5,opt,name=digest,proto3" json:"digest,omitempty"` // content digest of the uri target (chain covers externalized bytes)
	// contains filtered or unexported fields
}

FilePart carries binary/media content inline or by reference (A2A file part; MCP resource_link / embedded resource). mime is an IANA media type.

func (*FilePart) Descriptor deprecated

func (*FilePart) Descriptor() ([]byte, []int)

Deprecated: Use FilePart.ProtoReflect.Descriptor instead.

func (*FilePart) GetBytes

func (x *FilePart) GetBytes() []byte

func (*FilePart) GetDigest

func (x *FilePart) GetDigest() string

func (*FilePart) GetMime

func (x *FilePart) GetMime() string

func (*FilePart) GetName

func (x *FilePart) GetName() string

func (*FilePart) GetSource

func (x *FilePart) GetSource() isFilePart_Source

func (*FilePart) GetUri

func (x *FilePart) GetUri() string

func (*FilePart) ProtoMessage

func (*FilePart) ProtoMessage()

func (*FilePart) ProtoReflect

func (x *FilePart) ProtoReflect() protoreflect.Message

func (*FilePart) Reset

func (x *FilePart) Reset()

func (*FilePart) String

func (x *FilePart) String() string

type FilePart_Bytes

type FilePart_Bytes struct {
	Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3,oneof"`
}

type FilePart_Uri

type FilePart_Uri struct {
	Uri string `protobuf:"bytes,3,opt,name=uri,proto3,oneof"`
}

type ForkRequest

type ForkRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// 0 = HEAD. A REQUIRES_MEMORY_SNAPSHOT harness forks by cloning a memory snapshot, which captures
	// RAM as of now, so it accepts only HEAD; a historical seq is FAILED_PRECONDITION.
	AtSeq int64 `protobuf:"varint,2,opt,name=at_seq,json=atSeq,proto3" json:"at_seq,omitempty"`
	Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // fan-out N children; must be 1..128, else INVALID_ARGUMENT
	// Unsupported: per-child principals are not enforced. Any supplied identity, including an empty
	// message, is INVALID_ARGUMENT before placement or mutation. Leave unset to fork.
	Identity *IdentityRef `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
	// Applied to every child instead of the parent's labels; never merged or inherited. Unset or
	// empty gives children an empty label map. The parent's annotations are inherited unchanged.
	Labels map[string]string `` /* 139-byte string literal not displayed */
	// Display names for the children, in the order they are returned. Length must be 0 or exactly
	// count, else INVALID_ARGUMENT.
	//
	// Left unset, a child's name is empty rather than a copy of the parent's. A fork inherits the
	// parent's workload (project, harness, model) because that is what defines the run, but a name is
	// a caller-supplied label the server has no basis to invent. Copying it makes a listing report N+1
	// rows that claim to be the same session, and synthesizing one ("<parent> fork 2") would put a
	// presentation convention in the wire contract and be wrong the moment the same parent is forked
	// by two separate calls. Lineage is already on the child as parent_uid and fork_seq, so a caller
	// that wants a derived label can render one without the server denormalizing it into a string.
	ChildNames []string `protobuf:"bytes,6,rep,name=child_names,json=childNames,proto3" json:"child_names,omitempty"`
	// contains filtered or unexported fields
}

Children inherit the parent's annotations and origin.

func (*ForkRequest) Descriptor deprecated

func (*ForkRequest) Descriptor() ([]byte, []int)

Deprecated: Use ForkRequest.ProtoReflect.Descriptor instead.

func (*ForkRequest) GetAtSeq

func (x *ForkRequest) GetAtSeq() int64

func (*ForkRequest) GetChildNames

func (x *ForkRequest) GetChildNames() []string

func (*ForkRequest) GetCount

func (x *ForkRequest) GetCount() int32

func (*ForkRequest) GetIdentity

func (x *ForkRequest) GetIdentity() *IdentityRef

func (*ForkRequest) GetLabels

func (x *ForkRequest) GetLabels() map[string]string

func (*ForkRequest) GetSession

func (x *ForkRequest) GetSession() string

func (*ForkRequest) ProtoMessage

func (*ForkRequest) ProtoMessage()

func (*ForkRequest) ProtoReflect

func (x *ForkRequest) ProtoReflect() protoreflect.Message

func (*ForkRequest) Reset

func (x *ForkRequest) Reset()

func (*ForkRequest) String

func (x *ForkRequest) String() string

type ForkResponse

type ForkResponse struct {
	Children []*Session `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"`
	// contains filtered or unexported fields
}

func (*ForkResponse) Descriptor deprecated

func (*ForkResponse) Descriptor() ([]byte, []int)

Deprecated: Use ForkResponse.ProtoReflect.Descriptor instead.

func (*ForkResponse) GetChildren

func (x *ForkResponse) GetChildren() []*Session

func (*ForkResponse) ProtoMessage

func (*ForkResponse) ProtoMessage()

func (*ForkResponse) ProtoReflect

func (x *ForkResponse) ProtoReflect() protoreflect.Message

func (*ForkResponse) Reset

func (x *ForkResponse) Reset()

func (*ForkResponse) String

func (x *ForkResponse) String() string

type GetHarnessRequest

type GetHarnessRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Also ask the harness to Describe itself, bounded by a host timeout. The result is in observed
	// or observe_error; a failed Describe does not fail the call.
	Observe bool `protobuf:"varint,2,opt,name=observe,proto3" json:"observe,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHarnessRequest) Descriptor deprecated

func (*GetHarnessRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetHarnessRequest.ProtoReflect.Descriptor instead.

func (*GetHarnessRequest) GetName

func (x *GetHarnessRequest) GetName() string

func (*GetHarnessRequest) GetObserve

func (x *GetHarnessRequest) GetObserve() bool

func (*GetHarnessRequest) ProtoMessage

func (*GetHarnessRequest) ProtoMessage()

func (*GetHarnessRequest) ProtoReflect

func (x *GetHarnessRequest) ProtoReflect() protoreflect.Message

func (*GetHarnessRequest) Reset

func (x *GetHarnessRequest) Reset()

func (*GetHarnessRequest) String

func (x *GetHarnessRequest) String() string

type GetSessionRequest

type GetSessionRequest struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSessionRequest) Descriptor deprecated

func (*GetSessionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.

func (*GetSessionRequest) GetUid

func (x *GetSessionRequest) GetUid() string

func (*GetSessionRequest) ProtoMessage

func (*GetSessionRequest) ProtoMessage()

func (*GetSessionRequest) ProtoReflect

func (x *GetSessionRequest) ProtoReflect() protoreflect.Message

func (*GetSessionRequest) Reset

func (x *GetSessionRequest) Reset()

func (*GetSessionRequest) String

func (x *GetSessionRequest) String() string

type HarnessClient

type HarnessClient interface {
	// Describe returns the static contract; used to match the harness to a runtime.
	Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*HarnessDescriptor, error)
	// Connect drives ONE execution. The host sends Start (and optional control frames). Normally
	// the harness streams Events terminated by exactly one EVENT_END. An unresolved approval
	// instead follows park -> correlated EVENT_PARKED -> stream closure, with no EVENT_END.
	// Durable requests/decisions belong to the host; this protocol applies to STATELESS_REPLAY only.
	// After ACK and actual stream closure, the host closes the invocation connection, performs
	// an external snapshot and commits SUSPEND before reporting a successful live pause. Handoff
	// failures retain the durable request and their actual error; they are not park success.
	Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ControllerFrame, Event], error)
}

HarnessClient is the client API for Harness service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewHarnessClient

func NewHarnessClient(cc grpc.ClientConnInterface) HarnessClient

type HarnessDescriptor

type HarnessDescriptor struct {
	Id           string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Models       []string      `protobuf:"bytes,2,rep,name=models,proto3" json:"models,omitempty"` // model-agnostic: supported/required model ids
	Tools        []*ToolSpec   `protobuf:"bytes,3,rep,name=tools,proto3" json:"tools,omitempty"`
	Capabilities *Capabilities `protobuf:"bytes,4,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	// Stable, opaque implementation replay-compatibility version, owned by the harness author.
	// Change it when deterministic execution or config interpretation changes. Hosts record it
	// in ExecutionStart and compare known recorded versions exactly on replay/recovery.
	// Empty is supported for older/unversioned harnesses and records an unknown version.
	Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*HarnessDescriptor) Descriptor deprecated

func (*HarnessDescriptor) Descriptor() ([]byte, []int)

Deprecated: Use HarnessDescriptor.ProtoReflect.Descriptor instead.

func (*HarnessDescriptor) GetCapabilities

func (x *HarnessDescriptor) GetCapabilities() *Capabilities

func (*HarnessDescriptor) GetId

func (x *HarnessDescriptor) GetId() string

func (*HarnessDescriptor) GetModels

func (x *HarnessDescriptor) GetModels() []string

func (*HarnessDescriptor) GetTools

func (x *HarnessDescriptor) GetTools() []*ToolSpec

func (*HarnessDescriptor) GetVersion

func (x *HarnessDescriptor) GetVersion() string

func (*HarnessDescriptor) ProtoMessage

func (*HarnessDescriptor) ProtoMessage()

func (*HarnessDescriptor) ProtoReflect

func (x *HarnessDescriptor) ProtoReflect() protoreflect.Message

func (*HarnessDescriptor) Reset

func (x *HarnessDescriptor) Reset()

func (*HarnessDescriptor) String

func (x *HarnessDescriptor) String() string

type HarnessEnd

type HarnessEnd struct {
	State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` // COMPLETED | FAILED | CANCELED
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*HarnessEnd) Descriptor deprecated

func (*HarnessEnd) Descriptor() ([]byte, []int)

Deprecated: Use HarnessEnd.ProtoReflect.Descriptor instead.

func (*HarnessEnd) GetError

func (x *HarnessEnd) GetError() *Error

func (*HarnessEnd) GetState

func (x *HarnessEnd) GetState() string

func (*HarnessEnd) ProtoMessage

func (*HarnessEnd) ProtoMessage()

func (*HarnessEnd) ProtoReflect

func (x *HarnessEnd) ProtoReflect() protoreflect.Message

func (*HarnessEnd) Reset

func (x *HarnessEnd) Reset()

func (*HarnessEnd) String

func (x *HarnessEnd) String() string

type HarnessRegistration

type HarnessRegistration struct {

	// metadata.name is the key that Session.harness and ExecRequest.harness refer to. metadata.uid is
	// server-assigned and stays the same across UNCHANGED and REACTIVATED. metadata.project is
	// unused: a registration is host-scoped.
	Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Unset for a STATIC harness, or for a stored registration whose spec this host cannot decode
	// or validate. No partial spec is returned in the latter case; see unservable_reason.
	Spec *HarnessSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// "sha256:" followed by the lowercase hex SHA-256 of the RFC 8785 (JCS) form of the
	// originally stored spec's proto3-JSON mapping, with proto field names, enum names, and
	// unpopulated fields omitted. This is the same canonical form the journal hashes. Empty for a
	// STATIC harness. Preserved when spec is unset for an undecodable registration: this host
	// cannot recompute the original digest without understanding the complete spec.
	SpecDigest string        `protobuf:"bytes,3,opt,name=spec_digest,json=specDigest,proto3" json:"spec_digest,omitempty"`
	State      HarnessState  `protobuf:"varint,4,opt,name=state,proto3,enum=agentsessions.v1.HarnessState" json:"state,omitempty"`
	Source     HarnessSource `protobuf:"varint,5,opt,name=source,proto3,enum=agentsessions.v1.HarnessSource" json:"source,omitempty"`
	// Set while RETIRED: when the harness was first retired.
	RetireTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=retire_time,json=retireTime,proto3" json:"retire_time,omitempty"`
	// Set while RETIRED: the reason given when the harness was first retired.
	RetireReason string `protobuf:"bytes,7,opt,name=retire_reason,json=retireReason,proto3" json:"retire_reason,omitempty"`
	// Set only when GetHarnessRequest.observe is true and Describe succeeded: what the harness
	// reported just now. Never stored.
	Observed *HarnessDescriptor `protobuf:"bytes,8,opt,name=observed,proto3" json:"observed,omitempty"`
	// Set only when GetHarnessRequest.observe is true: why this host cannot serve the harness
	// (isolated or not loaded), or why Describe failed. Never stored.
	ObserveError string `protobuf:"bytes,9,opt,name=observe_error,json=observeError,proto3" json:"observe_error,omitempty"`
	// Nonempty if this host cannot serve a stored registration. The row remains visible and its
	// name reserved in the journal, ACTIVE or RETIRED. A registration isolated during this host's
	// startup load remains known locally; Sessions operations needing it fail FAILED_PRECONDITION.
	// A row added by another host after startup is visible here but unknown to this host's Sessions
	// routing until restart or a local RegisterHarness with the identical compatible spec; selecting
	// it for Create or auto-create Exec fails INVALID_ARGUMENT until loaded. For a RETIRED row,
	// restart this host to serve its existing sessions without reactivating it: RegisterHarness
	// reactivates the row for every host sharing the journal. A pending recorded Resume can still
	// fail FAILED_PRECONDITION under the existing recovery rule. Strict decoding
	// refuses unsupported stored fields and enum values, rather than accepting a partial spec.
	// This is a host-local status, never stored: another compatible host may serve the same row.
	// Do not match on this human-readable explanation.
	UnservableReason string `protobuf:"bytes,10,opt,name=unservable_reason,json=unservableReason,proto3" json:"unservable_reason,omitempty"`
	// contains filtered or unexported fields
}

HarnessRegistration is one entry in the host's harness registry.

func (*HarnessRegistration) Descriptor deprecated

func (*HarnessRegistration) Descriptor() ([]byte, []int)

Deprecated: Use HarnessRegistration.ProtoReflect.Descriptor instead.

func (*HarnessRegistration) GetMetadata

func (x *HarnessRegistration) GetMetadata() *ResourceMetadata

func (*HarnessRegistration) GetObserveError

func (x *HarnessRegistration) GetObserveError() string

func (*HarnessRegistration) GetObserved

func (x *HarnessRegistration) GetObserved() *HarnessDescriptor

func (*HarnessRegistration) GetRetireReason

func (x *HarnessRegistration) GetRetireReason() string

func (*HarnessRegistration) GetRetireTime

func (x *HarnessRegistration) GetRetireTime() *timestamppb.Timestamp

func (*HarnessRegistration) GetSource

func (x *HarnessRegistration) GetSource() HarnessSource

func (*HarnessRegistration) GetSpec

func (x *HarnessRegistration) GetSpec() *HarnessSpec

func (*HarnessRegistration) GetSpecDigest

func (x *HarnessRegistration) GetSpecDigest() string

func (*HarnessRegistration) GetState

func (x *HarnessRegistration) GetState() HarnessState

func (*HarnessRegistration) GetUnservableReason

func (x *HarnessRegistration) GetUnservableReason() string

func (*HarnessRegistration) ProtoMessage

func (*HarnessRegistration) ProtoMessage()

func (*HarnessRegistration) ProtoReflect

func (x *HarnessRegistration) ProtoReflect() protoreflect.Message

func (*HarnessRegistration) Reset

func (x *HarnessRegistration) Reset()

func (*HarnessRegistration) String

func (x *HarnessRegistration) String() string

type HarnessRegistryClient

type HarnessRegistryClient interface {
	// Returns CREATED, UNCHANGED or REACTIVATED. ALREADY_EXISTS when the name holds a different spec,
	// or is taken by or reserved for a STATIC harness. FAILED_PRECONDITION when the host cannot serve
	// a new placement. An identical repeat of a registration isolated during startup returns
	// UNCHANGED or REACTIVATED with unservable_reason set; it does not claim this host serves it.
	// An identical compatible repeat of a row added since startup can load it locally without restart.
	// Repeating a RETIRED registration reactivates it for every host sharing the journal; restart the
	// host instead to serve only its existing sessions without reactivation.
	RegisterHarness(ctx context.Context, in *RegisterHarnessRequest, opts ...grpc.CallOption) (*RegisterHarnessResponse, error)
	// NOT_FOUND for a name that is neither STATIC nor registered.
	GetHarness(ctx context.Context, in *GetHarnessRequest, opts ...grpc.CallOption) (*HarnessRegistration, error)
	ListHarnesses(ctx context.Context, in *ListHarnessesRequest, opts ...grpc.CallOption) (*ListHarnessesResponse, error)
	// Idempotent: retiring a RETIRED harness returns it unchanged. FAILED_PRECONDITION for a STATIC
	// harness; NOT_FOUND for an unknown name.
	RetireHarness(ctx context.Context, in *RetireHarnessRequest, opts ...grpc.CallOption) (*HarnessRegistration, error)
}

HarnessRegistryClient is the client API for HarnessRegistry service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

HarnessRegistry manages the harnesses a host can place sessions on. It is an admin API: a caller that can register a harness decides where the host sends session history and whose model calls it pays for. Keep it off the Sessions listener and control access to it. See docs/security.md#operator-access for operator setup and CLI usage.

type HarnessRegistryServer

type HarnessRegistryServer interface {
	// Returns CREATED, UNCHANGED or REACTIVATED. ALREADY_EXISTS when the name holds a different spec,
	// or is taken by or reserved for a STATIC harness. FAILED_PRECONDITION when the host cannot serve
	// a new placement. An identical repeat of a registration isolated during startup returns
	// UNCHANGED or REACTIVATED with unservable_reason set; it does not claim this host serves it.
	// An identical compatible repeat of a row added since startup can load it locally without restart.
	// Repeating a RETIRED registration reactivates it for every host sharing the journal; restart the
	// host instead to serve only its existing sessions without reactivation.
	RegisterHarness(context.Context, *RegisterHarnessRequest) (*RegisterHarnessResponse, error)
	// NOT_FOUND for a name that is neither STATIC nor registered.
	GetHarness(context.Context, *GetHarnessRequest) (*HarnessRegistration, error)
	ListHarnesses(context.Context, *ListHarnessesRequest) (*ListHarnessesResponse, error)
	// Idempotent: retiring a RETIRED harness returns it unchanged. FAILED_PRECONDITION for a STATIC
	// harness; NOT_FOUND for an unknown name.
	RetireHarness(context.Context, *RetireHarnessRequest) (*HarnessRegistration, error)
	// contains filtered or unexported methods
}

HarnessRegistryServer is the server API for HarnessRegistry service. All implementations must embed UnimplementedHarnessRegistryServer for forward compatibility.

HarnessRegistry manages the harnesses a host can place sessions on. It is an admin API: a caller that can register a harness decides where the host sends session history and whose model calls it pays for. Keep it off the Sessions listener and control access to it. See docs/security.md#operator-access for operator setup and CLI usage.

type HarnessServer

type HarnessServer interface {
	// Describe returns the static contract; used to match the harness to a runtime.
	Describe(context.Context, *DescribeRequest) (*HarnessDescriptor, error)
	// Connect drives ONE execution. The host sends Start (and optional control frames). Normally
	// the harness streams Events terminated by exactly one EVENT_END. An unresolved approval
	// instead follows park -> correlated EVENT_PARKED -> stream closure, with no EVENT_END.
	// Durable requests/decisions belong to the host; this protocol applies to STATELESS_REPLAY only.
	// After ACK and actual stream closure, the host closes the invocation connection, performs
	// an external snapshot and commits SUSPEND before reporting a successful live pause. Handoff
	// failures retain the durable request and their actual error; they are not park success.
	Connect(grpc.BidiStreamingServer[ControllerFrame, Event]) error
	// contains filtered or unexported methods
}

HarnessServer is the server API for Harness service. All implementations must embed UnimplementedHarnessServer for forward compatibility.

type HarnessSource

type HarnessSource int32
const (
	HarnessSource_HARNESS_SOURCE_UNSPECIFIED HarnessSource = 0
	// Built into the host or configured when it started. Never stored, always ACTIVE, and read-only
	// through this API: its name cannot be registered or retired.
	HarnessSource_HARNESS_SOURCE_STATIC HarnessSource = 1
	// Created through RegisterHarness and stored in the host's journal database.
	HarnessSource_HARNESS_SOURCE_REGISTERED HarnessSource = 2
)

func (HarnessSource) Descriptor

func (HarnessSource) Enum

func (x HarnessSource) Enum() *HarnessSource

func (HarnessSource) EnumDescriptor deprecated

func (HarnessSource) EnumDescriptor() ([]byte, []int)

Deprecated: Use HarnessSource.Descriptor instead.

func (HarnessSource) Number

func (HarnessSource) String

func (x HarnessSource) String() string

func (HarnessSource) Type

type HarnessSpec

type HarnessSpec struct {

	// Exactly one is required.
	//
	// Types that are valid to be assigned to Placement:
	//
	//	*HarnessSpec_Remote
	//	*HarnessSpec_Substrate
	Placement isHarnessSpec_Placement `protobuf_oneof:"placement"`
	// The contract the harness declares. resumability is required. Placement still gates every turn
	// on the capabilities the harness reports through Describe.
	Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	// Expected HarnessDescriptor.id. When set, Exec, Resume and Fork are refused with
	// FAILED_PRECONDITION, before anything is journaled, if the harness's Describe reports a different
	// id. It is checked on every call, not at registration. Empty means not checked. The id is what
	// the harness reports about itself, so this catches an address that reaches the wrong harness; it
	// is not authentication.
	DescriptorId string `protobuf:"bytes,4,opt,name=descriptor_id,json=descriptorId,proto3" json:"descriptor_id,omitempty"`
	// contains filtered or unexported fields
}

HarnessSpec is everything that decides what a session on this harness runs. It is the only input to spec_digest, so nothing descriptive (labels, operation ids, timestamps) belongs here.

func (*HarnessSpec) Descriptor deprecated

func (*HarnessSpec) Descriptor() ([]byte, []int)

Deprecated: Use HarnessSpec.ProtoReflect.Descriptor instead.

func (*HarnessSpec) GetCapabilities

func (x *HarnessSpec) GetCapabilities() *Capabilities

func (*HarnessSpec) GetDescriptorId

func (x *HarnessSpec) GetDescriptorId() string

func (*HarnessSpec) GetPlacement

func (x *HarnessSpec) GetPlacement() isHarnessSpec_Placement

func (*HarnessSpec) GetRemote

func (x *HarnessSpec) GetRemote() *RemotePlacement

func (*HarnessSpec) GetSubstrate

func (x *HarnessSpec) GetSubstrate() *SubstratePlacement

func (*HarnessSpec) ProtoMessage

func (*HarnessSpec) ProtoMessage()

func (*HarnessSpec) ProtoReflect

func (x *HarnessSpec) ProtoReflect() protoreflect.Message

func (*HarnessSpec) Reset

func (x *HarnessSpec) Reset()

func (*HarnessSpec) String

func (x *HarnessSpec) String() string

type HarnessSpec_Remote

type HarnessSpec_Remote struct {
	Remote *RemotePlacement `protobuf:"bytes,1,opt,name=remote,proto3,oneof"`
}

type HarnessSpec_Substrate

type HarnessSpec_Substrate struct {
	Substrate *SubstratePlacement `protobuf:"bytes,2,opt,name=substrate,proto3,oneof"`
}

type HarnessState

type HarnessState int32
const (
	HarnessState_HARNESS_STATE_UNSPECIFIED HarnessState = 0
	// New sessions may select it.
	HarnessState_HARNESS_STATE_ACTIVE HarnessState = 1
	// New sessions are refused with FAILED_PRECONDITION. Existing sessions keep Exec, Resume, Suspend
	// and Fork; fork children inherit the harness and are not new selections.
	HarnessState_HARNESS_STATE_RETIRED HarnessState = 2
)

func (HarnessState) Descriptor

func (HarnessState) Enum

func (x HarnessState) Enum() *HarnessState

func (HarnessState) EnumDescriptor deprecated

func (HarnessState) EnumDescriptor() ([]byte, []int)

Deprecated: Use HarnessState.Descriptor instead.

func (HarnessState) Number

func (HarnessState) String

func (x HarnessState) String() string

func (HarnessState) Type

type Harness_ConnectClient

type Harness_ConnectClient = grpc.BidiStreamingClient[ControllerFrame, Event]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Harness_ConnectServer

type Harness_ConnectServer = grpc.BidiStreamingServer[ControllerFrame, Event]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type IdentityContext

type IdentityContext struct {
	Principal     *IdentityRef `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
	CanMintTokens bool         `protobuf:"varint,2,opt,name=can_mint_tokens,json=canMintTokens,proto3" json:"can_mint_tokens,omitempty"`
	// contains filtered or unexported fields
}

IdentityContext carries the principal and signals whether the harness may mint scoped, delegated tokens (Transaction Tokens) via the host for tool calls.

func (*IdentityContext) Descriptor deprecated

func (*IdentityContext) Descriptor() ([]byte, []int)

Deprecated: Use IdentityContext.ProtoReflect.Descriptor instead.

func (*IdentityContext) GetCanMintTokens

func (x *IdentityContext) GetCanMintTokens() bool

func (*IdentityContext) GetPrincipal

func (x *IdentityContext) GetPrincipal() *IdentityRef

func (*IdentityContext) ProtoMessage

func (*IdentityContext) ProtoMessage()

func (*IdentityContext) ProtoReflect

func (x *IdentityContext) ProtoReflect() protoreflect.Message

func (*IdentityContext) Reset

func (x *IdentityContext) Reset()

func (*IdentityContext) String

func (x *IdentityContext) String() string

type IdentityRef

type IdentityRef struct {
	Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
	Issuer    string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"`
	Subject   string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` // session-scoped sub
	// contains filtered or unexported fields
}

IdentityRef is the bound agent principal. OIDC-neutral: an Entra Agent ID is one issuer; a SPIFFE ID or a GitHub App identity are others. Carried on every event.

func (*IdentityRef) Descriptor deprecated

func (*IdentityRef) Descriptor() ([]byte, []int)

Deprecated: Use IdentityRef.ProtoReflect.Descriptor instead.

func (*IdentityRef) GetIssuer

func (x *IdentityRef) GetIssuer() string

func (*IdentityRef) GetPrincipal

func (x *IdentityRef) GetPrincipal() string

func (*IdentityRef) GetSubject

func (x *IdentityRef) GetSubject() string

func (*IdentityRef) ProtoMessage

func (*IdentityRef) ProtoMessage()

func (*IdentityRef) ProtoReflect

func (x *IdentityRef) ProtoReflect() protoreflect.Message

func (*IdentityRef) Reset

func (x *IdentityRef) Reset()

func (*IdentityRef) String

func (x *IdentityRef) String() string

type Lifecycle

type Lifecycle struct {
	Kind   Lifecycle_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=agentsessions.v1.Lifecycle_Kind" json:"kind,omitempty"`
	Detail string         `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` // e.g. "fork parent=<uid>@<seq>", baseline id
	// SnapshotRef captured on SUSPEND (§5.1), carried inline (mirroring the canonical api.SnapshotRef)
	// so it rides the tamper-evident chain with no side table and no cross-file message dependency.
	// This is distinct from the aspirational session-status message SnapshotRef in session.proto. A
	// filesystem-only backend sets only snapshot_local (the session handle to replay) with
	// snapshot_memory=false; a memory backend also sets snapshot_external_uri.
	SnapshotLocal       string `protobuf:"bytes,3,opt,name=snapshot_local,json=snapshotLocal,proto3" json:"snapshot_local,omitempty"`
	SnapshotExternalUri string `protobuf:"bytes,4,opt,name=snapshot_external_uri,json=snapshotExternalUri,proto3" json:"snapshot_external_uri,omitempty"`
	SnapshotMemory      bool   `protobuf:"varint,5,opt,name=snapshot_memory,json=snapshotMemory,proto3" json:"snapshot_memory,omitempty"`
	SnapshotSealed      bool   `protobuf:"varint,6,opt,name=snapshot_sealed,json=snapshotSealed,proto3" json:"snapshot_sealed,omitempty"`
	// contains filtered or unexported fields
}

Lifecycle marks a compute/session transition in the log (§7). BASELINE is a replay / compaction checkpoint (§1).

func (*Lifecycle) Descriptor deprecated

func (*Lifecycle) Descriptor() ([]byte, []int)

Deprecated: Use Lifecycle.ProtoReflect.Descriptor instead.

func (*Lifecycle) GetDetail

func (x *Lifecycle) GetDetail() string

func (*Lifecycle) GetKind

func (x *Lifecycle) GetKind() Lifecycle_Kind

func (*Lifecycle) GetSnapshotExternalUri

func (x *Lifecycle) GetSnapshotExternalUri() string

func (*Lifecycle) GetSnapshotLocal

func (x *Lifecycle) GetSnapshotLocal() string

func (*Lifecycle) GetSnapshotMemory

func (x *Lifecycle) GetSnapshotMemory() bool

func (*Lifecycle) GetSnapshotSealed

func (x *Lifecycle) GetSnapshotSealed() bool

func (*Lifecycle) ProtoMessage

func (*Lifecycle) ProtoMessage()

func (*Lifecycle) ProtoReflect

func (x *Lifecycle) ProtoReflect() protoreflect.Message

func (*Lifecycle) Reset

func (x *Lifecycle) Reset()

func (*Lifecycle) String

func (x *Lifecycle) String() string

type Lifecycle_Kind

type Lifecycle_Kind int32
const (
	Lifecycle_LIFECYCLE_UNSPECIFIED Lifecycle_Kind = 0
	Lifecycle_LIFECYCLE_SUSPEND     Lifecycle_Kind = 1
	Lifecycle_LIFECYCLE_RESUME      Lifecycle_Kind = 2
	Lifecycle_LIFECYCLE_FORK        Lifecycle_Kind = 3
	Lifecycle_LIFECYCLE_BASELINE    Lifecycle_Kind = 4
	Lifecycle_LIFECYCLE_CANCEL      Lifecycle_Kind = 5
	// Host-owned, session-scoped permanent deletion intent (empty Event.execution_id).
	// It fences writes but does not terminate compute or confirm resource reclamation.
	Lifecycle_LIFECYCLE_DELETE Lifecycle_Kind = 6
)

func (Lifecycle_Kind) Descriptor

func (Lifecycle_Kind) Enum

func (x Lifecycle_Kind) Enum() *Lifecycle_Kind

func (Lifecycle_Kind) EnumDescriptor deprecated

func (Lifecycle_Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Lifecycle_Kind.Descriptor instead.

func (Lifecycle_Kind) Number

func (Lifecycle_Kind) String

func (x Lifecycle_Kind) String() string

func (Lifecycle_Kind) Type

type ListHarnessesRequest

type ListHarnessesRequest struct {

	// Maximum entries per page. 0 means 50; values above 500 are clamped to 500. Negative is
	// INVALID_ARGUMENT.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Opaque cursor from a prior ListHarnessesResponse.next_page_token. Empty means the first page.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Include RETIRED entries. STATIC entries are always included.
	IncludeRetired bool `protobuf:"varint,3,opt,name=include_retired,json=includeRetired,proto3" json:"include_retired,omitempty"`
	// contains filtered or unexported fields
}

func (*ListHarnessesRequest) Descriptor deprecated

func (*ListHarnessesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListHarnessesRequest.ProtoReflect.Descriptor instead.

func (*ListHarnessesRequest) GetIncludeRetired

func (x *ListHarnessesRequest) GetIncludeRetired() bool

func (*ListHarnessesRequest) GetPageSize

func (x *ListHarnessesRequest) GetPageSize() int32

func (*ListHarnessesRequest) GetPageToken

func (x *ListHarnessesRequest) GetPageToken() string

func (*ListHarnessesRequest) ProtoMessage

func (*ListHarnessesRequest) ProtoMessage()

func (*ListHarnessesRequest) ProtoReflect

func (x *ListHarnessesRequest) ProtoReflect() protoreflect.Message

func (*ListHarnessesRequest) Reset

func (x *ListHarnessesRequest) Reset()

func (*ListHarnessesRequest) String

func (x *ListHarnessesRequest) String() string

type ListHarnessesResponse

type ListHarnessesResponse struct {

	// In name order, STATIC and REGISTERED entries together.
	Harnesses []*HarnessRegistration `protobuf:"bytes,1,rep,name=harnesses,proto3" json:"harnesses,omitempty"`
	// Empty on the last page.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListHarnessesResponse) Descriptor deprecated

func (*ListHarnessesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListHarnessesResponse.ProtoReflect.Descriptor instead.

func (*ListHarnessesResponse) GetHarnesses

func (x *ListHarnessesResponse) GetHarnesses() []*HarnessRegistration

func (*ListHarnessesResponse) GetNextPageToken

func (x *ListHarnessesResponse) GetNextPageToken() string

func (*ListHarnessesResponse) ProtoMessage

func (*ListHarnessesResponse) ProtoMessage()

func (*ListHarnessesResponse) ProtoReflect

func (x *ListHarnessesResponse) ProtoReflect() protoreflect.Message

func (*ListHarnessesResponse) Reset

func (x *ListHarnessesResponse) Reset()

func (*ListHarnessesResponse) String

func (x *ListHarnessesResponse) String() string

type ListSessionsRequest

type ListSessionsRequest struct {
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // tenant / namespace; exact-match filter, not a prefix or wildcard
	// Maximum sessions to return. 0 = the server default; a value above the server maximum is
	// clamped rather than rejected.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Opaque cursor taken verbatim from a prior ListSessionsResponse.next_page_token. Empty = first
	// page. A token the server cannot parse is INVALID_ARGUMENT, never a silent restart from page 1.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

ListSessions enumerates ACTIVE sessions from the durable store, including sessions that have no events and no live incarnation yet. Permanently tombstoned UIDs are hidden before pagination. Paging is keyset over (create_time DESC, uid ASC), which is stable when a session is created mid-pagination; an offset would skip or repeat rows.

func (*ListSessionsRequest) Descriptor deprecated

func (*ListSessionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.

func (*ListSessionsRequest) GetPageSize

func (x *ListSessionsRequest) GetPageSize() int32

func (*ListSessionsRequest) GetPageToken

func (x *ListSessionsRequest) GetPageToken() string

func (*ListSessionsRequest) GetProject

func (x *ListSessionsRequest) GetProject() string

func (*ListSessionsRequest) ProtoMessage

func (*ListSessionsRequest) ProtoMessage()

func (*ListSessionsRequest) ProtoReflect

func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message

func (*ListSessionsRequest) Reset

func (x *ListSessionsRequest) Reset()

func (*ListSessionsRequest) String

func (x *ListSessionsRequest) String() string

type ListSessionsResponse

type ListSessionsResponse struct {
	Sessions      []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
	NextPageToken string     `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty on the last page
	// contains filtered or unexported fields
}

func (*ListSessionsResponse) Descriptor deprecated

func (*ListSessionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.

func (*ListSessionsResponse) GetNextPageToken

func (x *ListSessionsResponse) GetNextPageToken() string

func (*ListSessionsResponse) GetSessions

func (x *ListSessionsResponse) GetSessions() []*Session

func (*ListSessionsResponse) ProtoMessage

func (*ListSessionsResponse) ProtoMessage()

func (*ListSessionsResponse) ProtoReflect

func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message

func (*ListSessionsResponse) Reset

func (x *ListSessionsResponse) Reset()

func (*ListSessionsResponse) String

func (x *ListSessionsResponse) String() string

type LogRecord

type LogRecord struct {
	Seq         int64  `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
	PrevHash    string `protobuf:"bytes,2,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	ContentHash string `protobuf:"bytes,3,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"`
	Fence       int64  `protobuf:"varint,4,opt,name=fence,proto3" json:"fence,omitempty"`
	Event       *Event `protobuf:"bytes,5,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

LogRecord is the host's durable, ordered wrapper around an Event. The host assigns seq, links the hash-chain (content_hash = H(prev_hash || seq || canonical(event)); at a fork child.first.prev_hash = parent@R.content_hash), and records the incarnation fence token. Externalized payloads (FilePart.uri, ReasoningPart.opaque_uri, ToolResult.output_uri) carry their own content digest so the chain covers them by reference.

func (*LogRecord) Descriptor deprecated

func (*LogRecord) Descriptor() ([]byte, []int)

Deprecated: Use LogRecord.ProtoReflect.Descriptor instead.

func (*LogRecord) GetContentHash

func (x *LogRecord) GetContentHash() string

func (*LogRecord) GetEvent

func (x *LogRecord) GetEvent() *Event

func (*LogRecord) GetFence

func (x *LogRecord) GetFence() int64

func (*LogRecord) GetPrevHash

func (x *LogRecord) GetPrevHash() string

func (*LogRecord) GetSeq

func (x *LogRecord) GetSeq() int64

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) ProtoReflect

func (x *LogRecord) ProtoReflect() protoreflect.Message

func (*LogRecord) Reset

func (x *LogRecord) Reset()

func (*LogRecord) String

func (x *LogRecord) String() string

type Mediation

type Mediation int32

Mediation controls how a tool call is executed / who enforces record-before-effect (§3).

const (
	Mediation_MEDIATION_UNSPECIFIED         Mediation = 0
	Mediation_MEDIATION_IN_HARNESS_REPORTED Mediation = 1 // harness runs it, reports for audit (cooperative WAL)
	Mediation_MEDIATION_CONTROLLER_MEDIATED Mediation = 2 // host/gateway executes (host-enforced WAL; trustless)
	// Host-owned durable approval gate for STATELESS_REPLAY only. The harness emits a tool call,
	// then awaits a decision/receipt or park control frame; it never executes the effect itself.
	// REQUIRES_MEMORY_SNAPSHOT is unsupported for this gate and fails closed before the effect.
	Mediation_MEDIATION_REQUIRES_APPROVAL Mediation = 3
)

func (Mediation) Descriptor

func (Mediation) Descriptor() protoreflect.EnumDescriptor

func (Mediation) Enum

func (x Mediation) Enum() *Mediation

func (Mediation) EnumDescriptor deprecated

func (Mediation) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mediation.Descriptor instead.

func (Mediation) Number

func (x Mediation) Number() protoreflect.EnumNumber

func (Mediation) String

func (x Mediation) String() string

func (Mediation) Type

type Message

type Message struct {
	Role  string  `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` // system, user, assistant, or tool
	Parts []*Part `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"`
	// contains filtered or unexported fields
}

Message is a role-tagged sequence of content parts (A2A Message = role + Part[]).

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetParts

func (x *Message) GetParts() []*Part

func (*Message) GetRole

func (x *Message) GetRole() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type ModelCall

type ModelCall struct {
	Model     string            `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	Params    map[string]string ``                                                                                         /* 139-byte string literal not displayed */
	InputHash string            `protobuf:"bytes,3,opt,name=input_hash,json=inputHash,proto3" json:"input_hash,omitempty"` // §7/§9.1: required for STATELESS_REPLAY so the I0 check can run
	Id        string            `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`                                // correlation id for the served ModelResult
	// messages is the request context the host needs to INVOKE the model on the live path. It is
	// wire-only: the host records the call with input_hash alone (messages stripped), since the
	// recorded form only needs the hash to re-check I0 on replay.
	Messages []*Message `protobuf:"bytes,5,rep,name=messages,proto3" json:"messages,omitempty"`
	// tools are the definitions offered to the model on this call. Wire-only like messages: the
	// recorded form keeps input_hash, which covers them.
	Tools []*ToolDefinition `protobuf:"bytes,6,rep,name=tools,proto3" json:"tools,omitempty"`
	// tool_choice constrains whether and which tool the model calls. Wire-only like messages and
	// covered by input_hash. Unset means the provider default.
	ToolChoice *ToolChoice `protobuf:"bytes,7,opt,name=tool_choice,json=toolChoice,proto3" json:"tool_choice,omitempty"`
	// contains filtered or unexported fields
}

ModelCall is a model REQUEST emitted by the harness (EVENT_MODEL_CALL). The host records it with input_hash and answers via ControllerFrame.ModelResult (correlated by id). The completion (text, reasoning, and tool_call parts) is recorded separately as an EVENT_OUTPUT message. Under STATELESS_REPLAY the harness never calls a provider directly.

func (*ModelCall) Descriptor deprecated

func (*ModelCall) Descriptor() ([]byte, []int)

Deprecated: Use ModelCall.ProtoReflect.Descriptor instead.

func (*ModelCall) GetId

func (x *ModelCall) GetId() string

func (*ModelCall) GetInputHash

func (x *ModelCall) GetInputHash() string

func (*ModelCall) GetMessages

func (x *ModelCall) GetMessages() []*Message

func (*ModelCall) GetModel

func (x *ModelCall) GetModel() string

func (*ModelCall) GetParams

func (x *ModelCall) GetParams() map[string]string

func (*ModelCall) GetToolChoice

func (x *ModelCall) GetToolChoice() *ToolChoice

func (*ModelCall) GetTools

func (x *ModelCall) GetTools() []*ToolDefinition

func (*ModelCall) ProtoMessage

func (*ModelCall) ProtoMessage()

func (*ModelCall) ProtoReflect

func (x *ModelCall) ProtoReflect() protoreflect.Message

func (*ModelCall) Reset

func (x *ModelCall) Reset()

func (*ModelCall) String

func (x *ModelCall) String() string

type ModelResult

type ModelResult struct {
	Message     *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Usage       *Usage   `protobuf:"bytes,2,opt,name=usage,proto3" json:"usage,omitempty"`
	ModelCallId string   `protobuf:"bytes,3,opt,name=model_call_id,json=modelCallId,proto3" json:"model_call_id,omitempty"` // correlates to the emitted ModelCall.id
	// contains filtered or unexported fields
}

ModelResult is a model completion served to the harness (live invocation or replay). The Message carries text, opaque reasoning, and tool_call parts, recorded verbatim for continuity.

func (*ModelResult) Descriptor deprecated

func (*ModelResult) Descriptor() ([]byte, []int)

Deprecated: Use ModelResult.ProtoReflect.Descriptor instead.

func (*ModelResult) GetMessage

func (x *ModelResult) GetMessage() *Message

func (*ModelResult) GetModelCallId

func (x *ModelResult) GetModelCallId() string

func (*ModelResult) GetUsage

func (x *ModelResult) GetUsage() *Usage

func (*ModelResult) ProtoMessage

func (*ModelResult) ProtoMessage()

func (*ModelResult) ProtoReflect

func (x *ModelResult) ProtoReflect() protoreflect.Message

func (*ModelResult) Reset

func (x *ModelResult) Reset()

func (*ModelResult) String

func (x *ModelResult) String() string

type Origin

type Origin struct {
	Source     string            `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	Subject    string            `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	Uri        string            `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
	Attributes map[string]string `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

Origin is the neutral external context a session is tied to. Producer adapters (GitHub, Foundry, custom apps) fill it. Modeled on CloudEvents source/subject.

func (*Origin) Descriptor deprecated

func (*Origin) Descriptor() ([]byte, []int)

Deprecated: Use Origin.ProtoReflect.Descriptor instead.

func (*Origin) GetAttributes

func (x *Origin) GetAttributes() map[string]string

func (*Origin) GetSource

func (x *Origin) GetSource() string

func (*Origin) GetSubject

func (x *Origin) GetSubject() string

func (*Origin) GetUri

func (x *Origin) GetUri() string

func (*Origin) ProtoMessage

func (*Origin) ProtoMessage()

func (*Origin) ProtoReflect

func (x *Origin) ProtoReflect() protoreflect.Message

func (*Origin) Reset

func (x *Origin) Reset()

func (*Origin) String

func (x *Origin) String() string

type Part

type Part struct {

	// Types that are valid to be assigned to Part:
	//
	//	*Part_Text
	//	*Part_File
	//	*Part_Data
	//	*Part_Reasoning
	//	*Part_ToolCall
	//	*Part_ToolResult
	Part isPart_Part `protobuf_oneof:"part"`
	// contains filtered or unexported fields
}

Part is one unit of message content. Text, file (inline or URI), structured data, or an opaque reasoning block. Large payloads are externalized by URI, never inlined (§8).

func (*Part) Descriptor deprecated

func (*Part) Descriptor() ([]byte, []int)

Deprecated: Use Part.ProtoReflect.Descriptor instead.

func (*Part) GetData

func (x *Part) GetData() *DataPart

func (*Part) GetFile

func (x *Part) GetFile() *FilePart

func (*Part) GetPart

func (x *Part) GetPart() isPart_Part

func (*Part) GetReasoning

func (x *Part) GetReasoning() *ReasoningPart

func (*Part) GetText

func (x *Part) GetText() *TextPart

func (*Part) GetToolCall

func (x *Part) GetToolCall() *ToolCall

func (*Part) GetToolResult

func (x *Part) GetToolResult() *ToolResult

func (*Part) ProtoMessage

func (*Part) ProtoMessage()

func (*Part) ProtoReflect

func (x *Part) ProtoReflect() protoreflect.Message

func (*Part) Reset

func (x *Part) Reset()

func (*Part) String

func (x *Part) String() string

type Part_Data

type Part_Data struct {
	Data *DataPart `protobuf:"bytes,3,opt,name=data,proto3,oneof"`
}

type Part_File

type Part_File struct {
	File *FilePart `protobuf:"bytes,2,opt,name=file,proto3,oneof"`
}

type Part_Reasoning

type Part_Reasoning struct {
	Reasoning *ReasoningPart `protobuf:"bytes,4,opt,name=reasoning,proto3,oneof"`
}

type Part_Text

type Part_Text struct {
	Text *TextPart `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type Part_ToolCall

type Part_ToolCall struct {
	// tool_call is a model's request to call a tool, carried in an assistant message. It reuses
	// ToolCall so one id runs from the model output through EVENT_TOOL_CALL / EVENT_TOOL_RESULT to the
	// next model input. On a model output, mediation and idempotency_key are unset; to execute the
	// call, the harness sets them on a copy and never changes the recorded output's ToolCall.
	ToolCall *ToolCall `protobuf:"bytes,5,opt,name=tool_call,json=toolCall,proto3,oneof"`
}

type Part_ToolResult

type Part_ToolResult struct {
	// tool_result is a tool's result fed back to the model, carried in a message with role "tool".
	// ToolResult.id is the id of the ToolCall it answers.
	ToolResult *ToolResult `protobuf:"bytes,6,opt,name=tool_result,json=toolResult,proto3,oneof"`
}

type ReasoningPart

type ReasoningPart struct {
	Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`              // "anthropic" | "openai" | "google" — routing + validation
	ModelId  string `protobuf:"bytes,2,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` // model that produced it (cross-model resend case)
	// Types that are valid to be assigned to Opaque:
	//
	//	*ReasoningPart_OpaqueBytes
	//	*ReasoningPart_OpaqueUri
	Opaque        isReasoningPart_Opaque `protobuf_oneof:"opaque"`
	Summary       []*Part                `protobuf:"bytes,5,rep,name=summary,proto3" json:"summary,omitempty"`                                  // optional, NON-authoritative, compaction-droppable (may be multimodal)
	ItemId        string                 `protobuf:"bytes,6,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`                      // optional provider id (e.g. OpenAI rs_...) for dedup/order
	Ordinal       int32                  `protobuf:"varint,7,opt,name=ordinal,proto3" json:"ordinal,omitempty"`                                 // position within the turn relative to text/tool parts
	ValidityScope string                 `protobuf:"bytes,8,opt,name=validity_scope,json=validityScope,proto3" json:"validity_scope,omitempty"` // = execution_id (turn); see replay contract §5
	OpaqueDigest  string                 `protobuf:"bytes,9,opt,name=opaque_digest,json=opaqueDigest,proto3" json:"opaque_digest,omitempty"`    // content digest of opaque_uri target (chain covers externalized bytes)
	// contains filtered or unexported fields
}

ReasoningPart is an opaque, provider-tagged reasoning block that MUST be replayed verbatim to preserve reasoning continuity within a turn (I2). agentsessions never interprets `opaque` — all provider specifics live inside it. Verified across Anthropic/OpenAI/Gemini in the Track A reasoning-continuity spike: one part type, no per-provider sub-shapes, and no memory-snapshot edge (stateless verbatim replay).

func (*ReasoningPart) Descriptor deprecated

func (*ReasoningPart) Descriptor() ([]byte, []int)

Deprecated: Use ReasoningPart.ProtoReflect.Descriptor instead.

func (*ReasoningPart) GetItemId

func (x *ReasoningPart) GetItemId() string

func (*ReasoningPart) GetModelId

func (x *ReasoningPart) GetModelId() string

func (*ReasoningPart) GetOpaque

func (x *ReasoningPart) GetOpaque() isReasoningPart_Opaque

func (*ReasoningPart) GetOpaqueBytes

func (x *ReasoningPart) GetOpaqueBytes() []byte

func (*ReasoningPart) GetOpaqueDigest

func (x *ReasoningPart) GetOpaqueDigest() string

func (*ReasoningPart) GetOpaqueUri

func (x *ReasoningPart) GetOpaqueUri() string

func (*ReasoningPart) GetOrdinal

func (x *ReasoningPart) GetOrdinal() int32

func (*ReasoningPart) GetProvider

func (x *ReasoningPart) GetProvider() string

func (*ReasoningPart) GetSummary

func (x *ReasoningPart) GetSummary() []*Part

func (*ReasoningPart) GetValidityScope

func (x *ReasoningPart) GetValidityScope() string

func (*ReasoningPart) ProtoMessage

func (*ReasoningPart) ProtoMessage()

func (*ReasoningPart) ProtoReflect

func (x *ReasoningPart) ProtoReflect() protoreflect.Message

func (*ReasoningPart) Reset

func (x *ReasoningPart) Reset()

func (*ReasoningPart) String

func (x *ReasoningPart) String() string

type ReasoningPart_OpaqueBytes

type ReasoningPart_OpaqueBytes struct {
	OpaqueBytes []byte `protobuf:"bytes,3,opt,name=opaque_bytes,json=opaqueBytes,proto3,oneof"`
}

type ReasoningPart_OpaqueUri

type ReasoningPart_OpaqueUri struct {
	OpaqueUri string `protobuf:"bytes,4,opt,name=opaque_uri,json=opaqueUri,proto3,oneof"` // externalized when large; retained for the turn's fork lifetime
}

type RegisterHarnessRequest

type RegisterHarnessRequest struct {

	// An RFC 1123 DNS label: lowercase alphanumerics and '-', starting and ending alphanumeric, at
	// most 63 characters.
	Name string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Spec *HarnessSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterHarnessRequest) Descriptor deprecated

func (*RegisterHarnessRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterHarnessRequest.ProtoReflect.Descriptor instead.

func (*RegisterHarnessRequest) GetName

func (x *RegisterHarnessRequest) GetName() string

func (*RegisterHarnessRequest) GetSpec

func (x *RegisterHarnessRequest) GetSpec() *HarnessSpec

func (*RegisterHarnessRequest) ProtoMessage

func (*RegisterHarnessRequest) ProtoMessage()

func (*RegisterHarnessRequest) ProtoReflect

func (x *RegisterHarnessRequest) ProtoReflect() protoreflect.Message

func (*RegisterHarnessRequest) Reset

func (x *RegisterHarnessRequest) Reset()

func (*RegisterHarnessRequest) String

func (x *RegisterHarnessRequest) String() string

type RegisterHarnessResponse

type RegisterHarnessResponse struct {
	Harness *HarnessRegistration `protobuf:"bytes,1,opt,name=harness,proto3" json:"harness,omitempty"`
	Outcome RegisterOutcome      `protobuf:"varint,2,opt,name=outcome,proto3,enum=agentsessions.v1.RegisterOutcome" json:"outcome,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterHarnessResponse) Descriptor deprecated

func (*RegisterHarnessResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterHarnessResponse.ProtoReflect.Descriptor instead.

func (*RegisterHarnessResponse) GetHarness

func (*RegisterHarnessResponse) GetOutcome

func (x *RegisterHarnessResponse) GetOutcome() RegisterOutcome

func (*RegisterHarnessResponse) ProtoMessage

func (*RegisterHarnessResponse) ProtoMessage()

func (*RegisterHarnessResponse) ProtoReflect

func (x *RegisterHarnessResponse) ProtoReflect() protoreflect.Message

func (*RegisterHarnessResponse) Reset

func (x *RegisterHarnessResponse) Reset()

func (*RegisterHarnessResponse) String

func (x *RegisterHarnessResponse) String() string

type RegisterOutcome

type RegisterOutcome int32
const (
	RegisterOutcome_REGISTER_OUTCOME_UNSPECIFIED RegisterOutcome = 0
	// The name was free; the registration is new and ACTIVE.
	RegisterOutcome_REGISTER_OUTCOME_CREATED RegisterOutcome = 1
	// The name already held this spec and was ACTIVE. Stored registration unchanged; a host that
	// had not loaded a row added since startup may now serve it locally.
	RegisterOutcome_REGISTER_OUTCOME_UNCHANGED RegisterOutcome = 2
	// The name already held this spec and was RETIRED. It is ACTIVE again for every host sharing
	// the journal. To load a RETIRED row for existing sessions without reactivating it, restart the host.
	RegisterOutcome_REGISTER_OUTCOME_REACTIVATED RegisterOutcome = 3
)

func (RegisterOutcome) Descriptor

func (RegisterOutcome) Enum

func (x RegisterOutcome) Enum() *RegisterOutcome

func (RegisterOutcome) EnumDescriptor deprecated

func (RegisterOutcome) EnumDescriptor() ([]byte, []int)

Deprecated: Use RegisterOutcome.Descriptor instead.

func (RegisterOutcome) Number

func (RegisterOutcome) String

func (x RegisterOutcome) String() string

func (RegisterOutcome) Type

type RemotePlacement

type RemotePlacement struct {

	// unix:///path/to.sock or host:port.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

RemotePlacement is a harness already running at address, dialed over the Harness service.

func (*RemotePlacement) Descriptor deprecated

func (*RemotePlacement) Descriptor() ([]byte, []int)

Deprecated: Use RemotePlacement.ProtoReflect.Descriptor instead.

func (*RemotePlacement) GetAddress

func (x *RemotePlacement) GetAddress() string

func (*RemotePlacement) ProtoMessage

func (*RemotePlacement) ProtoMessage()

func (*RemotePlacement) ProtoReflect

func (x *RemotePlacement) ProtoReflect() protoreflect.Message

func (*RemotePlacement) Reset

func (x *RemotePlacement) Reset()

func (*RemotePlacement) String

func (x *RemotePlacement) String() string

type ReplayRequest

type ReplayRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	FromSeq int64  `protobuf:"varint,2,opt,name=from_seq,json=fromSeq,proto3" json:"from_seq,omitempty"`
	ToSeq   int64  `protobuf:"varint,3,opt,name=to_seq,json=toSeq,proto3" json:"to_seq,omitempty"` // 0 = to head
	// contains filtered or unexported fields
}

func (*ReplayRequest) Descriptor deprecated

func (*ReplayRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReplayRequest.ProtoReflect.Descriptor instead.

func (*ReplayRequest) GetFromSeq

func (x *ReplayRequest) GetFromSeq() int64

func (*ReplayRequest) GetSession

func (x *ReplayRequest) GetSession() string

func (*ReplayRequest) GetToSeq

func (x *ReplayRequest) GetToSeq() int64

func (*ReplayRequest) ProtoMessage

func (*ReplayRequest) ProtoMessage()

func (*ReplayRequest) ProtoReflect

func (x *ReplayRequest) ProtoReflect() protoreflect.Message

func (*ReplayRequest) Reset

func (x *ReplayRequest) Reset()

func (*ReplayRequest) String

func (x *ReplayRequest) String() string

type ResourceMetadata

type ResourceMetadata struct {
	Project    string                 `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // tenant / namespace
	Name       string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Uid        string                 `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"`
	Version    int64                  `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

ResourceMetadata is carried by every top-level resource.

func (*ResourceMetadata) Descriptor deprecated

func (*ResourceMetadata) Descriptor() ([]byte, []int)

Deprecated: Use ResourceMetadata.ProtoReflect.Descriptor instead.

func (*ResourceMetadata) GetCreateTime

func (x *ResourceMetadata) GetCreateTime() *timestamppb.Timestamp

func (*ResourceMetadata) GetName

func (x *ResourceMetadata) GetName() string

func (*ResourceMetadata) GetProject

func (x *ResourceMetadata) GetProject() string

func (*ResourceMetadata) GetUid

func (x *ResourceMetadata) GetUid() string

func (*ResourceMetadata) GetUpdateTime

func (x *ResourceMetadata) GetUpdateTime() *timestamppb.Timestamp

func (*ResourceMetadata) GetVersion

func (x *ResourceMetadata) GetVersion() int64

func (*ResourceMetadata) ProtoMessage

func (*ResourceMetadata) ProtoMessage()

func (*ResourceMetadata) ProtoReflect

func (x *ResourceMetadata) ProtoReflect() protoreflect.Message

func (*ResourceMetadata) Reset

func (x *ResourceMetadata) Reset()

func (*ResourceMetadata) String

func (x *ResourceMetadata) String() string

type Resumability

type Resumability int32

Resumability declares how a harness survives suspend/resume/fork. The host matches this against a runtime's RuntimeCapabilities.

const (
	Resumability_RESUMABILITY_UNSPECIFIED              Resumability = 0
	Resumability_RESUMABILITY_STATELESS_REPLAY         Resumability = 1 // default: rehydrate from history; any runtime
	Resumability_RESUMABILITY_REQUIRES_MEMORY_SNAPSHOT Resumability = 2 // needs a memory-snapshot-capable runtime
)

func (Resumability) Descriptor

func (Resumability) Enum

func (x Resumability) Enum() *Resumability

func (Resumability) EnumDescriptor deprecated

func (Resumability) EnumDescriptor() ([]byte, []int)

Deprecated: Use Resumability.Descriptor instead.

func (Resumability) Number

func (Resumability) String

func (x Resumability) String() string

func (Resumability) Type

type ResumeRequest

type ResumeRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// Ignored. The service never reads it; the Runtime backend decides how a resumed session comes
	// back. On substrate that is the actor's own snapshot, else the template's golden snapshot, else a
	// cold boot, and substrate has no per-resume boot flag to forward it to. The field stays so
	// existing clients keep encoding; do not reuse its number.
	//
	// Deprecated: Marked as deprecated in session.proto.
	Boot bool `protobuf:"varint,2,opt,name=boot,proto3" json:"boot,omitempty"`
	// Optional recovery precondition: ABORTED with expected/head values on a mismatch.
	// A deleted session returns FAILED_PRECONDITION regardless of this cursor's value.
	// Checked under the session guard before inspection, after an early fence before restore
	// or approval repair, and after a restored turn's regular writer fence before Run. A late
	// mismatch may already have restored compute, but does not run the harness or append records.
	// These checks catch other hosts' writes committed before each acquired fence. Taking a fence
	// supersedes older writers even on refusal: their remaining writes fail with ErrFenced, leaving any
	// unanswered tool intent eligible for retry on a later Resume. Fencing cannot cancel effects
	// already in flight, and a later writer can still supersede this operation: this is not an
	// execution lease or exactly-once tool guarantee. Explicit zero requires an empty journal;
	// absent skips this precondition.
	ExpectedLastSeq *int64 `protobuf:"varint,3,opt,name=expected_last_seq,json=expectedLastSeq,proto3,oneof" json:"expected_last_seq,omitempty"`
	// contains filtered or unexported fields
}

func (*ResumeRequest) Descriptor deprecated

func (*ResumeRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResumeRequest.ProtoReflect.Descriptor instead.

func (*ResumeRequest) GetBoot deprecated

func (x *ResumeRequest) GetBoot() bool

Deprecated: Marked as deprecated in session.proto.

func (*ResumeRequest) GetExpectedLastSeq

func (x *ResumeRequest) GetExpectedLastSeq() int64

func (*ResumeRequest) GetSession

func (x *ResumeRequest) GetSession() string

func (*ResumeRequest) ProtoMessage

func (*ResumeRequest) ProtoMessage()

func (*ResumeRequest) ProtoReflect

func (x *ResumeRequest) ProtoReflect() protoreflect.Message

func (*ResumeRequest) Reset

func (x *ResumeRequest) Reset()

func (*ResumeRequest) String

func (x *ResumeRequest) String() string

type RetireHarnessRequest

type RetireHarnessRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Recorded on the first retire only.
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*RetireHarnessRequest) Descriptor deprecated

func (*RetireHarnessRequest) Descriptor() ([]byte, []int)

Deprecated: Use RetireHarnessRequest.ProtoReflect.Descriptor instead.

func (*RetireHarnessRequest) GetName

func (x *RetireHarnessRequest) GetName() string

func (*RetireHarnessRequest) GetReason

func (x *RetireHarnessRequest) GetReason() string

func (*RetireHarnessRequest) ProtoMessage

func (*RetireHarnessRequest) ProtoMessage()

func (*RetireHarnessRequest) ProtoReflect

func (x *RetireHarnessRequest) ProtoReflect() protoreflect.Message

func (*RetireHarnessRequest) Reset

func (x *RetireHarnessRequest) Reset()

func (*RetireHarnessRequest) String

func (x *RetireHarnessRequest) String() string

type RuntimeCapabilities

type RuntimeCapabilities struct {
	MemorySnapshot bool `protobuf:"varint,1,opt,name=memory_snapshot,json=memorySnapshot,proto3" json:"memory_snapshot,omitempty"`
	CowFork        bool `protobuf:"varint,2,opt,name=cow_fork,json=cowFork,proto3" json:"cow_fork,omitempty"`
	Attest         bool `protobuf:"varint,3,opt,name=attest,proto3" json:"attest,omitempty"`
	GpuState       bool `protobuf:"varint,4,opt,name=gpu_state,json=gpuState,proto3" json:"gpu_state,omitempty"`
	// contains filtered or unexported fields
}

func (*RuntimeCapabilities) Descriptor deprecated

func (*RuntimeCapabilities) Descriptor() ([]byte, []int)

Deprecated: Use RuntimeCapabilities.ProtoReflect.Descriptor instead.

func (*RuntimeCapabilities) GetAttest

func (x *RuntimeCapabilities) GetAttest() bool

func (*RuntimeCapabilities) GetCowFork

func (x *RuntimeCapabilities) GetCowFork() bool

func (*RuntimeCapabilities) GetGpuState

func (x *RuntimeCapabilities) GetGpuState() bool

func (*RuntimeCapabilities) GetMemorySnapshot

func (x *RuntimeCapabilities) GetMemorySnapshot() bool

func (*RuntimeCapabilities) ProtoMessage

func (*RuntimeCapabilities) ProtoMessage()

func (*RuntimeCapabilities) ProtoReflect

func (x *RuntimeCapabilities) ProtoReflect() protoreflect.Message

func (*RuntimeCapabilities) Reset

func (x *RuntimeCapabilities) Reset()

func (*RuntimeCapabilities) String

func (x *RuntimeCapabilities) String() string

type Session

type Session struct {
	Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Harness  string            `protobuf:"bytes,2,opt,name=harness,proto3" json:"harness,omitempty"`
	Model    string            `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` // model-agnostic id
	// Every Session reply uses the same append-transaction projection at last_seq: no events
	// before deletion reports EXEC_PENDING; a valid owned unanswered host approval request in the
	// latest first-seen execution reports EXEC_AWAITING; other histories retain EXEC_COMPLETED.
	// DELETE preserves this execution axis but withholds actionable pending_approval.
	// COMPLETED is a compatibility fallback, not proof of END, a receipt, or admission.
	ExecState    ExecState    `protobuf:"varint,13,opt,name=exec_state,json=execState,proto3,enum=agentsessions.v1.ExecState" json:"exec_state,omitempty"`
	ComputeState ComputeState `` // incarnation axis
	/* 134-byte string literal not displayed */
	// Set for a valid unanswered host-owned APPROVAL_REQUEST in the latest first-seen execution
	// at last_seq on an ACTIVE session. Requests/decisions match execution_id, tool_call_id and
	// request_seq. Calls whose TOOL_CALL precedes the child's latest FORK are excluded. Unset when
	// deleted, no request is reportable, approval-bearing evidence is invalid, or the projection
	// lags last_seq.
	PendingApproval *ApprovalRef  `protobuf:"bytes,15,opt,name=pending_approval,json=pendingApproval,proto3" json:"pending_approval,omitempty"`
	DeletionState   DeletionState `` // independent permanent-deletion axis
	/* 138-byte string literal not displayed */
	// Absent for ACTIVE; set once when the host commits the durable PENDING tombstone.
	DeletionRequestedTime *timestamppb.Timestamp ``                                                                                         /* 127-byte string literal not displayed */
	LastSeq               int64                  `protobuf:"varint,5,opt,name=last_seq,json=lastSeq,proto3" json:"last_seq,omitempty"`      // event-log cursor
	ParentUid             string                 `protobuf:"bytes,6,opt,name=parent_uid,json=parentUid,proto3" json:"parent_uid,omitempty"` // fork lineage
	ForkSeq               int64                  `protobuf:"varint,7,opt,name=fork_seq,json=forkSeq,proto3" json:"fork_seq,omitempty"`
	// Recorded provenance, never enforced: it says on whose behalf a session was created, and the
	// hash chain makes that record tamper-evident. Nothing in this implementation treats it as
	// authorization. See docs/security.md.
	Identity    *IdentityRef      `protobuf:"bytes,8,opt,name=identity,proto3" json:"identity,omitempty"`
	Compute     *ComputeRef       `protobuf:"bytes,9,opt,name=compute,proto3" json:"compute,omitempty"` // empty when SUSPENDED/TERMINATED
	Origin      *Origin           `protobuf:"bytes,10,opt,name=origin,proto3" json:"origin,omitempty"`  // neutral external context; filled by a producer adapter
	Labels      map[string]string ``                                                                    /* 140-byte string literal not displayed */
	Annotations map[string]string ``                                                                    // free-form adapter metadata (K8s-style)
	/* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

func (*Session) Descriptor() ([]byte, []int)

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetAnnotations

func (x *Session) GetAnnotations() map[string]string

func (*Session) GetCompute

func (x *Session) GetCompute() *ComputeRef

func (*Session) GetComputeState

func (x *Session) GetComputeState() ComputeState

func (*Session) GetDeletionRequestedTime

func (x *Session) GetDeletionRequestedTime() *timestamppb.Timestamp

func (*Session) GetDeletionState

func (x *Session) GetDeletionState() DeletionState

func (*Session) GetExecState

func (x *Session) GetExecState() ExecState

func (*Session) GetForkSeq

func (x *Session) GetForkSeq() int64

func (*Session) GetHarness

func (x *Session) GetHarness() string

func (*Session) GetIdentity

func (x *Session) GetIdentity() *IdentityRef

func (*Session) GetLabels

func (x *Session) GetLabels() map[string]string

func (*Session) GetLastSeq

func (x *Session) GetLastSeq() int64

func (*Session) GetMetadata

func (x *Session) GetMetadata() *ResourceMetadata

func (*Session) GetModel

func (x *Session) GetModel() string

func (*Session) GetOrigin

func (x *Session) GetOrigin() *Origin

func (*Session) GetParentUid

func (x *Session) GetParentUid() string

func (*Session) GetPendingApproval

func (x *Session) GetPendingApproval() *ApprovalRef

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

func (x *Session) ProtoReflect() protoreflect.Message

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type SessionsClient

type SessionsClient interface {
	CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error)
	// GetSession remains available for audit after deletion, including metadata and deletion intent
	// time.
	GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error)
	ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
	// DeleteSession commits irreversible soft-deletion intent for a known UID. The host atomically
	// appends a session-scoped, host-owned LIFECYCLE_DELETE (empty execution_id), advances the writer
	// fence and marks PENDING. Metadata, the UID and the hash-chained journal are retained forever;
	// the UID cannot be reused. Children and their copied prefixes are unaffected: no cascade or
	// data erasure is promised. ListSessions hides the UID; GetSession and raw Sessions.Replay remain
	// read-only audit access, without reconstructing or running a harness.
	//
	// Valid mutation requests against PENDING fail with FAILED_PRECONDITION before routing,
	// recovery or compute effects: Exec, Fork (including historical at_seq), Resume, Suspend and
	// Approve are refused, including exact historical decision retries. Pending approval metadata
	// grants no permission.
	//
	// Until ownership and cleanup land (#88), OK + PENDING acknowledges durable intent only. No
	// Runtime.Stop, actor/pin release, physical snapshot GC or TERMINATED transition is attempted
	// or promised. Execution and compute reporting stay independent. The retained journal
	// is audit evidence, not a complete or authoritative cleanup-target inventory; the allocation
	// ownership and cleanup-target schema belong to #88, not an inferred default harness or owner.
	// Repeated PENDING deletion returns the identical Session: no timestamp, update_time, journal,
	// fence or compute-projection changes. Clients must inspect deletion_state, not infer reclamation
	// from an OK status.
	//
	// Empty uid is INVALID_ARGUMENT; an unknown nonempty uid is NOT_FOUND without creating a row.
	// Overlap with a mutation in the same Registry/host is ABORTED before mutation, without canceling
	// the holder; retry after it finishes. Storage faults are INTERNAL, cancellation/deadline retain
	// CANCELLED/DEADLINE_EXCEEDED. An error or lost reply after intent commits cannot undo the hidden
	// PENDING tombstone or erase its audit evidence: use GetSession or retry to learn the outcome.
	//
	// Admission serialization is local to one Registry/host. Durable fences block subsequent writes
	// from this build's writers; already-open older binaries do not enforce tombstones. A separate
	// host can provision compute before its first fence; cross-host exclusion of compute effects is
	// not guaranteed. Operators still need runtime-side resource reconciliation.
	DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*Session, error)
	// Exec runs one execution/turn. The live stream carries committed LogRecords plus
	// ephemeral Deltas; Replay re-delivers committed records only (read-only).
	Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecUpdate], error)
	// Raw read-only audit: remains available for tombstoned UIDs, including LIFECYCLE_DELETE records.
	// Unlike controller replay, this does not reconstruct or run the harness.
	Replay(ctx context.Context, in *ReplayRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogRecord], error)
	// Implemented durable approval decisions for STATELESS_REPLAY executions.
	// OK commits only a decision; the caller must Resume to continue. An exact retry of the tuple,
	// approved value, reason and identity returns the existing decision, even after resolution.
	// A changed decision/reason/identity for that request is FAILED_PRECONDITION, never an overwrite.
	// INVALID_ARGUMENT: missing session/execution/tool-call tuple, non-positive request_seq, or absent
	// approved. NOT_FOUND: unknown session. FAILED_PRECONDITION: stale, inherited, or wrong request
	// tuple, changed decision, or invalid recorded approval evidence. The gate cannot be created
	// for a non-stateless execution; Approve does not Describe or resolve a harness.
	// ABORTED: local contention, append-CAS conflict or superseded fence; retry
	// after reading the session. Identity is provenance only; this method provides no authorization,
	// policy hook, expiry, implicit Resume, or Cancel behavior.
	Approve(ctx context.Context, in *ApproveRequest, opts ...grpc.CallOption) (*ApproveResponse, error)
	// In-flight control: cancel the running execution. Not implemented: the server returns
	// UNIMPLEMENTED.
	Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*Session, error)
	// Compute-layer durability. There is no warm Pause: no Runtime backend implements a
	// node-local warm checkpoint, so a session goes straight from live to a cold snapshot.
	// Suspend routes an owned unreceipted approval to its recorded harness; inherited approvals
	// and ordinary sessions use their stored default. An unserved recorded name is
	// FAILED_PRECONDITION, with no fallback.
	Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*Session, error)
	// A recorded STATELESS_REPLAY override of a stored REQUIRES_MEMORY_SNAPSHOT harness is
	// FAILED_PRECONDITION before compute changes or journal repair, as for Exec admission.
	// Otherwise an unresolved owned approval returns its current paused Session without runtime IO.
	// A call-only cut repairs the request; neither outcome proves cold compute. After a decision,
	// recovery uses the recorded invocation and SnapshotRef. It may park at another gate (without
	// RESUME), or finish and commit RESUME. A missing executor is FAILED_PRECONDITION and leaves
	// the decision recoverable. Approved executor failures are durable EXECUTOR_ERROR receipts,
	// available to the harness for continuation, not transport failures. Snapshots and unresolved
	// requests are retained indefinitely; there is no approval expiry or automatic decision.
	Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*Session, error)
	// The differentiator: branch a session at a sequence into one or more children. Forking a
	// REQUIRES_MEMORY_SNAPSHOT harness first checkpoints the parent (it suspends, and a SUSPEND event
	// lands on its chain) because the children are cloned from that snapshot; resume brings it back.
	Fork(ctx context.Context, in *ForkRequest, opts ...grpc.CallOption) (*ForkResponse, error)
}

SessionsClient is the client API for Sessions service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSessionsClient

func NewSessionsClient(cc grpc.ClientConnInterface) SessionsClient

type SessionsServer

type SessionsServer interface {
	CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
	// GetSession remains available for audit after deletion, including metadata and deletion intent
	// time.
	GetSession(context.Context, *GetSessionRequest) (*Session, error)
	ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
	// DeleteSession commits irreversible soft-deletion intent for a known UID. The host atomically
	// appends a session-scoped, host-owned LIFECYCLE_DELETE (empty execution_id), advances the writer
	// fence and marks PENDING. Metadata, the UID and the hash-chained journal are retained forever;
	// the UID cannot be reused. Children and their copied prefixes are unaffected: no cascade or
	// data erasure is promised. ListSessions hides the UID; GetSession and raw Sessions.Replay remain
	// read-only audit access, without reconstructing or running a harness.
	//
	// Valid mutation requests against PENDING fail with FAILED_PRECONDITION before routing,
	// recovery or compute effects: Exec, Fork (including historical at_seq), Resume, Suspend and
	// Approve are refused, including exact historical decision retries. Pending approval metadata
	// grants no permission.
	//
	// Until ownership and cleanup land (#88), OK + PENDING acknowledges durable intent only. No
	// Runtime.Stop, actor/pin release, physical snapshot GC or TERMINATED transition is attempted
	// or promised. Execution and compute reporting stay independent. The retained journal
	// is audit evidence, not a complete or authoritative cleanup-target inventory; the allocation
	// ownership and cleanup-target schema belong to #88, not an inferred default harness or owner.
	// Repeated PENDING deletion returns the identical Session: no timestamp, update_time, journal,
	// fence or compute-projection changes. Clients must inspect deletion_state, not infer reclamation
	// from an OK status.
	//
	// Empty uid is INVALID_ARGUMENT; an unknown nonempty uid is NOT_FOUND without creating a row.
	// Overlap with a mutation in the same Registry/host is ABORTED before mutation, without canceling
	// the holder; retry after it finishes. Storage faults are INTERNAL, cancellation/deadline retain
	// CANCELLED/DEADLINE_EXCEEDED. An error or lost reply after intent commits cannot undo the hidden
	// PENDING tombstone or erase its audit evidence: use GetSession or retry to learn the outcome.
	//
	// Admission serialization is local to one Registry/host. Durable fences block subsequent writes
	// from this build's writers; already-open older binaries do not enforce tombstones. A separate
	// host can provision compute before its first fence; cross-host exclusion of compute effects is
	// not guaranteed. Operators still need runtime-side resource reconciliation.
	DeleteSession(context.Context, *DeleteSessionRequest) (*Session, error)
	// Exec runs one execution/turn. The live stream carries committed LogRecords plus
	// ephemeral Deltas; Replay re-delivers committed records only (read-only).
	Exec(*ExecRequest, grpc.ServerStreamingServer[ExecUpdate]) error
	// Raw read-only audit: remains available for tombstoned UIDs, including LIFECYCLE_DELETE records.
	// Unlike controller replay, this does not reconstruct or run the harness.
	Replay(*ReplayRequest, grpc.ServerStreamingServer[LogRecord]) error
	// Implemented durable approval decisions for STATELESS_REPLAY executions.
	// OK commits only a decision; the caller must Resume to continue. An exact retry of the tuple,
	// approved value, reason and identity returns the existing decision, even after resolution.
	// A changed decision/reason/identity for that request is FAILED_PRECONDITION, never an overwrite.
	// INVALID_ARGUMENT: missing session/execution/tool-call tuple, non-positive request_seq, or absent
	// approved. NOT_FOUND: unknown session. FAILED_PRECONDITION: stale, inherited, or wrong request
	// tuple, changed decision, or invalid recorded approval evidence. The gate cannot be created
	// for a non-stateless execution; Approve does not Describe or resolve a harness.
	// ABORTED: local contention, append-CAS conflict or superseded fence; retry
	// after reading the session. Identity is provenance only; this method provides no authorization,
	// policy hook, expiry, implicit Resume, or Cancel behavior.
	Approve(context.Context, *ApproveRequest) (*ApproveResponse, error)
	// In-flight control: cancel the running execution. Not implemented: the server returns
	// UNIMPLEMENTED.
	Cancel(context.Context, *CancelRequest) (*Session, error)
	// Compute-layer durability. There is no warm Pause: no Runtime backend implements a
	// node-local warm checkpoint, so a session goes straight from live to a cold snapshot.
	// Suspend routes an owned unreceipted approval to its recorded harness; inherited approvals
	// and ordinary sessions use their stored default. An unserved recorded name is
	// FAILED_PRECONDITION, with no fallback.
	Suspend(context.Context, *SuspendRequest) (*Session, error)
	// A recorded STATELESS_REPLAY override of a stored REQUIRES_MEMORY_SNAPSHOT harness is
	// FAILED_PRECONDITION before compute changes or journal repair, as for Exec admission.
	// Otherwise an unresolved owned approval returns its current paused Session without runtime IO.
	// A call-only cut repairs the request; neither outcome proves cold compute. After a decision,
	// recovery uses the recorded invocation and SnapshotRef. It may park at another gate (without
	// RESUME), or finish and commit RESUME. A missing executor is FAILED_PRECONDITION and leaves
	// the decision recoverable. Approved executor failures are durable EXECUTOR_ERROR receipts,
	// available to the harness for continuation, not transport failures. Snapshots and unresolved
	// requests are retained indefinitely; there is no approval expiry or automatic decision.
	Resume(context.Context, *ResumeRequest) (*Session, error)
	// The differentiator: branch a session at a sequence into one or more children. Forking a
	// REQUIRES_MEMORY_SNAPSHOT harness first checkpoints the parent (it suspends, and a SUSPEND event
	// lands on its chain) because the children are cloned from that snapshot; resume brings it back.
	Fork(context.Context, *ForkRequest) (*ForkResponse, error)
	// contains filtered or unexported methods
}

SessionsServer is the server API for Sessions service. All implementations must embed UnimplementedSessionsServer for forward compatibility.

type Sessions_ExecClient

type Sessions_ExecClient = grpc.ServerStreamingClient[ExecUpdate]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Sessions_ExecServer

type Sessions_ExecServer = grpc.ServerStreamingServer[ExecUpdate]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Sessions_ReplayClient

type Sessions_ReplayClient = grpc.ServerStreamingClient[LogRecord]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Sessions_ReplayServer

type Sessions_ReplayServer = grpc.ServerStreamingServer[LogRecord]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SnapshotRef

type SnapshotRef struct {
	Local       string `protobuf:"bytes,1,opt,name=local,proto3" json:"local,omitempty"`
	ExternalUri string `protobuf:"bytes,2,opt,name=external_uri,json=externalUri,proto3" json:"external_uri,omitempty"`
	Memory      bool   `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` // RAM/process captured? pod: false, kata/clh: true
	Sealed      bool   `protobuf:"varint,4,opt,name=sealed,proto3" json:"sealed,omitempty"` // encrypted + attested (confidential)
	// contains filtered or unexported fields
}

SnapshotRef is the session-STATUS ref carried in ComputeRef below. Its shape mirrors the canonical Go SPI type api.SnapshotRef and the durable form the log carries inline on the SUSPEND Lifecycle event (common.proto Lifecycle.snapshot_*), so the three agree field for field.

local and external_uri are deliberately NOT a oneof: a memory-capable backend sets both at once (substrate reports an actor handle in local and the object-storage URI in external_uri), which a oneof cannot express. A filesystem-only backend sets only local, with memory=false.

ComputeRef is not yet populated on the wire; the Placer records the ref on the SUSPEND event instead. Wiring session status is tracked separately.

func (*SnapshotRef) Descriptor deprecated

func (*SnapshotRef) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotRef.ProtoReflect.Descriptor instead.

func (*SnapshotRef) GetExternalUri

func (x *SnapshotRef) GetExternalUri() string

func (*SnapshotRef) GetLocal

func (x *SnapshotRef) GetLocal() string

func (*SnapshotRef) GetMemory

func (x *SnapshotRef) GetMemory() bool

func (*SnapshotRef) GetSealed

func (x *SnapshotRef) GetSealed() bool

func (*SnapshotRef) ProtoMessage

func (*SnapshotRef) ProtoMessage()

func (*SnapshotRef) ProtoReflect

func (x *SnapshotRef) ProtoReflect() protoreflect.Message

func (*SnapshotRef) Reset

func (x *SnapshotRef) Reset()

func (*SnapshotRef) String

func (x *SnapshotRef) String() string

type Start

type Start struct {
	Config  []byte   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	History []*Event `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"`
	// Invocation input messages. Controller replay and interrupted recovery restore the original
	// messages from the journal; empty inputs describe an intentionally inputless invocation.
	Inputs        []*Message       `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"`
	Identity      *IdentityContext `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
	ResumeFromSeq int64            `protobuf:"varint,5,opt,name=resume_from_seq,json=resumeFromSeq,proto3" json:"resume_from_seq,omitempty"`
	// contains filtered or unexported fields
}

Start begins one execution. History is pushed here (pull-by-range is a later addition): every event before this execution's EXECUTION_START, also after a memory restore. A REQUIRES_MEMORY_SNAPSHOT harness does not rebuild in-memory state from it.

func (*Start) Descriptor deprecated

func (*Start) Descriptor() ([]byte, []int)

Deprecated: Use Start.ProtoReflect.Descriptor instead.

func (*Start) GetConfig

func (x *Start) GetConfig() []byte

func (*Start) GetHistory

func (x *Start) GetHistory() []*Event

func (*Start) GetIdentity

func (x *Start) GetIdentity() *IdentityContext

func (*Start) GetInputs

func (x *Start) GetInputs() []*Message

func (*Start) GetResumeFromSeq

func (x *Start) GetResumeFromSeq() int64

func (*Start) ProtoMessage

func (*Start) ProtoMessage()

func (*Start) ProtoReflect

func (x *Start) ProtoReflect() protoreflect.Message

func (*Start) Reset

func (x *Start) Reset()

func (*Start) String

func (x *Start) String() string

type SubstratePlacement

type SubstratePlacement struct {
	Atespace string `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"`
	// ActorTemplate name.
	Template string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
	// contains filtered or unexported fields
}

SubstratePlacement runs each session in its own actor created from an ActorTemplate. A host serves it only if it was built with a substrate placement backend; otherwise RegisterHarness returns FAILED_PRECONDITION.

func (*SubstratePlacement) Descriptor deprecated

func (*SubstratePlacement) Descriptor() ([]byte, []int)

Deprecated: Use SubstratePlacement.ProtoReflect.Descriptor instead.

func (*SubstratePlacement) GetAtespace

func (x *SubstratePlacement) GetAtespace() string

func (*SubstratePlacement) GetTemplate

func (x *SubstratePlacement) GetTemplate() string

func (*SubstratePlacement) ProtoMessage

func (*SubstratePlacement) ProtoMessage()

func (*SubstratePlacement) ProtoReflect

func (x *SubstratePlacement) ProtoReflect() protoreflect.Message

func (*SubstratePlacement) Reset

func (x *SubstratePlacement) Reset()

func (*SubstratePlacement) String

func (x *SubstratePlacement) String() string

type SuspendRequest

type SuspendRequest struct {
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*SuspendRequest) Descriptor deprecated

func (*SuspendRequest) Descriptor() ([]byte, []int)

Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead.

func (*SuspendRequest) GetSession

func (x *SuspendRequest) GetSession() string

func (*SuspendRequest) ProtoMessage

func (*SuspendRequest) ProtoMessage()

func (*SuspendRequest) ProtoReflect

func (x *SuspendRequest) ProtoReflect() protoreflect.Message

func (*SuspendRequest) Reset

func (x *SuspendRequest) Reset()

func (*SuspendRequest) String

func (x *SuspendRequest) String() string

type TextPart

type TextPart struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*TextPart) Descriptor deprecated

func (*TextPart) Descriptor() ([]byte, []int)

Deprecated: Use TextPart.ProtoReflect.Descriptor instead.

func (*TextPart) GetText

func (x *TextPart) GetText() string

func (*TextPart) ProtoMessage

func (*TextPart) ProtoMessage()

func (*TextPart) ProtoReflect

func (x *TextPart) ProtoReflect() protoreflect.Message

func (*TextPart) Reset

func (x *TextPart) Reset()

func (*TextPart) String

func (x *TextPart) String() string

type ToolCall

type ToolCall struct {
	Id             string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Tool           string           `protobuf:"bytes,2,opt,name=tool,proto3" json:"tool,omitempty"` // tool name / MCP method
	Args           *structpb.Struct `protobuf:"bytes,3,opt,name=args,proto3" json:"args,omitempty"`
	Mediation      Mediation        `protobuf:"varint,4,opt,name=mediation,proto3,enum=agentsessions.v1.Mediation" json:"mediation,omitempty"`
	IdempotencyKey string           `protobuf:"bytes,5,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // §3/I3: dedups a retried side-effecting call tool-side
	// contains filtered or unexported fields
}

ToolCall aligns with an MCP tool call (name + structured args).

func (*ToolCall) Descriptor deprecated

func (*ToolCall) Descriptor() ([]byte, []int)

Deprecated: Use ToolCall.ProtoReflect.Descriptor instead.

func (*ToolCall) GetArgs

func (x *ToolCall) GetArgs() *structpb.Struct

func (*ToolCall) GetId

func (x *ToolCall) GetId() string

func (*ToolCall) GetIdempotencyKey

func (x *ToolCall) GetIdempotencyKey() string

func (*ToolCall) GetMediation

func (x *ToolCall) GetMediation() Mediation

func (*ToolCall) GetTool

func (x *ToolCall) GetTool() string

func (*ToolCall) ProtoMessage

func (*ToolCall) ProtoMessage()

func (*ToolCall) ProtoReflect

func (x *ToolCall) ProtoReflect() protoreflect.Message

func (*ToolCall) Reset

func (x *ToolCall) Reset()

func (*ToolCall) String

func (x *ToolCall) String() string

type ToolChoice

type ToolChoice struct {
	Mode ToolChoice_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=agentsessions.v1.ToolChoice_Mode" json:"mode,omitempty"`
	// name forces one specific tool. It is meaningful only with MODE_REQUIRED.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ToolChoice constrains whether and which tool the model calls.

func (*ToolChoice) Descriptor deprecated

func (*ToolChoice) Descriptor() ([]byte, []int)

Deprecated: Use ToolChoice.ProtoReflect.Descriptor instead.

func (*ToolChoice) GetMode

func (x *ToolChoice) GetMode() ToolChoice_Mode

func (*ToolChoice) GetName

func (x *ToolChoice) GetName() string

func (*ToolChoice) ProtoMessage

func (*ToolChoice) ProtoMessage()

func (*ToolChoice) ProtoReflect

func (x *ToolChoice) ProtoReflect() protoreflect.Message

func (*ToolChoice) Reset

func (x *ToolChoice) Reset()

func (*ToolChoice) String

func (x *ToolChoice) String() string

type ToolChoice_Mode

type ToolChoice_Mode int32
const (
	ToolChoice_MODE_UNSPECIFIED ToolChoice_Mode = 0 // provider default
	ToolChoice_MODE_AUTO        ToolChoice_Mode = 1 // the model decides whether to call a tool
	ToolChoice_MODE_NONE        ToolChoice_Mode = 2 // the model must not call a tool
	ToolChoice_MODE_REQUIRED    ToolChoice_Mode = 3 // the model must call at least one tool
)

func (ToolChoice_Mode) Descriptor

func (ToolChoice_Mode) Enum

func (x ToolChoice_Mode) Enum() *ToolChoice_Mode

func (ToolChoice_Mode) EnumDescriptor deprecated

func (ToolChoice_Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ToolChoice_Mode.Descriptor instead.

func (ToolChoice_Mode) Number

func (ToolChoice_Mode) String

func (x ToolChoice_Mode) String() string

func (ToolChoice_Mode) Type

type ToolDefinition

type ToolDefinition struct {
	Name        string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string           `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	InputSchema *structpb.Struct `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"` // JSON Schema object describing the tool's arguments
	// contains filtered or unexported fields
}

ToolDefinition is a tool offered to a model on one call. It aligns with an MCP Tool (name, description, inputSchema). It differs from the harness's ToolSpec, which declares a tool and its default mediation to the host; ToolDefinition is what the model sees.

func (*ToolDefinition) Descriptor deprecated

func (*ToolDefinition) Descriptor() ([]byte, []int)

Deprecated: Use ToolDefinition.ProtoReflect.Descriptor instead.

func (*ToolDefinition) GetDescription

func (x *ToolDefinition) GetDescription() string

func (*ToolDefinition) GetInputSchema

func (x *ToolDefinition) GetInputSchema() *structpb.Struct

func (*ToolDefinition) GetName

func (x *ToolDefinition) GetName() string

func (*ToolDefinition) ProtoMessage

func (*ToolDefinition) ProtoMessage()

func (*ToolDefinition) ProtoReflect

func (x *ToolDefinition) ProtoReflect() protoreflect.Message

func (*ToolDefinition) Reset

func (x *ToolDefinition) Reset()

func (*ToolDefinition) String

func (x *ToolDefinition) String() string

type ToolResult

type ToolResult struct {
	Id           string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Output       *structpb.Struct `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	OutputUri    string           `protobuf:"bytes,3,opt,name=output_uri,json=outputUri,proto3" json:"output_uri,omitempty"`          // externalized large output (MCP resource_link), else inline `output`
	OutputDigest string           `protobuf:"bytes,6,opt,name=output_digest,json=outputDigest,proto3" json:"output_digest,omitempty"` // content digest of output_uri target (chain covers externalized bytes)
	IsError      bool             `protobuf:"varint,4,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`
	Error        string           `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// content is the model-facing result (MCP CallToolResult.content: text, file, structured data).
	// A harness records on EVENT_TOOL_RESULT the same ToolResult it feeds back as a tool_result part,
	// so history rebuilt from the journal can give the model what it saw live.
	Content []*Part         `protobuf:"bytes,7,rep,name=content,proto3" json:"content,omitempty"`
	Code    ToolResult_Code `protobuf:"varint,8,opt,name=code,proto3,enum=agentsessions.v1.ToolResult_Code" json:"code,omitempty"`
	// For approval-gated calls, the positive journal sequences of the host-owned request and
	// decision. Both are set on success, denial, or executor failure after approval. Other calls
	// and legacy receipts leave both zero. The host checks these against the same session,
	// execution_id and tool call id; a receipt cannot resolve a different request/decision.
	ApprovalRequestSeq  int64 `protobuf:"varint,9,opt,name=approval_request_seq,json=approvalRequestSeq,proto3" json:"approval_request_seq,omitempty"`
	ApprovalDecisionSeq int64 `protobuf:"varint,10,opt,name=approval_decision_seq,json=approvalDecisionSeq,proto3" json:"approval_decision_seq,omitempty"`
	// contains filtered or unexported fields
}

ToolResult is a durable execution receipt, also usable as model-facing history. A decision itself is a separate host-owned APPROVAL_RESULT; it is not embedded in this message.

func (*ToolResult) Descriptor deprecated

func (*ToolResult) Descriptor() ([]byte, []int)

Deprecated: Use ToolResult.ProtoReflect.Descriptor instead.

func (*ToolResult) GetApprovalDecisionSeq

func (x *ToolResult) GetApprovalDecisionSeq() int64

func (*ToolResult) GetApprovalRequestSeq

func (x *ToolResult) GetApprovalRequestSeq() int64

func (*ToolResult) GetCode

func (x *ToolResult) GetCode() ToolResult_Code

func (*ToolResult) GetContent

func (x *ToolResult) GetContent() []*Part

func (*ToolResult) GetError

func (x *ToolResult) GetError() string

func (*ToolResult) GetId

func (x *ToolResult) GetId() string

func (*ToolResult) GetIsError

func (x *ToolResult) GetIsError() bool

func (*ToolResult) GetOutput

func (x *ToolResult) GetOutput() *structpb.Struct

func (*ToolResult) GetOutputDigest

func (x *ToolResult) GetOutputDigest() string

func (*ToolResult) GetOutputUri

func (x *ToolResult) GetOutputUri() string

func (*ToolResult) ProtoMessage

func (*ToolResult) ProtoMessage()

func (*ToolResult) ProtoReflect

func (x *ToolResult) ProtoReflect() protoreflect.Message

func (*ToolResult) Reset

func (x *ToolResult) Reset()

func (*ToolResult) String

func (x *ToolResult) String() string

type ToolResult_Code

type ToolResult_Code int32
const (
	// Legacy/unspecified status. With is_error=false this is also a successful receipt.
	// Old is_error=true receipts retain their legacy, unclassified failure shape.
	ToolResult_CODE_UNSPECIFIED ToolResult_Code = 0
	// A denied approval: is_error=true and the executor MUST NOT have been invoked.
	ToolResult_APPROVAL_DENIED ToolResult_Code = 1
	// An attempted executor call failed: is_error=true; error describes the failure. This is
	// a durable handled receipt, not an unrecorded effect or an approval denial.
	ToolResult_EXECUTOR_ERROR ToolResult_Code = 2
)

func (ToolResult_Code) Descriptor

func (ToolResult_Code) Enum

func (x ToolResult_Code) Enum() *ToolResult_Code

func (ToolResult_Code) EnumDescriptor deprecated

func (ToolResult_Code) EnumDescriptor() ([]byte, []int)

Deprecated: Use ToolResult_Code.Descriptor instead.

func (ToolResult_Code) Number

func (ToolResult_Code) String

func (x ToolResult_Code) String() string

func (ToolResult_Code) Type

type ToolSpec

type ToolSpec struct {
	Name        string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string    `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Mediation   Mediation `protobuf:"varint,3,opt,name=mediation,proto3,enum=agentsessions.v1.Mediation" json:"mediation,omitempty"` // default mediation for this tool
	// contains filtered or unexported fields
}

func (*ToolSpec) Descriptor deprecated

func (*ToolSpec) Descriptor() ([]byte, []int)

Deprecated: Use ToolSpec.ProtoReflect.Descriptor instead.

func (*ToolSpec) GetDescription

func (x *ToolSpec) GetDescription() string

func (*ToolSpec) GetMediation

func (x *ToolSpec) GetMediation() Mediation

func (*ToolSpec) GetName

func (x *ToolSpec) GetName() string

func (*ToolSpec) ProtoMessage

func (*ToolSpec) ProtoMessage()

func (*ToolSpec) ProtoReflect

func (x *ToolSpec) ProtoReflect() protoreflect.Message

func (*ToolSpec) Reset

func (x *ToolSpec) Reset()

func (*ToolSpec) String

func (x *ToolSpec) String() string

type UnimplementedHarnessRegistryServer

type UnimplementedHarnessRegistryServer struct{}

UnimplementedHarnessRegistryServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedHarnessRegistryServer) GetHarness

func (UnimplementedHarnessRegistryServer) ListHarnesses

func (UnimplementedHarnessRegistryServer) RegisterHarness

func (UnimplementedHarnessRegistryServer) RetireHarness

type UnimplementedHarnessServer

type UnimplementedHarnessServer struct{}

UnimplementedHarnessServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedHarnessServer) Connect

func (UnimplementedHarnessServer) Describe

type UnimplementedSessionsServer

type UnimplementedSessionsServer struct{}

UnimplementedSessionsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSessionsServer) Approve

func (UnimplementedSessionsServer) Cancel

func (UnimplementedSessionsServer) CreateSession

func (UnimplementedSessionsServer) DeleteSession

func (UnimplementedSessionsServer) Exec

func (UnimplementedSessionsServer) Fork

func (UnimplementedSessionsServer) GetSession

func (UnimplementedSessionsServer) ListSessions

func (UnimplementedSessionsServer) Replay

func (UnimplementedSessionsServer) Resume

func (UnimplementedSessionsServer) Suspend

type UnsafeHarnessRegistryServer

type UnsafeHarnessRegistryServer interface {
	// contains filtered or unexported methods
}

UnsafeHarnessRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HarnessRegistryServer will result in compilation errors.

type UnsafeHarnessServer

type UnsafeHarnessServer interface {
	// contains filtered or unexported methods
}

UnsafeHarnessServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HarnessServer will result in compilation errors.

type UnsafeSessionsServer

type UnsafeSessionsServer interface {
	// contains filtered or unexported methods
}

UnsafeSessionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionsServer will result in compilation errors.

type Usage

type Usage struct {
	Model           string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	InputTokens     int64  `protobuf:"varint,2,opt,name=input_tokens,json=inputTokens,proto3" json:"input_tokens,omitempty"`
	OutputTokens    int64  `protobuf:"varint,3,opt,name=output_tokens,json=outputTokens,proto3" json:"output_tokens,omitempty"`
	ReasoningTokens int64  `protobuf:"varint,4,opt,name=reasoning_tokens,json=reasoningTokens,proto3" json:"reasoning_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*Usage) Descriptor deprecated

func (*Usage) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) GetInputTokens

func (x *Usage) GetInputTokens() int64

func (*Usage) GetModel

func (x *Usage) GetModel() string

func (*Usage) GetOutputTokens

func (x *Usage) GetOutputTokens() int64

func (*Usage) GetReasoningTokens

func (x *Usage) GetReasoningTokens() int64

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect

func (x *Usage) ProtoReflect() protoreflect.Message

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

Jump to

Keyboard shortcuts

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