@@ -45,6 +45,19 @@ export enum ContactAccess {
4545 Write ,
4646}
4747
48+ /**
49+ * Intent handler for activity mentions.
50+ * Defines how the agent should respond when mentioned in an activity.
51+ */
52+ export type ActivityIntentHandler = {
53+ /** Human-readable description of what this intent handles */
54+ description : string ;
55+ /** Example phrases or activity content that would match this intent */
56+ examples : string [ ] ;
57+ /** The function to call when this intent is matched */
58+ handler : ( activity : Activity ) => Promise < void > ;
59+ } ;
60+
4861/**
4962 * Built-in tool for interacting with the core Plot data layer.
5063 *
@@ -107,13 +120,18 @@ export abstract class Plot extends ITool {
107120 *
108121 * @example
109122 * ```typescript
110- * intents: {
111- * "Schedule or reschedule calendar events": this.onSchedulingRequest,
112- * "Find available meeting times": this.onAvailabilityRequest
113- * }
123+ * intents: [{
124+ * description: "Schedule or reschedule calendar events",
125+ * examples: ["Schedule a meeting tomorrow at 2pm", "Move my 3pm meeting to 4pm"],
126+ * handler: this.onSchedulingRequest
127+ * }, {
128+ * description: "Find available meeting times",
129+ * examples: ["When am I free this week?", "Find time for a 1 hour meeting"],
130+ * handler: this.onAvailabilityRequest
131+ * }]
114132 * ```
115133 */
116- intents ?: Record < string , ( activity : Activity ) => Promise < void > > ;
134+ intents ?: ActivityIntentHandler [ ] ;
117135 } ;
118136 priority ?: {
119137 access ?: PriorityAccess ;
0 commit comments