Commit Graph
3909 Commits
Author SHA1 Message Date
roboomp f0f3c4cbd8 fix(coding-agent): kept local plan writes off acp bridge
Route '/data/workspaces/can1357__oh-my-pi__1863/.omp-session/2026-06-04T13-36-11-717Z_019e92d9-3fc5-7000-a66f-15cad94b7e75/local' plan artifacts through OMP's session-local storage instead of the editor writeTextFile bridge, preserving ACP bridge routing for regular editor-visible files.

Fixes #1863
2026-06-04 13:43:17 +00:00
can1357 482c95d375 chore: update chanelogs 2026-06-04 14:53:20 +02:00
can1357 06f9123b55 Merge remote-tracking branch 'origin/farm/8cadad3a/sync-natives-on-update' 2026-06-04 14:52:58 +02:00
can1357 7ed34f885a Merge remote-tracking branch 'origin/farm/3c94a6e9/fix-tsc-noemit-coding-agent' 2026-06-04 14:52:43 +02:00
can1357 13b518d845 Merge remote-tracking branch 'origin/farm/e2beffcf/ssh-render-multiline-command-block' 2026-06-04 14:52:23 +02:00
can1357 50b3075d80 Merge remote-tracking branch 'origin/farm/ace3249a/fix-mnemopi-embeddings-never-populated' 2026-06-04 14:52:13 +02:00
can1357 fe3f0024ea Merge remote-tracking branch 'origin/farm/8333346d/tui-plugin-settings-show-marketplace' 2026-06-04 14:51:25 +02:00
can1357 f48ed8b301 Merge remote-tracking branch 'origin/farm/f67b9118/anthropic-cache-control-compat' 2026-06-04 14:51:19 +02:00
can1357 876c9a9b21 Merge remote-tracking branch 'origin/farm/c2f776eb/mcp-results-status-icon' 2026-06-04 14:50:59 +02:00
can1357 f44b805d02 Merge remote-tracking branch 'origin/farm/2dde13da/appendonlycontext-sglang-auto' 2026-06-04 14:50:54 +02:00
can1357 95defa712b docs(compaction): rewrote prompts in terse scratchpad style
- Converted compaction, branch, and handoff prompts to fragment voice.
- Replaced "You MUST" phrasing with bare "MUST" directives.
- Applied same rewrite to autoresearch and turn-aborted prompts.
2026-06-04 14:49:45 +02:00
can1357 f3bbc9f069 docs(coding-agent): rewrote communication style guidelines
- Replaced concise-correctness rules with scratchpad-style reasoning format.
- Added Need/Check/Risk/Decision phrasing patterns and examples.
- Specified Problem/Decision/Keep/Why/Risk/Check/Next structure.
2026-06-04 14:49:45 +02:00
roboomp cf33b64033 fix(mcp): updated completed tool status icons
MCP tool renderers now merge call and result components so completed blocks replace the pending call header with success or error status.

MCP protocol errors now preserve top-level isError so downstream render state can use the error status consistently.

Added renderer coverage for completed MCP success and error blocks.

Fixes #1855
2026-06-04 12:14:57 +00:00
roboomp 15d4d7fcf9 fix(providers): enabled append-only auto for xiaomi
Centralized append-only context auto-mode resolution so SDK sessions, interactive sessions, and the status display use the same provider checks. Auto mode now enables for Xiaomi/SGLang hosts and explicit stored-request compat signals while preserving DeepSeek behavior.

Added focused regression coverage for Xiaomi Token Plan SGLang HiCache endpoints and explicit on/off behavior.

Fixes #1851
2026-06-04 11:59:47 +00:00
roboomp fddcee5e80 fix(ai): honored anthropic cache compat
Allowed OpenAI-compatible providers to opt into Anthropic cache_control markers via compat.cacheControlFormat while preserving OpenRouter Anthropic defaults.

Fixes #1845
2026-06-04 11:20:08 +00:00
roboomp 63ee0ee709 fix(tui): reload plugins after settings toggle
Marketplace plugin toggles in Settings → Plugins wrote the installed-plugin
registry and then only requested a render through the settings callback. In a
live TUI session that left already-loaded slash commands, hooks, tools, agents,
and SSH tool state unchanged until the user manually reloaded plugins or
restarted.

Make the plugin-change callback awaitable and wire the settings selector to the
same reload pipeline used by the slash-command runtime: clear plugin-root caches
for the active project registry, refresh slash command state, refresh the SSH
tool, then request a render. Await the callback after npm and marketplace
registry writes so Settings → Plugins reflects live plugin state immediately.

Add a regression test proving a marketplace toggle calls setPluginEnabled before
the plugin-change reload callback resolves.
2026-06-04 11:18:14 +00:00
roboomp 04dd818176 fix(tui): shorten marketplace install path before rendering
`MarketplacePluginDetailComponent` rendered the raw `installPath` from
the installed-plugin registry, which leaks the user's home directory
into the TUI when the plugin lives under `~/.omp/cache`. Route it
through `shortenPath` so $HOME becomes `~` before the value reaches
`Text`, matching the repo's TUI sanitization rules (per review on #1844).
2026-06-04 11:10:17 +00:00
roboomp a10e5d74af fix(tui): list marketplace plugins in settings panel
`PluginSettingsComponent.#showPluginList()` only inspected the npm plugin
registry, so the TUI's `Settings → Plugins` panel rendered "No plugins
installed" whenever the user had no npm plugins — even when many
marketplace plugins were installed. The `/plugins list` slash command,
`omp plugin list` CLI, and the install/uninstall selectors already
merged `PluginManager.list()` with `MarketplaceManager.listInstalledPlugins()`;
the settings panel was the only surface that missed the marketplace
registry when it was added.

Extend the panel to consume both data sources:

- Replace `PluginListComponent`'s `InstalledPlugin[]` input with a tagged
  union `PluginListEntry = { kind: "npm"; plugin: InstalledPlugin } | { kind:
  "marketplace"; plugin: InstalledPluginSummary }`. Each row now carries an
  `[npm]`/`[marketplace]` kind badge, a scope tag, and the shadow indicator
  for user installs overridden by a project entry. Widen the SelectList
  primary column so long `name@marketplace` ids stay readable.
- Add `MarketplacePluginDetailComponent`: single `Enabled` toggle plus the
  read-only `InstalledPluginEntry` metadata (version, install path,
  installed-at, last-updated, git commit SHA). The toggle calls
  `MarketplaceManager.setPluginEnabled(pluginId, enabled, scope)` — same
  path `/plugins enable|disable` uses.
- Update `PluginSettingsComponent` to await both `PluginManager.list()` and
  `MarketplaceManager.listInstalledPlugins()` in parallel, build the merged
  list, and route selection to the kind-specific detail view. The empty
  state now lists both install commands (npm and marketplace).

Fixes #1842
2026-06-04 11:05:30 +00:00
roboomp 66b6597829 fix(mnemopi): populated memory_embeddings on remember and auto-derived queryEmbedding on recall
The beam backend never invoked the embedding pipeline during normal
operation: `remember()`/`rememberBatch()`/`updateWorking()` skipped `embed()`
entirely and `recall()`/`recallEnhanced()` never called `embedQuery()` on
the query text. As a result `memory_embeddings` stayed empty in every
deployment and recall silently degraded to FTS-only regardless of the
configured provider (fastembed, OpenAI-compatible API, custom).

- Added `scheduleEmbedding` on `beam.pendingExtractions` (mirroring
  `scheduleFactExtraction`) and wired it from `remember`, `rememberBatch`,
  `updateWorking`, and `consolidateToEpisodic`. Writes
  `INSERT OR REPLACE INTO memory_embeddings(memory_id, embedding_json, model)`
  with the active runtime-options model, captured before the AsyncLocalStorage
  scope exits and re-entered inside the task.
- Auto-derived `queryEmbedding` inside `recall()` via `embedQuery(query)` when
  the caller did not pass one. `queryEmbedding: null` is preserved as the
  explicit FTS-only opt-out; `undefined` triggers auto-derive.
- Propagated `queryEmbedding` through `Mnemopi`'s `toRecallOptions` so the
  facade no longer strips the override on the way to the beam layer.
- Made `Mnemopi.recall`/`recallEnhanced`/`search`/`query`, the module-level
  exports, `BeamMemory.recall`/`recallEnhanced`, the free `recall`/`recallEnhanced`,
  and `orchestrateRecall` async. MCP `handleToolCall`/`callToolJson`/`handleJsonRpc`
  follow suit so the recall handler can await.
- Fixed `withBeam`/`withSharedBeam` to defer `beam.close()` until the async
  handler resolves; otherwise the new async recall hit
  `RangeError: Cannot use a closed database`.
- Updated CLI, MCP entrypoints, coding-agent `MnemopiSessionState`, and every
  affected test to await the new shapes.

Verified with a new regression suite (`test/issue-1832-embedding-population.test.ts`)
exercising both ends of the bug: empty `memory_embeddings` and zero
`dense_score`.

Fixes #1832
2026-06-04 09:22:07 +00:00
roboomp 7a1280784e fix(tools/ssh): rendered multiline remote commands in a framed body block
The SSH tool renderer fed the raw command into renderStatusLine's
description, so any newline in the remote command expanded the
single-line tool header — the bordered output block then opened
mid-command and the rest of the SSH cell rendered against a broken
frame.

The renderer now keeps only [host] in the header and renders the
full command (with a dim $ prefix and tab sanitization) as its own
framed section above Output, matching the bash renderer's shape.

renderStatusLine also flattens CR/LF in title, description, meta,
and badge labels so no future caller can accidentally produce a
multiline tool header.

Covered by:
- test/tools/ssh-render.test.ts: multiline command stays out of
  the header and every command line is present in the body, for
  both renderCall and renderResult.
- test/tui/status-line-newline-guard.test.ts: embedded LF, CRLF,
  and lone CR in description/meta are flattened to spaces.

Fixes #1828
2026-06-04 07:44:52 +00:00
roboomp 20820b748c style: bun run fix 2026-06-04 06:52:55 +00:00
roboomp 32f07b24f7 fix(coding-agent): sync pi-natives on omp update
bun install -g <pkg>@<v> did not reliably re-resolve transitive
optionalDependencies, so @oh-my-pi/pi-natives and the platform leaf
@oh-my-pi/pi-natives-<tag> stayed at the previous version while
@oh-my-pi/pi-coding-agent moved. The loader’s validateLoadedBindings
then aborted because the .node file exposed the old
__piNativesV<old> sentinel instead of __piNativesV<new>.

buildBunInstallArgs now pins @oh-my-pi/pi-natives and (when the
running tag is one the release pipeline publishes) the platform
leaf to the same version it installs for @oh-my-pi/pi-coding-agent,
so bun replaces all three in lock-step. The leaf is gated by the
same SUPPORTED_PLATFORMS set the loader uses, so unsupported tags
still surface the original 'no matching version' diagnostic instead
of EBADPLATFORM.

Fixes #1824
2026-06-04 06:52:31 +00:00
roboomp 70ada531d8 fix(coding-agent): made slash-command handlers compatible with TypeScript 5.x
The SlashCommandSpec handle/handleTui signatures and a test `populate`
callback relied on `() => void` being assignable to
`() => T | undefined`. The repo's own gate uses `tsgo`
(@typescript/native-preview) and TypeScript 6.x, both of which accept
that coercion, so `bun run check:ts` passed cleanly. TypeScript 5.x
does not, so `tsc --noEmit -p packages/coding-agent/tsconfig.json`
under 5.9.3 produced 56 errors (`builtin-registry.ts` x46 TS2322,
`agent-session-openai-responses-replay.test.ts` x10 TS2345).

Expressed the slot as a union of two function types — one returning
`SlashCommandResult`, one returning `void` — so the same handler
bodies typecheck under both compilers. `T | void` in a single
function-return position also trips Biome's `noConfusingVoidType`;
the siblings-of-function-types shape avoids that.

Verified:
- TypeScript 5.9.3: 0 errors (was 56)
- tsgo: 0 errors
- bun run check:ts: 0 errors workspace-wide
- packages/coding-agent test/slash-commands + agent-session-openai-responses-replay: 50/50 pass

The issue's other two categories (telemetry-export.ts x2, tui virtual-terminal.ts x1) did not reproduce on this checkout — the catalog
declares @opentelemetry/exporter-trace-otlp-proto,
@opentelemetry/sdk-trace-node, and ghostty-web and they install cleanly.

Fixes #1821
2026-06-04 06:10:02 +00:00
can1357 7490967f0e fix: fixed tool-call compatibility and tiny runtime resolver behavior
- Updated tool-call handling to accept string and object arguments.
- Stored object tool-call args directly into block.partialArgs and block.arguments.
- Added compiled runtime module resolution honoring exports, main, and index fallbacks.
- Patched tiny runtime loading to install resolver stubs and load the resolved entry file.
2026-06-04 05:41:09 +02:00
Can BölükandGitHub af32512564 Merge branch 'main' into feat/otel-otlp-export 2026-06-04 06:39:07 +03:00
Can BölükandGitHub a6997b1b7f Merge branch 'main' into fix/session-accent-light-contrast 2026-06-04 06:28:21 +03:00
can1357 1379772628 refactor(utils): consolidate color utilities into pi-utils
Move the color math added for the session-accent fix into the shared
@oh-my-pi/pi-utils color module instead of a coding-agent-local file:

- colorLuma, relativeLuminance, and hslToHex now live in
  packages/utils/src/color.ts (hslToHex lifted out of session-color.ts).
- Drop the duplicate hex parser: toRgb reuses the existing hexToRgb and
  paletteToRgb returns the shared RGB type, so hex parsing lives once.
- Delete packages/coding-agent/src/utils/color.ts; theme.ts and
  session-color.ts import from @oh-my-pi/pi-utils.
- Move the color unit test into the utils package; repoint session-color
  test imports.

No behavior change to accent luminance capping.
2026-06-04 05:27:11 +02:00
Can BölükandGitHub 5217e14d53 Merge pull request #1762 from can1357/farm/a3a27476/bound-broad-find-scans
fix(natives): bound sorted glob scans
2026-06-04 06:21:27 +03:00
Can BölükandGitHub 9f7c36c36b Merge pull request #1702 from basedcorp99/feat/cmux-terminal-id
Add cmux terminal surface detection to getTerminalId
2026-06-04 06:13:25 +03:00
Can BölükandGitHub 35b86492d0 Merge pull request #1685 from daandden/fix-web-search-tui-providers
Fix web search provider TUI options
2026-06-04 06:12:58 +03:00
Can BölükandGitHub 1ca92c929f Merge pull request #1754 from daandden/fix-opus-priority
Fix slow agent Opus priority
2026-06-04 06:09:19 +03:00
Can BölükandGitHub b4b11f8f92 Merge pull request #1783 from VoidChecksum/fix/stdio-async-epipe-request
fix(coding-agent/mcp): handle async broken-pipe rejections in stdio transport
2026-06-04 06:09:09 +03:00
Can BölükandGitHub 8d6771490a Merge pull request #1803 from fabkho/fix/agent-skills-spec-compat
fix: recognize disable-model-invocation from Agent Skills spec
2026-06-04 06:07:43 +03:00
Can BölükandGitHub 8596f08af0 Merge pull request #1808 from GratefulDave/fix/search-optional-paths
fix(search): default paths to workspace root instead of hard-failing
2026-06-04 06:07:03 +03:00
can1357 3f22f939a2 feat(coding-agent/plan-mode): shared approved plan context with spawned subagents
- Added `loadOverallPlanReference` to resolve a session plan reference from local storage and skip empty or missing files.
- Updated task execution to read the active plan reference (except in plan mode) and pass it into each spawned subagent.
- Extended the subagent system prompt and session SDK/tools plumbing so subagents receive and render the approved plan path and contents.
2026-06-04 04:10:53 +02:00
can1357 b0cf24ca0d feat(coding-agent): froze offscreen transcript blocks on ED3-risk terms
- Added TranscriptContainer that snapshots non-live blocks to avoid stale scrollback duplicates.
- Thawed snapshots at prompt-submit checkpoints for reconciliation.
- Repainted eager streaming tail on overflowing shrink to unfreeze UI (issue #1682).
2026-06-04 03:48:12 +02:00
can1357 7f271f9b9d feat(coding-agent): added native selection markers to ask dialogs
- Added `selectionMarker`, `checkedIndices`, and `markableCount` options to render radio/checkbox glyphs per row.
- Moved checkbox rendering from inline label prefixes into the selector component.
- Kept trailing control rows like "Other"/"Done" on the plain cursor.
2026-06-04 03:43:17 +02:00
can1357 bc5eeef398 feat(coding-agent): tagged read-only agents in task tool description
- Added `isReadOnlyAgent` and `READ_ONLY_TOOL_NAMES` to classify agents.
- Marked read-only agents and forbade edits, commands, and reasoning offload.
- Added tests for capability classification and description rendering.
2026-06-04 03:24:41 +02:00
David Andrews (LexGenius.ai)andClaude Opus 4.8 89a60a6613 fix(search): default paths to workspace root instead of hard-failing
The `search` tool required `paths` via a strict `union([string,
array.min(1)])`, so any call that omitted `paths` (or passed an empty
array) was rejected at schema validation with `paths: Invalid input`
and never ran — turning a recoverable "no scope given" into a fatal
tool-call failure.

Make `paths` optional and default an omitted/empty value to the
workspace root (`.`), matching the documented prompt contract. Behavior
is unchanged when paths are supplied. Adds regression coverage for the
omitted and empty-array cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:59:43 -04:00
can1357 dc4aeb7b88 refactor(coding-agent): renamed todo_write tool to todo
- Renamed `TodoWriteTool` to `TodoTool` and its source/prompt files.
- Updated tool registration, schema, renderers, and gating to `todo`.
- Adjusted cursor provider native tool names and tests to match.
- Renamed strike-animation constants and `todo-error-reminder` type.
2026-06-04 02:45:30 +02:00
can1357 67ed82f024 refactor(coding-agent): restructured plan prompts with plan tags
- Wrapped plan content in `` tags for subagent handoff.
- Instructed agent never to read the plan path since content is inlined.
- Replaced collapsible details block in plan reference prompt.
2026-06-04 02:35:39 +02:00
can1357 b9c204c69e feat(session): added indexed async session backends and removed synchronous read APIs
- Added `IndexedSessionStorage` with `SessionStorageBackend` for index-based storage reads.
- Removed `readTextSync` from the public `SessionStorage` API and sync backends.
- Changed Redis and SQL backends to warm `{size, mtimeMs}` metadata and read via `readTextSlices`.
- Added per-path write queues and `drain()` to serialize operations and surface first failures.
2026-06-04 02:27:06 +02:00
can1357 5e17edf1ec refactor(coding-agent): restructured session text slicing to use unified head/tail reads
- Replaced SessionStorage readTextPrefix/readTextSuffix with readTextSlices.
- Added peekFileEnds utility to read bounded file head/tail in one handle.
- Updated session-manager list/recent reads to consume unified head/tail slices.
- Expanded storage tests for head/tail and UTF-8-boundary slice extraction.
2026-06-04 02:07:34 +02:00
can1357 e6716d086d feat(coding-agent): added lifecycle status to session picker
- Classified each session's final message as done, interrupted, aborted, error, or pending from a 32 KiB tail read.
- Rendered the status as a colored segment on the session metadata line.
- Added `peekFileTail` and `readTextSuffix` across storage backends to read file tails in one pass.
- Simplified `MemorySessionStorage` to a string array mirror with a sidecar mtime map.
2026-06-04 01:58:25 +02:00
can1357 b1b4b0c0ed feat(coding-agent/tools): allowed .. aliases for line range selectors
- Extended line selector parsing in path-utils to accept `..` as a forgiving alias for `-`, with `..` normalized during chunk parsing.
- Updated selector-matching regexes for file selectors and internal URL selectors to recognize alias-style ranges in single chunks and comma-separated lists.
- Added tests covering `N..M`, `N..`, mixed separators, inverted-range errors, and path-splitting behavior with `:N..M` selectors and `foo:../bar.ts` paths.
2026-06-04 01:35:39 +02:00
can1357 51ffdc20d8 fix(coding-agent/tools): merged ask tool answer rendering into the original question form
- Added a shared `renderAnswerOptions` helper that redrew answered options with markers, custom input, and cancellation state in-place.
- Set `mergeCallAndResult` to true so ask prompts now keep their question form visible while showing the final selection.
- Kept selection rendering consistent by preserving markers and option ordering while reusing the same layout for completed answers.
2026-06-04 01:34:13 +02:00
can1357 53aaced81f feat: enabled text-sizing and fixed OSC66 and DECCARA rendering behavior
- Added `textSizing` terminal capability and `tui.textSizing` setting for Kitty OSC66 scaling.
- Updated OSC66 range and visible-width handling to preserve grapheme slice behavior.
- Updated markdown rendering to apply heading text sizing only when enabled.
- Fixed DECCARA trailing-background fill tracking and DECRPM status 3/4 recognition.
2026-06-04 01:33:48 +02:00
can1357 ea105b4211 refactor(packages/coding-agent): reorganized notification flow and tests
- Updated completion and ask notifications to pass structured payloads.
- Updated completion and ask notifications to include explicit message metadata fields.
- Adjusted abort-guard and retry-capability tests for the new notification/options behavior.
2026-06-04 00:59:59 +02:00
can1357 48017b5f67 feat(packages/coding-agent): added terminal protocol debug diagnostics
- Added debug menu options for terminal state and protocol checks with new handlers.
- Added terminal diagnostics models and collectors to report geometry, protocol flags, and multiplexer data.
- Added protocol-probe utilities to encode RGB PNGs, generate sample content, and render test panels.
- Added support components for verbatim line rendering and OSC66-scaled text rows.
- Added tests validating image encoding, OSC66 output, and terminal state formatting.
2026-06-04 00:50:46 +02:00
can1357 33077363f9 feat(packages/tui): added kitty placeholder image and temp-file flow caps
- Added kitty-graphics module with Unicode placeholder and temp-file APIs.
- Refined terminal image handling to use rendered placeholder lines and detect placeholder output.
- Raised the max inline-image default from 3 to 8 in schema and image constants.
- Refined terminal capability flow for Kitty support, including screen-to-scrollback and text-sizing handling.
- Added integration tests for kitty placeholders, virtual placement, and temp-file rendering.
2026-06-04 00:50:46 +02:00