# Moltlazy

## 0.9.0

### Minor Changes

- feat: add the private CDP browser profile and enable the browser tool ([911397d](https://github.com/0xCAB0/fouria/commit/911397dd541267a2ac83eb330906f4a35e5dae5b))

### Patch Changes

- Migrate to OpenClaw 2026.10.9 and harden the sandbox memory limits.

  `agents.defaults.compaction` now bounds the persisted transcript at **8 MB**
  (down from 20 MB) with a 12k-token retained tail and `midTurnPrecheck` enabled,
  so a tool loop cannot inflate the in-memory prompt between model calls.

  `session.maintenance` now emits a sandbox-safe per-agent budget instead of
  OpenClaw's developer-machine defaults: `maxDiskBytes` 512 MB (from 10 GB),
  `highWaterBytes` 384 MB, `maxEntries` 500 (from 5000), `pruneAfter` 14 days
  (from 30), `resetArchiveRetention` 14 days, and cold transcript storage after
  7 inactive days. Both blocks are fill-only, so a user override wins.

  Motivation: a 4 GiB `standard-1` tenant (`tenant-tarjetero-dev`) drifted to the
  container memory limit with ~1.2 GiB of worker-thread V8 heap pages inflated by
  oversized transcripts and SQLite session history. OpenClaw exposes no knob for
  the worker pool or its RSS threshold, so the config limits bound growth while
  the hard restart remains the only RSS reset (see
  `docs/plans/sandbox-memory-usage.md`). ([2902de0](https://github.com/0xCAB0/fouria/commit/2902de063931c50df06049d9166c8ab90b8d7954))

- docs(personas): point the dev-only Fouria Builder/Q&A agents at the
  channel-versioned docs site. Both personas now read `FOURIA_DOCS_BASE_URL` /
  `FOURIA_DOCS_FALLBACK_URL` (and confirm `/versions.json`) instead of a hardcoded
  `fouria.io`, so staging/dev agents quote release notes that match the code they
  run. ([a3f85d0](https://github.com/0xCAB0/fouria/commit/a3f85d03ec0a4460066cc01ea2363aa90806d1b3))
- feat: seed a software-manifest workspace skill that uses the software.r2.internal bridge instead of the Access-protected admin API ([0731213](https://github.com/0xCAB0/fouria/commit/07312136557a0a929a817de9ee67d98a78524285))

## 0.8.1

### Patch Changes

- fix(software): reset the progress log before each provisioning run ([5476899](https://github.com/0xCAB0/fouria/commit/5476899a04baa2f41ed732fccf40cebeec373149))

## 0.8.0

### Minor Changes

- feat: seed the fouria-product-build build-method skill for the Fouria Builder (per-agent workspace skill) ([95a1107](https://github.com/0xCAB0/fouria/commit/95a1107978a5b82460d61c5344177d6fc145ba03))

## 0.7.0 — 2026-10-04

> Changesets is adopted from this release onward. Earlier entries were
> maintained manually; this section collects the changes that shipped in the
> 0.4.0–0.7.0 line.

### New features

#### SDK Module

- **`config.patch()` re-added.** The upstream `config.patch` RPC now exists, so
  `client.config.patch({ raw, baseHash?, replacePaths?, sessionKey?, deliveryContext?, note?, restartDelayMs? })`
  is the supported partial-update path (JSON merge patch). It waits for the
  active Gateway to apply the write and returns the effective `changedPaths`.
- **`config.schema()` / `config.schemaLookup(path)`.** New methods for the live
  config schema and path-scoped schema drill-down (`schema`, `reloadKind`,
  presentation hints, child summaries).
- **`config.get()` is now typed as `ConfigSnapshot`.** Exposes `config`, the
  opaque `hash` (pass as `baseHash`), and optional `configRevisionHash` /
  `appliedConfigHash`.
- **New `update` domain module.** `client.update.run(params?)` (`update.run`,
  with `continuationMessage`) and `client.update.status()` (`update.status`).
- **CLI SDK parity:** `client.config.schema()` runs `openclaw config schema`.

### Deprecations

- **`config.set()` is deprecated.** It acknowledges persistence only; use
  `config.patch()` for partial updates or `config.apply()` for a full replace.

## v0.3.0 — 2026-05-23

### Breaking changes

#### Config Module

- **TOML replaced by JSON feature flags.** `MOLTLAZY_TOML_CONTENT` and `MOLTLAZY_TOML_PATH` env vars are removed. Feature flags are now passed as `MOLTLAZY_FEATURE_FLAGS` (a JSON string).
- **`init-toml` CLI command removed.** No replacement — feature flags are set by the Worker directly.
- **Force flags removed.** `--force-gateway`, `--force-channels`, `--force-agents` CLI flags are gone. The `$include` mechanism is always authoritative.
- **`moltlazy-meta.json` removed.** Patch tracking metadata no longer exists. `$include` is idempotent.
- **`shouldPatchConfig()` / `computeConfigHash()` / `MOLTLAZY_TOML_ETAG` removed.**
- **Deprecated flag aliases removed.** `enableUnifiedBilling` → `unifiedBilling`, `enableMicrosoftGraph` → `microsoftGraph`.

#### SDK Module

- **Feature packs removed.** `buildGatewayCalls()`, `buildSessionCalls()`, `buildToolsCalls()`, `buildLoggingCalls()`, `buildAgentsCalls()`, `buildChannelsCalls()`, `buildKnowledgeGraphCalls()`, `buildMicrosoftGraphCalls()`, `buildCfUnifiedBillingCalls()` are all gone.
- **`applyConfig()` orchestrator removed.** No replacement — use `createClient()` and call domain modules directly.
- **`ConfigPatchParams` removed.** `config.patch()` method does not exist upstream. Use `config.set()` or `config.apply()` with `{ raw: string }`.
- **`config.set()` / `config.apply()` params changed.** Now accept `{ raw: string, baseHash?: string }` (serialised JSON string), not `{ path: string, value: unknown }`.
- **`AgentCreateParams` changed.** `id` field removed. `name` and `workspace` are now required. `model` is a `string` (not an object).
- **`ChannelParams` removed.** Replaced by `ChannelStatusParams` and `ChannelAccountInfo`.

### New features

#### Config Module

- **Immutable `$include`-based config.** `moltlazy patch` generates `/home/openclaw/.openclaw/moltlazy.json` and injects `$include: "./moltlazy.json"` into `openclaw.json`. OpenClaw natively merges both files on startup.
- **New mandatory config modules:** `config/tools.ts` (`tools.toolSearch`) and `config/logging.ts` (`logging.*`) always run regardless of feature flags.
- **`config/include.ts`** — manages `$include` injection and `moltlazy.json` generation.
- **`config/skills.ts`** — always-on `skills.entries` config section.

#### SDK Module

- **New SDK typed RPC client** (`sdk/`) — `createClient()` returns a `MoltlazyClient` with 7 domain modules: `config`, `agents`, `channels`, `devices`, `cron`, `models`, `gateway`.
- **Upstream-aligned types** — all types in `sdk/types.ts` aligned to `ProtocolSchemas` from `openclaw/plugin-sdk`:
  - `ConfigSetParams` / `ConfigApplyParams`: `{ raw: string, baseHash?: string }`
  - `CronJob` / `CronAddParams`: discriminated `CronSchedule` union (`at` / `every` / `cron`)
  - `ChannelStatus`: full `ChannelsStatusResult`-aligned shape
  - `DevicePairRequest`: `displayName` (not `name`), added `deviceId` / `publicKey` / `ts`
  - `ModelInfo`: `name: string` required
  - `RpcError.error`: added `details?`, `retryable?`, `retryAfterMs?`
  - `RpcClient.call()` params widened to `unknown`

### Other changes

- **608 tests** across 33 test files (up from 399/21).
- `bun run typecheck` passes in strict mode with zero errors.
- `AGENTS.md` updated to v0.3 architecture (two-system overview, removed TOML/force references).
- Docs rewritten: `concepts.md`, `quickstart.md`, `orchestration.md` (now "Startup Flow"), `feature-packs.md` (now "SDK Domain Modules").

### Migration from v0.2

See [Migration Guide](/staging/llms/platform/libraries/moltlazy/migration/index.md) for the full step-by-step guide.

| Old                          | New                                             |
| ---------------------------- | ----------------------------------------------- |
| `MOLTLAZY_TOML_CONTENT`      | `MOLTLAZY_FEATURE_FLAGS` (JSON string)          |
| `MOLTLAZY_TOML_PATH`         | removed                                         |
| `MOLTLAZY_TOML_ETAG`         | removed                                         |
| `moltlazy init-toml`         | removed                                         |
| `--force-gateway` etc.       | removed                                         |
| `buildGatewayCalls()` etc.   | removed — use `createClient()` domain modules   |
| `applyConfig()`              | removed — use `createClient()` domain modules   |
| `config.patch()`             | removed — use `config.set({ raw: '...' })`      |
| `config.set({ path, value})` | `config.set({ raw: string })`                   |
| `AgentCreateParams.id`       | removed (`name` + `workspace` required instead) |

## Historical changes (imported from `apps/fouria/AGENTS.md`)

These entries predate the generated release sections above. They were maintained
by hand in `apps/fouria/AGENTS.md` and are kept here verbatim for traceability.
New entries belong in a changeset (see `docs/VERSIONING.md`); the sections above
are generated by Changesets (`scripts/changeset-changelog.mjs`).

- Fouria Builder build-method skill. The dev-only `fouria-builder` agent now seeds **`fouria-product-build`** as a per-agent workspace skill (`packages/moltlazy/workspace/skills/fouria-product-build.ts` → `<workspace>/fouria-builder/skills/fouria-product-build/SKILL.md`, plus an entry in its `skills` allowlist) that sequences the build method: frame the production roster → tool-first restriction model (each capability names the exact tool; no tool means no capability) → smallest MCP tool surface with `preview`/`apply` pairs → 3–6 channel quick actions (Telegram inline buttons; a callback is untrusted input, never authorization) → per-client tone matrix before writing a client-facing `SOUL.md` → one vertical slice → `cctr` acceptance corpus → `POC.md` handoff. Workspace skills are OpenClaw's highest-precedence skill source and are per-agent, and `workspace/fouria-builder` is excluded from promotions, so no production roster changes. `seedWorkspaceFiles` now creates parent directories so workspace-file keys can be nested paths. This supersedes the pending Skill Workshop proposal `fouria-product-build-20261021-bf543e21c1`: a workspace copy of the same name shadows a workshop skill, so the repo copy is authoritative. Tests: `packages/moltlazy/tests/agents.test.ts`; docs `packages/moltlazy/AGENTS.md`, `packages/moltlazy/src/agents/README.md`, `docs/DEVELOPMENT.md`.
- Dev-agent personas source the client proposal via the `fouria-leads` skill. The Fouria Builder and Q&A personas (`packages/moltlazy/workspace/fouria-builder.ts` + `fouria-qa.ts`) now read the skill first and fetch the proposal through the sandbox `leads.r2.internal` bridge (global `paso4-leads` R2 bucket) instead of the legacy `/home/openclaw/clawd/client-docs/` path; the Worker's dev-only docs materialization (`materializeClientDocsIfDev`) is no longer the personas' input path. Docs updated alongside (`packages/moltlazy/src/agents/README.md`, `packages/moltlazy/AGENTS.md`, `docs/DEVELOPMENT.md`).
- v0.3.x $include Configuration: immutable per-section $include files (session/tools/logging); gateway/agents inline; gateway token via env SecretRef
- Dev-only Fouria agents + client docs: moltlazy ships no production premade agents (vanilla `researcher`/`coder` removed) and injects **Fouria Builder** (`fouria-builder`) + **Fouria Q&A agent** (`fouria-qa`) only when the instance is a dev environment (`OPENCLAW_DEV_MODE=true` on the container, derived by the Worker from the instance's `-dev` hostname — see `src/dev-mode.ts`); per-tenant client documentation lives in R2 under `customers/<slug>/docs/` and is materialized by the Worker into `/home/openclaw/clawd/client-docs/` before gateway start (`src/services/fouria-docs/`, `materializeClientDocsIfDev`), with a dev-only admin API at `/api/admin/fouria-docs` (404 outside dev); the Dockerfile installs the `cctr` binary, platform docs are fetched from the instance's channel (`$FOURIA_DOCS_BASE_URL`, fallback `$FOURIA_DOCS_FALLBACK_URL` — `/latest` on production, `/staging` on staging/dev, starting at `/llms.txt`), and `start-openclaw.sh` keeps `security.installPolicy allow` in dev so the Builder can self-install plugins
