Files
openclaw/docs/pi-dev.md
T
Tabula Myriad a9ae1a6778 feat: Triad development iteration complete
Matrix Protocol:
- docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS
- src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation
- docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local)

MCP Server Integration:
- docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs
- docs/mcp-curiosity-mapping.md: Gap-to-capability mapping

Node Sync Architecture:
- src/services/node-sync-service.ts: WebSocket peer sync + presence detection
- src/services/node-sync-service.test.ts: Unit tests
- docs/node-sync-architecture.md: Architecture docs

Triad Resilience:
- scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity
- docs/triad-resilience.md: Recovery procedures
- .secure/deployment-logs/README.md: Schema v2
- skills/triad-heartbeat/SKILL.md: Corruption check integration

NPM Publish Workflow:
- scripts/npm-publish.mjs: version, changelog, validate, publish, rollback
- .github/workflows/npm-publish.yml: GitHub Actions with provenance
- docs/npm-publish-guide.md: Complete documentation

All deliverables tested in Docker before production.
2026-03-24 00:44:50 -04:00

2.3 KiB
Executable File

title, summary, read_when
title summary read_when
Pi Development Workflow Developer workflow for Pi integration: build, test, and live validation
Working on Pi integration code or tests
Running Pi-specific lint, typecheck, and live test flows

Pi Development Workflow

This guide summarizes a sane workflow for working on the pi integration in OpenClaw.

Type Checking and Linting

  • Type check and build: pnpm build
  • Lint: pnpm lint
  • Format check: pnpm format
  • Full gate before pushing: pnpm lint && pnpm build && pnpm test

Running Pi Tests

Run the Pi-focused test set directly with Vitest:

pnpm test -- \
  "src/agents/pi-*.test.ts" \
  "src/agents/pi-embedded-*.test.ts" \
  "src/agents/pi-tools*.test.ts" \
  "src/agents/pi-settings.test.ts" \
  "src/agents/pi-tool-definition-adapter*.test.ts" \
  "src/agents/pi-extensions/**/*.test.ts"

To include the live provider exercise:

OPENCLAW_LIVE_TEST=1 pnpm test -- src/agents/pi-embedded-runner-extraparams.live.test.ts

This covers the main Pi unit suites:

  • src/agents/pi-*.test.ts
  • src/agents/pi-embedded-*.test.ts
  • src/agents/pi-tools*.test.ts
  • src/agents/pi-settings.test.ts
  • src/agents/pi-tool-definition-adapter.test.ts
  • src/agents/pi-extensions/*.test.ts

Manual Testing

Recommended flow:

  • Run the gateway in dev mode:
    • pnpm gateway:dev
  • Trigger the agent directly:
    • pnpm openclaw agent --message "Hello" --thinking low
  • Use the TUI for interactive debugging:
    • pnpm tui

For tool call behavior, prompt for a read or exec action so you can see tool streaming and payload handling.

Clean Slate Reset

State lives under the OpenClaw state directory. Default is ~/.openclaw. If OPENCLAW_STATE_DIR is set, use that directory instead.

To reset everything:

  • openclaw.json for config
  • credentials/ for auth profiles and tokens
  • agents/<agentId>/sessions/ for agent session history
  • agents/<agentId>/sessions.json for the session index
  • sessions/ if legacy paths exist
  • workspace/ if you want a blank workspace

If you only want to reset sessions, delete agents/<agentId>/sessions/ and agents/<agentId>/sessions.json for that agent. Keep credentials/ if you do not want to reauthenticate.

References