Merge branch 'stack/agent-profiles-1-seam' into stack/agent-profiles-3-wire

# Conflicts:
#	packages/preset/agent-presets/src/index.ts
This commit is contained in:
Yichen Jiang
2026-08-10 11:18:41 +08:00
11 changed files with 90 additions and 45 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
import { describe, expect, it, vi } from 'vitest'
import { Context } from 'cordis'
import { createScope, scopeOf, setScopeParent } from '@deepseek-ai/dsh-scope'
import { bindScopeParent, createScope, scopeOf } from '@deepseek-ai/dsh-scope'
import SkillService, {
isModelInvocable,
isUserInvocable,
@@ -1183,10 +1183,11 @@ describe('SkillService scoped layers', () => {
})
}
const agentKey = {}
setScopeParent(agentKey, scopeOf(presetA.ctx) as object)
const binding = bindScopeParent(agentKey, scopeOf(presetA.ctx) as object)
expect((await ctx.skills.list({ scope: agentKey })).map(skill => skill.name)).toEqual(['skill-a'])
// A blank-session recompose re-parents the same key without any registry write.
setScopeParent(agentKey, scopeOf(presetB.ctx) as object)
// A blank-session recompose re-links the same key through its binding
// without any registry write.
binding.rebind(scopeOf(presetB.ctx) as object)
expect((await ctx.skills.list({ scope: agentKey })).map(skill => skill.name)).toEqual(['skill-b'])
await presetA.dispose()
await presetB.dispose()