@moonbeam-foundation/sdk 0.5.2
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 +17 -0
- package/README.md +378 -0
- package/bin/moonbeam.mjs +56 -0
- package/dist/acp/coverage.d.ts +36 -0
- package/dist/acp/coverage.d.ts.map +1 -0
- package/dist/acp/coverage.js +51 -0
- package/dist/acp/coverage.js.map +1 -0
- package/dist/acp/events.d.ts +201 -0
- package/dist/acp/events.d.ts.map +1 -0
- package/dist/acp/events.js +201 -0
- package/dist/acp/events.js.map +1 -0
- package/dist/acp/hex.d.ts +29 -0
- package/dist/acp/hex.d.ts.map +1 -0
- package/dist/acp/hex.js +51 -0
- package/dist/acp/hex.js.map +1 -0
- package/dist/acp/lifecycle-types.d.ts +11 -0
- package/dist/acp/lifecycle-types.d.ts.map +1 -0
- package/dist/acp/lifecycle-types.js +8 -0
- package/dist/acp/lifecycle-types.js.map +1 -0
- package/dist/acp/lifecycle.d.ts +78 -0
- package/dist/acp/lifecycle.d.ts.map +1 -0
- package/dist/acp/lifecycle.js +224 -0
- package/dist/acp/lifecycle.js.map +1 -0
- package/dist/acp/outcome.d.ts +45 -0
- package/dist/acp/outcome.d.ts.map +1 -0
- package/dist/acp/outcome.js +104 -0
- package/dist/acp/outcome.js.map +1 -0
- package/dist/acp/pipeline.d.ts +30 -0
- package/dist/acp/pipeline.d.ts.map +1 -0
- package/dist/acp/pipeline.js +25 -0
- package/dist/acp/pipeline.js.map +1 -0
- package/dist/acp/recourse.d.ts +74 -0
- package/dist/acp/recourse.d.ts.map +1 -0
- package/dist/acp/recourse.js +234 -0
- package/dist/acp/recourse.js.map +1 -0
- package/dist/acp/registry.d.ts +62 -0
- package/dist/acp/registry.d.ts.map +1 -0
- package/dist/acp/registry.js +86 -0
- package/dist/acp/registry.js.map +1 -0
- package/dist/acp/transitions.d.ts +82 -0
- package/dist/acp/transitions.d.ts.map +1 -0
- package/dist/acp/transitions.js +106 -0
- package/dist/acp/transitions.js.map +1 -0
- package/dist/actors/index.d.ts +84 -0
- package/dist/actors/index.d.ts.map +1 -0
- package/dist/actors/index.js +133 -0
- package/dist/actors/index.js.map +1 -0
- package/dist/actors/track-record.d.ts +79 -0
- package/dist/actors/track-record.d.ts.map +1 -0
- package/dist/actors/track-record.js +105 -0
- package/dist/actors/track-record.js.map +1 -0
- package/dist/adapters/acp.d.ts +48 -0
- package/dist/adapters/acp.d.ts.map +1 -0
- package/dist/adapters/acp.js +74 -0
- package/dist/adapters/acp.js.map +1 -0
- package/dist/adapters/port.d.ts +53 -0
- package/dist/adapters/port.d.ts.map +1 -0
- package/dist/adapters/port.js +2 -0
- package/dist/adapters/port.js.map +1 -0
- package/dist/adapters/stamp.d.ts +57 -0
- package/dist/adapters/stamp.d.ts.map +1 -0
- package/dist/adapters/stamp.js +114 -0
- package/dist/adapters/stamp.js.map +1 -0
- package/dist/client/index.d.ts +123 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +78 -0
- package/dist/client/index.js.map +1 -0
- package/dist/connect/attestation.d.ts +64 -0
- package/dist/connect/attestation.d.ts.map +1 -0
- package/dist/connect/attestation.js +62 -0
- package/dist/connect/attestation.js.map +1 -0
- package/dist/connect/http.d.ts +36 -0
- package/dist/connect/http.d.ts.map +1 -0
- package/dist/connect/http.js +51 -0
- package/dist/connect/http.js.map +1 -0
- package/dist/connect/logs.d.ts +53 -0
- package/dist/connect/logs.d.ts.map +1 -0
- package/dist/connect/logs.js +42 -0
- package/dist/connect/logs.js.map +1 -0
- package/dist/connect/result.d.ts +49 -0
- package/dist/connect/result.d.ts.map +1 -0
- package/dist/connect/result.js +41 -0
- package/dist/connect/result.js.map +1 -0
- package/dist/core/actors.d.ts +13 -0
- package/dist/core/actors.d.ts.map +1 -0
- package/dist/core/actors.js +57 -0
- package/dist/core/actors.js.map +1 -0
- package/dist/core/clock.d.ts +55 -0
- package/dist/core/clock.d.ts.map +1 -0
- package/dist/core/clock.js +36 -0
- package/dist/core/clock.js.map +1 -0
- package/dist/core/money.d.ts +32 -0
- package/dist/core/money.d.ts.map +1 -0
- package/dist/core/money.js +57 -0
- package/dist/core/money.js.map +1 -0
- package/dist/core/pool.d.ts +71 -0
- package/dist/core/pool.d.ts.map +1 -0
- package/dist/core/pool.js +98 -0
- package/dist/core/pool.js.map +1 -0
- package/dist/core/settle.d.ts +50 -0
- package/dist/core/settle.d.ts.map +1 -0
- package/dist/core/settle.js +175 -0
- package/dist/core/settle.js.map +1 -0
- package/dist/core/types.d.ts +109 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +6 -0
- package/dist/core/types.js.map +1 -0
- package/dist/erc8004/index.d.ts +94 -0
- package/dist/erc8004/index.d.ts.map +1 -0
- package/dist/erc8004/index.js +118 -0
- package/dist/erc8004/index.js.map +1 -0
- package/dist/erc8004/registry.generated.d.ts +17 -0
- package/dist/erc8004/registry.generated.d.ts.map +1 -0
- package/dist/erc8004/registry.generated.js +20 -0
- package/dist/erc8004/registry.generated.js.map +1 -0
- package/dist/erc8183/index.d.ts +114 -0
- package/dist/erc8183/index.d.ts.map +1 -0
- package/dist/erc8183/index.js +109 -0
- package/dist/erc8183/index.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/judge/index.d.ts +64 -0
- package/dist/judge/index.d.ts.map +1 -0
- package/dist/judge/index.js +64 -0
- package/dist/judge/index.js.map +1 -0
- package/dist/launcher/index.d.ts +109 -0
- package/dist/launcher/index.d.ts.map +1 -0
- package/dist/launcher/index.js +144 -0
- package/dist/launcher/index.js.map +1 -0
- package/dist/negotiate/index.d.ts +166 -0
- package/dist/negotiate/index.d.ts.map +1 -0
- package/dist/negotiate/index.js +150 -0
- package/dist/negotiate/index.js.map +1 -0
- package/dist/onboard/index.d.ts +533 -0
- package/dist/onboard/index.d.ts.map +1 -0
- package/dist/onboard/index.js +509 -0
- package/dist/onboard/index.js.map +1 -0
- package/dist/onboarding/index.d.ts +177 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/index.js +390 -0
- package/dist/onboarding/index.js.map +1 -0
- package/dist/pools/index.d.ts +191 -0
- package/dist/pools/index.d.ts.map +1 -0
- package/dist/pools/index.js +244 -0
- package/dist/pools/index.js.map +1 -0
- package/docs/demo.gif +0 -0
- package/docs/demo.tape +14 -0
- package/examples/01-settle-a-covered-job.mjs +18 -0
- package/examples/02-negotiate-a-hire.mjs +21 -0
- package/examples/03-end-to-end-offline.mjs +27 -0
- package/examples/10-grade-evidence.mjs +12 -0
- package/examples/11-grade-facts.mjs +10 -0
- package/examples/12-grade-answers.mjs +8 -0
- package/examples/13-grade-verdict.mjs +10 -0
- package/examples/14-grade-record.mjs +11 -0
- package/examples/15-grade-end-the-job.mjs +11 -0
- package/examples/16-grade-verify.mjs +9 -0
- package/examples/17-grade-live.mjs +14 -0
- package/examples/20-onboard-client.mjs +8 -0
- package/examples/21-onboard-provider.mjs +9 -0
- package/examples/22-onboard-evaluator.mjs +7 -0
- package/examples/23-onboard-backer.mjs +8 -0
- package/examples/30-read-a-real-job.mjs +19 -0
- package/examples/31-read-the-ending.mjs +15 -0
- package/examples/32-read-live-from-base.mjs +33 -0
- package/examples/33-read-many-jobs.mjs +12 -0
- package/examples/40-the-article.mjs +78 -0
- package/examples/README.md +93 -0
- package/examples/data/answers.mjs +8 -0
- package/examples/data/base-grade.recorded.json +72 -0
- package/examples/data/pilot-grade.recorded.json +78 -0
- package/examples/data/pilot-hire.json +35 -0
- package/examples/data/terms.mjs +11 -0
- package/examples/data/virtuals-job-74926.json +74 -0
- package/examples/data/virtuals-job-rejected.json +74 -0
- package/package.json +124 -0
- package/skills/moonbeam-acp-decoding/SKILL.md +80 -0
- package/skills/moonbeam-actor-backer/SKILL.md +81 -0
- package/skills/moonbeam-actor-challenger/SKILL.md +62 -0
- package/skills/moonbeam-actor-client/SKILL.md +67 -0
- package/skills/moonbeam-actor-doubter/SKILL.md +55 -0
- package/skills/moonbeam-actor-evaluator/SKILL.md +67 -0
- package/skills/moonbeam-actor-provider/SKILL.md +63 -0
- package/skills/moonbeam-assurance/SKILL.md +58 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { min } from '../core/money.js';
|
|
2
|
+
import type { Money } from '../core/money.js';
|
|
3
|
+
import type { JobTerms, Role } from '../core/types.js';
|
|
4
|
+
import type { TrackRecord } from '../actors/track-record.js';
|
|
5
|
+
/**
|
|
6
|
+
* Safe onboarding — the checks that run before someone commits capital.
|
|
7
|
+
*
|
|
8
|
+
* Every actor here can lose money, and most of the ways they lose it are
|
|
9
|
+
* knowable in advance: a position larger than the capital that could pay it, a
|
|
10
|
+
* pool already committed past its own reserves, cover that stops short of the
|
|
11
|
+
* damage a job can cause. None of that is exotic — it is arithmetic somebody
|
|
12
|
+
* has to do, and the cost of not doing it falls entirely on the newcomer.
|
|
13
|
+
*
|
|
14
|
+
* So the SDK does it, and refuses rather than warns where the risk is one a
|
|
15
|
+
* participant almost certainly did not intend to take.
|
|
16
|
+
*
|
|
17
|
+
* The design rule here: a `block` is for things nobody would knowingly agree
|
|
18
|
+
* to (paying a fee that cannot pay out, joining a pool that is already
|
|
19
|
+
* insolvent). A `caution` is for real risk that is nonetheless a legitimate
|
|
20
|
+
* choice. Blocking a legitimate choice would be paternalism; letting an
|
|
21
|
+
* unintended loss through would be negligence.
|
|
22
|
+
*/
|
|
23
|
+
export type Severity = 'block' | 'caution' | 'note';
|
|
24
|
+
export interface Finding {
|
|
25
|
+
readonly severity: Severity;
|
|
26
|
+
/** Short, specific, and about *this* participant's money. */
|
|
27
|
+
readonly message: string;
|
|
28
|
+
/** What to do about it. Absent when there is nothing to do. */
|
|
29
|
+
readonly remedy?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface Readiness {
|
|
32
|
+
readonly role: Role;
|
|
33
|
+
/** False when at least one finding is a `block`. */
|
|
34
|
+
readonly safe: boolean;
|
|
35
|
+
readonly findings: readonly Finding[];
|
|
36
|
+
/** What this role must put up, restated from the registry so it is unmissable. */
|
|
37
|
+
readonly youBond: string;
|
|
38
|
+
/** What this role can lose. Never empty — every earner risks something. */
|
|
39
|
+
readonly youRisk: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ClientIntent {
|
|
42
|
+
readonly terms: JobTerms;
|
|
43
|
+
/** What a failure would actually cost this buyer, if they know. */
|
|
44
|
+
readonly trueLoss?: Money;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Cover is bounded by what is bonded. A buyer who believes they are fully
|
|
48
|
+
* covered, when the loss a job can cause exceeds the deposit plus the pool, is
|
|
49
|
+
* carrying the difference without having agreed to.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readinessForClient(intent: ClientIntent): Readiness;
|
|
52
|
+
export interface ProviderIntent {
|
|
53
|
+
readonly terms: JobTerms;
|
|
54
|
+
readonly freeCapital: Money;
|
|
55
|
+
/** Capital already committed as deposits on other open jobs. */
|
|
56
|
+
readonly committed?: Money;
|
|
57
|
+
}
|
|
58
|
+
export declare function readinessForProvider(intent: ProviderIntent): Readiness;
|
|
59
|
+
export interface EvaluatorIntent {
|
|
60
|
+
readonly terms: JobTerms;
|
|
61
|
+
readonly freeCapital: Money;
|
|
62
|
+
/** Whether this evaluator can produce a verifiable proof for an approval. */
|
|
63
|
+
readonly canProve: boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare function readinessForEvaluator(intent: EvaluatorIntent): Readiness;
|
|
66
|
+
export interface BackerIntent {
|
|
67
|
+
readonly terms: JobTerms;
|
|
68
|
+
readonly backing: Money;
|
|
69
|
+
readonly poolCapital: Money;
|
|
70
|
+
/** Jobs the pool already stands behind. */
|
|
71
|
+
readonly openJobs: number;
|
|
72
|
+
/** Failure rate the backer expects, as a fraction. */
|
|
73
|
+
readonly expectedFailureRate?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Records of the workers this pool actually backs.
|
|
76
|
+
*
|
|
77
|
+
* The single most useful thing a backer can supply, and the one the market
|
|
78
|
+
* average cannot substitute for — see the concentration finding below.
|
|
79
|
+
*/
|
|
80
|
+
readonly workers?: readonly TrackRecord[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The check a first-time backer most needs: whether the pool they are joining
|
|
84
|
+
* could already fail to honour its commitments. Joining an over-committed pool
|
|
85
|
+
* means buying into a loss that has already been incurred.
|
|
86
|
+
*/
|
|
87
|
+
export declare function readinessForBacker(intent: BackerIntent): Readiness;
|
|
88
|
+
export interface DoubterIntent {
|
|
89
|
+
readonly terms: JobTerms;
|
|
90
|
+
readonly notional: Money;
|
|
91
|
+
readonly feeBps: number;
|
|
92
|
+
}
|
|
93
|
+
export declare function readinessForDoubter(intent: DoubterIntent): Readiness;
|
|
94
|
+
export interface ChallengerIntent {
|
|
95
|
+
readonly terms: JobTerms;
|
|
96
|
+
readonly bond: Money;
|
|
97
|
+
/** The challenger's own estimate of winning, as a fraction. */
|
|
98
|
+
readonly confidence?: number;
|
|
99
|
+
}
|
|
100
|
+
export declare function readinessForChallenger(intent: ChallengerIntent): Readiness;
|
|
101
|
+
/** Only the findings that stop someone committing. */
|
|
102
|
+
export declare function blockers(readiness: Readiness): readonly Finding[];
|
|
103
|
+
/** A one-line summary suitable for a prompt or a log. */
|
|
104
|
+
export declare function summarise(readiness: Readiness): string;
|
|
105
|
+
export declare const MIN_SAFE_POOL_HEADROOM = 0.2;
|
|
106
|
+
/**
|
|
107
|
+
* The observed range of non-delivery on live agent traffic — a range, not a
|
|
108
|
+
* rate, because it is not stable.
|
|
109
|
+
*
|
|
110
|
+
* Measured on Base across six consecutive ~70-hour windows (August 2026,
|
|
111
|
+
* 15,498 logs, every one decoded, 2,250 funded and matured jobs). Non-delivery
|
|
112
|
+
* ran from **8% to 84%** depending on the window, and two windows a week apart
|
|
113
|
+
* had confidence intervals that did not overlap.
|
|
114
|
+
*
|
|
115
|
+
* An earlier draft of this file exported a single figure of 57.8%. That number
|
|
116
|
+
* was correctly measured on one window and would still have been misleading,
|
|
117
|
+
* because a reader would reasonably have taken it as *the* failure rate. It is
|
|
118
|
+
* not: it is one draw from a distribution ten times wider than itself.
|
|
119
|
+
*
|
|
120
|
+
* The consequence for a pool is the important part. A pool priced for the good
|
|
121
|
+
* end of this range is insolvent at the bad end, and the range is wide enough
|
|
122
|
+
* that no fixed premium spans it. What protects a pool is not a well-chosen
|
|
123
|
+
* rate — it is that non-delivery does not draw on cover at all.
|
|
124
|
+
*/
|
|
125
|
+
export declare const OBSERVED_NON_DELIVERY_RANGE: Readonly<{
|
|
126
|
+
low: 0.08;
|
|
127
|
+
high: 0.843;
|
|
128
|
+
windows: 6;
|
|
129
|
+
jobs: 2250;
|
|
130
|
+
note: "August 2026, Base; six ~70h windows; CIs of adjacent windows do not overlap";
|
|
131
|
+
}>;
|
|
132
|
+
/**
|
|
133
|
+
* Why that range is so wide — and why it is not a market rate at all.
|
|
134
|
+
*
|
|
135
|
+
* Breaking the same traffic down by provider rather than by time: of 1,366
|
|
136
|
+
* matured jobs across 41 providers, a single provider accounted for 955 of
|
|
137
|
+
* them and failed to deliver 99.6%. Excluding that one address, non-delivery
|
|
138
|
+
* across everybody else is about 10%.
|
|
139
|
+
*
|
|
140
|
+
* So the market is not one rate with noise around it. It is two populations —
|
|
141
|
+
* agents that deliver almost always, and agents that almost never do — and a
|
|
142
|
+
* window's "failure rate" is mostly a measure of which of them happened to be
|
|
143
|
+
* busy. The 8–84% swing was composition, not time.
|
|
144
|
+
*
|
|
145
|
+
* The consequence for pricing is the whole point. A pool cannot price this
|
|
146
|
+
* market, because there is no market rate to price: the same fee is either
|
|
147
|
+
* far too high for a reliable worker or nowhere near enough for an unreliable
|
|
148
|
+
* one. What a pool can price is a *worker*. A pool that backs indiscriminately
|
|
149
|
+
* is not diversified, it is adversely selected — the unreliable agents are
|
|
150
|
+
* exactly the ones with most to gain from cover.
|
|
151
|
+
*/
|
|
152
|
+
export declare const OBSERVED_PROVIDER_CONCENTRATION: Readonly<{
|
|
153
|
+
providers: 41;
|
|
154
|
+
jobs: 1366;
|
|
155
|
+
/** Share of all jobs from the single busiest provider. */
|
|
156
|
+
topProviderShare: 0.7;
|
|
157
|
+
/** That provider's non-delivery rate. */
|
|
158
|
+
topProviderNonDelivery: 0.996;
|
|
159
|
+
/** Non-delivery across everyone else. */
|
|
160
|
+
nonDeliveryExcludingTop: 0.1;
|
|
161
|
+
note: "August 2026, Base, 396k blocks; bimodal — not one rate with variance";
|
|
162
|
+
}>;
|
|
163
|
+
/**
|
|
164
|
+
* The observed range of rejection — work delivered and graded bad.
|
|
165
|
+
*
|
|
166
|
+
* Also unstable (0.6%–23%), but note where it sits: rejection at its *typical*
|
|
167
|
+
* level is roughly what a pool could absorb, whereas non-delivery is not, even
|
|
168
|
+
* at its best. That asymmetry is the argument for settling the two differently.
|
|
169
|
+
*/
|
|
170
|
+
export declare const OBSERVED_REJECTION_RANGE: Readonly<{
|
|
171
|
+
low: 0.006;
|
|
172
|
+
high: 0.23;
|
|
173
|
+
windows: 6;
|
|
174
|
+
note: "same sample; rejection and non-delivery move independently";
|
|
175
|
+
}>;
|
|
176
|
+
export { min };
|
|
177
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/onboarding/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,GAAG,EAAQ,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,OAAO;IAC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M,+BAA+B;;;IAG1C,0DAA0D;;IAE1D,yCAAyC;;IAEzC,yCAAyC;;;EAGzC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;EAKnC,CAAC;AAEH,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { clampToZero, formatUnits, min, ZERO } from '../core/money.js';
|
|
2
|
+
import { ACTORS } from '../core/actors.js';
|
|
3
|
+
import { breakEvenFailureRate } from '../core/pool.js';
|
|
4
|
+
import { coverGap, doubtQuote, poolExposure } from '../actors/index.js';
|
|
5
|
+
import { MIN_JOBS_FOR_A_RECORD } from '../actors/track-record.js';
|
|
6
|
+
import { maxDoubtPayout } from '../core/settle.js';
|
|
7
|
+
/**
|
|
8
|
+
* Amounts in findings are formatted, not raw.
|
|
9
|
+
*
|
|
10
|
+
* These messages are read by whoever is about to commit capital. Printing
|
|
11
|
+
* `4000` when the figure is 0.004 USDC is worse than printing nothing — it
|
|
12
|
+
* looks like a number the reader can reason about, and it is off by six orders
|
|
13
|
+
* of magnitude.
|
|
14
|
+
*/
|
|
15
|
+
const amt = (value) => formatUnits(value);
|
|
16
|
+
function assess(role, findings) {
|
|
17
|
+
const spec = ACTORS[role];
|
|
18
|
+
return {
|
|
19
|
+
role,
|
|
20
|
+
safe: !findings.some((f) => f.severity === 'block'),
|
|
21
|
+
findings,
|
|
22
|
+
youBond: spec.bonds,
|
|
23
|
+
youRisk: spec.risks,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Cover is bounded by what is bonded. A buyer who believes they are fully
|
|
28
|
+
* covered, when the loss a job can cause exceeds the deposit plus the pool, is
|
|
29
|
+
* carrying the difference without having agreed to.
|
|
30
|
+
*/
|
|
31
|
+
export function readinessForClient(intent) {
|
|
32
|
+
const findings = [];
|
|
33
|
+
const { terms } = intent;
|
|
34
|
+
const gap = coverGap(terms);
|
|
35
|
+
if (gap > ZERO) {
|
|
36
|
+
findings.push({
|
|
37
|
+
severity: 'caution',
|
|
38
|
+
message: `cover stops ${amt(gap)} short of the damage this job can cause`,
|
|
39
|
+
remedy: 'treat the shortfall as self-insured, or find a pool with more capital behind it',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (intent.trueLoss !== undefined && intent.trueLoss > terms.damage) {
|
|
43
|
+
findings.push({
|
|
44
|
+
severity: 'caution',
|
|
45
|
+
message: `your stated loss exceeds the damage cover of ${amt(terms.damage)}`,
|
|
46
|
+
remedy: 'raise the damage cover, or accept that the excess is uninsured',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (terms.premium === ZERO) {
|
|
50
|
+
// Free cover is not a bargain — it means the underwriter earns nothing and
|
|
51
|
+
// has no reason to honour it.
|
|
52
|
+
findings.push({
|
|
53
|
+
severity: 'block',
|
|
54
|
+
message: 'the premium rounds to zero, so nobody is being paid to carry this risk',
|
|
55
|
+
remedy: 'this job is too small to insure meaningfully',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
findings.push({
|
|
59
|
+
severity: 'note',
|
|
60
|
+
message: 'a rejection refunds you but pays no damage cover — only an adjudication does',
|
|
61
|
+
});
|
|
62
|
+
return assess('client', findings);
|
|
63
|
+
}
|
|
64
|
+
export function readinessForProvider(intent) {
|
|
65
|
+
const findings = [];
|
|
66
|
+
const { terms, freeCapital } = intent;
|
|
67
|
+
const committed = intent.committed ?? ZERO;
|
|
68
|
+
if (freeCapital < terms.deposit) {
|
|
69
|
+
findings.push({
|
|
70
|
+
severity: 'block',
|
|
71
|
+
message: `this job needs a ${amt(terms.deposit)} deposit and you have ${amt(freeCapital)} free`,
|
|
72
|
+
remedy: 'free up capital or take a smaller job',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
// Taking work whose deposit is most of what you have means one adverse
|
|
76
|
+
// adjudication ends your ability to work at all.
|
|
77
|
+
const afterThisJob = clampToZero(freeCapital - terms.deposit);
|
|
78
|
+
if (freeCapital >= terms.deposit && afterThisJob < terms.deposit) {
|
|
79
|
+
findings.push({
|
|
80
|
+
severity: 'caution',
|
|
81
|
+
message: 'this deposit leaves you unable to take another job of the same size',
|
|
82
|
+
remedy: 'keep a reserve so one job cannot end your ability to work',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (committed > ZERO && terms.deposit > committed) {
|
|
86
|
+
findings.push({
|
|
87
|
+
severity: 'note',
|
|
88
|
+
message: 'this single deposit exceeds everything you have locked across all other jobs',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
findings.push({
|
|
92
|
+
severity: 'note',
|
|
93
|
+
message: 'being graded bad costs you nothing beyond the job; only an adjudication forfeits the deposit',
|
|
94
|
+
});
|
|
95
|
+
return assess('provider', findings);
|
|
96
|
+
}
|
|
97
|
+
export function readinessForEvaluator(intent) {
|
|
98
|
+
const findings = [];
|
|
99
|
+
const { terms, freeCapital, canProve } = intent;
|
|
100
|
+
if (freeCapital < terms.evaluatorBond) {
|
|
101
|
+
findings.push({
|
|
102
|
+
severity: 'block',
|
|
103
|
+
message: `issuing verdicts here needs a ${amt(terms.evaluatorBond)} bond and you have ${amt(freeCapital)}`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (!canProve) {
|
|
107
|
+
// Not a block: an evaluator that can only reject is still useful, and
|
|
108
|
+
// rejecting is always safe. It just cannot ever release funds.
|
|
109
|
+
findings.push({
|
|
110
|
+
severity: 'caution',
|
|
111
|
+
message: 'without a verifiable proof you can reject but never approve',
|
|
112
|
+
remedy: 'approving releases someone else’s money, so it requires proof; rejecting never does',
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (terms.evaluatorBond > terms.pay) {
|
|
116
|
+
findings.push({
|
|
117
|
+
severity: 'caution',
|
|
118
|
+
message: 'your bond is larger than the job is worth, so one overturned call costs more than the fee could repay',
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
findings.push({
|
|
122
|
+
severity: 'note',
|
|
123
|
+
message: 'silence is not an escape: the deadline resolves the job without you',
|
|
124
|
+
});
|
|
125
|
+
return assess('evaluator', findings);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The check a first-time backer most needs: whether the pool they are joining
|
|
129
|
+
* could already fail to honour its commitments. Joining an over-committed pool
|
|
130
|
+
* means buying into a loss that has already been incurred.
|
|
131
|
+
*/
|
|
132
|
+
export function readinessForBacker(intent) {
|
|
133
|
+
const findings = [];
|
|
134
|
+
const { terms, backing, poolCapital, openJobs } = intent;
|
|
135
|
+
const exposure = poolExposure(terms, openJobs, poolCapital);
|
|
136
|
+
if (!exposure.solvent) {
|
|
137
|
+
findings.push({
|
|
138
|
+
severity: 'block',
|
|
139
|
+
message: `this pool has committed ${amt(exposure.committed)} against ${amt(poolCapital)} of capital`,
|
|
140
|
+
remedy: 'the shortfall already exists; joining would buy into it',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
else if (exposure.utilisation > 0.8) {
|
|
144
|
+
findings.push({
|
|
145
|
+
severity: 'caution',
|
|
146
|
+
message: `the pool is ${(exposure.utilisation * 100).toFixed(0)}% committed, so a bad run leaves little headroom`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (backing > ZERO && poolCapital > ZERO) {
|
|
150
|
+
const share = Number(backing) / Number(poolCapital + backing);
|
|
151
|
+
if (share > 0.5) {
|
|
152
|
+
findings.push({
|
|
153
|
+
severity: 'caution',
|
|
154
|
+
message: 'you would be most of this pool, so its failures are effectively yours alone',
|
|
155
|
+
remedy: 'spread across pools, or accept concentrated exposure knowingly',
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (intent.expectedFailureRate !== undefined) {
|
|
160
|
+
// Was a hand-derivation of the same formula `breakEvenFailureRate` holds —
|
|
161
|
+
// this module did not import `core/pool.ts` at all, so the two agreed by
|
|
162
|
+
// coincidence rather than by construction, and neither capped the loss at
|
|
163
|
+
// pool capital. Now it asks the one function that owns the answer.
|
|
164
|
+
const breakEven = breakEvenFailureRate(terms.premium, terms.damage, terms.deposit, terms.poolCapital);
|
|
165
|
+
if (breakEven !== null && intent.expectedFailureRate > breakEven) {
|
|
166
|
+
findings.push({
|
|
167
|
+
severity: 'caution',
|
|
168
|
+
message: `at the failure rate you expect this pool loses money — it breaks even at ${(breakEven * 100).toFixed(2)}%`,
|
|
169
|
+
remedy: 'the premium is too low for the risk as you see it',
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// A record for the workers actually backed beats any market figure, so when
|
|
174
|
+
// one is supplied it is assessed instead of guessed at.
|
|
175
|
+
if (intent.workers && intent.workers.length > 0) {
|
|
176
|
+
const thin = intent.workers.filter((w) => !w.sufficient);
|
|
177
|
+
const worst = intent.workers.reduce((a, b) => (b.nonDeliveryRate > a.nonDeliveryRate ? b : a));
|
|
178
|
+
if (worst.sufficient && worst.nonDeliveryRate > 0.5) {
|
|
179
|
+
findings.push({
|
|
180
|
+
severity: 'block',
|
|
181
|
+
message: `this pool backs a worker that failed to deliver ${(worst.nonDeliveryRate * 100).toFixed(1)}% of ${worst.matured} jobs`,
|
|
182
|
+
remedy: 'a worker at that rate does not become safe by being pooled with better ones',
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else if (worst.sufficient && worst.nonDeliveryRate > 0.2) {
|
|
186
|
+
findings.push({
|
|
187
|
+
severity: 'caution',
|
|
188
|
+
message: `the weakest worker here failed ${(worst.nonDeliveryRate * 100).toFixed(1)}% of ${worst.matured} jobs`,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
if (thin.length > 0) {
|
|
192
|
+
// A worker with three clean jobs has not demonstrated anything, and a
|
|
193
|
+
// point estimate of 0% would say it had.
|
|
194
|
+
findings.push({
|
|
195
|
+
severity: 'caution',
|
|
196
|
+
message: `${thin.length} of ${intent.workers.length} workers have fewer than ${MIN_JOBS_FOR_A_RECORD} matured jobs, so their records prove little either way`,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
findings.push({
|
|
202
|
+
severity: 'caution',
|
|
203
|
+
message: 'no worker records supplied, so this check could only use market-wide figures',
|
|
204
|
+
remedy: 'pass the track records of the workers this pool backs — the aggregate describes no individual worker',
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
findings.push({
|
|
208
|
+
severity: 'note',
|
|
209
|
+
message: 'exit is slower than claims settle, so you cannot withdraw ahead of a loss you agreed to cover',
|
|
210
|
+
});
|
|
211
|
+
// Measured on live agent traffic, and worth saying explicitly because the
|
|
212
|
+
// headline number is alarming until you know what it does not mean: about a
|
|
213
|
+
// fifth of settled agent jobs never deliver. None of that touches a pool —
|
|
214
|
+
// an expiry refunds and pays no cover — but a newcomer who has seen the
|
|
215
|
+
// failure rate and not the mapping will reasonably assume the worst.
|
|
216
|
+
findings.push({
|
|
217
|
+
severity: 'note',
|
|
218
|
+
message: `on live traffic ${(OBSERVED_NON_DELIVERY_RANGE.low * 100).toFixed(0)}–${(OBSERVED_NON_DELIVERY_RANGE.high * 100).toFixed(0)}% of funded jobs never deliver, ` +
|
|
219
|
+
'and none of it reaches you: only an adjudicated finding draws on cover',
|
|
220
|
+
});
|
|
221
|
+
// The spread is composition, not variance, and that changes the advice from
|
|
222
|
+
// "expect noise" to "the average is meaningless". One provider produced 70%
|
|
223
|
+
// of observed jobs and failed 99.6% of them; everyone else fails about 10%.
|
|
224
|
+
findings.push({
|
|
225
|
+
severity: 'caution',
|
|
226
|
+
message: 'that spread is which workers were busy, not a market rate: one provider produced ' +
|
|
227
|
+
`${(OBSERVED_PROVIDER_CONCENTRATION.topProviderShare * 100).toFixed(0)}% of observed jobs and failed ` +
|
|
228
|
+
`${(OBSERVED_PROVIDER_CONCENTRATION.topProviderNonDelivery * 100).toFixed(1)}% of them, while everyone else failed about ` +
|
|
229
|
+
`${(OBSERVED_PROVIDER_CONCENTRATION.nonDeliveryExcludingTop * 100).toFixed(0)}%`,
|
|
230
|
+
remedy: 'ask which workers this pool backs — an average across both populations describes neither',
|
|
231
|
+
});
|
|
232
|
+
// Adverse selection is the specific danger, and it is not obvious: the
|
|
233
|
+
// agents most eager for cover are the ones least able to deliver without it.
|
|
234
|
+
findings.push({
|
|
235
|
+
severity: 'caution',
|
|
236
|
+
message: 'a pool that backs workers indiscriminately is adversely selected, not diversified',
|
|
237
|
+
remedy: 'unreliable workers have the most to gain from being covered, so they seek cover hardest',
|
|
238
|
+
});
|
|
239
|
+
return assess('pool', findings);
|
|
240
|
+
}
|
|
241
|
+
export function readinessForDoubter(intent) {
|
|
242
|
+
const findings = [];
|
|
243
|
+
const { terms, notional, feeBps } = intent;
|
|
244
|
+
const quote = doubtQuote(terms, notional, feeBps);
|
|
245
|
+
if (quote.capped) {
|
|
246
|
+
const wasted = notional - maxDoubtPayout(terms);
|
|
247
|
+
findings.push({
|
|
248
|
+
severity: 'block',
|
|
249
|
+
message: `${amt(wasted)} of this position can never pay out — the cap is ${amt(quote.maxPayout)}`,
|
|
250
|
+
remedy: `size at or below ${amt(maxDoubtPayout(terms))}`,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (quote.fee === ZERO && notional > ZERO) {
|
|
254
|
+
// A free position is not a gift: it means the fee rounded away, and a
|
|
255
|
+
// market where doubt costs nothing is one where doubt means nothing.
|
|
256
|
+
findings.push({
|
|
257
|
+
severity: 'caution',
|
|
258
|
+
message: 'the fee rounds to zero, so this position costs you nothing and signals nothing',
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
findings.push({
|
|
262
|
+
severity: 'note',
|
|
263
|
+
message: `you break even at a ${(quote.breakEvenProbability * 100).toFixed(3)}% failure rate`,
|
|
264
|
+
});
|
|
265
|
+
findings.push({
|
|
266
|
+
severity: 'note',
|
|
267
|
+
message: 'a rejection is not a win: only an adjudicated finding pays doubt',
|
|
268
|
+
});
|
|
269
|
+
return assess('doubter', findings);
|
|
270
|
+
}
|
|
271
|
+
export function readinessForChallenger(intent) {
|
|
272
|
+
const findings = [];
|
|
273
|
+
const { terms, bond } = intent;
|
|
274
|
+
if (terms.evaluatorBond === ZERO) {
|
|
275
|
+
findings.push({
|
|
276
|
+
severity: 'block',
|
|
277
|
+
message: 'the evaluator has no bond, so a successful challenge would pay nothing',
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
// The payout is fixed at the evaluator's bond, so bonding more than that is
|
|
281
|
+
// strictly worse: it cannot increase the win and only raises the loss.
|
|
282
|
+
if (bond > terms.evaluatorBond && terms.evaluatorBond > ZERO) {
|
|
283
|
+
findings.push({
|
|
284
|
+
severity: 'block',
|
|
285
|
+
message: `bonding ${amt(bond)} to win at most ${amt(terms.evaluatorBond)} loses money even when you are right`,
|
|
286
|
+
remedy: `bond no more than ${amt(terms.evaluatorBond)}`,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
const total = Number(terms.evaluatorBond) + Number(bond);
|
|
290
|
+
const breakEven = total > 0 ? Number(bond) / total : 1;
|
|
291
|
+
if (intent.confidence !== undefined && intent.confidence <= breakEven) {
|
|
292
|
+
findings.push({
|
|
293
|
+
severity: 'caution',
|
|
294
|
+
message: `you need better than ${(breakEven * 100).toFixed(1)}% confidence and you gave ${(intent.confidence * 100).toFixed(1)}%`,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
findings.push({
|
|
298
|
+
severity: 'note',
|
|
299
|
+
message: `a wrong challenge forfeits the whole ${amt(bond)}`,
|
|
300
|
+
});
|
|
301
|
+
return assess('challenger', findings);
|
|
302
|
+
}
|
|
303
|
+
/** Only the findings that stop someone committing. */
|
|
304
|
+
export function blockers(readiness) {
|
|
305
|
+
return readiness.findings.filter((f) => f.severity === 'block');
|
|
306
|
+
}
|
|
307
|
+
/** A one-line summary suitable for a prompt or a log. */
|
|
308
|
+
export function summarise(readiness) {
|
|
309
|
+
const blocking = blockers(readiness);
|
|
310
|
+
if (blocking.length > 0) {
|
|
311
|
+
return `not safe to proceed as ${readiness.role}: ${blocking.map((f) => f.message).join('; ')}`;
|
|
312
|
+
}
|
|
313
|
+
const cautions = readiness.findings.filter((f) => f.severity === 'caution');
|
|
314
|
+
return cautions.length > 0
|
|
315
|
+
? `safe to proceed as ${readiness.role}, with ${cautions.length} caution(s)`
|
|
316
|
+
: `safe to proceed as ${readiness.role}`;
|
|
317
|
+
}
|
|
318
|
+
export const MIN_SAFE_POOL_HEADROOM = 0.2;
|
|
319
|
+
/**
|
|
320
|
+
* The observed range of non-delivery on live agent traffic — a range, not a
|
|
321
|
+
* rate, because it is not stable.
|
|
322
|
+
*
|
|
323
|
+
* Measured on Base across six consecutive ~70-hour windows (August 2026,
|
|
324
|
+
* 15,498 logs, every one decoded, 2,250 funded and matured jobs). Non-delivery
|
|
325
|
+
* ran from **8% to 84%** depending on the window, and two windows a week apart
|
|
326
|
+
* had confidence intervals that did not overlap.
|
|
327
|
+
*
|
|
328
|
+
* An earlier draft of this file exported a single figure of 57.8%. That number
|
|
329
|
+
* was correctly measured on one window and would still have been misleading,
|
|
330
|
+
* because a reader would reasonably have taken it as *the* failure rate. It is
|
|
331
|
+
* not: it is one draw from a distribution ten times wider than itself.
|
|
332
|
+
*
|
|
333
|
+
* The consequence for a pool is the important part. A pool priced for the good
|
|
334
|
+
* end of this range is insolvent at the bad end, and the range is wide enough
|
|
335
|
+
* that no fixed premium spans it. What protects a pool is not a well-chosen
|
|
336
|
+
* rate — it is that non-delivery does not draw on cover at all.
|
|
337
|
+
*/
|
|
338
|
+
export const OBSERVED_NON_DELIVERY_RANGE = Object.freeze({
|
|
339
|
+
low: 0.08,
|
|
340
|
+
high: 0.843,
|
|
341
|
+
windows: 6,
|
|
342
|
+
jobs: 2_250,
|
|
343
|
+
note: 'August 2026, Base; six ~70h windows; CIs of adjacent windows do not overlap',
|
|
344
|
+
});
|
|
345
|
+
/**
|
|
346
|
+
* Why that range is so wide — and why it is not a market rate at all.
|
|
347
|
+
*
|
|
348
|
+
* Breaking the same traffic down by provider rather than by time: of 1,366
|
|
349
|
+
* matured jobs across 41 providers, a single provider accounted for 955 of
|
|
350
|
+
* them and failed to deliver 99.6%. Excluding that one address, non-delivery
|
|
351
|
+
* across everybody else is about 10%.
|
|
352
|
+
*
|
|
353
|
+
* So the market is not one rate with noise around it. It is two populations —
|
|
354
|
+
* agents that deliver almost always, and agents that almost never do — and a
|
|
355
|
+
* window's "failure rate" is mostly a measure of which of them happened to be
|
|
356
|
+
* busy. The 8–84% swing was composition, not time.
|
|
357
|
+
*
|
|
358
|
+
* The consequence for pricing is the whole point. A pool cannot price this
|
|
359
|
+
* market, because there is no market rate to price: the same fee is either
|
|
360
|
+
* far too high for a reliable worker or nowhere near enough for an unreliable
|
|
361
|
+
* one. What a pool can price is a *worker*. A pool that backs indiscriminately
|
|
362
|
+
* is not diversified, it is adversely selected — the unreliable agents are
|
|
363
|
+
* exactly the ones with most to gain from cover.
|
|
364
|
+
*/
|
|
365
|
+
export const OBSERVED_PROVIDER_CONCENTRATION = Object.freeze({
|
|
366
|
+
providers: 41,
|
|
367
|
+
jobs: 1_366,
|
|
368
|
+
/** Share of all jobs from the single busiest provider. */
|
|
369
|
+
topProviderShare: 0.7,
|
|
370
|
+
/** That provider's non-delivery rate. */
|
|
371
|
+
topProviderNonDelivery: 0.996,
|
|
372
|
+
/** Non-delivery across everyone else. */
|
|
373
|
+
nonDeliveryExcludingTop: 0.1,
|
|
374
|
+
note: 'August 2026, Base, 396k blocks; bimodal — not one rate with variance',
|
|
375
|
+
});
|
|
376
|
+
/**
|
|
377
|
+
* The observed range of rejection — work delivered and graded bad.
|
|
378
|
+
*
|
|
379
|
+
* Also unstable (0.6%–23%), but note where it sits: rejection at its *typical*
|
|
380
|
+
* level is roughly what a pool could absorb, whereas non-delivery is not, even
|
|
381
|
+
* at its best. That asymmetry is the argument for settling the two differently.
|
|
382
|
+
*/
|
|
383
|
+
export const OBSERVED_REJECTION_RANGE = Object.freeze({
|
|
384
|
+
low: 0.006,
|
|
385
|
+
high: 0.23,
|
|
386
|
+
windows: 6,
|
|
387
|
+
note: 'same sample; rejection and non-delivery move independently',
|
|
388
|
+
});
|
|
389
|
+
export { min };
|
|
390
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/onboarding/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA0CnD;;;;;;;GAOG;AACH,MAAM,GAAG,GAAG,CAAC,KAAY,EAAU,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAEzD,SAAS,MAAM,CAAC,IAAU,EAAE,QAA4B;IACtD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;QACnD,QAAQ;QACR,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,OAAO,EAAE,IAAI,CAAC,KAAK;KACpB,CAAC;AACJ,CAAC;AAUD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAoB;IACrD,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACzB,MAAM,GAAG,GAAG,QAAQ,CA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