Documentation
¶
Index ¶
- Constants
- func CheckPolicy(def CommandDef, args []string) bool
- func CommandFromArgv0(argv0 string) string
- func EarlyReject(raw, command string, args []string) (string, bool)
- func EarlyRejectFromEnv(command string, args []string) (string, bool)
- func ResolveCloneBranchRef(run GitRunFunc, branch, baseBranch, baseBranchForkPoint string) (created bool, err error)
- type BindMount
- type BoidExecutor
- type BoidOp
- type BoidRequest
- type Broker
- func (b *Broker) GetContext(token string) (TokenContext, bool)
- func (b *Broker) Handle(req *ExecRequest) *ExecResponse
- func (b *Broker) Register(commands map[string]CommandDef, builtinPolicies map[string]BuiltinPolicy, ...) string
- func (b *Broker) RegisterWithSecrets(commands map[string]CommandDef, builtinPolicies map[string]BuiltinPolicy, ...) string
- func (b *Broker) Start(ctx context.Context) error
- func (b *Broker) Stop()
- func (b *Broker) TLSListenAddr() string
- func (b *Broker) Unregister(token string)
- type BuiltinPolicy
- type CloneSpec
- type CommandDef
- type ExecRequest
- type ExecResponse
- type FetchRequest
- type FileWrite
- type GitRunFunc
- type HarnessType
- type Mount
- type MountType
- type PortStore
- type Profile
- type ProjectResolver
- type Proxy
- type ProxyManager
- type RejectRule
- type SecretResolver
- type Spec
- type StreamChunk
- type Symlink
- type TokenContext
Constants ¶
const ( StreamTypeStdout = "stdout" StreamTypeStderr = "stderr" StreamTypeExit = "exit" StreamTypeKill = "kill" )
StreamChunk is one unit in the streaming host-command protocol (Streaming=true).
Broker → Shim: type "stdout"/"stderr" carry Data; type "exit" carries ExitCode. Shim → Broker: type "kill" requests SIGTERM on the host process group.
const ( DefaultProxyPortRangeLow = 30000 DefaultProxyPortRangeHigh = 32767 )
DefaultProxyPortRangeLow/High bound the default allocation band.
The band sits deliberately below the kernel's ephemeral port range (32768-60999 on every machine boid runs on): a fixed port drawn from the ephemeral range could lose a bind race against an unrelated outgoing connection. An operator who has lowered ip_local_port_range can move the band with PortRangeLow/PortRangeHigh.
const HostCommandRulesEnv = "BOID_HOST_COMMAND_RULES"
HostCommandRulesEnv is the name of the env var the dispatcher injects with a compact JSON map of command name -> reject rules (see internal/dispatcher/sandbox_builder.go). The shim reads it to reject obviously-doomed invocations before paying for a broker round trip. The broker remains the authority: this is a UX fast path only, and any parse failure or non-match here simply falls through to the broker check.
const IdentityConflictExitCode = 3
IdentityConflictExitCode is BoidOpTaskIdentityLink's distinguished exit code for "this identity is already bound to a different task" (orchestrator.ErrIdentityConflict).
const IdentityNotFoundExitCode = 2
IdentityNotFoundExitCode is BoidOpTaskIdentityResolve's distinguished exit code for "no task is bound to this identity", distinct from 0 (success) and 1 (generic failure), so a caller can tell "not found" apart from a real error purely from the exit code.
const NoCardContextExitCode = 4
NoCardContextExitCode is BoidOpCardContext's distinguished exit code for "this job has no card context" (the token's CardRequestID is empty) — distinct from 0 (success) and 1 (generic failure), so a caller can tell the two apart without pattern-matching stderr text.
const PayloadPatchMaxBytes = 10 * 1024 * 1024
PayloadPatchMaxBytes caps the size of a single BoidOpTaskUpdatePayloadPatch request's PayloadPatch content, since it crosses the broker RPC boundary into the daemon process. Enforced independently at both the shim's read and the broker's request handler.
Variables ¶
This section is empty.
Functions ¶
func CheckPolicy ¶
func CheckPolicy(def CommandDef, args []string) bool
func CommandFromArgv0 ¶
CommandFromArgv0 returns the declared short (host_commands.<name>) name for this shim invocation, derived from its argv[0]'s basename. Every shim's bind-mount basename equals its declared short name by construction (sandbox_builder's sandboxShimBinDir + hostCommandSymlinks materialize `/run/boid/bin/<name>` symlinks pointing at the boid multi-call binary), so the basename is always a trustworthy source of truth.
func EarlyReject ¶ added in v0.0.9
EarlyReject checks command/args against the reject rules encoded in raw (the BOID_HOST_COMMAND_RULES JSON payload) and returns the same rejection message the broker would produce, plus true, on the first matching rule. Malformed JSON, an absent command entry, or no matching rule all yield ("", false) so callers fall through to the broker's own check.
func EarlyRejectFromEnv ¶ added in v0.0.9
EarlyRejectFromEnv is the thin env-reading wrapper around EarlyReject used by shimMain.
func ResolveCloneBranchRef ¶ added in v0.1.0
func ResolveCloneBranchRef(run GitRunFunc, branch, baseBranch, baseBranchForkPoint string) (created bool, err error)
ResolveCloneBranchRef resolves and checks out a task's working branch in a freshly cloned repository, sharing the exact algorithm between the sandbox-internal runner path (internal/sandbox/runner/clone.go's resolveCloneBranch) and the daemon-side per-job clone path (internal/dispatcher/checkout.go's PrepareJobCheckout).
branch is the ref ultimately checked out; baseBranch is the ref whose tip provides the starting point — identical to branch for every current production caller, but kept as a separate parameter rather than collapsed away, so the declaration shape stays self-describing. Both may legitimately carry an "origin/" prefix (a project.yaml `base_branch: origin/main`) — this function strips it consistently from both before creating/checking out the local branch, so the resulting local branch is always named "main", never "origin/main".
baseBranchForkPoint, when set, is used to create baseBranch locally if it resolves on neither origin nor locally yet (ClassifyBaseBranch case 3, mirrored here since a fresh clone has no local branches yet beyond the default one `git clone` itself checked out); empty falls back to refs/remotes/origin/HEAD.
run executes a git subcommand against the target working directory (the caller's closure captures both the directory and which git binary to invoke); this function performs no I/O itself beyond calling run, so it stays unit-testable with a fake run that never shells out to a real git binary.
Returns whether a new local base branch was created from a fork point (created == true) — callers that emit their own diagnostics on that event (runner-state.json's "clone-base-branch-created" marker) use this instead of re-deriving it.
Types ¶
type BindMount ¶
type BindMount struct {
Source string
Target string // if empty, defaults to Source
Mode string // "rw" | "" (ro default)
IsFile bool // if true, treat target as a file (touch before bind, skip type detection)
Optional bool // if true, skip mount when Source does not exist on the host
}
BindMount is the dispatcher-facing DTO for arbitrary bind-mount requests. It is used by the dispatcher boundary (via SandboxSpec.AdditionalBindings) and is converted into Mount entries at the edge. The sandbox layer itself works in terms of Mount only.
type BoidExecutor ¶
type BoidExecutor interface {
ExecuteBoidBuiltin(ctx context.Context, tokenCtx TokenContext, req *BoidRequest) *ExecResponse
}
BoidExecutor performs typed boid builtin operations after broker validation.
ctx is the broker-side request context. For most ops it carries no deadline, but for the blocking BoidOpTaskAsk it is cancelled when the broker shuts down or the sandbox connection closes, so the server-side handler can stop waiting for an answer and clean up.
type BoidOp ¶
type BoidOp string
const ( BoidOpJobDone BoidOp = "job_done" BoidOpJobList BoidOp = "job_list" BoidOpJobShow BoidOp = "job_show" BoidOpJobLog BoidOp = "job_log" BoidOpActionSend BoidOp = "action_send" BoidOpAgentStop BoidOp = "agent_stop" BoidOpTaskCreate BoidOp = "task_create" BoidOpTaskGet BoidOp = "task_get" BoidOpTaskUpdate BoidOp = "task_update" BoidOpTaskImport BoidOp = "task_import" BoidOpTaskReopen BoidOp = "task.reopen" BoidOpTaskList BoidOp = "task_list" BoidOpTaskNotify BoidOp = "task_notify" BoidOpTaskAnswer BoidOp = "task_answer" BoidOpTaskAsk BoidOp = "task_ask" BoidOpTaskDelete BoidOp = "task_delete" // BoidOpTaskWait blocks until the named task reaches a terminal status and // reports how it ended (exit 0 for done, non-zero otherwise). Scoped like // every other task op. Not a timeout: a task parked in a non-terminal // resting state waits indefinitely; bounding a round belongs to whoever // launched it. BoidOpTaskWait BoidOp = "task_wait" // BoidOpTaskCurrent/Instructions/Env/Payload are the sole source of // task/instructions/environment/payload data for an in-sandbox caller // (pull-based, no dispatch-time context files). BoidOpTaskCurrent BoidOp = "task_current" BoidOpTaskInstructions BoidOp = "task_instructions" BoidOpTaskEnv BoidOp = "task_env" BoidOpTaskPayload BoidOp = "task_payload" // BoidOpTaskAttachmentsList/Get are the sole in-sandbox read path for // task attachments (pull-based, no dispatch-time bind mount). BoidOpTaskAttachmentsList BoidOp = "task_attachments_list" BoidOpTaskAttachmentsGet BoidOp = "task_attachments_get" // BoidOpTaskUpdatePayloadPatch backs `boid task update --payload-patch // <value>`: applies a payload patch immediately via // orchestrator.MergePayloadPatch (gated by the firing hook's own // Traits.Produces), rather than BoidOpTaskUpdate's simpler top-level // shallow merge. JobID-scoped like TaskInstructions/Env/Payload: the // allowedTraits gate is sourced from the dispatcher.JobContextSnapshot // captured for the calling job at dispatch time, not re-resolved live. BoidOpTaskUpdatePayloadPatch BoidOp = "task_update_payload_patch" // BoidOpProjectBehaviors backs `boid project behaviors <project-ref>`. // Scoped like BoidOpTaskList/BoidOpTaskCreate: the broker resolves // BoidRequest.ProjectID via ProjectResolver and enforces // TokenContext.AllowsProject. BoidOpProjectBehaviors BoidOp = "project_behaviors" // BoidOpProjectList backs `boid project list`. Unlike // BoidOpProjectBehaviors there is no caller-supplied ref: the executor // enumerates TokenContext.AllowedProjectIDs, so the result is // unconditionally scoped to the caller's own workspace. BoidOpProjectList BoidOp = "project_list" // BoidOpCardGet / BoidOpCardList back `boid card get <task-id>` and // `boid card list [--status S] [--project-id P] [--workspace-id W]` — // strictly READ ops over data the calling workspace already owns. // Scoping matches BoidOpActionSend: the broker only checks shape, the // executor enforces TokenContext.AllowsProject before returning anything. BoidOpCardGet BoidOp = "card_get" BoidOpCardList BoidOp = "card_list" // BoidOpTaskIdentityLink / BoidOpTaskIdentityUnlink / BoidOpTaskIdentityResolve // back `boid task identity link/unlink/resolve` — the identity index // (task_identities table, external key -> task). Link optionally accepts // a Pack-constructed absolute HTTP(S) URL and display name. Boid validates // and stores those opaque values; it does not know service URL formats. // // Scoping is broker-authoritative, matching BoidOpTaskCreate: ProjectID // defaults from the token's own context when omitted, is resolved via // ProjectResolver, and is checked against TokenContext.AllowsProject // before the executor ever sees the request. BoidOpTaskIdentityLink also // carries a caller-supplied TaskID checked in the executor // (GetTask + AllowsProject); it must use GetTask's resolved existing.ID // (not the caller-supplied prefix) since it writes into an FK column. // // BoidOpTaskIdentityResolve represents "no such binding" via a distinct // ExecResponse.ExitCode (IdentityNotFoundExitCode below), not the generic // ExitCode:1 failure path, so a get-or-create caller can tell "not // found" apart from a real error without parsing stderr. Link has its // own distinguished code for a conflicting link (IdentityConflictExitCode). BoidOpTaskIdentityLink BoidOp = "task_identity_link" BoidOpTaskIdentityUnlink BoidOp = "task_identity_unlink" BoidOpTaskIdentityResolve BoidOp = "task_identity_resolve" // BoidOpTaskResolveOrCapture backs `boid task resolve-or-capture // <identity> [--title T] [--description D|--description-file F] // [--url U] [--display-name N]`: // resolve Identity to an existing task, or atomically create a new // `captured` triage task and link Identity to it when unresolved. Kept // separate from BoidOpTaskIdentityLink/BoidOpActionSend rather than a // variant of either. When Created is false, the caller is expected to // follow up with a normal BoidOpActionSend (attrs_set). // // Scoping matches BoidOpTaskIdentityLink. Unlike Link, there is no // caller-supplied TaskID to separately verify: every task this op // returns or creates is scoped to req.ProjectID by construction. // // Conflict (Identity already bound to a different task) is represented // the same way BoidOpTaskIdentityLink represents it: IdentityConflictExitCode, // not a generic ExitCode:1. BoidOpTaskResolveOrCapture BoidOp = "task_resolve_or_capture" // BoidOpActionList backs `boid action list`: the workspace-scoped, // since-cursor read over actions — the read half of BoidOpActionSend. // Deliberately a single workspace-wide read, not per-task, so a caller // does not need O(N) brokered calls per tick to cover every task. // // Scoping is broker-authoritative, matching BoidOpCardList. TaskID // additionally narrows to one task's actions, ANDed with the // already-broker-verified project/workspace scope in the SQL query // itself — a TaskID outside the caller's scope simply matches zero rows. BoidOpActionList BoidOp = "action_list" // BoidOpSignalList / BoidOpSignalAck back `boid signal list [--claim] // [--source ...] [--state ...] [--limit N]` / `boid signal ack <id>...`: // the judgment-side read/decide surface over the signal inbox. Both are // part of the general boidPolicy (policy.go) — any hook/exec job may // scan its own workspace's inbox and ack a Signal once it has written a // judgment for it. // // BoidOpSignalAck is idempotent by construction: AckSignals only ever // sets acked_at WHERE acked_at IS NULL. // // BoidOpSignalList's --claim flag routes to ClaimSignals (attempts++) // instead of the plain read ListSignals — see BoidRequest.Claim. // --claim is DEPRECATED (2026-08-29): use a plain `signal list` followed // by BoidOpSignalClaim naming the rows actually handed to a judgment. // Kept working for daemon/workspace version skew; remove once no // workspace calls it. BoidOpSignalList BoidOp = "signal_list" BoidOpSignalAck BoidOp = "signal_ack" // BoidOpSignalClaim backs `boid signal claim <id>...`: charge one // attempt against exactly these rows, because they are the ones being // handed to a judgment — splitting claim from list keeps a wide read // from charging attempts against rows nobody actually judged. BoidOpSignalClaim BoidOp = "signal_claim" // BoidOpSignalIngest / BoidOpSignalCursorGet back `boid signal ingest` // (stdin JSONL) / `boid signal cursor` from inside a connector's exec // job. Declared here for completeness but deliberately not added to the // general boidPolicy (policy.go) — granting these two ops is a // connector-scoped, reduced policy handed only to derived trigger exec // jobs, so they are otherwise unreachable. BoidOpSignalIngest BoidOp = "signal_ingest" BoidOpSignalCursorGet BoidOp = "signal_cursor_get" // BoidOpCardContext backs `boid card context`: structured, // token-authoritative input for a card-command launcher job. No // caller-supplied id — the broker fills CardID/CardRequestID from the // token entry, same as the Connector fields above. A job with no card // context gets a clear error rather than an empty reply. BoidOpCardContext BoidOp = "card_context" // BoidOpAgentStart backs `boid agent start`: a card-command launcher's // way to create a session continuation, as a thin wrapper over the same // StartSession path the Web UI and `boid agent <harness>` already use. // Requires card context (TokenContext.CardRequestID), same precondition // as BoidOpCardContext. BoidOpAgentStart BoidOp = "agent_start" )
type BoidRequest ¶
type BoidRequest struct {
Op BoidOp `json:"op"`
JobID string `json:"job_id,omitempty"`
TaskID string `json:"task_id,omitempty"`
TaskField string `json:"task_field,omitempty"`
// ProjectID is extracted by the shim for broker authorization / project
// resolver; it is also present inside CreatePatch when the YAML includes
// project_id. The executor prefers createReq.ProjectID from CreatePatch
// and falls back to this field, then to ctx.ProjectID.
ProjectID string `json:"project_id,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
Output string `json:"output,omitempty"`
// CreatePatch is a JSON-serialised api.CreateTaskRequest. The shim builds
// it from the full YAML map so that every field (including previously
// dropped ones such as instructions, traits, readonly, worktree,
// branch_prefix, id) is forwarded without enumeration.
CreatePatch json.RawMessage `json:"create_patch,omitempty"`
// UpdatePatch is a JSON-serialised api.UpdateTaskRequest. The shim
// assembles it from --patch-file and/or individual flags (--title,
// --description, --payload-file).
UpdatePatch json.RawMessage `json:"update_patch,omitempty"`
// task import fields
ImportTasks []json.RawMessage `json:"import_tasks,omitempty"`
ImportProjectOverride string `json:"import_project_override,omitempty"`
// task list fields
WorkspaceID string `json:"workspace_id,omitempty"`
Status string `json:"status,omitempty"`
Limit int `json:"limit,omitempty"`
// task notify fields
Message string `json:"message,omitempty"`
Ask string `json:"ask,omitempty"`
QuestionID string `json:"question_id,omitempty"`
Progress string `json:"progress,omitempty"`
Done string `json:"done,omitempty"`
Fail string `json:"fail,omitempty"`
// task answer fields
Answer string `json:"answer,omitempty"`
// task ask fields. Question carries the blocking-RPC question text for
// `boid task ask <text>`. The broker holds the connection open until the
// answer arrives; the answer is returned verbatim in ExecResponse.Stdout
// (the boid builtin reply framing is ExecResponse, so no separate
// BoidResponse type is needed).
Question string `json:"question,omitempty"`
// task delete fields
Force bool `json:"force,omitempty"`
// action send fields
ActionType string `json:"action_type,omitempty"`
Payload []byte `json:"payload,omitempty"`
// task attachments get fields. AttachmentName addresses one attachment
// by its exact basename — see api.ReadAttachment for the traversal
// guard (no path separators, no ".."). Unused by
// BoidOpTaskAttachmentsList.
AttachmentName string `json:"attachment_name,omitempty"`
// PayloadPatch carries the raw patch body for BoidOpTaskUpdatePayloadPatch
// — the JSON that would otherwise go inside a file-based
// {"payload_patch": ...} envelope. Unlike UpdatePatch (a
// JSON-serialised api.UpdateTaskRequest consumed by a top-level shallow
// merge), this is merged via orchestrator.MergePayloadPatch.
PayloadPatch json.RawMessage `json:"payload_patch,omitempty"`
// Identity carries the opaque external-key string for
// BoidOpTaskIdentityLink / BoidOpTaskIdentityUnlink /
// BoidOpTaskIdentityResolve / BoidOpTaskResolveOrCapture. Never
// interpreted by the daemon — validated only for non-emptiness. Link
// additionally uses TaskID (the task to bind); scope is ProjectID for
// all four.
Identity string `json:"identity,omitempty"`
IdentityURL string `json:"identity_url,omitempty"`
IdentityDisplayName string `json:"identity_display_name,omitempty"`
IdentityURLSet bool `json:"identity_url_set,omitempty"`
IdentityDisplayNameSet bool `json:"identity_display_name_set,omitempty"`
// Title / Description carry BoidOpTaskResolveOrCapture's new-task
// fields, used only when Identity is unresolved and a fresh `captured`
// task is created; ignored when the identity already resolves to an
// existing task. Deliberately plain strings rather than a CreatePatch —
// behavior/traits/readonly/etc. all come from the resolved default
// behavior instead.
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
// Since carries BoidOpActionList's opaque cursor
// (orchestrator.EncodeActionCursor's output) — empty means "from the
// beginning".
Since string `json:"since,omitempty"`
// WorkspaceID is the scope for all four signal ops, but is never
// caller-supplied for them — the broker unconditionally overwrites it
// with entry.Context.WorkspaceID.
//
// Service/Connector serve two different ops in two different ways:
// - BoidOpSignalList: Connector is the optional --source filter, not
// broker-enforced beyond normal read scoping.
// - BoidOpSignalIngest / BoidOpSignalCursorGet: both fields are the
// connector's own identity. The shim populates them from
// BOID_SIGNAL_SERVICE / BOID_SIGNAL_CONNECTOR, but the broker is
// what actually enforces this: its case unconditionally overwrites
// these fields with TokenContext.Service/Connector, so a
// hand-crafted ExecRequest bypassing the shim can't claim an
// arbitrary Service/Connector.
Service string `json:"service,omitempty"`
Connector string `json:"connector,omitempty"`
// Claim selects BoidOpSignalList's ClaimSignals path (attempts++
// included) over the plain ListSignals read — `boid signal list
// --claim`.
Claim bool `json:"claim,omitempty"`
// SignalState filters BoidOpSignalList by orchestrator.SignalState
// (pending|dead|acked|all); empty defaults to "pending". A distinct
// field from Status (task status for the task_* ops).
SignalState string `json:"signal_state,omitempty"`
// SignalIDs carries `boid signal ack <id>...`'s positional id list (1 or
// more). AckSignals matches by (workspace_id, id) only and is
// idempotent per id.
SignalIDs []string `json:"signal_ids,omitempty"`
// IngestPayload carries the raw JSONL bytes `boid signal ingest` reads
// from stdin, capped by the shim at PayloadPatchMaxBytes. Parsing each
// line and validating required fields happens server-side in the
// executor, not in the shim.
IngestPayload []byte `json:"ingest_payload,omitempty"`
// agent start fields (BoidOpAgentStart), mirroring
// api.StartSessionRequest. ProjectID above doubles as that request's
// ProjectID.
HarnessType string `json:"harness_type,omitempty"`
Instruction string `json:"instruction,omitempty"`
Readonly bool `json:"readonly,omitempty"`
Model string `json:"model,omitempty"`
DisplayName string `json:"display_name,omitempty"`
}
type Broker ¶
type Broker struct {
SocketPath string
BoidBinary string
BoidExecutor BoidExecutor
ProjectResolver ProjectResolver
// TLSAddr, when non-empty, additionally binds a TCP+mTLS listener at
// this address. This is purely additive — the UNIX socket above
// (SocketPath) is bound exactly as before regardless of TLSAddr.
// TLSConfig must be non-nil whenever TLSAddr is set (see
// internal/mtls.CA.ServerTLSConfig for how to build one with
// mutual-TLS auth wired up); a caller that leaves TLSAddr empty gets
// the UNIX-only behavior unchanged.
//
// internal/server.Server sets these (when its Config.TLSDir is
// configured) so a real daemon actually binds this listener alongside
// the UNIX socket.
TLSAddr string
TLSConfig *tls.Config
// contains filtered or unexported fields
}
func (*Broker) GetContext ¶
func (b *Broker) GetContext(token string) (TokenContext, bool)
func (*Broker) Handle ¶
func (b *Broker) Handle(req *ExecRequest) *ExecResponse
Handle dispatches a request using the broker's base context. Retained for callers (mainly tests) that drive the broker synchronously without a per-connection context; the live socket path uses handle with a request ctx.
func (*Broker) Register ¶
func (b *Broker) Register(commands map[string]CommandDef, builtinPolicies map[string]BuiltinPolicy, ctx TokenContext) string
func (*Broker) RegisterWithSecrets ¶
func (b *Broker) RegisterWithSecrets(commands map[string]CommandDef, builtinPolicies map[string]BuiltinPolicy, ctx TokenContext, resolver SecretResolver) string
func (*Broker) TLSListenAddr ¶ added in v0.1.0
TLSListenAddr returns the bound address of the TCP+mTLS listener (e.g. "127.0.0.1:54321"), or "" if TLSAddr was empty or Start has not bound it yet.
func (*Broker) Unregister ¶
type BuiltinPolicy ¶
type BuiltinPolicy struct {
AllowedOps map[string]struct{}
// AllowedCwdRoots lists additional cwd roots permitted for this builtin
// beyond the per-token entry root (project/worktree dir). Used so that
// e.g. gate jobs can target /tmp or the host project dir without the
// broker needing to know the role itself.
AllowedCwdRoots []string
}
BuiltinPolicy defines which operations are permitted for a named builtin command. It is stamped at token registration time by the planner and checked at dispatch time by the broker, keeping all role-based authorization logic outside the broker itself.
func (BuiltinPolicy) Allows ¶
func (p BuiltinPolicy) Allows(op string) bool
Allows reports whether op is in the allowed set.
func (BuiltinPolicy) AllowsCwd ¶
func (p BuiltinPolicy) AllowsCwd(cwd string) bool
AllowsCwd reports whether cwd is within any of the policy's additional cwd roots.
type CloneSpec ¶ added in v0.0.10
type CloneSpec struct {
// Enabled gates the entire sequence.
Enabled bool
// URL is the full gateway clone URL, e.g.
// "http://10.0.2.2:<port>/j/<job-token>/<host>/<owner>/<repo>.git". It
// carries a live job token — see runner/state.go's redactCloneURLToken,
// which strips the token before this value (or anything derived from
// it) is written to runner-state.json.
URL string
// ReferenceDir is the sandbox-internal path of the RO bind-mounted host
// repo `.git` used as `git clone --reference`. Empty (or missing on
// disk at clone time) disables --reference: the clone still succeeds,
// just without the object-sharing optimization — graceful degradation,
// not a hard dependency.
ReferenceDir string
// TargetDir is the sandbox-internal neutral path to clone into. An
// existing TargetDir is removed before cloning, so reopen (re-running
// this same sequence) is idempotent by re-clone rather than
// fetch-in-place.
TargetDir string
// RealGitBin is the sandbox-internal path of a real (non-shimmed) git
// binary so the runner's own clone/branch-resolution git invocations
// are not routed through the broker-dispatch git builtin. Empty falls
// back to a bare "git" lookup on $PATH.
RealGitBin string
// Branch, BaseBranch, CheckoutOnly and BaseBranchForkPoint mirror
// orchestrator.CloneDeclaration 1:1 — see that type's doc comments for
// the exact resolution semantics.
Branch string
BaseBranch string
CheckoutOnly bool
BaseBranchForkPoint string
}
CloneSpec is the runner-facing declaration of the sandbox-internal git clone + branch resolution launch sequence. It is the sandbox.Spec-level counterpart of orchestrator.CloneDeclaration: dispatcher's BuildSandboxSpec fills in the concrete gateway clone URL, the sandbox-internal mount paths, and the real (non-shimmed) git binary path that orchestrator has no business knowing about.
The zero value (Enabled == false) is a complete no-op: the runner skips the whole sequence.
type CommandDef ¶
type CommandDef struct {
Name string
Path string
AllowedPatterns []string
DeniedPatterns []string
AllowedSubcommands []string
Env map[string]string
RejectRules []RejectRule
// MissingSecrets lists "ENV_NAME (secret:key)" entries for env vars that
// the kit declared via the "secret:" prefix but failed to resolve at
// register time. When non-empty, the broker rejects exec requests for
// this command (fail-closed) instead of silently letting host env /
// host-side config fallbacks take over.
MissingSecrets []string
}
CommandDef is the canonical sandbox-side policy for brokered host commands. Dispatcher and orchestrator mirror this shape as transport data, but the policy semantics live here.
func (CommandDef) MissingSecretsMessage ¶ added in v0.0.6
func (d CommandDef) MissingSecretsMessage() string
MissingSecretsMessage returns the human-readable rejection message used when a host_command is invoked despite unresolved declared secrets. Returns an empty string if MissingSecrets is empty.
type ExecRequest ¶
type ExecRequest struct {
Command string `json:"command"`
Args []string `json:"args"`
Cwd string `json:"cwd,omitempty"`
Token string `json:"token"`
Boid *BoidRequest `json:"boid,omitempty"`
Fetch *FetchRequest `json:"fetch,omitempty"`
Streaming bool `json:"streaming,omitempty"`
}
ExecRequest carries a broker-mediated host command invocation. The broker never wires caller-provided stdin into the host process (see the host command gate in broker.go / broker_streaming_linux.go); host commands always run with stdin connected to /dev/null.
type ExecResponse ¶
type ExecResponse struct {
ExitCode int `json:"exit_code"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
}
func ExecFetch ¶ added in v0.0.5
func ExecFetch(req *FetchRequest) *ExecResponse
ExecFetch performs an HTTP GET on the host (no broker involved) and returns the result as an ExecResponse. Used by the `boid fetch` CLI subcommand.
func RunBoidShim ¶
func RunBoidShim(args []string) (*ExecResponse, error)
func ShimExec ¶
func ShimExec(command string, args []string) (*ExecResponse, error)
ShimExec sends a host command request to the broker using the streaming protocol so that stdout/stderr is forwarded in real-time and signals (Ctrl-C) are propagated to the host process group.
command is the declared short name from CommandFromArgv0, which is what the broker's Commands map is keyed by (dispatcher.ResolveHostCommands' byName view).
type FetchRequest ¶ added in v0.0.5
type FetchRequest struct {
URL string `json:"url"`
}
FetchRequest carries the parameters for a broker-mediated HTTP GET. Only GET is supported; the broker performs the request on the host and returns the response body (HTML converted to markdown, other types verbatim).
type FileWrite ¶
FileWrite describes a file to materialize inside the sandbox. Content is written verbatim (shell-quoted at render time); the parent directory is created with mkdir -p beforehand.
type GitRunFunc ¶ added in v0.1.0
GitRunFunc runs a single git subcommand (args, without the leading "git") against a directory a closure captures, returning any error from the underlying process. Both internal/dispatcher's and internal/sandbox/ runner's own git-exec primitives can be adapted to this shape with a one-line closure — see their respective call sites of ResolveCloneBranchRef below.
type HarnessType ¶ added in v0.0.6
type HarnessType string
HarnessType identifies which HarnessAdapter the runner should hand the process off to via adapter.Run(). Non-empty for every dispatched job — hook / session / exec all resolve to shell / claude / codex / opencode. The empty string is not a valid value; runner-inner-child rejects it.
const ( // HarnessShell routes through internal/adapters/shell.Adapter.Run() and // is the fall-through for hooks without an `agent:` declaration, every // `boid exec` job, and the default for unknown agent values. Shell // adapter forwards SIGUSR1 / SIGWINCH and normalises stop-signal exits // like the agent adapters do but performs no session resolution. HarnessShell HarnessType = "shell" // HarnessClaude routes through internal/adapters/claude.Adapter.Run(). HarnessClaude HarnessType = "claude" // HarnessCodex routes through internal/adapters/codex.Adapter.Run(). A // minimum implementation: 1-turn launch with signal forwarding; session // resume / payload patch are deliberately left as no-ops. HarnessCodex HarnessType = "codex" // HarnessOpenCode routes through internal/adapters/opencode.Adapter.Run(), // same scope as HarnessCodex. HarnessOpenCode HarnessType = "opencode" )
type Mount ¶
type Mount struct {
// Source is what gets mounted, and its SPELLING selects between two
// kinds. An absolute path is a host path; anything else is taken to be a
// docker NAMED VOLUME name — that is the whole of
// internal/sandbox/realization.classifySource's rule, deliberately
// reused rather than adding a MountType, so the workspace HOME mount is
// an ordinary MountBind whose Source is
// dockerres.WorkspaceHomeVolumeName(...). Empty for tmpfs.
//
// The consequence worth stating: a relative path that reaches this field
// by accident is not a broken path, it is a volume name. The container
// backend fails Launch closed on one that does not match docker's volume
// grammar (dockerres.IsValidVolumeName), but a *plausible-looking* one
// would be created as a junk volume, so callers must never construct this
// value by joining onto something that might not be absolute.
Source string
Target string // absolute path inside sandbox
Type MountType
ReadOnly bool
Slave bool // mount --make-rslave after mounting
IsFile bool // target is a file, not a directory
DetectType bool // detect file vs dir at runtime (if/elif)
Guard string // shell test expression; if non-empty, wrap in if [ $Guard ]; then
NeedsDirs []string // subdirs to create under Target before ro remount
// HostBacked overrides realization.classifySource's default treatment
// of a `/workspace`/`/workspace/<name>` Target as container-local — when
// true, Source is classified as a real host-path bind
// (MountSourceHostPath) even though Target falls under the
// sandbox-internal clone parent dir. Used by dispatcher.cloneMounts:
// when the daemon has already pre-populated Source via
// dispatcher.PrepareJobCheckout (`git clone file://<bare-repo>` into a
// per-job staging dir under a host-visible runtimes root), the
// container backend must bind that real directory in — not skip it as
// "the in-container clone target, created fresh". Default false
// (byte-for-byte unchanged classification) for every other caller.
HostBacked bool
}
Mount describes a single filesystem mount applied inside the sandbox. Types: bind, rbind, tmpfs. Flags cover read-only remount, file vs dir handling, slave propagation, guards, and required sub-directory creation.
type PortStore ¶ added in v0.2.4
type PortStore interface {
// LoadPort returns the port recorded for key. ok is false when the key
// has no record yet.
LoadPort(key string) (port int, ok bool, err error)
// SavePort records port as key's allocation, replacing any previous
// record for that key.
SavePort(key string, port int) error
// ReservedPorts returns every recorded reservation as port -> key.
//
// Needed because "is this port free?" and "is this port spoken for?"
// are different questions here: a listener is created lazily at
// dispatch time, so a workspace that has not run since the last
// restart has a reservation with nothing listening on it, and binding
// such a port would silently steal it.
ReservedPorts() (map[int]string, error)
}
PortStore persists the port allocated to a proxy key across daemon restarts. Implemented outside this package (internal/sandbox must not import internal/db) and injected, the same shape dispatcher.ProxyAllocator already uses in the other direction.
Both methods are best-effort from the manager's point of view: an error from either degrades port stability but never fails dispatch.
type Profile ¶ added in v0.0.8
type Profile int
Profile selects the sandbox filesystem layout strategy. The zero value (ProfileDefault) preserves the existing behaviour so callers that do not set the field are unaffected.
const ( // ProfileDefault is the standard layout: a small set of host system dirs // (/bin, /sbin, /lib, /lib64, /usr, /etc) are ro-rbind-mounted plus // /dev, /proc, and a /tmp tmpfs. Broker socket and registration proceed // normally. This is the zero value; any Spec where Profile is not set // explicitly uses this layout. ProfileDefault Profile = iota // ProfileInit is the host-scan layout used by kit-init / workspace-configure // generation scripts. The entire host root (/) is ro-rbind-mounted so the // agent can discover installed tools without needing explicit allowlists. // Broker registration and the broker socket mount are both skipped because // init scripts do not call back into boid host-commands. ProfileInit )
type ProjectResolver ¶
ProjectResolver maps a project reference (UUID, exact name, or partial name) to a concrete project UUID. The broker calls it just before the UUID-based AllowsProject authorization check so that sandbox-side callers (e.g. plan agents) can use project names while the broker continues to enforce workspace isolation in UUID space. When nil, the broker passes refs through verbatim (tests and UUID-only callers).
type Proxy ¶
type Proxy struct {
// BindHost, when non-empty, overrides Start's default loopback-only
// bind ("127.0.0.1") — see ProxyManager.BindHost's own doc comment for
// the container-backend rationale. Must be set before Start is called;
// changing it afterward has no effect on an already-bound listener.
BindHost string
// DesiredPort, when non-zero, is the port Start binds to instead of
// letting the kernel pick an ephemeral one (`:0`). Start returns the
// bind error unchanged when the port is unavailable — deciding whether
// that is fatal or worth retrying on another port belongs to the
// caller, not here (ProxyManager treats it as retryable). Must be set
// before Start.
DesiredPort int
// contains filtered or unexported fields
}
func (*Proxy) SetAllowed ¶ added in v0.0.8
SetAllowed replaces the proxy egress allowlist atomically. Subsequent CONNECT and HTTP-forward requests use the new list. Existing CONNECT tunnels (hijacked TCP connections) are unaffected — that is intentional: once an egress decision has been made for a long-lived TLS connection, pulling its destination out of the allowlist mid-stream would surface as an opaque socket close to the sandbox. Sandboxes that reconnect after SetAllowed will be re-validated against the new list.
func (*Proxy) Stop ¶
func (p *Proxy) Stop()
Stop closes the listener and every connection served through it.
Both the server AND the listener are closed, which looks redundant but is not: Start hands the listener to http.Server.Serve on a NEW GOROUTINE, and if Stop's Close lands before that goroutine gets scheduled, Serve's own trackListener call sees the already-shutting-down server, returns ErrServerClosed immediately, and never closes the listener it was handed. The socket then stays bound for the life of the process — harmless while ports were ephemeral, but not now that a port is meant to be reused across restarts (see TestProxyManager_ReusesPersistedPort).
type ProxyManager ¶ added in v0.0.8
type ProxyManager struct {
// BindHost, when non-empty, overrides the loopback-only default
// ("127.0.0.1") every listener GetOrCreate binds to. A container-backend
// deploy runs the daemon inside its own container; a sibling job
// container reaches the egress proxy over the shared compose network by
// this daemon container's own IP, which a loopback-bound listener is
// unreachable from. Set once, before Start, and never changed again.
// Empty preserves the original "127.0.0.1" behavior.
BindHost string
// PortStore, when non-nil, makes a listener's port survive daemon
// restarts: the port allocated for a key is written here and reused on
// the next process lifetime. Otherwise a tool that bakes the proxy port
// into a config file (e.g. ~/.npmrc) breaks silently after a restart
// moves the port. nil keeps the original ephemeral (`:0`) behaviour.
PortStore PortStore
// PortRangeLow/PortRangeHigh bound the band new ports are allocated
// from, inclusive. Zero means DefaultProxyPortRange{Low,High}. Only
// consulted when PortStore is set.
PortRangeLow int
PortRangeHigh int
// contains filtered or unexported fields
}
ProxyManager owns a set of long-lived per-workspace HTTP(S) egress proxies. Each workspace gets its own listener on a distinct loopback port; the allowlist of every listener can be live-swapped via Proxy.SetAllowed so dispatch-time changes take effect immediately for the next sandbox without restarting the listener.
Concurrent sandboxes launched under the same workspace share one listener — when their resolved allowlists differ, the most recent dispatch wins.
A ProxyManager is created via NewProxyManager and must be started with Start(ctx) before GetOrCreate is called. StopAll closes every listener; the manager is single-shot and must not be reused after StopAll.
func NewProxyManager ¶ added in v0.0.8
func NewProxyManager() *ProxyManager
NewProxyManager returns a fresh, unstarted ProxyManager.
func (*ProxyManager) Count ¶ added in v0.0.8
func (m *ProxyManager) Count() int
Count returns the number of active per-workspace listeners. Useful for diagnostics and tests; not part of the dispatch hot path.
func (*ProxyManager) GetOrCreate ¶ added in v0.0.8
func (m *ProxyManager) GetOrCreate(workspaceID string, allowed []string) (int, error)
GetOrCreate returns the port of the listener bound to workspaceID after (re)applying allowed as its egress allowlist. If no listener exists yet for workspaceID, a new one is started on a free loopback port.
allowed is copied internally — callers may mutate the slice after the call. An empty workspaceID is a programmer error: the manager refuses to allocate an unkeyed listener.
func (*ProxyManager) Start ¶ added in v0.0.8
func (m *ProxyManager) Start(ctx context.Context)
Start binds the manager to ctx. Listener teardown follows ctx cancellation; StopAll() is the explicit alternative.
func (*ProxyManager) StopAll ¶ added in v0.0.8
func (m *ProxyManager) StopAll()
StopAll closes every listener owned by the manager. Subsequent GetOrCreate calls return an error.
type RejectRule ¶ added in v0.0.9
RejectRule declares a pattern that rejects an invocation with a human-readable reason. Match is a glob over the joined args string with the same semantics as allow/deny patterns (globMatch below). Enforced by gateHostCommand (broker.go) as the authority, and mirrored by the shim's EarlyReject fast path (shim_reject.go), which needs the json tags.
type SecretResolver ¶
type Spec ¶
type Spec struct {
// ID is the job id; it namespaces the generated /tmp/boid-<ID>-* files.
ID string
// --- Filesystem primitives ---
// Mounts are applied in order to compose the sandbox root filesystem.
Mounts []Mount
// Files are materialized inside the sandbox (after pivot_root) before the
// entry command runs.
Files []FileWrite
// Symlinks are created inside the sandbox.
Symlinks []Symlink
// --- Network ---
// ProxyPort, when > 0, engages the nft drop policy + HTTP proxy env vars.
ProxyPort int
// --- Process ---
// Argv is the program and arguments to invoke (POSIX argv).
Argv []string
// WorkDir is the cwd for the entry process. Also used as the cwd reported to
// the broker for the job-done call (must be within the project/worktree root).
WorkDir string
// Env is the environment for the entry process.
Env map[string]string
// StdinBytes, when non-empty, is piped into the entry's stdin.
StdinBytes []byte
// StdoutCaptureFile, when non-empty, redirects stdout to that sandbox-internal
// path. Doubles as the job-done output fallback when no payload patch exists.
StdoutCaptureFile string
// TTY, when true, the entry process inherits the caller's PTY on stdio.
TTY bool
// --- Completion / broker ---
// Foreground indicates a user-facing job (boid exec): stdout/stderr are
// inherited and no broker job-done callback fires on exit. Hook jobs leave
// this false so the runner posts `boid job done` through the broker.
// Broker socket path and token are carried in Env (BOID_BROKER_SOCKET /
// BOID_BROKER_TOKEN). Agents / hook scripts apply their payload patch
// immediately via the broker's `boid task update --payload-patch` RPC —
// see runner.resolveJobOutput's doc comment.
Foreground bool
// --- Bookkeeping ---
// RootDir, if non-empty, is the host directory used as the sandbox ROOT (a
// tmpfs is mounted on it). Go-side cleanup removes it after exit.
RootDir string
// CleanupPaths are removed by runner-outer after the sandbox process tree
// exits (used for staging dirs). Removal runs in the host mount namespace,
// where the sandbox's bind mounts are already gone.
CleanupPaths []string
// HarnessType, when non-empty, directs runner-inner-child to hand the
// agent process off to the matching HarnessAdapter.Run() instead of
// exec-ing Argv verbatim. Empty preserves the legacy exec path used by
// boid exec jobs and any non-agent hook job. See sandbox.HarnessType.
HarnessType HarnessType
// UserAnswer carries the Q&A reply that should be threaded into the
// adapter's RunContext.UserAnswer. Empty for fresh starts and for resumes
// without a Q&A reply.
UserAnswer string
// Profile selects the filesystem layout strategy. Zero value (ProfileDefault)
// preserves the existing behaviour. Set to ProfileInit for kit-init /
// workspace-configure generation scripts that need to read the full host FS.
Profile Profile
// Clone declares the opt-in sandbox-internal clone + branch resolution
// sequence runner-inner-child performs before handing off to the
// harness. Zero value (Clone.Enabled == false) is a no-op — see
// CloneSpec's doc comment.
Clone CloneSpec
// ContainerImage is the container backend's image-selection input: the
// workspace-level `orchestrator.WorkspaceMeta.ContainerImage` override,
// threaded through unchanged from SandboxRuntimeInfo.ContainerImage by
// BuildSandboxSpec. Empty means "use the backend's configured default
// image" (the shared boid base image). When non-empty,
// containerBackend.Launch treats it as a workspace override that must
// pass the "derived from the boid base image" check before use:
// `docker inspect` the image and require the `boid.runner_protocol`
// label to match, rejecting Launch otherwise.
ContainerImage string
// HomeSkeletonRoot is the absolute in-sandbox path the workspace HOME is
// mounted at, i.e. $HOME. It is the root HomeSkeletonDirs' entries are
// relative to, and — because the HOME mount is the whole of the workspace
// home volume — it is also the point that separates an in-container path
// from a path INSIDE the volume.
//
// That second role is why it is carried at all rather than being implied.
// The only repair for what HomeSkeletonDirs detects is deleting the
// offending directory from the host side (`docker volume inspect`'s
// Mountpoint, under `podman unshare` or `sudo`), and the path to give the
// operator there is <Mountpoint>/<the entry>, NOT <Mountpoint>/<the
// in-container absolute path>. Those differ by exactly this prefix, and
// naming the wrong one sends the operator to a path that does not exist:
// they delete nothing, the uid-0 directory survives, and the next job fails
// the same check — a loop the error itself caused.
//
// Empty when HomeSkeletonDirs is empty. A non-empty skeleton with no root
// is a wiring bug and the runner fails the job rather than resolving the
// entries against whatever the process's cwd happens to be.
HomeSkeletonRoot string
// HomeSkeletonDirs are directories, RELATIVE to HomeSkeletonRoot, that
// must already exist and be owned by the uid the sandbox runs as before
// the harness starts. The container runner checks them and fails the job
// when one is not (internal/sandbox/runner's verifyHomeSkeleton).
//
// Relative rather than absolute so that they are the same values the rest
// of the mechanism already speaks in: dispatcher.workspaceHomeSkeletonDirs
// produces them relative to the home, the init container's prelude mkdir's
// them relative to the home, and the completion marker records them
// relative to the home. An absolute spelling here would be a fourth
// representation, convertible back only by string surgery at the point
// where it matters most (see HomeSkeletonRoot).
//
// They are the workspace HOME's bind-target ancestors — .claude and
// .claude/skills. The check exists because an ABSENT bind target is created
// by the container ENGINE, at container start, as uid 0: measured on podman
// 4.9.3 with a named-volume home and keep-id, ~/.claude comes out
// root-owned and the uid-1000 harness can no longer write
// ~/.claude/.credentials.json, which under rootless podman neither it nor
// the daemon can repair (the host-side owner is a subuid). The symptom
// without this check is not an error but a workspace whose authentication
// silently stops persisting.
//
// # Why the per-skill LEAVES are not in here
//
// The set the prelude creates also has one entry per embedded skill
// (.claude/skills/<name>), and those are deliberately excluded: each is
// itself a read-only bind target in this same Spec, so by the time this
// process runs, os.Stat on one reads the BIND SOURCE — the daemon-side
// materialized skill directory — not the directory inside the volume. A
// check that cannot observe its subject is not a weaker check, it is a
// different one, and dispatcher.homeSkeletonDirs drops any entry a mount
// covers rather than pretending otherwise. See its doc comment for what
// that leaves exposed (a stale, empty, root-owned leaf survives in the
// volume, harmlessly, until a release stops shipping that skill).
//
// Verification lives HERE rather than on the daemon side because the home
// is a docker named volume: the daemon can neither stat nor repair
// anything inside it. The check must sit outside whatever creates these
// directories (the init container's prelude does), and the job container
// satisfies that while also being the only place that observes the state
// the harness will actually meet — after the engine's auto-creation, as the
// harness's own uid.
//
// Empty means "nothing to check": test wiring, and any sandbox with no
// workspace home (the tmpfs-HOME degrade in dispatcher.homeMounts).
HomeSkeletonDirs []string
}
Spec describes a sandbox invocation in primitives only. The sandbox layer knows nothing about Role / Task / Job / Broker / Hook — all of those are the caller's concern. Everything needed to build and run the sandbox must already be present as mounts, files, env, argv, etc.
Spec is JSON-serialized by the dispatcher to /tmp/boid-<ID>-runner-spec.json and read back by the go-native runner subcommands (runner-outer / runner-inner / runner-inner-child). All fields are exported so the default encoding/json round-trip is exact.
type StreamChunk ¶
type Symlink ¶
type Symlink struct {
LinkPath string // absolute path inside sandbox (where the symlink is created)
LinkTarget string // what the symlink points to (resolved relative to LinkPath)
}
Symlink describes a symlink to create inside the sandbox.
type TokenContext ¶
type TokenContext struct {
JobID string
TaskID string
ProjectID string
WorkspaceID string
AllowedProjectIDs []string
Role string
// ProjectDir is the project's host-side work directory. Independent of
// spec.Visibility.ProjectDir (sandbox mount layout, empty for gate
// jobs): host-side operations the broker performs on behalf of the
// sandbox have their own notion of "which project" regardless of what
// the sandbox itself can see.
ProjectDir string
// Service / Connector are the token-registration-time-stamped identity
// a connector job is authorized to ingest/read the cursor for.
// BoidOpSignalIngest / BoidOpSignalCursorGet's broker case
// unconditionally overwrites BoidRequest.Service/Connector with these
// values, so a hand-crafted ExecRequest bypassing the shim can't claim
// an arbitrary Service/Connector. Empty until a connector-scoped token
// registration populates them.
Service string
Connector string
// SandboxRoot is the sandbox-internal (not host-side) root directory a
// clone-mode job's filesystem lives under, set by dispatcher when
// spec.Visibility.Clone != nil. Unlike ProjectDir this is never a host
// path, so cwd-based authorization must compare against this
// sandbox-side path instead. Empty for every non-clone job.
SandboxRoot string
// CardID / CardRequestID identify the card_requests row a card-command
// launcher job was dispatched to service — the ONLY fields
// BoidOpCardContext trusts, never a caller-supplied id (same
// broker-fills-from-token pattern Service/Connector use above). Both
// empty for every job that isn't a card-command launcher.
CardID string
CardRequestID string
}
func (TokenContext) AllowsProject ¶
func (c TokenContext) AllowsProject(projectID string) bool
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package backend defines the SandboxBackend/SandboxSession seam that separates "how a sandboxed agent process is launched and attached to" from the dispatcher's job orchestration.
|
Package backend defines the SandboxBackend/SandboxSession seam that separates "how a sandboxed agent process is launched and attached to" from the dispatcher's job orchestration. |
|
Package brokerclient holds the low-level transport for talking to the boid broker over its UNIX socket or its TCP(mTLS) listener, plus a self-contained JobDone helper.
|
Package brokerclient holds the low-level transport for talking to the boid broker over its UNIX socket or its TCP(mTLS) listener, plus a self-contained JobDone helper. |
|
Package realization translates a backend-neutral sandbox.Spec into the intermediate representation a container backend needs to build a `docker create` call: volumes/binds, tmpfs mounts, environment, working directory and argv.
|
Package realization translates a backend-neutral sandbox.Spec into the intermediate representation a container backend needs to build a `docker create` call: volumes/binds, tmpfs mounts, environment, working directory and argv. |
|
Package runner is the container-backend sandbox runner entry point (`boid runner-container`, runner_container_linux.go's RunContainer).
|
Package runner is the container-backend sandbox runner entry point (`boid runner-container`, runner_container_linux.go's RunContainer). |