feat(webui): the dashboard reads harness bindings and opens the setup terminal
The harness page lists each credential binding with its captured OAuth state (expiry, scopes, capture time; never the tokens), and the setup terminal route upgrades to a WebSocket and bridges it to a harness session. The session is a narrow webui-owned HarnessTerminal seam: the container, sandbox network and egress path belong to the daemon, so the dashboard process cannot implement it and answers 503 until a transport is wired (archie-core-egkf.7). Opening the terminal authorizes as the update action on the secret, per the PRD.
This commit is contained in:
1 parent
c84d0520c8
commit
751d7afb60
6 files changed
+561
No files matched your search
@@ -113,6 +113,15 @@ func compose(d deps) *webui.Server {
|
||||
if bindings, ok := d.Store.(storecontract.BindingStore); ok {
|
||||
srv.Bindings = bindings
|
||||
}
|
||||
// Harness OAuth token sets are a ratified State Store contract, and the
|
||||
// same client already carries them. Withholding it would leave the
|
||||
// harness page answering 503 on a deployment that has the store
|
||||
// (archie-core-egkf.7). The setup terminal itself is not wired here: its
|
||||
// implementation owns a container, which this process must not link, so
|
||||
// the route stays a documented 503 until a daemon-side contract exists.
|
||||
if secrets, ok := d.Store.(storecontract.HarnessSecretStore); ok {
|
||||
srv.HarnessSecrets = secrets
|
||||
}
|
||||
if eventTypes, ok := d.Store.(storecontract.EventTypeStore); ok {
|
||||
srv.EventTypes = eventTypes
|
||||
}
|
||||
|
||||
@@ -105,6 +105,19 @@ func TestRoutesWithoutAContractDegradeExplicitly(t *testing.T) {
|
||||
name: "capture inspector", method: http.MethodGet, path: "/api/captures",
|
||||
want: http.StatusOK, emptyJSON: `"enabled":true`,
|
||||
},
|
||||
{
|
||||
// The harness page's two routes: the bindings read needs the
|
||||
// control-plane resource and the setup terminal needs a transport
|
||||
// this process cannot own. In this composition neither is wired,
|
||||
// so both degrade explicitly rather than rendering an empty page
|
||||
// (archie-core-egkf.7).
|
||||
name: "harness bindings", method: http.MethodGet, path: "/api/harness/bindings",
|
||||
want: http.StatusServiceUnavailable,
|
||||
},
|
||||
{
|
||||
name: "harness setup terminal", method: http.MethodGet, path: "/api/harness/terminal?profile=claude-kit",
|
||||
want: http.StatusServiceUnavailable,
|
||||
},
|
||||
{
|
||||
// The browser reads this to decide which sections to show at
|
||||
// all, so it is the one route that must answer here.
|
||||
|
||||
Reference in new issue
Block a user