Commit Graph

244 Commits

Author SHA1 Message Date
alan 184ce78b65 fix(notify): resolve web links for transactional outbox deliveries 2026-10-21 13:16:20 +01:00
alan 9ee2e003bf fix(notify): open configured web run pages from ntfy 2026-10-21 13:05:10 +01:00
alan 1e4654381e feat(web): manage independent schedules and restore recorded stage navigation 2026-10-21 02:06:15 +01:00
alan fe02d153f1 Preserve saved schedule run-level write scope 2026-10-21 01:04:43 +01:00
alan 8c3f116190 Bind legacy schedule workspaces only at execution startup 2026-10-21 00:56:37 +01:00
alan 4d8b34939d Separate saved run schedules from pipeline definitions 2026-10-21 00:48:34 +01:00
alan 910028a75c Keep last reported OpenCode metrics while the newest assistant is in flight
Read a bounded newest-first page of eight assistants (4 MiB, no cursor traversal), selecting context and completed generation rate independently from the latest valid measurement matching Session.Info.model provider/id. Require assistant model identity; never pair an old model's measurements with the selected model's window. Context remains unknown across a newer compaction until a subsequent prompt reports usage; the last completed matching rate may survive compaction.

Unknown model metadata is cached for 15 seconds instead of five minutes, while known capacities retain their five-minute cache. Provenance remains canonical V2 Model.Ref, TokenUsage and request-created/streamed/completed fields cited in chat_usage.go. No live endpoint access, inference or service changes.

Isolated HTTP regressions cover in-flight/null/empty newest tokens with prior known metrics, post-compaction boundaries, independent prompt/rate selection, switched/missing model identity, duplicate known-zero measurements, over-limit page rejection and metadata recovery. Checked full internal/opencode suite, focused usage race suite, go vet ./internal/opencode and git diff --check.
2026-10-21 00:26:48 +01:00
alan ce3482b057 Expose native OpenCode chat usage snapshots and replay session metrics
Read V2 session accounting, latest assistant prompt/cache components and native request-to-stream boundary. Resolve capacity by location/provider/catalog id with bounded metadata caching. Coalesce active/final readbacks; retain message-less session snapshots without changing admission or compaction state.

Provenance: https://opencode.ai/v2/openapi.json and anomalyco/opencode V2 4617210822bdbb31e5749751afbfb4584ccedac8: packages/schema/src/token-usage.ts, session-event.ts; packages/core/src/session/usage.ts, projector.ts, message-updater.ts, runner/step.ts. Native output is visible output, reasoning separate. Session totals include all five non-overlapping components. Generation rate uses created-to-streamed, not tool-inclusive completion.

Limitations: metrics remain unknown for missing components, absent timing/model metadata, reads beyond bounded latest-message/catalog budgets, or context preceding compaction. No local pricing, token estimation or default capacity. V1 gets no invented cumulative metrics; older V2 events remain available when readback is unavailable. No deployment or protocol/web/docs changes.

Checks: go test ./...; focused usage/stream race tests; go vet ./internal/opencode ./internal/server; go build ./...; git diff --check.
2026-10-21 00:13:51 +01:00
alan 83b60990d2 feat(codex): retain native session usage snapshots for chat
Verify typed ThreadTokenUsage/TokenUsageBreakdown/Thread/Turn against openai/codex@6fb1c3903d. Use native totalTokens and latest-call context tokens without re-adding cached/reasoning subsets. Replay bounded per-connection snapshots and clear on room/source release.

Cost stays unavailable: no subscription USD usage is reported by this notification. Throughput stays unavailable even with native Turn.durationMs because neither last-call nor cumulative-session output is a compatible turn-specific numerator. Thread readback exposes no token usage; no extra reads, resume, or live provider calls added.

Checks: go test -race ./internal/codex; go vet ./internal/codex; go test ./internal/server ./internal/protocol; git diff --check.
2026-10-21 00:07:12 +01:00
alan 3e62ed7979 feat(protocol): distinguish reported chat metrics from unavailable values 2026-10-21 00:01:17 +01:00
alan 724de27561 feat(stage): honor per-stage reasoning effort across native harnesses 2026-10-20 23:51:14 +01:00
alan 9ce2c5d143 feat(stage): apply and verify Pi reasoning effort before prompting 2026-10-20 23:45:17 +01:00
alan 2aaf7fe2cc feat(pipeline): parse optional reasoning effort for model stages 2026-10-20 23:40:14 +01:00
alan 4969d667b3 Expose native chat compaction activity and retained replay 2026-10-20 22:17:41 +01:00
alan e29be1181f fix(audit): reserve bounded repair capacity outside user file quota 2026-10-20 22:00:43 +01:00
alan d3c7e6e784 fix: allow cold managed service discovery only at stage admission 2026-10-20 21:53:52 +01:00
alan bb98bde4fc fix: pin native exports to stage execution service 2026-10-20 21:47:04 +01:00
alan bb32383bbe Route native service commands and configure fresh authoring role
Select native installs only via explicit PIPELINES_PREFIX or the matching owned prefix/bin/pipelines executable. Route enable/status/disable to the existing native supervisor; validate registration ownership, label and command, keep preview read-only, and disable login registration before stopping. Never fall back to a standalone service for an invalid explicit prefix.

Fresh native installs explicitly enable authoring, while reinstalls preserve false or missing legacy role settings. Add explicit --allow-authoring/--no-authoring overrides and pass the server flag only for manifest true. Print a copyable native enable command and update installation help/docs. No Docker configuration changes.

Checks: 54 mocked native installer/lifecycle tests; 8 entrypoint tests; offline Go installation/CLI tests and vet; gofmt clean; shell syntax and diff checks. No live install, restart, deployment, permission/config changes, or native Linux verification.
2026-10-20 21:41:28 +01:00
alan d58b3f49fc Add generic checked starter workflows and isolated lifecycle coverage 2026-10-20 21:31:36 +01:00
alan b56d6af180 fix(audit): reserve recovery evidence outside user deliverables 2026-10-20 21:26:48 +01:00
alan 860615acb5 test(audit): verify wrong-session rejection through isolated V2 API 2026-10-20 21:22:37 +01:00
alan ec3eda9e05 runner: keep export handoffs nonterminal through recovery 2026-10-20 21:20:06 +01:00
alan ca78b24f47 fix(audit): expose verified visit exports and export-only recovery 2026-10-20 21:20:06 +01:00
alan f87e1ed488 runner: gate stage handoff on settled verified session export 2026-10-20 20:55:57 +01:00
alan 3d35e8a863 fix(stage): export settled Pi native sessions as escaped HTML 2026-10-20 20:45:56 +01:00
alan d7e99a19d6 fix(audit): preserve complete native message data in session HTML 2026-10-20 20:45:56 +01:00
alan cb57da5dfc fix(stage): persist every V2 model generation in tracked sessions 2026-10-20 20:43:42 +01:00
alan 1b8d0f2a75 fix(opencode): read V2 session exports directly from authenticated API 2026-10-20 20:43:42 +01:00
alan 5014c9e61f fix(stage): supply runtime context when read is not declared 2026-10-20 19:19:07 +01:00
alan 03a508fa2b fix(codex): load persisted threads only on explicit send after refusal 2026-10-20 18:46:17 +01:00
alan d564765ca5 fix(codex): reconcile cold connections without resuming queued goals 2026-10-20 18:33:20 +01:00
alan 34939edd0e Render run list miniatures from compact per-stage route evidence 2026-10-20 18:22:13 +01:00
alan 855de19a35 test(chat): require interactive tool parity across advertised harnesses 2026-10-20 18:12:59 +01:00
alan 68761652cf fix(codex): accept prepared chat attachments with model overrides 2026-10-20 18:07:00 +01:00
alan 83fef10331 feat(codex): retain all tool items and expose bounded command output 2026-10-20 18:07:00 +01:00
alan 9cdfd9d9ab search: browse bounded recent items with kind-only queries 2026-10-20 17:54:55 +01:00
alan e374e8ef03 fix(codex): return no content for URL elicitation confirmation 2026-10-20 17:43:14 +01:00
alan 35329e4022 feat(chat): broker Codex approvals and complete typed tool interactions 2026-10-20 17:41:35 +01:00
alan c78def70dd fix(chat): recover web approvals and questions across clients and reconnects 2026-10-20 17:23:07 +01:00
alan ed0abb976d feat(chat): persist safe Codex next-turn model selection 2026-10-20 16:35:31 +01:00
alan d92fa60259 fix: park human runs atomically before slow notification work 2026-10-20 16:35:30 +01:00
alan a049b552f6 Recover incomplete session exports through durable runtime jobs 2026-10-20 16:30:04 +01:00
alan 6841cdd2a4 web: unify mobile back and audit controls and link pipeline run history 2026-10-20 16:25:07 +01:00
alan 4e35da7473 fix: stop store-bound workers and reconcile settled repair fixtures 2026-10-20 16:19:21 +01:00
alan fdf0369ede Enforce runtime report contracts and recoverable session exports 2026-10-20 16:05:33 +01:00
alan 1d9cb80cdb web: keep mobile composition stable across keyboard and Back navigation 2026-10-20 16:04:09 +01:00
alan 90cd43bdd7 fix: commit run notification intents with state transitions 2026-10-20 15:56:42 +01:00
alan a08789e071 test: explicitly opt authoring fixtures into publication capability 2026-10-20 15:55:23 +01:00
alan f0532e5ec4 test: exercise managed model dialogs and intermediate chat steps in Chrome 2026-10-20 15:53:59 +01:00
alan b96b9d94a6 fix: keep cancellation pending until execution cleanup is confirmed 2026-10-20 15:49:08 +01:00