4242 * `skill_activation` origin. The returned `Turn` handle is
4343 * discarded; clients follow progress via the `skill.activated`
4444 * + `turn.*` events emitted by the service on the WS stream.
45+ * The edge then applies the prompt-metadata update
46+ * (`applyPromptMetadataUpdate`) so a first `/<skill>`
47+ * message titles the session, matching the native RPC path.
4548 *
4649 * **Model projection**: `SkillDefinition` (v2) → protocol `SkillDescriptor`,
4750 * byte-for-byte with v1's `toProtocolSkill`
@@ -72,9 +75,11 @@ import {
7275 IAgentSkillService ,
7376 IBootstrapService ,
7477 IConfigService ,
78+ IEventService ,
7579 IPluginService ,
7680 ISessionIndex ,
7781 ISessionLifecycleService ,
82+ ISessionMetadata ,
7883 ISessionSkillCatalog ,
7984 ISkillCatalogRuntimeOptions ,
8085 ISkillDiscovery ,
@@ -83,8 +88,10 @@ import {
8388 isError2 ,
8489 MERGE_ALL_AVAILABLE_SKILLS_SECTION ,
8590 SKILL_SOURCE_PRIORITY ,
91+ applyPromptMetadataUpdate ,
8692 configuredRoots ,
8793 projectRoots ,
94+ promptMetadataTextFromSkill ,
8895 userRoots ,
8996 type ISessionScopeHandle ,
9097 type Scope ,
@@ -284,6 +291,16 @@ export function registerSkillsRoutes(app: SkillsRouteHost, core: Scope): void {
284291 await agent . accessor
285292 . get ( IAgentSkillService )
286293 . activate ( { name : parsed . id , args : req . body . args } ) ;
294+ // Keep the easy-title behavior of the native RPC / TUI path: a first
295+ // `/<skill>` message titles the session (same as routes/prompts.ts).
296+ await applyPromptMetadataUpdate (
297+ {
298+ metadata : resolved . handle . accessor . get ( ISessionMetadata ) ,
299+ eventService : core . accessor . get ( IEventService ) ,
300+ sessionId : session_id ,
301+ } ,
302+ promptMetadataTextFromSkill ( { name : parsed . id , args : req . body . args } ) ,
303+ ) ;
287304 requestLog ( req ) ?. info ( { session_id, skill_name : parsed . id } , 'skill activated' ) ;
288305 reply . send ( okEnvelope ( { activated : true , skill_name : parsed . id } , req . id ) ) ;
289306 } catch ( err ) {
0 commit comments