Commit Graph

987 Commits

Author SHA1 Message Date
can1357 fc1fd664b9 chore(changelog): rewritten 2026-08-13 05:51:01 +02:00
can1357 1132c3e31c feat: implemented anthropic keep-alive and migration support for updates
- Added Anthropic prompt-cache refresh scheduling and state management to keep prompts warm across idle sessions.
- Updated pricing models and database stats tracking to calculate and store cost-weighted cache savings.
- Integrated cache savings metrics and efficiency displays into the stats CLI, dashboard routes, and UI components.
- Added support for package renaming, manifest pointer tracking, and installation migration during CLI updates.
2026-08-13 04:59:33 +02:00
can1357 58a1147a67 Merge PR #8343: fix(natives): stop detached internal shell jobs (@roboomp) 2026-08-13 01:14:54 +02:00
can1357 99e8fe968c Merge PR #8088: fix(build): set CMAKE_POLICY_VERSION_MINIMUM for audiopus_sys in cargo env (@szavadsky) 2026-08-13 01:14:47 +02:00
roboomp 110f3aac9d fix(natives): stopped detached internal shell jobs
Abort shell-internal background tasks when their owning session is dropped, and propagate task abortion into blocking utility cancellation so infinite writers stop.

Fixes #8341
2026-08-12 15:13:28 +00:00
can1357 5481d8b9b0 chore: bump version to 17.2.15 2026-08-12 03:26:12 +02:00
can1357 e5ebb2aee0 chore: bump version to 17.2.14 2026-08-11 20:43:02 +02:00
can1357 2157becbe9 chore: bump version to 17.2.13 2026-08-11 16:03:05 +02:00
Slava Zavadsky c529813a12 chore(natives): drop redundant CMAKE_POLICY_VERSION_MINIMUM in build-bindings
.cargo/config.toml [env] now supplies the override for every cargo
invocation in the workspace, including the napi build spawned here.
2026-08-09 11:57:03 -04:00
can1357 6fb07028fd chore: bump version to 17.2.12 2026-08-08 20:57:55 +02:00
can1357 2ee9943563 refactor: unify builtins in one place 2026-08-08 10:19:25 +02:00
can1357 055a5d4f26 chore: bump version to 17.2.11 2026-08-07 23:38:40 +02:00
can1357 7cae7ef3f5 feat(voice): replaced miniaudio with native platform audio backends
- Replaced the miniaudio dependency with custom OS audio device abstractions and backends.
- Implemented platform-specific audio playback and capture for macOS (Audio Queue), Windows (WASAPI), and Linux (PulseAudio/ALSA).
- Added a fallback stub backend returning errors for unsupported platforms.
- Updated audio stream handling with reliable fill guard wakeups and streamlined rate validation.
2026-08-07 23:38:27 +02:00
can1357 a9dcf0f8d1 chore: update changelogs 2026-08-07 23:38:26 +02:00
roboomp 216fc3ca2d fix(computer): waited for all granted libei devices
- Tracked pointer and keyboard grants from the RemoteDesktop response.
- Drained asynchronous EIS announcements after the first resumed device.
- Covered GNOME's keyboard-before-pointer ordering with a regression test.

Fixes #7926
2026-08-07 23:38:25 +02:00
can1357 084fbb683f Merge PR #7890: fix(computer): lazily request wayland input permission (@roboomp)
Follow-up head of the same PR, merged after the sweep landed cf5bd72877:
bounds the consent-denied portal close inline (a nested block_on would panic)
and removes the world-readable pre-#7884 RemoteDesktop restore token.
2026-08-07 14:52:56 +02:00
roboomp 2567db01df fix(computer): removed orphaned wayland remote-desktop token
Pre-#7884 builds wrote a world-readable RemoteDesktop restore token under $XDG_STATE_HOME/omp/remote-desktop-token during read-only calls, and nothing on the fixed tree reads, rewrites, or removes it. WaylandBackend::new now unlinks it best-effort on construction so the stale credential does not survive the upgrade.

Fixes #7884
2026-08-07 12:43:37 +00:00
can1357 422f5d137f chore: normalized changelogs after merging community fixes 2026-08-07 13:40:09 +02:00
can1357 531ae04b3b Merge PR #7887: fix(natives): port wayland capture to pipewire 0.9 Rc handle API (@roboomp) 2026-08-07 13:37:56 +02:00
can1357 3cda312165 Merge PR #7890: fix(computer): lazily request wayland input permission (@roboomp) 2026-08-07 13:37:56 +02:00
can1357 169f2962c1 Merge PR #7873: fix(natives): prevent macos input suppression (@roboomp) 2026-08-07 13:37:56 +02:00
zero 3d7e1c5dbc test(natives): make ConPTY OSC stripping non-greedy
Review follow-up (#7896): [^\u0007] also matches ESC, so the greedy OSC
body match ran past an ST (ESC \) terminator to the last one in the
buffer, over-stripping everything between two ST-terminated OSCs. Harmless
for the single BEL-terminated title ConPTY emits today, but wrong the day
it emits more.
2026-08-07 17:10:36 +08:00
zero 82436b0e93 fix(natives): make Windows-host builds and addon loading work end to end
Runtime: the loader's AVX2 probe used [System.Runtime.Intrinsics.X86.Avx2]
via powershell.exe, which only exists on .NET Core — stock Windows PowerShell
5.1 raised TypeNotFound, so every Windows host silently loaded the baseline
addon and paid ~270ms for the spawn on the startup path. Ask the kernel via
bun:ffi (IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE), ~0.5ms)
and fall back to pwsh-then-powershell for Node embeds. scripts/host-detect.ts
shared the same broken probe for build-time variant selection.

Build: `bun run build:native` on a win32 host died deep inside the bazel msvc
repo rules (linux/mac exec hosts only, by design). The `host` pseudo-target
now delegates to the local napi build against real VS Build Tools, and other
targets fail fast with guidance. build-bindings.ts resolves the @napi-rs/cli
JS entry from its manifest (the node_modules/.bin shim is a PE launcher Bun
cannot parse) and auto-appends VS Build Tools' bundled CMake/Ninja to PATH
via vswhere so a vcvars prompt is no longer required. Cap maudio at
opt-level=1 to dodge a rustc ICE codegenning MaybeUninit<ma_fence> for
x86_64-pc-windows-msvc under the pinned nightly (Bazel's older pin is
unaffected).

Compile: Bun.Glob.scan yields backslash paths on Windows; the legacy Pi
virtual module used them verbatim for export keys and generated identifiers,
producing invalid JavaScript in compiled-binary builds.

Tests: strip ConPTY negotiation escapes in the pty argv test; ignore the
bazel-oh-my-pi convenience symlink.
2026-08-07 16:54:02 +08:00
roboomp 71cf826aeb merge(natives): integrated shared wayland portal runtime
Merged PR #7889 into the lazy Wayland input branch. Portal sessions retain the shared process runtime, the portal module remains available in shipped builds, and only PipeWire token helpers are feature-gated.
2026-08-07 08:24:58 +00:00
roboomp 30264cb151 fix(natives): port wayland capture to pipewire 0.9 Rc handle API
capture.rs still constructed the PipeWire main loop and context via the
0.8 owning constructors (MainLoop::new / Context::new / connect_fd),
which pipewire 0.9.2 removed in favour of the Rc handle types. The
migration was partial — StreamBox::new was already 0.9 — so the
wayland-pipewire feature failed to compile with E0599.

Switch to MainLoopRc::new / ContextRc::new(&loop, None) / connect_fd_rc.
The downstream call sites are unchanged: MainLoopRc derefs to MainLoop
(run/quit/clone), ContextRc derefs to Context, and CoreRc derefs to
Core so StreamBox::new(&core, ...) still coerces.

Fixes #7885
2026-08-07 08:19:56 +00:00
roboomp 8d6ed17811 fix(computer): lazily requested wayland input permission
Deferred libei and RemoteDesktop setup until the first native input operation. Read-only capability, window, display, and AX calls no longer request keyboard or pointer access.

Used non-persistent portal grants and retained the portal session so backend teardown closes it explicitly.

Fixes #7884
2026-08-07 06:50:16 +00:00
roboomp 81d3456af0 fix(natives): share one runtime across wayland portal paths
ashpd caches a process-global D-Bus connection whose I/O tasks bind to whichever runtime first creates it. Libei::portal_context() built a short-lived current_thread runtime and dropped it when Libei::new() returned, orphaning that connection; capture() then built its own runtime and reused the dead connection, so PipeWire capture never delivered a frame whenever libei input init ran first.

Route both portal_context() and capture() through a shared long-lived multi-thread runtime held in a LazyLock, keeping the cached connection's I/O alive for the process lifetime.

Fixes #7886
2026-08-07 06:47:03 +00:00
roboomp 62b007295a fix(natives): prevented macos input suppression
Configured Quartz event sources to permit local hardware events in both suppression states and replaced Enigo-backed global posting with the configured source.

Added a macOS regression test for the event-source suppression settings.

Fixes #7872
2026-08-07 03:02:49 +00:00
can1357 43c1b245e7 chore: bump version to 17.2.10 2026-08-06 13:32:34 +02:00
can1357 9e738dc880 chore: reformat + rewrite changelogs 2026-08-06 13:30:08 +02:00
can1357 ee026fa2e3 Merge PR #7704: fix(natives): gate wayland capture capability on pipewire feature (@roboomp)
# Conflicts:
#	crates/pi-natives/src/desktop/linux/wayland/mod.rs
2026-08-05 22:16:16 +02:00
roboomp 2ef15378f6 fix(computer): accept backend-minted window ids in wayland capture
The Capture request arm of Worker::process pre-parsed every window
target as a u64 before consulting the backend, so composite AT-SPI ids
minted by the Wayland backend's own windows() (e.g.
atspi::1.31:/org/a11y/atspi/accessible/1) could never pass the gate,
making per-window capture unreachable on Wayland in every build.

All backends resolve capture targets by string-matching against the ids
they themselves minted, so the u64 gate was a leaked X11/Win32/macOS
assumption. Drop it and let the backend validate the id; unknown ids now
fail as WindowNotFound from the backend lookup instead of InvalidTarget.

Fixes #7701
2026-08-05 11:06:54 +00:00
roboomp dc4725e626 fix(natives): gate wayland capture capability on pipewire feature
WaylandBackend::capabilities() hardcoded capture:true, but the PipeWire
screencast path is compiled only under the wayland-pipewire feature, which
is off by default and excluded from shipped Bazel addons (crate_features=[]).
Released builds therefore advertised capture the binary could never do:
every capture() call returned CaptureFailed, and callers trusting
capabilities() retried into a guaranteed failure.

Gate the capture flag and capture_permission on cfg!(feature =
"wayland-pipewire") so the report matches the compiled-in path, and align
docs/computer-use.md with what shipped builds actually support.

Fixes #7700
2026-08-05 10:45:57 +00:00
can1357 f7f8e040ee chore: bump version to 17.2.9 2026-08-05 03:07:47 +02:00
can1357 eb56330c9c chore(changelog): normalized unreleased entries after merges 2026-08-05 02:32:48 +02:00
can1357 f687a074d8 fix(natives): refresh active cache directories
(cherry picked from commit c62702b89d1f29bc48067d64575c739c65456bc8)
2026-08-05 02:32:35 +02:00
can1357 817a3648f9 Merge PR #6953: fix(natives): avoid cross-version cache cleanup races (@roboomp) 2026-08-05 02:32:35 +02:00
can1357 e824d06dd6 docs(changelog): added entries for #7593 session-migration fix and #7415 fuzzy-find bound 2026-08-05 01:15:31 +02:00
can1357 003bb5548c chore: bump version to 17.2.8 2026-08-04 05:53:35 +02:00
can1357 a5090f1f81 chore: bump version to 17.2.7 2026-08-04 01:19:36 +02:00
can1357 60acbee44a docs(changelog): normalized and regenerated unreleased changelogs 2026-08-04 01:19:08 +02:00
can1357 bc39ffa265 feat: introduced omptype validation package and migrated workspace dependencies
- Introduce `@oh-my-pi/omptype` as a new ArkType-compatible schema validation package featuring a lazy JIT runtime, JSON Schema emission, and compatibility adapters.
- Replace `arktype` across workspace packages and test utilities with `@oh-my-pi/omptype`.
- Add benchmark suites, tests, and documentation for the new validation engine and adapters.
- Update workspace build, test runner, and release configurations to include the new package.
2026-08-03 21:56:48 +02:00
can1357 dce12984f2 fix(pi-shell): parsed state format specifier correctly in ps builtin
- Corrected the mapping of the "state" specifier to PsField::State in the ps format parser.
- Added a test to verify that the ps builtin successfully accepts tpgid and other job control columns.
2026-08-03 19:01:09 +02:00
can1357 451eb9842c fix: mapped tail builtin broken pipe to silent exit 141
- Handled broken pipe errors across tail output and follow paths by translating them to a silent SIGPIPE exit code.
- Prevented stderr noise when downstream pipeline readers exit early, matching native tail behavior.
2026-08-03 18:53:14 +02:00
can1357 01c1f91ff5 chore: bump version to 17.2.6 2026-08-03 16:44:19 +02:00
can1357 455493dfad feat: introduced native file lock bindings for cross-process advisory locking
- Added native `FileLock` bindings supporting cross-process advisory locking on Linux, Unix, and Windows.
- Replaced directory-based file locking and custom stale-lock reclamation with OS-backed native locks.
- Updated TypeScript declarations, native bindings, and package documentation for the new API.
- Added comprehensive unit tests and fixtures validating single-owner constraints and process death handoff.
2026-08-03 16:09:09 +02:00
Wolfie 7b63fc2740 test(natives): cover fresh cache cleanup grace 2026-08-03 01:02:59 -07:00
Wolfie 534bb5787d fix(natives): retain fresh native caches 2026-08-03 01:02:54 -07:00
Wolfie 0d3be100f7 fix(natives): retain fresh native caches 2026-08-03 01:02:47 -07:00
can1357 c53b85aaf4 chore: bump version to 17.2.5 2026-08-03 05:53:12 +02:00