Part of #3896 phase 1.
Summary
Add the pure planning engine that converts validated channel manifests into a serializable SandboxMessagingPlan. This is architecture-only work: no production workflow should use the compiler yet.
Scope
- Finalize
SandboxMessagingPlan so it contains top-level channels, credentialBindings, networkPolicy, agentRender, buildSteps, stateUpdates, and healthChecks.
- Add compiler context types for sandbox name, agent, workflow, selected channels, configured channels, disabled channels, persisted state, config inputs, and credential availability.
- Add pure engines:
input-resolver.ts, credential-binding-engine.ts, policy-resolver.ts, agent-render-engine.ts, state-update-engine.ts, build-step-engine.ts, and health-check-engine.ts.
- Add
ManifestCompiler.
- Add tests for plan JSON round-trip, no secrets, no function-valued fields, and deterministic output.
Acceptance Criteria
- Telegram, Discord, Slack, WeChat, and WhatsApp manifests compile into stable
SandboxMessagingPlan fixtures.
- Provider names and placeholders match current behavior.
- Policy plans match current channel policy intent, including Hermes WeChat alias behavior.
- OpenClaw and Hermes render fragments are represented in the plan.
- Build args, build files, and rebuild hydration are represented without applying them.
- Health checks are planned before any lifecycle success can be reported.
ManifestCompiler contains no channel-specific branches like if channel === "wechat".
- Compiler and engines do not import production side-effect modules.
Non-goals
- Do not write registry or session state.
- Do not create providers.
- Do not patch Dockerfiles.
- Do not modify OpenClaw or Hermes config files.
Part of #3896 phase 1.
Summary
Add the pure planning engine that converts validated channel manifests into a serializable
SandboxMessagingPlan. This is architecture-only work: no production workflow should use the compiler yet.Scope
SandboxMessagingPlanso it contains top-levelchannels,credentialBindings,networkPolicy,agentRender,buildSteps,stateUpdates, andhealthChecks.input-resolver.ts,credential-binding-engine.ts,policy-resolver.ts,agent-render-engine.ts,state-update-engine.ts,build-step-engine.ts, andhealth-check-engine.ts.ManifestCompiler.Acceptance Criteria
SandboxMessagingPlanfixtures.ManifestCompilercontains no channel-specific branches likeif channel === "wechat".Non-goals