devsandbox 0.11.1

Manage devcontainer-style sandboxes on docker, podman, or Apple container — many throwaway instances per repo from one TOML config.
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
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
# Changelog

## 0.11.1

A call a sandbox's config marks as asked now waits for your answer instead of failing, and tags, releases and ref deletions always ask. Sentry credentials reach only the orgs they name, `devsandbox ps` lists instances like the dashboard, and terminal questions are answered from a list. Existing `sentry` credentials need their orgs, with the sentry feature 1.3.0.

### Added

- **Permission requests: an asked scope waits for your answer instead of failing.** A call needing a scope in a sandbox's `access.<kind>.ask` (or one in no scope of an unfenced claim) is now held, up to the claim's `hold` (2 minutes by default), while you answer from the dashboard's modal, the desktop popup or `devsandbox access pending|approve|deny`: `--for once` (the default), `instance` (this instance until its `rm`) or `always` (a rule on the credential in `credentials.toml`, which you can also write by hand). A deny is kept, so a retrying agent is refused at once; `devsandbox access revoke R-…` drops a kept answer or rule. An agent refused while a request is pending can run `devsbd access wait R-…` in the sandbox and retry once it's answered. An instance gets at most three open requests, so volume can't wear you down.

  ```bash
  devsandbox access pending
  devsandbox access approve R-7Q2M9XK4TB0D --for instance
  ```

- **Tags, releases and ref deletions always ask.** With gh's claim, deleting a branch, creating, moving or deleting a tag (REST `git/refs` or GraphQL `createRef`/`updateRef`/`deleteRef`) and publishing a release are asked every time, on each tag or ref, even when the scope allows them (creating or moving a branch isn't): answered once or for this instance on that one target, never always, and no rule opens them. A draft release isn't asked until it's published, so gh's draft-then-publish is one question. Pushes over git aren't asked yet.

### Changed

- **Sentry credentials reach only the orgs they name.** A Sentry token spans every org its account is in; now a `sentry` credential names the orgs sandboxes may use, with `devsandbox login --org <slug>` (repeatable, each checked with the token), and the broker refuses calls naming any other org, by slug or id. The org list sentry gets shows only those orgs, and `access.sentry.orgs` in a sandbox's config narrows it further. A credential naming none has every org call refused, so an existing `sentry` credential needs its orgs: log in a new one under a new name (`devsandbox login sentry-my-org --feature ghcr.io/devsandboxes/features/sentry:1 --org my-org`) or add `orgs = ["my-org"]` to its entry in `credentials.toml`. Needs the sentry feature 1.3.0, which also drops the routes that listed other orgs' projects and app installations.

  ```toml
  [sandbox.web.access.sentry]
  orgs = ["my-org"]
  ```

- **`devsandbox ps` lists sandbox instances, like the dashboard.** One row per instance with its sandbox, status, uptime and CPU/memory (plus PROFILE when one has a profile, MACHINE when machines are registered, their rows included); `-a` adds stopped ones. Services are in `devsandbox services ls`. `ps --json` prints what `status --json` did, so `stats` and `status` are gone, and so are the `containers.list` / `containers.stats` API methods (and the npm package's `stats()` / `status()`; `ps()` returns the snapshot).

  ```bash
  devsandbox ps -a
  ```

- **The dashboard's Detail panel keeps what a build said.** An instance's warnings and notes from its last `run`, `rebuild` or `start` (the identity summary, the GitHub fence, every `warning:`) stay on it and show under its details, next to whether the browser sandbox is on and its GitHub fence. The details lay out in two columns when they fit.

- **Terminal questions are answered from a list.** Every yes/no and menu on a TTY (`login`'s claim review, machine trust, `rm`, the identity question) is a list you pick from, defaulting to the safe answer, so a stray key can't approve. `login` shows a claim as a folded tree of routes and scopes, and asks which login method to use when several work instead of picking one silently.

### Fixed

- **VS Code no longer hands a claimed sandbox your logins when it can avoid it.** `devsandbox vscode` and the dashboard's `o` start `code` without your ssh-agent or git credential helper for an instance with a credential claim, and open it without asking when no other VS Code window could leak them (checked on Linux). Otherwise the dashboard now asks before opening, and `:code` takes `--allow-credential-leak` like the CLI.
- **A misspelled top-level table is an error**: `[sandboxx.web]` used to load
  as an empty config with no warning; now `devsandbox` names the unknown
  table, as it already did for unknown keys inside a sandbox.

<details><summary>Commits</summary>

- f524850 docs(ps): archive the ps-daemon plan, its content now lives in snapshot-and-json
- 60db185 fix(ps): read the daemon's federated snapshot like the dashboard, since a local collection plus per-machine calls skipped the merge's rules and the poll's cached stats
- 3c44075 docs(prompts): close the terminal prompts plan, its content now lives in cli-prompts and the credentials reference
- 29e72e3 feat(prompts): answer every cli yes/no and menu from a list, so machine trust, rm and the identity question read like login's and default to the safe answer
- 506b0c8 feat(login): ask which login method to use on a terminal when several work, since the silent pick hid that a browser or paste login was there
- 0d0d8f5 feat(login): review a claim as a folded tree and answer approve/refuse from a list, so never routes and scopes read at a glance and a stray key can't approve
- f1577df feat(ask): select, fold and review prompts redrawn in place on a tty, so questions can show folded details and take a picked answer instead of a typed y/N
- 5e94871 docs(prompts): plan styled, foldable, pick-from-list tty prompts
- 8d7bdb3 feat(tui): keep a build's warnings and notes on the instance and show them in a two-column detail, since they were lost once the build log scrolled by
- dadaa35 feat(ps): list sandbox instances with their usage like the dashboard, since a raw container listing plus separate stats and status verbs said less with more commands
- f55a539 fix(vscode): start code without the ssh-agent and git credential helper for a claimed instance, and let the dashboard open one anyway like the cli
- 08889c0 feat(broker): ask a person for tags, releases and ref deletions whatever the scope allows, since no rule should publish for them
- d238f50 feat(devsbd): access wait blocks on a permission request, so an agent retries its call once it's answered
- 76a0b0b feat(tui): a modal answers permission requests as they open, and a desktop popup names the command, so a held call needn't time out
- 81a8aa9 feat(access): pending, approve and deny answer permission requests from the terminal
- 8084400 feat(api): list and answer permission requests over access.pending and access.decide, local clients only
- 1f9e5f8 feat(broker): keep this-instance, always and deny answers, so an answered ask isn't asked again
- 88865ed feat(broker): hold an asked call for its permission request instead of refusing it, so an answer lets it through
- f206473 docs(broker): split permission requests into what's built now and what waits on pushes, links and agents
- 4a7c96d feat(sentry): follow features/sentry 1.3.0's org fence, checked end to end, so existing credentials learn they need orgs
- 727f9db feat(login): --org names a sentry credential's orgs, checked with the token, and access ls shows them, since a credential naming none has its org routes refused
- e5b0985 feat(broker): enforce the org fence and cut org lists to it, so a sentry token reaches only the orgs its credential names
- 731ee26 feat(credentials): a claim can fence an org path variable, so a credential and a config can name the orgs it reaches
- 1ca365c docs(sentry): plan the org fence, since the shipped claim's tokens reach every org the account is in
- fc2f518 docs(credentials): record what 0.11.0 shipped with: sentry's claim spans orgs, the broker is http/1.1 only, drains cut broker streams
- 3ca4b57 fix(config): refuse an unknown top-level table, so a typo like [sandboxx] isn't silently ignored
- 3028a4b docs(site): close the site refresh and release plan
</details>

## 0.11.0

Sandboxes can use gh, git and Sentry's CLI without ever holding your tokens: devsandbox's credential broker keeps them on the host and spends them only on what each sandbox's config allows, gh and git only on the sandbox's own repos. Features now update their tools on a schedule, with no rebuild and no sandbox able to swap them, and host git no longer follows anything a sandbox can write. The features gh 1.3.1, zidane 2.1.1 and sentry 1.2.1 need this release.

### Added

- **Sentry's CLI without its token in the sandbox.** The new `ghcr.io/devsandboxes/features/sentry` feature installs Sentry's `sentry` CLI and claims a `sentry` credential. The sandbox gets a phantom `SENTRY_AUTH_TOKEN`, and its calls to `sentry.io` and the region hosts reach devsandbox's credential broker on the host, which checks each against the claim's scopes (issues, events, releases, uploads, alerts, dashboards, …), swaps the phantom for the real token and calls Sentry. Deleting an org, project or team and minting tokens are refused whatever the config. Any feature can claim a credential the same way, in its `customizations.devsandbox.credentials`, either intercepting its hosts or giving the tool a loopback base URL.
- **gh without its token in the sandbox, fenced to the sandbox's repos.** The new `ghcr.io/devsandboxes/features/gh` feature installs the GitHub CLI and claims a `github` credential: gh, git and anything else calling `api.github.com` reach GitHub through devsandbox's credential broker with a phantom token. Calls on the sandbox's own repos (its folders' remotes plus `access.github.repos`) get the real token, scoped per sandbox (`repo.read`, `pr.write`, `pr.merge`, `issues.write`, `git.push`, `releases.write`, `actions.read`, `actions.write`, …); other repos are read anonymously and never written; GraphQL writes are checked by every id they name. Deploy keys, webhooks, runner tokens, secret writes and other routes that would plant access are refused whatever the config. Use it instead of `ghcr.io/devcontainers/features/github-cli`. gh runs from a shared dir the sandboxes mount read-only, kept current by feature updates (below), so no sandbox can swap the gh the others run.

  ```bash
  devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --profile work
  ```

- **`devsandbox login` and `devsandbox access approve`.** `login` stores a credential's secret on this host and approves the claim of the feature it's for, which it shows you first. A feature release that changes its claim needs approving again, with `access approve`, which shows what changed, or when `run` asks. `--profile` limits a credential to the sandboxes of those profiles.

  ```bash
  devsandbox login sentry-work --feature ghcr.io/devsandboxes/features/sentry:1 --profile work
  ```

- **`devsandbox login` by device code or browser.** A claim that lists the `device` or `browser` login gets its token by OAuth: `login` shows a code to enter at the provider's page (works on a headless box), or opens the provider's login page and takes the redirect on a loopback port. `--method` picks among the claim's methods, and `--client-id` logs in to your own OAuth app (a GitHub App you made) instead of the feature's, or names the app when the feature ships none: `features/gh` offers GitHub's device flow that way. The token, its refresh token and expiries are kept on the host, and the broker renews the token before it expires (or when the provider rejects it, replaying the call), so tools in the sandbox never see it change. A credential whose renewal is refused is marked broken until you log in again.

  ```bash
  devsandbox login github --method device --client-id Iv1.0123456789abcdef
  ```

- **`devsandbox access ls` and `access revoke`.** `ls` lists this host's credentials: who they're granted to, whether the token is pasted or OAuth and when it expires (never the token), the approved and pending claim versions, and the instances using each, with the version they run and whether it's approved. Versions nothing uses are marked. `revoke` deletes a credential's secret and entry, or with `--version` drops one claim version, showing first which instances lose access.

  ```bash
  devsandbox access ls sentry-work
  devsandbox access revoke sentry-work --version 3f2a1b
  ```

- **GitHub tokens that stay narrow, and a warning before they expire.** `devsandbox login` for a GitHub credential takes fine-grained PATs (`github_pat_…`) and GitHub App user tokens (`ghu_…`) and refuses classic PATs, which reach every repo you can; gh's own OAuth token only with `--broad` (below). `access.github.as` in a sandbox's config picks which kind of token a sandbox takes, within the kinds the credential offers (`as` in `credentials.toml`, `["user"]` by default). `access ls` shows when a credential expires and warns two weeks ahead, and in its last week you get a desktop notice once a day while sandboxes use it.
- **GitHub logins that land on the right token.** For a pasted token, `login` opens GitHub's fine-grained token page prefilled with a name, a description and the permissions the claim's granted scopes need, so you only select the repos; `--owner` prefills the user or org that owns it. Before storing any token, `login` checks it against the provider and says whose it is (`… as alice`), so a work credential can't silently be your personal account. Login pages open in the browser of the credential's profile, where its account is signed in.

  ```bash
  devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --owner my-org
  ```

- **`login --broad` for orgs that allow neither a GitHub App nor fine-grained tokens.** It makes a broad credential, which takes gh's own OAuth token (`gho_…`, by gh's device login or pasted), after a confirmation naming its reach: the repo fence still refuses writes outside the sandbox's repos, but GraphQL reads aren't fenced, so a sandbox can read every repo the account can. Narrow tokens stay the default, and a credential is broad or not from its first login.

  ```bash
  devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --broad
  ```

- **Feature updates keep tools current with no setup and no rebuild.** A feature can declare updates (`customizations.devsandbox.updates`): a command baked in its image that refreshes a `${sharedVolumes}` dir its sandboxes mount read-only, gh's binary for one. The daemon runs each due update when it starts and then hourly, every 7 days unless the feature or the config's `[updates]` says otherwise, in a throwaway container from the sandbox's features image with only that dir writable: no sandbox can swap the binary the others run, and no feature code runs on the host. A failure is retried after 6 h and posts an Inbox notice; each run's output is in `logs/` next to `state.toml`. `devsandbox update <name>` runs one now, and a version after the name pins or rolls back. An image runs the updates it was built with, so a feature release that moves its updater reaches an image at its next rebuild. Not on Apple's container yet.

  ```toml
  [updates]
  gh = "1d"
  ```

  ```bash
  devsandbox update gh 2.60.0
  ```

- **`run` asks to approve a changed claim.** When a feature release changes a credential claim, `run` on a terminal shows what changed and asks, instead of refusing and sending you to `access approve`; a yes approves it and the run goes on. Off a terminal (`--json`, `-d`, the dashboard, `rebuild`, a machine's run) it still refuses.
- **`access.<kind>` in a sandbox's config** picks the credential a claim takes (`credential`) and narrows what the sandbox may do with it (`scopes`). Edits apply to the next call, no rebuild.

  ```toml
  [sandbox.web.access.sentry]
  credential = "sentry-work"
  scopes = ["releases.write", "uploads"]
  ```

- **Intercept-mode credential claims.** A feature whose claim intercepts its hosts (gh's `api.github.com`, say) now works with the tool as it ships: the sandbox gets `HTTPS_PROXY` pointing at the helper, which hands only the claimed hosts to the broker and dials everything else itself (through the proxy the container already had, if any). The broker's per-host certificates chain to this host's member CA, which `run` installs into the container's system CA bundle (`update-ca-certificates`, `update-ca-trust`, or the bundle itself) and names in `NODE_EXTRA_CA_CERTS`, `DENO_CERT`, `REQUESTS_CA_BUNDLE` and `AWS_CA_BUNDLE`. A new claimed host reissues the CA and reinstalls it in the running sandboxes; a stopped one gets it at `start`. `run` warns when `remoteEnv` or `--env` sets a proxy variable, which would bypass the route.
- **Each folder's remotes are recorded at its first `run`.** Before a folder's first container, `run` reads its git remotes (any host; host paths, `file://` and `ext::` URLs dropped) into `state.toml` and prints the GitHub repos among them: the repos a sandbox's GitHub credential will be fenced to. The record is never re-read, so a remote a sandbox adds or rewrites later never counts, and `rm` keeps it. `access.github.repos` adds repos; `devsandbox access forget <folder> <repo>` drops one (instances take it at their next start or rebuild); `access ls` lists each folder's fence.

  ```bash
  devsandbox access forget ~/src/app someone/planted-repo
  ```

- **The broker enforces the repo fence, git over HTTPS included.** A claim that declares a `fence` gets its credential only on repos in the sandbox's fence: its folders' recorded repos plus `access.<kind>.repos`. Outside the fence a read goes to GitHub without a credential, as a stranger's would (public repos and git dependencies work), marked `devsandbox-fence: outside`; a write or a `git push` is refused before git sends anything, naming `access.<kind>.repos`, and so is an upstream 401, so git never prompts for a password. Claim routes take `{repo}` (`owner/repo`, case-insensitive, `.git` dropped) and a `?service=` style query constraint, so git's fetch and push map to their own scopes.
- **The repo fence follows renamed repos, and an old name can't be taken over.** The first time the broker sees a fenced repo it asks GitHub for its id (following a rename's redirect, only on `api.github.com`) and keeps it in `state.toml`. A renamed repo then works under its old and new names, calls naming the old one are sent to the new one, and `/repositories/{id}` routes work for the fence's repos. Whoever later registers the old name gets nothing: the fence entry stays with the repo it first named.
- **GitHub GraphQL through the broker.** A claim can scope GraphQL: `graphql query` covers every query (they pass under the token's own reach and are never asked), `graphql mutation <name>` one mutation, and its `fence` names the mutation inputs holding a repo or object id (`input.repositoryId`, `input.branch.repositoryNameWithOwner`). The broker reads each `POST /graphql` strictly (one operation, no batches, no duplicate JSON keys, at most 1 MiB, gzip or deflate decoded within that), maps every top-level mutation field to its scope whatever its alias or fragment, and refuses the call when an input names a repo outside the sandbox's fence or an object it can't place. The request goes to GitHub byte for byte as sent.

- **A sandbox with a GitHub git claim can't reach GitHub with your ssh keys.** While a feature claims git hosts, the ssh-agent relay shows the sandbox only the keys its config's new `ssh-keys` names, none by default. A key with `destinations` signs only logins to those hosts, checked against their host keys in this host's `known_hosts` (the client must bind the session, OpenSSH 8.9+). A `signing-only` key signs only git's ssh commit signatures. A key named without destinations works everywhere, GitHub included, and so gets around the repo fence. Refusals land in the instance's Inbox. An instance with such a claim never gets the agent by bind mount.

  ```toml
  [sandbox.web]
  ssh-keys = [
    { key = "SHA256:Xq3…", destinations = ["gitlab.example.com"] },
    { key = "ssh-ed25519 AAAA… me@laptop", signing-only = true },
  ]
  ```

- **git in the sandbox goes through the broker for a git-host claim.** Remotes stay `https://github.com/` URLs (gh still finds its repo), and `git@github.com:` / `ssh://git@github.com/` remotes are rewritten to them. git reaches GitHub on a proxy port of its own with the member CA trusted, and devsandbox's credential helper hands it the phantom, so the broker adds the real token. Your `store`/`cache` helpers never see it. The settings are git's command-scope env (`GIT_CONFIG_*`, which a config's own entries are kept ahead of), plus a copy in `/etc/gitconfig` for tools that clear the env. At `run` (again after the lifecycle commands) and `start`, devsandbox warns of what would still send git around the broker: a dotfile's proxy or CA bundle for GitHub, `GIT_SSL_*` or a `NO_PROXY` covering GitHub, a remote left on ssh, or ssh commit signing with no `signing-only` key.
- **git-lfs through the broker.** A git-host claim that pins `lfs` (`{ "hosts": ["github.com"], "upload": "git.push" }`) has its LFS batch answers rewritten: each transfer points at a loopback port in the sandbox, and the broker sends it on to the storage host with the credentials the answer carried, so neither those nor the token ever reach the sandbox. A batch is a read or a write by its `operation`: outside the repo fence public LFS objects download without a credential and uploads are refused; an upload needs the claim's `upload` scope.
- **`devsandbox vscode` asks before handing a sandbox your logins.** VS Code's attach gives the sandbox your host's git credentials and whole ssh-agent, so `vscode` (and the dashboard's `o`) refuses an instance with a credential claim; `--allow-credential-leak` opens it anyway, with a warning.
- **`access.log`**, next to `state.toml`: one JSON line per call a sandbox made through the broker (instance, credential, route, scope, verdict, status), never a token.

### Changed

- **A sandbox can no longer see a config.** `run` refuses a bind, read-only too, that covers a config root (any config an instance was created from), a whole `shared-volumes/` dir, or another instance's worktree or per-instance volume. A config that sits inside its own `folder` (`folder = "."`) no longer runs: move it beside the repo. A sandbox that needs config files binds them read-only, one bind each. `run` also warns when a privileged sandbox, or one bound to the container runtime's socket or the desktop's display or session sockets, runs on a host that holds credentials.
- **Host git never follows what a sandbox can write.** A sandbox can write its checkout's `.git`, so host git (worktree add, fetch, fleet code transfer) refuses a git dir that points elsewhere (a planted `gitdir:` or `commondir`, symlinked refs, objects, index or reflog), fetches `origin` only from the URL trusted at its first fetch, and leaves your filter drivers, git-lfs included, inert. Changed a repo's origin yourself? `devsandbox trust-origin <folder>` trusts the new URL. LFS files in host-made worktrees are pointers until `git lfs pull` in the sandbox, and a repo layout git didn't make (`--separate-git-dir`, symlinked `objects/`) is refused.

  ```bash
  devsandbox trust-origin ~/src/app
  ```

- **Refusals for what isn't built yet say so**, ending in "not supported yet! open an issue in https://github.com/Nemikolh/devsandboxes" instead of naming internal plan steps.
- **The docs site covers the credential broker and feature updates.** A credentials example replaces the ssh-and-git-push one, the babysit-a-PR example is gone, agent prompts are a copy button with nothing to fill in, and the config reference is condensed to what each property needs.

### Fixed

- **A `run` refused for an unapproved claim is rolled back**, so running again is a plain `run` instead of leaving a dead instance beside a new one.
- **`rm` deletes the per-instance bind dirs devsandbox created.** A later instance reusing the id inherited them, with whatever the old one stored there (the zidane feature's tokens, say).
- **Copying `worktree-include` files no longer follows a symlinked dir**, which a sandbox could swap in to have the host read a host file into the worktree or write outside it.
- **A helper install that failed once is retried** by the daemon each time the instance's container shows up running, instead of leaving it without notifications for good. `inspect` shows why the helper is unavailable, and bridge failures, an unreadable `state.toml` and notifications that couldn't be stored go to `serve.log`, once per reason.

<details><summary>Commits</summary>

- 0709b75 fix(update): write the image label's $ as \u0024, since podman expands it and lost the shared dir
- 4283a0d docs(serve): instances with credential claims hold the daemon, and drop the stale ctrl-d limitation
- dcae3ea docs(site): bring every page up to the credential broker and feature updates
- d35ce80 docs(config): condense the config reference to what each property needs, checked against the code
- 4236f2e docs(site): agent prompts are a copy button with nothing to fill in, the agent works the specifics out
- 1e8f9bb docs(site): a credentials example replaces ssh and git push, and the babysit example goes until a k8s page replaces it
- c159cdb docs(site): plan the site refresh and the 0.11.0 release
- fa68c3d docs(features): close the read-only update mounts plan
- b58ee3f docs(gh): the feature's update and bin dir mount shipped, its version is 1.3.1
- 6a28a40 test(features): mirror the gh and sentry patch releases
- 82e44db fix(features): an update's mount is read-only because the update declares it, since the feature schema can't say readonly
- 2bd0e82 docs(features): plan read-only update mounts by declaration, the feature schema has no readonly
- 470a003 docs(features): close the sentry and update fixes plan, image-declared updates as an adr
- a813698 test(sentry): follow the feature to sentry's new cli through intercept mode, keeping base-url mode covered by its own fixture
- e64d152 fix(update): run the updates an image was built with, so a feature release that moves its updater can't break older images
- df0aa01 fix(run): roll back a run refused for an unapproved claim, so running again doesn't leave a dead instance beside a new one
- 0c802c8 docs(features): plan sentry's new cli, rolling back unapproved runs and updates from the image's label
- bcafd40 docs(features): close the zidane and sentry updates plan
- 6def2bd test(sentry): mirror the sentry feature declaring its own update and read-only bin mount
- 3d283f2 docs(features): plan zidane and sentry updates so no sandbox can swap a shared binary
- 4b56554 docs(features): close the feature updates plan, running updates in the feature's image as an adr
- b8bda61 test(gh): mirror the gh feature declaring its own update and read-only bin mount
- c1d7cd7 feat(run): ask to approve a changed credential claim on a terminal instead of sending the user to access approve
- 5baa06e feat(serve): run due feature updates at start and hourly, so tools stay current with zero setup
- 59992d3 feat(update): run a feature's update in its own image with only its shared dir writable, so tools refresh without host code
- 85f8702 feat(features): read a feature's declared updates and the config's intervals, the data the update runner needs
- 39ce272 docs(features): plan feature updates so tools stay current with no setup and no sandbox can swap them
- e677216 test(serve): wait out the races in two flaky tests
- 08af4d1 docs(credentials): close the github login plan, the broad opt-in decision as an adr
- 9ac9e6f feat(login): accept gh's broad oauth token behind an explicit --broad opt-in, for orgs where neither an app nor a fine-grained pat is possible
- 8b8bc94 feat(login): open login pages in the credential's profile browser, where its account is signed in
- 3357148 feat(login): check the token against the claim's check before storing it and say whose it is, so a work credential can't silently be the personal account
- 406c817 feat(login): open the claim's token page prefilled with its permissions, so a narrow pat isn't hand-picked
- 1f66463 docs(credentials): plan github login for orgs that can't install an app
- 036c3af fix(credentials): refusals name what's unsupported and where to ask, not internal plan steps
- 76b72da docs(credentials): park github app installation tokens, most users can't install an app in their org
- adc3666 docs(status): gh, git and sentry-cli are brokered locally; the fleet half is next
- 71bf2c8 feat(login): let the home bring its own oauth app when a claim names none
- c52b701 feat(gh): the github claim features/gh ships, held to what gh actually calls
- 960136a feat(broker): read graphql strictly and fence mutations by their input ids
- 16a5892 feat(broker): pin the fence to github repo ids and take only narrow user tokens
- d3a9445 test(git): clone and push through the broker end to end
- f5a66e5 feat(broker): carry git lfs transfers through loopback handles
- 3e12730 feat(run): route a git-host claim's git through the broker on its own proxy port
- 06459ab feat(broker): enforce the repo fence and recognize git smart http
- 64795a3 feat(ssh-agent): filter the relayed agent's keys under a git-host claim
- cebfd9f feat(run): record each folder's remotes at its first run as the repo fence
- 80516f1 feat(run): wire intercept claims with the proxy env and the member ca trusted
- 4d17976 feat(broker): terminate tls for intercepted hosts with the member ca's leaf
- ef5f203 feat(devsbd): proxy ports that send claimed hosts to the broker and dial the rest
- d98fd51 feat(credentials): a per-member ca that mints leaves only for intercepted hosts
- a1e1d21 feat(access): list and revoke the home's credentials
- 188a517 feat(broker): renew oauth tokens behind the phantom
- c90362b feat(login): log in by oauth device flow or browser with pkce
- 796e648 test(broker): prove sentry-cli uploads through the broker with no token in the sandbox
- a609f11 feat(broker): swap phantoms for the home's credential under per-call policy
- ae5609a feat(run): refuse binds that reach a config root or another instance's paths
- 1281442 feat(run): wire features' credential claims into instances
- 1e297a9 feat(devsbd): carry broker connections from loopback listeners over the bridge
- 154a7fa feat(credentials): keep credentials on the home with login by paste and access approve
- 5888fa4 feat(broker): call upstreams over rustls, refusing private addresses on the dialed ip
- 37db843 feat(credentials): read the credential claims features declare and version them
- 48198da feat(broker): parse requests strictly and redact the injected token as it streams
- 196cc2d docs(credentials): agree the broker, gh/sentry and git-gateway plans and start building them
- e8532e0 docs(credentials): fold the client-behavior spike into the plans
- a025402 docs(credentials): settle the questions blocking each plan's first step
- 8e0bbff docs(git): close the host-side hardening plan with adr 0057
- a9a8a92 fix(worktree): copy worktree-include files without following symlinked dirs
- f202257 fix(rm): delete the per-instance bind dirs devsandbox created
- a83d5a4 fix(git): make the user's filter drivers inert in host git
- 49ae1fe fix(git): fetch origin only from the url trusted on first use
- 3eeb23e fix(git): refuse git dirs a sandbox redirected at other host repos or files
- e0df527 docs(plans): plan the host-side hardening fixes found by the credentials review
- 67c6b57 docs(credentials): review rounds 5-12, final reconciliation and next steps
- 1e98421 docs(credentials): drop the superseded cli-proxy plan and harden the plans through review rounds 1-4
- 1a98a09 docs(credentials): split the credentials exploration into broker, gh/sentry, git and agent plans
- 88b83e2 docs(site): repo fence, lifetimes, ca trust and one clone per instance in the credentials exploration
- 8942f49 docs(site): explore brokering credentials so sandboxes never hold them
- ed21f04 fix(serve): retry the helper install for a running instance recorded without one, once per appearance, since one failed install cut it off from notifications for good
- 6ad9a5c feat(devsbd): record why the helper install failed on the instance and show it in inspect, since the note only reached one command's stderr
- 6af31e9 feat(serve): log bridge failures, unreadable state and unstored notifications to serve.log, once per reason, so a stuck outbox leaves a trace

</details>

## 0.10.0

A config can now belong to the whole fleet and keep running on an always-on server while the host it was written on is off. Links a sandbox opens land in your desktop browser, picked per profile. Sandboxes and services get NVIDIA GPUs from `hostRequirements.gpu`, and placement sends them to a machine that lends one. Members run the build the fleet's authority pins.

### Added

- **A config every machine runs.** On the fleet's authority (the host of its first `machine add`), a `run`, `rebuild` or `start` signs the config's next version when it changed and sends it to every machine, which installs its own copy. Machines keep the latest signed version while the authority is offline and build only from an exact copy of it, so a copy edited in place is refused and restored. The verb's output names any machine that didn't get it, and running the verb again retries those. A `run box/<sandbox>` from the authority also brings the sandbox's repos to `box`, uncommitted work included.

  ```bash
  devsandbox machine add box --control-plane   # on the authority, signs its configs for box
  devsandbox run web                           # on the authority, signs a changed config and sends it
  devsandbox run box/web                       # from the laptop, even with the authority off
  ```

- **A laptop can drive a server.** A laptop joining with `devsandbox machine add box` gets its join proposed to the authority, which approves it with `devsandbox machine approve <id>`. A host with no container runtime is a clean driver. The dashboard says `no runtime`, nothing is placed on it, and a bare `run <sandbox>` goes to the machine that runs it.
- **Links opened in a sandbox open on your desktop.** `xdg-open`, `$BROWSER`, `webbrowser`, Node's `open` and CLI logins open `http(s)` URLs in the host's browser. A `localhost` URL or OAuth callback gets a port forward first (marked `(open)` in the Ports tab, stopped after 10 minutes idle), so dev servers and `gh auth login` work. A link opens on the host that last attached to the instance with a terminal, so a server sandbox you `exec` into from your laptop opens on the laptop. The dashboard's status line says what happened to each link, and `devsbd open <url>` does the same from scripts.
- **Profiles** pick that browser. Declare them in the config, list the ones a sandbox allows, choose one at `run` and switch it any time without a restart. Each host maps profiles to browsers in its own `profiles.toml` next to `state.toml`. `ps`, `inspect` and the dashboard show an instance's profile and flag one its sandbox no longer allows.

  ```toml
  [profiles.work]
  [profiles.personal]

  [sandbox.web]
  folder = "../web"
  image = "node:22"
  profiles = ["work", "personal"]
  ```

  ```toml
  # ~/.local/share/devsandbox/profiles.toml
  [work]
  open = ["google-chrome", "--profile-directory=Profile 2"]
  ```

  ```bash
  devsandbox run web --profile personal
  devsandbox profile web work       # or P / :profile in the dashboard
  ```

- **GPUs.** `hostRequirements.gpu = true` on a sandbox or a service gives its container every NVIDIA GPU (docker's `--gpus all` with the `nvidia` runtime, else the CDI spec on docker or podman). When none is usable, `run` stops before building, and `"optional"` warns and runs without. `run --place` puts a sandbox that requires a GPU only on a machine that lends one, and prefers one for an optional GPU.

  ```toml
  [sandbox.ml]
  folder = "../ml"
  image = "pytorch/pytorch"
  hostRequirements.gpu = true
  ```

- **`devsandbox machine allow`** sets what work placed on this host may use, instead of editing `[allow]` in `member.toml`. Only the host itself can. `machine add` asks the machine what to lend over your ssh session, or takes `--allow`, `--allow-bind` and `--allow-local-env`.

  ```bash
  devsandbox machine allow --gpus on --bind-add ~/datasets
  devsandbox machine add box --allow gpus --allow-bind /srv/data
  ```

- **Members run the build the authority pins.** The authority signs its build into the membership log, and members download that release and check its sha256 before running it (a source build only with `dev-builds = true` in `member.toml` or `full` trust), so a compromised control plane can't push code. `machine ls` shows a machine behind the pin and why. `devsandbox machine upgrade <m>` copies this build over a machine's over ssh, for the control plane the authority no longer follows.
- **Sessions in the dashboard.** An instance's helper sessions show as rows under it. `a` or `enter` attaches, `K` ends one, and `a` on the instance picks a detached one. `devsandbox exec web --end <id>` ends a session from the CLI. A terminal over a fleet link to an instance with a non-root user is now a session too, so a dropped link no longer ends it.
- **A warning when a nested docker can't work from a shell.** On rootless docker with runc before 1.4.1, `exec`'d processes land outside the container's cgroup, so a docker-in-docker `dockerd` started from a shell fails. `run`, `start` and `inspect` now say so. Upgrade the host's runc.

### Changed

- **The fleet's hub is now its control plane**, the Kubernetes name for the role. It is `control_plane = "self" | "<name>"` in `member.toml`, `devsandbox machine control-plane <m>` moves it, `machine add --control-plane` picks it for a new fleet, and the API and `index.d.ts` call it `control_plane`.
- **`machine add` picks no config roots** (`--config` is gone). A machine's roots are the ones its daemon lists, kept live as it installs signed copies. A command on a machine with no root given uses its signed copy, else its `~/.devsandboxes`.
- **The docs site is much shorter.** Machines moved to `/docs/machines`, the basics are on the quick start, the two services examples are one `/examples/services` page, and the Features and VS Code examples are gone (their content lives in the quick start, the devcontainer port guide and the dashboard tour).

### Fixed

- **Ctrl-D in the dashboard no longer removes an instance.** One-key actions ignored modifiers, so Ctrl-D (a shell habit, or the EOF a closing terminal sends) counted as `d`, and Alt-Y answered a confirm. Letters and symbols now fire bare or with Shift only. Ctrl-C and Ctrl-] keep working, and a focused terminal still gets every Ctrl key.
- **A pipeline whose command starts the daemon no longer hangs.** The daemon kept any fd the CLI had inherited, so `devsandbox … | cat` could wait forever on a pipe the daemon held. It now starts with only its own stdio.
- **`devsandbox exec web zidane` from a terminal gets a terminal.** A command given to `exec` ran without `-i -t` unless asked, so a TUI drew at 80x24, saw no input and left its terminal replies on screen. From a terminal it now gets `-i -t` and a resumable session, and piped stdio stays plain.
- **The dashboard shows a fleet config's sandboxes once**, with every host's instances under one group, instead of again per machine. The instances detail panel grows to fit, so the drift line no longer falls off.
- **Service networks no longer break DNS on rootless docker.** A new service network covering a host route, gateway or nameserver is recreated on a free `/24` of `10.200.0.0/16`, with a warning. `devsandbox gc` now removes unused service networks on docker too.
- **Caches, shell history, `${sharedVolumes}` mounts and `worktree-link` no longer keep a sandbox home** under `run --place`. A placed instance starts them empty on the worker, and a "not placed" note lists each tie once.
- **Upgrading the authority first no longer locks it out** of an older control plane or silently downgrades it.
- **Attaching without an id takes an attached session too**, and a session's creator sees the program's first output.
- **A machine's root removed there leaves the dashboard** without a daemon restart, and a root that errors no longer sticks as a permanent error.

<details><summary>Commits</summary>

- ec10147 docs(site): cover sessions, the driver laptop, ctrl chords and gpus, merge the services examples, drop the features and vscode ones and cut the docs by 40%
- 1d17cda docs(agents): list the profile, rename, vscode, status and fleet-link command files
- b3929a2 chore(comments): drop machine add's roots claim and history wording from machine.rs
- 2fc8199 docs(plans): move parked and proposed plans to explore and mark fleet planned, so active holds only agreed work
- 4026122 docs(cli): list profile, machine allow/control-plane/approve, exec sessions and controlPlane where the reference and cli skill still lacked them
- ac68b55 fix(serve): start the lazy daemon with every fd above stdio close-on-exec, so a pipeline whose command starts it no longer hangs on a pipe the daemon inherited
- 2ad5bcc fix(tui): fire one-key actions only bare or with shift, so ctrl-d out of shell habit or a closing pty's eof no longer removes the instance under the cursor
- 83a6ee8 docs(status): park terminal replies echoed after exec returns, since nothing flushes pending tty input
- cf69da4 docs(site): cover profiles, links, gpus, lending, control plane and pinned builds, move machines to /docs/machines, and trim docs, examples and architecture to what a reader skims
- 5f9ad03 docs(machines): a machine verb runs over an api stream on the link, not an ssh of its own
- 8a44299 docs(cli): exec's help says a command from a terminal gets -i -t, machine roots' help drops add picking roots, and the control-plane plan marks the rename shipped
- b717513 fix(fleet): list a sandbox's tie once even when repeated apart, and show ${instance} paths as <instance>, so not-placed notes don't repeat or name a literal instance dir
- aba5e49 docs(status): record the hand-run gpu check on docker cdi and what is still unverified
- 9ce5bcd docs(gpus): close the gpu plan: adrs for spec-compatible gpus and lent-gpu placement, follow-ups parked
- c308945 feat(machine): ask at machine add what the target lends, applied over its own ssh session
- 855d759 feat(machine): set worker allowances with machine allow so a gui can lend gpus without hand-editing member.toml
- 2c25b8b feat(fleet): let required-gpu sandboxes be placed now that placement filters for a lent gpu
- 58f8e67 feat(fleet): place gpu sandboxes only where a gpu is lent, preferring them for optional gpus
- 7663a16 feat(capacity): report a host's usable gpu and whether it lends it, for gpu-aware placement
- 91aebf5 feat(services): give services gpus from hostRequirements.gpu so a gpu-backed service (ollama) needs no runArgs
- 7002091 docs(site): list hostRequirements.gpu as implemented in the devcontainer port guide
- 6951613 feat(run): give sandboxes gpus from hostRequirements.gpu, refusing a required one that can't be had
- 06bf906 feat(runtime): detect nvidia gpu support per runtime so run can pick --gpus or cdi flags
- 92354f0 docs(agents): add a simplify-comments skill so future changes keep comments to why and contracts
- c121bc0 feat(config): type hostRequirements so gpu requests can be acted on per the devcontainer spec
- 67aa955 chore(comments): drop stylesheet title comments the header block repeats, restore the Drill open prop doc
- 8335517 chore(comments): drop the site stylesheets' section banners and the last as-ever phrases
- 815e9f4 docs(gpus): agree the gpu plan: spec-compatible hostRequirements.gpu, refusal when required, placement onto lending workers
- 8f42200 chore(comments): cut the last as-before history phrases
- b2eabfa chore(comments): cut stale parser history and doc restatements from long doc blocks
- 1e81723 chore(comments): restore fixture and field contracts round five flagged
- b8fc877 chore(comments): drop the last narration and history captions round four found
- 54e6bc5 chore(comments): restore fixture and contract comments and cut change-history wording
- 3dc93e7 chore(comments): restore the contracts round two flagged and drop the last restatements
- e2a0740 chore(comments): bring back the why and contract comments the first pass dropped, and drop the restatements it missed
- addf8c4 chore(comments): drop comments that restate the code, since they rot and bury the ones that explain why
- 457292d chore(toolchain): install clippy so agents can run it as a check
- e4d5939 docs(plans): close resumable-exec
- 9200a98 fix(exec): attach without an id takes an attached session too
- 8233ee1 fix(devsbd): a session's creator sees the program's first output
- 1b8efda feat(fleet): resumable link terminals for a non-root helper
- b7dcb02 feat(exec): end a session with --end
- 2daf452 feat(tui): show helper sessions as rows under an instance
- 781f895 docs(plans): break resumable-exec's remaining work into steps
- 1fe5add feat(tui): attach to a detached session with a
- b70711f docs(fleet): record the authority pinning the fleet's build as ADR 0053 and archive its plan, now that every step has landed
- 62dbd40 feat(machine): show a link behind the pinned build on both ends and why the authority skipped a pin, so a host that can't follow is visible instead of silently diverging
- c2bbb2a feat(fleet): members follow the authority's pinned build hop by hop and check its sha256 before running it, so a compromised control plane can no longer push arbitrary code and a host that can't follow stays linked
- da38bf6 feat(fleet): the authority pins its build in the membership log, so members get a signed, persisted reference to follow instead of trusting the control plane's hello
- 770e9be feat(machine): add machine upgrade, so the authority's new build can reach the control plane without a manual copy now that the authority no longer follows it
- 1f19141 fix(fleet): the authority follows no one, so upgrading it first no longer locks it out of an older control plane or silently downgrades it
- 53ba916 chore(ci): run the zidane extensions' bun tests, typechecking alone missed the cargo-timeouts redirection bug
- c886a06 fix(zidane): keep 2>&1-style redirections whole so the cargo-timeouts block suggests a runnable command
- 4599dfb chore(zidane): track the agent extensions and typecheck them in ci so they stop drifting from the zidane api
- 620b405 docs(fleet): agree the authority pins the fleet's build as a log entry by sha256, after review showed a standalone statement could be replayed and a published control plane silently downgrades the authority
- 9548e21 docs(tui): record grouping by signed config root as a decision and archive its plan, now that both steps landed
- 92a9895 fix(tui): group the instances tree by config root instead of machine, so a signed config shared by the fleet shows each sandbox once
- afabdb7 feat(snapshot): tag rows with the signed config root they come from, so hosts running one mesh config can tell its rows apart from a same-named local root
- 06512bb docs(fleet): explore letting the authority sign the fleet's build, so a newer authority isn't locked out by an older control plane
- fe9eb5a fix(exec): give a command run from a terminal -i -t (and so a session) when neither flag is given, so a tui like zidane gets its size, input and mouse instead of a pipe
- 33970ea docs(plans): explore splitting the devsandbox crate, since one crate's single-threaded front-end and codegen dominate build time
- 692291f fix(tui): grow the instances detail panel to fit its lines, so the drift line no longer falls off below the sessions and profile lines
- fa5f00d refactor(fleet): hub → control plane; kubernetes map and plans
- d86eba0 fix(machines): relist a machine's roots when its daemon says they moved, so a root whose last instance was removed there leaves the dashboard without a daemon restart
- 0688412 docs(machines): close the machine-roots plan, noting that a machine with several roots and no default can't be given one
- 5a90d15 feat(machines): pick a machine's signed copy, else its ~/.devsandboxes, as the root a command uses when none is given, now listed roots come in sorted order (plan machine-roots step 3)
- 24dc7f4 refactor(machines): take a machine's roots only from its listing, with its member.toml roots and saved across a hub restart, now nothing records them at add (plan machine-roots step 2)
- aa15d15 fix(fleet): re-send an unchanged config only to the machines its last push missed, and say a machine wasn't reached apart from one whose install failed, so the authority's everyday verbs no longer wait on every link or misreport down ones
- 6530ca3 fix(fleet): refuse a peer's build from a root that carries a signed config's name but isn't its copy, and say when a sandbox is in several roots of one machine, so a laptop can't build a stale local config on a member by picking the wrong root
- e721513 refactor(machines): stop picking and recording roots at machine add, a pre-fleet model: a machine's roots are what its daemon lists (plan machine-roots step 1)
- 46f46c5 fix(fleet): repair a signed config's copy from its stored bundle when it fails verification and clear what an install's bundled dirs don't list, so one edit or stray file from a sandbox can't block a config until the authority is back
- bb9d8f7 docs(fleet): close the fleet-driver plan now a laptop can join and drive a server end to end
- 4d91da7 feat(fleet): treat a host with no container runtime as a driver, so a laptop without docker shows no runtime errors, isn't placed on and doesn't offer copies it can't run (plan fleet-driver step 4)
- 937ab3f feat(fleet): bring a signed copy's folders from the authority's checkouts on its run, so a sandbox runs on a member without cloning its repos there by hand (plan fleet-driver step 3)
- e954f59 feat(fleet): let a member take a signed copy's folders from the authority only, and say what's missing when a copy's folder isn't there (plan fleet-driver step 3, member side)
- 8041e16 feat(machines): sign the authority's configs at machine add, so a new member has them from its first link-up without a verb on the authority first (plan fleet-driver step 2)
- 1b09465 fix(machines): have the signer propose a joining host's introduction, so a laptop joining the hub reaches the authority for approval instead of staying capped (plan fleet-driver step 1)
- f2b31f0 docs(changelog): notes for the next release
- 6c94e8a docs(site): finish the signed-config setup steps with a matching release everywhere, box as hub, serve install, files only commands reach, empty shared volumes and how to retry a machine that missed the config
- c135e02 fix(machines): skip a machine's listed roots that answer an error and write live roots into the snapshot store under the links lock, so a dead root no longer leaves a permanent error and a new copy's snapshots aren't dropped by a racing reload
- ecd268c fix(fleet): refuse building from the signed-config store outside a copy and migrating a copy in place, and say the entry check doesn't stop a writer racing the build, so admission claims only what it enforces
- e321422 fix(fleet): don't say configs aren't signed on a member driving a config the authority already signs, since that note is for a wrong setup order and read as a failure on the main flow
- 9f1236e fix(fleet): count a machine whose config install failed as missed, retry a due install on any sync, and re-send an unchanged config on the authority's verbs, so a clean signing note means the machine has it and re-running the verb is the retry
- 20a6449 docs(fleet): close the mesh config plan, recording in ADR 0049 that the authority's signature is a signed root's config authority, and parking the open calls so the rules live in the fleet docs and status instead of a finished plan
- 3a76583 feat(machines): keep each machine's roots live from its roots.list at link-up and after every sync with it, so a signed config a machine installs after it was added is listed, watched and runnable without adding it again
- acb000d fix(fleet): write stored config bundles atomically under unique names, replace a damaged one, and drop one that won't install to pull it again, so a bad bundle on disk can no longer block a config for good
- 3ef7fb9 fix(fleet): refuse a signed config's copy with a file or .git added inside a bundled build context or local feature, since a build would copy it in though nothing signed it
- b891969 fix(fleet): check a signed config's copy at the entry of every command that builds from it, so dispatcher children, autostart and the in-process fallback can't build a copy a container edited
- dd42577 feat(fleet): say in a verb's output what signing its config did, which machines the push missed, and when this host isn't the fleet's authority, so a wrong setup order or a machine left without the config shows up before the authority goes offline
- c0054f7 fix(fleet): install a pushed config before answering the sync and before sending the log on, so a push that reached a machine left the config there and a verb aimed at it right after signing isn't refused as not here yet
- a7897a6 docs(plans): park GPU, isolation-level and sandbawks ideas, so the overlap with sandbawks is on record before fleet steps 13-14 build placement and checkpoints
- 34e60f7 feat(fleet): run laptop-driven verbs on a member's signed config copy and refuse them while the copy isn't the log's head, so a request can only ever build what the authority signed, even after a container edited the copy
- a0aff4a feat(fleet): pull and install each newly signed config from the peer that brought the log, on sync and at every link-up, so a member keeps the latest signed config even when the authority went offline right after signing
- e5aa4e1 feat(fleet): install a signed config's bundle only when it hashes to the log's head, updating one copy per root in place, and serve stored bundles to peers, so any member can hand on the version it holds while the authority is offline
- 8d00d1b feat(fleet): sign the bound local config root when the authority aims a verb at another machine, since driving the box is the main way a config reaches the mesh
- 29c854a feat(fleet): bind a signed config name to the first root it came from, so two roots sharing a directory name can't take turns bumping each other's version
- 0aef234 feat(fleet): sign a config's structure and the files it references, and keep that bundle, so notes and logs in the root no longer bump versions or ship, a broken config is never signed, and the signed version can be served after the root changes
- a7545c1 refactor(fleet): log config signing instead of notifying the verb's client, since the note only announced a side effect and every client had to render it
- 5a100c9 docs(plans): plan mesh config, so a signed config runs on every member while its authority is offline
- 2e55b03 fix(fleet): accept shared-volumes binds and worktree-link on workers, guard host-side writes
- da7fb77 docs(agents): commit finished changes unasked, subagents only when briefed
- 6fe9c56 feat(fleet): sign a config root's version from the authority's verbs
- e8a8d28 fix(fleet): accept persist-shell-history on workers so it no longer ties a sandbox home
- 49a94a7 fix(fleet): accept caches on workers so they no longer tie a sandbox home
- fe06f7c docs(plans): archive open routing now that all six steps shipped, moving its open questions to parked and its limits (container-chosen host ports, unrecognized loopback spellings, in-memory attach records, remote open forwards outliving their instance) to status
- ea9c625 fix(open): never open a url whose own localhost port didn't forward, parse hosts as browsers do, refuse control characters, keep open forwards off configured forwards' ports, stop routing to a member whose attach expired, and record attaches for terminals only on connections that don't hold the daemon, so a sandbox's url can't reach the host's own services or leak a token and scripts don't take the user's opens
- 498e7f3 feat(open): push opens.done for every open, opened, refused or failed, and show it on the dashboard's status line, so a url that didn't open (or opened without its callback forward) says why where the user looks instead of only in serve.log
- 168e581 feat(forwards): make open forwards into another machine's instance for a delivered url, owned by the opening host and stopped when idle or when the machine goes, so a localhost link or oauth callback from a server sandbox works on the laptop that opens it
- 6b3aded feat(open): send a container's url to the member that last attached to its instance with open.deliver, which opens it only for an instance it attached to itself in the last 10 min and maps the profile name with its own profiles.toml, so a server sandbox attached from the laptop opens on the laptop and no member can drive another's desktop
- 8c9a47c feat(serve): record each instance's latest attach (local exec, vscode, a fleet pty stream's proven origin) and this host's own attaches to other machines' instances, so an open can go to the member whose user is at the instance and that member can check it asked for it
- 1c06061 test(machines): retry the repeated hub proposal in the_hub_role_moves_and_back like the first, since the link redialed after the role move may still cycle once and fail it under a loaded suite
- b70d004 feat(open): forward a url's localhost port and its oauth callback port before opening it, rewriting the url when the port moved, so a dev server link or a gh auth login style callback from a sandbox reaches the container instead of the host's own localhost
- d8dc58c feat(forwards): add open forwards, made for a url's loopback port, reusing any forward of that instance port, never saved and stopped after 10 min idle or when the instance stops, so the opener can make a container's localhost url and its oauth callback reach the container
- fcbf230 feat(devsbd): check whether exec'd processes land in the container's cgroup and warn on run, start and inspect when they don't, so a docker-in-docker dockerd that rootless runc before 1.4.1 left outside it fails with a reason instead of a bare cgroup.procs error
- 60cb250 fix(services): recreate a new service network whose subnet covers a host route, gateway or nameserver, and let gc remove unused networks on docker, so rootless docker can no longer hand out the lan's range and cut every container off from the host's dns
- fe83df6 feat(tui): switch an instance's profile from the dashboard with P or :profile, carrying each sandbox's allowed profiles on its row so the picker and the drift flag read one resolve
- b66d3e7 feat(profile): switch a running instance's profile with devsandbox profile or instances.setProfile, checked against its sandbox's allowed set, so moving an instance between work and personal needs no rebuild and stays the user's call
- 58ed3ac feat(open): open a url with the browser this host's profiles.toml maps the instance's profile to, so work sandboxes can open in a work browser and personal ones elsewhere; commands only ever come from the opening host's own file
- 33efedc feat(profiles): show an instance's profile in ps, inspect, the snapshots and the dashboard, and flag one its sandbox no longer allows, so a config change that drops a profile is visible instead of silently moving the instance
- 7896c4a feat(run): put every new instance in one of its sandbox's profiles (--profile, else the last one chosen, else the first), and dispatcher children in their parent's or nowhere, so the profile is always the user's choice and never the container's
- 819915f feat(config): declare profiles and which ones a sandbox's instances may be in, so instances can later be placed in one (work, personal) that picks their browser and, later, their credentials; membership is host routing, so it stays out of the config hash
- a89ba7b feat(devsbd): answer as xdg-open and the debian browser alternatives and point BROWSER at it, so programs in a sandbox that open a url hand it to the host instead of failing for want of a desktop; an image's own /usr/local/bin/xdg-open is left alone
- 3db5833 feat(open): take a container's open record in the bridge's sink and open http(s) urls with the host's opener, so a url a sandbox asks for can land on the desktop instead of the inbox; ttl, scheme and rate limit guard it, and the display comes from the user manager since a serve install'd unit starts before the session imports it
- 0a36137 docs(plans): freeze the inbox and order open routing, then an orchestrator interface, helper-rpc runs and the inbox's removal before fleet step 13, since step 13 as written would federate the inbox an external orchestrator replaces; split open routing step 1 into 1a-1c
- fb6e3fe test(devsbd): widen the stalled-stream keepalive test's timeout to 1 s over a 3 s watch, since 300 ms failed on a loaded ci runner while still catching pings blocked for good
- 7c8c780 ci(windows): build the windows binary on every push, since its cfg(unix) gates are otherwise first compiled by a release tag

</details>

## 0.9.0

One user model on every runtime: inside a sandbox you are a user with your host uid/gid, so workspace files come out owned by you on rootful docker, rootless docker, rootless podman and VM-backed runtimes alike. Browsers keep their own sandbox wherever it can work, and tools are told when it can't. Interactive `exec` sessions survive a dropped connection: `--attach` gets the program back, and a machine's terminal reconnects by itself. Machines become one fleet: members with their own keys and trust, a hub, routing through other members, `run --place` to send a sandbox where there's room and `devsandbox fetch` to bring the work back. **Fleet is experimental in 0.9.0:** its commands, config, files and the protocol between machines may change between releases with no migration, so don't use it for anything you can't redo. Its entries are grouped under *Experimental: fleet* below.

**Behaviour change: sandboxes run as the host user by default (`identity = "host"`).** The config's `remoteUser` (else `containerUser`, else the image's `USER`) is adopted with your host uid/gid, keeping its name, home and shell. A config that assumes root in the container (mounts or paths under `/root`, a root `remoteUser`/`containerUser`) can break under it, so `run`, `start` and `rebuild` now offer to update it first (the dashboard asks too), and `identity = "image"` keeps the old behaviour. Existing instances keep the user they were created with until rebuilt (`devsandbox rebuild --force <name>`).

```toml
[sandbox.legacy]
identity = "image"   # users as written, no remapping
```

**Machines added with 0.8.0 must be added again** with `machine add`: their old links are refused (see *Experimental: fleet*).

### Added

- **Sandboxes run as the host user, planned per runtime mode.** `run` probes the runtime's user-namespace mode (rootful, rootless docker, rootless podman, VM-backed) once per runtime context, picks how to create and exec the container so the adopted account ends up with your ids, and prints the plan in one line (`identity: rootful: exec as vscode, remapped to 1000:1000`) plus any warning. On rootless docker, where root is the host user, execs run as root with `HOME` set to the account's home. With no account to adopt, the sandbox runs as root with a warning recommending the `common-utils` feature. A docker socket mount gets the right group, and SELinux-enforcing hosts get their binds relabelled. `--reprobe` on `run` and `rebuild` probes the mode again.

```bash
devsandbox run web --reprobe
```

- **`identity` config field.** `identity = "host"` (default) or `"image"` (users taken literally, as before). When it's unset, `updateRemoteUserUID = false` means `"image"`, so devcontainer configs that opt out of uid remapping keep doing so.

- **Updating configs that mount into `/root`.** Before `run`, `start` and `rebuild`, on a terminal, devsandbox lists the config entries that break under host identity and asks `[u]pdate / [c]ontinue as is (don't ask again) / [s]kip this time`. Update rewrites the config file in place, comments and layout kept: `/root` becomes `${containerEnv:HOME}`, a root user is removed (or kept with `identity = "image"`), and it names the instances that now need a rebuild. A YAML config gets the edits to make by hand. Off a terminal, under `run --json` and from autostart, `run` prints one warning line instead. The dashboard flags these sandboxes in its header (`N sandboxes use /root (U to update)`) and Detail panel, and offers the same update when it opens, on `U`, and before `run`, `start` and `rebuild`. Machines' configs are checked on the machine. API: `config.findings`, `config.migrate`, `config.ack` (`docs/reference/api.md`, *Config*).

- **`${containerEnv:NAME}`.** Resolves at create, once the image is built, from the sandbox's `containerEnv`, else the image's `ENV`, else for `HOME` the home of the account the container runs as. It works in `mounts`, `shell-rc`, feature mounts, `containerEnv` and `remoteEnv`, so a mount can land in the user's home whoever that is, and `PATH = "${containerEnv:PATH}:/opt/bin"` extends the image's `PATH`.

```toml
mounts = ["source=${sharedVolumes}/gh,target=${containerEnv:HOME}/.config/gh,type=bind"]
```

- **Browsers keep their sandbox.** Docker sandboxes are created with devsandbox's seccomp profile: docker's default plus user namespaces for unprivileged processes, which Chromium's and Electron's own sandbox needs (podman already allows it). That opens kernel surface docker's default closes; `userns = false` keeps docker's default profile. Where execs run as root (rootless docker, root images), `chrome`, `chromium` and `google-chrome` go through a wrapper that starts the real browser at a non-root uid; `DEVSANDBOX_CHROME` (and `CHROME_PATH`, `CHROME_BIN`, `PUPPETEER_EXECUTABLE_PATH`) point at it, so a Playwright script passes `executablePath: process.env.DEVSANDBOX_CHROME` and `chromiumSandbox: true`. Root plans also silence pip's and bundler's root warnings.

```toml
[sandbox.web]
userns = false
```

- **Tools are told whether a browser sandbox works.** Each new container checks whether a browser sandbox can start there, and `run` says so (`browser sandbox: on`, or `off (<why>); sandbox-off knobs set`). Where it works, every exec gets `DEVSANDBOX_BROWSER_SANDBOX=1`; where it doesn't, the tools' sandbox-off knobs (`PUPPETEER_DANGEROUS_NO_SANDBOX`, `ELECTRON_DISABLE_SANDBOX`, `QTWEBENGINE_DISABLE_SANDBOX`, `PLAYWRIGHT_MCP_SANDBOX=false`, `CHROMIUM_FLAGS=--no-sandbox`). Keys you set in `containerEnv` or `remoteEnv` win. `inspect` prints the verdict; instances created before this say `not recorded` until rebuilt.

- **Resumable `exec` sessions.** On an instance with the helper, a tty `exec` runs in a session that outlives the client: if the terminal or connection goes, the program keeps running, and `exec --attach` gets back to it (the one detached session, a pick list when there are several, or `--attach=<id>`). `--sessions` lists them, `--session <id>` runs in a named one, attaching if it's live. Dashboard terminals run in sessions too, so a shell closed with the dashboard can be reattached from the CLI; the Detail panel shows `sessions: N (M detached)` and the row a `▣N` badge. Ended sessions are cleaned up after a few minutes; detached ones stay until removed.

```bash
devsandbox exec web --sessions
devsandbox exec web --attach
devsandbox exec web --attach=1790000000-a1b2
```

- **Machine terminals reconnect.** A tty `exec` on a machine's instance, and a dashboard terminal tab on one, reattach to their session when the connection drops (`connection lost, reconnecting… (Ctrl-C to stop)`, backing off up to 10 s), instead of ending the program's terminal. To keep the connection's own failure apart, a program there that exits 255 reports 254.

- **`exec --service <name>`** opens a terminal in a service container the instance uses (its command, else a login shell).

### Fixed

- **Feature mounts under `${sharedVolumes}` work on a first run.** A feature's bind mount whose source is under `${sharedVolumes}` is now created when missing, like a config mount, instead of skipped with a warning. Other missing feature sources are still skipped.
- **`caches` work for a non-root user.** Cache mounts now go to `/var/cache/devsandbox/<name>` instead of `/root/…`, which a non-root `remoteUser` couldn't reach. The tools find them through their env vars as before.
- **Same-named sandboxes in two config roots no longer clobber each other's images, nor does sandbox `foo-feat` clobber sandbox `foo`'s features image.** Built images are tagged per config root, one prefix per kind (`devsandbox-img-<root>-<sandbox>`, `devsandbox-feat-<root>-<sandbox>`, `devsandbox-img-svc-<root>-<service>`), so the first `run` or `rebuild` after upgrading builds them again; images under the old tags are left for `docker image prune`.
- **`${localEnv:NAME:default}` uses its default.** An unset `NAME` now expands to `default` (everything after the `:`) instead of empty; a set one, even to empty, to its value. `${containerEnv:NAME:default}` works the same.
- **Running devsandbox as root on rootful docker or podman works.** Instead of failing to remap the adopted account to uid 0, execs run as root with `HOME` set to the account's home, as on rootless docker.
- **The dashboard's build log follows a running build**, refreshing within about 100 ms instead of only on snapshots.
- **Dashboard prefills no longer fail as ambiguous.** `r`'s prefill and tab completion, and `p`'s port prefills, write a local name a machine also has as `@/<name>`, so the line submits.
- **Machines' rows stay current.** A late update from a machine could bring back a root that was dropped, or overwrite a newer snapshot with older rows.
- **A signal no longer fails a command talking to the host daemon.** An interrupted read of the daemon's reply is retried instead of failing the command.

### Experimental: fleet

Everything in this group may change between releases (commands, `member.toml`, the fleet's files next to `state.toml`, the protocol between machines) with no migration. Don't use it for anything you can't redo.

- **One link per pair of machines, under the machine's trust.** Everything done on a machine (CLI commands, verbs, terminals, port forwards, the ssh agent) rides one held link instead of an ssh connection per use; ssh carries only that link and `machine add`'s probe. Links from before this release are refused until both ends have keys and a signed member list, so add 0.8.0 machines again. What a link reaches is the machine's own `machine trust` (`worker` by default): a machine you drive freely needs `machine trust full` there.

- **Machines form one fleet around a hub.** `machine add` joins fleets: the machine joins this host's fleet, this host joins the machine's, or (neither in one) the two start one with this host as hub, `--hub` making the target the hub instead; two different fleets are refused. A laptop joins an always-on server's fleet with `machine add <server>` and dials it, so the server never needs ssh into the laptop. A machine with no config roots (or none picked) can be added and runs only other members' configs. Every member sees the whole fleet. `machine rm <name>` takes a member out (`machine rm <this host>` leaves); forgetting only the link is `machine unlink <name>`. `machine hub <m>` moves the hub role with no link changing; members that were offline follow when they reconnect, and a hub that's down can be replaced unless it's the machine that created the fleet.

```bash
devsandbox machine add me@my-server --hub
devsandbox machine hub my-server
```

- **Member keys and a signed member list.** Every machine has its own key (`machine key` prints its fingerprint, `machine key rotate` replaces it without leaving). Only the machine that created the fleet signs who belongs, and every member checks the list; every link checks both ends' keys against it, so no machine can pass itself off as another member or as the hub. `machine add` shows the other machine's fingerprint to confirm (`--yes` skips it off a terminal). `machine rm`, `machine key rotate`, `machine hub` and adds typed on another member go to the creating machine, which shows a desktop notification: `machine pending` lists them, `machine approve <id>` and `machine deny <id>` decide. A machine added by another member shows as `introduced by …` in `machine ls` and can't add others until approved.

```bash
devsandbox machine key
devsandbox machine add me@my-server   # my-server's key fingerprint is SHA256:…
devsandbox machine pending
```

- **Each machine decides what others reach on it: `machine trust` and `machine roots`.** `worker` (the default) admits only this host's own config roots (those with instances, plus the ones `machine roots add` picks) and the code placed on it, and holds placed configs to a worker policy: binds only under the placed code, no extra capabilities or devices, no `initializeCommand`, and host networking, the runtime socket, `${localEnv:…}`, public ports and the like only where `[allow]` in `member.toml` permits. `full` gives other machines what a local client has. When a machine on the hub's side has an ssh link into this one (a shell that could change its trust), `machine trust` warns and `machine ls` and the Machines tab mark it `exposed via <machine>`. On every machine and under any trust, `run`, `rebuild` and services refuse a bind mount, build context or build secret that would expose the machine's key (`$HOME`, the data dir, `/`, …), naming the path.

```bash
devsandbox machine trust full
devsandbox machine roots add ~/sandboxes
```

- **Routing through the fleet.** Members share a signed graph of their links, so a machine with no link to this host is `routed via <machine>` in `machine ls`, and commands, verbs, terminals, port forwards and `run --place` reach it through the members in between, trying the next path when one is down. Routed streams are encrypted end to end and prove which member they came from, so a machine in the middle can't read, alter, replay or speak for them, and the far end applies its own trust to the real origin. The ssh agent is a per-machine grant (`machine set <m> --agent on`) that reaches the granted machine over any path; a machine in the middle's own grant never carries over.

- **Placed runs: `run --place`.** A typed `run` always runs on the machine whose config it names. `run --place` (also `:run … --place` in the dashboard) asks the hub where the new instance goes: the hub or the machine with the most headroom against its soft caps (`[caps]` in `member.toml`; `over cap: …` warns, never refuses), and says where (`placed on <machine> (…)`). Placed elsewhere, the config root and the folder's branch move there first, straight from your checkout with no remote needed: unpushed commits, a local-only branch and the uncommitted work of the branch you have checked out (untracked files included, ignored ones not) all go; a repeat placement sends only what that machine lacks, and the hub keeps a copy of each repo placed elsewhere. The instance is that machine's, `<machine>/<instance>`. A sandbox whose config ties it to this host (binds outside what moves, `${localEnv:…}`, shared volumes, the runtime socket, `caches`, `privileged`, `initializeCommand`, global services, build paths outside the root) runs here with a note naming why, as does one with `placement = "home"` or when the hub is unreachable.

```bash
devsandbox run web --place --branch fix-login   # placed on lap (mem 71% free, …)
```

```toml
[sandbox.web]
placement = "home"   # run --place never moves it
```

- **`devsandbox fetch`: placed work comes back.** `devsandbox fetch <machine>/<instance>`, on the host that placed it, brings the instance's branch and a snapshot of its working tree into the checkout it came from as hidden refs (`refs/devsandbox/<machine>/<instance>/heads/<branch>` and `…/wip`); your branches, index and working tree are never touched. `rm` of a placed instance fetches it back first and refuses if it can't (`rm --force` skips that); `done` fetches back too, warning if it can't.

```bash
devsandbox fetch lap/web-2
git log refs/devsandbox/lap/web-2/wip
```

- **Members follow the hub's build.** A member runs its hub's exact build, downgrades included, so a fleet never mixes protocols. A hub on a release has its members download that release from GitHub (linux x86_64/arm64, macOS arm64), installed only once its checksums verify against the signing key built into devsandbox (releases now ship `SHA256SUMS.sig`); the download is time-bounded, and a member stops retrying where no release exists for its platform. A hub on a dev build (from source, `cargo install` included) hands its binary to members on the same OS/arch that set `dev-builds = true` in `member.toml` (or whose trust is `full`).

### Internal

- **Gated tests run under rootless podman on CI**, alongside docker, so the rootless-podman identity mode is exercised.
- **Host-to-helper RPC channel.** The host calls the in-container helper over the bridge instead of a fresh runtime exec per request; the dispatcher's `wait` and `follow` are one held stream instead of an exec per poll.
- **Release builds are checked and signed.** CI refuses a release whose binaries don't report the tag's version, commit and platform, and signs `SHA256SUMS`.

<details><summary>Commits</summary>

- 85d19ce feat(release): sign the release checksums and have members verify them against an embedded key before installing, since a checksum from the same release would share the asset's trust root
- 2fc706e ci(release): fail a release build whose fleet-hello isn't the tag's version, commit, published and platform, since members download these binaries and a wrong stamp makes them loop or refuse the hub
- c87ff13 docs(fleet): tag the fleet api @experimental and mark placement in the config spec, so the generated node-api and config pages flag fleet like the hand-written ones
- 391eb22 fix(fleet): bound a release download overall and stop following a published hub where no release exists for this platform, so a member never hangs on a trickle or retries a doomed download at every link
- d82126a docs(site): badge fleet mentions on indexed pages as experimental, since 0.9.0 ships fleet before its design settles
- 9074557 fix(fleet): mark release builds published and check a downloaded release's whole build, not just its version, so released members follow their hub instead of looping on a moved tag
- 82639ea docs(site): draw the fleet architecture page's machines as a data-driven FleetDiagram, so the diagram stays in step with fleet-data.ts
- c24c2ea feat(site): say what devsandboxes is in the home title, add schema.org app data, a robots.txt pointing at the sitemap and noindex on /architecture, so search engines rank the docs for what people search and keep the contributor pages out
- 88476e4 docs(fleet): correct step 12's docs where a review found them claiming more than the code does (the fetch-back gate's guarantee, WIP reaching every placed run, the one ref left in a user's repo, a rename skipping fetch-back), so the docs say what is built
- 4e40da8 docs(fleet): close step 12 with its as-built note, status (steps 1-12 shipped, next 13, the transfer extras parked) and the changelog, so step 13 starts from code that moves and comes back
- fe9a6dc feat(fleet): rm and done of an instance this host placed fetch it back first (rm refused when that fails unless --force, done with a warning), so removing placed work never loses what was done there (fleet step 12f, decision 77)
- e1479af feat(fleet): devsandbox fetch pulls a placed instance's branch and a WIP snapshot back into the checkout it was placed from as hidden refs, recorded in placements.json and admitted on the worker only under the caller's fleet root, so work done elsewhere comes home without touching the user's branches (fleet step 12e, decision 76)
- 6ea2118 fix(fleet): recut a moved checkout no instance mounts and leave a mounted one's tree alone, since every new checkout is dirty from its WIP and a repeat placement's fast-forward either failed on it or moved code under a running instance (fleet decision 73 amended)
- 306f625 feat(fleet): a member placing on another machine also sends the same refs into its hub's cache, best effort with a note, so a repo's latest work outlives the laptop it came from (fleet step 12d, decision 75)
- 6db6684 feat(fleet): placement bundles each folder from its own checkout with a WIP snapshot and asks no origin, so repos without a remote, unpushed commits and uncommitted work can be placed (fleet step 12c, decisions 72, 73)
- 8d54cb2 feat(fleet): a worker keeps one repo cache per repo and sender and cuts checkouts from it, and code.haves tells the sender what it has, so a repeat placement sends only the delta and never the same root twice (fleet step 12b)
- 0122d17 feat(fleet): repo identity by root commits, WIP snapshots through a temp index, delta bundles over haves and every host git bounded with its process group, so transfer v1 builds on plumbing that never touches the user's index or hangs (fleet step 12a, decisions 71, 73)
- cbe1a80 docs(fleet): break step 12 into seven sub-steps and record decisions 71-77 (identity by root commits, sends from the source checkout with no origin, WIP only into a fresh checkout, the hub mirror best effort, fetch-back pulled into hidden refs), and say step 13 is the one waiting on helper-rpc's runs, so transfer v1 starts from a settled design
- f72872f docs(open): plan routing container url opens to the user's desktop, with per-instance profiles
- 619bab2 docs(fleet): say a dead hub can be replaced only while the authority is up, since a fleet made without --hub has them on one machine and the step 11 docs promised more
- 45cb4e7 docs(fleet): close step 11 with its as-built note, status (the swap moves the role only, a link can drop twice after it) and the changelog, so step 12 starts from the hub role as it moves
- b97a0be test(fleet): a member down during a hub move follows at its next proof, hub-only calls follow the log's hub and an old hub stops saving remotes, so every role reader is shown to follow a live move (fleet step 11b)
- 5b8a979 feat(machine): machine hub <m> moves the hub role by a hub entry signed on the authority or proposed and approved there, each host following only once the change has left it, so the role can move off a laptop or a dead hub without cutting the links that carry it (fleet decisions 68, 69)
- b8aaed8 docs(fleet): break step 11 into three sub-steps and record decisions 68-70 (a hub entry signed only by the authority, followed once the change has left the host, the role moving without the view's reach), so the swap lands on a settled design
- 73fa298 test(machines): hold the machine's daemon in the api tests' pair and shut both down over held connections, since with nothing holding it the machine idled out before finish
- f976d60 fix(machines): store a pushed root's rows only while remotes lists the root, and send a roots change after the sync, so a late push can't revive a dropped root nor an early one be lost
- efc868b test(fleet): wait for the no-log refusal as unreachable with its error, like the clash test, not just not connected
- 92e436a fix(fleet): retry interrupted reads in the route refusal, link.attach and notify replies, since a timed socket read fails with eintr even under sa_restart
- db5d07d fix(serve): retry an interrupted read of the hello reply, since a timed socket read fails with eintr even under sa_restart
- f753d24 test(fleet): inject m's report over b's link and wait for box's report, since k's flood skips the peer a change came from
- b75d33e fix(machines): send a roots-only entry change to the running link instead of restarting it, so a new inbound machine's link doesn't drop just after connecting
- 9dd4828 fix(serve): add a watched root's local params and its watch under one lock, and publish machines one at a time, so a watch's snapshot isn't pruned or overwritten with older remotes
- ecccddc test(fleet): ignore the forged proof's write, since the answerer may refuse an oversized one and hang up before the body
- 27ccfd3 test(devsbd): wait for the hang-up after a peer's drop, since a concurrent fork keeps the socket open until its exec
- d1c7575 test(fleet): wait_box returns the row its condition matched, since a re-read can see a link retry that cleared the error
- b3a0ef3 docs(fleet): state what a transport owes a link, since links add no encryption of their own
- 03e3baf docs(fleet): close step 10c with its as-built note, status (routed streams encrypted, agent grants over any path, grant-as-exposure parked) and the changelog, so step 11 starts from sessions as built
- 4e08ea4 feat(fleet): an agent reaches a member it granted over any path, routed or a link the member dialed, through an agent-route socket probed only while the granter's report lists it, so agent consent is per member and never comes from a relay (fleet decisions 58, 66)
- e0b890c feat(fleet): agent access is a per-member grant in member.toml, by key and following rotations, set by machines.set on any machine and published in the member's link report, so routed and direct agent streams can follow one consent rule (fleet decisions 65-67)
- 24f68fb feat(fleet): routed streams are end-to-end sessions between their two daemons (ephemeral keys signed in the opening, sealed records), so a relay carries ciphertext it can't read, alter, replay or reflect; adr 0046
- a87642d feat(fleet): session layer for routed streams (ephemeral x25519, per-direction hkdf keys, chacha20poly1305 records with an authenticated end), so 10c can make a relay carry ciphertext only; plan decisions 61-67 and the 10c sub-steps
- 413d61d chore: update changelog
- f10b5c9 docs(fleet): close step 10b with ADR 0045 (a routed stream proves its origin per stream), 0043 accepted and 0041 removed, the routing docs as one account, its limitations and an as-built note, so 10c starts from routing as it is
- b4fdffc feat(machine): machine trust worker warns, and machine ls and the Machines tab show, when a machine the hub's side controls dials this one over ssh, worked out from the link graph, so a worker setting that a shell can rewrite isn't mistaken for protection
- 08ac478 feat(fleet): proposals, removals, forgets and run --place reach their member over any path, and every member floods graph changes to its links, so the fleet works for members with no direct link to the authority, the hub or the worker (lifts decision 49's direct-link limit)
- de6c450 feat(machine): a member reached only through others is a routed machine, listed as such and taking quick calls, verbs, terminals and forwards over its route, so machines seen through the hub are no longer view-only (fleet decision 60; the agent stays direct until 10c)
- 5b7ea54 feat(fleet): a route-<member>.sock for every member with no link up here, opening each stream over the graph's paths in order and failing over to the next, and terminals, forwards and code moves fall back to it, so a member is reached through the fleet when no direct link is up
- abfe3a2 feat(fleet): both ends of a link relay a routed stream to a next hop that's up and, as its destination, serve the inner channel under this host's trust for the proven origin, so a member is reachable through others whatever the relays' own trust
- d22fa6f feat(fleet): a routed stream's opening on a ROUTE channel, its header checked at every hop and its origin and destination proving their keys to each other over fresh nonces, so no relay can speak for the origin, replay it or pose as the destination
- 156214d feat(fleet): every member signs a report of its links on change and sends it to the hub, which pushes the graph to its members, and any member hands its copy to a neighbor on link-up, so each member holds the fleet's link graph to route over
- 56bbf09 feat(fleet): a link graph of members' own signed link reports, taken only by the reporter's key in the log and newer than the last, with paths ordered direct, fewest hops, through always-on members, longest up, so routing (10b) has a graph no carrier can forge
- 840787f docs(fleet): break step 10b into nine sub-steps and record decisions 53-60 (a ROUTE channel, per-stream origin challenge, source routing, relaying isn't access, routed origins as direct peers, AGENT direct-only until a per-member grant in 10c, signed link reports, routed machines as rows), so routing lands on a settled design
- d9e7ead feat(config): placement = "home" pins a sandbox to the host whose config names it, so run --place never moves it even where nothing inferred would keep it home (fleet decision 40)
- 17e88ea feat(fleet): run --place keeps a sandbox home when its config ties it there (binds outside what moves, ${localEnv:…}, shared volumes, sockets, host-only features, build paths), saying why before the hub is asked, so nothing moves to a worker only to be refused by its policy (fleet decision 40)
- 2c28f0f feat(run): a typed run stays on the member whose config it names and only run --place asks the hub, so the user's own sandboxes never wait on or move through the fleet (fleet decision 38; --here goes, nothing is placed by default)
- e0bb55d chore(deps): bump sha2 to 0.11 so it shares one version with ed25519-dalek
- bf5cd91 docs(fleet): close step 10a with ADR 0044 (one authority signs membership), an as-built note, status, changelog and module map, so routing (10b) starts from member identity as it is
- 6d3421f feat(run): refuse any container bind or build path that reaches the member key, on every host and under any trust, so a sandbox can never read the key that proves this machine to the fleet
- cc080f1 feat(fleet): machine key rotate replaces a member's key through a rotate entry countersigned by the old key, signed on the authority or proposed to it, the new key taking over and every link redialing once the log lists it, so a key can be retired without leaving the fleet
- 3c45e63 feat(fleet): machine rm revokes the member's key in the membership log, signed on the authority or proposed to it and approved there with machine pending|approve|deny, and a signed change floods to the members over fleet.sync before the step-9 removal follows it, so only the authority's key ends a membership
- ca3943b feat(fleet): a link peer carries the key it proved and its introducer, the hub-only fleet calls are admitted by the hub's key in the membership log rather than the name the link announced, and machine ls marks introduced members, so a relay or a stranger with the right name gets nothing
- 876a3cc feat(fleet): both ends of a link prove their member keys against the membership log after the hellos, the end behind taking the entries it lacks and a fork or another fleet refused, so no device acts as a member or the hub without that member's key
- 418a3ea feat(machine): machine add signs the joining machine into the fleet's membership log (genesis by the creator, adds by the authority, introductions by other members) after the user confirms its key's fingerprint, and every host takes its hub from the log it adopted, so membership is signed before links start checking it
- 7015c9a feat(fleet): a hash-chained membership log signed by the fleet's authority, with introductions held beside it and a membership.json store, so who belongs to a fleet is something every member can verify rather than take from the hub
- 9bb5ea5 docs(site): catch the bridge page up with the helper protocol as built: rpc as the one host-opened channel, port queries, the daemon's full caps, and the serve daemon as a takeover trigger once machines follow their hub's version; fleet-only channels pointed to, not listed
- fbce32b feat(fleet): every member has an ed25519 key in a 0600 member.key, shown by member.get and machine key, with signed statements whose versions only go up, so the membership log and link proofs of step 10a have keys to sign with
- 2486e9b docs(fleet): break step 10a into eight sub-steps and record decisions 48-52 (the fleet's creator is its authority, forwarded changes approved there, a single-writer membership log with introductions beside it, the cap while trust is per host, a file key store for now), so each piece of identity lands on a settled design
- d4455ec feat(machine): machine add --hub makes the target the hub of a new fleet, so a laptop holding the configs can make an always-on server the hub without the server sshing into it (fleet decision 36)
- 4af90c0 feat(machine): machine add takes no config roots when the machine has none or none are picked, so a hub or worker that only runs other members' configs can join (fleet decision 37)
- c0b31aa docs(fleet): make H the only authority, cap introduced members by their introducer and add end-to-end sessions as step 10c, so a less trusted always-on hub or relay can't mint members, swap keys or read routed streams
- fe72296 docs(fleet): record decisions 36-44 (machine add --hub, rootless members, typed runs stay home, mesh-held dispatcher config and state, inferred and pinned placement constraints, named host resources as the target, identity before routing as step 10a), so the hub-on-a-server setup and what binds a sandbox to a host are settled before step 10 starts
- d486014 docs(fleet): mark step 9 shipped with an as-built note, so step 10 starts from members, the join rule and hub-placed runs as they are
- e832892 feat(fleet): a member's run asks the hub's fleet.place where to go and moves its code there over its own links, running here with a note when the hub can't answer, so placement has one decider for the whole fleet
- 001ccfa feat(machine): machine rm takes a member out of the fleet through the hub's fleet.leave/forget, machine rm of this host leaves, and machine unlink keeps the old link-only removal, so membership can shrink as well as grow
- 582b629 feat(fleet): a member watches its hub's federated view and shows the hub's other machines as view-only via rows, the asking member's own rows never sent back, so every member sees the whole fleet before routing can reach it
- 9121363 test(machine): the fake peer tolerates a handshake that closed before its reply, so the sentinel-in-a-link-stream case stops failing on EPIPE under load
- 581389b feat(machine): machine add joins the target to this host's fleet, this host to the target's, or starts a fleet of two, refusing two hubs and a name the fleet has, so every link is made inside one fleet whose members go by pinned names
- 98d5c06 feat(fleet): the hub is member.toml's hub, named in every link's hello and followed at runtime, so membership has one home the join rule can write and two fleets never share a link
- 3e5bb50 docs(site): rename host-and-helper to host and containers and catch its diagram up with the helper as built: the bridge carries the host's RPC calls (sessions, tracked runs), tty execs run in helper sessions, agents relayed by other machines come before the daemon's own; fleet is pointed to, not drawn
- a1bb25d docs(fleet): break step 9 into 9a-9f and record decisions 31-35 (hub-decided placement, hub-only leave/forget, view-only indirect members, the hub named in the hello, member names as registry names), plus key-pair identity as an open question, so each piece of membership lands on a settled design
- 3fa327c docs(fleet): finish the one-socket-per-link wording, hub rows persist
- fda8634 refactor(fleet): one link socket per machine, channel named by first byte
- 95a0839 docs(site): an interactive machines-to-fleet page from identity landing to step 8, so readers see why machines became one fleet before drilling into how
- 941b105 fix(tui): re-read a followed build log 100 ms after each answer and wake the event loop every 30 ms meanwhile, so the 250 ms idle wake no longer stretches each refresh past half a second
- 9ddf242 fix(tui): re-read an in-flight build log every 500 ms instead of only on snapshots, so the modal follows a build as it writes
- 2d20b5a fix(tui): p's port prefills write a local instance or service a machine also has as @/<name>, so the forward submits instead of failing as ambiguous
- e97ec11 fix(tui): r's prefill and tab completion write a local name a machine also has as @/<name>, so the line submits instead of failing as ambiguous
- 08e8279 docs(fleet): mark step 8 shipped with one kind of machine on one link per pair, so step 9 starts from what's true
- b9cab24 feat(fleet): drop lending, offered machines and drain, and count each dialed link as a holder, so a laptop joins with machine add <hub> and stays up as one kind of machine
- dd4d2ed feat(machine): a dialed host holds a link to each inbound neighbor and a hub places on every connected machine, so a laptop that runs machine add <hub> is a machine there like any other
- a83207c refactor(machine): delete the per-use ssh argvs, the agent relay, devsandbox tunnel's ssh half and the relay's session env, and drop the sentinel inside link streams, so the only ssh to a machine is its link and machine add's probe
- bfc7846 feat(machine): dashboard terminals, forwards and port reach every machine over its link's PTY and TUNNEL channels, so nothing per-use dials an ssh machine around its trust
- 90c7ee3 feat(machine): CLI re-runs on every machine are API calls and PTY dials over its link, so an ssh machine's commands go through its trust like an offered worker's
- 2e1bd6d docs(fleet): break step 8 into 8a-8f and record decisions 27-30 (no sentinel in link streams, inbound neighbors as machines, the row kind, the agent's direction), so each removal lands after its replacement
- 23ecf62 docs(fleet): mark step 7 shipped with ssh machines on one peer link per pair, so step 8 starts from what's true
- e5b8f78 feat(machine): every ssh machine is held as a fleet-link --peer link whose sockets every client dials, its agent over AGENT and a hub's version followed, so an ssh machine reaches and is reached under trust over one link per pair
- 6af5483 feat(fleet): fleet-link --peer binds the dialer's sockets, hands its streams to the daemon with link.attach and announces it as an inbound neighbor, following a hub dialer's build, so a dialed machine serves its link under its own trust
- 4286ca8 feat(fleet): link.attach takes a channel and hands the connection to that channel's server under the peer's trust with its own fleet root, so a link's far end can pass every stream to its daemon over the socket
- b1cd7d3 refactor(fleet): links dial through one transport seam and both link roles share one body that can bind sockets and answer opens, so ssh is swapped in one module and either end of a link can serve local clients
- 8660be9 docs(fleet): split one link per machine pair from one kind of machine and renumber the rest, recording decisions 23-26 (both ends bind and answer, per-peer fleet root, versions on the hub flag, lend.toml with lending), so step 7 ships in small commits without regressions
- 3ce588f docs(fleet): mark step 6 shipped with member.toml and the trust table on both kinds' connections, so step 7 starts from what's true
- 1d956a0 feat(machine): gc on an offered worker is a daemon verb its member's full trust admits and worker trust refuses, so host maintenance over the link follows the member's setting
- aa25738 feat(machine): an ssh machine's api relay attaches its connection as the linking host's with link.attach, so the machine's trust table applies to it as to a lending link
- 2281189 feat(machine): machine add records the picked roots on the machine with machine roots add there, so its worker trust keeps admitting them once no instance holds them
- 952c42e feat(fleet): a lending link's table admits the member's own roots beside its fleet root under worker trust and the whole API but member.* under full, so trust, not lending, decides what a remote caller reaches
- 9f29d4d feat(fleet): member.toml holds a member's name, trust, roots, allowances, caps and dev-builds behind member.get/set and machine trust, so trust has a home before the trust table reads it
- b28e1d8 docs(fleet): mark step 5 shipped on offered workers' links, so step 6 starts from what's true
- 8b3e040 feat(exec): service terminals and terminals into helper-less or non-root-helper instances on an offered worker run as a runtime exec under a host pty there, and exec --service opens a service's shell, so no terminal is refused over the fleet link
- 9abbf50 feat(exec): a non-tty exec on an offered worker runs as a piped PTY stream into a runtime exec there, so scripts and pipes work without ssh to the worker
- f0308d9 feat(machine): service ls and a followed build log on an offered worker go over the API, and its snapshots no longer show other roots' isolated service containers, so the hub sees only what's lent
- 8e5707c feat(machine): ps and stats on an offered worker are quick calls cut to what it lends, so they work without re-running devsandbox there
- 709466f docs(fleet): split one kind of machine into steps 5-9 behind a transport seam and renumber the rest, recording the answered open questions as decisions 17-22, so each step is one reviewable change
- ed7a621 docs(fleet): mark step 4 shipped on offered workers' links and settle the daemon-side attach question, so step 4b starts from what's true
- 67a9dd5 feat(machine): logs, inspect, done, rename, ls and status on an offered worker run as API calls within its trust, and the rest say why they're refused, so the CLI never re-runs devsandbox on a worker
- c39a57c test(fleet): the agent gate test tolerates a refusal closing before its write, so it stops failing under load
- f0320ad feat(fleet): the hub's ssh agent reaches an offered worker's instances over the fleet link's AGENT channel while its entry has agent on, so agent forwarding needs no ssh relay to the worker
- 1a2aaf4 feat(fleet): port forwards to an offered worker ride the fleet link's TUNNEL channel into a bridge there, so forwards need no ssh to the worker
- 5435dca feat(fleet): exec and dashboard terminals on an offered worker attach over the fleet link's PTY channel, reconnecting as over ssh, so workers need no inbound ssh for terminals
- de317bc feat(fleet): a worker serves PTY streams as helper session attaches and lists its instances' sessions, so the hub can open terminals without ssh to the worker
- f87d0f2 refactor(fleet): a link serves a table of channels and either end opens any the peer serves, so PTY, TUNNEL and AGENT can ride the fleet link
- b20420f chore(skills): orchestrator breaks down an existing plan's rollout step instead of writing a new plan, so design plans can be executed step by step
- 5d9cecb docs(fleet): links are the ssh pairs machine add makes, routed over a graph, with trust applying to every caller, so the hub is only a role
- fb0178d docs(exec): mark resumable exec step 4a-4d shipped, leaving only the items after fleet step 1
- 8f0ee37 docs(fleet): one kind of machine, every machine a fleet member with its own trust setting, so configs live anywhere and machines are added one way
- 4b7c4ae chore(toolchain): list the helper's musl targets in rust-toolchain.toml, so a fresh checkout or rebuilt sandbox can build devsbd without a manual rustup step
- 760a41b fix(identity): plan a root host user on a rootful runtime like rootless docker, so running devsandbox as root stops failing on a remap to uid 0
- 72b96cb fix(images): tag features images devsandbox-feat-…, so a sandbox named foo-feat can't overwrite sandbox foo's features image
- e0dc02d fix(config): ${localEnv:NAME:default} and ${containerEnv:NAME:default} use their default, as devcontainers do, instead of looking up a variable named NAME:default
- 5a03e86 feat(devsbd): session attach, ls and rm over RPC, so the daemon can attach to a session without an exec, as fleet's PTY channel will
- 230d22a feat(fleet): run places a sandbox on the roomiest lending worker, moving its code first, so a hub spreads work without anyone picking machines
- 3c8b19e feat(fleet): move a sandbox's config root as a tar and its repos as hub-cloned bundles onto a worker, so a worker can run hub configs without credentials
- 8d54318 feat(fleet): a pure place over soft caps, locality and reachability, so the placed run has one tested rule for where work goes
- 2c10a2d fix(images): key image tags and feature build dirs by config root, so two roots with a same-named sandbox stop overwriting each other's images
- b214318 feat(fleet): a hub on a dev build pushes its own binary to workers that accept dev builds on its platform, so a dev fleet stays on one build
- 2b2bb3c feat(fleet): a worker follows its hub's exact published build, downgrades included, so a fleet never runs mixed protocols
- b7fd80b feat(fleet): a TRANSFER channel on the fleet link, size- and hash-checked, so binaries, config roots and bundles can move between hub and worker
- f59a05d feat(fleet): each daemon reports capacity and a worker its fleet root, so the hub sees placed instances and where there's room
- c5189f1 feat(fleet): hub mode keeps the daemon and every worker link up and saves remote rows, so a restarted hub shows its fleet before workers reconnect
- 3a65d5b feat(fleet): check every container a fleet-root config creates against the worker's lending policy, so a hub can't reach the laptop's host through a config
- e19a8f5 feat(lend): lend and fleet join|leave set lending through the daemon, applied live, so joining a hub needs no hand-edited file or restart
- 782b07d feat(fleet): a lending worker dials its hub and serves it a confined Worker table, so the hub reaches only what the laptop lends
- ca191f5 feat(fleet): a hub accepts worker offers as offered machines reached over the worker's own link, so a laptop can lend without the hub ever ssh-ing in
- e8f1123 feat(fleet): one link primitive for host-to-host muxes, shared with the agent relay, so a worker can carry the API to its hub
- a96b371 test(devsbd): send only the hello in the wire-mismatch check, so the supervisor's close can't reset the test's read
- fabb742 feat(dispatch): run ops call the child's helper over RPC when it offers them, so wait and follow are one held stream instead of an exec per poll
- bed361d feat(serve): a HelperClient over each bridge's RPC channel, so host code can call the in-container daemon with a queue, a log and cancel
- 65f14ff feat(devsbd): an RPC channel the host opens on the bridge, flow-controlled like Connect, so host requests stop needing a fresh runtime exec
- a409203 feat(tui): count an instance's exec sessions in instances.procs, so a detached session left behind is visible without --sessions
- 5c03315 feat(devsbd): version the session wire and check it before any takeover, so a client never displaces or garbles a session of another helper build
- 31f95b6 fix(devsbd): keep reading a session socket while the terminal stalls, so a displaced client still gets detached and exits
- a446f52 feat(devsbd): prune settled session dirs on session new and add session prune, so ended sessions stop hiding live ones from ls
- 30c14bb docs(plans): step-level landmarks and the user's fleet decisions, so implementers don't re-derive them from the code
- b2547f1 docs(plans): order resumable-exec, helper-rpc and fleet so fleet's PTY rides a daemon-side session attach instead of ssh exit codes
- 7716cb8 docs(test): say gated tests follow DEVSANDBOX_RUNTIME and rootless podman is now exercised on CI
- b939766 ci(podman): opt into the service-manager e2e, which fails rather than skips on CI
- 8869ad2 ci(podman): give the podman job a user session and isolated children its bus, so rootless builds get systemd cgroups like on a desktop
- f8e852c test: share rootless podman's store with isolated children and drop the last docker-only assumptions, so the podman job tests the code, not the harness
- 43041f1 ci: run the gated tests under rootless podman, the identity mode nothing exercised
- f971a2c test: drive gated tests through the selected runtime, scoping the seccomp ones to docker, so podman runs the same suite
- d1fe235 test(support): gate runtime tests on the selected runtime, with a docker_only scope, so the same tests can run under podman
- 6d6aaec docs(site): cover host identity, the /root prompt, browsers and resumable exec, so the site matches what ships next
- d0aed1d docs(changelog): notes for host identity, the browser sandbox, the /root migration and resumable exec
- b2c4d7c docs(identity): close the identity plan, with ADRs for the user model, the browser sandbox and the /root migration, and the living docs checked against the code
- d37a8f3 feat(tui): offer the /root migration when the dashboard opens and before run, start and rebuild, so dashboard users get the same choice as the cli
- 6ce79cc feat(run): ask before run, start and rebuild whether to update a config that mounts into /root, so the switch to host identity doesn't break sandboxes silently
- 7d6cee8 feat(tui): flag sandboxes that use /root in the header and Detail, so a config the identity change broke is visible before anything fails
- f6749d4 feat(serve): serve /root findings, their migration and acks over the API, so the CLI, the dashboard and machines check and fix a config the same way
- 384d751 feat(config): rewrite /root findings in place with toml_edit, keeping comments and layout, guarded by a file hash and a transient backup
- cca9216 feat(config): find the config entries that point into /root, each tied to the table that defines it, so a migration can rewrite them at their origin
- 0374df0 feat(config): resolve ${containerEnv:NAME} from the image at create, so configs can name the adopted home instead of /root
- f971a8c feat(devsbd): start browsers through a wrapper at a non-root uid on root plans, so Chromium keeps its sandbox where execs run as root
- 4f84442 feat(run): check the browser sandbox in each new container and give execs the env that matches, so tools turn their sandbox off only where it can't work
- 5b8cd40 feat(devsbd): add userns check so the host can tell from inside a container whether a browser sandbox can start, and which step blocks it
- 34f6c51 feat(run): create docker sandboxes with a seccomp profile that allows user namespaces, so a browser's own sandbox can start
- 300a457 docs(identity): split the tool environment and /root migration into steps 7-17 with landmarks, so implementers can run them
- 4317d51 docs(status): mark fleet as active
- 283dc54 docs(identity): mark the identity core shipped, leaving the tool environment and /root migration planned with known limitations listed
- d4442a2 feat(run): create and exec sandboxes by the identity plan so workspace files come out host-owned on every runtime mode
- 50c237c feat(runtime): probe each runtime context's user-namespace mode, cached per context, so the identity plan matches the host it runs on
- 31f22f7 feat(devsbd): add identity apply so the helper can move the adopted account to the host ids without usermod in the image
- d99932b docs(machines): plan a fleet of workers lending capacity to an always-on hub without exposing ssh
- 3ff5371 feat(config): add the identity field and read updateRemoteUserUID as its hint so a sandbox can opt out of host identity
- 0d33dde feat(runtime): add the identity classifier and strategy table so each runtime mode gets one tested user plan
- 80fb208 docs(identity): split the core into commit-sized steps with landmarks so implementers can run it, decisions recorded
- 0066a12 docs(identity): plan migrating /root configs so existing sandboxes survive the switch to host identity
- f5857af docs(identity): plan one user model across runtimes so devcontainer configs stop breaking between rootful, rootless docker and podman
- d03e16d fix(run): create missing feature bind sources under shared volumes
- 9e9b4fd fix(config): mount caches outside /root so a non-root remoteUser can reach them
- 1e52c67 docs(exec): mark resumable exec steps 1-3 shipped, leaving session cleanup planned
- b219a6a feat(machines): reattach a machine exec's session after ssh drops, so a network blip doesn't end the program's terminal
- f8bb5ef feat(exec): run tty execs in helper sessions with --attach/--sessions, so a dropped client can get its process back
- e94c930 feat(devsbd): add pty sessions a client can reattach to, so an interactive exec can outlive its connection
- 2818015 docs(exec): plan resumable interactive sessions so a dropped connection no longer leaks the process

</details>

## 0.8.0

Machines: sandboxes on your other hosts, over ssh, in the same CLI and dashboard, with your ssh-agent relayed only where you allow it. No more half-built sandboxes: an instance is recorded from the moment `run` starts, a failure leaves it listed as `failed` with its error, and Ctrl-C undoes the whole run. Every `run`, `rebuild` and `start` keeps a build log, and the dashboard runs them in the background instead of handing them the screen. `run`, `rebuild`, `start`, `stop`, `rm` and `service rebuild` now run in the host daemon, so a build outlives the terminal that started it, and `-d` leaves it running. The dashboard gets everything it shows from the daemon too.

**Behaviour change: a failed `run` now leaves an instance to `rm`.** Before, only a failing lifecycle command (`postCreateCommand`, …) kept its container, and a run that failed earlier (worktree, image build, container create) left its worktree, branch and services behind with no instance pointing at them. Now every failure keeps a `failed` instance; `devsandbox rm <name>` removes all of it, or `devsandbox rebuild <name>` retries.

```bash
devsandbox rebuild web-4   # retry a failed run
devsandbox rm web-4        # or remove everything it made
```

### Added

- **`machine add` installs devsandbox on the machine.** When the machine has no devsandbox or another version, `machine add` offers to copy this one there (to `~/.local/bin/devsandbox`, or over the old one); `--auto-install` skips the question and is needed off a TTY. A devsandbox in `~/.local/bin` is found even when the machine's login shell doesn't put it on `PATH`. `devsandbox --version` prints the version.

```bash
devsandbox machine add me@my-server --auto-install
```
- **Machines: sandboxes on other hosts, over ssh.** `devsandbox machine add <ssh target>` registers a host running devsandbox (its config roots are offered to pick from, or pass `--config '<path there>'`); `machine ls` shows each one's state, `machine rm` forgets it. Their sandboxes and instances then show in the dashboard next to yours, in a MACHINE column, and every key works on them, terminals included. On the CLI a name is looked up on every machine: one match is used wherever it is, `my-server/test` or `@/test` (this host) picks when it's ambiguous. Verbs run on the machine with its login shell's environment. Your ssh-agent reaches a machine only if you ask: `machine add --agent`, `machine set <name> --agent on|off`, or `a` on the dashboard's Machines tab (`5`, listed while a machine is registered: each machine's target, link state, agent and version) (off by default, takes effect at once), relayed by devsandbox rather than `ssh -A`. A login shell that prints a banner no longer makes the machine unreachable. `exec`, `logs`, `inspect`, `done` and `rename` run there over `ssh`. `--machine <name>` runs a command without a name there (`ps`, `ls`, `stop --all`, …). A machine that's down keeps its last rows, marked `unreachable`. Not yet on machines: VS Code, the Inbox. Adding a machine means trusting it. Details: `docs/machines.md`.

```bash
devsandbox machine add me@my-server
devsandbox run api              # `api` is only defined on my-server
devsandbox exec test            # an instance there: over ssh
devsandbox stop my-server/test  # qualified, when `test` exists here too
```

- **Port forwards into a machine's sandboxes.** `devsandbox port my-server/web 3000` opens a port of an instance on a machine on this host, and `port --machine my-server --service redis 6379` one of its global services. In the dashboard, `p` on a machine's row does the same; the Ports tab lists those forwards with a MACHINE column, and like local ones they're kept by the host daemon and come back after it restarts. Each forward is tunnelled over your own `ssh` to the machine, reconnecting if it drops. A machine's `forwardPorts` stay on that machine: forwards into it are only the ones you ask for here. The machine needs this devsandbox version. Details: `docs/architecture/daemon/forwards.md`, *Remote bridges*.

```bash
devsandbox port my-server/web 3000
devsandbox port --machine my-server --service redis 6379
```

- **Forwards show the listening process without `lsof`.** The process listening on a forwarded port (`node (pid 412)`) now comes from the in-container helper, so it shows in images that have no `lsof`, and on a machine's forwards too. Running instances pick up the new helper when restarted.

- **API: forwards into machines.** `forwards.add` takes `machine` (the forward still binds on this host; `dir` is the config root there), `forwards.list` takes `machines: true` to include them, and forward rows carry `machine`. Details: `docs/reference/api.md`, *Forwards*.

- **API: machines.** `machines.probe|add|list|get|rm`, `roots.list`, a `machine` param that runs a quick call or a verb on a machine, `machines: true` on `instances.watch` (rows tagged `machine`, plus each machine's link state), `instances.resolve` and `sandboxes.list` (every machine's matches), and `found` on `instances.resolve`'s answer. Details: `docs/api.md`, *Machines*.

- **`-d` / `--detach` on `run`, `rebuild` and `start`.** Returns as soon as the instance is registered and prints its name (`run -d --json`: the run record); the build goes on in the host daemon. Follow it with `devsandbox logs --build <name> --follow`, or watch its row in the dashboard.

```bash
devsandbox run -d web --branch fix/login
```

- **API: the verbs as methods.** `run`, `rebuild`, `start`, `stop`, `rm` and `services.rebuild` stream their output and phase over the API, plus `instances.resolve`, `instances.cancel` and `sandboxes.list`. Details: `docs/api.md`, *Verbs*.

- **API: everything the dashboard shows.** `instances.list` takes a `depth` (`disk`, `listing` or `full`, to skip the runtime or just its stats) and also answers `thread_children`. New: `instances.procs` and `instances.signal` (an instance's processes and tracked runs; SIGTERM/SIGKILL one), `instances.buildLog`, `instances.rename`, `instances.done`, `containers.logs` and `containers.inspect` (devsandbox containers only), `sandboxes.get` and `services.get` (a config as written and resolved). `instances.changed` now also fires when an instance is created, removed, renamed, marked done or changes step. Details: `docs/api.md`.

- **API: `instances.watch`.** A client watching a config root gets its snapshot pushed as `instances.snapshot` every 2 s (cpu/mem every 7 s), from one poll shared by every watcher; the dashboard uses it, so two dashboards cost the runtime no more than one. `stop`, `rm` and `services.rebuild` take `detach` (a hang-up leaves them running), `run`, `rebuild` and `start` take `tty` (run on a pty of that size), and `instances.buildLog` takes `ansi` (keep the colours). Details: `docs/api.md`.

- **`status --json` and `ls --json` sandbox rows gain `dispatcher` and `worktree_branch`**: whether the sandbox is a dispatcher, and its resolved `worktree-branch`. Details: `docs/json-output.md`.

- **Build logs.** `run`, `rebuild` and `start` write their whole output, the containers' build and lifecycle commands included, to a log per instance (`~/.local/share/devsandbox/logs/<instance id>/build.log`; the one before is kept as `build.1.log`, and `rm` deletes both). `devsandbox logs --build <name>` prints it; `--follow` keeps printing until the instance is done building. The command's error, if it failed, is the last line. Builds run on a terminal of their own when you're on one (or start them from the dashboard), so docker's progress display and colours show as they used to, live and in the dashboard's build log (`b`), which also scrolls with the mouse wheel. Piped, `logs --build` prints plain text.

```bash
devsandbox logs --build web-4 --follow
```

- **`ps`, `status --json` and the dashboard show where an instance is.** While it's being made, an instance's status is its step (`preparing`, `building`, `creating`, then the lifecycle command running, like `postCreateCommand`), and `failed` when it stopped partway; the dashboard's Detail panel shows the failed step and error. `status --json` rows carry it as `phase` (`{"state": "in-flight", "step": "building"}` or `{"state": "failed", "step": …, "error": …}`), absent once the instance is ready; `ps --json` rows of instances with a container too. Details: `docs/json-output.md`.

### Changed

- **`run`, `rebuild`, `start`, `stop`, `rm` and `service rebuild` run in the host daemon.** The command starts `devsandbox serve` if needed, hands it the work and prints its output as it comes, exiting as before. Closing the terminal, or losing the ssh session, no longer stops a build; Ctrl-C still cancels it (the rollback's output shows, exit 130), and a second one stops it at once. Prompts (the sandbox picker, an ambiguous name, `rm`'s branch question) still happen in your terminal. If no daemon answers, one `warning:` line and the command runs in your terminal as before (on Windows it always does, with no daemon).

- **The dashboard is a client of the host daemon.** Everything it shows comes from `devsandbox serve` and every action goes to it, so it needs the daemon (it starts one when it opens, as before). If the daemon goes away, the last tree stays on screen marked stale with the reason, and actions say the daemon is needed. On Windows, which has no daemon, the dashboard isn't available for now. It no longer runs an autostart pass of its own when it opens; the daemon's covers every config root that has instances.

- **The dashboard no longer takes over the screen for `stop`, `rm` or a service's `rebuild`.** They run in the daemon, and the status line says how they ended, or why not (e.g. `rm` refusing a dirty worktree). `rm`'s question about deleting the branch is a `y`/`n` popup; `esc` removes nothing. Quitting the dashboard while one of them is still going leaves it running.

- **`s` on a stopped instance starts it like `devsandbox start`.** It used to be a bare container start; it now also runs the services, `postStartCommand` and the autostart pass, in the background, with a build log under `b`.

- **Each command runs with your shell's environment.** The daemon runs every request with the caller's whole environment, never its own: `${localEnv:…}` in the config, `SSH_AUTH_SOCK`, `GIT_*`, `DEVSANDBOX_RUNTIME` and `PATH` are those of the shell you typed the command in, even when the daemon was started long ago or by systemd.

- **The dashboard runs `run`, `rebuild` and `start` in the background, through the host daemon.** It no longer steps aside for the build and waits for a key: the command keeps going even if you quit the dashboard, a status line says when it started, and the instance's row shows its step as it goes, `failed` included. When it can't reach the daemon, the status line says one is needed instead. `b` on an instance opens its build log, following it while it builds. `d` on a row still building asks to cancel it; on a failed row it removes the instance, and `s` rebuilds it.

- **The host daemon follows container events.** Instead of listing containers every few seconds, it wakes on the runtime's events and on edits to your config, so the dashboard reflects a change sooner and an idle daemon (kept up by `serve install`) costs next to nothing.

- **Ctrl-C rolls a `run` back.** Cancelling a `run` (Ctrl-C or SIGTERM) removes everything it had made: container, services and network, volumes, worktrees, the branch it created if it has no new commits, and the instance itself. A second Ctrl-C quits at once without cleaning up. A cancelled `rebuild` leaves the instance `failed`.

- **Commands leave an instance alone while it's being made.** `start`, `stop`, `rename`, `rebuild` and `rm` (even with `--force`) refuse an instance whose `run` or `rebuild` is still going and say what it's doing; `start` also refuses a failed one and points at `rebuild` and `rm`. `rebuild --all` and autostart skip both. `exec` works once the container exists, so you can shell into one whose `postCreateCommand` failed. A dispatcher's `devsbd ensure` of such a child fails with a message naming its step instead of starting or recreating it.

### Fixed

- **Copying in the dashboard works in terminals that ignore OSC 52**, such as iTerm2 by default. That covers the dashboard's own selections and copies from apps in its terminal tabs, including tabs on a machine. A dashboard running on your machine now also puts the text on the clipboard itself (`pbcopy`, `wl-copy` or `xclip`).

- **Upgrading devsandbox under a running dashboard or daemon no longer breaks it.** Once the binary was replaced, new terminal tabs, builds and other spawned commands failed until a restart; they now run the new one.

- **A run killed outright shows as failed.** A `run` or `rebuild` killed by SIGKILL, the OOM killer or a reboot used to leave its instance looking half-made or not at all; it now shows as `failed` with `interrupted`, ready to `rebuild` or `rm`.

- **Two `run`s started at once no longer share an instance name.** Both could pick the same default name and build over each other; now the second stops with an error before making anything.

<details><summary>Commits</summary>

- be6fc4a docs(skills): tell agents to add sandboxes to the workspace's config
- c286190 docs(site): frame a sandbox as the stack and one config per workspace
- b14a8d5 docs(site): add a compared-to-docker page
- 686da2d docs(site): cover machine add installing devsandbox and the host clipboard copy
- e0a718b docs(site): make the landing page say what devsandbox is for
- 7917bf1 fix(devsbd): mark a failed bridge done before reporting its outcome, so a caller seeing the failure also sees it dead
- 6a8efb3 fix(tui): also copy through the host clipboard command, since iTerm2 ignores osc 52 by default and dashboard copies (own and relayed from terminal tabs) were lost
- 9c286da fix(machine): find devsandbox in ~/.local/bin off the login path and only warn when it can't be copied, so add works on hosts whose login shell misses ~/.local/bin
- 93d8d20 docs(machine): close the machine-install plan
- 000c807 feat(machine): offer to install devsandbox on machine add
- ad6ff05 feat(machine): let machines.probe and machines.add take a command
- 8865a83 feat(machine): check a machine's devsandbox and copy this binary there
- 649b827 feat(serve): wake the host poll on config edits
- 04fa19d docs(serve): close the runtime-events plan
- ca725cb feat(serve): let container events drive the host poll
- ecf0181 feat(serve): follow the runtime's container event stream
- 048f612 fix: ra hang bug
- 38eb0a5 docs(tui): bring the changelog, selection regions and stale comments in line with the machines tab
- 06af1a0 docs(tui): close the machines tab plan now that the tab and its agent toggle shipped
- 70f0246 feat(tui): let a on the machines tab flip a machine's agent, so relaying keys no longer needs a trip to the cli
- decbcf8 feat(tui): add a machines tab listing every registered machine's link and agent, so the dashboard can show what only machine ls did
- f07511a docs(machines): close the agent plan, record the never-ssh-a decision and the relay's known costs
- 042a430 feat(machines): keep a machine's agent relay up for cli re-runs and drop ssh -A everywhere, so keys reach a machine only when you said so
- e23d074 refactor(config): group implemented devcontainer properties together
- b742fa0 feat(serve): relay the agent to a machine only while it's wanted and its agent is on, and drop ssh -A from the daemon's links
- 79f6766 feat(machine): add a per-machine agent setting, off by default, so forwarding your keys becomes a choice per host
- b5075e4 feat(machines): add an agent relay over the helper's frame protocol, so a machine can get this host's agent without ssh -A
- 7c75b99 fix(machines): skip what a remote login shell prints before the relay's sentinel, so a chatty profile no longer makes the machine unreachable
- 3f9effb docs(plans): plan opt-in agent forwarding over our own relay and a sentinel for noisy login shells
- b27bb92 docs(agents): treat everything as unreleased before 1.0 so plans stop carrying compat work
- d2197ec docs(plans): drop compat and changelog notes from the machines plan, machines are unreleased
- de38c42 docs(plans): plan surviving a noisy remote login shell and opt-in, live-switchable agent forwarding for machines
- a6a0d0e docs(status): plan dropping the host lsof fallback once the helper covers every route
- 18e1892 docs(forwards): record remote forwards as shipped, with their limits, and archive the plan
- f38975b feat(tui): forward a machine's instances and services from the dashboard, with their forwards in the ports tab
- a2ccf7e feat(serve): hold forwards into a machine's instances in the daemon, persisted and dropped with the machine
- f27796e feat(port): forward a machine's instance or global service from the cli, tunnelled over ssh
- d86800a feat(port): add the hidden tunnel command and a remote opener, so a forward's bridge can run over ssh to a machine
- 6b0b55d refactor(forward): open a forward's bridge through a pluggable opener, so a remote one can come from ssh
- d40e4b5 feat(devsbd): answer a forward's listening process from the helper, so it works without lsof and over a remote bridge
- aebbf31 docs(plans): plan remote forwards as an ssh-carried bridge, helper-side process lookup first
- 8e0edaa chore(skills): make orchestrated work keep the docs tree current and close its plan
- 97502e1 refactor(serve): drop dead idle and quiet knobs left from the in-process dashboard
- b2a5e39 docs(comments): drop plan-step tags and describe the daemon-era code as it is
- f2a4a64 docs: point every code and site citation at the new docs tree, and test that they keep resolving
- ac334c9 docs: one status file, an overview and a map; archive shipped plans, drop docs the code outgrew
- 6afcdc5 docs(plans): trim unfinished work into current plans and triage every old doc
- 1f265ea docs(decisions): keep only the decisions that still hold, standalone
- a1f4371 docs(tui): describe the dashboard as a daemon client as built
- ed04e91 docs(inbox): describe the inbox and automations as built, with a verified inbox cli reference
- fc67220 docs(devsbd): describe the helper, its protocol, bridges and ssh-agent relay as built
- 423ce69 docs(serve): describe the daemon as built and verify the api reference against the method table
- 7172a5b docs(instances): describe config, runtimes and instances as they work today, verified against the code
- 25e878d docs: split docs into living reference, decisions and plans so status stops drifting
- 98749d6 docs(machines): document machines across the docs, site and cli skill
- 5647d09 feat(tui): show and act on machines' sandboxes
- dee2e5c feat(cli): resolve names across machines
- 519bb23 feat(machines): forward calls and verbs to a machine
- 2e7a08f feat(machines): held links and the federated snapshot
- 78ba576 feat(machines): machines.toml registry and machine add|ls|rm
- e897bf2 feat(machines): ssh transport, link hello, relay session env and roots.list
- 348d39d docs(site): show stop, rm and build cancel as the dashboard does now
- 4e25f3c docs(serve): describe the daemon-owned host side and the watched snapshot
- e35209d fix(tui): size a build's pty to the build log modal, not the terminal
- 667378a docs(changelog): note the shared poll, pty builds and upgrade fix
- 747f751 feat(tui): watch the root instead of polling instances.list
- 3098829 feat(serve): poll once for every dashboard and push the snapshot
- 686a362 feat(tui): show build logs in colour, replayed as the terminal drew them
- 62cf9ec feat(serve): run build verbs on a pty when the client has a terminal
- 8d341bd fix(tui): scroll the logs, build log and help modals with the wheel
- 5367fcd fix(tui): let stop, rm and service rebuild outlive a dashboard quit
- 27b7209 fix(serve): spawn the binary now at our path, not the replaced one
- 4d9a749 docs(serve): plan the work before machines
- b925e66 docs(tui): describe the dashboard as a client of devsandbox serve
- 7b0544c feat(tui): open instance terminals and :exec through devsandbox exec
- 665323e feat(tui): send stop, rm, s and service rebuild to the daemon
- 7c17dbe feat(tui): ask the daemon for logs, inspect, config, build logs and edits
- 7e7f59c feat(tui): read the instance tree and procs from the daemon
- 3b36501 feat(serve): rename, mark done, signal procs and rebuild services over the api
- b43bcc9 feat(serve): serve procs, logs, inspect, build logs and config views
- 5b3e7b7 feat(serve): serve the dashboard's snapshot over the api
- 710b2df refactor(tui): build the dashboard on unix only
- a3d7919 docs(tui): plan rollout step 4, the dashboard as a pure client
- 4fa528b docs(serve): record the calls on step 3's known limitations
- df0c28e docs(serve): describe the verbs running in the daemon, -d and the caller's env
- 61a1151 feat(serve): adopt verbs a previous daemon left running
- b4ea475 feat(tui): send run, rebuild and start to the daemon and cancel through it
- 6b6fdd7 feat(cli): send run, rebuild, start, stop and rm to the daemon
- 71c0f24 feat(serve): resolve names, cancel builds and ask rm's question over the api
- 0fe841e feat(serve): run run, rebuild, start, stop and rm as daemon requests
- 4360b83 docs(serve): plan rollout step 3, the verbs as daemon requests
- 9762f34 docs(changelog): describe failed instances, build logs and background dashboard builds
- 26ae476 feat(tui): run, rebuild and start in the background with a build-log view
- 19a9d5a feat(tui): show a building or failed instance's phase as its status
- b65237f fix(run): keep a run that fails before its container as failed
- d06e9bd feat(logs): keep a per-instance build log and show it with logs --build
- 2dd4d72 feat(run): roll back a cancelled run and guard verbs against unfinished instances
- 1cfaaa2 fix(run): record the instance first and roll back a run that fails before its container
- ef5f9e6 feat(state): record an instance's in-flight progress
- e9a4ab1 docs(serve): design moving the verbs into the daemon, remote machines and the instance-phase plan

</details>

## 0.7.1

**Critical fix: upgrade if you run more than one instance of the same repo.** A `git worktree prune` or `git gc` inside one sandbox could delete git's records of every other instance's worktree, leaving them with `fatal: not a git repository`. devsandbox now locks the worktrees it creates. After upgrading, run `devsandbox start` once on each existing instance to lock its worktree (safe on a running one), and `devsandbox rebuild` it to also get the `git gc` guard. This release also adds local-folder features and fixes a few host-daemon start and shutdown issues.

```bash
devsandbox start <instance>
```

### Added

- **Local-folder features.** A `features` key starting with `./`, `../` or `/` is a feature folder (`devcontainer-feature.json` + `install.sh`) resolved against the config dir, so a config can ship its own feature without publishing it to a registry. Options, `containerEnv`, `installsAfter`, `mounts`, `privileged` and `entrypoint` work as for OCI features. Editing a file in the folder marks the sandbox's instances as drifted, so `devsandbox rebuild` picks the change up, and `devsandbox ls` warns when the folder or its `devcontainer-feature.json` is missing.

```toml
[template.base.features."./features/toolkit"]
ripgrep = true
```

### Fixed

- **Critical: `git worktree prune` inside a sandbox no longer breaks the other instances' worktrees.** A container sees the repo's worktree records but not the other checkouts, so a prune (or `git gc`) there deleted their records and left each one with `fatal: not a git repository`. devsandbox now locks the worktrees it creates, so prune and gc skip them; existing instances get locked on their next `start`. An instance whose record was already pruned gets a warning on `start` instead; git won't work in it until the record is restored. Containers also get `gc.worktreePruneExpire=never` (after a rebuild for existing ones), so `git gc` leaves worktrees you made yourself alone too. Details: `docs/worktree-locking.md`.
- **`devsandbox rebuild` starts the host daemon, like `run` and `start`.** A rebuilt dispatcher or `inbox = true` instance with no dashboard open and no daemon running had no host, so its `devsbd` control commands exited `75` until some other command started one.
- **An upgrade or `devsandbox serve shutdown` no longer brings back the old daemon.** A dispatcher's child op still running while the daemon shut down could start a fresh daemon from the old binary, which then kept running instead of the new one (or undid the shutdown).
- **The "no host connected" error says how to get one.** Control commands that exit `75` now suggest running any `devsandbox` command (or `devsandbox serve install`) instead of opening the dashboard, which no longer serves them.

<details><summary>Commits</summary>

- 6a9f65a chore(site): add pnpm shot to screenshot built pages
- 029b3ac fix(site): tidy the architecture diagrams' joins and index list
- 23ba27b docs(changelog): note the serve drain race and no-host hint fixes
- 5f1d597 docs(changelog): note that rebuild now starts the host daemon
- 8c2b83e docs(devsbd): point the no-host hint at the daemon, not the dashboard
- 2977de1 fix(serve): never lazy-start a daemon from a dispatcher child op
- 138d46b fix(rebuild): start the host daemon after a rebuild
- 7ae7921 fix(worktree): lock sandbox worktrees so a prune inside a container can't break the others
- 454e99e docs(site): add unlinked /architecture pages for contributors
- 002dda3 docs(features): document local-folder features
- fc97df0 feat(features): support local-folder features

</details>

## 0.7.0

A per-user host daemon now keeps notifications, dispatchers and port forwards working with the dashboard closed, and serves an API that editors, GUIs and the new npm `connect()` client can drive. Sandboxes can keep one Inbox thread per item: a header with a state and buttons, and a conversation of messages, forms and your replies, answered from the dashboard, the new `devsandbox inbox` command or any API client, with events streamed back as they happen. The Inbox becomes a list of what's waiting on you rather than a log, and instances can be marked done instead of removed. VS Code can open straight at a file and line.

### Added

- **A host daemon keeps devsandbox live with the dashboard closed.** `devsandbox serve` is a per-user background process that now owns the connection to every running sandbox's helper: the ssh-agent relay, notifications and desktop popups, dispatcher control commands and port forwards. You don't start it: the dashboard, `run`, `start` and the commands that relay your ssh-agent start it when needed, and it exits 10 minutes after its last user left (a dashboard, a forward, a running dispatcher or `inbox = true` sandbox). A newer devsandbox takes over from an older daemon by itself. `devsandbox serve install` runs it from login as a systemd user unit (Linux) or a LaunchAgent (macOS), for sandboxes the container runtime restarts on boot; an upgrade repoints the installed unit at the new binary, and `serve uninstall` removes it. To keep it from idling without a unit, use `devsandbox serve --keep-alive` or `~/.local/share/devsandbox/daemon.config.toml`. `exec`, `start` and `run` no longer start an ssh-agent bridge of their own: one bridge per container, relaying the agent of whichever session last ran a command. Details: `docs/serve.md`.

```toml
# ~/.local/share/devsandbox/daemon.config.toml
[serve]
keep-alive = true
```

```bash
devsandbox serve install
```

- **Port forwards outlive the dashboard.** Ports-tab forwards and every sandbox's `forwardPorts` now run in the host daemon, so closing the dashboard no longer drops them, and every open dashboard shows the same ones. Forwards you add are saved in `~/.local/share/devsandbox/forwards.toml` and come back on the same host port after a daemon restart or a reboot, until `d` stops them. `devsandbox port` still forwards in the foreground until you stop it.

- **Inbox threads.** A sandbox that declares `inbox = true` can keep one thread per item in the Inbox (a PR, an email to answer). `devsbd thread put` sets its header: a title, a link, a state (`needs-you`, `active` or `done`), a status, the child instance it's about, up to 9 buttons and an optional reply box (`compose`, with a `hint` line under it saying what sending does). A put that changes nothing is ignored (no unread mark, no popup), so a sandbox can simply re-send all its threads on every pass; a desktop popup only fires when a thread enters `needs-you`, and state and status changes show as one-line markers in the thread. `devsbd thread send` adds a message under the header: markdown and key/value `fields` blocks, identified by an id of your choosing, so re-sending the same message is free and sending changed content edits it in place; `devsbd thread withdraw` takes one back. Everything is queued like `notify`, so it works with no daemon running. `devsbd thread rm` drops a thread, `devsbd thread ls [--feed]` lists yours back, messages included. `dispatcher` alone only grants the child commands, so a dispatcher that wants threads declares both. A rejected put or send shows up as an error notification from your instance, with the reason. Full reference: `docs/automations-guide.md`.

```toml
[sandbox.pr-dispatcher]
dispatcher = { spawn = ["web"] }
inbox = true
```

```bash
devsbd thread put --json '{"key":"pr-123","title":"#123 fix login","state":"needs-you","status":"review replies","child":"pr-123","actions":[{"id":"retry","label":"Retry"},{"id":"done","label":"Done","done":true}],"compose":{"hint":"Starts a run with your message"}}'
devsbd thread send --json '{"thread":"pr-123","id":"run-1","blocks":[{"type":"markdown","text":"Addressed 3 of 4 comments, **1 needs your call**."}]}'
```

- **Forms in messages.** A message can carry a form: choice, text and yes/no questions, with defaults (a text default is how you offer a draft for editing). The dashboard pins open forms under the thread's header: `tab` between questions, `space` to pick, `e` to edit a text answer, `enter` to see what will be sent and `enter` again to submit. Half-filled answers are saved as you go, so they survive a restart and show the same in every dashboard. Submitting sends one `submit` event with every answer, defaults filled in, and the thread shows what you answered (`you answered "<title>"` over each `label: value`) where you'll read the owner's reply to it. A question can follow up another (`under`), shown indented under it, and only be asked while one of its options is picked (`when`): a reply text that only matters for "Post the reply" is hidden, not required and sent as `null` when you pick "Don't reply".

- **`devsandbox inbox` answers threads from a shell.** `ls` and `show` (with `--json`) read the Inbox without the daemon; `reply`, `act`, `submit`, `done` and `reopen` answer a thread, named `<owner>/<key>` or by the id `ls` shows. The owner gets the same events as from the dashboard.

```bash
devsandbox inbox ls --view needs-you
devsandbox inbox reply pr-dispatcher/pr-123 "Rebase it first"
```

- **An API for editors and GUIs.** The host daemon serves a JSON-lines API on a unix socket: the Inbox (threads, replies, actions, forms, done/reopen, notifications), instances, port forwards, and change notifications. `devsandbox api --stdio` relays it over stdin/stdout for clients that can only spawn a process; it exits 0 when its input ends and 75 only when the daemon hung up first. The npm package's `connect()` wraps it with typed `inbox`, `instances` and `forwards` methods and events. Whoever can open the socket can act as you on every sandbox, like `docker.sock`. Reference: `docs/api.md`.

```ts
const api = await devsandbox.connect({ name: 'my-tool' });
await api.subscribe(['inbox']);
const [t] = await api.inbox.list('needs-you');
```

- **Thread buttons that act right away.** A button can carry a built-in host action that runs in the dashboard with no round trip: open VS Code on the thread's child (at a file and line), a terminal, its logs, a port forward, a link, or `rm` with the usual confirm. On a stopped child, VS Code, the terminal and the forward start it first (the button says `(stopped)`); logs don't, since a stopped container's log says why it stopped. The target is always the thread's child or the thread's owner itself, never another instance, and there is no arbitrary host command.

- **Events: your answers, back to the thread's owner.** Every other button, a reply, a form submission, marking a thread done and reopening it become events the owner reads with `devsbd events` (JSON lines, each naming its `thread`). `--wait SECS` returns as soon as there's one; `--follow` keeps a stream open and prints each event the moment it happens, with a ping after 30 s of quiet, and a newer follower from the same instance replaces the older one, so two copies of a loop never both act on a click. `--thread KEY` narrows either to one thread. Delivery is at least once: events stay until the owner acks them with `devsbd events ack <id>…` after saving its own state. `devsbd features` lists the newer verbs a helper has (`thread-send`, `events-follow`, …), so a script can check before using them.

```bash
devsbd events --follow
devsbd events ack e-1790900001-3f2a
```

- **Done instances.** An instance marked done keeps its container, worktree and runs, and shows dimmed with a `✓` in the dashboard and `(done)` in `ps`, until you remove it. Mark it with `devsandbox done <instance>`, a thread's Done, or a dispatcher's `devsbd done <key>`; clear it with `devsandbox undone`, `u` on the thread, or a dispatcher's `ensure` reusing it. `devsbd ls`, `ps --json` and `status --json` report `done`. npm: `done(name)` / `undone(name)`, and `done` on instance rows.
- **`d` removes the selected instance in the dashboard.** Like `s`, it acts right away with no prompt: it runs `rm`, which still refuses a dirty worktree and asks before deleting the branch.

```bash
devsandbox done web-pr-123
```

- **`devsandbox vscode --goto` opens VS Code at a file and line.** The path is relative to the instance's workspace folder. It opens (or focuses) the window as before, then has the in-container helper open the file in that window, waiting up to 30 s for it to attach; if that fails, the window still opens and the output says why the line was dropped. In the dashboard: `:code <instance> --goto path:line`.

```bash
devsandbox vscode web-2 --goto src/main.rs:42:7
```

- **Select and copy text with the mouse in the dashboard.** Drag in any pane to select text inside it, without borders or the panes next to it. Releasing copies it to your clipboard (*copy on select*, on by default); with that setting off, `ctrl-shift-c` or `cmd-c` copies it, and so does `ctrl-c` over a selection, for terminals that send that key plain or keep `ctrl-shift-c` for their own copy (Alacritty, GNOME Terminal, kitty and most Linux terminals: there the dashboard tells you `ctrl-c`). The copy goes through your terminal (OSC 52), so it works over SSH and from a container; under tmux, enable `allow-passthrough`. Inbox threads copy as rendered, with bullets, quotes, tables and links as shown and wrapped lines joined back, and dragging past the edge scrolls so a long message copies whole; the config, help and logs views work the same way. `shift`-drag still gives your terminal's own selection. In the integrated terminal, apps that use the mouse (vim, tmux, zidane) now get your clicks, drags and hover, and what they copy to the clipboard now reaches yours (a setting turns that off); in a plain shell you select the output, scrollback included.

- **Dashboard settings.** `?` is now *Settings & help*: the settings on top, toggled with `space`, `enter` or a click (`tab` moves between them), and the key reference below. They are saved per user in `~/.local/share/devsandbox/dashboard.toml`. *copy on select* (on) copies a mouse selection on release; *terminal clipboard* (on) lets apps in the integrated terminal set your clipboard.

### Changed

- **The Inbox shows what's waiting on you.** Side by side: a card list on the left (title, compact age, state/level chip and sender; a selected card gets an accent bar), the selected thread always open on the right, with a `‹ Needs you │ Active │ Done │ All ›` strip above the list stepped by `←`/`→`. The tab count and the yellow `✉N` on instance rows now count threads that need you and unread notifications, not every unread record. In the thread, the header stays pinned at the top (title, the same state and status chip as the card, the child and whether it's stopped, the buttons), open forms sit under it, and the conversation runs newest first, so the newest thing is read first. `enter` moves focus into the thread pane: `1`–`9` run buttons, `r` replies in a box at the bottom of the pane (shown only when the thread takes replies; it wraps, grows to six rows, and the line under it says what sending does; `alt-enter` adds a line), `tab` moves to an open form, `d` marks done, `u` reopens, `o`/`t`/`l`/`p` act on the thread's child, and `enter` opens the link; `esc` steps back. The per-instance grouping and inline folding are gone: a notification's earlier records are listed in the pane. A thread is read when selected and again if it changes while selected; notifications are marked read the same way or when you leave the Inbox after seeing them. `d` on a notification dismisses it and on a thread marks it done; `D` clears notifications only.

- **The dashboard takes more mouse clicks.** Click a tab title to switch tabs. In the Inbox, click a card to select it, a view name to switch views, the thread or its reply box to focus them; the wheel moves through the cards or scrolls the thread.

- **Inbox text is rendered as markdown.** Thread messages, replies and notification bodies show headings, lists, code blocks, quotes, links and tables (aligned when they fit) instead of raw `**` and backticks; titles and statuses get inline code and emphasis. Long lines wrap at word boundaries. Press `m` on a thread to see the source. Control characters from containers are stripped before they are stored or drawn.

- **A newer devsandbox updates the helper in running instances.** Before, a running dispatcher only got new `devsbd` verbs after `devsandbox start`; now the host daemon of a newer devsandbox installs them, so opening its dashboard (or any command that starts the daemon) is enough.

- **The Inbox is stored in `inbox.json`.** It's shared by every dashboard, the host daemon and `devsandbox inbox`. On first use, the notifications of the old `inbox.toml` are carried over; threads from earlier builds aren't (their owners re-send them on their next pass).

- **`devsbd ensure`, `stop`, `rm` and `done` answer JSON.** Each prints one JSON line instead of the bare instance name, so a dispatcher never parses prose: `ensure` gives `name`, `key`, `sandbox`, `state`, and whether the child was `created` or `started`; `stop` gives `state: "stopped"`, `rm` `removed: true`, `done` `done: true`. A script that read the name from stdout reads `.name` now. Errors are unchanged: a message on stderr and a non-zero exit.

- **`rm` cleans up merged branches without asking.** With no flag, `rm` first runs `git fetch --prune origin`, then decides about the branch the worktree has checked out. If every commit on it is already on its remote branch, or the remote branch it tracked has been deleted (a merged PR), the branch is deleted without a prompt. Only a branch with commits that exist nowhere else still prompts, and off a TTY it is kept. Branches you reused with `--branch` follow the same rules now. The default branch (`origin/HEAD`, `main`, `master`) is never deleted. When `rm` deletes a branch, it also deletes the branch `run` created if that branch is an ancestor of it. `--delete-branch` / `--keep-branch` still decide outright.

### Fixed

- **Instances no longer vanish from state while their container stays.** Commands saved the whole state as they had loaded it, so a slow `run`, `rebuild` or `rm` running alongside another command could drop the instance that command had just recorded, leaving its container and worktree behind with no entry. A dispatcher child lost this way blocked its key for good: every `devsbd ensure` failed with `container … already exists but is not in state`. State changes are now applied under a lock to the current file, written atomically. A dispatcher's `ensure` also replaces such a leftover container when it carries that dispatcher's label and its worktree is gone; if the worktree is still on disk, `ensure` refuses and names the worktree, so you can check it for work before removing it on the host.

- **SSH works in a dispatcher's child as soon as `devsbd ensure` returns.** A child that `ensure` had just started had no working ssh-agent for about a second, so a `devsbd exec` right after it (`git fetch`, `git push`) failed with `Permission denied (publickey)`. `ensure` now waits (up to 12 s) for the agent relay of a child it created or started; if it isn't ready by then, its answer carries a `note` saying why.

- **Long commands in the `:` prompt stay visible.** Text past the prompt's width was hidden though it was still run; the prompt now scrolls sideways to keep the cursor in view.

- **A press in the Inbox thread pane no longer grabs the divider.** A press on the pane's first text column started resizing the list/thread split; now only the borders do.

- **The help and logs screens keep the mouse to themselves.** With either open, clicks and the wheel reached the integrated terminal hidden underneath.

- **Apps in the integrated terminal get the mouse and the clipboard.** They never received clicks or drags, and what they copied to the clipboard was dropped.

- **Dismissed notifications no longer come back with several dashboards open.** Each dashboard kept its own copy of the Inbox and saved it over the others', so records dismissed in one reappeared from another, and restarts seemed to add clutter. All dashboards now share one store, so a dismissal in one is gone from all.

- **A notification is no longer lost if the dashboard dies while receiving it.** The container's copy was dropped as soon as the dashboard said it had it, before it was saved; now it's saved first, and resent otherwise.

- **`rm` asks about the right branch.** It used to name the branch `run` created, even after the worktree had switched to or renamed another branch. Now it reads the worktree's current branch before removing it. For instances from before branches were recorded that have since been renamed, the old fallback guessed the branch name from the new name; it now uses the instance's original name.

<details><summary>Commits</summary>

- b0f96a0 fix(state): apply state changes under a lock to the current file
- b006504 feat(inbox): show a submission's answers where the user reads the outcome, and let a form question follow up another (under/when) so a reply for one option no longer reads as a separate question
- b89fb10 fix(dispatch): ensure waits for a child's ssh-agent relay after bringing it up, so an exec right after can use ssh instead of failing with publickey
- 3e997c7 feat(tui): d removes the selected instance instead of marking it done
- cdea7cd feat(inbox): drop the v2 put and event compat so old-shape puts are rejected with a pointer to thread send and compose, and events name only their thread
- 4d10d56 fix(serve): retry a restored forward's saved port for a second before moving it, since a draining predecessor or a forked child can hold it for a moment
- b48e4a9 docs: describe the daemon, owner threads, messages, forms, follow and the inbox cli as they now work, and mark the old threads design superseded
- 4858573 feat(tui): start a stopped child before running its vscode, terminal or forward action and answer dispatcher child ops with json, so thread buttons work on parked children and scripts never parse prose
- ca97a65 feat(inbox): add devsandbox inbox ls|show|reply|act|submit|done|reopen so scripts and terminals can read and answer threads without the dashboard
- 24bd49e feat(inbox): stream owner events with devsbd events --follow, one live follower per owner, so a dispatcher reacts at once instead of long-polling the store
- b6e421e fix(api): report stdin's eof before half-closing the relay's socket, since a fast daemon hang-up was read as the daemon leaving and exited 75
- 1f3a563 feat(inbox): name the event's thread field thread and let devsbd events filter by --thread, keeping key as an alias until the dispatcher moves over
- 619e8b0 test(serve): give the relay test's daemon a 1 s idle timeout since 200 ms flaked under a loaded parallel run
- 07e75b5 feat(tui): pin open forms under the thread header with choice, text and confirm widgets, a draft saved on every change and an enter-to-confirm submit
- e77f363 feat(inbox): add forms to messages with host-kept drafts, a one-shot submission and a submit event with defaults filled, so structured input is data instead of files in the child
- 4866133 feat(tui): pin the thread header and action row, show the feed newest first and the compose hint under the box, so the newest thing is read first and sending says what it does
- 0cb96ec feat(inbox): add devsbd thread send and withdraw for idempotent owner messages with markdown and fields blocks, so explanations live in the feed instead of an overwritten header
- 24e07eb feat(inbox): store threads as a v3 json feed of messages, replies, actions and collapsing markers, since the overwritten message and per-field timeline made threads read backwards
- 1874d60 feat(config): gate inbox threads and events on a new inbox = true sandbox setting so owning threads is its own capability and dispatcher only grants child ops
- a7f45f8 docs(inbox): name feed items by direction (message, reply, action, submission) and make enter confirm a form, since post was ambiguous next to submissions
- 6058656 test(serve): run serve install under the real systemd and launchd
- e16f8fd fix(serve): keep a literal $ in the systemd unit's executable path
- 55e133c docs(serve): record the snapshot, forward-holder and forward-bridge trade-offs as future work so they're revisited deliberately
- 05e4252 feat(serve): persist ad-hoc forwards in the data dir so a restarted or upgraded daemon brings them back on the same host ports
- b044237 feat(serve): start and hand off through the installed unit, repointing it at the newer binary, so an upgrade no longer leaves the managed daemon stopped
- ff8167b feat(serve): read keep-alive from a per-user daemon.config.toml in the data dir so the daemon setting needs no flag
- c36ded7 docs(inbox): record the post-step-10 follow-ups agreed after the daemon review so they're implemented before the content model
- 666641d feat(serve): add serve install|uninstall for a keep-alive systemd user unit or launchagent so runtime-restarted dispatchers find a live host at login
- 685c0e6 feat(api): add the api --stdio relay and a typed npm client so editor extensions and guis can drive the inbox, instances and forwards without socket handling
- 1902817 feat(serve): own port forwards in the daemon and serve them over the api so configured and ad-hoc forwards outlive the dashboard
- 5cc83cc feat(serve): relay ssh-agent through the daemon's one bridge per container and pick the newest live agent a client reports, since per-command bridges duplicated relays and the daemon's inherited agent could be stale
- 29323e7 feat(tui): talk to the daemon through one reconnecting worker so inbox writes, change pokes and container status lines flow through the api and survive a handoff
- e17d1d8 feat(serve): serve a json-lines api for the inbox and instances with change subscriptions so every client acts through one path
- 19ccee0 feat(serve): run bridges, the notify drain, popups and autostart in the daemon so dispatchers keep a live host when no dashboard is open
- f681248 feat(serve): add the devsandbox serve daemon skeleton (socket, start lock, lazy start, version handoff, idle exit) so bridges and the inbox can outlive the dashboard
- 582a8bc refactor(inbox): route every inbox read and write through inbox::ops so the coming daemon api, cli and tui share one code path and produce identical events
- 8299e8d fix(tui): build the inbox chip in one place and show replies in full, since the card hid the status the pane showed and multi-line replies were folded onto one row
- 203b06a fix(tui): wrap and grow the inbox reply box and scroll the : prompt sideways, since text past the box width was invisible though it was still sent
- dc19ab7 docs(inbox): plan the inbox redesign so each step can be implemented and reviewed on its own
- 9c74eba fix(rm): decide on the worktree's current branch and delete merged or pushed ones without asking, since the prompt named the stale recorded branch and merged prs left branches behind
- 69a6cbb feat(tui): copy on select by default again and name ctrl-c as the copy key in terminals that keep ctrl-shift-c, since alacritty and most linux terminals never pass it on
- 99f2025 docs(tui): document dashboard settings, copy keys, terminal clipboard relay and hover, and changelog the mouse fixes found along the way
- 7d5e1dd feat(tui): forward hover to integrated-terminal apps that track all motion, since they got no pointer movement without a button held
- c4c80de feat(tui): add dashboard settings to the ? screen and make copy on select an option, off by default, since copying every selection clobbers the clipboard
- 46954fb fix(tui): relay osc 52 copies from apps in the integrated terminal to the outer clipboard, since the emulator dropped them and copying in zidane did nothing
- c5a8484 docs(tui): plan selection follow-ups (terminal app clipboard, settings, hover), from first use feedback
- c342d45 docs(tui): document mouse selection and let ctrl-shift-c copy it again, since most terminals keep that key for their own (now empty) selection
- ca77669 feat(tui): forward mouse presses, drags and releases to terminal apps that track the mouse and select locally otherwise, since apps in the integrated terminal never saw a drag
- a802bf1 feat(tui): copy whole rendered markdown from a thread, rejoining wrapped lines and autoscrolling past the pane edge, so a long llm message pastes as it was written
- bd1d29d docs(tui): plan mouse text selection, since mouse capture leaves the dashboard with no way to copy text
- abd2a63 chore: more simplifications
- 680db64 chore: simplified README.md
- 5473290 feat(tui): lay out markdown tables in threads as aligned columns when they fit, since llm summaries lean on them
- 4fd02eb feat(tui): render thread and notification markdown with word wrap and a raw toggle, and strip control characters from container text, since dispatcher text is mostly llm markdown
- 9bdbbb4 docs(inbox): plan markdown rendering in threads, since dispatcher text is mostly llm markdown
- 268c006 feat(tui): make the tab bar, inbox cards, view strip and thread pane clickable, like the terminal panel already was
- 44a37c9 perf(mux): shrink per-stream thread stacks to 128 KiB
- a9b93b2 docs(tui): describe the side-by-side inbox, cards, focus zones and reply box
- 16217a6 feat(tui): let the inbox list/thread divider be dragged, so long titles or long threads get the room they need
- 37e8a80 feat(tui): render inbox items as compact two-line cards with a view strip, so the list reads at a glance instead of as a log table
- a572f71 feat(tui): show the inbox list and the selected thread side by side with a reply box in the thread, so reading and answering need no pane switching
- 510ca74 docs(inbox): plan the side-by-side inbox layout with cards and an inline reply box, from first-build feedback
- caeb4a8 test(devsbd): retry the refused-dial check on a fresh port, since a freed ephemeral port can be taken by a parallel test
- 010a60e docs(inbox): document threads, events, done instances and vscode --goto for dispatcher authors and dashboard users
- 0bdab8f feat(vscode): add --goto and use it for the thread vscode action, so a thread can open the draft at the line that needs a decision
- 69462cd feat(devsbd): add vscode-goto, which finds the attached window's extension host and runs its own remote cli as its owner, so the host can open a file at a line
- 069e639 feat(done): let users and dispatchers mark an instance done, so 'I've looked, carry on' no longer means removing the child
- 7fa8d35 feat(inbox): queue user actions and replies as events a dispatcher pulls with devsbd events, so users can answer from the inbox
- 4351ba9 feat(tui): run a thread's host actions on its child or sender from the pane, so looking at the work needs no dispatcher round trip
- fd255fc feat(tui): show the inbox as threads in needs-you/active/done views with a focused thread pane, so the badge counts what waits on the user, not noise
- 7c8d623 feat(inbox): let dispatchers put and remove stateful threads through the outbox, applied idempotently so re-asserting every pass adds no clutter
- d1ae90b feat(inbox): share one locked inbox store across dashboards and ack records only once stored, so dismissed records stay gone and a dying dashboard can't lose one
- 25d2a4d docs(inbox): give archiving on rm a step, it had none
- c05ee41 fix(tui): reinstall a stale helper before spawning a bridge so running dispatchers get new devsbd verbs without a restart
- e0472aa docs(inbox): plan inbox threads so dispatchers can show state, offer actions and take answers instead of re-sending notifications

</details>

## 0.6.0

The config file is now `devsandboxes.toml`, and it can be written in YAML too; an existing `config.toml` is renamed for you. Extra `folders` get their own worktree when someone else owns the checkout, `rm --force` clears out stuck instances, dispatchers can see which branches are in use, and the dashboard opens instantly and keeps its Inbox across restarts while putting far less load on dockerd.

### Added

- **YAML configs.** `devsandboxes.yaml` (or `.yml`) works in place of `devsandboxes.toml`: same keys, `extends` merging and validation, only the syntax differs. A sandbox hashes the same in either format, so converting a config doesn't mark instances for rebuild. Keep one config file per config dir; with more than one, devsandbox stops with an error.

```yaml
sandbox:
  web:
    folder: ../web
    image: mcr.microsoft.com/devcontainers/base:ubuntu
    services: [database]
```

- **`devsbd branches <sandbox>` tells a dispatcher which branches are already checked out.** It prints a JSON list of every branch in a worktree of the sandbox's repo and who holds it: one of the dispatcher's own children, another instance, the base checkout, or a worktree devsandbox doesn't know. It reads git on the host each time, so a `git switch` inside an instance is seen. With `--ahead`, each row also gets the number of commits `origin` doesn't have yet, and local branches that are ahead but not checked out are listed too. A dispatcher can use it to leave alone PRs that someone is working on locally. The sandbox must be in the dispatcher's `spawn`. Running dispatchers pick up the new helper when restarted.

```bash
devsbd branches web --ahead
```

- **`rm --force` (`-f`) removes an instance whatever state it's in.** A worktree with uncommitted or untracked changes is removed anyway, changes discarded, instead of `rm` refusing. A step that fails (a worktree git won't remove, a repo the host refuses to run git in) prints a warning and `rm` carries on, so the instance still leaves the list. Whatever couldn't be removed stays on disk. The branch of a worktree that was left in place is kept. In the dashboard: `:rm --force <instance>`. npm: `rm(name, { force: true })`.

```bash
devsandbox rm --force web-2
```

- **The dashboard's Instances tree has a TYPE column when a sandbox is a dispatcher.** Instances of a dispatcher sandbox read `dispatcher`, the others `-`. Without any dispatcher in the config the column isn't shown.

### Changed

- **The config file is now `devsandboxes.toml`.** An existing `config.toml` is renamed the next time `devsandbox` runs in its config dir (with a notice on stderr), and is read as-is until then. A `config.toml` with no `sandbox`, `template` or `services` table isn't a devsandbox config and is left alone.

- **Inbox times say how long ago a notification came in.** The TIME column reads `just now`, `12s ago`, `5 min ago`, `3h ago`, `1 day ago`, … `6 days ago`, then the date and time (`Oct 2 14:32`) once a notification is a week old. Before, it showed only the time of day, so yesterday's notifications looked like today's. The Detail pane shows the date and time.

- **`folders` entries get their own git worktree when the checkout belongs to someone else.** If an extra folder is a git repo and it's another sandbox's `folder`, or another instance already mounts it, the instance now gets a worktree of it, detached at that checkout's `HEAD`. Before, the instance mounted the live checkout, so the owner switching branches changed what the instance saw. The worktree is kept across `rebuild` and removed by `rm`. Dispatcher children always get one. To keep the old live view for an entry, write it as a table with `worktree = "never"`, or use `"always"` to force a worktree:

```toml
[sandbox.web]
folder = "../web"
folders = { "/workspaces/api" = "../api", "/workspaces/.shared" = { path = "../.shared", worktree = "never" } }
```

- A sandbox's own `folder` now also gets a worktree when another instance mounts that folder directly as a `folders` entry.

- **The Inbox keeps its history.** Notifications are saved in `inbox.toml` next to `state.toml`, so they survive closing the dashboard; `d`/`D` remove them from the file too. A notification with the same `--key` no longer replaces the earlier one: it becomes the head of a thread, with the older ones folded under it (`→` to show them). With more than one instance sending, the Inbox groups them per instance, foldable like the Instances tree. The limit is now 200 notifications per instance (was 50, and 200 overall).

- **`worktree-link` no longer migrates old `shared-files/<sandbox>/` stores.** The automatic move only relinked the instance being run, so every other instance on the same repo was left with dangling links. A link into an old store is now skipped with a warning that shows where the file should go. Move it there, delete the old link, and `rebuild`.

- **The dashboard opens instantly and fills in as the runtime answers.** The tree is drawn from `state.toml` and the config right away, statuses (`…` until then) arrive with the first container listing, and CPU/MEM after that. Before, the dashboard waited about 1.5s for `docker stats` and showed "no sandboxes defined" meanwhile.

- **The dashboard puts much less load on dockerd.** CPU/MEM now refresh every 7s instead of every 2s (statuses still every 2s), the runtime version is asked once, and process lists are only fetched while the Instances tab is open. Instance drift is read from the container listing instead of two `docker inspect`s per instance.

### Fixed

- **Listing containers no longer makes dockerd compute their disk sizes.** Every `ls`, `ps`, `gc`, autostart pass and dashboard refresh asked for container sizes as a side effect of the output format, which spiked dockerd's CPU every 2s while the dashboard was open and made each listing take ~300ms instead of ~20ms.

- **Opening VS Code no longer clears an instance's extensions.** `devsandbox vscode` and the dashboard's `o` read the sandbox config from the current directory, not from the instance's own config directory. Run from anywhere else, the extensions list was rewritten as empty, so VS Code didn't install anything. They now read the instance's own config. If that config still can't be read, the list is left as it was. Instances already hit by this get their list back the next time you open VS Code from the new version.

- **An `rm` that failed partway can be retried.** A worktree an earlier `rm` had already removed made the next `rm` fail too; it is now pruned instead.

- **The dashboard no longer warns about mount sources `run` creates itself.** `shared-volumes` paths and per-instance mount sources that don't exist yet are made by `run`, so a sandbox with no instance no longer shows them as problems.

- **VS Code labels the primary workspace root by its folder name**, matching the extra `folders` roots, instead of the instance name.

<details><summary>Commits</summary>

- 3a63926 feat(config): read devsandboxes.toml (or .yaml/.yml) and rename a legacy config.toml, so the config file is recognizable on its own and can be written in yaml
- b25563f feat(tui): show inbox times as how long ago, then date and time after a week, so older notifications don't pass for today's
- 16e793a feat(tui): accept --force on the :rm prompt so the dashboard can remove instances the cli's rm --force can
- 2b0bb63 feat(npm): let rm pass --force so node callers can remove instances with uncommitted changes or failed teardown steps
- 647b127 feat(rm): add --force so an instance can be removed despite uncommitted worktree changes or failed teardown steps
- aa50d82 docs(changelog): note the dashboard startup, dockerd load and type column changes
- 3aacc06 perf(tui): collect stats every 7s, ask the runtime version once and fetch processes only on the instances tab to cut idle dockerd load
- bff0cf7 perf(docker): list containers with an explicit ps template so the cli stops asking dockerd to compute every container's disk size
- fe376b0 perf(tui): render the tree from state and config before asking the runtime, and read instance drift from ps labels instead of two inspects per instance
- 376bdb6 fix(tui): show the tree right away on startup instead of a false 'no sandboxes' message while docker stats samples
- 092958d fix(tui): size the services column to its content when type is shown so the type column sits beside it, not at the far edge
- 8dcbfd2 fix(tui): stop warning about shared-volumes and per-instance mount sources that run creates before any instance exists
- b0ad91f feat(tui): add a type column to the instances tree so dispatcher instances stand out from the ones they spawn
- e7239b9 fix: update changelog and cleanup plan
- 20d8f6a docs(dispatch): document devsbd branches in the automations guide, design and changelog so dispatcher authors know to check branch holders before acting
- f2a9e43 feat(devsbd): expose the branches op as devsbd branches <sandbox> [--ahead] so dispatcher scripts can call it
- 985f9ef feat(dispatch): add a read-only branches control op so a dispatcher can see which branches are checked out, and unpushed, before touching a PR
- 1a723d4 docs(dispatcher): plan a devsbd branches op so dispatchers can tell which branches are in use
- 2a485c4 fix(vscode): resolve extensions from the instance's config root and keep the registered ones when it can't be resolved, so opening from another directory no longer wipes them
- 11081b9 feat(tui): persist the inbox and thread keyed notifications per instance
- f655b58 fix(vscode): label the primary workspace root by its directory name, so it matches the extra folders instead of showing the instance name
- 3975498 fix(rm): prune instead of remove a worktree a previous rm already removed, so an rm that failed later can be retried
- deb0e1a fix(config): hash folders tables that restate the default like the plain string, so moving an entry to the table form isn't drift
- c2acba2 docs(folders): document per-entry worktrees in the run design doc and changelog so the release notes explain the new default and the never opt-out
- f756796 feat(rm): remove an instance's folders worktrees too, before the primary so an interrupted rm can be retried
- 756df51 feat(run): give folders entries a detached worktree when another sandbox owns or already mounts the checkout, so its branch can't shift underneath the instance
- 435549b feat(run): record folders mounts and decide per entry who owns the live checkout, so a direct extra mount also reserves it from other instances
- 878e1e7 feat(config): accept { path, worktree } folders entries so each extra folder can opt in or out of its own worktree
- 0997d43 fix(worktree): stop migrating old per-sandbox worktree-link stores, since moving the copy left every other instance's links dangling; old links are now reported for a manual move
- 0467ffb docs(readme): lead with a theme-aware logo and a short pitch pointing at the docs site
- c8be397 fix(site): space pages that open on prose from the article divider
- b72fa8d docs(site): install skills via skills.sh in the quick start, style the agent prompt outside examples
- 78d0afd docs(site): lead the quick start with the agent, move the cli walkthrough to going further
- 61b2cdb chore(skills): hide repo-only skills from npx skills add
- e750396 fix(site): center diagram arrowheads on their lines
- 5ffe39b feat(site): pitch the CLI as low-level local tooling on the landing page, so readers see devsandbox can replace docker compose for agent-built stacks

</details>

## 0.5.0

Sandboxes can now start themselves after a reboot and run unattended **dispatcher** scripts that create, drive and clean up their own child instances. Messages from inside containers show up in the dashboard and as desktop notifications. See `docs/automations-guide.md`. `run --json`, a command-less `exec` and exact-name matching make devsandbox easier to drive from scripts and other programs, and the docs now live at [devsandboxes.com](https://devsandboxes.com).

### Added

- **`autostart`**: a sandbox's instances come up once per boot, when the dashboard opens or after your first `devsandbox run` / `start`. A sandbox with no instance yet gets one; dispatcher children are left to their dispatcher.
- **`autostart = "runtime"`**: docker and podman restart the containers themselves at boot (`--restart unless-stopped`), with no devsandbox process needed. Podman also needs `podman-restart.service` enabled. On Apple `container` it behaves like `true`. Changing `autostart` never marks an instance as drifted; the next `start` applies it in place.

```toml
[sandbox.triage]
folder = "../triage"
autostart = "runtime"   # or true
```

- **Boot hook**: new containers run `devsbd boot` on every start, which brings back the helper daemon and, in runtime mode, `postStartCommand` (output in `/run/devsandbox/boot.log`). Containers created before this need `devsandbox rebuild --force` to get it.
- **`devsbd notify`**: any sandbox can send the user a message. It is queued inside the container until a dashboard is open, then shown in the new **Inbox** tab (unread badges on instance rows, `enter` opens an `http(s)` link, `d`/`D` dismiss) and as a desktop notification (`notify-send` / `osascript`).

```bash
devsbd notify --level warn --key pr-123 --link https://github.com/o/r/pull/123 "PR 123 needs you"
```

- **Dispatchers**: a sandbox that declares `dispatcher` can manage child instances through `devsbd`, while the dashboard is open. Children are named `<sandbox>-<key>`, always get their own worktree, are marked `⇠ <dispatcher>` in the TUI, and outlive the dispatcher. Host-side operations log to `<data>/devsandbox/logs/dispatch-*.log`. Exit codes: 75 when no dashboard is connected, 77 when denied.
  - `spawn = ["*"]` means every sandbox in the config root except other dispatchers, and it grants their mounts, docker socket and privileges. Children can never be dispatchers themselves.
  - `max-instances` defaults to 10 and counts stopped children too.
  - `--branch` accepts plain branch names only (`[A-Za-z0-9._/-]`) and is used literally, with no `${…}` expansion.
  - `--env` refuses names that could take over processes in the child: `PATH`, `HOME`, `SHELL`, `LD_*`, `DYLD_*`, `GIT_*`, `NODE_OPTIONS`, `PYTHON*` and similar. Its values are kept across a `devsandbox rebuild` of the child, including when `ensure` recreates a missing container. On an existing child, `ensure --env` replaces the saved values, and every command devsandbox runs in the child (`exec`, dashboard terminals, `devsbd exec` runs, lifecycle commands) uses them from then on, over a same-named `remoteEnv`; already-running processes keep the old ones until a rebuild.

```toml
[sandbox.pr-dispatcher]
folder = "../pr-dispatcher"
autostart = "runtime"
dispatcher = { spawn = ["web"], max-instances = 10 }   # "*" = any non-dispatcher sandbox
postStartCommand = "nohup ./loop.sh >loop.log 2>&1 &"
```

```bash
devsbd ensure web --key pr-123 --branch feat/x   # create or start web-pr-123
devsbd exec pr-123 --detach -- zidane -p "babysit PR 123"
devsbd run logs pr-123 <id> --follow
devsbd ls; devsbd stop pr-123; devsbd rm pr-123
```

- **Runs**: commands started with `devsbd exec` are tracked in the child (id, log, exit status). Follow them with `devsbd run ls|logs|wait`, clean them up with `devsbd run rm` (`--force` kills a running one) and `devsbd run prune --keep N`; the TUI shows a child's last runs under its processes.
- `devsbd` is on `PATH` in containers (`/usr/local/bin/devsbd`).
- **`forwardPorts`**: while the dashboard is open it forwards each running instance's configured ports to `127.0.0.1`, the same way `devsandbox port` does (no container restart). Each instance keeps its host ports across dashboard restarts, and a port already taken moves to the next free one up. A global service's port is forwarded once, however many instances list it. In the Ports tab these rows are marked `(config)`; `d` stops one until the dashboard reopens.

```toml
[sandbox.api]
services = ["db"]
# 3000, "db:5432" as in devcontainer.json; "8080:3000" / "15432:db:5432" pick the host port
forwardPorts = [3000, "8080:3000", "db:5432"]
```

- **`run --json`**: prints one `{"schema": 1, "data": {...}}` document for the new instance (`name`, `instance_id`, `sandbox`, `container`, `workspace`, `folder`, `base_folder`, `worktree`, `branch`; the last two `null` without a worktree). Everything child processes print (image builds, `docker run`, git, lifecycle hooks, autostart) goes to stderr, so stdout parses as-is for programmatic and GUI callers.
- **`exec <name>` without a command** opens a login shell (zsh, else bash, else sh), the same one the dashboard's terminal opens. With neither `-i` nor `-t` given it runs with `-i`, plus `-t` when stdin is a TTY, so it works as is from a terminal or a pty (node-pty); explicit flags are used as given.
- **npm: `execArgv(name, cmd?, { tty, interactive })`** returns `{ file, args }` for spawning `devsandbox exec` yourself (node-pty, `child_process.spawn`) without shell quoting.
- **`rm --delete-branch` / `rm --keep-branch`** answer the "delete branch?" question without prompting, so scripts and other callers without a TTY can clean up the branch `run` created. `--delete-branch` deletes it like answering yes (`git branch -D`, so unmerged commits go too); `--keep-branch` keeps it. Branches `run` reused rather than created are always kept. With neither flag, `rm` still asks on a TTY and keeps the branch otherwise. npm: `rm(name, { deleteBranch })`, where `true` / `false` pass `--delete-branch` / `--keep-branch`.
- **Docs site at [devsandboxes.com](https://devsandboxes.com)**: a quick start, a playable tour of the dashboard, the full `config.toml` reference, the Node API reference, ten worked examples (parallel coding agents, shared and per-instance services, package caches, ssh-agent and `git push`, babysitting pull requests, porting a `devcontainer.json`, …), full-text search (⌘K / Ctrl+K) and this changelog.

### Changed

- **Worktrees reuse existing branches.** `run --branch X`, and a dispatcher's `devsbd ensure --branch X`, no longer fail when `X` exists:
  - a local `X` is checked out as it is;
  - an `X` that only exists on `origin` (a PR head, for example) becomes a local branch tracking `origin/X`, so a plain `git push` updates it;
  - a branch that's already checked out somewhere else gives an error saying where.

  `rm` only offers to delete branches devsandbox created itself.
- New containers use `sh -c '… devsbd boot & exec sleep infinity'` as their command instead of `sleep infinity`, so images need `/bin/sh`.
- `start` sets the container's restart policy from `autostart`, overwriting a policy set by hand.
- While the dashboard is open it keeps a helper connection to every running instance that has the helper, not only when an ssh-agent is being relayed.
- `devsandbox status --json` instance rows include `instance_id` and, for children, `dispatcher`.
- **`rebuild` applies `worktree-include`.** Before, adding a pattern marked instances as drifted, but the rebuild copied nothing. Now `rebuild` copies any missing matching files into the worktree; existing files are never overwritten. A copied file you delete on purpose comes back on the next rebuild, so drop the pattern instead.
- `devsandbox port 3000` (and the Ports tab) moves to 3001, 3002, … when 3000 is taken on the host, instead of a random port.
- A service `ports` entry that gives only the container port (`"5432"`) now gets the same port on the host when it's free, instead of a random one. If the port is taken, the runtime still picks one.
- **An exact instance name wins.** With instances `web` and `web-2`, `devsandbox exec web` (and `rm`, `stop`, `logs`, …) now means the instance `web` instead of an ambiguity that failed off a TTY and prompted on one, including inside a pty. An exact instance id counts too; sandbox and folder names only apply when nothing matches exactly. `exec` now uses the same resolution as the other verbs, so it also accepts an instance's id after a rename.
- **npm (breaking): `run()` resolves with the new instance's record** (`RunRecord`) instead of its name; use `(await run(...)).name` for the old value. It calls `run --json`, so build and autostart output can no longer end up as the "name".
- In the generated VS Code workspace, the main folder is labelled with its directory name (`webcontainer`) instead of the instance name (`webcontainer-sqlite`), like the extra `folders` roots. If an extra root has the same directory name, the instance name is kept. Existing instances pick this up on `rebuild --force`.

### Fixed

- **`rm` on a dirty worktree no longer leaves an instance without its container.** `rm` removed the container, volumes and services first, then `git worktree remove` refused the uncommitted or untracked changes, stranding the instance. It now checks the worktree first and refuses with the list of changes, removing nothing.
- **Keyboard chords like ctrl+m reach apps in dashboard terminals.** In terminals that support the kitty keyboard protocol (kitty, Alacritty ≥ 0.13, Ghostty, WezTerm, foot, iTerm2 ≥ 3.5), the dashboard now turns the protocol on and passes it through to apps inside its terminals that ask for it. zidane's ctrl+m, for example, no longer arrives as Enter. Shells and other apps that don't ask for it get the same keys as before. GNOME Terminal and tmux don't support the protocol, so there ctrl+m and Enter still can't be told apart.
- **The mouse wheel scrolls full-screen apps in dashboard terminals.** It used to scroll only the terminal's own scrollback, which full-screen apps don't have. Now apps that track the mouse (zidane, vim with `mouse=a`, htop) get the wheel directly, and pagers like `less` and `man` get ↑/↓. Shells still scroll their history.
- **Forwarded ports reach servers listening only on IPv6 loopback.** Dev servers told `localhost` (webpack-dev-server, Vite, Node 17+) often bind only `[::1]`, while forwards dialed `127.0.0.1`, so every connection was refused. A loopback dial now also tries the other family (`127.0.0.1` ↔ `::1`). Running instances pick up the new helper when restarted.
- **`worktree-link` works for several sandboxes on the same folder.** The shared copy used to live in one store per sandbox. The base checkout can only link to one of them, so the second sandbox's worktrees got nothing. The store is now per repo: `shared-files/<folder name>-<hash>/`, shared by every sandbox on that folder. The next `run` or `rebuild` moves files from the old `shared-files/<sandbox>/` stores and relinks the base checkout and worktrees. Instances still running on an old store need a `rebuild`. If two old stores held different copies of a file, the one the base checkout linked to wins, and the other stays where it was with a warning.
- **ssh-agent forwarding no longer breaks `run` on macOS + docker in builds without the helper** (`cargo install`). The fallback bind-mounted the Mac's launchd agent socket, which can't cross into the runtime VM, so `docker run` failed with `mkdir …/agent/<instance>.sock: file exists`. It now mounts Docker Desktop / OrbStack's `/run/host-services/ssh-auth.sock` instead. Builds that embed the helper were never affected.
- **`devsandbox port` and the Ports tab work on macOS.** Accepted connections inherited non-blocking mode from the listener there, so every relay read failed with `os error 35` and no forwarded connection got through.
- **0.4.0 never reached crates.io** (the publish step failed on the release archives in the checkout); `cargo install devsandbox` goes straight from 0.3.4 to this release.

### Security

- **Git on the host can no longer run code planted by a sandbox.** Worktree instances mount the base repo's `.git` read-write, so a container could plant hooks or command-running config (`core.fsmonitor`, `core.sshCommand`, filter drivers, `include.path`, ...) that the host's `git worktree add` / `fetch` / `worktree remove` would then run as you.
  - Every git command devsandbox runs on the host now has hooks and fsmonitor turned off.
  - It first checks the repo's local config against an allowlist. If a key could run a command, it refuses and names the key: review it and remove it. `ext::` remotes and object alternates are refused as well.
  - This affects every worktree instance, not only dispatcher children.
- The commands devsandbox runs as root inside containers (helper install, boot file, Apple `/etc/hosts` update, workspace file) use `/bin/sh` with a fixed `PATH`, so they don't depend on the container's `PATH`.
- **Limits on what a container can make the host do:**
  - at most 8 concurrent notify/control handlers per container;
  - output from host-run commands is capped and timed out (5 min for in-child commands, 30 min for dispatch operations, which are killed with their whole process group);
  - desktop popups are rate-limited per instance (3 at once, then one every 10 s), and repeats of the same key within 60 s don't pop up again;
  - the inbox keeps at most 50 entries per instance (200 overall);
  - `devsbd run ls` lists only the newest 50 runs and shortens long command lines.

<details><summary>Commits</summary>

- c0af00e feat(site): add a changelog page rendered from CHANGELOG.md
- d70eb16 fix(npm): keep execArgv names from parsing as flags, correct exec/run docs
- d5e0884 fix(rm): refuse a dirty worktree before tearing anything down, add branch flags
- 623710f feat(cli): make run, exec and name resolution usable from programs
- 88a16b9 docs(site): add a dashboard tour page that walks through each feature beside a sticky, playable mini dashboard, so readers learn the tui before installing it
- e3d2b28 feat(site): fake the command prompt, port forwards, logs, config explorer and run/stop in the mini dashboard, so the docs can teach every key hands-on
- ef295b7 docs(tui): document kitty keyboard pass-through and wheel routing for integrated terminals
- 47a6a19 docs(tui): correct the pty TERM comment, docker exec does not forward it into the container
- ba99a4f fix(tui): answer xtversion in integrated terminals, since opentui apps like zidane ignore the kitty flags reply until the terminal identifies itself
- 52d9194 fix(tui): send the mouse wheel to integrated-terminal apps that track the mouse or use the alternate screen, which has no scrollback to scroll
- fb9e02d feat(tui): send kitty-encoded keys to integrated-terminal apps that enabled the protocol, so ctrl+m no longer arrives as enter
- 95c6236 feat(tui): emulate the kitty keyboard protocol's flag stacks and queries in the integrated terminal, so apps inside can opt into it
- 0ac6963 refactor(site): extract the mini dashboard into a mountable component, so the docs can host a second one driven from outside
- dd3ad31 feat(tui): enable the kitty keyboard protocol on terminals that support it, so chords like ctrl+m can reach apps in the integrated terminal
- 721b5ab feat(site): make t open a terminal in the landing mini dashboard, split and tabbed like the real one, so the preview shows the feature it advertises
- 7ff786f fix(site): tighten the examples that need no setup and make the pr babysitter readable at a glance
- b126a11 docs(site): trim the pr babysitter example to the new example shape and give its loop a codex variant, so it works with the reader's agent
- f5cb4c1 docs(site): trim the features and devcontainer porting examples to the new example shape, keeping the porting reference tables readers come for
- a1ee4f4 docs(site): trim the port forwarding and vs code examples to the new example shape, and stop calling forwardPorts ignored now the dashboard honours it
- c0d24e9 docs(site): trim the caches and ssh push examples to the new example shape, with the agent picked by the reader on the push one
- 2b6c5ae docs(site): trim the shared and isolated services examples to the new example shape, with the agent picked by the reader on the isolated one
- 06fb312 feat(site): let readers pick their coding agent once and trim the parallel agents example, so examples read short and match the agent they use
- 0e41f55 feat(site): animate the how-it-works section and make the mini dashboard playable, so pressing o shows vs code attaching to a sandbox
- ab6d22b feat(site): how-it-works section with a host/sandboxes/agents diagram next to a mini dashboard, so visitors see how the tool is used
- 59e5404 feat(site): position the landing page as devcontainers for ai agents and drop the devcontainer comparison the audience doesn't need
- b0b5a9b fix: add github icon to link
- edda15a ci(site): move pages deploy into a dispatchable workflow that release calls, so docs-only changes can ship between releases
- 9e23dc4 ci(site): build the docs site on every pr and deploy it to pages on release, so the docs always match what users can install
- 83bd81b fix(site): load sidebar nav styles on every page, so the mobile drawer outside /docs has no bullets or stray chevrons
- 5c0961c docs(config): escape the pipes that truncated the dispatcher row and name the real service/gc commands
- 9400e75 feat(site): 404, og image, one reading order with prev/next and edit links, a link check in the build, and a warning-free build
- 874d74b feat(site): pagefind full-text search behind a ⌘k dialog, so any field, flag or example is one keystroke away
- 6dd530f feat(site): remaining examples, port forwarding, vscode, features, the pr babysit dispatcher and porting a devcontainer.json
- f140d5f feat(site): examples section with one recipe per use case and a copyable agent prompt, starting with worktrees, services, caches and ssh
- 2fc8c4b feat(site): node api reference generated from the npm package's index.d.ts, so the docs follow the published typings
- d127052 feat(site): config reference rendered from the config-toml-spec skill, so the site and the agent skill never drift
- ce29397 feat(site): quick start page, from install to a second worktree instance and the dashboard
- fc10522 feat(site): landing page that pitches devsandboxes as devcontainers multiplied, with a hero that mirrors real run/ps output
- 7454a57 feat(site): scaffold the astro docs site with the prototype's design system, so docs pages can be written against a real shell
- cd577ab feat(port): forward sandboxes' forwardPorts from the tui, keeping each instance's host ports in state so they stay the same across restarts
- 70553ce feat(services): give a bare service port the same host port when it's free, instead of letting the runtime pick a random one
- 043c1de fix(port): clear o_nonblock on accepted sockets, since macos inherits it from the listener and every relay read failed with os error 35
- a0061d2 fix(port): try the other loopback family when dialing, so dev servers bound only on ::1 (node's localhost) are reachable
- 44f357a fix(ssh-agent): mount docker's magic agent socket on macos, since the launchd socket can't cross into the vm and failed docker run
- 5607ad3 fix(worktree): keep worktree-link files in one store per repo, so several sandboxes on the same folder all get the shared files
- fb94fab feat(dispatch): ensure --env replaces a child's saved env and every exec applies it, so new values take effect without a rebuild
- 37fc704 docs(changelog): list the step 13-15 commits
- 9d7efc8 feat(dispatch): devsbd run rm and run prune, so dispatchers can clear runs instead of letting them pile up
- 2608a23 fix(autostart): never start or create dispatcher children at boot, so idle children the dispatcher parked stay stopped
- 54193b6 feat(run): keep --env values in state so rebuilds, including a dispatcher recreating a child, don't drop them
- 57237dc fix(rebuild): copy worktree-include files on rebuild so the drift a new pattern raises is actually fixed by rebuilding
- 2feb352 docs(changelog): unreleased notes for the security hardening and existing-branch worktrees
- d022e5c feat(run): reuse an existing local or origin branch for a worktree instead of refusing, so instances and dispatcher children can work on PR branches
- 36f532a fix(port): look up lsof on the container's PATH again, the --env deny-list already closes the PATH injection and the fixed PATH hid lsof in /usr/local/bin
- e5404ac fix(devsbd): cap run ls to the newest 50 runs and bounded argv/meta reads, so a container user can't make run listings unbounded
- aac1539 fix(dispatch): bound handler threads, child output and runtimes, and rate-limit desktop popups, so a container can't exhaust the host or flood the desktop
- 4c1549f fix(dispatch): deny dangerous --env names, keep children from being dispatchers, cap children at 10 by default and run host root execs with a fixed PATH, so a dispatcher can't gain root in a child or self-replicate
- 11b9f7a fix(dispatch): validate dispatcher branch names and never template-expand them, so a container can't read host env through ${localEnv:…}
- a5948da fix(run): host git runs with hooks and fsmonitor disabled and refuses repos whose local config can run commands, so a sandbox can't execute code on the host through the shared .git
- c59d627 docs(automations): plan security fixes for host git, branch values, dispatcher authz and resource limits
- f44f329 docs(changelog): unreleased notes for automations, and plan steps for the follow-up decisions
- 5c2e49a docs(automations): user guide, architecture and module map for autostart, notify and dispatchers
- b080bf1 fix(autostart): keep the boot's pass when the runtime is unreachable and pin dispatch subprocesses to the parent's backend, found auditing apple container
- 7868cb5 feat(dispatch): tracked runs in child instances (devsbd exec, run ls/logs/wait), so dispatchers can start agents and follow their outcome
- d499764 feat(dispatch): devsbd ensure/ls/stop/rm over a control channel served by the dashboard, failing fast with 75 when no host is attached
- 32a030d feat(dispatch): dispatcher config and host-side control handler that runs ops as logged subprocesses, so a sandbox can safely own child instances
- d5a1f6f feat(tui): inbox tab with per-instance unread badges, so notifications stay reviewable after the status line moves on
- cec26b4 feat(tui): serve devsbd notify streams from dashboard bridges and raise desktop notifications, so container messages reach the user
- 35f2e7c feat(devsbd): notify queues records in a durable outbox and the daemon flushes them to notify-capable hosts, so no message is lost while no host is attached
- c3ae6ce feat(devsbd): boot hook in the container command so runtime restarts bring back the helper daemon and postStartCommand without a host
- 75345d6 feat(autostart): runtime mode sets --restart unless-stopped so docker/podman bring sandboxes back on boot without devsandbox, flipped in place on start
- 9075dec feat(autostart): bring autostart sandboxes up once per boot from the tui or the first run/start, so automations survive a reboot
- 74ff407 docs(automations): step plan, with triggers, per-root boot ids and runtime-mode poststart settled
- 6bb660e docs(automations): design for autostarted sandboxes, notify and dispatcher-driven child instances
- 0442d37 fix(ci): download release archives outside the checkout so cargo publish sees a clean tree

</details>

## 0.4.0

Worktree instances can now bring along the gitignored files a repo needs to run, like `.env` files, instead of starting without them.

### Added

- **Copy gitignored files into new worktrees.** A repo's `.worktreeinclude` file is always honored, and `worktree-include` adds more patterns (gitignore syntax). Matching untracked files are copied from the base checkout into each **new** worktree and never overwrite existing files.
- **Share gitignored files across all instances.** Each `worktree-link` path is moved to one shared copy under `shared-files/<sandbox>/`, and every worktree gets a symlink to it. An edit in one instance shows up in all of them. This also works on Apple `container`, which can't bind single files. Globs work within one path segment (`*` / `?`), and a leading `./` is accepted.

```toml
[sandbox.web]
folder = "../web"
worktree-include = ["fixtures/*.local.json"]   # copied once, per worktree
worktree-link = [".env", "packages/*/.env"]    # one live copy shared by every instance
```

- A `CHANGELOG.md`, which is also used as the GitHub release notes.

### Fixed

- TUI: pressing `s` to start an instance refreshes the list shortly afterwards, so the new state appears right away.

<details><summary>Commits</summary>

- 52da316 docs(changelog): readable release notes with examples, written ahead of release via a release skill
- 9dff820 docs(changelog): backfill changelog and generate it on release so github releases carry notes
- c6925a0 feat(run): one-segment globs and leading ./ in worktree-link
- ebd7200 feat(run): carry gitignored files into worktrees via copy or shared link
- d836a5a fix(tui): when start is pressed, refresh instance list after 500ms
- 7005680 chore(ci): fix warnings reported

</details>

## 0.3.4

On-demand port forwarding, devcontainer features that need privileges or entrypoints (docker-in-docker works now), and a full `config.toml` reference.

### Added

- **`devsandbox port`**: makes a port inside an instance or one of its services reachable on the host, without publishing it when the container is created and without a restart. Forwards reconnect by themselves after the target restarts or is rebuilt. When the image has `lsof`, the command shows which process is listening. Unix hosts only.

```bash
devsandbox port api 3000                      # localhost:3000 -> api's :3000
devsandbox port api 8080:3000                 # bind host :8080 instead
devsandbox port api --service postgres 5432   # api's postgres, via the api container
devsandbox port --service redis 6379          # a global service, no instance named
```

- **TUI Ports tab**: lists active forwards; `p` adds one and `d` removes one. Quitting never hangs on a forward that is still connecting.
- **Privileged features and feature entrypoints.** A feature that declares `privileged: true` now runs the container `--privileged`, and feature entrypoints run at every container start, so features such as docker-in-docker work out of the box. `privileged` can also be set directly on a sandbox. Both are skipped with a warning on Apple `container`.

```toml
[sandbox.infra]
image = "mcr.microsoft.com/devcontainers/base:ubuntu"
[sandbox.infra.features]
"ghcr.io/devcontainers/features/docker-in-docker:2" = {}
```

- **`config-toml-spec` skill**: the complete reference for `config.toml` (every key, merge rules, `${…}` variables), written for both people and agents.

### Fixed

- `${devcontainerId}` in feature mounts resolves to the instance id. Per-instance volumes are deleted on `rm` and kept on `rebuild`.
- A sandbox mount on the same target now replaces a mount inherited from a template, instead of Docker rejecting the duplicate.
- Nested mounts are applied parent-first on every runtime, not only on Docker.

### Internal

- `run.rs` and the TUI `app.rs` are split into per-concern modules. Docker-dependent tests are now required to pass on CI.

<details><summary>Commits</summary>

- ff124fb fix: don't specify the model on the skill
- e45afbd docs: fix broken rustdoc intra-doc links
- 75e1732 refactor(tui): split app.rs into per-concern modules
- 704bbaf refactor(run): split run.rs into per-concern modules
- 155b3de fix(features): resolve ${devcontainerId} and reap per-instance volumes on rm
- 4f1512c feat(features): run feature entrypoints at container start
- 7fe0e4f feat(config): honor sandbox-level `privileged` instead of ignoring it
- feb8ec7 feat(features): honor feature `privileged` so docker-in-docker style features work
- facce5f fix(run): order mounts parent-first before handing them to the runtime, since only docker sorts nested mounts itself and that is undocumented
- c060d7c docs(skills): add a config-toml-spec skill as the full config.toml reference, so users get one accurate source and devsandbox-cli stops carrying a drifting copy
- a71ea70 fix(run): let a downstream mount on the same target replace an inherited template mount, since only feature mounts could be overridden and docker rejected the duplicate target
- aa37f71 test(ci): build the devsbd helper and run the whole workspace on ci, and gate docker/helper tests behind #[docker_test] so they skip locally but fail on ci instead of silently passing
- 2d1bb66 docs(repo): drop references to internal project names from docs and test fixtures
- e7c0d57 test(devsbd): retry the prefer-port test with a fresh port when a parallel test grabs the released one first
- 6df4d8b test(devsbd): retry the embedded helper exec on etxtbsy, since parallel tests' forks can briefly inherit the just-written binary's write fd
- 8bee843 docs(port-forwarding): document the forwarding protocol, flow control and caps routing, plus the port command and ports tab, so docs match what shipped
- fdcf7e7 feat(tui): run ports-tab forwards on a worker thread that owns them, and make forward teardown prompt so quitting never hangs on a handshake
- 5ef2538 feat(tui): add a ports tab with a port prompt and p/d shortcuts so forwards can be requested and listed from the dashboard
- cea5d40 feat(port): show which process listens on a forwarded port via lsof when the image has it
- dfe7777 feat(port): add a foreground devsandbox port command that forwards instance or service ports until ctrl-c
- f1e6783 feat(port): resolve forward routes to an instance, a service via a running instance, or the service container itself, re-evaluated on every reconnect so restarts and rebuilds heal
- 07e5a0f feat(devsbd): add the host forwarder engine that listens locally and tunnels each connection through a self-healing bridge
- 81de9a5 feat(devsbd): dial forwarded connects in the daemon and negotiate caps end to end so forwards only run against capable helpers and agent-less bridges never take ssh-agent routing
- 9328728 feat(devsbd): add per-stream credit flow control, half-close and host-initiated streams to the mux so bulk forwarded traffic can't stall other streams or the keepalive
- 2cc5523 refactor(devsbd): let mux streams be tcp as well as unix sockets so forwarded ports can reuse the stream routing
- 95a1904 feat(devsbd): add connect/window/eof/caps frames and close reasons so port forwarding can land without a protocol version bump
- c038810 docs(port-forwarding): plan on-demand port forwarding over devsbd so dev servers bound to localhost and services are reachable without recreating containers
- a7a3b7b chore(release): keep the readme's pinned download links on the released version
- dc734b1 docs(readme): recommend npm and release archives, which embed devsbd, over the limited cargo install; document the relay as the main ssh-agent path

</details>

## 0.3.3

Release pipeline only: npm packages are now published with npm trusted publishing (OIDC) instead of a long-lived token. No changes to the CLI.

<details><summary>Commits</summary>

- cff095b ci(release): publish to npm with trusted publishing instead of a long-lived token

</details>

## 0.3.2

The npm root package is renamed to **`devsandboxes`**, because npm rejected `devsandbox` as too similar to an existing package. The installed binary is still called `devsandbox`.

```bash
npm i -g devsandboxes
npx devsandboxes --help
```

<details><summary>Commits</summary>

- 53cedc3 fix(npm): rename the root package to devsandboxes since npm rejects devsandbox as too similar to dev-sandbox

</details>

## 0.3.1

The CLI is now published to npm, so a Rust toolchain is no longer needed to install it. Prebuilt binaries ship as per-platform packages (linux x64/arm64, macOS arm64, windows x64), and the package also has a typed Node API.

> The root package was renamed to `devsandboxes` in 0.3.2; install that version or later.

<details><summary>Commits</summary>

- 86df202 feat(npm): publish the cli to npm with per-platform binary packages and a typed node api, so npx devsandbox works without a rust toolchain

</details>

## 0.3.0

ssh-agent forwarding no longer needs a socket bind mount. A small static helper (`devsbd`) is embedded in the release binaries, installed into each container, and relays the host agent over `exec` stdio. This works on every runtime, including Apple `container`, and keeps working when the host agent socket changes.

### Added

- **Relayed ssh-agent forwarding** through the embedded `devsbd` helper, used by default. Relays detect wedged connections with keepalives and handshake timeouts, and restart the daemon if the container was restarted outside devsandbox. `git` over ssh works inside `postCreateCommand` and the other lifecycle commands.
- **`devsandbox vscode <name>`** attaches VS Code to an instance from the CLI, using the same launch path as the TUI's `o` key.

```bash
devsandbox vscode web
```

### Changed

- Release archives (and later the npm packages) embed the helper. `cargo install` builds don't, and fall back to the bind mount, which works only on Linux docker/podman.
- The TUI manages ssh-agent bridges on a worker thread, so the dashboard never blocks on them.

<details><summary>Commits</summary>

- 3401365 docs(readme): say release binaries embed the helper now that the release job builds it
- 0529cde fix(run): give lifecycle commands the forwarded ssh-agent so ssh git operations in setup commands work
- 45e7b2b chore(release): build and embed the devsbd helpers in release binaries, and stop excluding src/devsbd from the published crate
- afc6ddc docs(devsbd): plan the release helper job and agent access for lifecycle commands
- 8ec0e6b chore(devsbd): fail ci builds that lack the helper, keep helper-less builds incremental, and catch a stale embedded helper in tests
- 66be187 refactor(tui): own ssh-agent bridges on a worker thread so reconciling never blocks the dashboard, and back off on version mismatch
- a8071fc feat(devsbd): let the bridge start a missing daemon so containers restarted outside devsandbox keep their relay
- bc882e8 feat(devsbd): detect wedged relays with keepalive and a handshake timeout so agent requests can't hang forever
- 304bef7 feat(devsbd): leave room in the wire protocol for additive changes and bound what a container can make the host do
- 8012eb8 feat(devsbd): make the relay the default ssh-agent path so forwarding survives agent rotation and needs no socket mount
- 56e49d8 docs(devsbd): plan relay-first forwarding and the helper hardening found in review
- 7e5a8b0 feat(devsbd): relay the host ssh-agent through a helper daemon and stdio bridges so forwarding needs no socket mount
- 4d6f29d docs(agents): run workspace tests so the devsbd helper crate is checked too
- 9e89b74 feat(devsbd): add the shared host<->helper frame protocol so both sides decode one wire format
- 95ec425 feat(devsbd): install the helper on run/start so containers carry the build matching the cli
- 3681527 feat(devsbd): embed a static in-container helper so relays work on every runtime without network or file binds
- 2a522c5 docs(devsbd): plan an embedded in-container helper for host<->container relays
- 8840709 feat(vscode): add `devsandbox vscode` command to attach vs code from the cli, sharing the tui's launch path

</details>

## 0.2.4

Fixes the Windows build, which broke the 0.2.3 release: 0.2.3 has no published binaries, so this is the first release that ships its changes. Also clarifies the docs.

<details><summary>Commits</summary>

- b7449fc fix: clarify docs
- fffd63e fix: windows build

</details>

## 0.2.3

ssh-agent forwarding, worktrees that start from the remote's default branch, and process signalling from the dashboard.

> This tag never got a GitHub release (the Windows build failed); its changes shipped in 0.2.4.

### Added

- **ssh-agent forwarding.** The host `SSH_AUTH_SOCK` reaches every instance through a per-instance symlink mount, and `start` re-points it before the container starts. Forwarding therefore survives reboots and re-logins without a rebuild. `exec` sets `SSH_AUTH_SOCK` on every session. `rm` removes an instance's link and `gc` removes orphaned ones.
- **Worktrees start from the remote's default branch.** Instead of branching from whatever is checked out in the base repo, `run` fetches `origin` and branches from `origin/HEAD` (or `main`/`master`), without touching the base checkout. Use `run --base` or `worktree-base` to pick a different start point.

```toml
[sandbox.api]
folder = "../api"
worktree-base = "origin/develop"
```

- **TUI process rows can be signalled**: `t` sends SIGTERM and `K` sends SIGKILL to the selected pid. `x` closes an exited terminal where it is.

### Fixed

- Process listings use pids from the container's namespace, so signals reach the right process. Images without `ps` fall back to `docker top` and are shown as not signalable. The listing no longer includes its own `ps` process.

<details><summary>Commits</summary>

- 1c56b2f feat(run): start worktrees from a fetched origin default branch
- 5d339f3 fix(runtime): drop the self ps row from process listings
- f4a3737 feat(docker): fall back to docker top when the image lacks ps
- d6a6896 fix(docker): list container-namespace pids so signals hit the right process
- b72d8ff feat(tui): make process rows signal-only (SIGTERM/SIGKILL)
- 140977f feat(tui): close exited terminal with x in place
- 300e420 feat(gc): reap ssh-agent links; rm drops its own
- a9a8cd2 feat(start): re-point ssh-agent symlink before container start
- d28302d feat(exec): inject SSH_AUTH_SOCK on every exec
- 7255429 feat(run): forward host ssh-agent via per-instance symlink mount
- 9d77713 docs(ssh-agent): plan agent forwarding via re-pointable symlink mount

</details>

## 0.2.2

Renames no longer lose per-instance state, feature mounts are applied, and `rebuild --force` is added.

### Added

- **`rebuild --force`** recreates an instance even when no drift is detected. Use it to pick up devsandbox-side changes that the config hashes can't see.

```bash
devsandbox rebuild web --force
devsandbox rebuild --all --force
```

- **Feature-declared mounts are applied**, such as the host docker socket from docker-outside-of-docker. A sandbox mount on the same target overrides the feature's, and mounts the host can't satisfy are skipped with a warning.
- **Persistent instance ids.** Everything tied to an instance (`${instance}` mounts, worktree dir, shell history, isolated services) is keyed by an id that never changes, so renaming an instance is purely cosmetic.
- TUI prompt completion is driven by the same spec table as parsing, so every flag completes (including `rebuild --force`).

### Fixed

- Shell history survives in VS Code terminals: `HISTFILE` is pinned in the rc files, not only in the container env.
- `rename` requires the exact instance name and no longer hangs the TUI.
- Missing instances can be rebuilt from the TUI.

<details><summary>Commits</summary>

- ad8c40b fix: make sure the subagent has a model specified
- 947a512 docs(agents): note spec.rs in the tui module map
- 60676c6 feat(tui): spec-driven tab completion; rebuild --force completes
- 8fc0f0f refactor(tui): drive prompt parsing from the spec table
- b1aa1d9 feat(tui): declarative command spec table for the prompt
- 65a5377 docs(naming): drop plan- prefixes/suffixes, add tui prompt spec plan
- a12f65c feat: add a --force flag to rebuild to be able to account from devsandbox changes
- a9c8efa fix(tui): missing instances can now be rebuilt
- d85edd5 feat(state): persistent instance_id so rename never moves per-instance state
- 73d8025 feat(features): honor feature-declared mounts
- 4fa1783 fix(run): pin HISTFILE in the rc files, not just container env
- 8d62bbd fix(rename): require exact instance name and never write stdout in the tui
- f9db061 refactor(features): drop unused cache_dir method
- d0ff413 chore(cargo): exclude release.sh, .agents, .github from crate

</details>

## 0.2.1

Packaging only: the crate gains a description and the MIT license so it can be published on crates.io, and docs are excluded from it.

```bash
cargo install devsandbox
```

<details><summary>Commits</summary>

- 9c03b41 chore(cargo): add description, mit license, exclude docs from crate

</details>

## 0.2.0

Instance lifecycle commands (`start`, `stop`, `rebuild`, `rename`), an integrated terminal in the dashboard, JSON output for scripts, drift detection for dockerfiles and services, and Apple `container` support.

### Added

- **Separate lifecycle verbs.** `run` always creates a fresh instance. `start` / `stop` resume and suspend existing ones (`--all` for every instance), and `rebuild` (alias `recreate`) applies config changes in place while keeping the worktree, branch and per-instance state.

```bash
devsandbox run web --branch me/login-fix
devsandbox stop --all
devsandbox start web
devsandbox rebuild --all        # recreate every drifted instance
```

- **Integrated terminal in the TUI**: `t` opens a shell in the selected instance (zsh when available, otherwise bash) in its workspace folder. Terminals open as tabs; `[`/`]` cycle between them, `x` closes one, `ctrl-]`/`F12` leaves the terminal, and mouse scrollback works.
- **Machine-readable output.** `status --json` prints the full dashboard snapshot in a versioned envelope, and `ps`, `ls`, `stats`, `inspect` accept `--json` (contract in `docs/json-output.md`).

```bash
devsandbox status --json | jq '.data'
devsandbox ps --json
```

- **Service drift and rebuild.** Editing a dockerfile now counts as drift, for sandboxes and services alike. `service rebuild <name>` recreates a service and rewires running sandboxes without restarting them, and `service ls` lists services like `ls` lists sandboxes. Drifted services are marked in the TUI and can be rebuilt from there.

```bash
devsandbox service ls
devsandbox service rebuild postgres
```

- **`rename`** (CLI and `r` in the TUI), plus **`logs`**, **`inspect`**, **`stats`** subcommands that work the same on every runtime.
- **`shell-rc`**: host shell snippets sourced by the container's `~/.zshrc`/`~/.bashrc`.

```toml
[template.base]
shell-rc = ["rc/aliases.sh"]
```

- **Configurable worktree branch** via `worktree-branch` (supports `${instance}`) or `run --branch`.
- **Apple `container`** is supported as a runtime.
- TUI: coding-agent processes are highlighted in the process tree, and the detail panel shows an agent count.
- A `devsandbox-cli` skill that teaches coding agents to drive the CLI.

### Fixed

- Worktrees are created under the config dir instead of the base repo, and a branch name that already exists is rejected with a clear error.
- The base folder is reused correctly once its direct-mount instance is removed.

<details><summary>Commits</summary>

- 7c5beb0 ci: release on crates.io
- 5bd48a2 docs: document build-hash drift, service rebuild and service ls
- 781f636 feat(tui): surface service drift and rebuild services from the dashboard
- f1bf8b4 feat(services): service ls mirroring ls, sharing the tui's row builder
- e45c31e feat(services): rebuild a service without restarting its sandboxes
- 536dc85 feat(config): hash dockerfile contents so edits register as drift
- 736dfea feat(tui): probe zsh before bash for integrated terminal
- c08fc3d feat(rename): rename instances via r in the tui and a cli verb
- 08cae4e feat: add shell-rc
- 1e3de35 feat: set integrated terminal cwd for workspaces
- 7d6afef docs(json): document the json output contract
- dd7da88 feat(json): --json output for ps, ls, stats, inspect
- 1274c13 feat(status): machine-readable snapshot via status --json
- 5647ba3 refactor(snapshot): extract snapshot collection from tui
- 27dd37e docs(json): plan for machine-readable output
- 9e8386f chore: add support for apple container as fallback
- 33b65e1 docs: commit implemented plan
- e1d0c0e fix(tui): help bar shows t term and the real s verb
- 1781881 feat(tui): wire the terminal into the event loop and mouse
- c5587cf feat(tui): render the integrated terminal panel
- 904856e feat(tui): terminal tabs, focus model and key routing
- f86f54a feat(prompt): flag and branch-value completion for run
- b78ae47 feat(tui): pty session core for the integrated terminal
- 144130c docs(agents): record the conventional-commit format
- 0cb8abb feat(rebuild): add --all for batch drift fixes
- 6777b44 docs(skill): run never reuses an instance
- cdf458f Point drift docs at rebuild instead of rm + run
- 58e1d07 TUI: s on a stopped drifted instance rebuilds instead of bare-starting
- 7e7e3c0 Add rebuild (alias: recreate) to fix config drift in place
- 635ed25 Extract materialize() from run()
- cb9c929 fix: bug with base folder never reused
- 05194eb feat: separate instance lifecycle: run creates, start/stop restart
- f670ac6 Reject a worktree branch that already exists
- ac72c27 Make worktree branch name configurable
- d2678a8 Fix worktree created under base repo instead of config dir
- 44d8c48 cli: add logs, inspect, and stats subcommands
- a3fca98 feat: add skills/devsandbox-cli/SKILL.md skill to teach an agent how to use the tool
- 49facee tui: show on-demand agent count in the instance Detail panel
- 4cc7764 tui: highlight coding-agent processes blue in the process forest
- 04aaf9e docs: add README.md

</details>

## 0.1.1

First release. devsandbox runs devcontainer-style sandboxes directly on docker/podman from one `config.toml`, with no devcontainer CLI and no daemon.

### Highlights

- **devcontainer semantics in TOML.** Sandboxes use devcontainer property names (`image`, `build`, `mounts`, `containerEnv`, `remoteUser`, the lifecycle commands, VS Code extensions…). Unknown keys are a hard error. `extends` composes reusable templates: tables merge, arrays concatenate.
- **Native devcontainer features.** Features are fetched from their OCI registry and baked into a derived image, without the devcontainer CLI.
- **Concurrent instances of one repo.** A second `run` of the same folder gets its own git worktree and branch, so instances never share a checkout. Instance names are deterministic (`web`, `web-2`, …).
- **Services.** Sidecar containers are reachable by name. `scope = "isolated"` (the default) gives each instance its own copy; `scope = "global"` shares one per project. `gc` removes the ones no instance uses.
- **Shared caches and state.** `caches` shares package caches across instances, `persist-shell-history` keeps a per-instance history, and `${sharedVolumes}` / `${instance}` place other state per instance.
- **Config drift detection.** Each container records a hash of its merged config, so an edited config shows up as drift.
- **VS Code.** Attach to an instance as a named workspace, with extra roots from `folders` and `remoteUser` honored.
- **TUI dashboard** (run `devsandbox` with no arguments): a tree of sandboxes and instances with live CPU/memory, a process tree for each instance, a services view, a config explorer (original vs resolved, next to `docker inspect`), logs, and a `:` command prompt with history and completion.
- Static release builds for Linux (musl), macOS and Windows.

```toml
[services.postgres]
image = "postgres:16"

[template.base]
caches = ["pnpm", "cargo"]
persist-shell-history = true
[template.base.features]
"ghcr.io/devcontainers/features/node:1" = { version = "lts" }

[sandbox.web]
extends = "base"
folder = "../web"
image = "mcr.microsoft.com/devcontainers/base:ubuntu"
services = ["postgres"]
postCreateCommand = "pnpm install"
folders = { "/workspaces/shared-lib" = "../shared-lib" }
```

```bash
devsandbox run web             # first instance mounts ../web directly
devsandbox run web             # second instance: web-2, on its own worktree
devsandbox exec -it web-2 zsh
devsandbox rm web-2
```

<details><summary>Commits</summary>

- afb786a fix: remove unused file
- 362f295 gc: reap orphaned shell-history files
- b834316 rm: keep the managed shell-history file
- 415763a fix: now using devsandboxes, this file is no longer needed :tada:
- 020ff66 feat: ${sharedVolumes} and ${instance} mount variables
- 342e928 feat: open sandboxes as named VS Code workspaces via a folders property
- 377c54b fix(test): add connection timeout
- 00eaf4d fix: pin the rust version to the container version
- 4114307 feat: flag sandboxes with no image or build in the dashboard
- 9831fc8 feat: validate config entries in the dashboard and log run errors
- 392d028 docs: switch example sandboxes to native features
- a134871 run: bake devcontainer features into a derived image
- e326c19 features: fetch OCI feature artifacts natively
- cf318d4 config: type the devcontainer features property
- 1b2a410 docs: plan for native devcontainer features support
- 9260620 fix: failing test on local
- a4861d7 Add CI workflow to catch build/test breakage before release tags
- f90232f chore: fix CI release logic
- 155e30b agents: orchestrator and implementer skills
- fab60a2 docs: add the first plans
- f70d803 feat: add basic support for macOS
- ccc958f tui: split accent purple from selection green
- a225787 tui: config modal splits into config | docker inspect panes
- 3569eff tui: process forest under expanded instances
- f259245 stop: first-class command distinct from rm
- f50ec78 vscode attach: honor remoteUser in the name config
- 6b88849 tui: one-key run prefill and VS Code attach from the tree
- 303cae6 tui: instances tab as a sandbox tree
- 7bc7e89 tui: drop plan-step references from UI text and comments
- 6e6b1d3 tui: help overlay, instance logs, header totals, staleness marker
- 5da536e tui: command prompt with history and tab completion
- 012860a tui: config explorer modal with original vs resolved toggle
- 59d3139 tui: services view joined from config, state and docker
- 5b4f6fa tui: live instances view with background docker collection
- 7b48117 tui: dashboard scaffold behind bare invocation
- 6201081 ls: readable table with colors and an empty-state message
- 19acc23 Recursive/list extends, remote+container user, init, workspace vars, caches
- 7469421 Add managed per-instance shell history
- f80ee7c Implement mounts, additive merge, and global/isolated services
- 0a0df68 services: shared per-project network + service containers, add gc
- e415d9a run: deterministic naming, reuse, worktrees, config-hash drift; add rm
- 8f56f9c Add release CI: static builds for linux (musl), macos, windows on version bump
- a1ee668 Type sandbox config to the devcontainer schema and expand runtime support
- 722fe21 Add runtime basics: run, ps, exec, host-side state store
- cad57f9 Add config core: TOML model, extends deep merge, ls command
- 1fd3f93 initial commit

</details>