Commit Graph
10170 Commits
Author SHA1 Message Date
roboomp 3faeddd3a6 fix(tui): kept ssh partial result commit-unstable
Reviewer flagged that ToolExecutionComponent.isTranscriptBlockCommitStable\ntreated any block with a defined #result as commit-stable, so a long\nstreaming SSH partial render could sit on its stable pending header until\nderiveLiveCommitState's stable-prefix ratchet promoted it to native\nscrollback, then the final SSH glyph render would land below and strand a\nduplicate pending header above the settled frame.\n\n- Added ToolRenderer.provisionalPartialResult opt-in for renderers whose\n  partial-result chrome differs from the final render.\n- Honored it in ToolExecutionComponent.isTranscriptBlockCommitStable so the\n  block stays commit-unstable while isPartial holds and flips stable as soon\n  as the result settles.\n- Set provisionalPartialResult: true on the SSH renderer.\n- Added test/tools/ssh-commit-stability.test.ts covering the partial/final\n  transition and the non-regression for bash.\n\nFixes #3177
2026-06-21 08:13:56 +00:00
roboomp 5910ae32b4 style: bun run fix 2026-06-21 08:02:10 +00:00
roboomp 62c1a3bb42 fix(tui): kept partial ssh headers pending
- Kept SSH result frames in the pending state while partial output is streaming.\n- Added renderer coverage for the partial-to-final SSH header transition.\n\nFixes #3177
2026-06-21 08:02:03 +00:00
can1357 35508c48f7 chore: bump version to 16.1.10 2026-06-21 08:40:20 +02:00
can1357 076fd0de81 test(coding-agent): realign discovery and TTSR fixtures with current tool invariants
- sdk-mcp-discovery: `find` became an essential tool (2eef88978), so it can no longer be hidden/rediscovered under `tools.discoveryMode: all`. Switch the discoverable-tool assertions to `search` (still `loadMode: discoverable`).
- agent-session-concurrent: the agent loop now drops tool calls that never reached `toolcall_end` from an aborted turn (0890b2be6, partial args are unsafe to replay). Emit `toolcall_end` before the TTSR rule-driven abort so the labeled placeholder result is minted.
2026-06-21 08:37:37 +02:00
can1357 a70f3f0614 fix(ai/providers): prevented cross-turn frame and tool result misattribution
- Implement ID-based guards for Codex WebSocket frames to reject stale or unauthorized interleaved frames from previous turns.
- Check sequence numbers within Codex responses to detect and handle out-of-order frame delivery.
- Restrict tool result consumption to occurrences appearing after the associated tool call, preventing the reuse of orphaned results from earlier conversation turns.
2026-06-21 08:30:37 +02:00
can1357 24cb2412a6 fix(tui): prevented streaming output loss under unstable barriers
- Fixed streaming output being lost from native scrollback when an unstable "barrier" block preceded it.
- Adjusted the engine commit logic to ensure all scrolled-off content reaches history, treating the `windowTop` as the persistent commit floor.
- Updated the committed-prefix logic to perform range-aware auditing, ensuring forced-overflow rows are accurately re-anchored rather than dropped upon barrier finalization.
2026-06-21 08:24:13 +02:00
can1357 5207a98fd8 refactor(coding-agent): simplified temporary model status message
- Inlined the temporary model status formatting logic directly into the controller.
- Removed the unused `formatTemporaryModelStatus` utility function and its associated test.
2026-06-21 07:42:46 +02:00
can1357 78f6586dd4 Merge remote-tracking branch 'origin/farm/09065be8/opencode-insufficient-balance' 2026-06-21 07:37:39 +02:00
can1357 67938f6bde Merge remote-tracking branch 'origin/farm/0e78447e/dashscope-rate-limit-auth' 2026-06-21 07:37:31 +02:00
can1357 26e9c1122b fix(tui): resolved stability regressions in committed prefix audits
- Refactored committed prefix auditing into distinct byte-stable, durable, and forced-overflow zones.
- Integrated a hard scan detector and refined boundary management to prevent data loss during commit-unstable barrier shifts.
- Implemented robust regression testing via the streaming-scrollback-defer harness to verify frame continuity.
- Updated audit logic to independently manage boundaries, ensuring forced-overflow rows remain correctly finalized.
2026-06-21 07:37:11 +02:00
can1357 c5cf47aa7f fix(coding-agent/utils): handled EISDIR and ENOTDIR errors during ref resolution
- Update `shouldRetry` to treat `EISDIR` and `ENOTDIR` as terminal errors, preventing unnecessary retries when encountering Git reference directory conflicts.
- Add a test suite to verify graceful resolution of branches in scenarios where a packed ref conflicts with a directory path in the filesystem.
2026-06-21 07:36:25 +02:00
roboomp 801a0dd302 fix(ai): classified dashscope throttles as rate limits
Prioritized rate-limit wording before auth wording in auth-gateway error classification so DashScope throttling messages that contain unauthorized do not invalidate credentials.

Fixes #3172
2026-06-21 05:24:06 +00:00
roboomp 054d3edb76 fix(ai): handled opencode insufficient balance quota
Classified OpenCode Go 401 Insufficient balance responses as quota exhaustion so usage-limit retry, credential rotation, and fallback chains engage. Added regression coverage for both parsing and usage-limit detection.\n\nFixes #3169
2026-06-21 05:11:29 +00:00
can1357 07c910210b feat(coding-agent): allowed toggling workspace tree in system prompt
- Added `includeWorkspaceTree` configuration setting to optionally render the workspace directory tree.
- Configured the system prompt template and SDK to respect this toggle, allowing users to disable the tree to prevent prompt cache invalidation.
2026-06-21 07:03:45 +02:00
can1357 2eef88978b feat(coding-agent): made write and find tools essential
- Promoted `write` and `find` tools to `essential` status to ensure they are always available regardless of discovery mode.
- Updated `DEFAULT_ESSENTIAL_TOOL_NAMES` to include these tools by default.
- Updated documentation and tests to reflect the change in default essential tool availability.

Fixes #3165
2026-06-21 07:02:44 +02:00
can1357 151561cb7c fix(terminal-bench): improved docker cleanup error reporting
- Added error handling to docker container and network removal commands.
- Print yellow warning messages to stdout when cleanup commands fail to exit cleanly.
2026-06-21 06:52:21 +02:00
can1357 984c8dd2f6 fix(coding-agent): reconciled tool arguments on execution start
- Synchronize tool arguments with the component state upon receipt of `tool_execution_start` to ensure visual consistency when final update events are missed.
- Terminate active argument reveal streams to prevent late ticks from overwriting valid, fully-materialized tool arguments with stale partial data.
- Add test coverage to verify that tool UI components render finalized arguments even in the absence of intermediate streaming updates.
2026-06-21 06:51:37 +02:00
can1357 e649017322 feat(coding-agent): added ARIA snapshot support for browser tools
- Implemented `tab.ariaSnapshot()` to capture and represent page structures as ARIA-tree YAML.
- Introduced `tab.ref()` and ref-based selector parsing to enable precise element interaction via unique ARIA identifiers.
- Integrated automated script bundling for cross-environment evaluation of ARIA snapshot logic.
- Updated browser action methods to resolve and target elements using ARIA-ref handles.
2026-06-21 06:39:14 +02:00
can1357 203ed55743 feat(ai): replaced partial-json with a custom relaxed JSON parser
- Replaced `partial-json` with a high-performance `RelaxedJson` parser capable of handling LLM-specific malformations.
- Enabled native support for unquoted keys, single quotes, comments, and Python literals (`True`/`False`/`None`).
- Improved streaming robustness by rejecting non-finite numbers (NaN/Infinity) and rolling back incomplete trailing tokens.
- Optimized tool-call execution by ensuring malformed or truncated arguments are skipped instead of surfaced as undefined/NaN.
- Added comprehensive test suite for both strict repair parsing and partial streaming scenarios.
2026-06-21 06:10:20 +02:00
can1357 0b5e2d8276 fix(ai-providers): normalized Anthropic tool call IDs
- Implemented `normalizeAnthropicTargetToolCallId` to define consistent ID validation and fallback logic.
- Integrated the normalization utility into the `transformMessages` function to ensure API compatibility.
- Refactored `transformMessages` to decouple mapping logic from message loop execution for better maintainability.
- Updated the changelog to reflect the correction of tool call ID handling for Anthropic-compatible models.
2026-06-21 06:04:49 +02:00
can1357 d9eeb008dc feat(terminal-bench): added environment forwarding and cleanup command
- Added --env flag to forward host environment variables into Harbor containers.
- Implemented collectForwardEnv to sanitize and inject DI-specific variables via OMP_TB_FORWARD_ENV.
- Introduced standalone terminal-bench cleanup command to prune stale Docker containers and networks.
- Refactored Docker cleanup logic into a reusable utility function for consistent lifecycle management.
2026-06-21 04:59:11 +02:00
can1357 4cf1ca517f test(ai): updated moonshot json schema test assertion
- Replace loose type check on the operation schema with an explicit equality check.
- Add comments clarifying the wire optimization behavior for const-union to enum collapse.
2026-06-21 04:48:36 +02:00
can1357 80d4d4969f Merge remote-tracking branch 'origin/farm/584fc779/fix-litellm-model-enrichment' 2026-06-21 04:21:35 +02:00
roboomp 1495779e52 fix(catalog): preserved litellm discovery transport
- Kept provider discovery defaults authoritative for api and provider when layering bundled or models.dev metadata.
- Added a LiteLLM regression covering a deepseek-v4-flash collision with the ollama-cloud catalog.

Fixes #3162
2026-06-21 02:20:41 +00:00
can1357 d7d15b94a9 test(coding-agent): extended test suite to mock process rows
- Mocked stdout rows for the AgentTranscriptViewer tests to ensure consistent terminal height.
- Added an afterEach cleanup to restore the original property descriptor for process.stdout.rows.
2026-06-21 04:19:53 +02:00
can1357 5ba474656c chore: bump version to 16.1.9 2026-06-21 04:16:49 +02:00
can1357 45410e865e chore: fix changelogs 2026-06-21 04:16:35 +02:00
can1357 57cb7447e0 feat(coding-agent): enhanced browser stealth and automation capabilities
- Overhauled stealth spoofing mechanisms for WebGL, screen dimensions, Web workers, and iframe contexts using prototype-aware injection.
- Centralized function string representation patching to improve mimicry of native browser behavior across global objects.
- Patched puppeteer-core to remove detectable evaluation markers and implement lazy, pull-style execution context management.
- Enabled support for capturing LLM request JSON dumps and adjusted launcher flags to improve organic request patterns.
2026-06-21 04:14:26 +02:00
can1357 27f24f8511 feat(ai): optimized tool schema generation by collapsing literal unions
- Implemented `collapseConstUnionAnyOf` to simplify `anyOf` branches into compact `enum` structures when values share a scalar type.
- Preserved existing schema annotations by skipping collapse when per-variant descriptions differ or conflict with root descriptions.
- Added comprehensive unit tests in `schema-wire.test.ts` to verify lossless transformation of described literal unions.
- Included validation for user-message history payload integrity within `openai-responses-history-payload.test.ts` to ensure message order remains consistent during processing.
2026-06-21 03:25:17 +02:00
can1357 4d96bcf6b6 feat: replaced manual debug request path with automated llm dump
- Replaced the `/debug dump-next-request` command with an updated `/dump` command that exports LLM request context to JSON sidecar files.
- Removed persistent debug path state and manual path configuration in favor of automated generation.
- Updated session logic to handle serializing LLM request context to temporary directories.
- Refactored testing suites to remove path-based debug tests and verify dynamic request file generation.
2026-06-21 03:18:20 +02:00
can1357 72b2885b5f fix(ai): handled double-encoded object keys in JSON array strings
- Updated array normalization to unwrap double-encoded object keys within JSON-stringified arrays.
- Added a regression test to verify successful coercion of double-encoded objects inside string-encoded union types.
2026-06-21 02:48:35 +02:00
can1357 391cd59fb9 fix(ai): handled double-JSON-encoded tool call arguments
- Implemented recursive key normalization to unwrap object keys incorrectly serialized by LLMs (e.g., `{"\"op\"": "done"}`).
- Integrated normalization pass into `validateToolArguments` execution flow to prevent keys from being dropped by schema repairs.
- Added support for multi-layered encoding peels and protection against sibling key collisions during renaming.
- Handled edge cases where double-encoded keys are exposed only after internal JSON-string payload parsing.
- Added comprehensive testing for various scenarios, including nested objects and string-wrapped JSON payloads.
2026-06-21 02:46:55 +02:00
Can BölükandGitHub 6b744c5ad6 Merge pull request #3160 from oldschoola/llama-cpp-login-provider
Add llama.cpp login provider
2026-06-21 02:46:11 +02:00
can1357 320f514f77 fix(ai): adjusted llama-cpp base url and refactor token validation
- Update `llama.cpp` base URL to remove the `/v1` suffix.
- Consolidate local provider token validation in `coding-agent` using a `Set`.
- Add test coverage to ensure catalog model IDs are preserved verbatim on the wire.
2026-06-21 02:45:48 +02:00
oldschoolaandcan1357 13bfc7b9c0 Remove Wafer Pass provider 2026-06-21 02:45:48 +02:00
oldschoolaandcan1357 4702818870 Add llama.cpp login provider 2026-06-21 02:45:48 +02:00
can1357 7fcb85f812 chore: updated changelogs & added moonshot tests 2026-06-21 02:29:57 +02:00
can1357 c4a02fe714 chore: updated vouched contributor list
- Added igasmi and pgupta-git to the list of vouched contributors.
2026-06-21 02:29:18 +02:00
github-actions[bot]andcan1357 38de8e6203 Update VOUCHED list
https://github.com/can1357/oh-my-pi/discussions/3103#discussioncomment-DC_kwDOQxs0bc4BCSsa
2026-06-21 02:27:51 +02:00
can1357 e31bfa4b96 Merge remote-tracking branch 'origin/farm/7a22e7a4/mcp-toggle-reconnects-others' 2026-06-21 02:18:29 +02:00
can1357 0f976084b8 fix(coding-agent/cli): route leading global flags before a subcommand to that subcommand
`omp --approval-mode=yolo acp` was rewritten to `launch --approval-mode=yolo
acp`, swallowing `acp` as a launch prompt so the yolo override never reached the
ACP command path (the ACP permission gate from #2097 stayed in always-ask).

`resolveCliArgv` only inspected `argv[0]`, so any leading global option flag hid
the real subcommand. It now scans past leading flags using the launch parser's
value-consumption contract (a flag's value is never mistaken for the subcommand,
e.g. `--model acp`) and hoists the recognized subcommand to the front with the
flags preserved as its own argv. Genuine launch prompts are untouched.

The flag value-consumption rule is factored into `cli/flag-tables.ts`
(`flagConsumesValue` + the shared `isUnknownLongValueCandidate`) so the resolver
and the profile bootstrap share one source of truth.

Fixed permission mode not respected in ACP mode ([#2970](https://github.com/can1357/oh-my-pi/issues/2970))

Fixes #2970
2026-06-21 02:17:54 +02:00
can1357 725aa2222b fix(coding-agent/lsp): drain config pulls on lazy cold start
The background message reader matched every incoming message against the
pending client-request map by id before checking for a `method`. Server
request ids live in the server's own id space and routinely collide with
the client's in-flight request ids, so a server-originated
`workspace/configuration` pull whose id matched a pending request (e.g. a
basedpyright pull landing while a `documentSymbol` request with the same
id was open) was swallowed as a bogus response: the client request
resolved with `undefined` and the pull was never answered, wedging
servers that gate analysis on configuration.

Route any message carrying a `method` as a server request (or
notification) before id-matching responses, so every config pull is
answered under lazy init -- parity with the warmup/reload path, which
escaped the bug only because it issues no concurrent semantic request
while the cold-start pulls drain. lsp.lazy default is unchanged.

Fixes #3001
2026-06-21 02:16:26 +02:00
can1357 b0c6ad825c fix(coding-agent): hint at omp plugin list/uninstall instead of leaking bare plugin verbs to launch
The plugins docs advertise `omp list`/`omp remove` as top-level commands,
but only `omp install` is registered. `resolveCliArgv` rewrote any
unregistered first-arg to `launch`, so `omp list` silently started an
interactive agent session with "list" as the LLM prompt instead of
managing plugins.

Reserve the bare, documented-but-unregistered plugin verbs `list` and
`remove` with a helpful hint pointing at the real `omp plugin list` /
`omp plugin uninstall <name>` commands (same `extensions` mechanism /
same class as the `install` leak fixed in #1496/#1498). Multi-word
prompts that merely begin with those words still route to `launch`, so
genuine prompts are unaffected.

Fixes #2935
2026-06-21 02:16:17 +02:00
can1357 e8f4664d5e feat(ai): added support for custom moonshot base url and kimi api key
- Added `MOONSHOT_BASE_URL` environment variable support to redirect requests to the Kimi China platform.
- Enabled `KIMI_API_KEY` as an alias for the moonshot provider to improve user experience.

Fixes #2883
2026-06-21 02:15:26 +02:00
roboomp c18d400bdf fix(cli): scoped mcp toggles to one server
Updated /mcp enable and /mcp disable so they connect or disconnect only the named server instead of reloading every MCP server in the session. Added regression coverage for both toggle directions and updated the coding-agent changelog.

Fixes #3157
2026-06-20 23:58:03 +00:00
can1357 12cfb530ad chore: bump version to 16.1.8 2026-06-21 00:39:58 +02:00
can1357 e750fb257c test(coding-agent): updated compaction strategy in test configuration
- Updated the test configuration to specify an explicit compaction strategy.
- Enabled context-full compaction to match expected behavior during tests.
2026-06-21 00:35:07 +02:00
can1357 29f7b57fde feat: migrated core rendering and context transformation to async
- Updated `render`, `renderMany`, and native snapcompact methods to return promises, ensuring scalable async execution.
- Refactored `transformProviderContext` and `buildSideRequestContext` to support asynchronous operations in agent loops.
- Integrated `Promise.all` for improved concurrency when processing frame rendering and rendering batch operations.
- Updated all internal call sites, SDK hooks, and test suites to accommodate the asynchronous API signatures.
2026-06-21 00:32:13 +02:00
can1357 c89e0ea9b2 refactor(ai/providers): removed parallel tool call restriction
- Removed the logic that forced sequential tool calling when custom tools were present in both Codex and OpenAI providers.
- Exported `buildTransformedCodexRequestBody` for testing purposes.
2026-06-21 00:20:56 +02:00