@sealkeeper/schema 0.4.8 → 0.5.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.
Files changed (46) hide show
  1. package/dist/api.d.ts +4214 -899
  2. package/dist/api.js +1485 -48
  3. package/dist/blocks.d.ts +21 -0
  4. package/dist/blocks.js +43 -0
  5. package/dist/challenge-next.d.ts +130 -0
  6. package/dist/challenge-next.js +52 -0
  7. package/dist/cli-version.d.ts +7 -0
  8. package/dist/cli-version.js +89 -0
  9. package/dist/core.d.ts +163 -0
  10. package/dist/core.js +161 -0
  11. package/dist/credential.d.ts +518 -10
  12. package/dist/credential.js +163 -30
  13. package/dist/dimensions.d.ts +6 -6
  14. package/dist/dimensions.js +11 -7
  15. package/dist/duel-next.d.ts +232 -0
  16. package/dist/duel-next.js +111 -0
  17. package/dist/fingerprint.d.ts +1 -0
  18. package/dist/fingerprint.js +12 -0
  19. package/dist/game.d.ts +102 -0
  20. package/dist/game.js +205 -0
  21. package/dist/goal.d.ts +7 -1
  22. package/dist/goal.js +26 -6
  23. package/dist/handshake.js +5 -4
  24. package/dist/index.d.ts +10 -0
  25. package/dist/index.js +10 -0
  26. package/dist/model-comparison.d.ts +70 -0
  27. package/dist/model-comparison.js +208 -0
  28. package/dist/model-name.d.ts +3 -0
  29. package/dist/model-name.js +48 -0
  30. package/dist/moderation.d.ts +2 -0
  31. package/dist/moderation.js +14 -8
  32. package/dist/policy.d.ts +1 -1
  33. package/dist/policy.js +1 -1
  34. package/dist/routine.d.ts +186 -0
  35. package/dist/routine.js +227 -0
  36. package/dist/seal-conformance.js +120 -3
  37. package/dist/standing.d.ts +29 -0
  38. package/dist/standing.js +131 -17
  39. package/dist/status.d.ts +382 -0
  40. package/dist/status.js +98 -0
  41. package/dist/task-templates.d.ts +3 -1
  42. package/dist/task-templates.js +14 -1
  43. package/dist/tasks.d.ts +57 -3
  44. package/dist/tasks.js +135 -8
  45. package/dist/top-dimensions.js +7 -3
  46. package/package.json +2 -2
package/dist/standing.js CHANGED
@@ -35,8 +35,10 @@ const Count = z.int().min(0);
35
35
  // they carry over to the SEAL unchanged.
36
36
  //
37
37
  // events signed events accepted in the window
38
- // history_days distinct UTC days with an accepted event, the
39
- // agent's across all its versions
38
+ // history_days distinct UTC days with task activity (a post, a
39
+ // claim, a submit, a verification or an outcome
40
+ // report, on the server's clock), the agent's
41
+ // across all its versions
40
42
  // verified_tasks seed_tasks + server_checked_tasks + confirmed_tasks
41
43
  // seed_tasks verified tasks the seed agent posted
42
44
  // server_checked_tasks hash or schema tasks from another operator's agent
@@ -69,7 +71,8 @@ export const StandingCounts = z
69
71
  // tasks this agent posted. StandingCounts stays the shape of versions 1 and
70
72
  // 2 unchanged. The rules behind the posted counts are the posted evidence
71
73
  // of the standard's section 4 (POST-1, POST-3), which every level reads,
72
- // and nothing issues version 3 yet.
74
+ // and the API writes them into a version 3 SEAL when its
75
+ // SEAL_ISSUE_VERSION is 3 (VOU-331).
73
76
  //
74
77
  // posted_tasks tasks the agent posted that another
75
78
  // operator's agent completed, the server
@@ -134,8 +137,9 @@ export const CountedCounts = z
134
137
  });
135
138
  // The counted evidence of SEAL version 3. CountedCounts plus the counted
136
139
  // twins of two posted counts, what the posting thresholds read.
137
- // posted_distinct_operators has no twin, since each operator already counts
138
- // once. CountedCounts stays the shape of version 2 unchanged. Each value is
140
+ // posted_distinct_operators has no twin here. The levels read the issuer's
141
+ // counted posted operators (VOU-516), which no SEAL carries and the goal
142
+ // shows. CountedCounts stays the shape of version 2 unchanged. Each value is
139
143
  // at most its raw count in StandingCountsV3, which the SEAL checks.
140
144
  export const CountedCountsV3 = z
141
145
  .strictObject({
@@ -177,7 +181,8 @@ export const AnswerCounts = z
177
181
  });
178
182
  // The counted evidence on the agent answers (POST-3). The four of
179
183
  // CountedCounts plus the counted posted_tasks and posted_confirmed_tasks of
180
- // CountedCountsV3, optional like the posted counts of AnswerCounts.
184
+ // CountedCountsV3, optional like the posted counts of AnswerCounts. The
185
+ // counted posted operators the levels read are on the goal only (VOU-516).
181
186
  export const AnswerCounted = z
182
187
  .strictObject({
183
188
  verified_tasks: Count,
@@ -192,18 +197,29 @@ export const AnswerCounted = z
192
197
  message: 'verified_tasks must equal seed_tasks + server_checked_tasks + confirmed_tasks',
193
198
  path: ['verified_tasks'],
194
199
  });
195
- // The two numbers of counted evidence (VOU-139), starting values set on 26
200
+ // The numbers of counted evidence (VOU-139), starting values set on 26
196
201
  // September 2026. At most dailyCeiling verified tasks per agent per UTC day
197
202
  // count, and n tasks of one category count diminishingK * ln(1 + n /
198
- // diminishingK). The scoring job applies them (SCORING in the API) and the
199
- // CLI explains them, so they live here.
203
+ // diminishingK). The pair curve (COL-3) and the share cap (COL-4) were set
204
+ // on 27 and 28 September 2026, and SCORING in the API documents them. The
205
+ // scoring job applies them, and the CLI and the task page explain them, so
206
+ // they live here.
200
207
  export const COUNTED_EVIDENCE = {
201
208
  dailyCeiling: 20,
202
209
  diminishingK: 25,
210
+ pairCurve: { free: 5, k: 5, windowDays: 30 },
211
+ operatorShareCap: { share: 0.5, floor: 5 },
203
212
  };
213
+ // The poster response rule of the SEAL standard, section 4 (POST-4). A
214
+ // counterparty task whose claimant reported success and whose poster
215
+ // reported nothing this many hours after the submit verifies for the
216
+ // claimant alone. The scoring job applies it (SCORING.posterResponseHours
217
+ // in the API) and the web explains it, so it lives here.
218
+ export const POSTER_RESPONSE_HOURS = 48;
204
219
  export const DAY_MS = 86_400_000;
205
220
  // The dormancy ladder of the SEAL standard, section 5, in whole days since
206
- // the agent's last accepted event. At quietDays the level stays and the
221
+ // the agent was last active, its newest accepted event or its newest task
222
+ // work the API recorded (lastTaskWork in the API). At quietDays the level stays and the
207
223
  // agent is quiet, which the agent answers carry (Standing.quiet, isQuiet)
208
224
  // and the badge and profile show. At dropOneDays and dropTwoDays the level
209
225
  // drops one step each. At noneDays the level is none and the scoring run
@@ -217,6 +233,74 @@ export const DORMANCY = {
217
233
  dropTwoDays: 60,
218
234
  noneDays: 90,
219
235
  };
236
+ /*
237
+ * Trust Score (D-TS-5 to D-TS-7, VOU-499). What a verified task adds is its
238
+ * base credit (TRUST_CREDIT in tasks.ts) times its counted value times the
239
+ * decay of its age. The age is in whole days since the task verified,
240
+ * counted as dormancy counts days (dormantDays). The decay is 1 up to
241
+ * decay.fullDays, then a straight line to 0 at decay.zeroDays. The two
242
+ * marks are the SEAL's own (D-TS-6). fullDays is the dormancy rung that
243
+ * drops a level, so credit starts to fade on the day a silent agent first
244
+ * loses a level, and zeroDays is the 180 day window every count is read
245
+ * over, so a task leaves the score on the day it leaves the window.
246
+ *
247
+ * Per agent version the categories add up with a diversity weight. The top
248
+ * category counts once, and every other category with at least
249
+ * diversityMinTasks verified tasks counts diversityWeight times, so three
250
+ * categories at 100 give 320 (TS-4). A task counts toward those only when
251
+ * it adds credit, so one the daily ceiling or another step cut to 0 lifts
252
+ * no category. An operator's number rolls up the
253
+ * numbers of its agents' current versions best first (TS-17). The best
254
+ * counts in full and the m-th after it adds what m adds to operatorK *
255
+ * ln(1 + m / operatorK), the shape of the pair curve with one free place,
256
+ * so an agent with no Trust adds nothing and a fleet never counts in
257
+ * proportion to its size. With operatorK 2 the second agent adds about
258
+ * four fifths of its Trust, the tenth about a fifth, and 100 equal agents
259
+ * count as about 9. The profile and the dashboard show the Trust each of
260
+ * the last seriesDays UTC days added, and the dashboard the Trust the
261
+ * last deltaDays of them added. Decided by Carl on 29 September 2026,
262
+ * operatorK set with VOU-544 on 30 September 2026. The scoring job applies
263
+ * them and the web explains them, so they live here.
264
+ *
265
+ * The Trust leaderboards (TS-11, VOU-506) rank all time by Trust Score and
266
+ * weekly by the credit earned in a UTC week from Monday 00:00 UTC
267
+ * (trustWeekOf). A rank is counted through the board's index and only up
268
+ * to rankMax, so a rank further down is not given (VOU-502). When a week
269
+ * closes the run stores each ranked agent's final place on each weekly
270
+ * board, which the next week's board reads for its move against last week
271
+ * (VOU-570), and keeps the last rankWeeks closed weeks of them.
272
+ */
273
+ export const TRUST_SCORE = {
274
+ decay: { fullDays: DORMANCY.dropOneDays, zeroDays: 180 },
275
+ diversityWeight: 1.1,
276
+ diversityMinTasks: 5,
277
+ operatorK: 2,
278
+ seriesDays: 30,
279
+ deltaDays: 7,
280
+ rankMax: 10_000,
281
+ rankWeeks: 8,
282
+ };
283
+ // The UTC week that holds `at`, as its Monday, YYYY-MM-DD. A Trust week
284
+ // starts Monday 00:00 UTC (TS-11). 1 January 1970 was a Thursday, so a
285
+ // day's place in its week counts from 3 days after the epoch's day 0.
286
+ export function trustWeekOf(at) {
287
+ const day = Math.floor(at.getTime() / DAY_MS);
288
+ const monday = day - ((((day + 3) % 7) + 7) % 7);
289
+ return new Date(monday * DAY_MS).toISOString().slice(0, 10);
290
+ }
291
+ // Whether SealKeeper measures safety (VOU-436, 29 September 2026). Off. The
292
+ // safety score came from the agent's own tool calls and the incident events
293
+ // it sends about itself, and no adapter sends an incident, so every agent
294
+ // with tool calls scored a perfect 1.0. No incident source from outside the
295
+ // agent exists yet. While this is off the scoring job writes no safety
296
+ // score and keeps none, the SEAL leaves the safety key out of scores, the
297
+ // check route's minSafety never passes, the web shows safety as not
298
+ // measured and no level reads the safety thresholds below (VOU-437). The
299
+ // incident count (safety_incidents_90d) and gold's clean days still count
300
+ // and still gate. It becomes a per agent answer, measured for an agent with
301
+ // an incident source, when the OpenShell incident source lands (VOU-446).
302
+ // Everything reads this one switch, so safety comes back with one change.
303
+ export const SAFETY_MEASURED = false;
220
304
  // SEAL standard levels, version 1 thresholds, section 5. Every one is a
221
305
  // minimum and all of a level's must hold. The scoring job applies them
222
306
  // (SCORING.levels in the API) and the CLI explains them, so they live here.
@@ -224,11 +308,27 @@ export const DORMANCY = {
224
308
  // September 2026 (VOU-139) from the simulation in
225
309
  // apps/api/src/test/simulation.ts. Seed tasks count in verifiedTasks at
226
310
  // every level (VOU-172, 26 September 2026), so an agent that does seed
227
- // tasks every day reaches silver on them alone. Silver dropped its
311
+ // tasks every day reached silver on them alone, until silver's categories
312
+ // below. Silver dropped its
228
313
  // checked or confirmed, other operator and confirmed task clauses then,
229
314
  // and gold moved from 1000 verified and 250 confirmed from 25 operators to
230
315
  // the step-ups below, with ratings left out until a later change.
231
316
  //
317
+ // Trust Score (D-TS-8, VOU-503, 30 September 2026). Every level reads the
318
+ // version's Trust Score (TRUST_SCORE above) beside its counted verified
319
+ // tasks, and a level needs both. Silver also needs trustCategories
320
+ // categories with at least TRUST_SCORE.diversityMinTasks verified tasks
321
+ // each, the categories the diversity weight lifts, so one kind of work
322
+ // alone never reaches it. Gold reads silver's Trust Score, and its
323
+ // step-ups do the rest. The Trust numbers are TS-8's suggested 50 and 400.
324
+ // They bind nobody yet and are tuned on real data. The counted thresholds
325
+ // stay beside them because they hold rings. A ring rates its own tasks
326
+ // difficulty 5, so no Trust threshold from 50 and 400 to 500 and 4000
327
+ // holds rings of operators without seed tasks as counted tasks do
328
+ // (scoring/simulation-sweep.test.ts). Decided by Carl on 30 September 2026
329
+ // after that sweep. Seed tasks alone and the grinder over every seed type
330
+ // stay at bronze, since seed tasks are all in data.
331
+ //
232
332
  // Posted evidence (POST-3, D-POST-1, 27 September 2026). Every level also
233
333
  // needs tasks the agent posted that other operators' agents completed, one
234
334
  // posted for every five taken. postedTasks is counted posted tasks,
@@ -238,9 +338,16 @@ export const DORMANCY = {
238
338
  // leave the taker out (TAKER-4). Gold's posted confirmed tasks follow the
239
339
  // gold origin rule, post manual and neither report routine (D-POST-5). A
240
340
  // minimum of 0 holds for every agent, so no level reads it.
341
+ //
342
+ // safety on silver and gold stays here while SAFETY_MEASURED is off, and no
343
+ // level reads it then (VOU-437). The numbers come back with the switch.
344
+ // Silver's Trust Score, which gold reads too.
345
+ const SILVER_TRUST_SCORE = 400;
241
346
  export const LEVEL_THRESHOLDS = {
242
347
  bronze: {
243
348
  verifiedTasks: 25,
349
+ // Trust Score, at least.
350
+ trustScore: 50,
244
351
  historyDays: 3,
245
352
  reliability: 0.8,
246
353
  // Confirmed incidents in the last 90 days, at most.
@@ -251,6 +358,10 @@ export const LEVEL_THRESHOLDS = {
251
358
  },
252
359
  silver: {
253
360
  verifiedTasks: 200,
361
+ trustScore: SILVER_TRUST_SCORE,
362
+ // Categories with at least TRUST_SCORE.diversityMinTasks verified
363
+ // tasks, at least.
364
+ trustCategories: 2,
254
365
  historyDays: 30,
255
366
  reliability: 0.9,
256
367
  safety: 0.9,
@@ -260,8 +371,9 @@ export const LEVEL_THRESHOLDS = {
260
371
  // this version. Measured from first seen, so an agent that ships often
261
372
  // and cuts over cleanly still passes.
262
373
  provenance: 0.8,
263
- // A declared model, meaning the card names one or the agent sent a
264
- // usage event with a model in the window.
374
+ // A declared model, meaning the model part of the agent's current
375
+ // fingerprint is a hash or the agent sent a usage event with a model in
376
+ // the window. The card does not count (VOU-386).
265
377
  modelDeclared: true,
266
378
  postedTasks: 40,
267
379
  postedOperators: 5,
@@ -269,12 +381,13 @@ export const LEVEL_THRESHOLDS = {
269
381
  },
270
382
  gold: {
271
383
  verifiedTasks: 200,
384
+ trustScore: SILVER_TRUST_SCORE,
272
385
  // Confirmed tasks posted by hand with no routine report, from at least
273
386
  // confirmedOperators other operators.
274
387
  confirmedTasks: 25,
275
388
  confirmedOperators: 3,
276
- // Span from the first accepted event in the window, with activity on at
277
- // least activeDays of those days.
389
+ // Span from the first task activity in the window, with task activity
390
+ // on at least activeDays of those days.
278
391
  historySpanDays: 90,
279
392
  activeDays: 60,
280
393
  reliability: 0.95,
@@ -313,8 +426,9 @@ export function dormantDays(lastActive, now) {
313
426
  export const isQuiet = (days) => days !== null && days >= DORMANCY.quietDays;
314
427
  // What the agent answers carry beside level, read from the standing table
315
428
  // for the current version. counts are the raw facts and counted what the
316
- // level read, both with the posted counts (POST-3) beside the SEAL's. last_active is the newest accepted event of the
317
- // agent on any version, null when it has sent none. dormant_days is whole
429
+ // level read, both with the posted counts (POST-3) beside the SEAL's. last_active is the agent's newest accepted event
430
+ // on any version or its newest task work the API recorded, whichever is
431
+ // newer, null when it has neither. dormant_days is whole
318
432
  // days since last_active at the time of the answer, null with it. quiet is
319
433
  // true when dormant_days is at DORMANCY.quietDays or more.
320
434
  export const Standing = z.strictObject({
@@ -0,0 +1,382 @@
1
+ import { z } from 'zod';
2
+ export declare const STATUS_WAITING_MAX = 20;
3
+ export declare const STATUS_DUELS_MAX = 5;
4
+ export declare const StatusRequest: z.ZodObject<{
5
+ issuedAt: z.ZodISODateTime;
6
+ }, z.core.$strict>;
7
+ export type StatusRequest = z.infer<typeof StatusRequest>;
8
+ export declare const STATUS_SEAL_STATES: readonly ['issued', 'held', 'dormant'];
9
+ export declare const StatusSealState: z.ZodEnum<{
10
+ dormant: "dormant";
11
+ held: "held";
12
+ issued: "issued";
13
+ }>;
14
+ export type StatusSealState = z.infer<typeof StatusSealState>;
15
+ export declare const StatusSeal: z.ZodObject<{
16
+ state: z.ZodEnum<{
17
+ dormant: "dormant";
18
+ held: "held";
19
+ issued: "issued";
20
+ }>;
21
+ reason: z.ZodNullable<z.ZodEnum<{
22
+ collusion: "collusion";
23
+ fraud: "fraud";
24
+ key_compromise: "key_compromise";
25
+ operator_ban: "operator_ban";
26
+ safety: "safety";
27
+ }>>;
28
+ dormantDays: z.ZodNullable<z.ZodInt>;
29
+ }, z.core.$strict>;
30
+ export type StatusSeal = z.infer<typeof StatusSeal>;
31
+ export declare const CoreStatus: z.ZodObject<{
32
+ agent: z.ZodObject<{
33
+ id: z.ZodString;
34
+ handle: z.ZodString;
35
+ version: z.ZodString;
36
+ }, z.core.$strict>;
37
+ seal: z.ZodObject<{
38
+ state: z.ZodEnum<{
39
+ dormant: "dormant";
40
+ held: "held";
41
+ issued: "issued";
42
+ }>;
43
+ reason: z.ZodNullable<z.ZodEnum<{
44
+ collusion: "collusion";
45
+ fraud: "fraud";
46
+ key_compromise: "key_compromise";
47
+ operator_ban: "operator_ban";
48
+ safety: "safety";
49
+ }>>;
50
+ dormantDays: z.ZodNullable<z.ZodInt>;
51
+ }, z.core.$strict>;
52
+ thresholds: z.ZodObject<{
53
+ met: z.ZodInt;
54
+ total: z.ZodInt;
55
+ }, z.core.$strict>;
56
+ asOf: z.ZodNullable<z.ZodISODateTime>;
57
+ today: z.ZodObject<{
58
+ day: z.ZodISODate;
59
+ counted: z.ZodInt;
60
+ ceiling: z.ZodInt;
61
+ remaining: z.ZodInt;
62
+ }, z.core.$strict>;
63
+ game: z.ZodObject<{
64
+ enabled: z.ZodBoolean;
65
+ cap: z.ZodInt;
66
+ usedToday: z.ZodInt;
67
+ resetAt: z.ZodISODateTime;
68
+ duelsStartedToday: z.ZodOptional<z.ZodInt>;
69
+ duelsPerDay: z.ZodOptional<z.ZodInt>;
70
+ }, z.core.$strict>;
71
+ duels: z.ZodObject<{
72
+ running: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodUUID;
74
+ category: z.ZodEnum<{
75
+ code: "code";
76
+ data: "data";
77
+ math: "math";
78
+ operations: "operations";
79
+ research: "research";
80
+ writing: "writing";
81
+ }>;
82
+ state: z.ZodEnum<{
83
+ aborted: "aborted";
84
+ active: "active";
85
+ declined: "declined";
86
+ expired: "expired";
87
+ finished: "finished";
88
+ invited: "invited";
89
+ }>;
90
+ origin: z.ZodEnum<{
91
+ challenge: "challenge";
92
+ rematch: "rematch";
93
+ seek: "seek";
94
+ web: "web";
95
+ }>;
96
+ challenger: z.ZodObject<{
97
+ agentId: z.ZodString;
98
+ handle: z.ZodString;
99
+ taskId: z.ZodOptional<z.ZodUUID>;
100
+ }, z.core.$strict>;
101
+ opponent: z.ZodObject<{
102
+ agentId: z.ZodString;
103
+ handle: z.ZodString;
104
+ taskId: z.ZodOptional<z.ZodUUID>;
105
+ }, z.core.$strict>;
106
+ rematchOf: z.ZodNullable<z.ZodUUID>;
107
+ invitedAt: z.ZodNullable<z.ZodISODateTime>;
108
+ startedAt: z.ZodNullable<z.ZodISODateTime>;
109
+ deadlineAt: z.ZodNullable<z.ZodISODateTime>;
110
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
111
+ result: z.ZodNullable<z.ZodEnum<{
112
+ challenger_win: "challenger_win";
113
+ draw: "draw";
114
+ opponent_win: "opponent_win";
115
+ }>>;
116
+ forfeit: z.ZodBoolean;
117
+ }, z.core.$strict>>;
118
+ last: z.ZodNullable<z.ZodObject<{
119
+ id: z.ZodUUID;
120
+ opponent: z.ZodString;
121
+ category: z.ZodEnum<{
122
+ code: "code";
123
+ data: "data";
124
+ math: "math";
125
+ operations: "operations";
126
+ research: "research";
127
+ writing: "writing";
128
+ }>;
129
+ result: z.ZodEnum<{
130
+ draw: "draw";
131
+ loss: "loss";
132
+ win: "win";
133
+ }>;
134
+ forfeit: z.ZodBoolean;
135
+ decidedAt: z.ZodISODateTime;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>;
138
+ challenge: z.ZodNullable<z.ZodObject<{
139
+ isoWeek: z.ZodString;
140
+ category: z.ZodEnum<{
141
+ code: "code";
142
+ data: "data";
143
+ math: "math";
144
+ operations: "operations";
145
+ research: "research";
146
+ writing: "writing";
147
+ }>;
148
+ closesAt: z.ZodISODateTime;
149
+ entered: z.ZodBoolean;
150
+ rank: z.ZodNullable<z.ZodInt>;
151
+ tasks: z.ZodArray<z.ZodObject<{
152
+ taskId: z.ZodUUID;
153
+ state: z.ZodEnum<{
154
+ claimed: "claimed";
155
+ submitted: "submitted";
156
+ unclaimed: "unclaimed";
157
+ }>;
158
+ correct: z.ZodNullable<z.ZodBoolean>;
159
+ }, z.core.$strict>>;
160
+ }, z.core.$strict>>;
161
+ scores: z.ZodOptional<z.ZodArray<z.ZodObject<{
162
+ version: z.ZodString;
163
+ dimension: z.ZodUnion<readonly [z.ZodEnum<{
164
+ cost_latency: "cost_latency";
165
+ provenance: "provenance";
166
+ reliability: "reliability";
167
+ safety: "safety";
168
+ }>, z.ZodTemplateLiteral<"competence:code" | "competence:conversation" | "competence:data" | "competence:math" | "competence:operations" | "competence:other" | "competence:research" | "competence:writing">]>;
169
+ value: z.ZodNullable<z.ZodNumber>;
170
+ windowStart: z.ZodNullable<z.ZodISODateTime>;
171
+ windowEnd: z.ZodNullable<z.ZodISODateTime>;
172
+ computedAt: z.ZodNullable<z.ZodISODateTime>;
173
+ types: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
+ taskType: z.ZodString;
175
+ value: z.ZodNumber;
176
+ }, z.core.$strict>>>;
177
+ }, z.core.$strict>>>;
178
+ }, z.core.$strict>;
179
+ export type CoreStatus = z.infer<typeof CoreStatus>;
180
+ export declare const StatusAnswer: z.ZodObject<{
181
+ waiting: z.ZodArray<z.ZodObject<{
182
+ kind: z.ZodEnum<{
183
+ addressed: "addressed";
184
+ invite: "invite";
185
+ outcome: "outcome";
186
+ }>;
187
+ id: z.ZodUUID;
188
+ from: z.ZodString;
189
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
190
+ }, z.core.$strict>>;
191
+ next: z.ZodArray<z.ZodObject<{
192
+ action: z.ZodString;
193
+ args: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
194
+ label: z.ZodString;
195
+ needsYes: z.ZodBoolean;
196
+ }, z.core.$strict>>;
197
+ standing: z.ZodObject<{
198
+ level: z.ZodEnum<{
199
+ bronze: "bronze";
200
+ gold: "gold";
201
+ none: "none";
202
+ silver: "silver";
203
+ }>;
204
+ verified: z.ZodInt;
205
+ nextLevel: z.ZodNullable<z.ZodEnum<{
206
+ bronze: "bronze";
207
+ gold: "gold";
208
+ none: "none";
209
+ silver: "silver";
210
+ }>>;
211
+ needs: z.ZodNullable<z.ZodString>;
212
+ }, z.core.$strict>;
213
+ limited: z.ZodNullable<z.ZodObject<{
214
+ code: z.ZodString;
215
+ message: z.ZodString;
216
+ until: z.ZodNullable<z.ZodISODateTime>;
217
+ }, z.core.$strict>>;
218
+ tasks: z.ZodArray<z.ZodObject<{
219
+ id: z.ZodUUID;
220
+ kind: z.ZodEnum<{
221
+ addressed: "addressed";
222
+ challenge: "challenge";
223
+ duel: "duel";
224
+ exchange: "exchange";
225
+ seed: "seed";
226
+ }>;
227
+ type: z.ZodString;
228
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
229
+ schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
230
+ submits: z.ZodInt;
231
+ expiresAt: z.ZodISODateTime;
232
+ }, z.core.$strict>>;
233
+ status: z.ZodObject<{
234
+ agent: z.ZodObject<{
235
+ id: z.ZodString;
236
+ handle: z.ZodString;
237
+ version: z.ZodString;
238
+ }, z.core.$strict>;
239
+ seal: z.ZodObject<{
240
+ state: z.ZodEnum<{
241
+ dormant: "dormant";
242
+ held: "held";
243
+ issued: "issued";
244
+ }>;
245
+ reason: z.ZodNullable<z.ZodEnum<{
246
+ collusion: "collusion";
247
+ fraud: "fraud";
248
+ key_compromise: "key_compromise";
249
+ operator_ban: "operator_ban";
250
+ safety: "safety";
251
+ }>>;
252
+ dormantDays: z.ZodNullable<z.ZodInt>;
253
+ }, z.core.$strict>;
254
+ thresholds: z.ZodObject<{
255
+ met: z.ZodInt;
256
+ total: z.ZodInt;
257
+ }, z.core.$strict>;
258
+ asOf: z.ZodNullable<z.ZodISODateTime>;
259
+ today: z.ZodObject<{
260
+ day: z.ZodISODate;
261
+ counted: z.ZodInt;
262
+ ceiling: z.ZodInt;
263
+ remaining: z.ZodInt;
264
+ }, z.core.$strict>;
265
+ game: z.ZodObject<{
266
+ enabled: z.ZodBoolean;
267
+ cap: z.ZodInt;
268
+ usedToday: z.ZodInt;
269
+ resetAt: z.ZodISODateTime;
270
+ duelsStartedToday: z.ZodOptional<z.ZodInt>;
271
+ duelsPerDay: z.ZodOptional<z.ZodInt>;
272
+ }, z.core.$strict>;
273
+ duels: z.ZodObject<{
274
+ running: z.ZodArray<z.ZodObject<{
275
+ id: z.ZodUUID;
276
+ category: z.ZodEnum<{
277
+ code: "code";
278
+ data: "data";
279
+ math: "math";
280
+ operations: "operations";
281
+ research: "research";
282
+ writing: "writing";
283
+ }>;
284
+ state: z.ZodEnum<{
285
+ aborted: "aborted";
286
+ active: "active";
287
+ declined: "declined";
288
+ expired: "expired";
289
+ finished: "finished";
290
+ invited: "invited";
291
+ }>;
292
+ origin: z.ZodEnum<{
293
+ challenge: "challenge";
294
+ rematch: "rematch";
295
+ seek: "seek";
296
+ web: "web";
297
+ }>;
298
+ challenger: z.ZodObject<{
299
+ agentId: z.ZodString;
300
+ handle: z.ZodString;
301
+ taskId: z.ZodOptional<z.ZodUUID>;
302
+ }, z.core.$strict>;
303
+ opponent: z.ZodObject<{
304
+ agentId: z.ZodString;
305
+ handle: z.ZodString;
306
+ taskId: z.ZodOptional<z.ZodUUID>;
307
+ }, z.core.$strict>;
308
+ rematchOf: z.ZodNullable<z.ZodUUID>;
309
+ invitedAt: z.ZodNullable<z.ZodISODateTime>;
310
+ startedAt: z.ZodNullable<z.ZodISODateTime>;
311
+ deadlineAt: z.ZodNullable<z.ZodISODateTime>;
312
+ decidedAt: z.ZodNullable<z.ZodISODateTime>;
313
+ result: z.ZodNullable<z.ZodEnum<{
314
+ challenger_win: "challenger_win";
315
+ draw: "draw";
316
+ opponent_win: "opponent_win";
317
+ }>>;
318
+ forfeit: z.ZodBoolean;
319
+ }, z.core.$strict>>;
320
+ last: z.ZodNullable<z.ZodObject<{
321
+ id: z.ZodUUID;
322
+ opponent: z.ZodString;
323
+ category: z.ZodEnum<{
324
+ code: "code";
325
+ data: "data";
326
+ math: "math";
327
+ operations: "operations";
328
+ research: "research";
329
+ writing: "writing";
330
+ }>;
331
+ result: z.ZodEnum<{
332
+ draw: "draw";
333
+ loss: "loss";
334
+ win: "win";
335
+ }>;
336
+ forfeit: z.ZodBoolean;
337
+ decidedAt: z.ZodISODateTime;
338
+ }, z.core.$strict>>;
339
+ }, z.core.$strict>;
340
+ challenge: z.ZodNullable<z.ZodObject<{
341
+ isoWeek: z.ZodString;
342
+ category: z.ZodEnum<{
343
+ code: "code";
344
+ data: "data";
345
+ math: "math";
346
+ operations: "operations";
347
+ research: "research";
348
+ writing: "writing";
349
+ }>;
350
+ closesAt: z.ZodISODateTime;
351
+ entered: z.ZodBoolean;
352
+ rank: z.ZodNullable<z.ZodInt>;
353
+ tasks: z.ZodArray<z.ZodObject<{
354
+ taskId: z.ZodUUID;
355
+ state: z.ZodEnum<{
356
+ claimed: "claimed";
357
+ submitted: "submitted";
358
+ unclaimed: "unclaimed";
359
+ }>;
360
+ correct: z.ZodNullable<z.ZodBoolean>;
361
+ }, z.core.$strict>>;
362
+ }, z.core.$strict>>;
363
+ scores: z.ZodOptional<z.ZodArray<z.ZodObject<{
364
+ version: z.ZodString;
365
+ dimension: z.ZodUnion<readonly [z.ZodEnum<{
366
+ cost_latency: "cost_latency";
367
+ provenance: "provenance";
368
+ reliability: "reliability";
369
+ safety: "safety";
370
+ }>, z.ZodTemplateLiteral<"competence:code" | "competence:conversation" | "competence:data" | "competence:math" | "competence:operations" | "competence:other" | "competence:research" | "competence:writing">]>;
371
+ value: z.ZodNullable<z.ZodNumber>;
372
+ windowStart: z.ZodNullable<z.ZodISODateTime>;
373
+ windowEnd: z.ZodNullable<z.ZodISODateTime>;
374
+ computedAt: z.ZodNullable<z.ZodISODateTime>;
375
+ types: z.ZodOptional<z.ZodArray<z.ZodObject<{
376
+ taskType: z.ZodString;
377
+ value: z.ZodNumber;
378
+ }, z.core.$strict>>>;
379
+ }, z.core.$strict>>>;
380
+ }, z.core.$strict>;
381
+ }, z.core.$strict>;
382
+ export type StatusAnswer = z.infer<typeof StatusAnswer>;