Repository navigation
Expand file tree
/
Copy pathconfig.yaml
More file actions
966 lines (864 loc) · 36 KB
/
Copy pathconfig.yaml
File metadata and controls
966 lines (864 loc) · 36 KB
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
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
## ===========================================================================
## CyDo main configuration
## ===========================================================================
## Where this file lives
##
## CyDo reads its main config only from ~/.config/cydo/config.yaml. It uses
## neither an XDG location nor a project overlay for this file. (Task types
## are configured separately in task-types.yaml, which can have a project
## overlay.)
## Reloading
##
## Changes take effect live if ~/.config/cydo existed at server startup.
## If init creates that directory while CyDo is running, restart CyDo.
## See "Task placement and server defaults" for setting-specific behavior.
## How to use the examples
##
## Lines beginning with "## " are documentation. Lines beginning with "# "
## are example YAML: remove the "# " from the lines of one example to use it.
##
## The small examples show where each setting belongs. Merge their keys into
## your existing mappings instead of repeating a parent key. To try all the
## examples of a section together, use only its "Complete example" block.
## ===========================================================================
## Workspaces
## ===========================================================================
## What a workspace is
##
## A workspace is a directory that CyDo scans for projects. Scoped roots
## help keep unrelated HOME contents, such as ~/.ssh, outside the default
## sandbox. An empty mapping falls back to one workspace named local at ~.
## How cydo init chose the workspaces below
##
## Init uses its invocation directory and the working directories the
## Claude, Codex, and Copilot readers recover from the first 51 lines
## of each session. Claude needs cwd on the first user record that
## supplies a title. Copilot uses session.start data.context.cwd.
##
## The history locations are ~/.claude, ~/.codex, and ~/.copilot. Set
## CLAUDE_CONFIG_DIR, CODEX_HOME, or COPILOT_HOME to a nonempty absolute
## path to override one.
##
## Of those directories, init keeps the Git roots that still exist. It
## skips the system temporary directory, .cydo/tasks worktrees, and a root
## equal to HOME. If init detects a parent and a nested Git root, it keeps
## only the parent entry. Default discovery stops at the parent repo.
## Add the nested root explicitly or change recursion to show it separately.
## Init does not search for other projects.
## Widening coverage
##
## Add a sibling root, or widen a root such as ~/work/api to ~/work. Remove
## entries that the wider root then covers.
## Enabling a workspaces example
##
## YAML permits only one workspaces key. Replace the entire active
## workspaces line or mapping below with the uncommented block. If init
## detected projects, you can retain them by merging their entries into the
## same mapping.
## About cydo init itself
##
## cydo init installs config.yaml and task-types.yaml as a pair. An existing
## target, even a directory or dangling symlink, prevents either write.
## cydo-init: detected-settings begin
workspaces: {}
## cydo-init: detected-settings end
## ---------------------------------------------------------------------------
## Workspace fields
## ---------------------------------------------------------------------------
## workspaces
## Purpose: Names the directories CyDo scans for projects.
## Type: Mapping from workspace names to workspace settings.
## Default: Required root key. An empty mapping uses local at HOME.
# workspaces:
# example-project:
# root: ~/work/example-project
## root
## Purpose: Sets the directory CyDo scans.
## Type: Path string.
## Default: Required.
## Accepted values: Absolute, relative, or home-relative paths. CyDo resolves
## relative paths from its working directory and expands ~ to HOME. It
## normalizes paths and resolves symlinks for existing directories. An
## existing root must be a directory.
# workspaces:
# example-project:
# root: ~/work/example-project
## exclude
## Purpose: Skips directories by basename during discovery.
## Type: List of strings.
## Default: Empty. The scanner also skips hidden directories and symlinks.
# workspaces:
# example-project:
# root: ~/work/example-project
# exclude: [node_modules, .cache]
## default_agent
## Purpose: Selects the default agent for this workspace.
## Type: Configured agent name string.
## Default: Inherits the global selection.
# workspaces:
# example-project:
# root: ~/work/example-project
# default_agent: claude
## default_task_type
## Purpose: Preselects an entry in the new-task UI for this workspace.
## Type: Entry key from user_entry_points, or its target task-type name.
## Default: Inherits the global preference if empty.
## Notes: A nonempty workspace value overrides the global preference. The
## picker selects the first visible match, or its first entry if none match.
# workspaces:
# example-project:
# root: ~/work/example-project
# default_task_type: direct
## project_discovery
## Purpose: Customizes project recognition and recursion.
## Type: Mapping of discovery expressions.
## Default: Uses the two built-in expressions below.
# workspaces:
# example-project:
# root: ~/work/example-project
# project_discovery:
# recurse_when: "{{ not is_project and depth < 4 }}"
## worktree_links
## Purpose: Links files from the main checkout into task worktrees.
## Type: List of repository-relative path strings or Djinja templates.
## Default: Empty.
## Accepted values: Templates get workspace, workspace_root, project_path, and
## repo_path. Use relative paths without any ".." component.
## Notes: At task launch CyDo skips missing sources and empty results.
## Existing destinations, including dangling symlinks, stay in place.
# workspaces:
# example-project:
# root: ~/work/example-project
# worktree_links: [AGENTS.md]
## sandbox
## Purpose: Overrides selected sandbox fields for this workspace.
## Type: Sandbox mapping described below.
## Default: Inherits the earlier layers.
## Notes: Task launches layer global, agent, then workspace settings.
## Discovery uses global and workspace settings with a read-only cap.
# workspaces:
# example-project:
# root: ~/work/example-project
# sandbox:
# paths:
# ~/work/shared: ro
## permissions
## Purpose: Overrides selected Claude permission settings for this workspace.
## Type: Permissions mapping described below.
## Default: Inherits the earlier layers.
## Notes: Workspace fields override Claude's agent and global settings.
## Project discovery does not consult permissions.
# workspaces:
# example-project:
# root: ~/work/example-project
# permissions:
# policy: ask
## ---------------------------------------------------------------------------
## Project discovery expressions
## ---------------------------------------------------------------------------
## is_project
## Purpose: Decides whether the current directory is a project.
## Type: Djinja template. Only the trimmed string "true" is true.
## Default: {{ has_entry('.git') }}.
# workspaces:
# example-project:
# root: ~/work/example-project
# project_discovery:
# is_project: "{{ has_file('package.json') }}"
## recurse_when
## Purpose: Decides whether to scan the current directory’s children.
## Type: Djinja template. Only the trimmed string "true" is true.
## Default: {{ not is_project and depth < 3 }}.
# workspaces:
# example-project:
# root: ~/work/example-project
# project_discovery:
# recurse_when: "{{ not is_project and depth < 4 }}"
## ---------------------------------------------------------------------------
## How to change project discovery
## ---------------------------------------------------------------------------
## 1. Choose a marker such as package.json and test it with is_project.
## 2. Set recurse_when to stop at a discovered project and bound the depth.
## The root has depth 0. The scanner evaluates depths 0 through 19.
## 3. Both expressions receive depth, relative_path, name, and is_project.
## is_project has the recognition result during recursion and is false
## during recognition. relative_path is relative to the workspace root
## and is "." at the root. name is the current directory basename.
## 4. Use has_entry(name) for an existing entry, has_file(name) for an
## existing non-directory, and has_dir(name) for a directory.
## A missing workspace directory yields no discoveries.
# workspaces:
# example-project:
# root: ~/work/example-project
# project_discovery:
# is_project: "{{ has_file('package.json') }}"
# recurse_when: "{{ not is_project and depth < 4 }}"
## ---------------------------------------------------------------------------
## Complete example
## ---------------------------------------------------------------------------
## cydo-init: complete-example begin
# workspaces:
# example-project:
# root: ~/work/example-project
# exclude: [node_modules, .cache]
# default_agent: claude
# default_task_type: direct
# project_discovery:
# is_project: "{{ has_entry('.git') }}"
# recurse_when: "{{ not is_project and depth < 4 }}"
# worktree_links: [AGENTS.md]
# sandbox:
# memory: {max: 8G, high: infinity, swap_max: 0}
# isolate_filesystem: true
# unsandboxed_command_execution: no
# isolate_processes: true
# isolate_environment: true
# allow_privileged_task_overrides: false
# paths:
# ~/work/shared: ro
# env:
# EDITOR: vim
# git:
# name: Example Workspace
# email: workspace@example.invalid
# permissions:
# policy: ask
## cydo-init: complete-example end
## ===========================================================================
## Sandbox
## ===========================================================================
## sandbox
## Purpose: Sets the shared sandbox configuration.
## Type: Mapping of sandbox fields.
## Default: Uses the built-in defaults below.
# sandbox:
# isolate_filesystem: true
## ---------------------------------------------------------------------------
## Sandbox fields
## ---------------------------------------------------------------------------
## unsandboxed_command_execution
## Purpose: Offers a task a tool that runs a host shell command outside the sandbox.
## Accepted values: no omits the tool. ask requires approval for each call.
## yes runs calls without approval.
## Default: The task type's verdict (ask for interactive types, no for sub-agents).
## An agent entry can override the shared sandbox, and a workspace can
## override both. Djinja can use task_type, interactive, and default
## (the task type's rendered verdict).
## The sandbox and this setting guard against accidental host damage.
## They do not form a trust boundary against a malicious agent. yes suits
## trusted local setups and task types that routinely need host tooling,
## where prompts would only cause approval fatigue; keep ask or no for
## untrusted repositories or prompts, or on a shared machine.
# sandbox:
# unsandboxed_command_execution: no
## allow_privileged_task_overrides
## Purpose: Permits per-task prompt templates and settings that loosen the inherited sandbox.
## Type: Boolean.
## Default: False. A set agent value replaces the global value, and a set
## workspace value replaces both. Explicit false counts.
## A task may tighten read_only or the command verdict without this setting.
## A writable override on a read-only type, a more permissive command
## verdict, any per-task isolation flag, and prompt template overrides require it.
## Prompt template overrides render as the server user. A saved template
## requires permission when it is used. After the first submission is
## accepted, the first-message template is no longer used or checked.
## Task launches still refuse saved sandbox overrides that require permission
## when the setting is disabled.
## A read-only task cannot use read_only: false on an inherited worktree.
## A task's own worktree stays writable even with read_only: true.
# sandbox:
# allow_privileged_task_overrides: false
## isolate_filesystem
## Purpose: Restricts filesystem access to sandbox mounts.
## Type: Boolean.
## Default: True, or the earlier layer’s value.
## Accepted values: True or false. Bubblewrap is selected if either filesystem
## or process isolation is enabled.
# sandbox:
# isolate_filesystem: true
## isolate_processes
## Purpose: Runs the command in a separate process namespace.
## Type: Boolean.
## Default: True, or the earlier layer’s value.
## Accepted values: True or false. Bubblewrap is selected if either filesystem
## or process isolation is enabled.
# sandbox:
# isolate_processes: true
## isolate_environment
## Purpose: Clears the inherited environment before applying sandbox.env.
## Type: Boolean.
## Default: True, or the earlier layer’s value.
## Accepted values: True keeps host HOME (or /tmp if unset) and nonempty
## NIX_PATH. False inherits the host environment.
# sandbox:
# isolate_environment: true
## paths
## Purpose: Declares filesystem mounts or masks.
## Type: Mapping of absolute or home-relative host paths to modes.
## Default: Built-in mounts, with per-path overrides inherited. Mount
## planning skips non-existent paths and logs a warning.
## Accepted values:
## ro: read-only access.
## rw: write access subject to task rules.
## always_rw: survives the ordinary task read-only downgrade.
## tmpfs: disposable memory-backed storage.
## empty_dir: an empty directory.
## empty_file: an empty file.
## Notes: Discovery and exact checkout/worktree caps can make always_rw
## read-only. Use nonempty absolute paths after tilde expansion. A leading
## "//", a trailing slash on a path other than "/", and any ".." component
## are invalid. Interior repeated separators and "." normalize away.
## Conflicting aliases for the same path in one layer are invalid.
## Incompatible mounts at the same physical destination are also invalid.
## Read-only mounts and masks can conflict with required write access.
# sandbox:
# paths:
# /usr/share: ro
## env
## Purpose: Sets child environment entries and can override the PATH used to
## find agent executables.
## Type: Mapping of variable names to strings or Djinja expressions.
## Default: No added entries, or entries inherited by key.
## Accepted values: Use env.NAME to read host variables. The executable lookup
## uses host PATH when no override is set.
## Notes: Use read_file with an absolute or tilde-prefixed path to read a file.
## Use trim to strip leading and trailing whitespace. In literal template
## text, ~/ expands using host HOME. Expression values such as env.NAME or
## read_file(...) are used as returned. A template error prevents launch.
# sandbox:
# env:
# PATH: "{{ env.PATH }}"
# # Read a secret from a file. The trim filter drops the trailing newline.
# ANTHROPIC_API_KEY: '{{ read_file("~/.secrets/anthropic_key") | trim }}'
# # Under systemd, LoadCredential= files live in $CREDENTIALS_DIRECTORY.
# # ANTHROPIC_API_KEY: '{{ read_file(env.CREDENTIALS_DIRECTORY ~ "/anthropic_key") | trim }}'
## git
## Purpose: Overrides the Git identity under filesystem isolation.
## Type: Mapping with required name and email strings.
## Default: Inherits each field, starting with the driver’s identity.
## Notes: Each nonempty field overrides the same field in earlier layers.
# sandbox:
# git:
# name: Example User
# email: example@example.invalid
## ---------------------------------------------------------------------------
## Git identity fields
## ---------------------------------------------------------------------------
## name
## Purpose: Sets the Git identity name.
## Type: String.
## Default: Required in a git block. Use "" to inherit this field.
# sandbox:
# git:
# name: Example User
# email: example@example.invalid
## email
## Purpose: Sets the Git identity email.
## Type: String.
## Default: Required in a git block. Use "" to inherit this field.
# sandbox:
# git:
# name: Example User
# email: example@example.invalid
## ---------------------------------------------------------------------------
## How to choose a sandbox path mode
## ---------------------------------------------------------------------------
## 1. Decide whether to share the original path or hide its contents.
## 2. Use ro, rw, or always_rw to share existing contents with the access
## you need.
## 3. Use tmpfs, empty_dir, or empty_file to mask existing contents. The
## mount point must exist, even for a temporary mount.
# sandbox:
# paths:
# ~/work/reference: ro
# /run/cydo: tmpfs
## ---------------------------------------------------------------------------
## How to layer sandbox settings
## ---------------------------------------------------------------------------
## 1. Put shared mounts and defaults in the global sandbox block.
## 2. Override settings for one configured agent in its sandbox block.
## 3. Override settings for a workspace in its sandbox block. Later layers
## replace declarations at the same normalized path. Task and launch
## rules determine final access. Discovery skips the agent layer.
# sandbox:
# paths:
# ~/work/reference: ro
# agents:
# claude:
# sandbox:
# env:
# EDITOR: vim
# workspaces:
# example-project:
# root: ~/work/example-project
# sandbox:
# paths:
# ~/work/shared: ro
## memory
## Sets per-agent memory limits on Linux. Fields merge independently from
## global to agent to workspace. Running agents keep their launch limits.
## Use bytes, uppercase K/M/G/T (base 1024), an integer percentage of
## system RAM, or infinity to lift an inherited limit. Use 1–100% for max
## and high. Only swap_max accepts zero bytes or 0%. Numeric byte limits
## must stay below the kernel's unlimited value.
## YAML integers are byte counts (for example, +1 is 1 and 0x10 is 16).
## String byte counts require decimal digits and may use an uppercase suffix.
## Floating-point and exponent forms such as 1.0 and 1e3 are rejected.
## max is the hard limit. swap_max bounds swap use. high is optional and
## throttles memory allocations. Leave a wide gap below max when setting
## high, since throttling can stall runaway processes for minutes.
## An OOM kill can pick the agent itself. These limits protect against
## accidental exhaustion and can be changed by a malicious agent.
# sandbox:
# memory: {max: 8G, high: 4G, swap_max: 0}
## Running CyDo as a systemd user service
## Memory limits require systemd 254 or later, cgroup v2, and delegation of
## the memory controller. CyDo must be the main process of a user service so
## systemd stops its agents when CyDo stops, restarts, or crashes.
##
## Example ~/.config/systemd/user/cydo.service:
## [Service]
## ExecStart=/path/to/cydo
## Restart=on-failure
## Environment=EDITOR=vim
##
## [Install]
## WantedBy=default.target
##
## Run systemctl --user daemon-reload and systemctl --user start cydo.
## Set Environment= for values read by sandbox.env templates. Transient
## services do not inherit the shell environment. Pass it with --setenv:
## systemd-run --user --unit=cydo --setenv=EDITOR cydo
## For development:
## systemd-run --user --pty --same-dir --wait --collect --unit=cydo-dev --setenv=EDITOR ./build/cydo
## Run loginctl enable-linger to keep your user service running after logout.
## Codex tasks in the same workspace can share an app-server and its limits.
## Server-run Bash commands get their own scope with the same per-scope limits.
## total_agent_memory
## Aggregate memory limits shared by agents in this CyDo instance's slice.
## Uses the same fields, units, and numeric bounds as sandbox.memory.
## Changes apply live to the slice and to agents launched afterwards.
## Title generation, suggestions, and server-run Bash use the session's
## launch settings until the task is relaunched. If memory limiting was off
## at launch, the agent and these subprocesses stay in the service cgroup.
## If the session started with per-task limits, its subprocesses keep those
## limits across reloads. CyDo logs the slice name when applying limits.
# total_agent_memory: {max: 24G, high: 20G, swap_max: 0}
## ---------------------------------------------------------------------------
## Complete example
## ---------------------------------------------------------------------------
## Create ~/work/cydo-scratch if you want to use the writable scratch mount.
## cydo-init: complete-example begin
# sandbox:
# memory: {max: 8G, high: 4G, swap_max: 0}
# isolate_filesystem: true
# unsandboxed_command_execution: no
# isolate_processes: true
# isolate_environment: true
# allow_privileged_task_overrides: false
# paths:
# /usr/share: ro
# ~/work/cydo-scratch: rw
# /var/cache/cydo: always_rw
# /run/cydo: tmpfs
# /var/empty: empty_dir
# /var/empty-file: empty_file
# env:
# PATH: "{{ env.PATH }}"
# git:
# name: Example User
# email: example@example.invalid
# total_agent_memory: {max: 24G, high: 20G, swap_max: 0}
## cydo-init: complete-example end
## ===========================================================================
## Permissions
## ===========================================================================
## permissions
## Purpose: Sets Claude permission policy and CyDo prompt timeouts.
## Type: Mapping of permission fields.
## Default: Uses the built-in values below.
## Notes: Only Claude uses CyDo’s permission policy. Codex uses approval
## policy never. CyDo automatically approves Copilot permission requests.
## Agent entries for any driver may set prompt_timeout. Only Claude agent
## entries may set policy or auto_mode.
# permissions:
# policy: ask
## ---------------------------------------------------------------------------
## Permission fields
## ---------------------------------------------------------------------------
## policy
## Purpose: Chooses how to handle a tool call.
## Type: A decision string or Djinja string rendering a decision.
## Default: Ask on dangerous calls in interactive tasks, deny them elsewhere,
## and otherwise use auto if enabled or allow.
## Accepted values: allow, deny, ask, auto.
## Notes: Templates receive tool_name, input, auto_mode, dangerous, and
## interactive. dangerous means Claude Code’s safety checks flagged the
## call. interactive includes entry-point types, even system entries,
## and types reachable from them through named keep-context transitions.
## An empty policy selects the built-in policy. Invalid decisions and
## evaluation errors deny the call, as does auto with auto_mode off.
## With auto_mode on, auto prompts a user on Claude safety escalation.
# permissions:
# policy: "{{ 'ask' if tool_name == 'Bash' else 'allow' }}"
## auto_mode
## Purpose: Lets Claude Code’s classifier judge calls sent to auto.
## Type: Boolean.
## Default: False, or the earlier layer’s value.
# permissions:
# auto_mode: true
## prompt_timeout
## Purpose: Denies a call if its permission prompt stays unanswered.
## This also applies to CyDo’s UnsandboxedCommand prompt on every driver.
## Type: Unsigned number of seconds.
## Default: 120, or the earlier layer’s value.
## Accepted values: 0 waits indefinitely.
# permissions:
# prompt_timeout: 120
## ---------------------------------------------------------------------------
## How to layer permission settings
## ---------------------------------------------------------------------------
## 1. Set a global prompt timeout.
## 2. Enable auto mode on a configured Claude agent to inherit that timeout.
## 3. Set a workspace policy to override just that field. The last supplied
## field wins, and omitted fields inherit.
# permissions:
# prompt_timeout: 120
# agents:
# claude:
# permissions:
# auto_mode: true
# workspaces:
# example-project:
# root: ~/work/example-project
# permissions:
# policy: ask
## ---------------------------------------------------------------------------
## Complete example
## ---------------------------------------------------------------------------
## cydo-init: complete-example begin
# permissions:
# policy: "{{ 'ask' if tool_name == 'Bash' else 'allow' }}"
# auto_mode: false
# prompt_timeout: 120
## cydo-init: complete-example end
## ===========================================================================
## Agents
## ===========================================================================
## agents
## Purpose: Names configured instances of the built-in agent drivers.
## Type: Mapping of names to agent settings.
## Default: Synthesizes built-in entries for uncovered drivers.
## Notes: A driver’s entry is synthesized only if its built-in name is
## unused and no configured entry selects that driver. References to
## a configured name use the driver selected by that entry. Keep an
## explicit claude or codex key if other settings refer to that name.
# agents:
# claude:
# display_name: Claude Code
## ---------------------------------------------------------------------------
## Agent fields
## ---------------------------------------------------------------------------
## driver
## Purpose: Selects the agent implementation.
## Type: Driver name string.
## Default: Inferred if the entry name is a built-in driver name. Required for
## custom names.
## Accepted values: claude, codex, copilot.
# agents:
# claude-auto:
# driver: claude
## display_name
## Purpose: Supplies the label shown in the UI.
## Type: String.
## Default: The driver’s UI label, such as Claude Code.
# agents:
# claude-auto:
# driver: claude
# display_name: Claude with auto mode
## usage_polling_period
## Purpose: Refresh account usage through running Claude sessions.
## Type: Mapping with turns (positive completed-turn count) and/or timespan
## (positive duration mapping). Available for Claude agents.
## Default: Unset. Usage refresh is opt-in.
# agents:
# claude:
# usage_polling_period:
# turns: 1
# timespan: {minutes: 20}
## sandbox
## Purpose: Overrides sandbox settings for this agent.
## Type: Sandbox mapping.
## Default: Inherits global settings.
# agents:
# claude-auto:
# driver: claude
# sandbox:
# env:
# EDITOR: vim
## permissions
## Purpose: Overrides permission settings for this agent.
## Type: Permissions mapping.
## Default: Inherits global settings.
## Accepted values: Any driver can set prompt_timeout. Only Claude can set
## policy and auto_mode.
# agents:
# claude-auto:
# driver: claude
# permissions:
# auto_mode: true
## model_aliases
## Purpose: Maps model class labels to a driver model or effort.
## Type: Mapping from class names to model strings or model setting maps.
## Default: Driver defaults for small, medium, and large. Other classes name a
## model directly.
# agents:
# claude-auto:
# driver: claude
# model_aliases:
# small: haiku
## ---------------------------------------------------------------------------
## Model alias fields
## ---------------------------------------------------------------------------
## model
## Purpose: Selects a driver-specific model name.
## Type: String.
## Default: Omit it to keep the usual model for the class.
# agents:
# claude-auto:
# driver: claude
# model_aliases:
# large:
# model: opus
## effort
## Purpose: Sets reasoning effort on launch.
## Type: String.
## Default: Omit it to use the CLI default.
## Accepted values: Claude passes it to --effort. Codex passes it to
## model_reasoning_effort. The CLI decides values. Copilot rejects nonempty
## effort.
# agents:
# claude-auto:
# driver: claude
# model_aliases:
# large:
# effort: high
## ---------------------------------------------------------------------------
## How to define a custom agent
## ---------------------------------------------------------------------------
## 1. Retain the built-in name explicitly if anything refers to it.
## 2. Add a custom entry and specify its driver.
## 3. Give it a display label and any overrides it needs. Select it using
## default_agent or the agent field of a child task type.
# agents:
# claude:
# driver: claude
# claude-auto:
# driver: claude
# display_name: Claude with auto mode
# permissions:
# auto_mode: true
## ---------------------------------------------------------------------------
## How to set model aliases and effort
## ---------------------------------------------------------------------------
## 1. Use a scalar for a model-only alias.
## 2. Use a mapping to set model, effort, or both.
## 3. Use the class label in a task type’s model_class. See that field in
## task-types.yaml for the expression context.
# agents:
# claude-auto:
# driver: claude
# model_aliases:
# small: haiku
# large:
# model: opus
# effort: high
## ---------------------------------------------------------------------------
## Complete example
## ---------------------------------------------------------------------------
## cydo-init: complete-example begin
# agents:
# claude:
# display_name: Claude Code
# claude-auto:
# driver: claude
# display_name: Claude with auto mode
# permissions:
# auto_mode: true
# usage_polling_period:
# turns: 1
# timespan: {minutes: 20}
# codex:
# display_name: Codex
# custom-codex:
# driver: codex
# display_name: Custom Codex
# sandbox:
# memory: {max: 8G, high: infinity, swap_max: 0}
# isolate_filesystem: true
# unsandboxed_command_execution: no
# isolate_processes: true
# isolate_environment: true
# allow_privileged_task_overrides: false
# paths:
# /usr/share: ro
# env:
# EDITOR: vim
# git:
# name: Example Agent
# email: agent@example.invalid
# model_aliases:
# small: gpt-5-mini
# large:
# model: gpt-5
# effort: high
# custom-copilot:
# driver: copilot
# model_aliases:
# large: claude-sonnet
## cydo-init: complete-example end
## ===========================================================================
## Task placement and server defaults
## ===========================================================================
## If ~/.config/cydo existed at server startup, CyDo reloads valid edits
## to this file. It rescans workspaces, refreshes
## agents, model aliases, task-type lists and status, and applies the log
## level. Workspace and global defaults update for new tasks. Suggestions,
## development mode and the system message keyword also update live.
## Sandbox and permission edits affect subsequent launches or lookups.
## The total_agent_memory limits update live for agents in the instance slice.
## Running agents retain their per-task memory limits and other launch
## settings. Restart CyDo to
## apply a changed task_dir template or if init created ~/.config/cydo
## while the server was running.
## task_dir
## Purpose: Determines where CyDo stores each task.
## Type: Djinja path string.
## Default: {{ workspace_root }}/.cydo/tasks/{{ tid }}. Restart after changing
## it.
## Accepted values: The context provides tid, workspace, workspace_root,
## project_path, and repo_path.
## Notes: tid is text. CyDo expands a leading tilde in the rendered path.
# task_dir: "{{ workspace_root }}/.cydo/tasks/{{ tid }}"
## default_agent
## Purpose: Selects the default agent when a workspace supplies none.
## Type: Configured agent name string.
## Default: Uses the entry named claude, or the sole Claude-driver entry.
## With no claude key and zero or multiple Claude entries, set this field.
## Notes: Explicit names must resolve to a configured agent.
# default_agent: claude
## default_task_type
## Purpose: Preselects an entry in the new-task UI.
## Type: Entry key from user_entry_points, or its target task-type name.
## Default: The first visible entry.
## Notes: The picker selects the first visible match, or its first entry
## if none match. A nonempty workspace value overrides this preference.
# default_task_type: direct
## suggestions
## Purpose: Generates next-message suggestions on turn end and when opening a
## live task.
## Type: Boolean.
## Default: True. Title generation is separate.
# suggestions: false
## dev_mode
## Purpose: Enables development behavior in the server and UI.
## Each suggestion generation writes a trace to
## `<data dir>/cydo/suggestion-debug/<id>/`. A 👎 next to the suggestions
## marks that trace with `feedback.json`. Find flagged traces with
## `ls suggestion-debug/*/feedback.json`.
## Type: Boolean.
## Default: False.
# dev_mode: false
## log_level
## Purpose: Sets backend logging verbosity.
## Type: String.
## Default: info. An invalid value logs a warning and falls back to info.
## Accepted values: trace, info, warning, error.
# log_level: info
## system_keyword
## Purpose: Sets the marker used for generated system messages.
## Type: String.
## Default: SYSTEM.
# system_keyword: SYSTEM
## ui.usage
## Purpose: Controls how the Claude usage bars appear. Changes apply to
## open pages when CyDo reloads the config.
## coloring: pace (default) compares usage against elapsed time in the
## window. percent colors the bar by used share alone.
## remaining: Boolean, false by default. True shows the remaining share
## in the fill and value while color still follows the used share.
# ui:
# usage:
# coloring: pace
# remaining: false
## ui.sidebar
## Purpose: Controls sidebar task ordering. Changes apply to open pages
## when CyDo reloads the config.
## order: oldest_first (default) puts newer tasks and New Task at the
## bottom. newest_first puts them at the top.
## sort: creation (default) follows task ID order. activity sorts siblings
## by the latest activity in each subtree, including archived subtasks.
## Missing activity timestamps count as zero. Persisted drafts start
## with their creation time as the activity timestamp.
# ui:
# sidebar:
# order: oldest_first
# sort: creation
## ui.custom_css
## Purpose: Applies a CSS file to open CyDo pages. Edits reload live.
## Paths are relative to CyDo's working directory. ~ expands to HOME.
## UI class names and DOM structure may change between versions and break
## custom styles.
# ui:
# custom_css: ~/.config/cydo/custom.css
##
## Example custom.css for a more compact mobile composer:
## @media (max-width: 768px) {
## .input-box { gap: 4px; padding: 6px 8px; }
## .input-textarea { padding: 5px 7px; min-height: 30px; }
## .input-box .btn { padding: 5px; }
## }
## auth.session_lifetime
## Purpose: Sets how long an unused sign-in remains valid. Changes apply
## to existing sessions when CyDo reloads the config.
## Type: Duration in whole seconds, greater than one hour and at most
## 400 days. Activity is recorded at most hourly, and browsers cap
## persistent cookies at 400 days.
## Default: 7 days.
# auth:
# session_lifetime: {days: 7}
## disk_cleanup_threshold_bytes
## Purpose: Sets the threshold for a task's disk cleanup request.
## Type: Positive integer number of bytes.
## Default: 10485760 (10 MiB).
## Notes: CyDo checks on eligible exits when the last turn succeeded and
## a live batch owner or task dependency is waiting for the result.
## Continuations and the missing-output retry take precedence.
## CyDo asks at most once per task. The signed sum of task-directory
## and task-temp bytes triggers cleanup at or above the threshold.
## Any one referenced Nix closure can independently reach the threshold.
## A task-owned worktree contributes its byte delta from its fork base.
# disk_cleanup_threshold_bytes: 10485760
## ---------------------------------------------------------------------------
## Complete example
## ---------------------------------------------------------------------------
## cydo-init: complete-example begin
# task_dir: "{{ workspace_root }}/.cydo/tasks/{{ tid }}"
# default_agent: claude
# default_task_type: direct
# suggestions: false
# dev_mode: false
# log_level: info
# system_keyword: SYSTEM
# ui:
# custom_css: ~/.config/cydo/custom.css
# usage:
# coloring: pace
# remaining: false
# sidebar:
# order: oldest_first
# sort: creation
# auth:
# session_lifetime: {days: 7}
# disk_cleanup_threshold_bytes: 10485760
## cydo-init: complete-example end