@app-vitals/agent-lib 1.40.0 → 1.42.0
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/admin-types.ts +477 -0
- package/package.json +1 -1
package/admin-types.ts
CHANGED
|
@@ -3921,6 +3921,417 @@ export interface paths {
|
|
|
3921
3921
|
patch?: never;
|
|
3922
3922
|
trace?: never;
|
|
3923
3923
|
};
|
|
3924
|
+
"/templates": {
|
|
3925
|
+
parameters: {
|
|
3926
|
+
query?: never;
|
|
3927
|
+
header?: never;
|
|
3928
|
+
path?: never;
|
|
3929
|
+
cookie?: never;
|
|
3930
|
+
};
|
|
3931
|
+
/**
|
|
3932
|
+
* List agent templates
|
|
3933
|
+
* @description Platform admins see every template (optionally narrowed by `accountId` / `specialty`); account callers see only their account's. Secret env values are masked as `***`.
|
|
3934
|
+
*/
|
|
3935
|
+
get: {
|
|
3936
|
+
parameters: {
|
|
3937
|
+
query?: {
|
|
3938
|
+
accountId?: string;
|
|
3939
|
+
specialty?: string;
|
|
3940
|
+
};
|
|
3941
|
+
header?: never;
|
|
3942
|
+
path?: never;
|
|
3943
|
+
cookie?: never;
|
|
3944
|
+
};
|
|
3945
|
+
requestBody?: never;
|
|
3946
|
+
responses: {
|
|
3947
|
+
/** @description Templates */
|
|
3948
|
+
200: {
|
|
3949
|
+
headers: {
|
|
3950
|
+
[name: string]: unknown;
|
|
3951
|
+
};
|
|
3952
|
+
content: {
|
|
3953
|
+
"application/json": components["schemas"]["AgentTemplatesList"];
|
|
3954
|
+
};
|
|
3955
|
+
};
|
|
3956
|
+
/** @description Unauthorized */
|
|
3957
|
+
401: {
|
|
3958
|
+
headers: {
|
|
3959
|
+
[name: string]: unknown;
|
|
3960
|
+
};
|
|
3961
|
+
content: {
|
|
3962
|
+
"application/json": components["schemas"]["Error"];
|
|
3963
|
+
};
|
|
3964
|
+
};
|
|
3965
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
3966
|
+
403: {
|
|
3967
|
+
headers: {
|
|
3968
|
+
[name: string]: unknown;
|
|
3969
|
+
};
|
|
3970
|
+
content: {
|
|
3971
|
+
"application/json": components["schemas"]["Error"];
|
|
3972
|
+
};
|
|
3973
|
+
};
|
|
3974
|
+
/** @description Template not found (or not in the caller's account) */
|
|
3975
|
+
404: {
|
|
3976
|
+
headers: {
|
|
3977
|
+
[name: string]: unknown;
|
|
3978
|
+
};
|
|
3979
|
+
content: {
|
|
3980
|
+
"application/json": components["schemas"]["Error"];
|
|
3981
|
+
};
|
|
3982
|
+
};
|
|
3983
|
+
};
|
|
3984
|
+
};
|
|
3985
|
+
/**
|
|
3986
|
+
* Create or replace an agent template
|
|
3987
|
+
* @description Creates the template for the (accountId, specialty) scope, or replaces the items of the existing one (201 / 200). Account callers may only write their own account (403 otherwise); only platform admins write deployment-wide templates. 422 for an unknown specialty, a denylisted env key (per-agent credentials: Slack tokens, GH_TOKEN, Anthropic credentials, task-store URL/token), an invalid item payload, a cron item without a name key, or a duplicate (kind, key). Env values are encrypted at rest; a secret env item sent as `"***"` keeps its stored value.
|
|
3988
|
+
*/
|
|
3989
|
+
put: {
|
|
3990
|
+
parameters: {
|
|
3991
|
+
query?: never;
|
|
3992
|
+
header?: never;
|
|
3993
|
+
path?: never;
|
|
3994
|
+
cookie?: never;
|
|
3995
|
+
};
|
|
3996
|
+
requestBody?: {
|
|
3997
|
+
content: {
|
|
3998
|
+
"application/json": components["schemas"]["PutTemplateBody"];
|
|
3999
|
+
};
|
|
4000
|
+
};
|
|
4001
|
+
responses: {
|
|
4002
|
+
/** @description Template replaced */
|
|
4003
|
+
200: {
|
|
4004
|
+
headers: {
|
|
4005
|
+
[name: string]: unknown;
|
|
4006
|
+
};
|
|
4007
|
+
content: {
|
|
4008
|
+
"application/json": components["schemas"]["AgentTemplate"];
|
|
4009
|
+
};
|
|
4010
|
+
};
|
|
4011
|
+
/** @description Template created */
|
|
4012
|
+
201: {
|
|
4013
|
+
headers: {
|
|
4014
|
+
[name: string]: unknown;
|
|
4015
|
+
};
|
|
4016
|
+
content: {
|
|
4017
|
+
"application/json": components["schemas"]["AgentTemplate"];
|
|
4018
|
+
};
|
|
4019
|
+
};
|
|
4020
|
+
/** @description Bad request */
|
|
4021
|
+
400: {
|
|
4022
|
+
headers: {
|
|
4023
|
+
[name: string]: unknown;
|
|
4024
|
+
};
|
|
4025
|
+
content: {
|
|
4026
|
+
"application/json": components["schemas"]["Error"];
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
/** @description Unauthorized */
|
|
4030
|
+
401: {
|
|
4031
|
+
headers: {
|
|
4032
|
+
[name: string]: unknown;
|
|
4033
|
+
};
|
|
4034
|
+
content: {
|
|
4035
|
+
"application/json": components["schemas"]["Error"];
|
|
4036
|
+
};
|
|
4037
|
+
};
|
|
4038
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
4039
|
+
403: {
|
|
4040
|
+
headers: {
|
|
4041
|
+
[name: string]: unknown;
|
|
4042
|
+
};
|
|
4043
|
+
content: {
|
|
4044
|
+
"application/json": components["schemas"]["Error"];
|
|
4045
|
+
};
|
|
4046
|
+
};
|
|
4047
|
+
/** @description Template not found (or not in the caller's account) */
|
|
4048
|
+
404: {
|
|
4049
|
+
headers: {
|
|
4050
|
+
[name: string]: unknown;
|
|
4051
|
+
};
|
|
4052
|
+
content: {
|
|
4053
|
+
"application/json": components["schemas"]["Error"];
|
|
4054
|
+
};
|
|
4055
|
+
};
|
|
4056
|
+
/** @description Validation failed */
|
|
4057
|
+
422: {
|
|
4058
|
+
headers: {
|
|
4059
|
+
[name: string]: unknown;
|
|
4060
|
+
};
|
|
4061
|
+
content: {
|
|
4062
|
+
"application/json": components["schemas"]["Error"];
|
|
4063
|
+
};
|
|
4064
|
+
};
|
|
4065
|
+
};
|
|
4066
|
+
};
|
|
4067
|
+
post?: never;
|
|
4068
|
+
delete?: never;
|
|
4069
|
+
options?: never;
|
|
4070
|
+
head?: never;
|
|
4071
|
+
patch?: never;
|
|
4072
|
+
trace?: never;
|
|
4073
|
+
};
|
|
4074
|
+
"/templates/{id}": {
|
|
4075
|
+
parameters: {
|
|
4076
|
+
query?: never;
|
|
4077
|
+
header?: never;
|
|
4078
|
+
path?: never;
|
|
4079
|
+
cookie?: never;
|
|
4080
|
+
};
|
|
4081
|
+
/**
|
|
4082
|
+
* Get an agent template
|
|
4083
|
+
* @description Returns the template with its items. Secret env values are masked as `***`; non-secret ones are returned in clear.
|
|
4084
|
+
*/
|
|
4085
|
+
get: {
|
|
4086
|
+
parameters: {
|
|
4087
|
+
query?: never;
|
|
4088
|
+
header?: never;
|
|
4089
|
+
path: {
|
|
4090
|
+
id: string;
|
|
4091
|
+
};
|
|
4092
|
+
cookie?: never;
|
|
4093
|
+
};
|
|
4094
|
+
requestBody?: never;
|
|
4095
|
+
responses: {
|
|
4096
|
+
/** @description Template */
|
|
4097
|
+
200: {
|
|
4098
|
+
headers: {
|
|
4099
|
+
[name: string]: unknown;
|
|
4100
|
+
};
|
|
4101
|
+
content: {
|
|
4102
|
+
"application/json": components["schemas"]["AgentTemplate"];
|
|
4103
|
+
};
|
|
4104
|
+
};
|
|
4105
|
+
/** @description Unauthorized */
|
|
4106
|
+
401: {
|
|
4107
|
+
headers: {
|
|
4108
|
+
[name: string]: unknown;
|
|
4109
|
+
};
|
|
4110
|
+
content: {
|
|
4111
|
+
"application/json": components["schemas"]["Error"];
|
|
4112
|
+
};
|
|
4113
|
+
};
|
|
4114
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
4115
|
+
403: {
|
|
4116
|
+
headers: {
|
|
4117
|
+
[name: string]: unknown;
|
|
4118
|
+
};
|
|
4119
|
+
content: {
|
|
4120
|
+
"application/json": components["schemas"]["Error"];
|
|
4121
|
+
};
|
|
4122
|
+
};
|
|
4123
|
+
/** @description Template not found (or not in the caller's account) */
|
|
4124
|
+
404: {
|
|
4125
|
+
headers: {
|
|
4126
|
+
[name: string]: unknown;
|
|
4127
|
+
};
|
|
4128
|
+
content: {
|
|
4129
|
+
"application/json": components["schemas"]["Error"];
|
|
4130
|
+
};
|
|
4131
|
+
};
|
|
4132
|
+
};
|
|
4133
|
+
};
|
|
4134
|
+
put?: never;
|
|
4135
|
+
post?: never;
|
|
4136
|
+
/**
|
|
4137
|
+
* Delete an agent template
|
|
4138
|
+
* @description Deletes the template and all of its items.
|
|
4139
|
+
*/
|
|
4140
|
+
delete: {
|
|
4141
|
+
parameters: {
|
|
4142
|
+
query?: never;
|
|
4143
|
+
header?: never;
|
|
4144
|
+
path: {
|
|
4145
|
+
id: string;
|
|
4146
|
+
};
|
|
4147
|
+
cookie?: never;
|
|
4148
|
+
};
|
|
4149
|
+
requestBody?: never;
|
|
4150
|
+
responses: {
|
|
4151
|
+
/** @description Template deleted */
|
|
4152
|
+
204: {
|
|
4153
|
+
headers: {
|
|
4154
|
+
[name: string]: unknown;
|
|
4155
|
+
};
|
|
4156
|
+
content?: never;
|
|
4157
|
+
};
|
|
4158
|
+
/** @description Unauthorized */
|
|
4159
|
+
401: {
|
|
4160
|
+
headers: {
|
|
4161
|
+
[name: string]: unknown;
|
|
4162
|
+
};
|
|
4163
|
+
content: {
|
|
4164
|
+
"application/json": components["schemas"]["Error"];
|
|
4165
|
+
};
|
|
4166
|
+
};
|
|
4167
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
4168
|
+
403: {
|
|
4169
|
+
headers: {
|
|
4170
|
+
[name: string]: unknown;
|
|
4171
|
+
};
|
|
4172
|
+
content: {
|
|
4173
|
+
"application/json": components["schemas"]["Error"];
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4176
|
+
/** @description Template not found (or not in the caller's account) */
|
|
4177
|
+
404: {
|
|
4178
|
+
headers: {
|
|
4179
|
+
[name: string]: unknown;
|
|
4180
|
+
};
|
|
4181
|
+
content: {
|
|
4182
|
+
"application/json": components["schemas"]["Error"];
|
|
4183
|
+
};
|
|
4184
|
+
};
|
|
4185
|
+
};
|
|
4186
|
+
};
|
|
4187
|
+
options?: never;
|
|
4188
|
+
head?: never;
|
|
4189
|
+
patch?: never;
|
|
4190
|
+
trace?: never;
|
|
4191
|
+
};
|
|
4192
|
+
"/templates/{id}/items": {
|
|
4193
|
+
parameters: {
|
|
4194
|
+
query?: never;
|
|
4195
|
+
header?: never;
|
|
4196
|
+
path?: never;
|
|
4197
|
+
cookie?: never;
|
|
4198
|
+
};
|
|
4199
|
+
get?: never;
|
|
4200
|
+
/**
|
|
4201
|
+
* Add or replace a template item
|
|
4202
|
+
* @description Upserts one item by (kind, key) without touching the others. Same validation as PUT /templates (422).
|
|
4203
|
+
*/
|
|
4204
|
+
put: {
|
|
4205
|
+
parameters: {
|
|
4206
|
+
query?: never;
|
|
4207
|
+
header?: never;
|
|
4208
|
+
path: {
|
|
4209
|
+
id: string;
|
|
4210
|
+
};
|
|
4211
|
+
cookie?: never;
|
|
4212
|
+
};
|
|
4213
|
+
requestBody?: {
|
|
4214
|
+
content: {
|
|
4215
|
+
"application/json": components["schemas"]["TemplateItemInput"];
|
|
4216
|
+
};
|
|
4217
|
+
};
|
|
4218
|
+
responses: {
|
|
4219
|
+
/** @description Template with the item applied */
|
|
4220
|
+
200: {
|
|
4221
|
+
headers: {
|
|
4222
|
+
[name: string]: unknown;
|
|
4223
|
+
};
|
|
4224
|
+
content: {
|
|
4225
|
+
"application/json": components["schemas"]["AgentTemplate"];
|
|
4226
|
+
};
|
|
4227
|
+
};
|
|
4228
|
+
/** @description Bad request */
|
|
4229
|
+
400: {
|
|
4230
|
+
headers: {
|
|
4231
|
+
[name: string]: unknown;
|
|
4232
|
+
};
|
|
4233
|
+
content: {
|
|
4234
|
+
"application/json": components["schemas"]["Error"];
|
|
4235
|
+
};
|
|
4236
|
+
};
|
|
4237
|
+
/** @description Unauthorized */
|
|
4238
|
+
401: {
|
|
4239
|
+
headers: {
|
|
4240
|
+
[name: string]: unknown;
|
|
4241
|
+
};
|
|
4242
|
+
content: {
|
|
4243
|
+
"application/json": components["schemas"]["Error"];
|
|
4244
|
+
};
|
|
4245
|
+
};
|
|
4246
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
4247
|
+
403: {
|
|
4248
|
+
headers: {
|
|
4249
|
+
[name: string]: unknown;
|
|
4250
|
+
};
|
|
4251
|
+
content: {
|
|
4252
|
+
"application/json": components["schemas"]["Error"];
|
|
4253
|
+
};
|
|
4254
|
+
};
|
|
4255
|
+
/** @description Template not found (or not in the caller's account) */
|
|
4256
|
+
404: {
|
|
4257
|
+
headers: {
|
|
4258
|
+
[name: string]: unknown;
|
|
4259
|
+
};
|
|
4260
|
+
content: {
|
|
4261
|
+
"application/json": components["schemas"]["Error"];
|
|
4262
|
+
};
|
|
4263
|
+
};
|
|
4264
|
+
/** @description Validation failed */
|
|
4265
|
+
422: {
|
|
4266
|
+
headers: {
|
|
4267
|
+
[name: string]: unknown;
|
|
4268
|
+
};
|
|
4269
|
+
content: {
|
|
4270
|
+
"application/json": components["schemas"]["Error"];
|
|
4271
|
+
};
|
|
4272
|
+
};
|
|
4273
|
+
};
|
|
4274
|
+
};
|
|
4275
|
+
post?: never;
|
|
4276
|
+
/**
|
|
4277
|
+
* Remove a template item
|
|
4278
|
+
* @description Removes the item identified by the `kind` and `key` query params (a query rather than a path segment because plugin and tool keys can contain `/`). 404 when it does not exist.
|
|
4279
|
+
*/
|
|
4280
|
+
delete: {
|
|
4281
|
+
parameters: {
|
|
4282
|
+
query: {
|
|
4283
|
+
kind: components["schemas"]["TemplateItemKind"];
|
|
4284
|
+
key: string;
|
|
4285
|
+
};
|
|
4286
|
+
header?: never;
|
|
4287
|
+
path: {
|
|
4288
|
+
id: string;
|
|
4289
|
+
};
|
|
4290
|
+
cookie?: never;
|
|
4291
|
+
};
|
|
4292
|
+
requestBody?: never;
|
|
4293
|
+
responses: {
|
|
4294
|
+
/** @description Item removed */
|
|
4295
|
+
204: {
|
|
4296
|
+
headers: {
|
|
4297
|
+
[name: string]: unknown;
|
|
4298
|
+
};
|
|
4299
|
+
content?: never;
|
|
4300
|
+
};
|
|
4301
|
+
/** @description Unauthorized */
|
|
4302
|
+
401: {
|
|
4303
|
+
headers: {
|
|
4304
|
+
[name: string]: unknown;
|
|
4305
|
+
};
|
|
4306
|
+
content: {
|
|
4307
|
+
"application/json": components["schemas"]["Error"];
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
4310
|
+
/** @description Forbidden (caller has no account, or names another account / the deployment scope) */
|
|
4311
|
+
403: {
|
|
4312
|
+
headers: {
|
|
4313
|
+
[name: string]: unknown;
|
|
4314
|
+
};
|
|
4315
|
+
content: {
|
|
4316
|
+
"application/json": components["schemas"]["Error"];
|
|
4317
|
+
};
|
|
4318
|
+
};
|
|
4319
|
+
/** @description Template not found (or not in the caller's account) */
|
|
4320
|
+
404: {
|
|
4321
|
+
headers: {
|
|
4322
|
+
[name: string]: unknown;
|
|
4323
|
+
};
|
|
4324
|
+
content: {
|
|
4325
|
+
"application/json": components["schemas"]["Error"];
|
|
4326
|
+
};
|
|
4327
|
+
};
|
|
4328
|
+
};
|
|
4329
|
+
};
|
|
4330
|
+
options?: never;
|
|
4331
|
+
head?: never;
|
|
4332
|
+
patch?: never;
|
|
4333
|
+
trace?: never;
|
|
4334
|
+
};
|
|
3924
4335
|
}
|
|
3925
4336
|
export type webhooks = Record<string, never>;
|
|
3926
4337
|
export interface components {
|
|
@@ -5414,6 +5825,72 @@ export interface components {
|
|
|
5414
5825
|
repositorySelection: "all" | "selected" | "none";
|
|
5415
5826
|
repositories?: string[];
|
|
5416
5827
|
};
|
|
5828
|
+
AgentTemplatesList: {
|
|
5829
|
+
templates: components["schemas"]["AgentTemplate"][];
|
|
5830
|
+
};
|
|
5831
|
+
AgentTemplate: {
|
|
5832
|
+
/** @example clx1234567890 */
|
|
5833
|
+
id: string;
|
|
5834
|
+
/** @example null */
|
|
5835
|
+
accountId: string | null;
|
|
5836
|
+
/** @example specialist */
|
|
5837
|
+
specialty: string | null;
|
|
5838
|
+
items: components["schemas"]["TemplateItem"][];
|
|
5839
|
+
/**
|
|
5840
|
+
* Format: date-time
|
|
5841
|
+
* @example 2026-01-01T00:00:00.000Z
|
|
5842
|
+
*/
|
|
5843
|
+
createdAt: string;
|
|
5844
|
+
/**
|
|
5845
|
+
* Format: date-time
|
|
5846
|
+
* @example 2026-01-01T00:00:00.000Z
|
|
5847
|
+
*/
|
|
5848
|
+
updatedAt: string;
|
|
5849
|
+
};
|
|
5850
|
+
TemplateItem: {
|
|
5851
|
+
kind: components["schemas"]["TemplateItemKind"];
|
|
5852
|
+
/**
|
|
5853
|
+
* @description Env var name, tool pattern, plugin name or cron name (cron items need a stable, non-empty name).
|
|
5854
|
+
* @example LINEAR_API_KEY
|
|
5855
|
+
*/
|
|
5856
|
+
key: string;
|
|
5857
|
+
/** @description Secret env values are returned masked as "***". */
|
|
5858
|
+
payload: {
|
|
5859
|
+
[key: string]: unknown;
|
|
5860
|
+
};
|
|
5861
|
+
/**
|
|
5862
|
+
* Format: date-time
|
|
5863
|
+
* @example 2026-01-01T00:00:00.000Z
|
|
5864
|
+
*/
|
|
5865
|
+
updatedAt: string;
|
|
5866
|
+
};
|
|
5867
|
+
/** @enum {string} */
|
|
5868
|
+
TemplateItemKind: "env" | "tool" | "plugin" | "cron";
|
|
5869
|
+
PutTemplateBody: {
|
|
5870
|
+
/** @description Owning account; null or omitted = deployment-wide (platform admins only). Account callers may omit it or send their own account. */
|
|
5871
|
+
accountId?: string | null;
|
|
5872
|
+
/** @description Specialty the template applies to; null = every specialty. */
|
|
5873
|
+
specialty?: string | null;
|
|
5874
|
+
items: components["schemas"]["TemplateItemInput"][];
|
|
5875
|
+
};
|
|
5876
|
+
TemplateItemInput: {
|
|
5877
|
+
kind: components["schemas"]["TemplateItemKind"];
|
|
5878
|
+
/**
|
|
5879
|
+
* @description Env var name, tool pattern, plugin name or cron name (cron items need a stable, non-empty name).
|
|
5880
|
+
* @example LINEAR_API_KEY
|
|
5881
|
+
*/
|
|
5882
|
+
key: string;
|
|
5883
|
+
/**
|
|
5884
|
+
* @description Kind-specific fields. env: {value, secret?}; tool: {enabled?}; plugin: {version?, enabled?}; cron: {schedule, prompt, channel?, user?, silent?, enabled?, preCheck?}.
|
|
5885
|
+
* @example {
|
|
5886
|
+
* "value": "lin_abc",
|
|
5887
|
+
* "secret": true
|
|
5888
|
+
* }
|
|
5889
|
+
*/
|
|
5890
|
+
payload?: {
|
|
5891
|
+
[key: string]: unknown;
|
|
5892
|
+
};
|
|
5893
|
+
};
|
|
5417
5894
|
};
|
|
5418
5895
|
responses: never;
|
|
5419
5896
|
parameters: never;
|