@vouched-dev/schema 0.1.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/LICENSE +202 -0
- package/README.md +12 -0
- package/dist/agent-id.d.ts +13 -0
- package/dist/agent-id.js +29 -0
- package/dist/api.d.ts +475 -0
- package/dist/api.js +260 -0
- package/dist/base64url.d.ts +4 -0
- package/dist/base64url.js +43 -0
- package/dist/credential.d.ts +85 -0
- package/dist/credential.js +67 -0
- package/dist/db/agents.d.ts +128 -0
- package/dist/db/agents.js +31 -0
- package/dist/db/client.d.ts +1443 -0
- package/dist/db/client.js +28 -0
- package/dist/db/credentials.d.ts +143 -0
- package/dist/db/credentials.js +16 -0
- package/dist/db/events.d.ts +160 -0
- package/dist/db/events.js +23 -0
- package/dist/db/feed-items.d.ts +109 -0
- package/dist/db/feed-items.js +16 -0
- package/dist/db/index.d.ts +43 -0
- package/dist/db/index.js +17 -0
- package/dist/db/migrate.d.ts +1 -0
- package/dist/db/migrate.js +30 -0
- package/dist/db/migrator.d.ts +2 -0
- package/dist/db/migrator.js +20 -0
- package/dist/db/operators.d.ts +109 -0
- package/dist/db/operators.js +11 -0
- package/dist/db/quota-counters.d.ts +92 -0
- package/dist/db/quota-counters.js +11 -0
- package/dist/db/ratings.d.ts +160 -0
- package/dist/db/ratings.js +27 -0
- package/dist/db/scores.d.ts +160 -0
- package/dist/db/scores.js +15 -0
- package/dist/db/task-outcomes.d.ts +126 -0
- package/dist/db/task-outcomes.js +18 -0
- package/dist/db/tasks.d.ts +251 -0
- package/dist/db/tasks.js +26 -0
- package/dist/db/timestamps.d.ts +4 -0
- package/dist/db/timestamps.js +24 -0
- package/dist/db/url.d.ts +12 -0
- package/dist/db/url.js +25 -0
- package/dist/dimensions.d.ts +20 -0
- package/dist/dimensions.js +11 -0
- package/dist/envelope.d.ts +16 -0
- package/dist/envelope.js +70 -0
- package/dist/events.d.ts +153 -0
- package/dist/events.js +96 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/tasks.d.ts +46 -0
- package/dist/tasks.js +41 -0
- package/package.json +52 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MAX_EVENTS_PER_BATCH = 500;
|
|
3
|
+
export declare const MAX_ENVELOPE_CHARS = 4096;
|
|
4
|
+
export declare const MAX_TASK_SPEC_BYTES = 16384;
|
|
5
|
+
export declare const MAX_SUBMISSION_BYTES = 65536;
|
|
6
|
+
export declare const MAX_TASK_ENVELOPE_CHARS = 131072;
|
|
7
|
+
export declare const TASK_DEFAULT_TTL_HOURS = 24;
|
|
8
|
+
export declare const TASK_MAX_TTL_DAYS = 7;
|
|
9
|
+
export declare const AgentParams: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const TaskParams: z.ZodObject<{
|
|
13
|
+
id: z.ZodUUID;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
export declare const SignedTaskRequest: z.ZodObject<{
|
|
16
|
+
envelope: z.ZodString;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export type SignedTaskRequest = z.infer<typeof SignedTaskRequest>;
|
|
19
|
+
export declare const RegisterAgentRequest: z.ZodObject<{
|
|
20
|
+
publicKey: z.ZodString;
|
|
21
|
+
githubToken: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
version: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type RegisterAgentRequest = z.infer<typeof RegisterAgentRequest>;
|
|
26
|
+
export declare const AgentResponse: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
version: z.ZodString;
|
|
30
|
+
operator: z.ZodObject<{
|
|
31
|
+
login: z.ZodString;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
createdAt: z.ZodISODateTime;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export type AgentResponse = z.infer<typeof AgentResponse>;
|
|
36
|
+
export declare const AgentCardResponse: z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
capabilities: z.ZodObject<{
|
|
39
|
+
extensions: z.ZodArray<z.ZodObject<{
|
|
40
|
+
uri: z.ZodString;
|
|
41
|
+
description: z.ZodOptional<z.ZodString>;
|
|
42
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
|
+
}, z.core.$loose>>;
|
|
44
|
+
}, z.core.$loose>;
|
|
45
|
+
}, z.core.$loose>;
|
|
46
|
+
export type AgentCardResponse = z.infer<typeof AgentCardResponse>;
|
|
47
|
+
export declare const EventsBatchRequest: z.ZodObject<{
|
|
48
|
+
envelopes: z.ZodArray<z.ZodString>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export type EventsBatchRequest = z.infer<typeof EventsBatchRequest>;
|
|
51
|
+
export declare const EventsBatchResponse: z.ZodObject<{
|
|
52
|
+
accepted: z.ZodInt;
|
|
53
|
+
duplicates: z.ZodInt;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export type EventsBatchResponse = z.infer<typeof EventsBatchResponse>;
|
|
56
|
+
export declare const PostTaskRequest: z.ZodObject<{
|
|
57
|
+
taskId: z.ZodUUID;
|
|
58
|
+
taskType: z.ZodString;
|
|
59
|
+
spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
60
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"hash">;
|
|
62
|
+
sha256: z.ZodString;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"schema">;
|
|
65
|
+
jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"counterparty">;
|
|
68
|
+
}, z.core.$strict>], "kind">;
|
|
69
|
+
expiresAt: z.ZodOptional<z.ZodISODateTime>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
export type PostTaskRequest = z.infer<typeof PostTaskRequest>;
|
|
72
|
+
export declare const TaskResponse: z.ZodObject<{
|
|
73
|
+
id: z.ZodUUID;
|
|
74
|
+
posterAgentId: z.ZodString;
|
|
75
|
+
claimantAgentId: z.ZodNullable<z.ZodString>;
|
|
76
|
+
taskType: z.ZodString;
|
|
77
|
+
spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
78
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"hash">;
|
|
80
|
+
sha256: z.ZodString;
|
|
81
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"schema">;
|
|
83
|
+
jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
84
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
85
|
+
kind: z.ZodLiteral<"counterparty">;
|
|
86
|
+
}, z.core.$strict>], "kind">;
|
|
87
|
+
state: z.ZodEnum<{
|
|
88
|
+
claimed: "claimed";
|
|
89
|
+
expired: "expired";
|
|
90
|
+
open: "open";
|
|
91
|
+
submitted: "submitted";
|
|
92
|
+
verified: "verified";
|
|
93
|
+
}>;
|
|
94
|
+
postedAt: z.ZodISODateTime;
|
|
95
|
+
claimedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
96
|
+
submittedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
97
|
+
verifiedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
98
|
+
expiresAt: z.ZodISODateTime;
|
|
99
|
+
submission: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export type TaskResponse = z.infer<typeof TaskResponse>;
|
|
102
|
+
export declare const ClaimTaskRequest: z.ZodObject<{
|
|
103
|
+
taskId: z.ZodUUID;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export type ClaimTaskRequest = z.infer<typeof ClaimTaskRequest>;
|
|
106
|
+
export declare const SubmitTaskRequest: z.ZodObject<{
|
|
107
|
+
taskId: z.ZodUUID;
|
|
108
|
+
submission: z.ZodString;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
export type SubmitTaskRequest = z.infer<typeof SubmitTaskRequest>;
|
|
111
|
+
export declare const TaskOutcomeRequest: z.ZodObject<{
|
|
112
|
+
taskId: z.ZodUUID;
|
|
113
|
+
outcome: z.ZodEnum<{
|
|
114
|
+
failure: "failure";
|
|
115
|
+
success: "success";
|
|
116
|
+
}>;
|
|
117
|
+
evidenceHash: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export type TaskOutcomeRequest = z.infer<typeof TaskOutcomeRequest>;
|
|
120
|
+
export declare const ListTasksQuery: z.ZodObject<{
|
|
121
|
+
state: z.ZodDefault<z.ZodEnum<{
|
|
122
|
+
claimed: "claimed";
|
|
123
|
+
expired: "expired";
|
|
124
|
+
open: "open";
|
|
125
|
+
submitted: "submitted";
|
|
126
|
+
verified: "verified";
|
|
127
|
+
}>>;
|
|
128
|
+
taskType: z.ZodOptional<z.ZodString>;
|
|
129
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
130
|
+
}, z.core.$strict>;
|
|
131
|
+
export type ListTasksQuery = z.infer<typeof ListTasksQuery>;
|
|
132
|
+
export declare const ListTasksResponse: z.ZodObject<{
|
|
133
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
134
|
+
id: z.ZodUUID;
|
|
135
|
+
posterAgentId: z.ZodString;
|
|
136
|
+
claimantAgentId: z.ZodNullable<z.ZodString>;
|
|
137
|
+
taskType: z.ZodString;
|
|
138
|
+
spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
139
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
140
|
+
kind: z.ZodLiteral<"hash">;
|
|
141
|
+
sha256: z.ZodString;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
kind: z.ZodLiteral<"schema">;
|
|
144
|
+
jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
kind: z.ZodLiteral<"counterparty">;
|
|
147
|
+
}, z.core.$strict>], "kind">;
|
|
148
|
+
state: z.ZodEnum<{
|
|
149
|
+
claimed: "claimed";
|
|
150
|
+
expired: "expired";
|
|
151
|
+
open: "open";
|
|
152
|
+
submitted: "submitted";
|
|
153
|
+
verified: "verified";
|
|
154
|
+
}>;
|
|
155
|
+
postedAt: z.ZodISODateTime;
|
|
156
|
+
claimedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
157
|
+
submittedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
158
|
+
verifiedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
159
|
+
expiresAt: z.ZodISODateTime;
|
|
160
|
+
submission: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
export type ListTasksResponse = z.infer<typeof ListTasksResponse>;
|
|
164
|
+
export declare const SignedRatingRequest: z.ZodObject<{
|
|
165
|
+
envelope: z.ZodString;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
export type SignedRatingRequest = z.infer<typeof SignedRatingRequest>;
|
|
168
|
+
export declare const RatingValue: z.ZodInt;
|
|
169
|
+
export type RatingValue = z.infer<typeof RatingValue>;
|
|
170
|
+
export declare const RatingRequest: z.ZodObject<{
|
|
171
|
+
rateeAgentId: z.ZodString;
|
|
172
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
173
|
+
cost_latency: "cost_latency";
|
|
174
|
+
provenance: "provenance";
|
|
175
|
+
reliability: "reliability";
|
|
176
|
+
safety: "safety";
|
|
177
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
178
|
+
value: z.ZodInt;
|
|
179
|
+
issuedAt: z.ZodISODateTime;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
export type RatingRequest = z.infer<typeof RatingRequest>;
|
|
182
|
+
export declare const RatingResponse: z.ZodObject<{
|
|
183
|
+
rateeAgentId: z.ZodString;
|
|
184
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
185
|
+
cost_latency: "cost_latency";
|
|
186
|
+
provenance: "provenance";
|
|
187
|
+
reliability: "reliability";
|
|
188
|
+
safety: "safety";
|
|
189
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
190
|
+
value: z.ZodInt;
|
|
191
|
+
raterScoreAtTime: z.ZodNumber;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
export type RatingResponse = z.infer<typeof RatingResponse>;
|
|
194
|
+
export declare const ScoreEntry: z.ZodObject<{
|
|
195
|
+
version: z.ZodString;
|
|
196
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
197
|
+
cost_latency: "cost_latency";
|
|
198
|
+
provenance: "provenance";
|
|
199
|
+
reliability: "reliability";
|
|
200
|
+
safety: "safety";
|
|
201
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
202
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
windowStart: z.ZodNullable<z.ZodISODateTime>;
|
|
204
|
+
windowEnd: z.ZodNullable<z.ZodISODateTime>;
|
|
205
|
+
computedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
export type ScoreEntry = z.infer<typeof ScoreEntry>;
|
|
208
|
+
export declare const ScoreResponse: z.ZodObject<{
|
|
209
|
+
agentId: z.ZodString;
|
|
210
|
+
scores: z.ZodArray<z.ZodObject<{
|
|
211
|
+
version: z.ZodString;
|
|
212
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
213
|
+
cost_latency: "cost_latency";
|
|
214
|
+
provenance: "provenance";
|
|
215
|
+
reliability: "reliability";
|
|
216
|
+
safety: "safety";
|
|
217
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
218
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
219
|
+
windowStart: z.ZodNullable<z.ZodISODateTime>;
|
|
220
|
+
windowEnd: z.ZodNullable<z.ZodISODateTime>;
|
|
221
|
+
computedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
export type ScoreResponse = z.infer<typeof ScoreResponse>;
|
|
225
|
+
export declare const CredentialResponse: z.ZodObject<{
|
|
226
|
+
credential: z.ZodString;
|
|
227
|
+
payload: z.ZodObject<{
|
|
228
|
+
iss: z.ZodLiteral<"vouched.run">;
|
|
229
|
+
sub: z.ZodString;
|
|
230
|
+
iat: z.ZodInt;
|
|
231
|
+
exp: z.ZodInt;
|
|
232
|
+
version: z.ZodString;
|
|
233
|
+
scores: z.ZodRecord<z.ZodUnion<readonly [z.ZodEnum<{
|
|
234
|
+
cost_latency: "cost_latency";
|
|
235
|
+
provenance: "provenance";
|
|
236
|
+
reliability: "reliability";
|
|
237
|
+
safety: "safety";
|
|
238
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]> & z.core.$partial, z.ZodNullable<z.ZodNumber>>;
|
|
239
|
+
counts: z.ZodObject<{
|
|
240
|
+
events: z.ZodInt;
|
|
241
|
+
verified_tasks: z.ZodInt;
|
|
242
|
+
}, z.core.$strict>;
|
|
243
|
+
}, z.core.$strict>;
|
|
244
|
+
}, z.core.$strict>;
|
|
245
|
+
export type CredentialResponse = z.infer<typeof CredentialResponse>;
|
|
246
|
+
export declare const LeaderboardQuery: z.ZodObject<{
|
|
247
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
248
|
+
cost_latency: "cost_latency";
|
|
249
|
+
provenance: "provenance";
|
|
250
|
+
reliability: "reliability";
|
|
251
|
+
safety: "safety";
|
|
252
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
253
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
export type LeaderboardQuery = z.infer<typeof LeaderboardQuery>;
|
|
256
|
+
export declare const LeaderboardEntry: z.ZodObject<{
|
|
257
|
+
rank: z.ZodInt;
|
|
258
|
+
agentId: z.ZodString;
|
|
259
|
+
name: z.ZodString;
|
|
260
|
+
operator: z.ZodObject<{
|
|
261
|
+
login: z.ZodString;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
version: z.ZodString;
|
|
264
|
+
value: z.ZodNumber;
|
|
265
|
+
verifiedTasks: z.ZodInt;
|
|
266
|
+
}, z.core.$strict>;
|
|
267
|
+
export type LeaderboardEntry = z.infer<typeof LeaderboardEntry>;
|
|
268
|
+
export declare const LeaderboardResponse: z.ZodObject<{
|
|
269
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
270
|
+
cost_latency: "cost_latency";
|
|
271
|
+
provenance: "provenance";
|
|
272
|
+
reliability: "reliability";
|
|
273
|
+
safety: "safety";
|
|
274
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
275
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
276
|
+
rank: z.ZodInt;
|
|
277
|
+
agentId: z.ZodString;
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
operator: z.ZodObject<{
|
|
280
|
+
login: z.ZodString;
|
|
281
|
+
}, z.core.$strict>;
|
|
282
|
+
version: z.ZodString;
|
|
283
|
+
value: z.ZodNumber;
|
|
284
|
+
verifiedTasks: z.ZodInt;
|
|
285
|
+
}, z.core.$strict>>;
|
|
286
|
+
}, z.core.$strict>;
|
|
287
|
+
export type LeaderboardResponse = z.infer<typeof LeaderboardResponse>;
|
|
288
|
+
export declare const FeedKind: z.ZodEnum<{
|
|
289
|
+
flag: "flag";
|
|
290
|
+
registration: "registration";
|
|
291
|
+
score_change: "score_change";
|
|
292
|
+
task_verified: "task_verified";
|
|
293
|
+
}>;
|
|
294
|
+
export type FeedKind = z.infer<typeof FeedKind>;
|
|
295
|
+
export declare const FeedFlagCode: z.ZodEnum<{
|
|
296
|
+
outcome_disagreement: "outcome_disagreement";
|
|
297
|
+
}>;
|
|
298
|
+
export type FeedFlagCode = z.infer<typeof FeedFlagCode>;
|
|
299
|
+
export declare const FeedPayloads: {
|
|
300
|
+
registration: z.ZodObject<{
|
|
301
|
+
agentId: z.ZodString;
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
version: z.ZodString;
|
|
304
|
+
}, z.core.$strict>;
|
|
305
|
+
task_verified: z.ZodObject<{
|
|
306
|
+
agentId: z.ZodString;
|
|
307
|
+
name: z.ZodString;
|
|
308
|
+
taskId: z.ZodUUID;
|
|
309
|
+
taskType: z.ZodString;
|
|
310
|
+
}, z.core.$strict>;
|
|
311
|
+
score_change: z.ZodObject<{
|
|
312
|
+
agentId: z.ZodString;
|
|
313
|
+
name: z.ZodString;
|
|
314
|
+
version: z.ZodString;
|
|
315
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
316
|
+
cost_latency: "cost_latency";
|
|
317
|
+
provenance: "provenance";
|
|
318
|
+
reliability: "reliability";
|
|
319
|
+
safety: "safety";
|
|
320
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
321
|
+
old: z.ZodNullable<z.ZodNumber>;
|
|
322
|
+
new: z.ZodNumber;
|
|
323
|
+
}, z.core.$strict>;
|
|
324
|
+
flag: z.ZodObject<{
|
|
325
|
+
agentId: z.ZodString;
|
|
326
|
+
name: z.ZodString;
|
|
327
|
+
code: z.ZodEnum<{
|
|
328
|
+
outcome_disagreement: "outcome_disagreement";
|
|
329
|
+
}>;
|
|
330
|
+
taskId: z.ZodUUID;
|
|
331
|
+
}, z.core.$strict>;
|
|
332
|
+
};
|
|
333
|
+
export type FeedPayload<K extends FeedKind> = z.infer<(typeof FeedPayloads)[K]>;
|
|
334
|
+
export declare const FeedItem: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
335
|
+
id: z.ZodInt;
|
|
336
|
+
kind: z.ZodLiteral<"registration">;
|
|
337
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
338
|
+
payload: z.ZodObject<{
|
|
339
|
+
agentId: z.ZodString;
|
|
340
|
+
name: z.ZodString;
|
|
341
|
+
version: z.ZodString;
|
|
342
|
+
}, z.core.$strict>;
|
|
343
|
+
createdAt: z.ZodISODateTime;
|
|
344
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
345
|
+
id: z.ZodInt;
|
|
346
|
+
kind: z.ZodLiteral<"task_verified">;
|
|
347
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
348
|
+
payload: z.ZodObject<{
|
|
349
|
+
agentId: z.ZodString;
|
|
350
|
+
name: z.ZodString;
|
|
351
|
+
taskId: z.ZodUUID;
|
|
352
|
+
taskType: z.ZodString;
|
|
353
|
+
}, z.core.$strict>;
|
|
354
|
+
createdAt: z.ZodISODateTime;
|
|
355
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
|
+
id: z.ZodInt;
|
|
357
|
+
kind: z.ZodLiteral<"score_change">;
|
|
358
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
359
|
+
payload: z.ZodObject<{
|
|
360
|
+
agentId: z.ZodString;
|
|
361
|
+
name: z.ZodString;
|
|
362
|
+
version: z.ZodString;
|
|
363
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
364
|
+
cost_latency: "cost_latency";
|
|
365
|
+
provenance: "provenance";
|
|
366
|
+
reliability: "reliability";
|
|
367
|
+
safety: "safety";
|
|
368
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
369
|
+
old: z.ZodNullable<z.ZodNumber>;
|
|
370
|
+
new: z.ZodNumber;
|
|
371
|
+
}, z.core.$strict>;
|
|
372
|
+
createdAt: z.ZodISODateTime;
|
|
373
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
374
|
+
id: z.ZodInt;
|
|
375
|
+
kind: z.ZodLiteral<"flag">;
|
|
376
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
377
|
+
payload: z.ZodObject<{
|
|
378
|
+
agentId: z.ZodString;
|
|
379
|
+
name: z.ZodString;
|
|
380
|
+
code: z.ZodEnum<{
|
|
381
|
+
outcome_disagreement: "outcome_disagreement";
|
|
382
|
+
}>;
|
|
383
|
+
taskId: z.ZodUUID;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
createdAt: z.ZodISODateTime;
|
|
386
|
+
}, z.core.$strict>], "kind">;
|
|
387
|
+
export type FeedItem = z.infer<typeof FeedItem>;
|
|
388
|
+
export declare const FEED_RECENT_MAX = 200;
|
|
389
|
+
export declare const FeedRecentQuery: z.ZodObject<{
|
|
390
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
391
|
+
}, z.core.$strict>;
|
|
392
|
+
export type FeedRecentQuery = z.infer<typeof FeedRecentQuery>;
|
|
393
|
+
export declare const FeedRecentResponse: z.ZodObject<{
|
|
394
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
395
|
+
id: z.ZodInt;
|
|
396
|
+
kind: z.ZodLiteral<"registration">;
|
|
397
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
398
|
+
payload: z.ZodObject<{
|
|
399
|
+
agentId: z.ZodString;
|
|
400
|
+
name: z.ZodString;
|
|
401
|
+
version: z.ZodString;
|
|
402
|
+
}, z.core.$strict>;
|
|
403
|
+
createdAt: z.ZodISODateTime;
|
|
404
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
405
|
+
id: z.ZodInt;
|
|
406
|
+
kind: z.ZodLiteral<"task_verified">;
|
|
407
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
408
|
+
payload: z.ZodObject<{
|
|
409
|
+
agentId: z.ZodString;
|
|
410
|
+
name: z.ZodString;
|
|
411
|
+
taskId: z.ZodUUID;
|
|
412
|
+
taskType: z.ZodString;
|
|
413
|
+
}, z.core.$strict>;
|
|
414
|
+
createdAt: z.ZodISODateTime;
|
|
415
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
416
|
+
id: z.ZodInt;
|
|
417
|
+
kind: z.ZodLiteral<"score_change">;
|
|
418
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
419
|
+
payload: z.ZodObject<{
|
|
420
|
+
agentId: z.ZodString;
|
|
421
|
+
name: z.ZodString;
|
|
422
|
+
version: z.ZodString;
|
|
423
|
+
dimension: z.ZodUnion<readonly [z.ZodEnum<{
|
|
424
|
+
cost_latency: "cost_latency";
|
|
425
|
+
provenance: "provenance";
|
|
426
|
+
reliability: "reliability";
|
|
427
|
+
safety: "safety";
|
|
428
|
+
}>, z.ZodTemplateLiteral<`competence:${string}`>]>;
|
|
429
|
+
old: z.ZodNullable<z.ZodNumber>;
|
|
430
|
+
new: z.ZodNumber;
|
|
431
|
+
}, z.core.$strict>;
|
|
432
|
+
createdAt: z.ZodISODateTime;
|
|
433
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
434
|
+
id: z.ZodInt;
|
|
435
|
+
kind: z.ZodLiteral<"flag">;
|
|
436
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
437
|
+
payload: z.ZodObject<{
|
|
438
|
+
agentId: z.ZodString;
|
|
439
|
+
name: z.ZodString;
|
|
440
|
+
code: z.ZodEnum<{
|
|
441
|
+
outcome_disagreement: "outcome_disagreement";
|
|
442
|
+
}>;
|
|
443
|
+
taskId: z.ZodUUID;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
createdAt: z.ZodISODateTime;
|
|
446
|
+
}, z.core.$strict>], "kind">>;
|
|
447
|
+
}, z.core.$strict>;
|
|
448
|
+
export type FeedRecentResponse = z.infer<typeof FeedRecentResponse>;
|
|
449
|
+
export declare const StatsResponse: z.ZodObject<{
|
|
450
|
+
agents: z.ZodInt;
|
|
451
|
+
verifiedTasks: z.ZodInt;
|
|
452
|
+
eventsLast24h: z.ZodInt;
|
|
453
|
+
}, z.core.$strict>;
|
|
454
|
+
export type StatsResponse = z.infer<typeof StatsResponse>;
|
|
455
|
+
export declare const ScoreRunResponse: z.ZodObject<{
|
|
456
|
+
scored: z.ZodInt;
|
|
457
|
+
}, z.core.$strict>;
|
|
458
|
+
export type ScoreRunResponse = z.infer<typeof ScoreRunResponse>;
|
|
459
|
+
export declare const ErrorIssue: z.ZodObject<{
|
|
460
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
461
|
+
code: z.ZodString;
|
|
462
|
+
message: z.ZodString;
|
|
463
|
+
}, z.core.$strict>;
|
|
464
|
+
export declare const ErrorResponse: z.ZodObject<{
|
|
465
|
+
error: z.ZodObject<{
|
|
466
|
+
code: z.ZodString;
|
|
467
|
+
message: z.ZodString;
|
|
468
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
469
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
470
|
+
code: z.ZodString;
|
|
471
|
+
message: z.ZodString;
|
|
472
|
+
}, z.core.$strict>>>;
|
|
473
|
+
}, z.core.$strict>;
|
|
474
|
+
}, z.core.$strict>;
|
|
475
|
+
export type ErrorResponse = z.infer<typeof ErrorResponse>;
|