Quality / check (push) Canceled after 0s
* 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
73 lines
2.3 KiB
Protocol Buffer
73 lines
2.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package harness.v1;
|
|
|
|
// 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".
|
|
service HarnessService {
|
|
// 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.
|
|
rpc Open(stream OpenRequest) returns (stream OpenResponse);
|
|
}
|
|
|
|
// OpenRequest is one client frame. The first frame must be target; a frame
|
|
// with no field set is a keepalive the server ignores.
|
|
message OpenRequest {
|
|
oneof frame {
|
|
// target names the session and must be the first frame.
|
|
OpenTarget target = 1;
|
|
// stdin is terminal input bytes.
|
|
bytes stdin = 2;
|
|
}
|
|
// size is the terminal size the client wants, in character cells. The
|
|
// dashboard sends it with the target frame so the PTY is created at the
|
|
// right size; the daemon falls back to its own default when it is absent.
|
|
ConsoleSize size = 3;
|
|
}
|
|
|
|
// OpenResponse is one server frame.
|
|
message OpenResponse {
|
|
oneof frame {
|
|
// stdout is terminal output bytes.
|
|
bytes stdout = 1;
|
|
// exit_code ends the session: the command's exit status.
|
|
int32 exit_code = 2;
|
|
// error ends the session when it could not be opened or was aborted.
|
|
string error = 3;
|
|
}
|
|
}
|
|
|
|
// OpenTarget addresses one session. A setup session is addressed by Kit
|
|
// profile and is ephemeral; a run session is addressed by task and attempt and
|
|
// is bounded by the task.
|
|
message OpenTarget {
|
|
string org = 1;
|
|
oneof target {
|
|
SetupTarget setup = 2;
|
|
RunTarget run = 3;
|
|
}
|
|
}
|
|
|
|
// SetupTarget runs the CLI's own login in an ephemeral container built from
|
|
// the named agent profile's Kit.
|
|
message SetupTarget {
|
|
string profile = 1;
|
|
}
|
|
|
|
// RunTarget is a running task's sandbox. The daemon follows its output
|
|
// read-only and ignores stdin; a finished or unknown task or attempt is
|
|
// NotFound, with the reason in the status message.
|
|
message RunTarget {
|
|
int64 task_id = 1;
|
|
int64 attempt = 2;
|
|
}
|
|
|
|
// ConsoleSize is a terminal size in character cells.
|
|
message ConsoleSize {
|
|
uint32 rows = 1;
|
|
uint32 cols = 2;
|
|
}
|