feat: agent-kit interface change — agents own their detail (Phase 1 of #337) #338

Merged
xiaoju merged 2 commits from feat/337-agent-detail-merkle into main 2026-05-18 15:52:56 +00:00
Owner

What

Agents now return { output, detailHash } instead of raw string. Agent-kit no longer stores detail — agents do it themselves.

Changes

  • uwf-agent-kit/types.ts — new AgentRunResult type, AgentRunFn returns it
  • uwf-agent-kit/run.ts — remove store.put(null, rawOutput), use agent-provided detailHash
  • uwf-agent-hermes/hermes.ts — register hermes-raw-output schema, store detail with proper type hash
  • scripts/mock-agent.ts — updated for new interface
  • Upgrade json-cas deps to ^0.3.0

Ref

Refs #337, fixes #336 (no more null typeHash for detail)

## What Agents now return `{ output, detailHash }` instead of raw string. Agent-kit no longer stores detail — agents do it themselves. ## Changes - `uwf-agent-kit/types.ts` — new `AgentRunResult` type, `AgentRunFn` returns it - `uwf-agent-kit/run.ts` — remove `store.put(null, rawOutput)`, use agent-provided `detailHash` - `uwf-agent-hermes/hermes.ts` — register `hermes-raw-output` schema, store detail with proper type hash - `scripts/mock-agent.ts` — updated for new interface - Upgrade json-cas deps to `^0.3.0` ## Ref Refs #337, fixes #336 (no more null typeHash for detail)
xiaoju added 2 commits 2026-05-18 15:32:00 +00:00
- Change AgentRunFn to return { output, detailHash } instead of raw string

- Remove agent-kit detail CAS write; agents store their own detail nodes

- Hermes stores raw output as typed hermes-raw-output CAS node

Co-authored-by: Cursor <cursoragent@cursor.com>
xiaoju merged commit 2af8196451 into main 2026-05-18 15:52:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#338