@jinn-network/client 0.1.6-canary.fb9c8196 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bootstrap-endpoint.js +0 -45
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/fleet-build.d.ts +0 -1
- package/dist/api/fleet-build.js +1 -2
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.js +1 -68
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/hermes-doctor-endpoint.d.ts +0 -10
- package/dist/api/hermes-doctor-endpoint.js +23 -30
- package/dist/api/hermes-doctor-endpoint.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +0 -16
- package/dist/api/setup-endpoints.js +0 -28
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +0 -14
- package/dist/api/status-build.js +18 -23
- 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 +9 -24
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.js +0 -7
- package/dist/config.js.map +1 -1
- package/dist/daemon/daemon.d.ts +0 -8
- package/dist/daemon/daemon.js +0 -17
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/dashboard/assets/{index-CarzUepP.css → index-DOlzFN8a.css} +1 -1
- package/dist/dashboard/assets/index-NkZ7CTAT.js +140 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/earning/bootstrap.d.ts +0 -59
- package/dist/earning/bootstrap.js +41 -139
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +0 -12
- package/dist/earning/contracts.js +0 -7
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/funding-plan.js.map +1 -1
- package/dist/earning/jinn-rewards.d.ts +0 -46
- package/dist/earning/jinn-rewards.js +0 -32
- package/dist/earning/jinn-rewards.js.map +1 -1
- package/dist/earning/testnet-setup-migration.d.ts +0 -12
- package/dist/earning/testnet-setup-migration.js +1 -17
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +0 -15
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +1 -23
- package/dist/harnesses/impls/hermes-agent/harness.js +0 -49
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -1
- package/dist/harnesses/impls/index.d.ts +0 -2
- package/dist/harnesses/impls/index.js +1 -5
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/main.js +30 -204
- package/dist/main.js.map +1 -1
- package/dist/operator-errors.d.ts +0 -7
- package/dist/operator-errors.js +1 -13
- package/dist/operator-errors.js.map +1 -1
- package/dist/solver-nets/prediction-operator-ux.js +3 -24
- package/dist/solver-nets/prediction-operator-ux.js.map +1 -1
- package/dist/solver-nets/registry.d.ts +0 -1
- package/dist/solver-nets/registry.js +1 -1
- package/dist/solver-nets/registry.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/setup-retry-endpoint.d.ts +0 -19
- package/dist/api/setup-retry-endpoint.js +0 -32
- package/dist/api/setup-retry-endpoint.js.map +0 -1
- package/dist/daemon/eviction-loop.d.ts +0 -40
- package/dist/daemon/eviction-loop.js +0 -67
- package/dist/daemon/eviction-loop.js.map +0 -1
- package/dist/dashboard/assets/index-C_QnE4YV.js +0 -140
- package/dist/harnesses/cost-estimates.d.ts +0 -145
- package/dist/harnesses/cost-estimates.js +0 -297
- package/dist/harnesses/cost-estimates.js.map +0 -1
- package/dist/restart-daemon.d.ts +0 -71
- package/dist/restart-daemon.js +0 -82
- package/dist/restart-daemon.js.map +0 -1
- package/dist/setup/halt-mode.d.ts +0 -14
- package/dist/setup/halt-mode.js +0 -17
- package/dist/setup/halt-mode.js.map +0 -1
|
@@ -6,22 +6,10 @@ export declare const DEPRECATED_BASE_SEPOLIA_STAKING_PROXY = "0xf358b5c1ac4ddc4e
|
|
|
6
6
|
export interface TestnetSetupMigrationPlan {
|
|
7
7
|
services: ServiceState[];
|
|
8
8
|
}
|
|
9
|
-
export interface TestnetSetupMigrationRetireFailedEnvelope {
|
|
10
|
-
kind: 'retire_failed';
|
|
11
|
-
retire_error: string | null;
|
|
12
|
-
tx_hash: string | null;
|
|
13
|
-
message: string;
|
|
14
|
-
}
|
|
15
9
|
export interface TestnetSetupMigrationResult {
|
|
16
10
|
state: FleetState;
|
|
17
11
|
migratedCount: number;
|
|
18
12
|
archivePaths: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Set when at least one service's retire failed and the wipe was suppressed.
|
|
21
|
-
* The migration archived the failure but left local state intact.
|
|
22
|
-
* Callers should surface this to the operator.
|
|
23
|
-
*/
|
|
24
|
-
retireFailedEnvelope?: TestnetSetupMigrationRetireFailedEnvelope;
|
|
25
13
|
}
|
|
26
14
|
export interface TestnetSetupMigrationParams {
|
|
27
15
|
stateStore: FleetStateStore;
|
|
@@ -151,7 +151,6 @@ export async function migrateDeprecatedTestnetSetup(params) {
|
|
|
151
151
|
let nextState = params.state;
|
|
152
152
|
const archivePaths = new Set();
|
|
153
153
|
let migratedCount = 0;
|
|
154
|
-
let retireFailedEnvelope;
|
|
155
154
|
for (const svc of plan.services) {
|
|
156
155
|
const id = migrationId(svc);
|
|
157
156
|
const existing = archive.entries.find(e => e.migration_id === id);
|
|
@@ -183,21 +182,7 @@ export async function migrateDeprecatedTestnetSetup(params) {
|
|
|
183
182
|
...retire,
|
|
184
183
|
});
|
|
185
184
|
if (retire.retire_status === 'failed') {
|
|
186
|
-
|
|
187
|
-
// still running on-chain against the old setup. Preserve all fields so
|
|
188
|
-
// they can continue operating. Surface the error via the envelope so
|
|
189
|
-
// callers (bootstrap, /v1/bootstrap) can show an actionable message.
|
|
190
|
-
console.error('Previous Jinn setup could not be fully retired automatically; it was archived for recovery. Local state is preserved — resolve the retire failure before upgrading.');
|
|
191
|
-
retireFailedEnvelope = {
|
|
192
|
-
kind: 'retire_failed',
|
|
193
|
-
retire_error: retire.retire_error ?? null,
|
|
194
|
-
tx_hash: retire.retire_tx_hash ?? null,
|
|
195
|
-
message: 'We could not retire your previous setup. Your service state is preserved; resolve the retire failure before upgrading.',
|
|
196
|
-
};
|
|
197
|
-
// Count as a migration attempt even though state was not wiped, so
|
|
198
|
-
// callers know we ran the migration path.
|
|
199
|
-
migratedCount += 1;
|
|
200
|
-
continue;
|
|
185
|
+
console.error('Previous Jinn setup could not be fully retired automatically; it was archived for recovery. Continuing upgrade...');
|
|
201
186
|
}
|
|
202
187
|
}
|
|
203
188
|
nextState = await params.stateStore.updateService(svc.index, {
|
|
@@ -224,7 +209,6 @@ export async function migrateDeprecatedTestnetSetup(params) {
|
|
|
224
209
|
state: nextState,
|
|
225
210
|
migratedCount,
|
|
226
211
|
archivePaths: [...archivePaths],
|
|
227
|
-
...(retireFailedEnvelope ? { retireFailedEnvelope } : {}),
|
|
228
212
|
};
|
|
229
213
|
}
|
|
230
214
|
//# sourceMappingURL=testnet-setup-migration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testnet-setup-migration.js","sourceRoot":"","sources":["../../src/earning/testnet-setup-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,GAAG,GAKJ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAOrE,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,qCAAqC,GAChD,4CAA4C,CAAC;AAE/C,MAAM,cAAc,GAAG,6BAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"testnet-setup-migration.js","sourceRoot":"","sources":["../../src/earning/testnet-setup-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,GAAG,GAKJ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAA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AK;YACR,cAAc,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACzC,CAAC,CAAC;QACH,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACzD,aAAa,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAE9C,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,aAAa;QACb,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC;KAChC,CAAC;AACJ,CAAC"}
|
package/dist/earning/types.d.ts
CHANGED
|
@@ -198,19 +198,4 @@ export interface FleetBootstrapResult {
|
|
|
198
198
|
rawErrorMessage?: string;
|
|
199
199
|
funding?: FundingRequirement;
|
|
200
200
|
self_bond_funding?: SelfBondFundingRequirement;
|
|
201
|
-
/**
|
|
202
|
-
* Structured category for operator-error cases where the error type is
|
|
203
|
-
* known but comes from an exception (rather than the early-return funding
|
|
204
|
-
* gate above). Currently used to propagate `'insufficient_funds'` so the
|
|
205
|
-
* error envelope in main.ts can surface a structured `category` field
|
|
206
|
-
* instead of a prose disjunction. jinn-mono-hjex.6
|
|
207
|
-
*/
|
|
208
|
-
errorCategory?: 'insufficient_funds' | 'gas_too_low' | 'nonce_conflict';
|
|
209
|
-
/**
|
|
210
|
-
* Transaction hash of the failed on-chain tx, when available.
|
|
211
|
-
* Extracted from the thrown error message in the bootstrap catch path.
|
|
212
|
-
* Surfaced in the fatal envelope `details.txHash` so the SPA can render
|
|
213
|
-
* a block-explorer link. jinn-mono-hjex reviewer fix.
|
|
214
|
-
*/
|
|
215
|
-
txHash?: string | null;
|
|
216
201
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import type { Harness, HarnessContext,
|
|
1
|
+
import type { Harness, HarnessContext, Solution } from '../../types.js';
|
|
2
2
|
import type { HermesHarnessAdapter } from './adapter.js';
|
|
3
3
|
export interface HermesHarnessConfig {
|
|
4
4
|
adapter: HermesHarnessAdapter;
|
|
5
5
|
version?: string;
|
|
6
|
-
/** Hermes binary path used by `isReady()`. Defaults to `hermes` (PATH lookup). */
|
|
7
|
-
hermesPath?: string;
|
|
8
|
-
/** Timeout for the `hermes doctor` probe. Defaults to 30s. */
|
|
9
|
-
hermesDoctorTimeoutMs?: number;
|
|
10
6
|
}
|
|
11
7
|
/**
|
|
12
8
|
* Hermes Agent harness.
|
|
@@ -25,25 +21,7 @@ export declare class HermesHarness implements Harness {
|
|
|
25
21
|
readonly version: string;
|
|
26
22
|
readonly freezeStateHashIgnore: readonly ["auth", "auth.json", "bin/tirith", ".env", "config.yaml"];
|
|
27
23
|
private readonly adapter;
|
|
28
|
-
private readonly hermesPath;
|
|
29
|
-
private readonly hermesDoctorTimeoutMs;
|
|
30
24
|
constructor(config: HermesHarnessConfig);
|
|
31
|
-
/**
|
|
32
|
-
* Readiness probe — shells out to `hermes doctor` via the shared
|
|
33
|
-
* `probeHermesDoctor` helper (same logic the SPA precheck endpoint
|
|
34
|
-
* uses). Reports:
|
|
35
|
-
* - `installed: false` → binary not on PATH → ready=false with install
|
|
36
|
-
* nextStep so the operator sees an actionable message instead of
|
|
37
|
-
* N/N failed claims (#330).
|
|
38
|
-
* - `exitCode !== 0` → binary exists but `hermes doctor` reports a
|
|
39
|
-
* configuration problem (e.g. provider not signed in) → ready=false
|
|
40
|
-
* with a nextStep that points at the SPA precheck panel.
|
|
41
|
-
* - `exitCode === 0` → ready=true.
|
|
42
|
-
*/
|
|
43
|
-
isReady(_ctx?: {
|
|
44
|
-
solverType: string;
|
|
45
|
-
role?: 'restoration' | 'evaluation';
|
|
46
|
-
}): Promise<ReadyStatus>;
|
|
47
25
|
supports(spec: {
|
|
48
26
|
solverType: string;
|
|
49
27
|
role?: 'restoration' | 'evaluation';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HERMES_AGENT_HARNESS } from '../../names.js';
|
|
2
2
|
import { harvestOutput } from '../learner/harvest.js';
|
|
3
|
-
import { probeHermesDoctor } from '../../../api/hermes-doctor-endpoint.js';
|
|
4
3
|
/**
|
|
5
4
|
* Hermes Agent harness.
|
|
6
5
|
*
|
|
@@ -18,57 +17,9 @@ export class HermesHarness {
|
|
|
18
17
|
version;
|
|
19
18
|
freezeStateHashIgnore = ['auth', 'auth.json', 'bin/tirith', '.env', 'config.yaml'];
|
|
20
19
|
adapter;
|
|
21
|
-
hermesPath;
|
|
22
|
-
hermesDoctorTimeoutMs;
|
|
23
20
|
constructor(config) {
|
|
24
21
|
this.adapter = config.adapter;
|
|
25
22
|
this.version = config.version ?? '0.1.0';
|
|
26
|
-
this.hermesPath = config.hermesPath;
|
|
27
|
-
this.hermesDoctorTimeoutMs = config.hermesDoctorTimeoutMs;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Readiness probe — shells out to `hermes doctor` via the shared
|
|
31
|
-
* `probeHermesDoctor` helper (same logic the SPA precheck endpoint
|
|
32
|
-
* uses). Reports:
|
|
33
|
-
* - `installed: false` → binary not on PATH → ready=false with install
|
|
34
|
-
* nextStep so the operator sees an actionable message instead of
|
|
35
|
-
* N/N failed claims (#330).
|
|
36
|
-
* - `exitCode !== 0` → binary exists but `hermes doctor` reports a
|
|
37
|
-
* configuration problem (e.g. provider not signed in) → ready=false
|
|
38
|
-
* with a nextStep that points at the SPA precheck panel.
|
|
39
|
-
* - `exitCode === 0` → ready=true.
|
|
40
|
-
*/
|
|
41
|
-
async isReady(_ctx) {
|
|
42
|
-
const config = {};
|
|
43
|
-
if (this.hermesPath !== undefined)
|
|
44
|
-
config.hermesPath = this.hermesPath;
|
|
45
|
-
if (this.hermesDoctorTimeoutMs !== undefined)
|
|
46
|
-
config.hermesDoctorTimeoutMs = this.hermesDoctorTimeoutMs;
|
|
47
|
-
const result = probeHermesDoctor(config);
|
|
48
|
-
if (!result.installed) {
|
|
49
|
-
return {
|
|
50
|
-
ready: false,
|
|
51
|
-
reason: 'hermes binary not installed',
|
|
52
|
-
nextStep: {
|
|
53
|
-
description: 'Install the Hermes agent runner — see the Hermes precheck panel in the operator dashboard for the install command.',
|
|
54
|
-
url: '/api/hermes/doctor',
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
if (result.exitCode !== 0) {
|
|
59
|
-
const stderr = result.stderr.trim();
|
|
60
|
-
const stdout = result.stdout.trim();
|
|
61
|
-
const detail = stderr.length > 0 ? stderr : stdout;
|
|
62
|
-
return {
|
|
63
|
-
ready: false,
|
|
64
|
-
reason: `hermes doctor exit ${result.exitCode}${detail ? `: ${detail}` : ''}`,
|
|
65
|
-
nextStep: {
|
|
66
|
-
description: 'Run `hermes doctor` locally to surface the configuration problem, or open the Hermes precheck panel in the operator dashboard to sign in / select a provider.',
|
|
67
|
-
url: '/api/hermes/doctor',
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return { ready: true };
|
|
72
23
|
}
|
|
73
24
|
supports(spec) {
|
|
74
25
|
// Hermes currently ships a SWE-rebench v2 task prompt and runtime plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../../../src/harnesses/impls/hermes-agent/harness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../../../src/harnesses/impls/hermes-agent/harness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB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AK;YACzB,YAAY,EAAE,GAAG,CAAC,YAAY,EAAE;YAChC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,IAAI,EAAE,GAAG,CAAC,IAAI;SACf,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -82,8 +82,6 @@ export interface HarnessEnv {
|
|
|
82
82
|
hermesModel?: string;
|
|
83
83
|
/** Hermes provider (e.g. 'anthropic'). */
|
|
84
84
|
hermesProvider?: string;
|
|
85
|
-
/** Timeout (ms) for the `hermes doctor` probe in HermesHarness.isReady. */
|
|
86
|
-
hermesDoctorTimeoutMs?: number;
|
|
87
85
|
}
|
|
88
86
|
/**
|
|
89
87
|
* Build the canonical ordered list of first-party restoration/evaluation Harnesses.
|
|
@@ -142,11 +142,7 @@ export function buildHarnesses(env) {
|
|
|
142
142
|
storePath: env.storePath,
|
|
143
143
|
corpusEnv: env.corpusEnv ?? {},
|
|
144
144
|
});
|
|
145
|
-
out.push(new HermesHarness({
|
|
146
|
-
adapter: hermesAdapter,
|
|
147
|
-
...(env.hermesPath !== undefined ? { hermesPath: env.hermesPath } : {}),
|
|
148
|
-
...(env.hermesDoctorTimeoutMs !== undefined ? { hermesDoctorTimeoutMs: env.hermesDoctorTimeoutMs } : {}),
|
|
149
|
-
}));
|
|
145
|
+
out.push(new HermesHarness({ adapter: hermesAdapter }));
|
|
150
146
|
if (env.disabledNames && env.disabledNames.length > 0) {
|
|
151
147
|
const disabled = canonicalHarnessNameSet(env.disabledNames);
|
|
152
148
|
return out.filter((impl) => !disabled.has(canonicalHarnessName(impl.name)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/harnesses/impls/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EACL,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,GACd,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/harnesses/impls/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,qBAA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AAE,GAAG,CAAC,cAAc,IAAI,EAAE;QACxC,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE;KAC/B,CAAC,CAAC;IACH,GAAG,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;IAExD,IAAI,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtD,MAAM,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC5D,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/main.js
CHANGED
|
@@ -36,11 +36,10 @@ import { hashImplStateDir } from './harnesses/freeze.js';
|
|
|
36
36
|
import { readModeState } from './harnesses/mode-state.js';
|
|
37
37
|
import { attachAgentWs, updateAgentClaudePath } from './agent/agent-ws.js';
|
|
38
38
|
import { createSetupModeController } from './setup-mode.js';
|
|
39
|
-
import { requestDaemonRestart } from './restart-daemon.js';
|
|
40
39
|
import { buildEnvelope, emitEnvelope } from './errors/envelope.js';
|
|
41
40
|
import { clearBootstrapError, persistBootstrapError, } from './errors/persisted-bootstrap-error.js';
|
|
42
41
|
import { emitStructured } from './events/emitter.js';
|
|
43
|
-
import { FleetBootstrapper
|
|
42
|
+
import { FleetBootstrapper } from './earning/bootstrap.js';
|
|
44
43
|
import { DEFAULT_TESTNET_ARTIFACTS, applyChainGasOverrides, getChainConfig, loadJinnMviConfig } from './earning/contracts.js';
|
|
45
44
|
import { runLegacyAgentIdMigration } from './earning/migrate-agent-id.js';
|
|
46
45
|
import { FleetStateStore } from './earning/store.js';
|
|
@@ -81,7 +80,6 @@ import { GeneratedTaskSource, StaticConfiguredTaskSource } from './tasks/sources
|
|
|
81
80
|
import { checkRpcNetwork, logRpcLocalDevToStderr, rpcNetworkFailureHint } from './preflight/rpc-network.js';
|
|
82
81
|
import { apiPortFailureMessage, checkApiPortAvailable } from './preflight/api-port.js';
|
|
83
82
|
import { openBrowser } from './cli/open-browser.js';
|
|
84
|
-
import { keepSetupUiOnBootstrapError } from './setup/halt-mode.js';
|
|
85
83
|
if (process.env['JINN_LOAD_DEV_ENV'] === '1' || process.env['NODE_ENV'] === 'development') {
|
|
86
84
|
dotenvConfig({ path: join(dirname(fileURLToPath(import.meta.url)), '..', '.env') });
|
|
87
85
|
}
|
|
@@ -486,17 +484,11 @@ async function bootstrap() {
|
|
|
486
484
|
hint: 'Fund the listed address and re-run this command.',
|
|
487
485
|
exampleCli: 'jinn fund-requirements --json',
|
|
488
486
|
details: {
|
|
489
|
-
// jinn-mono-hjex.6: structured envelope so SPA can render the
|
|
490
|
-
// specific address + amount instead of a prose disjunction.
|
|
491
|
-
category: 'insufficient_funds',
|
|
492
|
-
step: 'awaiting_funding',
|
|
493
|
-
address: result.funding.master_address,
|
|
494
|
-
requiredWei: result.funding.eth_required,
|
|
495
|
-
haveWei: result.funding.eth_balance,
|
|
496
|
-
// Legacy aliases kept for any external consumers that read these.
|
|
497
487
|
role: 'master',
|
|
488
|
+
address: result.funding.master_address,
|
|
498
489
|
asset: 'native',
|
|
499
490
|
needWei: result.funding.eth_required,
|
|
491
|
+
haveWei: result.funding.eth_balance,
|
|
500
492
|
},
|
|
501
493
|
});
|
|
502
494
|
}
|
|
@@ -511,17 +503,11 @@ async function bootstrap() {
|
|
|
511
503
|
hint: 'Bootstrap failed before the fleet reached a runnable state.',
|
|
512
504
|
details: {
|
|
513
505
|
cause: result.message,
|
|
514
|
-
// jinn-mono-hjex.6: propagate structured category from the bootstrapper
|
|
515
|
-
// so the SPA can render category-specific UI (e.g. funding shortfall).
|
|
516
|
-
...(result.errorCategory !== undefined ? { category: result.errorCategory } : {}),
|
|
517
506
|
// Preserve the raw underlying error so a misclassified summary can
|
|
518
507
|
// be diagnosed without re-running with JINN_DEBUG. See jinn-mono-jz9f.
|
|
519
508
|
...(result.rawErrorMessage && result.rawErrorMessage !== result.message
|
|
520
509
|
? { rawErrorMessage: result.rawErrorMessage }
|
|
521
510
|
: {}),
|
|
522
|
-
// jinn-mono-hjex reviewer fix: propagate tx hash so the SPA can render
|
|
523
|
-
// a block-explorer link for failed on-chain revert transactions.
|
|
524
|
-
...(result.txHash != null ? { txHash: result.txHash } : {}),
|
|
525
511
|
},
|
|
526
512
|
});
|
|
527
513
|
}
|
|
@@ -606,9 +592,7 @@ class SetupBootstrapHalted extends Error {
|
|
|
606
592
|
this.name = 'SetupBootstrapHalted';
|
|
607
593
|
}
|
|
608
594
|
}
|
|
609
|
-
|
|
610
|
-
// so it can be unit-tested without dragging main.ts's top-level side
|
|
611
|
-
// effects (password resolution, config load) into the test.
|
|
595
|
+
const keepSetupUiOnBootstrapError = () => process.env['JINN_NO_UI'] !== '1' && process.env['JINN_NO_DAEMON'] !== '1';
|
|
612
596
|
// ── Main ────────────────────────────────────────────────────────────────────
|
|
613
597
|
/**
|
|
614
598
|
* --json-progress: emit NDJSON progress envelopes on stdout during long
|
|
@@ -775,18 +759,6 @@ export async function main() {
|
|
|
775
759
|
// builder-artifacts. Holder ref lets the routes register eagerly and
|
|
776
760
|
// start returning real data the moment main.ts assigns holder.current.
|
|
777
761
|
const discoveryApiHolder = { current: undefined };
|
|
778
|
-
// hjex.3: holder for the restake callback. Populated in running mode after
|
|
779
|
-
// bootstrap completes (when mnemonic + distributorAddress are available).
|
|
780
|
-
const restakeCallbackRef = {
|
|
781
|
-
current: undefined,
|
|
782
|
-
};
|
|
783
|
-
// hjex.6: retry signal for the bootstrap halt-and-resume loop.
|
|
784
|
-
// When a SetupBootstrapHalted is caught (fatal non-funding error or funding
|
|
785
|
-
// timeout), main() waits on this promise instead of returning, so the setup
|
|
786
|
-
// API stays alive and the operator can click Retry in the SPA.
|
|
787
|
-
// The retry endpoint resolves this promise to trigger a re-run.
|
|
788
|
-
let retryBootstrapResolve = null;
|
|
789
|
-
let retryBootstrapReject = null;
|
|
790
762
|
let setupApiServer;
|
|
791
763
|
try {
|
|
792
764
|
setupApiServer = await startApiServer({
|
|
@@ -801,12 +773,10 @@ export async function main() {
|
|
|
801
773
|
hermesDoctorTimeoutMs: config.hermesDoctorTimeoutMs,
|
|
802
774
|
},
|
|
803
775
|
admin: {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
// supervisor / systemd / docker entrypoint decides what to do.
|
|
809
|
-
onRestartRequested: () => requestDaemonRestart(),
|
|
776
|
+
onRestartRequested: () => {
|
|
777
|
+
console.log('[main] Restart requested via operator MCP. Exiting...');
|
|
778
|
+
process.exit(0);
|
|
779
|
+
},
|
|
810
780
|
},
|
|
811
781
|
harnessStatus: {
|
|
812
782
|
getStatus: async () => {
|
|
@@ -992,30 +962,6 @@ export async function main() {
|
|
|
992
962
|
// toggle immediately. (jinn-mono-l2zl.15.4.12)
|
|
993
963
|
invalidatePredictionOperatorStatusCache(config);
|
|
994
964
|
},
|
|
995
|
-
// hjex.3: delegate to the live callback populated once running mode starts.
|
|
996
|
-
restake: (serviceId) => {
|
|
997
|
-
if (!restakeCallbackRef.current) {
|
|
998
|
-
return Promise.resolve({ ok: false, error: 'restake_not_available_in_setup_mode' });
|
|
999
|
-
}
|
|
1000
|
-
return restakeCallbackRef.current(serviceId);
|
|
1001
|
-
},
|
|
1002
|
-
// hjex.6: re-trigger the bootstrap state machine from the SPA Retry button.
|
|
1003
|
-
// Resolves the halt-and-resume promise; main() will loop back and call
|
|
1004
|
-
// bootstrap() again. Rejects if the daemon is not currently halted.
|
|
1005
|
-
retryBootstrap: () => {
|
|
1006
|
-
return new Promise((resolve, reject) => {
|
|
1007
|
-
if (!retryBootstrapResolve) {
|
|
1008
|
-
reject(new Error('daemon_not_halted'));
|
|
1009
|
-
return;
|
|
1010
|
-
}
|
|
1011
|
-
const prevResolve = retryBootstrapResolve;
|
|
1012
|
-
// The resolve will unblock the main loop's await. When bootstrap
|
|
1013
|
-
// completes (success or new halt), the caller receives the result
|
|
1014
|
-
// via the /v1/bootstrap polling endpoint.
|
|
1015
|
-
prevResolve();
|
|
1016
|
-
resolve();
|
|
1017
|
-
});
|
|
1018
|
-
},
|
|
1019
965
|
},
|
|
1020
966
|
status: {
|
|
1021
967
|
earningDir: config.earningDir,
|
|
@@ -1232,96 +1178,30 @@ export async function main() {
|
|
|
1232
1178
|
// keystore is on disk and we're transitioning into bootstrap.
|
|
1233
1179
|
setupController.refresh({ keystoreExists: true, allComplete: false });
|
|
1234
1180
|
}
|
|
1235
|
-
// hjex.6: halt-and-resume loop for bootstrap retries.
|
|
1236
|
-
// When failBootstrap() throws SetupBootstrapHalted, we wait for the operator
|
|
1237
|
-
// to click Retry in the SPA (which resolves retryBootstrapResolve) rather
|
|
1238
|
-
// than returning and exiting. On each retry, we loop back and call bootstrap()
|
|
1239
|
-
// again. bootstrap() is idempotent — completed steps are no-ops.
|
|
1240
1181
|
let bootstrapResult;
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
// every JINN_FUNDING_POLL_INTERVAL_MS (default 15s). When the balance
|
|
1258
|
-
// meets or exceeds the required amount, auto-signal the retry loop.
|
|
1259
|
-
// Only runs while the halt signal is pending; stops on any signal.
|
|
1260
|
-
let fundingPollHandle = null;
|
|
1261
|
-
const isHaltedOnFunding = err.envelope.code === 'funding_required';
|
|
1262
|
-
const haltDetails = err.envelope.details;
|
|
1263
|
-
const haltAddress = typeof haltDetails?.['address'] === 'string'
|
|
1264
|
-
? haltDetails['address']
|
|
1265
|
-
: null;
|
|
1266
|
-
const haltRequired = typeof haltDetails?.['requiredWei'] === 'string'
|
|
1267
|
-
? BigInt(haltDetails['requiredWei'])
|
|
1268
|
-
: typeof haltDetails?.['needWei'] === 'string'
|
|
1269
|
-
? BigInt(haltDetails['needWei'])
|
|
1270
|
-
: null;
|
|
1271
|
-
const fundingPollIntervalMs = (() => {
|
|
1272
|
-
const raw = process.env['JINN_FUNDING_POLL_INTERVAL_MS'];
|
|
1273
|
-
if (!raw)
|
|
1274
|
-
return 15_000;
|
|
1275
|
-
const n = Number.parseInt(raw, 10);
|
|
1276
|
-
return Number.isFinite(n) && n > 0 ? n : 15_000;
|
|
1277
|
-
})();
|
|
1278
|
-
if (isHaltedOnFunding && haltAddress && haltRequired !== null) {
|
|
1279
|
-
const publicClient = createJinnPublicClient(config.rpcUrl, NETWORK_CHAIN);
|
|
1280
|
-
const schedulePoll = () => {
|
|
1281
|
-
fundingPollHandle = setTimeout(async () => {
|
|
1282
|
-
// Guard: if the signal was already fired, stop polling.
|
|
1283
|
-
if (!retryBootstrapResolve)
|
|
1284
|
-
return;
|
|
1285
|
-
try {
|
|
1286
|
-
const balance = await publicClient.getBalance({ address: haltAddress });
|
|
1287
|
-
if (balance >= haltRequired) {
|
|
1288
|
-
console.log(`[main] Funding shortfall cleared (have ${balance}, required ${haltRequired}). ` +
|
|
1289
|
-
`Auto-resuming bootstrap...`);
|
|
1290
|
-
retryBootstrapResolve?.();
|
|
1291
|
-
return; // don't schedule the next poll
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
catch (pollErr) {
|
|
1295
|
-
// Balance read failed — not fatal, just skip this tick.
|
|
1296
|
-
const msg = pollErr instanceof Error ? pollErr.message : String(pollErr);
|
|
1297
|
-
console.log(`[main] Funding poller balance read failed (will retry): ${msg}`);
|
|
1298
|
-
}
|
|
1299
|
-
schedulePoll(); // reschedule
|
|
1300
|
-
}, fundingPollIntervalMs);
|
|
1301
|
-
};
|
|
1302
|
-
schedulePoll();
|
|
1303
|
-
}
|
|
1304
|
-
try {
|
|
1305
|
-
await retrySignal;
|
|
1306
|
-
}
|
|
1307
|
-
finally {
|
|
1308
|
-
retryBootstrapResolve = null;
|
|
1309
|
-
retryBootstrapReject = null;
|
|
1310
|
-
if (fundingPollHandle !== null) {
|
|
1311
|
-
clearTimeout(fundingPollHandle);
|
|
1312
|
-
fundingPollHandle = null;
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
console.log('[main] Retry triggered — re-running bootstrap...');
|
|
1316
|
-
continue; // loop back to the bootstrap() call
|
|
1317
|
-
}
|
|
1318
|
-
// If bootstrap throws an unexpected error (vs. SetupBootstrapHalted),
|
|
1319
|
-
// tear down the API we just started so we don't leave a dangling listener.
|
|
1320
|
-
await setupApiServer.close().catch(() => undefined);
|
|
1321
|
-
await closeCaptureReceiver();
|
|
1322
|
-
sharedStore.close();
|
|
1323
|
-
throw err;
|
|
1182
|
+
try {
|
|
1183
|
+
bootstrapResult = await bootstrap();
|
|
1184
|
+
}
|
|
1185
|
+
catch (err) {
|
|
1186
|
+
if (err instanceof SetupBootstrapHalted) {
|
|
1187
|
+
return {
|
|
1188
|
+
schemaVersion: 1,
|
|
1189
|
+
generatedAt: new Date().toISOString(),
|
|
1190
|
+
kind: 'setup_halted',
|
|
1191
|
+
pid: process.pid,
|
|
1192
|
+
network: config.network,
|
|
1193
|
+
phase: config.network === 'testnet' ? 'phase-1b' : 'phase-0',
|
|
1194
|
+
apiPort: setupApiServer.port,
|
|
1195
|
+
dashboardUrl: `http://127.0.0.1:${setupApiServer.port}`,
|
|
1196
|
+
error: err.envelope,
|
|
1197
|
+
};
|
|
1324
1198
|
}
|
|
1199
|
+
// If bootstrap throws (vs. emitEnvelope-exits), tear down the API we
|
|
1200
|
+
// just started so we don't leave a dangling listener on the port.
|
|
1201
|
+
await setupApiServer.close().catch(() => undefined);
|
|
1202
|
+
await closeCaptureReceiver();
|
|
1203
|
+
sharedStore.close();
|
|
1204
|
+
throw err;
|
|
1325
1205
|
}
|
|
1326
1206
|
// Bootstrap completed — flip the controller into 'running' so any waiters
|
|
1327
1207
|
// (future loops gated on this) unblock.
|
|
@@ -1377,33 +1257,6 @@ export async function main() {
|
|
|
1377
1257
|
const publicClient = createJinnPublicClient(config.rpcUrl, NETWORK_CHAIN);
|
|
1378
1258
|
publicClientForLauncher = publicClient;
|
|
1379
1259
|
const masterWallet = createJinnWalletClient(config.rpcUrl, NETWORK_CHAIN, masterAccount);
|
|
1380
|
-
// hjex.3: populate the restake callback now that mnemonic is available.
|
|
1381
|
-
if (config.stakingMode === 'standard' && CHAIN_CONFIG.distributorAddress) {
|
|
1382
|
-
const fleetStore = earningStore;
|
|
1383
|
-
restakeCallbackRef.current = async (serviceId) => {
|
|
1384
|
-
try {
|
|
1385
|
-
const state = await fleetStore.load(NETWORK_CHAIN);
|
|
1386
|
-
const svc = state.services.find(s => s.service_id === serviceId);
|
|
1387
|
-
if (!svc)
|
|
1388
|
-
return { ok: false, error: `service_not_found:${serviceId}` };
|
|
1389
|
-
if (!svc.staking_address)
|
|
1390
|
-
return { ok: false, error: 'staking_address_missing' };
|
|
1391
|
-
await recoverEvictedServiceFn({
|
|
1392
|
-
serviceDisplayIndex: Math.max(0, svc.index - 1),
|
|
1393
|
-
serviceId,
|
|
1394
|
-
stakingAddress: svc.staking_address,
|
|
1395
|
-
distributorAddress: CHAIN_CONFIG.distributorAddress,
|
|
1396
|
-
rpcUrl: config.rpcUrl,
|
|
1397
|
-
chain: NETWORK_CHAIN,
|
|
1398
|
-
mnemonic: mnemonicForMaster,
|
|
1399
|
-
});
|
|
1400
|
-
return { ok: true };
|
|
1401
|
-
}
|
|
1402
|
-
catch (err) {
|
|
1403
|
-
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
1404
|
-
}
|
|
1405
|
-
};
|
|
1406
|
-
}
|
|
1407
1260
|
const evictionRecovery = config.stakingMode === 'standard' &&
|
|
1408
1261
|
serviceId !== null &&
|
|
1409
1262
|
stakingAddress &&
|
|
@@ -1611,7 +1464,6 @@ export async function main() {
|
|
|
1611
1464
|
hermesPath: config.hermesPath,
|
|
1612
1465
|
hermesModel: config.hermesModel,
|
|
1613
1466
|
hermesProvider: config.hermesProvider,
|
|
1614
|
-
hermesDoctorTimeoutMs: config.hermesDoctorTimeoutMs,
|
|
1615
1467
|
})) {
|
|
1616
1468
|
implRegistry.register(impl);
|
|
1617
1469
|
}
|
|
@@ -2102,32 +1954,6 @@ export async function main() {
|
|
|
2102
1954
|
safeTopupTarget: CHAIN_CONFIG.minSafeEth,
|
|
2103
1955
|
}
|
|
2104
1956
|
: undefined,
|
|
2105
|
-
// Eviction-check loop — only in standard staking mode (requires distributorAddress).
|
|
2106
|
-
// Running mode only: setup-halted daemons must not try to restake services that
|
|
2107
|
-
// haven't been staked yet (hjex.3).
|
|
2108
|
-
evictionCheck: config.evictionCheckIntervalMs > 0 &&
|
|
2109
|
-
config.stakingMode === 'standard' &&
|
|
2110
|
-
CHAIN_CONFIG.distributorAddress
|
|
2111
|
-
? {
|
|
2112
|
-
intervalMs: config.evictionCheckIntervalMs,
|
|
2113
|
-
store: earningStore,
|
|
2114
|
-
chain: NETWORK_CHAIN,
|
|
2115
|
-
readContract: (opts) => publicClient.readContract(opts),
|
|
2116
|
-
recoverEvictedService: async (svc) => {
|
|
2117
|
-
if (!svc.service_id || !svc.staking_address)
|
|
2118
|
-
return;
|
|
2119
|
-
await recoverEvictedServiceFn({
|
|
2120
|
-
serviceDisplayIndex: Math.max(0, svc.index - 1),
|
|
2121
|
-
serviceId: svc.service_id,
|
|
2122
|
-
stakingAddress: svc.staking_address,
|
|
2123
|
-
distributorAddress: CHAIN_CONFIG.distributorAddress,
|
|
2124
|
-
rpcUrl: config.rpcUrl,
|
|
2125
|
-
chain: NETWORK_CHAIN,
|
|
2126
|
-
mnemonic: mnemonicForMaster,
|
|
2127
|
-
});
|
|
2128
|
-
},
|
|
2129
|
-
}
|
|
2130
|
-
: undefined,
|
|
2131
1957
|
});
|
|
2132
1958
|
// Write pidfile so `jinn stop` can find us.
|
|
2133
1959
|
const pidPath = join(config.earningDir, 'daemon.pid');
|