* feat(archied): read-only run-scoped sandbox view over the harness contract Serve RunTarget: the daemon resolves a running task and attempt to its Kit container and follows its output, refusing a finished or unknown task with a stated reason. The dashboard adds a Sandbox tab behind the task log's read authority. Takeover stays out of scope until the sod1 authority is wired. * fix(archied): scope and close sandbox views correctly Forward harness activity into container output, bind containers and dashboard views to their attempt, enforce the asserted org, and report unavailable dependencies and interrupted streams accurately. Refs: archie-core-qi91, archie-core-252tj
132 lines
5.6 KiB
Go
132 lines
5.6 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: harness/v1/harness.proto
|
|
|
|
package harnessv1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
HarnessService_Open_FullMethodName = "/harness.v1.HarnessService/Open"
|
|
)
|
|
|
|
// HarnessServiceClient is the client API for HarnessService 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.
|
|
//
|
|
// HarnessService opens one duplex PTY session into a Kit container the daemon
|
|
// owns. The dashboard's setup terminal consumes the setup target; the
|
|
// run-scoped live view consumes the run target and is read-only. See
|
|
// docs/prds/external-agent-harness.md, "Session contract".
|
|
type HarnessServiceClient interface {
|
|
// Open carries a session: the first request frame names the target, later
|
|
// frames carry terminal input and sizing, and the response stream carries
|
|
// terminal output until the command exits or the session ends.
|
|
Open(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[OpenRequest, OpenResponse], error)
|
|
}
|
|
|
|
type harnessServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewHarnessServiceClient(cc grpc.ClientConnInterface) HarnessServiceClient {
|
|
return &harnessServiceClient{cc}
|
|
}
|
|
|
|
func (c *harnessServiceClient) Open(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[OpenRequest, OpenResponse], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &HarnessService_ServiceDesc.Streams[0], HarnessService_Open_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[OpenRequest, OpenResponse]{ClientStream: stream}
|
|
return x, nil
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type HarnessService_OpenClient = grpc.BidiStreamingClient[OpenRequest, OpenResponse]
|
|
|
|
// HarnessServiceServer is the server API for HarnessService service.
|
|
// All implementations must embed UnimplementedHarnessServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// HarnessService opens one duplex PTY session into a Kit container the daemon
|
|
// owns. The dashboard's setup terminal consumes the setup target; the
|
|
// run-scoped live view consumes the run target and is read-only. See
|
|
// docs/prds/external-agent-harness.md, "Session contract".
|
|
type HarnessServiceServer interface {
|
|
// Open carries a session: the first request frame names the target, later
|
|
// frames carry terminal input and sizing, and the response stream carries
|
|
// terminal output until the command exits or the session ends.
|
|
Open(grpc.BidiStreamingServer[OpenRequest, OpenResponse]) error
|
|
mustEmbedUnimplementedHarnessServiceServer()
|
|
}
|
|
|
|
// UnimplementedHarnessServiceServer 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.
|
|
type UnimplementedHarnessServiceServer struct{}
|
|
|
|
func (UnimplementedHarnessServiceServer) Open(grpc.BidiStreamingServer[OpenRequest, OpenResponse]) error {
|
|
return status.Error(codes.Unimplemented, "method Open not implemented")
|
|
}
|
|
func (UnimplementedHarnessServiceServer) mustEmbedUnimplementedHarnessServiceServer() {}
|
|
func (UnimplementedHarnessServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeHarnessServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to HarnessServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeHarnessServiceServer interface {
|
|
mustEmbedUnimplementedHarnessServiceServer()
|
|
}
|
|
|
|
func RegisterHarnessServiceServer(s grpc.ServiceRegistrar, srv HarnessServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedHarnessServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&HarnessService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _HarnessService_Open_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(HarnessServiceServer).Open(&grpc.GenericServerStream[OpenRequest, OpenResponse]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type HarnessService_OpenServer = grpc.BidiStreamingServer[OpenRequest, OpenResponse]
|
|
|
|
// HarnessService_ServiceDesc is the grpc.ServiceDesc for HarnessService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var HarnessService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "harness.v1.HarnessService",
|
|
HandlerType: (*HarnessServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Open",
|
|
Handler: _HarnessService_Open_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "harness/v1/harness.proto",
|
|
}
|