@crvouga/homelab 0.22.1 → 0.23.1

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/docs/accounts.md CHANGED
@@ -118,6 +118,37 @@ otherwise.
118
118
  its tool's preferred defaults (it then starts on its first model by name) or
119
119
  nothing of T3's catalogue.
120
120
 
121
+ ## When T3 asks for sign-in on several machines
122
+
123
+ Start on the manager, in the project that pins homelab. To list the sign-ins
124
+ that need attention across providers, run:
125
+
126
+ ```sh
127
+ npx @crvouga/homelab accounts --auth-plan --json
128
+ ```
129
+
130
+ If the command reports an error or the roster is unavailable, resolve that
131
+ before interpreting an empty list. For each result, check the current account
132
+ label with `homelab accounts` before renewing it. Use the provider's documented
133
+ sign-in method for the client, account plan and intended use. Where the
134
+ provider permits proxy access, renew the account once on the manager using
135
+ the command below. Complete consent and any MFA yourself. Homelab then
136
+ propagates the instance configuration to the workers. Where the provider
137
+ requires its own client, complete its sign-in there. A successful proxy login
138
+ alone does not establish permission to use a subscription through a proxy.
139
+
140
+ If T3 displays “Sign in with Google to see Antigravity limits” or asks
141
+ for a turn to renew limits, update the consumer project's homelab pin to
142
+ the release containing the T3 quota fix and run `homelab converge` on the
143
+ manager. Check the T3 version on the manager and each worker. An offline
144
+ worker needs to converge when it reconnects.
145
+
146
+ Google supports ACP for external Antigravity clients. The T3 release pinned
147
+ by homelab removes the native and proxy quota readers that called Google's
148
+ internal APIs. Antigravity subscription windows are unavailable in T3 until
149
+ Google exposes them over a supported interface. Use the official Antigravity
150
+ client for limits. [Upstream change](https://github.com/pingdotgg/t3code/pull/43026)
151
+
121
152
  ## Adding, signing in again, removing
122
153
 
123
154
  ```sh
package/docs/runbooks.md CHANGED
@@ -14,7 +14,7 @@ It reads a code by where it stands, never by the word it ends with. The CLI
14
14
  proxy documents the codes of its own commands in
15
15
  [its README](../cliproxy/README.md); the ones converge reports are here.
16
16
 
17
- There are 496 codes; 105 need a person.
17
+ There are 495 codes; 105 need a person.
18
18
 
19
19
  ## Bootstrap of a new or returning worker
20
20
 
@@ -355,7 +355,6 @@ runaway, write `1` to that agent scope’s `cgroup.kill`.
355
355
  - `T3_PROVIDERS_PENDING`: t3 providers pending.
356
356
  - `T3_RECONCILIATION_UNAVAILABLE`: a local reconciliation precondition failed. Follow the stage-specific remedy to inspect the receipt, installed definition or T3 settings and ownership record locally. Restore a valid backup or correct permissions, then retry `homelab t3-reconcile --dry-run`. Never share raw file contents.
357
357
  - `T3_ACCOUNT_ROSTER_UNAVAILABLE`: the proxy account roster could not be read. Run `homelab accounts` on the affected machine to verify proxy access and the proxy-client-key secret, then retry `homelab t3-reconcile --dry-run`. Existing providers are preserved. If access still fails, report this code without credentials.
358
- - `T3_QUOTA_COVERAGE_MISSING`: the manager could not match a hub quota reading to each declared Antigravity account. Check its T3 usage-limit source and the account on the proxy.
359
358
  - `T3_CLI_MISSING`: the provider check could not start the T3 CLI from PATH or its user installation. Restore the executable and rerun converge to verify the account sessions.
360
359
  - `T3_ANTIGRAVITY_SESSION_UNVERIFIED`: T3 could not open an authenticated ACP session for the reported account positions. Check that T3 is running on this machine, refresh those instances in Settings > Providers, and compare their proxy account session checks before rerunning converge.
361
360
  - `T3_PROVIDERS_UNVERIFIED`: provider reconciliation stopped before it could report a plan. The remedy is the authored cause (a stale plan, a held lock, or the credential playbook). An unexpected error stays out of the report, because it can carry a secret. Run `homelab t3-reconcile --dry-run` on the machine.
package/mise.toml CHANGED
@@ -107,16 +107,16 @@ mise_macos_x64_sha256 = "19c0e3dff9eddaab7a3519e9556be35580ade53b2bffb550f307343
107
107
  mise_macos_arm64_sha256 = "f7bd19aa4e6b7a58d7296f98e2c6af68b2e2643dfd608b0bc46c2b5fdbc8749b"
108
108
  # Official native server distribution (Ubuntu workers, and the manager's
109
109
  # pinned CLI); bootstrap/native-t3.ts owns installation. From the release's SHA256SUMS.
110
- t3_version = "0.1.12-nightly.20261123.5124"
111
- t3_linux_x64_sha256 = "851c285a8e59a713b00e94fed15c359b9624f58567adfdfbf002d498234580cd"
112
- t3_linux_arm64_sha256 = "a423986905f457d463fd76cbee85c4948fec9c31e9553df17cb648e3cef13771"
113
- t3_darwin_arm64_sha256 = "cf2f43cf972d6a07abb3200c8f181d8046659cc8a4842984c87fbf79d67d5071"
110
+ t3_version = "0.1.14-nightly.20261128.5372"
111
+ t3_linux_x64_sha256 = "ed47136d5696a6933038d0a6716e60269c5030bb2b64fae277c13d8e9d1b3022"
112
+ t3_linux_arm64_sha256 = "9cb327604bd56ad997b6827913ad292010f7f66da171ce8a9b46392a0a0d3ba5"
113
+ t3_darwin_arm64_sha256 = "a760a18dc24a6c49aa77e37d5a11c199897eb77295feffd14da40efa0fde70b9"
114
114
  # Official T3 Code desktop .deb (same release). Workers run this GUI app as their
115
115
  # only T3 process; it embeds the server. Upstream SHA256SUMS omits .deb files,
116
116
  # so these digests were computed from the release assets.
117
- t3_desktop_darwin_arm64_sha256 = "67ea227870abc7a8a70335a305c4bd506b34bc467c0612da760e202598031bc0"
118
- t3_desktop_amd64_sha256 = "167a47c94cde7881324970a336da3b2c95138f6492b563e1b928f34751827c7a"
119
- t3_desktop_arm64_sha256 = "66986a6501b0da8fd9e64e05de5e01e0c050ac208d1db86fac63a5343140812b"
117
+ t3_desktop_darwin_arm64_sha256 = "7b3b7003cf4cf23e684437e34c5536b82a2d84319d335e08b32e4134b6b8f2a9"
118
+ t3_desktop_amd64_sha256 = "ada83b8c7991fe04889fd163b70c33b11098856e1ffae1dd72b9f2e03fdc1bab"
119
+ t3_desktop_arm64_sha256 = "ab899391c7174d6990efb0de9d68472a2fc93c3ecc937d915b5ab789f765e92a"
120
120
  # Official AWS v2 Windows MSI, same version as tools.aws; checked before execution.
121
121
  aws_windows_msi_sha256 = "65b82923074b154e3ec5375716b886e3c5bd5483714cc94ba1e67a04dfbb6715"
122
122
  # Docker Desktop supplies the macOS engine, Compose and Buildx as one vendor bundle.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/homelab",
3
- "version": "0.22.1",
3
+ "version": "0.23.1",
4
4
  "description": "Keeps a set of development machines in sync: one manager and many workers",
5
5
  "license": "MIT",
6
6
  "repository": "github:crvouga/homelab",
@@ -73,5 +73,5 @@
73
73
  "engines": {
74
74
  "node": ">=22"
75
75
  },
76
- "gitHead": "52fed91e282a4986ddb86d29fb3e3aec603fc0fa"
76
+ "gitHead": "1bf7c07586f2fe5d89fbd58683e82c6221438316"
77
77
  }
@@ -1832,14 +1832,6 @@
1832
1832
  "manual": "Approve first T3 pairing in interactive converge or with t3.pairOnEnrollment; a replaced worker is paired by replace or the next converge, and converge applies the rest."
1833
1833
  }
1834
1834
  },
1835
- {
1836
- "id": "t3:quota-coverage",
1837
- "meaning": "The manager reads quota windows for each managed Antigravity account from its proxy.",
1838
- "severity": "required",
1839
- "repair": {
1840
- "manual": "Approve first T3 pairing in interactive converge or with t3.pairOnEnrollment; a replaced worker is paired by replace or the next converge, and converge applies the rest."
1841
- }
1842
- },
1843
1835
  {
1844
1836
  "id": "t3:reconciliation",
1845
1837
  "meaning": "T3 reconciliation can read and validate its local inputs.",
@@ -438,8 +438,6 @@ export const CHECK_MEANINGS: Record<string, string> = {
438
438
  'The proxy account roster can be read without changing providers.',
439
439
  't3:reconciliation':
440
440
  'T3 reconciliation can read and validate its local inputs.',
441
- 't3:quota-coverage':
442
- 'The manager reads quota windows for each managed Antigravity account from its proxy.',
443
441
  't3:providers': "T3's provider instances are the declared ones.",
444
442
  't3:running-version':
445
443
  'The running T3 server is the installed release and no restart of it is pending; a pending restart waits for running agent turns, until its deadline.',
@@ -20,6 +20,7 @@ import type { Settings } from './settings';
20
20
  import { fleetSync } from './fleet-sync';
21
21
 
22
22
  export interface FleetAccountsOptions {
23
+ authPlan?: boolean;
23
24
  diff?: boolean;
24
25
  add?: boolean;
25
26
  relogin?: boolean;
@@ -51,6 +52,7 @@ export async function fleetAccounts(
51
52
  settings: Settings,
52
53
  dependencies: AccountsDependencies = {}
53
54
  ): Promise<CommandOutcome> {
55
+ if (options.authPlan) return authPlan(options, args, settings, dependencies);
54
56
  const home = dependencies.home ?? homedir();
55
57
  if (options.removeNativeLogins)
56
58
  return removeNativeLogins(Boolean(options.yes), home);
@@ -62,6 +64,44 @@ export async function fleetAccounts(
62
64
  return report(options, settings, dependencies, { change, changed });
63
65
  }
64
66
 
67
+ async function authPlan(
68
+ options: FleetAccountsOptions,
69
+ args: string[],
70
+ settings: Settings,
71
+ dependencies: AccountsDependencies
72
+ ): Promise<CommandOutcome> {
73
+ if (
74
+ args.length ||
75
+ options.add ||
76
+ options.relogin ||
77
+ options.remove ||
78
+ options.removeNativeLogins ||
79
+ options.diff ||
80
+ options.yes
81
+ )
82
+ throw new FleetUsageError('Run --auth-plan on its own.');
83
+ const roster = await readRoster(
84
+ dependencies.run ?? runCommand,
85
+ settings.workspace
86
+ );
87
+ return {
88
+ exitCode: roster.managementApi ? 0 : 1,
89
+ data: {
90
+ version: 1,
91
+ command: 'accounts',
92
+ ok: roster.managementApi,
93
+ managementApi: roster.managementApi,
94
+ signIns: roster.accounts
95
+ .filter((account) => account.state === 'needs-login')
96
+ .map(({ provider, index }) => ({ provider, index })),
97
+ ...(!roster.managementApi && {
98
+ summary:
99
+ 'The proxy management API is unavailable. The sign-in plan may be incomplete.',
100
+ }),
101
+ },
102
+ };
103
+ }
104
+
65
105
  async function report(
66
106
  options: FleetAccountsOptions,
67
107
  settings: Settings,
@@ -7,7 +7,6 @@ import { toolchainChecks } from '../toolchain-checks';
7
7
  import { pinnedT3Version, versionCheck } from '../t3/version';
8
8
  import { liveServerVersion } from '../platform/t3-service';
9
9
  import { loopbackOrigin } from '../t3/local-rpc';
10
- import { managerQuotaCoverage } from '../t3/quota-coverage';
11
10
  import { quotaLimited, verifyFleetProviders } from '../agents/fleet-verify';
12
11
  import { verifyNativeAgents } from '../agents/native-verify';
13
12
  import { accountContext, nodeAccountChecks } from '../accounts/context';
@@ -267,12 +266,7 @@ async function managerSessions(
267
266
  })
268
267
  )
269
268
  );
270
- return [
271
- ...providers,
272
- ...roster,
273
- ...sessions,
274
- ...(await managerQuotaCoverage(accounts?.live ?? [], run)),
275
- ];
269
+ return [...providers, ...roster, ...sessions];
276
270
  }
277
271
 
278
272
  function playbookPassed(cached: boolean): Check {
@@ -669,6 +669,10 @@ function registerAccounts({ program, defaults, complete }: Registration) {
669
669
  'accounts [args...]',
670
670
  'List the provider accounts signed in on the CLI proxy and their state; add, sign in again or remove one'
671
671
  )
672
+ .option(
673
+ '--auth-plan',
674
+ 'List the provider accounts that require a sign-in on the manager'
675
+ )
672
676
  .option('--diff', 'Also compare what this machine offers with the roster')
673
677
  .option('--add', 'Sign a new account in: --add PROVIDER')
674
678
  .option('--relogin', 'Sign one account in again: --relogin PROVIDER INDEX')
@@ -147,18 +147,6 @@ const webTransport: T3Transport = {
147
147
  socket.onmessage = (event) => {
148
148
  try {
149
149
  const reply: unknown = JSON.parse(String(event.data));
150
- if (
151
- record(message) &&
152
- message['tag'] === 'subscribeServerConfig' &&
153
- record(reply) &&
154
- reply['requestId'] === id &&
155
- reply['_tag'] === 'Chunk'
156
- ) {
157
- const sources = quotaUpdate(reply['values']);
158
- if (sources) end(sources);
159
- else socket.send(JSON.stringify({ _tag: 'Ack', requestId: id }));
160
- return;
161
- }
162
150
  if (
163
151
  record(reply) &&
164
152
  reply['_tag'] === 'Exit' &&
@@ -174,25 +162,3 @@ const webTransport: T3Transport = {
174
162
  });
175
163
  },
176
164
  };
177
-
178
- function quotaUpdate(values: unknown): unknown[] | undefined {
179
- if (!Array.isArray(values)) return;
180
- for (const event of values) {
181
- if (!record(event)) continue;
182
- const config = event['config'];
183
- if (
184
- event['type'] === 'snapshot' &&
185
- record(config) &&
186
- Array.isArray(config['usageLimitSources'])
187
- )
188
- return config['usageLimitSources'];
189
- const payload = event['payload'];
190
- if (
191
- event['type'] === 'usageLimitSourcesUpdated' &&
192
- record(payload) &&
193
- Array.isArray(payload['sources'])
194
- )
195
- return payload['sources'];
196
- }
197
- return undefined;
198
- }
@@ -1,100 +0,0 @@
1
- import { record } from '../config';
2
- import type { Check, Runner } from '../types';
3
- import type { Account } from '../agents/accounts';
4
- import { registry } from '../agents/registry';
5
- import { localRpc } from './local-rpc';
6
-
7
- export async function managerQuotaCoverage(
8
- accounts: Account[],
9
- run: Runner
10
- ): Promise<Check[]> {
11
- const managed = accounts.filter((account) => account.tool === 'antigravity');
12
- if (!managed.length) return [];
13
- const sources = await localRpc(
14
- run,
15
- { tag: 'subscribeServerConfig', payload: { usageLimitSources: true } },
16
- [
17
- '--scope',
18
- 'orchestration:read',
19
- '--ttl',
20
- '2m',
21
- '--label',
22
- 'homelab quota check',
23
- ]
24
- );
25
- return [quotaCoverage(managed, registry.proxy.endpoint, sources)];
26
- }
27
-
28
- function fresh(value: unknown, now: number) {
29
- const age = typeof value === 'string' ? now - Date.parse(value) : NaN;
30
- return age >= 0 && age <= 15 * 60_000;
31
- }
32
-
33
- function accountKeys(account: unknown, now: number): string[] {
34
- if (!record(account) || account['driver'] !== 'antigravity') return [];
35
- const limits = account['usageLimits'];
36
- if (
37
- !record(limits) ||
38
- limits['unavailable'] ||
39
- !fresh(limits['checkedAt'], now) ||
40
- !Array.isArray(limits['windows']) ||
41
- !limits['windows'].length
42
- )
43
- return [];
44
- return [account['email'], account['id']]
45
- .filter((key): key is string => typeof key === 'string')
46
- .map((key) => key.replace(/\.json$/i, '').toLowerCase());
47
- }
48
-
49
- function matches(source: unknown, endpoint: string, now: number): unknown[] {
50
- if (
51
- !record(source) ||
52
- source['kind'] !== 'cliproxy' ||
53
- source['error'] ||
54
- !fresh(source['checkedAt'], now)
55
- )
56
- return [];
57
- const authority = source['endpoint'] ?? source['origin'];
58
- return typeof authority === 'string' &&
59
- authority.replace(/\/$/, '') === endpoint.replace(/\/$/, '') &&
60
- Array.isArray(source['accounts'])
61
- ? source['accounts']
62
- : [];
63
- }
64
-
65
- export function quotaCoverage(
66
- accounts: Account[],
67
- endpoint: string,
68
- sources: unknown,
69
- now = Date.now()
70
- ): Check {
71
- const covered = new Set(
72
- Array.isArray(sources)
73
- ? sources
74
- .flatMap((source) => matches(source, endpoint, now))
75
- .flatMap((account) => accountKeys(account, now))
76
- : []
77
- );
78
- const missing = accounts.flatMap((account, i) =>
79
- covered.has(account.email.toLowerCase()) ||
80
- covered.has(account.prefix.toLowerCase())
81
- ? []
82
- : [i + 1]
83
- );
84
- const id = 't3:quota-coverage';
85
- return missing.length
86
- ? {
87
- id,
88
- status: 'warn',
89
- summary: `T3_QUOTA_COVERAGE_MISSING: account positions ${missing.join(', ')} of ${accounts.length}.`,
90
- remedy: {
91
- action:
92
- 'Check the CLI proxy usage-limit source on the manager in T3 Settings. Refresh the affected account on the hub and rerun converge.',
93
- },
94
- }
95
- : {
96
- id,
97
- status: 'pass',
98
- summary: `The manager's CLI proxy quota source reports windows for all ${accounts.length} managed Antigravity accounts.`,
99
- };
100
- }