tuffest harness

This is a tiny AI harness, not just a subprocess wrapper.

prompt.md is the model prompt seed. harness.py loads an OpenAI-compatible client, calls the model, and exposes five tools:

  • shell (command execution)
  • list_dir (read-only directory listing)
  • read_file (read-only file window)
  • git_status (read-only git status)
  • harness_state (self-state summary)

main.py is presentation + CLI flow: transcript rendering, rich/plain output mode, and optional prompt watching.

runtime

  • Set CEREBRAS_BASE_URL, CEREBRAS_API_KEY, and CEREBRAS_MODEL_STRING in .env.
  • Run one turn with uv run main.py --run-once.
  • Run one turn with a seed message: uv run main.py --run-once "wsp".
  • Start interactive chat loop with uv run main.py.
  • Watch prompt.md while chatting with uv run main.py --watch.
  • Watch-only (no stdin chat) with uv run main.py --watch --no-chat.
  • Disable rich rendering with uv run main.py --rich no.

chat controls

  • Type a message and press Enter to append a user message and run a turn.
  • Use /run to force a turn without adding a user message.
  • Use /exit or /quit to stop.

session

The session file is append-only JSONL. Each event is either a model message, a tool result, or an error event. That keeps the loop dumb and easy to inspect.

shape

  • tools_runtime.py: tool schemas and tool handlers.
  • harness.py: model client, turn orchestration, transcript append.
  • transcript_view.py: transcript rendering and rich/plain output formatting.
  • main.py: CLI, chat loop, and watch loop wiring.
  • prompt.md: the behavior seed for the model.
S
Description
two ai prompts. Ts crazy
Readme
61 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%