@jinn-network/client 0.1.3-canary.8e61ba74 → 0.1.3-canary.92af7ba9
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/deployments/deployment-task-coordinator-router-v3-baseSepolia-fast.json +38 -0
- package/dist/build-info.json +4 -4
- package/dist/build-meta.json +1 -1
- package/dist/cli/commands/doctor.d.ts +15 -0
- package/dist/cli/commands/doctor.js +21 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/prediction-scoreboard.d.ts +10 -0
- package/dist/cli/commands/prediction-scoreboard.js +136 -0
- package/dist/cli/commands/prediction-scoreboard.js.map +1 -0
- package/dist/cli/commands/solver-nets.js +26 -2
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.js +11 -3
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/update.d.ts +8 -1
- package/dist/cli/commands/update.js +232 -7
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/task-native-readiness.d.ts +27 -0
- package/dist/cli/task-native-readiness.js +170 -0
- package/dist/cli/task-native-readiness.js.map +1 -0
- package/dist/config.d.ts +61 -0
- package/dist/config.js +76 -0
- package/dist/config.js.map +1 -1
- package/dist/corpus/envelope-projection.d.ts +12 -0
- package/dist/corpus/envelope-projection.js +110 -0
- package/dist/corpus/envelope-projection.js.map +1 -0
- package/dist/corpus/index.d.ts +3 -0
- package/dist/corpus/index.js +3 -0
- package/dist/corpus/index.js.map +1 -1
- package/dist/corpus/prediction-brier-scoreboard-report.d.ts +17 -0
- package/dist/corpus/prediction-brier-scoreboard-report.js +148 -0
- package/dist/corpus/prediction-brier-scoreboard-report.js.map +1 -0
- package/dist/corpus/prediction-brier-scoreboard.d.ts +56 -0
- package/dist/corpus/prediction-brier-scoreboard.js +269 -0
- package/dist/corpus/prediction-brier-scoreboard.js.map +1 -0
- package/dist/corpus/prediction-scoreable-verdicts.d.ts +4 -0
- package/dist/corpus/prediction-scoreable-verdicts.js +23 -0
- package/dist/corpus/prediction-scoreable-verdicts.js.map +1 -0
- package/dist/corpus/types.d.ts +43 -1
- package/dist/corpus/types.js.map +1 -1
- package/dist/daemon/daemon.js +1 -1
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/earning/contracts.d.ts +1 -0
- package/dist/earning/contracts.js +16 -0
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/store.d.ts +1 -0
- package/dist/earning/store.js +3 -0
- package/dist/earning/store.js.map +1 -1
- package/dist/harnesses/engine/engine.d.ts +2 -0
- package/dist/harnesses/engine/engine.js +18 -3
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/registry.d.ts +2 -0
- package/dist/harnesses/engine/registry.js +3 -0
- package/dist/harnesses/engine/registry.js.map +1 -1
- package/dist/harnesses/impls/index.js +4 -9
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/prediction-v1-evaluator/index.js +33 -12
- package/dist/harnesses/impls/prediction-v1-evaluator/index.js.map +1 -1
- package/dist/main.js +8 -4
- package/dist/main.js.map +1 -1
- package/dist/solver-nets/prediction-operator-ux.d.ts +102 -0
- package/dist/solver-nets/prediction-operator-ux.js +438 -0
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -0
- package/dist/solver-types/index.d.ts +11 -0
- package/dist/solver-types/index.js +8 -1
- package/dist/solver-types/index.js.map +1 -1
- package/dist/solver-types/prediction-v0.d.ts +1 -1
- package/dist/solver-types/prediction-v0.js +1 -1
- package/dist/solver-types/prediction-v0.js.map +1 -1
- package/dist/solver-types/prediction-v1-auto.d.ts +2 -0
- package/dist/solver-types/prediction-v1-auto.js +56 -7
- package/dist/solver-types/prediction-v1-auto.js.map +1 -1
- package/dist/solver-types/prediction-v1.js +25 -1
- package/dist/solver-types/prediction-v1.js.map +1 -1
- package/dist/solver-types/solver-type.d.ts +18 -5
- package/dist/store/store.d.ts +11 -0
- package/dist/store/store.js +316 -0
- package/dist/store/store.js.map +1 -1
- package/package.json +1 -1
- package/plugins/jinn-prediction-plugin/.claude-plugin/plugin.json +3 -1
- package/plugins/jinn-prediction-plugin/GEMINI.md +2 -0
- package/plugins/jinn-prediction-plugin/jinn.plugin.json +3 -1
- package/plugins/jinn-prediction-plugin/mcp/polymarket-server.mjs +321 -1
- package/plugins/jinn-prediction-plugin/skills/common-biases/SKILL.md +3 -0
- package/plugins/jinn-prediction-plugin/skills/polymarket-task-handling/SKILL.md +5 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync } from 'node:fs';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { PredictionV1RestorationPayloadSchema, } from '../vendor/@jinn-network/sdk/dist/solvernets/prediction-v1.js';
|
|
5
|
+
import { DEFAULT_DISABLED_HARNESSES } from '../harnesses/engine/registry.js';
|
|
6
|
+
import { loadExternalImpl as defaultLoadExternalImpl, } from '../harnesses/external-impls/index.js';
|
|
7
|
+
import { buildHarnesses as defaultBuildHarnesses } from '../harnesses/impls/index.js';
|
|
8
|
+
import { PredictionV1BaselineImpl } from '../harnesses/impls/prediction-v1-baseline/index.js';
|
|
9
|
+
import { TrajectoryCollector } from '../trajectory/collector.js';
|
|
10
|
+
import { PredictionV1TaskSchema } from '../types/prediction-v1.js';
|
|
11
|
+
import { loadSolverNets as defaultLoadSolverNets, } from './registry.js';
|
|
12
|
+
function sourceOf(entry) {
|
|
13
|
+
if (!entry)
|
|
14
|
+
return null;
|
|
15
|
+
return typeof entry === 'string' ? entry : entry.source;
|
|
16
|
+
}
|
|
17
|
+
function pluginStatus(role, source, plugin) {
|
|
18
|
+
return {
|
|
19
|
+
role,
|
|
20
|
+
source,
|
|
21
|
+
...(plugin
|
|
22
|
+
? {
|
|
23
|
+
name: plugin.name,
|
|
24
|
+
version: plugin.version,
|
|
25
|
+
supports: plugin.supports,
|
|
26
|
+
root: plugin.root,
|
|
27
|
+
manifestPath: plugin.manifestPath,
|
|
28
|
+
sha256: plugin.sha256,
|
|
29
|
+
...(plugin.cid ? { cid: plugin.cid } : {}),
|
|
30
|
+
}
|
|
31
|
+
: {}),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function errorMessage(error) {
|
|
35
|
+
return error instanceof Error ? error.message : String(error);
|
|
36
|
+
}
|
|
37
|
+
function diagnosticNextAction(diagnostics) {
|
|
38
|
+
const firstError = diagnostics.find((d) => d.severity === 'error' && d.nextAction);
|
|
39
|
+
if (firstError?.nextAction)
|
|
40
|
+
return firstError.nextAction;
|
|
41
|
+
const firstWarning = diagnostics.find((d) => d.severity === 'warning' && d.nextAction);
|
|
42
|
+
if (firstWarning?.nextAction)
|
|
43
|
+
return firstWarning.nextAction;
|
|
44
|
+
return {
|
|
45
|
+
description: 'Prediction SolverNet is configured; start the daemon to watch shared Tasks.',
|
|
46
|
+
cli: 'jinn run',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function missingSolverNetStatus(configPath, name) {
|
|
50
|
+
const diagnostics = [
|
|
51
|
+
{
|
|
52
|
+
code: 'prediction_solvernet_missing',
|
|
53
|
+
severity: 'error',
|
|
54
|
+
message: `No SolverNet named '${name}' is configured.`,
|
|
55
|
+
configField: `solverNets.${name}`,
|
|
56
|
+
nextAction: {
|
|
57
|
+
description: name === 'prediction'
|
|
58
|
+
? 'Enable the default Prediction SolverNet.'
|
|
59
|
+
: 'Choose a configured SolverNet or add it to config.',
|
|
60
|
+
cli: name === 'prediction' ? 'jinn solver-nets enable prediction' : 'jinn solver-nets list',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
return {
|
|
65
|
+
kind: 'prediction.v1.operatorStatus',
|
|
66
|
+
ok: false,
|
|
67
|
+
configPath,
|
|
68
|
+
solverNet: {
|
|
69
|
+
name,
|
|
70
|
+
enabled: false,
|
|
71
|
+
solverType: 'prediction.v1',
|
|
72
|
+
taskGeneratorEnabled: false,
|
|
73
|
+
},
|
|
74
|
+
extraPlugins: [],
|
|
75
|
+
diagnostics,
|
|
76
|
+
nextAction: diagnosticNextAction(diagnostics),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export async function buildPredictionOperatorStatus({ config, configPath, name = 'prediction', buildHarnesses = defaultBuildHarnesses, loadExternalImpl = defaultLoadExternalImpl, loadSolverNets = defaultLoadSolverNets, }) {
|
|
80
|
+
const net = config.solverNets[name];
|
|
81
|
+
if (!net)
|
|
82
|
+
return missingSolverNetStatus(configPath, name);
|
|
83
|
+
const diagnostics = [];
|
|
84
|
+
let loadedNet;
|
|
85
|
+
let pluginLoadError = null;
|
|
86
|
+
if (!net.enabled) {
|
|
87
|
+
diagnostics.push({
|
|
88
|
+
code: 'prediction_solvernet_disabled',
|
|
89
|
+
severity: 'error',
|
|
90
|
+
message: 'Prediction SolverNet is disabled.',
|
|
91
|
+
configField: `solverNets.${name}.enabled`,
|
|
92
|
+
nextAction: {
|
|
93
|
+
description: 'Enable the Prediction SolverNet before participating.',
|
|
94
|
+
cli: `jinn solver-nets enable ${name}`,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
if (net.solverType !== 'prediction.v1') {
|
|
99
|
+
diagnostics.push({
|
|
100
|
+
code: 'prediction_solver_type_mismatch',
|
|
101
|
+
severity: 'error',
|
|
102
|
+
message: `SolverNet '${name}' is configured for ${net.solverType}, not prediction.v1.`,
|
|
103
|
+
configField: `solverNets.${name}.solverType`,
|
|
104
|
+
nextAction: {
|
|
105
|
+
description: 'Set the SolverNet solverType to prediction.v1.',
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (net.enabled) {
|
|
110
|
+
try {
|
|
111
|
+
const registry = await loadSolverNets({
|
|
112
|
+
solverNets: {
|
|
113
|
+
[name]: net,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
loadedNet = registry.get(name);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
pluginLoadError = errorMessage(error);
|
|
120
|
+
diagnostics.push({
|
|
121
|
+
code: 'prediction_plugin_unavailable',
|
|
122
|
+
severity: 'error',
|
|
123
|
+
message: pluginLoadError,
|
|
124
|
+
configField: `solverNets.${name}.canonicalPlugin`,
|
|
125
|
+
nextAction: {
|
|
126
|
+
description: 'Fix the Prediction SolverPlugin source or restore the bundled plugin.',
|
|
127
|
+
cli: `jinn solver-nets show ${name}`,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const externalHarnesses = [];
|
|
133
|
+
const selectedExternalEntry = config.harnesses?.externalImpls?.find((entry) => entry.name === net.harness);
|
|
134
|
+
let selectedExternalUnavailable = false;
|
|
135
|
+
for (const entry of config.harnesses?.externalImpls ?? []) {
|
|
136
|
+
const result = await loadExternalImpl({
|
|
137
|
+
entry,
|
|
138
|
+
trustedSigners: config.trustedImplSigners ?? [],
|
|
139
|
+
env: {
|
|
140
|
+
implName: entry.name,
|
|
141
|
+
implVersion: '0.0.0',
|
|
142
|
+
network: config.network,
|
|
143
|
+
implStateDir: join(config.engine.implStateDirRoot, entry.name),
|
|
144
|
+
secrets: Object.freeze({}),
|
|
145
|
+
log: () => { },
|
|
146
|
+
stub: true,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
if (result.kind === 'ok') {
|
|
150
|
+
externalHarnesses.push(result.impl);
|
|
151
|
+
}
|
|
152
|
+
else if (entry.name === net.harness) {
|
|
153
|
+
selectedExternalUnavailable = true;
|
|
154
|
+
diagnostics.push({
|
|
155
|
+
code: 'prediction_harness_external_unavailable',
|
|
156
|
+
severity: 'error',
|
|
157
|
+
message: `Selected external Harness '${entry.name}' could not be loaded: ${result.reason}${result.detail ? ` (${result.detail})` : ''}.`,
|
|
158
|
+
configField: `harnesses.externalImpls.${entry.name}`,
|
|
159
|
+
nextAction: {
|
|
160
|
+
description: 'Fix the configured external Harness package or select an installed Harness.',
|
|
161
|
+
cli: `jinn harnesses list`,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const disabledHarnesses = config.harnesses?.disabled ?? [...DEFAULT_DISABLED_HARNESSES];
|
|
167
|
+
const selectedHarnessDisabled = Boolean(net.harness && disabledHarnesses.includes(net.harness));
|
|
168
|
+
const harnesses = buildHarnesses({
|
|
169
|
+
stub: true,
|
|
170
|
+
rpcUrl: config.rpcUrl,
|
|
171
|
+
archiveRpcUrl: config.archiveRpcUrl,
|
|
172
|
+
claudePath: config.claudePath,
|
|
173
|
+
claudeModel: config.claudeModel,
|
|
174
|
+
implStateDirRoot: config.engine.implStateDirRoot,
|
|
175
|
+
externalImpls: externalHarnesses,
|
|
176
|
+
disabledNames: disabledHarnesses,
|
|
177
|
+
});
|
|
178
|
+
const selectedHarness = net.harness
|
|
179
|
+
? harnesses.find((candidate) => candidate.name === net.harness)
|
|
180
|
+
: undefined;
|
|
181
|
+
const harnessStatus = selectedHarness
|
|
182
|
+
? await buildHarnessStatus(selectedHarness)
|
|
183
|
+
: undefined;
|
|
184
|
+
if (!net.harness) {
|
|
185
|
+
diagnostics.push({
|
|
186
|
+
code: 'prediction_harness_missing',
|
|
187
|
+
severity: 'error',
|
|
188
|
+
message: 'No Harness is selected for the Prediction SolverNet.',
|
|
189
|
+
configField: `solverNets.${name}.harness`,
|
|
190
|
+
nextAction: {
|
|
191
|
+
description: 'Select a Harness for prediction.v1 Tasks.',
|
|
192
|
+
cli: `jinn solver-nets set-harness ${name} prediction-v1-baseline`,
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
else if (selectedHarnessDisabled) {
|
|
197
|
+
diagnostics.push({
|
|
198
|
+
code: 'prediction_harness_disabled',
|
|
199
|
+
severity: 'error',
|
|
200
|
+
message: `Selected Harness '${net.harness}' is disabled in operator config.`,
|
|
201
|
+
configField: `harnesses.disabled`,
|
|
202
|
+
nextAction: {
|
|
203
|
+
description: 'Remove the selected Harness from the disabled list or select a different Harness.',
|
|
204
|
+
cli: `jinn harnesses list`,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
else if (!selectedHarness && !selectedExternalUnavailable) {
|
|
209
|
+
diagnostics.push({
|
|
210
|
+
code: 'prediction_harness_unknown',
|
|
211
|
+
severity: 'error',
|
|
212
|
+
message: selectedExternalEntry
|
|
213
|
+
? `Selected external Harness '${net.harness}' is configured but not available.`
|
|
214
|
+
: `Selected Harness '${net.harness}' is not installed.`,
|
|
215
|
+
configField: `solverNets.${name}.harness`,
|
|
216
|
+
nextAction: {
|
|
217
|
+
description: 'Select an installed Harness.',
|
|
218
|
+
cli: `jinn harnesses list`,
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
else if (selectedHarness && !harnessStatus?.supportsPredictionV1Restoration) {
|
|
223
|
+
diagnostics.push({
|
|
224
|
+
code: 'prediction_harness_unsupported',
|
|
225
|
+
severity: 'error',
|
|
226
|
+
message: `Selected Harness '${selectedHarness.name}' does not support prediction.v1 restoration Tasks.`,
|
|
227
|
+
configField: `solverNets.${name}.harness`,
|
|
228
|
+
nextAction: {
|
|
229
|
+
description: 'Select a Harness that supports prediction.v1.',
|
|
230
|
+
cli: `jinn solver-nets set-harness ${name} prediction-v1-baseline`,
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
else if (selectedHarness && harnessStatus && !harnessStatus.readiness.ready) {
|
|
235
|
+
diagnostics.push({
|
|
236
|
+
code: 'prediction_harness_not_ready',
|
|
237
|
+
severity: 'warning',
|
|
238
|
+
message: harnessStatus.readiness.reason ?? `Selected Harness '${selectedHarness.name}' is not ready.`,
|
|
239
|
+
configField: `solverNets.${name}.harness`,
|
|
240
|
+
nextAction: harnessStatus.readiness.nextStep ?? {
|
|
241
|
+
description: 'Start the daemon with a configured operator fleet.',
|
|
242
|
+
cli: 'jinn run',
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
if (!net.taskGenerator.enabled) {
|
|
247
|
+
diagnostics.push({
|
|
248
|
+
code: 'prediction_task_generator_disabled',
|
|
249
|
+
severity: 'warning',
|
|
250
|
+
message: 'Prediction Task generator is disabled; this node can still solve shared Tasks but will not post new rounds.',
|
|
251
|
+
configField: `solverNets.${name}.taskGenerator.enabled`,
|
|
252
|
+
nextAction: {
|
|
253
|
+
description: 'Enable the Prediction Task generator if this operator should post shared Tasks.',
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
const extraPluginSources = net.plugins.map(sourceOf);
|
|
258
|
+
const status = {
|
|
259
|
+
kind: 'prediction.v1.operatorStatus',
|
|
260
|
+
ok: diagnostics.every((diagnostic) => diagnostic.severity !== 'error'),
|
|
261
|
+
configPath,
|
|
262
|
+
solverNet: {
|
|
263
|
+
name,
|
|
264
|
+
enabled: net.enabled,
|
|
265
|
+
solverType: net.solverType,
|
|
266
|
+
harness: net.harness,
|
|
267
|
+
taskGeneratorEnabled: net.taskGenerator.enabled,
|
|
268
|
+
},
|
|
269
|
+
canonicalPlugin: pluginStatus('canonical', sourceOf(net.canonicalPlugin), loadedNet?.canonicalPlugin),
|
|
270
|
+
extraPlugins: loadedNet
|
|
271
|
+
? loadedNet.plugins.map((plugin, index) => pluginStatus('extra', extraPluginSources[index] ?? null, plugin))
|
|
272
|
+
: extraPluginSources.map((source) => pluginStatus('extra', source)),
|
|
273
|
+
...(harnessStatus ? { harness: harnessStatus } : {}),
|
|
274
|
+
diagnostics,
|
|
275
|
+
nextAction: diagnosticNextAction(diagnostics),
|
|
276
|
+
};
|
|
277
|
+
if (pluginLoadError && !status.canonicalPlugin?.source) {
|
|
278
|
+
status.canonicalPlugin = pluginStatus('canonical', sourceOf(net.canonicalPlugin));
|
|
279
|
+
}
|
|
280
|
+
return status;
|
|
281
|
+
}
|
|
282
|
+
async function buildHarnessStatus(harness) {
|
|
283
|
+
const supportsPredictionV1Restoration = harness.supports({
|
|
284
|
+
solverType: 'prediction.v1',
|
|
285
|
+
role: 'restoration',
|
|
286
|
+
});
|
|
287
|
+
const readiness = harness.isReady
|
|
288
|
+
? await harness.isReady({ solverType: 'prediction.v1', role: 'restoration' })
|
|
289
|
+
: { ready: true };
|
|
290
|
+
return {
|
|
291
|
+
name: harness.name,
|
|
292
|
+
version: harness.version,
|
|
293
|
+
supportsPredictionV1Restoration,
|
|
294
|
+
readiness,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
export function buildSamplePredictionV1Task(options = {}) {
|
|
298
|
+
const now = options.now ?? Date.now();
|
|
299
|
+
const sampledAt = new Date(now).toISOString();
|
|
300
|
+
const endTs = options.closedWindow ? now - 1_000 : now + 60 * 60 * 1000;
|
|
301
|
+
const task = {
|
|
302
|
+
id: 'prediction-v1-local-sample',
|
|
303
|
+
description: 'Local no-funds Prediction SolverNet sample.',
|
|
304
|
+
solverType: 'prediction.v1',
|
|
305
|
+
role: 'restoration',
|
|
306
|
+
window: {
|
|
307
|
+
startTs: now - 60_000,
|
|
308
|
+
endTs,
|
|
309
|
+
},
|
|
310
|
+
claimPolicy: {
|
|
311
|
+
mode: 'parallel',
|
|
312
|
+
maxClaims: 25,
|
|
313
|
+
maxClaimsPerOperator: 1,
|
|
314
|
+
claimLeaseTtlSeconds: 30 * 60,
|
|
315
|
+
},
|
|
316
|
+
spec: {
|
|
317
|
+
question: {
|
|
318
|
+
kind: 'binary',
|
|
319
|
+
text: 'Will this local Prediction SolverNet sample complete successfully?',
|
|
320
|
+
yesLabel: 'YES',
|
|
321
|
+
noLabel: 'NO',
|
|
322
|
+
},
|
|
323
|
+
source: {
|
|
324
|
+
type: 'prediction-market',
|
|
325
|
+
venue: 'polymarket',
|
|
326
|
+
url: 'https://polymarket.com/event/jinn-local-sample',
|
|
327
|
+
identifiers: {
|
|
328
|
+
marketId: 'jinn-local-sample',
|
|
329
|
+
conditionId: '0xlocal-sample',
|
|
330
|
+
yesTokenId: 'yes-local-sample',
|
|
331
|
+
noTokenId: 'no-local-sample',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
resolution: {
|
|
335
|
+
expectedResolutionTime: new Date(now + 24 * 60 * 60 * 1000).toISOString(),
|
|
336
|
+
rulesText: 'Local sample only; no live market resolution is used.',
|
|
337
|
+
rulesUrl: 'https://polymarket.com/event/jinn-local-sample',
|
|
338
|
+
timezone: 'UTC',
|
|
339
|
+
},
|
|
340
|
+
consensusSnapshot: {
|
|
341
|
+
sampledAt,
|
|
342
|
+
probabilityYes: '0.6200',
|
|
343
|
+
method: 'best-bid-ask-midpoint',
|
|
344
|
+
bestBidYes: '0.6000',
|
|
345
|
+
bestAskYes: '0.6400',
|
|
346
|
+
spread: '0.0400',
|
|
347
|
+
source: 'polymarket-clob',
|
|
348
|
+
},
|
|
349
|
+
eligibilitySnapshot: {
|
|
350
|
+
sampledAt,
|
|
351
|
+
timeToResolutionHours: 24,
|
|
352
|
+
liquidityUsd: '10000',
|
|
353
|
+
volume24hUsd: '2500',
|
|
354
|
+
orderbookAgeSeconds: 0,
|
|
355
|
+
selectionReason: 'local-no-funds-sample',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
eligibility: {
|
|
359
|
+
dedupKey: 'polymarket:jinn-local-sample',
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
return PredictionV1TaskSchema.parse(task);
|
|
363
|
+
}
|
|
364
|
+
export async function runPredictionSample({ now, closedWindow = false, workingRoot, harness = new PredictionV1BaselineImpl(), } = {}) {
|
|
365
|
+
const task = buildSamplePredictionV1Task({ now, closedWindow });
|
|
366
|
+
const diagnostics = [];
|
|
367
|
+
const canAttempt = await harness.canAttempt?.(task);
|
|
368
|
+
if (canAttempt && !canAttempt.ok) {
|
|
369
|
+
diagnostics.push({
|
|
370
|
+
code: 'prediction_sample_cannot_attempt',
|
|
371
|
+
severity: 'error',
|
|
372
|
+
message: canAttempt.reason,
|
|
373
|
+
nextAction: {
|
|
374
|
+
description: 'Regenerate the sample with an active task window.',
|
|
375
|
+
},
|
|
376
|
+
});
|
|
377
|
+
return {
|
|
378
|
+
kind: 'prediction.v1.sampleRun',
|
|
379
|
+
ok: false,
|
|
380
|
+
task: sampleTaskSummary(task),
|
|
381
|
+
harness: { name: harness.name, version: harness.version },
|
|
382
|
+
diagnostics,
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
const root = workingRoot ?? mkdtempSync(join(tmpdir(), 'jinn-prediction-sample-'));
|
|
386
|
+
const workingDir = join(root, 'work');
|
|
387
|
+
const implStateDir = join(root, 'state');
|
|
388
|
+
mkdirSync(workingDir, { recursive: true, mode: 0o700 });
|
|
389
|
+
mkdirSync(implStateDir, { recursive: true, mode: 0o700 });
|
|
390
|
+
const solution = await harness.run({
|
|
391
|
+
task,
|
|
392
|
+
solverNet: { name: 'prediction', solverType: 'prediction.v1' },
|
|
393
|
+
runtimePlugins: [],
|
|
394
|
+
solverPluginRoots: [],
|
|
395
|
+
taskCid: 'local-sample-task-cid',
|
|
396
|
+
implStateDir,
|
|
397
|
+
workingDir,
|
|
398
|
+
log: () => { },
|
|
399
|
+
abort: new AbortController().signal,
|
|
400
|
+
msUntilEndTs: () => Math.max(0, task.window.endTs - Date.now()),
|
|
401
|
+
trajectory: new TrajectoryCollector({ taskCid: 'local-sample-task-cid', runId: 'local-sample' }),
|
|
402
|
+
});
|
|
403
|
+
const payload = solution.solutionPayload ?? {};
|
|
404
|
+
const parsedPayload = PredictionV1RestorationPayloadSchema.safeParse(payload);
|
|
405
|
+
if (!parsedPayload.success) {
|
|
406
|
+
diagnostics.push({
|
|
407
|
+
code: 'prediction_sample_solution_invalid',
|
|
408
|
+
severity: 'error',
|
|
409
|
+
message: `Sample Harness produced an invalid prediction.v1 Solution: ${parsedPayload.error.message}`,
|
|
410
|
+
nextAction: {
|
|
411
|
+
description: 'Inspect the baseline Harness output before running live Tasks.',
|
|
412
|
+
},
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
kind: 'prediction.v1.sampleRun',
|
|
417
|
+
ok: diagnostics.every((diagnostic) => diagnostic.severity !== 'error'),
|
|
418
|
+
task: sampleTaskSummary(task),
|
|
419
|
+
harness: { name: harness.name, version: harness.version },
|
|
420
|
+
solution: {
|
|
421
|
+
probabilityYes: payload['probabilityYes'],
|
|
422
|
+
submittedAt: payload['submittedAt'],
|
|
423
|
+
modelId: payload['modelId'],
|
|
424
|
+
payload,
|
|
425
|
+
artifactPath: join(workingDir, 'prediction-v1-solution.json'),
|
|
426
|
+
workingDir,
|
|
427
|
+
},
|
|
428
|
+
diagnostics,
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
function sampleTaskSummary(task) {
|
|
432
|
+
return {
|
|
433
|
+
id: task.id,
|
|
434
|
+
question: task.spec.question.text,
|
|
435
|
+
window: task.window,
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
//# sourceMappingURL=prediction-operator-ux.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prediction-operator-ux.js","sourceRoot":"","sources":["../../src/solver-nets/prediction-operator-ux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,oCAAoC,GACrC,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EACL,gBAAgB,IAAI,uBAAuB,GAE5C,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAA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AC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAsB;IAC/C,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI;QACjC,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -25,8 +25,19 @@ export declare function collectTestnetAutoTaskGenerators(opts: {
|
|
|
25
25
|
safeAddress?: `0x${string}`;
|
|
26
26
|
/** Agent EOA private key — passed to generator configs that sign tasks. */
|
|
27
27
|
agentPrivateKey?: `0x${string}`;
|
|
28
|
+
/** Explicit launcher opt-in for Polymarket prediction.v1 Task generation. */
|
|
29
|
+
predictionV1LauncherEnabled?: boolean;
|
|
28
30
|
/** Override prediction.v1 submission window (ms). */
|
|
29
31
|
predictionV1WindowMs?: number;
|
|
32
|
+
/** Override prediction.v1 Polymarket generator cadence (ms). */
|
|
33
|
+
predictionV1CadenceMs?: number;
|
|
34
|
+
/** Override prediction.v1 Polymarket generator safety caps. */
|
|
35
|
+
predictionV1MaxNewRoundsPerPoll?: number;
|
|
36
|
+
predictionV1MaxNewRoundsPerDay?: number;
|
|
37
|
+
predictionV1MaxOpenRounds?: number;
|
|
38
|
+
/** Override prediction.v1 Polymarket manual conditionId controls. */
|
|
39
|
+
predictionV1AllowlistConditionIds?: string[];
|
|
40
|
+
predictionV1BlocklistConditionIds?: string[];
|
|
30
41
|
/** Override prediction.v1 window→resolveTs gap (ms). */
|
|
31
42
|
predictionV1ResolveGapMs?: number;
|
|
32
43
|
}): {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Single dispatch table for in-repo SolverTypes — jinn-mono-6q1.1.
|
|
3
3
|
*/
|
|
4
4
|
import { portfolioV0 } from './portfolio-v0.js';
|
|
5
|
-
import { predictionV1 } from './prediction-
|
|
5
|
+
import { predictionV1 } from './prediction-v1.js';
|
|
6
6
|
import { predictionApyV0 } from './prediction-apy-v0.js';
|
|
7
7
|
import { learnerLoopTest } from './learner-loop-test.js';
|
|
8
8
|
export { PREDICTION_V1_KIND } from './constants.js';
|
|
@@ -38,7 +38,14 @@ export function collectTestnetAutoTaskGenerators(opts) {
|
|
|
38
38
|
agentEoa: opts.agentEoa,
|
|
39
39
|
safeAddress: opts.safeAddress,
|
|
40
40
|
agentPrivateKey: opts.agentPrivateKey,
|
|
41
|
+
predictionV1LauncherEnabled: opts.predictionV1LauncherEnabled,
|
|
41
42
|
predictionV1WindowMs: opts.predictionV1WindowMs,
|
|
43
|
+
predictionV1CadenceMs: opts.predictionV1CadenceMs,
|
|
44
|
+
predictionV1MaxNewRoundsPerPoll: opts.predictionV1MaxNewRoundsPerPoll,
|
|
45
|
+
predictionV1MaxNewRoundsPerDay: opts.predictionV1MaxNewRoundsPerDay,
|
|
46
|
+
predictionV1MaxOpenRounds: opts.predictionV1MaxOpenRounds,
|
|
47
|
+
predictionV1AllowlistConditionIds: opts.predictionV1AllowlistConditionIds,
|
|
48
|
+
predictionV1BlocklistConditionIds: opts.predictionV1BlocklistConditionIds,
|
|
42
49
|
predictionV1ResolveGapMs: opts.predictionV1ResolveGapMs,
|
|
43
50
|
};
|
|
44
51
|
for (const kind of knownSolverTypes()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/solver-types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAA8C;IACrE,cAAc,EAAE,WAAW;IAC3B,eAAe,EA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AAS;YAAE,SAAS;QACtC,MAAM,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,SAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,EAAE,CAAC;YACN,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAChE,QAAQ,CAAC,IAAI,CAAC,uCAAuC,KAAK,CAAC,UAAU,YAAY,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IACD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type PredictionV1AutoConfig } from './prediction-v0-auto.js';
|
|
2
2
|
import type { SolverTypeDefinition } from './solver-type.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const legacyChainlinkPredictionV1: SolverTypeDefinition<PredictionV1AutoConfig>;
|
|
@@ -2,7 +2,7 @@ import { BASE_SEPOLIA_FEEDS } from '../venues/chainlink/feeds.js';
|
|
|
2
2
|
import { predictionV1TemplateNeedsReadCurrent, resolvePredictionV1Template, } from './prediction-v0-template.js';
|
|
3
3
|
import { makePredictionV1Generator } from './prediction-v0-auto.js';
|
|
4
4
|
import { PREDICTION_V1_KIND } from './constants.js';
|
|
5
|
-
export const
|
|
5
|
+
export const legacyChainlinkPredictionV1 = {
|
|
6
6
|
solverType: PREDICTION_V1_KIND,
|
|
7
7
|
async parseSpec(raw, deps) {
|
|
8
8
|
if (predictionV1TemplateNeedsReadCurrent(raw) && !deps?.readCurrent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prediction-v0.js","sourceRoot":"","sources":["../../src/solver-types/prediction-v0.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,oCAAoC,EACpC,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,O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AK,EAAE,wBAAwB;YAC/B,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,eAAe,EAAE,GAAG,CAAC,eAAe;YACpC,gBAAgB,EAAE,GAAG,CAAC,oBAAoB;YAC1C,YAAY,EAAE,GAAG,CAAC,wBAAwB;SAC3C,CAAC;IACJ,CAAC;IACD,EAAE,EAAE;QACF,WAAW,EAAE,+CAA+C;QAC5D,QAAQ,EAAE,YAAY;KACvB;CACF,CAAC"}
|
|
@@ -10,6 +10,7 @@ export interface PredictionV1AutoConfig extends PolymarketClientConfig {
|
|
|
10
10
|
minVolume24hUsd?: string;
|
|
11
11
|
maxYesSpread?: string;
|
|
12
12
|
maxOrderbookAgeSeconds?: number;
|
|
13
|
+
cadenceMs?: number;
|
|
13
14
|
maxNewRoundsPerPoll?: number;
|
|
14
15
|
maxNewRoundsPerDay?: number;
|
|
15
16
|
maxOpenRounds?: number;
|
|
@@ -17,6 +18,7 @@ export interface PredictionV1AutoConfig extends PolymarketClientConfig {
|
|
|
17
18
|
agentEoa?: `0x${string}`;
|
|
18
19
|
safeAddress?: `0x${string}`;
|
|
19
20
|
agentPrivateKey?: `0x${string}`;
|
|
21
|
+
allowlistConditionIds?: string[];
|
|
20
22
|
blocklistConditionIds?: string[];
|
|
21
23
|
}
|
|
22
24
|
export declare function makePredictionV1Generator(config?: PredictionV1AutoConfig): () => Promise<Task[] | null>;
|