Commit Graph

15336 Commits

Author SHA1 Message Date
can1357 9f8aa87dbf feat(task): removed per-call model override from task tool
- Removes `model` field from task item/schema, TaskParams, and TaskItem types.
- Removes model selector validation, formatting, and approval display logic.
- Updates task tool priority docs to reflect that model is no longer per-call overridable.
- Updates eval agent() helper docs and prompt templates to remove model parameter.
- Updates tests to reflect removal of model override capability.
2026-07-24 14:51:48 +02:00
can1357 30994dafb2 feat(stats): added Providers dashboard with per-provider analytics and utilization insights
- Added `/api/stats/providers` endpoint and database queries returning per-provider request/token/cost totals, hourly burn, and time-series data.
- Created ProvidersRoute UI component with totals panel, trend charts, peak-hours histogram, and window-insights visualizations.
- Added usage-window analytics computing peak utilization fractions, ideal account counts, and exhaustion events from usage snapshots.
- Included comprehensive tests for the aggregation logic, API, and window-stat computations.
2026-07-24 14:41:55 +02:00
can1357 443398a9d8 refactor(usage): renamed Z.AI feature quota label and tier identifier
- Renamed quota label from "ZAI Web Search / Reader / Zread Quota" to "ZAI Zread Quota".
- Shortened tier slug from `web-search-reader-zread` to `zread` and updated associated limit IDs.
2026-07-24 14:06:34 +02:00
can1357 de00e7f136 feat(tui): renamed large-paste local refs to paste-N.md
- Large-paste menu now saves pastes as local://paste-N.md instead of
  local://attachment-N, giving the artifact a markdown extension and a
  clearer name.
2026-07-24 12:25:40 +02:00
can1357 c780662881 feat(agent): added resolveFallbackTool option for routing unadvertised tool calls
- Add `resolveFallbackTool` callback to `AgentOptions` and `AgentLoopConfig` that resolves tool calls not found in the advertised set.
- Use the callback as a third lookup step after `name` and `customWireName` match, enabling side transports like `xd://` device mounts.
- Add test coverage verifying the fallback resolves known devices and preserves "not found" errors for unknown names.
- Wire the coding agent's device registry as `resolveFallbackTool` in both `createAgentSession` and `streamAgentSession` paths.
2026-07-24 12:18:17 +02:00
can1357 fdf921a3c4 fix(coding-agent): marked ast_edit previews as staged proposals
- Prepended a model-visible PREVIEW_PENDING_NOTICE to ast_edit preview
  results; the TUI-only proposed badge never reached the model, so
  preview diffs read as already-applied edits.
- Rendered the resolve reminder with the source tool name via
  Handlebars instead of a generic 'This is a preview'.
- Documented the xd://resolve / xd://reject two-phase flow in the
  ast_edit tool prompt.
2026-07-24 12:03:49 +02:00
can1357 d4792ed38b fix(tools): leniently inferred missing todo op from unambiguous payloads
- Kept op required in the todo schema; lenientArgValidation now routes raw args to execute(), where resolveTodoParams re-validates and repairs an omitted op (list -> init, phase+items -> append, bare items on empty list -> init).
- Ambiguous op-less calls surface the schema error as a retryable tool error instead of a hard validation failure.
2026-07-24 12:03:06 +02:00
can1357 69307261c3 chore(infra): baked cmake and ninja into the omp-kata runner image
- Pinned to the same versions as .github/actions/ensure-cmake (cmake 4.1.2, ninja 1.13.1), which now no-ops on the preloaded image.
- Extended both reload smoke-test tool lists with cmake/ninja.
- Rolled out as omp-kata-runner:2026-07-24-113811.
2026-07-24 11:43:10 +02:00
can1357 e9c8a35f5a fix(natives): routed msvc sse flags through plain CFLAGS for cargo-xwin
cargo-xwin overwrites CFLAGS_<target> on the cargo it spawns and only appends plain CFLAGS/CXXFLAGS into it, so the sse4 override must use those.
2026-07-24 10:11:02 +02:00
can1357 16d33dcf72 fix(natives): enabled sse4 for msvc cross C deps
clang-cl enforces per-function target features unlike MSVC, so opus' silk/x86 SSE4.1 units fail under cargo-xwin. The win32 x64 addon floor is x86-64-v2 (SSE4.2 inclusive), so enable it for all C deps via CFLAGS_<target>.
2026-07-24 09:59:52 +02:00
can1357 02114a6bf7 fix(natives): made non-macos devicecheck stub a const fn
clippy missing_const_for_fn (-D warnings) fails the linux rust checks; the cfg(not(macos)) stub is invisible to local macos clippy.
2026-07-24 09:47:53 +02:00
can1357 90e0a8af28 fix(ci): repaired native builds broken by native audio stack deps
- Added ensure-cmake action installing pinned cmake/ninja on omp-kata pods; audiopus_sys builds bundled libopus via CMake (Ninja for MSVC cross).
- Set CMAKE_POLICY_VERSION_MINIMUM=3.5 globally and in build-native.ts: the bundled opus tree declares cmake_minimum_required below 3.5, which CMake 4.x refuses.
- Dropped the -C target-cpu=native fallback for non-x64 native builds: it baked build-host CPU features into shipped darwin arm64 addons and trips ring 0.17's aarch64-apple const assertion.
2026-07-24 09:36:31 +02:00
can1357 6ac5879858 feat(live): rendered visualizer across entire container width
- Removed max width cap of 120 columns in LiveVisualizer.

- Added unit test to verify full width rendering for wider viewports.
2026-07-24 09:28:42 +02:00
can1357 c36826cbac chore: bump version to 17.1.1 2026-07-24 09:18:41 +02:00
can1357 17735c7786 feat: added x-oai-attestation header for ChatGPT-OAuth Codex requests
- Add `CodexAttestationProvider` hook and `getCodexAttestationHeader` resolver that gates on ChatGPT-OAuth credentials.
- Integrate attestation into WebSocket transport, SSE event stream, and OpenAI compaction requests.
- Wire `setCodexAttestationProvider(generateCodexAttestation)` in model-registry init for OAuth sessions.
2026-07-24 09:17:00 +02:00
can1357 c1d4e38aa6 feat(coding-agent): added live session delegation with turn-based transcript display
- Added `LIVE_DELEGATION_MESSAGE_TYPE` constant and delegation message handling for voice sessions.
- Implemented turn-based transcript coalescing with user and assistant turn counters.
- Added transcript display row with normalized rendering in the live visualizer.
- Refactored controller to send delegation messages via `sendCustomMessage` with configurable frame styling.
- Removed microphone permission error reporting from silence detection logic.
2026-07-24 09:16:50 +02:00
can1357 c9c0882724 feat(audio): replaced Chromium browser audio with native audio stack
- Switched from `miniaudio` to `maudio` Rust crate and added `AudioCapture` and `AudioPlayback` native classes.
- Removed browser-side audio infrastructure including Web Audio API, audio worklet processor, and WebRTC runtime.
- Migrated STT recorder and transcriber modules to use native `AudioCapture` with callback-based streaming.
- Replaced streaming audio player with native `AudioPlayback` that writes PCM directly without TypeScript intermediaries.
- Removed ffmpeg, wav, and platform-specific playback commands from the audio toolchain.
2026-07-24 08:54:16 +02:00
can1357 b76c07ece2 feat(pi-natives): added LiveWebRtcPeer and deviceCheckGenerateToken bindings
- Replaced puppeteer-based WebRTC with native LiveWebRtcPeer for cross-platform live audio delivery.
- Added cross-platform microphone capture via miniaudio and Opus codec integration for live encoding/decoding.
- Added Apple DeviceCheck attestation token generation via raw Objective-C FFI for macOS.
- Updated live session model to "gpt-live-1-codex" and default voice to "sol" across protocol and controller.
- Added LiveWebRtcPeer and deviceCheckGenerateToken to the public native bindings API.
2026-07-24 08:22:22 +02:00
can1357 75cc0a054f feat(coding-agent/tools): added default card fallback for tool rendering
- Extracted #formatToolExecution into a standalone formatDefaultToolExecution module.
- Updated xdev renderXdevCall and renderXdevResult to use the default card when no mounted renderer exists.
- Added fallback rendering that shows tool label, args, and output with appropriate theming.
- Added integration test verifying generic card renders for mounted tools without bespoke renderers.
2026-07-24 08:19:13 +02:00
can1357 269c267397 feat(pi-shell): implemented cmp utility for embedded shell
- Added cmp builtin with full POSIX-compatible flag support including `-b`, `-i`, `-l`, `-s`, `-x`, `-h`, `-z`.
- Integrated into shell builtin registry and coreutils module.
- Added comprehensive tests using tempfile for temporary directories.
2026-07-24 08:05:12 +02:00
can1357 024f49220e fix(coding-agent): handled xdev execution errors with mounted tool renderer
- Catch execution errors in XdevRegistry and render them using the mounted tool's error handling.
- Preserve xdev dispatch context when device execution fails.
2026-07-24 08:03:17 +02:00
can1357 af9e8546a9 feat: implemented session account selection and pinning via slash command
- Add `pinSessionOAuthAccount` storage method and active account flag to the auth storage API.
- Introduce session account selector component, controller logic, and interactive mode delegation.
- Implement the `/session pin` builtin slash command with text listing and account pinning capabilities.
- Add unit tests covering session account selection, component navigation, and command handling.
2026-07-24 07:57:55 +02:00
can1357 22a2ea1699 refactor(tui): moved Hangul Jamo width onto the TERMINAL capability object
- Replaced resolveHangulCompatibilityJamoWidthFromTerminalIdentity with a
  static hangulJamoWidth field on TerminalInfo (ghostty 2, warp 1,
  platform otherwise); startup now reads TERMINAL.hangulJamoWidth.
2026-07-24 06:53:58 +02:00
can1357 e06f9801a5 chore: normalized changelogs after merging PRs #6467 #6468 #6469 #6472 2026-07-24 06:51:37 +02:00
can1357 38ad7e71c4 Merge PR #6472: fix(coding-agent): restored legacy keyText export (@roboomp) 2026-07-24 06:51:37 +02:00
can1357 189a3b51f0 fix: defer tiny-title prewarm past the scheduled first paint
requestRender(true) only queues the paint via setImmediate; calling
prewarm() synchronously afterwards put the worker spawn syscall ahead
of the render callback in the same loop turn. Schedule the prewarm
with its own setImmediate (FIFO after the render callback) so the
first startup frame paints before the subprocess spawns.
2026-07-24 06:51:37 +02:00
can1357 02ad4c3376 Merge PR #6469: fix(tui): prewarmed tiny-title worker off the first-submit hot path (@roboomp) 2026-07-24 06:51:37 +02:00
can1357 4f97aea2db Merge PR #6468: fix(tools): closed spilled output descriptors on error/abort paths (@roboomp) 2026-07-24 06:51:36 +02:00
can1357 1fa469d699 Merge PR #6467: fix(tui): corrected Warp compatibility Jamo width (@roboomp) 2026-07-24 06:51:36 +02:00
can1357 1343dea49d fix(coding-agent/utils): guarded AppleScript file-url coercion to prevent URL text mangling
- Fixed a macOS clipboard bug where copied URL text like `https://i.can.ac/x.png` was coerced into a bogus HFS path (`/https/::i.can.ac:x.png`) and dead-ended with "Image not found" instead of falling through to text paste.
- The AppleScript now checks `clipboard info for "class furl"` before coercing so plain text/URL clipboards paste as text rather than file paths.
- Extracted the script to its own `.applescript` file and added TypeScript declarations for `.applescript` imports.
2026-07-24 06:49:03 +02:00
can1357 11eb003fc8 fix: screenshot latency, somehow calling screencapture is faster ??? 2026-07-24 06:39:49 +02:00
can1357 aad7ee8fa3 feat(ai): implemented lite response overrides and computer call unrolling for codex
- Updated the OpenAI Codex provider to unroll native computer calls and tool outputs into standard function calls.
- Added support for the `PI_CODEX_RESPONSES_LITE` environment variable override via the request transformer.
- Updated documentation and tests to cover lite response resolution and native computer response unrolling.
2026-07-24 06:10:00 +02:00
roboomp fbd8382edb fix(coding-agent): restored legacy keyText export
- Added the upstream keyText helper to the legacy package-root shim.
- Covered active keybinding formatting and documented the compatibility fix.

Fixes #6470
2026-07-24 03:59:10 +00:00
roboomp a39dbc9b44 fix(tools): guarantee spill sink close when tail replay fails
#finalizeFile marked the sink finalized then ran the capped-artifact tail
replay before closing. A write error during that replay threw before
sink.end(), and because #finalized was already set the executor finally
paths calling dispose() could not retry the close, leaking the descriptor
and masking the original tool error.

Moved sink.end() into a finally around the tail replay and swallowed both
the replay and close errors so the descriptor is always released and
dispose() never throws.
2026-07-24 03:53:21 +00:00
roboomp 3cdb93cd01 fix(tui): prewarm tiny-title worker off the first-submit hot path
The first interactive submit fired session.generateTitle() before
startPendingSubmission() painted the optimistic user row, and
tinyTitleClient.generate() spawned the local tiny-title subprocess
synchronously in #ensureWorker() before its first await. With a local
providers.tinyModel configured, subprocess-spawn latency therefore landed
ahead of the first frame, stalling the first prompt.

Paint the pending row before starting titling, and prewarm an idle,
unref'd worker at TUI startup via a no-op ping (no model load) so the
first submit reuses a live subprocess.

Fixes #6462
2026-07-24 03:48:43 +00:00
roboomp 31098f9248 fix(tools): closed spilled output descriptors on error/abort paths
OutputSink.dump() was the only path that closed the spill Bun.FileSink.
The bash and Python executors re-throw on failure and their finally
blocks never closed the sink, so any large-output command that errored
leaked the artifact descriptor until an unrelated read (e.g. a SKILL.md
load) hit EMFILE.

Added an idempotent OutputSink.dispose() that closes the sink exactly
once (awaiting any in-flight sink creation, guarding post-finalize
resurrection) and wired it into every executor's finally block.

Fixes #6463
2026-07-24 03:44:12 +00:00
roboomp 74c4868358 fix(tui): corrected Warp compatibility Jamo width
- Reused terminal identity detection to select Warp narrow and Ghostty wide profiles.
- Covered Warp resolution while preserving platform defaults for other terminals.

Fixes #6461
2026-07-24 03:37:47 +00:00
can1357 d55df98a1a Merge PR #6448: feat: add native Codex computer use (@usr-bin-roygbiv) 2026-07-24 05:29:00 +02:00
usr-bin-roygbiv 914a0d0645 chore(changelog): restore computer entries to Unreleased 2026-07-24 01:40:46 +00:00
usr-bin-roygbiv 68ac163e2c fix(computer): harden native desktop execution 2026-07-24 01:40:05 +00:00
can1357 681d7daf65 feat(computer): unified native addon, /computer toggle, function tool
- Replaced the separate GUI-linked pi_natives.desktop.linux-x64 addon with
  a pure-Rust X11 backend (x11rb RustConnection capture via RandR/GetImage,
  XTest input with keysym mapping) compiled into the core addon on every
  published target; Linux arm64 and musl are now supported and headless
  hosts load the addon unaffected.
- Removed the native-desktop-linux cargo feature, desktop_unsupported.rs,
  lazy desktop loader, second napi build, desktop packaging/CI steps, GUI
  build dependencies, and the now-unreferenced vendored libspa crate;
  reverted setup-system-deps to main.
- Preserved the desktop input hardening semantics on the unified backend:
  XTest layouts reject negative origins and coordinates beyond 0..=32767,
  batch coordinates stay bound to the frame last returned to JS with
  intermediate screenshots deferred, coordinate input requires a
  previously returned frame, and failed chord releases still release
  every held key.
- Enforced a 60s worker-side execute deadline (DESKTOP_DEADLINE_EXCEEDED):
  no input is emitted after expiry and wait-heavy batches are rejected
  upfront.
- Added int32 fail-closed validation for coordinates, drag points, and
  scroll deltas at the JS ingress and gateway schema.
- Exposed computer to models without native OpenAI computer-use support as
  a regular function tool with a typed GA action schema across OpenAI,
  Azure, and Codex Responses providers, including named forced choice.
- Added the /computer slash command (on/off/status/toggle) for
  session-only enablement via runtime tool registration in SessionTools.
- Updated docs, changelogs, and contract tests accordingly.
2026-07-24 01:40:05 +00:00
usr-bin-roygbiv 4fe03e25cb fix(coding-agent): align computer session ownership 2026-07-24 01:40:05 +00:00
usr-bin-roygbiv 57f8acdd18 fix(native): harden desktop input and compatibility 2026-07-24 01:40:05 +00:00
usr-bin-roygbiv 87f37bcb1f fix(native): support Ubuntu 22 desktop builds 2026-07-24 01:40:05 +00:00
usr-bin-roygbiv fe791607d4 ci: install native desktop build dependencies 2026-07-24 01:40:04 +00:00
usr-bin-roygbiv b9504f65e7 feat: add native Codex computer use 2026-07-24 01:40:04 +00:00
can1357 4e5cb4d400 test(coding-agent): fixed environment-sensitive and stale-trigger test failures
- Shimmed writable select.value in export-html harness; linkedom's getter-only HTMLSelectElement.value made template.js theme assignment throw under strict mode.
- Bound the oauth-flow port blocker to 127.0.0.1 explicitly; macOS lets a specific-address bind coexist with a wildcard one, so the flow bound the blocked port and never fell back.
- Re-anchored atomic-rewrite race tests on rewriteEntries() after the compaction-supersede rewrite trigger was removed in cb63ebd.
2026-07-24 03:38:15 +02:00
can1357 debccaaacb fix(ai): recomputed cache breakpoints after history edits 2026-07-24 03:10:02 +02:00
can1357 031d687325 test(coding-agent): aligned transcript compaction test with superseded-summary elision
- Superseded compaction summaries render as elided placeholders in the forward transcript since cb63ebd; only the active compaction keeps its text and frames.
2026-07-24 03:07:17 +02:00
can1357 5e63cc5696 chore: bump version to 17.1.0 2026-07-24 02:49:18 +02:00