feat(model-proxy, webui): the instance owner lists installed programs, turns one off for every organization where nothing uses it, and reads access health per organization (#1873)
#2009
Settings backend slice A2 (lane settings-backend-a2): programs and access health across organizations. Server half only. Only the instance owner may call the new routes.
Programs list. The proxy status gains programs: the harness programs installed on this instance, read from the plugin tree, and which of them each organization has on. It works with no organization in context. An organization whose list cannot be read, or holds an invalid name, shows as unknown.
Off for every organization.POST /api/proxy/admin/programs/off { name }. For each current organization it reads the plugins and routes, then writes the harness list without that program. It skips an organization where a route or agent still uses the program (in-use), counting the root agents that organization takes. It skips an organization where the program is the only one (last-program). A down or unreadable organization gets no write. If the root agent file cannot be read, nothing is written anywhere. A plugins.set refusal is reported for that organization and not retried. Two calls at once give proxy-admin-busy for one. The write is recorded in setup history by name and outcome only.
Access health.GET /api/proxy/admin/access gives each organization a health value and its key ids. It never asks for, holds or returns a key. An uncertain answer is never ok.
No new bus verb, refusal code, grant, role, schema or config format. The per-organization outcomes are answer fields. Nothing under packages/webui/src/public, packages/bus/src or the harness paths. The request and response shapes are in the lane report for the page lane.
Tests
admin-control.test.mjs and proxy-admin-http.test.mjs grow tests for each skip, each failure, the owner gate, the busy case and planted keys never reaching an answer, receipt or history entry. The lane broke each review fix in turn and saw its test go red.
Lane gate on 680987374: 240 files, 2317 pass, 0 fail, 8 skip.
Lead check in a clean environment on the rebased tip 88d08c843: 88d08c843 on base de39750eb: 569 files, 6184 pass, 0 fail, 10 skip.
Review
A fresh claude-opus-5-5 reviewer found one real bug: turning a program off did not count the root agents an organization takes. The lane fixed it and five smaller items. A second fresh reviewer broke 16 fixes, saw 15 caught, and approved.
Left for later
The walk over root agent definitions has no test. Definitions hold no harness setting today, so it finds nothing.
A pending hire decision that names a harness does not count as use.
Turning a program off for every organization does not look at or change the instance Triage route.
A running bus keeps the root agent copies it made at start. A later launch of a deleted one is refused, which fails closed.
Each status read makes one bus call per organization.
The access route's other count includes other organizations' keys, so the page should not show it as a warning.
The page half of both, and slice A3 (provider list from the plugin).
## What changes
Settings backend slice A2 (lane settings-backend-a2): programs and access health across organizations. Server half only. Only the instance owner may call the new routes.
- **Programs list.** The proxy status gains `programs`: the harness programs installed on this instance, read from the plugin tree, and which of them each organization has on. It works with no organization in context. An organization whose list cannot be read, or holds an invalid name, shows as unknown.
- **Off for every organization.** `POST /api/proxy/admin/programs/off { name }`. For each current organization it reads the plugins and routes, then writes the harness list without that program. It skips an organization where a route or agent still uses the program (`in-use`), counting the root agents that organization takes. It skips an organization where the program is the only one (`last-program`). A down or unreadable organization gets no write. If the root agent file cannot be read, nothing is written anywhere. A `plugins.set` refusal is reported for that organization and not retried. Two calls at once give `proxy-admin-busy` for one. The write is recorded in setup history by name and outcome only.
- **Access health.** `GET /api/proxy/admin/access` gives each organization a health value and its key ids. It never asks for, holds or returns a key. An uncertain answer is never `ok`.
No new bus verb, refusal code, grant, role, schema or config format. The per-organization outcomes are answer fields. Nothing under `packages/webui/src/public`, `packages/bus/src` or the harness paths. The request and response shapes are in the lane report for the page lane.
## Tests
- `admin-control.test.mjs` and `proxy-admin-http.test.mjs` grow tests for each skip, each failure, the owner gate, the busy case and planted keys never reaching an answer, receipt or history entry. The lane broke each review fix in turn and saw its test go red.
- Lane gate on 680987374: 240 files, 2317 pass, 0 fail, 8 skip.
- Lead check in a clean environment on the rebased tip 88d08c843: 88d08c843 on base de39750eb: 569 files, 6184 pass, 0 fail, 10 skip.
## Review
A fresh claude-opus-5-5 reviewer found one real bug: turning a program off did not count the root agents an organization takes. The lane fixed it and five smaller items. A second fresh reviewer broke 16 fixes, saw 15 caught, and approved.
## Left for later
- The walk over root agent definitions has no test. Definitions hold no harness setting today, so it finds nothing.
- A pending hire decision that names a harness does not count as use.
- Turning a program off for every organization does not look at or change the instance Triage route.
- A running bus keeps the root agent copies it made at start. A later launch of a deleted one is refused, which fails closed.
- Each status read makes one bus call per organization.
- The access route's `other` count includes other organizations' keys, so the page should not show it as a warning.
- The page half of both, and slice A3 (provider list from the plugin).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changes
Settings backend slice A2 (lane settings-backend-a2): programs and access health across organizations. Server half only. Only the instance owner may call the new routes.
programs: the harness programs installed on this instance, read from the plugin tree, and which of them each organization has on. It works with no organization in context. An organization whose list cannot be read, or holds an invalid name, shows as unknown.POST /api/proxy/admin/programs/off { name }. For each current organization it reads the plugins and routes, then writes the harness list without that program. It skips an organization where a route or agent still uses the program (in-use), counting the root agents that organization takes. It skips an organization where the program is the only one (last-program). A down or unreadable organization gets no write. If the root agent file cannot be read, nothing is written anywhere. Aplugins.setrefusal is reported for that organization and not retried. Two calls at once giveproxy-admin-busyfor one. The write is recorded in setup history by name and outcome only.GET /api/proxy/admin/accessgives each organization a health value and its key ids. It never asks for, holds or returns a key. An uncertain answer is neverok.No new bus verb, refusal code, grant, role, schema or config format. The per-organization outcomes are answer fields. Nothing under
packages/webui/src/public,packages/bus/srcor the harness paths. The request and response shapes are in the lane report for the page lane.Tests
admin-control.test.mjsandproxy-admin-http.test.mjsgrow tests for each skip, each failure, the owner gate, the busy case and planted keys never reaching an answer, receipt or history entry. The lane broke each review fix in turn and saw its test go red.88d08c843:88d08c843on basede39750eb: 569 files, 6184 pass, 0 fail, 10 skip.Review
A fresh claude-opus-5-5 reviewer found one real bug: turning a program off did not count the root agents an organization takes. The lane fixed it and five smaller items. A second fresh reviewer broke 16 fixes, saw 15 caught, and approved.
Left for later
othercount includes other organizations' keys, so the page should not show it as a warning.