Expand description
Bounded, privacy-minimized domain contract for the adjacent harness kernel.
Harness workflow state is explicit operator/agent intent. Monitoring facts are deliberately absent from this crate and cannot mutate task state.
Structs§
- Harness
Artifact Ref - Harness
Cancel Task Request V1 - Harness
Context Pack Lineage V1 - Harness
Context Permissions V1 - Harness
Context Source Selection V1 - Harness
Continuation Ref - Harness
Continuation V1 - Harness
Create Task Request V1 - Harness
Delivery Bundle Digest V1 - Harness
Delivery Bundle IdV1 - Harness
Delivery Bundle Revision V1 - Harness
Delivery Bundle Selection V1 - Harness
Delivery Bundle V1 - Harness
Delivery Component Count V1 - Harness
Delivery Manifest Digest V2 - Harness
Delivery Receipt V1 - Harness
Delivery Ref - Harness
Delivery Stage Receipt V1 - Harness
Delivery V1 - Harness
Dispatch Intent V1 - Harness
Execution Spec Id - Harness
Failure V1 - Harness
Grant Target V1 - Harness
Idempotency Ref - Harness
Inline Ref - Harness
Launch Plan RefV1 - Harness
Launch Target Selection V1 - Harness
Move Task Request V1 - Harness
Operation Id - Harness
Operation Timeouts V1 - Harness
Operation V1 - Harness
Operator Authority V1 - Harness
Read Permissions V1 - Independent object-level read scopes. A visible object’s references do not themselves authorize reading the referenced objects.
- Harness
Receipt Ref - Harness
Replace Task Execution Spec Request V1 - Harness
Replace Task Request V1 - Harness
Request Digest - Harness
Resolved Context Pack Receipt V1 - Harness
Result Ref - Harness
Retry Task Request V1 - Harness
Revision - Harness
RunGit Commit Summary V1 - Harness
RunGit Facts V1 - Harness
RunGit Status Entry V1 - Harness
RunGit Summary V1 - Harness
RunId - Harness
RunIntent V1 - Harness
RunV1 - Harness
Runtime Identity V1 - Harness
Schedule Next Request V1 - Harness
Schedule Request V1 - Harness
Scheduled Launch RefV2 - Harness
Selector V1 - Harness
Session Binding V1 - Harness
Start Task Request V1 - Harness
Task Execution Spec Input V1 - Harness
Task Execution Spec Input V2 - Harness
Task Execution Spec V1 - Harness
Task Execution Spec V2 - Harness
Task Id - Harness
Task Launch Issuance Id - Harness
Task Launch Issuance RefV1 - Harness
Task Launch Issuance V1 - Harness
Task Permissions V1 create/mutategateg4a_task_create/g4a_task_move(D5, Slice D: an agent’s own subtree only, never system-wide).#[serde(default)]on both so a grant persisted before Slice D decodes withcreate: false,mutate: falserather than failing closed on the whole record – the rule since 2026-09-05: a persisted type gains a field only behind#[serde(default)], proven by a test deserializing the pre-Slice-D shape (the same disciplineread_permissionsalready established).- Harness
Task Start Outcome V1 - Harness
Task V1 - Session
Grant Id - Session
Grant V1
Enums§
- Harness
Actor V1 - Harness
Approval Level V1 - Wire mirror of
gate4agent_types::ApprovalLevel– this crate has no dependency ongate4agent-types(see the module doc: a bounded, privacy-minimized domain contract, not a re-export surface), so the four levels are named again here rather than imported. Keep the variant set and theFullAutodefault in exact lockstep withApprovalLevel’s own; the two are converted between at the one boundary that links both crates (hatchery-harness-service), never compared or serialized against each other directly. - Harness
Context Source Availability V1 - Harness
Continuation Cleanup State V1 - Harness
Continuation Outcome Unknown Reason V1 - Harness
Continuation State V1 - Harness
Delivery Component Kind V1 - Harness
Delivery State V1 - Harness
Entity Read Scope V1 - Entity-local read authority rooted at the grant’s actor run.
- Harness
Execution Mode V1 - Harness
Expected Execution Spec Revision V1 - Harness
Failure Category V1 - Harness
Launch Authority RefV1 - Harness
Launch Worktree Selection V1 - Harness
Monitoring Visibility V1 - Harness
Operation Kind V1 - Harness
Operation State V1 - Harness
Outcome Unknown Reason V1 - Harness
Reconciliation Outcome V1 - Harness
Result Disposition V1 - Harness
RunFinish Outcome V1 - The two, and only two, outcomes
g4a_run_finishaccepts (measured 2026-09-09: the agent-facing surface has no verb a session can use to report its own work finished, so nothing it does ever reachesDone– see this type’s own call site,HarnessReadRequestV1::RunFinish, for the full account).DoneandFailedname a definitive self-report, never a partial or in-progress state – there is no third value, by design: a session is either closing its own run as succeeded or as failed, not asking for anything in between. - Harness
RunFinish Result V1 - The outcome of one
g4a_run_finishcall: resolves the caller’s OWN run from its grant binding (actor_run_id) – there is no run-id argument, so a session can never finish another session’s run.Finishednames the run/task paircommit_lifecycle_projection(gate4agent-harness- service) actually transitioned and the outcome it recorded;task_idis the run’s own task, landed inReview(neverDone– the review gate a session cannot skip) fordone, or inFailedforfailed.AlreadyFinishedis the same “named refusal, never a silent no-op” disciplineHarnessTaskMoveResultV1::RevisionConflictestablished forg4a_task_move: a secondg4a_run_finishcall against a run that is no longerRunning/Waitingis refused by name, carrying the lifecycle it actually found, rather than answering with the sameFinishedshape a first, effective call gets. - Harness
RunGit Facts Outcome V1 - Terminal outcome of one background git-facts capture attempt against a
run’s workspace.
Unavailablefolds every non-success cause (Node unreachable, route mismatch, deadline, rejection) into one permanent, non-retried terminal state — see the A3 design (§5.2/§9 risk 2). - Harness
RunGit Status Code V1 - Mirror of harness-api’s
HarnessGitStatusCodeV1(field-for-field), kept as a narrow, intentional duplication forced by crate layering:hatchery-harness-protocolhas no dependency onhatchery-harness-api. - Harness
RunLifecycle V1 - Harness
Schedule Outcome V1 - Harness
Session Identity V1 - Harness
Task Create Result V1 - The outcome of one
g4a_task_createcall (D5, Slice D): an agent creates a task only under a parent already inside its own subtree (the caller’s own task by default – the tool’s contract), never system-wide the way the operator’s ownHarnessCreateTaskRequestV1can.Creatednames the minted id and its first revision; every other variant is a named refusal, never prose: each refusal is its own variant with its own typed fields rather than oneRefused { reason }catch-all.TitleInvalid/BodyInvalid/DependenciesInvalidcarrywhy– the underlyingHarnessValidationError’s ownDisplaytext forInvalidTitle/InvalidBody/ (SelfLink,CollectionTooLarge, orCollectionNotCanonicalondependencies) respectively, verbatim. - Harness
Task Move Result V1 - The outcome of one
g4a_task_movecall (D5, Slice D): restricted to a task inside the caller’s own subtree, and never the task that governs the caller’s own run – a session never moves the task its own run is attributed to (scope discipline: an agent narrates its own subtree, it does not narrate itself).Movednames the resulting revision and both endpoints of the transition; every other variant is a named refusal in the same styleHarnessTaskCreateResultV1establishes.IllegalTransitionanswers to the same shape of rule the operator’s ownvalidate_operator_move(hatchery-harness-service) enforces –from != to, no move out of a terminal state,Doneonly fromReview– without duplicating that function here: the service applies its own agent-scoped rule and reports the two states it rejected. - Harness
Task Review Policy V1 - Harness
Task State V1 - Harness
Transfer Authority RefV1 - Harness
Validation Error - Harness
Worktree Intent V1 - Session
Grant State V1
Constants§
- HARNESS_
ALLOWED_ TARGETS_ MAX - HARNESS_
ARTIFACTS_ MAX - HARNESS_
BODY_ MAX_ BYTES - HARNESS_
CHILD_ COUNT_ MAX - HARNESS_
CHILD_ DEPTH_ MAX - HARNESS_
CONTEXT_ PACK_ MAX_ BYTES - HARNESS_
CONTEXT_ PACK_ RETAINED_ MESSAGES_ MAX - HARNESS_
CONTINUATIONS_ MAX - HARNESS_
DELIVERIES_ MAX - HARNESS_
DELIVERY_ COMPONENTS_ MAX - HARNESS_
DELIVERY_ COMPONENT_ KINDS_ MAX - HARNESS_
DELIVERY_ RESOURCE_ MAX_ BYTES - HARNESS_
DEPENDENCIES_ MAX - HARNESS_
LINKS_ MAX - HARNESS_
RESULTS_ MAX - HARNESS_
RUN_ GIT_ BRANCH_ MAX_ BYTES - HARNESS_
RUN_ GIT_ PATH_ MAX_ BYTES - HARNESS_
RUN_ GIT_ RECENT_ COMMITS_ MAX - HARNESS_
RUN_ GIT_ STATUS_ ENTRIES_ MAX - HARNESS_
RUN_ GIT_ SUMMARY_ MAX_ BYTES - HARNESS_
SCHEDULER_ SCAN_ MAX - HARNESS_
SELECTOR_ MAX_ BYTES - HARNESS_
TASK_ RESULT_ WHY_ MAX_ BYTES - Bound on
HarnessTaskCreateResultV1/HarnessTaskMoveResultV1’s ownwhyfields (D5, Slice D). The value they carry is always a short, fixed-formatHarnessValidationErrorDisplayrendering, never arbitrary caller-supplied prose, but this side still bounds it defensively – the same 256-byte ceilingHARNESS_TITLE_MAX_BYTESalready holds a task title to. - HARNESS_
TIMEOUT_ MAX_ MS - HARNESS_
TIMEOUT_ MIN_ MS - HARNESS_
TITLE_ MAX_ BYTES