@crvouga/dev-fleet 0.2.0 → 0.4.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.
- package/README.md +50 -16
- package/ansible/github/git.yml +66 -0
- package/ansible/macos/manager.yml +3 -0
- package/ansible/macos/policy.json +11 -1
- package/ansible/macos/t3-policy.yml +49 -0
- package/ansible/monitoring/compose.yml +10 -0
- package/ansible/monitoring/container-watchdog.py +118 -0
- package/ansible/monitoring/hub-darwin.yml +146 -0
- package/ansible/net/remote-probe.sh +5 -0
- package/ansible/ubuntu/baseline.yml +2 -0
- package/ansible/ubuntu/disk-gc.py +25 -3
- package/ansible/ubuntu/disk-guard.py +24 -5
- package/ansible/ubuntu/policy.json +51 -1
- package/ansible/ubuntu/t3-desktop.yml +19 -0
- package/ansible/ubuntu/t3-health.sh +93 -22
- package/ansible/ubuntu/t3-idle.py +42 -0
- package/ansible/ubuntu/t3-policy.yml +4 -11
- package/ansible/ubuntu/tasks/browser.yml +56 -0
- package/ansible/ubuntu/tasks/docker.yml +52 -0
- package/ansible/ubuntu/tasks/recovery.yml +60 -1
- package/ansible/ubuntu/tasks/resources.yml +2 -2
- package/ansible/ubuntu/tasks/services.yml +13 -0
- package/ansible/ubuntu/tasks/t3-restart.yml +37 -0
- package/ansible/ubuntu/wip-guard.py +121 -0
- package/bootstrap/doctor.ts +32 -6
- package/bootstrap/fleet-remote-bootstrap.sh +31 -4
- package/bootstrap/native-t3.ts +22 -11
- package/bootstrap/setup.ts +23 -8
- package/bootstrap/worker-tools.ts +118 -0
- package/cliproxy/README.md +4 -4
- package/cliproxy/compose.yaml +4 -0
- package/cliproxy/scripts/accounts.py +216 -0
- package/cliproxy/scripts/checkpoint.py +30 -2
- package/cliproxy/scripts/cli.py +1 -1
- package/cliproxy/scripts/clientkeys.py +99 -0
- package/cliproxy/scripts/lease.py +80 -0
- package/cliproxy/scripts/ops +137 -25
- package/cliproxy/scripts/restore-verify +15 -0
- package/docs/accounts.md +154 -0
- package/docs/authentication.md +90 -0
- package/docs/declared.md +5 -1
- package/docs/durability.md +26 -0
- package/docs/machine-setup.md +26 -15
- package/docs/operations.md +87 -31
- package/docs/runbooks.md +380 -0
- package/docs/state.md +13 -7
- package/docs/topology.md +2 -0
- package/docs/ubuntu-sync.md +35 -28
- package/examples/fleet.json +19 -1
- package/llms.txt +3 -0
- package/mise.toml +10 -1
- package/package.json +2 -2
- package/schema/check-ids.json +522 -0
- package/schema/fleet.schema.json +244 -1
- package/schema/output/check.schema.json +23 -0
- package/schema/output/error.schema.json +14 -0
- package/schema/output/fleet-report.schema.json +79 -0
- package/schema/output/fleet-sync.schema.json +112 -0
- package/schema/output/report.schema.json +38 -0
- package/src/accounts/checks.ts +220 -0
- package/src/accounts/context.ts +76 -0
- package/src/accounts/propagate.ts +62 -0
- package/src/accounts/roster.ts +85 -0
- package/src/accounts/selection.ts +67 -0
- package/src/accounts/sessions.ts +120 -0
- package/src/agents/account-relay.ts +176 -26
- package/src/agents/launch.ts +84 -5
- package/src/agents/native-verify.ts +128 -2
- package/src/auth-checks.ts +3 -0
- package/src/cli/agent-guide.ts +5 -3
- package/src/cli/fleet-accounts.ts +253 -0
- package/src/cli/fleet-report.ts +126 -0
- package/src/cli/fleet-sync-accounts.ts +58 -0
- package/src/cli/fleet-sync-manager.ts +31 -4
- package/src/cli/fleet-sync-output.ts +3 -2
- package/src/cli/fleet-sync-plan.ts +200 -0
- package/src/cli/fleet-sync-remote.ts +23 -14
- package/src/cli/fleet-sync-schedule.ts +142 -35
- package/src/cli/fleet-sync.ts +126 -8
- package/src/cli/fleet-watch.ts +198 -0
- package/src/cli/fleet.ts +4 -0
- package/src/cli/register-fleet.ts +86 -0
- package/src/cli/registry.ts +26 -0
- package/src/cli/schedule-logs.ts +36 -0
- package/src/clock.ts +63 -0
- package/src/definition.ts +226 -7
- package/src/git-identity.ts +160 -0
- package/src/ide/definition.ts +86 -0
- package/src/ide/ide.ts +43 -0
- package/src/ide/index.ts +5 -0
- package/src/ide/orchestrate.ts +50 -0
- package/src/ide/t3.ts +111 -0
- package/src/machine-health.ts +51 -4
- package/src/manager-health.ts +205 -0
- package/src/manager-sync.ts +13 -17
- package/src/monitoring/hub-backup.ts +63 -17
- package/src/monitoring/manager-hub.ts +44 -2
- package/src/node-converge-linux.ts +44 -12
- package/src/notify.ts +239 -0
- package/src/platform/darwin.ts +0 -13
- package/src/platform/fallback.ts +0 -8
- package/src/platform/linux.ts +0 -10
- package/src/platform/t3-policy.ts +33 -6
- package/src/platform/t3-service.ts +104 -0
- package/src/platform/types.ts +0 -4
- package/src/platform/windows.ts +0 -14
- package/src/remote-bootstrap.ts +87 -25
- package/src/remote-entry.ts +15 -1
- package/src/remote-operation.ts +213 -0
- package/src/schedule-check.ts +40 -0
- package/src/secrets.ts +26 -8
- package/src/service-auth.ts +15 -5
- package/src/ssh.ts +10 -2
- package/src/state/history.ts +172 -0
- package/src/state/store.ts +11 -4
- package/src/t3/accounts.ts +7 -1
- package/src/t3/models.ts +133 -0
- package/src/t3/pairing.ts +31 -0
- package/src/t3/profile.ts +203 -0
- package/src/t3/version.ts +119 -0
- package/src/t3-linked-check.ts +1 -1
- package/src/tailscale.ts +51 -0
- package/src/toolchain-checks.ts +8 -3
- package/src/transport.ts +3 -2
- package/src/worker-capability-checks.ts +167 -0
- package/src/worker-capacity.ts +19 -7
- package/src/worker-host-checks.ts +68 -13
- package/src/worker-policy.ts +33 -0
- package/src/worker-readiness.ts +10 -1
package/schema/fleet.schema.json
CHANGED
|
@@ -107,6 +107,14 @@
|
|
|
107
107
|
"description": "The port the worker T3 server listens on, normally 3773."
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
},
|
|
111
|
+
"toolProfiles": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"uniqueItems": true,
|
|
114
|
+
"items": {
|
|
115
|
+
"enum": ["web", "go", "rust", "jvm"]
|
|
116
|
+
},
|
|
117
|
+
"description": "Tool profiles this worker installs on top of the fleet-wide ones: web (pnpm, Deno, Yarn), go, rust (with CMake and Ninja), jvm (Temurin). Each is a locked tool set dev-fleet ships."
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
}
|
|
@@ -126,6 +134,41 @@
|
|
|
126
134
|
"type": "string",
|
|
127
135
|
"pattern": "^https://[A-Za-z0-9.-]+$",
|
|
128
136
|
"description": "Public HTTPS origin of the CLI proxy every node uses."
|
|
137
|
+
},
|
|
138
|
+
"accounts": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"description": "How provider accounts signed in on the proxy are watched and chosen. See docs/accounts.md.",
|
|
142
|
+
"properties": {
|
|
143
|
+
"minimumUsable": {
|
|
144
|
+
"type": "integer",
|
|
145
|
+
"minimum": 1,
|
|
146
|
+
"description": "proxy:account:<provider> warns when a provider has fewer usable accounts than this (default 2) and fails when it has none."
|
|
147
|
+
},
|
|
148
|
+
"selection": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"description": "Per provider (claude, codex, antigravity): which account an unpinned request goes to first. Accounts cooling down are always skipped.",
|
|
151
|
+
"additionalProperties": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"required": ["strategy"],
|
|
155
|
+
"properties": {
|
|
156
|
+
"strategy": {
|
|
157
|
+
"enum": [
|
|
158
|
+
"fill-first",
|
|
159
|
+
"round-robin",
|
|
160
|
+
"least-recently-limited"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"order": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": { "type": "string" },
|
|
166
|
+
"description": "Account labels (sign-in emails) first, in this order; the others follow in the order of their routing prefix."
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
129
172
|
}
|
|
130
173
|
}
|
|
131
174
|
},
|
|
@@ -156,6 +199,49 @@
|
|
|
156
199
|
"type": "string",
|
|
157
200
|
"format": "email",
|
|
158
201
|
"description": "Read-only Beszel account visitors are signed in as."
|
|
202
|
+
},
|
|
203
|
+
"backups": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": ["schedule", "keep", "storage"],
|
|
207
|
+
"description": "Scheduled off-machine backups of the monitoring hub. fleet-sync sets them through the hub's API, with the keys of the secrets monitoring-backup-access-key and monitoring-backup-secret-key; without this block the hub's backups are only read, and beszel:backup warns.",
|
|
208
|
+
"properties": {
|
|
209
|
+
"schedule": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"pattern": "^[0-9*/,-]+( [0-9*/,-]+){4}$",
|
|
212
|
+
"description": "A cron expression in the hub's time zone, for example 0 3 * * *."
|
|
213
|
+
},
|
|
214
|
+
"keep": {
|
|
215
|
+
"type": "integer",
|
|
216
|
+
"minimum": 1,
|
|
217
|
+
"maximum": 365,
|
|
218
|
+
"description": "How many scheduled backups the hub keeps."
|
|
219
|
+
},
|
|
220
|
+
"storage": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": ["bucket", "endpoint", "region"],
|
|
224
|
+
"description": "S3-compatible storage off the manager. Never its keys.",
|
|
225
|
+
"properties": {
|
|
226
|
+
"bucket": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"pattern": "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"
|
|
229
|
+
},
|
|
230
|
+
"endpoint": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"pattern": "^https://[A-Za-z0-9.-]+(:[0-9]+)?$"
|
|
233
|
+
},
|
|
234
|
+
"region": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "^[a-z0-9-]{1,32}$"
|
|
237
|
+
},
|
|
238
|
+
"forcePathStyle": {
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"description": "Path-style requests, for services that need them (MinIO)."
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
159
245
|
}
|
|
160
246
|
}
|
|
161
247
|
}
|
|
@@ -228,9 +314,26 @@
|
|
|
228
314
|
},
|
|
229
315
|
"neverSleep": {
|
|
230
316
|
"const": true
|
|
317
|
+
},
|
|
318
|
+
"toolProfiles": {
|
|
319
|
+
"type": "array",
|
|
320
|
+
"uniqueItems": true,
|
|
321
|
+
"items": {
|
|
322
|
+
"enum": ["web", "go", "rust", "jvm"]
|
|
323
|
+
},
|
|
324
|
+
"description": "Tool profiles every worker installs on top of the base tools: web (pnpm, Deno, Yarn), go, rust (with CMake and Ninja), jvm (Temurin). Each worker passes a tool:<name> check for each of their tools."
|
|
325
|
+
},
|
|
326
|
+
"tools": {
|
|
327
|
+
"type": "array",
|
|
328
|
+
"uniqueItems": true,
|
|
329
|
+
"items": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^[A-Za-z0-9@:/._-]{1,75}$"
|
|
332
|
+
},
|
|
333
|
+
"description": "Single tools every worker installs: names of tools dev-fleet's mise.toml pins (for example fd or ripgrep). A tool it does not pin is refused; ask for it in an issue."
|
|
231
334
|
}
|
|
232
335
|
},
|
|
233
|
-
"description": "Policy every worker must meet. All but the two logins and the
|
|
336
|
+
"description": "Policy every worker must meet. All but the two logins, the capabilities and the tools are fixed."
|
|
234
337
|
},
|
|
235
338
|
"source": {
|
|
236
339
|
"type": "object",
|
|
@@ -244,6 +347,37 @@
|
|
|
244
347
|
}
|
|
245
348
|
}
|
|
246
349
|
},
|
|
350
|
+
"ides": {
|
|
351
|
+
"type": "array",
|
|
352
|
+
"minItems": 1,
|
|
353
|
+
"uniqueItems": true,
|
|
354
|
+
"items": { "enum": ["t3"] },
|
|
355
|
+
"description": "The IDEs every machine runs. Defaults to [\"t3\"]; the README's support matrix lists the supported ones."
|
|
356
|
+
},
|
|
357
|
+
"t3": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"description": "What every machine's T3 Code holds beyond the provider instances generated from the proxy's accounts.",
|
|
361
|
+
"properties": {
|
|
362
|
+
"profile": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"description": "Top-level T3 settings every machine holds the same (tool servers, projects, selected preferences). Keys not named here stay local; a key edited on a machine since dev-fleet last wrote it is reported as a conflict, never overwritten.",
|
|
365
|
+
"propertyNames": {
|
|
366
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",
|
|
367
|
+
"not": { "const": "providerInstances" }
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"requiredModels": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"description": "Models T3 must offer, and the proxy must serve, for every account of a tool, by tool (claude, codex, opencode).",
|
|
373
|
+
"propertyNames": { "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$" },
|
|
374
|
+
"additionalProperties": {
|
|
375
|
+
"type": "array",
|
|
376
|
+
"items": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
247
381
|
"state": {
|
|
248
382
|
"description": "The bucket that holds the fleet state (the roster, the approved revision and the configuration last applied). Any S3-compatible service, or a directory. Never credentials: a devfleet command reads those from DEVFLEET_BUCKET_ACCESS_KEY_ID and DEVFLEET_BUCKET_SECRET_ACCESS_KEY.",
|
|
249
383
|
"oneOf": [
|
|
@@ -409,12 +543,121 @@
|
|
|
409
543
|
"pattern": "^[A-Za-z0-9_]+$"
|
|
410
544
|
}
|
|
411
545
|
}
|
|
546
|
+
},
|
|
547
|
+
"monitoring-backup-access-key": {
|
|
548
|
+
"type": "object",
|
|
549
|
+
"additionalProperties": false,
|
|
550
|
+
"required": ["path", "field"],
|
|
551
|
+
"properties": {
|
|
552
|
+
"path": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"pattern": "^[A-Za-z0-9._/-]+$"
|
|
555
|
+
},
|
|
556
|
+
"field": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"pattern": "^[A-Za-z0-9_]+$"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"description": "Only with services.monitoring.backups: the access key of the hub's backup storage."
|
|
562
|
+
},
|
|
563
|
+
"monitoring-backup-secret-key": {
|
|
564
|
+
"type": "object",
|
|
565
|
+
"additionalProperties": false,
|
|
566
|
+
"required": ["path", "field"],
|
|
567
|
+
"properties": {
|
|
568
|
+
"path": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"pattern": "^[A-Za-z0-9._/-]+$"
|
|
571
|
+
},
|
|
572
|
+
"field": {
|
|
573
|
+
"type": "string",
|
|
574
|
+
"pattern": "^[A-Za-z0-9_]+$"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"description": "Only with services.monitoring.backups: the secret key of the hub's backup storage."
|
|
578
|
+
},
|
|
579
|
+
"notify-webhook-url": {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"additionalProperties": false,
|
|
582
|
+
"required": ["path", "field"],
|
|
583
|
+
"properties": {
|
|
584
|
+
"path": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"pattern": "^[A-Za-z0-9._/-]+$"
|
|
587
|
+
},
|
|
588
|
+
"field": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"pattern": "^[A-Za-z0-9_]+$"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"description": "Only with the webhook notify target: the URL fleet-watch POSTs JSON to."
|
|
594
|
+
},
|
|
595
|
+
"notify-ntfy-url": {
|
|
596
|
+
"type": "object",
|
|
597
|
+
"additionalProperties": false,
|
|
598
|
+
"required": ["path", "field"],
|
|
599
|
+
"properties": {
|
|
600
|
+
"path": {
|
|
601
|
+
"type": "string",
|
|
602
|
+
"pattern": "^[A-Za-z0-9._/-]+$"
|
|
603
|
+
},
|
|
604
|
+
"field": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"pattern": "^[A-Za-z0-9_]+$"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"description": "Only with the ntfy notify target: the ntfy topic URL fleet-watch publishes to."
|
|
412
610
|
}
|
|
413
611
|
}
|
|
414
612
|
}
|
|
415
613
|
}
|
|
416
614
|
}
|
|
417
615
|
]
|
|
616
|
+
},
|
|
617
|
+
"git": {
|
|
618
|
+
"type": "object",
|
|
619
|
+
"additionalProperties": false,
|
|
620
|
+
"required": ["name", "email"],
|
|
621
|
+
"description": "The Git identity every node, the manager included, commits with, and the GitHub credential helper it pushes with. fleet-sync writes them in ~/.config/git/config and measures them as worker:git-identity and worker:git-push-auth.",
|
|
622
|
+
"properties": {
|
|
623
|
+
"name": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"pattern": "^[^\"\\\\\\n\\r]{1,100}$",
|
|
626
|
+
"description": "user.name of every commit."
|
|
627
|
+
},
|
|
628
|
+
"email": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"format": "email",
|
|
631
|
+
"description": "user.email of every commit, for example the account's noreply address."
|
|
632
|
+
},
|
|
633
|
+
"verifyRepository": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"pattern": "^https://github\\.com/[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$",
|
|
636
|
+
"description": "A GitHub repository the fleet's account can push to, ideally private. Each node lists it through git with its own credentials."
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"notify": {
|
|
641
|
+
"description": "Where fleet-watch sends a notification when a machine becomes unhealthy or recovers. Each target's address is a secret: notify-webhook-url (a JSON POST) or notify-ntfy-url (an ntfy topic URL).",
|
|
642
|
+
"type": "object",
|
|
643
|
+
"additionalProperties": false,
|
|
644
|
+
"required": ["targets"],
|
|
645
|
+
"properties": {
|
|
646
|
+
"targets": {
|
|
647
|
+
"type": "array",
|
|
648
|
+
"minItems": 1,
|
|
649
|
+
"uniqueItems": true,
|
|
650
|
+
"items": {
|
|
651
|
+
"enum": ["webhook", "ntfy"]
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
"repeatHours": {
|
|
655
|
+
"description": "Notify again about a machine that stays unhealthy this often. 0 never repeats; the default is 24.",
|
|
656
|
+
"type": "integer",
|
|
657
|
+
"minimum": 0,
|
|
658
|
+
"maximum": 720
|
|
659
|
+
}
|
|
660
|
+
}
|
|
418
661
|
}
|
|
419
662
|
}
|
|
420
663
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "check.schema.json",
|
|
4
|
+
"title": "One check of a dev-fleet report",
|
|
5
|
+
"description": "The id is listed in schema/check-ids.json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "status", "summary"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string", "pattern": "^[a-z0-9-]+(:[A-Za-z0-9:._-]+)?$" },
|
|
10
|
+
"status": { "enum": ["pass", "warn", "fail", "skip"] },
|
|
11
|
+
"summary": { "type": "string" },
|
|
12
|
+
"required": { "type": "boolean" },
|
|
13
|
+
"phaseDurationMs": { "type": "number" },
|
|
14
|
+
"remedy": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["action"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"action": { "type": "string" },
|
|
19
|
+
"command": { "type": "string" }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "error.schema.json",
|
|
4
|
+
"title": "A dev-fleet error, version 1",
|
|
5
|
+
"description": "What a command prints with --json when it fails before a report: raw subprocess output and exception details are withheld.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "ok", "code", "error"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1 },
|
|
10
|
+
"ok": { "const": false },
|
|
11
|
+
"code": { "type": "string" },
|
|
12
|
+
"error": { "type": "string" }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "fleet-report.schema.json",
|
|
4
|
+
"title": "The fleet-report output, version 1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"version",
|
|
8
|
+
"command",
|
|
9
|
+
"ok",
|
|
10
|
+
"since",
|
|
11
|
+
"runs",
|
|
12
|
+
"succeeded",
|
|
13
|
+
"successRate",
|
|
14
|
+
"meanDurationMs",
|
|
15
|
+
"failingChecks",
|
|
16
|
+
"notReady",
|
|
17
|
+
"entries"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"version": { "const": 1 },
|
|
21
|
+
"command": { "const": "fleet-report" },
|
|
22
|
+
"ok": { "type": "boolean" },
|
|
23
|
+
"since": { "type": "string" },
|
|
24
|
+
"runs": { "type": "integer" },
|
|
25
|
+
"succeeded": { "type": "integer" },
|
|
26
|
+
"successRate": { "type": ["number", "null"] },
|
|
27
|
+
"meanDurationMs": { "type": ["number", "null"] },
|
|
28
|
+
"failingChecks": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["id", "runs"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"id": { "type": "string" },
|
|
35
|
+
"runs": { "type": "integer" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"notReady": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["node", "ms"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"node": { "type": "string" },
|
|
46
|
+
"ms": { "type": "number" }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"entries": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": [
|
|
55
|
+
"startedAt",
|
|
56
|
+
"finishedAt",
|
|
57
|
+
"durationMs",
|
|
58
|
+
"trigger",
|
|
59
|
+
"revision",
|
|
60
|
+
"ok",
|
|
61
|
+
"exitCode",
|
|
62
|
+
"failing",
|
|
63
|
+
"notReady"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"startedAt": { "type": "string" },
|
|
67
|
+
"finishedAt": { "type": "string" },
|
|
68
|
+
"durationMs": { "type": "number" },
|
|
69
|
+
"trigger": { "enum": ["operator", "schedule"] },
|
|
70
|
+
"revision": { "type": ["string", "null"] },
|
|
71
|
+
"ok": { "type": "boolean" },
|
|
72
|
+
"exitCode": { "type": "integer" },
|
|
73
|
+
"failing": { "type": "array", "items": { "type": "string" } },
|
|
74
|
+
"notReady": { "type": "array", "items": { "type": "string" } }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "fleet-sync.schema.json",
|
|
4
|
+
"title": "The fleet-sync report, version 3",
|
|
5
|
+
"description": "What devfleet fleet-sync prints with --json. A preview (--dry-run) adds plan.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"command",
|
|
10
|
+
"execution",
|
|
11
|
+
"ok",
|
|
12
|
+
"applied",
|
|
13
|
+
"desiredRevision",
|
|
14
|
+
"checks",
|
|
15
|
+
"nodes",
|
|
16
|
+
"candidates",
|
|
17
|
+
"dashboardUrl"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"version": { "const": 3 },
|
|
21
|
+
"command": { "const": "fleet-sync" },
|
|
22
|
+
"execution": { "const": "manager-push" },
|
|
23
|
+
"ok": { "type": "boolean" },
|
|
24
|
+
"applied": { "type": "boolean" },
|
|
25
|
+
"desiredRevision": { "type": ["string", "null"] },
|
|
26
|
+
"checks": { "type": "array", "items": { "$ref": "check.schema.json" } },
|
|
27
|
+
"candidates": { "type": "integer" },
|
|
28
|
+
"dashboardUrl": { "type": ["string", "null"] },
|
|
29
|
+
"planFingerprint": { "type": "string" },
|
|
30
|
+
"nodes": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": [
|
|
35
|
+
"node",
|
|
36
|
+
"checks",
|
|
37
|
+
"reachability",
|
|
38
|
+
"desiredRevision",
|
|
39
|
+
"appliedRevision",
|
|
40
|
+
"durationMs"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"node": { "type": "string" },
|
|
44
|
+
"role": { "enum": ["manager", "worker"] },
|
|
45
|
+
"reachability": {
|
|
46
|
+
"enum": ["online", "offline", "missing", "conflict", "unknown"]
|
|
47
|
+
},
|
|
48
|
+
"desiredRevision": { "type": ["string", "null"] },
|
|
49
|
+
"appliedRevision": { "type": ["string", "null"] },
|
|
50
|
+
"durationMs": { "type": "number" },
|
|
51
|
+
"checks": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": { "$ref": "check.schema.json" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"plan": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["state", "revision", "known", "tools", "restarts", "nodes"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"state": { "type": "string" },
|
|
63
|
+
"known": { "type": "boolean" },
|
|
64
|
+
"revision": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["from", "to"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"from": { "type": ["string", "null"] },
|
|
69
|
+
"to": { "type": "string" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"tools": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": ["tool", "from", "to"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"tool": { "type": "string" },
|
|
79
|
+
"from": { "type": ["string", "null"] },
|
|
80
|
+
"to": { "type": ["string", "null"] }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"restarts": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"required": ["service", "reason", "endsRunningTurns"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"service": { "type": "string" },
|
|
91
|
+
"reason": { "type": "string" },
|
|
92
|
+
"endsRunningTurns": { "type": "boolean" }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"nodes": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": ["node", "from", "to", "changes"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"node": { "type": "string" },
|
|
103
|
+
"from": { "type": ["string", "null"] },
|
|
104
|
+
"to": { "type": "string" },
|
|
105
|
+
"changes": { "type": "boolean" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "report.schema.json",
|
|
4
|
+
"title": "A dev-fleet diagnostic report, version 1",
|
|
5
|
+
"description": "What fleet-status, fleet-state and the other diagnostic commands print with --json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "command", "ok", "generatedAt", "nodes", "summary"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1 },
|
|
10
|
+
"command": { "type": "string" },
|
|
11
|
+
"ok": { "type": "boolean" },
|
|
12
|
+
"generatedAt": { "type": "string" },
|
|
13
|
+
"nodes": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["node", "checks"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"node": { "type": "string" },
|
|
20
|
+
"checks": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "$ref": "check.schema.json" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"summary": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["pass", "warn", "fail", "skip"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"pass": { "type": "integer" },
|
|
32
|
+
"warn": { "type": "integer" },
|
|
33
|
+
"fail": { "type": "integer" },
|
|
34
|
+
"skip": { "type": "integer" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|