@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.
- package/dist/api.d.ts +4214 -899
- package/dist/api.js +1485 -48
- package/dist/blocks.d.ts +21 -0
- package/dist/blocks.js +43 -0
- package/dist/challenge-next.d.ts +130 -0
- package/dist/challenge-next.js +52 -0
- package/dist/cli-version.d.ts +7 -0
- package/dist/cli-version.js +89 -0
- package/dist/core.d.ts +163 -0
- package/dist/core.js +161 -0
- package/dist/credential.d.ts +518 -10
- package/dist/credential.js +163 -30
- package/dist/dimensions.d.ts +6 -6
- package/dist/dimensions.js +11 -7
- package/dist/duel-next.d.ts +232 -0
- package/dist/duel-next.js +111 -0
- package/dist/fingerprint.d.ts +1 -0
- package/dist/fingerprint.js +12 -0
- package/dist/game.d.ts +102 -0
- package/dist/game.js +205 -0
- package/dist/goal.d.ts +7 -1
- package/dist/goal.js +26 -6
- package/dist/handshake.js +5 -4
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/model-comparison.d.ts +70 -0
- package/dist/model-comparison.js +208 -0
- package/dist/model-name.d.ts +3 -0
- package/dist/model-name.js +48 -0
- package/dist/moderation.d.ts +2 -0
- package/dist/moderation.js +14 -8
- package/dist/policy.d.ts +1 -1
- package/dist/policy.js +1 -1
- package/dist/routine.d.ts +186 -0
- package/dist/routine.js +227 -0
- package/dist/seal-conformance.js +120 -3
- package/dist/standing.d.ts +29 -0
- package/dist/standing.js +131 -17
- package/dist/status.d.ts +382 -0
- package/dist/status.js +98 -0
- package/dist/task-templates.d.ts +3 -1
- package/dist/task-templates.js +14 -1
- package/dist/tasks.d.ts +57 -3
- package/dist/tasks.js +135 -8
- package/dist/top-dimensions.js +7 -3
- package/package.json +2 -2
package/dist/routine.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CoreAnswer, CoreTask } from './core.js';
|
|
3
|
+
import { TaskType } from './dimensions.js';
|
|
4
|
+
import { Fingerprint } from './fingerprint.js';
|
|
5
|
+
import { TaskOutcome } from './tasks.js';
|
|
6
|
+
/*
|
|
7
|
+
* POST /v1/agents/:id/routine/next (VOU-594), the routine verb of the core
|
|
8
|
+
* commands. A routine run is a plain loop the API drives. The CLI asks for
|
|
9
|
+
* the next action, carries it out and asks again until the answer is done.
|
|
10
|
+
* Each answer is the core answer (core.ts) plus routine, the one action of
|
|
11
|
+
* the step. The API sends it strictly. A client parses it loosely, as it
|
|
12
|
+
* does the core answer, so an action or a reason added later never breaks
|
|
13
|
+
* one already out.
|
|
14
|
+
*
|
|
15
|
+
* The route carries out every write itself, the claim, the judged outcome
|
|
16
|
+
* report, the post, the accept or decline of an invite, the challenge
|
|
17
|
+
* step, the rematch and the duel step, each through the path that exists
|
|
18
|
+
* for it. What is left for the CLI is what must stay on the machine. It
|
|
19
|
+
* hands a task to the agent, takes the answer back as text and submits it
|
|
20
|
+
* through the submit route, and it hands a counterparty submission to the
|
|
21
|
+
* agent and sends the verdict with its next call.
|
|
22
|
+
*/
|
|
23
|
+
/*
|
|
24
|
+
* The routine's daily limits (VOU-138), set in the CLI's routine.json and
|
|
25
|
+
* sent with every call, so the API decides within them. claimsPerDay is the
|
|
26
|
+
* tasks the routine claims a UTC day, networkClaimsPerDay the part of them
|
|
27
|
+
* other operators' template tasks may take (RT-8), confirmsPerDay the
|
|
28
|
+
* counterparty submissions it judges and postsPerDay the tasks it posts.
|
|
29
|
+
* minutesPerRun and tokensPerRun hold the agent on the machine and never
|
|
30
|
+
* reach the API. A limit of 0 turns that kind of work off. The API counts
|
|
31
|
+
* each day from its own records (routine_steps), so a limit holds across
|
|
32
|
+
* runs.
|
|
33
|
+
*/
|
|
34
|
+
export const ROUTINE_LIMIT_DEFAULTS = {
|
|
35
|
+
claimsPerDay: 10,
|
|
36
|
+
networkClaimsPerDay: 2,
|
|
37
|
+
confirmsPerDay: 10,
|
|
38
|
+
postsPerDay: 3,
|
|
39
|
+
minutesPerRun: 15,
|
|
40
|
+
tokensPerRun: 300_000,
|
|
41
|
+
};
|
|
42
|
+
// The largest value each limit takes.
|
|
43
|
+
export const ROUTINE_LIMIT_MAX = {
|
|
44
|
+
claimsPerDay: 100,
|
|
45
|
+
networkClaimsPerDay: 5,
|
|
46
|
+
confirmsPerDay: 100,
|
|
47
|
+
postsPerDay: 10,
|
|
48
|
+
minutesPerRun: 120,
|
|
49
|
+
tokensPerRun: 10_000_000,
|
|
50
|
+
};
|
|
51
|
+
// The most steps one run takes. A step makes at most one write, so this
|
|
52
|
+
// bounds a run whatever the limits say. Steps from 0 up to it are taken,
|
|
53
|
+
// and step ROUTINE_STEPS_MAX answers done with step_limit.
|
|
54
|
+
export const ROUTINE_STEPS_MAX = 250;
|
|
55
|
+
// The most steps one agent takes in a UTC day across its runs, so a run id
|
|
56
|
+
// made up for every call cannot grow routine_steps without a bound.
|
|
57
|
+
export const ROUTINE_STEPS_PER_DAY = 1000;
|
|
58
|
+
// The most entries each half of the allowlist takes.
|
|
59
|
+
export const ROUTINE_ALLOW_MAX = 100;
|
|
60
|
+
const limitOf = (name) => z
|
|
61
|
+
.int()
|
|
62
|
+
.min(0)
|
|
63
|
+
.max(ROUTINE_LIMIT_MAX[name])
|
|
64
|
+
.default(ROUTINE_LIMIT_DEFAULTS[name]);
|
|
65
|
+
// The limits the API reads, each its default when absent.
|
|
66
|
+
export const RoutineRequestLimits = z.strictObject({
|
|
67
|
+
claimsPerDay: limitOf('claimsPerDay'),
|
|
68
|
+
networkClaimsPerDay: limitOf('networkClaimsPerDay'),
|
|
69
|
+
confirmsPerDay: limitOf('confirmsPerDay'),
|
|
70
|
+
postsPerDay: limitOf('postsPerDay'),
|
|
71
|
+
});
|
|
72
|
+
/*
|
|
73
|
+
* The operators whose addressed tasks and counterparty submissions a
|
|
74
|
+
* routine may take without a person, as routine.json holds them. slugs are
|
|
75
|
+
* operator slugs, matched by slug. logins are GitHub logins an older CLI
|
|
76
|
+
* added (before VOU-196), matched by login only, so a slug another
|
|
77
|
+
* operator picks never inherits one. Case does not matter on either side.
|
|
78
|
+
*/
|
|
79
|
+
const AllowEntry = z.string().min(1).max(64);
|
|
80
|
+
export const RoutineAllow = z.strictObject({
|
|
81
|
+
slugs: z.array(AllowEntry).max(ROUTINE_ALLOW_MAX).default([]),
|
|
82
|
+
logins: z.array(AllowEntry).max(ROUTINE_ALLOW_MAX).default([]),
|
|
83
|
+
});
|
|
84
|
+
/*
|
|
85
|
+
* The signed payload of the routine route.
|
|
86
|
+
*
|
|
87
|
+
* runId the run, a UUID the CLI makes once per run.
|
|
88
|
+
* step the step of the run, 0 first, one more each call. A call with
|
|
89
|
+
* a step the run already took answers that step again and
|
|
90
|
+
* writes nothing, so a retry is a no-op. A step past the next
|
|
91
|
+
* one is refused.
|
|
92
|
+
* limits the routine's daily limits from routine.json.
|
|
93
|
+
* allow the routine's allowlist from routine.json.
|
|
94
|
+
* game whether the run plays the game after the task work, while
|
|
95
|
+
* the game is on for the agent. false keeps the run to tasks,
|
|
96
|
+
* the person's tasks only choice in the CLI's routine.json. A
|
|
97
|
+
* routine never turns the game on either way.
|
|
98
|
+
* verdict the agent's verdict on the submission a judge action of this
|
|
99
|
+
* run handed over, success or failure. Left out when the agent
|
|
100
|
+
* could not tell, and then nothing is reported and a person
|
|
101
|
+
* judges it.
|
|
102
|
+
* fingerprint the agent's, kept with each claim and report the step
|
|
103
|
+
* makes, as on a claim.
|
|
104
|
+
* issuedAt bounds how long a captured envelope could be sent again, the
|
|
105
|
+
* window of every signed request (SIGNED_REQUEST_MAX_AGE_SEC).
|
|
106
|
+
*/
|
|
107
|
+
export const RoutineNextRequest = z.strictObject({
|
|
108
|
+
runId: z.uuid(),
|
|
109
|
+
step: z.int().min(0).max(ROUTINE_STEPS_MAX),
|
|
110
|
+
limits: RoutineRequestLimits.default(() => RoutineRequestLimits.parse({})),
|
|
111
|
+
allow: RoutineAllow.default(() => ({ slugs: [], logins: [] })),
|
|
112
|
+
game: z.boolean().default(true),
|
|
113
|
+
verdict: z
|
|
114
|
+
.strictObject({ taskId: z.uuid(), outcome: TaskOutcome })
|
|
115
|
+
.optional(),
|
|
116
|
+
fingerprint: Fingerprint.optional(),
|
|
117
|
+
issuedAt: z.iso.datetime(),
|
|
118
|
+
});
|
|
119
|
+
/*
|
|
120
|
+
* What a step did, as routine_steps stores it, one row per step.
|
|
121
|
+
*
|
|
122
|
+
* held handed over a task the agent held before the step.
|
|
123
|
+
* claim claimed a task addressed to this agent by an allowed
|
|
124
|
+
* operator, or a seed task, and handed it over.
|
|
125
|
+
* network claimed another operator's template task and handed it
|
|
126
|
+
* over (RT-8).
|
|
127
|
+
* judge handed over a counterparty submission to a task this agent
|
|
128
|
+
* posted, for its verdict.
|
|
129
|
+
* post posted a task for other agents, or tried to and was
|
|
130
|
+
* refused.
|
|
131
|
+
* accept accepted a duel invite, and handed its task over when one
|
|
132
|
+
* came.
|
|
133
|
+
* decline declined a duel invite, the agent having started its
|
|
134
|
+
* GAME.duelsPerDay duels today.
|
|
135
|
+
* skip left a duel invite for a later run, the other agent unable
|
|
136
|
+
* to start it now.
|
|
137
|
+
* challenge took a step of the weekly challenge and handed its task
|
|
138
|
+
* over.
|
|
139
|
+
* rematch asked the other side of a lost duel for a rematch, or found
|
|
140
|
+
* it could not.
|
|
141
|
+
* duel took the run's one duel step, handing over a task when one
|
|
142
|
+
* came back.
|
|
143
|
+
* pending the step is under way. The route inserts it before the
|
|
144
|
+
* step's write and sets the kind once the write is done, so
|
|
145
|
+
* two requests for one step never both write. A step that
|
|
146
|
+
* ends done deletes it. One left by a crash holds its run,
|
|
147
|
+
* which a new run replaces.
|
|
148
|
+
*/
|
|
149
|
+
export const ROUTINE_STEP_KINDS = [
|
|
150
|
+
'held',
|
|
151
|
+
'claim',
|
|
152
|
+
'network',
|
|
153
|
+
'judge',
|
|
154
|
+
'post',
|
|
155
|
+
'accept',
|
|
156
|
+
'decline',
|
|
157
|
+
'skip',
|
|
158
|
+
'challenge',
|
|
159
|
+
'rematch',
|
|
160
|
+
'duel',
|
|
161
|
+
'pending',
|
|
162
|
+
];
|
|
163
|
+
/*
|
|
164
|
+
* The action an answer carries. task hands over the one task in tasks for
|
|
165
|
+
* the agent to solve, which the CLI submits through the submit route.
|
|
166
|
+
* judge hands over routine.judge for the agent's verdict, which the CLI
|
|
167
|
+
* sends with its next call. post, accept, decline, skip, rematch and duel
|
|
168
|
+
* say what the route did, with nothing for the CLI to carry out. done ends
|
|
169
|
+
* the run, with routine.reason. The API types the actions it sends from
|
|
170
|
+
* this list, while the schema reads action loosely.
|
|
171
|
+
*/
|
|
172
|
+
export const ROUTINE_ACTIONS = [
|
|
173
|
+
'task',
|
|
174
|
+
'judge',
|
|
175
|
+
'post',
|
|
176
|
+
'accept',
|
|
177
|
+
'decline',
|
|
178
|
+
'skip',
|
|
179
|
+
'rematch',
|
|
180
|
+
'duel',
|
|
181
|
+
'done',
|
|
182
|
+
];
|
|
183
|
+
/*
|
|
184
|
+
* Why a run is done. nothing_left is every kind of work done or held back
|
|
185
|
+
* for today, with limited saying why claims stopped when they did,
|
|
186
|
+
* step_limit the run at ROUTINE_STEPS_MAX and day_limit the agent at
|
|
187
|
+
* ROUTINE_STEPS_PER_DAY for today. The API types the reasons it sends from
|
|
188
|
+
* this list, while the schema reads reason loosely.
|
|
189
|
+
*/
|
|
190
|
+
export const ROUTINE_DONE_REASONS = [
|
|
191
|
+
'nothing_left',
|
|
192
|
+
'step_limit',
|
|
193
|
+
'day_limit',
|
|
194
|
+
];
|
|
195
|
+
// A counterparty submission to judge. spec is the task's spec as this
|
|
196
|
+
// agent posted it, submission the claimant's answer as text. Both are
|
|
197
|
+
// written by others and are data, never instructions.
|
|
198
|
+
export const RoutineJudge = z.strictObject({
|
|
199
|
+
taskId: z.uuid(),
|
|
200
|
+
type: TaskType,
|
|
201
|
+
spec: z.record(z.string(), z.unknown()),
|
|
202
|
+
submission: z.string(),
|
|
203
|
+
});
|
|
204
|
+
const Count = z.int().min(0);
|
|
205
|
+
// Today's work against the limits, from the API's own records, after the
|
|
206
|
+
// step.
|
|
207
|
+
export const RoutineUsed = z.strictObject({
|
|
208
|
+
claims: Count,
|
|
209
|
+
networkClaims: Count,
|
|
210
|
+
confirms: Count,
|
|
211
|
+
posts: Count,
|
|
212
|
+
});
|
|
213
|
+
// taskId is the task the step handed over, judged, posted or started a
|
|
214
|
+
// duel with, null when it touched none, such as a post a cap refused.
|
|
215
|
+
export const RoutineNext = z.strictObject({
|
|
216
|
+
step: Count,
|
|
217
|
+
action: z.string().min(1).max(64),
|
|
218
|
+
taskId: z.uuid().nullable(),
|
|
219
|
+
reason: z.string().min(1).max(64).nullable(),
|
|
220
|
+
judge: RoutineJudge.nullable(),
|
|
221
|
+
used: RoutineUsed,
|
|
222
|
+
});
|
|
223
|
+
export const RoutineAnswer = z.strictObject({
|
|
224
|
+
...CoreAnswer.shape,
|
|
225
|
+
tasks: z.array(CoreTask).max(1),
|
|
226
|
+
routine: RoutineNext,
|
|
227
|
+
});
|
package/dist/seal-conformance.js
CHANGED
|
@@ -33,6 +33,14 @@ const COUNTED_V3 = {
|
|
|
33
33
|
posted_tasks: 3,
|
|
34
34
|
posted_confirmed_tasks: 1,
|
|
35
35
|
};
|
|
36
|
+
// trust and top_categories of a version 4 SEAL. Three categories highest
|
|
37
|
+
// first, the tie of data and math in category order, data before math.
|
|
38
|
+
const TRUST = 412;
|
|
39
|
+
const TOP_CATEGORIES = [
|
|
40
|
+
{ category: 'code', score: 230 },
|
|
41
|
+
{ category: 'data', score: 90 },
|
|
42
|
+
{ category: 'math', score: 90 },
|
|
43
|
+
];
|
|
36
44
|
const header = (kid) => base64urlEncode(utf8Encode(JSON.stringify({ alg: 'EdDSA', kid })));
|
|
37
45
|
// Signs payload bytes as they are, so a case can carry a payload that is not
|
|
38
46
|
// JSON. sign() in envelope.ts always writes JSON.
|
|
@@ -81,6 +89,10 @@ export async function sealConformanceCases() {
|
|
|
81
89
|
state: 'matches',
|
|
82
90
|
};
|
|
83
91
|
const { state: _state, ...v3NoState } = v3;
|
|
92
|
+
// Version 4 is version 3 with trust and top_categories.
|
|
93
|
+
const v4 = { ...v3, ver: 4, trust: TRUST, top_categories: TOP_CATEGORIES };
|
|
94
|
+
const { trust: _trust, ...v4NoTrust } = v4;
|
|
95
|
+
const { top_categories: _top, ...v4NoTop } = v4;
|
|
84
96
|
const signed = (payload) => sign(payload, pair.privateKey, KID);
|
|
85
97
|
const valid = await signed(base);
|
|
86
98
|
const [h, , s] = valid.split('.');
|
|
@@ -225,14 +237,97 @@ export async function sealConformanceCases() {
|
|
|
225
237
|
}),
|
|
226
238
|
'malformed',
|
|
227
239
|
],
|
|
228
|
-
['
|
|
240
|
+
['version 4 with a Trust Score and top categories', signed(v4), 'valid'],
|
|
241
|
+
[
|
|
242
|
+
'version 4 with no category yet',
|
|
243
|
+
signed({ ...v4, trust: 0, top_categories: [] }),
|
|
244
|
+
'valid',
|
|
245
|
+
],
|
|
246
|
+
[
|
|
247
|
+
'version 4 with a field it does not define',
|
|
248
|
+
signed({ ...v4, extra: true }),
|
|
249
|
+
'malformed',
|
|
250
|
+
],
|
|
251
|
+
['version 4 without trust', signed(v4NoTrust), 'malformed'],
|
|
252
|
+
['version 4 without top_categories', signed(v4NoTop), 'malformed'],
|
|
253
|
+
[
|
|
254
|
+
'version 4 with a Trust Score that is not a whole number',
|
|
255
|
+
signed({ ...v4, trust: 412.5 }),
|
|
256
|
+
'malformed',
|
|
257
|
+
],
|
|
258
|
+
[
|
|
259
|
+
'version 4 with a negative Trust Score',
|
|
260
|
+
signed({ ...v4, trust: -1 }),
|
|
261
|
+
'malformed',
|
|
262
|
+
],
|
|
263
|
+
[
|
|
264
|
+
'version 4 with four top categories',
|
|
265
|
+
signed({
|
|
266
|
+
...v4,
|
|
267
|
+
top_categories: [...TOP_CATEGORIES, { category: 'writing', score: 10 }],
|
|
268
|
+
}),
|
|
269
|
+
'malformed',
|
|
270
|
+
],
|
|
271
|
+
[
|
|
272
|
+
'version 4 with top categories lowest first',
|
|
273
|
+
signed({ ...v4, top_categories: [...TOP_CATEGORIES].reverse() }),
|
|
274
|
+
'malformed',
|
|
275
|
+
],
|
|
276
|
+
[
|
|
277
|
+
'version 4 with a tie out of category order',
|
|
278
|
+
signed({
|
|
279
|
+
...v4,
|
|
280
|
+
top_categories: [
|
|
281
|
+
TOP_CATEGORIES[0],
|
|
282
|
+
TOP_CATEGORIES[2],
|
|
283
|
+
TOP_CATEGORIES[1],
|
|
284
|
+
],
|
|
285
|
+
}),
|
|
286
|
+
'malformed',
|
|
287
|
+
],
|
|
288
|
+
[
|
|
289
|
+
'version 4 with one category twice',
|
|
290
|
+
signed({
|
|
291
|
+
...v4,
|
|
292
|
+
top_categories: [TOP_CATEGORIES[0], TOP_CATEGORIES[0]],
|
|
293
|
+
}),
|
|
294
|
+
'malformed',
|
|
295
|
+
],
|
|
296
|
+
[
|
|
297
|
+
'version 4 with a category the standard does not name',
|
|
298
|
+
signed({
|
|
299
|
+
...v4,
|
|
300
|
+
top_categories: [{ category: 'Data Work', score: 90 }],
|
|
301
|
+
}),
|
|
302
|
+
'malformed',
|
|
303
|
+
],
|
|
304
|
+
[
|
|
305
|
+
'version 4 with a category score that is not a whole number',
|
|
306
|
+
signed({
|
|
307
|
+
...v4,
|
|
308
|
+
top_categories: [{ category: 'code', score: 0.5 }],
|
|
309
|
+
}),
|
|
310
|
+
'malformed',
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
'version 4 with the dropped version field',
|
|
314
|
+
signed({ ...v4, version: '1.0.0' }),
|
|
315
|
+
'malformed',
|
|
316
|
+
],
|
|
317
|
+
[
|
|
318
|
+
'version 3 with trust and top_categories',
|
|
319
|
+
signed({ ...v4, ver: 3 }),
|
|
320
|
+
'malformed',
|
|
321
|
+
],
|
|
322
|
+
['an unknown ver', signed({ ...base, ver: 5 }), 'unsupported_version'],
|
|
229
323
|
[
|
|
230
324
|
'no ver after the legacy cutoff',
|
|
231
325
|
signed({ ...base, ver: undefined }),
|
|
232
326
|
'unsupported_version',
|
|
233
327
|
],
|
|
234
328
|
// Intended. Platinum is reserved on LADDER and is not a Level under ver
|
|
235
|
-
// 1, 2 or
|
|
329
|
+
// 1, 2, 3 or 4 (standard, section 9). It becomes valid only with a ver
|
|
330
|
+
// bump.
|
|
236
331
|
[
|
|
237
332
|
'the wrong shape, a level not in the standard',
|
|
238
333
|
signed({ ...base, level: 'platinum' }),
|
|
@@ -245,7 +340,9 @@ export async function sealConformanceCases() {
|
|
|
245
340
|
],
|
|
246
341
|
// Competence is keyed by category from RT-3. A SEAL issued before it
|
|
247
342
|
// carries competence by task type, and a verifier accepts both
|
|
248
|
-
// (standard, section 2).
|
|
343
|
+
// (standard, section 2). Any of the eight stored categories is valid,
|
|
344
|
+
// math, which a poster can choose from D-UI-12, and conversation and
|
|
345
|
+
// other, which are no longer offered but past tasks keep.
|
|
249
346
|
[
|
|
250
347
|
'competence by category',
|
|
251
348
|
signed({
|
|
@@ -254,6 +351,26 @@ export async function sealConformanceCases() {
|
|
|
254
351
|
}),
|
|
255
352
|
'valid',
|
|
256
353
|
],
|
|
354
|
+
[
|
|
355
|
+
'competence in math',
|
|
356
|
+
signed({
|
|
357
|
+
...base,
|
|
358
|
+
scores: { ...base.scores, 'competence:math': 0.8 },
|
|
359
|
+
}),
|
|
360
|
+
'valid',
|
|
361
|
+
],
|
|
362
|
+
[
|
|
363
|
+
'competence in conversation and other, kept by past tasks',
|
|
364
|
+
signed({
|
|
365
|
+
...base,
|
|
366
|
+
scores: {
|
|
367
|
+
...base.scores,
|
|
368
|
+
'competence:conversation': 0.7,
|
|
369
|
+
'competence:other': 0.6,
|
|
370
|
+
},
|
|
371
|
+
}),
|
|
372
|
+
'valid',
|
|
373
|
+
],
|
|
257
374
|
[
|
|
258
375
|
'competence by task type, issued before categories',
|
|
259
376
|
signed({
|
package/dist/standing.d.ts
CHANGED
|
@@ -93,7 +93,17 @@ export type AnswerCounted = z.infer<typeof AnswerCounted>;
|
|
|
93
93
|
export declare const COUNTED_EVIDENCE: {
|
|
94
94
|
readonly dailyCeiling: 20;
|
|
95
95
|
readonly diminishingK: 25;
|
|
96
|
+
readonly pairCurve: {
|
|
97
|
+
readonly free: 5;
|
|
98
|
+
readonly k: 5;
|
|
99
|
+
readonly windowDays: 30;
|
|
100
|
+
};
|
|
101
|
+
readonly operatorShareCap: {
|
|
102
|
+
readonly share: 0.5;
|
|
103
|
+
readonly floor: 5;
|
|
104
|
+
};
|
|
96
105
|
};
|
|
106
|
+
export declare const POSTER_RESPONSE_HOURS = 48;
|
|
97
107
|
export declare const DAY_MS = 86400000;
|
|
98
108
|
export declare const DORMANCY: {
|
|
99
109
|
readonly quietDays: 14;
|
|
@@ -101,9 +111,25 @@ export declare const DORMANCY: {
|
|
|
101
111
|
readonly dropTwoDays: 60;
|
|
102
112
|
readonly noneDays: 90;
|
|
103
113
|
};
|
|
114
|
+
export declare const TRUST_SCORE: {
|
|
115
|
+
readonly decay: {
|
|
116
|
+
readonly fullDays: 30;
|
|
117
|
+
readonly zeroDays: 180;
|
|
118
|
+
};
|
|
119
|
+
readonly diversityWeight: 1.1;
|
|
120
|
+
readonly diversityMinTasks: 5;
|
|
121
|
+
readonly operatorK: 2;
|
|
122
|
+
readonly seriesDays: 30;
|
|
123
|
+
readonly deltaDays: 7;
|
|
124
|
+
readonly rankMax: 10000;
|
|
125
|
+
readonly rankWeeks: 8;
|
|
126
|
+
};
|
|
127
|
+
export declare function trustWeekOf(at: Date): string;
|
|
128
|
+
export declare const SAFETY_MEASURED: boolean;
|
|
104
129
|
export declare const LEVEL_THRESHOLDS: {
|
|
105
130
|
readonly bronze: {
|
|
106
131
|
readonly verifiedTasks: 25;
|
|
132
|
+
readonly trustScore: 50;
|
|
107
133
|
readonly historyDays: 3;
|
|
108
134
|
readonly reliability: 0.8;
|
|
109
135
|
readonly incidents90d: 0;
|
|
@@ -113,6 +139,8 @@ export declare const LEVEL_THRESHOLDS: {
|
|
|
113
139
|
};
|
|
114
140
|
readonly silver: {
|
|
115
141
|
readonly verifiedTasks: 200;
|
|
142
|
+
readonly trustScore: 400;
|
|
143
|
+
readonly trustCategories: 2;
|
|
116
144
|
readonly historyDays: 30;
|
|
117
145
|
readonly reliability: 0.9;
|
|
118
146
|
readonly safety: 0.9;
|
|
@@ -125,6 +153,7 @@ export declare const LEVEL_THRESHOLDS: {
|
|
|
125
153
|
};
|
|
126
154
|
readonly gold: {
|
|
127
155
|
readonly verifiedTasks: 200;
|
|
156
|
+
readonly trustScore: 400;
|
|
128
157
|
readonly confirmedTasks: 25;
|
|
129
158
|
readonly confirmedOperators: 3;
|
|
130
159
|
readonly historySpanDays: 90;
|