Commit Graph

4969 Commits

Author SHA1 Message Date
Filip Kujawa 1e3037b43f feat(desktop): per-message usage stats chip with detailed breakdown
Hovering an assistant message reveals a quiet monospace chip (same
fade/slide choreography as the copy link) showing tokens/sec, cost
(~-prefixed when estimated), and total tokens. Hovering the chip opens
a sectioned stats card: input tokens with cache read/write sub-rows and
cache-hit rate, output, total, time to first token, total time, speed,
and cost with an estimated/reported qualifier. Usage arrives on the
message_usage goose notification and is attached to the matching
message (falling back to the last assistant message) in the ACP
adapter. Also adds the missing 'group' class on the tool-call footer
wrapper, which the timestamp's group-hover classes already assumed.
2026-07-02 17:11:27 -07:00
Filip Kujawa 05033b00e8 feat(acp): deliver per-message usage via message_usage custom notification
New sessionUpdate variant on _goose/unstable/session/update carrying
{messageId?, usage} keyed by the id already used for chunk matching.
Sent live from the prompt stream loop and on session replay after each
message's content chunks, both gated on the client's goose custom
notification capability. Regenerates acp-schema.json and the SDK types.
2026-07-02 17:00:16 -07:00
Filip Kujawa 52a0721c4e feat(agents): emit MessageUsage event after attaching turn usage
attach_turn_usage runs after every AgentEvent::Message of the turn is
yielded (usage arrives on a trailing usage-only provider chunk), so
live consumers could never see per-message usage. The new
AgentEvent::MessageUsage carries the target message id and the attached
MessageUsage; non-desktop consumers ignore it.
2026-07-02 17:00:16 -07:00
Filip Kujawa 710ef2a128 feat(agents): measure TTFT and elapsed time in the provider stream wrapper
Only the local MLX provider reported elapsed_ms and nothing reported
time_to_first_token_ms, so per-message timing would be empty for every
hosted provider. The stream wrapper now captures request start before
the provider call and first-content time in both the toolshim and
passthrough branches, filling usage.stats only when the provider left
the fields unset.
2026-07-02 16:21:53 -07:00
Filip Kujawa 8c8dfa482f feat(server): surface aggregated usage totals to clients
Source TokenState and the ACP usage updates from the on-the-fly aggregation
(session + sub-agent tree) rather than the stored session record, so clients
see the derived per-message totals including delegated sub-agent spend.
2026-07-02 09:06:01 -07:00
Filip Kujawa 518e5e7ec8 feat(agents): capture per-message usage in the reply loop
Resolve each turn's best-estimate cost (provider-reported when present, else
catalog) once in update_session_metrics and record it to the ledger atomically
with the session totals - for normal turns, auto-compaction, and /compact.
Link sub-agent sessions to their parent so their usage rolls into the parent's
grand total. Attach the turn's usage to its assistant message for display.
2026-07-02 09:06:01 -07:00
Filip Kujawa d7a7fcc52e feat(session): per-message usage ledger with on-the-fly aggregation
Add an append-only usage_ledger table (migration v15) and a persisted
sessions.parent_session_id link. The ledger is decoupled from the messages
table so per-call usage survives conversation rewrites (compaction) and
cancelled turns, and each row records the model that produced it so estimated
costs can be recomputed or broken down per model later.

Session totals are derived by summing the ledger across a session and its
sub-agent descendants (recursive CTE over parent_session_id), with a
per-session fallback to the retained accumulated_* record for sessions that
predate the migration.

record_usage_metrics runs in one atomic transaction: it first reconciles the
ledger with any spend recorded outside it (pre-v15 history, or turns run on a
pre-v15 build after switching branches) via a 'carried_forward' adjustment row
- both builds only ever grow accumulated_*, so the componentwise difference is
exactly the spend the ledger missed - then adds the call's delta to the
accumulated columns in SQL (so concurrent writers can't lose updates) and
appends the ledger row. The derived total and the legacy fallback therefore
converge again after any branch round-trip.
2026-07-02 09:06:01 -07:00
Filip Kujawa 7028d15e02 feat(conversation): add per-message MessageUsage carrier
Add MessageUsage (tokens, cost, cost_source, generation timing) on
MessageMetadata, populated and serialized to clients as groundwork for the
per-message UI, and register it plus CostSource in the OpenAPI schema.
2026-07-02 09:06:01 -07:00
Filip Kujawa 71095b16c7 feat(providers): record provider-reported cost on ProviderUsage
Add optional cost + cost_source (ProviderReported/Estimated) to ProviderUsage
and parse `usage.cost` from OpenRouter and Anthropic-compatible gateways across
the streaming and non-streaming OpenAI and Anthropic paths. Request OpenRouter's
inline cost via `usage: {include: true}`. When no provider cost is present the
cost is filled in downstream from the catalog estimate.

Drop the unused ProviderUsage::combine_with rather than extending it with cost
semantics nothing exercises.
2026-07-02 09:06:01 -07:00
Jasper 79cbb2627d Fail closed on unverifiable update provenance (#10168)
Co-authored-by: Jasper <jasper@spiral.xyz>
2026-07-02 15:09:38 +00:00
Chih-Tao Lee de331d78ef fix(acp): include structuredContent from MCP tool response (#10128) 2026-07-02 14:26:11 +00:00
github-actions[bot] 402ff562b3 chore(release): bump version to 1.41.0 (minor) (#10198)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 12:41:48 +00:00
Jasper a3854aee3d Fix canonical model output paths (#10196) 2026-07-02 11:05:16 +00:00
Jasper ba6fb2b56d Refactor local inference provider crates (#10169) 2026-07-02 08:51:53 +00:00
Jasper bf1a986d5e Allow local file ACP origins (#10194) 2026-07-02 08:37:06 +00:00
Abhijay Jain 410a78983e fix(acp): propagate agent cleanup errors on session delete (#10112)
Signed-off-by: Abhijay Jain <Abhijay007j@gmail.com>
2026-07-02 08:06:41 +00:00
石岳峰 dbc1f88ca7 fix(providers): add claude-sonnet-5 to canonical model registry (#10183)
Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
2026-07-02 06:10:35 +00:00
Lifei Zhou 8cb6d4766c fix: Skip downstream github jobs for release branch build (#10186) 2026-07-02 04:38:40 +00:00
Lifei Zhou 185b185fb8 fix: increased mcp-app-guest request body limit (#10180) 2026-07-02 04:30:53 +00:00
Michael Neale 27958c4c29 Remove open-model-gym eval suite (#10174) 2026-07-02 00:31:15 +00:00
Lifei Zhou b83b194dad acp migration (ui) : ui connect to acp directly instead of goosed (#10081) 2026-07-02 00:29:29 +00:00
Lifei Zhou 0d4b6924b9 Revert "Bedrock model discovery and validation" (#10176) 2026-07-01 23:39:04 +00:00
Jasper a162a7f778 Improve ACP auth and origin defaults (#9886) 2026-07-01 22:08:46 +00:00
Gellért Stadler 7026e14585 Bedrock model discovery and validation (#9997) 2026-07-01 21:19:28 +00:00
dependabot[bot] e5a0162513 chore(deps): bump actions-rust-lang/setup-rust-toolchain from 1.16.1 to 1.17.0 (#10052)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 21:18:09 +00:00
yyy33 9165e2738f fix: tolerate partial Responses output items (#10108) 2026-07-01 19:56:57 +00:00
Kyle E DeFreitas 44869db2d9 fix(databricks): always use OpenAI-compatible "parameters" for tools (#10101) 2026-07-01 19:56:54 +00:00
Osraka 2d47d1feea fix(providers): unescape shell-escaped image paths (#10098) 2026-07-01 19:56:52 +00:00
dependabot[bot] bb1bd2667f chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 in /documentation (#10107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 19:51:26 +00:00
Jack Amadeo fc5353a39c regenerate schema (#10166) 2026-07-01 18:57:45 +00:00
dependabot[bot] 613f66b9f2 chore(deps): bump actions/stale from 10.1.1 to 10.3.0 (#10050)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 18:05:45 +00:00
dependabot[bot] d9d3fce9b7 chore(deps): bump actions/attest-build-provenance from 4.1.0 to 4.1.1 (#10049)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 18:05:44 +00:00
dependabot[bot] c595a4ab03 chore(deps): bump pnpm/action-setup from 6.0.8 to 6.0.9 (#9892)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Douwe Osinga <douwe@block.xyz>
2026-07-01 18:05:38 +00:00
Adam Dalloul a3b4166d4e Update EmpirioLabs provider display name to EmpirioLabs AI (#10126) 2026-07-01 17:06:38 +00:00
Jack Amadeo b6349b5125 add declarative provider support to goose-providers crate (#9992) 2026-07-01 16:40:49 +00:00
Douwe Osinga 006d585546 fix(desktop): seed mac auto-update config (#10132)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-07-01 16:26:40 +00:00
Jack Amadeo 363b309861 Update release testing instructions (#10122) 2026-07-01 14:18:06 +00:00
Douwe Osinga f150672e23 test: generic validator for declarative providers (#10010)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-07-01 03:13:10 +00:00
Lifei Zhou 82c0b0dfd9 UI acp migratoin: Decouple desktop UI types from generated OpenAPI types (Part 2) (#10149) 2026-07-01 02:44:08 +00:00
Douwe Osinga 66ce9a6beb Remove MCP sampling support (#10087)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
2026-07-01 01:53:44 +00:00
Douwe Osinga c8971fe5fb Support TLS for ACP serve (#10088)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
Co-authored-by: Lifei Zhou <lifei@squareup.com>
2026-07-01 00:43:18 +00:00
Lifei Zhou 2f32070975 feat (ui): Migrate dictation local model manager to ACP (#10131) 2026-07-01 00:02:52 +00:00
Douwe Osinga 31bc265a69 Fix MCP app sandbox bridge lifecycle (#10064)
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 23:02:25 +00:00
Lucas Kim e8891b7bb0 fix(bedrock): send inference config (max_tokens, temperature) on Converse (#9889)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 22:59:40 +00:00
Sunil Kumar 12c3e234f5 feat(providers): support OpenRouter request parameters (#9276)
Signed-off-by: sunilkumarvalmiki <g.sunilkumarvalmiki@gmail.com>
Signed-off-by: Douwe Osinga <douwe@sidewalklabs.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 22:48:03 +00:00
Jasper d1cc1439ec Migrate local inference model management to ACP (#10124) 2026-06-30 22:40:04 +00:00
Jack Amadeo 159fb4d53e (attempt to) fix disk space errors in linux release builds (#10024) 2026-06-30 22:29:53 +00:00
Sean Murphy 20966fd057 feat: add --edit session flag to edit conversation before forking (#9799)
Signed-off-by: Sean Murphy <murphysean84@gmail.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 21:15:52 +00:00
FenjuFu 04da8e8702 feat: add iFlytek Spark and Astron MaaS providers (#9837)
Signed-off-by: FenjuFu <fufenjupku@gmail.com>
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
2026-06-30 21:15:50 +00:00
Harnoor Singh 452ea10123 fix(desktop): dedupe Nostr session deep link imports (#9918)
Signed-off-by: harrykamboj1 <singhharnoor116@gmail.com>
2026-06-30 21:15:48 +00:00