trustee 0.4.2

A general-purpose agent that can morph into different specialized agents using WASM lifecycle plugins
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# Trustee Default Configuration
# 
# These are sensible defaults embedded in the binary.
# Users only need to provide overrides in ~/.trustee/config/trustee.toml

[agent]
execution_mode = "hybrid"
name = "trustee"
default_mode = "confirm"
enable_task_classification = true

[installation]
binary_name = "trustee"
binary_source_path = "target/release/trustee"
local_bin_path = "~/.local/bin"

[logging]
log_dir = ""
log_level = "INFO"

[execution]
enable_tool_calling = true
timeout_seconds = 120
max_retries = 3
max_tokens = 16000
max_history = 200
enable_dangerous_command_validation = true
max_iterations = 1000
request_interval_seconds = 0

[modes.confirm]
description = "Agent proposes actions and asks for confirmation"
auto_execute = false

[modes.yolo]
description = "Actions run immediately without confirmation"
auto_execute = true

[modes.human]
description = "Human enters commands directly"
auto_execute = false

[tools]
enabled = true
max_file_size_mb = 10
max_grep_results = 100
open_file_window_size = 1000
max_tool_result_size_bytes = 256000
truncate_large_results = true
pagination_size = 50

# Search filtering configuration
[search_filtering]
enabled = true

exclude_dirs = [
    "target",
    "node_modules",
    "__pycache__",
    "dist",
    "build",
    ".git",
    ".svn",
    ".hg",
    "venv",
    "env",
    ".venv"
]

exclude_extensions = [
    "exe", "dll", "so", "dylib", "a", "o",
    "pyc",
    "png", "jpg", "jpeg", "gif", "bmp", "ico",
    "mp3", "mp4", "avi", "mov", "wav", "pdf",
    "zip", "tar", "gz", "rar", "7z"
]

exclude_hidden = true

# LLM Provider Configuration
[llm]
endpoint = "chat/completions"
enable_streaming = true

# Lifecycle extension configuration
[lifecycle]
enabled = false  # Set to true to use WASM lifecycle extension (requires coder-lifecycle-wasm)
system_template = """You are a helpful AI assistant. Follow the user's instructions directly.

## Tools

You have access to tools. Use them when needed to accomplish tasks.

## Workflow

1. Understand what the user wants
2. Execute the necessary actions using available tools
3. Provide clear, helpful responses

When you have completed the task, use the `submit` tool to indicate completion."""

# MCP - disabled by default, user enables and configures servers
[mcp]
enabled = false
timeout_seconds = 30

# Checkpoint and Session Management Configuration
[checkpointing]
enabled = true
auto_checkpoint_interval = 1
max_checkpoints_per_session = 50
compression_enabled = true
[checkpointing.retention]
max_age_days = 30
max_total_size_gb = 10
max_sessions_per_project = 20
cleanup_interval_hours = 24
enable_auto_cleanup = true
preserve_tagged = true
preserve_active_sessions = true

[checkpointing.storage_backend]
backend_type = "file"
storage_mode = "local"
collection = "checkpoints"
tls_enabled = false
tls_allow_invalid_certs = false
connection_timeout_secs = 30

[checkpointing.git_integration]
enabled = false
auto_commit_before_checkpoint = true

[checkpointing.performance]
compression_level = 6
enable_lazy_loading = true
enable_async_operations = true
max_concurrent_operations = 4
checkpoint_creation_timeout_seconds = 60
enable_caching = true
cache_size_mb = 100

[checkpointing.security]
enable_encryption = false
filter_sensitive_env_vars = true
sensitive_env_patterns = ["*KEY*", "*TOKEN*", "*PASSWORD*", "*SECRET*"]
file_permission_strict = true
max_file_size_mb = 10

# TUI-specific configuration (only applies to trustee-tui)
[tui]

# TUI color configuration.
# Valid color names: black, red, green, yellow, blue, magenta, cyan, gray,
# darkgray, lightred, lightgreen, lightyellow, lightblue, lightmagenta,
# lightcyan, white, reset.
[tui.colors]
# Reasoning/thinking text color (LLM internal reasoning displayed deemphasized).
# Default: "gray" (ANSI SGR 37) — visible on all terminals including Linux VT.
# Set to "darkgray" (ANSI SGR 90) on GUI terminals for a darker shade.
reasoning_color = "gray"
# Apply dim modifier (SGR 2) to reasoning text for visual deemphasis.
reasoning_dim = true

# Automatic session handoff when context grows too large.
# When enabled, the TUI will automatically trigger a handoff (fresh context
# with LLM-generated briefing) once the total context token count reaches
# the configured threshold.
[tui.auto_handoff]
enabled = false              # Set to true to enable automatic handoff
context_threshold = 170000   # Total context tokens that triggers auto-handoff

# CLI Configuration
[cli]
name = "trustee"
about = "A general-purpose agent that can morph into different specialized agents"
default_command = "run"
enabled_commands = ["run", "init", "config", "cache", "resume", "checkpoints", "sessions", "misc", "version", "mcp", "upgrade"]
show_progress = true
interactive_mode = true
require_confirmation = true

[cli.commands.version]
description = "Show version information"
enabled = true

[cli.commands.run]
description = "Run trustee with the specified task"
enabled = true

[[cli.commands.run.args]]
name = "task"
help = "Description of the task to perform"
arg_type = "string"
multiple = true
trailing = true
required = true

[[cli.commands.run.args]]
name = "config"
help = "Path to TOML config file"
arg_type = "path"
long = "config"
short = "c"

[[cli.commands.run.args]]
name = "yolo"
help = "Enable YOLO mode (no confirmation)"
arg_type = "bool"
long = "yolo"
short = "y"

[[cli.commands.run.args]]
name = "mode"
help = "Agent interaction mode (confirm, yolo, human)"
arg_type = "string"
long = "mode"
default = "confirm"

[[cli.commands.run.args]]
name = "verbose"
help = "Enable verbose output"
arg_type = "bool"
long = "verbose"
short = "v"

[cli.commands.init]
description = "Initialize a new trustee project"
enabled = true

[[cli.commands.init.args]]
name = "force"
help = "Force initialization even if project already exists"
arg_type = "bool"
long = "force"

[[cli.commands.init.args]]
name = "template"
help = "Project template to use"
arg_type = "string"
long = "template"
default = "default"

[cli.commands.config]
description = "Manage trustee configuration"
enabled = true

[[cli.commands.config.args]]
name = "show"
help = "Show current configuration"
arg_type = "bool"
long = "show"

[[cli.commands.config.args]]
name = "edit"
help = "Edit configuration file"
arg_type = "bool"
long = "edit"

[[cli.commands.config.args]]
name = "validate"
help = "Validate configuration file"
arg_type = "bool"
long = "validate"

[cli.commands.cache]
description = "Manage trustee cache"
enabled = true

[[cli.commands.cache.args]]
name = "clear"
help = "Clear all cached data"
arg_type = "bool"
long = "clear"

[[cli.commands.cache.args]]
name = "list"
help = "List cached items"
arg_type = "bool"
long = "list"

[[cli.commands.cache.args]]
name = "size"
help = "Show cache size information"
arg_type = "bool"
long = "size"

[cli.commands.resume]
description = "Resume a previous trustee session"
enabled = true

[[cli.commands.resume.args]]
name = "session"
help = "Session ID to resume"
arg_type = "string"
long = "session"

[[cli.commands.resume.args]]
name = "checkpoint"
help = "Specific checkpoint ID to resume from"
arg_type = "string"
long = "checkpoint"

[[cli.commands.resume.args]]
name = "list"
help = "List available sessions"
arg_type = "bool"
long = "list"

[[cli.commands.resume.args]]
name = "interactive"
help = "Interactive session selection"
arg_type = "bool"
long = "interactive"
short = "i"

[[cli.commands.resume.args]]
name = "latest"
help = "Resume the latest session"
arg_type = "bool"
long = "latest"

[cli.commands.checkpoints]
description = "Manage trustee checkpoints"
enabled = true

[[cli.commands.checkpoints.args]]
name = "list"
help = "List all checkpoints"
arg_type = "bool"
long = "list"

[[cli.commands.checkpoints.args]]
name = "show"
help = "Show checkpoint details"
arg_type = "string"
long = "show"

[[cli.commands.checkpoints.args]]
name = "delete"
help = "Delete a checkpoint"
arg_type = "string"
long = "delete"

[[cli.commands.checkpoints.args]]
name = "clean"
help = "Clean old checkpoints"
arg_type = "bool"
long = "clean"

[cli.commands.sessions]
description = "Manage trustee sessions"
enabled = true

[[cli.commands.sessions.args]]
name = "list"
help = "List all sessions"
arg_type = "bool"
long = "list"

[[cli.commands.sessions.args]]
name = "show"
help = "Show session details"
arg_type = "string"
long = "show"

[[cli.commands.sessions.args]]
name = "delete"
help = "Delete a session"
arg_type = "string"
long = "delete"

[cli.commands.misc]
description = "Miscellaneous trustee utilities"
enabled = true

[[cli.commands.misc.args]]
name = "doctor"
help = "Run diagnostics and health checks"
arg_type = "bool"
long = "doctor"

[[cli.commands.misc.args]]
name = "stats"
help = "Show usage statistics"
arg_type = "bool"
long = "stats"

[[cli.commands.misc.args]]
name = "clean"
help = "Clean temporary files and logs"
arg_type = "bool"
long = "clean"

# MCP command — Manage MCP server connections and authentication
[cli.commands.mcp]
description = "Manage MCP server connections and authentication"
enabled = true

[cli.commands.mcp.subcommands.auth]
description = "Authenticate with an MCP credential via browser login (OAuth + PKCE)"
enabled = true

[[cli.commands.mcp.subcommands.auth.args]]
name = "name"
help = "Name of the MCP credential to authenticate with"
arg_type = "string"
required = true

[cli.commands.mcp.subcommands.list]
description = "List MCP servers and their authentication status"
enabled = true

[[cli.commands.mcp.subcommands.list.args]]
name = "verbose"
help = "Show detailed information"
arg_type = "bool"
long = "verbose"
short = "v"

[cli.commands.mcp.subcommands.add]
description = "Register a new MCP server"
enabled = true

[[cli.commands.mcp.subcommands.add.args]]
name = "name"
help = "Name for the new MCP server"
arg_type = "string"
required = true

[[cli.commands.mcp.subcommands.add.args]]
name = "url"
help = "MCP server URL"
arg_type = "string"
long = "url"
required = true

[[cli.commands.mcp.subcommands.add.args]]
name = "auth_mode"
help = "Authentication mode: static, service-account, or interactive"
arg_type = "choice"
choices = ["static", "service-account", "interactive"]
long = "auth-mode"
default = "interactive"

[cli.commands.mcp.subcommands.logout]
description = "Remove stored OAuth credentials for an MCP server"
enabled = true

[[cli.commands.mcp.subcommands.logout.args]]
name = "name"
help = "Name of the credential to remove"
arg_type = "string"
required = true

[cli.commands.mcp.subcommands.debug]
description = "Debug MCP connection and authentication"
enabled = true

[[cli.commands.mcp.subcommands.debug.args]]
name = "name"
help = "Name of the MCP server to debug"
arg_type = "string"
required = true

# Upgrade command — Self-update trustee binary from GitHub releases
[cli.commands.upgrade]
description = "Download and install the latest trustee release"
enabled = true

[[cli.commands.upgrade.args]]
name = "check"
help = "Only check for updates without installing"
arg_type = "bool"
long = "check"

[[cli.commands.upgrade.args]]
name = "force"
help = "Force upgrade even if already up-to-date"
arg_type = "bool"
long = "force"
short = "f"

[[cli.commands.upgrade.args]]
name = "version"
help = "Upgrade to a specific version (e.g. 0.1.84)"
arg_type = "string"
long = "version-target"
short = "v"

[[cli.commands.upgrade.args]]
name = "repo"
help = "GitHub repository (owner/repo) to download from"
arg_type = "string"
long = "repo"
default = "podtan/trustee"

[[cli.commands.upgrade.args]]
name = "dry_run"
help = "Show what would happen without making changes"
arg_type = "bool"
long = "dry-run"

[[cli.commands.upgrade.args]]
name = "prerelease"
help = "Include pre-release versions"
arg_type = "bool"
long = "prerelease"