docs(contributing): contributor guide, PR template, CI on pull requests
- CONTRIBUTING.md: what to read first, AI use, pull request and code rules - PR template: summary, AI model, screenshot for UI changes - test.yml also runs on pull requests - track docs/agents.md, docs/build-windows.md and docs/research/internal-endpoints.md (GUARDRAILS.md links the last one) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@@ -0,0 +1,12 @@
1
## Summary
2
3
<!-- What changes and why, in a few sentences. "Closes #123" if there is an issue. -->
4
5
## AI model
6
7
<!-- Which tool and model wrote the change, e.g. "Claude Code, Opus 4.5" or "Copilot, GPT-5". "None" if written by hand. -->
8
9
## Screenshot
10
11
<!-- For every change that is visible in the UI: one shot of the changed area. Delete the section otherwise.
12
Use demo data (`cargo run -p app -- --demo` or `scripts/headless-shot.sh`), never a real account. -->
@@ -0,0 +1,12 @@1
## Summary2
3
<!-- What changes and why, in a few sentences. "Closes #123" if there is an issue. -->4
5
## AI model6
7
<!-- Which tool and model wrote the change, e.g. "Claude Code, Opus 4.5" or "Copilot, GPT-5". "None" if written by hand. -->8
9
## Screenshot10
11
<!-- For every change that is visible in the UI: one shot of the changed area. Delete the section otherwise.12
Use demo data (`cargo run -p app -- --demo` or `scripts/headless-shot.sh`), never a real account. -->@@ -3,10 +3,11 @@
3
3
# key tests), it only builds - see build.yml.
4
4
name: Test
5
5
6
# Tests gate pushes to main; releases build from tags in build.yml.
6
# Tests gate pushes to main and pull requests; releases build from tags in build.yml.
7
7
on:
8
8
push:
9
9
branches: [main]
10
pull_request:
10
11
workflow_dispatch:
11
12
12
13
permissions:
@@ -3,10 +3,11 @@3
# key tests), it only builds - see build.yml.3
# key tests), it only builds - see build.yml.4
name: Test4
name: Test5
5
6
# Tests gate pushes to main; releases build from tags in build.yml.6
# Tests gate pushes to main and pull requests; releases build from tags in build.yml.7
on:7
on:8
push:8
push:9
branches: [main]9
branches: [main]10
pull_request:10
workflow_dispatch:11
workflow_dispatch:11
12
12
permissions:13
permissions:@@ -3,3 +3,8 @@ target/
3
3
docs/*
4
4
!docs/decisions/
5
5
!docs/decisions/**
6
!docs/agents.md
7
!docs/build-windows.md
8
!docs/research/
9
docs/research/*
10
!docs/research/internal-endpoints.md
@@ -3,3 +3,8 @@ target/3
docs/*3
docs/*4
!docs/decisions/4
!docs/decisions/5
!docs/decisions/**5
!docs/decisions/**6
!docs/agents.md7
!docs/build-windows.md8
!docs/research/9
docs/research/*10
!docs/research/internal-endpoints.md@@ -0,0 +1,57 @@
1
# Contributing to Rusty Teams
2
3
Most of this code is written with AI agents, and that is welcome here. Just say which model did the work.
4
5
## Before you start
6
7
| Step | What |
8
|---|---|
9
| 1 | Read [GUARDRAILS.md](GUARDRAILS.md): where the app must match Teams and where it may differ. It wins over any habit. |
10
| 2 | Check [ROADMAP.md](ROADMAP.md), mainly "Out of scope". Features listed there are not merged. |
11
| 3 | Search open pull requests and issues for the same topic. For anything larger than a fix, open an issue first and wait for a yes. |
12
| 4 | Read the notes under [docs/decisions/](docs/decisions/README.md) for the area you touch. |
13
14
## AI use
15
16
| Rule | Detail |
17
|---|---|
18
| Name the model | Every pull request names the tool and model that wrote the change. It tells the reviewer how closely to look. "None" is a valid answer. |
19
| Report only what ran | Say what you tested and what you could not run. No "works" without a run. |
20
| Keep it short | A summary of a few sentences. Long generated descriptions get sent back. |
21
| No real data | Nothing from a real Teams account in code, tests, logs or screenshots: no names, chats, ids or tokens. Use `--demo`. |
22
23
## Pull requests
24
25
- One topic per pull request. No unrelated refactors, no formatting of files you did not change.
26
- The template asks for three things: a summary, the AI model, and a screenshot for UI changes (taken with demo data).
27
- CI runs the tests on Linux and Windows for every pull request.
28
- Commit and title format: `feat|fix|chore|docs(scope): message`.
29
- Rebase on `main` instead of merging it in. Answer actionable review comments or say that you will not.
30
31
## Build and test
32
33
Build setup and all commands are in the [README](README.md#quick-start), the Windows cross build in [docs/build-windows.md](docs/build-windows.md).
34
35
| Task | Command |
36
|---|---|
37
| Run with demo data | `cargo run -p app -- --demo` |
38
| Format | `cargo fmt` (not `--all`, it rewrites `vendor/`) |
39
| Tests of the changed module | `cargo test -p <crate> <module>` |
40
| Layout guard for UI changes | `cargo test -p app layout_guard` |
41
| Screenshot without a display | `cargo build -p app && scripts/headless-shot.sh shot.png` |
42
43
## Code
44
45
- Small modules, full variable names (`request_id`, not `rid`).
46
- Comments only where the code cannot show the reason: ordering, timing, a workaround for outside behaviour.
47
- Every non-Graph endpoint sits behind its own named module.
48
49
## UI
50
51
- Divider lines run to both panel edges.
52
- Paddings are aligned: bottom equals side.
53
- Soft surfaces, no hard 1 px outlines.
54
55
## Testing with a real account
56
57
Use your own account or a test tenant and follow the table in [GUARDRAILS.md](GUARDRAILS.md#testing-with-a-real-account). Clean up afterwards.
@@ -0,0 +1,57 @@1
# Contributing to Rusty Teams2
3
Most of this code is written with AI agents, and that is welcome here. Just say which model did the work.4
5
## Before you start6
7
| Step | What |8
|---|---|9
| 1 | Read [GUARDRAILS.md](GUARDRAILS.md): where the app must match Teams and where it may differ. It wins over any habit. |10
| 2 | Check [ROADMAP.md](ROADMAP.md), mainly "Out of scope". Features listed there are not merged. |11
| 3 | Search open pull requests and issues for the same topic. For anything larger than a fix, open an issue first and wait for a yes. |12
| 4 | Read the notes under [docs/decisions/](docs/decisions/README.md) for the area you touch. |13
14
## AI use15
16
| Rule | Detail |17
|---|---|18
| Name the model | Every pull request names the tool and model that wrote the change. It tells the reviewer how closely to look. "None" is a valid answer. |19
| Report only what ran | Say what you tested and what you could not run. No "works" without a run. |20
| Keep it short | A summary of a few sentences. Long generated descriptions get sent back. |21
| No real data | Nothing from a real Teams account in code, tests, logs or screenshots: no names, chats, ids or tokens. Use `--demo`. |22
23
## Pull requests24
25
- One topic per pull request. No unrelated refactors, no formatting of files you did not change.26
- The template asks for three things: a summary, the AI model, and a screenshot for UI changes (taken with demo data).27
- CI runs the tests on Linux and Windows for every pull request.28
- Commit and title format: `feat|fix|chore|docs(scope): message`.29
- Rebase on `main` instead of merging it in. Answer actionable review comments or say that you will not.30
31
## Build and test32
33
Build setup and all commands are in the [README](README.md#quick-start), the Windows cross build in [docs/build-windows.md](docs/build-windows.md).34
35
| Task | Command |36
|---|---|37
| Run with demo data | `cargo run -p app -- --demo` |38
| Format | `cargo fmt` (not `--all`, it rewrites `vendor/`) |39
| Tests of the changed module | `cargo test -p <crate> <module>` |40
| Layout guard for UI changes | `cargo test -p app layout_guard` |41
| Screenshot without a display | `cargo build -p app && scripts/headless-shot.sh shot.png` |42
43
## Code44
45
- Small modules, full variable names (`request_id`, not `rid`).46
- Comments only where the code cannot show the reason: ordering, timing, a workaround for outside behaviour.47
- Every non-Graph endpoint sits behind its own named module.48
49
## UI50
51
- Divider lines run to both panel edges.52
- Paddings are aligned: bottom equals side.53
- Soft surfaces, no hard 1 px outlines.54
55
## Testing with a real account56
57
Use your own account or a test tenant and follow the table in [GUARDRAILS.md](GUARDRAILS.md#testing-with-a-real-account). Clean up afterwards.@@ -0,0 +1,54 @@
1
# Agents
2
3
Delegate a message to a coding-agent CLI. Hover a message, click the robot button, pick an action.
4
5
## Setup
6
7
| Step | What |
8
|---|---|
9
| 1 | Install the agent CLI and log in once, inside WSL for the WSL presets |
10
| 2 | WSL: set `networkingMode=mirrored` in `%UserProfile%\.wslconfig`, so the agent reaches the app's MCP endpoint on `127.0.0.1` |
11
| 3 | Settings > Agents: pick or add an agent, press Test |
12
| 4 | Settings > Agents: add actions. Their order is the order in the toolbar menu |
13
14
## Flow
15
16
| Where | What |
17
|---|---|
18
| Hover toolbar | Robot button before "..." lists the actions, "Manage actions..." opens Settings > Agents |
19
| Start dialog | Only for actions with "Ask for extra instructions", or for chats agents cannot see yet. Ctrl+Enter starts, Esc cancels, "Show prompt" shows the rendered prompt |
20
| Chip under the message | Step, time, Stop. Click expands the last 6 steps. Failed: Log, Retry |
21
| Rail > Agents | Own page like Saved, Ctrl+6. Shown when at least one action exists. Badge = running runs. Running and Done lists, row click jumps to the message |
22
| Toast | On finish or failure: Open chat, Open session (Retry when failed) |
23
| Open session | Starts the agent's resume command in a terminal. Runs stay after a restart (last 50) |
24
25
## Placeholders
26
27
| Placeholder | Where | Value |
28
|---|---|---|
29
| `{message}` | prompt, extra args | Text of the message |
30
| `{sender}` | prompt, extra args | Sender of the message |
31
| `{chat}` | prompt, extra args | Chat or channel title |
32
| `{thread}` | prompt, extra args | Up to 20 earlier messages, oldest first |
33
| `{extra}` | prompt, extra args | Text from the start dialog |
34
| `{conversation_id}` | prompt, extra args | Teams conversation id |
35
| `{message_id}` | prompt, extra args | Teams message id |
36
| `{session_id}` | all | New session id of the run |
37
| `{agent}` | all | Agent id |
38
| `{prompt}` | command | Rendered prompt as one argument. Without it the prompt goes to stdin |
39
| `{cwd}` | command, open session | Working dir of the action |
40
41
## Presets
42
43
| Preset | Runs in | Output | Open session |
44
|---|---|---|---|
45
| Claude Code (WSL) | WSL default distro | Claude stream-json | `wt.exe wsl.exe --cd {cwd} -e claude --resume {session_id}` |
46
| Claude Code (Windows) | Windows | Claude stream-json | `wt.exe -d {cwd} claude --resume {session_id}` |
47
| Copilot CLI (WSL) | WSL default distro | Copilot JSON | `wt.exe wsl.exe --cd {cwd} -e copilot --resume {session_id}` |
48
| Custom | Windows | Plain text | empty |
49
50
## Limits
51
52
| Topic | State |
53
|---|---|
54
| Replies | Agents never send on their own. They write through the MCP tool `write_message`, and the user reviews each message unless review is off (Settings > MCP) |
@@ -0,0 +1,54 @@1
# Agents2
3
Delegate a message to a coding-agent CLI. Hover a message, click the robot button, pick an action.4
5
## Setup6
7
| Step | What |8
|---|---|9
| 1 | Install the agent CLI and log in once, inside WSL for the WSL presets |10
| 2 | WSL: set `networkingMode=mirrored` in `%UserProfile%\.wslconfig`, so the agent reaches the app's MCP endpoint on `127.0.0.1` |11
| 3 | Settings > Agents: pick or add an agent, press Test |12
| 4 | Settings > Agents: add actions. Their order is the order in the toolbar menu |13
14
## Flow15
16
| Where | What |17
|---|---|18
| Hover toolbar | Robot button before "..." lists the actions, "Manage actions..." opens Settings > Agents |19
| Start dialog | Only for actions with "Ask for extra instructions", or for chats agents cannot see yet. Ctrl+Enter starts, Esc cancels, "Show prompt" shows the rendered prompt |20
| Chip under the message | Step, time, Stop. Click expands the last 6 steps. Failed: Log, Retry |21
| Rail > Agents | Own page like Saved, Ctrl+6. Shown when at least one action exists. Badge = running runs. Running and Done lists, row click jumps to the message |22
| Toast | On finish or failure: Open chat, Open session (Retry when failed) |23
| Open session | Starts the agent's resume command in a terminal. Runs stay after a restart (last 50) |24
25
## Placeholders26
27
| Placeholder | Where | Value |28
|---|---|---|29
| `{message}` | prompt, extra args | Text of the message |30
| `{sender}` | prompt, extra args | Sender of the message |31
| `{chat}` | prompt, extra args | Chat or channel title |32
| `{thread}` | prompt, extra args | Up to 20 earlier messages, oldest first |33
| `{extra}` | prompt, extra args | Text from the start dialog |34
| `{conversation_id}` | prompt, extra args | Teams conversation id |35
| `{message_id}` | prompt, extra args | Teams message id |36
| `{session_id}` | all | New session id of the run |37
| `{agent}` | all | Agent id |38
| `{prompt}` | command | Rendered prompt as one argument. Without it the prompt goes to stdin |39
| `{cwd}` | command, open session | Working dir of the action |40
41
## Presets42
43
| Preset | Runs in | Output | Open session |44
|---|---|---|---|45
| Claude Code (WSL) | WSL default distro | Claude stream-json | `wt.exe wsl.exe --cd {cwd} -e claude --resume {session_id}` |46
| Claude Code (Windows) | Windows | Claude stream-json | `wt.exe -d {cwd} claude --resume {session_id}` |47
| Copilot CLI (WSL) | WSL default distro | Copilot JSON | `wt.exe wsl.exe --cd {cwd} -e copilot --resume {session_id}` |48
| Custom | Windows | Plain text | empty |49
50
## Limits51
52
| Topic | State |53
|---|---|54
| Replies | Agents never send on their own. They write through the MCP tool `write_message`, and the user reviews each message unless review is off (Settings > MCP) |@@ -0,0 +1,75 @@
1
# Build the Windows exe (no admin, no Visual Studio)
2
3
Cross-compile from WSL with `cargo-xwin`. Verified 2026-10-07 on `spikes/gpui-list` (gpui-kit 0.7.1, gpui-pre-windows 0.3.8).
4
5
## Commands
6
7
| Step | Command |
8
|---|---|
9
| Build spike | `scripts/build-windows.sh` |
10
| Build app | `scripts/build-windows.sh crates/app teams` (arg 2 = binary name) |
11
| Deploy app | `scripts/deploy-windows.sh`: copies the exe to `%LOCALAPPDATA%\Programs\ms-teams-linux\update\`. The running app swaps itself when idle, or on click in the status bar |
12
| Output | `<crate>/target/x86_64-pc-windows-msvc/release/<name>.exe` (`CARGO_TARGET_DIR` overrides, default `<crate>/target`) |
13
| Copy to Windows | `cp <exe> /mnt/c/Users/$USER/Desktop/` (never run from `\\wsl.localhost`) |
14
| Run | double-click, or `cmd.exe /c start "" C:\path\app.exe` |
15
| Screenshot (CI/agent) | `scripts/window-shot.ps1` (PrintWindow flag `2`). `CopyFromScreen` returns black |
16
17
## What the script does
18
19
| Problem | Fix |
20
|---|---|
21
| No MSVC / Windows SDK | `cargo xwin` downloads CRT + SDK, `XWIN_ACCEPT_LICENSE=1` |
22
| `gpui-pre-windows/build.rs` skips shaders when the host is not Windows | Patched copy in `target/patched/`, injected with `--config patch.crates-io` |
23
| Needs `fxc.exe` (Windows SDK, needs admin) | `GPUI_FXC_PATH=scripts/fxc-wsl.sh`: runs `d3dcompiler_47.dll` (ships with Windows) via PowerShell |
24
| `gpui` build.rs needs `llvm-rc`, bundled sqlite needs `llvm-lib` | Symlink `llvm-rc-<ver>`, `llvm-lib-<ver>` as plain names on PATH |
25
26
## One-time setup
27
28
| Need | Install |
29
|---|---|
30
| Rust + target | `rustup target add x86_64-pc-windows-msvc` (script does it) |
31
| `cargo-xwin` | `cargo install cargo-xwin --locked` (script does it) |
32
| `clang`, `llvm-rc`, `python3` | `sudo apt install clang llvm` (already present) |
33
| Windows side | Nothing. No Rust, no VS, no admin |
34
35
## Facts
36
37
| Item | Value |
38
|---|---|
39
| Cold build | 3 min 04 s (xwin download of CRT + SDK included, cached in `~/.cache/cargo-xwin`) |
40
| Exe size | 23 MB (release) |
41
| Cargo feature | None needed. `gpui` default `windows-manifest` works with `llvm-rc` |
42
| Shaders | Compiled at build time (release only). Debug builds read `shaders.hlsl` from the build path at runtime: do not ship debug |
43
| Fonts | Windows system fonts. Bold renders (unlike WSLg) |
44
| Renderer | DirectX 11 |
45
46
## Fails if
47
48
| Symptom | Cause |
49
|---|---|
50
| `Failed to find fxc.exe` | `GPUI_FXC_PATH` unset: run through the script |
51
| `NotAttempted("llvm-rc")` | No `llvm-rc` installed |
52
| `failed to find tool "llvm-lib"` | No `llvm-lib` installed (`sudo apt install llvm`) |
53
| Black screenshot | Wrong capture API, window is fine |
54
| Powershell cannot find the shim | WSL interop disabled |
55
56
## UI font (Google Sans Flex, OFL 1.1)
57
58
| Item | Value |
59
|---|---|
60
| Source | `github.com/google/fonts` -> `ofl/googlesansflex/GoogleSansFlex[GRAD,ROND,opsz,slnt,wdth,wght].ttf` + `OFL.txt` |
61
| Embedded | `crates/app/assets/fonts/GoogleSansFlex-{Regular,SemiBold,Bold,Italic}.ttf`, loaded in `theme::load_fonts` |
62
| Why static | The variable font is not used: static instances switch weights reliably under DirectWrite |
63
| Regenerate | `python3 scripts/font-instances.py <variable.ttf> crates/app/assets/fonts` (needs `pip install fonttools`) |
64
| Pinned axes | wght 400/600/700, wdth 100, opsz 14, GRAD 0, ROND 0, slnt 0 (Italic: -10) |
65
| Not used | Plain "Google Sans" is not openly licensed |
66
| Code blocks | Cascadia Code, else Consolas |
67
68
## Frame log (perf debugging)
69
70
| Item | Value |
71
|---|---|
72
| Enable | Set `RUSTY_TEAMS_FRAME_LOG=<file>` before starting the exe (`--demo` for tests) |
73
| Output | First line: GPU adapter. Then once per second: draws, longest gap, prepaint-to-paint mean/max |
74
| Idle baseline | 2 draws/s (caret blink) |
75
| Window drag | Every WM_MOVE forces a full uncached redraw in gpui-pre. Cost per frame must stay flat in chat count |
@@ -0,0 +1,75 @@1
# Build the Windows exe (no admin, no Visual Studio)2
3
Cross-compile from WSL with `cargo-xwin`. Verified 2026-10-07 on `spikes/gpui-list` (gpui-kit 0.7.1, gpui-pre-windows 0.3.8).4
5
## Commands6
7
| Step | Command |8
|---|---|9
| Build spike | `scripts/build-windows.sh` |10
| Build app | `scripts/build-windows.sh crates/app teams` (arg 2 = binary name) |11
| Deploy app | `scripts/deploy-windows.sh`: copies the exe to `%LOCALAPPDATA%\Programs\ms-teams-linux\update\`. The running app swaps itself when idle, or on click in the status bar |12
| Output | `<crate>/target/x86_64-pc-windows-msvc/release/<name>.exe` (`CARGO_TARGET_DIR` overrides, default `<crate>/target`) |13
| Copy to Windows | `cp <exe> /mnt/c/Users/$USER/Desktop/` (never run from `\\wsl.localhost`) |14
| Run | double-click, or `cmd.exe /c start "" C:\path\app.exe` |15
| Screenshot (CI/agent) | `scripts/window-shot.ps1` (PrintWindow flag `2`). `CopyFromScreen` returns black |16
17
## What the script does18
19
| Problem | Fix |20
|---|---|21
| No MSVC / Windows SDK | `cargo xwin` downloads CRT + SDK, `XWIN_ACCEPT_LICENSE=1` |22
| `gpui-pre-windows/build.rs` skips shaders when the host is not Windows | Patched copy in `target/patched/`, injected with `--config patch.crates-io` |23
| Needs `fxc.exe` (Windows SDK, needs admin) | `GPUI_FXC_PATH=scripts/fxc-wsl.sh`: runs `d3dcompiler_47.dll` (ships with Windows) via PowerShell |24
| `gpui` build.rs needs `llvm-rc`, bundled sqlite needs `llvm-lib` | Symlink `llvm-rc-<ver>`, `llvm-lib-<ver>` as plain names on PATH |25
26
## One-time setup27
28
| Need | Install |29
|---|---|30
| Rust + target | `rustup target add x86_64-pc-windows-msvc` (script does it) |31
| `cargo-xwin` | `cargo install cargo-xwin --locked` (script does it) |32
| `clang`, `llvm-rc`, `python3` | `sudo apt install clang llvm` (already present) |33
| Windows side | Nothing. No Rust, no VS, no admin |34
35
## Facts36
37
| Item | Value |38
|---|---|39
| Cold build | 3 min 04 s (xwin download of CRT + SDK included, cached in `~/.cache/cargo-xwin`) |40
| Exe size | 23 MB (release) |41
| Cargo feature | None needed. `gpui` default `windows-manifest` works with `llvm-rc` |42
| Shaders | Compiled at build time (release only). Debug builds read `shaders.hlsl` from the build path at runtime: do not ship debug |43
| Fonts | Windows system fonts. Bold renders (unlike WSLg) |44
| Renderer | DirectX 11 |45
46
## Fails if47
48
| Symptom | Cause |49
|---|---|50
| `Failed to find fxc.exe` | `GPUI_FXC_PATH` unset: run through the script |51
| `NotAttempted("llvm-rc")` | No `llvm-rc` installed |52
| `failed to find tool "llvm-lib"` | No `llvm-lib` installed (`sudo apt install llvm`) |53
| Black screenshot | Wrong capture API, window is fine |54
| Powershell cannot find the shim | WSL interop disabled |55
56
## UI font (Google Sans Flex, OFL 1.1)57
58
| Item | Value |59
|---|---|60
| Source | `github.com/google/fonts` -> `ofl/googlesansflex/GoogleSansFlex[GRAD,ROND,opsz,slnt,wdth,wght].ttf` + `OFL.txt` |61
| Embedded | `crates/app/assets/fonts/GoogleSansFlex-{Regular,SemiBold,Bold,Italic}.ttf`, loaded in `theme::load_fonts` |62
| Why static | The variable font is not used: static instances switch weights reliably under DirectWrite |63
| Regenerate | `python3 scripts/font-instances.py <variable.ttf> crates/app/assets/fonts` (needs `pip install fonttools`) |64
| Pinned axes | wght 400/600/700, wdth 100, opsz 14, GRAD 0, ROND 0, slnt 0 (Italic: -10) |65
| Not used | Plain "Google Sans" is not openly licensed |66
| Code blocks | Cascadia Code, else Consolas |67
68
## Frame log (perf debugging)69
70
| Item | Value |71
|---|---|72
| Enable | Set `RUSTY_TEAMS_FRAME_LOG=<file>` before starting the exe (`--demo` for tests) |73
| Output | First line: GPU adapter. Then once per second: draws, longest gap, prepaint-to-paint mean/max |74
| Idle baseline | 2 draws/s (caret blink) |75
| Window drag | Every WM_MOVE forces a full uncached redraw in gpui-pre. Cost per frame must stay flat in chat count |@@ -0,0 +1,194 @@
1
# Internal endpoints
2
3
Every endpoint Rusty Teams calls that is not `graph.microsoft.com`, grouped by service. Guardrail: each lives behind a clearly named module; `crates/chatsvc/tests/internal_endpoints.rs` fails when a non-Graph host string shows up outside the allowed module paths.
4
5
How requests leave the app: Rust never sends Microsoft requests directly. `session::Session` (`crates/session/src/session.rs`) runs `crates/session/assets/fetch.js` inside the signed-in Teams or Outlook page (CDP or WebView2); the page attaches the bearer token from the MSAL cache, so the token never leaves the page. Only CDN images and sounds go through the gpui HTTP client.
6
7
Columns: R = read, W = write. "Graph?" = could Graph replace it.
8
9
## Sign-in and page hosts
10
11
| Host + path | Method | Module | Used for | R/W | Graph? |
12
|---|---|---|---|---|---|
13
| `login.microsoftonline.com/{tenant}/oauth2/v2.0/token` | POST | `crates/session/assets/fetch.js` | refresh access token per resource from the MSAL refresh token | W | no - the auth flow itself |
14
| `teams.cloud.microsoft/` | page load | `crates/browser/src/targets.rs`, `crates/browser/src/launch.rs`, `crates/session/src/app.rs`, `crates/webview/src/host.rs` | Teams web session that holds the MSAL cache | R | no |
15
| `teams.cloud.microsoft/robots.txt` | page load | `crates/session/src/app.rs` | parked tab | R | no |
16
| `outlook.office.com/mail/`, `outlook.cloud.microsoft/mail/`, `outlook.cloud.microsoft/owa/favicon.ico` | page load | `crates/browser/src/targets.rs`, `crates/session/src/app.rs`, `crates/webview/src/host.rs` | second token source (Graph `Chat.*` tokens), parked tab | R | no |
17
| `teams.cloud.microsoft/__rusty/dialog` | page load (served locally) | `crates/app-base/src/task_dialog/sdk.rs`, `crates/webview/src/host_dialog.rs` | task dialog host origin | R | no |
18
| bot task dialog URL (server data) | page load | `crates/webview/src/host_dialog.rs` | bot task dialogs | R | no - third-party hosts |
19
20
Token audiences (not requests): `crates/session/src/scope.rs` - `ic3.teams.office.com`, `presence.teams.microsoft.com`, `outlook.office.com`, `api.spaces.skype.com`; `crates/chatsvc/src/channel_notifications.rs` - `uis.teams.microsoft.com`; chatsvcagg for CSA.
21
22
## chatsvc (`teams.cloud.microsoft/api/chatsvc/{region}/v1`)
23
24
| Path | Method | Module | Used for | R/W | Graph? |
25
|---|---|---|---|---|---|
26
| `/users/ME/conversations?view=msnp24Equivalent&pageSize=200` (+ backwardLink) | GET | `crates/chatsvc/src/conversations.rs` | conversation states: mute, hidden, read horizon, notes hide time (`unpinnedTime`/`historyHiddenTime`) | R | partly - `/me/chats` + `viewpoint` (isMuted, lastMessageReadDateTime); no hidden flag, no msg-id horizon |
27
| `/users/ME/conversations/{id}?view=msnp24Equivalent` | GET | `crates/chatsvc/src/conversations.rs` (`thread_url`), called from `crates/calling/src/meeting.rs`, `crates/calling/src/signaling.rs` | live meeting state of a thread, Echo bot 1:1 check | R | partly - `/chats/{id}` metadata; no live meeting state |
28
| `/users/ME/conversations/{id}/properties?name=alerts` | PUT | `crates/chatsvc/src/conversations.rs` | chat alerts on/off | W | partly - `viewpoint.isMuted` (mute only) |
29
| `/users/ME/conversations/{id}/properties?name=consumptionhorizon` | PUT | `crates/chatsvc/src/conversations.rs` (format in `read_horizon.rs`) | mark read | W | partly - `markChatReadForUser`; no message-id horizon |
30
| `/users/ME/conversations/{id}/properties?name=consumptionHorizonBookmark` | PUT | `crates/chatsvc/src/conversations.rs` (format in `read_horizon.rs`) | notes chat Mark as unread, cleared on read | W | no - `markChatUnreadForUser` leaves an own last message read |
31
| `/users/ME/conversations/{id}/properties?name=unpinnedTime`, `?name=historyHiddenTime` | PUT | `crates/chatsvc/src/conversations.rs` (`set_hidden_at`) | notes chat Hide / Undo | W | no - `hideForUser` answers 400 for `48:notes` |
32
| `/users/ME/conversations/{id}/properties?name=channelNotificationSettings` | PUT | `crates/chatsvc/src/conversations.rs` | channel notification write | W | no |
33
| `/users/ME/conversations/{channel};messageid={root}/messages` | POST | `crates/chatsvc/src/messages.rs` (`post_message`) | channel quote reply in the Teams blockquote shape + `qtdMsgs` (Graph cannot carry it) | W | no - Graph replies lose the Teams quote |
34
| `/users/ME/conversations/{chat}/messages` | POST | `crates/chatsvc/src/messages.rs` (`post_message`) | chat quote reply (also `48:notes`) in the Teams blockquote shape + `qtdMsgs`, see `write-path-parity.md` | W | no - Graph beta `replyWithQuote` writes a `messageReference` attachment instead of the Teams quote |
35
| `/users/ME/conversations/{id}/messages?view=msnp24Equivalent&pageSize=N` | GET | `crates/chatsvc/src/links.rs` | message `properties.links` for link previews | R | no - links property not in Graph |
36
| `/users/ME/conversations/{id}/messages?view&pageSize` | GET | `crates/chatsvc/src/translate.rs` | message language stamps | R | no |
37
| `/users/ME/conversations/{thread}/messages?view&pageSize=200` | GET | `crates/chatsvc/src/recap.rs` | audio-only recording detection (videoContent) | R | no |
38
| `/users/ME/conversations/{id}/messages/epochTimeStamp/{anchor}?direction&...` | GET | `crates/chatsvc/src/window.rs` | message window around an anchor (jump, paging) | R | partly - `/chats/{id}/messages` paging; no anchor or bidirectional window |
39
| `/users/ME/conversations/{id}/messages?view=msnp24Equivalent&pageSize=200` | GET | `crates/chatsvc/src/thread_activity.rs` | meeting chat system events (`ThreadActivity/MemberJoined`, `ThreadActivity/TopicUpdate`) | R | no - Graph `/chats/{id}/messages` leaves them out for meeting chats |
40
| `wss://augloop.office.com/` (AugLoop session: init, seed doc, activate `TeamsCopilotComposeRewriteStreamingAnnotation`, token provision, `TeamsCopilotComposeRewriteSignal`) | WebSocket | `crates/chatsvc/src/compose_copilot.rs`, `crates/session/assets/fetch.js` | composer "Write with Copilot": Rewrite, Proofread (`PROOFREAD_SCENARIO`), Adjust (tone/length), Customised (`customPrompt`) | R | no - Graph has no compose rewrite |
41
| `/users/ME/conversations/{id}/messages` (Control/Typing) | POST | `crates/chatsvc/src/messages.rs` | typing indicator | W | no |
42
| `/users/ME/conversations/{id}/messages/{messageId}` | PUT | `crates/chatsvc/src/messages.rs` | edit own message | W | yes - PATCH `/chats/{id}/messages/{id}` (edittime not mapped) |
43
| `/users/ME/conversations/{id}/messages/{messageId}?behavior=softDelete` | DELETE | `crates/chatsvc/src/messages.rs` | delete own message | W | yes - `softDelete` action |
44
| `/users/ME/conversations/{id}/messages/{messageId}/properties?name=emotions` | PUT, DELETE | `crates/chatsvc/src/messages.rs` | add / remove reaction | W | partly - `setReaction` / `unsetReaction`; no skin tone key, no custom emotion keys |
45
| `/users/ME/conversations/{source}/messages/forward` | POST | `crates/chatsvc/src/forward.rs` | forward up to 5 messages | W | no - Graph has no forward |
46
| `/users/ME/conversations/48:notifications` | GET | `crates/chatsvc/src/activity_feed.rs` | Activity bell and Mark all as read horizons (`consumptionhorizon`, `consumptionHorizonBookmark`) | R | no - no activity feed in Graph |
47
| `/users/ME/conversations/48:notifications/messages?view&pageSize=200&startTime=1` (+ backwardLink) | GET | `crates/chatsvc/src/activity_feed.rs` | Activity feed items (also the channel mention badges, `activity_mentions.rs`), see `activity-feed.md` | R | no - Graph only sends activity notifications, it cannot read the feed |
48
| `/users/ME/conversations/48:notifications/messages/{id}/properties?name=isread` | PUT | `crates/chatsvc/src/activity_feed.rs` | mark one Activity item read (Teams `markReadStatus`) | W | no |
49
| `/users/ME/conversations/48:notifications/properties?name=consumptionHorizonBookmark` | PUT | `crates/chatsvc/src/activity_feed.rs` | Activity Mark all as read (`0;{now};0`) | W | no |
50
| `/users/ME/conversations/48:saved/messages?...` | GET | `crates/chatsvc/src/saved.rs` | saved messages list | R | no |
51
| `/users/ME/conversations/{id}/rcmetadata/{rootId}` | PUT | `crates/chatsvc/src/saved.rs` | save / unsave message | W | no |
52
| `/users/ME/conversations/48:calllogs/messages?...` | GET | `crates/chatsvc/src/calllog.rs` | call history | R | no - `callRecords` is app-only |
53
| `/users/ME/properties` | GET | `crates/chatsvc/src/settings.rs` | user settings bag (sections, team order, skin tone, personal sound) | R | no |
54
| `/users/ME/properties?name={key}` | PUT | `crates/chatsvc/src/settings.rs`, `crates/chatsvc/src/sound_settings.rs` | write user settings | W | no |
55
| `/users/ME/drafts?view&pageSize&startTime` | GET | `crates/chatsvc/src/drafts.rs` | scheduled messages | R | no |
56
| `/users/ME/drafts`, `/users/ME/drafts/{id}` | POST, PUT, DELETE | `crates/chatsvc/src/drafts.rs` | create, reschedule, cancel scheduled message | W | no |
57
| `/threads/{id}/consumptionhorizons` | GET | `crates/chatsvc/src/receipts.rs` | member read receipts | R | no - no per-member read horizons in Graph |
58
| `/agents/{botMri}/invoke` (fallback region `de`) | POST | `crates/chatsvc/src/cards.rs` | adaptive card action invoke | W | no - Bot Framework invoke |
59
60
## Middle tier MT (`teams.cloud.microsoft/api/mt/{region}`, `teams.microsoft.com/api/mt/...`)
61
62
| Path | Method | Module | Used for | R/W | Graph? |
63
|---|---|---|---|---|---|
64
| `/v2.1/me/calendars/calendarView?startDate&endDate` | GET | `crates/chatsvc/src/calendar.rs` | Teams calendar with join links | R | yes - `/me/calendarView` (Teams skypeTeamsData not mapped) |
65
| `/beta/me/calendarEvents/privateMeeting/schedulingService/create` | POST | `crates/chatsvc/src/calendar.rs` | Meet now | W | partly - `/me/onlineMeetings`; no ad-hoc chat unhide |
66
| `/beta/chats/{id}/apps/chatentitlements` | GET | `crates/chatsvc/src/cards.rs` | apps entitled in a chat | R | partly - `/chats/{id}/installedApps` |
67
| `/beta/commands/com.microsoft.teamspace.inputextension.giphy/execute?version=1.0` | POST | `crates/chatsvc/src/gifs.rs` | GIF search and trending | R | no |
68
| `/beta/users/fetchShortProfile?...&includeBots=true` | POST | `crates/chatsvc/src/bot_profiles.rs` | bot names and images | R | no |
69
| `/beta/users/useraggregatesettings` | POST | `crates/chatsvc/src/language_settings.rs`, `crates/chatsvc/src/sound_settings.rs` | translation, voice and recording policy settings | R | no |
70
| `/beta/users/languageAccountSettings` | PATCH | `crates/chatsvc/src/language_settings.rs` | translation preferences | W | no |
71
| `/beta/usersettings/{mri}/ringtonesettings` | POST | `crates/chatsvc/src/sound_settings.rs` | ringtone | W | no |
72
| `/beta/teams/{teamThreadId}/channels` | POST | `crates/chatsvc/src/team_admin.rs` | create standard channel | W | yes - `POST /teams/{id}/channels`, but the Teams web token has no `Channel.Create` |
73
| `/beta/teams/{teamThreadId}/channels/{channelId}` | PATCH, DELETE | `crates/chatsvc/src/team_admin.rs` | rename / delete standard channel | W | yes - `PATCH`/`DELETE /teams/{id}/channels/{id}`, no `Channel.ReadWrite.All` / `Channel.Delete.All` in the Teams web token |
74
| `teams.microsoft.com/api/mt/emea//beta/meetings/v1/options/{tenant}/{organizer}/{thread}/0?monarch=true` | GET | `crates/calling/src/meeting_options.rs` | meeting options read | R | partly - onlineMeeting GET (organizer only) |
75
| `/beta/meetings/v1/options/{...}/0/0?monarch=true` | POST | `crates/calling/src/meeting_options.rs` | meeting options write (lobby, presenters, chat) | W | partly - onlineMeeting PATCH (organizer only, not live) |
76
| `/beta/meetings/fluidboard?threadId&organizerId&tenantId&meetingTitle` | GET | `crates/calling/src/whiteboard.rs` | meeting whiteboard URL | R | no |
77
78
## Chat service aggregator CSA (`teams.cloud.microsoft/api/csa/{region}/api/v1`)
79
80
| Path | Method | Module | Used for | R/W | Graph? |
81
|---|---|---|---|---|---|
82
| `/teams/users/me/conversationFolders?...` | GET | `crates/chatsvc/src/pins/chats.rs`, `crates/chatsvc/src/pins/folders.rs` | pinned chats and folder tree | R | no |
83
| `/teams/users/me/conversationFolders?...` | POST | `crates/chatsvc/src/pins/chats.rs`, `crates/chatsvc/src/pins/folders.rs` | pin, unpin, reorder, create and move folder | W | no |
84
| `/teams/users/me/conversationFolders/{folderId}?...` | PUT, DELETE | `crates/chatsvc/src/pins/folders.rs` | rename, expand, delete folder | W | no |
85
| `/teams/users/me/pinnedChannels` | GET, POST, DELETE | `crates/chatsvc/src/pins/channels.rs` | pinned channels | R/W | no |
86
| `/teams/users/me?isPrefetch=false&enableMembershipSummary=true` | GET | `crates/chatsvc/src/pins/teams.rs` | team and tab layout, sidebar order | R | partly - `/me/joinedTeams` + channels + tabs; no sidebar order |
87
| `/chats/{id}/pinbar` | GET, POST, DELETE | `crates/chatsvc/src/pins/pinbar.rs` | pinned messages with folders | R/W | partly - `/chats/{id}/pinnedMessages` (flat, no folders) |
88
| `/chats/{id}/messages/languages/{language}` | POST | `crates/chatsvc/src/translate.rs` | chat message translation | R | no |
89
| `/teams/{team}/channels/{channel}/{root}/messages/languages/{language}` | POST | `crates/chatsvc/src/translate.rs` | channel message translation | R | no |
90
| `/translator/languages?locale={ui}` | GET | `crates/chatsvc/src/translate.rs` | supported languages | R | no |
91
92
## Notification settings NSS (`teams.cloud.microsoft/api/nss/{region}/v1`)
93
94
| Path | Method | Module | Used for | R/W | Graph? |
95
|---|---|---|---|---|---|
96
| `/me/notificationSettings/channels/batch` | POST | `crates/chatsvc/src/channel_notifications.rs` | channel notification read (up to 100 ids) | R | no |
97
98
## Teams and channels provisioning (`teams.cloud.microsoft/fabric/{region}/templates/api`, token `https://templates.teams.microsoft.com/.default`, header `X-AnchorMailbox: OID:{me}@{tenant}`)
99
100
| Path | Method | Module | Used for | R/W | Graph? |
101
|---|---|---|---|---|---|
102
| `/teams/{groupId}/channels?forceSync=false` | POST | `crates/chatsvc/src/team_admin.rs` | create private channel | W | yes - `POST /teams/{id}/channels` with `membershipType: private`, no `Channel.Create` in the Teams web token |
103
| `/teams/{groupId}/channels/{OID:substrateGroupId@tenant}?forceSync=false` | PATCH, DELETE | `crates/chatsvc/src/team_admin.rs` | rename / delete private channel | W | yes - as for standard channels, same missing scopes |
104
105
## Presence (`presence.teams.microsoft.com/v1`)
106
107
| Path | Method | Module | Used for | R/W | Graph? |
108
|---|---|---|---|---|---|
109
| `/presence/getpresence/` | POST | `crates/chatsvc/src/presence/lookup.rs` | presence of many users (650 per call) | R | partly - `/communications/getPresencesByUserId` needs `Presence.Read.All`, which the web app tokens lack |
110
| `/presence/getpresence/` | POST | `crates/chatsvc/src/presence.rs` | own status (note, out of office, work location) | R | partly - `/me/presence`; no work location, no pinned note |
111
| `/pubsub/subscriptions/{endpointId}` | POST | `crates/chatsvc/src/presence/lookup.rs` | live presence push via Trouter | W | no - Graph change notifications need a public webhook |
112
| `/me/forceavailability/` | PUT | `crates/chatsvc/src/presence.rs` | set or clear availability | W | partly - `setUserPreferredPresence` |
113
| `/me/endpoints/`, `/me/endpoints/{endpointId}` | PUT, DELETE | `crates/chatsvc/src/presence.rs` | register this device as presence endpoint | W | no |
114
| `/me/reportmyactivity/` | POST | `crates/chatsvc/src/presence.rs` | active / inactive | W | no |
115
| `/me/publishnote` | PUT | `crates/chatsvc/src/presence.rs` | status note | W | partly - `setStatusMessage`; no "show when messaged" flag |
116
| `/me/workLocation/` | PUT | `crates/chatsvc/src/presence.rs` | work location | W | no |
117
118
## Trouter (push)
119
120
| Host + path | Method | Module | Used for | R/W | Graph? |
121
|---|---|---|---|---|---|
122
| `teams.cloud.microsoft/api/authsvc/v1.0/authz` | POST | `crates/chatsvc/assets/discover_host.js`, `crates/chatsvc/src/realtime/host.rs` | Trouter host discovery | R | no |
123
| `teams.cloud.microsoft/registrar/prod/V2/registrations`, `/registrations/{endpointId}` | POST, DELETE | `crates/chatsvc/assets/trouter.js` (run by `crates/chatsvc/src/realtime/runner.rs`) | register / unregister push endpoint | W | no |
124
| `wss://{host}/v4/c?...` (default `go-eu.trouter.teams.microsoft.com`) | WebSocket | `crates/chatsvc/assets/trouter.js`, `crates/chatsvc/src/realtime/host.rs` | messages, presence, call events | R | no - Graph notifications need a public webhook |
125
| `{trouterUri}callAgent/{callId}/...` | inbound | `crates/calling/src/trouter_events.rs`, `crates/calling/src/engine.rs` | callback URLs handed to the call controller | R | no |
126
127
## Substrate search (`substrate.office.com`)
128
129
| Path | Method | Module | Used for | R/W | Graph? |
130
|---|---|---|---|---|---|
131
| `/search/api/v2/init?cvid&scenario=powerbar` | GET | `crates/chatsvc/src/substrate_search/mod.rs` | search session | R | no |
132
| `/search/api/v1/suggestions?...` | GET, POST | `crates/chatsvc/src/substrate_search/mod.rs` | zero-query and typeahead suggestions | R | partly - `/search/query`; no people or chat ranking |
133
| `/searchservice/api/v2/query` | POST | `crates/chatsvc/src/substrate_search/mod.rs` | message, people and file search (KQL) | R | partly - `/search/query` chatMessage, KQL subset |
134
135
## Link previews (`*.asyncgw.teams.microsoft.com/urlp/v1/url`)
136
137
| Path | Method | Module | Used for | R/W | Graph? |
138
|---|---|---|---|---|---|
139
| `/info?url={encoded}` | GET | `crates/chatsvc/src/links.rs` | OpenGraph preview | R | no |
140
| `/image/Thumbnail?url=...` | GET (binary) | `crates/chatsvc/src/links.rs` (host check `LINK_PROXY_HOST_SUFFIX`, reused by `crates/core/src/external_image.rs`) | preview thumbnail | R | no |
141
142
## Calling
143
144
| Host + path | Method | Module | Used for | R/W | Graph? |
145
|---|---|---|---|---|---|
146
| `api-emea.flightproxy.teams.microsoft.com/api/v2/epconv` | POST | `crates/calling/src/signaling.rs` | create conversation, subscribe meeting, resolve meeting id | W | no - `/communications/calls` is app-only (bot registration), not a user client |
147
| `api.flightproxy.teams.microsoft.com/api/v2/ep/{cc or conv host}/{path}` | as link | `crates/calling/src/signaling.rs` (`routed_url`) | transport for every `*.cc.skype.com` / `*.conv.skype.com` link | R/W | no |
148
| conversation controller links (server-provided): join, end for all, broker poll, updateEndpointState, publishState, removeState, sendMessage, addParticipant(AndModality), updateEndpointMetadata, admit, removeParticipant, mute, updateMeetingSettings, updateParticipantRole, notificationLinks, leave, transfer | POST, PUT, GET, DELETE | `crates/calling/src/signaling.rs` | meeting join, roster, hand raise, spotlight, reactions, invite, lobby, mute, lock, roles, keep-alive, leave, transfer | R/W | no - no user-token call control in Graph; `updateMeetingSettings` partly via onlineMeeting PATCH |
149
| call leg links (server-provided, `*.cc.skype.com`): attach, progress, acceptance, callLeg, rejection, mediaAcknowledgement, applyChannelParameters, controlVideoStreaming, mediaAnswer, updateMediaDescriptions | POST, DELETE | `crates/calling/src/signaling.rs`, `crates/calling/src/call.rs`, `crates/calling/src/push.rs`, `crates/calling/src/engine.rs` | incoming call, SDP offer / answer, ringing, decline, keep-alive, renegotiation, video layout | W | no |
150
| recording / caption bot command URL (from roster) | POST | `crates/calling/src/signaling.rs`, `crates/calling/assets/caption_command.js` | recording start / stop, captions on / off, caption language | W | no - Graph only has post-meeting recordings and transcripts |
151
| `teams.cloud.microsoft/api/authsvc/v1.0/authz` | POST | `crates/calling/assets/caption_command.js` | Skype token for the bot command | R | no |
152
| `teams.microsoft.com/trap/tokens` | GET | `crates/calling/src/relay.rs` | TURN credentials | R | no |
153
| `gateway-eu.az.relay.teams.cloud.microsoft` (TURN 3478 udp, 443 tcp, turns 443) | TURN | `crates/calling/src/relay.rs` | media relay | - | no |
154
155
Link parsing only (not requests): `crates/calling/src/breakout.rs` (breakout join links), `crates/calling/src/whiteboard.rs` (whiteboard share detection).
156
157
Teams on the web links (opened in a window, not requested by us): `crates/app-state/src/call/web_call.rs` (meetup-join and chat links for the "Use Teams on the web for calls" setting).
158
159
## Teams CDN (`statics.teams.cdn.office.net`, no auth)
160
161
| Path | Method | Module | Used for | R/W | Graph? |
162
|---|---|---|---|---|---|
163
| `/evergreen-assets/audio/{file}.mp3` | GET | `crates/chatsvc/src/teams_cdn.rs` (URL), `crates/app-base/src/notify/sound_cache.rs` (download) | notification sounds | R | no - static asset |
164
| `/evergreen-assets/stickerassets/{name}-250x250/{file}?v=5` | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/app-base/src/stickers.rs` | stickers | R | no |
165
| `/evergreen-assets/personal-expressions/v2/assets/emoticons/{id}/default/{size}_anim_f{tone}.png` | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/app-base/src/emoticons/mod.rs` | emoticon images | R | no |
166
| `/evergreen-assets/backgroundimages/config.json?v=7` + images from it | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/calling/src/background.rs` | call background catalog | R | no |
167
168
## Third-party and SharePoint
169
170
| Host + path | Method | Module | Used for | R/W | Graph? |
171
|---|---|---|---|---|---|
172
| `media*.giphy.com/...` (URL from message or GIF search) | GET | `crates/app-base/src/remote_image.rs`, `crates/graph/src/content.rs` | GIF display | R | no |
173
| `{site}/_api/v2.1/shares/{shareId}/driveItem`, `/drives/{d}/items/{i}/listItem`, `/media/transcripts`, `/media/transcripts/{t}/streamContent`, `DELETE /items/{i}` | GET, DELETE | `crates/chatsvc/src/recap.rs`, `crates/chatsvc/src/transcripts.rs` | recording item, expiry, transcripts, delete recording | R/W | partly - Graph `/shares`, listItem, `/onlineMeetings/{id}/transcripts` (vtt only, meeting-scoped), `DELETE /drives/{d}/items/{i}` |
174
| pre-authenticated `downloadUrl` / `uploadUrl` (`*.sharepoint.com`, issued by Graph) | GET, PUT, DELETE | `crates/graph/src/files.rs` | file download, chunked upload | R/W | already Graph-issued; chunk PUT is the documented protocol |
175
176
## Local (not Microsoft)
177
178
| Host + path | Method | Module | Used for |
179
|---|---|---|---|
180
| `127.0.0.1:9222/json/*`, `ws://127.0.0.1:9222/devtools/page/{id}` | GET, PUT, WS | `crates/browser/src/http.rs`, `crates/browser/src/browser.rs`, `crates/session/src/session.rs` | drive headless Chrome |
181
| `127.0.0.1:{port}/mcp`, `/healthz` | HTTP | `crates/mcp/src/server.rs`, `crates/mcp/src/install/wsl.rs`, `crates/app-state/src/agent_api/mod.rs` | MCP server for agents |
182
183
## Graph calls made from service crates (for completeness)
184
185
`crates/chatsvc/src/calendar/reminders.rs` (`/me/reminderView`, snooze, dismiss), `crates/chatsvc/src/calendar/schedule.rs` (`/me/events`, RSVP, iCalUId lookup), `crates/chatsvc/src/recap.rs` and `crates/chatsvc/src/transcripts.rs` (`/chats/{id}/messages`, `/chats/{id}`, `/me/onlineMeetings`, attendance reports), `crates/calling/src/signaling.rs` (`/me`). These are Graph already.
186
187
## Open follow-ups
188
189
- Graph calls above live in `chatsvc` and `calling`, not in the `graph` crate.
190
- `chatsvc` builds its service base URLs per module (`https://teams.cloud.microsoft/api/{chatsvc,mt,csa,nss}/{region}`); CSA base exists twice (`pins/mod.rs`, `translate.rs`). One `chatsvc` base-URL module would remove the repeats.
191
- `recap.rs` and `transcripts.rs` duplicate the Graph chat scan and SharePoint item lookup.
192
- Calling: `CHATSVC_REGION` is owned by `signaling.rs` and reused by MT modules; meeting options read and write use two hosts (`teams.microsoft.com` read with `emea//beta`, `teams.cloud.microsoft` write).
193
- Token exchange `authsvc/v1.0/authz` appears in two JS assets (`chatsvc/assets/discover_host.js`, `calling/assets/caption_command.js`).
194
- Region is hard-coded `emea` in several places (`recap.rs` `DEFAULT_REGION`, calling `CHATSVC_REGION`, `relay.rs` host, flightproxy `api-emea`).
@@ -0,0 +1,194 @@1
# Internal endpoints2
3
Every endpoint Rusty Teams calls that is not `graph.microsoft.com`, grouped by service. Guardrail: each lives behind a clearly named module; `crates/chatsvc/tests/internal_endpoints.rs` fails when a non-Graph host string shows up outside the allowed module paths.4
5
How requests leave the app: Rust never sends Microsoft requests directly. `session::Session` (`crates/session/src/session.rs`) runs `crates/session/assets/fetch.js` inside the signed-in Teams or Outlook page (CDP or WebView2); the page attaches the bearer token from the MSAL cache, so the token never leaves the page. Only CDN images and sounds go through the gpui HTTP client.6
7
Columns: R = read, W = write. "Graph?" = could Graph replace it.8
9
## Sign-in and page hosts10
11
| Host + path | Method | Module | Used for | R/W | Graph? |12
|---|---|---|---|---|---|13
| `login.microsoftonline.com/{tenant}/oauth2/v2.0/token` | POST | `crates/session/assets/fetch.js` | refresh access token per resource from the MSAL refresh token | W | no - the auth flow itself |14
| `teams.cloud.microsoft/` | page load | `crates/browser/src/targets.rs`, `crates/browser/src/launch.rs`, `crates/session/src/app.rs`, `crates/webview/src/host.rs` | Teams web session that holds the MSAL cache | R | no |15
| `teams.cloud.microsoft/robots.txt` | page load | `crates/session/src/app.rs` | parked tab | R | no |16
| `outlook.office.com/mail/`, `outlook.cloud.microsoft/mail/`, `outlook.cloud.microsoft/owa/favicon.ico` | page load | `crates/browser/src/targets.rs`, `crates/session/src/app.rs`, `crates/webview/src/host.rs` | second token source (Graph `Chat.*` tokens), parked tab | R | no |17
| `teams.cloud.microsoft/__rusty/dialog` | page load (served locally) | `crates/app-base/src/task_dialog/sdk.rs`, `crates/webview/src/host_dialog.rs` | task dialog host origin | R | no |18
| bot task dialog URL (server data) | page load | `crates/webview/src/host_dialog.rs` | bot task dialogs | R | no - third-party hosts |19
20
Token audiences (not requests): `crates/session/src/scope.rs` - `ic3.teams.office.com`, `presence.teams.microsoft.com`, `outlook.office.com`, `api.spaces.skype.com`; `crates/chatsvc/src/channel_notifications.rs` - `uis.teams.microsoft.com`; chatsvcagg for CSA.21
22
## chatsvc (`teams.cloud.microsoft/api/chatsvc/{region}/v1`)23
24
| Path | Method | Module | Used for | R/W | Graph? |25
|---|---|---|---|---|---|26
| `/users/ME/conversations?view=msnp24Equivalent&pageSize=200` (+ backwardLink) | GET | `crates/chatsvc/src/conversations.rs` | conversation states: mute, hidden, read horizon, notes hide time (`unpinnedTime`/`historyHiddenTime`) | R | partly - `/me/chats` + `viewpoint` (isMuted, lastMessageReadDateTime); no hidden flag, no msg-id horizon |27
| `/users/ME/conversations/{id}?view=msnp24Equivalent` | GET | `crates/chatsvc/src/conversations.rs` (`thread_url`), called from `crates/calling/src/meeting.rs`, `crates/calling/src/signaling.rs` | live meeting state of a thread, Echo bot 1:1 check | R | partly - `/chats/{id}` metadata; no live meeting state |28
| `/users/ME/conversations/{id}/properties?name=alerts` | PUT | `crates/chatsvc/src/conversations.rs` | chat alerts on/off | W | partly - `viewpoint.isMuted` (mute only) |29
| `/users/ME/conversations/{id}/properties?name=consumptionhorizon` | PUT | `crates/chatsvc/src/conversations.rs` (format in `read_horizon.rs`) | mark read | W | partly - `markChatReadForUser`; no message-id horizon |30
| `/users/ME/conversations/{id}/properties?name=consumptionHorizonBookmark` | PUT | `crates/chatsvc/src/conversations.rs` (format in `read_horizon.rs`) | notes chat Mark as unread, cleared on read | W | no - `markChatUnreadForUser` leaves an own last message read |31
| `/users/ME/conversations/{id}/properties?name=unpinnedTime`, `?name=historyHiddenTime` | PUT | `crates/chatsvc/src/conversations.rs` (`set_hidden_at`) | notes chat Hide / Undo | W | no - `hideForUser` answers 400 for `48:notes` |32
| `/users/ME/conversations/{id}/properties?name=channelNotificationSettings` | PUT | `crates/chatsvc/src/conversations.rs` | channel notification write | W | no |33
| `/users/ME/conversations/{channel};messageid={root}/messages` | POST | `crates/chatsvc/src/messages.rs` (`post_message`) | channel quote reply in the Teams blockquote shape + `qtdMsgs` (Graph cannot carry it) | W | no - Graph replies lose the Teams quote |34
| `/users/ME/conversations/{chat}/messages` | POST | `crates/chatsvc/src/messages.rs` (`post_message`) | chat quote reply (also `48:notes`) in the Teams blockquote shape + `qtdMsgs`, see `write-path-parity.md` | W | no - Graph beta `replyWithQuote` writes a `messageReference` attachment instead of the Teams quote |35
| `/users/ME/conversations/{id}/messages?view=msnp24Equivalent&pageSize=N` | GET | `crates/chatsvc/src/links.rs` | message `properties.links` for link previews | R | no - links property not in Graph |36
| `/users/ME/conversations/{id}/messages?view&pageSize` | GET | `crates/chatsvc/src/translate.rs` | message language stamps | R | no |37
| `/users/ME/conversations/{thread}/messages?view&pageSize=200` | GET | `crates/chatsvc/src/recap.rs` | audio-only recording detection (videoContent) | R | no |38
| `/users/ME/conversations/{id}/messages/epochTimeStamp/{anchor}?direction&...` | GET | `crates/chatsvc/src/window.rs` | message window around an anchor (jump, paging) | R | partly - `/chats/{id}/messages` paging; no anchor or bidirectional window |39
| `/users/ME/conversations/{id}/messages?view=msnp24Equivalent&pageSize=200` | GET | `crates/chatsvc/src/thread_activity.rs` | meeting chat system events (`ThreadActivity/MemberJoined`, `ThreadActivity/TopicUpdate`) | R | no - Graph `/chats/{id}/messages` leaves them out for meeting chats |40
| `wss://augloop.office.com/` (AugLoop session: init, seed doc, activate `TeamsCopilotComposeRewriteStreamingAnnotation`, token provision, `TeamsCopilotComposeRewriteSignal`) | WebSocket | `crates/chatsvc/src/compose_copilot.rs`, `crates/session/assets/fetch.js` | composer "Write with Copilot": Rewrite, Proofread (`PROOFREAD_SCENARIO`), Adjust (tone/length), Customised (`customPrompt`) | R | no - Graph has no compose rewrite |41
| `/users/ME/conversations/{id}/messages` (Control/Typing) | POST | `crates/chatsvc/src/messages.rs` | typing indicator | W | no |42
| `/users/ME/conversations/{id}/messages/{messageId}` | PUT | `crates/chatsvc/src/messages.rs` | edit own message | W | yes - PATCH `/chats/{id}/messages/{id}` (edittime not mapped) |43
| `/users/ME/conversations/{id}/messages/{messageId}?behavior=softDelete` | DELETE | `crates/chatsvc/src/messages.rs` | delete own message | W | yes - `softDelete` action |44
| `/users/ME/conversations/{id}/messages/{messageId}/properties?name=emotions` | PUT, DELETE | `crates/chatsvc/src/messages.rs` | add / remove reaction | W | partly - `setReaction` / `unsetReaction`; no skin tone key, no custom emotion keys |45
| `/users/ME/conversations/{source}/messages/forward` | POST | `crates/chatsvc/src/forward.rs` | forward up to 5 messages | W | no - Graph has no forward |46
| `/users/ME/conversations/48:notifications` | GET | `crates/chatsvc/src/activity_feed.rs` | Activity bell and Mark all as read horizons (`consumptionhorizon`, `consumptionHorizonBookmark`) | R | no - no activity feed in Graph |47
| `/users/ME/conversations/48:notifications/messages?view&pageSize=200&startTime=1` (+ backwardLink) | GET | `crates/chatsvc/src/activity_feed.rs` | Activity feed items (also the channel mention badges, `activity_mentions.rs`), see `activity-feed.md` | R | no - Graph only sends activity notifications, it cannot read the feed |48
| `/users/ME/conversations/48:notifications/messages/{id}/properties?name=isread` | PUT | `crates/chatsvc/src/activity_feed.rs` | mark one Activity item read (Teams `markReadStatus`) | W | no |49
| `/users/ME/conversations/48:notifications/properties?name=consumptionHorizonBookmark` | PUT | `crates/chatsvc/src/activity_feed.rs` | Activity Mark all as read (`0;{now};0`) | W | no |50
| `/users/ME/conversations/48:saved/messages?...` | GET | `crates/chatsvc/src/saved.rs` | saved messages list | R | no |51
| `/users/ME/conversations/{id}/rcmetadata/{rootId}` | PUT | `crates/chatsvc/src/saved.rs` | save / unsave message | W | no |52
| `/users/ME/conversations/48:calllogs/messages?...` | GET | `crates/chatsvc/src/calllog.rs` | call history | R | no - `callRecords` is app-only |53
| `/users/ME/properties` | GET | `crates/chatsvc/src/settings.rs` | user settings bag (sections, team order, skin tone, personal sound) | R | no |54
| `/users/ME/properties?name={key}` | PUT | `crates/chatsvc/src/settings.rs`, `crates/chatsvc/src/sound_settings.rs` | write user settings | W | no |55
| `/users/ME/drafts?view&pageSize&startTime` | GET | `crates/chatsvc/src/drafts.rs` | scheduled messages | R | no |56
| `/users/ME/drafts`, `/users/ME/drafts/{id}` | POST, PUT, DELETE | `crates/chatsvc/src/drafts.rs` | create, reschedule, cancel scheduled message | W | no |57
| `/threads/{id}/consumptionhorizons` | GET | `crates/chatsvc/src/receipts.rs` | member read receipts | R | no - no per-member read horizons in Graph |58
| `/agents/{botMri}/invoke` (fallback region `de`) | POST | `crates/chatsvc/src/cards.rs` | adaptive card action invoke | W | no - Bot Framework invoke |59
60
## Middle tier MT (`teams.cloud.microsoft/api/mt/{region}`, `teams.microsoft.com/api/mt/...`)61
62
| Path | Method | Module | Used for | R/W | Graph? |63
|---|---|---|---|---|---|64
| `/v2.1/me/calendars/calendarView?startDate&endDate` | GET | `crates/chatsvc/src/calendar.rs` | Teams calendar with join links | R | yes - `/me/calendarView` (Teams skypeTeamsData not mapped) |65
| `/beta/me/calendarEvents/privateMeeting/schedulingService/create` | POST | `crates/chatsvc/src/calendar.rs` | Meet now | W | partly - `/me/onlineMeetings`; no ad-hoc chat unhide |66
| `/beta/chats/{id}/apps/chatentitlements` | GET | `crates/chatsvc/src/cards.rs` | apps entitled in a chat | R | partly - `/chats/{id}/installedApps` |67
| `/beta/commands/com.microsoft.teamspace.inputextension.giphy/execute?version=1.0` | POST | `crates/chatsvc/src/gifs.rs` | GIF search and trending | R | no |68
| `/beta/users/fetchShortProfile?...&includeBots=true` | POST | `crates/chatsvc/src/bot_profiles.rs` | bot names and images | R | no |69
| `/beta/users/useraggregatesettings` | POST | `crates/chatsvc/src/language_settings.rs`, `crates/chatsvc/src/sound_settings.rs` | translation, voice and recording policy settings | R | no |70
| `/beta/users/languageAccountSettings` | PATCH | `crates/chatsvc/src/language_settings.rs` | translation preferences | W | no |71
| `/beta/usersettings/{mri}/ringtonesettings` | POST | `crates/chatsvc/src/sound_settings.rs` | ringtone | W | no |72
| `/beta/teams/{teamThreadId}/channels` | POST | `crates/chatsvc/src/team_admin.rs` | create standard channel | W | yes - `POST /teams/{id}/channels`, but the Teams web token has no `Channel.Create` |73
| `/beta/teams/{teamThreadId}/channels/{channelId}` | PATCH, DELETE | `crates/chatsvc/src/team_admin.rs` | rename / delete standard channel | W | yes - `PATCH`/`DELETE /teams/{id}/channels/{id}`, no `Channel.ReadWrite.All` / `Channel.Delete.All` in the Teams web token |74
| `teams.microsoft.com/api/mt/emea//beta/meetings/v1/options/{tenant}/{organizer}/{thread}/0?monarch=true` | GET | `crates/calling/src/meeting_options.rs` | meeting options read | R | partly - onlineMeeting GET (organizer only) |75
| `/beta/meetings/v1/options/{...}/0/0?monarch=true` | POST | `crates/calling/src/meeting_options.rs` | meeting options write (lobby, presenters, chat) | W | partly - onlineMeeting PATCH (organizer only, not live) |76
| `/beta/meetings/fluidboard?threadId&organizerId&tenantId&meetingTitle` | GET | `crates/calling/src/whiteboard.rs` | meeting whiteboard URL | R | no |77
78
## Chat service aggregator CSA (`teams.cloud.microsoft/api/csa/{region}/api/v1`)79
80
| Path | Method | Module | Used for | R/W | Graph? |81
|---|---|---|---|---|---|82
| `/teams/users/me/conversationFolders?...` | GET | `crates/chatsvc/src/pins/chats.rs`, `crates/chatsvc/src/pins/folders.rs` | pinned chats and folder tree | R | no |83
| `/teams/users/me/conversationFolders?...` | POST | `crates/chatsvc/src/pins/chats.rs`, `crates/chatsvc/src/pins/folders.rs` | pin, unpin, reorder, create and move folder | W | no |84
| `/teams/users/me/conversationFolders/{folderId}?...` | PUT, DELETE | `crates/chatsvc/src/pins/folders.rs` | rename, expand, delete folder | W | no |85
| `/teams/users/me/pinnedChannels` | GET, POST, DELETE | `crates/chatsvc/src/pins/channels.rs` | pinned channels | R/W | no |86
| `/teams/users/me?isPrefetch=false&enableMembershipSummary=true` | GET | `crates/chatsvc/src/pins/teams.rs` | team and tab layout, sidebar order | R | partly - `/me/joinedTeams` + channels + tabs; no sidebar order |87
| `/chats/{id}/pinbar` | GET, POST, DELETE | `crates/chatsvc/src/pins/pinbar.rs` | pinned messages with folders | R/W | partly - `/chats/{id}/pinnedMessages` (flat, no folders) |88
| `/chats/{id}/messages/languages/{language}` | POST | `crates/chatsvc/src/translate.rs` | chat message translation | R | no |89
| `/teams/{team}/channels/{channel}/{root}/messages/languages/{language}` | POST | `crates/chatsvc/src/translate.rs` | channel message translation | R | no |90
| `/translator/languages?locale={ui}` | GET | `crates/chatsvc/src/translate.rs` | supported languages | R | no |91
92
## Notification settings NSS (`teams.cloud.microsoft/api/nss/{region}/v1`)93
94
| Path | Method | Module | Used for | R/W | Graph? |95
|---|---|---|---|---|---|96
| `/me/notificationSettings/channels/batch` | POST | `crates/chatsvc/src/channel_notifications.rs` | channel notification read (up to 100 ids) | R | no |97
98
## Teams and channels provisioning (`teams.cloud.microsoft/fabric/{region}/templates/api`, token `https://templates.teams.microsoft.com/.default`, header `X-AnchorMailbox: OID:{me}@{tenant}`)99
100
| Path | Method | Module | Used for | R/W | Graph? |101
|---|---|---|---|---|---|102
| `/teams/{groupId}/channels?forceSync=false` | POST | `crates/chatsvc/src/team_admin.rs` | create private channel | W | yes - `POST /teams/{id}/channels` with `membershipType: private`, no `Channel.Create` in the Teams web token |103
| `/teams/{groupId}/channels/{OID:substrateGroupId@tenant}?forceSync=false` | PATCH, DELETE | `crates/chatsvc/src/team_admin.rs` | rename / delete private channel | W | yes - as for standard channels, same missing scopes |104
105
## Presence (`presence.teams.microsoft.com/v1`)106
107
| Path | Method | Module | Used for | R/W | Graph? |108
|---|---|---|---|---|---|109
| `/presence/getpresence/` | POST | `crates/chatsvc/src/presence/lookup.rs` | presence of many users (650 per call) | R | partly - `/communications/getPresencesByUserId` needs `Presence.Read.All`, which the web app tokens lack |110
| `/presence/getpresence/` | POST | `crates/chatsvc/src/presence.rs` | own status (note, out of office, work location) | R | partly - `/me/presence`; no work location, no pinned note |111
| `/pubsub/subscriptions/{endpointId}` | POST | `crates/chatsvc/src/presence/lookup.rs` | live presence push via Trouter | W | no - Graph change notifications need a public webhook |112
| `/me/forceavailability/` | PUT | `crates/chatsvc/src/presence.rs` | set or clear availability | W | partly - `setUserPreferredPresence` |113
| `/me/endpoints/`, `/me/endpoints/{endpointId}` | PUT, DELETE | `crates/chatsvc/src/presence.rs` | register this device as presence endpoint | W | no |114
| `/me/reportmyactivity/` | POST | `crates/chatsvc/src/presence.rs` | active / inactive | W | no |115
| `/me/publishnote` | PUT | `crates/chatsvc/src/presence.rs` | status note | W | partly - `setStatusMessage`; no "show when messaged" flag |116
| `/me/workLocation/` | PUT | `crates/chatsvc/src/presence.rs` | work location | W | no |117
118
## Trouter (push)119
120
| Host + path | Method | Module | Used for | R/W | Graph? |121
|---|---|---|---|---|---|122
| `teams.cloud.microsoft/api/authsvc/v1.0/authz` | POST | `crates/chatsvc/assets/discover_host.js`, `crates/chatsvc/src/realtime/host.rs` | Trouter host discovery | R | no |123
| `teams.cloud.microsoft/registrar/prod/V2/registrations`, `/registrations/{endpointId}` | POST, DELETE | `crates/chatsvc/assets/trouter.js` (run by `crates/chatsvc/src/realtime/runner.rs`) | register / unregister push endpoint | W | no |124
| `wss://{host}/v4/c?...` (default `go-eu.trouter.teams.microsoft.com`) | WebSocket | `crates/chatsvc/assets/trouter.js`, `crates/chatsvc/src/realtime/host.rs` | messages, presence, call events | R | no - Graph notifications need a public webhook |125
| `{trouterUri}callAgent/{callId}/...` | inbound | `crates/calling/src/trouter_events.rs`, `crates/calling/src/engine.rs` | callback URLs handed to the call controller | R | no |126
127
## Substrate search (`substrate.office.com`)128
129
| Path | Method | Module | Used for | R/W | Graph? |130
|---|---|---|---|---|---|131
| `/search/api/v2/init?cvid&scenario=powerbar` | GET | `crates/chatsvc/src/substrate_search/mod.rs` | search session | R | no |132
| `/search/api/v1/suggestions?...` | GET, POST | `crates/chatsvc/src/substrate_search/mod.rs` | zero-query and typeahead suggestions | R | partly - `/search/query`; no people or chat ranking |133
| `/searchservice/api/v2/query` | POST | `crates/chatsvc/src/substrate_search/mod.rs` | message, people and file search (KQL) | R | partly - `/search/query` chatMessage, KQL subset |134
135
## Link previews (`*.asyncgw.teams.microsoft.com/urlp/v1/url`)136
137
| Path | Method | Module | Used for | R/W | Graph? |138
|---|---|---|---|---|---|139
| `/info?url={encoded}` | GET | `crates/chatsvc/src/links.rs` | OpenGraph preview | R | no |140
| `/image/Thumbnail?url=...` | GET (binary) | `crates/chatsvc/src/links.rs` (host check `LINK_PROXY_HOST_SUFFIX`, reused by `crates/core/src/external_image.rs`) | preview thumbnail | R | no |141
142
## Calling143
144
| Host + path | Method | Module | Used for | R/W | Graph? |145
|---|---|---|---|---|---|146
| `api-emea.flightproxy.teams.microsoft.com/api/v2/epconv` | POST | `crates/calling/src/signaling.rs` | create conversation, subscribe meeting, resolve meeting id | W | no - `/communications/calls` is app-only (bot registration), not a user client |147
| `api.flightproxy.teams.microsoft.com/api/v2/ep/{cc or conv host}/{path}` | as link | `crates/calling/src/signaling.rs` (`routed_url`) | transport for every `*.cc.skype.com` / `*.conv.skype.com` link | R/W | no |148
| conversation controller links (server-provided): join, end for all, broker poll, updateEndpointState, publishState, removeState, sendMessage, addParticipant(AndModality), updateEndpointMetadata, admit, removeParticipant, mute, updateMeetingSettings, updateParticipantRole, notificationLinks, leave, transfer | POST, PUT, GET, DELETE | `crates/calling/src/signaling.rs` | meeting join, roster, hand raise, spotlight, reactions, invite, lobby, mute, lock, roles, keep-alive, leave, transfer | R/W | no - no user-token call control in Graph; `updateMeetingSettings` partly via onlineMeeting PATCH |149
| call leg links (server-provided, `*.cc.skype.com`): attach, progress, acceptance, callLeg, rejection, mediaAcknowledgement, applyChannelParameters, controlVideoStreaming, mediaAnswer, updateMediaDescriptions | POST, DELETE | `crates/calling/src/signaling.rs`, `crates/calling/src/call.rs`, `crates/calling/src/push.rs`, `crates/calling/src/engine.rs` | incoming call, SDP offer / answer, ringing, decline, keep-alive, renegotiation, video layout | W | no |150
| recording / caption bot command URL (from roster) | POST | `crates/calling/src/signaling.rs`, `crates/calling/assets/caption_command.js` | recording start / stop, captions on / off, caption language | W | no - Graph only has post-meeting recordings and transcripts |151
| `teams.cloud.microsoft/api/authsvc/v1.0/authz` | POST | `crates/calling/assets/caption_command.js` | Skype token for the bot command | R | no |152
| `teams.microsoft.com/trap/tokens` | GET | `crates/calling/src/relay.rs` | TURN credentials | R | no |153
| `gateway-eu.az.relay.teams.cloud.microsoft` (TURN 3478 udp, 443 tcp, turns 443) | TURN | `crates/calling/src/relay.rs` | media relay | - | no |154
155
Link parsing only (not requests): `crates/calling/src/breakout.rs` (breakout join links), `crates/calling/src/whiteboard.rs` (whiteboard share detection).156
157
Teams on the web links (opened in a window, not requested by us): `crates/app-state/src/call/web_call.rs` (meetup-join and chat links for the "Use Teams on the web for calls" setting).158
159
## Teams CDN (`statics.teams.cdn.office.net`, no auth)160
161
| Path | Method | Module | Used for | R/W | Graph? |162
|---|---|---|---|---|---|163
| `/evergreen-assets/audio/{file}.mp3` | GET | `crates/chatsvc/src/teams_cdn.rs` (URL), `crates/app-base/src/notify/sound_cache.rs` (download) | notification sounds | R | no - static asset |164
| `/evergreen-assets/stickerassets/{name}-250x250/{file}?v=5` | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/app-base/src/stickers.rs` | stickers | R | no |165
| `/evergreen-assets/personal-expressions/v2/assets/emoticons/{id}/default/{size}_anim_f{tone}.png` | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/app-base/src/emoticons/mod.rs` | emoticon images | R | no |166
| `/evergreen-assets/backgroundimages/config.json?v=7` + images from it | GET | `crates/chatsvc/src/teams_cdn.rs`, `crates/calling/src/background.rs` | call background catalog | R | no |167
168
## Third-party and SharePoint169
170
| Host + path | Method | Module | Used for | R/W | Graph? |171
|---|---|---|---|---|---|172
| `media*.giphy.com/...` (URL from message or GIF search) | GET | `crates/app-base/src/remote_image.rs`, `crates/graph/src/content.rs` | GIF display | R | no |173
| `{site}/_api/v2.1/shares/{shareId}/driveItem`, `/drives/{d}/items/{i}/listItem`, `/media/transcripts`, `/media/transcripts/{t}/streamContent`, `DELETE /items/{i}` | GET, DELETE | `crates/chatsvc/src/recap.rs`, `crates/chatsvc/src/transcripts.rs` | recording item, expiry, transcripts, delete recording | R/W | partly - Graph `/shares`, listItem, `/onlineMeetings/{id}/transcripts` (vtt only, meeting-scoped), `DELETE /drives/{d}/items/{i}` |174
| pre-authenticated `downloadUrl` / `uploadUrl` (`*.sharepoint.com`, issued by Graph) | GET, PUT, DELETE | `crates/graph/src/files.rs` | file download, chunked upload | R/W | already Graph-issued; chunk PUT is the documented protocol |175
176
## Local (not Microsoft)177
178
| Host + path | Method | Module | Used for |179
|---|---|---|---|180
| `127.0.0.1:9222/json/*`, `ws://127.0.0.1:9222/devtools/page/{id}` | GET, PUT, WS | `crates/browser/src/http.rs`, `crates/browser/src/browser.rs`, `crates/session/src/session.rs` | drive headless Chrome |181
| `127.0.0.1:{port}/mcp`, `/healthz` | HTTP | `crates/mcp/src/server.rs`, `crates/mcp/src/install/wsl.rs`, `crates/app-state/src/agent_api/mod.rs` | MCP server for agents |182
183
## Graph calls made from service crates (for completeness)184
185
`crates/chatsvc/src/calendar/reminders.rs` (`/me/reminderView`, snooze, dismiss), `crates/chatsvc/src/calendar/schedule.rs` (`/me/events`, RSVP, iCalUId lookup), `crates/chatsvc/src/recap.rs` and `crates/chatsvc/src/transcripts.rs` (`/chats/{id}/messages`, `/chats/{id}`, `/me/onlineMeetings`, attendance reports), `crates/calling/src/signaling.rs` (`/me`). These are Graph already.186
187
## Open follow-ups188
189
- Graph calls above live in `chatsvc` and `calling`, not in the `graph` crate.190
- `chatsvc` builds its service base URLs per module (`https://teams.cloud.microsoft/api/{chatsvc,mt,csa,nss}/{region}`); CSA base exists twice (`pins/mod.rs`, `translate.rs`). One `chatsvc` base-URL module would remove the repeats.191
- `recap.rs` and `transcripts.rs` duplicate the Graph chat scan and SharePoint item lookup.192
- Calling: `CHATSVC_REGION` is owned by `signaling.rs` and reused by MT modules; meeting options read and write use two hosts (`teams.microsoft.com` read with `emea//beta`, `teams.cloud.microsoft` write).193
- Token exchange `authsvc/v1.0/authz` appears in two JS assets (`chatsvc/assets/discover_host.js`, `calling/assets/caption_command.js`).194
- Region is hard-coded `emea` in several places (`recap.rs` `DEFAULT_REGION`, calling `CHATSVC_REGION`, `relay.rs` host, flightproxy `api-emea`).