@openclawbrain/openclaw 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -5
- package/dist/src/cli.d.ts +12 -0
- package/dist/src/cli.js +152 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/index.d.ts +692 -4
- package/dist/src/index.js +2243 -8
- package/dist/src/index.js.map +1 -1
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -1,16 +1,66 @@
|
|
|
1
1
|
# @openclawbrain/openclaw
|
|
2
2
|
|
|
3
|
-
OpenClaw
|
|
3
|
+
OpenClaw integration helpers for promoted-pack compile consumption and normalized event emission.
|
|
4
4
|
|
|
5
|
-
Use this package when OpenClaw needs a narrow, typed bridge over promoted packs
|
|
5
|
+
Use this package when OpenClaw needs a narrow, typed bridge over promoted packs:
|
|
6
6
|
|
|
7
|
+
- bootstrap an initial attach pack from a normalized export and activate it
|
|
7
8
|
- resolve the active promoted pack from activation pointers
|
|
8
|
-
- consume `runtime_compile.v1` through
|
|
9
|
+
- consume `runtime_compile.v1` through an activation-aware serve-path helper
|
|
10
|
+
- surface compact attach status over activation health, active pack freshness, and compile/handoff evidence
|
|
11
|
+
- surface learned-route diagnostics alongside compiled context
|
|
9
12
|
- emit normalized interaction and feedback events for learner handoff
|
|
10
13
|
- optionally write learner-facing event-export bundles on disk
|
|
14
|
+
- run a bounded async teacher loop that converts normalized exports into canonical supervision artifacts and future learner inputs
|
|
15
|
+
- feed learner-side PG route refreshes only with explicit collected labels rather than heuristic learned-label propagation
|
|
16
|
+
- keep the post-attach loop real with canonical supervision, bounded learner refresh, candidate promotion, and later compile freshness
|
|
17
|
+
|
|
18
|
+
The post-attach loop stays off the hot path: it exports turns, builds candidate packs, and promotes them later rather than mutating the current active pack in place.
|
|
11
19
|
|
|
12
20
|
```ts
|
|
13
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
bootstrapRuntimeAttach,
|
|
23
|
+
compileRuntimeContext,
|
|
24
|
+
describeAttachStatus,
|
|
25
|
+
rollbackRuntimeAttach,
|
|
26
|
+
runContinuousProductLoopTurn,
|
|
27
|
+
runRuntimeTurn
|
|
28
|
+
} from "@openclawbrain/openclaw";
|
|
29
|
+
|
|
30
|
+
const attach = bootstrapRuntimeAttach({
|
|
31
|
+
activationRoot: "/var/openclawbrain/activation",
|
|
32
|
+
packRoot: "/var/openclawbrain/packs/bootstrap",
|
|
33
|
+
packLabel: "customer-launch-attach",
|
|
34
|
+
workspace: {
|
|
35
|
+
workspaceId: "workspace-1",
|
|
36
|
+
snapshotId: "workspace-1@snapshot-1",
|
|
37
|
+
capturedAt: "2026-03-07T16:59:00.000Z",
|
|
38
|
+
rootDir: "/workspace/openclawbrain",
|
|
39
|
+
revision: "attach-rev-1"
|
|
40
|
+
},
|
|
41
|
+
interactionEvents: [],
|
|
42
|
+
feedbackEvents: []
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
console.log(attach.status.successSignals);
|
|
46
|
+
|
|
47
|
+
const attachStatus = describeAttachStatus({
|
|
48
|
+
activationRoot: "/var/openclawbrain/activation"
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
console.log(attachStatus.inspection.active?.packId);
|
|
52
|
+
console.log(attachStatus.compile?.handoffState);
|
|
53
|
+
console.log(attachStatus.landingBoundaries.compileBoundary.activationSlot);
|
|
54
|
+
console.log(attachStatus.landingBoundaries.failOpenSemantics.eventExportWriteFailurePreservesCompile);
|
|
55
|
+
|
|
56
|
+
const rollbackPreview = rollbackRuntimeAttach({
|
|
57
|
+
activationRoot: "/var/openclawbrain/activation",
|
|
58
|
+
dryRun: true
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
console.log(rollbackPreview.allowed);
|
|
62
|
+
console.log(rollbackPreview.before.activePackId);
|
|
63
|
+
console.log(rollbackPreview.after?.activePackId);
|
|
14
64
|
|
|
15
65
|
const compileResult = compileRuntimeContext({
|
|
16
66
|
activationRoot: "/var/openclawbrain/activation",
|
|
@@ -18,6 +68,11 @@ const compileResult = compileRuntimeContext({
|
|
|
18
68
|
runtimeHints: ["feedback scanner"]
|
|
19
69
|
});
|
|
20
70
|
|
|
71
|
+
if (compileResult.ok) {
|
|
72
|
+
console.log(compileResult.compileResponse.diagnostics.usedLearnedRouteFn);
|
|
73
|
+
console.log(compileResult.compileResponse.diagnostics.routerIdentity);
|
|
74
|
+
}
|
|
75
|
+
|
|
21
76
|
const turnResult = runRuntimeTurn(
|
|
22
77
|
{
|
|
23
78
|
sessionId: "session-123",
|
|
@@ -38,6 +93,66 @@ const turnResult = runRuntimeTurn(
|
|
|
38
93
|
activationRoot: "/var/openclawbrain/activation"
|
|
39
94
|
}
|
|
40
95
|
);
|
|
96
|
+
|
|
97
|
+
const productLoopTurn = runContinuousProductLoopTurn({
|
|
98
|
+
activationRoot: "/var/openclawbrain/activation",
|
|
99
|
+
loopRoot: "/var/openclawbrain/runtime-loop",
|
|
100
|
+
packLabel: "post-attach-loop",
|
|
101
|
+
workspace: {
|
|
102
|
+
workspaceId: "workspace-1",
|
|
103
|
+
snapshotId: "workspace-1@snapshot-2",
|
|
104
|
+
capturedAt: "2026-03-07T18:00:30.000Z",
|
|
105
|
+
rootDir: "/workspace/openclawbrain",
|
|
106
|
+
revision: "runtime-loop-rev-2"
|
|
107
|
+
},
|
|
108
|
+
turn: {
|
|
109
|
+
sessionId: "session-123",
|
|
110
|
+
channel: "whatsapp",
|
|
111
|
+
userMessage: "Compile the fresher learned route artifact after promotion.",
|
|
112
|
+
feedback: [{ content: "Prefer the fresher learned route artifact after promotion." }]
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
console.log(productLoopTurn.compileActiveVersion);
|
|
117
|
+
console.log(productLoopTurn.learning.promoted);
|
|
118
|
+
console.log(productLoopTurn.state.currentActivePack?.routerIdentity);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
This package stays fail-open for non-learned-required compile misses, and event-export write failures do not erase successful compile output.
|
|
122
|
+
|
|
123
|
+
## Boundary truth
|
|
124
|
+
|
|
125
|
+
`describeAttachStatus()` now returns `landingBoundaries`, a compact runtime-facing statement of the actual OpenClaw handoff:
|
|
126
|
+
|
|
127
|
+
- `compileBoundary`: OpenClaw compiles only from activation's `active` slot through `compileRuntimeContext()` / `runtime_compile.v1`
|
|
128
|
+
- `eventExportBoundary`: `runRuntimeTurn()` emits normalized interaction/feedback exports for later learning handoff, and bundle-write failure does not erase successful compile output
|
|
129
|
+
- `activePackBoundary`: `active` is the only serve-visible slot; `candidate` and `previous` stay inspectable until promotion or rollback changes pointers
|
|
130
|
+
- `promotionBoundary`: learner refresh lands in `candidate`, activation promotion flips pointers, and only later compiles can see the fresher pack
|
|
131
|
+
- `failOpenSemantics`: missing active packs fail open, but learned-required route-artifact drift hard-fails instead of silently serving static context
|
|
132
|
+
- `runtimeResponsibilities`: OpenClaw remains responsible for runtime orchestration, prompt assembly, response delivery, and guarded serve-path decisions
|
|
133
|
+
|
|
134
|
+
Operator-facing CLI:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pnpm exec openclawbrain-ops status --activation-root /var/openclawbrain/activation --event-export /var/openclawbrain/exports/latest --teacher-snapshot /var/openclawbrain/runtime/teacher-snapshot.json
|
|
138
|
+
pnpm exec openclawbrain-ops doctor --activation-root /var/openclawbrain/activation --event-export /var/openclawbrain/exports/latest --teacher-snapshot /var/openclawbrain/runtime/teacher-snapshot.json
|
|
139
|
+
pnpm exec openclawbrain-ops rollback --activation-root /var/openclawbrain/activation --dry-run
|
|
41
140
|
```
|
|
42
141
|
|
|
43
|
-
|
|
142
|
+
- `status` prints a compressed one-screen summary of active/candidate pack truth, brain handoff state, serve-path fail-open status, route freshness, supervision flow, live-vs-backfill learning mode, the last async no-op reason, and rollback readiness
|
|
143
|
+
- `doctor` prints explicit `PASS` / `WARN` / `FAIL` findings and exits `1` only when a hard serve-path failure exists
|
|
144
|
+
- `rollback --dry-run` previews the exact `active <- previous` and `active -> candidate` move before you apply rollback for real
|
|
145
|
+
- `--event-export` accepts either a runtime event-export bundle root or a normalized-export JSON payload
|
|
146
|
+
- `--teacher-snapshot` accepts JSON from `teacherLoop.snapshot()` or `await teacherLoop.flush()` when you want the last duplicate/no-op reason plus learner bootstrapped/mode/next-lane backlog truth kept visible
|
|
147
|
+
|
|
148
|
+
Programmatic rollback is available too:
|
|
149
|
+
|
|
150
|
+
- `rollbackRuntimeAttach({ activationRoot, dryRun: true })` previews the move without changing activation pointers
|
|
151
|
+
- `rollbackRuntimeAttach({ activationRoot })` applies the rollback and reports which pack was restored to `active`
|
|
152
|
+
|
|
153
|
+
The learned-required serve path is stricter:
|
|
154
|
+
|
|
155
|
+
- `compileRuntimeContext()` now forwards the active-slot diagnostics from `@openclawbrain/compiler.compileRuntimeFromActivation()`
|
|
156
|
+
- learned-required active packs return `hardRequirementViolated=true` and `fallbackToStaticContext=false` when route artifacts drift or disappear
|
|
157
|
+
- `runRuntimeTurn()` throws instead of silently serving through those learned-required failures
|
|
158
|
+
- event-export write failures still do not erase successful compile output
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { type OperatorSurfaceInput } from "./index.js";
|
|
3
|
+
interface ParsedOperatorCliArgs {
|
|
4
|
+
command: "status" | "doctor" | "rollback";
|
|
5
|
+
input: OperatorSurfaceInput;
|
|
6
|
+
json: boolean;
|
|
7
|
+
help: boolean;
|
|
8
|
+
dryRun: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function parseOperatorCliArgs(argv: readonly string[]): ParsedOperatorCliArgs;
|
|
11
|
+
export declare function runOperatorCli(argv?: readonly string[]): number;
|
|
12
|
+
export {};
|
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { buildOperatorSurfaceReport, formatOperatorDoctorReport, formatOperatorRollbackReport, formatOperatorStatusReport, rollbackRuntimeAttach } from "./index.js";
|
|
5
|
+
function operatorCliHelp() {
|
|
6
|
+
return [
|
|
7
|
+
"Usage:",
|
|
8
|
+
" openclawbrain-ops <status|doctor|rollback> --activation-root <path> [options]",
|
|
9
|
+
"",
|
|
10
|
+
"Options:",
|
|
11
|
+
" --activation-root <path> Activation root to inspect.",
|
|
12
|
+
" --event-export <path> Event-export bundle root or normalized export JSON payload.",
|
|
13
|
+
" --teacher-snapshot <path> Async teacher snapshot JSON from teacherLoop.snapshot()/flush().",
|
|
14
|
+
" --updated-at <iso> Observation time to use for freshness checks.",
|
|
15
|
+
" --dry-run Preview rollback pointer movement without writing activation state.",
|
|
16
|
+
" --json Emit machine-readable JSON instead of text.",
|
|
17
|
+
" --help Show this help.",
|
|
18
|
+
"",
|
|
19
|
+
"Common flow:",
|
|
20
|
+
" 1. status quick attach / first-value / rollback summary",
|
|
21
|
+
" 2. doctor explicit PASS / WARN / FAIL findings",
|
|
22
|
+
" 3. rollback --dry-run preview active <- previous, active -> candidate",
|
|
23
|
+
" 4. rollback apply the rollback when the preview says ready",
|
|
24
|
+
"",
|
|
25
|
+
"Exit codes:",
|
|
26
|
+
" status: 0 on successful inspection, 1 on input/read failure.",
|
|
27
|
+
" doctor: 0 when no FAIL findings are present, 1 otherwise.",
|
|
28
|
+
" rollback: 0 when ready/applied, 1 when blocked or on input/read failure."
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
export function parseOperatorCliArgs(argv) {
|
|
32
|
+
let command = "status";
|
|
33
|
+
let activationRoot = null;
|
|
34
|
+
let eventExportPath = null;
|
|
35
|
+
let teacherSnapshotPath = null;
|
|
36
|
+
let updatedAt = null;
|
|
37
|
+
let json = false;
|
|
38
|
+
let help = false;
|
|
39
|
+
let dryRun = false;
|
|
40
|
+
const args = [...argv];
|
|
41
|
+
if (args[0] === "status" || args[0] === "doctor" || args[0] === "rollback") {
|
|
42
|
+
command = args.shift();
|
|
43
|
+
}
|
|
44
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
45
|
+
const arg = args[index];
|
|
46
|
+
if (arg === "--help" || arg === "-h") {
|
|
47
|
+
help = true;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (arg === "--json") {
|
|
51
|
+
json = true;
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (arg === "--dry-run") {
|
|
55
|
+
dryRun = true;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const next = args[index + 1];
|
|
59
|
+
if (arg === "--activation-root") {
|
|
60
|
+
if (next === undefined) {
|
|
61
|
+
throw new Error("--activation-root requires a value");
|
|
62
|
+
}
|
|
63
|
+
activationRoot = next;
|
|
64
|
+
index += 1;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (arg === "--event-export") {
|
|
68
|
+
if (next === undefined) {
|
|
69
|
+
throw new Error("--event-export requires a value");
|
|
70
|
+
}
|
|
71
|
+
eventExportPath = next;
|
|
72
|
+
index += 1;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (arg === "--teacher-snapshot") {
|
|
76
|
+
if (next === undefined) {
|
|
77
|
+
throw new Error("--teacher-snapshot requires a value");
|
|
78
|
+
}
|
|
79
|
+
teacherSnapshotPath = next;
|
|
80
|
+
index += 1;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (arg === "--updated-at") {
|
|
84
|
+
if (next === undefined) {
|
|
85
|
+
throw new Error("--updated-at requires a value");
|
|
86
|
+
}
|
|
87
|
+
updatedAt = next;
|
|
88
|
+
index += 1;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
throw new Error(`unknown argument: ${arg}`);
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
command,
|
|
95
|
+
input: {
|
|
96
|
+
activationRoot: activationRoot ?? "",
|
|
97
|
+
eventExportPath,
|
|
98
|
+
teacherSnapshotPath,
|
|
99
|
+
updatedAt
|
|
100
|
+
},
|
|
101
|
+
json,
|
|
102
|
+
help,
|
|
103
|
+
dryRun
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export function runOperatorCli(argv = process.argv.slice(2)) {
|
|
107
|
+
const parsed = parseOperatorCliArgs(argv);
|
|
108
|
+
if (parsed.help) {
|
|
109
|
+
console.log(operatorCliHelp());
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
const activationRoot = path.resolve(parsed.input.activationRoot);
|
|
113
|
+
if (parsed.command === "rollback") {
|
|
114
|
+
const result = rollbackRuntimeAttach({
|
|
115
|
+
activationRoot,
|
|
116
|
+
...(parsed.input.updatedAt === null ? {} : { updatedAt: parsed.input.updatedAt }),
|
|
117
|
+
dryRun: parsed.dryRun
|
|
118
|
+
});
|
|
119
|
+
if (parsed.json) {
|
|
120
|
+
console.log(JSON.stringify(result, null, 2));
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
console.log(formatOperatorRollbackReport(result));
|
|
124
|
+
}
|
|
125
|
+
return result.allowed ? 0 : 1;
|
|
126
|
+
}
|
|
127
|
+
const report = buildOperatorSurfaceReport({
|
|
128
|
+
...parsed.input,
|
|
129
|
+
activationRoot
|
|
130
|
+
});
|
|
131
|
+
if (parsed.json) {
|
|
132
|
+
console.log(JSON.stringify(report, null, 2));
|
|
133
|
+
}
|
|
134
|
+
else if (parsed.command === "doctor") {
|
|
135
|
+
console.log(formatOperatorDoctorReport(report));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
console.log(formatOperatorStatusReport(report));
|
|
139
|
+
}
|
|
140
|
+
return parsed.command === "doctor" && report.status === "fail" ? 1 : 0;
|
|
141
|
+
}
|
|
142
|
+
if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
143
|
+
try {
|
|
144
|
+
process.exitCode = runOperatorCli();
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
console.error("[openclawbrain-ops] failed");
|
|
148
|
+
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
149
|
+
process.exitCode = 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAUpB,SAAS,eAAe;IACtB,OAAO;QACL,QAAQ;QACR,iFAAiF;QACjF,EAAE;QACF,UAAU;QACV,2DAA2D;QAC3D,2FAA2F;QAC3F,gGAAgG;QAChG,6EAA6E;QAC7E,mGAAmG;QACnG,2EAA2E;QAC3E,+CAA+C;QAC/C,EAAE;QACF,cAAc;QACd,6DAA6D;QAC7D,oDAAoD;QACpD,2EAA2E;QAC3E,0EAA0E;QAC1E,EAAE;QACF,aAAa;QACb,gEAAgE;QAChE,6DAA6D;QAC7D,4EAA4E;KAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAuB;IAC1D,IAAI,OAAO,GAAqC,QAAQ,CAAC;IACzD,IAAI,cAAc,GAAkB,IAAI,CAAC;IACzC,IAAI,eAAe,GAAkB,IAAI,CAAC;IAC1C,IAAI,mBAAmB,GAAkB,IAAI,CAAC;IAC9C,IAAI,SAAS,GAAkB,IAAI,CAAC;IACpC,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;I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