Commit Graph

963 Commits

Author SHA1 Message Date
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
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 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
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
can1357 63b07f8ec0 chore: rewrite changelogs 2026-08-03 05:52:53 +02:00
can1357 58c645e32b fix(natives): aligned desktop capability test with optional displayServer
- napi omits the displayServer key when the backend reports None (headless
  CI hits the unavailable backend); the declared contract is
  displayServer?: string, so assert the value type instead of key presence.
2026-08-02 23:25:16 +02:00
can1357 7d6eb47314 feat: implemented ps shell builtin with sorting and formatting options
- Added the `ps` shell builtin with BSD and procps selection forms, custom formatting, and sorting capabilities.
- Implemented the `sanitize_process_command` helper to clean process command names and arguments.
- Updated the bash prompt template and package changelogs to document the new builtin.
2026-08-02 20:40:19 +02:00
can1357 ef852af986 feat(computer): implemented modular desktop backend and script workflows
- Replaced monolithic desktop native bindings and action batching with a modular cross-platform backend structure supporting Wayland, X11, macOS, and Win32.
- Updated the computer tool schema and supervisor to execute persistent JavaScript script runs with timeout clamping and asynchronous tool calling.
- Integrated accessibility (AX) tree snapshotting, node querying, and bounds-based hit testing across platform desktop layers.
- Added native clipboard bindings and updated coding-agent prompts, renderers, and tests to validate script-based computer workflows.
2026-08-02 19:46:25 +02:00
can1357 7c3b24ddf2 feat: implemented cross-platform window discovery and targeting capabilities
- Added window discovery, targeting, and frame validation for macOS, Windows, and Linux platforms.
- Updated computer tool and protocol definitions to support listing and targeting specific application windows.
- Refactored native computer tool exposure to function-only representation across models.
- Updated documentation and test suites to reflect window-scoped computer control capabilities.
2026-08-02 17:35:29 +02:00
can1357 d595332fc6 chore: bump version to 17.2.4 2026-08-02 00:19:30 +02:00
can1357 8baa3300bc chore: bump version to 17.2.3 2026-08-01 08:35:39 +02:00
can1357 d5861c2c66 chore: bump version to 17.2.2 2026-07-31 20:56:49 +02:00
can1357 2c85a74cd4 chore: rewrite changelog 2026-07-31 20:40:52 +02:00
can1357 161073a79e docs(natives): moved workspace addon fix note to unreleased 2026-07-31 19:43:17 +02:00
David Andrews 726844b019 fix(natives): preserve workspace addons 2026-07-31 19:42:52 +02:00
David Andrews 89f00d9a9b fix(natives): handle uppercase node_modules paths 2026-07-31 19:42:52 +02:00
David Andrews fefbdf072e test(natives): restore loader variant cache 2026-07-31 19:42:52 +02:00
David Andrews 8039a5df59 docs(natives): attribute workspace addon fix 2026-07-31 19:42:52 +02:00
David Andrews e2dedf3ade test(natives): cover workspace loader policy 2026-07-31 19:42:52 +02:00
David Andrews ec9b067d91 fix(natives): prefer workspace native addon 2026-07-31 19:42:52 +02:00
can1357 db2659297a Merge PR #7143: fix(natives): prevent deep HTML crashes and silent truncation (@br411)
# Conflicts:
#	MODULE.bazel.lock
2026-07-31 19:17:47 +02:00
can1357 991e6b840b Merge PR #7136: fix(build): support Bazel native builds on NixOS ARM64 (@olegpulatov)
# Conflicts:
#	MODULE.bazel.lock
2026-07-31 19:17:18 +02:00
Oleg Pulatov a5aa5baeb5 test(natives): validate cross-target maudio layouts 2026-07-31 18:54:42 +02:00
Lumen Radley d316fb54fd fix(natives): correct miniaudio layouts on Linux ARM64 2026-07-31 18:54:42 +02:00
Oleg Pulatov fcaa6e1b8c fix(build): force vendored Opus in Bazel artifacts 2026-07-31 03:06:29 +02:00
Oleg Pulatov 1ffc461dcf fix(build): support Bazel native builds on NixOS ARM64 2026-07-31 02:09:54 +02:00
br411 c1c162225b fix(natives): prevent deep HTML crashes and silent truncation
html-to-markdown-rs 2.30 could recurse through pathological HTML until
a native stack overflow aborted the entire OMP process. Upstream 3.9.2
bounds those traversals and reports omitted subtrees as a
machine-readable DepthLimitExceeded warning.

Upgrade html-to-markdown-rs to 3.9.2. Upstream treats a depth-limited
conversion as a successful partial Markdown result plus a warning;
deliberately promote that warning to a rejected `htmlToMarkdown`
promise, allowing the Read tool to fall back without terminating OMP.
Normal conversions and unrelated warnings keep their existing behavior.

Add a rejection-contract test plus a child-process regression proving
OMP survives deeply nested and malformed input.
2026-07-31 00:33:06 +02:00
can1357 df9d9c8899 chore: bump version to 17.2.1 2026-07-30 17:27:05 +02:00