How huiliyi37/tianshu-harness works
Tianshu Harness is a coding-agent runtime with terminal and desktop interfaces, designed to keep goals, state, evidence, and completion checks under runtime control. The principal workflow is user request → turn orchestration and model reasoning → tool execution and observation → evidence-backed delivery. The graph also preserves documented memory, planning, multi-agent, caching, and external-tool capabilities. README documentation supports several capability links; sampled source confirms selected internals, but does not expose all orchestration wiring.
Main entry points: turn-orchestrator.ts Turn orchestration · tool-pipeline.ts Tool pipeline · entry.ts CLI entry · engine.ts Prompt and context
Components 19
User experience
- CLI entry
src/cli/entry.ts - Terminal UI
src/tui/engine/live-engine.ts - Desktop client
Cognitive runtime
- Turn orchestration
src/agent/turn-orchestrator.ts - Runtime hooks
src/agent/runtime-hooks.ts - Task contract
src/context/task-contract.ts - Prompt and context
src/prompt/engine.ts - Prefix cache
src/cache/index.ts
Task execution
- Plan workflow
src/plan/plan-approval.ts - Agent coordination
src/agent/team-orchestrator.ts - Tool pipeline
src/agent/tool-pipeline.ts - Evidence and delivery
src/agent/deliver-task.ts
Session and memory
- Session state
src/agent/session-state.ts - Project memory
src/memory/unified-memory.ts
Models and tools
- Model provider API
src/api/factory.ts - Foundation models
- MCP tools
src/mcp/manager.ts - Language servers
src/lsp/manager.ts
Other components
- Developer
Connections 19
- Developer → CLI entry: submits task
- CLI entry → Turn orchestration: starts session
- Turn orchestration → Task contract: tracks goal
- Turn orchestration → Runtime hooks: runs supervision
- Turn orchestration → Prompt and context: builds context
- Prompt and context → Prefix cache: maintains prefix
- Turn orchestration → Model provider API: requests completion
- Model provider API → Foundation models: sends requests
- Turn orchestration → Tool pipeline: dispatches actions
- Tool pipeline → Evidence and delivery: records verification
- Evidence and delivery → Turn orchestration: gates delivery
- Turn orchestration → Session state: updates state
- Turn orchestration → Project memory: uses memory
- Turn orchestration → Plan workflow: supports planning
- Turn orchestration → Agent coordination: coordinates agents
- Tool pipeline → MCP tools: invokes servers
- Tool pipeline → Language servers: uses diagnostics
- CLI entry → Terminal UI: renders terminal
- Desktop client → Turn orchestration: shares runtime