-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
256 lines (238 loc) · 6.22 KB
/
index.ts
File metadata and controls
256 lines (238 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
import type { ArtifactPreview, ArtifactProvenance } from "./runtime-contracts.js"
export * from "./artifact-manifest.js"
export * from "./artifact-references.js"
export * from "./runtime-contracts.js"
export * from "./runtime-policy.js"
export * from "./workspace-policy.js"
export * from "./sandbox-tool-policy.js"
export * from "./command-registry.js"
export * from "./task-input.js"
export * from "./browser-interaction.js"
export * from "./browser-review-bridge.js"
export * from "./recipe-schema.js"
export * from "./recipe-builders.js"
export * from "./benchmark-contracts.js"
export * from "./benchmark-substrate.js"
export * from "./runtime-episode.js"
export * from "./runtime-reference.js"
export * from "./object-utils.js"
export * from "./runtime-action-adapter.js"
export * from "./artifact-bundle-verifier.js"
export * from "./transfer-proof.js"
export * from "./host-tool-registry.js"
export * from "./run-registry.js"
export type ArtifactReviewProgressEventType =
| "boot"
| "mount"
| "agent-start"
| "tool-activity"
| "artifact"
| "complete"
| (string & {})
export interface ArtifactReviewProgressEvent {
type: ArtifactReviewProgressEventType
label: string
component?: string
action?: string
timestamp?: string
}
export type ArtifactReviewActionKind = "approve" | "approve-files" | "discard" | "iterate" | (string & {})
export interface ArtifactReviewAction {
kind: ArtifactReviewActionKind
label: string
requiresApprovedFiles?: boolean
}
export interface ArtifactReviewChangedFile {
path: string
status: "added" | "modified" | "deleted"
label: string
mountTarget: string
relativePath: string
}
export interface ArtifactReview {
schema: "wp-codebox/artifact-review/v1"
artifactId: string
createdAt: string
provenance: ArtifactProvenance
summary: string
stats: {
added: number
modified: number
deleted: number
total: number
}
changedFiles: ArtifactReviewChangedFile[]
preview?: ArtifactPreview
progress: ArtifactReviewProgressEvent[]
actions: ArtifactReviewAction[]
evidence: {
workspacePatch: string
patch: string
patchSha256: string
artifactContentDigest: string
changedFiles: string
diagnostics?: string
testResults?: string
runtimeEpisodeTrace?: string
runtimeReferenceManifest?: string
runtimeReplayReferenceIndex?: string
previewEvidence?: string
previewSessionEvidence?: string
agentResult?: string
transcript?: string
}
browser?: ArtifactReviewBrowserSummary
redaction?: ArtifactRedactionSummary
riskFlags: string[]
}
export interface ArtifactReviewBrowserSummary {
summary: string
probes: Array<{
url: string
requestedUrl?: string
preview?: {
requestedMode: "local" | "public" | "secure"
effectiveMode: "local" | "public" | "secure"
localOrigin: string
effectiveOrigin: string
publicOrigin?: string
secureContext?: boolean
diagnostics: Array<{
code: string
severity: "error" | "warning" | "info"
message: string
details?: Record<string, unknown>
}>
}
localPreviewOrigin?: string
requestedPreviewOrigin?: string
effectivePreviewOrigin?: string
finalUrl?: string
viewport?: {
width: number
height: number
deviceScaleFactor: number
isMobile: boolean
hasTouch: boolean
userAgent: string
} | null
capabilities?: ArtifactReviewBrowserCapabilities
replayability?: "artifact-backed" | "partial" | "diagnostic-only"
consoleMessages: number
errors: number
html?: string
lifecycle?: string
network?: string
networkEvents?: number
checkpoints?: string
memory?: string
performance?: string
screenshot?: string
console?: string
errorsFile?: string
actions?: string
editorState?: string
actionCount?: number
steps?: string
stepCount?: number
assertions?: {
total: number
passed: number
failed: number
}
summaryFile?: string
}>
}
export interface ArtifactReviewBrowserCapabilities {
secureContext: boolean
userAgent: string
language?: string
languages?: string[]
locale?: string
timezone?: string
viewport: {
width: number
height: number
deviceScaleFactor: number
isMobile: boolean
hasTouch: boolean
} | null
maxTouchPoints: number
paymentRequest: {
available: boolean
}
permissions: Record<string, { state: "granted" | "denied" | "prompt" | "unsupported" | "error" }>
}
export interface ArtifactRedactionArtifactSummary {
path: string
count: number
kinds: string[]
}
export interface ArtifactRedactionSummary {
schema: "wp-codebox/artifact-redaction/v1"
status: "clean" | "redacted"
total: number
byKind: Record<string, number>
artifacts: ArtifactRedactionArtifactSummary[]
}
export interface ArtifactTestResultsRawLogReference {
path: string
kind: string
}
export type ArtifactDiagnosticSeverity = "error" | "warning" | "notice" | "info" | (string & {})
export interface ArtifactDiagnosticRef {
path?: string
kind?: string
id?: string
url?: string
}
export interface ArtifactDiagnostic {
id: string
type: string
severity: ArtifactDiagnosticSeverity
message: string
category?: string
source?: string
path?: string
selector?: string
stage?: string
code?: string
provenance?: Record<string, unknown>
refs?: ArtifactDiagnosticRef[]
details?: Record<string, unknown>
}
export interface ArtifactDiagnostics {
schema: "wp-codebox/artifact-diagnostics/v1"
status: "clean" | "reported"
summary: {
total: number
error: number
warning: number
notice: number
info: number
}
diagnostics: ArtifactDiagnostic[]
}
export interface ArtifactTestResultsSuite {
name: string
status: "passed" | "failed" | "skipped" | "unknown"
tests: number
passed: number
failed: number
skipped: number
unknown: number
rawLogReferences?: ArtifactTestResultsRawLogReference[]
}
export interface ArtifactTestResults {
schema: "wp-codebox/test-results/v1"
status: "passed" | "failed" | "skipped" | "unknown"
summary: {
total: number
passed: number
failed: number
skipped: number
unknown: number
}
suites: ArtifactTestResultsSuite[]
rawLogReferences: ArtifactTestResultsRawLogReference[]
}