Skip to content

feat(messaging): onboard Microsoft Teams channel - #5585

Merged
cv merged 17 commits into
mainfrom
feat/ms-teams-messaging-onboard
Jun 24, 2026
Merged

feat(messaging): onboard Microsoft Teams channel#5585
cv merged 17 commits into
mainfrom
feat/ms-teams-messaging-onboard

Conversation

@sandl99

@sandl99 sandl99 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds experimental Microsoft Teams channel onboarding through NemoClaw's manifest-first messaging architecture for OpenClaw and Hermes. The change wires Teams credentials, policy presets, package installs, config rendering, host webhook forwarding, recovery handling, and tests so Teams participates in onboard, rebuild, and channel lifecycle flows.

Key features

  1. Adding MS Teams channel
  2. Support Port forwarding for messaging channel generic. (support for callback, bi-directional call, e.g. Chat host calls into OpenClaw/Hermes)

Inputs

MSTEAMS_APP_ID: ClientID - Required
MSTEAMS_APP_PASSWORD: ClientSecret - Required
MSTEAMS_TENANT_ID: TenantId - Required
MSTEAMS_ALLOWED_USERS: Optional - OpenClaw allows to pairing after setup.

Related Issue

Part of #5492

Result

image

Changes

  • Add a built-in Microsoft Teams messaging manifest, template resolver, host-forward conflict/status hooks, and manifest registration.
  • Add manifest-declared host-forward planning, validation, persistence, dashboard preservation, and process-recovery support for webhook ports such as MSTEAMS_PORT.
  • Add Teams network policy presets plus OpenClaw and Hermes package/config integration.
  • Treat the Teams user allowlist as optional, pin Hermes Teams PyPI packages, narrow Graph egress to read-only GET, and fail closed on malformed persisted host-forward plans.
  • Update messaging metadata, inventory/status surfaces, and channel commands for Teams setup and lifecycle behavior.
  • Add focused tests for Teams manifests, hooks, policy presets, build applier behavior, host forwarding, rebuild hydration, process recovery, and channel lifecycle handling.
  • Leave user-facing documentation to a follow-up docs-owner change.

PR Review Advisor justification

PR Review Advisor follow-up: #5585 (comment)

  • PRA-1: TEAMS_ALLOWED_USERS is intentionally optional. Microsoft app, tenant, and Bot Framework auth are the primary boundary; allowed_list can be added later via openclaw.
  • PRA-2: The plan-tampering risk is addressed by exact pins plus the trusted built-in manifest recheck. Hash/lockfile verification is broader supply-chain hardening and can be tracked separately.
  • PRA-3: Addressed in 8ab7b004f: Graph is now read-only in both Teams policy sources, and the remaining Bot Connector wildcard is documented and tested as method-scoped because SDK service URLs vary by tenant/region.
  • PRA-4: Deferred for now. Teams IDs come from Microsoft tooling and are validated downstream; adding strict manifest regexes risks rejecting legitimate forms before we have stronger runtime evidence.

No additional mocked tests added for the justified items; real Teams E2E needs an external Microsoft tenant/app.

Type of Change

  • 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

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • 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)
  • Tests added or updated for new or changed behavior
  • 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 (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Verification run:

  • npm run build:cli
  • npx vitest run src/lib/onboard/messaging-host-forward.test.ts src/lib/messaging/channels/manifests.test.ts src/lib/messaging/channels/metadata.test.ts src/lib/messaging/compiler/manifest-compiler.test.ts src/lib/messaging/compiler/workflow-planner.test.ts test/messaging-build-applier.test.ts test/policies-teams.test.ts test/process-recovery.test.ts
  • npx vitest run test/sandbox-connect-inference/auto-pair-approval.test.ts
  • npm run typecheck:cli
  • npm run test-conditionals:scan -- --top 25
  • Normal commit hooks passed, including the broad CLI hook
  • Pushes after hook-verified commits used git push --no-verify as requested

Signed-off-by: San Dang sdang@nvidia.com

Summary by CodeRabbit

Summary of Changes

New Features

  • Added Microsoft Teams as a supported messaging platform for both OpenClaw and Hermes, including Teams channel setup (credentials, allowed users, webhook port, mention mode).
  • Introduced a Teams network policy preset to enable required Microsoft/Teams endpoints.
  • Implemented Teams webhook host-forwarding with conflict detection and overlap/status reporting.

Improvements

  • Preserves messaging host-forward ports during dashboard refresh and restores them during sandbox recovery.
  • Messaging overlap warnings now include the conflicted port.
  • Rebuild and channel enable/disable flows now correctly recompute Teams host-forwarding.
  • Updated prompt behavior to no longer surface manifest placeholders.

@sandl99 sandl99 self-assigned this Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Microsoft Teams as a fully supported messaging channel across NemoClaw: Teams channel manifest with inputs, credentials, render fragments for OpenClaw and Hermes, and lifecycle hooks; host-forward planning engine integrated into the compiler and workflow planner; network policy preset with Microsoft/Azure endpoint allowlists; Hermes uv-pip package installer for Teams Python dependencies; port-conflict detection hooks with overlap status reporting; onboarding orchestration with port preservation and rollback; process recovery for webhook forwards; and comprehensive test coverage across compiler, manifests, policies, and integration scenarios.

Changes

Microsoft Teams Messaging Channel Rollout

Layer / File(s) Summary
Agent manifests, policies, Dockerfile, and documentation
agents/hermes/Dockerfile, agents/hermes/Dockerfile.base, agents/hermes/manifest.yaml, agents/openclaw/manifest.yaml, agents/hermes/policy-additions.yaml, nemoclaw-blueprint/policies/presets/teams.yaml, nemoclaw-blueprint/policies/tiers.yaml, src/lib/messaging/AGENTS.md, src/lib/tunnel/services.ts
Adds teams to supported messaging platforms in Hermes and OpenClaw manifests. Creates Teams network policy preset with Microsoft/Graph/Bot Framework endpoint allowlists. Wires Teams into the open tier. Reorders Hermes Dockerfile agent-install hook before workdir switch. Updates documentation and comments.
Manifest type contracts and host-forward specification
src/lib/messaging/manifest/types.ts, src/lib/messaging/hooks/common/config-prompt.ts
Extends ChannelManifest with hostForward?: ChannelHostForwardSpec. Adds SandboxMessagingHostForwardPlan for compiled plans. Expands ChannelAgentPackageManager to include "hermes-uv-pip". Removes placeholder from ChannelInputPromptSpec and placeholder-based hinting from config-prompt field resolution.
Teams channel manifest and template resolver
src/lib/messaging/channels/teams/manifest.ts, src/lib/messaging/channels/teams/template-resolver.ts, src/lib/messaging/channels/template-resolver.ts, src/lib/messaging/channels/built-ins.ts, src/lib/messaging/channels/slack/manifest.ts
Adds complete teamsManifest with inputs (app ID, secret, tenant ID, allowed users, webhook port, mention mode), credentials, render fragments for OpenClaw JSON and Hermes env/config, runtime visibility, agent packages (plugin + aiohttp), state persistence, rebuild hydration, and lifecycle hooks. Implements resolveTeamsTemplateReference for port/mention/allowed-ID resolution. Registers both in built-in registries.
Teams host-forward conflict and status hooks
src/lib/messaging/channels/teams/hooks/host-forward-port-conflict.ts, src/lib/messaging/channels/teams/hooks/index.ts, src/lib/messaging/hooks/builtins.ts, src/lib/messaging/channels/teams/hooks/host-forward-port-conflict.test.ts
Introduces Teams pre-enable port-conflict hook detecting and formatting port collisions across active sandboxes, status hook reporting overlaps via messaging-overlaps status output, overlap detection and formatting helpers, registration factories, and comprehensive unit tests covering conflict/overlap detection, serialized inputs, and edge cases.
Host-forward planning engine and manifest compiler integration
src/lib/messaging/compiler/engines/host-forward-engine.ts, src/lib/messaging/compiler/manifest-compiler.ts, src/lib/messaging/compiler/workflow-planner.ts, src/lib/messaging/host-forward.ts, src/lib/messaging/index.ts
Adds planHostForward engine deriving SandboxMessagingHostForwardPlan from manifest and inputs with port validation. Integrates into ManifestCompiler.compileChannel and MessagingWorkflowPlanner.refreshDerivedPlanFields with template-reference resolver support. Exports getActiveMessagingHostForward utility.
Persistence hydration and plan validation
src/lib/messaging/persistence.ts, src/lib/messaging/plan-validation.ts, src/lib/messaging/applier/setup-applier.ts, src/lib/messaging/plan-validation.test.ts
Recomputes hostForward during channel persistence normalization and manifest hydration. Adds isHostForward validation guard to parseSandboxMessagingPlan and isSerializableChannelPlan check to assertSandboxMessagingPlan to validate object shape and port ranges (1–65535).
Hermes uv-pip build applier support
src/lib/messaging/applier/build/messaging-build-applier.mts
Adds hermesUvPackages to BuildCommandResult, introduces collection and validation of Hermes Teams Python package specs, deduplication by spec string, and installation via uv pip install --no-cache against the Hermes venv Python.
Messaging host-forward onboarding and recovery
src/lib/onboard/messaging-host-forward.ts, src/lib/onboard/dashboard.ts, src/lib/onboard/agent-dashboard-forward.ts, src/lib/actions/sandbox/process-recovery.ts, src/lib/actions/sandbox/rebuild.ts, src/lib/actions/sandbox/policy-channel.ts
Adds resolveMessagingHostForward and ensureMessagingHostForwardIfConfigured with rollback-on-failure (port deduplication, forward stop, sandbox deletion, exit). Integrates forwarding port preservation and webhook setup into ensureDashboardForward and ensureAgentDashboardForward via preserveForwardPorts. Adds messaging forward recovery to checkAndRecoverSandboxProcesses. Updates planner constructor calls to pass render template resolver.
Overlap port reporting and channel metadata
src/lib/inventory/index.ts, src/lib/status-command-deps.ts, src/lib/messaging-channel-config.test.ts, src/lib/sandbox/channels.test.ts, src/lib/messaging/channels/metadata.test.ts
Extends MessagingOverlap with optional port?: number, propagates port through overlap formatting. Updates channel metadata for Teams: credential env keys, provider suffixes, policy key aliases, managed channel names, config env keys, and DM allowlist support.
Compiler, manifest, policy, and integration test coverage
src/lib/messaging/compiler/manifest-compiler.test.ts, src/lib/messaging/compiler/workflow-planner.test.ts, src/lib/messaging/channels/manifests.test.ts, src/lib/messaging/diagnostics.test.ts, src/lib/messaging/hooks/hook-runner.test.ts, src/lib/onboard/messaging-host-forward.test.ts, src/lib/onboard/agent-dashboard-forward.test.ts, src/lib/onboard/initial-policy.test.ts, test/policies-teams.test.ts, test/policies.test.ts, test/messaging-build-applier.test.ts, test/channels-add-preset.test.ts, test/sandbox-provider-cleanup.test.ts, test/messaging-plan-test-helper.ts, src/lib/agent/defs.test.ts, src/lib/inventory/index.test.ts, src/lib/onboard/messaging-prep.test.ts, src/lib/actions/sandbox/channel-status.test.ts, src/lib/actions/sandbox/policy-channel-conflict.test.ts
Adds comprehensive Teams coverage: manifest compiler tests (OpenClaw and Hermes plans, env safety, defaults, port validation, host-forward cycles), workflow-planner stop/start/rebuild, built-in registry inclusion, policy preset listing and Hermes sandbox integration, messaging build applier pip install validation, channels-add workflow, sandbox prep defaults, and agent defs.

Sequence Diagram(s)

sequenceDiagram
  participant ManifestCompiler
  participant planHostForward
  participant MessagingWorkflowPlanner
  participant refreshDerivedPlanFields

  ManifestCompiler->>planHostForward: compileChannel(manifest, inputs, active, resolver)
  planHostForward-->>ManifestCompiler: SandboxMessagingHostForwardPlan | undefined
  ManifestCompiler-->>MessagingWorkflowPlanner: SandboxMessagingChannelPlan with hostForward

  MessagingWorkflowPlanner->>refreshDerivedPlanFields: stop/start/rebuild plan update
  refreshDerivedPlanFields->>planHostForward: recompute hostForward per channel
  planHostForward-->>refreshDerivedPlanFields: updated SandboxMessagingHostForwardPlan
  refreshDerivedPlanFields-->>MessagingWorkflowPlanner: updated plan with hostForward and runtimeSetup
Loading
sequenceDiagram
  participant ensureDashboardForward
  participant resolveMessagingHostForwardForSandbox
  participant ensureMessagingHostForwardForSandbox
  participant ensureForward
  participant abortMessagingHostForwardFailure

  ensureDashboardForward->>resolveMessagingHostForwardForSandbox: resolve active hostForward
  resolveMessagingHostForwardForSandbox-->>ensureDashboardForward: port to preserve
  ensureDashboardForward->>ensureDashboardForward: add port to preservedPorts
  ensureDashboardForward->>ensureMessagingHostForwardForSandbox: ensure webhook forward
  ensureMessagingHostForwardForSandbox->>ensureForward: start forward(sandboxName, port, label)
  ensureForward-->>ensureMessagingHostForwardForSandbox: true / false
  alt forward fails with rollback enabled
    ensureMessagingHostForwardForSandbox->>abortMessagingHostForwardFailure: stop ports, delete sandbox
    abortMessagingHostForwardFailure-->>abortMessagingHostForwardFailure: exit(1)
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related issues

Poem

🐰 Hop hop, Teams is here at last!
A manifest grown, a webhook cast,
hostForward planned, the port secured,
Rollback on failure? That's assured.
From Hermes venv to OpenClaw's door,
This bunny codes Teams forevermore! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(messaging): onboard Microsoft Teams channel' clearly and specifically describes the main change in the changeset—adding Microsoft Teams channel support to the messaging system.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ms-teams-messaging-onboard

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the feat/ms-teams-messag... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main feat/ms-teams-messag... c130af9 +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/li...bprocess-env.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/bl...print/runner.ts 95%
nemoclaw/src/co...ration-state.ts 94%
nemoclaw/src/bl...ate-networks.ts 94%
nemoclaw/src/index.ts 94%

TypeScript / code-coverage/cli

The overall coverage in the feat/ms-teams-messag... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main feat/ms-teams-messag... c130af9 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/inference/local.ts 76%
src/lib/sandbox/config.ts 72%
src/lib/actions...dbox/rebuild.ts 69%
src/lib/onboard/preflight.ts 64%
src/lib/actions...licy-channel.ts 58%
src/lib/state/sandbox.ts 55%
src/lib/onboard...er-gpu-patch.ts 50%
src/lib/policy/index.ts 49%
src/lib/onboard.ts 18%

Updated June 24, 2026 12:38 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: channels-add-remove, channels-stop-start, network-policy, messaging-providers, rebuild-hermes, rebuild-openclaw, cloud-onboard
Optional E2E: hermes-e2e, sandbox-rebuild, messaging-compatible-endpoint

Dispatch hint: channels-add-remove-vitest,channels-stop-start-vitest,network-policy-vitest,messaging-providers-vitest,rebuild-hermes-vitest,rebuild-openclaw-vitest,cloud-onboard-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • channels-add-remove (high): Exercises the real CLI/OpenShell channel add/remove path, provider registration, policy widening, registry messaging plan persistence, and rebuild after channel mutation. This is the closest existing live coverage for the changed channel add lifecycle.
  • channels-stop-start (high): Exercises live channel stop/start across OpenClaw and Hermes with rebuild and provider/config preservation. Required because the PR changes start-after-rebuild and host-forward lifecycle behavior for manifest-backed channels.
  • network-policy (high): Required for the new Teams preset and open-tier policy expansion, including enforcement shape and allow/deny behavior at the OpenShell policy boundary.
  • messaging-providers (high): Covers live messaging provider registration, credential placeholder isolation, and L7 rewrite behavior for messaging tokens. The PR adds Teams credential bindings and rewrites adjacent messaging compiler/applier code.
  • rebuild-hermes (high): Required because Hermes Dockerfile/build-applier ordering, supported platforms, policy additions, and rebuild persistence are modified. This verifies a real Hermes image rebuild and runtime configuration boundary.
  • rebuild-openclaw (high): OpenClaw manifest support and shared messaging/rebuild planning changed. This verifies live OpenClaw rebuild still preserves configuration, policy, and messaging state.
  • cloud-onboard (high): Onboarding policy, dashboard forward, messaging prep, and host-forward setup code changed. This verifies the full hosted onboarding path remains functional.

Optional E2E

  • hermes-e2e (high): Useful additional confidence for Hermes image startup, hosted inference, dashboard, and agent runtime after Dockerfile and manifest changes.
  • sandbox-rebuild (high): Useful adjacent coverage for generic sandbox rebuild lifecycle, because rebuild and process recovery files changed beyond messaging-specific logic.
  • messaging-compatible-endpoint (high): Optional confidence for messaging plus inference routing compatibility after compiler/applier changes and manifest channel expansion.

New E2E recommendations

  • Teams messaging webhook lifecycle (high): Existing live channel add/remove and stop/start tests cover Telegram/Slack/Discord/WeChat/WhatsApp paths but do not appear to exercise Teams-specific MSTEAMS_PORT host-forward creation, conflict detection, rebuild re-establishment, or recover/connect re-establishment.
    • Suggested test: Add a live Teams channel lifecycle E2E that onboards a sandbox, runs channels add teams with fake Teams credentials, verifies the registry hostForward plan and openshell forward list for MSTEAMS_PORT, rebuilds, stops/starts the channel, and verifies the forward is removed or re-established as expected.
  • Teams credential rewrite and network policy (high): The PR adds Bot Framework, Azure AD, Graph, Teams, SharePoint, and OneDrive policy surfaces, but existing live messaging provider tests do not validate Teams-specific credential placeholders or request_body_credential_rewrite behavior.
    • Suggested test: Add a fake Bot Framework/Teams endpoint E2E that applies the Teams preset, sends sandbox requests using MSTEAMS_APP_PASSWORD placeholders, verifies OpenShell rewrites to the host credential without leaking raw secrets, and validates non-Teams hosts/methods remain denied.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: channels-add-remove-vitest,channels-stop-start-vitest,network-policy-vitest,messaging-providers-vitest,rebuild-hermes-vitest,rebuild-openclaw-vitest,cloud-onboard-vitest

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: channels-add-remove-vitest, channels-stop-start-vitest, messaging-providers-vitest, rebuild-openclaw-vitest, rebuild-hermes-vitest, openclaw-discord-pairing-vitest, openclaw-slack-pairing-vitest
Optional Vitest E2E scenarios: ubuntu-repo-cloud-openclaw

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=messaging-providers-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-openclaw-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-discord-pairing-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-slack-pairing-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • channels-add-remove-vitest: Exercises the live channels add/remove path affected by messaging manifest/planner/applier changes, new Teams policy/channel wiring, provider registration, registry persistence, and rebuild-after-add behavior.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest
  • channels-stop-start-vitest: Directly covers the changed channels stop/start and post-rebuild host-forward lifecycle surface for both OpenClaw and Hermes messaging plans.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest
  • messaging-providers-vitest: Targets the changed messaging provider, manifest compiler, workflow planner, hook, persistence, and channel metadata surfaces without requiring a full scenario fan-out.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=messaging-providers-vitest
  • rebuild-openclaw-vitest: Rebuild and process recovery logic changed, including messaging host-forward recovery after rebuild; run the focused OpenClaw rebuild live job.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-openclaw-vitest
  • rebuild-hermes-vitest: Hermes image/build changes plus shared rebuild/process recovery changes require the focused Hermes rebuild live job.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes-vitest
  • openclaw-discord-pairing-vitest: The changed openclaw-pairing-helpers.ts file is imported by the Discord pairing live test, so this job exercises the affected helper surface.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-discord-pairing-vitest
  • openclaw-slack-pairing-vitest: The changed openclaw-pairing-helpers.ts file is imported by the Slack pairing live test, so this job exercises the affected helper surface.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-slack-pairing-vitest

Optional Vitest E2E scenarios

  • ubuntu-repo-cloud-openclaw: Optional registry-backed baseline smoke for OpenClaw manifest/policy changes; the required free-standing jobs are more targeted for this PR's messaging and rebuild surfaces.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-openclaw

Relevant changed files

  • agents/hermes/Dockerfile
  • agents/hermes/Dockerfile.base
  • agents/hermes/manifest.yaml
  • agents/hermes/policy-additions.yaml
  • agents/openclaw/manifest.yaml
  • nemoclaw-blueprint/policies/presets/teams.yaml
  • nemoclaw-blueprint/policies/tiers.yaml
  • src/lib/actions/sandbox/messaging-host-forward-lifecycle.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/process-recovery.ts
  • src/lib/actions/sandbox/rebuild.ts
  • src/lib/inventory/index.ts
  • src/lib/messaging/applier/build/messaging-build-applier.mts
  • src/lib/messaging/applier/setup-applier.ts
  • src/lib/messaging/channels/built-ins.ts
  • src/lib/messaging/channels/slack/manifest.ts
  • src/lib/messaging/channels/teams/hooks/host-forward-port-conflict.ts
  • src/lib/messaging/channels/teams/hooks/index.ts
  • src/lib/messaging/channels/teams/manifest.ts
  • src/lib/messaging/channels/teams/template-resolver.ts
  • src/lib/messaging/channels/template-resolver.ts
  • src/lib/messaging/compiler/engines/host-forward-engine.ts
  • src/lib/messaging/compiler/manifest-compiler.ts
  • src/lib/messaging/compiler/workflow-planner.ts
  • src/lib/messaging/hooks/builtins.ts
  • src/lib/messaging/hooks/common/config-prompt.ts
  • src/lib/messaging/host-forward.ts
  • src/lib/messaging/index.ts
  • src/lib/messaging/manifest/types.ts
  • src/lib/messaging/persistence.ts
  • src/lib/messaging/plan-validation.ts
  • src/lib/onboard/agent-dashboard-forward.ts
  • src/lib/onboard/dashboard.ts
  • src/lib/onboard/messaging-host-forward.ts
  • src/lib/onboard/messaging-prep.test.ts
  • src/lib/status-command-deps.ts
  • src/lib/tunnel/services.ts
  • test/e2e-scenario/live/openclaw-pairing-helpers.ts

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Source-of-truth review needed: Teams pre-enable registry read failure.
Open items: 0 required · 7 warnings · 0 suggestions · 8 test follow-ups
Since last review: 1 prior item resolved · 5 still apply · 1 new item found

Action checklist

  • PRA-1 Resolve or justify: Source-of-truth review needed: Teams pre-enable registry read failure
  • PRA-2 Resolve or justify: Teams host-forward port conflict guard still fails open when registry reads fail in src/lib/actions/sandbox/policy-channel.ts:460
  • PRA-3 Resolve or justify: Teams IDs and user allowlist are not locally format-validated and empty allowlist is open by default in src/lib/messaging/channels/teams/manifest.ts:52
  • PRA-4 Resolve or justify: Teams policy introduces broad connector and SharePoint egress that still needs least-privilege justification in nemoclaw-blueprint/policies/presets/teams.yaml:43
  • PRA-5 Resolve or justify: Root-time Hermes Teams Python installs are exact-pinned but not hash-locked in src/lib/messaging/channels/teams/manifest.ts:192
  • PRA-6 Resolve or justify: User-facing Teams setup and security semantics are undocumented
  • PRA-7 Resolve or justify: Runtime validation is still needed for Teams image, policy, and host-forward behavior
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Runtime validation is still needed for Teams image, policy, and host-forward behavior
  • PRA-T7 Add or justify test follow-up: Acceptance clause
  • PRA-T8 Add or justify test follow-up: Teams pre-enable registry read failure

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Resolve/justify security src/lib/actions/sandbox/policy-channel.ts:460 Treat registry-read failures as fail-closed for pre-enable hooks that require registry context for host-forward ownership, unless `--force` is explicitly supplied. If Slack or other non-port checks must stay fail-soft, distinguish their hook class from Teams host-forward conflict checks.
PRA-3 Resolve/justify security src/lib/messaging/channels/teams/manifest.ts:52 Either add manifest-level format validation for app ID, tenant ID, and allowed-user object IDs, or add an explicit open-mode input/confirmation that documents and records the no-allowlist choice. Keep the existing CR/LF rejection, but do not rely on downstream validation as the only local guard for security-sensitive identifiers.
PRA-4 Resolve/justify security nemoclaw-blueprint/policies/presets/teams.yaml:43 Add a policy validation note or manifest validation warning documenting why the connector wildcard and SharePoint wildcard are the least-privilege shape available for Teams. Keep or extend tests proving writes remain confined to the connector host and Graph/SharePoint/Teams media hosts stay read-only.
PRA-5 Resolve/justify security src/lib/messaging/channels/teams/manifest.ts:192 Add review evidence for these exact package versions and their transitive dependency posture, or use a hash/lock mechanism if that is the repository standard for root-time image dependencies. Preserve the trusted-manifest recheck because it protects the serialized-plan boundary.
PRA-6 Resolve/justify docs Add current-PR user documentation for Teams covering Microsoft app setup, credential names and aliases, allowed-user/open-mode semantics, webhook public URL and `MSTEAMS_PORT`, policy scope, Hermes/OpenClaw differences, and expected add/start/stop/rebuild/recover behavior.
PRA-7 Resolve/justify tests Add or identify targeted runtime validation for the changed behavior. Keep it focused on the Teams image/policy/forwarding contract rather than adding a new framework layer.
Review findings by urgency: 0 required fixes, 7 items to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Source-of-truth review needed: Teams pre-enable registry read failure

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Missing: `teams pre-enable aborts on registry read failure unless force before provider policy or plan mutation`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `checkMessagingPreEnableHooks()` catches registry errors and returns true before running the Teams `teams.hostForwardPortConflict` hook.

PRA-2 Resolve/justify — Teams host-forward port conflict guard still fails open when registry reads fail

  • Location: src/lib/actions/sandbox/policy-channel.ts:460
  • Category: security
  • Problem: `checkMessagingPreEnableHooks()` catches `registry.listSandboxes()` failures, logs `Could not verify messaging pre-enable checks`, and returns `true`. For Teams, that pre-enable hook is the only local guard that checks whether another active sandbox already owns the requested `MSTEAMS_PORT` before provider, policy, and plan mutation.
  • Impact: If the registry is unreadable or malformed, a Teams channel add can proceed without verifying local webhook port ownership. Two active sandboxes can then contend for the same inbound Teams callback forward, leaving one sandbox stealing, masking, or blackholing another sandbox's `/api/messages` traffic.
  • Recommended action: Treat registry-read failures as fail-closed for pre-enable hooks that require registry context for host-forward ownership, unless `--force` is explicitly supplied. If Slack or other non-port checks must stay fail-soft, distinguish their hook class from Teams host-forward conflict checks.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `src/lib/actions/sandbox/policy-channel.ts` around `checkMessagingPreEnableHooks()` and confirm the `catch` block no longer returns success for Teams host-forward pre-enable checks; then inspect `src/lib/messaging/channels/teams/manifest.ts` lines 237-241 for the registry-dependent `teams.hostForwardPortConflict` hook.
  • Missing regression test: Add `teams pre-enable aborts on registry read failure unless force before provider policy or plan mutation`, asserting non-interactive `channels add teams` exits before `upsertMessagingProviders`, `applyPreset`, or `updateSandbox`, and a separate `--force` case proceeds with an explicit warning.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `src/lib/actions/sandbox/policy-channel.ts` around `checkMessagingPreEnableHooks()` and confirm the `catch` block no longer returns success for Teams host-forward pre-enable checks; then inspect `src/lib/messaging/channels/teams/manifest.ts` lines 237-241 for the registry-dependent `teams.hostForwardPortConflict` hook.
  • Evidence: The current `catch` in `checkMessagingPreEnableHooks()` logs a warning and `return true`; `teamsManifest` declares `teams-host-forward-port-conflict` in the `pre-enable` phase with `onFailure: "abort"`, but that hook is never run when registry enumeration throws.

PRA-3 Resolve/justify — Teams IDs and user allowlist are not locally format-validated and empty allowlist is open by default

  • Location: src/lib/messaging/channels/teams/manifest.ts:52
  • Category: security
  • Problem: The Teams manifest requires app ID, client secret, and tenant ID, but the app ID, tenant ID, and `TEAMS_ALLOWED_USERS` config inputs do not declare `formatPattern` constraints. `TEAMS_ALLOWED_USERS` is optional, and the compiler test explicitly proves Teams remains active with no allowlist and renders no `dmPolicy` or `allowFrom` fields.
  • Impact: Operators can enable a public Teams webhook with malformed Microsoft identifiers or with no local user allowlist/open-mode acknowledgement. Downstream Microsoft or agent validation may reject bad values later, but NemoClaw will already have persisted channel state, widened policy, and potentially exposed the webhook forward.
  • Recommended action: Either add manifest-level format validation for app ID, tenant ID, and allowed-user object IDs, or add an explicit open-mode input/confirmation that documents and records the no-allowlist choice. Keep the existing CR/LF rejection, but do not rely on downstream validation as the only local guard for security-sensitive identifiers.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `src/lib/messaging/channels/teams/manifest.ts` inputs for `formatPattern` and inspect `src/lib/messaging/compiler/manifest-compiler.test.ts` test `keeps Microsoft Teams active when no explicit user allowlist is provided`.
  • Missing regression test: Add `teams app tenant and allowed user ids reject malformed values before rendering`, plus either `teams add requires explicit open mode when allowed users are empty` or a test proving the recorded open-mode choice is rendered and surfaced in status.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `src/lib/messaging/channels/teams/manifest.ts` inputs for `formatPattern` and inspect `src/lib/messaging/compiler/manifest-compiler.test.ts` test `keeps Microsoft Teams active when no explicit user allowlist is provided`.
  • Evidence: The manifest has `formatPattern` only on none of the Teams ID inputs; `manifest-compiler.test.ts` asserts Teams is active with `TEAMS_ALLOWED_USERS: undefined` and that rendered config omits `dmPolicy` and `allowFrom`.

PRA-4 Resolve/justify — Teams policy introduces broad connector and SharePoint egress that still needs least-privilege justification

  • Location: nemoclaw-blueprint/policies/presets/teams.yaml:43
  • Category: security
  • Problem: The Teams preset grants `smba.trafficmanager.net` GET/POST/PUT/DELETE over `/**` and read-only access to `*.sharepoint.com` and `1drv.ms`. The PR added useful comments and tests that Graph/media remain GET-only, but the broad connector path/method set and SharePoint wildcard are still high-risk policy expansion.
  • Impact: The open policy tier now includes a Microsoft/Bot Framework/SharePoint egress surface. If these host/path scopes are broader than the Teams SDK actually requires, compromised or misbehaving in-sandbox code could reach unnecessary Microsoft resources through the allowed binaries.
  • Recommended action: Add a policy validation note or manifest validation warning documenting why the connector wildcard and SharePoint wildcard are the least-privilege shape available for Teams. Keep or extend tests proving writes remain confined to the connector host and Graph/SharePoint/Teams media hosts stay read-only.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `nemoclaw-blueprint/policies/presets/teams.yaml` and `agents/hermes/policy-additions.yaml` for the Teams endpoint lists; inspect `test/policies-teams.test.ts` to confirm current method-scoping assertions.
  • Missing regression test: Add `teams policy denies POST to graph microsoft and sharepoint while allowing connector POST`, using the policy parser or gateway policy fixture to prove non-connector writes are rejected while Bot Connector writes remain allowed.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `nemoclaw-blueprint/policies/presets/teams.yaml` and `agents/hermes/policy-additions.yaml` for the Teams endpoint lists; inspect `test/policies-teams.test.ts` to confirm current method-scoping assertions.
  • Evidence: `test/policies-teams.test.ts` asserts `graph.microsoft.com`, Teams CDN, and `*.sharepoint.com` are GET-only and `smba.trafficmanager.net` allows GET/POST/PUT/DELETE; the policy comments state SDK service URLs vary by tenant/region but do not provide a user-facing validation warning.

PRA-5 Resolve/justify — Root-time Hermes Teams Python installs are exact-pinned but not hash-locked

  • Location: src/lib/messaging/channels/teams/manifest.ts:192
  • Category: security
  • Problem: The PR adds Hermes root-time package installs for `microsoft-teams-apps==2.0.13.4` and `aiohttp==3.14.1`. The build applier now restricts serialized plan package installs to exact-pinned specs declared by trusted built-in manifests, which is a good tamper check, but the install still resolves transitive dependencies from PyPI without hashes or a lockfile.
  • Impact: A compromised package release, dependency confusion in transitive resolution, or unexpected upstream yanking/rebuild can affect the sandbox image build at root time. This is supply-chain exposure on a high-risk installer path.
  • Recommended action: Add review evidence for these exact package versions and their transitive dependency posture, or use a hash/lock mechanism if that is the repository standard for root-time image dependencies. Preserve the trusted-manifest recheck because it protects the serialized-plan boundary.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `src/lib/messaging/applier/build/messaging-build-applier.mts` functions `collectHermesMessagingUvPackageInstalls()` and `installHermesMessagingUvPackages()` and the tests around `rejects Hermes Python packages not declared by trusted built-in channel manifests`.
  • Missing regression test: Existing coverage proves tampered Hermes package specs are rejected. Add or identify a package-lock/hash verification test if hash-locked installs are adopted, or add a checked-in review artifact test that the approved package list exactly matches the manifest.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `src/lib/messaging/applier/build/messaging-build-applier.mts` functions `collectHermesMessagingUvPackageInstalls()` and `installHermesMessagingUvPackages()` and the tests around `rejects Hermes Python packages not declared by trusted built-in channel manifests`.
  • Evidence: `messaging-build-applier.mts` runs `uv pip install --python /opt/hermes/.venv/bin/python --no-cache -- ...selectedPackages`; tests confirm only `microsoft-teams-apps==2.0.13.4` and `aiohttp==3.14.1` are collected for Hermes Teams and tampered packages are rejected.

PRA-6 Resolve/justify — User-facing Teams setup and security semantics are undocumented

  • Location: not file-specific
  • Category: docs
  • Problem: The PR adds a new public-webhook messaging channel, new credentials, optional allowlist behavior, host-forward lifecycle behavior, and broad policy scope, but no user-facing Teams documentation was added. The only changed prose is maintainer-facing messaging guidance.
  • Impact: Operators may expose a Teams webhook without understanding required Microsoft app setup, which environment variables are secrets, how `TEAMS_ALLOWED_USERS` changes authorization, how to choose/avoid port conflicts, what policy egress is opened, or how rebuild/start/recover affects the host forward.
  • Recommended action: Add current-PR user documentation for Teams covering Microsoft app setup, credential names and aliases, allowed-user/open-mode semantics, webhook public URL and `MSTEAMS_PORT`, policy scope, Hermes/OpenClaw differences, and expected add/start/stop/rebuild/recover behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read-only check: `find docs -iname '*teams*'` returns no Teams documentation; inspect `src/lib/messaging/AGENTS.md` to confirm it is contributor guidance rather than user setup docs.
  • Missing regression test: If docs are generated, add or identify the existing docs build/link check that includes the new Teams page and validates its frontmatter/SPDX metadata.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read-only check: `find docs -iname '*teams*'` returns no Teams documentation; inspect `src/lib/messaging/AGENTS.md` to confirm it is contributor guidance rather than user setup docs.
  • Evidence: The deterministic file list has no Teams docs under `docs/`; `src/lib/messaging/AGENTS.md` changed, but it documents how maintainers add channels, not how users configure Teams safely.

PRA-7 Resolve/justify — Runtime validation is still needed for Teams image, policy, and host-forward behavior

  • Location: not file-specific
  • Category: tests
  • Problem: The unit and fixture coverage is broad, but this PR changes Docker image build phases, root-time Hermes package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those paths need targeted runtime validation beyond mocked unit boundaries.
  • Impact: A mocked or fixture-only pass can miss image-layer failures, OpenShell forward lifecycle behavior, actual policy-deny behavior, or Hermes package installation problems that only appear in a built sandbox.
  • Recommended action: Add or identify targeted runtime validation for the changed behavior. Keep it focused on the Teams image/policy/forwarding contract rather than adding a new framework layer.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect changed runtime surfaces: `agents/hermes/Dockerfile`, `agents/hermes/policy-additions.yaml`, `nemoclaw-blueprint/policies/presets/teams.yaml`, `src/lib/actions/sandbox/messaging-host-forward-lifecycle.ts`, `src/lib/actions/sandbox/process-recovery.ts`, and the existing unit tests in `test/process-recovery.test.ts` and `test/policies-teams.test.ts`.
  • Missing regression test: Add or identify runtime tests named `hermes teams image installs selected packages into opt hermes venv`, `teams host forward starts after channels add start and rebuild`, `teams duplicate MSTEAMS_PORT is blocked before mutation`, and `teams policy enforces connector writes while graph and sharepoint writes are denied`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect changed runtime surfaces: `agents/hermes/Dockerfile`, `agents/hermes/policy-additions.yaml`, `nemoclaw-blueprint/policies/presets/teams.yaml`, `src/lib/actions/sandbox/messaging-host-forward-lifecycle.ts`, `src/lib/actions/sandbox/process-recovery.ts`, and the existing unit tests in `test/process-recovery.test.ts` and `test/policies-teams.test.ts`.
  • Evidence: The validation context classified Dockerfiles, agent manifests, Teams policies, tiers, and `messaging-host-forward-lifecycle.ts` as requiring runtime/sandbox/infrastructure validation. Existing tests cover planning, fixtures, and mocked OpenShell calls but do not build or exercise a live Teams sandbox.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — hermes teams image installs selected packages into opt hermes venv. Static coverage is broad, but the PR changes Docker image build behavior, root-time package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those runtime/sandbox boundaries are high-risk and cannot be fully validated by mocked unit tests.
  • PRA-T2 Runtime validation — teams host forward starts after channels add start and rebuild. Static coverage is broad, but the PR changes Docker image build behavior, root-time package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those runtime/sandbox boundaries are high-risk and cannot be fully validated by mocked unit tests.
  • PRA-T3 Runtime validation — teams duplicate MSTEAMS_PORT is blocked before provider policy or plan mutation. Static coverage is broad, but the PR changes Docker image build behavior, root-time package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those runtime/sandbox boundaries are high-risk and cannot be fully validated by mocked unit tests.
  • PRA-T4 Runtime validation — teams policy enforces connector writes while graph and sharepoint writes are denied. Static coverage is broad, but the PR changes Docker image build behavior, root-time package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those runtime/sandbox boundaries are high-risk and cannot be fully validated by mocked unit tests.
  • PRA-T5 Runtime validation — teams app tenant and allowed user ids reject malformed values before rendering. Static coverage is broad, but the PR changes Docker image build behavior, root-time package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those runtime/sandbox boundaries are high-risk and cannot be fully validated by mocked unit tests.
  • PRA-T6 Runtime validation is still needed for Teams image, policy, and host-forward behavior — Add or identify targeted runtime validation for the changed behavior. Keep it focused on the Teams image/policy/forwarding contract rather than adding a new framework layer.
  • PRA-T7 Acceptance clause — No linked issue acceptance clauses were provided in the deterministic validation context. — add test evidence or identify existing coverage. `pr_review_validation_context.linkedIssues` is empty. The PR body mentions `Part of feat(messaging): onboard additional experimental messaging channels #5492`, but no linked issue clauses or comments were attached for literal acceptance mapping.
  • PRA-T8 Teams pre-enable registry read failure — Missing: `teams pre-enable aborts on registry read failure unless force before provider policy or plan mutation`.. `checkMessagingPreEnableHooks()` catches registry errors and returns true before running the Teams `teams.hostForwardPortConflict` hook.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: Teams pre-enable registry read failure

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Missing: `teams pre-enable aborts on registry read failure unless force before provider policy or plan mutation`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `checkMessagingPreEnableHooks()` catches registry errors and returns true before running the Teams `teams.hostForwardPortConflict` hook.

PRA-2 Resolve/justify — Teams host-forward port conflict guard still fails open when registry reads fail

  • Location: src/lib/actions/sandbox/policy-channel.ts:460
  • Category: security
  • Problem: `checkMessagingPreEnableHooks()` catches `registry.listSandboxes()` failures, logs `Could not verify messaging pre-enable checks`, and returns `true`. For Teams, that pre-enable hook is the only local guard that checks whether another active sandbox already owns the requested `MSTEAMS_PORT` before provider, policy, and plan mutation.
  • Impact: If the registry is unreadable or malformed, a Teams channel add can proceed without verifying local webhook port ownership. Two active sandboxes can then contend for the same inbound Teams callback forward, leaving one sandbox stealing, masking, or blackholing another sandbox's `/api/messages` traffic.
  • Recommended action: Treat registry-read failures as fail-closed for pre-enable hooks that require registry context for host-forward ownership, unless `--force` is explicitly supplied. If Slack or other non-port checks must stay fail-soft, distinguish their hook class from Teams host-forward conflict checks.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `src/lib/actions/sandbox/policy-channel.ts` around `checkMessagingPreEnableHooks()` and confirm the `catch` block no longer returns success for Teams host-forward pre-enable checks; then inspect `src/lib/messaging/channels/teams/manifest.ts` lines 237-241 for the registry-dependent `teams.hostForwardPortConflict` hook.
  • Missing regression test: Add `teams pre-enable aborts on registry read failure unless force before provider policy or plan mutation`, asserting non-interactive `channels add teams` exits before `upsertMessagingProviders`, `applyPreset`, or `updateSandbox`, and a separate `--force` case proceeds with an explicit warning.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `src/lib/actions/sandbox/policy-channel.ts` around `checkMessagingPreEnableHooks()` and confirm the `catch` block no longer returns success for Teams host-forward pre-enable checks; then inspect `src/lib/messaging/channels/teams/manifest.ts` lines 237-241 for the registry-dependent `teams.hostForwardPortConflict` hook.
  • Evidence: The current `catch` in `checkMessagingPreEnableHooks()` logs a warning and `return true`; `teamsManifest` declares `teams-host-forward-port-conflict` in the `pre-enable` phase with `onFailure: "abort"`, but that hook is never run when registry enumeration throws.

PRA-3 Resolve/justify — Teams IDs and user allowlist are not locally format-validated and empty allowlist is open by default

  • Location: src/lib/messaging/channels/teams/manifest.ts:52
  • Category: security
  • Problem: The Teams manifest requires app ID, client secret, and tenant ID, but the app ID, tenant ID, and `TEAMS_ALLOWED_USERS` config inputs do not declare `formatPattern` constraints. `TEAMS_ALLOWED_USERS` is optional, and the compiler test explicitly proves Teams remains active with no allowlist and renders no `dmPolicy` or `allowFrom` fields.
  • Impact: Operators can enable a public Teams webhook with malformed Microsoft identifiers or with no local user allowlist/open-mode acknowledgement. Downstream Microsoft or agent validation may reject bad values later, but NemoClaw will already have persisted channel state, widened policy, and potentially exposed the webhook forward.
  • Recommended action: Either add manifest-level format validation for app ID, tenant ID, and allowed-user object IDs, or add an explicit open-mode input/confirmation that documents and records the no-allowlist choice. Keep the existing CR/LF rejection, but do not rely on downstream validation as the only local guard for security-sensitive identifiers.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `src/lib/messaging/channels/teams/manifest.ts` inputs for `formatPattern` and inspect `src/lib/messaging/compiler/manifest-compiler.test.ts` test `keeps Microsoft Teams active when no explicit user allowlist is provided`.
  • Missing regression test: Add `teams app tenant and allowed user ids reject malformed values before rendering`, plus either `teams add requires explicit open mode when allowed users are empty` or a test proving the recorded open-mode choice is rendered and surfaced in status.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `src/lib/messaging/channels/teams/manifest.ts` inputs for `formatPattern` and inspect `src/lib/messaging/compiler/manifest-compiler.test.ts` test `keeps Microsoft Teams active when no explicit user allowlist is provided`.
  • Evidence: The manifest has `formatPattern` only on none of the Teams ID inputs; `manifest-compiler.test.ts` asserts Teams is active with `TEAMS_ALLOWED_USERS: undefined` and that rendered config omits `dmPolicy` and `allowFrom`.

PRA-4 Resolve/justify — Teams policy introduces broad connector and SharePoint egress that still needs least-privilege justification

  • Location: nemoclaw-blueprint/policies/presets/teams.yaml:43
  • Category: security
  • Problem: The Teams preset grants `smba.trafficmanager.net` GET/POST/PUT/DELETE over `/**` and read-only access to `*.sharepoint.com` and `1drv.ms`. The PR added useful comments and tests that Graph/media remain GET-only, but the broad connector path/method set and SharePoint wildcard are still high-risk policy expansion.
  • Impact: The open policy tier now includes a Microsoft/Bot Framework/SharePoint egress surface. If these host/path scopes are broader than the Teams SDK actually requires, compromised or misbehaving in-sandbox code could reach unnecessary Microsoft resources through the allowed binaries.
  • Recommended action: Add a policy validation note or manifest validation warning documenting why the connector wildcard and SharePoint wildcard are the least-privilege shape available for Teams. Keep or extend tests proving writes remain confined to the connector host and Graph/SharePoint/Teams media hosts stay read-only.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `nemoclaw-blueprint/policies/presets/teams.yaml` and `agents/hermes/policy-additions.yaml` for the Teams endpoint lists; inspect `test/policies-teams.test.ts` to confirm current method-scoping assertions.
  • Missing regression test: Add `teams policy denies POST to graph microsoft and sharepoint while allowing connector POST`, using the policy parser or gateway policy fixture to prove non-connector writes are rejected while Bot Connector writes remain allowed.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `nemoclaw-blueprint/policies/presets/teams.yaml` and `agents/hermes/policy-additions.yaml` for the Teams endpoint lists; inspect `test/policies-teams.test.ts` to confirm current method-scoping assertions.
  • Evidence: `test/policies-teams.test.ts` asserts `graph.microsoft.com`, Teams CDN, and `*.sharepoint.com` are GET-only and `smba.trafficmanager.net` allows GET/POST/PUT/DELETE; the policy comments state SDK service URLs vary by tenant/region but do not provide a user-facing validation warning.

PRA-5 Resolve/justify — Root-time Hermes Teams Python installs are exact-pinned but not hash-locked

  • Location: src/lib/messaging/channels/teams/manifest.ts:192
  • Category: security
  • Problem: The PR adds Hermes root-time package installs for `microsoft-teams-apps==2.0.13.4` and `aiohttp==3.14.1`. The build applier now restricts serialized plan package installs to exact-pinned specs declared by trusted built-in manifests, which is a good tamper check, but the install still resolves transitive dependencies from PyPI without hashes or a lockfile.
  • Impact: A compromised package release, dependency confusion in transitive resolution, or unexpected upstream yanking/rebuild can affect the sandbox image build at root time. This is supply-chain exposure on a high-risk installer path.
  • Recommended action: Add review evidence for these exact package versions and their transitive dependency posture, or use a hash/lock mechanism if that is the repository standard for root-time image dependencies. Preserve the trusted-manifest recheck because it protects the serialized-plan boundary.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect `src/lib/messaging/applier/build/messaging-build-applier.mts` functions `collectHermesMessagingUvPackageInstalls()` and `installHermesMessagingUvPackages()` and the tests around `rejects Hermes Python packages not declared by trusted built-in channel manifests`.
  • Missing regression test: Existing coverage proves tampered Hermes package specs are rejected. Add or identify a package-lock/hash verification test if hash-locked installs are adopted, or add a checked-in review artifact test that the approved package list exactly matches the manifest.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect `src/lib/messaging/applier/build/messaging-build-applier.mts` functions `collectHermesMessagingUvPackageInstalls()` and `installHermesMessagingUvPackages()` and the tests around `rejects Hermes Python packages not declared by trusted built-in channel manifests`.
  • Evidence: `messaging-build-applier.mts` runs `uv pip install --python /opt/hermes/.venv/bin/python --no-cache -- ...selectedPackages`; tests confirm only `microsoft-teams-apps==2.0.13.4` and `aiohttp==3.14.1` are collected for Hermes Teams and tampered packages are rejected.

PRA-6 Resolve/justify — User-facing Teams setup and security semantics are undocumented

  • Location: not file-specific
  • Category: docs
  • Problem: The PR adds a new public-webhook messaging channel, new credentials, optional allowlist behavior, host-forward lifecycle behavior, and broad policy scope, but no user-facing Teams documentation was added. The only changed prose is maintainer-facing messaging guidance.
  • Impact: Operators may expose a Teams webhook without understanding required Microsoft app setup, which environment variables are secrets, how `TEAMS_ALLOWED_USERS` changes authorization, how to choose/avoid port conflicts, what policy egress is opened, or how rebuild/start/recover affects the host forward.
  • Recommended action: Add current-PR user documentation for Teams covering Microsoft app setup, credential names and aliases, allowed-user/open-mode semantics, webhook public URL and `MSTEAMS_PORT`, policy scope, Hermes/OpenClaw differences, and expected add/start/stop/rebuild/recover behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read-only check: `find docs -iname '*teams*'` returns no Teams documentation; inspect `src/lib/messaging/AGENTS.md` to confirm it is contributor guidance rather than user setup docs.
  • Missing regression test: If docs are generated, add or identify the existing docs build/link check that includes the new Teams page and validates its frontmatter/SPDX metadata.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read-only check: `find docs -iname '*teams*'` returns no Teams documentation; inspect `src/lib/messaging/AGENTS.md` to confirm it is contributor guidance rather than user setup docs.
  • Evidence: The deterministic file list has no Teams docs under `docs/`; `src/lib/messaging/AGENTS.md` changed, but it documents how maintainers add channels, not how users configure Teams safely.

PRA-7 Resolve/justify — Runtime validation is still needed for Teams image, policy, and host-forward behavior

  • Location: not file-specific
  • Category: tests
  • Problem: The unit and fixture coverage is broad, but this PR changes Docker image build phases, root-time Hermes package installation, OpenShell host forwards, sandbox recovery, and network policy enforcement. Those paths need targeted runtime validation beyond mocked unit boundaries.
  • Impact: A mocked or fixture-only pass can miss image-layer failures, OpenShell forward lifecycle behavior, actual policy-deny behavior, or Hermes package installation problems that only appear in a built sandbox.
  • Recommended action: Add or identify targeted runtime validation for the changed behavior. Keep it focused on the Teams image/policy/forwarding contract rather than adding a new framework layer.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect changed runtime surfaces: `agents/hermes/Dockerfile`, `agents/hermes/policy-additions.yaml`, `nemoclaw-blueprint/policies/presets/teams.yaml`, `src/lib/actions/sandbox/messaging-host-forward-lifecycle.ts`, `src/lib/actions/sandbox/process-recovery.ts`, and the existing unit tests in `test/process-recovery.test.ts` and `test/policies-teams.test.ts`.
  • Missing regression test: Add or identify runtime tests named `hermes teams image installs selected packages into opt hermes venv`, `teams host forward starts after channels add start and rebuild`, `teams duplicate MSTEAMS_PORT is blocked before mutation`, and `teams policy enforces connector writes while graph and sharepoint writes are denied`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect changed runtime surfaces: `agents/hermes/Dockerfile`, `agents/hermes/policy-additions.yaml`, `nemoclaw-blueprint/policies/presets/teams.yaml`, `src/lib/actions/sandbox/messaging-host-forward-lifecycle.ts`, `src/lib/actions/sandbox/process-recovery.ts`, and the existing unit tests in `test/process-recovery.test.ts` and `test/policies-teams.test.ts`.
  • Evidence: The validation context classified Dockerfiles, agent manifests, Teams policies, tiers, and `messaging-host-forward-lifecycle.ts` as requiring runtime/sandbox/infrastructure validation. Existing tests cover planning, fixtures, and mocked OpenShell calls but do not build or exercise a live Teams sandbox.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
nemoclaw-blueprint/policies/tiers.yaml (1)

47-47: 🧹 Nitpick | 🔵 Trivial

Run network-policy-e2e for the Open-tier preset expansion.

Adding teams to the default Open tier broadens policy scope; please run the targeted network-policy job to validate deny-by-default, whitelist behavior, hot-reload, and SSRF filtering with the new preset mix.

As per coding guidelines: changes under nemoclaw-blueprint/policies/** should run network-policy-e2e.

🤖 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 `@nemoclaw-blueprint/policies/tiers.yaml` at line 47, You have modified the
network policies in the tiers.yaml file by adding teams with read-write access
to the Open tier. Per coding guidelines, any changes to
nemoclaw-blueprint/policies/** require running the network-policy-e2e test suite
to validate that the policy expansion maintains deny-by-default behavior,
whitelist functionality, hot-reload capabilities, and SSRF filtering. Run the
network-policy-e2e job to verify these behaviors work correctly with the new
teams access added to the Open tier preset.

Source: Coding guidelines

agents/hermes/policy-additions.yaml (1)

258-340: 🧹 Nitpick | 🔵 Trivial

Run the Hermes E2E set for this channel-policy addition.

This change touches Hermes channel onboarding/egress behavior, so run the Hermes-targeted nightly jobs before merge to catch policy + lifecycle regressions (hermes-e2e, hermes-inference-switch-e2e, hermes-discord-e2e, hermes-slack-e2e, hermes-onboard-security-posture-e2e, rebuild-hermes-e2e, rebuild-hermes-stale-base-e2e).

As per coding guidelines: changes under agents/hermes/** should be validated with the listed Hermes E2E jobs.

🤖 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 `@agents/hermes/policy-additions.yaml` around lines 258 - 340, Before merging
this Teams channel policy addition (which modifies the teams endpoint
configuration with various Microsoft hosts including login.microsoftonline.com,
api.botframework.com, graph.microsoft.com, and others with
request_body_credential_rewrite settings), you must run the Hermes E2E test
suite to validate that the policy changes do not introduce regressions. Execute
all of the following Hermes-targeted E2E test jobs: hermes-e2e,
hermes-inference-switch-e2e, hermes-discord-e2e, hermes-slack-e2e,
hermes-onboard-security-posture-e2e, rebuild-hermes-e2e, and
rebuild-hermes-stale-base-e2e to ensure no policy or lifecycle issues are
introduced by these changes under agents/hermes/policy-additions.yaml.

Source: Coding guidelines

🤖 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 `@docs/_components/StarterPromptButton.tsx`:
- Around line 149-153: The shell code block in StarterPromptButton.tsx uses a
generic `shell` fence instead of a language-specific one and hardcodes
`nemoclaw` commands instead of using the alias-agnostic placeholder. Change the
code fence from `shell` to `bash` to make it copyable, and replace all
occurrences of the `nemoclaw` command with `$$nemoclaw` in both the channels add
teams command and the rebuild command to ensure the example works for both
OpenClaw and Hermes environments.

In `@docs/about/overview.mdx`:
- Line 41: The table row for "Messaging channels" in the overview table contains
multiple sentences combined into a single line, which violates the markdown
guideline of one sentence per line. Locate the Messaging channels table cell and
split the content into separate lines, placing each distinct sentence on its own
line while maintaining the table's markdown structure. The cell currently has at
least two sentences about OpenShell-managed processes and NemoClaw configuration
that should each be on their own lines.

In `@src/lib/messaging/applier/build/messaging-build-applier.mts`:
- Around line 892-893: The regex pattern used to validate package specs does not
adequately prevent leading dashes, allowing malicious options like -r or
--index-url to bypass validation and be interpreted as CLI options by uv pip
install. Fix this by modifying the regex pattern to include a negative lookahead
that explicitly rejects any spec starting with a dash, and add the -- delimiter
before the selectedPackages variable when constructing the uv pip install
command to ensure all following arguments are treated as requirement specs
rather than CLI options.

In `@src/lib/onboard/messaging-host-forward.ts`:
- Around line 35-38: The normalizedPlan assignment currently falls back to the
unparsed plan value when parseSandboxMessagingPlan fails, bypassing parser
validation. Remove the ?? plan fallback from the normalizedPlan assignment so
that when parseSandboxMessagingPlan returns null or undefined, normalizedPlan
becomes null instead of reverting to the original unparsed plan, ensuring
invalid data is not passed to hydrateDerivedSandboxMessagingPlanFields.

In `@test/policies-teams.test.ts`:
- Around line 19-24: The requirePresetContent function has an if statement
checking the null condition that is causing the test-conditionals:scan CI check
to fail. Remove the if statement that tests !content and the throw statement
inside it, then use a non-null assertion operator on the return statement
instead to assert that content is truthy. Keep the expect assertion at the
beginning to maintain the test validation.

---

Nitpick comments:
In `@agents/hermes/policy-additions.yaml`:
- Around line 258-340: Before merging this Teams channel policy addition (which
modifies the teams endpoint configuration with various Microsoft hosts including
login.microsoftonline.com, api.botframework.com, graph.microsoft.com, and others
with request_body_credential_rewrite settings), you must run the Hermes E2E test
suite to validate that the policy changes do not introduce regressions. Execute
all of the following Hermes-targeted E2E test jobs: hermes-e2e,
hermes-inference-switch-e2e, hermes-discord-e2e, hermes-slack-e2e,
hermes-onboard-security-posture-e2e, rebuild-hermes-e2e, and
rebuild-hermes-stale-base-e2e to ensure no policy or lifecycle issues are
introduced by these changes under agents/hermes/policy-additions.yaml.

In `@nemoclaw-blueprint/policies/tiers.yaml`:
- Line 47: You have modified the network policies in the tiers.yaml file by
adding teams with read-write access to the Open tier. Per coding guidelines, any
changes to nemoclaw-blueprint/policies/** require running the network-policy-e2e
test suite to validate that the policy expansion maintains deny-by-default
behavior, whitelist functionality, hot-reload capabilities, and SSRF filtering.
Run the network-policy-e2e job to verify these behaviors work correctly with the
new teams access added to the Open tier preset.
🪄 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: af41e3bd-1aaa-4379-930c-8a19bf19304e

📥 Commits

Reviewing files that changed from the base of the PR and between cf403cf and 9ecbfd4.

📒 Files selected for processing (76)
  • agents/hermes/Dockerfile
  • agents/hermes/Dockerfile.base
  • agents/hermes/manifest.yaml
  • agents/hermes/policy-additions.yaml
  • agents/openclaw/manifest.yaml
  • docs/_components/StarterPromptButton.tsx
  • docs/about/overview.mdx
  • docs/deployment/brev-web-ui.mdx
  • docs/deployment/deploy-to-remote-gpu.mdx
  • docs/get-started/quickstart.mdx
  • docs/manage-sandboxes/lifecycle.mdx
  • docs/manage-sandboxes/messaging-channels.mdx
  • docs/manage-sandboxes/runtime-controls.mdx
  • docs/network-policy/customize-network-policy.mdx
  • docs/network-policy/integration-policy-examples.mdx
  • docs/reference/architecture.mdx
  • docs/reference/commands-nemohermes.mdx
  • docs/reference/commands.mdx
  • docs/reference/network-policies.mdx
  • docs/reference/troubleshooting.mdx
  • docs/security/best-practices.mdx
  • nemoclaw-blueprint/policies/presets/teams.yaml
  • nemoclaw-blueprint/policies/tiers.yaml
  • src/lib/actions/sandbox/channel-status.test.ts
  • src/lib/actions/sandbox/policy-channel-conflict.test.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/process-recovery.ts
  • src/lib/actions/sandbox/rebuild.ts
  • src/lib/agent/defs.test.ts
  • src/lib/inventory/index.test.ts
  • src/lib/inventory/index.ts
  • src/lib/messaging-channel-config.test.ts
  • src/lib/messaging/AGENTS.md
  • src/lib/messaging/applier/build/messaging-build-applier.mts
  • src/lib/messaging/applier/setup-applier.ts
  • src/lib/messaging/channels/built-ins.ts
  • src/lib/messaging/channels/manifests.test.ts
  • src/lib/messaging/channels/metadata.test.ts
  • src/lib/messaging/channels/slack/manifest.ts
  • src/lib/messaging/channels/teams/hooks/host-forward-port-conflict.test.ts
  • src/lib/messaging/channels/teams/hooks/host-forward-port-conflict.ts
  • src/lib/messaging/channels/teams/hooks/index.ts
  • src/lib/messaging/channels/teams/manifest.ts
  • src/lib/messaging/channels/teams/template-resolver.ts
  • src/lib/messaging/channels/template-resolver.ts
  • src/lib/messaging/compiler/engines/host-forward-engine.ts
  • src/lib/messaging/compiler/manifest-compiler.test.ts
  • src/lib/messaging/compiler/manifest-compiler.ts
  • src/lib/messaging/compiler/workflow-planner.test.ts
  • src/lib/messaging/compiler/workflow-planner.ts
  • src/lib/messaging/diagnostics.test.ts
  • src/lib/messaging/hooks/builtins.ts
  • src/lib/messaging/hooks/common/config-prompt.ts
  • src/lib/messaging/hooks/hook-runner.test.ts
  • src/lib/messaging/host-forward.ts
  • src/lib/messaging/index.ts
  • src/lib/messaging/manifest/types.ts
  • src/lib/messaging/persistence.ts
  • src/lib/messaging/plan-validation.test.ts
  • src/lib/messaging/plan-validation.ts
  • src/lib/onboard/agent-dashboard-forward.test.ts
  • src/lib/onboard/agent-dashboard-forward.ts
  • src/lib/onboard/dashboard.ts
  • src/lib/onboard/initial-policy.test.ts
  • src/lib/onboard/messaging-host-forward.test.ts
  • src/lib/onboard/messaging-host-forward.ts
  • src/lib/onboard/messaging-prep.test.ts
  • src/lib/sandbox/channels.test.ts
  • src/lib/status-command-deps.ts
  • src/lib/tunnel/services.ts
  • test/channels-add-preset.test.ts
  • test/messaging-build-applier.test.ts
  • test/messaging-plan-test-helper.ts
  • test/policies-teams.test.ts
  • test/policies.test.ts
  • test/sandbox-provider-cleanup.test.ts
💤 Files with no reviewable changes (2)
  • src/lib/messaging/channels/slack/manifest.ts
  • src/lib/messaging/hooks/common/config-prompt.ts

Comment thread docs/_components/StarterPromptButton.tsx Outdated
Comment thread docs/about/overview.mdx Outdated
Comment thread src/lib/messaging/applier/build/messaging-build-applier.mts Outdated
Comment thread src/lib/onboard/messaging-host-forward.ts Outdated
Comment thread test/policies-teams.test.ts Outdated
@sandl99 sandl99 added area: messaging Messaging channels, bridges, manifests, or channel lifecycle VRDC Issues and PRs submitted by NVIDIA VRDC test team. labels Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 27931132475
Target ref: feat/ms-teams-messaging-onboard
Requested jobs: messaging-providers-e2e,channels-add-remove-e2e,channels-stop-start-hermes-e2e,network-policy-e2e,hermes-root-entrypoint-smoke-e2e,rebuild-hermes-e2e,channels-stop-start-openclaw-e2e,rebuild-openclaw-e2e,sandbox-survival-e2e,tunnel-lifecycle-e2e
Summary: 10 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
channels-add-remove-e2e ✅ success
channels-stop-start-hermes-e2e ✅ success
channels-stop-start-openclaw-e2e ✅ success
hermes-root-entrypoint-smoke-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-survival-e2e ✅ success
tunnel-lifecycle-e2e ✅ success

@sandl99
sandl99 requested review from cv and ericksoa June 22, 2026 07:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/process-recovery.ts`:
- Around line 268-271: The fallback logic in parseSandboxCommandResult that uses
the nullish coalescing operator (??), executeLocalDockerSandboxCommand pattern
does not distinguish between a genuine parse failure and a case where OpenShell
already executed the command but stdout framing/marker parsing failed. This
causes non-idempotent commands to execute twice. Modify the logic to check
whether the command was actually executed in OpenShell (even if parsing failed)
before falling back to executeLocalDockerSandboxCommand. You may need to return
additional information from parseSandboxCommandResult or check the result object
directly to determine if OpenShell executed the command, and only fall back to
Docker if execution did not occur at all.
🪄 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: 04f358a6-508a-4ff0-a07e-e57eeddc9da4

📥 Commits

Reviewing files that changed from the base of the PR and between 23325a9 and 019bf70.

📒 Files selected for processing (2)
  • src/lib/actions/sandbox/process-recovery.ts
  • test/process-recovery.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/process-recovery.test.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

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/process-recovery.ts`:
- Around line 268-271: The fallback logic in parseSandboxCommandResult that uses
the nullish coalescing operator (??), executeLocalDockerSandboxCommand pattern
does not distinguish between a genuine parse failure and a case where OpenShell
already executed the command but stdout framing/marker parsing failed. This
causes non-idempotent commands to execute twice. Modify the logic to check
whether the command was actually executed in OpenShell (even if parsing failed)
before falling back to executeLocalDockerSandboxCommand. You may need to return
additional information from parseSandboxCommandResult or check the result object
directly to determine if OpenShell executed the command, and only fall back to
Docker if execution did not occur at all.
🪄 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: 04f358a6-508a-4ff0-a07e-e57eeddc9da4

📥 Commits

Reviewing files that changed from the base of the PR and between 23325a9 and 019bf70.

📒 Files selected for processing (2)
  • src/lib/actions/sandbox/process-recovery.ts
  • test/process-recovery.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/process-recovery.test.ts
🛑 Comments failed to post (1)
src/lib/actions/sandbox/process-recovery.ts (1)

268-271: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Prevent duplicate command execution on parse-only failure.

At Line 268, Docker fallback runs whenever parsing returns null. That null also includes cases where OpenShell already executed the command but stdout framing/marker parsing failed, so the same command can be executed twice (OpenShell + Docker fallback). For non-idempotent commands this can duplicate side effects.

⚙️ Proposed fix
-    return (
-      parseSandboxCommandResult(result) ??
-      executeLocalDockerSandboxCommand(sandboxName, markedCommand, effectiveTimeout)
-    );
+    const parsed = parseSandboxCommandResult(result);
+    if (parsed) return parsed;
+    if (result.error || (result.status ?? 1) !== 0) {
+      return executeLocalDockerSandboxCommand(sandboxName, markedCommand, effectiveTimeout);
+    }
+    return null;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    const parsed = parseSandboxCommandResult(result);
    if (parsed) return parsed;
    if (result.error || (result.status ?? 1) !== 0) {
      return executeLocalDockerSandboxCommand(sandboxName, markedCommand, effectiveTimeout);
    }
    return null;
🤖 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/actions/sandbox/process-recovery.ts` around lines 268 - 271, The
fallback logic in parseSandboxCommandResult that uses the nullish coalescing
operator (??), executeLocalDockerSandboxCommand pattern does not distinguish
between a genuine parse failure and a case where OpenShell already executed the
command but stdout framing/marker parsing failed. This causes non-idempotent
commands to execute twice. Modify the logic to check whether the command was
actually executed in OpenShell (even if parsing failed) before falling back to
executeLocalDockerSandboxCommand. You may need to return additional information
from parseSandboxCommandResult or check the result object directly to determine
if OpenShell executed the command, and only fall back to Docker if execution did
not occur at all.

@cv cv added v0.0.67 and removed v0.0.66 labels Jun 23, 2026
sandl99 added 3 commits June 23, 2026 10:12
…ng-onboard

# Conflicts:
#	src/lib/actions/sandbox/process-recovery.ts
#	src/lib/onboard/agent-dashboard-forward.ts
@NVIDIA NVIDIA deleted a comment from github-actions Bot Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28003939444
Target ref: feat/ms-teams-messaging-onboard
Requested jobs: messaging-providers-e2e,channels-add-remove-e2e,channels-stop-start-hermes-e2e,network-policy-e2e,hermes-root-entrypoint-smoke-e2e,rebuild-hermes-e2e,channels-stop-start-openclaw-e2e,rebuild-openclaw-e2e,sandbox-survival-e2e,tunnel-lifecycle-e2e
Summary: 10 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
channels-add-remove-e2e ✅ success
channels-stop-start-hermes-e2e ✅ success
channels-stop-start-openclaw-e2e ✅ success
hermes-root-entrypoint-smoke-e2e ✅ success
messaging-providers-e2e ✅ success
network-policy-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-openclaw-e2e ✅ success
sandbox-survival-e2e ✅ success
tunnel-lifecycle-e2e ✅ success

@NVIDIA NVIDIA deleted a comment from github-actions Bot Jun 24, 2026
@cv
cv merged commit 17d0331 into main Jun 24, 2026
106 of 113 checks passed
@cv
cv deleted the feat/ms-teams-messaging-onboard branch June 24, 2026 15:38
@miyoungc miyoungc mentioned this pull request Jun 25, 2026
21 tasks
cv pushed a commit that referenced this pull request Jun 25, 2026
<!-- 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 -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Adds experimental Microsoft Teams channel onboarding through NemoClaw's
manifest-first messaging architecture for OpenClaw and Hermes. The
change wires Teams credentials, policy presets, package installs, config
rendering, host webhook forwarding, recovery handling, and tests so
Teams participates in onboard, rebuild, and channel lifecycle flows.
### Key features
1. Adding MS Teams channel
2. Support Port forwarding for messaging channel generic. (support for
callback, bi-directional call, e.g. Chat host calls into
OpenClaw/Hermes)

### Inputs
MSTEAMS_APP_ID: ClientID - Required
MSTEAMS_APP_PASSWORD: ClientSecret - Required
MSTEAMS_TENANT_ID: TenantId - Required
MSTEAMS_ALLOWED_USERS: Optional - OpenClaw allows to pairing after
setup.

## Related Issue
Part of NVIDIA#5492

## Result 
<img width="1988" height="576" alt="image"
src="https://github.com/user-attachments/assets/d3fd0033-dfdb-4a3a-b4a8-88e75af22061"
/>

## Changes
- Add a built-in Microsoft Teams messaging manifest, template resolver,
host-forward conflict/status hooks, and manifest registration.
- Add manifest-declared host-forward planning, validation, persistence,
dashboard preservation, and process-recovery support for webhook ports
such as `MSTEAMS_PORT`.
- Add Teams network policy presets plus OpenClaw and Hermes
package/config integration.
- Treat the Teams user allowlist as optional, pin Hermes Teams PyPI
packages, narrow Graph egress to read-only GET, and fail closed on
malformed persisted host-forward plans.
- Update messaging metadata, inventory/status surfaces, and channel
commands for Teams setup and lifecycle behavior.
- Add focused tests for Teams manifests, hooks, policy presets, build
applier behavior, host forwarding, rebuild hydration, process recovery,
and channel lifecycle handling.
- Leave user-facing documentation to a follow-up docs-owner change.

## PR Review Advisor justification

PR Review Advisor follow-up:
NVIDIA#5585 (comment)

- `PRA-1`: `TEAMS_ALLOWED_USERS` is intentionally **optional**.
Microsoft app, tenant, and Bot Framework auth are the primary boundary;
allowed_list can be added later via openclaw.
- `PRA-2`: The plan-tampering risk is addressed by exact pins plus the
trusted built-in manifest recheck. Hash/lockfile verification is broader
supply-chain hardening and can be tracked separately.
- `PRA-3`: Addressed in `8ab7b004f`: Graph is now read-only in both
Teams policy sources, and the remaining Bot Connector wildcard is
documented and tested as method-scoped because SDK service URLs vary by
tenant/region.
- `PRA-4`: Deferred for now. Teams IDs come from Microsoft tooling and
are validated downstream; adding strict manifest regexes risks rejecting
legitimate forms before we have stronger runtime evidence.

No additional mocked tests added for the justified items; real Teams E2E
needs an external Microsoft tenant/app.

## 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)

Verification run:
- `npm run build:cli`
- `npx vitest run src/lib/onboard/messaging-host-forward.test.ts
src/lib/messaging/channels/manifests.test.ts
src/lib/messaging/channels/metadata.test.ts
src/lib/messaging/compiler/manifest-compiler.test.ts
src/lib/messaging/compiler/workflow-planner.test.ts
test/messaging-build-applier.test.ts test/policies-teams.test.ts
test/process-recovery.test.ts`
- `npx vitest run
test/sandbox-connect-inference/auto-pair-approval.test.ts`
- `npm run typecheck:cli`
- `npm run test-conditionals:scan -- --top 25`
- Normal commit hooks passed, including the broad CLI hook
- Pushes after hook-verified commits used `git push --no-verify` as
requested

---
Signed-off-by: San Dang <sdang@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary of Changes

**New Features**
- Added **Microsoft Teams** as a supported messaging platform for both
**OpenClaw** and **Hermes**, including Teams channel setup (credentials,
allowed users, webhook port, mention mode).
- Introduced a **Teams network policy preset** to enable required
Microsoft/Teams endpoints.
- Implemented **Teams webhook host-forwarding** with **conflict
detection** and **overlap/status reporting**.

**Improvements**
- Preserves messaging host-forward ports during dashboard refresh and
restores them during sandbox recovery.
- Messaging overlap warnings now include the **conflicted port**.
- Rebuild and channel enable/disable flows now correctly recompute Teams
host-forwarding.
- Updated prompt behavior to no longer surface manifest placeholders.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: San Dang <sdang@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- 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 -->
prekshivyas pushed a commit that referenced this pull request Aug 3, 2026
…7875)

<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 plain sentences: what changes and why. Describe
before-and-after behavior when it applies. Follow the NemoClaw Writing
Guide: https://github.com/NVIDIA/NemoClaw/blob/main/WRITING.md. Do not
add unrelated prose cleanup. -->
Add Microsoft Teams to the `channels-stop-start` live E2E matrix for
OpenClaw and Hermes.
The test now covers existing Microsoft Teams onboarding, configuration
rendering, provider creation, network policy, and channel lifecycle
behavior.

## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->
Related: #5585

## Changes
<!-- List concrete changes. If this adds an abstraction, configuration,
fallback, migration, or compatibility path, name its current requirement
and consumer, explain why a direct change is insufficient, and identify
the test that protects it. -->
- Add `teams` to the `channels-stop-start` matrix for both agent
runtimes.
- Add test inputs for the `{sandbox}-teams-bridge` provider, fake
`MSTEAMS_*` and `TEAMS_*` environment-variable values, and Microsoft
Teams plan assertions.
- Map the OpenClaw test key from `teams` to `msteams` so the test reads
`channels.msteams`.
- Assert that the Hermes `.env` file contains
`TEAMS_CLIENT_SECRET=openshell:resolve:env:MSTEAMS_APP_PASSWORD`.
- Limit the change to the E2E test harness. It does not change
production code, a schema, the CLI, configuration behavior, or a
supported surface.

## 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)

## Quality Gates
<!-- Check one tests line and one docs line. Check other lines when
applicable. Add every requested justification or approval reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This change expands live E2E
coverage for existing behavior.
`docs/manage-sandboxes/set-up-microsoft-teams.mdx` already documents
Microsoft Teams for OpenClaw and Hermes, including the environment
variables exercised by this test. No command, flag, configuration
behavior, or supported surface changes.
- [ ] 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:

## Documentation Writer Review
<!-- Required for code and documentation changes after the changes and
applicable validation are complete. Keep one review checkbox and one
instance of each visible or hidden field. For Evidence, list changed
documentation paths. For documentation-only changes, also state that the
writing rules and documentation style were reviewed. For other results,
explain why no documentation change is needed or why the review is
blocked. For Agent, use a consistent product and surface name, such as
Codex Desktop, Codex CLI, Claude Code, or Cursor. After committing all
review changes, put `git rev-parse --short HEAD` and `git rev-parse
--short HEAD:AGENTS.md` in the hidden metadata below. Rerun the review
and refresh that metadata after any new commit. This receipt is advisory
during the data-collection pilot. -->
- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: No documentation paths changed. The PR adds Microsoft Teams
to the live `channels-stop-start` E2E matrix and does not change a
command, configuration, default, or supported behavior.
`docs/manage-sandboxes/set-up-microsoft-teams.mdx` already documents
Microsoft Teams for OpenClaw and Hermes, including the credentials,
access controls, webhook port, and mention mode exercised by this test.
- Agent: Codex Desktop
<!-- docs-review-head-sha: a8ac241 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or merging.
This is human-reviewed evidence, not authenticated hardware provenance.
Exceptional bypasses use existing repository governance and must be
documented on the PR. -->
- [ ] Tested on DGX Station
Not applicable. `scripts/prepare-dgx-station-host.sh` is not changed.

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result: `npm run
typecheck:cli` (exit 0); `npx @biomejs/biome check` (no findings); `npx
vitest run --project e2e-support` (168 files and 1,794 tests passing).
The live `channels-stop-start` E2E target runs through GitHub CI on Brev
and is not available in the local contributor environment.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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)
- [ ] 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: Hung Le <hple@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Added Microsoft Teams to live channel stop/start coverage for OpenClaw
and Hermes.
* Added assertions for Microsoft Teams credentials and runtime
configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Hung Le <hple@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: San Dang <sdang@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
prekshivyas pushed a commit that referenced this pull request Aug 18, 2026
## Summary

The Policy Tiers table in `docs/reference/network-policies.mdx` did not
list the `teams` preset in its Open
row, while the `open` tier in `nemoclaw-blueprint/policies/tiers.yaml`
has applied that preset since commit
`17d03317b` (#5585). An operator who read this table before selecting
Open was not told that the tier opens
Microsoft Teams egress by default. The Open row now names `teams` in the
position it occupies in
`tiers.yaml`, with the experimental tag that
`docs/reference/platform-support.mdx` records for the channel.

## Related Issue

Fixes #9503

This repeats a correction the project already accepted. Issue #3688
reported the identical drift for
`wechat`, and PR #4276 (commit `a5768a244`) corrected the same row the
same way. PR #5585 added `teams` to
the `open` tier and stated that it would "Leave user-facing
documentation to a follow-up docs-owner change";
that follow-up did not reach this page.

## Changes

- `docs/reference/network-policies.mdx`: add `` `teams` (experimental)
`` to the Open row of the Policy
Tiers table, between `whatsapp` and `jira`, matching the preset order in
  `nemoclaw-blueprint/policies/tiers.yaml`.

One existing table row changed. Net line delta is ±0 (1 insertion, 1
deletion, one file). No new
abstraction, configuration, fallback, migration, or compatibility path.

Checked and unchanged: the Restricted, Balanced, and Personal rows
already match `tiers.yaml`, so `teams`
is the table's only omission.

Not changed, and offered here instead: the `<AgentOnly
variant="openclaw">` note earlier on the same page
says "The baseline policy does not include messaging endpoints for
Telegram, Discord, Slack, WeChat, or
WhatsApp." That sentence omits Microsoft Teams and also Google Chat.
Google Chat is not a tier preset, so
that sentence belongs to a different premise than this tier-table drift,
and adding only Teams would leave
a new partial list. Say the word and I will extend that note in this PR
or a separate one.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: the change is one
documentation table cell and alters no
executable behavior. `npm run docs` is the validation for this page. If
you want a guard against the next
recurrence, the natural home is the existing tier-loader test surface
for `src/lib/policy/tiers.ts`: one
case that reads `resolveTierPresets("open")` and asserts each preset
name appears in the Open row of
`docs/reference/network-policies.mdx`. That adds lines, so I left it out
of this ±0 change and will add it
  in this PR if you prefer it here.
- [ ] 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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: Updated docs/reference/network-policies.mdx. The writing
rules and documentation style were reviewed.
- Agent: Pi CLI
<!-- docs-review-head-sha: 0473cf7 -->
<!-- docs-review-agents-blob-sha:
993bdd8 -->
## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable — `npm run validate:pr` passed after
refreshing `origin/main` and rebasing onto the current `main`
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — marked not applicable above; `npm run
docs` exits 0
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [x] `npm run docs` builds without warnings (doc changes only) — 0
errors. The two reported warnings are
the unauthenticated Fern redirects check and the site accent-color
contrast ratio; both appear identically
  on an unmodified checkout of this page.
- [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)

---
Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated network policy reference documentation to include the
experimental `teams` preset in the Open policy tier.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: messaging Messaging channels, bridges, manifests, or channel lifecycle VRDC Issues and PRs submitted by NVIDIA VRDC test team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants