Skip to content

feat: openclaw plugin activation and keygen#377

Merged
jithinraj merged 5 commits intomainfrom
feat/openclaw-activate-keygen
Feb 15, 2026
Merged

feat: openclaw plugin activation and keygen#377
jithinraj merged 5 commits intomainfrom
feat/openclaw-activate-keygen

Conversation

@jithinraj
Copy link
Member

@jithinraj jithinraj commented Feb 15, 2026

Summary

Bridges @peac/adapter-openclaw from "code on npm" to "someone installs this and it works." Adds the two missing pieces: a high-level activation entry point and a signing key generator.

  • activate() -- single canonical entry point that wires all adapter components from config. Calls existing factory functions (resolveSigner, createPluginInstance, createFileReceiptWriter) with FsSpoolStore + FsDedupeIndex from @peac/capture-node. No logic duplication -- pure composition of existing building blocks.
  • generateSigningKey() -- Ed25519 keypair generation via @peac/crypto generateKeypair(). Reuses generateKeyId() from plugin.ts for kid derivation. Writes private JWK to disk with 0o600 permissions. CLI entry via peac-keygen bin.
  • Exports: activate, generateSigningKey, keygenCli + all associated types added to barrel export.

Files changed

File Change
src/activate.ts NEW -- high-level entry calling existing functions
src/keygen.ts NEW -- key generation, reuses generateKeyId()
src/keygen-cli.ts NEW -- CLI entry point for peac-keygen binary
src/index.ts Add activate + keygen exports
package.json Add @peac/capture-node dep, bin entry, bump @types/node to ^22
tsup.config.ts Add keygen-cli entry point
openclaw.plugin.json Bump version 0.10.6 -> 0.10.12
tests/activate.test.ts NEW -- 12 tests
tests/keygen.test.ts NEW -- 10 tests
scripts/check-publish-list.sh Add adapter-openclaw to tested packages, capture-core to tracked, fix count 40 -> 42
scripts/publish-manifest.json Add @peac/capture-node (20 -> 21 packages)
scripts/check-publish-closure.ts Add capture-node nested directory mapping
scripts/pack-smoke.mjs Add capture-node PKG_DIRS mapping

Existing code reused (not rewritten)

  • createHookHandler() from hooks.ts
  • createReceiptEmitter() + createBackgroundService() from emitter.ts
  • createJwkSigner() + resolveSigner() + generateKeyId() from plugin.ts
  • createFileReceiptWriter() from plugin.ts
  • All 4 tools from tools.ts
  • mapToolCallEvent() from mapper.ts

Depends on

Test plan

  • 22 new tests (12 activate + 10 keygen)
  • All 161 adapter tests passing (139 existing + 22 new)
  • Full monorepo: 3734 tests, 142 files, all passing
  • Build: 74 targets clean
  • Lint, typecheck, format: clean
  • guard.sh, check-planning-leak.sh, check-publish-list.sh: clean
  • Publish closure check: 21 packages passing

Add activate() as the single canonical entry point that wires all adapter
components from config. Calls existing factory functions (resolveSigner,
createPluginInstance, createFileReceiptWriter) with FsSpoolStore and
FsDedupeIndex from @peac/capture-node -- no logic duplication.

Add generateSigningKey() for Ed25519 keypair generation via @peac/crypto,
with keygenCli() for CLI usage and peac-keygen bin entry.

Changes:
- activate.ts: high-level entry wiring stores, signer, writer, instance, tools
- keygen.ts: Ed25519 key generation, JWK file output with 0o600 permissions
- keygen-cli.ts: CLI entry point for peac-keygen binary
- index.ts: export activate, keygen types and functions
- package.json: add @peac/capture-node dep, bin entry, bump @types/node to ^22
- tsup.config.ts: add keygen-cli entry point
- openclaw.plugin.json: bump version 0.10.6 -> 0.10.12
- check-publish-list.sh: add adapter-openclaw to tested, capture-core to
  tracked, fix hardcoded count 40 -> 42

Tests: 22 new tests (12 activate + 10 keygen), 161 total adapter tests passing.
The CI publish-manifest closure check failed because @peac/capture-node
was not in the manifest or directory mappings. This package was added in
PR #376 but the publish-related scripts were not updated.

- publish-manifest.json: add capture-node (20 -> 21 packages)
- check-publish-closure.ts: add capture-node nested mapping
- pack-smoke.mjs: add capture-node PKG_DIRS mapping
- createStatusTool: accept getter function for live stats instead of
  stale snapshot. Backwards-compatible: still accepts static PluginStats.
- activate.ts: pass stats getter to createStatusTool
- activate.ts: add explicit type annotation on onWarning callback
- tsconfig.core.json: add packages/capture/node/src to includes so CI
  typecheck resolves @peac/capture-node imports
typecheck:core failed because the paths block was missing
capture-node, so TS could not resolve the bare specifier
imported in adapter-openclaw/src/activate.ts.
- openclaw.plugin.json version 0.10.12 -> 0.10.11 to match package.json
- Add scripts/check-json-dupes.mjs: detects duplicate keys in JSON files
  (JSON parsers silently accept duplicates with last-write-wins)
- Wire check-json-dupes into guard.sh alongside existing bidi scanner
@jithinraj jithinraj changed the title feat(adapter-openclaw): plugin activation bridge and keygen utility feat: openclaw plugin activation bridge and keygen utility Feb 15, 2026
@jithinraj jithinraj changed the title feat: openclaw plugin activation bridge and keygen utility feat: openclaw plugin activation and keygen Feb 15, 2026
@jithinraj jithinraj merged commit 7f932c4 into main Feb 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant