Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a2dd4b7
feat: support session media references end-to-end
Aug 12, 2026
a9f3210
Merge branch 'main' into web-shell-mid-turn-image-injection
qwen-code-dev-bot Aug 14, 2026
b92a0a7
Merge remote-tracking branch 'origin/main' into web-shell-mid-turn-im…
qwen-code-dev-bot Aug 14, 2026
cde5023
fix(cli): catalog session media routes and update mid-turn replay met…
qwen-code-dev-bot Aug 14, 2026
bc2266e
fix(daemon): harden session media per review feedback
qwen-code-dev-bot Aug 14, 2026
9da264c
fix(daemon): bound media content and fix resume/echo edge cases
qwen-code-dev-bot Aug 14, 2026
8fab381
fix(daemon): resolve round-4 session media findings
qwen-code-dev-bot Aug 15, 2026
74f63d7
Merge remote-tracking branch 'origin/main' into web-shell-mid-turn-im…
qwen-code-dev-bot Aug 15, 2026
eae62e2
Merge remote-tracking branch 'origin/main' into web-shell-mid-turn-im…
qwen-code-dev-bot Aug 15, 2026
db1ad9f
fix(daemon): resolve round-5 session-media critical findings (#9127)
qwen-code-dev-bot Aug 15, 2026
2b10ad4
fix(daemon): resolve round-6 session-media critical findings (#9127)
qwen-code-dev-bot Aug 16, 2026
35f9f29
fix(daemon): resolve round-7 session-media critical findings (#9127)
qwen-code-dev-bot Aug 16, 2026
19d1b93
fix(daemon): resolve round-8 session-media critical findings (#9127)
qwen-code-dev-bot Aug 16, 2026
ed9c931
Merge remote-tracking branch 'origin/main' into web-shell-mid-turn-im…
qwen-code-dev-bot Aug 16, 2026
6586d11
fix(daemon): correct session media recovery and queue isolation
Aug 17, 2026
516a093
fix(daemon): remove media with deleted queue items
Aug 17, 2026
5d50648
fix(daemon): bound repeated media in queue drains
Aug 17, 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
46 changes: 46 additions & 0 deletions docs/design/session-media-references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Session media references

## Problem

Image prompts currently repeat base64 data in request JSON, pending queues,
SSE events, and the replay ring. Mid-turn batches amplify this because several
images can be emitted in one event.

## Design

The daemon stores uploaded image bytes in a session-owned temporary
directory and returns a small media reference:

```ts
{
type: 'image';
mediaId: string;
mimeType: string;
size: number;
}
```

Prompt and mid-turn APIs accept these references. Queues, reconciliation
snapshots, SSE events, and persisted user-message metadata retain only
references. Immediately before an ACP prompt or mid-turn drain crosses into the
child, the bridge resolves references to the protocol's inline base64 content
blocks.

The TypeScript session client hydrates references in replay/live events and
queue snapshots through the authenticated media download route. Existing UI
reducers and renderers therefore continue receiving their current inline image
shape without carrying base64 through the daemon event bus.

## Ownership and limits

- Media is scoped to the resolved daemon session and protected by the
existing session client authorization.
- Each object is limited to 8 MiB, each live session to 100 MiB and 256 objects,
and the daemon retains at most 512 MiB across sessions.
- Objects remain available across client detach and reload for up to three
hours; explicit close, kill, and daemon shutdown remove them immediately.
- References from another or unavailable session fail instead of falling back to a
primary runtime.

Legacy inline media remains accepted and echoed unchanged for older clients.
Media-reference-capable clients avoid placing those bytes in the replay ring.
1 change: 1 addition & 0 deletions integration-tests/cli/qwen-serve-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ describe('qwen serve — capabilities envelope', () => {
'session_source_metadata',
'session_side_task',
'session_prompt',
'session_media',
'session_mid_turn_message_mutation',
'session_mid_turn_message_query',
'session_cancel',
Expand Down
4 changes: 4 additions & 0 deletions packages/acp-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"types": "./dist/sessionArtifacts.d.ts",
"import": "./dist/sessionArtifacts.js"
},
"./sessionMedia": {
"types": "./dist/sessionMedia.d.ts",
"import": "./dist/sessionMedia.js"
},
"./daemonEventTypes": {
"types": "./dist/daemonEventTypes.d.ts",
"import": "./dist/daemonEventTypes.js"
Expand Down
Loading
Loading