In-app session initiation across modalities#180
Merged
Conversation
Add a single flexible POST /api/sessions endpoint plus Scout app
affordances to start new conversations from inside the app, instead of
relying on the orphaned HUD runner (which targeted the removed
/api/runner/* routes).
Backend (packages/web):
- POST /api/sessions: one payload expresses every modality by which
fields are set — new conversation in a project, "same agent" fresh,
continue an agent's session with full context, or seed-from-message.
When target.agentId is set it resolves the agent's harness/model/
projectRoot/name/harnessSessionId as defaults. Wraps askScoutQuestion;
options reuse the existing /api/agent-config/snapshot.
- askScoutQuestion: thread executionTargetSessionId into the broker
execution block so session:"existing" can resume a real harness
session with full context (verified the /deliver path honors it).
- seed.branchFrom is accepted and echoed but inert — a forward-compatible
hook for upcoming context-forking work.
Scout app (apps/macos):
- New ScoutSessionService.swift: SessionInitiationSpec/Result service
(via ScoutWeb.baseURL) + ScoutSessionDraft + ScoutSessionComposer modal.
- Three entry points in ScoutRootView: "+" in the conversation-list
header (new in project), a message context menu ("New conversation
from this message…", prefilled + editable, plus copy actions), and
ScoutAgentInspector "New session" / "Continue" buttons (fresh vs.
full-context resume; Continue shown only when a session is resolvable).
Also carries in-progress UI refinements (message-list scroll sentinel /
auto-scroll, markdown table, send/mic buttons, scroll styling, composer
padding) that were already in the working tree.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Settled direction for the Scout sidebar per-agent card: - no AVAILABLE tag — presence rides the avatar dot - identity header is clickable to the agent profile - one cohesive card with Runtime / Workspace / Session / Skills sections - Observe lives inside the Session block (you observe a session) and only appears when there's a live session; reads as a button at rest - New session is a quiet inline link - session id rendered as the real opaque id (prefix + suffix), not a relay label
Image attachments (human→agent context, agent→agent links): - Ephemeral blob route (POST/GET /api/blobs): base64 image → TTL'd tmp cache, returns a fetchable absolute URL; optimized for first-fetch delivery, never touches the DB - Thread attachments through /api/send into the broker conversation and broadcast send helpers (persistence/rendering already supported them) - MCP messages_reply accepts link-backed image attachments - macOS composer: ⌘V paste (screenshots), drag-drop, and a paperclip picker → upload → send, with a thumbnail strip and image-only sends Conversation/channel display: - DM peer labels and channel-name helpers on ScoutChannel - Conversation list/row and agent/channel inspector refinements - Session service updates
Add a first-class ACP client adapter for subprocess-backed JSON-RPC stdio agents, including prompt/session handling, permission request mapping, guarded file access, adapter spec coverage, and pairing runtime registration.
✨ Add ACP stdio session adapter
Update the landing page layout, styling, and Scout console treatment with the new mac roster asset.
💄 Refresh landing page experience
Inspector / chrome: - agent card: Session block hosts Observe (only with a live session), real opaque session id (head+tail), brighter rest-state on Observe - sidebar resize floor lowered to hug the labels; tighter default - one-line chat header (cId/members were redundant with the card) - compact icon scope filter tucked onto the search row - model 'Default' note moved from a two-line sentence to a tooltip - pointing-hand cursor on clickable (.plain) controls Design experiments (toggleable via a dev panel, off by default): - Depth (top-light + soft shadow), Accents (eyebrow ticks + selection bloom), Glow (ambient backlight on the conversation list) Embedded file viewer: - click a message file-link to preview in-app (trailing slot), ⌘-click pops out to the editor; resizable + persisted width - syntax highlighting (in-house tokenizer), line numbers, target-line jump - agent-aware path resolution (relative paths resolve to the sender's workspace), folder paths reveal in Finder - read + highlight off the main thread; long-line + size guards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This branch began as in-app session initiation (a single flexible
POST /api/sessions) and has grown into a broader Scout + platform update. It now also adds image attachments, an embedded file viewer + composer/UI polish in the macOS app, an ACP stdio session adapter, and a landing page refresh.In-app session initiation (
packages/web,apps/macos)Every modality is one endpoint driven by which fields are set, not a route per modality:
target.projectPath+execution.session:"new"target.agentId+seed.instructions+seed.fromMessageIdtarget.agentId+session:"new"(server reuses harness/model/name)target.agentId+session:"existing"+targetSessionIdPOST /api/sessionsresolves the agent's harness/model/projectRoot/name/harnessSessionId as defaults whentarget.agentIdis set; wrapsaskScoutQuestionand reuses/api/agent-config/snapshotfor options (no new options route).askScoutQuestionthreadsexecutionTargetSessionIdinto the brokerexecutionblock sosession:"existing"resumes a real harness session with full context.seed.branchFromis accepted and echoed but inert — a forward-compatible hook for separate context-forking work.ScoutSessionService+ScoutSessionComposermodal, with three entry points inScoutRootView— the conversation-list "+", message right-click → "New conversation from this message…" (prefilled, editable), and the agent inspector's New session / Continue.Image attachments (
packages/web,apps/desktop,apps/macos)POST /api/blobsstores a base64 image in a TTL'd tmp cache (6h, lazy sweep, never the DB) and returns a fetchable absolute URL;GET /api/blobs/:idserves the bytes. Tuned for first-fetch delivery, not durability — these are session caches.attachmentsflows through/api/sendinto the broker conversation/broadcast send paths. Persistence + web rendering already supportedMessageAttachment, so this fills in the send half.messages_reply— accepts link-backed image attachments, so agents attach URLs they already have (no upload).deliverpath (direct-to-agent attachment delivery) and MCPmessages_send.Scout file viewer + UI polish (
apps/macos)ScoutFileViewerPanel) opened from file links in messages.ACP stdio session adapter (
packages/agent-sessions) — #181codex/acp-stdio-adapter).Landing refresh (
landing/) — #182codex/landing-improvements).Studio (
design/studio)Verification
/api/sessionsexercised — missing target →400, unknown agent →404,session:"existing"without a resolvable session →400; a real M1 start →200withconversationId/messageId/flightIdand the broker spawning the agent.apps/desktoptypechecks clean; the macOSScouttarget builds clean.Notes
hudsoncomponent library (a separate repo) and is not in this PR.OpenScoutMenu'sHudRunnerServicefrom the removed/api/runner/*routes to/api/sessionsto unify the HUD path.