@cubos/agent-sdk 0.0.1151293 → 0.0.1152796
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/admin/ai-providers.d.ts +8 -8
- package/dist/admin/channels.d.ts +24 -0
- package/dist/admin/conversations.d.ts +6 -0
- package/dist/admin/global.d.ts +4 -4
- package/dist/admin/index.d.ts +3 -0
- package/dist/admin/metrics.d.ts +172 -0
- package/dist/generated/schema.d.ts +1023 -56
- package/dist/index.d.ts +1 -0
- package/dist/index.js +71 -3
- package/dist/index.js.map +7 -6
- package/dist/mapping.d.ts +3 -0
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -878,6 +878,189 @@ export interface paths {
|
|
|
878
878
|
patch?: never;
|
|
879
879
|
trace?: never;
|
|
880
880
|
};
|
|
881
|
+
"/api/v1/metrics": {
|
|
882
|
+
parameters: {
|
|
883
|
+
query?: never;
|
|
884
|
+
header?: never;
|
|
885
|
+
path?: never;
|
|
886
|
+
cookie?: never;
|
|
887
|
+
};
|
|
888
|
+
/**
|
|
889
|
+
* Metric catalog, whole instance
|
|
890
|
+
* @description Every metric the instance keeps, with its unit, how it aggregates, the dimensions it can be grouped and filtered by, the finest granularity it is kept at, and whether its history is complete. Root only.
|
|
891
|
+
*/
|
|
892
|
+
get: {
|
|
893
|
+
parameters: {
|
|
894
|
+
query?: never;
|
|
895
|
+
header?: never;
|
|
896
|
+
path?: never;
|
|
897
|
+
cookie?: never;
|
|
898
|
+
};
|
|
899
|
+
requestBody?: never;
|
|
900
|
+
responses: {
|
|
901
|
+
200: {
|
|
902
|
+
headers: {
|
|
903
|
+
[name: string]: unknown;
|
|
904
|
+
};
|
|
905
|
+
content: {
|
|
906
|
+
"application/json": components["schemas"]["MetricsCatalog"];
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
401: {
|
|
910
|
+
headers: {
|
|
911
|
+
[name: string]: unknown;
|
|
912
|
+
};
|
|
913
|
+
content?: never;
|
|
914
|
+
};
|
|
915
|
+
403: {
|
|
916
|
+
headers: {
|
|
917
|
+
[name: string]: unknown;
|
|
918
|
+
};
|
|
919
|
+
content: {
|
|
920
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
put?: never;
|
|
926
|
+
post?: never;
|
|
927
|
+
delete?: never;
|
|
928
|
+
options?: never;
|
|
929
|
+
head?: never;
|
|
930
|
+
patch?: never;
|
|
931
|
+
trace?: never;
|
|
932
|
+
};
|
|
933
|
+
"/api/v1/metrics/dimensions/{dimension}/values": {
|
|
934
|
+
parameters: {
|
|
935
|
+
query?: never;
|
|
936
|
+
header?: never;
|
|
937
|
+
path?: never;
|
|
938
|
+
cookie?: never;
|
|
939
|
+
};
|
|
940
|
+
get?: never;
|
|
941
|
+
put?: never;
|
|
942
|
+
/**
|
|
943
|
+
* Values of a dimension, whole instance
|
|
944
|
+
* @description The values a dimension takes in a slice, ranked by a metric — what a filter can offer given the page's other filters (its own is ignored). Root only.
|
|
945
|
+
*/
|
|
946
|
+
post: {
|
|
947
|
+
parameters: {
|
|
948
|
+
query?: never;
|
|
949
|
+
header?: never;
|
|
950
|
+
path: {
|
|
951
|
+
/** @description The dimension. */
|
|
952
|
+
dimension: components["schemas"]["Dimension"];
|
|
953
|
+
};
|
|
954
|
+
cookie?: never;
|
|
955
|
+
};
|
|
956
|
+
requestBody: {
|
|
957
|
+
content: {
|
|
958
|
+
"application/json": components["schemas"]["DimensionValuesQuery"];
|
|
959
|
+
};
|
|
960
|
+
};
|
|
961
|
+
responses: {
|
|
962
|
+
200: {
|
|
963
|
+
headers: {
|
|
964
|
+
[name: string]: unknown;
|
|
965
|
+
};
|
|
966
|
+
content: {
|
|
967
|
+
"application/json": components["schemas"]["DimensionValues"];
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
400: {
|
|
971
|
+
headers: {
|
|
972
|
+
[name: string]: unknown;
|
|
973
|
+
};
|
|
974
|
+
content: {
|
|
975
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
401: {
|
|
979
|
+
headers: {
|
|
980
|
+
[name: string]: unknown;
|
|
981
|
+
};
|
|
982
|
+
content?: never;
|
|
983
|
+
};
|
|
984
|
+
403: {
|
|
985
|
+
headers: {
|
|
986
|
+
[name: string]: unknown;
|
|
987
|
+
};
|
|
988
|
+
content: {
|
|
989
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
990
|
+
};
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
delete?: never;
|
|
995
|
+
options?: never;
|
|
996
|
+
head?: never;
|
|
997
|
+
patch?: never;
|
|
998
|
+
trace?: never;
|
|
999
|
+
};
|
|
1000
|
+
"/api/v1/metrics/query": {
|
|
1001
|
+
parameters: {
|
|
1002
|
+
query?: never;
|
|
1003
|
+
header?: never;
|
|
1004
|
+
path?: never;
|
|
1005
|
+
cookie?: never;
|
|
1006
|
+
};
|
|
1007
|
+
get?: never;
|
|
1008
|
+
put?: never;
|
|
1009
|
+
/**
|
|
1010
|
+
* Query metrics, whole instance
|
|
1011
|
+
* @description Reads one or more metrics over an interval, optionally bucketed by time and grouped and filtered by dimensions. Values come as a map keyed by metric. With neither `granularity` nor `group_by`, the answer is exactly one row. Root only.
|
|
1012
|
+
*/
|
|
1013
|
+
post: {
|
|
1014
|
+
parameters: {
|
|
1015
|
+
query?: never;
|
|
1016
|
+
header?: never;
|
|
1017
|
+
path?: never;
|
|
1018
|
+
cookie?: never;
|
|
1019
|
+
};
|
|
1020
|
+
requestBody: {
|
|
1021
|
+
content: {
|
|
1022
|
+
"application/json": components["schemas"]["MetricsQuery"];
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
responses: {
|
|
1026
|
+
200: {
|
|
1027
|
+
headers: {
|
|
1028
|
+
[name: string]: unknown;
|
|
1029
|
+
};
|
|
1030
|
+
content: {
|
|
1031
|
+
"application/json": components["schemas"]["MetricsResult"];
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
400: {
|
|
1035
|
+
headers: {
|
|
1036
|
+
[name: string]: unknown;
|
|
1037
|
+
};
|
|
1038
|
+
content: {
|
|
1039
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
401: {
|
|
1043
|
+
headers: {
|
|
1044
|
+
[name: string]: unknown;
|
|
1045
|
+
};
|
|
1046
|
+
content?: never;
|
|
1047
|
+
};
|
|
1048
|
+
403: {
|
|
1049
|
+
headers: {
|
|
1050
|
+
[name: string]: unknown;
|
|
1051
|
+
};
|
|
1052
|
+
content: {
|
|
1053
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
delete?: never;
|
|
1059
|
+
options?: never;
|
|
1060
|
+
head?: never;
|
|
1061
|
+
patch?: never;
|
|
1062
|
+
trace?: never;
|
|
1063
|
+
};
|
|
881
1064
|
"/api/v1/plugins": {
|
|
882
1065
|
parameters: {
|
|
883
1066
|
query?: never;
|
|
@@ -3338,6 +3521,68 @@ export interface paths {
|
|
|
3338
3521
|
patch?: never;
|
|
3339
3522
|
trace?: never;
|
|
3340
3523
|
};
|
|
3524
|
+
"/api/v1/tenants/{tenantSlug}/channel-outbox": {
|
|
3525
|
+
parameters: {
|
|
3526
|
+
query?: never;
|
|
3527
|
+
header?: never;
|
|
3528
|
+
path?: never;
|
|
3529
|
+
cookie?: never;
|
|
3530
|
+
};
|
|
3531
|
+
/**
|
|
3532
|
+
* Channel outbox report
|
|
3533
|
+
* @description One summary per channel of what it has not sent: pending messages (how many, since when, how many are retrying), whether anything is trying to send them (`delivery` — `delivering`, or why not: `disabled`, `runner_disconnected`, `not_paired`, `no_worker`), and what the channel gave up on in the last `days` days with the most recent error. A channel retries a transient failure until the message is `retry_window_seconds` old; a channel that is not delivering makes no attempts, so its queue only waits.
|
|
3534
|
+
*/
|
|
3535
|
+
get: {
|
|
3536
|
+
parameters: {
|
|
3537
|
+
query?: {
|
|
3538
|
+
/** @description How many days of given-up messages to count; clamped to 1..=90, default 7. */
|
|
3539
|
+
days?: number;
|
|
3540
|
+
};
|
|
3541
|
+
header?: never;
|
|
3542
|
+
path: {
|
|
3543
|
+
/** @description Slug of the tenant that owns the channels. */
|
|
3544
|
+
tenantSlug: string;
|
|
3545
|
+
};
|
|
3546
|
+
cookie?: never;
|
|
3547
|
+
};
|
|
3548
|
+
requestBody?: never;
|
|
3549
|
+
responses: {
|
|
3550
|
+
200: {
|
|
3551
|
+
headers: {
|
|
3552
|
+
[name: string]: unknown;
|
|
3553
|
+
};
|
|
3554
|
+
content: {
|
|
3555
|
+
"application/json": components["schemas"]["ChannelOutboxReport"];
|
|
3556
|
+
};
|
|
3557
|
+
};
|
|
3558
|
+
401: {
|
|
3559
|
+
headers: {
|
|
3560
|
+
[name: string]: unknown;
|
|
3561
|
+
};
|
|
3562
|
+
content?: never;
|
|
3563
|
+
};
|
|
3564
|
+
403: {
|
|
3565
|
+
headers: {
|
|
3566
|
+
[name: string]: unknown;
|
|
3567
|
+
};
|
|
3568
|
+
content?: never;
|
|
3569
|
+
};
|
|
3570
|
+
404: {
|
|
3571
|
+
headers: {
|
|
3572
|
+
[name: string]: unknown;
|
|
3573
|
+
};
|
|
3574
|
+
content?: never;
|
|
3575
|
+
};
|
|
3576
|
+
};
|
|
3577
|
+
};
|
|
3578
|
+
put?: never;
|
|
3579
|
+
post?: never;
|
|
3580
|
+
delete?: never;
|
|
3581
|
+
options?: never;
|
|
3582
|
+
head?: never;
|
|
3583
|
+
patch?: never;
|
|
3584
|
+
trace?: never;
|
|
3585
|
+
};
|
|
3341
3586
|
"/api/v1/tenants/{tenantSlug}/channels": {
|
|
3342
3587
|
parameters: {
|
|
3343
3588
|
query?: never;
|
|
@@ -3816,6 +4061,83 @@ export interface paths {
|
|
|
3816
4061
|
patch?: never;
|
|
3817
4062
|
trace?: never;
|
|
3818
4063
|
};
|
|
4064
|
+
"/api/v1/tenants/{tenantSlug}/channels/{slug}/outbox": {
|
|
4065
|
+
parameters: {
|
|
4066
|
+
query?: never;
|
|
4067
|
+
header?: never;
|
|
4068
|
+
path?: never;
|
|
4069
|
+
cookie?: never;
|
|
4070
|
+
};
|
|
4071
|
+
/**
|
|
4072
|
+
* List a channel's unsent messages
|
|
4073
|
+
* @description The channel's outbox summary (as in `GET /channel-outbox`) plus a page of the messages it has not sent, newest first: still pending, or given up on in the last `days` days. Each carries its conversation, a preview of the text (or the file's name, type and size), the attempts so far, the last error, and when the next attempt is due or when the channel gave up.
|
|
4074
|
+
*/
|
|
4075
|
+
get: {
|
|
4076
|
+
parameters: {
|
|
4077
|
+
query?: {
|
|
4078
|
+
/** @description Cursor `<rfc3339>|<uuid>` from a previous page's `next_before`; omit for the first page. */
|
|
4079
|
+
before?: string;
|
|
4080
|
+
/** @description How many days of given-up messages to include; clamped to 1..=90, default 7. */
|
|
4081
|
+
days?: number;
|
|
4082
|
+
/** @description Page size; clamped to 1..=200, default 50. */
|
|
4083
|
+
limit?: number;
|
|
4084
|
+
/** @description `pending`, `failed` or `all` (default). Anything else is 400. */
|
|
4085
|
+
status?: string;
|
|
4086
|
+
};
|
|
4087
|
+
header?: never;
|
|
4088
|
+
path: {
|
|
4089
|
+
/** @description Slug of the channel, unique within the tenant. */
|
|
4090
|
+
slug: string;
|
|
4091
|
+
/** @description Slug of the tenant that owns the channel. */
|
|
4092
|
+
tenantSlug: string;
|
|
4093
|
+
};
|
|
4094
|
+
cookie?: never;
|
|
4095
|
+
};
|
|
4096
|
+
requestBody?: never;
|
|
4097
|
+
responses: {
|
|
4098
|
+
200: {
|
|
4099
|
+
headers: {
|
|
4100
|
+
[name: string]: unknown;
|
|
4101
|
+
};
|
|
4102
|
+
content: {
|
|
4103
|
+
"application/json": components["schemas"]["ChannelOutbox"];
|
|
4104
|
+
};
|
|
4105
|
+
};
|
|
4106
|
+
/** @description Unknown `status` or malformed `before`. */
|
|
4107
|
+
400: {
|
|
4108
|
+
headers: {
|
|
4109
|
+
[name: string]: unknown;
|
|
4110
|
+
};
|
|
4111
|
+
content?: never;
|
|
4112
|
+
};
|
|
4113
|
+
401: {
|
|
4114
|
+
headers: {
|
|
4115
|
+
[name: string]: unknown;
|
|
4116
|
+
};
|
|
4117
|
+
content?: never;
|
|
4118
|
+
};
|
|
4119
|
+
403: {
|
|
4120
|
+
headers: {
|
|
4121
|
+
[name: string]: unknown;
|
|
4122
|
+
};
|
|
4123
|
+
content?: never;
|
|
4124
|
+
};
|
|
4125
|
+
404: {
|
|
4126
|
+
headers: {
|
|
4127
|
+
[name: string]: unknown;
|
|
4128
|
+
};
|
|
4129
|
+
content?: never;
|
|
4130
|
+
};
|
|
4131
|
+
};
|
|
4132
|
+
};
|
|
4133
|
+
put?: never;
|
|
4134
|
+
post?: never;
|
|
4135
|
+
delete?: never;
|
|
4136
|
+
options?: never;
|
|
4137
|
+
head?: never;
|
|
4138
|
+
patch?: never;
|
|
4139
|
+
trace?: never;
|
|
4140
|
+
};
|
|
3819
4141
|
"/api/v1/tenants/{tenantSlug}/channels/{slug}/rotate-secret": {
|
|
3820
4142
|
parameters: {
|
|
3821
4143
|
query?: never;
|
|
@@ -8673,21 +8995,224 @@ export interface paths {
|
|
|
8673
8995
|
};
|
|
8674
8996
|
};
|
|
8675
8997
|
};
|
|
8676
|
-
options?: never;
|
|
8677
|
-
head?: never;
|
|
8998
|
+
options?: never;
|
|
8999
|
+
head?: never;
|
|
9000
|
+
/**
|
|
9001
|
+
* Update MCP skill
|
|
9002
|
+
* @description Patches an MCP-owned skill; only the supplied fields change. Sending `unlocks_tool_ids` replaces the unlock set, and each id must belong to this MCP (else `400`); renaming the slug validates its form, and `409` if a sibling skill of the same MCP already holds it.
|
|
9003
|
+
*/
|
|
9004
|
+
patch: {
|
|
9005
|
+
parameters: {
|
|
9006
|
+
query?: never;
|
|
9007
|
+
header?: never;
|
|
9008
|
+
path: {
|
|
9009
|
+
/** @description Skill slug, unique within the MCP (kebab-case). */
|
|
9010
|
+
skillSlug: string;
|
|
9011
|
+
/** @description MCP slug (kebab-case). */
|
|
9012
|
+
slug: string;
|
|
9013
|
+
/** @description Tenant slug (kebab-case). */
|
|
9014
|
+
tenantSlug: string;
|
|
9015
|
+
};
|
|
9016
|
+
cookie?: never;
|
|
9017
|
+
};
|
|
9018
|
+
requestBody: {
|
|
9019
|
+
content: {
|
|
9020
|
+
"application/json": components["schemas"]["UpdateMcpSkillInput"];
|
|
9021
|
+
};
|
|
9022
|
+
};
|
|
9023
|
+
responses: {
|
|
9024
|
+
200: {
|
|
9025
|
+
headers: {
|
|
9026
|
+
[name: string]: unknown;
|
|
9027
|
+
};
|
|
9028
|
+
content: {
|
|
9029
|
+
"application/json": components["schemas"]["McpSkill"];
|
|
9030
|
+
};
|
|
9031
|
+
};
|
|
9032
|
+
400: {
|
|
9033
|
+
headers: {
|
|
9034
|
+
[name: string]: unknown;
|
|
9035
|
+
};
|
|
9036
|
+
content?: never;
|
|
9037
|
+
};
|
|
9038
|
+
401: {
|
|
9039
|
+
headers: {
|
|
9040
|
+
[name: string]: unknown;
|
|
9041
|
+
};
|
|
9042
|
+
content?: never;
|
|
9043
|
+
};
|
|
9044
|
+
403: {
|
|
9045
|
+
headers: {
|
|
9046
|
+
[name: string]: unknown;
|
|
9047
|
+
};
|
|
9048
|
+
content?: never;
|
|
9049
|
+
};
|
|
9050
|
+
404: {
|
|
9051
|
+
headers: {
|
|
9052
|
+
[name: string]: unknown;
|
|
9053
|
+
};
|
|
9054
|
+
content?: never;
|
|
9055
|
+
};
|
|
9056
|
+
409: {
|
|
9057
|
+
headers: {
|
|
9058
|
+
[name: string]: unknown;
|
|
9059
|
+
};
|
|
9060
|
+
content?: never;
|
|
9061
|
+
};
|
|
9062
|
+
};
|
|
9063
|
+
};
|
|
9064
|
+
trace?: never;
|
|
9065
|
+
};
|
|
9066
|
+
"/api/v1/tenants/{tenantSlug}/mcps/{slug}/tools/{toolName}": {
|
|
9067
|
+
parameters: {
|
|
9068
|
+
query?: never;
|
|
9069
|
+
header?: never;
|
|
9070
|
+
path?: never;
|
|
9071
|
+
cookie?: never;
|
|
9072
|
+
};
|
|
9073
|
+
get?: never;
|
|
9074
|
+
put?: never;
|
|
9075
|
+
post?: never;
|
|
9076
|
+
delete?: never;
|
|
9077
|
+
options?: never;
|
|
9078
|
+
head?: never;
|
|
9079
|
+
/**
|
|
9080
|
+
* Update MCP tool
|
|
9081
|
+
* @description Sets the operator `enabled` switch on one catalog tool and returns the updated tool. `enabled = false` keeps the tool in the catalog while hiding it from agents; the flag survives the tool disappearing and reappearing upstream.
|
|
9082
|
+
*/
|
|
9083
|
+
patch: {
|
|
9084
|
+
parameters: {
|
|
9085
|
+
query?: never;
|
|
9086
|
+
header?: never;
|
|
9087
|
+
path: {
|
|
9088
|
+
/** @description MCP slug (kebab-case). */
|
|
9089
|
+
slug: string;
|
|
9090
|
+
/** @description Tenant slug (kebab-case). */
|
|
9091
|
+
tenantSlug: string;
|
|
9092
|
+
/** @description Tool name as exposed by the MCP server. */
|
|
9093
|
+
toolName: string;
|
|
9094
|
+
};
|
|
9095
|
+
cookie?: never;
|
|
9096
|
+
};
|
|
9097
|
+
requestBody: {
|
|
9098
|
+
content: {
|
|
9099
|
+
"application/json": components["schemas"]["UpdateMcpToolInput"];
|
|
9100
|
+
};
|
|
9101
|
+
};
|
|
9102
|
+
responses: {
|
|
9103
|
+
200: {
|
|
9104
|
+
headers: {
|
|
9105
|
+
[name: string]: unknown;
|
|
9106
|
+
};
|
|
9107
|
+
content: {
|
|
9108
|
+
"application/json": components["schemas"]["McpTool"];
|
|
9109
|
+
};
|
|
9110
|
+
};
|
|
9111
|
+
401: {
|
|
9112
|
+
headers: {
|
|
9113
|
+
[name: string]: unknown;
|
|
9114
|
+
};
|
|
9115
|
+
content?: never;
|
|
9116
|
+
};
|
|
9117
|
+
403: {
|
|
9118
|
+
headers: {
|
|
9119
|
+
[name: string]: unknown;
|
|
9120
|
+
};
|
|
9121
|
+
content?: never;
|
|
9122
|
+
};
|
|
9123
|
+
404: {
|
|
9124
|
+
headers: {
|
|
9125
|
+
[name: string]: unknown;
|
|
9126
|
+
};
|
|
9127
|
+
content?: never;
|
|
9128
|
+
};
|
|
9129
|
+
};
|
|
9130
|
+
};
|
|
9131
|
+
trace?: never;
|
|
9132
|
+
};
|
|
9133
|
+
"/api/v1/tenants/{tenantSlug}/metrics": {
|
|
9134
|
+
parameters: {
|
|
9135
|
+
query?: never;
|
|
9136
|
+
header?: never;
|
|
9137
|
+
path?: never;
|
|
9138
|
+
cookie?: never;
|
|
9139
|
+
};
|
|
9140
|
+
/**
|
|
9141
|
+
* Metric catalog, one tenant
|
|
9142
|
+
* @description The metrics this credential may read on the tenant, in the same shape as `GET /metrics`. Spend metrics need `conversations:read`, which already exposes the cost of every event.
|
|
9143
|
+
*/
|
|
9144
|
+
get: {
|
|
9145
|
+
parameters: {
|
|
9146
|
+
query?: never;
|
|
9147
|
+
header?: never;
|
|
9148
|
+
path: {
|
|
9149
|
+
/** @description Tenant slug (kebab-case). */
|
|
9150
|
+
tenantSlug: string;
|
|
9151
|
+
};
|
|
9152
|
+
cookie?: never;
|
|
9153
|
+
};
|
|
9154
|
+
requestBody?: never;
|
|
9155
|
+
responses: {
|
|
9156
|
+
200: {
|
|
9157
|
+
headers: {
|
|
9158
|
+
[name: string]: unknown;
|
|
9159
|
+
};
|
|
9160
|
+
content: {
|
|
9161
|
+
"application/json": components["schemas"]["MetricsCatalog"];
|
|
9162
|
+
};
|
|
9163
|
+
};
|
|
9164
|
+
401: {
|
|
9165
|
+
headers: {
|
|
9166
|
+
[name: string]: unknown;
|
|
9167
|
+
};
|
|
9168
|
+
content?: never;
|
|
9169
|
+
};
|
|
9170
|
+
403: {
|
|
9171
|
+
headers: {
|
|
9172
|
+
[name: string]: unknown;
|
|
9173
|
+
};
|
|
9174
|
+
content: {
|
|
9175
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9176
|
+
};
|
|
9177
|
+
};
|
|
9178
|
+
404: {
|
|
9179
|
+
headers: {
|
|
9180
|
+
[name: string]: unknown;
|
|
9181
|
+
};
|
|
9182
|
+
content: {
|
|
9183
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9184
|
+
};
|
|
9185
|
+
};
|
|
9186
|
+
};
|
|
9187
|
+
};
|
|
9188
|
+
put?: never;
|
|
9189
|
+
post?: never;
|
|
9190
|
+
delete?: never;
|
|
9191
|
+
options?: never;
|
|
9192
|
+
head?: never;
|
|
9193
|
+
patch?: never;
|
|
9194
|
+
trace?: never;
|
|
9195
|
+
};
|
|
9196
|
+
"/api/v1/tenants/{tenantSlug}/metrics/dimensions/{dimension}/values": {
|
|
9197
|
+
parameters: {
|
|
9198
|
+
query?: never;
|
|
9199
|
+
header?: never;
|
|
9200
|
+
path?: never;
|
|
9201
|
+
cookie?: never;
|
|
9202
|
+
};
|
|
9203
|
+
get?: never;
|
|
9204
|
+
put?: never;
|
|
8678
9205
|
/**
|
|
8679
|
-
*
|
|
8680
|
-
* @description
|
|
9206
|
+
* Values of a dimension, one tenant
|
|
9207
|
+
* @description Same as `POST /metrics/dimensions/{dimension}/values`, scoped to the tenant.
|
|
8681
9208
|
*/
|
|
8682
|
-
|
|
9209
|
+
post: {
|
|
8683
9210
|
parameters: {
|
|
8684
9211
|
query?: never;
|
|
8685
9212
|
header?: never;
|
|
8686
9213
|
path: {
|
|
8687
|
-
/** @description
|
|
8688
|
-
|
|
8689
|
-
/** @description MCP slug (kebab-case). */
|
|
8690
|
-
slug: string;
|
|
9214
|
+
/** @description The dimension. */
|
|
9215
|
+
dimension: components["schemas"]["Dimension"];
|
|
8691
9216
|
/** @description Tenant slug (kebab-case). */
|
|
8692
9217
|
tenantSlug: string;
|
|
8693
9218
|
};
|
|
@@ -8695,7 +9220,7 @@ export interface paths {
|
|
|
8695
9220
|
};
|
|
8696
9221
|
requestBody: {
|
|
8697
9222
|
content: {
|
|
8698
|
-
"application/json": components["schemas"]["
|
|
9223
|
+
"application/json": components["schemas"]["DimensionValuesQuery"];
|
|
8699
9224
|
};
|
|
8700
9225
|
};
|
|
8701
9226
|
responses: {
|
|
@@ -8704,14 +9229,16 @@ export interface paths {
|
|
|
8704
9229
|
[name: string]: unknown;
|
|
8705
9230
|
};
|
|
8706
9231
|
content: {
|
|
8707
|
-
"application/json": components["schemas"]["
|
|
9232
|
+
"application/json": components["schemas"]["DimensionValues"];
|
|
8708
9233
|
};
|
|
8709
9234
|
};
|
|
8710
9235
|
400: {
|
|
8711
9236
|
headers: {
|
|
8712
9237
|
[name: string]: unknown;
|
|
8713
9238
|
};
|
|
8714
|
-
content
|
|
9239
|
+
content: {
|
|
9240
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9241
|
+
};
|
|
8715
9242
|
};
|
|
8716
9243
|
401: {
|
|
8717
9244
|
headers: {
|
|
@@ -8723,25 +9250,27 @@ export interface paths {
|
|
|
8723
9250
|
headers: {
|
|
8724
9251
|
[name: string]: unknown;
|
|
8725
9252
|
};
|
|
8726
|
-
content
|
|
9253
|
+
content: {
|
|
9254
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9255
|
+
};
|
|
8727
9256
|
};
|
|
8728
9257
|
404: {
|
|
8729
9258
|
headers: {
|
|
8730
9259
|
[name: string]: unknown;
|
|
8731
9260
|
};
|
|
8732
|
-
content
|
|
8733
|
-
|
|
8734
|
-
409: {
|
|
8735
|
-
headers: {
|
|
8736
|
-
[name: string]: unknown;
|
|
9261
|
+
content: {
|
|
9262
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
8737
9263
|
};
|
|
8738
|
-
content?: never;
|
|
8739
9264
|
};
|
|
8740
9265
|
};
|
|
8741
9266
|
};
|
|
9267
|
+
delete?: never;
|
|
9268
|
+
options?: never;
|
|
9269
|
+
head?: never;
|
|
9270
|
+
patch?: never;
|
|
8742
9271
|
trace?: never;
|
|
8743
9272
|
};
|
|
8744
|
-
"/api/v1/tenants/{tenantSlug}/
|
|
9273
|
+
"/api/v1/tenants/{tenantSlug}/metrics/query": {
|
|
8745
9274
|
parameters: {
|
|
8746
9275
|
query?: never;
|
|
8747
9276
|
header?: never;
|
|
@@ -8750,31 +9279,23 @@ export interface paths {
|
|
|
8750
9279
|
};
|
|
8751
9280
|
get?: never;
|
|
8752
9281
|
put?: never;
|
|
8753
|
-
post?: never;
|
|
8754
|
-
delete?: never;
|
|
8755
|
-
options?: never;
|
|
8756
|
-
head?: never;
|
|
8757
9282
|
/**
|
|
8758
|
-
*
|
|
8759
|
-
* @description
|
|
9283
|
+
* Query metrics, one tenant
|
|
9284
|
+
* @description The tenant's metrics, in the same shape as `POST /metrics/query`; the `tenant` dimension does not exist here.
|
|
8760
9285
|
*/
|
|
8761
|
-
|
|
9286
|
+
post: {
|
|
8762
9287
|
parameters: {
|
|
8763
9288
|
query?: never;
|
|
8764
9289
|
header?: never;
|
|
8765
9290
|
path: {
|
|
8766
|
-
/** @description MCP slug (kebab-case). */
|
|
8767
|
-
slug: string;
|
|
8768
9291
|
/** @description Tenant slug (kebab-case). */
|
|
8769
9292
|
tenantSlug: string;
|
|
8770
|
-
/** @description Tool name as exposed by the MCP server. */
|
|
8771
|
-
toolName: string;
|
|
8772
9293
|
};
|
|
8773
9294
|
cookie?: never;
|
|
8774
9295
|
};
|
|
8775
9296
|
requestBody: {
|
|
8776
9297
|
content: {
|
|
8777
|
-
"application/json": components["schemas"]["
|
|
9298
|
+
"application/json": components["schemas"]["MetricsQuery"];
|
|
8778
9299
|
};
|
|
8779
9300
|
};
|
|
8780
9301
|
responses: {
|
|
@@ -8783,7 +9304,15 @@ export interface paths {
|
|
|
8783
9304
|
[name: string]: unknown;
|
|
8784
9305
|
};
|
|
8785
9306
|
content: {
|
|
8786
|
-
"application/json": components["schemas"]["
|
|
9307
|
+
"application/json": components["schemas"]["MetricsResult"];
|
|
9308
|
+
};
|
|
9309
|
+
};
|
|
9310
|
+
400: {
|
|
9311
|
+
headers: {
|
|
9312
|
+
[name: string]: unknown;
|
|
9313
|
+
};
|
|
9314
|
+
content: {
|
|
9315
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
8787
9316
|
};
|
|
8788
9317
|
};
|
|
8789
9318
|
401: {
|
|
@@ -8796,16 +9325,24 @@ export interface paths {
|
|
|
8796
9325
|
headers: {
|
|
8797
9326
|
[name: string]: unknown;
|
|
8798
9327
|
};
|
|
8799
|
-
content
|
|
9328
|
+
content: {
|
|
9329
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9330
|
+
};
|
|
8800
9331
|
};
|
|
8801
9332
|
404: {
|
|
8802
9333
|
headers: {
|
|
8803
9334
|
[name: string]: unknown;
|
|
8804
9335
|
};
|
|
8805
|
-
content
|
|
9336
|
+
content: {
|
|
9337
|
+
"application/json": components["schemas"]["MetricsError"];
|
|
9338
|
+
};
|
|
8806
9339
|
};
|
|
8807
9340
|
};
|
|
8808
9341
|
};
|
|
9342
|
+
delete?: never;
|
|
9343
|
+
options?: never;
|
|
9344
|
+
head?: never;
|
|
9345
|
+
patch?: never;
|
|
8809
9346
|
trace?: never;
|
|
8810
9347
|
};
|
|
8811
9348
|
"/api/v1/tenants/{tenantSlug}/scheduled-runs": {
|
|
@@ -11714,6 +12251,13 @@ export interface components {
|
|
|
11714
12251
|
role_slugs: string[];
|
|
11715
12252
|
task_template: components["schemas"]["TaskTemplateRef"];
|
|
11716
12253
|
};
|
|
12254
|
+
/**
|
|
12255
|
+
* @description How a metric combines across rows. Only `sum` exists today; the others are
|
|
12256
|
+
* reserved so a consumer can be written against them now. For anything but
|
|
12257
|
+
* `sum`, adding up rows gives a wrong number — use `totals`.
|
|
12258
|
+
* @enum {string}
|
|
12259
|
+
*/
|
|
12260
|
+
Aggregation: "sum" | "ratio" | "quantile" | "distinct" | "gauge";
|
|
11717
12261
|
AiProvider: {
|
|
11718
12262
|
/**
|
|
11719
12263
|
* @deprecated
|
|
@@ -11752,12 +12296,13 @@ export interface components {
|
|
|
11752
12296
|
shared: boolean;
|
|
11753
12297
|
slug: string;
|
|
11754
12298
|
/**
|
|
11755
|
-
* @description This provider type's token SKU ids →
|
|
11756
|
-
*
|
|
11757
|
-
*
|
|
12299
|
+
* @description This provider type's token SKU ids → class. Lets the chat transcript
|
|
12300
|
+
* split a call's `token_usage` into prompt (cached or not) and completion
|
|
12301
|
+
* (reasoning or not) for a call recorded before calls carried their own
|
|
12302
|
+
* `tokens`. `Other` SKUs are omitted.
|
|
11758
12303
|
*/
|
|
11759
|
-
|
|
11760
|
-
[key: string]: components["schemas"]["
|
|
12304
|
+
token_sku_classes: {
|
|
12305
|
+
[key: string]: components["schemas"]["SkuClass"];
|
|
11761
12306
|
};
|
|
11762
12307
|
/** @description One of the types `GET /ai-provider-types` lists, as declared by `plugin`. */
|
|
11763
12308
|
type: string;
|
|
@@ -11985,6 +12530,40 @@ export interface components {
|
|
|
11985
12530
|
/** @enum {string} */
|
|
11986
12531
|
type: "external";
|
|
11987
12532
|
});
|
|
12533
|
+
ChannelOutbox: {
|
|
12534
|
+
/** Format: int32 */
|
|
12535
|
+
failed_window_days: number;
|
|
12536
|
+
/** @description Newest first. */
|
|
12537
|
+
items: components["schemas"]["OutboxItem"][];
|
|
12538
|
+
/** @description Cursor for the next page (`before`); `null` on the last one. */
|
|
12539
|
+
next_before: string | null;
|
|
12540
|
+
/** Format: int64 */
|
|
12541
|
+
retry_window_seconds: number;
|
|
12542
|
+
summary: components["schemas"]["ChannelOutboxSummary"];
|
|
12543
|
+
};
|
|
12544
|
+
ChannelOutboxReport: {
|
|
12545
|
+
/** @description One entry per channel of the tenant, ordered by slug. */
|
|
12546
|
+
channels: components["schemas"]["ChannelOutboxSummary"][];
|
|
12547
|
+
/**
|
|
12548
|
+
* Format: int32
|
|
12549
|
+
* @description The `days` the `failed` counts cover.
|
|
12550
|
+
*/
|
|
12551
|
+
failed_window_days: number;
|
|
12552
|
+
/**
|
|
12553
|
+
* Format: int64
|
|
12554
|
+
* @description How long a channel keeps retrying a message that fails transiently,
|
|
12555
|
+
* counted from when the message was written. Past it, the next failure
|
|
12556
|
+
* gives up on the message.
|
|
12557
|
+
*/
|
|
12558
|
+
retry_window_seconds: number;
|
|
12559
|
+
};
|
|
12560
|
+
ChannelOutboxSummary: {
|
|
12561
|
+
channel: components["schemas"]["ChannelRef"];
|
|
12562
|
+
delivery: components["schemas"]["OutboxDelivery"];
|
|
12563
|
+
failed: components["schemas"]["OutboxFailedSummary"];
|
|
12564
|
+
pending: components["schemas"]["OutboxPendingSummary"];
|
|
12565
|
+
type: components["schemas"]["ChannelType"];
|
|
12566
|
+
};
|
|
11988
12567
|
/**
|
|
11989
12568
|
* @description Reduced channel reference embedded into other resources' responses (e.g. a conversation's
|
|
11990
12569
|
* originating channel) in place of a bare `channel_id`.
|
|
@@ -12080,6 +12659,23 @@ export interface components {
|
|
|
12080
12659
|
/** Format: uuid */
|
|
12081
12660
|
tool_call_id: string;
|
|
12082
12661
|
};
|
|
12662
|
+
Column: {
|
|
12663
|
+
kind: components["schemas"]["ColumnKind"];
|
|
12664
|
+
name: string;
|
|
12665
|
+
unit: components["schemas"]["Unit"] | null;
|
|
12666
|
+
};
|
|
12667
|
+
/** @enum {string} */
|
|
12668
|
+
ColumnKind: "bucket" | "dimension" | "metric";
|
|
12669
|
+
/** @description Whether the history is all there yet. */
|
|
12670
|
+
Completeness: {
|
|
12671
|
+
/**
|
|
12672
|
+
* Format: date-time
|
|
12673
|
+
* @description Before this instant the history is still being attributed in the
|
|
12674
|
+
* background, so a slice reaching back past it reads low. Absent once it
|
|
12675
|
+
* is all there.
|
|
12676
|
+
*/
|
|
12677
|
+
pending_before: string | null;
|
|
12678
|
+
};
|
|
12083
12679
|
ComponentInput: {
|
|
12084
12680
|
description?: string;
|
|
12085
12681
|
example_mdx?: string;
|
|
@@ -12280,7 +12876,10 @@ export interface components {
|
|
|
12280
12876
|
* The dashboard surfaces it per-item in the event detail view.
|
|
12281
12877
|
*/
|
|
12282
12878
|
cost_usd: number;
|
|
12283
|
-
/**
|
|
12879
|
+
/**
|
|
12880
|
+
* Format: date-time
|
|
12881
|
+
* @description When the row was written: when the core learned of the event.
|
|
12882
|
+
*/
|
|
12284
12883
|
created_at: string;
|
|
12285
12884
|
/**
|
|
12286
12885
|
* Format: date-time
|
|
@@ -12334,6 +12933,14 @@ export interface components {
|
|
|
12334
12933
|
*/
|
|
12335
12934
|
read_at: string | null;
|
|
12336
12935
|
result?: unknown;
|
|
12936
|
+
/**
|
|
12937
|
+
* Format: date-time
|
|
12938
|
+
* @description When the sender sent it, for a `user_message` that came through a
|
|
12939
|
+
* channel carrying a timestamp (WhatsApp). Usually the same minute as
|
|
12940
|
+
* `created_at`; hours earlier for a message recovered after a channel
|
|
12941
|
+
* outage. NULL when the channel carries none — show `created_at` then.
|
|
12942
|
+
*/
|
|
12943
|
+
sent_at: string | null;
|
|
12337
12944
|
/**
|
|
12338
12945
|
* Format: int64
|
|
12339
12946
|
* @description Per-conversation log order (1, 2, 3, …). Stable; not the SSE
|
|
@@ -12918,6 +13525,54 @@ export interface components {
|
|
|
12918
13525
|
/** @description `conversation` (tied to a thread) or `outbound` (proactive send). */
|
|
12919
13526
|
source: string;
|
|
12920
13527
|
};
|
|
13528
|
+
/**
|
|
13529
|
+
* @description What a metric can be grouped and filtered by. One vocabulary for every
|
|
13530
|
+
* metric, so a dimension always means the same id wherever it appears.
|
|
13531
|
+
* @enum {string}
|
|
13532
|
+
*/
|
|
13533
|
+
Dimension: "tenant" | "user" | "agent" | "provider" | "model" | "kind";
|
|
13534
|
+
DimensionInfo: {
|
|
13535
|
+
description: string;
|
|
13536
|
+
id: components["schemas"]["Dimension"];
|
|
13537
|
+
/** @description Its values are ids the query can name with `include: ["labels"]`. */
|
|
13538
|
+
labeled: boolean;
|
|
13539
|
+
};
|
|
13540
|
+
DimensionValue: {
|
|
13541
|
+
label: components["schemas"]["EntityLabel"] | null;
|
|
13542
|
+
metric_value: components["schemas"]["MetricValue"];
|
|
13543
|
+
/** @description The value to filter on; `null` for the rows with none. */
|
|
13544
|
+
value: string | null;
|
|
13545
|
+
};
|
|
13546
|
+
DimensionValues: {
|
|
13547
|
+
next_cursor: string | null;
|
|
13548
|
+
values: components["schemas"]["DimensionValue"][];
|
|
13549
|
+
};
|
|
13550
|
+
DimensionValuesQuery: {
|
|
13551
|
+
cursor?: string | null;
|
|
13552
|
+
/**
|
|
13553
|
+
* @description The other filters of the page; this dimension's own is ignored, so the
|
|
13554
|
+
* list always offers every value the rest of the page allows.
|
|
13555
|
+
*/
|
|
13556
|
+
filters?: {
|
|
13557
|
+
[key: string]: components["schemas"]["FilterSpec"];
|
|
13558
|
+
};
|
|
13559
|
+
/** Format: date-time */
|
|
13560
|
+
from?: string | null;
|
|
13561
|
+
/**
|
|
13562
|
+
* Format: int32
|
|
13563
|
+
* @description 1 to 1 000. Default 100.
|
|
13564
|
+
*/
|
|
13565
|
+
limit?: number | null;
|
|
13566
|
+
/** @description The metric that ranks the values (and that they are counted in). */
|
|
13567
|
+
metric: components["schemas"]["Metric"];
|
|
13568
|
+
/** @description Keep values whose id or name contains this, case-insensitively. */
|
|
13569
|
+
search?: string | null;
|
|
13570
|
+
timezone?: string | null;
|
|
13571
|
+
/** Format: date-time */
|
|
13572
|
+
to?: string | null;
|
|
13573
|
+
};
|
|
13574
|
+
/** @enum {string} */
|
|
13575
|
+
Direction: "asc" | "desc";
|
|
12921
13576
|
DraftAgentConfig: {
|
|
12922
13577
|
agents_md?: string | null;
|
|
12923
13578
|
/**
|
|
@@ -12984,6 +13639,18 @@ export interface components {
|
|
|
12984
13639
|
*/
|
|
12985
13640
|
tags: string[];
|
|
12986
13641
|
};
|
|
13642
|
+
/** @description A name for an id. Which fields are set depends on the dimension. */
|
|
13643
|
+
EntityLabel: {
|
|
13644
|
+
display_name: string | null;
|
|
13645
|
+
/**
|
|
13646
|
+
* @description A user's first channel identity (a phone, a handle): display names are
|
|
13647
|
+
* neither unique nor always set.
|
|
13648
|
+
*/
|
|
13649
|
+
primary_identifier: string | null;
|
|
13650
|
+
/** @description A provider's type (`openai`, `anthropic`, …). */
|
|
13651
|
+
provider_type: string | null;
|
|
13652
|
+
slug: string | null;
|
|
13653
|
+
};
|
|
12987
13654
|
/** @enum {string} */
|
|
12988
13655
|
EventType: "user_message" | "task_prompt" | "agent_directive" | "agent_message" | "agent_file" | "llm_call" | "tool_result" | "turn_done" | "todo_update" | "memory_lookup" | "media_transcription" | "sub_conversation_started" | "sub_conversation_finished" | "eval_subcall_request" | "eval_subcall_result" | "compaction_done" | "filesystem_root" | "harness_error" | "guardrail_verdict" | "client_tool_call" | "title_generated" | "context_update";
|
|
12989
13656
|
ExternalChannel: {
|
|
@@ -13052,6 +13719,19 @@ export interface components {
|
|
|
13052
13719
|
*/
|
|
13053
13720
|
root_event_id: string | null;
|
|
13054
13721
|
};
|
|
13722
|
+
/**
|
|
13723
|
+
* @description The values a dimension is restricted to. A filter selects exactly what it
|
|
13724
|
+
* lists, so one that lists nothing is refused rather than read as "all".
|
|
13725
|
+
*/
|
|
13726
|
+
FilterSpec: {
|
|
13727
|
+
/** @description Ids (or, for `model` and `kind`, the values themselves) to keep. */
|
|
13728
|
+
in?: string[];
|
|
13729
|
+
/**
|
|
13730
|
+
* @description Also keep the rows where the dimension has no value — spend with no
|
|
13731
|
+
* user, a call recorded with no provider.
|
|
13732
|
+
*/
|
|
13733
|
+
none?: boolean;
|
|
13734
|
+
};
|
|
13055
13735
|
/**
|
|
13056
13736
|
* @description Abnormal stop reason. Absent on the happy path; callers distinguish text vs tool calls by
|
|
13057
13737
|
* inspecting `messages`.
|
|
@@ -13074,10 +13754,14 @@ export interface components {
|
|
|
13074
13754
|
permission: string;
|
|
13075
13755
|
tenant_slug: string;
|
|
13076
13756
|
};
|
|
13757
|
+
/** @enum {string} */
|
|
13758
|
+
Granularity: "hour" | "day" | "week" | "month";
|
|
13077
13759
|
Health: {
|
|
13078
13760
|
status: string;
|
|
13079
13761
|
version: string;
|
|
13080
13762
|
};
|
|
13763
|
+
/** @enum {string} */
|
|
13764
|
+
Include: "totals" | "labels";
|
|
13081
13765
|
KnowledgeBase: {
|
|
13082
13766
|
accepts_conversation_sources: boolean;
|
|
13083
13767
|
/** Format: date-time */
|
|
@@ -13259,6 +13943,12 @@ export interface components {
|
|
|
13259
13943
|
token_usage: {
|
|
13260
13944
|
[key: string]: number;
|
|
13261
13945
|
};
|
|
13946
|
+
/**
|
|
13947
|
+
* @description `token_usage` summed by class when the call returned. All zero on
|
|
13948
|
+
* snapshots written before classes existed; their `token_usage` is
|
|
13949
|
+
* still there to classify.
|
|
13950
|
+
*/
|
|
13951
|
+
tokens?: components["schemas"]["TokenCounts"];
|
|
13262
13952
|
};
|
|
13263
13953
|
Mcp: {
|
|
13264
13954
|
/** Format: date-time */
|
|
@@ -13466,6 +14156,127 @@ export interface components {
|
|
|
13466
14156
|
/** @enum {string} */
|
|
13467
14157
|
type: "tool_result";
|
|
13468
14158
|
};
|
|
14159
|
+
/** @enum {string} */
|
|
14160
|
+
Metric: "cost_usd" | "calls" | "input_tokens" | "cached_input_tokens" | "cache_write_tokens" | "output_tokens" | "reasoning_tokens" | "unclassified_tokens";
|
|
14161
|
+
MetricInfo: {
|
|
14162
|
+
aggregation: components["schemas"]["Aggregation"];
|
|
14163
|
+
completeness: components["schemas"]["Completeness"];
|
|
14164
|
+
description: string;
|
|
14165
|
+
/** @description What it can be grouped and filtered by. */
|
|
14166
|
+
dimensions: components["schemas"]["Dimension"][];
|
|
14167
|
+
id: components["schemas"]["Metric"];
|
|
14168
|
+
/** @description The finest granularity a series of it can be cut at. */
|
|
14169
|
+
min_granularity: components["schemas"]["Granularity"];
|
|
14170
|
+
unit: components["schemas"]["Unit"];
|
|
14171
|
+
};
|
|
14172
|
+
MetricsCatalog: {
|
|
14173
|
+
/** @description Every dimension a metric here accepts. */
|
|
14174
|
+
dimensions: components["schemas"]["DimensionInfo"][];
|
|
14175
|
+
/** @description The metrics the credential may read in this scope. */
|
|
14176
|
+
metrics: components["schemas"]["MetricInfo"][];
|
|
14177
|
+
};
|
|
14178
|
+
/**
|
|
14179
|
+
* @description A refused request: a stable code, a sentence, and where in the request the
|
|
14180
|
+
* problem is — so a consumer can point at the field rather than parse prose.
|
|
14181
|
+
*/
|
|
14182
|
+
MetricsError: {
|
|
14183
|
+
error: string;
|
|
14184
|
+
/** @description Path into the request body (`metrics[1]`, `filters.user.in[0]`). */
|
|
14185
|
+
field: string | null;
|
|
14186
|
+
message: string;
|
|
14187
|
+
};
|
|
14188
|
+
/**
|
|
14189
|
+
* @description A metric as asked for: its id, or an object naming it plus parameters.
|
|
14190
|
+
* No metric takes parameters yet; the object form is accepted now so a
|
|
14191
|
+
* parameterised one (a quantile, say) is not a new request shape.
|
|
14192
|
+
*/
|
|
14193
|
+
MetricSpec: components["schemas"]["Metric"] | (Record<string, unknown> & {
|
|
14194
|
+
id: components["schemas"]["Metric"];
|
|
14195
|
+
});
|
|
14196
|
+
MetricsQuery: {
|
|
14197
|
+
/** @description `next_cursor` of the previous page, sent with the same query. */
|
|
14198
|
+
cursor?: string | null;
|
|
14199
|
+
/** @description Per dimension, the values to keep. */
|
|
14200
|
+
filters?: {
|
|
14201
|
+
[key: string]: components["schemas"]["FilterSpec"];
|
|
14202
|
+
};
|
|
14203
|
+
/**
|
|
14204
|
+
* Format: date-time
|
|
14205
|
+
* @description Start of the slice, inclusive. Rounded down to the hour, since metrics
|
|
14206
|
+
* are kept per hour. Default: 30 days before `to`.
|
|
14207
|
+
*/
|
|
14208
|
+
from?: string | null;
|
|
14209
|
+
granularity?: components["schemas"]["Granularity"] | null;
|
|
14210
|
+
group_by?: components["schemas"]["Dimension"][];
|
|
14211
|
+
include?: components["schemas"]["Include"][];
|
|
14212
|
+
/**
|
|
14213
|
+
* Format: int32
|
|
14214
|
+
* @description Rows per page, 1 to 10 000. Default 1 000.
|
|
14215
|
+
*/
|
|
14216
|
+
limit?: number | null;
|
|
14217
|
+
/** @description One or more metrics, by id or as `{ "id": … }`. */
|
|
14218
|
+
metrics: components["schemas"]["MetricSpec"][];
|
|
14219
|
+
/**
|
|
14220
|
+
* @description Order within a bucket — rows always go bucket by bucket, oldest first.
|
|
14221
|
+
* Default: the first metric, descending.
|
|
14222
|
+
*/
|
|
14223
|
+
order_by?: components["schemas"]["OrderBy"][];
|
|
14224
|
+
/** @description IANA zone buckets are cut in. Default `UTC`. */
|
|
14225
|
+
timezone?: string | null;
|
|
14226
|
+
/**
|
|
14227
|
+
* Format: date-time
|
|
14228
|
+
* @description End of the slice, exclusive. Rounded up to the hour. Default: the end of
|
|
14229
|
+
* the current hour.
|
|
14230
|
+
*/
|
|
14231
|
+
to?: string | null;
|
|
14232
|
+
};
|
|
14233
|
+
MetricsResult: {
|
|
14234
|
+
/**
|
|
14235
|
+
* @description Every bucket of the slice, empty ones included, in order — present
|
|
14236
|
+
* exactly when the query has a granularity. Rows with no value at all are
|
|
14237
|
+
* omitted, so this is what a chart fills its gaps from.
|
|
14238
|
+
*/
|
|
14239
|
+
buckets: string[] | null;
|
|
14240
|
+
columns: components["schemas"]["Column"][];
|
|
14241
|
+
completeness: components["schemas"]["Completeness"];
|
|
14242
|
+
/**
|
|
14243
|
+
* @description Present with `include: ["labels"]`: per labeled dimension, id → name.
|
|
14244
|
+
* An id with no entry points at a row that was deleted.
|
|
14245
|
+
*/
|
|
14246
|
+
labels: {
|
|
14247
|
+
[key: string]: {
|
|
14248
|
+
[key: string]: components["schemas"]["EntityLabel"];
|
|
14249
|
+
};
|
|
14250
|
+
} | null;
|
|
14251
|
+
/** @description Send it back as `cursor`, with the same query, for the next page. */
|
|
14252
|
+
next_cursor: string | null;
|
|
14253
|
+
query: components["schemas"]["ResolvedQuery"];
|
|
14254
|
+
rows: components["schemas"]["MetricsRow"][];
|
|
14255
|
+
totals: components["schemas"]["MetricsTotals"] | null;
|
|
14256
|
+
};
|
|
14257
|
+
MetricsRow: {
|
|
14258
|
+
/**
|
|
14259
|
+
* Format: date-time
|
|
14260
|
+
* @description Start of the bucket, in the request's zone. Present exactly when the
|
|
14261
|
+
* query has a granularity.
|
|
14262
|
+
*/
|
|
14263
|
+
bucket: string | null;
|
|
14264
|
+
/** @description Every grouped dimension; `null` for the rows where it has no value. */
|
|
14265
|
+
dimensions: {
|
|
14266
|
+
[key: string]: string | null;
|
|
14267
|
+
};
|
|
14268
|
+
/** @description Every requested metric. */
|
|
14269
|
+
values: {
|
|
14270
|
+
[key: string]: components["schemas"]["MetricValue"];
|
|
14271
|
+
};
|
|
14272
|
+
};
|
|
14273
|
+
MetricsTotals: {
|
|
14274
|
+
values: {
|
|
14275
|
+
[key: string]: components["schemas"]["MetricValue"];
|
|
14276
|
+
};
|
|
14277
|
+
};
|
|
14278
|
+
/** @description One value. Integral units come back as integers, money as a float. */
|
|
14279
|
+
MetricValue: number;
|
|
13469
14280
|
/**
|
|
13470
14281
|
* @description `None` ≠ `Some(false)`: the provider didn't expose this signal or our probe was inconclusive.
|
|
13471
14282
|
*
|
|
@@ -13512,6 +14323,115 @@ export interface components {
|
|
|
13512
14323
|
NamedClientToolInput: components["schemas"]["ClientToolInput"] & {
|
|
13513
14324
|
name: string;
|
|
13514
14325
|
};
|
|
14326
|
+
/** @description Order by a requested metric or a grouped dimension. Exactly one of the two. */
|
|
14327
|
+
OrderBy: {
|
|
14328
|
+
dimension?: components["schemas"]["Dimension"] | null;
|
|
14329
|
+
direction?: components["schemas"]["Direction"];
|
|
14330
|
+
metric?: components["schemas"]["Metric"] | null;
|
|
14331
|
+
};
|
|
14332
|
+
/**
|
|
14333
|
+
* @description Whether anything is trying to send this channel's queue right now.
|
|
14334
|
+
* @enum {string}
|
|
14335
|
+
*/
|
|
14336
|
+
OutboxDelivery: "delivering" | "disabled" | "runner_disconnected" | "not_paired" | "no_worker";
|
|
14337
|
+
OutboxFailedSummary: {
|
|
14338
|
+
/**
|
|
14339
|
+
* Format: int64
|
|
14340
|
+
* @description Messages the channel gave up on since `since`: refused outright by the
|
|
14341
|
+
* channel, or still failing past the retry window.
|
|
14342
|
+
*/
|
|
14343
|
+
count: number;
|
|
14344
|
+
/** @description The error recorded on the most recent of them. */
|
|
14345
|
+
last_error: string | null;
|
|
14346
|
+
/**
|
|
14347
|
+
* Format: date-time
|
|
14348
|
+
* @description When the most recent of them was given up on.
|
|
14349
|
+
*/
|
|
14350
|
+
last_failed_at: string | null;
|
|
14351
|
+
/**
|
|
14352
|
+
* Format: date-time
|
|
14353
|
+
* @description Start of the counted window (`days` before the request).
|
|
14354
|
+
*/
|
|
14355
|
+
since: string;
|
|
14356
|
+
};
|
|
14357
|
+
OutboxFile: {
|
|
14358
|
+
filename: string;
|
|
14359
|
+
mime_type: string;
|
|
14360
|
+
/** Format: int64 */
|
|
14361
|
+
size_bytes: number;
|
|
14362
|
+
};
|
|
14363
|
+
OutboxItem: {
|
|
14364
|
+
/**
|
|
14365
|
+
* Format: int32
|
|
14366
|
+
* @description Attempts that failed so far.
|
|
14367
|
+
*/
|
|
14368
|
+
attempts: number;
|
|
14369
|
+
/**
|
|
14370
|
+
* Format: uuid
|
|
14371
|
+
* @description Conversation the message belongs to; `null` for a proactive send.
|
|
14372
|
+
*/
|
|
14373
|
+
conversation_id: string | null;
|
|
14374
|
+
/**
|
|
14375
|
+
* Format: date-time
|
|
14376
|
+
* @description When the message was written.
|
|
14377
|
+
*/
|
|
14378
|
+
created_at: string;
|
|
14379
|
+
/**
|
|
14380
|
+
* Format: date-time
|
|
14381
|
+
* @description Failed only: when the channel gave up on it.
|
|
14382
|
+
*/
|
|
14383
|
+
failed_at: string | null;
|
|
14384
|
+
file: components["schemas"]["OutboxFile"] | null;
|
|
14385
|
+
/**
|
|
14386
|
+
* Format: uuid
|
|
14387
|
+
* @description The event id (`conversation`) or the proactive send's id (`outbound`).
|
|
14388
|
+
*/
|
|
14389
|
+
id: string;
|
|
14390
|
+
/** @description Error of the latest failed attempt. */
|
|
14391
|
+
last_error: string | null;
|
|
14392
|
+
/**
|
|
14393
|
+
* Format: date-time
|
|
14394
|
+
* @description Pending only: when the next attempt is due. `null` means as soon as the
|
|
14395
|
+
* channel gets to it.
|
|
14396
|
+
*/
|
|
14397
|
+
next_attempt_at: string | null;
|
|
14398
|
+
/** @description First 200 characters of the text, or a file's caption. */
|
|
14399
|
+
preview: string | null;
|
|
14400
|
+
/** @description Channel-native recipient (chat id, phone, runner identifier). */
|
|
14401
|
+
recipient: string | null;
|
|
14402
|
+
source: components["schemas"]["OutboxItemSource"];
|
|
14403
|
+
status: components["schemas"]["OutboxItemStatus"];
|
|
14404
|
+
/** @description Display name of the user the message was for, when known. */
|
|
14405
|
+
user_display_name: string | null;
|
|
14406
|
+
};
|
|
14407
|
+
/** @enum {string} */
|
|
14408
|
+
OutboxItemSource: "conversation" | "outbound";
|
|
14409
|
+
/** @enum {string} */
|
|
14410
|
+
OutboxItemStatus: "pending" | "failed";
|
|
14411
|
+
OutboxPendingSummary: {
|
|
14412
|
+
/**
|
|
14413
|
+
* Format: int64
|
|
14414
|
+
* @description Messages waiting to be sent (conversation messages and files, plus
|
|
14415
|
+
* proactive sends such as the approval notice).
|
|
14416
|
+
*/
|
|
14417
|
+
count: number;
|
|
14418
|
+
/**
|
|
14419
|
+
* Format: date-time
|
|
14420
|
+
* @description The soonest scheduled retry, if any is scheduled.
|
|
14421
|
+
*/
|
|
14422
|
+
next_attempt_at: string | null;
|
|
14423
|
+
/**
|
|
14424
|
+
* Format: date-time
|
|
14425
|
+
* @description When the oldest of them was written. `null` when nothing is pending.
|
|
14426
|
+
*/
|
|
14427
|
+
oldest_at: string | null;
|
|
14428
|
+
/**
|
|
14429
|
+
* Format: int64
|
|
14430
|
+
* @description How many of them already failed at least once and are waiting out a
|
|
14431
|
+
* backoff.
|
|
14432
|
+
*/
|
|
14433
|
+
retrying: number;
|
|
14434
|
+
};
|
|
13515
14435
|
/**
|
|
13516
14436
|
* @description One citation note, already parsed.
|
|
13517
14437
|
*
|
|
@@ -13681,6 +14601,22 @@ export interface components {
|
|
|
13681
14601
|
ReplaceClientToolsInput: {
|
|
13682
14602
|
tools: components["schemas"]["NamedClientToolInput"][];
|
|
13683
14603
|
};
|
|
14604
|
+
/**
|
|
14605
|
+
* @description The query as it was answered: defaults filled in and the interval rounded
|
|
14606
|
+
* to whole hours.
|
|
14607
|
+
*/
|
|
14608
|
+
ResolvedQuery: {
|
|
14609
|
+
/** Format: date-time */
|
|
14610
|
+
from: string;
|
|
14611
|
+
granularity: components["schemas"]["Granularity"] | null;
|
|
14612
|
+
group_by: components["schemas"]["Dimension"][];
|
|
14613
|
+
/** Format: int32 */
|
|
14614
|
+
limit: number;
|
|
14615
|
+
metrics: components["schemas"]["Metric"][];
|
|
14616
|
+
timezone: string;
|
|
14617
|
+
/** Format: date-time */
|
|
14618
|
+
to: string;
|
|
14619
|
+
};
|
|
13684
14620
|
RotatedSecret: {
|
|
13685
14621
|
connection_secret: string;
|
|
13686
14622
|
};
|
|
@@ -13851,24 +14787,19 @@ export interface components {
|
|
|
13851
14787
|
slug: string;
|
|
13852
14788
|
};
|
|
13853
14789
|
/**
|
|
13854
|
-
* @description
|
|
13855
|
-
*
|
|
13856
|
-
*
|
|
13857
|
-
*
|
|
13858
|
-
* `pricing[id] * scale` on display and divides the edited value back
|
|
13859
|
-
* down before persisting. Returned in `Vec` form so providers can
|
|
13860
|
-
* declare a stable display order independent of `HashMap` hashing.
|
|
13861
|
-
* Which side of a call a SKU charges for. Lets the dashboard split a recorded
|
|
13862
|
-
* `token_usage` map into input (↑) and output (↓) totals without hardcoding
|
|
13863
|
-
* SKU ids. SKUs partition the tokens — `input` and `cached_input` are disjoint
|
|
13864
|
-
* slices of the prompt — so summing all `Input` SKUs gives the true input
|
|
13865
|
-
* count with no double-counting.
|
|
14790
|
+
* @description What kind of token a SKU counts, as the plugin serving its type declares
|
|
14791
|
+
* it. SKUs partition a call's tokens — `input` and `cached_input` are disjoint
|
|
14792
|
+
* slices of the prompt — so a class's total is the sum of its SKUs, with no
|
|
14793
|
+
* double counting.
|
|
13866
14794
|
* @enum {string}
|
|
13867
14795
|
*/
|
|
13868
|
-
|
|
14796
|
+
SkuClass: "input" | "cached_input" | "cache_write" | "output" | "reasoning" | "other";
|
|
13869
14797
|
SkuDisplayDto: {
|
|
13870
|
-
/**
|
|
13871
|
-
|
|
14798
|
+
/**
|
|
14799
|
+
* @description What kind of token this SKU counts, or `other` for a charge that is not
|
|
14800
|
+
* a token.
|
|
14801
|
+
*/
|
|
14802
|
+
class: components["schemas"]["SkuClass"];
|
|
13872
14803
|
id: string;
|
|
13873
14804
|
/**
|
|
13874
14805
|
* @description Human-readable label including the implicit unit
|
|
@@ -14059,6 +14990,40 @@ export interface components {
|
|
|
14059
14990
|
permissions: string[];
|
|
14060
14991
|
slug: string;
|
|
14061
14992
|
};
|
|
14993
|
+
/**
|
|
14994
|
+
* @description A call's tokens by class: its `token_usage`, summed per [`SkuClass`] by the
|
|
14995
|
+
* core when the call returns — the one moment the plugin that declared the
|
|
14996
|
+
* classes is certainly running, so a record never depends on that plugin
|
|
14997
|
+
* being up when someone reads it. The fields are disjoint: the prompt is
|
|
14998
|
+
* `input + cached_input + cache_write`, the completion `output + reasoning`.
|
|
14999
|
+
*/
|
|
15000
|
+
TokenCounts: {
|
|
15001
|
+
/**
|
|
15002
|
+
* Format: int64
|
|
15003
|
+
* @default 0
|
|
15004
|
+
*/
|
|
15005
|
+
cache_write: number;
|
|
15006
|
+
/**
|
|
15007
|
+
* Format: int64
|
|
15008
|
+
* @default 0
|
|
15009
|
+
*/
|
|
15010
|
+
cached_input: number;
|
|
15011
|
+
/**
|
|
15012
|
+
* Format: int64
|
|
15013
|
+
* @default 0
|
|
15014
|
+
*/
|
|
15015
|
+
input: number;
|
|
15016
|
+
/**
|
|
15017
|
+
* Format: int64
|
|
15018
|
+
* @default 0
|
|
15019
|
+
*/
|
|
15020
|
+
output: number;
|
|
15021
|
+
/**
|
|
15022
|
+
* Format: int64
|
|
15023
|
+
* @default 0
|
|
15024
|
+
*/
|
|
15025
|
+
reasoning: number;
|
|
15026
|
+
};
|
|
14062
15027
|
/** @enum {string} */
|
|
14063
15028
|
ToolChoice: "auto" | "required" | "none";
|
|
14064
15029
|
/**
|
|
@@ -14097,6 +15062,8 @@ export interface components {
|
|
|
14097
15062
|
has_pending_turn: boolean;
|
|
14098
15063
|
is_processing: boolean;
|
|
14099
15064
|
};
|
|
15065
|
+
/** @enum {string} */
|
|
15066
|
+
Unit: "usd" | "count" | "tokens";
|
|
14100
15067
|
UpdateAgentInput: {
|
|
14101
15068
|
agents_md?: string | null;
|
|
14102
15069
|
/**
|