Merge remote-tracking branch 'origin/pr-555-head' into worktree/pr555-simplify

# Conflicts:
#	apps/web/tests/image-display.snapshot.ts
This commit is contained in:
Tianyi Cui
2026-07-30 00:06:12 +08:00
53 changed files with 2933 additions and 280 deletions

View File

@@ -180,7 +180,7 @@ describe('skill.list', () => {
it('lists skills for the session cwd taken from the header', async () => {
const ctx = await harness()
const seenCwds: (string | undefined)[] = []
ctx.skills.registerProvider({
ctx.skills.registerProvider(() => ({
name: 'probe',
list: (options) => {
seenCwds.push(options.cwd)
@@ -190,7 +190,7 @@ describe('skill.list', () => {
}])
},
get: () => Promise.resolve(undefined),
})
}))
const api = createApiProxy(ctx, DEFAULTS)
// No agent is registered for this session: header resolution must not
// touch (or resume through) the Agent registry.
@@ -219,11 +219,11 @@ describe('skill.list', () => {
it('folds a provider failure into internal', async () => {
const ctx = await harness()
ctx.skills.registerProvider({
ctx.skills.registerProvider(() => ({
name: 'broken',
list: () => Promise.reject(new Error('directory exploded')),
get: () => Promise.resolve(undefined),
})
}))
const api = createApiProxy(ctx, DEFAULTS)
const session = ctx.sessions.create(undefined, { meta: { cwd: '/proj' } })
const response = await api.skills.list(request({ sessionId: session.id }))