8000 [pull] main from can1357:main by pull[bot] · Pull Request #137 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b13c4b3
feat(rpc): add opt-in delta-only message_update frames
alphastorm Sep 29, 2026
152529b
docs(changelog): note delta-only rpc message updates
alphastorm Sep 29, 2026
cf04de7
refactor(rpc): narrow delta projection without a type assertion
alphastorm Sep 29, 2026
c55ddd9
fix(rpc): keep the default session frame type free of delta projections
Sep 29, 2026
6401773
Merge PR #13716: feat(rpc): add opt-in delta-only message_update fram…
Sep 29, 2026
86025a8
feat(rpc): expose cache warming controls and refresh events
alphastorm Sep 29, 2026
7b73bdd
docs(changelog): note rpc cache warming controls
alphastorm Sep 29, 2026
e9b2253
refactor(rpc): rename the warming stop field and drop the unused pers…
alphastorm Sep 29, 2026
0f1e064
fix(cache-warmer): record billed usage of aborted refreshes
Sep 29, 2026
97e5cbe
Merge PR #13717: feat(rpc): expose cache warming controls and refresh…
Sep 29, 2026
5144920
feat(rpc): allow --no-ui with --mode rpc-ui
alphastorm Sep 29, 2026
6885611
docs(changelog): note --no-ui with rpc-ui
alphastorm Sep 29, 2026
a550915
test(rpc): pin a catalog model in the rpc-ui --no-ui startup test
alphastorm Sep 29, 2026
c3450a3
docs(changelog): move rpc-ui --no-ui entry under [Unreleased]
Sep 29, 2026
2d6866c
Merge PR #13718: feat(rpc): allow --no-ui with --mode rpc-ui (@alphas…
Sep 29, 2026
2caf583
feat(coding-agent): added ratchetz magic keyword for eval build and h…
Sep 28, 2026
68a362d
docs: credited #13672 in changelog
Sep 28, 2026
d7729f2
fix(coding-agent): hardened ratchet gate, approvals, and pricing per …
Sep 28, 2026
f731c20
feat(coding-agent): made ratchet a /ratchet command instead of a magi…
Sep 29, 2026
5a4dde4
Merge PR #13672: feat(coding-agent): add /ratchet eval build and hill…
H4vC Sep 29, 2026
e5555b0
fix(coding-agent): upgrade npm- and git-installed plugins by name
Sep 29, 2026
dc89d62
docs(coding-agent): credit #13812 in changelog
Sep 29, 2026
651f3b2
fix(coding-agent): write plugin upgrade state atomically and detect g…
Sep 29, 2026
64445e5
Merge PR #13812: fix(coding-agent): upgrade npm- and git-installed pl…
H4vC Sep 30, 2026
1f2a57a
fix(coding-agent): keep /login keys ahead of extension provider apiKe…
Sep 30, 2026
77f1d93
docs(coding-agent): credit #13815 in changelog
Sep 30, 2026
106be0e
feat(tui): opt-in live preview of subagent tool calls in the pinned HUD
abilliontokens Sep 29, 2026
0ea6e3e
fix(tui): shorten preview paths and keep the elapsed marker within th…
abilliontokens Sep 29, 2026
f9a275b
docs(changelog): move entry under [Unreleased] after the 18.4.4 release
abilliontokens Sep 29, 2026
2714c7a
fix(coding-agent): address review on extension apiKey fallback
Sep 30, 2026
13c8e17
fix(tui): label preview rows with their own call's intent and tick on…
abilliontokens Sep 30, 2026
80e0e09
fix(coding-agent): treat bare c as an answer during guided-goal inter…
Sep 30, 2026
ad1850d
docs(coding-agent): link guided-goal c fix PR in changelog
Sep 30, 2026
c6153c3
Merge pull request #13815 from H4vC/fix/extension-login-key-precedence
H4vC Sep 30, 2026
ae0122e
fix(coding-agent): end guided-goal interview on tool use or failed ki…
Sep 30, 2026
77edc76
test(coding-agent): stub guided-goal interview check in input-events …
Sep 30, 2026
5c3ede9
perf(tui): repaint the subagent preview tick in place and skip pause …
Sep 30, 2026
49a24e4
Merge PR #3821: feat(tui): opt-in live preview of subagent tool calls…
H4vC Sep 30, 2026
2b023d1
Merge PR #13819: fix(coding-agent): treat bare c as an answer during …
H4vC Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/agent-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ While subagents run, a pinned `Subagents` block above the editor lists every liv

The list stays short: it shows a few rows plus an expander (`display.pinnedAgents: collapsed`, the default), lists everything (`full`), or hides entirely (`off`). Clicking the expander toggles between the two while `tui.mouse` is on.

Set `display.subagentLivePreview: true` to add a second line under each row showing what that agent is doing: its current tool call (or, between calls, the most recent one) with a one-line detail, plus the elapsed time once a call runs longer than five seconds. Off by default.

Enable `tui.mouse` to click live subagent cards and jump-list rows directly in the main session, without opening the Hub first. A click focuses that card's most recent agent (a jump-list row focuses its exact agent); focusing a parked agent revives it. Hovering a live target lights it up first, so you can see what a click will open.

Only rows currently in the live viewport are clickable — retired transcript rows live in terminal scrollback, where clicks cannot map back to content. Enabling capture changes terminal gestures while on: text selection becomes Shift+drag and wheel scroll becomes Shift+wheel. Off by default.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ print-mode disposal semantics when the advisor runtime is enabled.
| `rpc-ui` | RPC transport with UI extension events enabled. |
| `acp` | Agent Client Protocol server over stdio. Equivalent to the [`acp`](#subcommands) subcommand; see [approval mode → ACP sessions](./approval-mode.md#acp-sessions). |

`--no-ui` (only with `--mode rpc`) runs extensions headless: no `extension_ui_request` dialogs are sent to the host, and `ctx.hasUI` is `false`. See [RPC startup](./rpc.md#startup).
`--no-ui` (with `--mode rpc` or `--mode rpc-ui`) runs extensions headless: `ctx.hasUI` is `false`, extension dialogs resolve to defaults, and extension presentation updates are dropped. In `rpc-ui`, tool UI such as `ask` still sends `extension_ui_request` frames for the host to answer. Host-issued `login` UI is unaffected. See [RPC startup](./rpc.md#startup).

## Subcommands

Expand Down
4 changes: 3 additions & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ or configured usage resolver.

Extension-registered providers (`registerProvider`) can supply `fetchDynamicModels` for runtime model discovery; these fetches are hard-bounded to a 15-second timeout (`RUNTIME_DYNAMIC_MODEL_FETCH_TIMEOUT_MS` in `model-provider-discovery.ts`) so a hung endpoint cannot stall discovery.

A provider's `apiKey` (a literal key or an environment variable name) normally overrides any stored OAuth or `/login` credential for that provider. When the registration also supplies `oauth`, `apiKey` becomes a fallback instead: the key the user saved with `/login` wins, and `apiKey` is used only when no stored login credential exists. This keeps an unset env-var name from being sent as the literal key. Registering a built-in provider id with both `oauth` and a gateway `apiKey` therefore lets a stored upstream credential take precedence over the gateway key.

Provider login callbacks can request masked entry with
`callbacks.onPrompt({ message: "Consumer key", secret: true })`. Native `/login`
and first-run setup preserve the exact submitted value while hiding it in the
Expand Down Expand Up @@ -755,7 +757,7 @@ Unsupported/no-op in RPC implementation:

### Print/headless/subagent paths

When no UI context is supplied to runner init, `ctx.hasUI` is `false` and methods are no-op/default-returning. `--mode rpc --no-ui` takes this path too, for RPC hosts that cannot answer dialogs.
When no UI context is supplied to runner init, `ctx.hasUI` is `false` and methods are no-op/default-returning. Both `--mode rpc --no-ui` and `--mode rpc-ui --no-ui` take this path for extensions; `rpc-ui` tool dialogs remain enabled.

### ACP mode

Expand Down
88 changes: 84 additions & 4 deletions docs/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ omp --mode rpc [regular CLI options]
Behavior notes:

- `@file` CLI arguments are rejected in RPC mode.
- `--no-ui` (only with `--mode rpc`) runs extensions headless: `ctx.hasUI` is `false`, dialogs resolve to their defaults, and no `extension_ui_request` frames are emitted except for a host-issued `login`. Use it when the host has no interactive surface and must not be left owing dialog answers.
- `--no-ui` (with `--mode rpc` or `--mode rpc-ui`) runs extensions headless: `ctx.hasUI` is `false`, dialogs resolve to their defaults, and extension presentation updates are dropped. With `rpc-ui`, tool UI such as `ask` remains enabled. With `rpc`, no UI requests are emitted except for a host-issued `login`. See [Extension UI Sub-Protocol](#extension-ui-sub-protocol) for the exact boundaries.
- RPC mode disables automatic session title generation by default to avoid an extra model call.
- RPC/ACP host defaults cover task isolation/execution, memory, advisor, tier, async-job, and bash auto-background settings. They are applied only when a path is not explicitly configured; project/global config, `--config`, and isolated settings remain authoritative. Todo settings are not host-defaulted.
- The process claims stdin before extension discovery, then parses it one non-empty JSONL line at a time. Malformed JSON emits a recoverable `command: "parse"` failure and does not terminate the loop.
Expand Down Expand Up @@ -139,7 +139,7 @@ Important edge behavior from runtime:
- `{ id?, type: "set_host_tools", tools: RpcHostToolDefinition[] }`
- `{ id?, type: "set_host_uri_schemes", schemes: RpcHostUriSchemeDefinition[] }`
- `{ id?, type: "set_subagent_subscription", level: "off" | "progress" | "events" }`
- `{ id?, type: "set_event_filter", events: string[] | null }`
- `{ id?, type: "set_event_filter", events: string[] | null, messageUpdates?: "full" | "delta" }`
- `{ id?, type: "get_subagents" }`
- `{ id?, type: "get_subagent_messages", subagentId?: string, sessionFile?: string, fromByte?: number }`

Expand All @@ -166,6 +166,23 @@ Important edge behavior from runtime:
- `{ id?, type: "compact", customInstructions?: string }`
- `{ id?, type: "set_auto_compaction", enabled: boolean }`

### Cache warming

- `{ id?, type: "set_cache_warming", mode: "off" | "streaming" | "idle" }`

Sets `providers.cacheWarming` for the current session without writing `config.yml`.
`off` clears scheduled refreshes and aborts any refresh in flight; `streaming`
warms during active agent runs; `idle` also warms between runs. Enabling warming
does not replay an old, cancelled run: the next real provider request arms it.
Invalid modes return the usual `success: false` response. Success reports the
effective mode after applying the override:

```json
{"id":"warming-off","type":"response","command":"set_cache_warming","success":true,"data":{"mode":"off"}}
```

The TypeScript client exposes `setCacheWarming(mode): Promise<CacheWarmingMode>`.

### Retry

- `{ id?, type: "set_auto_retry", enabled: boolean }`
Expand Down Expand Up @@ -552,6 +569,7 @@ Common event types:
- `tool_execution_start`, `tool_execution_update`, `tool_execution_end`
- `auto_compaction_start`, `auto_compaction_end`
- `auto_retry_start`, `auto_retry_end`
- `cache_warming_start`, `cache_warming_end`
- `retry_fallback_applied`, `retry_fallback_succeeded`
- `model_changed`, `thinking_level_changed`
- `ttsr_triggered`
Expand Down Expand Up @@ -592,7 +610,11 @@ Extension runner errors are emitted separately as:

`message_start`, `message_update`, and `message_end` carry a `messageId` string assigned by RPC mode. One message keeps the same id from its start through every update to its end; ids are unique within the process. Records injected mid-stream (advisor cards, IRC messages) get their own id and do not disturb the id of the reply streaming around them.

`set_event_filter` restricts which session event frames are written: pass the event `type` strings to forward, or `null` to forward everything (the default). The response echoes the active selection as `{ events }`. The filter applies only to the session events listed above; every other outbound category (responses, `prompt_result`, `session_settled`, extension UI and host tool/URI requests, `extension_error`, `available_commands_update`, subagent frames, builtin slash-command side channels, and session-persistence `notice` frames) is always written. Hosts that fail closed on unknown event kinds can pin the set they understand here instead of breaking when OMP adds an event.
`set_event_filter` restricts which session event frames are written: pass the event `type` strings to forward, or `null` to forward everything (the default). The response echoes the active selection as `{ events, messageUpdates }`. The filter applies only to the session events listed above; every other outbound category (responses, `prompt_result`, `session_settled`, extension UI and host tool/URI requests, `extension_error`, `available_commands_update`, subagent frames, builtin slash-command side channels, and session-persistence `notice` frames) is always written. Hosts that fail closed on unknown event kinds can pin the set they understand here instead of breaking when OMP adds an event.

The optional `messageUpdates: "delta"` projects only `message_update` frames to `{ type: "message_update", messageId, message: { role }, assistantMessageEvent }`: `assistantMessageEvent.partial` is omitted, while all other event fields (including subtype, `delta`, and `contentIndex`) are preserved. `message_start`, `message_end`, and all other frames are unchanged; `message_end` still carries the full message. Block-ending events such as `text_end`, `thinking_end`, and `toolcall_end` retain their block content or tool call, so hosts must still accept chunked protocol-v2 frames for large blocks and full messages. Switching modes mid-message does not change its `messageId`. The projection applies to the session's own frames only: `subagent_event` payloads forwarded under `set_subagent_subscription` level `"events"` keep their full `message_update` snapshots.

Each command replaces the whole filter state: omitting `messageUpdates` resets it to `"full"`, the default, which retains the original full snapshots. Invalid events or a mode other than `"full"` or `"delta"` return an error without changing either setting. Projection works in protocol v1 and v2, including with `events: null`. Detect support from the echoed `data.messageUpdates` field: older servers ignore the option and do not echo it. This opt-in is raw-protocol only; the TypeScript `RpcClient` and Python client keep their full-message listener contracts.

`agent_end` has this session-level shape (in addition to optional telemetry fields):

Expand All @@ -612,6 +634,54 @@ so the session will resume before its true final settle. Treat an `agent_end` as
run completion only when `isTerminal !== false`; the field is optional so frames
from older runtimes, where it is absent, remain terminal-compatible.

### Cache warming events

Each refresh handed to the provider stream emits one start and one matching end
(a session disposed mid-refresh emits no end).
Warm-or-stop decisions that do not send a request emit neither. These are
session events, so **both types must be listed in `set_event_filter` when a filter
is active** to observe complete refresh lifecycles:

```ts
{
type: "cache_warming_start";
phase: "streaming" | "idle";
provider: string;
model: string; // model id
}
{
type: "cache_warming_end";
phase: "streaming" | "idle"; // same phase as the matching start
provider: string;
model: string;
outcome: "hit" | "miss" | "error" | "aborted";
usage?: Usage;
warmingStopReason?: string;
}
```

- `hit`: the refresh read cached tokens without writing a new cache entry.
- `miss`: it read no cached tokens or wrote cache tokens; warming stops.
- `error`: no response was available or the response reported an error; warming stops.
- `aborted`: the run was cancelled or replaced while the refresh was in flight.

`usage` is present only when the refresh was recorded as a `model_usage` entry
(`purpose: "cache-warm"`, or `"cache-warm:extension-override"` when an extension
forced it). This includes paid misses, errors, and `aborted` refreshes the
provider had already accepted (usage reported before the cancellation); an
abort before the provider responded has no usage. Summing `usage.cost.total`
attributes the warming costs already included in `get_session_stats`, rather
than adding another charge.

These events are ordinary session events, so `--mode json` output includes them
as well.

`warmingStopReason` explains why warming stopped because of or during the
refresh, for example `"refresh missed the cache"`, `"refresh failed"`,
`"cache warming disabled"`, or `"conversation context changed"`. It is absent
when warming continues: the refresh rescheduled, or a new request replaced the
run.

### Available commands

`get_available_commands` returns `{ commands }`, and the same array is pushed
Expand Down Expand Up @@ -717,7 +787,17 @@ From `packages/agent/src/agent.ts` defaults:

## Extension UI Sub-Protocol

Extensions in RPC mode use request/response UI frames. A host that cannot answer them starts with `--no-ui`: extensions then see `ctx.hasUI === false`, dialogs resolve to their defaults without emitting frames, and presentation updates (`notify`, `setStatus`, `setWidget`, `set_editor_text`) are dropped. `--mode rpc-ui` additionally routes tool UI (e.g. the `ask` tool) through this sub-protocol.
Extensions in RPC mode use request/response UI frames. `--no-ui` disables the extension runner's UI in both RPC modes: extensions see `ctx.hasUI === false`, dialogs resolve to their defaults without emitting frames, and presentation updates (`notify`, `setStatus`, `setWidget`, `setTitle`, `set_editor_text`) are dropped.

`--mode rpc-ui` independently enables the tool UI context, including with `--no-ui`:

- `ask` still sends `select` requests. Free-text answers use `editor` with `promptStyle: true`; `ask` does not send `input` requests. Dialog cancellation can send `cancel`.
- Other callers using the tool UI context retain its supported dialog methods (`select`, `confirm`, `input`, `editor`, and cancellation) and presentation methods (`notify`, `setStatus`, string-array `setWidget`, `set_editor_text`, and opt-in `setTitle`). `--no-ui` is not a transport-level filter on these methods.
- Tool approval prompts use the extension runner, not the tool UI context. Under `--no-ui`, tools requiring approval fail closed with a no-interactive-UI error rather than sending an approval dialog, just as with `--mode rpc --no-ui`.
- MCP authentication challenges do not gain an RPC UI handler in either mode; the interactive-mode MCP auth handler is not installed.
- A host-issued `login` is independent of both UI settings: it can emit `open_url`, progress `notify`, and non-secret `input` requests after the authorization URL. Secret input and prompts before an authorization URL remain unsupported.

Use `--mode rpc --no-ui` for a host without a tool UI surface; use `--mode rpc-ui --no-ui` to answer tool dialogs while keeping extensions headless. Plain `--mode rpc-ui` enables both extension and tool UI.

### Outbound request

Expand Down
Loading
Loading
0