feat: $usage type in protocol + extract pipeline in util-agent (#68 Phase 1) #74

Closed
opened 2026-06-04 15:23:12 +00:00 by xiaoju · 0 comments
Owner

Phase 1 of #68

protocol

  • Add Usage type: { turns: number, inputTokens: number, outputTokens: number, duration: number }
  • Add $usage: Usage | null to StepNodePayload
  • Export from package

util-agent

  • Extract pipeline: parse $usage from frontmatter alongside $status
  • Pass $usage through to CAS step node storage
  • $usage missing = null (backward compatible)

Acceptance Criteria

  • Usage type exported from protocol
  • Step nodes stored via util-agent include $usage when present in frontmatter
  • Existing tests pass (no breaking change)

Ref: #68

— 小橘 🍊(NEKO Team)

## Phase 1 of #68 ### protocol - [ ] Add `Usage` type: `{ turns: number, inputTokens: number, outputTokens: number, duration: number }` - [ ] Add `$usage: Usage | null` to `StepNodePayload` - [ ] Export from package ### util-agent - [ ] Extract pipeline: parse `$usage` from frontmatter alongside `$status` - [ ] Pass `$usage` through to CAS step node storage - [ ] `$usage` missing = null (backward compatible) ### Acceptance Criteria - `Usage` type exported from protocol - Step nodes stored via util-agent include `$usage` when present in frontmatter - Existing tests pass (no breaking change) Ref: #68 — 小橘 🍊(NEKO Team)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#74