fix(apiproxy): stop projecting injected context as user steering
next-step items now split by origin: user-origin messages keep the 'steering' placement, while agent.inject context (approval notices, task completion notices, attached snapshots) carries a new 'context' placement that no surface renders until it is claimed as a durable user/message context card. Widen the placement unions on the wire and in the client runtime, add a projection test case, and document the split in the apiproxy/ui-conversation READMEs and the web-steer chrome agent note.
This commit is contained in:
@@ -360,6 +360,14 @@ describe('session/queue frames', () => {
|
||||
]
|
||||
agent.inbox.splice('next-turn', 0, 1, [edited])
|
||||
frames.push(await nextFrame(iterator), await nextFrame(iterator))
|
||||
const injected = freezeMessage({
|
||||
id: MessageId('m-3'),
|
||||
role: 'user',
|
||||
content: [{ type: 'text' as const, text: 'injected context' }],
|
||||
source: { kind: 'plugin' as const, plugin: 'approval' },
|
||||
})
|
||||
agent.inbox.splice('next-step', 0, 0, [injected])
|
||||
frames.push(await nextFrame(iterator), await nextFrame(iterator))
|
||||
abort.abort()
|
||||
await iterator.return?.()
|
||||
|
||||
@@ -380,6 +388,15 @@ describe('session/queue frames', () => {
|
||||
{ id: steering.id, placement: 'steering', message: steering },
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'session/queue',
|
||||
sessionId: agent.id,
|
||||
items: [
|
||||
{ id: edited.id, placement: 'queued', message: edited },
|
||||
{ id: injected.id, placement: 'context', message: injected },
|
||||
{ id: steering.id, placement: 'steering', message: steering },
|
||||
],
|
||||
},
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user