@reefclaw/openclaw-plugin 0.1.42 → 0.1.44
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/bridge/bridge.d.ts +7 -0
- package/bridge/bridge.js +23 -2
- package/bridge/gateway/gateway-config.d.ts +3 -0
- package/bridge/gateway/gateway-config.js +5 -0
- package/bridge/gateway/heartbeat-cron.d.ts +53 -0
- package/bridge/gateway/heartbeat-cron.js +123 -5
- package/bridge/heartbeat-transcript.d.ts +7 -0
- package/bridge/heartbeat-transcript.js +17 -2
- package/bridge/providers/gateway.js +18 -3
- package/index.js +10 -9
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/release-integrity.json +10 -0
- package/release-notes.json +3 -1
- package/skills/reefclaw/SKILL.md +1 -1
package/bridge/bridge.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export interface BridgePaths {
|
|
|
9
9
|
}
|
|
10
10
|
/** The single-agent layout every box used before multi-agent attach. */
|
|
11
11
|
export declare function defaultBridgePaths(): BridgePaths;
|
|
12
|
+
/** Failure reason for the skill_update_applied audit event: our own error
|
|
13
|
+
* text with every file path replaced (a path carries the box's username —
|
|
14
|
+
* readiness/audit telemetry never carries paths) and capped. Before
|
|
15
|
+
* 2026-09-27 the event said only `success: false`, so a failure that repeated
|
|
16
|
+
* on every reconnect on two customer boxes could not be diagnosed from our
|
|
17
|
+
* side. */
|
|
18
|
+
export declare function redactReason(message: string | undefined): string;
|
|
12
19
|
export declare class Bridge {
|
|
13
20
|
private readonly provider;
|
|
14
21
|
/** Where the served agent's SKILL.md and session index live. The legacy
|
package/bridge/bridge.js
CHANGED
|
@@ -77,6 +77,17 @@ export function defaultBridgePaths() {
|
|
|
77
77
|
sessionsJsonPath: join(homedir(), '.openclaw', 'agents', 'main', 'sessions', 'sessions.json'),
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
+
/** Failure reason for the skill_update_applied audit event: our own error
|
|
81
|
+
* text with every file path replaced (a path carries the box's username —
|
|
82
|
+
* readiness/audit telemetry never carries paths) and capped. Before
|
|
83
|
+
* 2026-09-27 the event said only `success: false`, so a failure that repeated
|
|
84
|
+
* on every reconnect on two customer boxes could not be diagnosed from our
|
|
85
|
+
* side. */
|
|
86
|
+
export function redactReason(message) {
|
|
87
|
+
return String(message ?? '')
|
|
88
|
+
.replace(/(?:[A-Za-z]:)?(?:[\\/][^\s'"`,;:()<>\\/]+)+[\\/]?/g, '<path>')
|
|
89
|
+
.slice(0, 200);
|
|
90
|
+
}
|
|
80
91
|
export class Bridge {
|
|
81
92
|
provider;
|
|
82
93
|
paths;
|
|
@@ -1089,9 +1100,17 @@ export class Bridge {
|
|
|
1089
1100
|
logger.error(TAG, `OTA SKILL.md REJECTED (signature): ${verdict.reason}`);
|
|
1090
1101
|
return { success: false, version, message: `signature rejected: ${verdict.reason}` };
|
|
1091
1102
|
}
|
|
1092
|
-
// Replay/rollback guard: only accept a strictly newer signed artifact
|
|
1103
|
+
// Replay/rollback guard: only accept a strictly newer signed artifact —
|
|
1104
|
+
// or the SAME one again. The signature binds version + content hash +
|
|
1105
|
+
// signedAt, so an equal signedAt for the version already applied is
|
|
1106
|
+
// that exact artifact (nothing to roll back to). Re-applying it is how
|
|
1107
|
+
// a stale agent-visible copy gets rewritten; refusing it (the old
|
|
1108
|
+
// strict check) left such copies stale forever and logged a failed
|
|
1109
|
+
// apply on every reconnect (2026-09-27, two boxes).
|
|
1093
1110
|
const sigMs = new Date(env.signedAt).getTime();
|
|
1094
|
-
|
|
1111
|
+
const lastMs = readLastAppliedSignedAtMs();
|
|
1112
|
+
const sameArtifactAgain = sigMs === lastMs && version === this.currentSkillVersion;
|
|
1113
|
+
if (!(sigMs > lastMs || sameArtifactAgain)) {
|
|
1095
1114
|
logger.error(TAG, `OTA SKILL.md REJECTED (replay): signedAt ${env.signedAt} not newer than last applied`);
|
|
1096
1115
|
return { success: false, version, message: 'signature rejected: replay (stale signedAt)' };
|
|
1097
1116
|
}
|
|
@@ -1252,6 +1271,7 @@ export class Bridge {
|
|
|
1252
1271
|
event: 'skill_update_applied',
|
|
1253
1272
|
version: result.version,
|
|
1254
1273
|
success: updateResult.success,
|
|
1274
|
+
...(updateResult.success ? {} : { reason: redactReason(updateResult.message) }),
|
|
1255
1275
|
timestamp: new Date().toISOString(),
|
|
1256
1276
|
});
|
|
1257
1277
|
return updateResult;
|
|
@@ -1332,6 +1352,7 @@ export class Bridge {
|
|
|
1332
1352
|
event: 'skill_update_applied',
|
|
1333
1353
|
version: body.version,
|
|
1334
1354
|
success: result.success,
|
|
1355
|
+
...(result.success ? {} : { reason: redactReason(result.message) }),
|
|
1335
1356
|
source: 'webapp_pull',
|
|
1336
1357
|
timestamp: new Date().toISOString(),
|
|
1337
1358
|
});
|
|
@@ -48,6 +48,9 @@ export interface GatewayCliArgs {
|
|
|
48
48
|
intelligenceUrl?: string;
|
|
49
49
|
agentId?: string;
|
|
50
50
|
}
|
|
51
|
+
/** The parsed ~/.openclaw/openclaw.json (null when unreadable) — for callers
|
|
52
|
+
* that need a field this module does not model, e.g. `channels`. */
|
|
53
|
+
export declare function readOpenClawConfigFile(): Record<string, unknown> | null;
|
|
51
54
|
/** `1/true/on/yes/enabled` → true, `0/false/off/no/disabled` → false, anything
|
|
52
55
|
* else (unset, blank, garbage) → undefined so the next source is consulted. */
|
|
53
56
|
export declare function parseOnOffSwitch(raw: unknown): boolean | undefined;
|
|
@@ -47,6 +47,11 @@ function readOpenClawJson() {
|
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
/** The parsed ~/.openclaw/openclaw.json (null when unreadable) — for callers
|
|
51
|
+
* that need a field this module does not model, e.g. `channels`. */
|
|
52
|
+
export function readOpenClawConfigFile() {
|
|
53
|
+
return readOpenClawJson();
|
|
54
|
+
}
|
|
50
55
|
// ---- Read the plugin's own config file ----
|
|
51
56
|
function getPluginConfigPath() {
|
|
52
57
|
return process.env.REEFCLAW_PLUGIN_CONFIG_PATH
|
|
@@ -5,6 +5,33 @@ export declare const HEARTBEAT_MESSAGE: string;
|
|
|
5
5
|
export interface CronRpcClient {
|
|
6
6
|
sendRpc(method: string, params?: Record<string, unknown>): Promise<unknown>;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Does this OpenClaw have at least one chat channel configured? Read from
|
|
10
|
+
* openclaw.json `channels` (telegram / discord / whatsapp / … entries).
|
|
11
|
+
* `undefined` = unknown (config unreadable) — callers keep the default.
|
|
12
|
+
*
|
|
13
|
+
* Why (2026-09-27, canary fleet day one): the heartbeat job is created with
|
|
14
|
+
* delivery `announce` → channel `last`. On OpenClaw >= 2026.9 `cron.add`
|
|
15
|
+
* ACCEPTS that on a box with no channel and the run then fails at delivery
|
|
16
|
+
* time — "Channel is required (no configured channels detected)" — so every
|
|
17
|
+
* beat is recorded as an ERROR although the agent's work completed. The
|
|
18
|
+
* 2026-07-22 logic ("cron.add rejects announce → fall back to none") never
|
|
19
|
+
* fires there. Now: no channel → delivery `none` up front.
|
|
20
|
+
*/
|
|
21
|
+
export declare function hasConfiguredChannels(cfg: unknown): boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Repair an existing heartbeat job on a box WITHOUT a chat channel: its
|
|
24
|
+
* delivery `announce` can only fail at run time, so switch it to `none`.
|
|
25
|
+
* Runs on every bridge start (cheap: one cron.list), independent of the
|
|
26
|
+
* once-per-install marker, because the job predates this fix on every box.
|
|
27
|
+
*/
|
|
28
|
+
export declare function reconcileHeartbeatDelivery(opts: {
|
|
29
|
+
rpc: CronRpcClient;
|
|
30
|
+
log: (msg: string) => void;
|
|
31
|
+
channelsConfigured: boolean | undefined;
|
|
32
|
+
agentId?: string;
|
|
33
|
+
agentIsDefault?: boolean;
|
|
34
|
+
}): Promise<'patched' | 'unchanged' | 'skipped' | 'failed'>;
|
|
8
35
|
/**
|
|
9
36
|
* Whether an existing cron job counts as "the heartbeat already exists".
|
|
10
37
|
* Union of the two matchers already in the codebase: the old setup path
|
|
@@ -15,6 +42,29 @@ export interface CronRpcClient {
|
|
|
15
42
|
* agent's token burn.
|
|
16
43
|
*/
|
|
17
44
|
export declare function isHeartbeatLikeName(name: unknown): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether an existing job IS the ReefClaw heartbeat (so creation must be
|
|
47
|
+
* suppressed). A name with "reefclaw" in it counts (ours, and operators'
|
|
48
|
+
* own ReefClaw schedules). A job merely NAMED like a heartbeat counts only
|
|
49
|
+
* when its instructions are ReefClaw's — boxes whose ReefClaw beat predates
|
|
50
|
+
* the reefclaw- prefix.
|
|
51
|
+
*
|
|
52
|
+
* ★ 2026-09-27: `isHeartbeatLikeName` alone adopted a new user's OWN hourly
|
|
53
|
+
* "heartbeat" job (it ran before they had signed up) — ReefClaw's beat was
|
|
54
|
+
* never created, OpenClaw skipped that job every run, and the agent did no
|
|
55
|
+
* trading work while the dashboard showed its status as the agent's heartbeat.
|
|
56
|
+
*/
|
|
57
|
+
export declare function isReefclawHeartbeatJob(job: {
|
|
58
|
+
name?: unknown;
|
|
59
|
+
payload?: unknown;
|
|
60
|
+
} | null | undefined): boolean;
|
|
61
|
+
/** The job whose state the dashboard shows as the agent's heartbeat: ours by
|
|
62
|
+
* name first, then any ReefClaw heartbeat, then (legacy display fallback)
|
|
63
|
+
* anything heartbeat-named. */
|
|
64
|
+
export declare function pickHeartbeatJob<T extends {
|
|
65
|
+
name?: unknown;
|
|
66
|
+
payload?: unknown;
|
|
67
|
+
}>(jobs: readonly T[]): T | undefined;
|
|
18
68
|
export type EnsureHeartbeatOutcome = 'already_ensured' | 'found_existing' | 'created' | 'failed';
|
|
19
69
|
/**
|
|
20
70
|
* Ensure a heartbeat cron exists. Non-fatal by contract: every failure path
|
|
@@ -42,4 +92,7 @@ export declare function ensureHeartbeatCron(opts: {
|
|
|
42
92
|
/** False when `agentId` is NOT the gateway default - the job then carries
|
|
43
93
|
* agentId so OpenClaw runs it on that agent (session key agent:<id>:cron:...). */
|
|
44
94
|
agentIsDefault?: boolean;
|
|
95
|
+
/** hasConfiguredChannels(openclaw.json): false → create with delivery
|
|
96
|
+
* `none` (announce can only fail); true/undefined → announce as before. */
|
|
97
|
+
channelsConfigured?: boolean;
|
|
45
98
|
}): Promise<EnsureHeartbeatOutcome>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// completion. Without it, a user who deliberately deleted their heartbeat cron
|
|
14
14
|
// would get it resurrected on every bridge boot — the old setup-time path ran
|
|
15
15
|
// once, and that operator-override behaviour must be preserved.
|
|
16
|
-
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
16
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
17
17
|
import { dirname } from 'path';
|
|
18
18
|
export const HEARTBEAT_CRON_NAME = 'reefclaw-heartbeat';
|
|
19
19
|
// 15m is the default. A disciplined beat (early-exit on no-trade + trading
|
|
@@ -53,10 +53,69 @@ export const HEARTBEAT_MESSAGE = 'Heartbeat. Execute EVERY checkbox in the HEART
|
|
|
53
53
|
'get_my_recent_reviews() + get_relevant_learnings({applies_at: heartbeat}) in one batch, ' +
|
|
54
54
|
'then record_position_reviews with ONE review per open position, ' +
|
|
55
55
|
'plus get_resting_liquidity + get_liquidation_levels + get_liquidation_pulse for ALL positions in one parallel batch; ' +
|
|
56
|
-
|
|
56
|
+
"(4) the Market Assessment reads — every tool takes ONE object argument, e.g. get_regime({symbol:'BTCUSDT'}), " +
|
|
57
|
+
"get_market_structure({symbol:'BTC/USDT'}), get_market_intel({category:'news'}), get_crypto_metrics({symbol:'BTC/USDT'}); " +
|
|
58
|
+
"where tools are reached through tool_call, pass {id:'<tool name>', args:{...}}. " +
|
|
57
59
|
'Manage open positions by their pinned plan (invalidation_price / realization_rule) — do not re-argue the entry thesis each beat. ' +
|
|
58
60
|
'Check tradingMode from fetch_balance — the source of truth for paper vs live. ' +
|
|
59
61
|
'Batch independent tool calls in parallel. Trading tools only: no subagents, no web browsing.';
|
|
62
|
+
/**
|
|
63
|
+
* Does this OpenClaw have at least one chat channel configured? Read from
|
|
64
|
+
* openclaw.json `channels` (telegram / discord / whatsapp / … entries).
|
|
65
|
+
* `undefined` = unknown (config unreadable) — callers keep the default.
|
|
66
|
+
*
|
|
67
|
+
* Why (2026-09-27, canary fleet day one): the heartbeat job is created with
|
|
68
|
+
* delivery `announce` → channel `last`. On OpenClaw >= 2026.9 `cron.add`
|
|
69
|
+
* ACCEPTS that on a box with no channel and the run then fails at delivery
|
|
70
|
+
* time — "Channel is required (no configured channels detected)" — so every
|
|
71
|
+
* beat is recorded as an ERROR although the agent's work completed. The
|
|
72
|
+
* 2026-07-22 logic ("cron.add rejects announce → fall back to none") never
|
|
73
|
+
* fires there. Now: no channel → delivery `none` up front.
|
|
74
|
+
*/
|
|
75
|
+
export function hasConfiguredChannels(cfg) {
|
|
76
|
+
if (cfg == null || typeof cfg !== 'object')
|
|
77
|
+
return undefined;
|
|
78
|
+
const channels = cfg.channels;
|
|
79
|
+
if (channels == null || typeof channels !== 'object' || Array.isArray(channels))
|
|
80
|
+
return false;
|
|
81
|
+
for (const [key, value] of Object.entries(channels)) {
|
|
82
|
+
if (key === 'defaults' || value == null || typeof value !== 'object' || Array.isArray(value))
|
|
83
|
+
continue;
|
|
84
|
+
if (value.enabled === false)
|
|
85
|
+
continue;
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Repair an existing heartbeat job on a box WITHOUT a chat channel: its
|
|
92
|
+
* delivery `announce` can only fail at run time, so switch it to `none`.
|
|
93
|
+
* Runs on every bridge start (cheap: one cron.list), independent of the
|
|
94
|
+
* once-per-install marker, because the job predates this fix on every box.
|
|
95
|
+
*/
|
|
96
|
+
export async function reconcileHeartbeatDelivery(opts) {
|
|
97
|
+
if (opts.channelsConfigured !== false)
|
|
98
|
+
return 'skipped';
|
|
99
|
+
const agentId = opts.agentId?.trim().toLowerCase() || undefined;
|
|
100
|
+
const agentIsDefault = opts.agentIsDefault ?? true;
|
|
101
|
+
try {
|
|
102
|
+
const listResp = (await opts.rpc.sendRpc('cron.list', { includeDisabled: true }));
|
|
103
|
+
const jobs = Array.isArray(listResp?.jobs) ? listResp.jobs : [];
|
|
104
|
+
const job = jobs.find((j) => isReefclawHeartbeatJob(j) && cronJobBelongsToAgent(j, agentId, agentIsDefault));
|
|
105
|
+
if (!job || typeof job.id !== 'string')
|
|
106
|
+
return 'unchanged';
|
|
107
|
+
const mode = job.delivery?.mode;
|
|
108
|
+
if (mode !== 'announce')
|
|
109
|
+
return 'unchanged';
|
|
110
|
+
await opts.rpc.sendRpc('cron.update', { id: job.id, patch: { delivery: { mode: 'none' } } });
|
|
111
|
+
opts.log(`Heartbeat cron: no chat channel is configured — delivery switched from announce to none (${String(job.name)})`);
|
|
112
|
+
return 'patched';
|
|
113
|
+
}
|
|
114
|
+
catch (err) {
|
|
115
|
+
opts.log(`Heartbeat cron: delivery reconcile failed (${err instanceof Error ? err.message.split('\n')[0] : String(err)})`);
|
|
116
|
+
return 'failed';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
60
119
|
/**
|
|
61
120
|
* Whether an existing cron job counts as "the heartbeat already exists".
|
|
62
121
|
* Union of the two matchers already in the codebase: the old setup path
|
|
@@ -69,6 +128,57 @@ export const HEARTBEAT_MESSAGE = 'Heartbeat. Execute EVERY checkbox in the HEART
|
|
|
69
128
|
export function isHeartbeatLikeName(name) {
|
|
70
129
|
return typeof name === 'string' && /reefclaw|heart\s*beat/i.test(name);
|
|
71
130
|
}
|
|
131
|
+
/** Words only a ReefClaw heartbeat's instructions carry (our message, and the
|
|
132
|
+
* older "run the Decision Loop from SKILL.md" one). OpenClaw's own heartbeat
|
|
133
|
+
* prompt mentions HEARTBEAT.md, so that alone proves nothing. */
|
|
134
|
+
const REEFCLAW_BEAT_MESSAGE = /reefclaw|SKILL\.md|Decision Loop|record_position_reviews|fetch_positions|query_trades|get_wave9_status/i;
|
|
135
|
+
/**
|
|
136
|
+
* Whether an existing job IS the ReefClaw heartbeat (so creation must be
|
|
137
|
+
* suppressed). A name with "reefclaw" in it counts (ours, and operators'
|
|
138
|
+
* own ReefClaw schedules). A job merely NAMED like a heartbeat counts only
|
|
139
|
+
* when its instructions are ReefClaw's — boxes whose ReefClaw beat predates
|
|
140
|
+
* the reefclaw- prefix.
|
|
141
|
+
*
|
|
142
|
+
* ★ 2026-09-27: `isHeartbeatLikeName` alone adopted a new user's OWN hourly
|
|
143
|
+
* "heartbeat" job (it ran before they had signed up) — ReefClaw's beat was
|
|
144
|
+
* never created, OpenClaw skipped that job every run, and the agent did no
|
|
145
|
+
* trading work while the dashboard showed its status as the agent's heartbeat.
|
|
146
|
+
*/
|
|
147
|
+
export function isReefclawHeartbeatJob(job) {
|
|
148
|
+
const name = job?.name;
|
|
149
|
+
if (typeof name !== 'string')
|
|
150
|
+
return false;
|
|
151
|
+
if (/reefclaw/i.test(name))
|
|
152
|
+
return true;
|
|
153
|
+
if (!/heart\s*beat/i.test(name))
|
|
154
|
+
return false;
|
|
155
|
+
const payload = job?.payload;
|
|
156
|
+
const msg = typeof payload?.message === 'string' ? payload.message : typeof payload?.text === 'string' ? payload.text : '';
|
|
157
|
+
return REEFCLAW_BEAT_MESSAGE.test(msg);
|
|
158
|
+
}
|
|
159
|
+
/** The job whose state the dashboard shows as the agent's heartbeat: ours by
|
|
160
|
+
* name first, then any ReefClaw heartbeat, then (legacy display fallback)
|
|
161
|
+
* anything heartbeat-named. */
|
|
162
|
+
export function pickHeartbeatJob(jobs) {
|
|
163
|
+
return (jobs.find((j) => j?.name === HEARTBEAT_CRON_NAME) ??
|
|
164
|
+
jobs.find((j) => isReefclawHeartbeatJob(j)) ??
|
|
165
|
+
jobs.find((j) => isHeartbeatLikeName(j?.name)));
|
|
166
|
+
}
|
|
167
|
+
/** Stamped into markers written under isReefclawHeartbeatJob. */
|
|
168
|
+
const ADOPTION_RULE = 'reefclaw-job-v2';
|
|
169
|
+
/** A marker written when an earlier bridge ADOPTED a job that is not
|
|
170
|
+
* ReefClaw's by name. Such boxes are re-checked once under the stricter rule. */
|
|
171
|
+
function markerAdoptedForeignJob(markerPath) {
|
|
172
|
+
try {
|
|
173
|
+
const m = JSON.parse(readFileSync(markerPath, 'utf-8'));
|
|
174
|
+
if (m.rule === ADOPTION_RULE)
|
|
175
|
+
return false;
|
|
176
|
+
return typeof m.found === 'string' && !/reefclaw/i.test(m.found);
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
72
182
|
/**
|
|
73
183
|
* Ensure a heartbeat cron exists. Non-fatal by contract: every failure path
|
|
74
184
|
* returns 'failed' rather than throwing, and only success writes the marker so
|
|
@@ -98,7 +208,7 @@ export async function ensureHeartbeatCron(opts) {
|
|
|
98
208
|
const agentId = opts.agentId?.trim().toLowerCase() || undefined;
|
|
99
209
|
const agentIsDefault = opts.agentIsDefault ?? true;
|
|
100
210
|
try {
|
|
101
|
-
if (existsSync(markerPath))
|
|
211
|
+
if (existsSync(markerPath) && !markerAdoptedForeignJob(markerPath))
|
|
102
212
|
return 'already_ensured';
|
|
103
213
|
// includeDisabled: a job the user disabled still means "exists" — re-adding
|
|
104
214
|
// a duplicate next to a deliberately-disabled one is worse than doing nothing.
|
|
@@ -108,9 +218,9 @@ export async function ensureHeartbeatCron(opts) {
|
|
|
108
218
|
log('Heartbeat cron: skipped (cron.list returned no job list)');
|
|
109
219
|
return 'failed';
|
|
110
220
|
}
|
|
111
|
-
const existing = jobs.find((j) =>
|
|
221
|
+
const existing = jobs.find((j) => isReefclawHeartbeatJob(j) && cronJobBelongsToAgent(j, agentId, agentIsDefault));
|
|
112
222
|
if (existing) {
|
|
113
|
-
writeMarker(markerPath, { ensuredAt: new Date().toISOString(), found: String(existing.name) });
|
|
223
|
+
writeMarker(markerPath, { ensuredAt: new Date().toISOString(), found: String(existing.name), rule: ADOPTION_RULE });
|
|
114
224
|
log(`Heartbeat cron: already exists (${String(existing.name)})`);
|
|
115
225
|
return 'found_existing';
|
|
116
226
|
}
|
|
@@ -147,6 +257,14 @@ export async function ensureHeartbeatCron(opts) {
|
|
|
147
257
|
},
|
|
148
258
|
};
|
|
149
259
|
let delivery = 'announce';
|
|
260
|
+
if (opts.channelsConfigured === false) {
|
|
261
|
+
// No chat channel: announce would fail at every run ("Channel is
|
|
262
|
+
// required"), turning healthy beats into recorded errors.
|
|
263
|
+
await rpc.sendRpc('cron.add', { ...baseJob, delivery: { mode: 'none' } });
|
|
264
|
+
writeMarker(markerPath, { ensuredAt: new Date().toISOString(), created: HEARTBEAT_CRON_NAME, delivery: 'none', rule: ADOPTION_RULE });
|
|
265
|
+
log(`Heartbeat cron: created (${HEARTBEAT_CRON_NAME}, every 15m, delivery=none — no chat channel configured${agentId && !agentIsDefault ? `, agent=${agentId}` : ''})`);
|
|
266
|
+
return 'created';
|
|
267
|
+
}
|
|
150
268
|
try {
|
|
151
269
|
await rpc.sendRpc('cron.add', { ...baseJob, delivery: { mode: 'announce', channel: 'last' } });
|
|
152
270
|
}
|
|
@@ -77,6 +77,9 @@ export interface HeartbeatRunRecord {
|
|
|
77
77
|
/** Model API the assistant messages carry (e.g. "openai-chatgpt-responses"). */
|
|
78
78
|
api: string | null;
|
|
79
79
|
thinkingLevel: string | null;
|
|
80
|
+
/** The run log's error when it was ONLY the post-turn delivery that
|
|
81
|
+
* failed (no chat channel to announce to); the beat itself is `ok`. */
|
|
82
|
+
deliveryError: string | null;
|
|
80
83
|
};
|
|
81
84
|
}
|
|
82
85
|
/** The subset of an OpenClaw cron run-log entry the recorder consumes
|
|
@@ -253,6 +256,10 @@ export interface BuildRecordInput {
|
|
|
253
256
|
/** Fallback start time when neither file carries one (file mtime). */
|
|
254
257
|
fallbackStartedAtMs: number;
|
|
255
258
|
}
|
|
259
|
+
/** OpenClaw run-log errors raised AFTER the agent turn, by the delivery of
|
|
260
|
+
* its final reply (announce to a chat channel). On a box with no channel
|
|
261
|
+
* every beat ends this way; the trading work itself completed. */
|
|
262
|
+
export declare function isDeliveryPhaseError(text: string | null | undefined): boolean;
|
|
256
263
|
export declare function buildHeartbeatRunRecord(i: BuildRecordInput): HeartbeatRunRecord;
|
|
257
264
|
/** Shrink a record until its JSON fits `maxBytes`: first shorter tool
|
|
258
265
|
* results, then no results, then fewer tool calls. Pure; returns a copy. */
|
|
@@ -729,6 +729,14 @@ function clean(s) {
|
|
|
729
729
|
const t = s.trim();
|
|
730
730
|
return t ? redactTokens(t) : null;
|
|
731
731
|
}
|
|
732
|
+
/** OpenClaw run-log errors raised AFTER the agent turn, by the delivery of
|
|
733
|
+
* its final reply (announce to a chat channel). On a box with no channel
|
|
734
|
+
* every beat ends this way; the trading work itself completed. */
|
|
735
|
+
export function isDeliveryPhaseError(text) {
|
|
736
|
+
if (!text)
|
|
737
|
+
return false;
|
|
738
|
+
return /channel is required|no configured channels|no resolvable (recipient|owner|channel)|announce delivery/i.test(text);
|
|
739
|
+
}
|
|
732
740
|
export function buildHeartbeatRunRecord(i) {
|
|
733
741
|
const t = i.transcript;
|
|
734
742
|
const tj = i.trajectory;
|
|
@@ -740,8 +748,14 @@ export function buildHeartbeatRunRecord(i) {
|
|
|
740
748
|
const trigger = cronJobId ? 'cron' : 'unknown';
|
|
741
749
|
// Status: the run log is authoritative, then the trajectory's terminal
|
|
742
750
|
// event, then what the transcript itself shows.
|
|
751
|
+
// A delivery-only failure (announce with no channel) after a completed
|
|
752
|
+
// turn is NOT a failed beat — 2026-09-27, every channel-less box.
|
|
753
|
+
const runLogError = clean(rl?.error);
|
|
754
|
+
const deliveryOnly = rl?.status === 'error' &&
|
|
755
|
+
isDeliveryPhaseError(runLogError) &&
|
|
756
|
+
(t.complete || t.finalText != null || t.assistantCount > 0);
|
|
743
757
|
let status;
|
|
744
|
-
if (rl?.status === 'ok')
|
|
758
|
+
if (rl?.status === 'ok' || deliveryOnly)
|
|
745
759
|
status = 'ok';
|
|
746
760
|
else if (rl?.status === 'error' || rl?.status === 'skipped')
|
|
747
761
|
status = 'error';
|
|
@@ -779,7 +793,7 @@ export function buildHeartbeatRunRecord(i) {
|
|
|
779
793
|
.map((e) => ({ ...e, detail: redactTokens(e.detail) }))
|
|
780
794
|
.sort((a, b) => (a.at ?? 0) - (b.at ?? 0))
|
|
781
795
|
.slice(0, MODEL_EVENTS_MAX);
|
|
782
|
-
const errorText =
|
|
796
|
+
const errorText = (deliveryOnly ? null : runLogError) ?? clean(tj?.ended?.promptError) ?? clean(t.lastErrorMessage);
|
|
783
797
|
const summaryClip = t.finalText ? clip(redactTokens(t.finalText), SUMMARY_MAX) : null;
|
|
784
798
|
const toolCalls = t.toolCalls.map((c) => ({
|
|
785
799
|
...c,
|
|
@@ -813,6 +827,7 @@ export function buildHeartbeatRunRecord(i) {
|
|
|
813
827
|
truncated: t.truncated || (summaryClip?.clipped ?? false),
|
|
814
828
|
toolCount: tj?.toolCount ?? null,
|
|
815
829
|
api: t.api ?? tj?.modelApi ?? null,
|
|
830
|
+
deliveryError: deliveryOnly ? runLogError : null,
|
|
816
831
|
thinkingLevel: t.thinkingLevel ?? tj?.thinkLevel ?? null,
|
|
817
832
|
},
|
|
818
833
|
};
|
|
@@ -14,7 +14,8 @@ import { GatewayWsClient } from '../gateway/gateway-ws-client.js';
|
|
|
14
14
|
import { discoverTools } from '../gateway/tool-discovery.js';
|
|
15
15
|
import { EventParser, mapCcxtBalance, mapCcxtOrder, extractLiquidationFields, extractBracketField, extractPlannedLevels, } from '../gateway/event-parser.js';
|
|
16
16
|
import { Poller } from '../gateway/poller.js';
|
|
17
|
-
import { ensureHeartbeatCron,
|
|
17
|
+
import { ensureHeartbeatCron, hasConfiguredChannels, pickHeartbeatJob, reconcileHeartbeatDelivery } from '../gateway/heartbeat-cron.js';
|
|
18
|
+
import { readOpenClawConfigFile } from '../gateway/gateway-config.js';
|
|
18
19
|
import { parseIdentityName } from '../utils/identity-name.js';
|
|
19
20
|
import { assessDrawdownPlausibility, computeEquity as _computeEquity, computePositionNotional as _computePositionNotional, computeRiskMetrics as _computeRiskMetrics, DEFAULT_RISK_LIMITS, DRAWDOWN_ZONE_THRESHOLDS, TENANT_LIMIT_BOUNDS, boundedNum, validateDrawdownLadder, } from './risk-calculator.js';
|
|
20
21
|
import { executeKill as _executeKill, executeFlatten as _executeFlatten, executePause as _executePause, executeResume as _executeResume, cancelPendingProposals, withProposalDetail, } from './emergency-commands.js';
|
|
@@ -1447,6 +1448,9 @@ export class GatewayProvider {
|
|
|
1447
1448
|
this.heartbeatCronEnsureStarted = true;
|
|
1448
1449
|
const ws = this.wsClient;
|
|
1449
1450
|
if (ws) {
|
|
1451
|
+
// A box with no chat channel gets delivery `none`: announce can only
|
|
1452
|
+
// fail there and would record every beat as an error (2026-09-27).
|
|
1453
|
+
const channelsConfigured = hasConfiguredChannels(readOpenClawConfigFile());
|
|
1450
1454
|
void ensureHeartbeatCron({
|
|
1451
1455
|
rpc: ws,
|
|
1452
1456
|
markerPath: join(this.workspaceDir(), 'heartbeat-cron-ensured.json'),
|
|
@@ -1456,10 +1460,21 @@ export class GatewayProvider {
|
|
|
1456
1460
|
// a non-default agent's job carries agentId so it runs THERE.
|
|
1457
1461
|
agentId: this.agentId(),
|
|
1458
1462
|
agentIsDefault: this.config.agentIsDefault ?? true,
|
|
1463
|
+
channelsConfigured,
|
|
1459
1464
|
}).then((outcome) => {
|
|
1460
1465
|
// A transient failure retries on the next (re)connect, not just next boot.
|
|
1461
|
-
if (outcome === 'failed')
|
|
1466
|
+
if (outcome === 'failed') {
|
|
1462
1467
|
this.heartbeatCronEnsureStarted = false;
|
|
1468
|
+
return;
|
|
1469
|
+
}
|
|
1470
|
+
// Existing jobs predate the rule above — repair them in place.
|
|
1471
|
+
void reconcileHeartbeatDelivery({
|
|
1472
|
+
rpc: ws,
|
|
1473
|
+
log: (msg) => logger.info(TAG, msg),
|
|
1474
|
+
channelsConfigured,
|
|
1475
|
+
agentId: this.agentId(),
|
|
1476
|
+
agentIsDefault: this.config.agentIsDefault ?? true,
|
|
1477
|
+
});
|
|
1463
1478
|
});
|
|
1464
1479
|
}
|
|
1465
1480
|
}
|
|
@@ -2260,7 +2275,7 @@ export class GatewayProvider {
|
|
|
2260
2275
|
const jobs = resp?.jobs;
|
|
2261
2276
|
if (!Array.isArray(jobs))
|
|
2262
2277
|
return; // unknown shape — leave last-known
|
|
2263
|
-
const hb = jobs
|
|
2278
|
+
const hb = pickHeartbeatJob(jobs);
|
|
2264
2279
|
// Cadence from the same RPC row: on 2026.7.x the filesystem jobs.json
|
|
2265
2280
|
// that resolveHeartbeatSeconds() reads is gone (cron store migrated),
|
|
2266
2281
|
// so without this the "beat every Nm" label and the 2× unresponsive
|
package/index.js
CHANGED
|
@@ -486,9 +486,8 @@ const TOOL_PARAMS = {
|
|
|
486
486
|
get_crypto_metrics: {
|
|
487
487
|
type: 'object',
|
|
488
488
|
properties: {
|
|
489
|
-
symbol: { type: 'string', description: 'Trading pair symbol, e.g. BTC/USDT' },
|
|
489
|
+
symbol: { type: 'string', description: 'Trading pair symbol, e.g. BTC/USDT. Optional — defaults to the configured trading symbol.' },
|
|
490
490
|
},
|
|
491
|
-
required: ['symbol'],
|
|
492
491
|
},
|
|
493
492
|
get_volume_analysis: {
|
|
494
493
|
type: 'object',
|
|
@@ -508,7 +507,7 @@ const TOOL_PARAMS = {
|
|
|
508
507
|
category: {
|
|
509
508
|
type: 'string',
|
|
510
509
|
enum: ['sentiment', 'news', 'calendar', 'overview', 'derivatives', 'onchain', 'social'],
|
|
511
|
-
description: 'Category of market intelligence: sentiment (fear/greed, dominance), news (crypto headlines), calendar (economic events), overview (top coins, trending), derivatives (OI, funding, long/short ratios), onchain (BTC network, mempool, whale txs), social (community stats, trending posts)
|
|
510
|
+
description: "Optional — defaults to 'overview'. Category of market intelligence: sentiment (fear/greed, dominance), news (crypto headlines), calendar (economic events), overview (top coins, trending), derivatives (OI, funding, long/short ratios), onchain (BTC network, mempool, whale txs), social (community stats, trending posts)",
|
|
512
511
|
},
|
|
513
512
|
symbols: {
|
|
514
513
|
type: 'array',
|
|
@@ -516,14 +515,16 @@ const TOOL_PARAMS = {
|
|
|
516
515
|
description: 'Optional symbols to filter results (e.g. ["BTC", "ETH"])',
|
|
517
516
|
},
|
|
518
517
|
},
|
|
519
|
-
required: ['category'],
|
|
520
518
|
},
|
|
519
|
+
// 2026-09-27 (canary fleet): on OpenClaw >= 2026.9 Tool Search the model
|
|
520
|
+
// sees only a compact tool directory and calls these with {} — every such
|
|
521
|
+
// call was rejected ("must have required property"). symbol / category are
|
|
522
|
+
// now optional with a sensible default, so a bare call still answers.
|
|
521
523
|
get_regime: {
|
|
522
524
|
type: 'object',
|
|
523
525
|
properties: {
|
|
524
|
-
symbol: { type: 'string', description: 'Symbol to classify, e.g. BTCUSDT' },
|
|
526
|
+
symbol: { type: 'string', description: 'Symbol to classify, e.g. BTCUSDT. Optional — defaults to the configured trading symbol.' },
|
|
525
527
|
},
|
|
526
|
-
required: ['symbol'],
|
|
527
528
|
},
|
|
528
529
|
get_signals: {
|
|
529
530
|
type: 'object',
|
|
@@ -2527,7 +2528,7 @@ const paperTradingPlugin = {
|
|
|
2527
2528
|
label: 'Get Crypto Metrics',
|
|
2528
2529
|
description: 'Fetch funding rate (current + annualized) and open interest for a perpetual futures symbol. Useful for gauging market sentiment and crowding.',
|
|
2529
2530
|
parameters: TOOL_PARAMS.get_crypto_metrics,
|
|
2530
|
-
execute: async (_id, params) => jsonResult(await getCryptoMetricsTool(params, simDeps)),
|
|
2531
|
+
execute: async (_id, params) => jsonResult(await getCryptoMetricsTool({ ...params, symbol: params?.symbol?.trim() || pluginConfig.symbol }, simDeps)),
|
|
2531
2532
|
},
|
|
2532
2533
|
{
|
|
2533
2534
|
name: 'get_volume_analysis',
|
|
@@ -2551,14 +2552,14 @@ const paperTradingPlugin = {
|
|
|
2551
2552
|
label: 'Get Market Intelligence',
|
|
2552
2553
|
description: 'Fetch market intelligence from ReefClaw: sentiment (fear/greed, BTC dominance), news (crypto headlines with sentiment), calendar (upcoming economic events), overview (top coins, trending), derivatives (OI, funding rates, long/short ratios), onchain (BTC network stats, mempool fees, whale transactions), social (community data, trending posts). Requires Pro subscription.',
|
|
2553
2554
|
parameters: TOOL_PARAMS.get_market_intel,
|
|
2554
|
-
execute: async (_id, params) => jsonResult(await getMarketIntelTool(params, intelDeps)),
|
|
2555
|
+
execute: async (_id, params) => jsonResult(await getMarketIntelTool({ ...params, category: params?.category ?? 'overview' }, intelDeps)),
|
|
2555
2556
|
},
|
|
2556
2557
|
{
|
|
2557
2558
|
name: 'get_regime',
|
|
2558
2559
|
label: 'Get Market Regime',
|
|
2559
2560
|
description: 'Get the current market regime classification (trend_up, trend_down, range_tight, range_wide, high_vol, avoid) with confidence score, class probabilities, and top contributing features. Powered by XGBoost model trained on 20 features from order flow, volatility, momentum, and derivatives data.',
|
|
2560
2561
|
parameters: TOOL_PARAMS.get_regime,
|
|
2561
|
-
execute: async (_id, params) => jsonResult(await getRegimeTool(params, intelApiDeps)),
|
|
2562
|
+
execute: async (_id, params) => jsonResult(await getRegimeTool({ ...params, symbol: params?.symbol?.trim() || pluginConfig.symbol }, intelApiDeps)),
|
|
2562
2563
|
},
|
|
2563
2564
|
{
|
|
2564
2565
|
name: 'get_signals',
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "reefclaw-paper-trading",
|
|
3
3
|
"name": "ReefClaw Trading",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.44",
|
|
5
5
|
"description": "Supervised trading plugin for the ReefClaw dashboard. It runs on YOUR machine and starts in PAPER mode with no API keys. It cannot trade real funds until you supply exchange credentials and step PAPER→MICRO_LIVE→LIVE yourself from the dashboard — the agent cannot make that change (the tool is refused without operator provenance). Exchange keys stay local, are used only to sign requests to the exchange, and are never transmitted to ReefClaw (asserted by a test in this package). Trading telemetry — positions, fills, decision journal — is sent to ReefClaw to render the dashboard. Every live position carries exchange-native protective stops. Remote updates to the agent's trading instructions are applied only after an Ed25519 signature is verified against a public key pinned in this build. It runs on gateway startup and supervises a local connector process; the package README lists every path it writes and everything it sends. It never changes the gateway's auth settings.",
|
|
6
6
|
"author": "ReefClaw",
|
|
7
7
|
"activation": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reefclaw/openclaw-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "ReefClaw supervised trading plugin for OpenClaw. Runs entirely on YOUR machine and starts in PAPER mode — it cannot trade real funds until you supply exchange credentials and walk the PAPER→MICRO_LIVE→LIVE ladder yourself from the ReefClaw dashboard (the agent cannot make that change; it is refused without operator provenance). Your exchange API keys stay on your machine to sign requests to the exchange and are NEVER sent to ReefClaw — a test in the package asserts this. What does reach ReefClaw is trading telemetry for the dashboard (positions, fills, decision journal). Live trading always carries exchange-native protective stops. Trading instructions can be updated remotely, and every update must carry a valid Ed25519 signature verified against a key pinned in this build before it is applied. Install from ClawHub on OpenClaw 2026.8.1+ (Control UI Plugins > Discover, or /plugins install clawhub:@reefclaw/openclaw-plugin then the same with --accept-capabilities after reviewing the listed capabilities), or with the ReefClaw connect installer (@reefclaw/connect on npm, pinned to the exact release named in the bundled skill). It runs on gateway startup, supervises a local connector process, and writes only under ~/.reefclaw and OpenClaw's own skill, config and cron locations; the README lists every path it writes and everything it sends. It never changes the gateway's auth settings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
package/release-integrity.json
CHANGED
|
@@ -13,5 +13,15 @@
|
|
|
13
13
|
"index.js": "163bb536a4600a10bcc0c6af239982a332b510d93f0a8d54214e91a62c74f8ef",
|
|
14
14
|
"tools/create-order.js": "b0244ff69cb5b4a44e18c7ceaf91669ee19649d0e6b18bb857aa47ca80f63b2a",
|
|
15
15
|
"risk/pre-trade-check.js": "15ba2c91e7a1f5ea03a2452eda40d489eda406a434e3bc3e9b7e024190f6a22f"
|
|
16
|
+
},
|
|
17
|
+
"0.1.42": {
|
|
18
|
+
"index.js": "77147e4c43713ed0641e098718182640508b99b67a33b53bad745bd19e0aa160",
|
|
19
|
+
"tools/create-order.js": "b0244ff69cb5b4a44e18c7ceaf91669ee19649d0e6b18bb857aa47ca80f63b2a",
|
|
20
|
+
"risk/pre-trade-check.js": "15ba2c91e7a1f5ea03a2452eda40d489eda406a434e3bc3e9b7e024190f6a22f"
|
|
21
|
+
},
|
|
22
|
+
"0.1.43": {
|
|
23
|
+
"index.js": "77147e4c43713ed0641e098718182640508b99b67a33b53bad745bd19e0aa160",
|
|
24
|
+
"tools/create-order.js": "b0244ff69cb5b4a44e18c7ceaf91669ee19649d0e6b18bb857aa47ca80f63b2a",
|
|
25
|
+
"risk/pre-trade-check.js": "15ba2c91e7a1f5ea03a2452eda40d489eda406a434e3bc3e9b7e024190f6a22f"
|
|
16
26
|
}
|
|
17
27
|
}
|
package/release-notes.json
CHANGED
|
@@ -13,5 +13,7 @@
|
|
|
13
13
|
"0.1.39": "wave9: a refusal by the plugin's own risk gate no longer burns the whole trading day (the authorization is released and a fresh one can be requested inside the window; a wrong-side stop still latches). wave9 evidence: the previous day's funding settlement stamped a few milliseconds late no longer makes the whole night's evidence read as incomplete. Model health: the model note OpenClaw 2026.9 writes at the start of every session no longer counts as a model switch, so the model dot can be green. Readiness: the plugin now reports whether its own files match the release (an install-location class, the process start time and fingerprints of three of its own files; never a path, never file contents; switch RC_READINESS_INTEGRITY=off), so a stale or modified install can be told apart from the release without touching the box.",
|
|
14
14
|
"0.1.40": "One-click updates now work on boxes without a gateway terminal (OpenClaw older than 2026.7, terminal disabled) and inside Docker: the connector runs the installer itself in a files-only mode that never touches the OpenClaw CLI or config, then asks the gateway to restart itself. The installer gains --files-only for the same purpose.",
|
|
15
15
|
"0.1.41": "Fixes the dashboard link dropping and reconnecting (seen as a connect/disconnect loop): when the agent or anyone ran an openclaw command, that command started a second copy of the trading plugin and its connector, which knocked the real one off the relay. The trading runtime now starts only inside the OpenClaw gateway, once per process (also covers OpenClaw 2026.9.5+ loading the plugin twice); openclaw commands see the tool names but nothing runs there. Paper venue switch: Binance <-> Hyperliquid can now be switched from the dashboard in paper mode without exchange keys (refused while live). Stop watcher: right after a restart, a position waiting for its first price is reported as warming up instead of as an unenforceable stop; an alarm still fires if the price never arrives. Readiness: OpenClaw 2026.9.6's plugin run copy is reported as its own install location.",
|
|
16
|
-
"0.1.42": "Fixes a problem in 0.1.41 on OpenClaw 2026.9.6: the agent's own tool calls (heartbeats and chat) were answered with \"not available in this process\" instead of running, so the agent could not trade or move stops. The agent now always gets the live tools. On older OpenClaw the same thing could affect the first heartbeat after a restart; that is fixed too."
|
|
16
|
+
"0.1.42": "Fixes a problem in 0.1.41 on OpenClaw 2026.9.6: the agent's own tool calls (heartbeats and chat) were answered with \"not available in this process\" instead of running, so the agent could not trade or move stops. The agent now always gets the live tools. On older OpenClaw the same thing could affect the first heartbeat after a restart; that is fixed too.",
|
|
17
|
+
"0.1.43": "Connector fixes. The ReefClaw heartbeat is now created even when your OpenClaw already has its own job named like a heartbeat (before, the connector could mistake that job for ours, so the agent's trading heartbeat never ran); a box affected by this repairs itself after updating. The trading instructions (SKILL.md) are re-applied correctly when an older copy is found, instead of failing on every reconnect.",
|
|
18
|
+
"0.1.44": "Heartbeats on a box without a chat channel (no Telegram etc.) are no longer recorded as errors: the heartbeat job is created without a chat delivery, existing jobs are repaired automatically, and a failed announcement no longer counts as a failed heartbeat. get_regime, get_crypto_metrics and get_market_intel now work when called without arguments (they default to your trading symbol / the overview category), which removes the rejected calls seen on OpenClaw 2026.9."
|
|
17
19
|
}
|
package/skills/reefclaw/SKILL.md
CHANGED
|
@@ -101,7 +101,7 @@ When a user gives you this message (or just a bare `Here's my ReefClaw token: rc
|
|
|
101
101
|
If the ReefClaw trading tools are not present yet, the **user** installs them by running this once, in a terminal on the machine running OpenClaw (inside the container, if OpenClaw runs in Docker):
|
|
102
102
|
|
|
103
103
|
```
|
|
104
|
-
npx --yes @reefclaw/connect@0.1.
|
|
104
|
+
npx --yes @reefclaw/connect@0.1.57
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
That is the whole install. It places the plugin, sets up the connector, restarts the gateway where it can, and prints what it changed. If its closing lines say **GATEWAY NOT RESTARTED**, the plugin is on disk but not running yet: restarting is the user's step (in Docker, `docker restart <container>` from the host; otherwise restarting OpenClaw). Tell the user exactly that and stop — do not restart, signal or kill any process, do not run docker or service commands, and do not edit the gateway config, even if you could. The plugin reports its own version to ReefClaw after the restart; never post readiness, version or health reports yourself. The version is pinned on purpose: the line names the exact connector release this plugin was published with, so what runs on the machine is reviewable and never "whatever the registry serves today". It needs no ReefClaw token — the connection is the separate paste step above, and the connector picks it up on its own.
|