Commit Graph

2731 Commits

Author SHA1 Message Date
Kormákur a19d5a35fc fix(coding-agent): mark rpc skill prompts as agent work 2026-06-14 17:30:37 +02:00
Kormákur d418467715 fix(coding-agent): report local rpc prompt completion 2026-06-14 17:30:36 +02:00
can1357 0bf5f5f7bf test: drop stale priority-default and memory-tab assertions
- model-resolver: removed three resolveAgentModelPatterns cases that pinned exact
  priority.json model names (gpt-5.4 / gemini-3 designer list); priority.json now
  leads slow with gpt-5.5 and includes gemini-3.5-flash, so the hardcoded lists
  were stale. The remaining cases still cover cross-role alias inheritance and
  configured-override precedence.
- settings-selector: removed the condition-hidden group-title assertion that
  depended on the pre-autolearn memory-tab group layout.
2026-06-14 17:20:18 +02:00
can1357 2351e0bba0 Merge remote-tracking branch 'origin/farm/ee42914d/searxng-empty-results-fallback' 2026-06-14 17:18:18 +02:00
roboomp df5bfe15e3 fix(web-search): handled empty searxng result fallback
Treated SearXNG HTTP 200 responses with no usable sources and upstream engine failures as transient provider errors. Added a generic renderable-content guard so provider fallback continues instead of returning an invisible success.\n\nFixes #2571
2026-06-14 15:11:04 +00:00
can1357 99a4e2933e fix(tui): fixed native scrollback loss for streaming assistant rows
- Tracked snapshot-safe boundaries to retain commit-stable streamed rows in scrollback.
- Computed durableBoundary from commit and snapshot ends to prevent row drop regressions.
- Updated audit-row handling so drifting durable rows were excluded from resync checks.
- Added regression tests for commit-stable and commit-unstable relayout streaming cases.
2026-06-14 17:10:35 +02:00
can1357 c031662e1b Merge remote-tracking branch 'origin/farm/71308c81/prompt-templates-in-slash-autocomplete' 2026-06-14 17:10:19 +02:00
can1357 5d210f80f3 Merge remote-tracking branch 'origin/farm/79944106/magic-keyword-glow-shimmer' 2026-06-14 17:10:19 +02:00
can1357 d4f6d39d88 Merge remote-tracking branch 'origin/farm/bbef5632/fix-theme-session-export-with-custom-lig' 2026-06-14 17:10:19 +02:00
can1357 7985e760d7 Merge remote-tracking branch 'origin/farm/391be2bd/discover-plugin-skills' 2026-06-14 17:10:19 +02:00
can1357 f22a7e22ce Merge remote-tracking branch 'origin/farm/0c857c58/load-agents-user-skills-into-slash' 2026-06-14 17:10:19 +02:00
can1357 dbf2786434 Merge remote-tracking branch 'origin/farm/874ccbad/cli-reject-unknown-flags' 2026-06-14 17:10:18 +02:00
can1357 c9adcd5da5 Merge remote-tracking branch 'origin/farm/17ca1d16/defer-goal-objective-while-streaming' 2026-06-14 17:10:18 +02:00
can1357 e97f3e82a0 Merge remote-tracking branch 'origin/farm/76b4d961/mnemopi-stable-bank-id' 2026-06-14 17:10:18 +02:00
can1357 d591275956 Merge remote-tracking branch 'origin/farm/b937e0f1/fix-plan-mode-edit-sandbox' 2026-06-14 17:10:18 +02:00
can1357 af8a050a76 Merge remote-tracking branch 'origin/farm/5cda8de9/fix-openrouter-baseurl-switch' 2026-06-14 17:10:17 +02:00
can1357 3efebf8805 fix: harden merged provider, agent-loop, eager, and autolearn paths
- agent-loop: raise repetition-detection floor to 180 chars and clear thinking
  replay anchors when collapsing a detected loop.
- providers/google: ignore empty text parts, retain terminal thoughtSignatures,
  and stop function-call signatures clobbering the prior block.
- autolearn: capture goal-mode at the turn boundary; harden managed-skill writes
  against hard-links/symlinks (O_NOFOLLOW + nlink); refuse minting managed skills
  whose name an authored skill already claims.
- eager tasks: thread agentKind through the session so a custom top-level agentId
  still gets always-mode delegation; split Eager Tasks prompt into hard vs soft.
- title-generator: race the online title model against a local tiny-model fallback.
- eager-todo: keep the soft reminder aligned with the todo init schema.
- mcp/stdio: keep close() detaching the read loop instead of awaiting it.
- stream loop: fix collapsing and tool-call thought-signature handling.
2026-06-14 17:09:59 +02:00
can1357 c38b9f8a3b Merge PR #2550: fix(prompts): instruct models to avoid LaTeX math delimiters and commands 2026-06-14 17:09:42 +02:00
can1357 42bd488859 Merge PR #2542: feat(coding-agent): opt-in experimental auto-learn (memory + isolated managed skills) 2026-06-14 17:09:41 +02:00
can1357 c03566cd01 Merge PR #2540: feat(coding-agent): three-level eagerness enum for task.eager and todo.eager 2026-06-14 17:09:41 +02:00
can1357 a93ceabaad Merge remote-tracking branch 'origin/farm/1b8d98f8/plan-toggle-exits-to-none' 2026-06-14 16:14:33 +02:00
can1357 9ac310583f Merge remote-tracking branch 'origin/farm/a635c8cc/fix-resolve-gate-thinking' 2026-06-14 16:14:21 +02:00
can1357 1510b783a5 Merge remote-tracking branch 'origin/farm/494f52c3/fix-windows-task-fanout-rangeerror' 2026-06-14 16:13:57 +02:00
can1357 b4672551f9 Merge remote-tracking branch 'origin/farm/1a5cf810/todo-init-hang' 2026-06-14 16:08:40 +02:00
can1357 ee84d8df7d Merge remote-tracking branch 'origin/farm/9e92d013/fix-oauth-compat-remap' 2026-06-14 16:08:19 +02:00
can1357 b830f7912b feat: unified speech setup and introduced local STT/TTS capabilities
- Added unified `omp setup speech` flow with JSON/check modes and model picker.
- Added local STT pipeline with sherpa workers, recorder/download flow, and streaming inference.
- Added local TTS pipeline with `omp say`, backend selection, and streaming vocalization.
- Replaced legacy speech settings with unified `speech`/`speechgen` configuration keys.
2026-06-14 16:07:44 +02:00
roboomp fed5e43f45 fix(coding-agent): remapped legacy oauth imports
Redirected legacy pi-ai utils/oauth subpaths through the compatibility loader so background workers load the relocated OAuth registry modules.\n\nFixes #2566
2026-06-14 12:56:05 +00:00
roboomp a72fc212ca style: bun run fix 2026-06-14 12:05:38 +00:00
roboomp f8a8be8664 fix(agent): corrected eager todo init prompt
Removed schema-incompatible task metadata instructions from the eager todo prelude so GPT-5.5 can satisfy the forced initial todo call.

Added regression coverage that keeps the eager init prompt aligned with the todo init schema.

Fixes #2561
2026-06-14 12:05:28 +00:00
roboomp 65a7444e94 fix(coding-agent/model-registry): preserved transport override across openrouter rediscovery
mergeDiscoveredModel re-applied baseUrl, headers, and compat from the
provider override when an existing bundled record matched, but dropped
`transport` because the raw /v1/models payload never carries one. With
`transport: pi-native` set for an auth-gateway-routed openrouter
provider in models.yml, the next /model switch after the background
catalog refresh picked the now-transport-less entry and routed through
the default openai-completions client to ${baseUrl}/chat/completions —
a path the auth-gateway never serves, so the gateway returned
"404 No route: POST /chat/completions".

Propagate transport with the same priority as baseUrl: provider
override wins, otherwise preserve the existing (boot-time override-
applied) value, otherwise the discovered value. Cover the regression
both at the merge unit level (xiaomi-tp-discovery-merge) and at the
ModelRegistry refresh level with a mock /models fetch.

Fixes #2555
2026-06-14 09:26:06 +00:00
roboomp 285ed3c47d fix(plan-mode): normalize write target before bridge routing
Unwrap bracketed [path#TAG] headers at the top of WriteTool.execute() so internal-URL detection, plan-mode guard, plan path resolution, and ACP bridge routing all see the same filesystem target. Without this, ['/data/workspaces/can1357__oh-my-pi__2472/.omp-session/2026-06-13T20-19-47-341Z_019ec2a3-fc0d-7000-b1e6-25831d3c3ec5/local/scratch.md' slipped past isInternalUrlPath() and was bridged to the editor instead of staying on disk as a session-local artifact.\n\nFixes #2472
2026-06-14 07:36:24 +00:00
roboomp fc9534e92b fix(coding-agent): kept short local root stable across session moves
- Derived the short Windows '/data/workspaces/can1357__oh-my-pi__2551/.omp-session/2026-06-14T07-09-37-753Z_019ec4f6-ee59-7000-8226-e1b7ed0680e9/local' root from the stable session id instead of the artifact path, so SessionManager.moveTo() keeps reading the pre-move local files.
- Locked the move stability with a dedicated regression test alongside the long-path coverage.

Refs #2551
2026-06-14 07:27:37 +00:00
roboomp 720086e8d1 fix(plan-mode): normalize hashline write targets
Ensure bracketed hashline paths are unwrapped before both plan-mode authorization and filesystem resolution.\n\nFixes #2472
2026-06-14 07:26:16 +00:00
roboomp b3e1173bb5 fix(theme): aligned export text with export surface
Derived HTML default text from the resolved export card/page surface, falling back to the derived user-message export base when themes omit export overrides.

Covered light-status custom themes whose dark userMessageBg drives derived export backgrounds.

Fixes #2516
2026-06-14 07:26:15 +00:00
roboomp 40c36ef6eb fix(agent): preserved pending resolve directives
- Kept queued resolve handlers pending when a downgraded forced tool choice completes without invoking the requested tool.
- Covered the skipped-tool and invoked-tool queue paths in tool-choice queue tests.

Fixes #2546
2026-06-14 07:24:31 +00:00
roboomp 207caa3621 fix(coding-agent): drop stale goal continuation tick while streaming
Reviewer flagged a race left open by the streaming guard added in #2455:
getUserInput() arms onInputCallback and schedules an 800 ms goal
continuation timer; when /goal set takes the streaming branch (or any
extension/hook starts a turn inside that window), the timer fired
unchecked. The downstream onInputCallback resolved the main waiter with
a goal-continuation submission, submitInteractiveInput called
session.promptCustomMessage without a streamingBehavior, and the same
AgentBusyError the PR set out to fix resurfaced.

Make the continuation timer streaming-aware: at fire time, bail out
when session.isStreaming || isCompacting || hasPostPromptWork is true.
Reuses the auto-submit busy check loop mode already relies on (renamed
#isLoopAutoSubmitBlocked -> #isAutoSubmitBlocked since both flows have
the same notion of 'agent is busy, do not submit'). The next agent_end
in #handleGoalSessionEvent reschedules normally.

Fixes #2454
2026-06-14 07:22:42 +00:00
roboomp 841d51aed0 fix(coding-agent): guarded nested task rendering cycles
- Added cycle and depth guards for nested task progress rendering so async fan-out snapshots cannot recurse until the TUI crashes.
- Shortened long Windows '/data/workspaces/can1357__oh-my-pi__2551/.omp-session/2026-06-14T07-09-37-753Z_019ec4f6-ee59-7000-8226-e1b7ed0680e9/local' roots into temp-backed session roots before plan/handoff writes hit MAX_PATH.

Fixes #2551
2026-06-14 07:21:53 +00:00
roboomp 0fbe4e1535 fix(coding-agent): preserved prompted paused plan commands
Kept /plan <prompt> from paused plan mode on the prompted entry path while retaining the no-arg third-toggle exit.

Added regression coverage for paused plan mode resuming and submitting the prompt.

Fixes #2510
2026-06-14 07:19:37 +00:00
roboomp af4388e059 fix(coding-agent): reserved slash command aliases
Included builtin slash-command aliases in prompt-template autocomplete reserved names so picker suggestions match interactive command resolution.
2026-06-14 07:17:38 +00:00
roboomp cd87b82ac0 fix(cli): honored -- as the POSIX positional separator in parseArgs
Without an after-separator state, the new unknown-flag guard rejected
flag-shaped prompts (`omp -p -- --explain-this`): the loop dropped the
`--` token and then re-validated `--explain-this`, recorded it in
`unrecognizedFlags`, and exited 2.

parseArgs now flips a `sawSeparator` latch on `--` and short-circuits
the remaining tokens straight into `messages` — no built-in dispatch,
no extension match, no `@file` expansion. Two regression tests cover
the flag-shaped and `@`-prefixed cases.

Refs #2459
2026-06-14 07:17:19 +00:00
roboomp 7a4326a716 test(coding-agent): moved settings import to module scope 2026-06-14 07:16:48 +00:00
roboomp 294a61d94d fix(skills): exclude agents toggles from third-party fall-through gate
The previous `anyBuiltInSkillSourceEnabled` mixed the new
`enableAgentsUser`/`enableAgentsProject` defaults with the named
third-party toggles, so a user who disabled Codex/Claude/Pi to silence
third-party CLI skill sources but kept the default `.agent[s]/skills`
toggles on still saw unknown providers (`opencode`, `github`,
`claude-plugins`, `gemini`) load via the fallback branch. The
`agents` provider already has its own explicit branch in
`isSourceEnabled`, so the fall-through gate now only inspects the named
third-party toggles. Adds a regression test that creates a fake
`~/.config/opencode/skills/leaked-opencode` and verifies it stays
filtered out when the third-party toggles are off and agents toggles
default to on.

Addresses PR #2405 review.
2026-06-14 07:13:09 +00:00
roboomp 31d13ec621 fix(coding-agent): skipped mixed-cwd legacy mnemopi banks
Only recall legacy mnemopi banks when every working_memory row is scoped to the active cwd, so per-project recall cannot surface sibling project rows from an ancestor-derived bank.

Fixes #2412
2026-06-14 07:13:09 +00:00
roboomp c1b27d2716 style: bun run fix 2026-06-14 07:12:50 +00:00
roboomp fde233278c fix(cli): synthesize plugin skill slash commands from directory basename
When a Claude plugin skill's SKILL.md frontmatter uses a display-style
name (e.g. `name: Understand Anything`), the synthesized slash command
inherited that text. `expandSlashCommand` splits the command at the
first whitespace, so `/understand` never resolved and the multi-word
form could not expand either.

Use `path.basename(path.dirname(skill.path))` so the slash command
always matches the documented `skills/<name>/SKILL.md` → `/<name>`
contract while the frontmatter still drives the description/body.

Fixes #2415
2026-06-14 07:12:42 +00:00
usr_bin_roygbiv 7d62f2702f test(prompts): add mathematical formatting prompt verification test 2026-06-14 00:59:20 -05:00
can1357 1f9a1bd67b feat(coding-agent/web): added support for scraping GitHub commit URLs
- Extended GitHub URL parsing to recognize commit paths and extract commit refs.
- Implemented a commit renderer that fetches commit metadata, stats, and file patches from the GitHub API.
- Added a handler branch to render commit URLs to markdown with `github-commit` results metadata.
2026-06-14 07:54:04 +02:00
can1357 74bfcabc35 fix(coding-agent): fixed JS eval helper positional args and URI read slicing
- Updated JS eval helper option parsing to accept positional optional args or a trailing plain-object options argument, while rejecting mixed or invalid forms.
- Updated `read` to route non-`local://` URI paths through the `read` tool with line selectors so offset/limit slicing works for artifact-style resources.
- Expanded JS executor tests for positional reads, nullable slot skipping, and delegated URI read slicing.
2026-06-14 07:27:16 +02:00
can1357 6c616ca847 fix: fixed OpenAI promotion linking for namespaced gpt-5.5 variants
- Updated OpenAI context promotion linking to resolve target models by parsed version and provider/API match instead of fixed bare ids.
- Scanned available siblings to select the plainest matching gpt-5.4 fallback so namespaced, dotted, and dated 5.5 variants promote correctly.
- Adjusted the TUI render stress shadow writer to ignore alternate-screen regions and replay only normal-screen bytes after exits.
2026-06-14 07:14:11 +02:00
can1357 233ee852cd feat(snapcompact): added spacing-tuned snapcompact variants and updated provider defaults
- Added 8on22-bw and 11on16-bw variants with spacing-tuned defaults for snapcompact.
- Changed provider defaults/mappings to use 11on16-bw for Anthropic and 8on22-bw for OpenAI/Google.
- Updated model frame rules so claude/fable/opus and gemini/gpt families map to new shapes and 2048 billing behavior.
- Fixed non-multiplexer resize dragging by using alternate screen during transient resize frames.
2026-06-14 07:02:27 +02:00