<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/src/server/handlers/history.rs, branch master</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=master</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-05-18T00:21:30+00:00</updated>
<entry>
<title>chore: drop legacy contracts + supervisor task-grouping (#136)</title>
<updated>2026-05-18T00:21:30+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-05-18T00:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f240675da99bc7705e473b8f70a2628812aa4c10'/>
<id>urn:sha1:f240675da99bc7705e473b8f70a2628812aa4c10</id>
<content type='text'>
The contracts table, supervisor task type, and all their backing
machinery have been inert for several PRs. The directives system reads
its own active contract body for spec text, and PR #135 removed the
last LLM surface that spawned supervisors.

This PR wipes the dead surface in one shot — the user authorised a DB
wipe, so the migration drops every legacy table with CASCADE rather
than carrying forward stub rows. Net change: −12k LOC across handlers,
repository, state, models, the TUI, and the listen module.

What's gone:
- contracts, contract_chat_*, contract_events, contract_repositories,
  contract_type_templates tables.
- supervisor_states, supervisor_heartbeats tables.
- mesh_chat_conversations, mesh_chat_messages tables.
- tasks.contract_id/is_supervisor/supervisor_task_id/supervisor_worktree_task_id columns.
- directive_steps.contract_id/contract_type columns.
- files.contract_id/contract_phase columns.
- history_events.contract_id/phase columns.
- The Contract/Supervisor/MeshChat handler + model + repository
  surface, plus the daemon TUI views that read them.
- The standalone listen.rs websocket handler (orphaned with the LLM).

What stays:
- mesh_supervisor handler: trimmed to just the questions + orders
  backchannel used by `makima directive ask` / `create-order` (kept
  the URL prefix for CLI client compat).
- directive_documents (the user-facing "contracts" surface).
- pending_questions in-memory state for the directive Ask flow.

cargo check, cargo test --lib (68 passed), tsc, and vite build all
clean.

Co-authored-by: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Fixup: fix history call and try to start pending tasks when a daemon is available</title>
<updated>2026-01-16T17:07:44+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-16T17:07:44+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f84a7f2d820f6f432be2b1d78d6bf833b5b19380'/>
<id>urn:sha1:f84a7f2d820f6f432be2b1d78d6bf833b5b19380</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Task Contract Type for one-off adhoc tasks (#2)</title>
<updated>2026-01-16T01:12:03+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-15T22:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b69dc962cd99aa8b478b7c5facbd56bfb63eda27'/>
<id>urn:sha1:b69dc962cd99aa8b478b7c5facbd56bfb63eda27</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add resume and history system for makima (#1)</title>
<updated>2026-01-15T22:33:47+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-15T22:33:47+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=6ee2e75834bff187b8c262e0798ef365bc21cd59'/>
<id>urn:sha1:6ee2e75834bff187b8c262e0798ef365bc21cd59</id>
<content type='text'>
This PR implements a comprehensive resume and history system that enables:

1. **History Viewing**
   - View complete conversation history for contracts across all phases
   - View conversation history for individual tasks
   - View task output/tool call history with timestamps
   - View checkpoint history
   - Timeline view showing all activities

2. **Resume System**
   - Resume interrupted supervisor conversations with full context
   - Resume interrupted task conversations
   - Resume from specific checkpoints
   - Continue tasks from previous task state (worktree inheritance)

3. **Rewind/Restore Features**
   - Rewind code to any checkpoint (git restore)
   - Rewind conversation to any point
   - Create new branches from historical points
   - Fork tasks from any point in history

- New migration: 20250117000000_history_tables.sql
  - conversation_snapshots table for storing conversation state
  - history_events table for unified timeline
  - Added forking fields to tasks table
  - Added conversation_snapshot_id to task_checkpoints

- ConversationSnapshot, HistoryEvent, ConversationMessage
- Request/response types for resume and rewind operations
- Query filter types for history endpoints

- CRUD functions for conversation_snapshots
- CRUD functions for history_events
- Task conversation retrieval from task_events

- GET /api/v1/contracts/{id}/history
- GET /api/v1/contracts/{id}/supervisor/conversation
- GET /api/v1/mesh/tasks/{id}/conversation
- GET /api/v1/timeline
- POST /api/v1/contracts/{id}/supervisor/resume
- POST /api/v1/mesh/tasks/{id}/rewind
- POST /api/v1/mesh/tasks/{id}/fork
- POST /api/v1/mesh/tasks/{id}/checkpoints/{cid}/resume
- POST /api/v1/mesh/tasks/{id}/checkpoints/{cid}/branch
- POST /api/v1/contracts/{id}/supervisor/conversation/rewind

- task-history: View task conversation history
- task-checkpoints: List task checkpoints
- resume: Resume supervisor after interruption
- task-resume-from: Resume task from checkpoint
- task-rewind: Rewind task code to checkpoint
- task-fork: Fork task from historical point
- rewind-conversation: Rewind supervisor conversation</content>
</entry>
</feed>
