@app-vitals/agent-admin 0.2.1 → 0.4.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/openapi.json +291 -0
- package/openapi.platform.json +392 -0
- package/package.json +2 -2
- package/prisma/client/browser.ts +15 -0
- package/prisma/client/client.ts +15 -0
- package/prisma/client/internal/class.ts +34 -4
- package/prisma/client/internal/prismaNamespace.ts +273 -1
- package/prisma/client/internal/prismaNamespaceBrowser.ts +47 -0
- package/prisma/client/models/AgentCronJob.ts +107 -1
- package/prisma/client/models/AgentCronRunRequest.ts +1233 -0
- package/prisma/client/models/AgentCronRunTranscript.ts +1339 -0
- package/prisma/client/models/AgentTranscriptRead.ts +1177 -0
- package/prisma/client/models.ts +3 -0
- package/prisma/migrations/20261027000000_add_cron_run_transcripts/migration.sql +37 -0
- package/prisma/migrations/20261028000000_add_cron_run_now/migration.sql +24 -0
- package/prisma/schema/schema.prisma +58 -0
- package/src/admin-boot.ts +18 -0
- package/src/admin-ui.fixtures.ts +2 -0
- package/src/admin-ui.smoke.test.ts +2 -0
- package/src/agent-cron-jobs.unit.test.ts +4 -0
- package/src/agent-cron-run-stats.smoke.test.ts +10 -0
- package/src/agent-cron-runs.integration.test.ts +93 -0
- package/src/agent-cron-runs.ts +47 -15
- package/src/agents-api.smoke.test.ts +18 -0
- package/src/agents-api.ts +30 -0
- package/src/api-auth.ts +1 -0
- package/src/api.smoke.test.ts +39 -0
- package/src/api.ts +15 -0
- package/src/chat.smoke.test.ts +2 -0
- package/src/cron-run-now-config.ts +20 -0
- package/src/cron-run-now-config.unit.test.ts +26 -0
- package/src/cron-run-now.smoke.test.ts +218 -0
- package/src/cron-run-now.ts +207 -0
- package/src/cron-run-transcripts.integration.test.ts +220 -0
- package/src/cron-run-transcripts.smoke.test.ts +286 -0
- package/src/cron-run-transcripts.ts +314 -0
- package/src/errors.ts +7 -0
- package/src/openapi-schemas.ts +78 -0
- package/src/openapi-schemas.unit.test.ts +4 -0
- package/src/transcript-config.ts +19 -0
- package/src/transcript-config.unit.test.ts +32 -0
package/openapi.json
CHANGED
|
@@ -2820,6 +2820,9 @@
|
|
|
2820
2820
|
"deploy": null,
|
|
2821
2821
|
"dev-task": null
|
|
2822
2822
|
}
|
|
2823
|
+
},
|
|
2824
|
+
"features": {
|
|
2825
|
+
"$ref": "#/components/schemas/AgentConfigFeatures"
|
|
2823
2826
|
}
|
|
2824
2827
|
},
|
|
2825
2828
|
"required": [
|
|
@@ -3138,6 +3141,133 @@
|
|
|
3138
3141
|
"createdAt",
|
|
3139
3142
|
"repliedAt"
|
|
3140
3143
|
]
|
|
3144
|
+
},
|
|
3145
|
+
"CronRunTranscriptUploadResult": {
|
|
3146
|
+
"type": "object",
|
|
3147
|
+
"properties": {
|
|
3148
|
+
"runId": {
|
|
3149
|
+
"type": "string",
|
|
3150
|
+
"example": "clx1111111111"
|
|
3151
|
+
},
|
|
3152
|
+
"bytes": {
|
|
3153
|
+
"type": "integer",
|
|
3154
|
+
"example": 2048
|
|
3155
|
+
},
|
|
3156
|
+
"truncated": {
|
|
3157
|
+
"type": "boolean",
|
|
3158
|
+
"example": false
|
|
3159
|
+
},
|
|
3160
|
+
"redactions": {
|
|
3161
|
+
"type": "integer",
|
|
3162
|
+
"example": 0
|
|
3163
|
+
}
|
|
3164
|
+
},
|
|
3165
|
+
"required": [
|
|
3166
|
+
"runId",
|
|
3167
|
+
"bytes",
|
|
3168
|
+
"truncated",
|
|
3169
|
+
"redactions"
|
|
3170
|
+
]
|
|
3171
|
+
},
|
|
3172
|
+
"UploadCronRunTranscriptBody": {
|
|
3173
|
+
"type": "object",
|
|
3174
|
+
"properties": {
|
|
3175
|
+
"sessionId": {
|
|
3176
|
+
"type": "string",
|
|
3177
|
+
"minLength": 1,
|
|
3178
|
+
"description": "Claude session id the transcript was read from.",
|
|
3179
|
+
"example": "7c1c8d1e-0000-4000-8000-000000000000"
|
|
3180
|
+
},
|
|
3181
|
+
"body": {
|
|
3182
|
+
"type": "string",
|
|
3183
|
+
"description": "The already-redacted transcript (JSONL text). Over 1 MiB (UTF-8 bytes) is a 413. Never logged."
|
|
3184
|
+
},
|
|
3185
|
+
"truncated": {
|
|
3186
|
+
"type": "boolean",
|
|
3187
|
+
"description": "True when the runtime dropped earlier lines to fit.",
|
|
3188
|
+
"example": false
|
|
3189
|
+
},
|
|
3190
|
+
"redactions": {
|
|
3191
|
+
"type": "integer",
|
|
3192
|
+
"minimum": 0,
|
|
3193
|
+
"description": "How many secrets the runtime redacted.",
|
|
3194
|
+
"example": 0
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3197
|
+
"required": [
|
|
3198
|
+
"body",
|
|
3199
|
+
"truncated",
|
|
3200
|
+
"redactions"
|
|
3201
|
+
]
|
|
3202
|
+
},
|
|
3203
|
+
"CronRunTranscript": {
|
|
3204
|
+
"type": "object",
|
|
3205
|
+
"properties": {
|
|
3206
|
+
"runId": {
|
|
3207
|
+
"type": "string",
|
|
3208
|
+
"example": "clx1111111111"
|
|
3209
|
+
},
|
|
3210
|
+
"cronId": {
|
|
3211
|
+
"type": "string",
|
|
3212
|
+
"example": "clx0987654321"
|
|
3213
|
+
},
|
|
3214
|
+
"sessionId": {
|
|
3215
|
+
"type": [
|
|
3216
|
+
"string",
|
|
3217
|
+
"null"
|
|
3218
|
+
],
|
|
3219
|
+
"example": null
|
|
3220
|
+
},
|
|
3221
|
+
"bytes": {
|
|
3222
|
+
"type": "integer",
|
|
3223
|
+
"example": 2048
|
|
3224
|
+
},
|
|
3225
|
+
"truncated": {
|
|
3226
|
+
"type": "boolean",
|
|
3227
|
+
"example": false
|
|
3228
|
+
},
|
|
3229
|
+
"redactions": {
|
|
3230
|
+
"type": "integer",
|
|
3231
|
+
"example": 0
|
|
3232
|
+
},
|
|
3233
|
+
"createdAt": {
|
|
3234
|
+
"type": "string",
|
|
3235
|
+
"example": "2026-10-26T12:00:00.000Z"
|
|
3236
|
+
},
|
|
3237
|
+
"body": {
|
|
3238
|
+
"type": "string",
|
|
3239
|
+
"description": "Redacted JSONL transcript."
|
|
3240
|
+
}
|
|
3241
|
+
},
|
|
3242
|
+
"required": [
|
|
3243
|
+
"runId",
|
|
3244
|
+
"cronId",
|
|
3245
|
+
"sessionId",
|
|
3246
|
+
"bytes",
|
|
3247
|
+
"truncated",
|
|
3248
|
+
"redactions",
|
|
3249
|
+
"createdAt",
|
|
3250
|
+
"body"
|
|
3251
|
+
]
|
|
3252
|
+
},
|
|
3253
|
+
"AgentConfigFeatures": {
|
|
3254
|
+
"type": "object",
|
|
3255
|
+
"properties": {
|
|
3256
|
+
"transcriptUpload": {
|
|
3257
|
+
"type": "boolean",
|
|
3258
|
+
"description": "True when SHIPWRIGHT_TRANSCRIPT_API_ENABLED is on: the runtime uploads a redacted transcript after each cron run.",
|
|
3259
|
+
"example": false
|
|
3260
|
+
},
|
|
3261
|
+
"repoAccessCheck": {
|
|
3262
|
+
"type": "boolean",
|
|
3263
|
+
"description": "Reserved for the repo-access check (COS-44.1).",
|
|
3264
|
+
"example": false
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
"required": [
|
|
3268
|
+
"transcriptUpload",
|
|
3269
|
+
"repoAccessCheck"
|
|
3270
|
+
]
|
|
3141
3271
|
}
|
|
3142
3272
|
},
|
|
3143
3273
|
"parameters": {}
|
|
@@ -6092,6 +6222,167 @@
|
|
|
6092
6222
|
}
|
|
6093
6223
|
}
|
|
6094
6224
|
}
|
|
6225
|
+
},
|
|
6226
|
+
"/agents/{id}/crons/{cronId}/runs/{runId}/transcript": {
|
|
6227
|
+
"put": {
|
|
6228
|
+
"summary": "Upload a cron run transcript",
|
|
6229
|
+
"description": "Stores (upserts) the runtime's already-redacted session transcript for a cron run, then keeps only the agent's newest 200 transcripts. Callers: the agent's own key, or `*`. `body` over 1 MiB (UTF-8 bytes) is a 413. 404 unless SHIPWRIGHT_TRANSCRIPT_API_ENABLED is `enabled`, or when the run is not owned by the cron/agent.",
|
|
6230
|
+
"parameters": [
|
|
6231
|
+
{
|
|
6232
|
+
"schema": {
|
|
6233
|
+
"type": "string",
|
|
6234
|
+
"example": "clx1234567890"
|
|
6235
|
+
},
|
|
6236
|
+
"required": true,
|
|
6237
|
+
"name": "id",
|
|
6238
|
+
"in": "path"
|
|
6239
|
+
},
|
|
6240
|
+
{
|
|
6241
|
+
"schema": {
|
|
6242
|
+
"type": "string",
|
|
6243
|
+
"example": "clx0987654321"
|
|
6244
|
+
},
|
|
6245
|
+
"required": true,
|
|
6246
|
+
"name": "cronId",
|
|
6247
|
+
"in": "path"
|
|
6248
|
+
},
|
|
6249
|
+
{
|
|
6250
|
+
"schema": {
|
|
6251
|
+
"type": "string",
|
|
6252
|
+
"example": "clx1111111111"
|
|
6253
|
+
},
|
|
6254
|
+
"required": true,
|
|
6255
|
+
"name": "runId",
|
|
6256
|
+
"in": "path"
|
|
6257
|
+
}
|
|
6258
|
+
],
|
|
6259
|
+
"requestBody": {
|
|
6260
|
+
"content": {
|
|
6261
|
+
"application/json": {
|
|
6262
|
+
"schema": {
|
|
6263
|
+
"$ref": "#/components/schemas/UploadCronRunTranscriptBody"
|
|
6264
|
+
}
|
|
6265
|
+
}
|
|
6266
|
+
}
|
|
6267
|
+
},
|
|
6268
|
+
"responses": {
|
|
6269
|
+
"200": {
|
|
6270
|
+
"description": "Transcript stored",
|
|
6271
|
+
"content": {
|
|
6272
|
+
"application/json": {
|
|
6273
|
+
"schema": {
|
|
6274
|
+
"$ref": "#/components/schemas/CronRunTranscriptUploadResult"
|
|
6275
|
+
}
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
},
|
|
6279
|
+
"400": {
|
|
6280
|
+
"description": "Bad request",
|
|
6281
|
+
"content": {
|
|
6282
|
+
"application/json": {
|
|
6283
|
+
"schema": {
|
|
6284
|
+
"$ref": "#/components/schemas/Error"
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
},
|
|
6289
|
+
"403": {
|
|
6290
|
+
"description": "Caller not allowed",
|
|
6291
|
+
"content": {
|
|
6292
|
+
"application/json": {
|
|
6293
|
+
"schema": {
|
|
6294
|
+
"$ref": "#/components/schemas/Error"
|
|
6295
|
+
}
|
|
6296
|
+
}
|
|
6297
|
+
}
|
|
6298
|
+
},
|
|
6299
|
+
"404": {
|
|
6300
|
+
"description": "Run not found, or transcript API disabled",
|
|
6301
|
+
"content": {
|
|
6302
|
+
"application/json": {
|
|
6303
|
+
"schema": {
|
|
6304
|
+
"$ref": "#/components/schemas/Error"
|
|
6305
|
+
}
|
|
6306
|
+
}
|
|
6307
|
+
}
|
|
6308
|
+
},
|
|
6309
|
+
"413": {
|
|
6310
|
+
"description": "Transcript body over 1 MiB",
|
|
6311
|
+
"content": {
|
|
6312
|
+
"application/json": {
|
|
6313
|
+
"schema": {
|
|
6314
|
+
"$ref": "#/components/schemas/Error"
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
}
|
|
6318
|
+
}
|
|
6319
|
+
}
|
|
6320
|
+
},
|
|
6321
|
+
"get": {
|
|
6322
|
+
"summary": "Get a cron run transcript",
|
|
6323
|
+
"description": "Returns the stored redacted transcript. `*`, `platform.read` and `platform.ops` callers only: an agent key is 403 even for its own runs. Every read writes an AgentTranscriptRead audit row before the response. 404 when SHIPWRIGHT_TRANSCRIPT_API_ENABLED is not `enabled` or no transcript exists.",
|
|
6324
|
+
"parameters": [
|
|
6325
|
+
{
|
|
6326
|
+
"schema": {
|
|
6327
|
+
"type": "string",
|
|
6328
|
+
"example": "clx1234567890"
|
|
6329
|
+
},
|
|
6330
|
+
"required": true,
|
|
6331
|
+
"name": "id",
|
|
6332
|
+
"in": "path"
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
"schema": {
|
|
6336
|
+
"type": "string",
|
|
6337
|
+
"example": "clx0987654321"
|
|
6338
|
+
},
|
|
6339
|
+
"required": true,
|
|
6340
|
+
"name": "cronId",
|
|
6341
|
+
"in": "path"
|
|
6342
|
+
},
|
|
6343
|
+
{
|
|
6344
|
+
"schema": {
|
|
6345
|
+
"type": "string",
|
|
6346
|
+
"example": "clx1111111111"
|
|
6347
|
+
},
|
|
6348
|
+
"required": true,
|
|
6349
|
+
"name": "runId",
|
|
6350
|
+
"in": "path"
|
|
6351
|
+
}
|
|
6352
|
+
],
|
|
6353
|
+
"responses": {
|
|
6354
|
+
"200": {
|
|
6355
|
+
"description": "The transcript",
|
|
6356
|
+
"content": {
|
|
6357
|
+
"application/json": {
|
|
6358
|
+
"schema": {
|
|
6359
|
+
"$ref": "#/components/schemas/CronRunTranscript"
|
|
6360
|
+
}
|
|
6361
|
+
}
|
|
6362
|
+
}
|
|
6363
|
+
},
|
|
6364
|
+
"403": {
|
|
6365
|
+
"description": "Forbidden",
|
|
6366
|
+
"content": {
|
|
6367
|
+
"application/json": {
|
|
6368
|
+
"schema": {
|
|
6369
|
+
"$ref": "#/components/schemas/Error"
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
}
|
|
6373
|
+
},
|
|
6374
|
+
"404": {
|
|
6375
|
+
"description": "No transcript, or transcript API disabled",
|
|
6376
|
+
"content": {
|
|
6377
|
+
"application/json": {
|
|
6378
|
+
"schema": {
|
|
6379
|
+
"$ref": "#/components/schemas/Error"
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6382
|
+
}
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6385
|
+
}
|
|
6095
6386
|
}
|
|
6096
6387
|
},
|
|
6097
6388
|
"webhooks": {}
|