@crvouga/homelab 0.23.13 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/aube-lock.yaml +73 -297
  2. package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/package.json +1 -1
  3. package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/aube-lock.yaml +42 -42
  4. package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/package.json +1 -1
  5. package/README.md +54 -76
  6. package/ansible/ubuntu/agent-tool.py +106 -1
  7. package/ansible/ubuntu/heavy.py +142 -0
  8. package/ansible/ubuntu/idle-reboot.py +125 -0
  9. package/ansible/ubuntu/policy.json +58 -3
  10. package/ansible/ubuntu/t3-desktop.yml +7 -0
  11. package/ansible/ubuntu/t3-hang-snapshot.sh +75 -0
  12. package/ansible/ubuntu/t3-headless.yml +7 -0
  13. package/ansible/ubuntu/t3-health.sh +71 -3
  14. package/ansible/ubuntu/t3-policy.yml +14 -5
  15. package/ansible/ubuntu/tasks/packages.yml +2 -0
  16. package/ansible/ubuntu/tasks/recovery.yml +16 -2
  17. package/ansible/ubuntu/tasks/resources.yml +25 -2
  18. package/ansible/ubuntu/tasks/unattended-upgrades.yml +24 -6
  19. package/ansible/ubuntu/tasks/updates.yml +59 -0
  20. package/ansible/ubuntu/wip-guard.py +141 -14
  21. package/bootstrap/doctor.ts +0 -4
  22. package/bootstrap/project-action.sh +4 -5
  23. package/bootstrap/shell-path.ts +17 -19
  24. package/cliproxy/README.md +5 -6
  25. package/cliproxy/config.template.yaml +1 -15
  26. package/cliproxy/docs/health-workflow.example.yml +6 -6
  27. package/cliproxy/docs/model-health.md +8 -8
  28. package/cliproxy/scripts/accounts.py +3 -4
  29. package/cliproxy/scripts/fleet_sync.py +2 -13
  30. package/cliproxy/scripts/ops +3 -21
  31. package/docs/authentication.md +21 -26
  32. package/docs/convergence.md +28 -32
  33. package/docs/declared.md +30 -31
  34. package/docs/durability.md +9 -0
  35. package/docs/github.md +0 -9
  36. package/docs/machine-setup.md +16 -17
  37. package/docs/manager-recovery.md +0 -2
  38. package/docs/operations.md +12 -11
  39. package/docs/releasing.md +18 -21
  40. package/docs/runbooks.md +22 -78
  41. package/docs/support-matrix.md +1 -1
  42. package/docs/ubuntu-sync.md +71 -65
  43. package/docs/worker-contract.md +112 -15
  44. package/examples/fleet.json +0 -1
  45. package/llms.txt +0 -2
  46. package/mise.lock +206 -780
  47. package/mise.toml +12 -27
  48. package/package.json +5 -6
  49. package/schema/check-ids.json +41 -482
  50. package/schema/fleet.schema.json +6 -57
  51. package/schema/roster.schema.json +0 -2
  52. package/src/agent-session-limit.ts +2 -7
  53. package/src/auth-checks.ts +1 -3
  54. package/src/check-owners.ts +0 -13
  55. package/src/check-registry.ts +13 -72
  56. package/src/cli/agent-guide.ts +3 -16
  57. package/src/cli/command-index.ts +0 -12
  58. package/src/cli/fleet-sync-manager.ts +4 -146
  59. package/src/cli/fleet-sync-output.ts +1 -4
  60. package/src/cli/fleet-sync-plan.ts +1 -24
  61. package/src/cli/fleet-sync-remote.ts +2 -1
  62. package/src/cli/fleet-sync-vault.ts +1 -2
  63. package/src/cli/fleet-sync.ts +8 -44
  64. package/src/cli/fleet.ts +1 -2
  65. package/src/cli/program.ts +3 -14
  66. package/src/cli/register-fleet.ts +1 -55
  67. package/src/cli/registry.ts +1 -43
  68. package/src/config.ts +0 -2
  69. package/src/definition.ts +8 -83
  70. package/src/fleet-config.ts +1 -1
  71. package/src/ide/definition.ts +2 -29
  72. package/src/ide/super.ts +4 -35
  73. package/src/ide/t3.ts +9 -38
  74. package/src/manager-sync.ts +1 -1
  75. package/src/node-converge-linux.ts +4 -47
  76. package/src/node-converge-shared.ts +1 -22
  77. package/src/{agents/toolchain.ts → pinned-path.ts} +0 -17
  78. package/src/platform/agent-oom-check.ts +104 -0
  79. package/src/platform/t3-policy.ts +23 -36
  80. package/src/platform/t3-service.ts +117 -0
  81. package/src/platform/wip-guard-check.ts +65 -0
  82. package/src/remote-entry.ts +2 -41
  83. package/src/repair-catalog.ts +0 -30
  84. package/src/schedule-check.ts +17 -4
  85. package/src/service-auth.ts +0 -50
  86. package/src/state/litestream.ts +1 -1
  87. package/src/t3/retire-providers.ts +79 -0
  88. package/src/t3/version.ts +1 -1
  89. package/src/transport.ts +2 -6
  90. package/src/types.ts +0 -2
  91. package/src/version-parity.ts +0 -8
  92. package/src/worker-access-checks.ts +0 -75
  93. package/src/worker-host-checks.ts +78 -1
  94. package/src/worker-policy.ts +0 -2
  95. package/src/worker-readiness.ts +2 -0
  96. package/src/worker-sizing.ts +25 -0
  97. package/.mise/locks/azure-cli/2.93.0~a837e014/pyproject.toml +0 -5
  98. package/.mise/locks/azure-cli/2.93.0~a837e014/uv.lock +0 -2841
  99. package/.mise/locks/gemini/0.71.1~84aac8e6/aube-lock.yaml +0 -124
  100. package/.mise/locks/gemini/0.71.1~84aac8e6/package.json +0 -12
  101. package/agents/antigravity-proxy.ts +0 -3
  102. package/agents/audit.md +0 -88
  103. package/agents/bin/agy +0 -10
  104. package/agents/bin/antigravity +0 -10
  105. package/agents/bin/claude +0 -10
  106. package/agents/bin/codex +0 -10
  107. package/agents/bin/grok +0 -10
  108. package/agents/bin/opencode +0 -10
  109. package/agents/claude-proxy +0 -5
  110. package/agents/claude-proxy.ts +0 -3
  111. package/agents/codex-proxy.ts +0 -3
  112. package/agents/grok-proxy.ts +0 -3
  113. package/agents/managed-proxy.ts +0 -109
  114. package/agents/opencode-proxy.ts +0 -3
  115. package/agents/registry.json +0 -209
  116. package/agents/registry.schema.json +0 -149
  117. package/agents/setup.md +0 -158
  118. package/agents/t3.json +0 -40
  119. package/ansible/agents/agents.yml +0 -135
  120. package/ansible/agents/commands.yml +0 -32
  121. package/ansible/agents/receipts.yml +0 -19
  122. package/ansible/agents/templates/antigravity.settings.json.j2 +0 -3
  123. package/ansible/agents/templates/claude.settings.json.j2 +0 -3
  124. package/ansible/agents/templates/codex.config.toml.j2 +0 -11
  125. package/ansible/agents/templates/gemini.settings.json.j2 +0 -14
  126. package/ansible/agents/templates/grok.config.toml.j2 +0 -25
  127. package/ansible/agents/templates/opencode.json.j2 +0 -24
  128. package/ansible/agents/templates/receipt.json.j2 +0 -10
  129. package/ansible/t3/provider-keys.yml +0 -24
  130. package/docs/accounts.md +0 -256
  131. package/src/accounts/checks.ts +0 -226
  132. package/src/accounts/context.ts +0 -77
  133. package/src/accounts/propagate.ts +0 -62
  134. package/src/accounts/roster.ts +0 -112
  135. package/src/accounts/selection.ts +0 -67
  136. package/src/accounts/sessions.ts +0 -354
  137. package/src/agents/account-relay.ts +0 -279
  138. package/src/agents/accounts.ts +0 -94
  139. package/src/agents/admission.ts +0 -65
  140. package/src/agents/audit.ts +0 -77
  141. package/src/agents/cli.ts +0 -13
  142. package/src/agents/command.ts +0 -257
  143. package/src/agents/commands.ts +0 -127
  144. package/src/agents/converge.ts +0 -339
  145. package/src/agents/doctor.ts +0 -107
  146. package/src/agents/errors.ts +0 -2
  147. package/src/agents/files.ts +0 -43
  148. package/src/agents/fleet-verify.ts +0 -195
  149. package/src/agents/launch.ts +0 -361
  150. package/src/agents/native-verify.ts +0 -738
  151. package/src/agents/provider-errors.ts +0 -57
  152. package/src/agents/registry.ts +0 -61
  153. package/src/agents/render.ts +0 -121
  154. package/src/agents/round-trip.ts +0 -192
  155. package/src/agents/secrets.ts +0 -48
  156. package/src/agents/verify-cache.ts +0 -164
  157. package/src/agents/verify.ts +0 -129
  158. package/src/cli/fleet-accounts.ts +0 -294
  159. package/src/cli/fleet-sync-accounts.ts +0 -62
  160. package/src/cli/node-deployment.ts +0 -34
  161. package/src/cli/node-sync.ts +0 -121
  162. package/src/cli/node-t3.ts +0 -35
  163. package/src/cli/t3/command.ts +0 -91
  164. package/src/cli/t3/register.ts +0 -56
  165. package/src/configure.ts +0 -271
  166. package/src/github/copilot.ts +0 -54
  167. package/src/t3/accounts.ts +0 -90
  168. package/src/t3/antigravity.ts +0 -93
  169. package/src/t3/desired.ts +0 -174
  170. package/src/t3/diagnostics.ts +0 -42
  171. package/src/t3/models.ts +0 -354
  172. package/src/t3/names-check.ts +0 -53
  173. package/src/t3/names.ts +0 -155
  174. package/src/t3/plan.ts +0 -106
  175. package/src/t3/provider-keys.ts +0 -49
  176. package/src/t3/providers.ts +0 -102
  177. package/src/t3/reconcile.ts +0 -133
@@ -2,6 +2,6 @@
2
2
  "name": "mise-npm-install",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "vercel": "68.0.0"
5
+ "vercel": "68.2.0"
6
6
  }
7
7
  }
@@ -9,8 +9,8 @@ importers:
9
9
  .:
10
10
  dependencies:
11
11
  wrangler:
12
- specifier: 4.169.0
13
- version: 4.169.0(@types/node@18.19.130)
12
+ specifier: 4.170.0
13
+ version: 4.170.0(@types/node@18.19.130)
14
14
 
15
15
  packages:
16
16
 
@@ -27,38 +27,38 @@ packages:
27
27
  workerd:
28
28
  optional: true
29
29
 
30
- '@cloudflare/workerd-darwin-64@1.20261127.1':
31
- resolution: {integrity: sha512-7kDdqYmmWX8S/P9pE6ae9BFU807UjivLqtF2dzUGXIQVYEenY+S8zQcKtaRm9wzhkmq8ZYyIjm0XYW5SEc8kMg==}
30
+ '@cloudflare/workerd-darwin-64@1.20261129.1':
31
+ resolution: {integrity: sha512-3CBFQhU+hPjGUEVuBydhVIlV1vpFG2BR9Xv62LbgIL/DzY8F6oLgA+2iRzN49OZCyUbHFa7WEv766KcL2Amfrg==}
32
32
  engines: {node: '>=16'}
33
33
  cpu: [x64]
34
34
  os: [darwin]
35
35
 
36
- '@cloudflare/workerd-darwin-arm64@1.20261127.1':
37
- resolution: {integrity: sha512-mSgMwlIlMsfLfzWTUi3ngrahDb8P+TKTbtic4nvEJOnnYM1KtZNf8EfYQHtB2GVoXau79uK0UEdS+kAN0WItAg==}
36
+ '@cloudflare/workerd-darwin-arm64@1.20261129.1':
37
+ resolution: {integrity: sha512-8Jj+pF2yLP9iYEXAtioO6F8S+D9Vn1u/7VDcGxELMxg299cN37xS0JG10mmOTGQbsmabRAV/aKuYwApLufogNA==}
38
38
  engines: {node: '>=16'}
39
39
  cpu: [arm64]
40
40
  os: [darwin]
41
41
 
42
- '@cloudflare/workerd-linux-64@1.20261127.1':
43
- resolution: {integrity: sha512-/7c3pJfyn9tg38nXEzLqdZPTwWolhlVOVyBv85FoWSmMPC23eQsFunRQAgsWi1Os/h1a6n3505MAChgqYrpq7w==}
42
+ '@cloudflare/workerd-linux-64@1.20261129.1':
43
+ resolution: {integrity: sha512-MDIGDtM+yOV95KNN48GcGbOTl9+ngWVr2J32T09Ou88fdhL4S+vDTAiVMOZsK+ipZWprtBW+crcU7ek2MpXkyQ==}
44
44
  engines: {node: '>=16'}
45
45
  cpu: [x64]
46
46
  os: [linux]
47
47
 
48
- '@cloudflare/workerd-linux-arm64@1.20261127.1':
49
- resolution: {integrity: sha512-x/MJ8Vd+Q9VamNtj3pFRJZdZc9r3HcSqOpU6XfhcOTFuQEpA9t/0/DWdP27NrzxKNdHV5139XYxUw+x/oGY/Kw==}
48
+ '@cloudflare/workerd-linux-arm64@1.20261129.1':
49
+ resolution: {integrity: sha512-0U7jPlNHfiAaeD2TROHzzZZUYwSX4SJTu5SA/A89jqlqhBY4raZBlRf1IzQwfYvQwKzmtlvju2ZjguvapwsFqg==}
50
50
  engines: {node: '>=16'}
51
51
  cpu: [arm64]
52
52
  os: [linux]
53
53
 
54
- '@cloudflare/workerd-windows-64@1.20261127.1':
55
- resolution: {integrity: sha512-ebko9XaZy6iqDHLr4WH2dC01Hf8L8xQe2GxBwqdsUfAmhMPGbnk33GtvR5FFaae+CPCPiU/H2TY1WeJ8cNSKdQ==}
54
+ '@cloudflare/workerd-windows-64@1.20261129.1':
55
+ resolution: {integrity: sha512-Wzli8yhmD7Hj16hCDrwBTfF5L0xt2B/yr09UJFRYs32IVx0gmOYd8d9EhHQ9S4DODAQBKUnMWdZipdqZWK/k0g==}
56
56
  engines: {node: '>=16'}
57
57
  cpu: [x64]
58
58
  os: [win32]
59
59
 
60
- '@cloudflare/workers-utils@0.58.0':
61
- resolution: {integrity: sha512-Mib8I2ijrBIm7mEykEYq369kOHtJvHIwhUh4n6w+RSuOL8LeXCHRXTKt8luE8irRM9d35kYlG+crDKjE7PQj6g==}
60
+ '@cloudflare/workers-utils@0.60.0':
61
+ resolution: {integrity: sha512-E7AmXbkvFNjFiqc/6JctU/Y8pacsAEnc/AzMMWrJfYJz61SGgzp9Q0sk06KGJFrWxifIL5afA0hRnN+1RSNB0Q==}
62
62
  peerDependencies:
63
63
  vitest: ^4.1.0 || ^5.0.0
64
64
  peerDependenciesMeta:
@@ -567,8 +567,8 @@ packages:
567
567
  resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
568
568
  engines: {node: '>= 0.6'}
569
569
 
570
- miniflare@5.20261127.0-beta:
571
- resolution: {integrity: sha512-Q1i2itrbIALM7mScS//+oLSUJVdmG8UFK74VkHWpU+/Gg8h+1ZCySHAvyXvehNBMdSMKoPSnhgv9WAnzz0EYeQ==}
570
+ miniflare@5.20261129.0-beta:
571
+ resolution: {integrity: sha512-JMvkB+pBXW1pK0FTF4yANLhLfCv0TdwoXeOAkkw/EaQ9+qzJAO5jnEuXFj9lDeBcXXr/5oYkMNHNyOpgxt03Sg==}
572
572
  engines: {node: '>=22.12.0'}
573
573
  peerDependencies:
574
574
  kerberos: ^2.0.0
@@ -643,17 +643,17 @@ packages:
643
643
  whatwg-url@5.0.0:
644
644
  resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
645
645
 
646
- workerd@1.20261127.1:
647
- resolution: {integrity: sha512-0iiH4PRpbGnXCh9MWYczOWciw6d0ddFZ1W/I/W8qCRS2oZSNv6swptZ/n1U5pJRyrYaO9Eh6oo3Kc7+iPix4hg==}
646
+ workerd@1.20261129.1:
647
+ resolution: {integrity: sha512-ASqCkTnd53qhWVKaqkPHOS/KbzaO8ps58nMuvRxfKsQOaXvzf0ncoyCdODEW+ond8tUHArF8Y9h2zfYqXcm8jw==}
648
648
  engines: {node: '>=16'}
649
649
  hasBin: true
650
650
 
651
- wrangler@4.169.0:
652
- resolution: {integrity: sha512-xzbNeNBbfUn2Y9KLGQ+no60g8xr+2pwckSLAAPFg1pzgBqDUVYvkBs3GImhQVqkW6rq4pX+T8UdApTFZ/yIMPQ==}
651
+ wrangler@4.170.0:
652
+ resolution: {integrity: sha512-QKVXAFNHDCMj140jQ/+HDb3VJ7bjHiE2AGUxg+RZdxUZJsW+vgRYNYOZzSQ5Wn5nZAqR6iHvhhovYL6N1D20zA==}
653
653
  engines: {node: '>=22.12.0'}
654
654
  hasBin: true
655
655
  peerDependencies:
656
- '@cloudflare/workers-types': ^5.20261127.1
656
+ '@cloudflare/workers-types': ^5.20261129.1
657
657
  peerDependenciesMeta:
658
658
  '@cloudflare/workers-types':
659
659
  optional: true
@@ -680,28 +680,28 @@ snapshots:
680
680
 
681
681
  '@cloudflare/kv-asset-handler@0.5.1': {}
682
682
 
683
- '@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261127.1)':
683
+ '@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261129.1)':
684
684
  dependencies:
685
685
  unenv: 2.0.0-rc.24
686
686
  optionalDependencies:
687
- workerd: 1.20261127.1
687
+ workerd: 1.20261129.1
688
688
 
689
- '@cloudflare/workerd-darwin-64@1.20261127.1':
689
+ '@cloudflare/workerd-darwin-64@1.20261129.1':
690
690
  optional: true
691
691
 
692
- '@cloudflare/workerd-darwin-arm64@1.20261127.1':
692
+ '@cloudflare/workerd-darwin-arm64@1.20261129.1':
693
693
  optional: true
694
694
 
695
- '@cloudflare/workerd-linux-64@1.20261127.1':
695
+ '@cloudflare/workerd-linux-64@1.20261129.1':
696
696
  optional: true
697
697
 
698
- '@cloudflare/workerd-linux-arm64@1.20261127.1':
698
+ '@cloudflare/workerd-linux-arm64@1.20261129.1':
699
699
  optional: true
700
700
 
701
- '@cloudflare/workerd-windows-64@1.20261127.1':
701
+ '@cloudflare/workerd-windows-64@1.20261129.1':
702
702
  optional: true
703
703
 
704
- '@cloudflare/workers-utils@0.58.0':
704
+ '@cloudflare/workers-utils@0.60.0':
705
705
  dependencies:
706
706
  '@cspotcode/source-map-support': 0.8.1
707
707
  chalk: 5.3.0
@@ -1102,12 +1102,12 @@ snapshots:
1102
1102
  dependencies:
1103
1103
  mime-db: 1.52.0
1104
1104
 
1105
- miniflare@5.20261127.0-beta(@types/node@18.19.130):
1105
+ miniflare@5.20261129.0-beta(@types/node@18.19.130):
1106
1106
  dependencies:
1107
1107
  '@cspotcode/source-map-support': 0.8.1
1108
1108
  sharp: 0.35.5(@types/node@18.19.130)
1109
1109
  undici: 7.30.2
1110
- workerd: 1.20261127.1
1110
+ workerd: 1.20261129.1
1111
1111
  ws: 8.21.0
1112
1112
  youch: 4.1.0-beta.10
1113
1113
  transitivePeerDependencies:
@@ -1186,29 +1186,29 @@ snapshots:
1186
1186
  tr46: 0.0.3
1187
1187
  webidl-conversions: 3.0.1
1188
1188
 
1189
- workerd@1.20261127.1:
1189
+ workerd@1.20261129.1:
1190
1190
  optionalDependencies:
1191
- '@cloudflare/workerd-darwin-64': 1.20261127.1
1192
- '@cloudflare/workerd-darwin-arm64': 1.20261127.1
1193
- '@cloudflare/workerd-linux-64': 1.20261127.1
1194
- '@cloudflare/workerd-linux-arm64': 1.20261127.1
1195
- '@cloudflare/workerd-windows-64': 1.20261127.1
1191
+ '@cloudflare/workerd-darwin-64': 1.20261129.1
1192
+ '@cloudflare/workerd-darwin-arm64': 1.20261129.1
1193
+ '@cloudflare/workerd-linux-64': 1.20261129.1
1194
+ '@cloudflare/workerd-linux-arm64': 1.20261129.1
1195
+ '@cloudflare/workerd-windows-64': 1.20261129.1
1196
1196
 
1197
- wrangler@4.169.0(@types/node@18.19.130):
1197
+ wrangler@4.170.0(@types/node@18.19.130):
1198
1198
  dependencies:
1199
1199
  '@cloudflare/kv-asset-handler': 0.5.1
1200
- '@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261127.1)
1201
- '@cloudflare/workers-utils': 0.58.0
1200
+ '@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261129.1)
1201
+ '@cloudflare/workers-utils': 0.60.0
1202
1202
  '@cspotcode/source-map-support': 0.8.1
1203
1203
  '@types/yargs': 17.0.24
1204
1204
  cloudflare: 5.2.0
1205
1205
  devtools-protocol: 0.0.1182435
1206
1206
  esbuild: 0.28.2
1207
- miniflare: 5.20261127.0-beta(@types/node@18.19.130)
1207
+ miniflare: 5.20261129.0-beta(@types/node@18.19.130)
1208
1208
  path-to-regexp: 6.3.0
1209
1209
  undici: 7.30.2
1210
1210
  unenv: 2.0.0-rc.24
1211
- workerd: 1.20261127.1
1211
+ workerd: 1.20261129.1
1212
1212
  optionalDependencies:
1213
1213
  fsevents: 2.3.3
1214
1214
  transitivePeerDependencies:
@@ -2,6 +2,6 @@
2
2
  "name": "mise-npm-install",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "wrangler": "4.169.0"
5
+ "wrangler": "4.170.0"
6
6
  }
7
7
  }
package/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  Keeps a set of development machines in sync: one **manager** and many
4
4
  **workers**. One command, `converge`, brings every machine to the same
5
- pinned tools, the same coding agents signed in through one proxy, the same
6
- uptime policy and the same monitoring. Adding or removing a machine is one
5
+ pinned tools, the same uptime policy and the same monitoring. Adding or removing a machine is one
7
6
  entry in `fleet.json`.
8
7
 
9
8
  Status: extracted from a working three-machine fleet and in daily use there.
@@ -49,9 +48,10 @@ homelab is opinionated. These are part of it, not options:
49
48
  happens to it.
50
49
  - The fleet state is kept in an **S3-compatible bucket** you own.
51
50
  - Machines reach each other over **Tailscale**.
52
- - Coding agents (Claude Code, Codex, Grok, OpenCode, Antigravity) run through
53
- **CLIProxyAPI** on the manager, and **T3 Code** lists one provider per
54
- account signed in on the proxy.
51
+ - Coding agents are not homelab's. **T3 Code** installs, updates and signs in
52
+ each one on the machine it runs on; homelab pins and updates only T3 itself.
53
+ **CLIProxyAPI** on the manager only gathers the usage of the provider
54
+ accounts you add to it: no machine signs in through it.
55
55
  - Machine policy is **Ansible** (`ansible/`), tool versions are **mise** pins
56
56
  (`mise.toml`, `mise.lock`), monitoring is **Beszel**.
57
57
 
@@ -289,21 +289,14 @@ project, and which state is not in the bucket yet.
289
289
 
290
290
  ## Provider accounts
291
291
 
292
- Provider accounts live only on the CLI proxy. `npx @crvouga/homelab accounts`
293
- lists them with their state; `--add`, `--relogin` and `--remove` change one
294
- and propagate the result to every node, and `converge --only accounts`
295
- propagates them without a full sync.
296
- [docs/accounts.md](docs/accounts.md) explains how.
297
-
298
- A worker holds no provider sign-in of its own. T3 starts each agent through a
299
- launcher that signs in on the proxy, and so does everything else on a worker:
300
- there `claude`, `codex`, `opencode`, `grok` and `antigravity` are the fleet's
301
- launchers (`agents/bin`), ahead of the pinned CLIs on the `PATH` of every
302
- shell. A person in a terminal on a worker, or an app that starts an agent over
303
- SSH, therefore uses the proxy's accounts, picked by the fleet's selection
304
- policy. The pinned CLI itself is still there, behind the launcher, as
305
- `~/.local/share/mise/shims/claude`. The manager is your own machine: its
306
- commands stay the pinned CLIs with whatever sign-in you gave them.
292
+ A machine signs in to each provider itself, in T3 Code, and T3 keeps those
293
+ agents up to date. homelab installs no agent CLI, renders no agent profile and
294
+ starts no agent through a launcher of its own.
295
+
296
+ The CLI proxy on the manager holds provider accounts only to gather their
297
+ usage: `homelab proxy accounts` lists them with their state, and
298
+ `homelab proxy add-account`, `relogin` and `remove-account` change one.
299
+ Nothing on a worker or on the manager authenticates through it.
307
300
 
308
301
  ## Add or remove a machine
309
302
 
@@ -335,8 +328,8 @@ commands stay the pinned CLIs with whatever sign-in you gave them.
335
328
  ([a limit on agent sessions](docs/worker-contract.md#a-limit-on-agent-sessions)).
336
329
 
337
330
  3. Run `converge`. A machine that has only an SSH server and an account
338
- with sudo is enough: every pull request proves that against a bare
339
- Ubuntu machine, over SSH
331
+ with sudo is enough: every night proves that against a bare Ubuntu
332
+ machine, over SSH
340
333
  ([`fresh-box.feature`](features/fresh-box/fresh-box.feature)).
341
334
 
342
335
  A new machine can also join by itself: `npx @crvouga/homelab provision --id ID
@@ -423,7 +416,7 @@ and start the app on the manager and enable Remote workspaces under Settings →
423
416
  Experimental; it updates itself. Every `converge` then asks the app, through
424
417
  its own CLI, for a remote workspace for each worker that has none, named after
425
418
  the worker and pointed at the SSH alias `fleet.json` gives it, and measures
426
- that the manager's own SSH finds Git, `flock` and the fleet's coding agents
419
+ that the manager's own SSH finds Git and `flock`
427
420
  there (`super:ssh`, `super:workspace`). The app connects with your SSH
428
421
  configuration, so a worker needs an `ssh` alias that works from a terminal on
429
422
  the manager. The `super:*` checks only warn, so an app that is closed never
@@ -435,13 +428,8 @@ account’s home. A dry run lists workspaces to create. The fleet records the ID
435
428
  of each workspace it creates so retirement or an SSH alias change can remove
436
429
  that grouping. Previously existing workspaces stay under their owner’s control.
437
430
 
438
- An agent the app starts on a worker signs in through the CLI proxy, with no
439
- sign-in on the worker: the app starts an agent by its plain command, and on a
440
- worker that command is the fleet's launcher (see
441
- [Provider accounts](#provider-accounts)). `super:ssh` warns
442
- (`SUPER_AGENTS_NOT_PROXIED`) about a worker where it is still the plain CLI,
443
- until the next `converge` of that worker. Workspaces on the manager itself
444
- start the manager's own CLIs, which homelab leaves as they are.
431
+ The agents the app starts are its own and the provider's to install and
432
+ sign in; homelab measures only that Git and flock are there.
445
433
 
446
434
  What it does not do yet: homelab never removes a workspace, so delete a
447
435
  retired worker's in the app. Projects are yours to add to a workspace, and the
@@ -472,19 +460,7 @@ machine's own, and one edited on a machine since `converge` last wrote it
472
460
  is reported as `T3_PROFILE_CONFLICT` by the check `t3:profile`, never
473
461
  overwritten.
474
462
 
475
- Accounts of one tool are not entitled to the same models. On each per-account
476
- instance `converge` hides the models of T3's catalogue that its account does
477
- not serve and lists the preferred default it serves first, so the instance
478
- shows, and opens on, a model that works. Which catalogue models are hidden
479
- there is the fleet's: one hidden by hand is shown again while its account
480
- serves it. Until a sync, the check `t3:models` says what it would change
481
- (`T3_MODELS_PENDING`). It reports as `T3_MODELS_MISMATCH` only what cannot
482
- work: a custom model or a T3 default the proxy does not serve, an account that
483
- serves none of its tool's preferred defaults, and a model in
484
- `t3.requiredModels` that is missing.
485
-
486
- Secrets are asked for by purpose (`proxy-client-key`,
487
- `monitoring-account-password`, `monitoring-tunnel-token`,
463
+ Secrets are asked for by purpose (`monitoring-account-password`, `monitoring-tunnel-token`,
488
464
  `proxy-tunnel-token`); see [`src/secrets.ts`](src/secrets.ts).
489
465
 
490
466
  `converge` records the configuration it applies in the fleet state, so a
@@ -559,8 +535,7 @@ fleet.json contents.
559
535
  | `src/` | Inventory, orchestration, verification, the report; `src/cli` CLI |
560
536
  | `src/state/` | The fleet state database and its replication to the bucket |
561
537
  | `ansible/` | Machine policy: `ubuntu/`, `macos/`, `monitoring/` |
562
- | `agents/` | Agent launchers T3 runs, and their registry |
563
- | `cliproxy/` | The CLIProxyAPI service: install, audit, backup, model health |
538
+ | `cliproxy/` | The CLIProxyAPI service: install, audit, backup, recovery |
564
539
  | `bootstrap/` | Toolchain bootstrap and the manager and worker entry scripts |
565
540
  | `schema/` | JSON schemas for `fleet.json`, the roster and command output; check IDs |
566
541
  | `examples/` | A complete example configuration |
@@ -593,32 +568,34 @@ package's Python tests. Features run against `examples/fleet.json` and never
593
568
  contact a real machine.
594
569
 
595
570
  Checks run in three tiers ([`ci.yml`](.github/workflows/ci.yml),
596
- [`nightly.yml`](.github/workflows/nightly.yml)):
597
-
598
- | Tier | When | Goal | What runs |
599
- | ------------ | ------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
600
- | Pull request | A pull request, or a dispatch off `main` | 5 minutes | Format, typecheck, lint and the features the diff affects. Fleet state, workflows, playbooks, the manager, one fresh worker and the proxy run only when the diff reaches them. The monitoring agent does not run here. |
601
- | Release | A push to `main`, or a dispatch on `main` | 10 minutes | The full feature suite, fleet state, workflows, playbooks, the manager on macOS, the monitoring agent, and a fresh worker of the newest Ubuntu on amd64 and arm64. |
602
- | Nightly | 07:17 UTC, or a dispatch of the Nightly workflow | 45 minutes | Every accepted Ubuntu release and architecture, both fresh-worker features, and the monitoring agent. |
603
-
604
- The minutes are a goal. A job that runs past its goal is not cancelled, and
605
- the run fails only when a job fails. A pull request aims at five minutes, a
606
- release at ten and a night at forty-five.
607
-
608
- A pull request that changes the bootstrap runs one fresh worker: the newest
609
- Ubuntu, amd64, and the single-machine feature. The night runs the other
610
- release, arm64 and the multi-machine feature. A job the diff does not affect
611
- is skipped.
612
-
613
- | Check | What it proves |
614
- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
615
- | Check | Format, typecheck, lint, the features the diff affects, and the proxy package when it changes |
616
- | Fleet state | The pinned Litestream replicates the fleet state to a directory and to an S3 API, and a second manager restores it |
617
- | Fresh worker over SSH | A new Ubuntu machine with only an SSH server and sudo is bootstrapped by the production code over real SSH |
618
- | Workflows | The workflow files pass `actionlint` |
619
- | Playbooks | Every playbook passes `ansible-lint` (production profile) and `--syntax-check`, and every pinned package is in the pinned snapshot |
620
- | Manager on macOS | The macOS features, and the manager playbook converged, then re-run and checked with no change |
621
- | Monitoring agent | The agent playbook applied on a machine running systemd, and the pinned T3 server's session limit |
571
+ [`nightly.yml`](.github/workflows/nightly.yml)), each inside a hard time
572
+ limit:
573
+
574
+ | Tier | When | Limit | What runs |
575
+ | ------------ | ------------------------------------------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
576
+ | Pull request | A pull request, or a dispatch off `main` | 2 minutes | Format, typecheck, lint and the features the diff affects, split over four jobs. Fleet state, workflows, playbooks and the proxy run only when the diff reaches them. No machine is started. |
577
+ | Release | A push to `main`, or a dispatch on `main` | 5 minutes | The pull request checks over every feature, then the package packed, installed on Node 22 and 24, published and tagged. No machine is started. |
578
+ | Nightly | 07:17 UTC, or a dispatch of the Nightly workflow | 30 minutes | Every accepted Ubuntu release and architecture, both fresh-worker features, the monitoring agent and the manager on macOS. The Ubuntu VM (04:17) and the tailnet test (04:41) are workflows of their own on the same night. |
579
+
580
+ The limits are hard. Every job of a workflow is stopped when its tier's limit
581
+ is reached and fails like any failed job, so a check that grows past a limit
582
+ is found the day it does. What does not fit moves to a slower tier, never to
583
+ a longer limit: a bare Ubuntu machine over SSH takes six minutes and the
584
+ Ubuntu VM twenty, so they run at night. A failure at night never holds a pull
585
+ request or a release: it is queued as an issue (below) for whoever picks it up.
586
+ The load soak (`soak.yml`) is longer than a night and runs weekly.
587
+
588
+ | Check | What it proves |
589
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
590
+ | Format, types, lint | Prettier, `tsc` and ESLint pass |
591
+ | Features | The features the diff affects pass, in four jobs of about the same length |
592
+ | Python tests | The VM setup and snapshot examples, and the proxy package when it changes |
593
+ | Fleet state | The pinned Litestream replicates the fleet state to a directory and to an S3 API, and a second manager restores it |
594
+ | Fresh worker over SSH | (night) A new Ubuntu machine with only an SSH server and sudo is bootstrapped by the production code over real SSH |
595
+ | Workflows | The workflow files pass `actionlint` |
596
+ | Playbooks | Every playbook passes `ansible-lint` (production profile, which syntax-checks it), and every pinned package is in the pinned snapshot |
597
+ | Manager on macOS | (night) The macOS features, and the manager playbook converged, then re-run and checked with no change |
598
+ | Monitoring agent | (night) The agent playbook applied on a machine running systemd, and the pinned T3 server's session limit |
622
599
 
623
600
  The ruleset of `main` requires one check, **Required checks**, which passes
624
601
  when every job passed or was skipped, and fails when one failed. A job that
@@ -627,11 +604,12 @@ A failed job opens or updates one issue, `CI failure: <tier> / <job>`, and
627
604
  the next green run of that same job and tier closes it. A pull request is
628
605
  `pr`, CI on `main` is `release` and a night is `nightly`. The same queue
629
606
  covers the workflows that follow: the publish workflow (`publish`), the
630
- weekly Ubuntu VM (`vm`), the weekly tailnet test (`tailnet`) and catch-up
631
- (`catch-up`). A publish run that releases nothing, because CI on `main` did
632
- not pass, changes no issue. The publish workflow calls the Ubuntu VM and
633
- the tailnet test and queues those failures itself; their weekly runs queue
634
- their own. Those tests sit outside the ten-minute limit.
607
+ nightly Ubuntu VM (`vm`), the nightly tailnet test (`tailnet`), the weekly
608
+ load soak (`soak`) and catch-up (`catch-up`). A publish run that releases
609
+ nothing, because CI on `main` did not pass, changes no issue. A job that is
610
+ stopped at its limit fails, so it is queued the same way. A release does not
611
+ wait for the Ubuntu VM or the tailnet test: they run every night and queue
612
+ their own failures.
635
613
 
636
614
  A pull request needs nobody attending
637
615
  ([`pull-requests.feature`](features/rules/pull-requests.feature)):
@@ -60,6 +60,89 @@ def grant(policy, budget, reserve, headroom, reservations):
60
60
  return granted if granted >= minimum else 0
61
61
 
62
62
 
63
+ def cpu_limits(policy, cpus, agents):
64
+ """The CPU quota of one tool scope, in percent of one CPU, and the number of
65
+ parallel jobs a tool should start by default: the quota in cores shared by
66
+ the agents that are running. Never below one CPU or one job."""
67
+ quota = max(100, cpus * policy.get('agentCpu', {}).get('toolPercentOfCores', 25))
68
+ return quota, max(1, (quota // 100) // max(1, agents))
69
+
70
+
71
+ def default_environment(env, jobs):
72
+ """The tool settings an agent did not choose itself, from the job count.
73
+ A value that is already set is the agent's and is never replaced. (A JVM
74
+ sizes its heap from the memory cap of the scope, so none is set here.)"""
75
+ out = dict(env)
76
+ out.setdefault('TURBO_CONCURRENCY', str(jobs))
77
+ out.setdefault('UV_THREADPOOL_SIZE', str(max(4, jobs)))
78
+ if 'org.gradle.workers.max' not in out.get('GRADLE_OPTS', ''):
79
+ out['GRADLE_OPTS'] = (out.get('GRADLE_OPTS', '') + ' -Dorg.gradle.workers.max=%d' % jobs).strip()
80
+ return out
81
+
82
+
83
+ def heavy_functions(names):
84
+ """Shell functions, exported through the environment, that send a known
85
+ heavy tool through the worker-wide queue (heavy.py). Only the first word of
86
+ a name is a function; a second word (`bun test`) limits it to that
87
+ subcommand and the rest of the tool is run as it was."""
88
+ functions = {}
89
+ for name in names:
90
+ words = name.split()
91
+ tool = words[0]
92
+ queued = 'homelab-heavy %s "$@"' % tool
93
+ if len(words) == 1:
94
+ body = queued
95
+ else:
96
+ body = 'if [ "$1" = %s ]; then %s; else command %s "$@"; fi' % (words[1], queued, tool)
97
+ functions['BASH_FUNC_%s%%%%' % tool] = '() { %s\n}' % body
98
+ return functions
99
+
100
+
101
+ def oom_message(returncode, events, cap_mib, tool):
102
+ """What the agent is told when a tool ended with SIGKILL: the cause when the
103
+ scope's memory events say so, and what to do about it. None otherwise."""
104
+ if returncode not in (137, -9):
105
+ return None
106
+ if events.get('oom_kill', 0) > 0:
107
+ return ('AGENT_TOOL_OOM_KILLED: %s used more than its memory cap of %d MiB and the kernel killed it. '
108
+ 'Start fewer parallel jobs (TURBO_CONCURRENCY, gradle --max-workers, bun test --concurrency) '
109
+ 'and run it again; the cap is shared out by what other agents on the worker use.'
110
+ % (tool, cap_mib))
111
+ return ('AGENT_TOOL_KILLED: %s ended with SIGKILL. If memory was the cause, its cap was %d MiB '
112
+ '(memory.high slows it before that); start fewer parallel jobs and run it again.'
113
+ % (tool, cap_mib))
114
+
115
+
116
+ def tool_name(argv):
117
+ """The program a shell command line starts, for a message and a record:
118
+ the first word of the `-c` string, as a name and never with its arguments."""
119
+ for at, argument in enumerate(argv[:-1]):
120
+ if argument.startswith('-') and not argument.startswith('--') and 'c' in argument:
121
+ words = argv[at + 1].split()
122
+ return os.path.basename(words[0]) if words else 'the tool'
123
+ return 'the tool'
124
+
125
+
126
+ def record_oom(kind, tool, cap_mib):
127
+ """Leave a line the user and `worker:agent-oom` can read: when, what, how
128
+ big. The command's arguments are never recorded."""
129
+ state = Path(os.environ.get('XDG_STATE_HOME') or Path.home() / '.local/state') / 'personal'
130
+ try:
131
+ state.mkdir(parents=True, exist_ok=True)
132
+ with (state / 'agent-oom.ndjson').open('a') as log:
133
+ log.write(json.dumps(dict(t=int(time.time()), kind=kind, tool=tool, capMiB=cap_mib)) + '\n')
134
+ except OSError:
135
+ pass
136
+
137
+
138
+ def read_events(path):
139
+ try:
140
+ return {key: int(value) for key, value in
141
+ (line.split() for line in path.read_text().splitlines() if line)}
142
+ except (OSError, ValueError):
143
+ return {}
144
+
145
+
63
146
  def main():
64
147
  policy = json.loads(Path(__file__).with_name('agent-tool-policy.json').read_text())
65
148
  runtime = Path(os.environ['XDG_RUNTIME_DIR'])
@@ -89,10 +172,17 @@ def main():
89
172
  unit = 'homelab-tool-' + uuid.uuid4().hex + '.scope'
90
173
  env = dict(os.environ)
91
174
  env.pop('BASH_ENV', None)
175
+ agents = sum(1 for _ in root.glob('t3code-*.scope'))
176
+ quota, jobs = cpu_limits(policy, len(os.sched_getaffinity(0)), agents)
177
+ env = default_environment(env, jobs)
178
+ env.update(heavy_functions(policy.get('heavy', {}).get('names', [])))
179
+ high = budget * policy.get('highPercent', 80) // 100 // (1024 * 1024) * (1024 * 1024)
92
180
  child = subprocess.Popen([
93
181
  '/usr/bin/systemd-run', '--user', '--scope', '--quiet', '--collect',
94
182
  '--slice=app-t3code-agents.slice', '--unit=' + unit,
183
+ '--property=MemoryHigh=' + str(high),
95
184
  '--property=MemoryMax=' + str(budget),
185
+ '--property=CPUQuota=%d%%' % quota,
96
186
  '--property=MemorySwapMax=' + str(policy['swapMiB']) + 'M',
97
187
  '--property=OOMPolicy=stop', '--property=IOAccounting=yes',
98
188
  '--property=TimeoutStopSec=10s',
@@ -118,7 +208,22 @@ def main():
118
208
  sys.stderr.write('AGENT_TOOL_REFUSED: tool scope startup was not observed.\n')
119
209
  return 75
120
210
  time.sleep(0.02)
121
- return child.wait()
211
+ # Keep the scope's memory events while it runs: it is gone once it ends,
212
+ # and they say whether the kernel killed the tool for its memory. wait()
213
+ # returns the moment the tool ends, so a short command is not delayed.
214
+ events = {}
215
+ while True:
216
+ try:
217
+ code = child.wait(timeout=0.25)
218
+ break
219
+ except subprocess.TimeoutExpired:
220
+ events = read_events(root / unit / 'memory.events') or events
221
+ tool = tool_name(sys.argv[1:])
222
+ message = oom_message(code, events, budget // (1024 * 1024), tool)
223
+ if message:
224
+ sys.stderr.write(message + '\n')
225
+ record_oom(message.split(':', 1)[0], tool, budget // (1024 * 1024))
226
+ return code
122
227
 
123
228
 
124
229
  if __name__ == '__main__':