Commit Graph

3416 Commits

Author SHA1 Message Date
can1357 4e54e557bc feat: improved context usage display and update model configurations
- Updated status line to display token usage with an unknown context marker (" 5K/? ") when the model context window is unavailable.
- Updated `fugu` model specifications in `models.json` and catalog constants with corrected pricing, increased context windows, and disabled stream idle timeouts.
- Corrected OpenAI usage accounting by excluding redundant orchestration input tokens in `openai-shared` logic.
2026-06-22 08:04:42 +02:00
can1357 6bdba2d3c9 test(coding-agent): cover opt-in eval backend schema gating
- Assert the eval tool hides disabled backends from the model-facing wire
  schema (language enum + field descriptions), summary, and description by
  default (rb/jl off), and advertises them once enabled — including the
  enabled-subset case.
- Update the env-flag fallback test for the new rb/jl opt-in defaults and
  extend the env guard to PI_RB/PI_JL so the suite is shell-independent.
- Note the opt-in default and dynamic advertising in the changelog.
2026-06-22 06:22:29 +02:00
can1357 33e2594f03 feat(coding-agent): added support for Julia and display language icons in code cells
- Added Julia language support to the theme symbol maps.
- Enabled language icons in code cell headers for the eval tool renderer.
2026-06-22 06:13:01 +02:00
can1357 1f3f3cf5d1 feat: added ruby and julia language support to coding-agent
- Implemented persistent execution backends for Ruby and Julia using dedicated kernel processes and NDJSON-based IPC.
- Integrated language-specific prelude environments, runtime path resolution, and security-focused environment variable filtering.
- Exposed configuration options, tool schema updates, and lifecycle management for seamless agent interaction with both languages.
- Added comprehensive integration tests and updated prompt documentation to support the new evaluation capabilities.
2026-06-22 06:13:01 +02:00
can1357 93db34b0d5 refactor(coding-agent): consolidated editor state and unify transcript rendering
- Centralized draft state and image management by migrating fields from context to the CustomEditor component.
- Standardized transcript row construction by introducing shared helpers for background jobs, IRC traffic, and file mentions.
- Refactored redundant UI logic and helper functions into reusable utility modules to streamline message submission and component rendering.
- Standardized event handler types by consolidating lifecycle definitions into a shared module while maintaining public API stability.
2026-06-22 06:11:57 +02:00
can1357 c204d1b30c refactor(coding-agent): removed redundant readHashLines setting
- Removed the `readHashLines` setting to consolidate hashline display logic.
- Simplified `resolveFileDisplayMode` to derive hashline visibility solely from the active edit mode.
- Added automatic cleanup of the `readHashLines` key from existing configuration files.
2026-06-22 06:11:28 +02:00
can1357 fc01e3b6cb feat: added devin provider support
- Implemented the Devin inference provider, including OAuth flow with PKCE, Connect protocol integration, and streaming support for chat requests.
- Integrated comprehensive Protobuf-based service definitions and generated TypeScript clients for Devin's API infrastructure, including model management and workspace operations.
- Updated the AI and Catalog modules to support dynamic model discovery, provider-specific configuration, and authentication.
- Standardized tool call arguments as `Record<string, unknown>` across provider implementations to ensure type safety.
2026-06-22 04:45:17 +02:00
can1357 7302a7ae96 feat(coding-agent): improved secret obfuscation and data protection
- Refined obfuscation logic to use granular, typed transformations instead of generic object traversal.
- Enforced an 8-character minimum for secret patterns and restricted redaction to user-authored content to prevent false positives.
- Preserved system prompts, tool schemas, and opaque remote replay data to maintain provider context and data integrity.
- Integrated protected snapshot exports with targeted redaction to safeguard sensitive information in shared sessions.
2026-06-22 01:13:52 +02:00
can1357 aa1dbde498 Merge remote-tracking branch 'origin/farm/a2703356/enforced-rpc-behavior-left-over' 2026-06-21 23:29:39 +02:00
can1357 7315059812 Revert "fix(coding-agent): prevented WebP encoding for Codex-bound images"
This reverts commit 2e6e0ea3b3.
2026-06-21 23:29:10 +02:00
roboomp 816f47540a fix(rpc): preserved explicit caller config across host-defaulted paths
Re-added the isConfigured guard inside applyDefaultSettingOverrides so the
runtime override applied at RPC/ACP startup only fills holes — explicit
embedder/project/--config/global values now survive for task.isolation.{mode,
merge,commits}, task.{eager,batch,maxConcurrency,maxRecursionDepth,disabledAgents,
agentModelOverrides}, memory.backend, memories.enabled, advisor.{enabled,
subagents,syncBacklog,immuneTurns}, plus the RPC-only async.{enabled,maxJobs}
and bash.autoBackground.{enabled,thresholdMs}. The guard was originally added
for #2598 and had quietly regressed, so the override re-asserted the schema
default and clobbered every explicit value — matching the contract problem
#2828 already fixed for the todo paths.

Replaced the prior 'default-disables advisor' test (which codified the
clobbering as the contract) with a comprehensive 'honors explicit
host-defaulted settings' regression covering every contested path across
rpc/rpc-ui/acp.

Fixes #3207
2026-06-21 19:58:28 +00:00
can1357 266723a870 Merge remote-tracking branch 'origin/farm/fb97f79d/fix-prompt-template-optimistic-render' 2026-06-21 18:31:42 +02:00
can1357 1cb433cbde feat(coding-agent): added browser navigation helpers and improved timeout management
- Implemented `waitForSelector` and `waitForNavigation` methods in the browser tool API.
- Introduced per-operation fail-fast budget management with dynamic timeout clamping.
- Added validation for selector engines to reject unsupported Playwright-only platform features.
- Standardized error handling to provide descriptive, named timeouts for stalled browser operations.
2026-06-21 18:10:10 +02:00
can1357 2e6e0ea3b3 fix(coding-agent): prevented WebP encoding for Codex-bound images
- Updated model detection to exclude WebP format for Codex-based providers, which do not support it.
- Forced the image resize pipeline to encode to PNG or JPEG for incompatible models to resolve transmission errors.
- Added test coverage to verify that WebP images are re-encoded when using the Codex Responses backend.
2026-06-21 18:00:18 +02:00
roboomp 1c22d32640 test(tui): restored event-controller optimistic stubs
Added clearOptimisticUserMessage and replaceOptimisticUserMessage stubs to the EventController message_start test double so the optimistic-submission case no longer throws when the controller reconciles the signature.

Fixes #3199
2026-06-21 15:49:58 +00:00
roboomp a57f9d083d fix(tui): preserved local queued message reconciliation
Skipped optimistic replacement when a user message_start matches another recorded local submission, preserving the pending prompt bubble until its own expanded event arrives.

Added coverage for the queued-message drain race between startPendingSubmission and prompt dispatch.

Fixes #3199
2026-06-21 15:43:01 +00:00
roboomp b345b3aa57 fix(tui): refreshed optimistic replay handles
Updated optimistic replay to track the replacement component handles created during transcript rebuilds, so expanded slash prompts still replace the raw replayed message.

Extended the regression test to cover the rebuild window called out in review.

Fixes #3199
2026-06-21 15:37:04 +00:00
roboomp 01f31a6238 fix(tui): replaced raw optimistic slash prompts
Replaced raw optimistic slash-command transcript entries with the canonical user message emitted by AgentSession when prompt expansion changes the text.

Added coverage for prompt-template expansion reconciliation so the transcript keeps one expanded user message.

Fixes #3199
2026-06-21 15:31:52 +00:00
can1357 f353ae0067 chore: biome format after PR integration 2026-06-21 17:20:22 +02:00
can1357 e43d01a684 Merge PR #1794: fix(coding-agent): mark forked sessions in resume picker (@roboomp)
# Conflicts:
#	packages/coding-agent/src/modes/components/session-selector.ts
2026-06-21 17:18:16 +02:00
can1357 1936705df8 Merge PR #1956: fix(coding-agent): render extension sendMessage(display:true) once during session_start (@roboomp) 2026-06-21 17:16:27 +02:00
can1357 0ca62f1b8b Merge PR #1865: fix(session): keep auto thinking mode active across session resume (@msimon) 2026-06-21 17:09:50 +02:00
can1357 5c9fe0bfa0 Merge PR #2134: fix(coding-agent): submit /agents create form and hook editor on Ctrl+Q (@roboomp) 2026-06-21 17:06:15 +02:00
can1357 e8b60408b2 Merge PR #1939: fix(coding-agent): guard Git-mutating automation in pure jj workspaces (@roboomp)
# Conflicts:
#	packages/coding-agent/src/task/worktree.ts
#	packages/coding-agent/test/task/worktree.test.ts
2026-06-21 17:05:15 +02:00
can1357 ae051a6a33 Merge PR #1807: fix(hindsight): drop punctuation-only assistant turns before retain (@roboomp)
# Conflicts:
#	packages/coding-agent/src/hindsight/transcript.ts
2026-06-21 17:01:47 +02:00
can1357 a796c22101 Merge PR #2244: fix: route edit/patch/replace writes through ACP client bridge (@Mokto)
# Conflicts:
#	packages/coding-agent/src/edit/modes/replace.ts
#	packages/coding-agent/src/tools/write.ts
2026-06-21 16:31:12 +02:00
can1357 8cab627e26 Merge PR #3166: fix(coding-agent): force-activate write tool while plan mode is live (@roboomp) 2026-06-21 16:28:19 +02:00
can1357 ac192587a6 Merge PR #3182: fix(mcp): normalize OpenCode MCP command arrays (@roboomp) 2026-06-21 16:28:19 +02:00
can1357 310f2a9ce9 Merge PR #3190: fix(coding-agent): honor explicit local providers.tinyModel (@roboomp) 2026-06-21 16:28:19 +02:00
roboomp b8743ed31f fix(coding-agent): showed xhigh in model picker
Rendered the XHigh thinking selector with the catalog vocabulary so OpenAI GPT-5.5 exposes low/medium/high/xhigh in /model.

Fixes #3194
2026-06-21 12:36:57 +00:00
roboomp 853e8abda4 fix(coding-agent): honored explicit local providers.tinyModel choice in title generation
When the user set `providers.tinyModel` to a local key, `generateSessionTitle`
still raced local against the online `smol` path with a 10 s timeout and
silently fired the online request whenever the local worker returned `null`
(unknown key, model not downloaded, transformers.js failure). The online path
resolves the `smol` role through `priority.json` (haiku → flash → mini → …);
with an `OPENROUTER_API_KEY` picked up from env, that silently billed
OpenRouter without consent.

Drop the race entirely for local choices: honor the user's setting, log a
warning on local failure, leave the session untitled. The `raceFirstNonNull`
helper and `TITLE_LOCAL_FALLBACK_DELAY_MS` had no other consumer and are
removed; the obsolete \"silently bills online when local fails\" tests are
flipped into regressions that lock the no-fallback contract, including the
unknown-key path (e.g. \"ollama:gpt-oss\") which previously also leaked
straight through to the online billing path.

Fixes #3187
2026-06-21 10:51:04 +00:00
roboomp c531117869 fix(mcp): normalized opencode command arrays
Mapped OpenCode MCP array commands to stdio command plus args and accepted environment as the provider-native env key.\n\nAdded regression coverage for array command normalization, environment mapping, env fallback, and empty args omission.\n\nFixes #3180
2026-06-21 09:23:54 +00: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 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 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
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 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
roboomp 6f3d6ba2e4 fix(coding-agent): restricted plan-mode write activation to built-ins
Tracked current-registry built-in provenance through AgentSession so plan mode
only force-activates the built-in write implementation. Extension or SDK tools
that shadow the name `write` stay inactive, preserving plan mode's read-only
contract through the built-in write/edit guard.

Added a regression that registers a shadowing write tool without built-in
provenance and verifies plan mode does not activate it.
2026-06-21 04:04:14 +00:00
roboomp a7662b4208 style: bun run fix 2026-06-21 03:54:32 +00:00
roboomp 832810e212 fix(coding-agent): force-activated write tool while plan mode is live
Plan-mode entry only added `resolve` to the active toolset, so when
`tools.discoveryMode: "all"` left `write` hidden behind
`search_tool_bm25` the agent was stuck with `edit` to create the plan
file — which fails on a non-existent path and stalls the planning
turn. `#enterPlanMode` now augments the active set with both `resolve`
and `write` whenever the registry built them, matching what
`plan-mode-active.md` instructs the model to use, and `#exitPlanMode`
still restores the pre-plan toolset verbatim.

Fixes #3165
2026-06-21 03:54:11 +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 45410e865e chore: fix changelogs 2026-06-21 04:16:35 +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
oldschoola 13bfc7b9c0 Remove Wafer Pass provider 2026-06-21 02:45:48 +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