@app-vitals/agent-admin 1.106.2 → 1.107.1
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/e2e/real/admin-access.real.e2e.ts +88 -0
- package/e2e/real/agents-real.real.e2e.ts +116 -0
- package/e2e/real/constants.ts +73 -0
- package/e2e/real/fixture.ts +120 -0
- package/e2e/real/harness.ts +191 -0
- package/e2e/real/member-access-self-serve.real.e2e.ts +114 -0
- package/e2e/real/member-agents.real.e2e.ts +267 -0
- package/e2e/real/member-chat.real.e2e.ts +153 -0
- package/e2e/real/owner-access.real.e2e.ts +237 -0
- package/e2e/real/seed.ts +105 -0
- package/e2e/real/session.ts +29 -0
- package/openapi.json +0 -280
- package/openapi.platform.json +0 -280
- package/package.json +2 -2
- package/playwright.config.ts +11 -0
- package/prisma/client/browser.ts +0 -10
- package/prisma/client/client.ts +0 -10
- package/prisma/client/internal/class.ts +4 -24
- package/prisma/client/internal/prismaNamespace.ts +1 -181
- package/prisma/client/internal/prismaNamespaceBrowser.ts +0 -30
- package/prisma/client/models.ts +0 -2
- package/prisma/migrations/20261129000000_drop_cron_run_transcripts/migration.sql +9 -0
- package/prisma/schema/schema.prisma +0 -34
- package/src/admin-boot.ts +0 -11
- package/src/admin-ui.ts +2 -1
- package/src/agents-api.ts +0 -13
- package/src/api.smoke.test.ts +6 -73
- package/src/api.ts +0 -17
- package/src/cron-run-now.integration.test.ts +163 -0
- package/src/cron-run-transcripts-removed.smoke.test.ts +82 -0
- package/src/drop-cron-run-transcripts-migration.integration.test.ts +114 -0
- package/src/openapi-schemas.ts +0 -55
- package/src/repo-access-config.ts +1 -1
- package/src/secrets-equal.ts +8 -0
- package/src/secrets-equal.unit.test.ts +15 -0
- package/prisma/client/models/AgentCronRunTranscript.ts +0 -1339
- package/prisma/client/models/AgentTranscriptRead.ts +0 -1177
- package/src/cron-run-transcripts.integration.test.ts +0 -220
- package/src/cron-run-transcripts.smoke.test.ts +0 -286
- package/src/cron-run-transcripts.ts +0 -314
- package/src/transcript-config.ts +0 -30
- package/src/transcript-config.unit.test.ts +0 -50
package/openapi.platform.json
CHANGED
|
@@ -2312,114 +2312,6 @@
|
|
|
2312
2312
|
"requestedAt"
|
|
2313
2313
|
]
|
|
2314
2314
|
},
|
|
2315
|
-
"CronRunTranscriptUploadResult": {
|
|
2316
|
-
"type": "object",
|
|
2317
|
-
"properties": {
|
|
2318
|
-
"runId": {
|
|
2319
|
-
"type": "string",
|
|
2320
|
-
"example": "clx1111111111"
|
|
2321
|
-
},
|
|
2322
|
-
"bytes": {
|
|
2323
|
-
"type": "integer",
|
|
2324
|
-
"example": 2048
|
|
2325
|
-
},
|
|
2326
|
-
"truncated": {
|
|
2327
|
-
"type": "boolean",
|
|
2328
|
-
"example": false
|
|
2329
|
-
},
|
|
2330
|
-
"redactions": {
|
|
2331
|
-
"type": "integer",
|
|
2332
|
-
"example": 0
|
|
2333
|
-
}
|
|
2334
|
-
},
|
|
2335
|
-
"required": [
|
|
2336
|
-
"runId",
|
|
2337
|
-
"bytes",
|
|
2338
|
-
"truncated",
|
|
2339
|
-
"redactions"
|
|
2340
|
-
]
|
|
2341
|
-
},
|
|
2342
|
-
"UploadCronRunTranscriptBody": {
|
|
2343
|
-
"type": "object",
|
|
2344
|
-
"properties": {
|
|
2345
|
-
"sessionId": {
|
|
2346
|
-
"type": "string",
|
|
2347
|
-
"minLength": 1,
|
|
2348
|
-
"description": "Claude session id the transcript was read from.",
|
|
2349
|
-
"example": "7c1c8d1e-0000-4000-8000-000000000000"
|
|
2350
|
-
},
|
|
2351
|
-
"body": {
|
|
2352
|
-
"type": "string",
|
|
2353
|
-
"description": "The already-redacted transcript (JSONL text). Over 1 MiB (UTF-8 bytes) is a 413. Never logged."
|
|
2354
|
-
},
|
|
2355
|
-
"truncated": {
|
|
2356
|
-
"type": "boolean",
|
|
2357
|
-
"description": "True when the runtime dropped earlier lines to fit.",
|
|
2358
|
-
"example": false
|
|
2359
|
-
},
|
|
2360
|
-
"redactions": {
|
|
2361
|
-
"type": "integer",
|
|
2362
|
-
"minimum": 0,
|
|
2363
|
-
"description": "How many secrets the runtime redacted.",
|
|
2364
|
-
"example": 0
|
|
2365
|
-
}
|
|
2366
|
-
},
|
|
2367
|
-
"required": [
|
|
2368
|
-
"body",
|
|
2369
|
-
"truncated",
|
|
2370
|
-
"redactions"
|
|
2371
|
-
]
|
|
2372
|
-
},
|
|
2373
|
-
"CronRunTranscript": {
|
|
2374
|
-
"type": "object",
|
|
2375
|
-
"properties": {
|
|
2376
|
-
"runId": {
|
|
2377
|
-
"type": "string",
|
|
2378
|
-
"example": "clx1111111111"
|
|
2379
|
-
},
|
|
2380
|
-
"cronId": {
|
|
2381
|
-
"type": "string",
|
|
2382
|
-
"example": "clx0987654321"
|
|
2383
|
-
},
|
|
2384
|
-
"sessionId": {
|
|
2385
|
-
"type": [
|
|
2386
|
-
"string",
|
|
2387
|
-
"null"
|
|
2388
|
-
],
|
|
2389
|
-
"example": null
|
|
2390
|
-
},
|
|
2391
|
-
"bytes": {
|
|
2392
|
-
"type": "integer",
|
|
2393
|
-
"example": 2048
|
|
2394
|
-
},
|
|
2395
|
-
"truncated": {
|
|
2396
|
-
"type": "boolean",
|
|
2397
|
-
"example": false
|
|
2398
|
-
},
|
|
2399
|
-
"redactions": {
|
|
2400
|
-
"type": "integer",
|
|
2401
|
-
"example": 0
|
|
2402
|
-
},
|
|
2403
|
-
"createdAt": {
|
|
2404
|
-
"type": "string",
|
|
2405
|
-
"example": "2026-10-26T12:00:00.000Z"
|
|
2406
|
-
},
|
|
2407
|
-
"body": {
|
|
2408
|
-
"type": "string",
|
|
2409
|
-
"description": "Redacted JSONL transcript."
|
|
2410
|
-
}
|
|
2411
|
-
},
|
|
2412
|
-
"required": [
|
|
2413
|
-
"runId",
|
|
2414
|
-
"cronId",
|
|
2415
|
-
"sessionId",
|
|
2416
|
-
"bytes",
|
|
2417
|
-
"truncated",
|
|
2418
|
-
"redactions",
|
|
2419
|
-
"createdAt",
|
|
2420
|
-
"body"
|
|
2421
|
-
]
|
|
2422
|
-
},
|
|
2423
2315
|
"PluginWrapper": {
|
|
2424
2316
|
"type": "object",
|
|
2425
2317
|
"properties": {
|
|
@@ -4217,24 +4109,13 @@
|
|
|
4217
4109
|
"AgentConfigFeatures": {
|
|
4218
4110
|
"type": "object",
|
|
4219
4111
|
"properties": {
|
|
4220
|
-
"transcriptUpload": {
|
|
4221
|
-
"type": "boolean",
|
|
4222
|
-
"description": "True when SHIPWRIGHT_TRANSCRIPT_API_ENABLED is on: the runtime uploads a redacted transcript after each cron run.",
|
|
4223
|
-
"example": false
|
|
4224
|
-
},
|
|
4225
4112
|
"repoAccessCheck": {
|
|
4226
4113
|
"type": "boolean",
|
|
4227
4114
|
"description": "Reserved for the repo-access check (COS-44.1).",
|
|
4228
4115
|
"example": false
|
|
4229
|
-
},
|
|
4230
|
-
"loopTranscriptUpload": {
|
|
4231
|
-
"type": "boolean",
|
|
4232
|
-
"description": "True when SHIPWRIGHT_TRANSCRIPT_API_ENABLED is on and this agent is listed in SHIPWRIGHT_LOOP_TRANSCRIPT_AGENT_IDS: coding-loop runs may upload a redacted transcript through the extension capability.",
|
|
4233
|
-
"example": false
|
|
4234
4116
|
}
|
|
4235
4117
|
},
|
|
4236
4118
|
"required": [
|
|
4237
|
-
"transcriptUpload",
|
|
4238
4119
|
"repoAccessCheck"
|
|
4239
4120
|
]
|
|
4240
4121
|
},
|
|
@@ -6988,167 +6869,6 @@
|
|
|
6988
6869
|
}
|
|
6989
6870
|
}
|
|
6990
6871
|
},
|
|
6991
|
-
"/agents/{id}/crons/{cronId}/runs/{runId}/transcript": {
|
|
6992
|
-
"put": {
|
|
6993
|
-
"summary": "Upload a cron run transcript",
|
|
6994
|
-
"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.",
|
|
6995
|
-
"parameters": [
|
|
6996
|
-
{
|
|
6997
|
-
"schema": {
|
|
6998
|
-
"type": "string",
|
|
6999
|
-
"example": "clx1234567890"
|
|
7000
|
-
},
|
|
7001
|
-
"required": true,
|
|
7002
|
-
"name": "id",
|
|
7003
|
-
"in": "path"
|
|
7004
|
-
},
|
|
7005
|
-
{
|
|
7006
|
-
"schema": {
|
|
7007
|
-
"type": "string",
|
|
7008
|
-
"example": "clx0987654321"
|
|
7009
|
-
},
|
|
7010
|
-
"required": true,
|
|
7011
|
-
"name": "cronId",
|
|
7012
|
-
"in": "path"
|
|
7013
|
-
},
|
|
7014
|
-
{
|
|
7015
|
-
"schema": {
|
|
7016
|
-
"type": "string",
|
|
7017
|
-
"example": "clx1111111111"
|
|
7018
|
-
},
|
|
7019
|
-
"required": true,
|
|
7020
|
-
"name": "runId",
|
|
7021
|
-
"in": "path"
|
|
7022
|
-
}
|
|
7023
|
-
],
|
|
7024
|
-
"requestBody": {
|
|
7025
|
-
"content": {
|
|
7026
|
-
"application/json": {
|
|
7027
|
-
"schema": {
|
|
7028
|
-
"$ref": "#/components/schemas/UploadCronRunTranscriptBody"
|
|
7029
|
-
}
|
|
7030
|
-
}
|
|
7031
|
-
}
|
|
7032
|
-
},
|
|
7033
|
-
"responses": {
|
|
7034
|
-
"200": {
|
|
7035
|
-
"description": "Transcript stored",
|
|
7036
|
-
"content": {
|
|
7037
|
-
"application/json": {
|
|
7038
|
-
"schema": {
|
|
7039
|
-
"$ref": "#/components/schemas/CronRunTranscriptUploadResult"
|
|
7040
|
-
}
|
|
7041
|
-
}
|
|
7042
|
-
}
|
|
7043
|
-
},
|
|
7044
|
-
"400": {
|
|
7045
|
-
"description": "Bad request",
|
|
7046
|
-
"content": {
|
|
7047
|
-
"application/json": {
|
|
7048
|
-
"schema": {
|
|
7049
|
-
"$ref": "#/components/schemas/Error"
|
|
7050
|
-
}
|
|
7051
|
-
}
|
|
7052
|
-
}
|
|
7053
|
-
},
|
|
7054
|
-
"403": {
|
|
7055
|
-
"description": "Caller not allowed",
|
|
7056
|
-
"content": {
|
|
7057
|
-
"application/json": {
|
|
7058
|
-
"schema": {
|
|
7059
|
-
"$ref": "#/components/schemas/Error"
|
|
7060
|
-
}
|
|
7061
|
-
}
|
|
7062
|
-
}
|
|
7063
|
-
},
|
|
7064
|
-
"404": {
|
|
7065
|
-
"description": "Run not found, or transcript API disabled",
|
|
7066
|
-
"content": {
|
|
7067
|
-
"application/json": {
|
|
7068
|
-
"schema": {
|
|
7069
|
-
"$ref": "#/components/schemas/Error"
|
|
7070
|
-
}
|
|
7071
|
-
}
|
|
7072
|
-
}
|
|
7073
|
-
},
|
|
7074
|
-
"413": {
|
|
7075
|
-
"description": "Transcript body over 1 MiB",
|
|
7076
|
-
"content": {
|
|
7077
|
-
"application/json": {
|
|
7078
|
-
"schema": {
|
|
7079
|
-
"$ref": "#/components/schemas/Error"
|
|
7080
|
-
}
|
|
7081
|
-
}
|
|
7082
|
-
}
|
|
7083
|
-
}
|
|
7084
|
-
}
|
|
7085
|
-
},
|
|
7086
|
-
"get": {
|
|
7087
|
-
"summary": "Get a cron run transcript",
|
|
7088
|
-
"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.",
|
|
7089
|
-
"parameters": [
|
|
7090
|
-
{
|
|
7091
|
-
"schema": {
|
|
7092
|
-
"type": "string",
|
|
7093
|
-
"example": "clx1234567890"
|
|
7094
|
-
},
|
|
7095
|
-
"required": true,
|
|
7096
|
-
"name": "id",
|
|
7097
|
-
"in": "path"
|
|
7098
|
-
},
|
|
7099
|
-
{
|
|
7100
|
-
"schema": {
|
|
7101
|
-
"type": "string",
|
|
7102
|
-
"example": "clx0987654321"
|
|
7103
|
-
},
|
|
7104
|
-
"required": true,
|
|
7105
|
-
"name": "cronId",
|
|
7106
|
-
"in": "path"
|
|
7107
|
-
},
|
|
7108
|
-
{
|
|
7109
|
-
"schema": {
|
|
7110
|
-
"type": "string",
|
|
7111
|
-
"example": "clx1111111111"
|
|
7112
|
-
},
|
|
7113
|
-
"required": true,
|
|
7114
|
-
"name": "runId",
|
|
7115
|
-
"in": "path"
|
|
7116
|
-
}
|
|
7117
|
-
],
|
|
7118
|
-
"responses": {
|
|
7119
|
-
"200": {
|
|
7120
|
-
"description": "The transcript",
|
|
7121
|
-
"content": {
|
|
7122
|
-
"application/json": {
|
|
7123
|
-
"schema": {
|
|
7124
|
-
"$ref": "#/components/schemas/CronRunTranscript"
|
|
7125
|
-
}
|
|
7126
|
-
}
|
|
7127
|
-
}
|
|
7128
|
-
},
|
|
7129
|
-
"403": {
|
|
7130
|
-
"description": "Forbidden",
|
|
7131
|
-
"content": {
|
|
7132
|
-
"application/json": {
|
|
7133
|
-
"schema": {
|
|
7134
|
-
"$ref": "#/components/schemas/Error"
|
|
7135
|
-
}
|
|
7136
|
-
}
|
|
7137
|
-
}
|
|
7138
|
-
},
|
|
7139
|
-
"404": {
|
|
7140
|
-
"description": "No transcript, or transcript API disabled",
|
|
7141
|
-
"content": {
|
|
7142
|
-
"application/json": {
|
|
7143
|
-
"schema": {
|
|
7144
|
-
"$ref": "#/components/schemas/Error"
|
|
7145
|
-
}
|
|
7146
|
-
}
|
|
7147
|
-
}
|
|
7148
|
-
}
|
|
7149
|
-
}
|
|
7150
|
-
}
|
|
7151
|
-
},
|
|
7152
6872
|
"/agents/{id}/plugins": {
|
|
7153
6873
|
"post": {
|
|
7154
6874
|
"summary": "Install a plugin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-vitals/agent-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.107.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/app-vitals/agent.git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@anthropic-ai/sdk": "0.137.0",
|
|
47
|
-
"@app-vitals/agent-lib": "1.
|
|
47
|
+
"@app-vitals/agent-lib": "1.107.1",
|
|
48
48
|
"@hono/zod-openapi": "^1.0.0",
|
|
49
49
|
"@prisma/adapter-pg": "^7.10.0",
|
|
50
50
|
"@prisma/client": "^7.10.0",
|
package/playwright.config.ts
CHANGED
|
@@ -18,7 +18,18 @@ export default defineConfig({
|
|
|
18
18
|
},
|
|
19
19
|
projects: [
|
|
20
20
|
{
|
|
21
|
+
// Fake-data specs: each boots admin/e2e/test-server.ts (in-memory deps).
|
|
21
22
|
name: "chromium",
|
|
23
|
+
testIgnore: "**/*.real.e2e.ts",
|
|
24
|
+
use: { browserName: "chromium" },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
// Real-service specs: real admin + chat on temporary Postgres databases
|
|
28
|
+
// (ADMIN_E2E_PG_URL), seeded roles. See e2e/real/harness.ts.
|
|
29
|
+
name: "real-services",
|
|
30
|
+
testMatch: "**/*.real.e2e.ts",
|
|
31
|
+
timeout: 60_000,
|
|
32
|
+
retries: 0,
|
|
22
33
|
use: { browserName: "chromium" },
|
|
23
34
|
},
|
|
24
35
|
],
|
package/prisma/client/browser.ts
CHANGED
|
@@ -137,16 +137,6 @@ export type AgentAsk = Prisma.AgentAskModel
|
|
|
137
137
|
*
|
|
138
138
|
*/
|
|
139
139
|
export type AgentCronRunRequest = Prisma.AgentCronRunRequestModel
|
|
140
|
-
/**
|
|
141
|
-
* Model AgentCronRunTranscript
|
|
142
|
-
*
|
|
143
|
-
*/
|
|
144
|
-
export type AgentCronRunTranscript = Prisma.AgentCronRunTranscriptModel
|
|
145
|
-
/**
|
|
146
|
-
* Model AgentTranscriptRead
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
export type AgentTranscriptRead = Prisma.AgentTranscriptReadModel
|
|
150
140
|
/**
|
|
151
141
|
* Model AgentGitHubInstallationsSnapshot
|
|
152
142
|
*
|
package/prisma/client/client.ts
CHANGED
|
@@ -161,16 +161,6 @@ export type AgentAsk = Prisma.AgentAskModel
|
|
|
161
161
|
*
|
|
162
162
|
*/
|
|
163
163
|
export type AgentCronRunRequest = Prisma.AgentCronRunRequestModel
|
|
164
|
-
/**
|
|
165
|
-
* Model AgentCronRunTranscript
|
|
166
|
-
*
|
|
167
|
-
*/
|
|
168
|
-
export type AgentCronRunTranscript = Prisma.AgentCronRunTranscriptModel
|
|
169
|
-
/**
|
|
170
|
-
* Model AgentTranscriptRead
|
|
171
|
-
*
|
|
172
|
-
*/
|
|
173
|
-
export type AgentTranscriptRead = Prisma.AgentTranscriptReadModel
|
|
174
164
|
/**
|
|
175
165
|
* Model AgentGitHubInstallationsSnapshot
|
|
176
166
|
*
|