@openclawbrain/cli 0.4.5 → 0.4.7

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 CHANGED
@@ -1,14 +1,14 @@
1
1
  # @openclawbrain/cli
2
2
 
3
- `@openclawbrain/cli@0.4.5` is the published operator CLI package for OpenClawBrain.
3
+ `@openclawbrain/cli@0.4.7` is the published operator CLI package for OpenClawBrain.
4
4
 
5
5
  Primary public flow:
6
6
 
7
7
  ```bash
8
8
  openclaw plugins install @openclawbrain/openclaw@0.4.0
9
- npx @openclawbrain/cli@0.4.5 install --openclaw-home ~/.openclaw
9
+ npx @openclawbrain/cli@0.4.7 install --openclaw-home ~/.openclaw
10
10
  openclaw gateway restart
11
- npx @openclawbrain/cli@0.4.5 status --openclaw-home ~/.openclaw --detailed
11
+ npx @openclawbrain/cli@0.4.7 status --openclaw-home ~/.openclaw --detailed
12
12
  ```
13
13
 
14
14
  Patch note for `0.4.4`: the CLI now normalizes `plugins.allow` / `plugins.entries.openclawbrain` correctly on reinstall and reports the canonical `openclawbrain` install identity in status output.
@@ -20,10 +20,10 @@ This package carries the `openclawbrain` CLI, daemon controls, import/export hel
20
20
  ## Commands
21
21
 
22
22
  ```bash
23
- npx @openclawbrain/cli@0.4.5 install --openclaw-home ~/.openclaw
24
- npx @openclawbrain/cli@0.4.5 status --openclaw-home ~/.openclaw --detailed
25
- npx @openclawbrain/cli@0.4.5 rollback --activation-root /var/openclawbrain/activation --dry-run
26
- npx @openclawbrain/cli@0.4.5 daemon status --activation-root /var/openclawbrain/activation
23
+ npx @openclawbrain/cli@0.4.7 install --openclaw-home ~/.openclaw
24
+ npx @openclawbrain/cli@0.4.7 status --openclaw-home ~/.openclaw --detailed
25
+ npx @openclawbrain/cli@0.4.7 rollback --activation-root /var/openclawbrain/activation --dry-run
26
+ npx @openclawbrain/cli@0.4.7 daemon status --activation-root /var/openclawbrain/activation
27
27
  ```
28
28
 
29
29
  If the CLI is already on your `PATH`, `openclawbrain ...` is the same command surface. The docs lead with `npx` because that is the clean-host public-registry lane that already passed on `redogfood`.
@@ -3538,6 +3538,9 @@ function buildGraphBlockIdResolver(graph) {
3538
3538
  }
3539
3539
  function remapServeTimeDecisionToGraph(decision, resolveBlockId) {
3540
3540
  const remapIds = (blockIds) => {
3541
+ if (!Array.isArray(blockIds)) {
3542
+ return [];
3543
+ }
3541
3544
  const remapped = [];
3542
3545
  const seen = new Set();
3543
3546
  for (const blockId of blockIds) {
@@ -3992,7 +3995,7 @@ function createRouterArtifact(packId, builtAt, graph, vectors, eventExport, spar
3992
3995
  trainedAt: builtAt,
3993
3996
  requiresLearnedRouting: true,
3994
3997
  training: {
3995
- method: "policy_gradient_v1",
3998
+ method: "policy_gradient_v2",
3996
3999
  status,
3997
4000
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
3998
4001
  routeTraceCount: traces.length,
@@ -4001,13 +4004,13 @@ function createRouterArtifact(packId, builtAt, graph, vectors, eventExport, spar
4001
4004
  collectedLabels,
4002
4005
  objective: {
4003
4006
  updateMechanism: "policy_gradient",
4004
- updateVersion: "route_pg_update_v1",
4005
- objective: "supervised_route_pg_v1",
4007
+ updateVersion: "route_pg_update_v2",
4008
+ objective: "supervised_route_pg_v2",
4006
4009
  profile: ROUTER_PG_PROFILE_V1,
4007
4010
  objectiveChecksum: computeRouterObjectiveChecksum({
4008
4011
  updateMechanism: "policy_gradient",
4009
- updateVersion: "route_pg_update_v1",
4010
- objective: "supervised_route_pg_v1",
4012
+ updateVersion: "route_pg_update_v2",
4013
+ objective: "supervised_route_pg_v2",
4011
4014
  profile: ROUTER_PG_PROFILE_V1,
4012
4015
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
4013
4016
  routeTraceCount: traces.length,
@@ -4019,7 +4022,7 @@ function createRouterArtifact(packId, builtAt, graph, vectors, eventExport, spar
4019
4022
  queryChecksum,
4020
4023
  weightsChecksum: computeRouterWeightsChecksum(policyUpdates),
4021
4024
  freshnessChecksum: computeRouterFreshnessChecksum({
4022
- method: "policy_gradient_v1",
4025
+ method: "policy_gradient_v2",
4023
4026
  trainedAt: builtAt,
4024
4027
  status,
4025
4028
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
@@ -4493,11 +4496,11 @@ function createRouterArtifactV2(packId, builtAt, graph, vectors, eventExport, se
4493
4496
  };
4494
4497
  }
4495
4498
  }
4496
- // V2 learns from reconstructed trajectories rather than RouterTraceV1 records, so
4497
- // the router artifact keeps an empty trace list and reports trace-derived counts as 0.
4499
+ // V2 learns from reconstructed serve-time trajectories rather than RouterTraceV1 records.
4500
+ // Keep trace payloads empty, but surface truthful trajectory-derived counts.
4498
4501
  const traces = [];
4499
- const routeTraceCount = traces.length;
4500
- const supervisionCount = traces.filter((trace) => trace.reward !== 0).length;
4502
+ const routeTraceCount = trajectories.length;
4503
+ const supervisionCount = supervisedTrajectoryCount;
4501
4504
  const queryChecksum = computeRouterQueryChecksum(traces);
4502
4505
  const collectedLabels = computeRouterCollectedLabelCounts(traces);
4503
4506
  const status = policyUpdates.length > 0 ? "updated" : "no_supervision";
@@ -4514,7 +4517,7 @@ function createRouterArtifactV2(packId, builtAt, graph, vectors, eventExport, se
4514
4517
  trainedAt: builtAt,
4515
4518
  requiresLearnedRouting: true,
4516
4519
  training: {
4517
- method: "policy_gradient_v1",
4520
+ method: "policy_gradient_v2",
4518
4521
  status,
4519
4522
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
4520
4523
  routeTraceCount,
@@ -4523,13 +4526,13 @@ function createRouterArtifactV2(packId, builtAt, graph, vectors, eventExport, se
4523
4526
  collectedLabels,
4524
4527
  objective: {
4525
4528
  updateMechanism: "policy_gradient",
4526
- updateVersion: "route_pg_update_v1",
4527
- objective: "supervised_route_pg_v1",
4529
+ updateVersion: "route_pg_update_v2",
4530
+ objective: "supervised_route_pg_v2",
4528
4531
  profile: ROUTER_PG_PROFILE_V2,
4529
4532
  objectiveChecksum: computeRouterObjectiveChecksum({
4530
4533
  updateMechanism: "policy_gradient",
4531
- updateVersion: "route_pg_update_v1",
4532
- objective: "supervised_route_pg_v1",
4534
+ updateVersion: "route_pg_update_v2",
4535
+ objective: "supervised_route_pg_v2",
4533
4536
  profile: ROUTER_PG_PROFILE_V2,
4534
4537
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
4535
4538
  routeTraceCount,
@@ -4541,7 +4544,7 @@ function createRouterArtifactV2(packId, builtAt, graph, vectors, eventExport, se
4541
4544
  queryChecksum,
4542
4545
  weightsChecksum: computeRouterWeightsChecksum(policyUpdates),
4543
4546
  freshnessChecksum: computeRouterFreshnessChecksum({
4544
- method: "policy_gradient_v1",
4547
+ method: "policy_gradient_v2",
4545
4548
  trainedAt: builtAt,
4546
4549
  status,
4547
4550
  eventExportDigest: eventExport?.provenance.exportDigest ?? null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclawbrain/cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "OpenClawBrain operator CLI package with install/status helpers, daemon controls, and import/export tooling.",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",