Skip to content

Expose SDK 2.x launcher tagging primitives and generic tag summary filters #373

@willwashburn

Description

@willwashburn

Context

AgentWorkforce wants default-on persona cost attribution without requiring users to install the burn binary and without routing launches through burn run.

Burn should stay domain-neutral. AgentWorkforce will stamp persona metadata as generic enrichment tags; burn should only understand tags/enrichment, not personas as a first-class concept.

Desired changes

  • Expose a launcher-safe pending-stamp API from @relayburn/sdk 2.x / the Rust NAPI binding, wrapping the Rust write_pending_stamp primitive.
  • Add the JS facade export and .d.ts types, e.g. writePendingStamp({ harness, cwd, enrichment, sessionDirHint?, spawnStartTs?, spawnerPid? }).
  • Ensure the supported harness set covers AgentWorkforce direct launches. Codex and OpenCode already fit pending stamps; Claude needs either documented exact-session stamping or pending-stamp support if a session id cannot be preallocated reliably.
  • Expose generic enrichment reporting in burn summary:
    • --tag key=value, repeatable; all provided tags must match folded stamp enrichment.
    • --group-by-tag key, grouping cost/tokens by enrichment value.
    • JSON output should include the grouped tag key/value.
  • Do not add persona-specific flags such as --persona; personas are just tags from burn perspective.
  • Deprecate or remove burn run from preferred docs/help so new integrations use SDK primitives instead of the process wrapper.

Acceptance criteria

  • @relayburn/sdk 2.x exports and documents writePendingStamp with typed options/results.
  • A Node caller can write a pending stamp, run ingest, and see enrichment folded onto matching turns.
  • burn summary --tag persona=code-reviewer filters by folded enrichment without any persona-specific code path.
  • burn summary --group-by-tag persona groups usage/cost by generic tag value.
  • Rust CLI, SDK, and NAPI tests cover the new tag filter/grouping and pending-stamp export.
  • Docs make clear that burn run is legacy/deprecated or no longer preferred for new launchers.

Downstream

Once this lands, AgentWorkforce can depend on @relayburn/sdk 2.x directly and wrap persona launches with generic burn tags: persona, personaTier, personaVersion, personaSource, and agentworkforce=1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions