Skip to content

feat(teams): add text command parity - #1502

Draft
NeoHsu wants to merge 16 commits into
openabdev:mainfrom
NeoHsu:stack/teams-10-text-commands
Draft

feat(teams): add text command parity#1502
NeoHsu wants to merge 16 commits into
openabdev:mainfrom
NeoHsu:stack/teams-10-text-commands

Conversation

@NeoHsu

@NeoHsu NeoHsu commented Aug 20, 2026

Copy link
Copy Markdown

Important

Stacked draft: logical base stack/teams-09-formatting-long-messages is PR #1501. GitHub requires an upstream PR base to exist in openabdev/openab, so this draft temporarily targets main and may show preceding stack layers. Do not merge it until #1501 is merged and this branch is rebased onto current main; then review only its single incremental commit.

What problem does this solve?

Provide one platform-neutral Core command service for /models, /agents,
/cancel, /reset, /cancel-all, and /usage; give Teams safe text-command
parity through ordinary authenticated messages; preserve Discord native UX; and
publish a conservative manifest command menu without bypassing trust, privacy,
or negotiated delivery semantics.

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365158868619404/1531339032527765655
Microsoft Teams roadmap discussion.

Review Contract

This is the proposed PR-body contract. It is not frozen until the owner or a
maintainer approves it and records the reviewed head plus an immutable contract
revision or hash.

Goal

Provide one platform-neutral Core command service for /models, /agents,
/cancel, /reset, /cancel-all, and /usage; give Teams safe text-command
parity through ordinary authenticated messages; preserve Discord native UX; and
publish a conservative manifest command menu without bypassing trust, privacy,
or negotiated delivery semantics.

Non-goals

/remind, /auth, /export, /new, arbitrary agent slash commands, Slack
native slash delivery, Adaptive Cards, invoke activities, message extensions,
targeted messages, proactive messaging, cron, Graph, RSC, delegated tokens, new
permissions, a Gateway protocol bump, or a provider-general billing API are outside PR 10.

Accepted Residual Risks

Teams command responses are ordinary visible activities outside Personal chat;
therefore /usage is denied rather than displayed on those surfaces. An
installed manifest does not update until an operator packages and installs a
new version. Old Core deployments retain the existing partial command set.
/reset and /cancel-all remain immediate destructive controls without a new
confirmation dialog, matching existing Discord behavior. Text config lists show
at most 25 entries even when the active backend exposes more; exact-name setting
still validates against the complete option set.

Acceptance Criteria

The six canonical commands share one semantic service; Teams executes them only
after structural, L2, L3, and authenticated mention handling; Discord native
interactions use the same semantics after their existing admission; recognized
commands never reach the agent or materialize attachments; /usage cannot call
the backend or disclose data on a public or unproven-private surface;
/cancel-all and /reset clear every dispatcher lane in only the addressed
logical thread; Standalone command responses cannot deadlock the WebSocket
reader and obey negotiated send outcomes without retry; Unified and Standalone
are semantically equivalent; compatibility forms and old-peer behavior do not
regress; and the v1.25 manifest menu validates without targeted-message or new
permission fields.

Follow-ups

Evaluate Teams targeted/private messages under a separate trust and routing ADR;
add Adaptive Card interactions only after JWT/scope/identity admission is
specified for callbacks; consider a broader command registry if the core set
expands; evaluate provider-neutral usage reporting; add /remind, /auth, and
/export as separately reviewed slices.

At a Glance

Authenticated Teams activity / operator target
                    │
                    ▼
            [this PR’s bounded layer]
                    │
                    ▼
          explicit outcome or fail-closed stop

Prior Art & Industry Research

OpenClaw: its Microsoft Teams extension separates access checks, Bot Framework route context, and outbound operations. For this slice the relevant comparison is channel command admission and platform-neutral command semantics.

Hermes Agent: its Teams platform adapter keeps Teams-specific transport and message shaping behind a platform adapter. It does not provide OpenAB’s negotiated Core/Gateway outcome contract, so this PR keeps the useful adapter boundary but adds explicit fail-closed semantics.

Proposed Solution

  • Add a shared Core command service and authenticated Teams text-command parity.
  • Keep recognized commands ahead of attachment, session, and agent side effects.
  • Add and validate a conservative Microsoft Teams v1.25 manifest fixture and command menu.

Why this approach?

A shared semantic service prevents Teams and Discord command behavior from drifting while preserving each platform’s admission and UX.

Alternatives Considered

Implement a Teams-only command stack (rejected: semantic drift) or expose /usage in groups (rejected: privacy risk).

Validation

  • cargo check -p openab-core
  • cargo check -p openab-gateway --features teams
  • cargo test --manifest-path crates/platform-schema/Cargo.toml

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.

1 participant