Skip to content

Add Teams integration with persistent delegated Graph conversations - #116

Open
JeffPengCoder wants to merge 6 commits into
NVIDIA:mainfrom
JeffPengCoder:fix/teams-graph-channel-20261117
Open

JeffPengCoder wants to merge 6 commits into
NVIDIA:mainfrom
JeffPengCoder:fix/teams-graph-channel-20261117

Conversation

@JeffPengCoder

@JeffPengCoder JeffPengCoder commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

A successful delegated Graph send does not receive the user's next Teams message. This adds an optional persistent worker that polls a verified DM or explicitly allowlisted group, submits eligible new messages to the existing MOSAIC headless conversation in View mode, and returns the complete answer to that chat. Escaped Graph HTML renders headings, code and complete table contents without exposing raw Markdown.

This PR now targets main and includes the native Teams prerequisite from #71 and the onboarding/Graph diagnostic prerequisite from #76. Their required code is present in this branch; they do not need to merge first for this branch to build. #71's owner branch is unchanged. The full diff overlaps #76 until those prerequisites are merged. Fork PR #5 retains the earlier incremental review.

Behavior

  • Native Teams setup and validation from Add optional native Microsoft Teams messaging #71/Add native Teams setup and delegated validation #76, plus a distinct delegated Graph worker. The worker reuses the Graph probe and adds no-message bind and bind-group modes; it does not change Bot authentication.
  • A verified service identity, fixed chat and MOSAIC View session; ordered polling, persistent deduplication and recovery of uncertain Agent submissions without blind resubmission. Uncertain outbound sends stop for operator review.
  • An allowlisted group member can address the service account with a structured @ mention. Operators can enable quote replies with --allow-quoted-replies, which accepts a Graph message reference to a confirmed MOSAIC reply in the same group and uses the saved answer as context. Membership is revalidated before intake, execution and each outgoing part. Group-specific sessions, ConfigMaps, Deployments and PVCs preserve the existing DM and other IM channels. Adding a participant does not automatically authorize them.
  • A portable manifest generator, external credential-file input and persistent state volume, with no deployment identities or credentials in source.
  • Optional authenticated simulation-alert intake associates the first report and later human replies with the same Agent conversation.
  • Escaped HTML headings, paragraphs, code, links and complete label/value table rows. Large output splits without truncation. An explicit repair utility verifies and reformats a recorded service-account message in place without invoking the Agent or sending another message.
  • The deployment and validation guides are included in the documentation navigation.

Validation

The group quote reply update adds regression coverage for real Graph reference shape, saved same-chat receipts, allowlists, activation at rollout, and exactly one reply after restarting with a queued quote. The deployed parser also recognized a captured Teams quote against the saved original send receipt in a read-only check.

  • Main rebase fa7a554: full Node suite with group regressions 298 tests, 296 passed, 2 existing conditional skips, 0 failures; focused probe/bridge Node tests 36/36 before adding the manifest wrapper; Graph runner Python tests 9/9; manifest Python tests 5/5; standalone inference 4/4.
  • Bridge tests now run through the existing root CI glob, including genuine mentions versus display-name text, paging, membership removal during a run, session/PVC isolation and same-group replies.
  • Both Helm lints, documentation bundle, strict Sphinx build, SPDX and git diff --check passed. The unchanged upstream BCM server suite passes 24/24 on Linux; its process-group termination test encounters macOS PermissionError locally.
  • Previous live acceptance, before this rebase: the no-message bind mode verified an existing chat without requesting /messages, and generated manifests passed Kubernetes server-side dry-run.
  • A real isolated telemetry simulation produced a Prometheus/Alertmanager alert. MOSAIC made 11 successful tool calls, including a Research query, and delivered a Teams report in 63.359 seconds. An ordinary human follow-up without a Run ID reused the session, made 4 successful tool calls including another Research query, and returned a report in 100.999 seconds. No operator relayed the follow-up or authored the answers.
  • Both existing reports were reformatted using Graph PATCH and verified with GET. That confirms HTML acceptance/readback; it does not claim a separately exercised new automatic HTML reply after formatting deployment.
  • Chart validation used cached chart archives matching locked names/versions. The earlier fresh IRAOP registry download returned NGC 401; no successful fresh registry download is claimed.

A separately deployed group with three explicitly approved users passed actual Graph binding, server-side dry-run and startup. The original DM, Feishu, proxy and UI Deployment specs remained unchanged. Two new real @ messages then completed automatically in the group, in 21.103 s and 40.369 s from incoming creation to send receipt, with HTML answers. The cluster-check turn made 6 native run_kubectl calls and encountered 1 exec error; operator prompts/replies were not inserted. Full per-tool flags, sizes, timing and diagnosis limitations are retained in VALIDATION.md. Only one of the three allowlisted humans has been live-tested.

This remains an experimental textual DM or one allowlisted group per worker, View-only integration. Password grant requires tenant approval and does not bypass MFA/Conditional Access. Real hardware diagnosis, concurrent-user scale, attachments, long-duration authentication recovery and infrastructure writes are outside live acceptance. Timestamp/ECC interpretation issues in the original reports remain separate from transport success.

See complete timing and tool-result tables and deployment instructions. Private tenant details, credentials and raw infrastructure payloads are excluded. All commits are DCO signed off; repository-wide ignore rules, CI and dependency configuration are unchanged.

RohanAdwankar and others added 2 commits November 19, 2026 13:48
Install the matching OpenClaw Teams plugin, load bot credentials from an existing Secret, and provide an optional HTTPS webhook ingress. Document conversation setup and proactive alert delivery, preserve Slack configuration, and validate rendered channel combinations and required settings.

Signed-off-by: Rohan Adwankar <39285979+RohanAdwankar@users.noreply.github.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
@JeffPengCoder
JeffPengCoder force-pushed the fix/teams-graph-channel-20261117 branch from e10f306 to 600ae7e Compare November 19, 2026 06:10
@JeffPengCoder JeffPengCoder changed the title Add persistent Teams Graph conversations (stacked on #76) Add Teams integration with persistent delegated Graph conversations Nov 19, 2026
@JeffPengCoder
JeffPengCoder changed the base branch from feat/teams-channel to main November 19, 2026 06:11
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>
@JeffPengCoder
JeffPengCoder force-pushed the fix/teams-graph-channel-20261117 branch from 600ae7e to 3b802c2 Compare November 19, 2026 06:14
…trols

Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Signed-off-by: Jeff Peng <jepeng@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants