Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/event-guard-covers-every-kind.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/run-with-harness-prefills-the-run.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/usage-from-acp.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/usage-visible-while-running.md

This file was deleted.

29 changes: 29 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# @openspec-ui/core

## 0.50.0

### Minor Changes

- a61bfbe: Record the resource usage an agent reports, so a configured budget can act on it.

`AgentUsage` / `AuditEntry.usage` / `buildUsageReport` / `checkBudget` were a complete chain with nothing feeding it: no adapter had ever produced a usage figure, so the chain-level ceiling had never once fired. Two adapters now report what their agent said it spent — `claude-cli-acp` from `claude`'s own terminal `result` line, and the ACP session driver from `PromptResponse.usage` and `usage_update` notifications — and the runner writes it into the run's terminal audit entry.

A run whose agent reported nothing records no `usage` field at all, never a zero: absent means unreported, and a ceiling compared against an absent figure still permits the work. An ACP `usage_update`'s `used` is context occupancy rather than consumption and is deliberately not recorded; a non-USD cost is kept in its own currency rather than converted. `LIMITS.md` now says which agents report usage and which do not.
- ae78a82: Show what a chain run has spent, while it is still running.

A run recorded its usage but nothing displayed it: the figure lived in `.openspec-ui/audit.jsonl` and in one line of the event log. A chain now renders a usage summary beside its event log — a row per stage that has started, with tokens and money, and the configured ceiling beside the recorded total when one is configured.

Attribution needed a new event. A chain publishes every stage under one `runId` and announced a stage only when it *ended*, so the first stage's usage had no stage to belong to, and a chain that stopped mid-stage never named the stage that spent the money. `stageStarted` is emitted immediately before each stage begins — after any check that could refuse it, so a stage stopped at the budget ceiling is never announced as having started. It is non-terminal, like `agentUpdate`/`cancelling`/`usageReported`.

Two kinds of figure are kept apart. The recorded total is what agents reported for finished runs and is what a ceiling is compared against. A live figure — an ACP `usage_update` arriving during a run, previously rendered as `agent update: usage_update` and discarded — is shown as the agent's own running report; its `used` is context occupancy, falls after a compaction, and never enters a token total. Nothing here enforces anything: `HarnessChainRunner.checkBudget` remains the only thing that does.

A stage whose agent reported nothing reads "not reported", never `$0.00`, and a run in which nothing reported says so outright rather than showing an empty panel that looks broken.

### Patch Changes

- af32105: Let every event kind survive a transport — `cancelling` and `usageReported` were being dropped.

`isEvent()` switches on `kind` and ends in `default: return false`, so a kind added to `EventKind` and to the `Event` union compiles cleanly while the guard silently rejects it. Two kinds had already gone through that gap: the VS Code webview discarded them (`message-bridge-transport` gates on `isEvent`) and the standalone app discarded them too (`fetch-transport`'s `deserializeEvent` throws inside a conservative `catch {}`). Nothing logged, nothing failed.

Both shipped features built on those events were therefore inert over both transports: the "Cancelling..." status from `cancel-reports-what-happened`, and the usage display from `usage-from-acp`. Recording and budget enforcement were unaffected — `agent-runner.ts` consumes the event in-process, never through a transport.

The samples in `protocol.test.ts` are now a `Record<EventKind, Event>`, so adding a kind without a guard case is a compile error rather than something to remember.

## 0.49.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@openspec-ui/core",
"private": true,
"version": "0.49.0",
"version": "0.50.0",
"type": "module",
"main": "src/index.ts",
"exports": {
Expand Down
27 changes: 27 additions & 0 deletions packages/extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 0.36.0

### Minor Changes

- 9353534: Start "Run with Agentic Harness" on the change it was opened for.

The panel opened on `list` with nothing selected, so the user re-entered what they had just said by right-clicking a change. The change now seeds from the `changeDir` the host already sends, and the command kind seeds to `implement` when the panel was opened to run one change — which in turn makes the existing agent pre-selection reachable, since it maps the command kind to a stage and `list` mapped to none.
- ae78a82: Show what a chain run has spent, while it is still running.

A run recorded its usage but nothing displayed it: the figure lived in `.openspec-ui/audit.jsonl` and in one line of the event log. A chain now renders a usage summary beside its event log — a row per stage that has started, with tokens and money, and the configured ceiling beside the recorded total when one is configured.

Attribution needed a new event. A chain publishes every stage under one `runId` and announced a stage only when it *ended*, so the first stage's usage had no stage to belong to, and a chain that stopped mid-stage never named the stage that spent the money. `stageStarted` is emitted immediately before each stage begins — after any check that could refuse it, so a stage stopped at the budget ceiling is never announced as having started. It is non-terminal, like `agentUpdate`/`cancelling`/`usageReported`.

Two kinds of figure are kept apart. The recorded total is what agents reported for finished runs and is what a ceiling is compared against. A live figure — an ACP `usage_update` arriving during a run, previously rendered as `agent update: usage_update` and discarded — is shown as the agent's own running report; its `used` is context occupancy, falls after a compaction, and never enters a token total. Nothing here enforces anything: `HarnessChainRunner.checkBudget` remains the only thing that does.

A stage whose agent reported nothing reads "not reported", never `$0.00`, and a run in which nothing reported says so outright rather than showing an empty panel that looks broken.

### Patch Changes

- Updated dependencies [af32105]
- Updated dependencies [9353534]
- Updated dependencies [a61bfbe]
- Updated dependencies [ae78a82]
- @openspec-ui/core@0.50.0
- @openspec-ui/webui@1.25.0
- @openspec-ui/server@1.13.19

## 0.35.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "OpenSpec Workbench",
"description": "A dashboard + VS Code extension for OpenSpec, with Claude, Copilot, Codex, and Gemini agents built in.",
"publisher": "openspec-ui",
"version": "0.35.1",
"version": "0.36.0",
"icon": "media/icon.png",
"license": "MIT",
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openspec-ui/server

## 1.13.19

### Patch Changes

- Updated dependencies [af32105]
- Updated dependencies [a61bfbe]
- Updated dependencies [ae78a82]
- @openspec-ui/core@0.50.0

## 1.13.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@openspec-ui/server",
"private": true,
"version": "1.13.18",
"version": "1.13.19",
"type": "module",
"main": "src/index.ts",
"dependencies": {
Expand Down
24 changes: 24 additions & 0 deletions packages/webui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @openspec-ui/webui

## 1.25.0

### Minor Changes

- 9353534: Start "Run with Agentic Harness" on the change it was opened for.

The panel opened on `list` with nothing selected, so the user re-entered what they had just said by right-clicking a change. The change now seeds from the `changeDir` the host already sends, and the command kind seeds to `implement` when the panel was opened to run one change — which in turn makes the existing agent pre-selection reachable, since it maps the command kind to a stage and `list` mapped to none.
- ae78a82: Show what a chain run has spent, while it is still running.

A run recorded its usage but nothing displayed it: the figure lived in `.openspec-ui/audit.jsonl` and in one line of the event log. A chain now renders a usage summary beside its event log — a row per stage that has started, with tokens and money, and the configured ceiling beside the recorded total when one is configured.

Attribution needed a new event. A chain publishes every stage under one `runId` and announced a stage only when it *ended*, so the first stage's usage had no stage to belong to, and a chain that stopped mid-stage never named the stage that spent the money. `stageStarted` is emitted immediately before each stage begins — after any check that could refuse it, so a stage stopped at the budget ceiling is never announced as having started. It is non-terminal, like `agentUpdate`/`cancelling`/`usageReported`.

Two kinds of figure are kept apart. The recorded total is what agents reported for finished runs and is what a ceiling is compared against. A live figure — an ACP `usage_update` arriving during a run, previously rendered as `agent update: usage_update` and discarded — is shown as the agent's own running report; its `used` is context occupancy, falls after a compaction, and never enters a token total. Nothing here enforces anything: `HarnessChainRunner.checkBudget` remains the only thing that does.

A stage whose agent reported nothing reads "not reported", never `$0.00`, and a run in which nothing reported says so outright rather than showing an empty panel that looks broken.

### Patch Changes

- Updated dependencies [af32105]
- Updated dependencies [a61bfbe]
- Updated dependencies [ae78a82]
- @openspec-ui/core@0.50.0

## 1.24.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/webui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@openspec-ui/webui",
"private": true,
"version": "1.24.0",
"version": "1.25.0",
"type": "module",
"main": "src/index.ts",
"dependencies": {
Expand Down
Loading