@openclawbrain/openclaw 0.1.1 → 0.1.3
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 +136 -31
- package/dist/src/cli.d.ts +12 -0
- package/dist/src/cli.js +188 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/index.d.ts +749 -4
- package/dist/src/index.js +2622 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/learning-spine.d.ts +46 -0
- package/dist/src/learning-spine.js +445 -0
- package/dist/src/learning-spine.js.map +1 -0
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -1,43 +1,148 @@
|
|
|
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
|
|
5
|
+
Use this package when OpenClaw needs the narrow supported operator bridge captured by `OPERATOR_API_CONTRACT_V1`:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- emit normalized
|
|
10
|
-
-
|
|
7
|
+
- bootstrap an initial attach pack from a normalized export, or truthfully self-boot from zero events, and activate it
|
|
8
|
+
- inspect attach status and canonical current-profile operator truth
|
|
9
|
+
- emit deterministic normalized event-export bundles for learner handoff
|
|
10
|
+
- refresh learner state into candidate packs through the learner boundary
|
|
11
|
+
- stage/promote/rollback activation pointers explicitly
|
|
12
|
+
- prove local activation, freshness, learned-route, and kernel-vs-brain boundaries through observability surfaces
|
|
13
|
+
|
|
14
|
+
The supported operator contract is intentionally decomposed into bootstrap/attach, status, export, refresh, promote, rollback, and proof/observability. 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.
|
|
15
|
+
|
|
16
|
+
Read `docs/operator-api-contract.md` for the family-by-family contract map and the explicitly quarantined surfaces.
|
|
17
|
+
|
|
18
|
+
For first install, the boring path is intentionally simple: pass `interactionEvents: []` / `feedbackEvents: []` when you have no live turns yet, or hand `bootstrapRuntimeAttach()` a zero-event `normalizedEventExport` payload and let it canonicalize the derived range/provenance fields from the embedded event arrays. The resulting attach stays truthful with `awaiting_first_export` until the first live export lands; truly invalid non-empty exports fail with attach-specific remediation instead of a raw provenance validator surprise.
|
|
11
19
|
|
|
12
20
|
```ts
|
|
13
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
OPERATOR_API_CONTRACT_V1,
|
|
23
|
+
bootstrapRuntimeAttach,
|
|
24
|
+
describeAttachStatus,
|
|
25
|
+
describeCurrentProfileBrainStatus,
|
|
26
|
+
rollbackRuntimeAttach
|
|
27
|
+
} from "@openclawbrain/openclaw";
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
console.log(OPERATOR_API_CONTRACT_V1.families);
|
|
30
|
+
|
|
31
|
+
const attach = bootstrapRuntimeAttach({
|
|
16
32
|
activationRoot: "/var/openclawbrain/activation",
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
packRoot: "/var/openclawbrain/packs/bootstrap",
|
|
34
|
+
packLabel: "customer-launch-attach",
|
|
35
|
+
workspace: {
|
|
36
|
+
workspaceId: "workspace-1",
|
|
37
|
+
snapshotId: "workspace-1@snapshot-1",
|
|
38
|
+
capturedAt: "2026-03-07T16:59:00.000Z",
|
|
39
|
+
rootDir: "/workspace/openclawbrain",
|
|
40
|
+
revision: "attach-rev-1"
|
|
41
|
+
},
|
|
42
|
+
interactionEvents: [],
|
|
43
|
+
feedbackEvents: []
|
|
19
44
|
});
|
|
20
45
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
console.log(attach.status.successSignals);
|
|
47
|
+
|
|
48
|
+
const attachStatus = describeAttachStatus({
|
|
49
|
+
activationRoot: "/var/openclawbrain/activation"
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log(attachStatus.inspection.active?.packId);
|
|
53
|
+
console.log(attachStatus.compile?.handoffState);
|
|
54
|
+
console.log(attachStatus.landingBoundaries.compileBoundary.activationSlot);
|
|
55
|
+
console.log(attachStatus.landingBoundaries.failOpenSemantics.eventExportWriteFailurePreservesCompile);
|
|
56
|
+
|
|
57
|
+
const currentProfile = describeCurrentProfileBrainStatus({
|
|
58
|
+
activationRoot: "/var/openclawbrain/activation",
|
|
59
|
+
brainAttachmentPolicy: "dedicated"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
console.log(currentProfile.profile.selector);
|
|
63
|
+
console.log(currentProfile.attachment.policyMode);
|
|
64
|
+
console.log(currentProfile.brainStatus.serveState);
|
|
65
|
+
|
|
66
|
+
const rollbackPreview = rollbackRuntimeAttach({
|
|
67
|
+
activationRoot: "/var/openclawbrain/activation",
|
|
68
|
+
dryRun: true
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
console.log(rollbackPreview.allowed);
|
|
72
|
+
console.log(rollbackPreview.before.activePackId);
|
|
73
|
+
console.log(rollbackPreview.after?.activePackId);
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This package stays fail-open for non-learned-required compile misses, and event-export write failures do not erase successful compile output.
|
|
78
|
+
|
|
79
|
+
## Narrow operator contract
|
|
80
|
+
|
|
81
|
+
Treat these as the supported operator families for Wave 1:
|
|
82
|
+
|
|
83
|
+
- bootstrap / attach — `bootstrapRuntimeAttach()`, `describeAttachStatus()`
|
|
84
|
+
- status / rollback — `openclawbrain-ops ...`, `describeCurrentProfileBrainStatus()`, `formatOperatorRollbackReport()`
|
|
85
|
+
- export — `buildNormalizedRuntimeEventExport()`, `writeRuntimeEventExportBundle()`, `loadRuntimeEventExportBundle()`
|
|
86
|
+
- proof / observability — `describeAttachStatus()`, `describeKernelBrainBoundary()`, `describeActivationObservability()`
|
|
87
|
+
|
|
88
|
+
The refresh and promote families stay explicit in their owning packages instead of being hidden behind a catch-all convenience wrapper:
|
|
89
|
+
|
|
90
|
+
- refresh — `@openclawbrain/learner.createAlwaysOnLearningRuntimeState()`, `advanceAlwaysOnLearningRuntime()`, `materializeAlwaysOnLearningCandidatePack()`
|
|
91
|
+
- promote — `@openclawbrain/pack-format.stageCandidatePack()`, `promoteCandidatePack()`
|
|
92
|
+
|
|
93
|
+
Wrong-shaped surfaces are intentionally quarantined from this contract even if they remain exported elsewhere for proof or integration work:
|
|
94
|
+
|
|
95
|
+
- `openclawbrain-ops doctor`
|
|
96
|
+
- `buildOperatorSurfaceReport()`
|
|
97
|
+
- `formatOperatorStatusReport()`
|
|
98
|
+
- `formatOperatorDoctorReport()`
|
|
99
|
+
- `runContinuousProductLoopTurn()`
|
|
100
|
+
- `runRecordedSessionReplay()`
|
|
101
|
+
- `runRuntimeTurn()`
|
|
102
|
+
- `createAsyncTeacherLiveLoop()`
|
|
103
|
+
|
|
104
|
+
For one repo-local end-to-end proof of the full attach -> status -> run turn -> export -> refresh -> promote -> status story, run `pnpm current-profile-lifecycle:smoke` from the workspace root. That harness prints the before/after canonical current-profile answer, the matching compact `status` summary plus `status --json` proof built from those same snapshots, and the active graph/router/objective/weights/freshness checksum changes that became true only after promotion.
|
|
105
|
+
|
|
106
|
+
## Boundary truth
|
|
107
|
+
|
|
108
|
+
`describeAttachStatus()` now returns `landingBoundaries`, a compact runtime-facing statement of the actual OpenClaw handoff:
|
|
109
|
+
|
|
110
|
+
- `compileBoundary`: OpenClaw compiles only from activation's `active` slot through `compileRuntimeContext()` / `runtime_compile.v1`
|
|
111
|
+
- `eventExportBoundary`: `runRuntimeTurn()` emits normalized interaction/feedback exports for later learning handoff, and bundle-write failure does not erase successful compile output
|
|
112
|
+
- `activePackBoundary`: `active` is the only serve-visible slot; `candidate` and `previous` stay inspectable until promotion or rollback changes pointers
|
|
113
|
+
- `promotionBoundary`: learner refresh lands in `candidate`, activation promotion flips pointers, and only later compiles can see the fresher pack
|
|
114
|
+
- `failOpenSemantics`: missing active packs fail open, but learned-required route-artifact drift hard-fails instead of silently serving static context
|
|
115
|
+
- `runtimeResponsibilities`: OpenClaw remains responsible for runtime orchestration, prompt assembly, response delivery, and guarded serve-path decisions
|
|
116
|
+
|
|
117
|
+
Operator-facing CLI:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm exec openclawbrain-ops status --activation-root /var/openclawbrain/activation --event-export /var/openclawbrain/exports/latest --teacher-snapshot /var/openclawbrain/runtime/teacher-snapshot.json
|
|
121
|
+
pnpm exec openclawbrain-ops rollback --activation-root /var/openclawbrain/activation --dry-run
|
|
41
122
|
```
|
|
42
123
|
|
|
43
|
-
|
|
124
|
+
- `status --json` emits the canonical `current_profile_brain_status.v1` answer; plain `status` prints a compact summary derived from that same object
|
|
125
|
+
- `describeCurrentProfileBrainStatus()` freezes the current-profile `Host / Profile / Brain / Attachment` answer shape instead of widening to a second report payload
|
|
126
|
+
- `rollback --dry-run` previews the exact `active <- previous` and `active -> candidate` move before you apply rollback for real
|
|
127
|
+
- `--event-export` accepts either a runtime event-export bundle root or a normalized-export JSON payload
|
|
128
|
+
- `--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
|
|
129
|
+
|
|
130
|
+
Programmatic rollback is available too:
|
|
131
|
+
|
|
132
|
+
- `rollbackRuntimeAttach({ activationRoot, dryRun: true })` previews the move without changing activation pointers
|
|
133
|
+
- `rollbackRuntimeAttach({ activationRoot })` applies the rollback and reports which pack was restored to `active`
|
|
134
|
+
|
|
135
|
+
Wave 1 also freezes shared-vs-dedicated brain policy semantics:
|
|
136
|
+
|
|
137
|
+
- `brainAttachmentPolicy: "dedicated"` means one current profile is intentionally attached to one Brain activation root until operators reattach it elsewhere
|
|
138
|
+
- `brainAttachmentPolicy: "shared"` means multiple profiles may intentionally attach to the same Brain activation root, so attribution must stay current-profile explicit and operators must not read served context as profile-exclusive
|
|
139
|
+
- `brainAttachmentPolicy: "undeclared"` is the truthful fallback when the host has not declared which policy it is using
|
|
140
|
+
|
|
141
|
+
Per-turn normalized interaction and feedback events can carry the same current-profile attribution fields so later learner/export analysis can see `brainStatus`, `brainAttachmentPolicy`, pack/router identity, and selection evidence turn by turn.
|
|
142
|
+
|
|
143
|
+
The learned-required serve path is stricter:
|
|
144
|
+
|
|
145
|
+
- `compileRuntimeContext()` now forwards the active-slot diagnostics from `@openclawbrain/compiler.compileRuntimeFromActivation()`
|
|
146
|
+
- learned-required active packs return `hardRequirementViolated=true` and `fallbackToStaticContext=false` when route artifacts drift or disappear
|
|
147
|
+
- `runRuntimeTurn()` throws instead of silently serving through those learned-required failures
|
|
148
|
+
- event-export write failures still do not erase successful compile output
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { type CurrentProfileBrainStatusInput } from "./index.js";
|
|
3
|
+
interface ParsedOperatorCliArgs {
|
|
4
|
+
command: "status" | "rollback";
|
|
5
|
+
input: CurrentProfileBrainStatusInput;
|
|
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,188 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { describeCurrentProfileBrainStatus, formatOperatorRollbackReport, rollbackRuntimeAttach } from "./index.js";
|
|
5
|
+
function operatorCliHelp() {
|
|
6
|
+
return [
|
|
7
|
+
"Usage:",
|
|
8
|
+
" openclawbrain-ops <status|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
|
+
" --brain-attachment-policy <undeclared|dedicated|shared> Override attachment policy semantics for status inspection.",
|
|
16
|
+
" --dry-run Preview rollback pointer movement without writing activation state.",
|
|
17
|
+
" --json Emit machine-readable JSON instead of text.",
|
|
18
|
+
" --help Show this help.",
|
|
19
|
+
"",
|
|
20
|
+
"Common flow:",
|
|
21
|
+
" 0. bootstrap call bootstrapRuntimeAttach() to activate an initial pack on first install",
|
|
22
|
+
" 1. status --json read the canonical current_profile_brain_status.v1 object",
|
|
23
|
+
" 2. rollback --dry-run preview active <- previous, active -> candidate",
|
|
24
|
+
" 3. rollback apply the rollback when the preview says ready",
|
|
25
|
+
"",
|
|
26
|
+
"Exit codes:",
|
|
27
|
+
" status: 0 on successful inspection, 1 on input/read failure.",
|
|
28
|
+
" rollback: 0 when ready/applied, 1 when blocked or on input/read failure."
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
function yesNo(value) {
|
|
32
|
+
if (value === null) {
|
|
33
|
+
return "unknown";
|
|
34
|
+
}
|
|
35
|
+
return value ? "yes" : "no";
|
|
36
|
+
}
|
|
37
|
+
function formatCurrentProfileStatusSummary(status) {
|
|
38
|
+
return [
|
|
39
|
+
`STATUS ${status.brainStatus.status}`,
|
|
40
|
+
`summary ${status.brain.summary}`,
|
|
41
|
+
`host runtime=${status.host.runtimeOwner} activation=${status.host.activationRoot}`,
|
|
42
|
+
`profile selector=${status.profile.selector} attachment=${status.attachment.state} policy=${status.attachment.policyMode}`,
|
|
43
|
+
`brain pack=${status.brain.activePackId ?? "none"} state=${status.brain.state} init=${status.brain.initMode ?? "unknown"} routeFreshness=${status.brain.routeFreshness} router=${status.brain.routerIdentity ?? "none"}`,
|
|
44
|
+
`serve state=${status.brainStatus.serveState} usedRouteFn=${yesNo(status.brainStatus.usedLearnedRouteFn)} awaitingFirstExport=${yesNo(status.brainStatus.awaitingFirstExport)} detail=${status.brainStatus.detail}`,
|
|
45
|
+
`turn attribution=${status.currentTurnAttribution === null ? "none" : status.currentTurnAttribution.contract}`
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
function requireActivationRoot(input, command) {
|
|
49
|
+
if (input.activationRoot.trim().length === 0) {
|
|
50
|
+
throw new Error(`--activation-root is required for ${command}`);
|
|
51
|
+
}
|
|
52
|
+
return path.resolve(input.activationRoot);
|
|
53
|
+
}
|
|
54
|
+
export function parseOperatorCliArgs(argv) {
|
|
55
|
+
let command = "status";
|
|
56
|
+
let activationRoot = null;
|
|
57
|
+
let eventExportPath = null;
|
|
58
|
+
let teacherSnapshotPath = null;
|
|
59
|
+
let updatedAt = null;
|
|
60
|
+
let brainAttachmentPolicy = null;
|
|
61
|
+
let json = false;
|
|
62
|
+
let help = false;
|
|
63
|
+
let dryRun = false;
|
|
64
|
+
const args = [...argv];
|
|
65
|
+
if (args[0] === "doctor") {
|
|
66
|
+
throw new Error("`doctor` was deleted. Use `status --json` for the canonical current-profile status object and proof helpers for deeper activation diagnostics.");
|
|
67
|
+
}
|
|
68
|
+
if (args[0] === "status" || args[0] === "rollback") {
|
|
69
|
+
command = args.shift();
|
|
70
|
+
}
|
|
71
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
72
|
+
const arg = args[index];
|
|
73
|
+
if (arg === "--help" || arg === "-h") {
|
|
74
|
+
help = true;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (arg === "--json") {
|
|
78
|
+
json = true;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (arg === "--dry-run") {
|
|
82
|
+
dryRun = true;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const next = args[index + 1];
|
|
86
|
+
if (arg === "--activation-root") {
|
|
87
|
+
if (next === undefined) {
|
|
88
|
+
throw new Error("--activation-root requires a value");
|
|
89
|
+
}
|
|
90
|
+
activationRoot = next;
|
|
91
|
+
index += 1;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (arg === "--event-export") {
|
|
95
|
+
if (next === undefined) {
|
|
96
|
+
throw new Error("--event-export requires a value");
|
|
97
|
+
}
|
|
98
|
+
eventExportPath = next;
|
|
99
|
+
index += 1;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (arg === "--teacher-snapshot") {
|
|
103
|
+
if (next === undefined) {
|
|
104
|
+
throw new Error("--teacher-snapshot requires a value");
|
|
105
|
+
}
|
|
106
|
+
teacherSnapshotPath = next;
|
|
107
|
+
index += 1;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (arg === "--updated-at") {
|
|
111
|
+
if (next === undefined) {
|
|
112
|
+
throw new Error("--updated-at requires a value");
|
|
113
|
+
}
|
|
114
|
+
updatedAt = next;
|
|
115
|
+
index += 1;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (arg === "--brain-attachment-policy") {
|
|
119
|
+
if (next === undefined) {
|
|
120
|
+
throw new Error("--brain-attachment-policy requires a value");
|
|
121
|
+
}
|
|
122
|
+
if (next !== "undeclared" && next !== "dedicated" && next !== "shared") {
|
|
123
|
+
throw new Error(`invalid --brain-attachment-policy value: ${next}`);
|
|
124
|
+
}
|
|
125
|
+
brainAttachmentPolicy = next;
|
|
126
|
+
index += 1;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
throw new Error(`unknown argument: ${arg}`);
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
command,
|
|
133
|
+
input: {
|
|
134
|
+
activationRoot: activationRoot ?? "",
|
|
135
|
+
eventExportPath,
|
|
136
|
+
teacherSnapshotPath,
|
|
137
|
+
updatedAt,
|
|
138
|
+
brainAttachmentPolicy
|
|
139
|
+
},
|
|
140
|
+
json,
|
|
141
|
+
help,
|
|
142
|
+
dryRun
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export function runOperatorCli(argv = process.argv.slice(2)) {
|
|
146
|
+
const parsed = parseOperatorCliArgs(argv);
|
|
147
|
+
if (parsed.help) {
|
|
148
|
+
console.log(operatorCliHelp());
|
|
149
|
+
return 0;
|
|
150
|
+
}
|
|
151
|
+
const activationRoot = requireActivationRoot(parsed.input, parsed.command);
|
|
152
|
+
if (parsed.command === "rollback") {
|
|
153
|
+
const result = rollbackRuntimeAttach({
|
|
154
|
+
activationRoot,
|
|
155
|
+
...(parsed.input.updatedAt === null ? {} : { updatedAt: parsed.input.updatedAt }),
|
|
156
|
+
dryRun: parsed.dryRun
|
|
157
|
+
});
|
|
158
|
+
if (parsed.json) {
|
|
159
|
+
console.log(JSON.stringify(result, null, 2));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
console.log(formatOperatorRollbackReport(result));
|
|
163
|
+
}
|
|
164
|
+
return result.allowed ? 0 : 1;
|
|
165
|
+
}
|
|
166
|
+
const status = describeCurrentProfileBrainStatus({
|
|
167
|
+
...parsed.input,
|
|
168
|
+
activationRoot
|
|
169
|
+
});
|
|
170
|
+
if (parsed.json) {
|
|
171
|
+
console.log(JSON.stringify(status, null, 2));
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
console.log(formatCurrentProfileStatusSummary(status));
|
|
175
|
+
}
|
|
176
|
+
return 0;
|
|
177
|
+
}
|
|
178
|
+
if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
179
|
+
try {
|
|
180
|
+
process.exitCode = runOperatorCli();
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
console.error("[openclawbrain-ops] failed");
|
|
184
|
+
console.error(error instanceof Error ? error.stack ?? error.message : String(error));
|
|
185
|
+
process.exitCode = 1;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
//# 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,iCAAiC,EACjC,4BAA4B,EAC5B,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAUpB,SAAS,eAAe;IACtB,OAAO;QACL,QAAQ;QACR,0EAA0E;QAC1E,EAAE;QACF,UAAU;QACV,2DAA2D;QAC3D,2FAA2F;QAC3F,gGAAgG;QAChG,6EAA6E;QAC7E,wHAAwH;QACxH,mGAAmG;QACnG,2EAA2E;QAC3E,+CAA+C;QAC/C,EAAE;QACF,cAAc;QACd,4FAA4F;QAC5F,gFAAgF;QAChF,2EAA2E;QAC3E,0EAA0E;QAC1E,EAAE;QACF,aAAa;QACb,gEAAgE;QAChE,4EAA4E;KAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,KAAK,CAAC,KAAqB;IAClC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9B,CAAC;AAED,SAAS,iCAAiC,CAAC,MAA4D;IACrG,OAAO;QACL,UAAU,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE;QACrC,eAAe,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;QACrC,uBAAuB,MAAM,CAAC,IAAI,CAAC,YAAY,eAAe,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE;QAC1F,wBAAwB,MAAM,CAAC,OAAO,CAAC,QAAQ,eAAe,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