1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
//! Command handler modules for the `tm` binary.
//!
//! Why: splitting each subcommand group into its own file keeps every handler
//! file well under the 500-line cap and makes the handler surface easy to
//! navigate.
//! What: re-exports handler modules — `auth`, `compress`, `daemon`,
//! `hook_rewrite`, `install`, `launch`, `managed`, `managed_route`, `meta`,
//! `misc`, `project`, `services`, `session`, `slack`, `supervisor`, `telegram`.
//! Three client-side `tm doctor` probes also live here rather than in the daemon's
//! `run_doctor`, because each needs state the responding daemon cannot report on
//! itself: `doctor_stale` (this binary's own `CARGO_PKG_VERSION`, #2332) and
//! `doctor_orphan` (whether launchd owns the process that answered, #4230), and
//! `doctor_daemon_row` (whether a daemon answered at all, #6336).
//! Test: each module has its own unit tests; integration coverage lives in
//! `tests.rs`.
// #6497: `tm session adopt-worktree` — the explicit ownership transfer for a
// tree whose owning session or agent is provably dead.
pub
pub
pub
// #6274: `tm` in a plain directory initializes a repository there instead of
// refusing; both the guided default and `tm launch` call it before detection.
pub
pub
pub
pub
pub
// #9034: three-state daemon pid identity, read from argv.
pub
// #9121: `tm daemon --sandbox` — refuse an unisolated env, skip pollers/secrets.
pub
pub
// #6887: the bulk-read diversion hook and its cheap worker.
pub
pub
pub
// #4230: the client-side orphan-daemon check — the daemon's own `run_doctor`
// cannot detect that the process answering it is the unsupervised one.
// #6892: the machine-wide builder-slot row — holders, the cap, and a Warn
// for a lease only the TTL could have ended.
pub
// #9239: the read-only `status` and `--census` views of `tm build-lease`.
pub
pub
// #8451: the slot pool's volume against its eviction threshold.
pub
// #6336: the standalone `tm doctor` — the battery runs in-process and the
// daemon is one appended reachability row, never a precondition.
pub
// #6649: `--fix-agents`, the agent mirror of `--fix-skills`.
pub
// #8236: `--fix-launchd-secrets`, the credential strip without the other repairs.
pub
pub
// #8371: the opt-in `--network` gcloud auth row.
pub
pub
pub
// #4948: the `tm doctor --fix` driver — dry-run by default, `--yes` to write.
pub
pub
pub
// #8939: `tm env set|keys` — dotenv edits that print no value.
pub
// #8378 PR-C: `tm content install|update|status`.
pub
// #8939 fix round: `tm env`'s no-follow file access and its guard grant.
pub
pub
// #8436: `tm fleet init|status` — the Architect's setup.
pub
pub
pub
pub
// #9034: the autostart decision, with launchctl and the process table injected.
pub
pub
pub
// #9034: down versus slow, and the picker/autostart sequence.
pub
pub
pub
pub
pub
pub
pub
// #6556: the retry-plus-log delivery, and the disk park, of the SubagentStop POST.
pub
pub
// #7975: the stdin payload read that names its failure, so a guard can deny on it.
pub
pub
pub
// #4605: the unmanaged-bundled-skill reporter and `--reconcile-skills` path,
// split out of `install` for the 500-SLOC production cap.
pub
pub
pub
// #8545: launch/connect user-home writes, under a caller-named home.
pub
// #8878: `tm launch --twin` arming.
pub
pub
pub
// #2919: merged-PR reclaim-pass rendering, split out of `managed` for the cap.
pub
/// The `tm ls` table renderer, split out of `managed` for the SLOC cap.
pub
pub
pub
pub
pub
pub
pub
// #8782: the per-project prune-worktrees preview and its scope checks.
pub
// #7685: `tm memory import-auto-memory`, in its own file beside the dispatcher.
pub
// #8352: `tm memory recall|remember|note` — the no-MCP palace verbs, in their
// own file so the dispatcher stays a translation layer and stays under cap.
pub
pub
pub
// #6276: the one decision about a repository's origin remote — a local-only
// repository proceeds to a session in its own checkout instead of refusing.
pub
pub
pub
pub
pub
// #7688: the `tm prompt-feedback` read-back and the capture hook behind it.
pub
pub
// #8735: the one program-word resolver behind the pm-guard rules.
pub
pub
// #8939: the Architect's `tm env set|keys` exemption from the #7266 rule.
pub
pub
pub
pub
// #6892: the machine-wide concurrent-builder denial. Fails CLOSED, unlike its
// #4480 sibling — see its module doc.
pub
pub
// #9011: the content roster pm-guard classifies dispatches against.
pub
pub
// #8722: the denial record and audit POST every pm-guard deny makes.
pub
pub
pub
// #8257: `tm repair delegation --list`.
pub
// #7172: a worktree-pinned agent's `EnterWorktree` switch, refused rather than
// left to succeed and wedge the agent — see its module doc for why the pin it
// names belongs to the harness and cannot be moved from here.
// #8547: which `subagent_type` names are known, and the refusal for the rest.
pub
pub
pub
// #8878: the hard floor (D8) and the Architect exemption (D4 remainder, D5).
pub
// #8453: the PM delegation rules apply by session profile.
pub
pub
// #8004: a resume of an agent whose isolated worktree is gone is refused.
pub
pub
// #7266: a line-range or partial READ of a secret-bearing file, refused for
// every caller — the sibling `pm_guard_bash::secret_file_copy` screens only a
// `cp`/`mv` of one, so nothing stopped `sed -n '38,46p' terraform.tfvars`.
pub
// #7414: the "which words of this text could be a path?" layer, split out of
// `pm_guard_secret_read` when the brace-literal fix pushed it over the cap.
pub
// #7557: the word-list / ref / text-payload position rules, split out of
// `pm_guard_secret_read` when the structure check pushed it over the cap.
pub
// #8523: a pm2 dump and a credential-carrying launchd plist hold a process env.
pub
// #8756: the secret rules read every command substitution's body.
pub
// #8869: a key handed to a consumer that never prints it; a GET secret listing.
pub
// #9001: a `for` loop whose words reach only `echo` and a gh search.
pub
// #8093, #8110, #8520, #8660: same-class copies, tokeninfo URLs, refusal hints.
pub
// #8879: the credential rules over the body of a script a command runs.
pub
pub
pub
pub
// #8878: the trust-anchor write floor, which the bypass variables do not lift.
pub
pub
pub
pub
// #6653: `tm pr` — the deterministic PR-open and merge-queue gates.
pub
pub
pub
pub
pub
// #9313: `tm sessions rebind` — re-bind a record to its live tmux pane.
pub
pub
// #4912: `tm register` positional resolution — URL first, alias optional, with
// the legacy alias-first order still accepted.
pub
pub
pub
pub
// #7569: `tm repair savings-ledger` — quarantine the ledger rows #7514 let
// unit tests append to the operator's own savings ledger.
pub
// #5007: `tm repair session-store` — back up and truncate a corrupt
// `sessions.json` so a wedged store no longer needs a human editing JSON.
pub
pub
// #7521: `tm secrets` — a client of the trusty-secrets on-demand socket.
pub
pub
pub
pub
pub
// #8914: `--account` on the session-spawning verbs.
pub
// #7313: `tm session disk` — the shell view of the per-session disk
// attribution slice 1 added to the `disk_survey` tool.
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub
// The `tm shell-init` wrapper emitter — print-only; it never writes an rc file.
pub
// #6288 step 1: the commands that reach the daemon over its socket only.
pub
pub
pub
pub
pub
// #8025: `tm status`'s daemon line, derived from the SAME `/health` probe
// `tm doctor` uses — see its module doc for why the two disagreed.
pub
pub
pub
pub
pub
pub
pub
// #5843: the condition-poll wait primitive that replaces backgrounding.
pub
// #8994: `tm worktrees` — the worktree ledger report.
pub
pub