@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.
- package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/aube-lock.yaml +73 -297
- package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/package.json +1 -1
- package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/aube-lock.yaml +42 -42
- package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/package.json +1 -1
- package/README.md +54 -76
- package/ansible/ubuntu/agent-tool.py +106 -1
- package/ansible/ubuntu/heavy.py +142 -0
- package/ansible/ubuntu/idle-reboot.py +125 -0
- package/ansible/ubuntu/policy.json +58 -3
- package/ansible/ubuntu/t3-desktop.yml +7 -0
- package/ansible/ubuntu/t3-hang-snapshot.sh +75 -0
- package/ansible/ubuntu/t3-headless.yml +7 -0
- package/ansible/ubuntu/t3-health.sh +71 -3
- package/ansible/ubuntu/t3-policy.yml +14 -5
- package/ansible/ubuntu/tasks/packages.yml +2 -0
- package/ansible/ubuntu/tasks/recovery.yml +16 -2
- package/ansible/ubuntu/tasks/resources.yml +25 -2
- package/ansible/ubuntu/tasks/unattended-upgrades.yml +24 -6
- package/ansible/ubuntu/tasks/updates.yml +59 -0
- package/ansible/ubuntu/wip-guard.py +141 -14
- package/bootstrap/doctor.ts +0 -4
- package/bootstrap/project-action.sh +4 -5
- package/bootstrap/shell-path.ts +17 -19
- package/cliproxy/README.md +5 -6
- package/cliproxy/config.template.yaml +1 -15
- package/cliproxy/docs/health-workflow.example.yml +6 -6
- package/cliproxy/docs/model-health.md +8 -8
- package/cliproxy/scripts/accounts.py +3 -4
- package/cliproxy/scripts/fleet_sync.py +2 -13
- package/cliproxy/scripts/ops +3 -21
- package/docs/authentication.md +21 -26
- package/docs/convergence.md +28 -32
- package/docs/declared.md +30 -31
- package/docs/durability.md +9 -0
- package/docs/github.md +0 -9
- package/docs/machine-setup.md +16 -17
- package/docs/manager-recovery.md +0 -2
- package/docs/operations.md +12 -11
- package/docs/releasing.md +18 -21
- package/docs/runbooks.md +22 -78
- package/docs/support-matrix.md +1 -1
- package/docs/ubuntu-sync.md +71 -65
- package/docs/worker-contract.md +112 -15
- package/examples/fleet.json +0 -1
- package/llms.txt +0 -2
- package/mise.lock +206 -780
- package/mise.toml +12 -27
- package/package.json +5 -6
- package/schema/check-ids.json +41 -482
- package/schema/fleet.schema.json +6 -57
- package/schema/roster.schema.json +0 -2
- package/src/agent-session-limit.ts +2 -7
- package/src/auth-checks.ts +1 -3
- package/src/check-owners.ts +0 -13
- package/src/check-registry.ts +13 -72
- package/src/cli/agent-guide.ts +3 -16
- package/src/cli/command-index.ts +0 -12
- package/src/cli/fleet-sync-manager.ts +4 -146
- package/src/cli/fleet-sync-output.ts +1 -4
- package/src/cli/fleet-sync-plan.ts +1 -24
- package/src/cli/fleet-sync-remote.ts +2 -1
- package/src/cli/fleet-sync-vault.ts +1 -2
- package/src/cli/fleet-sync.ts +8 -44
- package/src/cli/fleet.ts +1 -2
- package/src/cli/program.ts +3 -14
- package/src/cli/register-fleet.ts +1 -55
- package/src/cli/registry.ts +1 -43
- package/src/config.ts +0 -2
- package/src/definition.ts +8 -83
- package/src/fleet-config.ts +1 -1
- package/src/ide/definition.ts +2 -29
- package/src/ide/super.ts +4 -35
- package/src/ide/t3.ts +9 -38
- package/src/manager-sync.ts +1 -1
- package/src/node-converge-linux.ts +4 -47
- package/src/node-converge-shared.ts +1 -22
- package/src/{agents/toolchain.ts → pinned-path.ts} +0 -17
- package/src/platform/agent-oom-check.ts +104 -0
- package/src/platform/t3-policy.ts +23 -36
- package/src/platform/t3-service.ts +117 -0
- package/src/platform/wip-guard-check.ts +65 -0
- package/src/remote-entry.ts +2 -41
- package/src/repair-catalog.ts +0 -30
- package/src/schedule-check.ts +17 -4
- package/src/service-auth.ts +0 -50
- package/src/state/litestream.ts +1 -1
- package/src/t3/retire-providers.ts +79 -0
- package/src/t3/version.ts +1 -1
- package/src/transport.ts +2 -6
- package/src/types.ts +0 -2
- package/src/version-parity.ts +0 -8
- package/src/worker-access-checks.ts +0 -75
- package/src/worker-host-checks.ts +78 -1
- package/src/worker-policy.ts +0 -2
- package/src/worker-readiness.ts +2 -0
- package/src/worker-sizing.ts +25 -0
- package/.mise/locks/azure-cli/2.93.0~a837e014/pyproject.toml +0 -5
- package/.mise/locks/azure-cli/2.93.0~a837e014/uv.lock +0 -2841
- package/.mise/locks/gemini/0.71.1~84aac8e6/aube-lock.yaml +0 -124
- package/.mise/locks/gemini/0.71.1~84aac8e6/package.json +0 -12
- package/agents/antigravity-proxy.ts +0 -3
- package/agents/audit.md +0 -88
- package/agents/bin/agy +0 -10
- package/agents/bin/antigravity +0 -10
- package/agents/bin/claude +0 -10
- package/agents/bin/codex +0 -10
- package/agents/bin/grok +0 -10
- package/agents/bin/opencode +0 -10
- package/agents/claude-proxy +0 -5
- package/agents/claude-proxy.ts +0 -3
- package/agents/codex-proxy.ts +0 -3
- package/agents/grok-proxy.ts +0 -3
- package/agents/managed-proxy.ts +0 -109
- package/agents/opencode-proxy.ts +0 -3
- package/agents/registry.json +0 -209
- package/agents/registry.schema.json +0 -149
- package/agents/setup.md +0 -158
- package/agents/t3.json +0 -40
- package/ansible/agents/agents.yml +0 -135
- package/ansible/agents/commands.yml +0 -32
- package/ansible/agents/receipts.yml +0 -19
- package/ansible/agents/templates/antigravity.settings.json.j2 +0 -3
- package/ansible/agents/templates/claude.settings.json.j2 +0 -3
- package/ansible/agents/templates/codex.config.toml.j2 +0 -11
- package/ansible/agents/templates/gemini.settings.json.j2 +0 -14
- package/ansible/agents/templates/grok.config.toml.j2 +0 -25
- package/ansible/agents/templates/opencode.json.j2 +0 -24
- package/ansible/agents/templates/receipt.json.j2 +0 -10
- package/ansible/t3/provider-keys.yml +0 -24
- package/docs/accounts.md +0 -256
- package/src/accounts/checks.ts +0 -226
- package/src/accounts/context.ts +0 -77
- package/src/accounts/propagate.ts +0 -62
- package/src/accounts/roster.ts +0 -112
- package/src/accounts/selection.ts +0 -67
- package/src/accounts/sessions.ts +0 -354
- package/src/agents/account-relay.ts +0 -279
- package/src/agents/accounts.ts +0 -94
- package/src/agents/admission.ts +0 -65
- package/src/agents/audit.ts +0 -77
- package/src/agents/cli.ts +0 -13
- package/src/agents/command.ts +0 -257
- package/src/agents/commands.ts +0 -127
- package/src/agents/converge.ts +0 -339
- package/src/agents/doctor.ts +0 -107
- package/src/agents/errors.ts +0 -2
- package/src/agents/files.ts +0 -43
- package/src/agents/fleet-verify.ts +0 -195
- package/src/agents/launch.ts +0 -361
- package/src/agents/native-verify.ts +0 -738
- package/src/agents/provider-errors.ts +0 -57
- package/src/agents/registry.ts +0 -61
- package/src/agents/render.ts +0 -121
- package/src/agents/round-trip.ts +0 -192
- package/src/agents/secrets.ts +0 -48
- package/src/agents/verify-cache.ts +0 -164
- package/src/agents/verify.ts +0 -129
- package/src/cli/fleet-accounts.ts +0 -294
- package/src/cli/fleet-sync-accounts.ts +0 -62
- package/src/cli/node-deployment.ts +0 -34
- package/src/cli/node-sync.ts +0 -121
- package/src/cli/node-t3.ts +0 -35
- package/src/cli/t3/command.ts +0 -91
- package/src/cli/t3/register.ts +0 -56
- package/src/configure.ts +0 -271
- package/src/github/copilot.ts +0 -54
- package/src/t3/accounts.ts +0 -90
- package/src/t3/antigravity.ts +0 -93
- package/src/t3/desired.ts +0 -174
- package/src/t3/diagnostics.ts +0 -42
- package/src/t3/models.ts +0 -354
- package/src/t3/names-check.ts +0 -53
- package/src/t3/names.ts +0 -155
- package/src/t3/plan.ts +0 -106
- package/src/t3/provider-keys.ts +0 -49
- package/src/t3/providers.ts +0 -102
- package/src/t3/reconcile.ts +0 -133
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"title": "Personal portable agent registry",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["version", "defaults", "proxy", "nodes", "tools"],
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"properties": {
|
|
8
|
-
"$schema": {
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"version": {
|
|
12
|
-
"const": 1
|
|
13
|
-
},
|
|
14
|
-
"defaults": {
|
|
15
|
-
"type": "object"
|
|
16
|
-
},
|
|
17
|
-
"proxy": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"required": ["models"],
|
|
20
|
-
"properties": {
|
|
21
|
-
"models": {
|
|
22
|
-
"type": "object"
|
|
23
|
-
},
|
|
24
|
-
"accounts": {
|
|
25
|
-
"description": "Tools T3 offers once per signed-in proxy account. Accounts are never listed here: they are discovered from the proxy's model list. provider is the proxy credential type that serves the tool; models are the preferred defaults in order: an account defaults to the first one it serves, and to the first model it serves by name when it serves none of them, which t3:models reports (Claude: opus, sonnet, haiku).",
|
|
26
|
-
"type": "object",
|
|
27
|
-
"additionalProperties": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"required": ["provider", "models"],
|
|
30
|
-
"additionalProperties": false,
|
|
31
|
-
"properties": {
|
|
32
|
-
"provider": {
|
|
33
|
-
"type": "string",
|
|
34
|
-
"pattern": "^[a-z][a-z0-9]{0,30}$"
|
|
35
|
-
},
|
|
36
|
-
"models": {
|
|
37
|
-
"type": "array",
|
|
38
|
-
"minItems": 1,
|
|
39
|
-
"items": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"pattern": "^[a-zA-Z0-9_.:+-]+$"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"nodes": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"propertyNames": {
|
|
52
|
-
"pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
|
|
53
|
-
},
|
|
54
|
-
"additionalProperties": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"additionalProperties": false,
|
|
57
|
-
"properties": {
|
|
58
|
-
"codex": {
|
|
59
|
-
"type": "object",
|
|
60
|
-
"additionalProperties": false,
|
|
61
|
-
"properties": {
|
|
62
|
-
"direct": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
65
|
-
},
|
|
66
|
-
"proxy": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"claude": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"additionalProperties": false,
|
|
75
|
-
"properties": {
|
|
76
|
-
"direct": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
79
|
-
},
|
|
80
|
-
"proxy": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"opencode": {
|
|
87
|
-
"type": "object",
|
|
88
|
-
"additionalProperties": false,
|
|
89
|
-
"properties": {
|
|
90
|
-
"direct": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
93
|
-
},
|
|
94
|
-
"proxy": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"gemini": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"additionalProperties": false,
|
|
103
|
-
"properties": {
|
|
104
|
-
"direct": {
|
|
105
|
-
"type": "string",
|
|
106
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
107
|
-
},
|
|
108
|
-
"proxy": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"grok": {
|
|
115
|
-
"type": "object",
|
|
116
|
-
"additionalProperties": false,
|
|
117
|
-
"properties": {
|
|
118
|
-
"direct": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
121
|
-
},
|
|
122
|
-
"proxy": {
|
|
123
|
-
"type": "string",
|
|
124
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"antigravity": {
|
|
129
|
-
"type": "object",
|
|
130
|
-
"additionalProperties": false,
|
|
131
|
-
"properties": {
|
|
132
|
-
"direct": {
|
|
133
|
-
"type": "string",
|
|
134
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
135
|
-
},
|
|
136
|
-
"proxy": {
|
|
137
|
-
"type": "string",
|
|
138
|
-
"pattern": "^[a-zA-Z0-9_./:+-]+$"
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
"tools": {
|
|
146
|
-
"type": "object"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
package/agents/setup.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Bugs and feature requests
|
|
2
|
-
|
|
3
|
-
This file ships inside the homelab package. If you are an agent working in
|
|
4
|
-
another project and homelab is wrong or lacks something, do not edit it
|
|
5
|
-
here, in a clone or on a machine. Raise an issue in the homelab repository;
|
|
6
|
-
`homelab --help` prints the address and `homelab commands --json` carries
|
|
7
|
-
the rule under `agent.support`.
|
|
8
|
-
|
|
9
|
-
# Manager-led Ubuntu fleet setup
|
|
10
|
-
|
|
11
|
-
For the enrolled Ubuntu development fleet, run on the designated manager:
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
homelab converge
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Read the [Fleet operator guide](../../fleet/docs/ubuntu-sync.md) for enrollment,
|
|
18
|
-
approved revisions, bootstrap, provider checks and unresolved release gates.
|
|
19
|
-
Routine fleet updates do not require a command sequence on individual nodes.
|
|
20
|
-
The legacy local commands below retain their existing behavior for compatibility.
|
|
21
|
-
|
|
22
|
-
# Developer fleet configuration setup
|
|
23
|
-
|
|
24
|
-
Use **personal** for node and T3 configuration. Workstation and fleet are internal
|
|
25
|
-
implementation packages; neither exports its own executable.
|
|
26
|
-
|
|
27
|
-
`converge` installs the `homelab` launcher on every machine it converges,
|
|
28
|
-
linked to the fleet-owned checkout of the applied revision. On such a machine:
|
|
29
|
-
|
|
30
|
-
```sh
|
|
31
|
-
homelab check
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
`converge-local` reconciles one machine from a checkout of homelab
|
|
35
|
-
(`--workspace PATH` or `PERSONAL_WORKSPACE` names it). It is for development:
|
|
36
|
-
run from the published package it is refused, because `converge` does the
|
|
37
|
-
same from a checkout it owns.
|
|
38
|
-
Each machine still needs its own authorized Vault session, SSH keys and T3 pairing.
|
|
39
|
-
The sync never copies them or provisions infrastructure.
|
|
40
|
-
|
|
41
|
-
## Reconciliation
|
|
42
|
-
|
|
43
|
-
`converge-local` applies by invocation. It reconciles the locked toolchain, installs
|
|
44
|
-
one `personal` launcher, retires the repository-owned `ws` launcher, upserts the
|
|
45
|
-
Codex proxy profile, and reconciles T3 provider instances. `--dry-run` lists these
|
|
46
|
-
steps without writing or installing. The default node ID is the normalized hostname;
|
|
47
|
-
use `--id NAME` to retain an existing node's registry overrides.
|
|
48
|
-
|
|
49
|
-
The selected revision defaults to checkout HEAD. `--revision FULL_SHA` pins a
|
|
50
|
-
reviewed commit already fetched into that checkout. Deployment uses a clean Git
|
|
51
|
-
worktree and preserves developer edits. For whole-fleet maintenance, use the manager command above; this legacy local route does not orchestrate other nodes. A failed step stops later steps and reports
|
|
52
|
-
partial progress; it never claims authentication or inference was verified.
|
|
53
|
-
|
|
54
|
-
Portable models live in `agents/registry.json`; T3 desired provider instances live
|
|
55
|
-
in `agents/t3.json`. Edit these tracked definitions and deploy a reviewed revision.
|
|
56
|
-
New sessions use the updated configuration. Running sessions are not restarted.
|
|
57
|
-
|
|
58
|
-
## T3 plan, apply, import and cleanup
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
homelab t3-reconcile --dry-run --json
|
|
62
|
-
homelab t3-reconcile
|
|
63
|
-
homelab t3
|
|
64
|
-
homelab t3-remove --dry-run
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Plans show create/update/delete/unchanged/conflict by instance ID, with no settings
|
|
68
|
-
values or credentials. `homelab t3-reconcile --plan-hash HASH` binds apply to the exact
|
|
69
|
-
settings, ownership state, desired definitions and destination reviewed in a plan.
|
|
70
|
-
A stale plan fails. A second apply with identical inputs performs no settings write.
|
|
71
|
-
|
|
72
|
-
A provider instance becomes managed when created by personal, or explicitly imported:
|
|
73
|
-
|
|
74
|
-
```sh
|
|
75
|
-
homelab t3-reconcile --import personal_grok_proxy
|
|
76
|
-
homelab t3-reconcile
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Import grants ownership of the entire named provider instance. It does not change
|
|
80
|
-
its settings immediately. Subsequent applies reconcile that instance to the tracked
|
|
81
|
-
definition, including removal of extra fields. Existing unowned instances cause a
|
|
82
|
-
conflict, even when their names match. Unrelated instances and settings are preserved.
|
|
83
|
-
|
|
84
|
-
Removing an instance from the desired definition removes it on the next apply.
|
|
85
|
-
`homelab t3-remove` removes **all owned provider instances** while retaining
|
|
86
|
-
threads, projects, pairing, native provider instances, credentials and profile files.
|
|
87
|
-
It does not delete T3's data directory or secret store. Historical threads may need
|
|
88
|
-
a replacement provider selected after their managed instance is removed.
|
|
89
|
-
|
|
90
|
-
`--t3-home PATH` selects a T3 base directory (otherwise T3CODE_HOME or ~/.t3).
|
|
91
|
-
`--definition FILE` selects a version-1 desired definition. Supported interpolation
|
|
92
|
-
is `${workspace}`, `${agents}` and `${node}`. The current schema deliberately supports
|
|
93
|
-
the verified Codex proxy adapter fields; it rejects inline credential definitions.
|
|
94
|
-
T3 proxy execution requires macOS/Linux/WSL; native Windows execution is unverified.
|
|
95
|
-
|
|
96
|
-
## State and concurrency
|
|
97
|
-
|
|
98
|
-
T3 owns `userdata/settings.json`. Personal merges only its declared instances and
|
|
99
|
-
stores IDs in `userdata/personal-managed.json`, with mode 0600. Private settings and
|
|
100
|
-
state backups sit beside that file. They may contain existing secret references or
|
|
101
|
-
values and must never enter Git or reports. Symlink/malformed destinations fail.
|
|
102
|
-
|
|
103
|
-
Personal operations use an exclusive lock, atomic replacement, pre-write freshness
|
|
104
|
-
checks and post-write verification. T3's own theme CLI uses the same optimistic
|
|
105
|
-
external-file update pattern; T3 does not honor personal's lock. Avoid concurrent
|
|
106
|
-
Settings edits during apply: there is no cross-process atomic compare-and-swap with
|
|
107
|
-
T3. No strict transaction across application and ownership files is claimed. Ownership
|
|
108
|
-
intent is saved before settings so interrupted creates/removals can be retried.
|
|
109
|
-
Inspect interrupted operations before removing a stale `.lock` directory.
|
|
110
|
-
|
|
111
|
-
T3's installed server source at revision
|
|
112
|
-
`322f6544dfad0a3c8a0c8cbecf2c7f7874b14268` was inspected for provider-instance shape,
|
|
113
|
-
external settings watch/reload, and optimistic CLI writes. Future T3 schema changes
|
|
114
|
-
require adapter verification. A disk-level success is not a live inference test.
|
|
115
|
-
|
|
116
|
-
## Supported alternatives
|
|
117
|
-
|
|
118
|
-
`PROVIDER_PROTOCOL_INCOMPATIBLE` means the gateway answered that it has no
|
|
119
|
-
endpoint, method or media type for the protocol a route speaks (HTTP 404, 405,
|
|
120
|
-
415 or 501). The route as declared cannot work, so the check fails and the
|
|
121
|
-
sync exits nonzero; signing in again or retrying changes nothing. Nothing on
|
|
122
|
-
the machine is changed to work around it.
|
|
123
|
-
|
|
124
|
-
The protocol a tool speaks to the proxy is its `proxy` field in
|
|
125
|
-
`agents/registry.json` (`responses`, `messages`, `generateContent` or
|
|
126
|
-
`chat_completions`). The supported alternatives, in this order:
|
|
127
|
-
|
|
128
|
-
1. A model the proxy lists at `/v1/models` for the same protocol: change the
|
|
129
|
-
tool's model in `agents/registry.json`.
|
|
130
|
-
2. Another protocol the tool's own CLI speaks and the pinned proxy serves.
|
|
131
|
-
`chat_completions` is served for OpenAI-compatible clients such as
|
|
132
|
-
OpenCode and Grok.
|
|
133
|
-
3. The tool's direct profile, signed in natively on that machine, instead of
|
|
134
|
-
the shared proxy.
|
|
135
|
-
|
|
136
|
-
Each is a reviewed change to a tracked file, followed by `homelab
|
|
137
|
-
converge`. A newer CLIProxyAPI is a reviewed change to
|
|
138
|
-
`cliproxy/image.lock.json`; a sync never upgrades it to get around a failure.
|
|
139
|
-
|
|
140
|
-
A model that is merely missing from the catalog is `PROVIDER_MODEL_UNAVAILABLE`
|
|
141
|
-
instead: a warning, because it is usually the provider account's (billing or
|
|
142
|
-
access), not the route's.
|
|
143
|
-
|
|
144
|
-
## Other local operations
|
|
145
|
-
|
|
146
|
-
All former workstation operations are available through `homelab`:
|
|
147
|
-
|
|
148
|
-
```sh
|
|
149
|
-
homelab tools check --json
|
|
150
|
-
bun src/agents/cli.ts agents verify --node NODE --tool codex --profile proxy --json
|
|
151
|
-
homelab opencode sync
|
|
152
|
-
homelab net check
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
`homelab check` diagnoses the manager and registered remote nodes.
|
|
156
|
-
`homelab tailnet` lists visible Tailscale computers. The local SSH roster
|
|
157
|
-
still requires real aliases and checkout paths; discovery never guesses these.
|
|
158
|
-
Use `personal commands --json` to discover the complete interface.
|
package/agents/t3.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"instances": {
|
|
4
|
-
"personal_gateway_models": {
|
|
5
|
-
"driver": "opencode",
|
|
6
|
-
"displayName": "OpenCode CLI Proxy",
|
|
7
|
-
"enabled": true,
|
|
8
|
-
"config": {
|
|
9
|
-
"binaryPath": "${workspace}/agents/opencode-proxy.ts"
|
|
10
|
-
},
|
|
11
|
-
"environment": [
|
|
12
|
-
{
|
|
13
|
-
"name": "WS_AGENT_NODE",
|
|
14
|
-
"value": "${node}",
|
|
15
|
-
"sensitive": false
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"personal_grok_proxy": {
|
|
20
|
-
"driver": "grok",
|
|
21
|
-
"displayName": "Grok CLI Proxy",
|
|
22
|
-
"enabled": true,
|
|
23
|
-
"config": {
|
|
24
|
-
"binaryPath": "${workspace}/agents/grok-proxy.ts"
|
|
25
|
-
},
|
|
26
|
-
"environment": [
|
|
27
|
-
{
|
|
28
|
-
"name": "WS_AGENT_NODE",
|
|
29
|
-
"value": "${node}",
|
|
30
|
-
"sensitive": false
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "XAI_API_KEY",
|
|
34
|
-
"value": "fleet-cli-proxy",
|
|
35
|
-
"sensitive": false
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# One agent CLI's dedicated profile (src/agents/converge.ts): its
|
|
3
|
-
# configuration files, rendered from templates/, and the receipt that records
|
|
4
|
-
# them. Written as the developer: no become. These files already exist on
|
|
5
|
-
# running machines and every byte of them is an interface; the templates
|
|
6
|
-
# render exactly what src/agents/render.ts specifies
|
|
7
|
-
# (features/agents/agent-configuration-templates.feature proves it).
|
|
8
|
-
#
|
|
9
|
-
# TypeScript decides beforehand: it refuses a file someone edited unless the
|
|
10
|
-
# person adopts it, names the files to back up first, and passes the SHA-256
|
|
11
|
-
# of each file as it must be written. A rendered file without that digest
|
|
12
|
-
# never replaces the one in place, the play measures every file again before
|
|
13
|
-
# it writes the receipt, so a receipt never vouches for a file it does not
|
|
14
|
-
# describe, and TypeScript measures the profile once more afterwards. A
|
|
15
|
-
# profile with nothing to change is not played at all. Variables arrive
|
|
16
|
-
# through a private 0600
|
|
17
|
-
# variables file, never argv; none of them is a secret (a profile names the
|
|
18
|
-
# variable that holds the proxy key, never the key).
|
|
19
|
-
- name: Render an agent CLI's dedicated profile
|
|
20
|
-
hosts: localhost
|
|
21
|
-
connection: local
|
|
22
|
-
become: false
|
|
23
|
-
gather_facts: false
|
|
24
|
-
vars:
|
|
25
|
-
# Where each CLI reads its configuration, relative to its profile.
|
|
26
|
-
agent_templates:
|
|
27
|
-
codex:
|
|
28
|
-
directories: []
|
|
29
|
-
files:
|
|
30
|
-
- { dest: config.toml, src: codex.config.toml.j2 }
|
|
31
|
-
claude:
|
|
32
|
-
directories: []
|
|
33
|
-
files:
|
|
34
|
-
- { dest: settings.json, src: claude.settings.json.j2 }
|
|
35
|
-
grok:
|
|
36
|
-
directories: []
|
|
37
|
-
files:
|
|
38
|
-
- { dest: config.toml, src: grok.config.toml.j2 }
|
|
39
|
-
antigravity:
|
|
40
|
-
directories: [.gemini, .gemini/antigravity-cli]
|
|
41
|
-
files:
|
|
42
|
-
- {
|
|
43
|
-
dest: .gemini/antigravity-cli/settings.json,
|
|
44
|
-
src: antigravity.settings.json.j2,
|
|
45
|
-
}
|
|
46
|
-
gemini:
|
|
47
|
-
directories: [.gemini]
|
|
48
|
-
files:
|
|
49
|
-
- { dest: .gemini/settings.json, src: gemini.settings.json.j2 }
|
|
50
|
-
opencode:
|
|
51
|
-
directories: []
|
|
52
|
-
files:
|
|
53
|
-
- { dest: opencode.json, src: opencode.json.j2 }
|
|
54
|
-
agent_profile_directory: '{{ agent_root }}/{{ agent_node }}/{{ agent_tool }}/{{ agent_profile }}'
|
|
55
|
-
agent_spec: '{{ agent_templates[agent_tool] }}'
|
|
56
|
-
tasks:
|
|
57
|
-
- name: Require one known profile of one plain machine name
|
|
58
|
-
ansible.builtin.assert:
|
|
59
|
-
that:
|
|
60
|
-
- agent_root is match('^/')
|
|
61
|
-
- agent_node is match('^[a-z0-9][a-z0-9-]{0,62}$')
|
|
62
|
-
- agent_tool in agent_templates
|
|
63
|
-
- agent_profile in ['direct', 'proxy']
|
|
64
|
-
- agent_model is match('^[a-zA-Z0-9_./:+-]+$')
|
|
65
|
-
- agent_revision is match('^[a-f0-9]{40}$')
|
|
66
|
-
- agent_fingerprint is match('^[a-f0-9]{64}$')
|
|
67
|
-
- agent_profile == 'direct' or agent_proxy_endpoint is match('^https?://')
|
|
68
|
-
- agent_files.keys() | sort == agent_spec.files | map(attribute='dest') | sort
|
|
69
|
-
fail_msg: AGENT_PROFILE_REQUEST_INVALID; homelab passes a validated selection and the digest of every file it renders.
|
|
70
|
-
- name: Create the profile directories
|
|
71
|
-
ansible.builtin.file:
|
|
72
|
-
path: '{{ item }}'
|
|
73
|
-
state: directory
|
|
74
|
-
mode: '0700'
|
|
75
|
-
loop: "{{ [agent_root ~ '/' ~ agent_node, agent_root ~ '/' ~ agent_node ~ '/' ~ agent_tool, agent_profile_directory] + (agent_spec.directories | map('regex_replace', '^', agent_profile_directory ~ '/') | list) }}"
|
|
76
|
-
# Only what TypeScript names: a file someone edited and the person
|
|
77
|
-
# adopted, or a managed file that changes.
|
|
78
|
-
- name: Create the backup directory
|
|
79
|
-
ansible.builtin.file:
|
|
80
|
-
path: '{{ agent_root }}/backups'
|
|
81
|
-
state: directory
|
|
82
|
-
mode: '0700'
|
|
83
|
-
when: agent_backups | length > 0
|
|
84
|
-
- name: Back up a file before it is replaced
|
|
85
|
-
ansible.builtin.copy:
|
|
86
|
-
src: '{{ item.source }}'
|
|
87
|
-
dest: '{{ item.dest }}'
|
|
88
|
-
remote_src: true
|
|
89
|
-
force: false
|
|
90
|
-
mode: '0600'
|
|
91
|
-
loop: '{{ agent_backups }}'
|
|
92
|
-
loop_control:
|
|
93
|
-
label: '{{ item.dest | basename }}'
|
|
94
|
-
# A rendered file replaces the one in place only when it has the digest
|
|
95
|
-
# homelab specified: a template that drifted never reaches a machine.
|
|
96
|
-
- name: Render the configuration files
|
|
97
|
-
ansible.builtin.template:
|
|
98
|
-
src: '{{ item.src }}'
|
|
99
|
-
dest: '{{ agent_profile_directory }}/{{ item.dest }}'
|
|
100
|
-
mode: '0600'
|
|
101
|
-
validate: >-
|
|
102
|
-
{{ ansible_playbook_python | quote }} -c 'import hashlib, sys;
|
|
103
|
-
sys.exit(None if hashlib.sha256(open(sys.argv[1], "rb").read()).hexdigest() == sys.argv[2]
|
|
104
|
-
else "AGENT_PROFILE_RENDER_MISMATCH; the template and src/agents/render.ts disagree.")'
|
|
105
|
-
%s {{ agent_files[item.dest] | quote }}
|
|
106
|
-
loop: '{{ agent_spec.files }}'
|
|
107
|
-
loop_control:
|
|
108
|
-
label: '{{ item.dest }}'
|
|
109
|
-
- name: Measure what was written
|
|
110
|
-
ansible.builtin.stat:
|
|
111
|
-
path: '{{ agent_profile_directory }}/{{ item.dest }}'
|
|
112
|
-
checksum_algorithm: sha256
|
|
113
|
-
loop: '{{ agent_spec.files }}'
|
|
114
|
-
loop_control:
|
|
115
|
-
label: '{{ item.dest }}'
|
|
116
|
-
register: agent_written
|
|
117
|
-
when: not ansible_check_mode
|
|
118
|
-
- name: Require every file to be byte for byte what homelab specifies
|
|
119
|
-
ansible.builtin.assert:
|
|
120
|
-
that:
|
|
121
|
-
- item.stat.checksum == agent_files[item.item.dest]
|
|
122
|
-
fail_msg: AGENT_PROFILE_RENDER_MISMATCH; the template and src/agents/render.ts disagree. No receipt was written.
|
|
123
|
-
quiet: true
|
|
124
|
-
loop: '{{ agent_written.results }}'
|
|
125
|
-
loop_control:
|
|
126
|
-
label: '{{ item.item.dest }}'
|
|
127
|
-
when: not ansible_check_mode
|
|
128
|
-
# A template, not copy's content: before 2.19, Ansible turns a task
|
|
129
|
-
# argument that reads as JSON into data and writes it back reformatted.
|
|
130
|
-
- name: Record the receipt of the profile
|
|
131
|
-
tags: [receipt]
|
|
132
|
-
ansible.builtin.template:
|
|
133
|
-
src: receipt.json.j2
|
|
134
|
-
dest: '{{ agent_profile_directory }}/receipt.json'
|
|
135
|
-
mode: '0600'
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# The agent commands of a worker (src/agents/commands.ts). On a worker
|
|
3
|
-
# `claude`, `codex` and the others are the fleet's launchers, tracked under
|
|
4
|
-
# agents/bin, which sign in through the CLI proxy: one link beside the applied
|
|
5
|
-
# revision points at that revision's launchers through `current`, and every
|
|
6
|
-
# shell of the worker has the link first on its PATH (bootstrap/shell-path.ts).
|
|
7
|
-
# Written as the developer: no become.
|
|
8
|
-
#
|
|
9
|
-
# TypeScript decides beforehand: it refuses anything in the link's place that
|
|
10
|
-
# is not a link, plays this only when the link is missing or points elsewhere,
|
|
11
|
-
# and measures the link afterwards. The path and its target are an interface:
|
|
12
|
-
# every shell profile of every worker names the path.
|
|
13
|
-
- name: Link a worker's agent commands to the applied revision's launchers
|
|
14
|
-
hosts: localhost
|
|
15
|
-
connection: local
|
|
16
|
-
become: false
|
|
17
|
-
gather_facts: false
|
|
18
|
-
tasks:
|
|
19
|
-
- name: Require the link homelab names
|
|
20
|
-
ansible.builtin.assert:
|
|
21
|
-
that:
|
|
22
|
-
- agent_commands_link is match('^/.+/agent-commands$')
|
|
23
|
-
- agent_commands_target == 'current/agents/bin'
|
|
24
|
-
fail_msg: AGENT_COMMANDS_REQUEST_INVALID; homelab passes the link beside the applied revision and its fixed target.
|
|
25
|
-
- name: Link the agent commands
|
|
26
|
-
ansible.builtin.file:
|
|
27
|
-
src: '{{ agent_commands_target }}'
|
|
28
|
-
dest: '{{ agent_commands_link }}'
|
|
29
|
-
state: link
|
|
30
|
-
# The target is relative to the link and follows `current`.
|
|
31
|
-
follow: false
|
|
32
|
-
force: true
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
- name: Advance revision evidence for verified agent profiles
|
|
3
|
-
hosts: localhost
|
|
4
|
-
connection: local
|
|
5
|
-
become: false
|
|
6
|
-
gather_facts: false
|
|
7
|
-
tasks:
|
|
8
|
-
- name: Record the receipt of each unchanged profile
|
|
9
|
-
ansible.builtin.template:
|
|
10
|
-
src: receipt.json.j2
|
|
11
|
-
dest: '{{ item.dest }}'
|
|
12
|
-
mode: '0600'
|
|
13
|
-
vars:
|
|
14
|
-
agent_revision: '{{ item.revision }}'
|
|
15
|
-
agent_fingerprint: '{{ item.fingerprint }}'
|
|
16
|
-
agent_files: '{{ item.files }}'
|
|
17
|
-
loop: '{{ receipts }}'
|
|
18
|
-
loop_control:
|
|
19
|
-
label: '{{ item.dest }}'
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
model = {{ agent_model | to_json }}
|
|
2
|
-
{% if agent_profile == 'proxy' %}
|
|
3
|
-
model_provider = "personal_proxy"
|
|
4
|
-
[model_providers.personal_proxy]
|
|
5
|
-
name = "Personal CLI Proxy"
|
|
6
|
-
base_url = {{ (agent_proxy_endpoint ~ '/v1') | to_json }}
|
|
7
|
-
env_key = "CLIPROXY_API_KEY"
|
|
8
|
-
wire_api = "responses"
|
|
9
|
-
requires_openai_auth = false
|
|
10
|
-
supports_websockets = false
|
|
11
|
-
{% endif %}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[cli]
|
|
2
|
-
auto_update = false
|
|
3
|
-
installer = "internal"
|
|
4
|
-
|
|
5
|
-
[marketplace]
|
|
6
|
-
default_skills_installs_purged = true
|
|
7
|
-
|
|
8
|
-
[models]
|
|
9
|
-
{% if agent_profile == 'proxy' %}
|
|
10
|
-
default = "personal-proxy"
|
|
11
|
-
|
|
12
|
-
[model.personal-proxy]
|
|
13
|
-
model = {{ agent_model | to_json }}
|
|
14
|
-
name = {{ (agent_model ~ ' (Personal CLI Proxy)') | to_json }}
|
|
15
|
-
base_url = {{ (agent_proxy_endpoint ~ '/v1') | to_json }}
|
|
16
|
-
env_key = "CLIPROXY_API_KEY"
|
|
17
|
-
api_backend = "chat_completions"
|
|
18
|
-
{% else %}
|
|
19
|
-
default = {{ agent_model | to_json }}
|
|
20
|
-
{% endif %}
|
|
21
|
-
|
|
22
|
-
[ui]
|
|
23
|
-
max_thoughts_width = 120
|
|
24
|
-
yolo = false
|
|
25
|
-
compact_mode = false
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://opencode.ai/config.json",
|
|
3
|
-
{% if agent_profile == 'proxy' %}
|
|
4
|
-
"model": {{ ('personal_proxy/' ~ agent_model) | to_json }},
|
|
5
|
-
"provider": {
|
|
6
|
-
"personal_proxy": {
|
|
7
|
-
"npm": "@ai-sdk/openai",
|
|
8
|
-
"options": {
|
|
9
|
-
"baseURL": {{ (agent_proxy_endpoint ~ '/v1') | to_json }},
|
|
10
|
-
"apiKey": "{env:CLIPROXY_API_KEY}"
|
|
11
|
-
},
|
|
12
|
-
"models": {
|
|
13
|
-
{% for id in (agent_proxy_models + [agent_model]) | unique %}
|
|
14
|
-
{{ id | to_json }}: {
|
|
15
|
-
"name": {{ id | to_json }}
|
|
16
|
-
}{{ '' if loop.last else ',' }}
|
|
17
|
-
{% endfor %}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
{% else %}
|
|
22
|
-
"model": {{ agent_model | to_json }}
|
|
23
|
-
{% endif %}
|
|
24
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"revision": {{ agent_revision | to_json }},
|
|
4
|
-
"fingerprint": {{ agent_fingerprint | to_json }},
|
|
5
|
-
"files": {
|
|
6
|
-
{% for name, sha256 in agent_files.items() %}
|
|
7
|
-
{{ name | to_json }}: {{ sha256 | to_json }}{{ '' if loop.last else ',' }}
|
|
8
|
-
{% endfor %}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
- name: Reconcile managed Antigravity credentials in the local T3 secret store
|
|
3
|
-
hosts: localhost
|
|
4
|
-
connection: local
|
|
5
|
-
gather_facts: false
|
|
6
|
-
tasks:
|
|
7
|
-
- name: Keep the per-user T3 secret store private
|
|
8
|
-
ansible.builtin.file:
|
|
9
|
-
path: '{{ t3_keys_dir }}'
|
|
10
|
-
state: directory
|
|
11
|
-
mode: '0700'
|
|
12
|
-
- name: Install the local proxy client credential for each declared instance
|
|
13
|
-
ansible.builtin.copy:
|
|
14
|
-
content: '{{ t3_client_key }}'
|
|
15
|
-
dest: '{{ t3_keys_dir }}/{{ item }}'
|
|
16
|
-
mode: '0600'
|
|
17
|
-
loop: '{{ t3_active_keys }}'
|
|
18
|
-
no_log: true
|
|
19
|
-
diff: false
|
|
20
|
-
- name: Forget retired managed instance credentials
|
|
21
|
-
ansible.builtin.file:
|
|
22
|
-
path: '{{ t3_keys_dir }}/{{ item }}'
|
|
23
|
-
state: absent
|
|
24
|
-
loop: '{{ t3_retired_keys }}'
|