Skip to content

Inbox: name sessions started in Oh My Pi "Oh My Pi" (#3443, part 1) - #4075

Merged
backnotprop merged 6 commits into
mainfrom
feat/inbox-oh-my-pi-label
Nov 26, 2026
Merged

backnotprop merged 6 commits into
mainfrom
feat/inbox-oh-my-pi-label

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Part 1 of 2 for #3443 (start an Oh My Pi session from the Inbox). This part changes only the name.

What a person sees

A session started by hand in Oh My Pi (omp, with omp plugin install @plannotator/pi-extension) is named "Oh My Pi" instead of "Pi" in:

  • New message's To picker: the row, the chip, the phone's To sheet and the search words;
  • the author of its messages in threads;
  • the Agents sidebar: the row name when it has no other name, and its hover line ("Oh My Pi · harbor").

Settings → Agents already named these sessions "Oh My Pi" in its reload lines, through runtime on InboxOpenSession. Nothing else in Settings names a single session.

How

  • packages/core/inbox-types.ts: INBOX_HOST_NAMES["oh-my-pi"] = "Oh My Pi". inboxHostName(host, runtime) is the one place a host and its runtime become a name, and inboxAgentRuntimeOf(host, plugin.host) gives that runtime. A runtime value other than oh-my-pi is ignored, including one sent by another machine.
  • packages/server/inbox-sessions.ts: live sessions and Agents sessions carry runtime: "oh-my-pi" when a pi poll said plugin.host: "oh-my-pi". The field is set in inbox-compose.ts (To picker sessions) and inbox-agents-list.ts (agents). It is additive.
  • packages/server/inbox-runtime-name.ts, called from /mcp in inbox.ts: a tool call from such a session that carries the extension's own agent_name: "Pi" is stored as "Oh My Pi". A name the agent chose itself is left alone. The host stays pi, so routing, wake and tags do not change. Wake lines still name agents from their host.
  • INBOX_WAKE_AGENT_NAMES (the mod's copy and the shared copy) gains "Oh My Pi", because connection-tags.test.ts requires every INBOX_HOST_NAMES value. This adds one allowed name to the list. No wake sentence changes, and since wakes name agents from their host, the server does not produce this name today.

Across computers and the phone

  • The phone page is the same window code, so it shows the new name.
  • A linked computer's sessions and agents pass runtime through (inboxAgentNamesChecked keeps unknown fields). The window reads it only through inboxHostName.
  • Message authors carry the name in the message itself, so other computers and the phone show "Oh My Pi" with no change on their side.
  • The mobile contract is regenerated (bun scripts/mobile/all.ts): it adds the runtime field and enum on InboxAgent and InboxComposeSession, the word host.oh-my-pi, and undecided ledger rows. bun scripts/mobile/check.ts passes.
  • An older Inbox, or an extension that does not send plugin.host, shows Pi.

Not in this PR

  • Messages stored before this change keep "Pi".
  • The thread's reply button ("Send to Pi") and the addressee line read the thread's live sessions (LiveSession in packages/inbox/api.ts, which is at its size ceiling). They still say Pi. This is the follow-up.

Tests

  • packages/server/inbox-runtime-name.test.ts: 4 pass. Fails on main (module missing).
  • packages/inbox/agents/ohMyPiName.test.ts: 2 pass. Fails on main ("Pi" received).
  • packages/server/inbox-oh-my-pi-over-inbox.test.ts: over a real Inbox, so it runs in CI only.
  • Re-run here: connection-tags, inbox-agents-list, agentsModel, the mod inbox-contract, tests/inbox-structure, dom-test-allowlist.
  • tsc passes for core, server, inbox, shared and apps/hook. bun scripts/mobile/check.ts passes.

Part 2 (the "New Oh My Pi session" row) is a separate PR stacked on this one.

Added (225af7c): the held line. A thread that a single Oh My Pi session answers used to read "Pi replied in …", because a one-agent row was named from its host, pi. The row now carries the writer's own name (last_agent) when that name is not its host's (inboxRuntimeNamed), so the line reads "Oh My Pi replied in …". Test: packages/inbox/ohMyPiHeldLine.test.ts, 2 tests, both passing. It failed before the fix.

Oh My Pi loads Plannotator's Pi extension, which polls as host pi and
says plugin.host oh-my-pi. The live sessions now carry runtime
"oh-my-pi" on the To picker's sessions and the Agents list, and the
/mcp door stores such a session's messages under "Oh My Pi".
inboxHostName is the one place a host and its runtime become a name.
An older Inbox or extension still shows Pi. Issue #3443.
Its sessions are host pi, so a one-agent row named its writer from the host.
The row now carries the writer's own name when it is not its host's.
…abel

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 26, 2026
…ox-oh-my-pi-label

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
@backnotprop
backnotprop marked this pull request as ready for review November 26, 2026 07:42
@backnotprop
backnotprop merged commit 6c73c33 into main Nov 26, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant