Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,131 @@ helm upgrade aifoa "$MOSAIC_CHART" \
--timeout 12m
```

### Microsoft Teams

Teams is optional and uses OpenClaw's native `msteams` plugin, pinned to the
chart's OpenClaw release. It supports direct messages, group chats, channel
mentions, and proactive messages with alert explanations.

Installing AI Factory Operations Agent does not register a bot in a customer's
Microsoft tenant or enable Teams messaging. The tenant owner must permit the
app registration and Teams app installation, provide the bot credentials and
allowed users, and arrange a reachable HTTPS callback. The chart handles plugin
installation, Secret references, channel configuration, and the optional ingress.

To prepare the runtime before bot registration, optionally preinstall the plugin:

```yaml
openclaw:
msteams:
install: true
```

This installs the pinned package on the existing OpenClaw persistent volume and
loads its plugin entry. It does not require a bot Secret or user allowlist and
does not start or expose the Teams webhook. `enabled: true` also installs the
plugin, so this separate preparation step is optional. Pod initialization needs
access to the configured npm registry.

Register a single-tenant bot and install its Teams app in the intended personal,
team, or group-chat scope using the [OpenClaw Teams setup guide](https://docs.openclaw.ai/channels/msteams/setup).
The Microsoft developer CLI is `@microsoft/teams.cli` (command `teams`); it manages
apps and bots. It is separate from chat-management tools named `teams-cli` and
is not required in the OpenClaw runtime. When using it, run
`teams status --json` in a new process after login; a successful browser sign-in alone does
not verify that the local CLI retained its session.

Create a Kubernetes Secret in the release namespace containing
`MSTEAMS_APP_ID`, `MSTEAMS_APP_PASSWORD`, and `MSTEAMS_TENANT_ID` from that registration.
Keep the secret values outside Helm values and source control. `allowedUserIds`
must contain concrete Microsoft Entra user object IDs (GUIDs), not email
addresses, wildcard entries, or blank strings.

Add these values to the release configuration:

```yaml
openclaw:
msteams:
enabled: true
existingSecret: mosaic-teams
allowedUserIds:
- "<Microsoft-Entra-user-object-ID>"
ingress:
enabled: true
className: nginx
host: teams.example.com
tlsSecretName: mosaic-teams-tls
```

Apply the configuration through the normal Helm upgrade workflow. Set the bot's
messaging endpoint to `https://teams.example.com/api/messages`. This release's
plugin listens on port `3978`; the optional ingress exposes only that exact
webhook path. Bot Framework tokens are validated by the plugin. The OpenClaw
gateway is not exposed by this ingress. Alternatively, leave the ingress disabled
and route an existing HTTPS proxy to the `openclaw` Service's `msteams` port.
Teams requires a reachable HTTPS endpoint with a trusted certificate.
An ingress resource alone does not install an ingress controller, provide public
DNS, or make a private Kind host reachable from Microsoft. Provide those through
the deployment's network infrastructure. TLS may terminate at the ingress or an
existing HTTPS proxy.

`allowedUserIds` applies to both direct and group messages. To enable specific
team/channel conversations, add their IDs to the native `teams` mapping:

```yaml
openclaw:
msteams:
teams:
"<team-ID>":
channels:
"<channel-ID>":
requireMention: true
```

The existing conversation access policy applies: new conversations start in View.
This integration does not add Teams-specific Edit approval controls. Slack can
remain enabled alongside Teams, and Teams DMs use separate sessions per sender.

For proactive alerts, first send a message to the installed bot in the destination
conversation so OpenClaw records its conversation reference. Use that conversation
ID as the outbound target. To run native OpenClaw scheduled jobs, explicitly
enable the scheduler (disabled by default):

```yaml
openclaw:
cron:
enabled: true
```

An OpenClaw scheduled job can then deliver its generated explanation with this
delivery configuration:

```json
{
"delivery": {
"mode": "announce",
"channel": "msteams",
"to": "conversation:<conversation-ID>"
}
}
```

`openclaw.msteams.defaultTo` optionally sets a default outbound target for sends
that omit a target; scheduled jobs can specify their own destination as above.
The full explanation appears in the Teams message. Phone banners may show only a
preview, and depend on Teams and operating-system notification settings. Tenant
app approval and a real phone notification check are required before claiming
end-to-end delivery. Basic text messaging does not require the additional
SharePoint permissions used for channel file uploads.

This configures a delivery channel; it does not automatically forward cluster
monitor alerts or create scheduled jobs. Configure the alert producer or job
separately. Before accepting the integration, verify a real allowed-user DM and
reply, rejection of a non-allowlisted sender before agent dispatch, conversation
isolation, a proactive message to an initialized destination, and persistence
after an OpenClaw Pod restart. Gateway readiness and an unsigned webhook `401`
are useful checks, but neither proves authenticated Teams delivery.

### Access Modes

Enable guarded write operations with the Edit module:
Expand Down
Binary file modified helm/mosaic-stack/files/agent-documentation.tar.gz
Binary file not shown.
39 changes: 35 additions & 4 deletions helm/mosaic-stack/files/openclaw-seed/nemoclaw.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
}
]
},
{{- if and .Values.openclaw.msteams.enabled (not .Values.openclaw.slack.enabled) }}
"session": {
"dmScope": "per-channel-peer"
},
{{- end }}
{{- if .Values.openclaw.slack.enabled }}
"session": {
"dmScope": {{ .Values.openclaw.slack.session.dmScope | quote }}
Expand Down Expand Up @@ -154,8 +159,29 @@
"servers": {{ $managedMcpServers | toJson }}
},
{{- end }}
{{- if .Values.openclaw.slack.enabled }}
{{- if or .Values.openclaw.slack.enabled .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled }}
"channels": {
{{- if or .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled }}
"msteams": {
"enabled": {{ .Values.openclaw.msteams.enabled }},
{{- if .Values.openclaw.msteams.enabled }}
"appId": "${MSTEAMS_APP_ID}",
"appPassword": "${MSTEAMS_APP_PASSWORD}",
"tenantId": "${MSTEAMS_TENANT_ID}",
{{- end }}
"configWrites": false,
"dmPolicy": "allowlist",
"allowFrom": {{ .Values.openclaw.msteams.allowedUserIds | toJson }},
"groupPolicy": "allowlist",
"groupAllowFrom": {{ .Values.openclaw.msteams.allowedUserIds | toJson }},
{{- with .Values.openclaw.msteams.defaultTo }}
"defaultTo": {{ . | quote }},
{{- end }}
"teams": {{ .Values.openclaw.msteams.teams | toJson }},
"webhook": { "port": 3978, "path": "/api/messages" }
}{{- if .Values.openclaw.slack.enabled }},{{- end }}
{{- end }}
{{- if .Values.openclaw.slack.enabled }}
"slack": {
"enabled": true,
"mode": "socket",
Expand Down Expand Up @@ -190,6 +216,7 @@
"unfurlLinks": false,
"unfurlMedia": false
}
{{- end }}
},
{{- end }}
"models": {
Expand Down Expand Up @@ -229,7 +256,7 @@
}
},
"cron": {
"enabled": false
"enabled": {{ .Values.openclaw.cron.enabled }}
},
"plugins": {
"allow": [
Expand All @@ -243,7 +270,8 @@
"observability",
"remote-ssh",
"slurm",
"llm"{{- if .Values.openclaw.slack.enabled }},
"llm"{{- if or .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled }},
"msteams"{{- end }}{{- if .Values.openclaw.slack.enabled }},
"slack"{{- end }}{{- if .Values.modules.webSearch.enabled }},
{{ .Values.modules.webSearch.provider | quote }}{{- end }}
],
Expand Down Expand Up @@ -279,7 +307,10 @@
},
"llm": {
"enabled": true
}{{- if .Values.openclaw.slack.enabled }},
}{{- if or .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled }},
"msteams": {
"enabled": true
}{{- end }}{{- if .Values.openclaw.slack.enabled }},
"slack": {
"enabled": true
}{{- end }}{{- if .Values.modules.webSearch.enabled }},
Expand Down
36 changes: 36 additions & 0 deletions helm/mosaic-stack/templates/msteams-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

{{- if and .Values.modules.execution.enabled .Values.openclaw.enabled .Values.openclaw.msteams.enabled .Values.openclaw.msteams.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: openclaw-msteams
labels:
{{- include "mosaic-stack.labels" . | nindent 4 }}
{{- with .Values.openclaw.msteams.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.openclaw.msteams.ingress.className }}
ingressClassName: {{ . | quote }}
{{- end }}
{{- with .Values.openclaw.msteams.ingress.tlsSecretName }}
tls:
- hosts:
- {{ $.Values.openclaw.msteams.ingress.host | quote }}
secretName: {{ . | quote }}
{{- end }}
rules:
- host: {{ .Values.openclaw.msteams.ingress.host | quote }}
http:
paths:
- path: /api/messages
pathType: Exact
backend:
service:
name: openclaw
port:
name: msteams
{{- end }}
36 changes: 36 additions & 0 deletions helm/mosaic-stack/templates/openclaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,24 @@ spec:
- name: remote-ssh-credentials
mountPath: /credentials
{{- end }}
{{- if or .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled }}
- name: init-msteams-plugin
image: {{ include "mosaic-stack.image" .Values.openclaw.image | quote }}
imagePullPolicy: {{ .Values.openclaw.image.pullPolicy }}
command:
- sh
- -ec
- node /app/dist/index.js plugins install {{ printf "@openclaw/msteams@%v" .Values.openclaw.msteams.pluginVersion | quote }} --force
env:
- name: HOME
value: /home/node
securityContext:
runAsUser: 1000
runAsGroup: 1000
volumeMounts:
- name: openclaw-home
mountPath: /home/node/.openclaw
{{- end }}
{{- if .Values.openclaw.slack.enabled }}
- name: init-slack-plugin
image: {{ include "mosaic-stack.image" .Values.openclaw.image | quote }}
Expand Down Expand Up @@ -606,6 +624,15 @@ spec:
- name: NODE_EXTRA_CA_CERTS
value: /etc/llm-ca/ca.crt
{{- end }}
{{- if .Values.openclaw.msteams.enabled }}
{{- range $env, $key := dict "MSTEAMS_APP_ID" .Values.openclaw.msteams.appIdKey "MSTEAMS_APP_PASSWORD" .Values.openclaw.msteams.appPasswordKey "MSTEAMS_TENANT_ID" .Values.openclaw.msteams.tenantIdKey }}
- name: {{ $env }}
valueFrom:
secretKeyRef:
name: {{ $.Values.openclaw.msteams.existingSecret | quote }}
key: {{ $key | quote }}
{{- end }}
{{- end }}
{{- if .Values.openclaw.slack.enabled }}
- name: SLACK_BOT_TOKEN
valueFrom:
Expand Down Expand Up @@ -691,6 +718,10 @@ spec:
key: {{ default "token" .Values.slurmEvidenceCollector.auth.secretKey }}
{{- end }}
ports:
{{- if .Values.openclaw.msteams.enabled }}
- containerPort: 3978
name: msteams
{{- end }}
- containerPort: 18789
name: gateway
readinessProbe:
Expand Down Expand Up @@ -834,6 +865,11 @@ spec:
selector:
app: openclaw
ports:
{{- if .Values.openclaw.msteams.enabled }}
- name: msteams
port: 3978
targetPort: msteams
{{- end }}
- name: gateway
port: {{ .Values.openclaw.service.port }}
targetPort: gateway
Expand Down
31 changes: 31 additions & 0 deletions helm/mosaic-stack/templates/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@
{{- if not (has .Values.llm.mode (list "external" "vllm")) -}}
{{- fail "llm.mode must be one of: external, vllm" -}}
{{- end -}}
{{- if or .Values.openclaw.msteams.install .Values.openclaw.msteams.enabled -}}
{{- if not (and .Values.modules.execution.enabled .Values.openclaw.enabled) -}}
{{- fail "openclaw.msteams installation requires modules.execution.enabled and openclaw.enabled" -}}
{{- end -}}
{{- end -}}
{{- if .Values.openclaw.msteams.enabled -}}
{{- if not (kindIs "slice" .Values.openclaw.msteams.allowedUserIds) -}}
{{- fail "openclaw.msteams.allowedUserIds must be a list of Microsoft Entra object IDs" -}}
{{- end -}}
{{- if not .Values.openclaw.msteams.existingSecret -}}
{{- fail "openclaw.msteams.existingSecret is required when Teams is enabled" -}}
{{- end -}}
{{- if empty .Values.openclaw.msteams.allowedUserIds -}}
{{- fail "openclaw.msteams.allowedUserIds must contain at least one Microsoft Entra object ID" -}}
{{- end -}}
{{- range $index, $userId := .Values.openclaw.msteams.allowedUserIds -}}
{{- if not (kindIs "string" $userId) -}}
{{- fail (printf "openclaw.msteams.allowedUserIds[%d] must be a Microsoft Entra object ID (GUID)" $index) -}}
{{- else if not (regexMatch "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" $userId) -}}
{{- fail (printf "openclaw.msteams.allowedUserIds[%d] must be a Microsoft Entra object ID (GUID); wildcard and blank entries are not allowed" $index) -}}
{{- end -}}
{{- end -}}
{{- range $key, $value := dict "appIdKey" .Values.openclaw.msteams.appIdKey "appPasswordKey" .Values.openclaw.msteams.appPasswordKey "tenantIdKey" .Values.openclaw.msteams.tenantIdKey -}}
{{- if not $value -}}
{{- fail (printf "openclaw.msteams.%s must name an existing Secret key" $key) -}}
{{- end -}}
{{- end -}}
{{- if and .Values.openclaw.msteams.ingress.enabled (not .Values.openclaw.msteams.ingress.host) -}}
{{- fail "openclaw.msteams.ingress.host is required when the Teams ingress is enabled" -}}
{{- end -}}
{{- end -}}
{{- if not (has .Values.modules.slurm.backend (list "auto" "vanilla" "bcm")) -}}
{{- fail "modules.slurm.backend must be one of: auto, vanilla, bcm" -}}
{{- end -}}
Expand Down
Loading
Loading