Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

glossary.md

181 lines9.2 KB

1# Glossary
2​
3> For maintainers. Using T3 Code? See [docs/user](../user/).
4​
5This is a living glossary for T3 Code. It explains what common terms mean in this codebase.
6​
7## Table of contents
8​
9- [Project and workspace](#project-and-workspace)
10- [Thread timeline](#thread-timeline)
11- [Orchestration](#orchestration)
12- [Provider runtime](#provider-runtime)
13- [Checkpointing](#checkpointing)
14​
15## Concepts
16​
17### Project and workspace
18​
19#### Project
20​
21The top-level workspace record in the app. In [the orchestration contracts][1], a project has a `workspaceRoot` and a title. It does not contain threads: `OrchestrationProject` and `OrchestrationThread` are separate arrays on the read model, and a project can have zero threads. See [workspace-layout.md][2].
22​
23#### Workspace root
24​
25The root filesystem path for a project. In [the orchestration model][1], it is the base directory for branches and optional worktrees. See [workspace-layout.md][2].
26​
27#### Worktree
28​
29A Git worktree used as an isolated workspace for a thread. If a thread has a `worktreePath` in [the contracts][1], it runs there instead of in the main working tree. Git operations live behind the VCS driver contract in `apps/server/src/vcs/VcsDriver.ts`, implemented by [GitVcsDriverCore.ts][3].
30​
31### Thread timeline
32​
33#### Thread
34​
35The main durable unit of conversation and workspace history. In [the orchestration contracts][1], a thread holds messages, activities, checkpoints, and session-related state. See [projector.ts][4].
36​
37#### Turn
38​
39A single user-to-assistant work cycle inside a thread. It starts with user input and ends when the session leaves `running` status, which [projector.ts][4] treats as the authoritative completion signal (`settledTurnStateForSessionStatus`). Checkpoint and diff work may settle afterward without changing when the turn ended. See [the contracts][1] and [ProviderRuntimeIngestion.ts][5].
40​
41#### Activity
42​
43A user-visible log item attached to a thread. In [the contracts][1], activities cover important non-message events like approvals, tool actions, and failures. They are projected into thread state in [projector.ts][4].
44​
45### Orchestration
46​
47Orchestration is the server-side domain layer that turns runtime activity into stable app state. The main entry point is [OrchestrationEngine.ts][7], with core logic in [decider.ts][8] and [projector.ts][4].
48​
49#### Aggregate
50​
51The domain object a command or event belongs to. In [the contracts][1], that is usually `project` or `thread`. See [decider.ts][8].
52​
53#### Command
54​
55A typed request to change domain state. In [the contracts][1], commands are validated in [commandInvariants.ts][9] and turned into events by [decider.ts][8].
56Examples include `thread.create`, `thread.turn.start`, and `thread.checkpoint.revert`.
57​
58#### Domain Event
59​
60A persisted fact that something already happened. In [the contracts][1], events are the source of truth, and [projector.ts][4] shows how they are applied.
61Examples include `thread.created`, `thread.message-sent`, and `thread.turn-diff-completed`.
62​
63#### Decider
64​
65The pure orchestration logic that turns commands plus current state into events. The core implementation is in [decider.ts][8], with preconditions in [commandInvariants.ts][9].
66​
67#### Projection
68​
69A read-optimized view derived from events. See [projector.ts][4], [ProjectionPipeline.ts][11], and [ProjectionSnapshotQuery.ts][10].
70​
71#### Projector
72​
73The logic that applies domain events to the read model or projection tables. See [projector.ts][4] and [ProjectionPipeline.ts][11].
74​
75#### Read model
76​
77The current materialized view of orchestration state. In [the contracts][1], it holds projects, threads, messages, activities, checkpoints, and session state. See [ProjectionSnapshotQuery.ts][10] and [OrchestrationEngine.ts][7].
78​
79#### Reactor
80​
81A side-effecting service that handles follow-up work after events or runtime signals. Examples include [CheckpointReactor.ts][6], [ProviderCommandReactor.ts][12], and [ProviderRuntimeIngestion.ts][5].
82​
83#### Receipt
84​
85A typed signal emitted when an async milestone completes, such as `checkpoint.baseline.captured`, `checkpoint.diff.finalized`, or `turn.processing.quiesced`. Receipts are a test-only mechanism: the production `RuntimeReceiptBusLive` publish is a no-op and only the test layer is PubSub-backed. Do not build production behavior on them. See [RuntimeReceiptBus.ts][13] and [CheckpointReactor.ts][6].
86​
87#### Quiesced
88​
89"Quiesced" means a turn has gone quiet and stable: follow-up work such as [CheckpointReactor.ts][6] has settled. It appears in [the receipt schema][13], so in practice it is something tests wait on rather than a production signal.
90​
91### Provider runtime
92​
93The live backend agent implementation and its event stream. The main service is [ProviderService.ts][14], the adapter contract is [ProviderAdapter.ts][15], and the overview is in [providers.md][16].
94​
95#### Provider
96​
97The backend agent runtime that actually performs work. Five drivers ship built in: Codex, Claude, Cursor, Grok, and OpenCode. See [ProviderService.ts][14], [ProviderAdapter.ts][15], and [CodexAdapter.ts][17] as a representative adapter.
98​
99#### Session
100​
101The live provider-backed runtime attached to a thread. Session shape is in [the orchestration contracts][1], and lifecycle is managed in [ProviderService.ts][14].
102​
103#### Runtime mode
104​
105The safety/access mode for a thread or session. [The contracts][1] define four values: `approval-required`, `auto-accept-edits`, `auto`, and `full-access`. See [permission modes][18].
106​
107#### Interaction mode
108​
109The agent interaction style for a thread. In [the contracts][1], the values are `default` and `plan`.
110​
111#### Assistant delivery mode
112​
113Controls how assistant text reaches the thread timeline. In [the contracts][1], `streaming` updates incrementally and `buffered` accumulates text. Buffered delivery is not held until the turn completes: it spills once accumulated text would exceed 24,000 characters, and flushes at approval and user-input boundaries. See [ProviderRuntimeIngestion.ts][5].
114​
115#### Snapshot
116​
117A point-in-time view of state. The word is used in multiple layers, including orchestration, provider, and checkpointing. See [ProjectionSnapshotQuery.ts][10], [ProviderAdapter.ts][15], and [CheckpointStore.ts][19].
118​
119### Checkpointing
120​
121Checkpointing captures workspace state over time so the app can diff turns and restore earlier points. The main pieces are [CheckpointStore.ts][19], [CheckpointDiffQuery.ts][20], and [CheckpointReactor.ts][6].
122​
123#### Checkpoint
124​
125A saved snapshot of a thread workspace at a particular turn. In practice it is a hidden Git ref in [CheckpointStore.ts][19] plus a projected summary from [ProjectionCheckpoints.ts][21]. Capture and lifecycle work happen in [CheckpointReactor.ts][6].
126​
127#### Checkpoint ref
128​
129The durable identifier for a filesystem checkpoint, stored as a Git ref. It is typed in [the contracts][1], constructed in [Utils.ts][22], and used by [CheckpointStore.ts][19].
130​
131#### Checkpoint baseline
132​
133The starting checkpoint for diffing a thread timeline. This flow is surfaced through [RuntimeReceiptBus.ts][13], coordinated in [CheckpointReactor.ts][6], and supported by [Utils.ts][22].
134​
135#### Checkpoint diff
136​
137The patch difference between two checkpoints. Query logic lives in [CheckpointDiffQuery.ts][20], diff parsing lives in [Diffs.ts][23], and finalization is coordinated by [CheckpointReactor.ts][6].
138​
139#### Turn diff
140​
141The file patch and changed-file summary for one turn. It is usually computed in [CheckpointDiffQuery.ts][20], represented in [the contracts][1], and recorded into thread state by [projector.ts][4].
142​
143## Practical Shortcuts
144​
145- If you see `requested`, think "intent recorded".
146- If you see `completed`, think "result applied".
147- If you see `receipt`, think "async milestone signal, for tests".
148- If you see `checkpoint`, think "workspace snapshot for diff/restore".
149- If you see `quiesced`, think "all relevant follow-up work has gone idle".
150​
151## Related Docs
152​
153- [Architecture overview][24]
154- [Provider architecture][16]
155- [Permission modes][18]
156- [Workspace layout][2]
157​
158[1]: ../../packages/contracts/src/orchestration.ts
159[2]: ./workspace-layout.md
160[3]: ../../apps/server/src/vcs/GitVcsDriverCore.ts
161[4]: ../../apps/server/src/orchestration/projector.ts
162[5]: ../../apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
163[6]: ../../apps/server/src/orchestration/Layers/CheckpointReactor.ts
164[7]: ../../apps/server/src/orchestration/Layers/OrchestrationEngine.ts
165[8]: ../../apps/server/src/orchestration/decider.ts
166[9]: ../../apps/server/src/orchestration/commandInvariants.ts
167[10]: ../../apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
168[11]: ../../apps/server/src/orchestration/Layers/ProjectionPipeline.ts
169[12]: ../../apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
170[13]: ../../apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
171[14]: ../../apps/server/src/provider/Layers/ProviderService.ts
172[15]: ../../apps/server/src/provider/Services/ProviderAdapter.ts
173[16]: ./providers.md
174[17]: ../../apps/server/src/provider/Layers/CodexAdapter.ts
175[18]: ../user/permission-modes.md
176[19]: ../../apps/server/src/checkpointing/CheckpointStore.ts
177[20]: ../../apps/server/src/checkpointing/CheckpointDiffQuery.ts
178[21]: ../../apps/server/src/persistence/Services/ProjectionCheckpoints.ts
179[22]: ../../apps/server/src/checkpointing/Utils.ts
180[23]: ../../apps/server/src/checkpointing/Diffs.ts
181[24]: ./overview.md