fix(run): align mini with current session contracts (#35354)

This commit is contained in:
Simon Klee 2026-07-04 21:14:01 +02:00 committed by GitHub
commit 57fb3e5cc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1061 additions and 78 deletions

View file

@ -585,11 +585,15 @@ const layer = Layer.effect(
const skills = yield* SkillV2.Service.pipe(Effect.provide(locations.get(session.location)))
const skill = (yield* skills.list()).find((item) => item.name === input.skill)
if (!skill) return yield* new SkillNotFoundError({ skill: input.skill })
yield* events.publish(SessionEvent.Skill.Activated, {
sessionID: input.sessionID,
name: skill.name,
text: skill.content,
})
yield* events.publish(
SessionEvent.Skill.Activated,
{
sessionID: input.sessionID,
name: skill.name,
text: skill.content,
},
{ id: input.id ? EventV2.ID.make(input.id.replace(/^msg_/, "evt_")) : undefined },
)
if (input.resume !== false)
yield* execution
.resume(input.sessionID)