An optional Next.js reference console for ABH — the service does not require it. The pages cover an overview, responsibility inbox, decision approvals, mission progress / pause / resume, action list / detail / cancel / compensation, plus host-declared settings snapshots and governance commands. Every ABH call goes through the public HTTP contract; the server always has the final say on authorization.
- Point
ABH_API_URLat your ABH HTTP service. - Identity is wired in
src/lib/identity-install.ts, chosen by environment:- Set
ABH_IDENTITY_ISSUER,ABH_IDENTITY_AUDIENCEandABH_IDENTITY_JWKS_URL(RS256/ES256, https required in production), orABH_IDENTITY_SHARED_SECRET(HS256, self-hosted), to enable the built-in production adapter (src/lib/identity-production.ts). It verifies Bearer JWT signature,exp/nbf/iss/aud, builds the session from thesub/name/abh_organizations/abh_purposeclaims, and forwards the verified token to the ABH API server-side. The organization cookie is a selection intent only — membership is always re-checked against token claims. - A production build (
NODE_ENV=production) without identity configured fails closed: every session is rejected. - A dev build without configuration falls back to a browser e2e fixture — local demos only, never deploy it.
- Set
- For custom session semantics, implement
WorkbenchIdentityAdapterinsrc/lib/identity.ts: resolve the real human identity from your IdP/session, inject host credentials per request inapiHeaders, and keepactingOrganizationIdandresourceOrganizationIddistinct. The organization-selection cookie is user intent; the adapter must re-verify membership, workspace, both organizations and purpose on every request. - Provide a stable, non-secret
authorizationDigestto partition client caches. It never replaces server-side authorization. - For compensation, replace
denyAllCompensationAdapterinsrc/lib/compensation.tswith an adapter that returns compensation templates from registered action definitions, checking action visibility, state, definition ownership and authorization. - For custom responsibility forms, replace
contractDecisionFormsAdapterinsrc/lib/decision-forms.ts. The default form exposes only the publicSubmitDecisionPayloadfields (reason, condition refs, reauth proof). Custom adapters must verify decision visibility, state and approval rights, and may only declare registered schemas. - For settings governance, set
WORKBENCH_SETTINGS_URLto enable the explicit production HTTP assembly; the service must return a bounded non-secret snapshot and registered commands, andexecutere-authorizes per call with request-ID idempotency. Alternatively keep thedenyAllSettingsAdapterinsrc/lib/settings.ts. - Never store API credentials in browser responses, logs, or the Next cache. Shared caching is disabled for pages and the BFF.
A production build without an identity adapter only shows a logged-out screen and sends no ABH requests.
- Approvals use stable idempotency keys and If-Match; the UI never optimistically shows "applied".
- Mission projections, decision state and action details refresh via TanStack Query. A same-origin SSE BFF injects identity and supports bounded Last-Event-ID; it falls back to authorized polling when disabled or failing.
- Mission projections render as semantic tables plus lazy-loaded ECharts SVG; only shape-guarded authorized summaries are charted, with a safe fallback on bad data.
- Decision approvals use lazy-loaded JSON Forms; the server strong-reads the decision, re-checks state and package digests, and re-validates registered form input with Ajv 2020. Run
pnpm test:e2efor production browser journeys, axe scans and LCP/CLS gates. - Compensation forms use host-declared JSON Schemas; production action definitions, completion policies and business governance remain with the core host.
- The settings page renders only host-declared members, purposes, connections, automations and commands; with no adapter installed it denies by default. Connection views must not contain credentials, and command acceptance is not governance completion.
- Not yet included: production settings/domain-pack governance assembly, real IdP and production API journeys, screen-reader confirmation, mobile/desktop visual matrices, INP/SSE recovery journeys.