Skip to content

Add a harness

Adapters live in this package. Loading one from your own code is not supported yet.

  1. Add src/harnesses/<id>.ts whose default export has the five fields of the Harness type in src/harnesses/shared.ts: id, bin, authFiles, invocation, parse. Declare the stream events that parse reads as a type in the same file.
  2. In invocation, load a plugin subject the way the harness loads a local plugin (pluginDir), copy a skills subject to where the harness discovers a user’s skills (placeSkills), and point the harness’s own config variables into home. Return setup commands when the harness has to install the plugin before it runs. When subject is null, load nothing. The judge and the none baseline run that way.
  3. Pass the prompt so that a leading dash cannot be read as a flag: after a -- separator, or in stdin when the CLI has no separator. Confirm it against the real CLI.
  4. In parse, normalize the stream and nothing more. Return null for a field the harness does not report. Put only a tool call’s input in toolCalls, never its output, or file contents will count as skill loads. Build each tool call with toolCall and a table from the harness’s tool names to the kinds under Tool checks.
  5. Add the adapter to HARNESSES in src/harnesses/index.ts at its place in the preference order.
  6. Capture one real stream into test/fixtures/ and add it to src/adapters.test.ts. Add the harness to the table of skill locations in src/invocation.test.ts, and add a row to every table in How each harness is started and What was verified and to the table of skill locations under Subjects.