openclaw-proxy-protocol
v2.4.0
Published
Shared semantic turn transport protocol types for openclaw and openclaw-hub
Maintainers
Readme
openclaw-proxy-protocol
Shared semantic turn transport protocol types for openclaw Gateway and openclaw-hub.
This package is the canonical cross-repository protocol surface for:
agent.turn.*tool.invoke.*local.execution.envelopebilling.recorded- capability sync payloads
For capability sync, pluginManifests is intentionally limited to governance-facing plugin metadata and coarse capability flags. Per-plugin internal topology lists stay inside Gateway runtime state.
It exists so Gateway and Hub can evolve independently without falling back to
ad-hoc sibling file: imports or copy-pasted protocol files.
Current topology:
- source lives at
openclaw-proxy-protocol openclawconsumes it through a local repo dependency during developmentopenclaw-hubconsumes it as a published semver dependency- the package is independently versioned from the main openclaw runtime
- the canonical standalone repository target is
huizhou-shunshi-intelligent/openclaw-proxy-protocolon Gitee
This is now a first-class engineering artifact. Protocol changes must follow explicit semver and release order.
Repository-readiness status:
- package metadata is self-contained inside this directory
- protocol source now lives under
src/and published artifacts live under committeddist/ - npm packaging can be validated locally with
npm run pack:check - CI and tag release workflows now live in
.github/workflows/and.gitee/workflows/ - release guidance now lives in
docs/releasing.md - changelog and license now live with the package instead of relying on repo-global context
- remaining monorepo coupling is limited to development-time local consumption from
openclaw
Repository layout:
src/index.tsis the source-of-truth protocol definition filedist/index.d.tsanddist/index.jsare the published package entrypointstsconfig.jsonexists locally so the package can build independently of the parent repodocs/agent-runtime-p0-protocol-draft.mdtracks the P0 execution/attempt/sidechain/control protocol draft
Install
Inside the xiaozhiclaw repo, consume it as a local repo package.
{
"dependencies": {
"openclaw-proxy-protocol": "file:../openclaw-proxy-protocol"
}
}Outside the monorepo, consume the published package instead of a sibling file path.
{
"dependencies": {
"openclaw-proxy-protocol": "^2.0.1"
}
}Version Flow
Use semver with protocol-specific meaning:
major: remove or rename exported fields/types/messages, delete compatibility aliases, or change required-field semanticsminor: add backward-compatible messages, payload fields, or optional metadatapatch: docs, packaging metadata, or fixes that do not change the public protocol contract
Recent examples of minor additions include explicit approval step context fields and the compatibility-safe local.execution.envelope projection surface.
1.0.0 starts the explicit breaking-change wave that removes the legacy Gateway-side relay-api-proxy* source/export surface and makes semantic-turn-transport* the only canonical Gateway naming.
Release Order
Protocol releases are ordered and must not be collapsed:
- update
openclaw-proxy-protocol - publish the protocol package
- upgrade
openclaw-hubto the published semver and refresh its lockfile - deploy Hub first
- upgrade Gateway/openclaw mainline and plugin-sdk surfaces
- remove compatibility shims only after Hub and Gateway mainlines have both migrated
Why Hub before Gateway:
- Hub is the cloud-side protocol and orchestration truth
- Gateway is the desktop transport consumer
- rolling Hub first keeps Gateway fallback compatibility windows explicit
Release
This package is released independently from the main openclaw runtime version.
- Update protocol types in this package first.
- Run
npm run buildwhen you changesrc/index.ts. - Publish the package with the local release script in scripts/release-proxy-protocol.mjs.
- Upgrade openclaw-hub to the new semver version.
- Refresh the hub lockfile after the published version is available.
- Deploy Hub before removing Gateway compatibility shims.
Example:
node scripts/release-proxy-protocol.mjs --version 1.0.0Consumer Migration
Gateway / openclaw migration order:
- add new neutral or semantic exports first
- migrate source imports to the new canonical names and paths
- rebuild plugin-sdk declarations and verify old package-local paths and old type aliases are gone from generated d.ts output
- only then delete compatibility aliases and deprecated files
Hub migration order:
- bump
openclaw-proxy-protocolsemver inopenclaw-hub/package.json - refresh the lockfile against the published version
- update Hub source imports/usages to the new canonical fields/types
- build and deploy Hub before asking Gateway to drop old compatibility readers
If the package is later split out of the monorepo into a dedicated repository, keep the same release order and semver policy; only the source location changes.
Independent Repo Checklist
The package is now extraction-ready at the directory level. To complete the final split into a dedicated repository, keep the package contents unchanged and only perform repository-boundary work:
- keep
src/as the only source-of-truth and publishdist/ - keep
repository,homepage, andbugsinpackage.jsonpointing at the standalone repository - use scripts/release-proxy-protocol.mjs as the package-local release entrypoint
- keep the publish order
protocol -> Hub -> Gateway - do not reintroduce sibling
file:dependencies for Hub or any other external consumer - keep this directory aligned with its standalone Gitee repository workflow and evolve CI/release there as the canonical path
Consumer rule
openclaw-hub must not depend on this package through a sibling file: path.
Cross-repo consumers should always use the published versioned package so release
order, rollback and CI are all explicit.
Starting from the real 1.0.0 release, ProxyUsageInfo and ProxyBilledInfo
are no longer part of the public contract. Consumers should use
TransportUsageInfo and TransportBillingInfo directly.
