@app-vitals/agent-admin 1.106.2 → 1.107.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 +0 -280
- package/openapi.platform.json +0 -280
- package/package.json +2 -2
- 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/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/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
|
@@ -421,8 +421,6 @@ export const ModelName = {
|
|
|
421
421
|
AgentChatTokenUsageDailyByModel: 'AgentChatTokenUsageDailyByModel',
|
|
422
422
|
AgentAsk: 'AgentAsk',
|
|
423
423
|
AgentCronRunRequest: 'AgentCronRunRequest',
|
|
424
|
-
AgentCronRunTranscript: 'AgentCronRunTranscript',
|
|
425
|
-
AgentTranscriptRead: 'AgentTranscriptRead',
|
|
426
424
|
AgentGitHubInstallationsSnapshot: 'AgentGitHubInstallationsSnapshot',
|
|
427
425
|
PushSubscription: 'PushSubscription',
|
|
428
426
|
ChatThreadWatch: 'ChatThreadWatch',
|
|
@@ -447,7 +445,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
|
|
447
445
|
omit: GlobalOmitOptions
|
|
448
446
|
}
|
|
449
447
|
meta: {
|
|
450
|
-
modelProps: "agentWorkQueueSnapshot" | "agentPhaseMethodology" | "sessionFollow" | "sessionAlertState" | "agent" | "agentEnv" | "gitHubEnterpriseApp" | "agentCronJob" | "agentTool" | "agentToken" | "agentPlugin" | "agentMember" | "account" | "agentTemplate" | "agentTemplateItem" | "slackConfigToken" | "accountMember" | "accountInvite" | "agentCronRun" | "agentCronRunSkillUsage" | "agentCronRunModelBreakdown" | "agentChatTokenUsageDailyByModel" | "agentAsk" | "agentCronRunRequest" | "
|
|
448
|
+
modelProps: "agentWorkQueueSnapshot" | "agentPhaseMethodology" | "sessionFollow" | "sessionAlertState" | "agent" | "agentEnv" | "gitHubEnterpriseApp" | "agentCronJob" | "agentTool" | "agentToken" | "agentPlugin" | "agentMember" | "account" | "agentTemplate" | "agentTemplateItem" | "slackConfigToken" | "accountMember" | "accountInvite" | "agentCronRun" | "agentCronRunSkillUsage" | "agentCronRunModelBreakdown" | "agentChatTokenUsageDailyByModel" | "agentAsk" | "agentCronRunRequest" | "agentGitHubInstallationsSnapshot" | "pushSubscription" | "chatThreadWatch" | "userNotificationPrefs" | "agentMarketplace" | "gitHubReconcileAudit" | "gitHubRepoSnapshot" | "gitHubCachedRepo" | "gitHubRepoAccess"
|
|
451
449
|
txIsolationLevel: TransactionIsolationLevel
|
|
452
450
|
}
|
|
453
451
|
model: {
|
|
@@ -2227,154 +2225,6 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
|
|
2227
2225
|
}
|
|
2228
2226
|
}
|
|
2229
2227
|
}
|
|
2230
|
-
AgentCronRunTranscript: {
|
|
2231
|
-
payload: Prisma.$AgentCronRunTranscriptPayload<ExtArgs>
|
|
2232
|
-
fields: Prisma.AgentCronRunTranscriptFieldRefs
|
|
2233
|
-
operations: {
|
|
2234
|
-
findUnique: {
|
|
2235
|
-
args: Prisma.AgentCronRunTranscriptFindUniqueArgs<ExtArgs>
|
|
2236
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload> | null
|
|
2237
|
-
}
|
|
2238
|
-
findUniqueOrThrow: {
|
|
2239
|
-
args: Prisma.AgentCronRunTranscriptFindUniqueOrThrowArgs<ExtArgs>
|
|
2240
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2241
|
-
}
|
|
2242
|
-
findFirst: {
|
|
2243
|
-
args: Prisma.AgentCronRunTranscriptFindFirstArgs<ExtArgs>
|
|
2244
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload> | null
|
|
2245
|
-
}
|
|
2246
|
-
findFirstOrThrow: {
|
|
2247
|
-
args: Prisma.AgentCronRunTranscriptFindFirstOrThrowArgs<ExtArgs>
|
|
2248
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2249
|
-
}
|
|
2250
|
-
findMany: {
|
|
2251
|
-
args: Prisma.AgentCronRunTranscriptFindManyArgs<ExtArgs>
|
|
2252
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>[]
|
|
2253
|
-
}
|
|
2254
|
-
create: {
|
|
2255
|
-
args: Prisma.AgentCronRunTranscriptCreateArgs<ExtArgs>
|
|
2256
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2257
|
-
}
|
|
2258
|
-
createMany: {
|
|
2259
|
-
args: Prisma.AgentCronRunTranscriptCreateManyArgs<ExtArgs>
|
|
2260
|
-
result: BatchPayload
|
|
2261
|
-
}
|
|
2262
|
-
createManyAndReturn: {
|
|
2263
|
-
args: Prisma.AgentCronRunTranscriptCreateManyAndReturnArgs<ExtArgs>
|
|
2264
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>[]
|
|
2265
|
-
}
|
|
2266
|
-
delete: {
|
|
2267
|
-
args: Prisma.AgentCronRunTranscriptDeleteArgs<ExtArgs>
|
|
2268
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2269
|
-
}
|
|
2270
|
-
update: {
|
|
2271
|
-
args: Prisma.AgentCronRunTranscriptUpdateArgs<ExtArgs>
|
|
2272
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2273
|
-
}
|
|
2274
|
-
deleteMany: {
|
|
2275
|
-
args: Prisma.AgentCronRunTranscriptDeleteManyArgs<ExtArgs>
|
|
2276
|
-
result: BatchPayload
|
|
2277
|
-
}
|
|
2278
|
-
updateMany: {
|
|
2279
|
-
args: Prisma.AgentCronRunTranscriptUpdateManyArgs<ExtArgs>
|
|
2280
|
-
result: BatchPayload
|
|
2281
|
-
}
|
|
2282
|
-
updateManyAndReturn: {
|
|
2283
|
-
args: Prisma.AgentCronRunTranscriptUpdateManyAndReturnArgs<ExtArgs>
|
|
2284
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>[]
|
|
2285
|
-
}
|
|
2286
|
-
upsert: {
|
|
2287
|
-
args: Prisma.AgentCronRunTranscriptUpsertArgs<ExtArgs>
|
|
2288
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentCronRunTranscriptPayload>
|
|
2289
|
-
}
|
|
2290
|
-
aggregate: {
|
|
2291
|
-
args: Prisma.AgentCronRunTranscriptAggregateArgs<ExtArgs>
|
|
2292
|
-
result: runtime.Types.Utils.Optional<Prisma.AggregateAgentCronRunTranscript>
|
|
2293
|
-
}
|
|
2294
|
-
groupBy: {
|
|
2295
|
-
args: Prisma.AgentCronRunTranscriptGroupByArgs<ExtArgs>
|
|
2296
|
-
result: runtime.Types.Utils.Optional<Prisma.AgentCronRunTranscriptGroupByOutputType>[]
|
|
2297
|
-
}
|
|
2298
|
-
count: {
|
|
2299
|
-
args: Prisma.AgentCronRunTranscriptCountArgs<ExtArgs>
|
|
2300
|
-
result: runtime.Types.Utils.Optional<Prisma.AgentCronRunTranscriptCountAggregateOutputType> | number
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2304
|
-
AgentTranscriptRead: {
|
|
2305
|
-
payload: Prisma.$AgentTranscriptReadPayload<ExtArgs>
|
|
2306
|
-
fields: Prisma.AgentTranscriptReadFieldRefs
|
|
2307
|
-
operations: {
|
|
2308
|
-
findUnique: {
|
|
2309
|
-
args: Prisma.AgentTranscriptReadFindUniqueArgs<ExtArgs>
|
|
2310
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload> | null
|
|
2311
|
-
}
|
|
2312
|
-
findUniqueOrThrow: {
|
|
2313
|
-
args: Prisma.AgentTranscriptReadFindUniqueOrThrowArgs<ExtArgs>
|
|
2314
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2315
|
-
}
|
|
2316
|
-
findFirst: {
|
|
2317
|
-
args: Prisma.AgentTranscriptReadFindFirstArgs<ExtArgs>
|
|
2318
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload> | null
|
|
2319
|
-
}
|
|
2320
|
-
findFirstOrThrow: {
|
|
2321
|
-
args: Prisma.AgentTranscriptReadFindFirstOrThrowArgs<ExtArgs>
|
|
2322
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2323
|
-
}
|
|
2324
|
-
findMany: {
|
|
2325
|
-
args: Prisma.AgentTranscriptReadFindManyArgs<ExtArgs>
|
|
2326
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>[]
|
|
2327
|
-
}
|
|
2328
|
-
create: {
|
|
2329
|
-
args: Prisma.AgentTranscriptReadCreateArgs<ExtArgs>
|
|
2330
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2331
|
-
}
|
|
2332
|
-
createMany: {
|
|
2333
|
-
args: Prisma.AgentTranscriptReadCreateManyArgs<ExtArgs>
|
|
2334
|
-
result: BatchPayload
|
|
2335
|
-
}
|
|
2336
|
-
createManyAndReturn: {
|
|
2337
|
-
args: Prisma.AgentTranscriptReadCreateManyAndReturnArgs<ExtArgs>
|
|
2338
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>[]
|
|
2339
|
-
}
|
|
2340
|
-
delete: {
|
|
2341
|
-
args: Prisma.AgentTranscriptReadDeleteArgs<ExtArgs>
|
|
2342
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2343
|
-
}
|
|
2344
|
-
update: {
|
|
2345
|
-
args: Prisma.AgentTranscriptReadUpdateArgs<ExtArgs>
|
|
2346
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2347
|
-
}
|
|
2348
|
-
deleteMany: {
|
|
2349
|
-
args: Prisma.AgentTranscriptReadDeleteManyArgs<ExtArgs>
|
|
2350
|
-
result: BatchPayload
|
|
2351
|
-
}
|
|
2352
|
-
updateMany: {
|
|
2353
|
-
args: Prisma.AgentTranscriptReadUpdateManyArgs<ExtArgs>
|
|
2354
|
-
result: BatchPayload
|
|
2355
|
-
}
|
|
2356
|
-
updateManyAndReturn: {
|
|
2357
|
-
args: Prisma.AgentTranscriptReadUpdateManyAndReturnArgs<ExtArgs>
|
|
2358
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>[]
|
|
2359
|
-
}
|
|
2360
|
-
upsert: {
|
|
2361
|
-
args: Prisma.AgentTranscriptReadUpsertArgs<ExtArgs>
|
|
2362
|
-
result: runtime.Types.Utils.PayloadToResult<Prisma.$AgentTranscriptReadPayload>
|
|
2363
|
-
}
|
|
2364
|
-
aggregate: {
|
|
2365
|
-
args: Prisma.AgentTranscriptReadAggregateArgs<ExtArgs>
|
|
2366
|
-
result: runtime.Types.Utils.Optional<Prisma.AggregateAgentTranscriptRead>
|
|
2367
|
-
}
|
|
2368
|
-
groupBy: {
|
|
2369
|
-
args: Prisma.AgentTranscriptReadGroupByArgs<ExtArgs>
|
|
2370
|
-
result: runtime.Types.Utils.Optional<Prisma.AgentTranscriptReadGroupByOutputType>[]
|
|
2371
|
-
}
|
|
2372
|
-
count: {
|
|
2373
|
-
args: Prisma.AgentTranscriptReadCountArgs<ExtArgs>
|
|
2374
|
-
result: runtime.Types.Utils.Optional<Prisma.AgentTranscriptReadCountAggregateOutputType> | number
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
}
|
|
2378
2228
|
AgentGitHubInstallationsSnapshot: {
|
|
2379
2229
|
payload: Prisma.$AgentGitHubInstallationsSnapshotPayload<ExtArgs>
|
|
2380
2230
|
fields: Prisma.AgentGitHubInstallationsSnapshotFieldRefs
|
|
@@ -3462,34 +3312,6 @@ export const AgentCronRunRequestScalarFieldEnum = {
|
|
|
3462
3312
|
export type AgentCronRunRequestScalarFieldEnum = (typeof AgentCronRunRequestScalarFieldEnum)[keyof typeof AgentCronRunRequestScalarFieldEnum]
|
|
3463
3313
|
|
|
3464
3314
|
|
|
3465
|
-
export const AgentCronRunTranscriptScalarFieldEnum = {
|
|
3466
|
-
id: 'id',
|
|
3467
|
-
runId: 'runId',
|
|
3468
|
-
agentId: 'agentId',
|
|
3469
|
-
cronId: 'cronId',
|
|
3470
|
-
sessionId: 'sessionId',
|
|
3471
|
-
bytes: 'bytes',
|
|
3472
|
-
truncated: 'truncated',
|
|
3473
|
-
redactions: 'redactions',
|
|
3474
|
-
body: 'body',
|
|
3475
|
-
createdAt: 'createdAt'
|
|
3476
|
-
} as const
|
|
3477
|
-
|
|
3478
|
-
export type AgentCronRunTranscriptScalarFieldEnum = (typeof AgentCronRunTranscriptScalarFieldEnum)[keyof typeof AgentCronRunTranscriptScalarFieldEnum]
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
export const AgentTranscriptReadScalarFieldEnum = {
|
|
3482
|
-
id: 'id',
|
|
3483
|
-
runId: 'runId',
|
|
3484
|
-
agentId: 'agentId',
|
|
3485
|
-
reader: 'reader',
|
|
3486
|
-
scopeKind: 'scopeKind',
|
|
3487
|
-
at: 'at'
|
|
3488
|
-
} as const
|
|
3489
|
-
|
|
3490
|
-
export type AgentTranscriptReadScalarFieldEnum = (typeof AgentTranscriptReadScalarFieldEnum)[keyof typeof AgentTranscriptReadScalarFieldEnum]
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
3315
|
export const AgentGitHubInstallationsSnapshotScalarFieldEnum = {
|
|
3494
3316
|
id: 'id',
|
|
3495
3317
|
agentId: 'agentId',
|
|
@@ -3945,8 +3767,6 @@ export type GlobalOmitConfig = {
|
|
|
3945
3767
|
agentChatTokenUsageDailyByModel?: Prisma.AgentChatTokenUsageDailyByModelOmit
|
|
3946
3768
|
agentAsk?: Prisma.AgentAskOmit
|
|
3947
3769
|
agentCronRunRequest?: Prisma.AgentCronRunRequestOmit
|
|
3948
|
-
agentCronRunTranscript?: Prisma.AgentCronRunTranscriptOmit
|
|
3949
|
-
agentTranscriptRead?: Prisma.AgentTranscriptReadOmit
|
|
3950
3770
|
agentGitHubInstallationsSnapshot?: Prisma.AgentGitHubInstallationsSnapshotOmit
|
|
3951
3771
|
pushSubscription?: Prisma.PushSubscriptionOmit
|
|
3952
3772
|
chatThreadWatch?: Prisma.ChatThreadWatchOmit
|
|
@@ -75,8 +75,6 @@ export const ModelName = {
|
|
|
75
75
|
AgentChatTokenUsageDailyByModel: 'AgentChatTokenUsageDailyByModel',
|
|
76
76
|
AgentAsk: 'AgentAsk',
|
|
77
77
|
AgentCronRunRequest: 'AgentCronRunRequest',
|
|
78
|
-
AgentCronRunTranscript: 'AgentCronRunTranscript',
|
|
79
|
-
AgentTranscriptRead: 'AgentTranscriptRead',
|
|
80
78
|
AgentGitHubInstallationsSnapshot: 'AgentGitHubInstallationsSnapshot',
|
|
81
79
|
PushSubscription: 'PushSubscription',
|
|
82
80
|
ChatThreadWatch: 'ChatThreadWatch',
|
|
@@ -486,34 +484,6 @@ export const AgentCronRunRequestScalarFieldEnum = {
|
|
|
486
484
|
export type AgentCronRunRequestScalarFieldEnum = (typeof AgentCronRunRequestScalarFieldEnum)[keyof typeof AgentCronRunRequestScalarFieldEnum]
|
|
487
485
|
|
|
488
486
|
|
|
489
|
-
export const AgentCronRunTranscriptScalarFieldEnum = {
|
|
490
|
-
id: 'id',
|
|
491
|
-
runId: 'runId',
|
|
492
|
-
agentId: 'agentId',
|
|
493
|
-
cronId: 'cronId',
|
|
494
|
-
sessionId: 'sessionId',
|
|
495
|
-
bytes: 'bytes',
|
|
496
|
-
truncated: 'truncated',
|
|
497
|
-
redactions: 'redactions',
|
|
498
|
-
body: 'body',
|
|
499
|
-
createdAt: 'createdAt'
|
|
500
|
-
} as const
|
|
501
|
-
|
|
502
|
-
export type AgentCronRunTranscriptScalarFieldEnum = (typeof AgentCronRunTranscriptScalarFieldEnum)[keyof typeof AgentCronRunTranscriptScalarFieldEnum]
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
export const AgentTranscriptReadScalarFieldEnum = {
|
|
506
|
-
id: 'id',
|
|
507
|
-
runId: 'runId',
|
|
508
|
-
agentId: 'agentId',
|
|
509
|
-
reader: 'reader',
|
|
510
|
-
scopeKind: 'scopeKind',
|
|
511
|
-
at: 'at'
|
|
512
|
-
} as const
|
|
513
|
-
|
|
514
|
-
export type AgentTranscriptReadScalarFieldEnum = (typeof AgentTranscriptReadScalarFieldEnum)[keyof typeof AgentTranscriptReadScalarFieldEnum]
|
|
515
|
-
|
|
516
|
-
|
|
517
487
|
export const AgentGitHubInstallationsSnapshotScalarFieldEnum = {
|
|
518
488
|
id: 'id',
|
|
519
489
|
agentId: 'agentId',
|
package/prisma/client/models.ts
CHANGED
|
@@ -32,8 +32,6 @@ export type * from './models/AgentCronRunModelBreakdown.ts'
|
|
|
32
32
|
export type * from './models/AgentChatTokenUsageDailyByModel.ts'
|
|
33
33
|
export type * from './models/AgentAsk.ts'
|
|
34
34
|
export type * from './models/AgentCronRunRequest.ts'
|
|
35
|
-
export type * from './models/AgentCronRunTranscript.ts'
|
|
36
|
-
export type * from './models/AgentTranscriptRead.ts'
|
|
37
35
|
export type * from './models/AgentGitHubInstallationsSnapshot.ts'
|
|
38
36
|
export type * from './models/PushSubscription.ts'
|
|
39
37
|
export type * from './models/ChatThreadWatch.ts'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- prompt-audit-removal 2.3: the cron-run transcript API is removed. Drop the
|
|
2
|
+
-- redacted transcript store and its per-read audit table (stored transcripts
|
|
3
|
+
-- are deleted; approved). Neither table has FKs in or out. IF EXISTS keeps
|
|
4
|
+
-- the drop idempotent. Dropping a table drops its indexes.
|
|
5
|
+
-- DropTable
|
|
6
|
+
DROP TABLE IF EXISTS "AgentCronRunTranscript";
|
|
7
|
+
|
|
8
|
+
-- DropTable
|
|
9
|
+
DROP TABLE IF EXISTS "AgentTranscriptRead";
|
|
@@ -590,40 +590,6 @@ model AgentCronRunRequest {
|
|
|
590
590
|
@@index([agentId, requestedAt])
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
// ─── Cron-run transcripts (COS-43.1) ────────────────────────────────────────
|
|
594
|
-
// One redacted session transcript per cron run, uploaded by the agent runtime
|
|
595
|
-
// (already redacted + tail-truncated to 1 MiB) and served only to admin /
|
|
596
|
-
// platform callers behind SHIPWRIGHT_TRANSCRIPT_API_ENABLED. No FK on runId:
|
|
597
|
-
// the retention sweep (newest 200 per agent) is the only lifecycle. The body
|
|
598
|
-
// is never logged. AgentTranscriptRead is the audit row written before every
|
|
599
|
-
// transcript read.
|
|
600
|
-
|
|
601
|
-
model AgentCronRunTranscript {
|
|
602
|
-
id String @id @default(cuid())
|
|
603
|
-
runId String @unique
|
|
604
|
-
agentId String
|
|
605
|
-
cronId String
|
|
606
|
-
sessionId String?
|
|
607
|
-
bytes Int
|
|
608
|
-
truncated Boolean
|
|
609
|
-
redactions Int
|
|
610
|
-
body String @db.Text
|
|
611
|
-
createdAt DateTime @default(now())
|
|
612
|
-
|
|
613
|
-
@@index([agentId, createdAt])
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
model AgentTranscriptRead {
|
|
617
|
-
id String @id @default(cuid())
|
|
618
|
-
runId String
|
|
619
|
-
agentId String
|
|
620
|
-
reader String
|
|
621
|
-
scopeKind String
|
|
622
|
-
at DateTime @default(now())
|
|
623
|
-
|
|
624
|
-
@@index([agentId, at])
|
|
625
|
-
}
|
|
626
|
-
|
|
627
593
|
// ─── Agent GitHub Installations Snapshot ────────────────────────────────────
|
|
628
594
|
// One row per agent holding the agent's most recently reported GitHub App
|
|
629
595
|
// installations (owner, installation id, state, sanitized lastError). PUT
|
package/src/admin-boot.ts
CHANGED
|
@@ -104,7 +104,6 @@ import {
|
|
|
104
104
|
} from "./installation-ports.ts";
|
|
105
105
|
import { CronRunNowService } from "./cron-run-now.ts";
|
|
106
106
|
import { parseCronRunNowConfig } from "./cron-run-now-config.ts";
|
|
107
|
-
import { CronRunTranscriptService } from "./cron-run-transcripts.ts";
|
|
108
107
|
import { isDevAuthAllowed } from "./dev-auth-guard.ts";
|
|
109
108
|
import { HttpGithubAppProvisioningClient } from "./github-app-provisioning-client.ts";
|
|
110
109
|
import {
|
|
@@ -140,7 +139,6 @@ import { SpecialtyTypes } from "./specialty-types.ts";
|
|
|
140
139
|
import { runStartupPolicyReconcile } from "./startup-policy-reconcile.ts";
|
|
141
140
|
import { runTemplateSeed } from "./template-seed.ts";
|
|
142
141
|
import { makeStrictTokenCrypto, makeTokenCrypto } from "./token-crypto.ts";
|
|
143
|
-
import { parseTranscriptConfig } from "./transcript-config.ts";
|
|
144
142
|
import {
|
|
145
143
|
resolveTrialExpirySweepIntervalMs,
|
|
146
144
|
TrialExpirySweeper,
|
|
@@ -372,9 +370,6 @@ export async function startAdmin(
|
|
|
372
370
|
// Cron run-now (COS-42.1).
|
|
373
371
|
const cronRunNowConfig = parseCronRunNowConfig(process.env);
|
|
374
372
|
|
|
375
|
-
// Cron-run transcript API (COS-43.1): flag off by default.
|
|
376
|
-
const transcriptConfig = parseTranscriptConfig(process.env);
|
|
377
|
-
|
|
378
373
|
// Per-repo GitHub access check (COS-44.1): flag off by default.
|
|
379
374
|
const repoAccessConfig = parseRepoAccessConfig(process.env);
|
|
380
375
|
|
|
@@ -546,8 +541,6 @@ export async function startAdmin(
|
|
|
546
541
|
adminApiKeys,
|
|
547
542
|
agentTokenService,
|
|
548
543
|
anthropicFederationEnabled,
|
|
549
|
-
transcriptUploadEnabled: transcriptConfig.enabled,
|
|
550
|
-
loopTranscriptAgentIds: transcriptConfig.loopAgentIds,
|
|
551
544
|
repoAccessCheckEnabled: repoAccessConfig.enabled,
|
|
552
545
|
},
|
|
553
546
|
adminApi: {
|
|
@@ -601,10 +594,6 @@ export async function startAdmin(
|
|
|
601
594
|
store: new CronRunNowService(prisma),
|
|
602
595
|
},
|
|
603
596
|
...(chatClient ? { chatClient } : {}),
|
|
604
|
-
transcripts: {
|
|
605
|
-
config: transcriptConfig,
|
|
606
|
-
store: new CronRunTranscriptService(prisma),
|
|
607
|
-
},
|
|
608
597
|
...resolvedExtensions.apiDeps,
|
|
609
598
|
},
|
|
610
599
|
doc: {
|
package/src/agents-api.ts
CHANGED
|
@@ -98,10 +98,6 @@ import {
|
|
|
98
98
|
type CronRunNowDeps,
|
|
99
99
|
registerCronRunNowRoutes,
|
|
100
100
|
} from "./cron-run-now.ts";
|
|
101
|
-
import {
|
|
102
|
-
type CronRunTranscriptDeps,
|
|
103
|
-
registerCronRunTranscriptRoutes,
|
|
104
|
-
} from "./cron-run-transcripts.ts";
|
|
105
101
|
import {
|
|
106
102
|
creatorFromScope,
|
|
107
103
|
type MemberCreator,
|
|
@@ -396,11 +392,6 @@ export interface AdminDeps {
|
|
|
396
392
|
* route 503s, even with the flag on.
|
|
397
393
|
*/
|
|
398
394
|
chatClient?: AskChatClient;
|
|
399
|
-
/**
|
|
400
|
-
* Cron-run transcripts (COS-43.1): flag config + store. Absent or flag off
|
|
401
|
-
* -> the transcript routes 404. See cron-run-transcripts.ts.
|
|
402
|
-
*/
|
|
403
|
-
transcripts?: CronRunTranscriptDeps;
|
|
404
395
|
}
|
|
405
396
|
|
|
406
397
|
export type { AdminApiKey };
|
|
@@ -3311,10 +3302,6 @@ export function createAdminApp(deps: AdminDeps): OpenAPIHono<AdminAuthEnv> {
|
|
|
3311
3302
|
|
|
3312
3303
|
registerCronRunNowRoutes(app, { cronRunNow: deps.cronRunNow });
|
|
3313
3304
|
|
|
3314
|
-
// ─── Cron-run transcripts (COS-43.1) ──────────────────────────────────────
|
|
3315
|
-
|
|
3316
|
-
registerCronRunTranscriptRoutes(app, { transcripts: deps.transcripts });
|
|
3317
|
-
|
|
3318
3305
|
// ─── Plugins ───────────────────────────────────────────────────────────────
|
|
3319
3306
|
|
|
3320
3307
|
// POST /agents/:id/plugins — add a plugin
|
package/src/api.smoke.test.ts
CHANGED
|
@@ -246,8 +246,6 @@ function buildApp(opts?: {
|
|
|
246
246
|
maxFindings?: number;
|
|
247
247
|
cleanupMergedWorktrees?: boolean;
|
|
248
248
|
cleanupAfterDays?: number;
|
|
249
|
-
transcriptUploadEnabled?: boolean;
|
|
250
|
-
loopTranscriptAgentIds?: string[];
|
|
251
249
|
repoAccessCheckEnabled?: boolean;
|
|
252
250
|
}) {
|
|
253
251
|
const hasAgent = opts?.hasAgent ?? true;
|
|
@@ -322,8 +320,6 @@ function buildApp(opts?: {
|
|
|
322
320
|
agentTokenService: { validate: async () => null },
|
|
323
321
|
sessionSecret: SESSION_SECRET,
|
|
324
322
|
anthropicFederationEnabled: opts?.anthropicFederationEnabled,
|
|
325
|
-
transcriptUploadEnabled: opts?.transcriptUploadEnabled,
|
|
326
|
-
loopTranscriptAgentIds: opts?.loopTranscriptAgentIds,
|
|
327
323
|
repoAccessCheckEnabled: opts?.repoAccessCheckEnabled,
|
|
328
324
|
});
|
|
329
325
|
}
|
|
@@ -358,72 +354,13 @@ describe("GET /:id/config deprecated typeName alias (AGR-6.3)", () => {
|
|
|
358
354
|
});
|
|
359
355
|
});
|
|
360
356
|
|
|
361
|
-
describe("GET /:id/config features
|
|
362
|
-
|
|
363
|
-
|
|
357
|
+
describe("GET /:id/config features", () => {
|
|
358
|
+
test("features default to all off and carry no transcript flags", async () => {
|
|
359
|
+
const res = await buildApp().request(`/${KNOWN_AGENT_ID}/config`, {
|
|
364
360
|
headers: { Authorization: `Bearer ${VALID_ADMIN_KEY}` },
|
|
365
361
|
});
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
const body = await (await get(buildApp())).json();
|
|
369
|
-
expect(body.features).toEqual({
|
|
370
|
-
transcriptUpload: false,
|
|
371
|
-
repoAccessCheck: false,
|
|
372
|
-
loopTranscriptUpload: false,
|
|
373
|
-
});
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
test("features.transcriptUpload follows the transcript flag", async () => {
|
|
377
|
-
const body = await (
|
|
378
|
-
await get(buildApp({ transcriptUploadEnabled: true }))
|
|
379
|
-
).json();
|
|
380
|
-
expect(body.features).toEqual({
|
|
381
|
-
transcriptUpload: true,
|
|
382
|
-
repoAccessCheck: false,
|
|
383
|
-
loopTranscriptUpload: false,
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
describe("GET /:id/config features.loopTranscriptUpload", () => {
|
|
389
|
-
const loopFlag = async (opts: Parameters<typeof buildApp>[0]) => {
|
|
390
|
-
const res = await buildApp(opts).request(`/${KNOWN_AGENT_ID}/config`, {
|
|
391
|
-
headers: { Authorization: `Bearer ${VALID_ADMIN_KEY}` },
|
|
392
|
-
});
|
|
393
|
-
return (await res.json()).features.loopTranscriptUpload;
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
test("truth table: only a listed agent with the transcript flag on is true", async () => {
|
|
397
|
-
expect(await loopFlag({})).toBe(false);
|
|
398
|
-
expect(await loopFlag({ loopTranscriptAgentIds: [] })).toBe(false);
|
|
399
|
-
expect(
|
|
400
|
-
await loopFlag({
|
|
401
|
-
transcriptUploadEnabled: true,
|
|
402
|
-
loopTranscriptAgentIds: ["other-agent"],
|
|
403
|
-
}),
|
|
404
|
-
).toBe(false);
|
|
405
|
-
expect(
|
|
406
|
-
await loopFlag({
|
|
407
|
-
transcriptUploadEnabled: false,
|
|
408
|
-
loopTranscriptAgentIds: [KNOWN_AGENT_ID],
|
|
409
|
-
}),
|
|
410
|
-
).toBe(false);
|
|
411
|
-
expect(
|
|
412
|
-
await loopFlag({
|
|
413
|
-
transcriptUploadEnabled: true,
|
|
414
|
-
loopTranscriptAgentIds: [KNOWN_AGENT_ID],
|
|
415
|
-
}),
|
|
416
|
-
).toBe(true);
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
test("leaves features.transcriptUpload untouched", async () => {
|
|
420
|
-
const res = await buildApp({
|
|
421
|
-
transcriptUploadEnabled: false,
|
|
422
|
-
loopTranscriptAgentIds: [KNOWN_AGENT_ID],
|
|
423
|
-
}).request(`/${KNOWN_AGENT_ID}/config`, {
|
|
424
|
-
headers: { Authorization: `Bearer ${VALID_ADMIN_KEY}` },
|
|
425
|
-
});
|
|
426
|
-
expect((await res.json()).features.transcriptUpload).toBe(false);
|
|
362
|
+
const body = await res.json();
|
|
363
|
+
expect(body.features).toEqual({ repoAccessCheck: false });
|
|
427
364
|
});
|
|
428
365
|
});
|
|
429
366
|
|
|
@@ -433,11 +370,7 @@ describe("GET /:id/config features.repoAccessCheck (COS-44.1)", () => {
|
|
|
433
370
|
const res = await app.request(`/${KNOWN_AGENT_ID}/config`, {
|
|
434
371
|
headers: { Authorization: `Bearer ${VALID_ADMIN_KEY}` },
|
|
435
372
|
});
|
|
436
|
-
expect((await res.json()).features).toEqual({
|
|
437
|
-
transcriptUpload: false,
|
|
438
|
-
repoAccessCheck: true,
|
|
439
|
-
loopTranscriptUpload: false,
|
|
440
|
-
});
|
|
373
|
+
expect((await res.json()).features).toEqual({ repoAccessCheck: true });
|
|
441
374
|
});
|
|
442
375
|
});
|
|
443
376
|
|
package/src/api.ts
CHANGED
|
@@ -109,9 +109,7 @@ export interface AgentConfigResponse {
|
|
|
109
109
|
* before it keep compiling; the live handler always populates it.
|
|
110
110
|
*/
|
|
111
111
|
features?: {
|
|
112
|
-
transcriptUpload: boolean;
|
|
113
112
|
repoAccessCheck: boolean;
|
|
114
|
-
loopTranscriptUpload?: boolean;
|
|
115
113
|
};
|
|
116
114
|
}
|
|
117
115
|
|
|
@@ -206,17 +204,6 @@ export interface AgentRuntimeDeps {
|
|
|
206
204
|
agentTokenService: Pick<AgentTokenService, "validate">;
|
|
207
205
|
/** WIF-2.1: Anthropic federation is enabled; defaults to false. */
|
|
208
206
|
anthropicFederationEnabled?: boolean;
|
|
209
|
-
/**
|
|
210
|
-
* COS-43.1: SHIPWRIGHT_TRANSCRIPT_API_ENABLED is on — surfaced to the runtime
|
|
211
|
-
* as `features.transcriptUpload` in the config bundle. Defaults to false.
|
|
212
|
-
*/
|
|
213
|
-
transcriptUploadEnabled?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* SHIPWRIGHT_LOOP_TRANSCRIPT_AGENT_IDS: agent ids whose coding-loop runs
|
|
216
|
-
* upload transcripts. Combined with `transcriptUploadEnabled` into
|
|
217
|
-
* `features.loopTranscriptUpload`. Defaults to none.
|
|
218
|
-
*/
|
|
219
|
-
loopTranscriptAgentIds?: readonly string[];
|
|
220
207
|
/**
|
|
221
208
|
* COS-44.1: SHIPWRIGHT_AGENT_REPO_ACCESS_CHECK_ENABLED is on — surfaced to the
|
|
222
209
|
* runtime as `features.repoAccessCheck` in the config bundle. Defaults to false.
|
|
@@ -410,10 +397,6 @@ export function createAgentRuntimeApp(deps: AgentRuntimeDeps): OpenAPIHono {
|
|
|
410
397
|
cleanupMergedWorktrees: agent.cleanupMergedWorktrees,
|
|
411
398
|
cleanupAfterDays: agent.cleanupAfterDays,
|
|
412
399
|
features: {
|
|
413
|
-
transcriptUpload: deps.transcriptUploadEnabled === true,
|
|
414
|
-
loopTranscriptUpload:
|
|
415
|
-
deps.transcriptUploadEnabled === true &&
|
|
416
|
-
(deps.loopTranscriptAgentIds ?? []).includes(agent.id),
|
|
417
400
|
repoAccessCheck: deps.repoAccessCheckEnabled === true,
|
|
418
401
|
},
|
|
419
402
|
};
|