Merge branch 'stack/agent-profiles-5-web-ui' into stack/agent-profiles-8-authoring
This commit is contained in:
@@ -40,19 +40,18 @@ it('isolates replay skill discovery from every ambient host root', async () => {
|
|||||||
try {
|
try {
|
||||||
scaffold = await launchWebScaffold()
|
scaffold = await launchWebScaffold()
|
||||||
const ctx = scaffold.ctx
|
const ctx = scaffold.ctx
|
||||||
// The skill registry belongs to one agent's preset, behind an `isolate`
|
// Local skill discovery belongs to the agent's preset LAYER of the host
|
||||||
// realm the host cannot resolve by name — so the roots under test are only
|
// registry, so the roots under test are only reachable through a composed
|
||||||
// reachable through a composed agent, which is also the only shape that
|
// agent's view — the same scope the gateway's `skill.list` resolves for a
|
||||||
// ever asks. `serviceFor` is the same addressing the gateway's `skill.list`
|
// browser request about a session.
|
||||||
// uses for a browser request about a session.
|
|
||||||
const handle = await ctx.agents.create({
|
const handle = await ctx.agents.create({
|
||||||
sessionId: SessionId('hermetic-skills'),
|
sessionId: SessionId('hermetic-skills'),
|
||||||
setup: agentCtx => ctx.agentPresets.mount(agentCtx).then(() => undefined),
|
setup: agentCtx => ctx.agentPresets.mount(agentCtx).then(() => undefined),
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const skills = ctx.agentPresets.serviceFor(handle.agent, 'skills')
|
const skills = ctx.get('skills')
|
||||||
if (skills === undefined) throw new Error('composed agent mounts no skill registry')
|
if (skills === undefined) throw new Error('the composition mounts no skill registry')
|
||||||
const names = (await skills.list({ cwd: scaffold.workspaceCwd })).map(skill => skill.name)
|
const names = (await skills.list({ cwd: scaffold.workspaceCwd, scope: handle.agent })).map(skill => skill.name)
|
||||||
expect(names).not.toContain('ambient-dsh')
|
expect(names).not.toContain('ambient-dsh')
|
||||||
expect(names).not.toContain('ambient-agents')
|
expect(names).not.toContain('ambient-agents')
|
||||||
expect(names).not.toContain('ambient-bundled')
|
expect(names).not.toContain('ambient-bundled')
|
||||||
|
|||||||
Reference in New Issue
Block a user