Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:

- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm nx run @moltzap/client:test:pack
- run: node scripts/test/simulator-packages.mjs
- run: pnpm typecheck
- run: pnpm lint
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ jobs:
- name: Build all packages
run: pnpm build

- name: Verify client package executable
run: pnpm nx run @moltzap/client:test:pack

- name: Verify simulator package consumers
run: node scripts/test/simulator-packages.mjs

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ you have two supported surfaces:
- **Host a server.** Run the bin (`npx @moltzap/server-core`) and
configure it with `moltzap.yaml` — see `moltzap.example.yaml` for
every option.
- **Build agents.** Use `@moltzap/client` (CLI + TypeScript client) to
connect over the wire as an agent, open conversations, and send and
receive messages. The full flow is documented in
- **Build agents.** Use `@moltzap/client` (packaged daemon + TypeScript
harness client) to connect over the wire as an agent, open conversations,
and send and receive messages. The full flow is documented in
[`docs/guides/two-agent-chat.mdx`](docs/guides/two-agent-chat.mdx).

## Simulating agent societies
Expand Down Expand Up @@ -200,7 +200,7 @@ offline analysis tools use `@moltzap/simulator/ledger`.
|---------|-------------|
| [`@moltzap/server-core`](packages/server) | Server: standalone mode, services, RPC, WebSocket |
| [`@moltzap/protocol`](packages/protocol) | Effect `Schema` wire contracts and RPC descriptors for the JSON-RPC protocol |
| [`@moltzap/client`](packages/client) | Client SDK and `moltzap` CLI |
| [`@moltzap/client`](packages/client) | Harness client, packaged `moltzapd` daemon, and `moltzap` CLI |
| [`@moltzap/openclaw-channel`](packages/openclaw-channel) | OpenClaw gateway plugin |
| [`@moltzap/nanoclaw-channel`](packages/nanoclaw-channel) | Smoke-test channel (workspace-only, not published) |
| [`@moltzap/simulator`](packages/simulator) | Code-first society simulator, production router, runtimes, and typed ledger |
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Choose the path that best fits your needs:
icon="link"
href="/guides/two-agent-chat"
>
Client service and `moltzap` CLI: connection management, conversation state, agent registration, and messaging
Harness client and packaged `moltzapd` daemon: connection management, conversation state, and messaging
</Card>
<Card
title="@moltzap/openclaw-channel"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"test:compute-next-version": "bash scripts/release/compute-next-version.test.sh",
"simulator:example": "pnpm simulator:example:check && node --experimental-strip-types examples/simulator/hello.ts",
"simulator:example:check": "pnpm nx build @moltzap/simulator && pnpm exec tsc -p examples/simulator/tsconfig.json",
"test:pack:client": "pnpm nx run @moltzap/client:test:pack",
"test:pack:simulator": "pnpm nx build @moltzap/simulator && node scripts/test/simulator-packages.mjs",
"prepare": "husky && node scripts/setup/restore-tsgo-exec-bit.mjs",
"effect:source": "./scripts/setup/prepare-effect.sh",
Expand Down
9 changes: 5 additions & 4 deletions packages/client/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @moltzap/client

Client SDK for MoltZap: WebSocket transport, RPC service object,
channel-core inbound handling, and the `moltzap` CLI binary. Pick the
lowest surface that meets the need:
channel-core inbound handling, the packaged `moltzapd` daemon, and the
`moltzap` CLI binary. Pick the lowest surface that meets the need:

| Surface | Use when |
|---|---|
Expand Down Expand Up @@ -32,8 +32,9 @@ lowest surface that meets the need:
- `src/channel-base/` — shared channel-adapter primitives.
- `src/notification/` — notification stream + consumer helpers.
- `src/pagination.ts` — cursor-paginated list-RPC drainer.
- `src/cli/` — `moltzap` CLI binary, per-command files under
`commands/`.
- `src/cli/moltzapd-main.ts` — packaged daemon process entry.
- `src/cli/` — process argument parsing for `moltzapd` and the `moltzap`
CLI; the latter keeps its per-command files under `commands/`.

Subpath exports: `./channel-base`, `./harness-client`, `./test-utils`, `./auth`,
`./pagination`, `./notification`.
Expand Down
30 changes: 29 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"moltzap": "./dist/cli/index.js"
"moltzap": "./dist/cli/index.js",
"moltzapd": "./dist/cli/moltzapd-main.js"
},
"exports": {
".": {
Expand Down Expand Up @@ -71,6 +72,33 @@
"command": "eslint . --cache --max-warnings=0"
}
},
"test:integration": {
"executor": "nx:run-commands",
"dependsOn": [
"build",
"^build"
],
"options": {
"cwd": "packages/client",
"command": "vitest run --config vitest.integration.config.mjs"
}
},
"test:pack": {
"executor": "nx:run-commands",
"dependsOn": [
"build",
"^build"
],
"inputs": [
"production",
"^production",
"{workspaceRoot}/scripts/test-client-package.mjs"
],
"cache": false,
"options": {
"command": "node scripts/test-client-package.mjs"
}
},
"arch:check": {
"executor": "nx:run-commands",
"options": {
Expand Down
10 changes: 6 additions & 4 deletions packages/client/src/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Client source boundary

This tree implements the public client SDK, its local service process, and the
`moltzap` CLI.
This tree implements the public client SDK, the packaged `moltzapd` service
process, and the `moltzap` CLI.

- Root modules own the SDK clients, `MoltZapService`, channel dispatch,
registration, configuration, profiles, pagination, and local-daemon RPC.
- `channel-base/` contains runtime-neutral primitives shared by channel
adapters.
- `notification/` owns notification-stream helpers, while `cli/` owns command
parsing and local-daemon transport.
- `notification/` owns notification-stream helpers, while `harness/` owns the
private MCP client and wire contract.
- `cli/` owns executable argument parsing for `moltzapd` and the `moltzap`
control CLI.
- `test-utils/` and `__tests__/` contain cross-package fixtures and integration
coverage.

Expand Down
Loading
Loading