Skip to content

feat(tui): consume odek wire v2 — identity, queued, budgets, artifacts, cost - #57

Open
jkyberneees wants to merge 2 commits into
mainfrom
feat/subagents-wire-v2
Open

feat(tui): consume odek wire v2 — identity, queued, budgets, artifacts, cost#57
jkyberneees wants to merge 2 commits into
mainfrom
feat/subagents-wire-v2

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

Implements the bodek side of TEMP_ODEK_SUBAGENTS_WIRE_TASKS.md (P1–P6), verified against odek's shipped structs (subagent_registry.go / subagent.go). Every new field is omitempty on the wire, so pre-v2 engines degrade to current behavior.

Changes

  • P1 identitystarted frames seed cards with goal, resolved profile, and effective max_risk (wire truth overrides the delegate-arg manifest; queued frames carry the requested values). Trust badges (profile=default · risk=local_write) render in expanded card details.
  • P2 queuedphase:"queued" renders as ◌ SA3 · queued (no fake elapsed), counts separately in the rollup (0/8 agents · 6 queued), satisfies manifest-pending slots, upgrades on started.
  • P3 budgetsit 9/15 and elapsed/cap pairing (12s/30m), rendered only when the engine declares caps; later frames never zero them (omitempty-safe upsert).
  • P4 artifacts — framed results list ⎘ id · uri (size) refs; state-frame artifacts render as detail lines.
  • P5 — confirmed deny-not-prompt in odek (no waiting_approval anywhere): no approval placeholder built; README documents it.
  • P6 cost + denials — per-card ~sh.0421 (capped form ~sh.0421/sh.5), final cost in the result head, ⊘ N denied + per-denial lines with a transient note when the result lands.

Also: client.Event grew slice fields, making structs non-comparable — the approval-expiry head check now compares the event ID instead.

Verification

  • go vet clean · go fmt applied · full go test -race -count=1 ./... green (7 packages)
  • 6 new RED-first tests (subagent_wire_v2_test.go)
  • Local golangci-lint run was config-denied this session — CI's Lint check is the authoritative gate here (patterns unchanged from the lint-green v0.15.0 code)

…s, cost

Implements the bodek side of TEMP_ODEK_SUBAGENTS_WIRE_TASKS.md (P1-P6),
all fields omitempty so pre-v2 engines degrade to current behavior:

- P1: started frames seed cards with goal/profile/effective max_risk,
  overriding the delegate-arg manifest; trust badges render in the
  expanded details
- P2: queued tasks render as (circled) queued cards, count separately in
  the rollup, satisfy pending slots, and upgrade on started
- P3: budget horizons render as 'it 9/15' and 'elapsed/30m' pairings,
  only when the engine declares caps
- P4: framed results list artifact refs (id - uri, humanized size)
- P5 resolved deny-not-prompt: no approval state, documented in README
- P6: per-task cost renders as an estimate ('~sh.0421'), capped form
  included; denials render in the result card with a transient note

Also: client.Event grows wire-v2 fields (approvals head-compare now uses
the event ID — the slice field made structs non-comparable); registry
entries carry the new fields through the agents tab detail.
taskSlot.maxRisk was declared but never populated (caught by CI's
golangci-lint: unused field). Parse max_risk from the delegate arg and
seed all three identity fields at card creation — the pre-v2 fallback
that newer frames overwrite with effective values.
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