@epilot/sdk 2.18.21 → 2.18.23
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/definitions/ai-agents.json +121 -27
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +207 -17
- package/definitions/message.json +164 -14
- package/dist/ai-agents-ME5VRKMY.cjs +7 -0
- package/dist/ai-agents-MY4QE4CP.js +7 -0
- package/dist/{ai-agents.d-BnR7CAeJ.d.cts → ai-agents.d-B3TkP4mo.d.cts} +152 -52
- package/dist/{ai-agents.d-BnR7CAeJ.d.ts → ai-agents.d-B3TkP4mo.d.ts} +152 -52
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +8 -8
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +2 -2
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.d.cts +2 -2
- package/dist/apis/message.d.ts +2 -2
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-EPDH37RS.js → chunk-AWKA7GZQ.js} +1 -1
- package/dist/{chunk-ZCEIXRDJ.cjs → chunk-J57SWYWL.cjs} +4 -4
- package/dist/{chunk-LKV3RKOP.cjs → chunk-QKEPXYEF.cjs} +1 -1
- package/dist/{chunk-C2BFLFHE.js → chunk-SCBBLLBK.js} +4 -4
- package/dist/customer-portal-JLUT56QQ.js +7 -0
- package/dist/customer-portal-NUYHT3HX.cjs +7 -0
- package/dist/{customer-portal-runtime-FZQLCEJQ.js → customer-portal-runtime-6CECA6UW.js} +1 -1
- package/dist/{customer-portal-runtime-7WW3YRWJ.cjs → customer-portal-runtime-QMONBHLN.cjs} +2 -2
- package/dist/{customer-portal.d-JVkJjm_e.d.cts → customer-portal.d-Ce8-UnSY.d.cts} +794 -42
- package/dist/{customer-portal.d-JVkJjm_e.d.ts → customer-portal.d-Ce8-UnSY.d.ts} +794 -42
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/message-LJ32JH6Z.cjs +7 -0
- package/dist/message-SSTVRGEF.js +7 -0
- package/dist/{message.d-BHWCGH3q.d.cts → message.d-DwnqO-Us.d.cts} +366 -25
- package/dist/{message.d-BHWCGH3q.d.ts → message.d-DwnqO-Us.d.ts} +366 -25
- package/docs/ai-agents.md +76 -19
- package/docs/customer-portal.md +209 -13
- package/docs/message.md +126 -2
- package/package.json +1 -1
- package/dist/ai-agents-3JK4UU2G.js +0 -7
- package/dist/ai-agents-XST3YUFA.cjs +0 -7
- package/dist/customer-portal-JDIXJD6C.cjs +0 -7
- package/dist/customer-portal-WIRQ7UCN.js +0 -7
- package/dist/message-BZN67NTB.js +0 -7
- package/dist/message-DBHA4PHI.cjs +0 -7
package/definitions/message.json
CHANGED
|
@@ -585,7 +585,7 @@
|
|
|
585
585
|
"post": {
|
|
586
586
|
"operationId": "getUnreadCounts",
|
|
587
587
|
"summary": "getUnreadCounts",
|
|
588
|
-
"description": "Unread counts for several named scopes in one request.\n\nA scope is a name plus the same parameters the thread list already takes (`q`, `inbox_id`),\nso a scope's count and the list beneath it are the same predicate and agree by construction.\nThe server adds only the read-state condition; it does not re-author the caller's view.\n\nThe `organization` scope is the exception and takes no `q`: it reuses the four canonical\ncentral-inbox queries, so its numbers match `getUnread` exactly.\n\
|
|
588
|
+
"description": "Unread counts for several named scopes in one request.\n\nA scope is a name plus the same parameters the thread list already takes (`q`, `inbox_id`),\nso a scope's count and the list beneath it are the same predicate and agree by construction.\nThe server adds only the read-state condition; it does not re-author the caller's view.\n\nThe `organization` scope is the exception and takes no `q`: it reuses the four canonical\ncentral-inbox queries, so its numbers match `getUnread` exactly.\n\nWhich buckets come back varies by scope type and actor. Every scope other than `organization`\nreturns `unread` alone. An `organization` scope returns all four (`unread`, `drafts`,\n`unassigned`, `spam`) for `actor: organization`, and `unread` and `drafts` only for\n`actor: user`. `getUnread` returns all four for both actors; this endpoint omits the two that\nno per-user surface renders, since each costs an aggregation.\n\nGated on the `message-unread-counts` flag, evaluated once per request against the calling\norg. With the flag off the response is `{ \"enabled\": false, \"counts\": {} }` and no\nElasticsearch query is issued.\n",
|
|
589
589
|
"tags": [
|
|
590
590
|
"Messages"
|
|
591
591
|
],
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
613
|
"400": {
|
|
614
|
-
"description": "The request names more scopes than the cap allows, repeats a scope name, or omits `q
|
|
614
|
+
"description": "The request names more scopes than the cap allows, repeats a scope name, or omits both\n`q` and `view` on a scope type that needs a predicate. Over-cap requests are refused rather than truncated:\na silently dropped scope renders as a missing badge, which is indistinguishable from\nzero unread.\n"
|
|
615
615
|
},
|
|
616
616
|
"403": {
|
|
617
617
|
"description": "Forbidden"
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
"post": {
|
|
833
833
|
"operationId": "getAssigneeWorkload",
|
|
834
834
|
"summary": "getAssigneeWorkload",
|
|
835
|
-
"description": "Return the open-thread workload for a set of user ids.\n\nFor each requested user id, returns the number of *open* threads assigned\ndirectly to that user
|
|
835
|
+
"description": "Return the open-thread workload for a set of user ids.\n\nFor each requested user id, returns the number of *open* threads assigned\ndirectly to that user \u2014 matching what the user sees in their central-inbox\nopen view: in inbox, not trashed, not done, and excluding notification-only\nand spam threads.\n\nOnly threads assigned directly to a user are counted; threads assigned to a\ngroup the user belongs to are not. Intended for assignment load-balancing\n(e.g. even-distribution automations) that need a consistent, inbox-aligned\nworkload per user.\n",
|
|
836
836
|
"tags": [
|
|
837
837
|
"Threads"
|
|
838
838
|
],
|
|
@@ -2695,6 +2695,117 @@
|
|
|
2695
2695
|
}
|
|
2696
2696
|
}
|
|
2697
2697
|
},
|
|
2698
|
+
"ThreadView": {
|
|
2699
|
+
"type": "object",
|
|
2700
|
+
"additionalProperties": true,
|
|
2701
|
+
"description": "A central-inbox view, described structurally so the server compiles the query for it. Both the\nthread list and the unread count for a view are compiled from the same description, so the two\ncannot disagree about what the view means.\n\nEvery field is optional and an omitted field adds no condition, so a view narrows the whole\nmailbox rather than being a template with required holes. Unknown fields are ignored.\n",
|
|
2702
|
+
"properties": {
|
|
2703
|
+
"folder": {
|
|
2704
|
+
"type": "string",
|
|
2705
|
+
"enum": [
|
|
2706
|
+
"inbox",
|
|
2707
|
+
"favorite",
|
|
2708
|
+
"sent",
|
|
2709
|
+
"trash",
|
|
2710
|
+
"spam",
|
|
2711
|
+
"unassignable",
|
|
2712
|
+
"draft"
|
|
2713
|
+
],
|
|
2714
|
+
"description": "Which sidebar folder's membership predicate to apply."
|
|
2715
|
+
},
|
|
2716
|
+
"mailbox": {
|
|
2717
|
+
"type": "string",
|
|
2718
|
+
"enum": [
|
|
2719
|
+
"organization",
|
|
2720
|
+
"agent"
|
|
2721
|
+
],
|
|
2722
|
+
"description": "Whose mailbox this is. `agent` scopes to threads assigned to the caller or their groups;\n`organization` scopes to the org and is the only mailbox that carries address filtering.\n"
|
|
2723
|
+
},
|
|
2724
|
+
"labels": {
|
|
2725
|
+
"type": "array",
|
|
2726
|
+
"items": {
|
|
2727
|
+
"type": "string"
|
|
2728
|
+
},
|
|
2729
|
+
"description": "Saved-filter labels, ANDed. Matched exactly against the tag rather than against its\ntokens, so a label whose words overlap a folder tag no longer lands in that folder.\n"
|
|
2730
|
+
},
|
|
2731
|
+
"purposes": {
|
|
2732
|
+
"type": "array",
|
|
2733
|
+
"items": {
|
|
2734
|
+
"type": "string"
|
|
2735
|
+
},
|
|
2736
|
+
"description": "Purpose ids on linked entities, ANDed."
|
|
2737
|
+
},
|
|
2738
|
+
"filters": {
|
|
2739
|
+
"type": "array",
|
|
2740
|
+
"items": {
|
|
2741
|
+
"type": "string",
|
|
2742
|
+
"enum": [
|
|
2743
|
+
"unread",
|
|
2744
|
+
"resolved",
|
|
2745
|
+
"trash"
|
|
2746
|
+
]
|
|
2747
|
+
},
|
|
2748
|
+
"description": "State filters, independent of the folder. `resolved` and `trash` reach the Inbox folder\nonly and are mutually exclusive there; `unread` applies anywhere.\n"
|
|
2749
|
+
},
|
|
2750
|
+
"from": {
|
|
2751
|
+
"type": "array",
|
|
2752
|
+
"items": {
|
|
2753
|
+
"type": "string"
|
|
2754
|
+
},
|
|
2755
|
+
"description": "Sender addresses to filter on."
|
|
2756
|
+
},
|
|
2757
|
+
"to": {
|
|
2758
|
+
"type": "array",
|
|
2759
|
+
"items": {
|
|
2760
|
+
"type": "string"
|
|
2761
|
+
},
|
|
2762
|
+
"description": "Recipient addresses to filter on."
|
|
2763
|
+
},
|
|
2764
|
+
"assigned_to": {
|
|
2765
|
+
"type": "array",
|
|
2766
|
+
"items": {
|
|
2767
|
+
"type": "string"
|
|
2768
|
+
},
|
|
2769
|
+
"description": "Assignee user ids."
|
|
2770
|
+
},
|
|
2771
|
+
"include_unassigned": {
|
|
2772
|
+
"type": "boolean",
|
|
2773
|
+
"description": "Whether threads with no assignee join the `assigned_to` set. A separate flag rather than a\nsentinel entry in that list, so `assigned_to` holds user ids and nothing else.\n"
|
|
2774
|
+
},
|
|
2775
|
+
"date_from_days_ago": {
|
|
2776
|
+
"type": "integer",
|
|
2777
|
+
"minimum": 0,
|
|
2778
|
+
"description": "Lower bound of the date range, in days before now. Omitted means the epoch."
|
|
2779
|
+
},
|
|
2780
|
+
"date_to_days_ago": {
|
|
2781
|
+
"type": "integer",
|
|
2782
|
+
"minimum": 0,
|
|
2783
|
+
"description": "Upper bound of the date range, in days before now. Omitted means now."
|
|
2784
|
+
},
|
|
2785
|
+
"email_filter": {
|
|
2786
|
+
"type": "array",
|
|
2787
|
+
"items": {
|
|
2788
|
+
"type": "string"
|
|
2789
|
+
},
|
|
2790
|
+
"description": "Addresses the user selected in the address filter. Absent and empty differ, and the\ndifference is a real UI state: absent is \"not filtering by address\", empty is \"every\naddress deselected\", which matches nothing.\n\nDistinct from the permission restriction, which the server derives and a caller cannot\nauthor.\n"
|
|
2791
|
+
},
|
|
2792
|
+
"text": {
|
|
2793
|
+
"type": "string",
|
|
2794
|
+
"description": "The user's search string, as typed. Expanded across the searched fields server-side and\nnever interpreted as query syntax, so a typed operator or a stray bracket cannot\nre-associate the predicate around it.\n"
|
|
2795
|
+
},
|
|
2796
|
+
"thread_ids": {
|
|
2797
|
+
"type": "array",
|
|
2798
|
+
"items": {
|
|
2799
|
+
"type": "string"
|
|
2800
|
+
},
|
|
2801
|
+
"description": "Restrict the view to these threads. Exists because \"would this thread appear in the view\nthe user is looking at?\" is a real question the inbox asks when a new thread arrives, and\nit is a membership test against the view rather than a different view.\n"
|
|
2802
|
+
},
|
|
2803
|
+
"pinned_by": {
|
|
2804
|
+
"type": "string",
|
|
2805
|
+
"description": "Restrict the view to threads this user pinned. The pinned strip above the list is the same\nview with this one extra condition.\n"
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2698
2809
|
"UnreadCountScope": {
|
|
2699
2810
|
"type": "object",
|
|
2700
2811
|
"required": [
|
|
@@ -2714,13 +2825,18 @@
|
|
|
2714
2825
|
"shared_inbox",
|
|
2715
2826
|
"saved_view"
|
|
2716
2827
|
],
|
|
2717
|
-
"description": "Decides which buckets come back, and whether `q` is required. `organization` returns all\nfour buckets from the canonical central-inbox queries and takes no `q`. `shared_inbox`\nand `saved_view` return `unread` alone
|
|
2828
|
+
"description": "Decides which buckets come back, and whether `q` is required. `organization` returns all\nfour buckets from the canonical central-inbox queries and takes no `q`. `shared_inbox`\nand `saved_view` return `unread` alone. A `saved_view` scope names its view with `view_id`;\na `shared_inbox` scope needs only its `inbox_id`, since the query follows from the type.\n\nA `shared_inbox` scope additionally requires `actor: organization` and is refused with a\n400 otherwise. A shared inbox is an organization-level construct \u2014 selecting one always\nswitches the mailbox to the organization \u2014 so it has no per-user read state and the\ncombination would compute a number no surface renders. `saved_view` accepts either actor,\nbecause a view's own configuration names its mailbox.\n"
|
|
2718
2829
|
},
|
|
2719
2830
|
"q": {
|
|
2720
2831
|
"type": "string",
|
|
2721
|
-
"description": "The scope's
|
|
2832
|
+
"description": "The scope's query, in Lucene syntax, as passed to `threads:search` for the same scope. The\nserver adds the read-state condition and nothing else, so the count matches that list.\n\nAccepted for `shared_inbox` and `saved_view`; rejected for `organization`.\n\nSuperseded by server-side compilation. It remains accepted for callers whose counts are\nenabled while compilation is not, and is ignored when compilation is enabled. It will be\nremoved once compilation is enabled everywhere counts are.\n",
|
|
2722
2833
|
"example": "_tags.keyword:inbox AND !_tags.keyword:trash"
|
|
2723
2834
|
},
|
|
2835
|
+
"view_id": {
|
|
2836
|
+
"type": "string",
|
|
2837
|
+
"description": "The id of the saved view this scope counts. The server reads that view and compiles the same\nquery the thread list runs for it, so the count and the list cannot describe the view\ndifferently.\n\nRequired for `saved_view` scopes unless `q` is supplied instead; rejected for the other two\ntypes. A `shared_inbox` scope needs no predicate field at all, because its query follows from\nthe type and its `inbox_id`. An `organization` scope uses the canonical folder queries.\n\nThe view's own shared-inbox filter is read from the stored view, so `inbox_id` need not be\nsent alongside this.\n\nCompilation is enabled per organization by the `message-unread-unified-predicate` feature\nflag. While it is off, a scope supplying only a `view_id` has no query to run and its name is\nreturned in `omitted` rather than counted. A named view that this organization does not have,\nor whose stored configuration cannot be read, is omitted the same way.\n",
|
|
2838
|
+
"example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
|
|
2839
|
+
},
|
|
2724
2840
|
"inbox_id": {
|
|
2725
2841
|
"description": "Shared inbox ids, resolved to bucket ids the same way `threads:search` resolves them.",
|
|
2726
2842
|
"oneOf": [
|
|
@@ -2751,7 +2867,7 @@
|
|
|
2751
2867
|
"organization",
|
|
2752
2868
|
"user"
|
|
2753
2869
|
],
|
|
2754
|
-
"description": "Which read state to count against
|
|
2870
|
+
"description": "Which read state to count against \u2014 the org's or the calling user's. Same meaning as\n`getUnread`'s path parameter, and unrelated to a scope's `type`.\n"
|
|
2755
2871
|
},
|
|
2756
2872
|
"email_filter": {
|
|
2757
2873
|
"type": "array",
|
|
@@ -2760,6 +2876,13 @@
|
|
|
2760
2876
|
},
|
|
2761
2877
|
"description": "Restrict every scope to messages involving these addresses."
|
|
2762
2878
|
},
|
|
2879
|
+
"user_groups": {
|
|
2880
|
+
"type": "array",
|
|
2881
|
+
"items": {
|
|
2882
|
+
"type": "string"
|
|
2883
|
+
},
|
|
2884
|
+
"description": "The caller's group ids, as `group_<id>`, with the same meaning and constraints as on\n`threads:search`. Read only when a scope carries a `view`. Entries not matching\n`group_<id>` are dropped. Not an authorization input.\n"
|
|
2885
|
+
},
|
|
2763
2886
|
"scopes": {
|
|
2764
2887
|
"type": "array",
|
|
2765
2888
|
"minItems": 1,
|
|
@@ -2791,7 +2914,7 @@
|
|
|
2791
2914
|
},
|
|
2792
2915
|
"omitted": {
|
|
2793
2916
|
"type": "array",
|
|
2794
|
-
"description": "Names of scopes that were accepted but could not be counted
|
|
2917
|
+
"description": "Names of scopes that were accepted but could not be counted. Each appears here and is\nabsent from `counts`, so an omission is distinguishable from a mis-spelled scope name.\n\nCauses, not distinguishable from this field: a `shared_inbox` scope whose ids matched no\nbucket in the organization; a scope with no query to run because compilation is disabled for\nthe organization and no `q` was supplied; and a `view_id` naming a view this organization\ndoes not have or whose stored configuration cannot be read.\n",
|
|
2795
2918
|
"items": {
|
|
2796
2919
|
"type": "string"
|
|
2797
2920
|
}
|
|
@@ -2827,9 +2950,6 @@
|
|
|
2827
2950
|
},
|
|
2828
2951
|
"SearchParamsV2": {
|
|
2829
2952
|
"type": "object",
|
|
2830
|
-
"required": [
|
|
2831
|
-
"q"
|
|
2832
|
-
],
|
|
2833
2953
|
"properties": {
|
|
2834
2954
|
"inbox_id": {
|
|
2835
2955
|
"oneOf": [
|
|
@@ -2852,10 +2972,25 @@
|
|
|
2852
2972
|
]
|
|
2853
2973
|
},
|
|
2854
2974
|
"q": {
|
|
2855
|
-
"description": "Lucene query syntax supported with ElasticSearch",
|
|
2975
|
+
"description": "Lucene query syntax supported with ElasticSearch.\n\nSend this or `view`, not both. At least one is required; a request with neither is refused\nwith a 400. An empty string is accepted and returns no hits.\n",
|
|
2856
2976
|
"type": "string",
|
|
2857
2977
|
"example": "subject:\"Request for solar panel price\" AND _tags:INBOX"
|
|
2858
2978
|
},
|
|
2979
|
+
"view": {
|
|
2980
|
+
"allOf": [
|
|
2981
|
+
{
|
|
2982
|
+
"$ref": "#/components/schemas/ThreadView"
|
|
2983
|
+
}
|
|
2984
|
+
],
|
|
2985
|
+
"description": "A view for the server to compile into the query, instead of supplying `q`. When a view is\npresent and compilation is enabled for the calling organization, the compiled query runs and\n`q` is not consulted.\n\nRead by `threads:search` and `threads:searchIds` only. This schema is shared with\n`messages:search`, which compiles no view and ignores the field, so a request there must\nsupply `q`.\n\nCompilation is enabled per organization by the `message-unread-unified-predicate` feature\nflag. While it is off, `q` runs and a request supplying only a view returns no hits.\n"
|
|
2986
|
+
},
|
|
2987
|
+
"user_groups": {
|
|
2988
|
+
"type": "array",
|
|
2989
|
+
"items": {
|
|
2990
|
+
"type": "string"
|
|
2991
|
+
},
|
|
2992
|
+
"description": "The caller's group ids, as `group_<id>`. Read only when a `view` is compiled, where they\ndetermine the agent mailbox's assignee condition and which shared inboxes, and therefore\nwhich addresses, are reachable. Required for those conditions to be correct, because group\nmembership is not present on the id token this service parses.\n\nEntries not matching `group_<id>` are dropped.\n\nNot an authorization input, and not treated as one: naming groups the caller is not in\nwidens what the response includes, exactly as supplying a broader `q` does. Access control\nis enforced elsewhere.\n"
|
|
2993
|
+
},
|
|
2859
2994
|
"fields": {
|
|
2860
2995
|
"$ref": "#/components/schemas/FieldsParam"
|
|
2861
2996
|
},
|
|
@@ -2913,6 +3048,21 @@
|
|
|
2913
3048
|
"SearchIDParams": {
|
|
2914
3049
|
"type": "object",
|
|
2915
3050
|
"properties": {
|
|
3051
|
+
"view": {
|
|
3052
|
+
"allOf": [
|
|
3053
|
+
{
|
|
3054
|
+
"$ref": "#/components/schemas/ThreadView"
|
|
3055
|
+
}
|
|
3056
|
+
],
|
|
3057
|
+
"description": "The view to compile, with the same meaning as on `threads:search`. Present here because\nthis endpoint returns the ordered id set *for that list*: if one compiled its view and the\nother ran an authored `q`, the two would disagree inside a single feature, which is the\ndrift this replaces.\n"
|
|
3058
|
+
},
|
|
3059
|
+
"user_groups": {
|
|
3060
|
+
"type": "array",
|
|
3061
|
+
"items": {
|
|
3062
|
+
"type": "string"
|
|
3063
|
+
},
|
|
3064
|
+
"description": "The caller's group ids, with the same meaning and caveats as on `threads:search`."
|
|
3065
|
+
},
|
|
2916
3066
|
"inbox_id": {
|
|
2917
3067
|
"oneOf": [
|
|
2918
3068
|
{
|
|
@@ -3160,7 +3310,7 @@
|
|
|
3160
3310
|
},
|
|
3161
3311
|
"label_name": {
|
|
3162
3312
|
"type": "string",
|
|
3163
|
-
"description": "Resolved taxonomy classification display name (e.g. `
|
|
3313
|
+
"description": "Resolved taxonomy classification display name (e.g. `Ver\u00e4rgert`), when the label is a classification. Absent for free-form tags."
|
|
3164
3314
|
}
|
|
3165
3315
|
}
|
|
3166
3316
|
},
|
|
@@ -3183,7 +3333,7 @@
|
|
|
3183
3333
|
},
|
|
3184
3334
|
"label_name": {
|
|
3185
3335
|
"type": "string",
|
|
3186
|
-
"description": "Resolved taxonomy classification display name (e.g. `
|
|
3336
|
+
"description": "Resolved taxonomy classification display name (e.g. `Ver\u00e4rgert`), when the label is a classification. Absent for free-form tags."
|
|
3187
3337
|
}
|
|
3188
3338
|
}
|
|
3189
3339
|
},
|
|
@@ -3400,7 +3550,7 @@
|
|
|
3400
3550
|
"timestamp": {
|
|
3401
3551
|
"type": "string",
|
|
3402
3552
|
"description": "Timestamp of the event",
|
|
3403
|
-
"example": "2024-01-01T00:00:
|
|
3553
|
+
"example": "2024-01-01T00:00:00.000Z"
|
|
3404
3554
|
},
|
|
3405
3555
|
"message_id": {
|
|
3406
3556
|
"type": "string",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/ai-agents.json
|
|
4
|
+
var ai_agents_default = '# AI Agents API\n\n- **Base URL:** `https://ai-agents.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/ai-agents](https://docs.epilot.io/api/ai-agents)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.aiAgents.createAgent(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/ai-agents\'\n\nconst aiAgentsClient = getClient()\nauthorize(aiAgentsClient, () => \'<token>\')\nconst { data } = await aiAgentsClient.createAgent(...)\n```\n\n## Operations\n\n**Agents Configuration**\n- [`createAgent`](#createagent)\n- [`listAgents`](#listagents)\n- [`getAgentById`](#getagentbyid)\n- [`updateAgentById`](#updateagentbyid)\n- [`deleteAgentById`](#deleteagentbyid)\n\n**Agent Execution**\n- [`executeAgent`](#executeagent)\n- [`executeAgentStream`](#executeagentstream)\n- [`listExecutions`](#listexecutions)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`getExecutionTrace`](#getexecutiontrace)\n- [`getExecutionFeedback`](#getexecutionfeedback)\n- [`putExecutionFeedback`](#putexecutionfeedback)\n- [`approveExecution`](#approveexecution)\n- [`rejectExecution`](#rejectexecution)\n- [`streamExecution`](#streamexecution)\n\n**Chat**\n- [`chat`](#chat)\n\n**Conversations**\n- [`listConversations`](#listconversations)\n- [`getConversation`](#getconversation)\n- [`deleteConversation`](#deleteconversation)\n- [`submitConversationFeedback`](#submitconversationfeedback)\n\n**Schemas**\n- [`AgentId`](#agentid)\n- [`CreateAgentRequest`](#createagentrequest)\n- [`UpdateAgentRequest`](#updateagentrequest)\n- [`AgentDefinition`](#agentdefinition)\n- [`ListAgentsResponse`](#listagentsresponse)\n- [`ListExecutionsResponse`](#listexecutionsresponse)\n- [`ApproveExecutionRequest`](#approveexecutionrequest)\n- [`RejectExecutionRequest`](#rejectexecutionrequest)\n- [`ExecuteAgentRequest`](#executeagentrequest)\n- [`ExecutionResponse`](#executionresponse)\n- [`ExecutionIterationProjection`](#executioniterationprojection)\n- [`ExecutionFeedback`](#executionfeedback)\n- [`ExecutionFeedbackResponse`](#executionfeedbackresponse)\n- [`PutExecutionFeedbackRequest`](#putexecutionfeedbackrequest)\n- [`ExecutionTrace`](#executiontrace)\n- [`ExecutionIteration`](#executioniteration)\n- [`PendingAction`](#pendingaction)\n- [`ExecutionError`](#executionerror)\n- [`ExecutionMetrics`](#executionmetrics)\n- [`AgentExecutionEventStatus`](#agentexecutioneventstatus)\n- [`AgentExecutionEvent`](#agentexecutionevent)\n- [`ToolPreview`](#toolpreview)\n- [`PreviewActionType`](#previewactiontype)\n- [`PreviewEntity`](#previewentity)\n- [`PreviewChange`](#previewchange)\n- [`PreviewValue`](#previewvalue)\n- [`ToolDefinition`](#tooldefinition)\n- [`SkillCategory`](#skillcategory)\n- [`AgentSource`](#agentsource)\n- [`SkillAvailability`](#skillavailability)\n- [`ExecutionContext`](#executioncontext)\n- [`ExecutionPattern`](#executionpattern)\n- [`ExecutionMode`](#executionmode)\n- [`ExecutionStatus`](#executionstatus)\n- [`ParameterType`](#parametertype)\n- [`InputParameterDefinition`](#inputparameterdefinition)\n- [`InputParametersSchema`](#inputparametersschema)\n- [`ModelConfig`](#modelconfig)\n- [`Error`](#error)\n- [`ChatRequest`](#chatrequest)\n- [`ChatMessage`](#chatmessage)\n- [`StreamingOptions`](#streamingoptions)\n- [`StreamEvent`](#streamevent)\n- [`ExecutionResult`](#executionresult)\n- [`ConversationItem`](#conversationitem)\n- [`MessageItem`](#messageitem)\n- [`MessageFeedback`](#messagefeedback)\n- [`SubmitFeedbackRequest`](#submitfeedbackrequest)\n- [`ListConversationsResponse`](#listconversationsresponse)\n- [`ConversationWithMessages`](#conversationwithmessages)\n\n### `createAgent`\n\nCreates a new custom agent. System skills cannot be created via this endpoint.\n\n`POST /v1/agents`\n\n```ts\nconst { data } = await client.createAgent(\n null,\n {\n name: \'Email Reply Generator\',\n description: \'string\',\n category: \'message\',\n icon: \'mail-reply\',\n system_prompt: \'string\',\n tools: [\'entity.search\', \'message.draft\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 10,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `listAgents`\n\nLists agents from both system skills and custom agents.\nUse query parameters to filter by source, availability, or entity schema.\n\n`GET /v1/agents`\n\n```ts\nconst { data } = await client.listAgents({\n source: \'example\',\n availability: \'example\',\n entity_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agents": [\n {\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getAgentById`\n\nRetrieves an agent by ID. Supports both:\n- System skill IDs (prefixed): "skill:email-categorizer"\n- Custom agent IDs (UUID): "0336a235-9417-4dd8-894c-fe81285bba75"\n\n`GET /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.getAgentById({\n agent_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateAgentById`\n\nUpdates a custom agent. System skills cannot be updated via this endpoint.\n\n`PUT /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.updateAgentById(\n {\n agent_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n category: \'message\',\n icon: \'string\',\n system_prompt: \'string\',\n tools: [\'string\'],\n model_config: {\n model_id: \'anthropic.claude-3-5-sonnet-20241022-v2:0\',\n temperature: 0.7,\n max_tokens: 4096,\n thinking: false,\n thinking_budget: 10000\n },\n max_iterations: 1,\n execution_pattern: \'direct\',\n execution_mode: \'automatic\',\n output_schema: {},\n input_parameters_schema: {\n type: \'object\',\n parameters: [\n {\n name: \'target_schema\',\n label: \'Target Schema\',\n type: \'entity-schema\',\n description: \'Entity type to create\'\n },\n {\n name: \'confidence_threshold\',\n label: \'Confidence Threshold\',\n type: \'number\',\n minimum: 0,\n maximum: 1,\n default: 0.8\n },\n /* ... 1 more */\n ],\n required: [\'target_schema\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "agent_id": "skill:email-categorizer",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "category": "message",\n "icon": "string",\n "source": "system",\n "availability": ["flows", "copilot"],\n "allowed_entity_schemas": ["message"],\n "system_prompt": "string",\n "tools": ["string"],\n "model_config": {\n "model_id": "anthropic.claude-3-5-sonnet-20241022-v2:0",\n "temperature": 0.7,\n "max_tokens": 4096,\n "thinking": false,\n "thinking_budget": 10000\n },\n "max_iterations": 0,\n "execution_pattern": "direct",\n "execution_mode": "automatic",\n "output_schema": {},\n "input_parameters_schema": {\n "type": "object",\n "parameters": [\n {\n "name": "target_schema",\n "label": "Target Schema",\n "type": "entity-schema",\n "description": "Entity type to create"\n },\n {\n "name": "confidence_threshold",\n "label": "Confidence Threshold",\n "type": "number",\n "minimum": 0,\n "maximum": 1,\n "default": 0.8\n }\n ],\n "required": ["target_schema"]\n },\n "version": 0,\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteAgentById`\n\nDeletes a custom agent. System skills cannot be deleted via this endpoint.\n\n`DELETE /v1/agents/{agent_id}`\n\n```ts\nconst { data } = await client.deleteAgentById({\n agent_id: \'example\',\n})\n```\n\n---\n\n### `executeAgent`\n\nExecutes an agent (system skill or custom agent).\nSupports both:\n- System skill IDs (prefixed): "skill:email-categorizer"\n- Custom agent IDs (UUID): "0336a235-9417-4dd8-894c-fe81285bba75"\n\n`POST /v1/agents/{agent_id}/execute`\n\n```ts\nconst { data } = await client.executeAgent(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `executeAgentStream`\n\nExecutes an agent with real-time streaming of tokens and tool events.\nReturns Server-Sent Events (SSE) stream with token-by-token output,\ntool call progress, and completion status.\n\n`POST /v1/agents/{agent_id}/execute/stream`\n\n```ts\nconst { data } = await client.executeAgentStream(\n {\n agent_id: \'example\',\n },\n {\n input: {\n entity_id: \'string\',\n entity_schema: \'string\',\n workflow_id: \'string\',\n workflow_execution_id: \'string\',\n task_id: \'string\',\n custom_data: {},\n flow_context: [\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n }\n ]\n },\n parameters: {},\n execution_mode_override: \'automatic\',\n execution_context: \'flows\',\n callback_url: \'https://example.com/path\',\n timeout_ms: 30000\n },\n)\n```\n\n---\n\n### `listExecutions`\n\nList executions\n\n`GET /v1/executions`\n\n```ts\nconst { data } = await client.listExecutions({\n agent_id: \'example\',\n status: \'example\',\n limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "executions": [\n {\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet execution by ID\n\n`GET /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel execution\n\n`DELETE /v1/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecutionTrace`\n\nReturns the step-by-step reasoning and tool calls for ReAct mode executions. Returns empty iterations array for direct mode executions.\n\n`GET /v1/executions/{execution_id}/trace`\n\n```ts\nconst { data } = await client.getExecutionTrace({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "iterations": [\n {\n "iteration_index": 0,\n "thought": "string",\n "action": {\n "tool": "string",\n "input": {}\n },\n "observation": {},\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tokens_used": 0,\n "latency_ms": 0\n }\n ],\n "total_iterations": 0\n}\n```\n\n</details>\n\n---\n\n### `getExecutionFeedback`\n\nGet execution feedback\n\n`GET /v1/executions/{execution_id}/feedback`\n\n```ts\nconst { data } = await client.getExecutionFeedback({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `putExecutionFeedback`\n\nSubmit execution feedback\n\n`PUT /v1/executions/{execution_id}/feedback`\n\n```ts\nconst { data } = await client.putExecutionFeedback(\n {\n execution_id: \'example\',\n },\n {\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `approveExecution`\n\nApproves a pending tool action when execution is in waiting_approval status\n\n`POST /v1/executions/{execution_id}/approve`\n\n```ts\nconst { data } = await client.approveExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\',\n approved_action_ids: [\'string\'],\n rejected_action_ids: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `rejectExecution`\n\nRejects a pending tool action when execution is in waiting_approval status\n\n`POST /v1/executions/{execution_id}/reject`\n\n```ts\nconst { data } = await client.rejectExecution(\n {\n execution_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "agent_id": "skill:email-categorizer",\n "agent_source": "system",\n "agent_name": "string",\n "execution_context": "flows",\n "org_id": "string",\n "status": "pending",\n "input": {},\n "parameters": {},\n "result": {\n "response": "string",\n "structured_output": {}\n },\n "error": {\n "code": "TIMEOUT",\n "message": "string",\n "details": {}\n },\n "pending_action": {\n "tool": "string",\n "input": {},\n "description": "string",\n "preview": {\n "action": {\n "type": "move",\n "verb": "Move Thread"\n },\n "source": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "target": {\n "type": "inbox",\n "id": "string",\n "name": "Support Inbox",\n "schema": "string",\n "icon": "string",\n "url": "string"\n },\n "changes": [\n {\n "field": "string",\n "label": "string",\n "from": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n },\n "to": {\n "type": "text",\n "value": {},\n "values": ["string"],\n "id": "string",\n "name": "string",\n "schema": "string",\n "color": "success"\n }\n }\n ],\n "metadata": {},\n "summary": "This email discusses solar panel installation and should be handled by the Service team."\n }\n },\n "metrics": {\n "total_tokens": 0,\n "input_tokens": 0,\n "output_tokens": 0,\n "total_cost_usd": 0,\n "duration_ms": 0,\n "iteration_count": 0\n },\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "iterations": [\n {\n "index": 0,\n "tool": "string",\n "status": "running",\n "timestamp": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `streamExecution`\n\nReconnects to an execution\'s event stream after approval. Replays missed events from event log and continues streaming if execution is still running.\n\n`GET /v1/executions/{execution_id}/stream`\n\n```ts\nconst { data } = await client.streamExecution({\n execution_id: \'example\',\n from_sequence: 1,\n})\n```\n\n---\n\n### `chat`\n\nInitiates a streaming chat session with an AI agent. Supports server-side conversation memory via conversationId or client-provided history via clientHistory.\n\n`POST /v1/chat`\n\n```ts\nconst { data } = await client.chat(\n null,\n {\n agentId: \'string\',\n message: \'string\',\n conversationId: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n clientHistory: [\n {\n role: \'user\',\n content: \'string\',\n tool_calls: [\n {\n id: \'string\',\n name: \'string\',\n input: {},\n output: \'string\'\n }\n ]\n }\n ],\n context: {\n entityId: \'string\',\n customData: {}\n },\n streaming: {\n mode: \'updates\',\n streamTokens: false,\n includeMetadata: false\n }\n },\n)\n```\n\n---\n\n### `listConversations`\n\nLists conversations for the authenticated user, sorted by most recent.\n\n`GET /v1/conversations`\n\n```ts\nconst { data } = await client.listConversations({\n agent_id: \'example\',\n limit: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversations": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `getConversation`\n\nRetrieves a conversation and its message history.\n\n`GET /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.getConversation({\n conversation_id: \'example\',\n message_limit: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "conversation": {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "user_id": "string",\n "agent_id": "string",\n "title": "string",\n "message_count": 0,\n "last_message": "string",\n "last_message_at": "1970-01-01T00:00:00.000Z",\n "context": {\n "entityId": "string",\n "customData": {}\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n },\n "messages": [\n {\n "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "role": "user",\n "content": "string",\n "timestamp": "1970-01-01T00:00:00.000Z",\n "tool_calls": [\n {\n "id": "string",\n "name": "string",\n "input": {},\n "output": "string"\n }\n ],\n "token_count": 0,\n "trace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteConversation`\n\nDeletes a conversation and all its messages.\n\n`DELETE /v1/conversations/{conversation_id}`\n\n```ts\nconst { data } = await client.deleteConversation({\n conversation_id: \'example\',\n})\n```\n\n---\n\n### `submitConversationFeedback`\n\nRecords a thumbs up/down (with optional comment) for the assistant turn identified by its Langfuse trace id. The rating is persisted on the message and mirrored to Langfuse as a trace score.\n\n`POST /v1/conversations/{conversation_id}/feedback`\n\n```ts\nconst { data } = await client.submitConversationFeedback(\n {\n conversation_id: \'example\',\n },\n {\n trace_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AgentId`\n\nAgent identifier. Can be either:\n- System skill ID (prefixed): "skill:email-categorizer", "skill:email-labeler"\n- Custom agent UUID: "0336a235-9417-4dd8-894c-fe81285bba75"\n\n\n```ts\ntype AgentId = string\n```\n\n### `CreateAgentRequest`\n\n```ts\ntype CreateAgentRequest = {\n name: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `UpdateAgentRequest`\n\n```ts\ntype UpdateAgentRequest = {\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n}\n```\n\n### `AgentDefinition`\n\n```ts\ntype AgentDefinition = {\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: "object"\n parameters: Array<{\n name: { ... }\n label: { ... }\n type: { ... }\n description?: { ... }\n default?: { ... }\n multi?: { ... }\n dependsOn?: { ... }\n visibleWhen?: { ... }\n enum?: { ... }\n minimum?: { ... }\n maximum?: { ... }\n step?: { ... }\n minLength?: { ... }\n maxLength?: { ... }\n schemaFilter?: { ... }\n attributeTypeFilter?: { ... }\n hidden?: { ... }\n }>\n required?: string[]\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n}\n```\n\n### `ListAgentsResponse`\n\n```ts\ntype ListAgentsResponse = {\n agents?: Array<{\n agent_id?: string\n org_id?: string\n name?: string\n description?: string\n category?: "message" | "entity" | "document" | "classification" | "custom"\n icon?: string\n source?: "system" | "custom"\n availability?: "flows" | "copilot" | "portals" | "all"[]\n allowed_entity_schemas?: string[]\n system_prompt?: string\n tools?: string[]\n model_config?: {\n model_id?: { ... }\n temperature?: { ... }\n max_tokens?: { ... }\n thinking?: { ... }\n thinking_budget?: { ... }\n }\n max_iterations?: number\n execution_pattern?: "direct" | "react"\n execution_mode?: "automatic" | "approval" | "draft"\n output_schema?: object\n input_parameters_schema?: {\n type: { ... }\n parameters: { ... }\n required?: { ... }\n }\n version?: number\n created_at?: string // date-time\n updated_at?: string // date-time\n created_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `ListExecutionsResponse`\n\n```ts\ntype ListExecutionsResponse = {\n executions?: Array<{\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: { ... }\n structured_output?: { ... }\n }\n error?: {\n code?: { ... }\n message?: { ... }\n details?: { ... }\n }\n pending_action?: {\n tool?: { ... }\n input?: { ... }\n description?: { ... }\n preview?: { ... }\n }\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: { ... }\n tool?: { ... }\n status?: { ... }\n timestamp?: { ... }\n }>\n }>\n next_cursor?: string\n}\n```\n\n### `ApproveExecutionRequest`\n\n```ts\ntype ApproveExecutionRequest = {\n reason?: string\n approved_action_ids?: string[]\n rejected_action_ids?: string[]\n}\n```\n\n### `RejectExecutionRequest`\n\n```ts\ntype RejectExecutionRequest = {\n reason: string\n}\n```\n\n### `ExecuteAgentRequest`\n\n```ts\ntype ExecuteAgentRequest = {\n input?: {\n entity_id?: string\n entity_schema?: string\n workflow_id?: string\n workflow_execution_id?: string\n task_id?: string\n custom_data?: Record<string, unknown>\n flow_context?: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }>\n }\n parameters?: Record<string, unknown>\n execution_mode_override?: "automatic" | "approval" | "draft"\n execution_context?: "flows" | "copilot" | "api"\n callback_url?: string // uri\n timeout_ms?: number\n}\n```\n\n### `ExecutionResponse`\n\n```ts\ntype ExecutionResponse = {\n execution_id?: string // uuid\n agent_id?: string\n agent_source?: "system" | "custom"\n agent_name?: string\n execution_context?: "flows" | "copilot" | "api"\n org_id?: string\n status?: "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n input?: object\n parameters?: object\n result?: {\n response?: string\n structured_output?: object\n }\n error?: {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n }\n pending_action?: {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: { ... }\n source?: { ... }\n target?: { ... }\n changes?: { ... }\n metadata?: { ... }\n summary?: { ... }\n }\n }\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n started_at?: string // date-time\n completed_at?: string // date-time\n iterations?: Array<{\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n }>\n}\n```\n\n### `ExecutionIterationProjection`\n\n```ts\ntype ExecutionIterationProjection = {\n index?: number\n tool?: string\n status?: "running" | "completed"\n timestamp?: string // date-time\n}\n```\n\n### `ExecutionFeedback`\n\n```ts\ntype ExecutionFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `ExecutionFeedbackResponse`\n\n```ts\ntype ExecutionFeedbackResponse = {\n feedback: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `PutExecutionFeedbackRequest`\n\n```ts\ntype PutExecutionFeedbackRequest = {\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ExecutionTrace`\n\n```ts\ntype ExecutionTrace = {\n execution_id?: string // uuid\n iterations?: Array<{\n iteration_index?: number\n thought?: string\n action?: {\n tool?: { ... }\n input?: { ... }\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n }>\n total_iterations?: number\n}\n```\n\n### `ExecutionIteration`\n\n```ts\ntype ExecutionIteration = {\n iteration_index?: number\n thought?: string\n action?: {\n tool?: string\n input?: object\n }\n observation?: object\n timestamp?: string // date-time\n tokens_used?: number\n latency_ms?: number\n}\n```\n\n### `PendingAction`\n\nAction waiting for approval (when status=waiting_approval)\n\n```ts\ntype PendingAction = {\n tool?: string\n input?: object\n description?: string\n preview?: {\n action?: {\n type: { ... }\n verb: { ... }\n }\n source?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n target?: {\n type?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n icon?: { ... }\n url?: { ... }\n }\n changes?: Array<{\n field?: { ... }\n label?: { ... }\n from?: { ... }\n to?: { ... }\n }>\n metadata?: Record<string, {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }>\n summary?: string\n }\n}\n```\n\n### `ExecutionError`\n\n```ts\ntype ExecutionError = {\n code?: "TIMEOUT" | "MAX_ITERATIONS_EXCEEDED" | "TOOL_EXECUTION_FAILED" | "LLM_ERROR" | "INVALID_OUTPUT" | "REJECTED" | "INTERNAL_ERROR"\n message?: string\n details?: object\n}\n```\n\n### `ExecutionMetrics`\n\n```ts\ntype ExecutionMetrics = {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n}\n```\n\n### `AgentExecutionEventStatus`\n\nLifecycle status carried on an agent execution event.\n\nDeliberately narrower than `ExecutionStatus`, which is the stored status of\nthe execution row: `pending` and `running` both surface as `started`, and\n`cancelled` surfaces as `failed`. Consumers must not assume the two\nvocabularies are interchang\n\n```ts\ntype AgentExecutionEventStatus = "started" | "completed" | "failed" | "approval_required"\n```\n\n### `AgentExecutionEvent`\n\nDetail payload of the `agent-execution-status-update` event, published on\nthe AI Agents event bus with source `ai-agents`.\n\n`execution_context` and `input` are present on every status, so a consumer\ncan tell whether an execution is theirs, and what it belonged to, from the\nterminal event alone \u2014 wit\n\n```ts\ntype AgentExecutionEvent = {\n executionId: string\n agentId: string\n orgId: string\n userId?: string\n execution_status: "started" | "completed" | "failed" | "approval_required"\n execution_context?: "flows" | "copilot" | "api"\n input?: Record<string, unknown>\n output?: Record<string, unknown>\n error?: {\n message?: string\n code?: string\n stack?: string\n }\n duration?: number\n iterations?: number\n iteration?: number\n message?: string\n toolCalls?: Array<{\n name?: string\n args?: Record<string, unknown>\n }>\n timestamp?: string // date-time\n}\n```\n\n### `ToolPreview`\n\nStructured preview data for approval UI. Provides a generic format that any tool can populate.\n\n```ts\ntype ToolPreview = {\n action?: {\n type: "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n verb: string\n }\n source?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n target?: {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n }\n changes?: Array<{\n field?: string\n label?: string\n from?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n to?: {\n type: { ... }\n value?: { ... }\n values?: { ... }\n id?: { ... }\n name?: { ... }\n schema?: { ... }\n color?: { ... }\n }\n }>\n metadata?: Record<string, {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }>\n summary?: string\n}\n```\n\n### `PreviewActionType`\n\nType of action being previewed\n\n```ts\ntype PreviewActionType = "move" | "create" | "update" | "delete" | "apply" | "send" | "link" | "unlink" | "batch_approval"\n```\n\n### `PreviewEntity`\n\nEntity reference for preview display\n\n```ts\ntype PreviewEntity = {\n type?: string\n id?: string\n name?: string\n schema?: string\n icon?: string\n url?: string\n}\n```\n\n### `PreviewChange`\n\nA single field change in the preview\n\n```ts\ntype PreviewChange = {\n field?: string\n label?: string\n from?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n to?: {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n }\n}\n```\n\n### `PreviewValue`\n\nTyped value for preview display\n\n```ts\ntype PreviewValue = {\n type: "text" | "number" | "boolean" | "list" | "entity" | "badge"\n value?: unknown\n values?: string[]\n id?: string\n name?: string\n schema?: string\n color?: "success" | "warning" | "error" | "info"\n}\n```\n\n### `ToolDefinition`\n\n```ts\ntype ToolDefinition = {\n tool_id?: string\n name?: string\n description?: string\n category?: "entity" | "message" | "taxonomy" | "rag" | "workflow"\n parameters?: object\n returns?: object\n requires_approval?: boolean\n enabled?: boolean\n}\n```\n\n### `SkillCategory`\n\n```ts\ntype SkillCategory = "message" | "entity" | "document" | "classification" | "custom"\n```\n\n### `AgentSource`\n\n- system: Pre-built by epilot (system skills)\n- custom: Created by organization\n\n\n```ts\ntype AgentSource = "system" | "custom"\n```\n\n### `SkillAvailability`\n\nWhere the skill/agent is available:\n- flows: Available in workflow automations\n- copilot: Available as a sub-agent in copilot\n- portals: Available in end-user self-service portals\n- all: Available everywhere\n\n\n```ts\ntype SkillAvailability = "flows" | "copilot" | "portals" | "all"\n```\n\n### `ExecutionContext`\n\nWhere the execution was triggered from:\n- flows: Triggered from workflow automation\n- copilot: Triggered from copilot assistant\n- api: Direct API call\n\n\n```ts\ntype ExecutionContext = "flows" | "copilot" | "api"\n```\n\n### `ExecutionPattern`\n\n- direct: Single LLM call, no tools\n- react: Multi-step reasoning with tool use\n\n\n```ts\ntype ExecutionPattern = "direct" | "react"\n```\n\n### `ExecutionMode`\n\n- automatic: Execute without human intervention\n- approval: Pause for human approval before tool execution\n- draft: Execute but mark output as draft for review\n\n\n```ts\ntype ExecutionMode = "automatic" | "approval" | "draft"\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "running" | "waiting_approval" | "completed" | "failed" | "cancelled"\n```\n\n### `ParameterType`\n\nBase types:\n- text: Text input field\n- textarea: Multi-line text input field\n- number: Numeric input field\n- boolean: Toggle switch\n- select: Dropdown selection (requires enum array)\n\nCustom types (domain-specific):\n- entity-schema: Entity schema selector (fetches from Entity API)\n- entity-attribute\n\n```ts\ntype ParameterType = "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n```\n\n### `InputParameterDefinition`\n\n```ts\ntype InputParameterDefinition = {\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n}\n```\n\n### `InputParametersSchema`\n\n```ts\ntype InputParametersSchema = {\n type: "object"\n parameters: Array<{\n name: string\n label: string\n type: "text" | "textarea" | "number" | "boolean" | "select" | "entity-schema" | "entity-attribute" | "entity-id" | "taxonomy" | "taxonomy-classification" | "shared-inbox" | "label" | "matching-criteria"\n description?: string\n default?: unknown\n multi?: boolean\n dependsOn?: string\n visibleWhen?: Record<string, unknown[]>\n enum?: string[]\n minimum?: number\n maximum?: number\n step?: number\n minLength?: number\n maxLength?: number\n schemaFilter?: string[]\n attributeTypeFilter?: string[]\n hidden?: boolean\n }>\n required?: string[]\n}\n```\n\n### `ModelConfig`\n\n```ts\ntype ModelConfig = {\n model_id?: string\n temperature?: number\n max_tokens?: number\n thinking?: boolean\n thinking_budget?: number\n}\n```\n\n### `Error`\n\n```ts\ntype Error = {\n error?: string\n message?: string\n details?: object\n}\n```\n\n### `ChatRequest`\n\n```ts\ntype ChatRequest = {\n agentId: string\n message: string\n conversationId?: string // uuid\n clientHistory?: Array<{\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n }>\n context?: {\n entityId?: string\n customData?: Record<string, unknown>\n }\n streaming?: {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n }\n}\n```\n\n### `ChatMessage`\n\n```ts\ntype ChatMessage = {\n role: "user" | "assistant" | "tool" | "system"\n content: string\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n}\n```\n\n### `StreamingOptions`\n\n```ts\ntype StreamingOptions = {\n mode?: "updates" | "messages"\n streamTokens?: boolean\n includeMetadata?: boolean\n}\n```\n\n### `StreamEvent`\n\nServer-Sent Event for streaming responses\n\n```ts\ntype StreamEvent = {\n type?: "token" | "agent_step" | "tool_call" | "tool_result" | "complete" | "error" | "metadata" | "needs_approval"\n content?: string\n index?: number\n tool?: string\n input?: object\n output?: string\n callId?: string\n result?: {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: { ... }\n input_tokens?: { ... }\n output_tokens?: { ... }\n total_cost_usd?: { ... }\n duration_ms?: { ... }\n iteration_count?: { ... }\n }\n }\n error?: {\n code?: string\n message?: string\n }\n conversationId?: string // uuid\n}\n```\n\n### `ExecutionResult`\n\n```ts\ntype ExecutionResult = {\n response?: string\n structured_output?: object\n status?: "completed" | "failed" | "max_iterations" | "rejected"\n metrics?: {\n total_tokens?: number\n input_tokens?: number\n output_tokens?: number\n total_cost_usd?: number\n duration_ms?: number\n iteration_count?: number\n }\n}\n```\n\n### `ConversationItem`\n\n```ts\ntype ConversationItem = {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: string\n customData?: object\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `MessageItem`\n\n```ts\ntype MessageItem = {\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: string\n name?: string\n input?: object\n output?: string\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `MessageFeedback`\n\n```ts\ntype MessageFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `SubmitFeedbackRequest`\n\n```ts\ntype SubmitFeedbackRequest = {\n trace_id: string // uuid\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `ListConversationsResponse`\n\n```ts\ntype ListConversationsResponse = {\n conversations?: Array<{\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }>\n next_cursor?: string\n}\n```\n\n### `ConversationWithMessages`\n\n```ts\ntype ConversationWithMessages = {\n conversation?: {\n conversation_id?: string // uuid\n user_id?: string\n agent_id?: string\n title?: string\n message_count?: number\n last_message?: string\n last_message_at?: string // date-time\n context?: {\n entityId?: { ... }\n customData?: { ... }\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n }\n messages?: Array<{\n conversation_id?: string // uuid\n role?: "user" | "assistant" | "tool" | "system"\n content?: string\n timestamp?: string // date-time\n tool_calls?: Array<{\n id?: { ... }\n name?: { ... }\n input?: { ... }\n output?: { ... }\n }>\n token_count?: number\n trace_id?: string // uuid\n feedback?: {\n rating: { ... }\n comment?: { ... }\n user_id: { ... }\n submitted_at: { ... }\n }\n }>\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = ai_agents_default;
|