File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Package agentcontract is the contract a host and a harness compile against.
2+ //
3+ // The port is one method:
4+ //
5+ // type Harness interface {
6+ // RunTurn(context.Context, AgentTurnRequest) (AgentTurnResult, error)
7+ // }
8+ //
9+ // It used to be nine. Routing, addressing, follow-up classification and one-shot
10+ // replies were verbs on the port until it became clear they are host policy
11+ // rather than harness behaviour, so a harness that implements only RunTurn is
12+ // complete.
13+ //
14+ // AgentTurnRequest is how a host tells the harness everything the harness
15+ // refuses to assume: who is asking, what identity the agent answers to, where
16+ // the workspace is, which instructions and skills apply, and what the company
17+ // is. AgentTurnResult carries the answer back with the task state it reached.
18+ package agentcontract
Original file line number Diff line number Diff line change 1+ // Package harnesstest is a harness that records what it was asked to do.
2+ //
3+ // It lets a host's tests assert on the turn request it built without running a
4+ // model.
5+ package harnesstest
Original file line number Diff line number Diff line change 1+ // Package bluecollar is an agent harness: the loop that takes a request,
2+ // decides what to do, calls tools, and answers.
3+ //
4+ // It is built for work nobody is watching. A request arrives from someone else,
5+ // the person who sent it goes back to their day, and the answer has to be right
6+ // without anyone checking. That assumption is why the loop carries an outcome
7+ // contract agreed before the work starts, a completion gate that will not accept
8+ // the model's own word that it is done, approval as a state a task can sit in
9+ // for days and resume from, a tier ladder that picks the model from the
10+ // difficulty, and failure text written for the person who asked.
11+ //
12+ // The harness owns no tools, no identity, and no storage. A host hands it a
13+ // tool set and a task store and calls RunTurn; every tool call executes back in
14+ // the host, as whoever asked for the work. See [agentcontract] for the port both
15+ // sides compile against.
16+ //
17+ // The harness has no identity or filesystem layout of its own either. The host
18+ // supplies AgentIdentity, the workspace paths, the instruction bundle and the
19+ // company context; given none of them, the agent is "the assistant" and knows
20+ // nothing about where it runs.
21+ package bluecollar
Original file line number Diff line number Diff line change 1+ // Package intake decides what an inbound message means before anything runs.
2+ //
3+ // A turn router chooses whether a message becomes a task, a quick reply, or
4+ // nothing at all. A classifier answers the two questions a chat platform forces:
5+ // whether a message in a busy channel is addressed to the agent, and whether it
6+ // continues a task already running.
7+ //
8+ // These are host policy rather than harness behaviour — a host that answers its
9+ // own messenger may bring its own — which is why they live beside the loop
10+ // instead of on the harness port.
11+ package intake
Original file line number Diff line number Diff line change 1+ // Package model is the port a language model reaches the harness through.
2+ //
3+ // LanguageModelProvider is deliberately small: generate a response, or generate
4+ // one constrained to a schema. Anything satisfying it works, and the provider
5+ // may change between steps of a running turn — the tier ladder relies on that,
6+ // escalating a task from a cheap model to a strong one without restarting it.
7+ //
8+ // There is no provider implementation here. The host brings one.
9+ package model
Original file line number Diff line number Diff line change 1+ // Package taskstate is the durable record of work.
2+ //
3+ // A TaskRun is one unit of work with one of nine statuses, and its event ledger
4+ // is the append-only sequence of everything that happened to it. Event names
5+ // follow a fixed grammar — tool.<name>.requested, tool.<name>.result,
6+ // approval.pending_call, approval.executed — so a reader can reconstruct a run
7+ // without access to any harness's internal types.
8+ //
9+ // The ledger is what makes a task survive its process. A run is resumed by
10+ // re-driving a turn from what the ledger says, never by attaching to a live one,
11+ // which is why a task can wait days for an approval and continue afterwards.
12+ package taskstate
Original file line number Diff line number Diff line change 1+ // Package toolcontract describes tools to a harness and carries their results
2+ // back.
3+ //
4+ // A ToolDescriptor says what a tool is called, what it accepts, and — through
5+ // ApprovalScope and SideEffectClass — what kind of effect running it has. Those
6+ // two fields are how a host decides which calls need a person's approval, so
7+ // that the decision comes from what a tool does rather than from what it is
8+ // named.
9+ //
10+ // ToolSet is the set of tools a particular requester may call this turn. The
11+ // harness chooses from it; the host executes.
12+ package toolcontract
Original file line number Diff line number Diff line change 1+ // Package turnstream mirrors a turn as it happens, for a caller that wants to
2+ // watch rather than wait.
3+ //
4+ // It is a view, not a control surface: the turn runs the same whether or not
5+ // anyone is reading.
6+ package turnstream
You can’t perform that action at this time.
0 commit comments