t3-code

Installation
SKILL.md

t3-code 本机知识

T3 Code 的本地状态在 ~/.t3/ 下。会话、命令、消息等运行数据落 SQLite,复盘/排查时直接查库,比翻日志高效。

状态数据库

  • 当前库:~/.t3/userdata/statev2.sqlite;state.sqlite 是旧库。
  • v2 投影表(orchestration_v2_projection_*)2025-10-03 起为权威数据;v1 的 projection_* 表已停写,只在看更早历史时查。
  • 关键表:
    • orchestration_v2_projection_threads:线程。列含 thread_id、project_id、title、default_provider、runtime_mode、created_at、updated_at、archived_at。
    • orchestration_v2_projection_turn_items:线程内事件流,分析主力表。列含 thread_id、run_id、ordinal、type、status、updated_at、payload_json。
    • orchestration_v2_projection_subagents / runs / run_attempts / provider_sessions:委派与运行明细。
    • scheduled_tasks、projection_thread_pull_requests:定时任务、线程关联的 PR。
  • turn_items.type 常见值:assistant_message、command_execution、reasoning、dynamic_tool(MCP 调用)、user_message、file_change、file_search、subagent、error。
  • payload_json 按 type 不同:command_execution 含 input/output/exitCode/startedAt/completedAt;assistant_message/reasoning 含正文文本。
  • 留存限制:约 87% 的 command_execution 只在 output 里存「Exited with code N」一行,exitCode 字段经常缺省,完整 stdout/stderr 不落库——判成败主要靠 output 文本里的退出码。
  • 委派任务的子代理是独立线程(命名形如 thread:delegated-task:*),查子代理活动按 thread_id 过滤即可。
  • Windows 上没有 sqlite3 CLI,用 Python 自带的 sqlite3 模块查库;查询稍长就写临时 .py 文件再跑,cmd 里内联 python -c 的引号容易翻车(exec 是 cmd,&& 连接而不是 ;)。
Installs
24
First Seen
10 days ago