Commit Graph

1249 Commits

Author SHA1 Message Date
can1357 b70bb7aced Merge PR #8186: feat(lsp): add Astral ty as built-in Python primary LSP server (@FNDEVVE) 2026-08-13 02:00:50 +02:00
can1357 19c0afcc0d feat: implemented external thinking flags and transport reasoning controls
- Added the `--external-thinking` CLI flag alongside model capability checks to gate external thinking tool availability.
- Updated Anthropic and Google transports to honor `forceReasoningOff` for native thinking-off controls.
- Renamed the `thoughts` property and parameter to `notes` across think fixtures, tools, and tests.
- Updated system prompt instructions and test suites to verify transport-specific thinking and tool activation.
2026-08-12 02:23:17 +02:00
can1357 eb5e167abb test(coding-agent): included think tool in HIDDEN_TOOLS expectation 2026-08-11 21:01:02 +02:00
can1357 10fd42289c feat: introduced external thinking support and private scratchpad think tool
- Added support for external thinking and forced reasoning disablement across AI provider options and request transformers.
- Implemented the private scratchpad think tool along with its renderer, system prompt rules, and schema configuration.
- Updated agent session management and SDK tools to support dynamic runtime activation of the think tool via the externalThinking setting.
- Added comprehensive unit tests covering reasoning fallbacks, tool activation, and rendering behavior.
2026-08-11 20:39:57 +02:00
can1357 b524dfe36f refactor: standardized outbound User-Agent headers on shared utility constant
- Define a centralized `USER_AGENT` constant in `@oh-my-pi/pi-utils` formatted as `omp/<version>`.
- Replace hardcoded and platform-specific user agent strings across AI providers, catalog scrapers, tools, and search providers with the unified `USER_AGENT`.
- Add unit tests for update-cli binary release distribution gating.
2026-08-11 15:38:32 +02:00
can1357 b807d67e1d Merge PR #8238: fix(tui): render platform-aware modifier labels on macOS (@roboomp) 2026-08-11 15:15:45 +02:00
can1357 64baa7c1bd chore(format): applied biome formatting and removed dead code from merged prs 2026-08-11 15:14:15 +02:00
can1357 e56777e138 fix(lsp): rearmed cached idle checker after shutdown 2026-08-11 15:06:16 +02:00
can1357 7b3bd4781b Merge PR #8154: fix(lsp): stop idle checker during shutdown (@MikeeI) 2026-08-11 15:06:16 +02:00
can1357 046fdeab00 Merge PR #8153: fix(lsp): cancel requests after client timeout (@MikeeI) 2026-08-11 15:06:15 +02:00
can1357 19edecaa48 fix: kept out-of-order todo completions visible 2026-08-11 15:06:12 +02:00
can1357 f6d4f1e38b Merge PR #7965: fix(coding-agent): surface todo progress in the collapsed panel (@z80dev) 2026-08-11 15:06:12 +02:00
can1357 00d90809fc test: removed redundant policy-key suite 2026-08-11 15:06:11 +02:00
can1357 8504e4865f Merge PR #7945: fix(coding-agent): resolve xd:// device dispatches against device user policy first (@re2zero) 2026-08-11 15:06:11 +02:00
roboomp 097845bff0 fix(tui): render platform-aware modifier labels on macOS
Key hints resolved modifier tokens through a static, platform-agnostic label map with no `super` entry, so on macOS the shipped `super+v` paste default rendered 'Super+V' (no such key on a Mac) and `alt` always rendered 'Alt' instead of 'Option'. The static /hotkeys navigation rows were hardcoded with macOS 'Option'/'Cmd' names on every platform, so Linux/Windows users saw 'Cmd+Left'.

Modifier labels are now platform-aware: on darwin `alt` renders 'Option' and `super` renders 'Cmd'; every other platform keeps 'Alt'/'Super'. The platform is resolved through a single seam (setKeyHintPlatform/keyHintPlatform) mirroring the TUI's setKittyProtocolActive, keeping hint output deterministic in tests without mutating process.platform. The static /hotkeys rows use the same convention and drop the macOS-only Cmd line-start/end fragments (which map to no binding) off darwin.

Fixes #8235
2026-08-11 09:28:52 +00:00
FND 1f2fca5035 test(lsp): drop redundant mkdirSync in ty.toml test
Bun.write creates parent directories, so the preceding fs.mkdirSync
was dead setup (Codex P2 on #8186).
2026-08-10 23:28:29 +02:00
FND 770147c89e feat(lsp): support ty.toml-only projects and fix changelog placement
Address review feedback on #8186:
- add ty.toml to ty rootMarkers so ty.toml-only projects pass the
  loadConfig marker gate (Codex P2, roboomp should-fix)
- add ty.toml to PYTHON_ROOT_MARKERS so project-local .venv/bin/ty
  resolution runs for ty.toml-only projects (roboomp should-fix)
- add a ty.toml-only regression test covering both the detection
  gate and the local venv bin resolution path
- move the changelog entry from the released [16.3.11] section into
  [Unreleased] (roboomp should-fix)
2026-08-10 23:23:43 +02:00
FND 4a7da9c0d0 feat(lsp): add Astral ty as built-in Python primary LSP server
Add ty (ty server) to defaults.json behind pyright/basedpyright/pylsp
in primary selection order and ahead of ruff (linter). ty uses the
generic LSP client path with no adapter code; settings.ty pass-through
works via the existing settings field.

- defaults.json: insert ty entry between pylsp and ruff
- lsp-regressions.test.ts: 4 tests (selection order for .py/.pyi,
  auto-detect via $which + pyproject.toml, coexistence with ruff)
- CHANGELOG.md: Added entry under [Unreleased] referencing #4617

Closes #4617
2026-08-10 22:26:02 +02:00
can1357 baf8a1df7e feat(coding-agent/web): expanded web search and fetching providers
- Expanded web search and fetching providers with robust parsing, authentication storage integration, and response validation.
- Added support for new configurations including SearXNG safesearch, Cloudflare AI Gateway endpoints, and dynamic Firecrawl base URLs.
- Implemented comprehensive test suites covering error handling, content filtering, and provider-specific response behaviors.
2026-08-10 11:06:22 +02:00
Bonobo e8dd853fa4 fix(lsp): cancel requests after client timeout
Why:
Local timeout cleanup removes pending state but leaves the language server
working on an abandoned request.

Changes:
- Send $/cancelRequest after an issued request reaches its client timeout.
- Preserve the existing timeout error and pending-request cleanup.

Evidence:
- The workspace-readiness regression observes cancellation for the dropped
  status request before polling succeeds.

Refs #8116
2026-08-10 04:07:11 +02:00
Bonobo af83370d82 fix(lsp): stop idle checker during shutdown
Why:
The module-level idle interval remains referenced after every client shuts
down and keeps short-lived hosts alive.

Changes:
- Stop the idle checker before draining active and pending clients.
- Preserve explicit reconfiguration through setIdleTimeout().

Evidence:
- A child-process regression probe exits after shutdown with the checker
  configured.

Refs #8115
2026-08-10 04:06:07 +02:00
z80 40b2d534a0 fix(coding-agent): surface todo progress in the collapsed panel
While the agent worked through a plan, every sub-todo rendered unchecked
no matter how far along the run was: the phase header highlighted, the
task rows below it looked untouched. Three separate causes, all on the
collapsed path that is the default view.

`selectCollapsedTodos` dropped every closed row while a phase held open
work, so finishing a task only ever *removed* a line — the panel never
rendered a checked box until the whole phase settled. That also made the
card's completion animation dead code: `details.completedTasks` drives a
14-frame strike reveal at 65ms with a component render per tick, against
a row the viewport had already discarded. The existing animation test
missed it by asserting on `expanded: true`.

The viewport now keeps the newest closed task as a checked lead row,
additive to the open-task cap so it never evicts open work, and the
strike sweep lands where users actually see it.

Second, the card gave a `done/total` count to every collapsed untouched
phase but not to the active one, so the phase being worked in was the
single phase reporting no progress. Extracted `formatPhaseProgress` and
put it on every phase header.

Third, the todo auto-clear (`tasks.todoClearDelay`, default 60s) armed
on any list holding a closed task and physically deleted those tasks
from the HUD's copy. An in-flight phase at `3/4` silently became `0/1`
sixty seconds later, fully-closed phases vanished, and stage roman
numerals renumbered off the filtered index — until the next `todo` call
restored the real snapshot. It now fires only once the whole list is
settled, which is the case the setting exists for; the walking viewport
already hides closed rows while work remains.

Progress counters also count closed tasks rather than only completed
ones. The viewport hides abandoned tasks too, so counting only
completions left a phase reading permanently stuck.
2026-08-07 19:49:31 -04:00
roboomp 5b3bed18b5 fix(launch): accepted empty daemon regex matches
Preserved zero-width readiness and wait matches across the daemon wire protocol, and isolated malformed completion events from unrelated pending RPCs.

Fixes #7908
2026-08-07 23:38:25 +02:00
re2zero 9d0699e070 fix(coding-agent): resolve xd:// device dispatches against device user policy first
When an xd:// device is dispatched through the write tool, the outer
approval gate now consults tools.approval.<deviceName> before falling
back to tools.approval.write. This lets users scope allow/deny/prompt
to a single device mount without changing the blanket write tool policy.

The write tool's approval function returns { tier, policyKey: deviceName }
for xd:// device dispatches. resolveApproval uses the policyKey to look
up the user override on the device name, falling back to the invoking
tool's own policy when the device has none configured.

Adds:
- ToolApprovalDecision.policyKey field (optional, additive)
- policyKey-aware lookup in resolveApproval and requiresApproval
- Updated error messages naming the correct config key
- Unit tests for policyKey resolution and WriteTool integration

Fixes can1357/oh-my-pi#7923
2026-08-08 02:45:19 +08:00
can1357 8b9579c06a fix(bash): preserve escaped newline semantics 2026-08-07 13:39:54 +02:00
can1357 50741716b8 Merge PR #7888: fix(bash): constrain leading cd extraction to a single path token (@roboomp) 2026-08-07 13:39:54 +02:00
can1357 73b91d89d4 Merge PR #7816: fix(coding-agent/tools): preserve native JSON Schema containers (@kimprap) 2026-08-07 13:39:52 +02:00
can1357 b50b05ee39 Merge PR #7790: fix(read): normalize recovery paths (@roboomp) 2026-08-07 13:39:52 +02:00
roboomp 2597244b00 fix(bash): constrain leading cd extraction to a single path token
The `cd <path> && ...` extractor matched everything up to the first `&&`
with a greedy regex, so a redirect or extra argument before the `&&` was
swallowed into the structured cwd. `cd /tmp 2>/dev/null && echo ok` became
cwd `/tmp 2>/dev/null`, which failed fs.stat and killed the command before
the shell ran.

Replace the regex with `extractLeadingCdTarget`, a quote/escape-aware
scanner in shell-tokenize.ts that captures exactly one path token and
bails (leaving the command for the shell) when anything else — a redirect,
extra argument, shell expansion, or a non-`&&` separator — precedes the
top-level `&&`.

Fixes #7883
2026-08-07 06:43:55 +00:00
kimp cde7f7f30b chore: merge upstream main into strict schema fix 2026-08-07 00:17:51 +07:00
kimp 7dcfd9422a fix(coding-agent/tools): deduplicate JTD primitive detection 2026-08-07 00:17:38 +07:00
kimp 103791f14b fix(coding-agent/tools): preserve native JSON Schema containers 2026-08-06 15:50:22 +07:00
roboomp bfd1e64bf6 fix(read): normalized recovery paths
Used the resolved cwd-relative path in summary recovery selectors, PDF image handles, and notebook diagnostics.

Fixes #7788
2026-08-06 03:40:10 +00:00
can1357 fa8922b40c Merge PR #7667: fix(web-search): keep GPT-5.6 hosted tools top-level (@roboomp) 2026-08-05 21:50:25 +02:00
can1357 f37b06eb3b Merge PR #7680: fix(coding-agent): stringify Bash preview env values (@GratefulDave) 2026-08-05 21:50:24 +02:00
can1357 e6ebfd4d49 Merge PR #7705: fix(coding-agent): validate Linux browser executables before launch (@metaphorics) 2026-08-05 21:50:24 +02:00
can1357 e9888367d1 refactor: migrated packages to internal utility modules and removed external dependencies
- Implemented in-house, zero-dependency utility modules in `pi-utils` covering DOM manipulation, markdown parsing, templating, browser automation helpers, and terminal buffers.
- Migrated packages across the repository to consume the new internal utilities and `omptype` schema validators instead of external dependencies.
- Removed multiple external runtime and development dependencies including Zod, Marked, LRU cache, Turndown, and Puppeteer browser packages.
2026-08-05 13:39:09 +02:00
metaphorics e1a7c17c2b fix(coding-agent): bound browser version probes 2026-08-05 11:10:20 +00:00
metaphorics ecb22957cf fix(coding-agent): validate Linux browser executables 2026-08-05 10:50:31 +00:00
brymko 271e621a02 test(coding-agent): synchronized browser rejection checks
Waited for the observable warning event instead of assuming late continuations settle within a fixed wall-clock delay under CI load.
2026-08-05 17:47:03 +08:00
brymko fe086df7bf fix(coding-agent): aborted browser runs before draining
Closed worker and cmux run signals before yielding for floating-rejection drainage. Stale promise continuations can no longer begin page navigation after evaluated code returns.
2026-08-05 16:45:36 +08:00
brymko a51b69ee85 fix(coding-agent): kept unrelated worker failures fatal
Classified only marked browser failures and evaluated-run stack frames as run-owned rejections. Unrelated tab-worker failures now remain on the worker guard's fatal path.
2026-08-05 16:44:41 +08:00
brymko 5c0187dec5 fix(coding-agent): isolated promise combinator tracking
Used a run-scoped Promise subclass instead of mutating native combinator methods. Evaluated code can now freeze its Promise constructor without breaking cleanup or later browser runs.
2026-08-05 16:43:00 +08:00
brymko af35be1105 fix(coding-agent): tracked browser promise combinators
Observed Promise.all and Promise.race results derived from browser calls during each evaluated run. User catch continuations that rethrow browser failures now fail the owning run without changing native await behavior.
2026-08-05 16:43:00 +08:00
brymko bb5d64557d fix(coding-agent): preserved late browser rejections
Logged late user continuation failures in cmux runs and delayed worker rejection folding until request-interception cleanup completed. This closes both windows where missing awaits could be silently dropped.
2026-08-05 15:46:38 +08:00
brymko dd0b7b3176 fix(coding-agent): reported late browser continuations
Logged user continuation rejections that settle after their browser run has ended. This preserves the completed result while making missing awaits visible instead of silently dropping them.
2026-08-05 15:46:38 +08:00
brymko 71c26e5958 fix(coding-agent): reported rethrown browser continuations
Tracked whether user continuation callbacks create each descendant rejection. Browser errors that user code rethrows now fail the owning run instead of being contained as propagated helper failures.
2026-08-05 15:45:17 +08:00
brymko 2fd469de75 fix(coding-agent): corrected browser rejection containment
Scoped browser-error markers to each run and contained only propagated browser failures. Routed floated user continuations into failed runs and added worker coverage for native await plus every continuation method.
2026-08-05 15:45:17 +08:00
David Andrews dff7f8271a fix(coding-agent): stringify preview env values
(cherry picked from commit 2d852c0632116f227b772dbbb646169971bd9398)
2026-08-05 03:07:27 -04:00
brymko 364e13c49e fix(coding-agent): contained browser timeout rejections
Observed every browser facade continuation so fire-and-forget helper
timeouts cannot wedge or kill a tab worker. Preserved native Promise
identity for callers and test matchers.
2026-08-05 14:31:03 +08:00