File size: 1,122 Bytes
68d7816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* oxlint-disable typescript-eslint/no-unsafe-declaration-merging, eslint-plugin-import/namespace -- Event2 class+payload-interface declaration merging is the sanctioned event-declaration idiom. */
import type { SkillSource } from '#/agent/contextMemory/types';
import { AgentEvent2 } from '#/app/event/event2';

export interface SkillActivatedPayload {
  readonly agentId: string;
  readonly activationId: string;
  readonly skillName: string;
  readonly trigger: string;
  readonly skillArgs?: string;
  readonly skillPath?: string;
  readonly skillSource?: SkillSource;
}

export class SkillActivated extends AgentEvent2<SkillActivatedPayload> {
  static override readonly type = 'skill.activated';
  static override readonly observable = true;
}
export interface SkillActivated extends SkillActivatedPayload {}

export interface SkillActivatedEvent {
  readonly type: 'skill.activated';
  readonly activationId: string;
  readonly skillName: string;
  readonly skillArgs?: string;
  readonly trigger: 'user-slash' | 'model-tool' | 'nested-skill';
  readonly skillPath?: string;
  readonly skillSource?: SkillSource;
}