test: follow send-unify event shape and refresh the cordis-inspect snapshot
- host-runtime attachment-authorization tests append injected context as user/message with a plugin source (context/message was folded by send-unify) - refresh cordis-inspect-jsdoc expected outputs for the AttachmentStore validateImage seam addition
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -496,7 +496,8 @@ describe('sessions.prompt / cancel', () => {
|
|||||||
|
|
||||||
const { sessionId: nestedSession } = expectOk(await host.api.sessions.create(request({})))
|
const { sessionId: nestedSession } = expectOk(await host.api.sessions.create(request({})))
|
||||||
const nestedAgent = host.ctx.agents.get(nestedSession) as Agent
|
const nestedAgent = host.ctx.agents.get(nestedSession) as Agent
|
||||||
nestedAgent.session.append('context/message', {
|
// Injected context is a user/message with a non-user source (send-unify).
|
||||||
|
nestedAgent.session.append('user/message', {
|
||||||
content: [
|
content: [
|
||||||
null,
|
null,
|
||||||
[],
|
[],
|
||||||
@@ -511,7 +512,7 @@ describe('sessions.prompt / cancel', () => {
|
|||||||
content: [{ type: 'image', attachment: image.attachment }],
|
content: [{ type: 'image', attachment: image.attachment }],
|
||||||
},
|
},
|
||||||
] as never,
|
] as never,
|
||||||
source: { kind: 'user' },
|
source: { kind: 'plugin', plugin: 'spec' },
|
||||||
}, { surfaceOp: 'append' })
|
}, { surfaceOp: 'append' })
|
||||||
expectOk(await host.api.sessions.attachment(request({
|
expectOk(await host.api.sessions.attachment(request({
|
||||||
sessionId: nestedSession,
|
sessionId: nestedSession,
|
||||||
@@ -534,9 +535,9 @@ describe('sessions.prompt / cancel', () => {
|
|||||||
...image.attachment,
|
...image.attachment,
|
||||||
attachmentId: `sha256:${'b'.repeat(64)}` as never,
|
attachmentId: `sha256:${'b'.repeat(64)}` as never,
|
||||||
}
|
}
|
||||||
streamedAgent.session.append('context/message', {
|
streamedAgent.session.append('user/message', {
|
||||||
content: [{ type: 'image', attachment: missingRef }],
|
content: [{ type: 'image', attachment: missingRef }],
|
||||||
source: { kind: 'user' },
|
source: { kind: 'plugin', plugin: 'spec' },
|
||||||
}, { surfaceOp: 'append' })
|
}, { surfaceOp: 'append' })
|
||||||
const missing = await host.api.sessions.attachment(request({
|
const missing = await host.api.sessions.attachment(request({
|
||||||
sessionId: streamedSession,
|
sessionId: streamedSession,
|
||||||
|
|||||||
Reference in New Issue
Block a user