feat(messaging): add workflow planner#4076
Conversation
Signed-off-by: San Dang <sdang@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
PR Review AdvisorFindings: 1 needs attention, 3 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
## Summary Adds the serializable messaging applier boundary for phase 1 of the manifest-based messaging redesign. The applier consumes `SandboxMessagingPlan` directly, applies generic OpenShell credential/config/policy work, and adds compiler support for manifest-declared reachability hooks without moving production conflict detection. ## Related Issue Fixes #3996 Part of #3896 ## Changes - Add `src/lib/messaging/applier/` with env transport, serialization checks, OpenShell credential provider application, policy application, agent config rendering, and hook-returned `build-file` application. - Add Telegram `reachability-check` hook metadata plus fake reachability hook implementation for phase-1 tests. - Run reachability hooks during manifest compilation after enrollment input availability is known while keeping raw secrets out of returned plans. - Make WeChat post-install account seeding visible through hook-returned build files and apply those outputs to OpenClaw account files and `openclaw.json`. - Filter hook/build-step planning by agent so OpenClaw-only WeChat work does not appear in Hermes plans. - Add focused tests for applier behavior, reachability hooks, hook-returned file writes, serialization, and secret hygiene. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [ ] `npx prek run --all-files` passes - [ ] `npm test` passes - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Targeted checks run: - `npm test -- --project cli src/lib/messaging` - `npm run typecheck:cli` - `npm run lint -- src/lib/messaging` - `npm run source-shape:check` - `git diff --check` Full pre-commit CLI tests were not marked as passing because an unrelated host debug-output assertion failed in `test/cli.test.ts:1434`. --- Signed-off-by: San Dang <sdang@nvidia.com>
c9c545b
into
u/sdang/messaging-manifest-compiler-3994
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
Summary
Adds the phase-1 messaging workflow planner for onboard, channel add/remove/start/stop, and rebuild flows. The planner computes configured, active, and disabled channel state before delegating to the manifest compiler, keeping #3995 architecture-only and out of production CLI paths.
Related Issue
Fixes #3995
Changes
MessagingWorkflowPlannerwith pureplanOnboard,planAddChannel,planRemoveChannel,planStartChannel,planStopChannel, andplanRebuildmethods.MessagingCompilerWorkflowto the planner workflows and restrict enrollment hooks to selected onboard/add-channel plans.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Additional verification performed:
npm test -- --project cli src/lib/messagingpasses.npm run typecheck:clipasses.npm run lint -- src/lib/messagingpasses with the existing unrelated warning insrc/lib/onboard/child-exit-tracker.test.ts.npm run source-shape:checkpasses.git diff --checkpasses.Signed-off-by: San Dang sdang@nvidia.com