Skip to content
dev-centrPublic

About

Lightweight D agent harness with persisted actor graphs, Mixr routing, and a local desk UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Harness

Lightweight D agent runtime with persisted actor graphs, Mixr routing, and a local desk UI.

Contributors Forks Stars Issues

Explore the docs »

Harness is D only, enables tgc (thread-local GC) by default, persists its node graph on disk, and uses Mixr for model routing.

Phase Ships
v0 graph.json, per-node meta.json + chat.jsonl, orchestrator metathread, CLI
v0.5 Mixr on-device + suppress lists; /api/health, OpenAI-compat stub, /api/provider/* for t3code
v1 Mixr router, wait-graph (warn default), HTTP desk (harness serve)
v2 Temporal layout engine — scrubber, fade, heatmap, scoped bookmarks
desk PM Status colors for awaiting_user / failed; Mark completed + Archive (POST /api/hide)
desk views Linear / Grid / Tree — discussion vs workers separation; fork drill-in for full node transcript
plan queue Cross-cutting plan-stack dock (GET /api/plan-queue) — ETA-sized speculative waits; not a 4th view mode
env guard Automatic Windows PATH truncation detection & process repair on launch; desk alert banner + GET /api/env-health linking to Windows PATH truncation docs
session Shared control plane: sibling threads, harness serve /api/session/*, harness mcp, harness acp

Contents

Changelog

See CHANGELOG.adoc.

(back to top)

Build

Requires DUB and LDC/DMD. Thread-local GC via dependency on dlang-supplemental/tgc (Tgc_default → --DRT-gcopt=gc:tgc embedded in the binary).

cd $env:code\github.com\dev-centr\harness
dub build
dub test

(back to top)

Quick start

.\harness.exe init .\my-chat
.\harness.exe spawn .\my-chat --parent=coordinator --type=task --title=docs-sync --model=grok-4.7-high
.\harness.exe serve .\my-chat --port=8765

Open http://127.0.0.1:8765 for the desk UI. Toggle Linear, Grid, or Tree in the shell bar — discussion chat stays in the main panel; task workers live in the workers region (or the tree canvas in Tree mode). The timeline scrubber and plan-stack dock work in every mode (start plan-stackd on :17358 for live queues).

(back to top)

Disk layout

Matches actor-model-agentic-ui:

$CHAT_ROOT/
  graph.json
  orchestrator/meta.jsonl
  nodes/{id}/meta.json
  nodes/{id}/chat.jsonl
  timeline/bookmarks.jsonl

(back to top)

Harness configuration

Set HARNESS_NAME = harness in $CODE_ROOT/harness.md.

Parallel / swarm close-out (see agent-rules general/parallel-git-closeout.md):

GIT_CLOSEOUT = coordinator-batch

Task nodes spawn with gitCloseout=coordinator-batch and a system brief: commit locally, do not push; the coordinator batches push after the wave.

(back to top)

Architecture

  • Long-lived: harness serve — supervisor, HTTP desk, and the session API under /api/session/*.
  • Adapters: harness mcp (stdio MCP tools) and harness acp (Agent Client Protocol v2) call that same session API.
  • One-shot: CLI subcommands touch disk directly (git-shaped); no Python, no embedded interpreter per invoke.
  • tgc: per-thread heaps; collections do not stop-the-world sibling threads — fits actor swarms + @nogc workers.
  • Discovery vs routing: Open Provider Registry / UniProvider finds endpoints; Mixr chooses models. Prefer OPR manifests over hard-coding a single local runner brand.

(back to top)

Session control

Sibling threads and other harnesses use one verb set. A call returns when the graph has accepted it. prompt returns nodeId and turnId and leaves the turn running until steer, interrupt, cancel, or complete.

A node may control itself and its descendants. It may prompt an ancestor, and it may not cancel that ancestor. Callers from outside the graph use an id that starts with ext:.

.\harness.exe prompt .\my-chat --node=coordinator --text="sync the docs"
.\harness.exe mcp .\my-chat
.\harness.exe acp .\my-chat

spawn accepts model and styleMode. The node stores the matched profile, and the child transcript starts with a prose brief from catalogs/model-style-profiles.sdl in agent-rules. That paragraph replaces host stock writing-style guidelines. Safety and harness rendering stay. An explicit model replaces the Mixr pick.

harness mcp is the tool door (harness_list, harness_peek, harness_spawn, harness_prompt, harness_steer, harness_interrupt, harness_wait, harness_approval, harness_approve, harness_complete). harness_spawn takes model and styleMode. harness acp is the editor door: session/new, session/prompt, session/cancel. The agent-bus profile for this release maps those MCP tools as layer=mcp.

(back to top)

Built with

Runtime

  • D — native implementation
  • tgc — thread-local garbage collection

Interface

  • Browser-native HTML, CSS, and JavaScript — local desk UI

(back to top)

Observed producing identity

See Who produced each event for per-message/edit identity and explicit Git AI mapping, separate from planned routing.

About

Lightweight D agent harness with persisted actor graphs, Mixr routing, and a local desk UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages