@jinn-network/client 0.1.7-canary.d4e4e183 → 0.1.7-canary.f16d80e6
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/README.md +67 -1
- package/dist/adapters/mech/adapter.js +27 -3
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/safe.d.ts +1 -1
- package/dist/adapters/mech/safe.js +5 -3
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +6 -1
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/api/activity-events-endpoint.d.ts +14 -0
- package/dist/api/activity-events-endpoint.js +59 -0
- package/dist/api/activity-events-endpoint.js.map +1 -0
- package/dist/api/bootstrap-endpoint.d.ts +1 -2
- package/dist/api/bootstrap-endpoint.js +0 -1
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/gather-status.d.ts +3 -0
- package/dist/api/gather-status.js +105 -26
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/launcher-status.d.ts +1 -1
- package/dist/api/launcher-status.js +11 -10
- package/dist/api/launcher-status.js.map +1 -1
- package/dist/api/launcher-tasks.d.ts +1 -1
- package/dist/api/launcher-tasks.js +12 -8
- package/dist/api/launcher-tasks.js.map +1 -1
- package/dist/api/server.js +4 -0
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.js +11 -131
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +40 -0
- package/dist/api/status-build.js +25 -0
- package/dist/api/status-build.js.map +1 -1
- package/dist/build-info.json +4 -4
- package/dist/build-meta.json +1 -1
- package/dist/cli/commands/solver-nets.js +92 -21
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/tasks.js +15 -2
- package/dist/cli/commands/tasks.js.map +1 -1
- package/dist/cli/task-native-readiness.d.ts +7 -0
- package/dist/cli/task-native-readiness.js +7 -5
- package/dist/cli/task-native-readiness.js.map +1 -1
- package/dist/config.d.ts +138 -232
- package/dist/config.js +202 -107
- package/dist/config.js.map +1 -1
- package/dist/daemon/daemon.d.ts +3 -0
- package/dist/daemon/daemon.js +88 -22
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/gate-logger.d.ts +9 -0
- package/dist/daemon/gate-logger.js +2 -0
- package/dist/daemon/gate-logger.js.map +1 -0
- package/dist/daemon/readiness-gate.d.ts +1 -4
- package/dist/daemon/readiness-gate.js.map +1 -1
- package/dist/daemon/spend-cap-gate.d.ts +40 -0
- package/dist/daemon/spend-cap-gate.js +46 -0
- package/dist/daemon/spend-cap-gate.js.map +1 -0
- package/dist/dashboard/assets/index-CKTc0D37.css +32 -0
- package/dist/dashboard/assets/index-h2ATCtSA.js +345 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/earning/safe-adapter.js +23 -11
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/types.d.ts +6 -6
- package/dist/earning/viem-clients.d.ts +11 -4
- package/dist/earning/viem-clients.js +14 -5
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/events/types.d.ts +2 -2
- package/dist/harnesses/engine/engine.js +13 -0
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/main.js +44 -31
- package/dist/main.js.map +1 -1
- package/dist/observability/emit-event.d.ts +3 -2
- package/dist/observability/emit-event.js +22 -1
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/preflight/rpc-network.d.ts +40 -0
- package/dist/preflight/rpc-network.js +67 -1
- package/dist/preflight/rpc-network.js.map +1 -1
- package/dist/rpc/transport.d.ts +109 -0
- package/dist/rpc/transport.js +220 -0
- package/dist/rpc/transport.js.map +1 -0
- package/dist/scripts/donation-consumption-acceptance.js +7 -28
- package/dist/scripts/donation-consumption-acceptance.js.map +1 -1
- package/dist/solver-nets/prediction-operator-ux.d.ts +1 -2
- package/dist/solver-nets/prediction-operator-ux.js +56 -53
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -1
- package/dist/solver-nets/registry.d.ts +19 -1
- package/dist/solver-nets/registry.js +37 -24
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/spend/credential.d.ts +8 -0
- package/dist/spend/credential.js +30 -0
- package/dist/spend/credential.js.map +1 -0
- package/dist/spend/daemon-config.d.ts +13 -0
- package/dist/spend/daemon-config.js +24 -0
- package/dist/spend/daemon-config.js.map +1 -0
- package/dist/spend/pricing.d.ts +16 -0
- package/dist/spend/pricing.js +26 -0
- package/dist/spend/pricing.js.map +1 -0
- package/dist/spend/record.d.ts +13 -0
- package/dist/spend/record.js +30 -0
- package/dist/spend/record.js.map +1 -0
- package/dist/spend/usage.d.ts +27 -0
- package/dist/spend/usage.js +113 -0
- package/dist/spend/usage.js.map +1 -0
- package/dist/store/store.d.ts +28 -0
- package/dist/store/store.js +118 -4
- package/dist/store/store.js.map +1 -1
- package/dist/trajectory/transcript-parsers/types.d.ts +8 -8
- package/dist/tx-retry.d.ts +15 -0
- package/dist/tx-retry.js +30 -6
- package/dist/tx-retry.js.map +1 -1
- package/package.json +2 -1
- package/dist/dashboard/assets/index-BUlE8F3Y.js +0 -330
- package/dist/dashboard/assets/index-blqc7eqq.css +0 -32
package/dist/config.d.ts
CHANGED
|
@@ -15,45 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { z } from 'zod';
|
|
17
17
|
import type { Task } from './types/task.js';
|
|
18
|
-
export interface DefaultSolverNetConfig extends Record<string, unknown> {
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
solverType: string;
|
|
21
|
-
/**
|
|
22
|
-
* Operator-selected roles for this SolverNet. A non-empty subset of
|
|
23
|
-
* `['solving', 'evaluating']`. Multiple roles can run concurrently — the
|
|
24
|
-
* daemon enforces `disallowSolverSelfEvaluation` on-chain so the operator
|
|
25
|
-
* never evaluates its own Solutions, and the on-chain
|
|
26
|
-
* TaskActivityCheckerV3 keeps `solutionDeliveryWeight` and
|
|
27
|
-
* `verdictDeliveryWeight` as independent additive counters.
|
|
28
|
-
*
|
|
29
|
-
* Launcher-side flagging is no longer expressed as an operator role —
|
|
30
|
-
* launcher ownership is determined by the launched-record subsystem
|
|
31
|
-
* (spec/2026-05-05-solvernet-creation-and-launch.md §11). Operator config
|
|
32
|
-
* carries only the participation roles.
|
|
33
|
-
*
|
|
34
|
-
* Legacy `role: 'solving' | 'evaluating'` configs are auto-migrated to
|
|
35
|
-
* `roles: [<role>]` by the loader (zod preprocessor on solverNets[*]).
|
|
36
|
-
*/
|
|
37
|
-
roles?: Array<'solving' | 'evaluating'>;
|
|
38
|
-
harness?: string;
|
|
39
|
-
model?: string;
|
|
40
|
-
plugins?: Array<string | {
|
|
41
|
-
name?: string;
|
|
42
|
-
source: string;
|
|
43
|
-
version?: string;
|
|
44
|
-
}>;
|
|
45
|
-
taskGenerator?: {
|
|
46
|
-
enabled?: boolean;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Default `solverNets` is empty per Decision 5 of
|
|
51
|
-
* spec/2026-05-05-solvernet-creation-and-launch.md — pre-release, no
|
|
52
|
-
* migration burden. Fresh installs no longer seed the `prediction` entry;
|
|
53
|
-
* the operator joins SolverNets through the registry (Task 21's
|
|
54
|
-
* `joinedSolverNets` block).
|
|
55
|
-
*/
|
|
56
|
-
export declare const DEFAULT_SOLVER_NETS: Record<string, DefaultSolverNetConfig>;
|
|
57
18
|
export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
58
19
|
/**
|
|
59
20
|
* Network to connect to.
|
|
@@ -64,19 +25,24 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
64
25
|
*/
|
|
65
26
|
network: z.ZodDefault<z.ZodEnum<["mainnet", "testnet"]>>;
|
|
66
27
|
/**
|
|
67
|
-
* Base RPC endpoint.
|
|
68
|
-
*
|
|
69
|
-
*
|
|
28
|
+
* Base RPC endpoint(s). Accepts either a single URL string or an array of
|
|
29
|
+
* URLs. When an array (or a comma-separated env var) is supplied, the
|
|
30
|
+
* daemon builds a viem `fallback()` chain in slot order (primary first).
|
|
31
|
+
* See `client/src/rpc/transport.ts` for the wrapper. Defaults to the
|
|
32
|
+
* publicnode+sepolia.base.org two-provider chain on testnet and the public
|
|
33
|
+
* `mainnet.base.org` on mainnet. Set explicitly to override.
|
|
34
|
+
*
|
|
35
|
+
* Env: JINN_RPC_URL / BASE_SEPOLIA_RPC_URL / BASE_RPC_URL (comma-separated).
|
|
70
36
|
*/
|
|
71
|
-
rpcUrl: z.ZodOptional<z.ZodString
|
|
72
|
-
archiveRpcUrl: z.ZodOptional<z.ZodString
|
|
37
|
+
rpcUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
38
|
+
archiveRpcUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
73
39
|
/**
|
|
74
|
-
* Optional L2 proof/archive RPC endpoint for canonical cross-chain canaries.
|
|
40
|
+
* Optional L2 proof/archive RPC endpoint(s) for canonical cross-chain canaries.
|
|
75
41
|
* The daemon can use its normal rpcUrl for writes while proof construction
|
|
76
42
|
* uses this endpoint for historical eth_getProof at OP dispute-game blocks.
|
|
77
|
-
* Env: JINN_L2_PROOF_RPC_URL.
|
|
43
|
+
* Accepts string or array form (see rpcUrl). Env: JINN_L2_PROOF_RPC_URL.
|
|
78
44
|
*/
|
|
79
|
-
l2ProofRpcUrl: z.ZodOptional<z.ZodString
|
|
45
|
+
l2ProofRpcUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
80
46
|
/** Earning state directory */
|
|
81
47
|
earningDir: z.ZodDefault<z.ZodString>;
|
|
82
48
|
/** SQLite database path */
|
|
@@ -970,18 +936,19 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
970
936
|
*/
|
|
971
937
|
jinnMviL2DeploymentPath: z.ZodOptional<z.ZodString>;
|
|
972
938
|
/**
|
|
973
|
-
* RPC endpoint for the L1 governance chain (Ethereum / Sepolia) where
|
|
974
|
-
* JinnDistributor lives.
|
|
975
|
-
*
|
|
976
|
-
*
|
|
939
|
+
* RPC endpoint(s) for the L1 governance chain (Ethereum / Sepolia) where
|
|
940
|
+
* the JinnDistributor lives. Accepts string or array form (see rpcUrl) and
|
|
941
|
+
* supports comma-separated env values. Testnet defaults to a public Sepolia
|
|
942
|
+
* RPC; mainnet requires an operator override when L1 submit mode is
|
|
943
|
+
* configured. Env: JINN_ETHEREUM_RPC_URL.
|
|
977
944
|
*/
|
|
978
|
-
ethereumRpcUrl: z.ZodOptional<z.ZodString
|
|
945
|
+
ethereumRpcUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
979
946
|
/**
|
|
980
|
-
* Optional archive RPC endpoint for the L1 governance chain. Used for
|
|
981
|
-
* historical block lookups when constructing canonical-mode proofs.
|
|
982
|
-
* Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
947
|
+
* Optional archive RPC endpoint(s) for the L1 governance chain. Used for
|
|
948
|
+
* historical block lookups when constructing canonical-mode proofs. Accepts
|
|
949
|
+
* string or array form. Env: JINN_ETHEREUM_ARCHIVE_RPC_URL.
|
|
983
950
|
*/
|
|
984
|
-
ethereumArchiveRpcUrl: z.ZodOptional<z.ZodString
|
|
951
|
+
ethereumArchiveRpcUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
985
952
|
/**
|
|
986
953
|
* L1 network used by the cross-chain claim loop. 'sepolia' tracks Base
|
|
987
954
|
* Sepolia testnet; 'ethereum' tracks Base mainnet. Defaults to 'sepolia'
|
|
@@ -1137,97 +1104,7 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1137
1104
|
mode?: "train" | "frozen" | undefined;
|
|
1138
1105
|
}>>;
|
|
1139
1106
|
/**
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1142
|
-
* Each entry's `roles` is a non-empty subset of `['solving', 'evaluating']`.
|
|
1143
|
-
* Multiple roles can run concurrently for the same SolverNet; the
|
|
1144
|
-
* protocol-level `disallowSolverSelfEvaluation` flag prevents the operator
|
|
1145
|
-
* from evaluating its own Solutions and the on-chain
|
|
1146
|
-
* TaskActivityCheckerV3 tracks Solution and Verdict counters independently
|
|
1147
|
-
* (additive into `eligibleActivityWeight`).
|
|
1148
|
-
*
|
|
1149
|
-
* Launcher ownership lives in the launched-record subsystem
|
|
1150
|
-
* (spec/2026-05-05-solvernet-creation-and-launch.md §11), not in operator
|
|
1151
|
-
* config — there is no `'launching'` operator role. Legacy entries that
|
|
1152
|
-
* include `'launching'` in `roles` have it stripped by the preprocessor so
|
|
1153
|
-
* older config files keep loading.
|
|
1154
|
-
*
|
|
1155
|
-
* Backwards-compat: a legacy `role: 'solving' | 'evaluating'` field is
|
|
1156
|
-
* auto-promoted to `roles: [<role>]` by the zod preprocessor below so
|
|
1157
|
-
* existing `~/.jinn-client/config.json` files keep loading without an
|
|
1158
|
-
* operator migration step.
|
|
1159
|
-
*/
|
|
1160
|
-
solverNets: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
1161
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1162
|
-
solverType: z.ZodString;
|
|
1163
|
-
roles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEnum<["solving", "evaluating"]>, "many">>, ("solving" | "evaluating")[], ("solving" | "evaluating")[] | undefined>;
|
|
1164
|
-
harness: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
1165
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1166
|
-
plugins: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1167
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1168
|
-
source: z.ZodString;
|
|
1169
|
-
version: z.ZodOptional<z.ZodString>;
|
|
1170
|
-
}, "strip", z.ZodTypeAny, {
|
|
1171
|
-
source: string;
|
|
1172
|
-
name?: string | undefined;
|
|
1173
|
-
version?: string | undefined;
|
|
1174
|
-
}, {
|
|
1175
|
-
source: string;
|
|
1176
|
-
name?: string | undefined;
|
|
1177
|
-
version?: string | undefined;
|
|
1178
|
-
}>]>, "many">>;
|
|
1179
|
-
taskGenerator: z.ZodDefault<z.ZodObject<{
|
|
1180
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1181
|
-
}, "strip", z.ZodTypeAny, {
|
|
1182
|
-
enabled: boolean;
|
|
1183
|
-
}, {
|
|
1184
|
-
enabled?: boolean | undefined;
|
|
1185
|
-
}>>;
|
|
1186
|
-
}, "strip", z.ZodTypeAny, {
|
|
1187
|
-
solverType: string;
|
|
1188
|
-
enabled: boolean;
|
|
1189
|
-
roles: ("solving" | "evaluating")[];
|
|
1190
|
-
harness: string;
|
|
1191
|
-
plugins: (string | {
|
|
1192
|
-
source: string;
|
|
1193
|
-
name?: string | undefined;
|
|
1194
|
-
version?: string | undefined;
|
|
1195
|
-
})[];
|
|
1196
|
-
taskGenerator: {
|
|
1197
|
-
enabled: boolean;
|
|
1198
|
-
};
|
|
1199
|
-
model?: string | undefined;
|
|
1200
|
-
}, {
|
|
1201
|
-
solverType: string;
|
|
1202
|
-
enabled?: boolean | undefined;
|
|
1203
|
-
roles?: ("solving" | "evaluating")[] | undefined;
|
|
1204
|
-
harness?: string | undefined;
|
|
1205
|
-
model?: string | undefined;
|
|
1206
|
-
plugins?: (string | {
|
|
1207
|
-
source: string;
|
|
1208
|
-
name?: string | undefined;
|
|
1209
|
-
version?: string | undefined;
|
|
1210
|
-
})[] | undefined;
|
|
1211
|
-
taskGenerator?: {
|
|
1212
|
-
enabled?: boolean | undefined;
|
|
1213
|
-
} | undefined;
|
|
1214
|
-
}>, {
|
|
1215
|
-
solverType: string;
|
|
1216
|
-
enabled: boolean;
|
|
1217
|
-
roles: ("solving" | "evaluating")[];
|
|
1218
|
-
harness: string;
|
|
1219
|
-
plugins: (string | {
|
|
1220
|
-
source: string;
|
|
1221
|
-
name?: string | undefined;
|
|
1222
|
-
version?: string | undefined;
|
|
1223
|
-
})[];
|
|
1224
|
-
taskGenerator: {
|
|
1225
|
-
enabled: boolean;
|
|
1226
|
-
};
|
|
1227
|
-
model?: string | undefined;
|
|
1228
|
-
}, unknown>>>;
|
|
1229
|
-
/**
|
|
1230
|
-
* Manifest-keyed joined SolverNets (Task 21).
|
|
1107
|
+
* Manifest-keyed joined SolverNets.
|
|
1231
1108
|
*
|
|
1232
1109
|
* Spec: spec/2026-05-05-solvernet-creation-and-launch.md §12.
|
|
1233
1110
|
*
|
|
@@ -1236,10 +1113,10 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1236
1113
|
* (CIDv0 / CIDv1) — the only stable identifier that maps back to a
|
|
1237
1114
|
* launched-instance authority across launchers.
|
|
1238
1115
|
*
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1116
|
+
* The daemon narrows this block into runtime SolverNet registry entries on
|
|
1117
|
+
* restart. Legacy short-name-keyed `solverNets` blocks on operator config
|
|
1118
|
+
* files are auto-migrated into synthetic `legacy:<short-name>`-keyed
|
|
1119
|
+
* entries at load time (see `migrateLegacySolverNets`).
|
|
1243
1120
|
*/
|
|
1244
1121
|
joinedSolverNets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1245
1122
|
manifestCid: z.ZodString;
|
|
@@ -1260,28 +1137,28 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1260
1137
|
plugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1261
1138
|
disabledDefaultPlugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1262
1139
|
}, "strip", z.ZodTypeAny, {
|
|
1140
|
+
manifestCid: string;
|
|
1263
1141
|
roles: ("solver" | "evaluator")[];
|
|
1264
1142
|
plugins: string[];
|
|
1265
|
-
manifestCid: string;
|
|
1266
1143
|
disabledDefaultPlugins: string[];
|
|
1267
1144
|
name?: string | undefined;
|
|
1268
1145
|
harness?: string | undefined;
|
|
1269
|
-
model?: string | undefined;
|
|
1270
1146
|
contract?: {
|
|
1271
1147
|
id: string;
|
|
1272
1148
|
version: string;
|
|
1273
1149
|
} | undefined;
|
|
1150
|
+
model?: string | undefined;
|
|
1274
1151
|
}, {
|
|
1275
|
-
roles: ("solver" | "evaluator")[];
|
|
1276
1152
|
manifestCid: string;
|
|
1153
|
+
roles: ("solver" | "evaluator")[];
|
|
1277
1154
|
name?: string | undefined;
|
|
1278
1155
|
harness?: string | undefined;
|
|
1279
|
-
model?: string | undefined;
|
|
1280
|
-
plugins?: string[] | undefined;
|
|
1281
1156
|
contract?: {
|
|
1282
1157
|
id: string;
|
|
1283
1158
|
version: string;
|
|
1284
1159
|
} | undefined;
|
|
1160
|
+
model?: string | undefined;
|
|
1161
|
+
plugins?: string[] | undefined;
|
|
1285
1162
|
disabledDefaultPlugins?: string[] | undefined;
|
|
1286
1163
|
}>>>;
|
|
1287
1164
|
/**
|
|
@@ -1438,10 +1315,17 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1438
1315
|
* Env: JINN_REPUTATION_ENABLED
|
|
1439
1316
|
*/
|
|
1440
1317
|
reputationEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
1318
|
+
/**
|
|
1319
|
+
* Per-credential daily spend caps (USD). Keys are credential identifiers
|
|
1320
|
+
* (e.g. `'anthropic:api-key'`); values are positive numbers representing
|
|
1321
|
+
* the maximum USD spend per day for that credential.
|
|
1322
|
+
*
|
|
1323
|
+
* `JINN_SPEND_CAP_USD` (env-only, consumed directly by the spend-budget
|
|
1324
|
+
* subsystem in Task 9) is tracked for provenance in TRACKED_ENV_VARS below
|
|
1325
|
+
* but is NOT a config-file field and has no entry in this schema.
|
|
1326
|
+
*/
|
|
1327
|
+
spendCaps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1441
1328
|
}, "strip", z.ZodTypeAny, {
|
|
1442
|
-
harness: {
|
|
1443
|
-
mode: "train" | "frozen";
|
|
1444
|
-
};
|
|
1445
1329
|
network: "testnet" | "mainnet";
|
|
1446
1330
|
earningDir: string;
|
|
1447
1331
|
dbPath: string;
|
|
@@ -1536,21 +1420,9 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1536
1420
|
stakingMode: "standard" | "self-bond";
|
|
1537
1421
|
targetServices: number;
|
|
1538
1422
|
debug: boolean;
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
roles: ("solving" | "evaluating")[];
|
|
1543
|
-
harness: string;
|
|
1544
|
-
plugins: (string | {
|
|
1545
|
-
source: string;
|
|
1546
|
-
name?: string | undefined;
|
|
1547
|
-
version?: string | undefined;
|
|
1548
|
-
})[];
|
|
1549
|
-
taskGenerator: {
|
|
1550
|
-
enabled: boolean;
|
|
1551
|
-
};
|
|
1552
|
-
model?: string | undefined;
|
|
1553
|
-
}>;
|
|
1423
|
+
harness: {
|
|
1424
|
+
mode: "train" | "frozen";
|
|
1425
|
+
};
|
|
1554
1426
|
captures: {
|
|
1555
1427
|
llmProxy: {
|
|
1556
1428
|
enabled: boolean;
|
|
@@ -1559,9 +1431,9 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1559
1431
|
};
|
|
1560
1432
|
runLegacyMigrations: boolean;
|
|
1561
1433
|
reputationEnabled: boolean;
|
|
1562
|
-
rpcUrl?: string | undefined;
|
|
1563
|
-
archiveRpcUrl?: string | undefined;
|
|
1564
|
-
l2ProofRpcUrl?: string | undefined;
|
|
1434
|
+
rpcUrl?: string | string[] | undefined;
|
|
1435
|
+
archiveRpcUrl?: string | string[] | undefined;
|
|
1436
|
+
l2ProofRpcUrl?: string | string[] | undefined;
|
|
1565
1437
|
apiBindHost?: string | undefined;
|
|
1566
1438
|
hermesPath?: string | undefined;
|
|
1567
1439
|
hermesModel?: string | undefined;
|
|
@@ -1581,8 +1453,8 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1581
1453
|
testnetStolasDeploymentPath?: string | undefined;
|
|
1582
1454
|
jinnMviL1DeploymentPath?: string | undefined;
|
|
1583
1455
|
jinnMviL2DeploymentPath?: string | undefined;
|
|
1584
|
-
ethereumRpcUrl?: string | undefined;
|
|
1585
|
-
ethereumArchiveRpcUrl?: string | undefined;
|
|
1456
|
+
ethereumRpcUrl?: string | string[] | undefined;
|
|
1457
|
+
ethereumArchiveRpcUrl?: string | string[] | undefined;
|
|
1586
1458
|
jinnDistributorAddress?: string | undefined;
|
|
1587
1459
|
jinnClaimEmitterAddress?: string | undefined;
|
|
1588
1460
|
jinnMessengerAddress?: string | undefined;
|
|
@@ -1600,17 +1472,17 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1600
1472
|
}[] | undefined;
|
|
1601
1473
|
} | undefined;
|
|
1602
1474
|
joinedSolverNets?: Record<string, {
|
|
1475
|
+
manifestCid: string;
|
|
1603
1476
|
roles: ("solver" | "evaluator")[];
|
|
1604
1477
|
plugins: string[];
|
|
1605
|
-
manifestCid: string;
|
|
1606
1478
|
disabledDefaultPlugins: string[];
|
|
1607
1479
|
name?: string | undefined;
|
|
1608
1480
|
harness?: string | undefined;
|
|
1609
|
-
model?: string | undefined;
|
|
1610
1481
|
contract?: {
|
|
1611
1482
|
id: string;
|
|
1612
1483
|
version: string;
|
|
1613
1484
|
} | undefined;
|
|
1485
|
+
model?: string | undefined;
|
|
1614
1486
|
}> | undefined;
|
|
1615
1487
|
trustedImplSigners?: {
|
|
1616
1488
|
publicKey: string;
|
|
@@ -1631,14 +1503,12 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1631
1503
|
} | undefined;
|
|
1632
1504
|
identityRegistryAddress?: string | undefined;
|
|
1633
1505
|
validationRegistryAddress?: string | undefined;
|
|
1506
|
+
spendCaps?: Record<string, number> | undefined;
|
|
1634
1507
|
}, {
|
|
1635
|
-
harness?: {
|
|
1636
|
-
mode?: "train" | "frozen" | undefined;
|
|
1637
|
-
} | undefined;
|
|
1638
1508
|
network?: "testnet" | "mainnet" | undefined;
|
|
1639
|
-
rpcUrl?: string | undefined;
|
|
1640
|
-
archiveRpcUrl?: string | undefined;
|
|
1641
|
-
l2ProofRpcUrl?: string | undefined;
|
|
1509
|
+
rpcUrl?: string | string[] | undefined;
|
|
1510
|
+
archiveRpcUrl?: string | string[] | undefined;
|
|
1511
|
+
l2ProofRpcUrl?: string | string[] | undefined;
|
|
1642
1512
|
earningDir?: string | undefined;
|
|
1643
1513
|
dbPath?: string | undefined;
|
|
1644
1514
|
pollIntervalMs?: number | undefined;
|
|
@@ -1783,8 +1653,8 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1783
1653
|
testnetStolasDeploymentPath?: string | undefined;
|
|
1784
1654
|
jinnMviL1DeploymentPath?: string | undefined;
|
|
1785
1655
|
jinnMviL2DeploymentPath?: string | undefined;
|
|
1786
|
-
ethereumRpcUrl?: string | undefined;
|
|
1787
|
-
ethereumArchiveRpcUrl?: string | undefined;
|
|
1656
|
+
ethereumRpcUrl?: string | string[] | undefined;
|
|
1657
|
+
ethereumArchiveRpcUrl?: string | string[] | undefined;
|
|
1788
1658
|
jinnL1Network?: "sepolia" | "ethereum" | undefined;
|
|
1789
1659
|
jinnDistributorAddress?: string | undefined;
|
|
1790
1660
|
jinnClaimEmitterAddress?: string | undefined;
|
|
@@ -1809,18 +1679,20 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1809
1679
|
version?: string | undefined;
|
|
1810
1680
|
}[] | undefined;
|
|
1811
1681
|
} | undefined;
|
|
1812
|
-
|
|
1682
|
+
harness?: {
|
|
1683
|
+
mode?: "train" | "frozen" | undefined;
|
|
1684
|
+
} | undefined;
|
|
1813
1685
|
joinedSolverNets?: Record<string, {
|
|
1814
|
-
roles: ("solver" | "evaluator")[];
|
|
1815
1686
|
manifestCid: string;
|
|
1687
|
+
roles: ("solver" | "evaluator")[];
|
|
1816
1688
|
name?: string | undefined;
|
|
1817
1689
|
harness?: string | undefined;
|
|
1818
|
-
model?: string | undefined;
|
|
1819
|
-
plugins?: string[] | undefined;
|
|
1820
1690
|
contract?: {
|
|
1821
1691
|
id: string;
|
|
1822
1692
|
version: string;
|
|
1823
1693
|
} | undefined;
|
|
1694
|
+
model?: string | undefined;
|
|
1695
|
+
plugins?: string[] | undefined;
|
|
1824
1696
|
disabledDefaultPlugins?: string[] | undefined;
|
|
1825
1697
|
}> | undefined;
|
|
1826
1698
|
trustedImplSigners?: {
|
|
@@ -1850,10 +1722,8 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1850
1722
|
identityRegistryAddress?: string | undefined;
|
|
1851
1723
|
validationRegistryAddress?: string | undefined;
|
|
1852
1724
|
reputationEnabled?: boolean | undefined;
|
|
1725
|
+
spendCaps?: Record<string, number> | undefined;
|
|
1853
1726
|
}>, {
|
|
1854
|
-
harness: {
|
|
1855
|
-
mode: "train" | "frozen";
|
|
1856
|
-
};
|
|
1857
1727
|
network: "testnet" | "mainnet";
|
|
1858
1728
|
earningDir: string;
|
|
1859
1729
|
dbPath: string;
|
|
@@ -1948,21 +1818,9 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1948
1818
|
stakingMode: "standard" | "self-bond";
|
|
1949
1819
|
targetServices: number;
|
|
1950
1820
|
debug: boolean;
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
roles: ("solving" | "evaluating")[];
|
|
1955
|
-
harness: string;
|
|
1956
|
-
plugins: (string | {
|
|
1957
|
-
source: string;
|
|
1958
|
-
name?: string | undefined;
|
|
1959
|
-
version?: string | undefined;
|
|
1960
|
-
})[];
|
|
1961
|
-
taskGenerator: {
|
|
1962
|
-
enabled: boolean;
|
|
1963
|
-
};
|
|
1964
|
-
model?: string | undefined;
|
|
1965
|
-
}>;
|
|
1821
|
+
harness: {
|
|
1822
|
+
mode: "train" | "frozen";
|
|
1823
|
+
};
|
|
1966
1824
|
captures: {
|
|
1967
1825
|
llmProxy: {
|
|
1968
1826
|
enabled: boolean;
|
|
@@ -1971,9 +1829,9 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1971
1829
|
};
|
|
1972
1830
|
runLegacyMigrations: boolean;
|
|
1973
1831
|
reputationEnabled: boolean;
|
|
1974
|
-
rpcUrl?: string | undefined;
|
|
1975
|
-
archiveRpcUrl?: string | undefined;
|
|
1976
|
-
l2ProofRpcUrl?: string | undefined;
|
|
1832
|
+
rpcUrl?: string | string[] | undefined;
|
|
1833
|
+
archiveRpcUrl?: string | string[] | undefined;
|
|
1834
|
+
l2ProofRpcUrl?: string | string[] | undefined;
|
|
1977
1835
|
apiBindHost?: string | undefined;
|
|
1978
1836
|
hermesPath?: string | undefined;
|
|
1979
1837
|
hermesModel?: string | undefined;
|
|
@@ -1993,8 +1851,8 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1993
1851
|
testnetStolasDeploymentPath?: string | undefined;
|
|
1994
1852
|
jinnMviL1DeploymentPath?: string | undefined;
|
|
1995
1853
|
jinnMviL2DeploymentPath?: string | undefined;
|
|
1996
|
-
ethereumRpcUrl?: string | undefined;
|
|
1997
|
-
ethereumArchiveRpcUrl?: string | undefined;
|
|
1854
|
+
ethereumRpcUrl?: string | string[] | undefined;
|
|
1855
|
+
ethereumArchiveRpcUrl?: string | string[] | undefined;
|
|
1998
1856
|
jinnDistributorAddress?: string | undefined;
|
|
1999
1857
|
jinnClaimEmitterAddress?: string | undefined;
|
|
2000
1858
|
jinnMessengerAddress?: string | undefined;
|
|
@@ -2012,17 +1870,17 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2012
1870
|
}[] | undefined;
|
|
2013
1871
|
} | undefined;
|
|
2014
1872
|
joinedSolverNets?: Record<string, {
|
|
1873
|
+
manifestCid: string;
|
|
2015
1874
|
roles: ("solver" | "evaluator")[];
|
|
2016
1875
|
plugins: string[];
|
|
2017
|
-
manifestCid: string;
|
|
2018
1876
|
disabledDefaultPlugins: string[];
|
|
2019
1877
|
name?: string | undefined;
|
|
2020
1878
|
harness?: string | undefined;
|
|
2021
|
-
model?: string | undefined;
|
|
2022
1879
|
contract?: {
|
|
2023
1880
|
id: string;
|
|
2024
1881
|
version: string;
|
|
2025
1882
|
} | undefined;
|
|
1883
|
+
model?: string | undefined;
|
|
2026
1884
|
}> | undefined;
|
|
2027
1885
|
trustedImplSigners?: {
|
|
2028
1886
|
publicKey: string;
|
|
@@ -2043,14 +1901,12 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2043
1901
|
} | undefined;
|
|
2044
1902
|
identityRegistryAddress?: string | undefined;
|
|
2045
1903
|
validationRegistryAddress?: string | undefined;
|
|
1904
|
+
spendCaps?: Record<string, number> | undefined;
|
|
2046
1905
|
}, {
|
|
2047
|
-
harness?: {
|
|
2048
|
-
mode?: "train" | "frozen" | undefined;
|
|
2049
|
-
} | undefined;
|
|
2050
1906
|
network?: "testnet" | "mainnet" | undefined;
|
|
2051
|
-
rpcUrl?: string | undefined;
|
|
2052
|
-
archiveRpcUrl?: string | undefined;
|
|
2053
|
-
l2ProofRpcUrl?: string | undefined;
|
|
1907
|
+
rpcUrl?: string | string[] | undefined;
|
|
1908
|
+
archiveRpcUrl?: string | string[] | undefined;
|
|
1909
|
+
l2ProofRpcUrl?: string | string[] | undefined;
|
|
2054
1910
|
earningDir?: string | undefined;
|
|
2055
1911
|
dbPath?: string | undefined;
|
|
2056
1912
|
pollIntervalMs?: number | undefined;
|
|
@@ -2195,8 +2051,8 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2195
2051
|
testnetStolasDeploymentPath?: string | undefined;
|
|
2196
2052
|
jinnMviL1DeploymentPath?: string | undefined;
|
|
2197
2053
|
jinnMviL2DeploymentPath?: string | undefined;
|
|
2198
|
-
ethereumRpcUrl?: string | undefined;
|
|
2199
|
-
ethereumArchiveRpcUrl?: string | undefined;
|
|
2054
|
+
ethereumRpcUrl?: string | string[] | undefined;
|
|
2055
|
+
ethereumArchiveRpcUrl?: string | string[] | undefined;
|
|
2200
2056
|
jinnL1Network?: "sepolia" | "ethereum" | undefined;
|
|
2201
2057
|
jinnDistributorAddress?: string | undefined;
|
|
2202
2058
|
jinnClaimEmitterAddress?: string | undefined;
|
|
@@ -2221,18 +2077,20 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2221
2077
|
version?: string | undefined;
|
|
2222
2078
|
}[] | undefined;
|
|
2223
2079
|
} | undefined;
|
|
2224
|
-
|
|
2080
|
+
harness?: {
|
|
2081
|
+
mode?: "train" | "frozen" | undefined;
|
|
2082
|
+
} | undefined;
|
|
2225
2083
|
joinedSolverNets?: Record<string, {
|
|
2226
|
-
roles: ("solver" | "evaluator")[];
|
|
2227
2084
|
manifestCid: string;
|
|
2085
|
+
roles: ("solver" | "evaluator")[];
|
|
2228
2086
|
name?: string | undefined;
|
|
2229
2087
|
harness?: string | undefined;
|
|
2230
|
-
model?: string | undefined;
|
|
2231
|
-
plugins?: string[] | undefined;
|
|
2232
2088
|
contract?: {
|
|
2233
2089
|
id: string;
|
|
2234
2090
|
version: string;
|
|
2235
2091
|
} | undefined;
|
|
2092
|
+
model?: string | undefined;
|
|
2093
|
+
plugins?: string[] | undefined;
|
|
2236
2094
|
disabledDefaultPlugins?: string[] | undefined;
|
|
2237
2095
|
}> | undefined;
|
|
2238
2096
|
trustedImplSigners?: {
|
|
@@ -2262,10 +2120,30 @@ export declare const JinnConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2262
2120
|
identityRegistryAddress?: string | undefined;
|
|
2263
2121
|
validationRegistryAddress?: string | undefined;
|
|
2264
2122
|
reputationEnabled?: boolean | undefined;
|
|
2123
|
+
spendCaps?: Record<string, number> | undefined;
|
|
2265
2124
|
}>;
|
|
2266
|
-
/**
|
|
2267
|
-
|
|
2125
|
+
/**
|
|
2126
|
+
* JinnConfig with rpcUrl guaranteed to be resolved (never undefined) and tasks
|
|
2127
|
+
* with id always assigned.
|
|
2128
|
+
*
|
|
2129
|
+
* `rpcUrl` is the head of the fallback chain (the slot-0 URL) and is kept as
|
|
2130
|
+
* a `string` for display continuity — the ~30 places that log/display
|
|
2131
|
+
* `config.rpcUrl` (provenance, error formatting, `[main] daemon starting on …`)
|
|
2132
|
+
* keep working unchanged. The full chain lives in `rpcUrls: readonly string[]`,
|
|
2133
|
+
* which is what `buildFallbackTransport()` consumes. Same shape for the L1
|
|
2134
|
+
* (ethereum) and optional archive/proof variants.
|
|
2135
|
+
*/
|
|
2136
|
+
export type JinnConfig = Omit<z.infer<typeof JinnConfigSchema>, 'rpcUrl' | 'archiveRpcUrl' | 'l2ProofRpcUrl' | 'ethereumRpcUrl' | 'ethereumArchiveRpcUrl' | 'tasks' | 'engine'> & {
|
|
2268
2137
|
rpcUrl: string;
|
|
2138
|
+
rpcUrls: readonly string[];
|
|
2139
|
+
archiveRpcUrl?: string;
|
|
2140
|
+
archiveRpcUrls?: readonly string[];
|
|
2141
|
+
l2ProofRpcUrl?: string;
|
|
2142
|
+
l2ProofRpcUrls?: readonly string[];
|
|
2143
|
+
ethereumRpcUrl?: string;
|
|
2144
|
+
ethereumRpcUrls?: readonly string[];
|
|
2145
|
+
ethereumArchiveRpcUrl?: string;
|
|
2146
|
+
ethereumArchiveRpcUrls?: readonly string[];
|
|
2269
2147
|
tasks: Task[];
|
|
2270
2148
|
engine: {
|
|
2271
2149
|
workingDirRoot: string;
|
|
@@ -2282,12 +2160,40 @@ export declare const DEFAULT_CONFIG_PATH: string;
|
|
|
2282
2160
|
*/
|
|
2283
2161
|
export declare const DEFAULT_TESTNET_DISCOVERY_URL = "https://jinn-indexer-production.up.railway.app";
|
|
2284
2162
|
export declare const DEFAULT_TESTNET_ETHEREUM_RPC_URL = "https://ethereum-sepolia-rpc.publicnode.com";
|
|
2163
|
+
/**
|
|
2164
|
+
* Default fallback chain for the L2 measurement chain (Base Sepolia) on
|
|
2165
|
+
* testnet. Per AC2 of issue #592:
|
|
2166
|
+
* slot 0 — `https://base-sepolia.publicnode.com` (no-auth, 50k-block
|
|
2167
|
+
* getLogs cap, no shared-quota cliff).
|
|
2168
|
+
* slot 1 — `https://sepolia.base.org` (free public Coinbase endpoint,
|
|
2169
|
+
* 2k-block cap; last-resort backup).
|
|
2170
|
+
* Operators are encouraged to prepend a paid primary key (Alchemy, Tenderly,
|
|
2171
|
+
* etc.) via `rpcUrl` config or `JINN_RPC_URL` / `BASE_SEPOLIA_RPC_URL` env.
|
|
2172
|
+
*/
|
|
2173
|
+
export declare const DEFAULT_TESTNET_RPC_URLS: readonly string[];
|
|
2285
2174
|
export type ConfigLoadErrorCode = 'config_file_not_found' | 'config_json_invalid' | 'tasks_file_not_found' | 'tasks_json_invalid' | 'config_invalid';
|
|
2286
2175
|
export declare class ConfigLoadError extends Error {
|
|
2287
2176
|
readonly code: ConfigLoadErrorCode;
|
|
2288
2177
|
readonly details?: Record<string, unknown>;
|
|
2289
2178
|
constructor(code: ConfigLoadErrorCode, message: string, details?: Record<string, unknown>);
|
|
2290
2179
|
}
|
|
2180
|
+
/**
|
|
2181
|
+
* Translate any legacy short-name-keyed `solverNets` block on the raw parsed
|
|
2182
|
+
* config into manifest-keyed `joinedSolverNets` entries with synthetic
|
|
2183
|
+
* `legacy:<short-name>` keys.
|
|
2184
|
+
*
|
|
2185
|
+
* This is the auto-migration path for operators upgrading past issue #421.
|
|
2186
|
+
* The runtime claim filter remains manifest-digest gated, so synthetic-keyed
|
|
2187
|
+
* entries don't change task eligibility — they exist purely so the diagnostic
|
|
2188
|
+
* surfaces (Overview SOLVING-ON eyebrow, prediction-operator-status) keep
|
|
2189
|
+
* showing the operator's previous SolverNets until they re-join via the SPA.
|
|
2190
|
+
*
|
|
2191
|
+
* Returns the number of legacy entries migrated. Idempotent — calling on an
|
|
2192
|
+
* already-migrated raw config is a no-op.
|
|
2193
|
+
*
|
|
2194
|
+
* @param raw — the JSON-parsed config file contents (mutated in place).
|
|
2195
|
+
*/
|
|
2196
|
+
export declare function migrateLegacySolverNets(raw: Record<string, unknown>): number;
|
|
2291
2197
|
/**
|
|
2292
2198
|
* Load config with resolution: env > config file > defaults.
|
|
2293
2199
|
*
|