open-index/open-npm huggingface dataset:
npm package: @openclawbrain/activation
Description: Activation inspection, staging, promotion, and freshness helpers for promoted OpenClawBrain packs.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/activation`

Activation inspection, staging, promotion, rollback, and freshness helpers for promoted OpenClawBrain packs.

## Install

```bash
pnpm add @openclawbrain/activation
```

## Includes

- activation pointer loading and inspection
- compile-target inspection over active, candidate, and previous slots
- candidate staging, promotion, and rollback helpers with manifest-pinned safety checks
- freshness inspection over pack id, snapshot, event range, route policy, and router identity
- activation-readiness checks surfaced as a package-first API

## Example

```ts
import { describeActivationTarget, inspectActivationState } from "@openclawbrain/activation";

const inspection = inspectActivationState("/runtime/activation", new Date().toISOString());

if (!inspection.active?.activationReady) {
  throw new Error(`active slot unhealthy: ${(inspection.active?.findings ?? []).join("; ")}`);
}

console.log({
  promotionAllowed: inspection.promotion.allowed,
  rollbackAllowed: inspection.rollback.allowed,
  activeTarget: describeActivationTarget("/runtime/activation", "active", {
    requireActivationReady: true
  })
});
```
npm package: @openclawbrain/cli
Description: OpenClawBrain operator CLI package with install/status helpers, daemon controls, and import/export tooling.
Author: Jonathan Gu
Latest version: 0.4.40

# @openclawbrain/cli

Operator CLI internals for OpenClawBrain.

The public front door is one command pinned to one OpenClaw home:

```bash
openclawbrain install --openclaw-home ~/.openclaw
openclaw gateway restart
openclawbrain status --openclaw-home ~/.openclaw --detailed
```

`install` is the public front door for the selected home. It writes or repairs the hook for that home and pins the activation root the runtime serves from. `status --detailed` is the quick verify surface.

When you need durable operator evidence today, run:

```bash
openclawbrain proof --openclaw-home ~/.openclaw
```

The intended canonical lane is the same install command with optional `--proof`. Until that lands cleanly across the operator surfaces, proof stays a separate follow-up command. `proof` writes `summary.md`, `steps.json`, `verdict.json`, raw step logs, and proof pointers under one bundle directory.

This package is part of the internal split architecture. Public docs should lead with OpenClawBrain and the `openclawbrain install` lane, not with package-pair trivia.

## Common commands

```bash
openclawbrain rollback --openclaw-home ~/.openclaw --dry-run
openclawbrain detach --openclaw-home ~/.openclaw
openclawbrain uninstall --openclaw-home ~/.openclaw --keep-data
openclawbrain learn --openclaw-home ~/.openclaw --json
openclawbrain daemon status --activation-root ~/.openclawbrain/activation
```

## Docs

- [Repo README](../../README.md)
- [Quick start](../../docs/getting-started/quick-start.md)
- [Lifecycle](../../docs/lifecycle.md)
- [Troubleshooting](../../docs/operating/troubleshooting.md)
npm package: @openclawbrain/compiler
Description: Deterministic promoted-pack compilation with learned route_fn enforcement and native structural compaction.
Author: Jonathan Gu
Latest version: 0.3.5

# `@openclawbrain/compiler`

Deterministic promoted-pack compilation with learned `route_fn` enforcement and native structural compaction.

Install this after `@openclawbrain/pack-format` when you need the narrow compile boundary over promoted packs.

## Install

```bash
pnpm add @openclawbrain/compiler
```

## Includes

- pack loading for compile-time use
- activation-aware compilation from active or promoted pack slots
- compile-target expectation checks over pack id, workspace snapshot, event range, event-export digest, route policy, and router identity via `expectedTarget`
- deterministic context ranking over graph blocks and vector keywords
- learned-routing enforcement when a pack manifest requires it
- larger-context budget enforcement via max-block and max-character limits
- native structural compaction when selection pressure exceeds the compile budget
- operator-facing compile notes for activation slot, served target provenance, learned-route evidence, and explicit fallback

## Example

```ts
import { compileRuntimeFromActivation } from "@openclawbrain/compiler";
import { CONTRACT_IDS } from "@openclawbrain/contracts";

const { target, response } = compileRuntimeFromActivation(
  "/runtime/activation",
  {
    contract: CONTRACT_IDS.runtimeCompile,
    agentId: "agent-1",
    userMessage: "compile manifest routing",
    maxContextBlocks: 3,
    maxContextChars: 1800,
    modeRequested: "learned",
    compactionMode: "native"
  },
  {
    expectedTarget: {
      workspaceSnapshot: "workspace-1@snapshot-42",
      eventExportDigest: "sha256-abc123",
      routePolicy: "requires_learned_routing",
      routerIdentity: "pack-1:route_fn"
    }
  }
);

console.log(target.packId, response.packId);
console.log(response.diagnostics.usedLearnedRouteFn);
console.log(response.diagnostics.routerIdentity);
console.log(response.diagnostics.notes);
```

`response.diagnostics` explicitly tells operators which target was served, whether learned routing actually ran, and whether compilation had to fall back.
npm package: @openclawbrain/contracts
Description: Learning-first OpenClawBrain contracts, route_fn-aware validators, and checksum helpers.
Author: Jonathan Gu
Latest version: 0.3.5

# `@openclawbrain/contracts`

Canonical OpenClawBrain contracts for learning-first packs, compile payloads, and artifact validation.

This package is the starting point if you need the public payload shapes without pulling in pack loading or compilation logic.

If you want narrower public surfaces, the workspace also publishes `@openclawbrain/events`, `@openclawbrain/event-export`, `@openclawbrain/workspace-metadata`, and `@openclawbrain/provenance`.

## Install

```bash
pnpm add @openclawbrain/contracts
```

## Includes

- contract ids for runtime compile, interaction events, feedback events, manifests, activation pointers, and Wave 1 operator noun/status payloads
- runtime compile request/response types for explicit budgets, native structural compaction, and learned-route evidence
- brain-attachment policy, per-turn attribution with explicit profile-id reporting, and current-profile brain-status shapes for operator/API coordination
- init-graph schema ids, typed markdown file-role classification, and ontology-backed graph metadata
- route policy, router identity, workspace metadata, and pack provenance shapes
- optional init-seed block metadata for deterministic role/authority/recency-based route priors
- payload validators for the current `v1` public shapes
- canonical JSON and checksum helpers for immutable artifact payloads

## Example

```ts
import {
  buildNormalizedEventExport,
  CONTRACT_IDS,
  checksumJsonPayload,
  createFeedbackEvent,
  createInteractionEvent,
  validateRuntimeCompileRequest
} from "@openclawbrain/contracts";

const request = {
  contract: CONTRACT_IDS.runtimeCompile,
  agentId: "agent-1",
  userMessage: "compile feedback context",
  maxContextBlocks: 3,
  maxContextChars: 1600,
  modeRequested: "heuristic",
  compactionMode: "native"
} as const;

const errors = validateRuntimeCompileRequest(request);
const checksum = checksumJsonPayload(request);

const eventExport = buildNormalizedEventExport({
  interactionEvents: [
    createInteractionEvent({
      eventId: "evt-1",
      agentId: "agent-1",
      sessionId: "session-1",
      channel: "cli",
      sequence: 10,
      kind: "memory_compiled",
      createdAt: "2026-03-06T00:10:00.000Z",
      source: { runtimeOwner: "openclaw", stream: "openclaw/runtime/demo" }
    })
  ],
  feedbackEvents: [
    createFeedbackEvent({
      eventId: "evt-2",
      agentId: "agent-1",
      sessionId: "session-1",
      channel: "cli",
      sequence: 11,
      kind: "teaching",
      createdAt: "2026-03-06T00:11:00.000Z",
      source: { runtimeOwner: "openclaw", stream: "openclaw/runtime/demo" },
      content: "Promote the pack only after validation."
    })
  ]
});
```
npm package: @openclawbrain/event-export
Description: Deterministic event-export builders for live-first OpenClawBrain learning and promoted-pack inputs.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/event-export`

Deterministic normalized event-export builders for live-first OpenClawBrain learning.

## Install

```bash
pnpm add @openclawbrain/event-export
```

## Includes

- explicit and derived normalized event ranges
- learning-surface derivation for fast-boot defaults, passive background scans, and human/self label harvest
- normalized event-export provenance helpers, validation, and fixtures
- live-first event-export bridge slices with dedup-safe identities, duplicate-identity accounting, and backfill cursors/watermarks
- deterministic export bundles projected from bridge slices for continuous learner ingestion
- deterministic feedback extraction from raw or normalized interaction records with principal-first priority metadata
npm package: @openclawbrain/events
Description: Normalized interaction and feedback event builders for live-first OpenClawBrain learning.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/events`

Normalized interaction and feedback event helpers for live-first OpenClawBrain learning.

## Install

```bash
pnpm add @openclawbrain/events
```

## Includes

- interaction and feedback event builders
- event sorting helpers
- event-level validation and canonical fixtures
- `scanSession(rawSession)` for scanner-core normalization of user turns, assistant turns, tool calls, and tool results with raw hashes and provenance
npm package: @openclawbrain/openclaw
Description: OpenClawBrain plugin/runtime payload for OpenClaw. Operator CLI and install helpers move to @openclawbrain/cli.
Author: Jonathan Gu
Latest version: 0.4.40

# @openclawbrain/openclaw

Plugin and runtime payload internals for OpenClawBrain.

Most operators should start with the `openclawbrain` front door, not with manual package management:

```bash
openclawbrain install --openclaw-home ~/.openclaw
openclaw gateway restart
openclawbrain status --openclaw-home ~/.openclaw --detailed
```

`install` is the public front door for the selected home. It writes or repairs the hook for that home and pins the activation root the runtime serves from. `status --detailed` is the quick verify surface.

When you need durable operator evidence today, run:

```bash
openclawbrain proof --openclaw-home ~/.openclaw
```

This package is still the runtime payload under the hood. If you are explicitly managing the native package layer yourself, use OpenClaw's plugin manager for `@openclawbrain/openclaw`, then rerun `openclawbrain install --openclaw-home ~/.openclaw`.

Public docs should lead with the OpenClawBrain product lane and the `openclawbrain install` command, not with direct runtime-package management.

## What this package contains

- the OpenClaw plugin manifest
- the installed extension runtime guard
- `compileRuntimeContext()` and related runtime load helpers

If this package is installed before the CLI pins the activation root, the extension fails open and logs `BRAIN NOT YET LOADED` instead of blocking the agent.

## Docs

- [Repo README](../../README.md)
- [Quick start](../../docs/getting-started/quick-start.md)
- [Lifecycle](../../docs/lifecycle.md)
- [Troubleshooting](../../docs/operating/troubleshooting.md)
npm package: @openclawbrain/pack-format
Description: Immutable OpenClawBrain pack layout, route_fn artifacts, and activation-ready disk helpers.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/pack-format`

Immutable pack layout helpers for OpenClawBrain.

Install this after `@openclawbrain/contracts` if you need to read, verify, write, stage, promote, or roll back pack artifacts on disk.

If you only need the activation-facing API, use `@openclawbrain/activation` as the narrower package surface.

## Install

```bash
pnpm add @openclawbrain/pack-format
```

## Includes

- canonical pack file layout constants
- checksum-validated pack loading and JSON payload writing
- deterministic graph/vector/router reads for pack-backed compilation
- activation-pointer helpers for active, candidate, and previous slots pinned to manifest digests
- manifest-gated promotion, rollback, and activation inspection helpers

## Example

```ts
import { loadPack, PACK_LAYOUT } from "@openclawbrain/pack-format";

const pack = loadPack("/packs/pack-123");

console.log(pack.manifest.packId);
console.log(PACK_LAYOUT.manifest);
```
npm package: @openclawbrain/provenance
Description: Pack provenance builders for OpenClawBrain workspace, event-export, and learning inputs.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/provenance`

Pack provenance builders for always-on OpenClawBrain workspace and event-export inputs.

## Install

```bash
pnpm add @openclawbrain/provenance
```

## Includes

- artifact provenance builders over workspace metadata, event-export provenance, and learning surfaces
- default fast-boot/passive-background learning continuity when exports are absent
- focused provenance surface for learner and activation flows
npm package: @openclawbrain/workspace-metadata
Description: Workspace snapshot metadata normalization for promoted OpenClawBrain packs.
Author: Jonathan Gu
Latest version: 0.3.4

# `@openclawbrain/workspace-metadata`

Workspace snapshot metadata normalization for promoted OpenClawBrain packs.

## Install

```bash
pnpm add @openclawbrain/workspace-metadata
```

## Includes

- workspace snapshot normalization from declared metadata inputs
- deterministic workspace manifest digest generation
- workspace metadata validation and fixtures