@flexkit/agent-protocol 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +35 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -288,6 +288,40 @@ declare function isDataPartType(type: string): type is DataPartType;
288
288
  /** The `type` of a UI message part carrying this data part. */
289
289
  type DataPartMessageType = `data-${DataPartType}`;
290
290
 
291
+ type ActivityItemKind = 'approval_request';
292
+ /** `done` = resolved by the system (e.g. the approval was decided); `dismissed` = hidden by the recipient. */
293
+ type ActivityItemState = 'unread' | 'read' | 'done' | 'dismissed';
294
+ type ActivityItemResolution = 'approved' | 'rejected' | 'expired' | 'cancelled';
295
+ /** One entry in a user's Studio Activity inbox. */
296
+ interface ActivityItem {
297
+ approvalId: string | null;
298
+ automationId: string | null;
299
+ automationRunId: string | null;
300
+ body: string | null;
301
+ chatId: string | null;
302
+ chatMessageId: string | null;
303
+ createdAt: string;
304
+ id: string;
305
+ kind: ActivityItemKind;
306
+ readAt: string | null;
307
+ /** True when the item waits on the recipient (an approval request). */
308
+ requiresAction: boolean;
309
+ resolution: ActivityItemResolution | null;
310
+ resolvedAt: string | null;
311
+ state: ActivityItemState;
312
+ title: string;
313
+ }
314
+ interface ActivityItemsPage {
315
+ hasMore: boolean;
316
+ items: ActivityItem[];
317
+ }
318
+ /** Badge counts plus unread items newer than the client's `since` watermark (newest first, at most 5). */
319
+ interface ActivitySummary {
320
+ needsActionCount: number;
321
+ newItems: ActivityItem[];
322
+ unreadCount: number;
323
+ }
324
+
291
325
  /** Run and approval shapes returned by the automations API. */
292
326
  type AutomationRunStatus = 'running' | 'awaiting_approval' | 'success' | 'skipped' | 'failed' | 'cancelled';
293
327
  type AutomationTriggerType = 'entity' | 'manual' | 'schedule' | 'webhook';
@@ -451,4 +485,4 @@ type AgentChatFollowUpResult = {
451
485
  turn: AgentChatTurn;
452
486
  };
453
487
 
454
- export { type AgentChat, type AgentChatAttachment, type AgentChatFollowUp, type AgentChatFollowUpDelivery, type AgentChatFollowUpResult, type AgentChatMessage, type AgentChatMessageRole, type AgentChatMessageStatus, type AgentChatPart, type AgentChatTurn, type AutomationApproval, type AutomationApprovalKind, type AutomationApprovalOperation, type AutomationApprovalPreview, type AutomationApprovalPreviewKind, type AutomationApprovalPreviewOperation, type AutomationApprovalPreviewRow, type AutomationApprovalStatus, type AutomationMutationPolicy, type AutomationRun, type AutomationRunStatus, type AutomationToolAllowRule, type AutomationTriggerType, DATA_PART_TYPES, type DataPart, type DataPartMessageType, type DataPartType, type SchemaChangePreviewSummary, dataPartSchema, errorSchema, isDataPartType };
488
+ export { type ActivityItem, type ActivityItemKind, type ActivityItemResolution, type ActivityItemState, type ActivityItemsPage, type ActivitySummary, type AgentChat, type AgentChatAttachment, type AgentChatFollowUp, type AgentChatFollowUpDelivery, type AgentChatFollowUpResult, type AgentChatMessage, type AgentChatMessageRole, type AgentChatMessageStatus, type AgentChatPart, type AgentChatTurn, type AutomationApproval, type AutomationApprovalKind, type AutomationApprovalOperation, type AutomationApprovalPreview, type AutomationApprovalPreviewKind, type AutomationApprovalPreviewOperation, type AutomationApprovalPreviewRow, type AutomationApprovalStatus, type AutomationMutationPolicy, type AutomationRun, type AutomationRunStatus, type AutomationToolAllowRule, type AutomationTriggerType, DATA_PART_TYPES, type DataPart, type DataPartMessageType, type DataPartType, type SchemaChangePreviewSummary, dataPartSchema, errorSchema, isDataPartType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexkit/agent-protocol",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Schemas and types shared between the Flexkit agent platform and its Studio UI: streamed data parts, run, approval and chat DTOs.",
5
5
  "keywords": [
6
6
  "flexkit",