Skip to content

feat(cli): export digital employees as OpenAgent persona-cards#15

Open
lodar wants to merge 2 commits into
HKUDS:mainfrom
lodar:feat/openagent-persona-export
Open

feat(cli): export digital employees as OpenAgent persona-cards#15
lodar wants to merge 2 commits into
HKUDS:mainfrom
lodar:feat/openagent-persona-export

Conversation

@lodar

@lodar lodar commented Jul 3, 2026

Copy link
Copy Markdown

What

Adds agent-space employee export-persona --name <employee> [--sign] [--out <path>] [--json] — export any Digital Employee as an OpenAgent persona-card.

Why

OpenAgent is an identity/persona layer: it describes who an agent IS (name, role, face, voice, behavior) with a self-verifying ed25519 provenance block. AgentSpace already models the "who" as an ActiveEmployee, so the two compose cleanly, any digital employee becomes portable as a signed, verifiable persona-card.

How

  • packages/domain/src/openagent-persona.ts — pure employeeToPersona() mapper plus a self-contained ed25519 signer and did:key derivation (node:crypto only, zero new dependencies). Emits an OpenAgent v0.2 persona document (JSON, a YAML subset) that validates and verifies with the @5dive/openagent CLI.
  • apps/cli/src/commands/employee.ts — the export-persona subcommand.
  • packages/domain/src/openagent-persona.test.ts — colocated tests: field mapping, id slugging, signed-provenance round-trip, tamper detection.
  • One README line under the Digital Employee Board.

Additive and single-concern, no runtime/daemon/web/db changes. Reads employees via listActiveEmployeesSync() and skills via listEmployeeSkillIdsSync().

Verify

agent-space employee export-persona --name <employee> --sign --out agent.persona.json
npx @5dive/openagent validate agent.persona.json   # ✓ PASS
npx @5dive/openagent verify   agent.persona.json    # ✓ VERIFIED

Add `agent-space employee export-persona --name <employee> [--sign]` that maps
any Digital Employee onto a signed OpenAgent persona-card (github.com/5dive-ai/openagent).

- packages/domain/src/openagent-persona.ts: pure mapper employeeToPersona() plus a
  self-contained ed25519 signer + did:key derivation (node:crypto only, no new deps).
  Emits an OpenAgent v0.2 persona document (JSON, a YAML subset) that validates and
  verifies with the @5dive/openagent CLI.
- apps/cli/src/commands/employee.ts: export-persona subcommand (--sign/--out/--json).
- packages/domain/src/openagent-persona.test.ts: colocated tests (mapping, slug,
  signed provenance round-trip, tamper detection).
- README: one line under the Digital Employee Board.
@lodar lodar marked this pull request as draft July 3, 2026 10:21
@lodar lodar marked this pull request as ready for review July 3, 2026 10:23
@lodar lodar marked this pull request as draft July 3, 2026 10:24
The behavior field concatenated summary + instructions + fit; fit is a
readiness note, not behavior, and appending it produced trailing fragments
(e.g. a dangling '… research'). Behavior is now summary + instructions only.
@lodar lodar marked this pull request as ready for review July 3, 2026 10:39
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