@app-vitals/agent-admin 0.2.1 → 0.3.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 +291 -0
- package/package.json +2 -2
- package/prisma/client/browser.ts +10 -0
- package/prisma/client/client.ts +10 -0
- package/prisma/client/internal/class.ts +24 -4
- package/prisma/client/internal/prismaNamespace.ts +181 -1
- package/prisma/client/internal/prismaNamespaceBrowser.ts +30 -0
- package/prisma/client/models/AgentCronRunTranscript.ts +1339 -0
- package/prisma/client/models/AgentTranscriptRead.ts +1177 -0
- package/prisma/client/models.ts +2 -0
- package/prisma/migrations/20261027000000_add_cron_run_transcripts/migration.sql +37 -0
- package/prisma/schema/schema.prisma +34 -0
- package/src/admin-boot.ts +10 -0
- package/src/agents-api.ts +13 -0
- package/src/api.smoke.test.ts +27 -0
- package/src/api.ts +15 -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 +64 -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": {}
|
package/openapi.platform.json
CHANGED
|
@@ -1994,6 +1994,114 @@
|
|
|
1994
1994
|
"repliedAt"
|
|
1995
1995
|
]
|
|
1996
1996
|
},
|
|
1997
|
+
"CronRunTranscriptUploadResult": {
|
|
1998
|
+
"type": "object",
|
|
1999
|
+
"properties": {
|
|
2000
|
+
"runId": {
|
|
2001
|
+
"type": "string",
|
|
2002
|
+
"example": "clx1111111111"
|
|
2003
|
+
},
|
|
2004
|
+
"bytes": {
|
|
2005
|
+
"type": "integer",
|
|
2006
|
+
"example": 2048
|
|
2007
|
+
},
|
|
2008
|
+
"truncated": {
|
|
2009
|
+
"type": "boolean",
|
|
2010
|
+
"example": false
|
|
2011
|
+
},
|
|
2012
|
+
"redactions": {
|
|
2013
|
+
"type": "integer",
|
|
2014
|
+
"example": 0
|
|
2015
|
+
}
|
|
2016
|
+
},
|
|
2017
|
+
"required": [
|
|
2018
|
+
"runId",
|
|
2019
|
+
"bytes",
|
|
2020
|
+
"truncated",
|
|
2021
|
+
"redactions"
|
|
2022
|
+
]
|
|
2023
|
+
},
|
|
2024
|
+
"UploadCronRunTranscriptBody": {
|
|
2025
|
+
"type": "object",
|
|
2026
|
+
"properties": {
|
|
2027
|
+
"sessionId": {
|
|
2028
|
+
"type": "string",
|
|
2029
|
+
"minLength": 1,
|
|
2030
|
+
"description": "Claude session id the transcript was read from.",
|
|
2031
|
+
"example": "7c1c8d1e-0000-4000-8000-000000000000"
|
|
2032
|
+
},
|
|
2033
|
+
"body": {
|
|
2034
|
+
"type": "string",
|
|
2035
|
+
"description": "The already-redacted transcript (JSONL text). Over 1 MiB (UTF-8 bytes) is a 413. Never logged."
|
|
2036
|
+
},
|
|
2037
|
+
"truncated": {
|
|
2038
|
+
"type": "boolean",
|
|
2039
|
+
"description": "True when the runtime dropped earlier lines to fit.",
|
|
2040
|
+
"example": false
|
|
2041
|
+
},
|
|
2042
|
+
"redactions": {
|
|
2043
|
+
"type": "integer",
|
|
2044
|
+
"minimum": 0,
|
|
2045
|
+
"description": "How many secrets the runtime redacted.",
|
|
2046
|
+
"example": 0
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
"required": [
|
|
2050
|
+
"body",
|
|
2051
|
+
"truncated",
|
|
2052
|
+
"redactions"
|
|
2053
|
+
]
|
|
2054
|
+
},
|
|
2055
|
+
"CronRunTranscript": {
|
|
2056
|
+
"type": "object",
|
|
2057
|
+
"properties": {
|
|
2058
|
+
"runId": {
|
|
2059
|
+
"type": "string",
|
|
2060
|
+
"example": "clx1111111111"
|
|
2061
|
+
},
|
|
2062
|
+
"cronId": {
|
|
2063
|
+
"type": "string",
|
|
2064
|
+
"example": "clx0987654321"
|
|
2065
|
+
},
|
|
2066
|
+
"sessionId": {
|
|
2067
|
+
"type": [
|
|
2068
|
+
"string",
|
|
2069
|
+
"null"
|
|
2070
|
+
],
|
|
2071
|
+
"example": null
|
|
2072
|
+
},
|
|
2073
|
+
"bytes": {
|
|
2074
|
+
"type": "integer",
|
|
2075
|
+
"example": 2048
|
|
2076
|
+
},
|
|
2077
|
+
"truncated": {
|
|
2078
|
+
"type": "boolean",
|
|
2079
|
+
"example": false
|
|
2080
|
+
},
|
|
2081
|
+
"redactions": {
|
|
2082
|
+
"type": "integer",
|
|
2083
|
+
"example": 0
|
|
2084
|
+
},
|
|
2085
|
+
"createdAt": {
|
|
2086
|
+
"type": "string",
|
|
2087
|
+
"example": "2026-10-26T12:00:00.000Z"
|
|
2088
|
+
},
|
|
2089
|
+
"body": {
|
|
2090
|
+
"type": "string",
|
|
2091
|
+
"description": "Redacted JSONL transcript."
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
"required": [
|
|
2095
|
+
"runId",
|
|
2096
|
+
"cronId",
|
|
2097
|
+
"sessionId",
|
|
2098
|
+
"bytes",
|
|
2099
|
+
"truncated",
|
|
2100
|
+
"redactions",
|
|
2101
|
+
"createdAt",
|
|
2102
|
+
"body"
|
|
2103
|
+
]
|
|
2104
|
+
},
|
|
1997
2105
|
"PluginWrapper": {
|
|
1998
2106
|
"type": "object",
|
|
1999
2107
|
"properties": {
|
|
@@ -2895,6 +3003,9 @@
|
|
|
2895
3003
|
"deploy": null,
|
|
2896
3004
|
"dev-task": null
|
|
2897
3005
|
}
|
|
3006
|
+
},
|
|
3007
|
+
"features": {
|
|
3008
|
+
"$ref": "#/components/schemas/AgentConfigFeatures"
|
|
2898
3009
|
}
|
|
2899
3010
|
},
|
|
2900
3011
|
"required": [
|
|
@@ -2932,6 +3043,25 @@
|
|
|
2932
3043
|
"plugin"
|
|
2933
3044
|
]
|
|
2934
3045
|
},
|
|
3046
|
+
"AgentConfigFeatures": {
|
|
3047
|
+
"type": "object",
|
|
3048
|
+
"properties": {
|
|
3049
|
+
"transcriptUpload": {
|
|
3050
|
+
"type": "boolean",
|
|
3051
|
+
"description": "True when SHIPWRIGHT_TRANSCRIPT_API_ENABLED is on: the runtime uploads a redacted transcript after each cron run.",
|
|
3052
|
+
"example": false
|
|
3053
|
+
},
|
|
3054
|
+
"repoAccessCheck": {
|
|
3055
|
+
"type": "boolean",
|
|
3056
|
+
"description": "Reserved for the repo-access check (COS-44.1).",
|
|
3057
|
+
"example": false
|
|
3058
|
+
}
|
|
3059
|
+
},
|
|
3060
|
+
"required": [
|
|
3061
|
+
"transcriptUpload",
|
|
3062
|
+
"repoAccessCheck"
|
|
3063
|
+
]
|
|
3064
|
+
},
|
|
2935
3065
|
"RuntimeError": {
|
|
2936
3066
|
"type": "object",
|
|
2937
3067
|
"properties": {
|
|
@@ -4751,6 +4881,167 @@
|
|
|
4751
4881
|
}
|
|
4752
4882
|
}
|
|
4753
4883
|
},
|
|
4884
|
+
"/agents/{id}/crons/{cronId}/runs/{runId}/transcript": {
|
|
4885
|
+
"put": {
|
|
4886
|
+
"summary": "Upload a cron run transcript",
|
|
4887
|
+
"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.",
|
|
4888
|
+
"parameters": [
|
|
4889
|
+
{
|
|
4890
|
+
"schema": {
|
|
4891
|
+
"type": "string",
|
|
4892
|
+
"example": "clx1234567890"
|
|
4893
|
+
},
|
|
4894
|
+
"required": true,
|
|
4895
|
+
"name": "id",
|
|
4896
|
+
"in": "path"
|
|
4897
|
+
},
|
|
4898
|
+
{
|
|
4899
|
+
"schema": {
|
|
4900
|
+
"type": "string",
|
|
4901
|
+
"example": "clx0987654321"
|
|
4902
|
+
},
|
|
4903
|
+
"required": true,
|
|
4904
|
+
"name": "cronId",
|
|
4905
|
+
"in": "path"
|
|
4906
|
+
},
|
|
4907
|
+
{
|
|
4908
|
+
"schema": {
|
|
4909
|
+
"type": "string",
|
|
4910
|
+
"example": "clx1111111111"
|
|
4911
|
+
},
|
|
4912
|
+
"required": true,
|
|
4913
|
+
"name": "runId",
|
|
4914
|
+
"in": "path"
|
|
4915
|
+
}
|
|
4916
|
+
],
|
|
4917
|
+
"requestBody": {
|
|
4918
|
+
"content": {
|
|
4919
|
+
"application/json": {
|
|
4920
|
+
"schema": {
|
|
4921
|
+
"$ref": "#/components/schemas/UploadCronRunTranscriptBody"
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
},
|
|
4926
|
+
"responses": {
|
|
4927
|
+
"200": {
|
|
4928
|
+
"description": "Transcript stored",
|
|
4929
|
+
"content": {
|
|
4930
|
+
"application/json": {
|
|
4931
|
+
"schema": {
|
|
4932
|
+
"$ref": "#/components/schemas/CronRunTranscriptUploadResult"
|
|
4933
|
+
}
|
|
4934
|
+
}
|
|
4935
|
+
}
|
|
4936
|
+
},
|
|
4937
|
+
"400": {
|
|
4938
|
+
"description": "Bad request",
|
|
4939
|
+
"content": {
|
|
4940
|
+
"application/json": {
|
|
4941
|
+
"schema": {
|
|
4942
|
+
"$ref": "#/components/schemas/Error"
|
|
4943
|
+
}
|
|
4944
|
+
}
|
|
4945
|
+
}
|
|
4946
|
+
},
|
|
4947
|
+
"403": {
|
|
4948
|
+
"description": "Caller not allowed",
|
|
4949
|
+
"content": {
|
|
4950
|
+
"application/json": {
|
|
4951
|
+
"schema": {
|
|
4952
|
+
"$ref": "#/components/schemas/Error"
|
|
4953
|
+
}
|
|
4954
|
+
}
|
|
4955
|
+
}
|
|
4956
|
+
},
|
|
4957
|
+
"404": {
|
|
4958
|
+
"description": "Run not found, or transcript API disabled",
|
|
4959
|
+
"content": {
|
|
4960
|
+
"application/json": {
|
|
4961
|
+
"schema": {
|
|
4962
|
+
"$ref": "#/components/schemas/Error"
|
|
4963
|
+
}
|
|
4964
|
+
}
|
|
4965
|
+
}
|
|
4966
|
+
},
|
|
4967
|
+
"413": {
|
|
4968
|
+
"description": "Transcript body over 1 MiB",
|
|
4969
|
+
"content": {
|
|
4970
|
+
"application/json": {
|
|
4971
|
+
"schema": {
|
|
4972
|
+
"$ref": "#/components/schemas/Error"
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
}
|
|
4978
|
+
},
|
|
4979
|
+
"get": {
|
|
4980
|
+
"summary": "Get a cron run transcript",
|
|
4981
|
+
"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.",
|
|
4982
|
+
"parameters": [
|
|
4983
|
+
{
|
|
4984
|
+
"schema": {
|
|
4985
|
+
"type": "string",
|
|
4986
|
+
"example": "clx1234567890"
|
|
4987
|
+
},
|
|
4988
|
+
"required": true,
|
|
4989
|
+
"name": "id",
|
|
4990
|
+
"in": "path"
|
|
4991
|
+
},
|
|
4992
|
+
{
|
|
4993
|
+
"schema": {
|
|
4994
|
+
"type": "string",
|
|
4995
|
+
"example": "clx0987654321"
|
|
4996
|
+
},
|
|
4997
|
+
"required": true,
|
|
4998
|
+
"name": "cronId",
|
|
4999
|
+
"in": "path"
|
|
5000
|
+
},
|
|
5001
|
+
{
|
|
5002
|
+
"schema": {
|
|
5003
|
+
"type": "string",
|
|
5004
|
+
"example": "clx1111111111"
|
|
5005
|
+
},
|
|
5006
|
+
"required": true,
|
|
5007
|
+
"name": "runId",
|
|
5008
|
+
"in": "path"
|
|
5009
|
+
}
|
|
5010
|
+
],
|
|
5011
|
+
"responses": {
|
|
5012
|
+
"200": {
|
|
5013
|
+
"description": "The transcript",
|
|
5014
|
+
"content": {
|
|
5015
|
+
"application/json": {
|
|
5016
|
+
"schema": {
|
|
5017
|
+
"$ref": "#/components/schemas/CronRunTranscript"
|
|
5018
|
+
}
|
|
5019
|
+
}
|
|
5020
|
+
}
|
|
5021
|
+
},
|
|
5022
|
+
"403": {
|
|
5023
|
+
"description": "Forbidden",
|
|
5024
|
+
"content": {
|
|
5025
|
+
"application/json": {
|
|
5026
|
+
"schema": {
|
|
5027
|
+
"$ref": "#/components/schemas/Error"
|
|
5028
|
+
}
|
|
5029
|
+
}
|
|
5030
|
+
}
|
|
5031
|
+
},
|
|
5032
|
+
"404": {
|
|
5033
|
+
"description": "No transcript, or transcript API disabled",
|
|
5034
|
+
"content": {
|
|
5035
|
+
"application/json": {
|
|
5036
|
+
"schema": {
|
|
5037
|
+
"$ref": "#/components/schemas/Error"
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
}
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5044
|
+
},
|
|
4754
5045
|
"/agents/{id}/plugins": {
|
|
4755
5046
|
"post": {
|
|
4756
5047
|
"summary": "Install a plugin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-vitals/agent-admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/app-vitals/agent.git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@anthropic-ai/sdk": "0.135.0",
|
|
46
|
-
"@app-vitals/agent-lib": "0.
|
|
46
|
+
"@app-vitals/agent-lib": "0.3.0",
|
|
47
47
|
"@hono/zod-openapi": "^1.0.0",
|
|
48
48
|
"@prisma/adapter-pg": "^7.10.0",
|
|
49
49
|
"@prisma/client": "^7.10.0",
|
package/prisma/client/browser.ts
CHANGED
|
@@ -112,6 +112,16 @@ export type AgentChatTokenUsageDailyByModel = Prisma.AgentChatTokenUsageDailyByM
|
|
|
112
112
|
*
|
|
113
113
|
*/
|
|
114
114
|
export type AgentAsk = Prisma.AgentAskModel
|
|
115
|
+
/**
|
|
116
|
+
* Model AgentCronRunTranscript
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export type AgentCronRunTranscript = Prisma.AgentCronRunTranscriptModel
|
|
120
|
+
/**
|
|
121
|
+
* Model AgentTranscriptRead
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
export type AgentTranscriptRead = Prisma.AgentTranscriptReadModel
|
|
115
125
|
/**
|
|
116
126
|
* Model AgentGitHubInstallationsSnapshot
|
|
117
127
|
*
|
package/prisma/client/client.ts
CHANGED
|
@@ -136,6 +136,16 @@ export type AgentChatTokenUsageDailyByModel = Prisma.AgentChatTokenUsageDailyByM
|
|
|
136
136
|
*
|
|
137
137
|
*/
|
|
138
138
|
export type AgentAsk = Prisma.AgentAskModel
|
|
139
|
+
/**
|
|
140
|
+
* Model AgentCronRunTranscript
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
export type AgentCronRunTranscript = Prisma.AgentCronRunTranscriptModel
|
|
144
|
+
/**
|
|
145
|
+
* Model AgentTranscriptRead
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
export type AgentTranscriptRead = Prisma.AgentTranscriptReadModel
|
|
139
149
|
/**
|
|
140
150
|
* Model AgentGitHubInstallationsSnapshot
|
|
141
151
|
*
|