fix(messaging): reject channel adds on agents that do not support messaging - #5743
Conversation
…saging Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds messaging-agent support checks, treats empty channel allowlists as active filters, updates policy-channel persistence for non-messaging agents, and skips rebuild messaging plan staging for unsupported agents. ChangesMessaging agent gate and registry update
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review Advisor — BlockedMerge posture: Do not merge until addressed Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/messaging/utils.test.ts (1)
96-136: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd an explicit
null/undefinedavailability-context test.
getMessagingManifestAvailabilityContext()now has two distinct nullable cases: unknown agent names and no agent provided. This suite locks the first one, but the second is also a real caller path viasetupMessagingChannels(..., agent = null), so it’s worth pinning separately.Suggested test case
describe("getMessagingManifestAvailabilityContext", () => { + it("returns a null agent when no agent is provided", () => { + expect(getMessagingManifestAvailabilityContext(null)).toEqual({ + agent: null, + supportedChannelIds: null, + }); + expect(getMessagingManifestAvailabilityContext(undefined)).toEqual({ + agent: null, + supportedChannelIds: null, + }); + }); + it("returns the resolved messaging agent id and an explicit allowlist when present", () => {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/messaging/utils.test.ts` around lines 96 - 136, Add a dedicated test for the no-agent case in getMessagingManifestAvailabilityContext, since null/undefined input is distinct from an unknown agent name. In src/lib/messaging/utils.test.ts, extend the existing getMessagingManifestAvailabilityContext describe block with an assertion that calling it without an agent (or with null) returns agent: null and the expected supportedChannelIds value, matching the setupMessagingChannels default path. Keep the unknown-agent test separate so both nullable cases are explicitly covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/messaging/utils.test.ts`:
- Around line 96-136: Add a dedicated test for the no-agent case in
getMessagingManifestAvailabilityContext, since null/undefined input is distinct
from an unknown agent name. In src/lib/messaging/utils.test.ts, extend the
existing getMessagingManifestAvailabilityContext describe block with an
assertion that calling it without an agent (or with null) returns agent: null
and the expected supportedChannelIds value, matching the setupMessagingChannels
default path. Keep the unknown-agent test separate so both nullable cases are
explicitly covered.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 96e5bcd3-2c2d-404d-a891-baca47331b19
📒 Files selected for processing (6)
src/lib/actions/sandbox/policy-channel.tssrc/lib/actions/sandbox/rebuild.tssrc/lib/messaging/manifest/registry.test.tssrc/lib/messaging/manifest/registry.tssrc/lib/messaging/utils.test.tssrc/lib/messaging/utils.ts
…reach rebuild Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…ing allowlist Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/actions/sandbox/rebuild-messaging-stage.test.ts`:
- Around line 121-132: The empty-allowlist case in
stageMessagingManifestPlanForRebuild is not being distinguished from the
unsupported-agent path, so tighten the test to assert the specific log message
emitted via the message callback when an allowlisted agent has no available
channels. Update the test around stageMessagingManifestPlanForRebuild to capture
the callback output in messages and add an assertion that proves the
empty-allowlist branch was taken, while keeping the existing clearPlanEnvSpy,
writePlanEnvSpy, and result checks intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8b09601b-6ab2-43ec-920a-3d06c6c58ef4
📒 Files selected for processing (3)
src/lib/actions/sandbox/rebuild-flow.test.tssrc/lib/actions/sandbox/rebuild-messaging-stage.test.tssrc/lib/actions/sandbox/rebuild.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/rebuild.ts
…ebuild Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…out throwing Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
… on rebuild Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…ing-agent-coercion Signed-off-by: Tinson Lai <tinsonl@nvidia.com> # Conflicts: # src/lib/actions/sandbox/policy-channel.ts # src/lib/actions/sandbox/rebuild.ts # src/lib/messaging/compiler/workflow-planner.ts
…ction test Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…ing-agent-coercion Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…artup Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-5743.docs.buildwithfern.com/nemoclaw |
cv
left a comment
There was a problem hiding this comment.
Approved after follow-up fixes: CI is green, PR Review Advisor is passing after narrowing the #5729 linkage to the safe early-rejection/no-mutation contract, and DeepAgents channel support remains gated until a bridge/health path exists.
|
FYI @cv @laitingsheng
I'll create a new PR to reframe. |
<!-- markdownlint-disable MD041 --> ## Summary Refreshes the v0.0.68 docs with release notes, Microsoft Teams messaging guidance, and generated support-matrix coverage. Also corrects the Hermes generated command reference so `sessions export` examples match Hermes-only behavior while keeping the shared command heading compatible with CLI parity checks. ## Changes - #5585 -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/platform-support.mdx`: Documents experimental Microsoft Teams channel setup, Bot Framework credentials, webhook forwarding, local `MSTEAMS_PORT` conflicts, and the generated integration support row. - #5526 -> `docs/reference/commands.mdx`, `docs/reference/commands-nemohermes.mdx`: Keeps Hermes `sessions export` examples on the supported single-JSONL export path while preserving the canonical shared CLI heading. - #5044 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for installer onboarding failure propagation. - #5641 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for fresh recovery after pre-sandbox installer interruption. - #5673 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for explicit deny-all messaging manifests. - #5743 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for unsupported-agent channel-add rejection. - #5252 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Hermes `gateway-token` dashboard guidance. - #5659 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for local OpenClaw `agent` wrapper help. - #5661 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for default extra-agent paths. - #5669 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Deep Agents Code branding. - #5672 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for hosted-compatible default model ID preservation. - #5725 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Deep Agents Code sandbox liveness. - #5644 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for DGX Spark managed-vLLM express install defaults. - #5712 -> `docs/about/release-notes.mdx`, `docs/reference/platform-support.mdx`: Adds v0.0.68 release-note coverage for the canonical support matrix and updates the matrix source with Teams. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: docs-only release refresh; no runtime code changed. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [ ] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — `npm run docs` passed with 0 errors; Fern reported the existing light-mode accent contrast warning. - [x] 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) Additional verification: - `python3 scripts/generate-platform-docs.py --check` passed. - `npm run docs:sync-agent-variants` passed. - `bash test/e2e/e2e-cloud-experimental/check-docs.sh --only-cli` passed. - `npm run docs` passed with 0 errors and one Fern theme warning: light-mode accent contrast ratio is 2.41:1 and should be at least 3:1. - `npm run build:cli` refreshed local untracked `dist/` artifacts after rebase; no tracked files changed. - `npm run typecheck:cli` passed. - Normal commit and push hooks passed after the local CLI rebuild. --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added **Microsoft Teams** as an experimental messaging channel, including manifest-first onboarding, local port routing/conflict handling, sandbox delivery controls, and policy preset support. * **Documentation** * Expanded messaging-channel setup for Teams (prerequisites, credential/webhook setup, wizard flow, and add/remove commands). * Updated reference docs for **agent-specific** session export examples (OpenClaw vs Hermes). * Refreshed platform support guidance and added the latest release-notes entry. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Derive supported messaging agents and channels from channel manifests instead of agent manifests, so `supportedAgents` is the source of truth. This also removes artifact-only DeepAgents messaging wiring and rejects unsupported channel/agent pairs before policy, provider, credential, registry, or rebuild mutation. ## Related Issue Related PRs: #5743, #5673. Stacked on #5768, Fixes #5729 ## Acceptance Note DeepAgents messaging is intentionally fail-closed in this PR. NemoClaw does not claim Discord, Telegram, Slack, or other channel delivery for LangChain Deep Agents Code until a real DeepAgents messaging bridge exists. The fix for #5729 is to reject unsupported DeepAgents channel setup before policy, credential, registry, rebuild, or Dockerfile mutation, instead of injecting a stale messaging plan into a sandbox that cannot consume inbound channel traffic. ## Changes - Remove `messaging_platforms` parsing from agent manifests and derive available channels from channel manifest `supportedAgents`. - Remove DeepAgents messaging build/runtime artifacts until a real messaging bridge exists. - Gate `channels add`, `channels list`, onboard filtering, and rebuild staging from manifest-derived channel support. - Update regression tests for DeepAgents rejection, stale messaging cleanup, rebuild skipping, and manifest helper behavior. - Update platform-support docs to reference channel manifest `supportedAgents`. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [x] Docs updated for user-facing behavior changes - [ ] `npm run 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) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Messaging channel availability is now derived from each channel manifest’s `supportedAgents`, improving enable/disable, rebuild planning, and channel status matching. * DeepAgents startup and rebuild no longer include unsupported messaging runtime wiring, env handling, or messaging artifacts. * Channel add/cleanup gates now reject unsupported agent/channel pairs earlier with clearer “channel-supported agents” guidance. * **Documentation** * Updated platform support and DeepAgents eligibility guidance to make `supportedAgents` the single source of truth for messaging support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: San Dang <sdang@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
…saging (NVIDIA#5743) ## Summary `nemoclaw <sandbox> channels add <channel>` refuses messaging-channel mutations on agents whose manifest declares no supported messaging platforms, before any sandbox mutation. Previously the channel-add path tore down the sandbox before failing in `patchStagedDockerfile`, because the messaging utils silently coerced unknown agents to `"openclaw"` and treated an explicit empty platform allowlist as "no restriction". ## Related Issue Refs NVIDIA#5729 — this PR intentionally addresses the destructive late rebuild failure with a safe early rejection/no-mutation contract for DeepAgents. It does not claim functional DeepAgents Discord/Telegram/Slack channel-ready support until a DeepAgents messaging bridge and health path exist. ## Changes - `src/lib/messaging/utils.ts`: add `tryGetMessagingAgentId`, `MessagingAgentNotSupportedError`, `isMessagingSupportedAgent`. `toMessagingAgentId` throws on explicit unknown agents; null/undefined/empty still falls back to `"openclaw"`. `getMessagingManifestAvailabilityContext` distinguishes `messagingPlatforms: undefined` (no restriction) from `[]` (explicit empty allowlist) and propagates a nullable agent id. - `src/lib/messaging/manifest/registry.ts`: `listAvailable` treats `supportedChannelIds: []` as "no channels available". - `src/lib/messaging/compiler/workflow-planner.ts`: `supportedChannelIds()` mirrors the same `Array.isArray(...)` semantics so an explicit empty allowlist denies every configured channel at the planner boundary. - `src/lib/actions/sandbox/policy-channel.ts`: `addSandboxChannel` gates with `isMessagingSupportedAgent` before resolving presets, planning, or any sandbox mutation. - `src/lib/actions/sandbox/rebuild.ts`: `stageMessagingManifestPlanForRebuild` clears the staged plan env and returns `null` for non-messaging agents instead of throwing late in the patch step. Function is now exported for regression coverage. - `src/lib/messaging/utils.test.ts`: 15 cases covering all new helpers. - `src/lib/messaging/manifest/registry.test.ts`: explicit `[]` vs omitted / null `supportedChannelIds` cases. - `src/lib/messaging/compiler/workflow-planner.test.ts`: planner deny-all case for `supportedChannelIds: []`. - `src/lib/actions/sandbox/policy-channel-agent-gate.test.ts`: action-level regression; `addSandboxChannel` exits non-zero for `langchain-deepagents-code` and for any agent with `messagingPlatforms: []`, with no preset / policy / provider / registry / credential / rebuild call before exit. - `src/lib/actions/sandbox/rebuild-messaging-stage.test.ts`: `stageMessagingManifestPlanForRebuild` clears the plan env and returns `null` for non-messaging agents. ## 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 - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [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 - [ ] `npm run 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) --- Signed-off-by: Tinson Lai <tinsonl@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Messaging channel setup now blocks non-messaging agents earlier with a clearer error, before making any changes. * Rebuilds skip messaging manifest planning when messaging isn’t supported, and previously stored messaging plans are cleared accordingly. * Messaging allowlist handling now correctly treats an explicit empty allowlist (`[]`) as “allow none” for availability, compilation, and rebuild filtering. * **Tests** * Added/expanded regression coverage for messaging allowlist filtering (including `[]`) and rebuild/plan skip behavior for messaging vs non-messaging agents. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Tinson Lai <tinsonl@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Refreshes the v0.0.68 docs with release notes, Microsoft Teams messaging guidance, and generated support-matrix coverage. Also corrects the Hermes generated command reference so `sessions export` examples match Hermes-only behavior while keeping the shared command heading compatible with CLI parity checks. ## Changes - NVIDIA#5585 -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/platform-support.mdx`: Documents experimental Microsoft Teams channel setup, Bot Framework credentials, webhook forwarding, local `MSTEAMS_PORT` conflicts, and the generated integration support row. - NVIDIA#5526 -> `docs/reference/commands.mdx`, `docs/reference/commands-nemohermes.mdx`: Keeps Hermes `sessions export` examples on the supported single-JSONL export path while preserving the canonical shared CLI heading. - NVIDIA#5044 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for installer onboarding failure propagation. - NVIDIA#5641 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for fresh recovery after pre-sandbox installer interruption. - NVIDIA#5673 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for explicit deny-all messaging manifests. - NVIDIA#5743 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for unsupported-agent channel-add rejection. - NVIDIA#5252 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Hermes `gateway-token` dashboard guidance. - NVIDIA#5659 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for local OpenClaw `agent` wrapper help. - NVIDIA#5661 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for default extra-agent paths. - NVIDIA#5669 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Deep Agents Code branding. - NVIDIA#5672 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for hosted-compatible default model ID preservation. - NVIDIA#5725 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for Deep Agents Code sandbox liveness. - NVIDIA#5644 -> `docs/about/release-notes.mdx`: Adds v0.0.68 release-note coverage for DGX Spark managed-vLLM express install defaults. - NVIDIA#5712 -> `docs/about/release-notes.mdx`, `docs/reference/platform-support.mdx`: Adds v0.0.68 release-note coverage for the canonical support matrix and updates the matrix source with Teams. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: docs-only release refresh; no runtime code changed. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [ ] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — `npm run docs` passed with 0 errors; Fern reported the existing light-mode accent contrast warning. - [x] 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) Additional verification: - `python3 scripts/generate-platform-docs.py --check` passed. - `npm run docs:sync-agent-variants` passed. - `bash test/e2e/e2e-cloud-experimental/check-docs.sh --only-cli` passed. - `npm run docs` passed with 0 errors and one Fern theme warning: light-mode accent contrast ratio is 2.41:1 and should be at least 3:1. - `npm run build:cli` refreshed local untracked `dist/` artifacts after rebase; no tracked files changed. - `npm run typecheck:cli` passed. - Normal commit and push hooks passed after the local CLI rebuild. --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added **Microsoft Teams** as an experimental messaging channel, including manifest-first onboarding, local port routing/conflict handling, sandbox delivery controls, and policy preset support. * **Documentation** * Expanded messaging-channel setup for Teams (prerequisites, credential/webhook setup, wizard flow, and add/remove commands). * Updated reference docs for **agent-specific** session export examples (OpenClaw vs Hermes). * Refreshed platform support guidance and added the latest release-notes entry. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Derive supported messaging agents and channels from channel manifests instead of agent manifests, so `supportedAgents` is the source of truth. This also removes artifact-only DeepAgents messaging wiring and rejects unsupported channel/agent pairs before policy, provider, credential, registry, or rebuild mutation. ## Related Issue Related PRs: NVIDIA#5743, NVIDIA#5673. Stacked on NVIDIA#5768, Fixes NVIDIA#5729 ## Acceptance Note DeepAgents messaging is intentionally fail-closed in this PR. NemoClaw does not claim Discord, Telegram, Slack, or other channel delivery for LangChain Deep Agents Code until a real DeepAgents messaging bridge exists. The fix for NVIDIA#5729 is to reject unsupported DeepAgents channel setup before policy, credential, registry, rebuild, or Dockerfile mutation, instead of injecting a stale messaging plan into a sandbox that cannot consume inbound channel traffic. ## Changes - Remove `messaging_platforms` parsing from agent manifests and derive available channels from channel manifest `supportedAgents`. - Remove DeepAgents messaging build/runtime artifacts until a real messaging bridge exists. - Gate `channels add`, `channels list`, onboard filtering, and rebuild staging from manifest-derived channel support. - Update regression tests for DeepAgents rejection, stale messaging cleanup, rebuild skipping, and manifest helper behavior. - Update platform-support docs to reference channel manifest `supportedAgents`. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [x] Docs updated for user-facing behavior changes - [ ] `npm run 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) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Messaging channel availability is now derived from each channel manifest’s `supportedAgents`, improving enable/disable, rebuild planning, and channel status matching. * DeepAgents startup and rebuild no longer include unsupported messaging runtime wiring, env handling, or messaging artifacts. * Channel add/cleanup gates now reject unsupported agent/channel pairs earlier with clearer “channel-supported agents” guidance. * **Documentation** * Updated platform support and DeepAgents eligibility guidance to make `supportedAgents` the single source of truth for messaging support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: San Dang <sdang@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
nemoclaw <sandbox> channels add <channel>refuses messaging-channel mutations on agents whose manifest declares no supported messaging platforms, before any sandbox mutation. Previously the channel-add path tore down the sandbox before failing inpatchStagedDockerfile, because the messaging utils silently coerced unknown agents to"openclaw"and treated an explicit empty platform allowlist as "no restriction".Related Issue
Refs #5729 — this PR intentionally addresses the destructive late rebuild failure with a safe early rejection/no-mutation contract for DeepAgents. It does not claim functional DeepAgents Discord/Telegram/Slack channel-ready support until a DeepAgents messaging bridge and health path exist.
Changes
src/lib/messaging/utils.ts: addtryGetMessagingAgentId,MessagingAgentNotSupportedError,isMessagingSupportedAgent.toMessagingAgentIdthrows on explicit unknown agents; null/undefined/empty still falls back to"openclaw".getMessagingManifestAvailabilityContextdistinguishesmessagingPlatforms: undefined(no restriction) from[](explicit empty allowlist) and propagates a nullable agent id.src/lib/messaging/manifest/registry.ts:listAvailabletreatssupportedChannelIds: []as "no channels available".src/lib/messaging/compiler/workflow-planner.ts:supportedChannelIds()mirrors the sameArray.isArray(...)semantics so an explicit empty allowlist denies every configured channel at the planner boundary.src/lib/actions/sandbox/policy-channel.ts:addSandboxChannelgates withisMessagingSupportedAgentbefore resolving presets, planning, or any sandbox mutation.src/lib/actions/sandbox/rebuild.ts:stageMessagingManifestPlanForRebuildclears the staged plan env and returnsnullfor non-messaging agents instead of throwing late in the patch step. Function is now exported for regression coverage.src/lib/messaging/utils.test.ts: 15 cases covering all new helpers.src/lib/messaging/manifest/registry.test.ts: explicit[]vs omitted / nullsupportedChannelIdscases.src/lib/messaging/compiler/workflow-planner.test.ts: planner deny-all case forsupportedChannelIds: [].src/lib/actions/sandbox/policy-channel-agent-gate.test.ts: action-level regression;addSandboxChannelexits non-zero forlangchain-deepagents-codeand for any agent withmessagingPlatforms: [], with no preset / policy / provider / registry / credential / rebuild call before exit.src/lib/actions/sandbox/rebuild-messaging-stage.test.ts:stageMessagingManifestPlanForRebuildclears the plan env and returnsnullfor non-messaging agents.Type of Change
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
[]) as “allow none” for availability, compilation, and rebuild filtering.[]) and rebuild/plan skip behavior for messaging vs non-messaging agents.