Skip to content

feat(identity): WE identity module — agent-scoped DID, devices, guardians, recovery, KEL - #184

Draft
HexaField wants to merge 4 commits into
devfrom
feat/identity-module
Draft

feat(identity): WE identity module — agent-scoped DID, devices, guardians, recovery, KEL#184
HexaField wants to merge 4 commits into
devfrom
feat/identity-module

Conversation

@HexaField

Copy link
Copy Markdown
Contributor

Goal

Give the agent identity plane a face inside WE. The identity module renders as an agent-scoped dock panel — always available in the module rail, not tied to any space.

Hard boundary (non-negotiable): this module talks ONLY to the agent language (identity client). Zero perspective DB access.

Design

Schema-fragment-only module (Tier 1 — no framework imports). Every piece of UI uses SchemaNode registry keys (Column, we-button, we-tabs, we-avatar, etc.), so the module renders on any framework host without introducing the second-runtime hazard.

Views

Tab Content
Home DID banner (avatar, name, truncated DID, copy), backup status badge, guardian count badge, enrolled devices roster, assistants roster, add button
Detail Full key info (key ID, signing key, encryption key, delegation event, scope tags), revocation section with consequences + confirmation
Guardians Threshold ring (t-of-N), guardian list with consent status (Consented / Pending), pending consent warning, add guardian
Recovery Recovery methods (mnemonic phrase, guardian recovery), active recovery request with progress + veto, incoming requests as a guardian with approve action
Log KEL event viewer (sequence number, event type, summary per event), JSON export button

Store

Data signals (identity, roster, guardians, kelEvents, recoveryState, backupConfirmed) start empty and the host populates them when the identity RPC client connects. Schema fragments degrade gracefully — $if guards render loading or empty states until data arrives.

Derived values compute device/assistant counts, threshold labels, guardian recovery descriptions, and the selected device detail.

Navigation

  • Tab selection via $localState — resets to Home on panel reopen
  • Device detail drill-down via store signal — clicking a roster entry shows full key info, back button returns to overview

Depends on

  • AD4M agent identity PRs #947, #955#962 (identity client + types)
  • Host wiring to populate the store signals from the identity RPC client

Screenshots

See PR description — Home, Detail, Guardians, Recovery, and Log views verified via standalone preview.

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for coasys-we ready!

Name Link
🔨 Latest commit 88543cd
🔍 Latest deploy log https://app.netlify.com/projects/coasys-we/deploys/6a99574e4615a50008d49fb4
😎 Deploy Preview https://deploy-preview-184--coasys-we.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…uardians, recovery, KEL

Schema-fragment-only module (Tier 1 — no framework imports).
Agent-scoped: appears in the module rail everywhere, not tied to any space.
Hard boundary: talks only to the agent language, never the perspective DB.

Views:
- Home: DID banner, backup status, enrolled devices + assistants roster
- Detail: full key info, scope tags, revocation with consequences
- Guardians: threshold ring, consent status, pending warnings
- Recovery: mnemonic + guardian methods, incoming requests (as guardian)
- Log: KEL event viewer with sequence/type/summary, JSON export

Store exposes data signals (identity, roster, guardians, kelEvents,
recoveryState) populated by the host's identity client wiring.
Schema fragments degrade gracefully with loading/empty states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HexaField
HexaField force-pushed the feat/identity-module branch from 5160f25 to 2c79be5 Compare September 3, 2026 06:10
HexaField and others added 3 commits September 3, 2026 19:14
- Add identity wiring layer (identityRpc.ts + wireIdentityModule.ts)
  that connects the executor's identity.* RPC handlers to the module
  store after auth via BootController.onSessionUnlocked
- Transform executor response shapes (nested key.*, Rust Lane enum,
  numeric seq) into flattened UI entries the schema fragments read
- Wire actions: exportKel (file download), revokeKey (+ roster refresh),
  startBackup (generateMnemonic + confirm), startEnrolment (createEnrolOffer)
- Move identity UI from space dock panel to Settings account page
  (IdentitySettings.schema.ts with tabs: Devices, Guardians, Recovery, Log)
- Remove dead dock/launcher/capabilities, panel, and schema fragments
  from module definition — now a pure data store
- Fix dead buttons: Back up, Add device/assistant, Add guardian now have
  $action handlers
- Add e2e test infrastructure (Playwright) with identity module spec
  (auth bypass, settings navigation, tab interaction, RPC validation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix: IdentitySettings tab conditions used === (not in the expression
grammar); changed to == so tab content actually renders.

Tests: 16 e2e tests covering every identity UI state — single/multi
device rosters, device detail (active + revoked), guardians (consented,
pending, empty), recovery (methods, active progress, incoming requests),
KEL event log (populated + empty), backup states (nag banner + secured).

Tests inject data via window.__identityStore hook exposed by
wireIdentityModule, then take screenshots of every tab and state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace window.alert() in device enrollment with a proper QR code view:
- Add qrcode package to app-shell for data URL generation
- Add enrolmentOffer signal + dismissEnrolment action to identity module store
- wireIdentityModule generates QR data URL encoding executor URL + offer credentials
- Schema shows QR view (image, instructions, cancel) replacing device list during enrollment
- QR payload: JSON { type: 'adam-enrol', executor, offer: { publicKey, challenge, label } }
- E2e test validates QR rendering, img src, and dismiss flow (2 new screenshots)
- All 17 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant