@flexkit/agent-protocol 0.3.2 → 0.3.3
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.
- package/dist/index.d.ts +56 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -288,7 +288,12 @@ 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
|
-
|
|
291
|
+
/**
|
|
292
|
+
* `approval_request`: a proposal waits on the recipient. `automation_result`: an
|
|
293
|
+
* automation run finished and its notify rule asked for it. `automation_failure`:
|
|
294
|
+
* an automation run failed.
|
|
295
|
+
*/
|
|
296
|
+
type ActivityItemKind = 'approval_request' | 'automation_result' | 'automation_failure';
|
|
292
297
|
/** `done` = resolved by the system (e.g. the approval was decided); `dismissed` = hidden by the recipient. */
|
|
293
298
|
type ActivityItemState = 'unread' | 'read' | 'done' | 'dismissed';
|
|
294
299
|
type ActivityItemResolution = 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
@@ -326,9 +331,16 @@ interface ActivitySummary {
|
|
|
326
331
|
type AutomationRunStatus = 'running' | 'awaiting_approval' | 'success' | 'skipped' | 'failed' | 'cancelled';
|
|
327
332
|
type AutomationTriggerType = 'entity' | 'manual' | 'schedule' | 'webhook';
|
|
328
333
|
type AutomationApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
329
|
-
type AutomationApprovalKind = 'graphql' | 'bulk' | 'plugin' | 'exec' | 'schema';
|
|
334
|
+
type AutomationApprovalKind = 'graphql' | 'bulk' | 'plugin' | 'exec' | 'schema' | 'automation';
|
|
330
335
|
type AutomationApprovalPreviewKind = 'create' | 'update' | 'delete' | 'unknown';
|
|
331
336
|
type AutomationMutationPolicy = 'require_approval' | 'auto_approve';
|
|
337
|
+
/**
|
|
338
|
+
* Which finished runs create an Activity item for the automation's recipients:
|
|
339
|
+
* every run, runs the agent flagged for attention, failures only, or none.
|
|
340
|
+
* Failures notify under every rule except `never`.
|
|
341
|
+
*/
|
|
342
|
+
type AutomationNotifyRule = 'always' | 'when_flagged' | 'failures' | 'never';
|
|
343
|
+
type AutomationVisibility = 'project' | 'space' | 'personal';
|
|
332
344
|
interface AutomationApprovalOperation {
|
|
333
345
|
query: string;
|
|
334
346
|
variables: {
|
|
@@ -362,15 +374,56 @@ interface SchemaChangePreviewSummary {
|
|
|
362
374
|
breakingChanges: string[];
|
|
363
375
|
warnings: string[];
|
|
364
376
|
}
|
|
377
|
+
/** A plugin an agent-proposed automation may use. */
|
|
378
|
+
interface AutomationProposalPlugin {
|
|
379
|
+
/** The connected account, e.g. an email address; null when the plugin needs none. */
|
|
380
|
+
account: string | null;
|
|
381
|
+
/** Channel names it delivers to (Slack, Teams); empty when it does not deliver. */
|
|
382
|
+
deliveryChannels: string[];
|
|
383
|
+
name: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Extra context carried by `kind: 'automation'` approvals: the automation the
|
|
387
|
+
* chat agent proposed. Nothing exists until a person approves; the approver may
|
|
388
|
+
* edit the instructions first.
|
|
389
|
+
*/
|
|
390
|
+
interface AutomationProposalPreview {
|
|
391
|
+
customTools: string[];
|
|
392
|
+
instructions: string;
|
|
393
|
+
modelLabel: string;
|
|
394
|
+
mutationPolicy: AutomationMutationPolicy;
|
|
395
|
+
name: string;
|
|
396
|
+
notifyCreator: boolean;
|
|
397
|
+
notifyRule: AutomationNotifyRule;
|
|
398
|
+
plugins: AutomationProposalPlugin[];
|
|
399
|
+
/** Run the automation once right after it is created (the approver can also choose this). */
|
|
400
|
+
runOnceAfterCreate: boolean;
|
|
401
|
+
skills: string[];
|
|
402
|
+
spaceLabel: string | null;
|
|
403
|
+
/** Subscribers' display names. */
|
|
404
|
+
subscribers: string[];
|
|
405
|
+
/** One line per trigger in plain words, e.g. "Every Monday at 09:00 (Europe/Prague)". */
|
|
406
|
+
triggers: string[];
|
|
407
|
+
visibility: AutomationVisibility;
|
|
408
|
+
}
|
|
365
409
|
interface AutomationApprovalPreview {
|
|
410
|
+
automation?: AutomationProposalPreview;
|
|
366
411
|
operations: AutomationApprovalPreviewOperation[];
|
|
367
412
|
schema?: SchemaChangePreviewSummary;
|
|
368
413
|
}
|
|
414
|
+
/** What an approved `kind: 'automation'` proposal created. */
|
|
415
|
+
interface CreatedAutomationResult {
|
|
416
|
+
automationId: string;
|
|
417
|
+
/** The first run, when the approver chose to run it once. */
|
|
418
|
+
runId: string | null;
|
|
419
|
+
}
|
|
369
420
|
interface AutomationApproval {
|
|
370
421
|
affectedCount: number | null;
|
|
371
422
|
/** Null for approvals raised by a chat turn. */
|
|
372
423
|
automationId: string | null;
|
|
373
424
|
automationName: string;
|
|
425
|
+
/** Set once an approved `kind: 'automation'` proposal created its automation. */
|
|
426
|
+
createdAutomation?: CreatedAutomationResult | null;
|
|
374
427
|
/** Set for approvals raised by a chat turn. */
|
|
375
428
|
chatId: string | null;
|
|
376
429
|
chatMessageId: string | null;
|
|
@@ -485,4 +538,4 @@ type AgentChatFollowUpResult = {
|
|
|
485
538
|
turn: AgentChatTurn;
|
|
486
539
|
};
|
|
487
540
|
|
|
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 };
|
|
541
|
+
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 AutomationNotifyRule, type AutomationProposalPlugin, type AutomationProposalPreview, type AutomationRun, type AutomationRunStatus, type AutomationToolAllowRule, type AutomationTriggerType, type AutomationVisibility, type CreatedAutomationResult, DATA_PART_TYPES, type DataPart, type DataPartMessageType, type DataPartType, type SchemaChangePreviewSummary, dataPartSchema, errorSchema, isDataPartType };
|
package/package.json
CHANGED