# microsoft/copilot-managed-runtime architecture

> Architecture diagram of the GitHub repository microsoft/copilot-managed-runtime, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/copilot-managed-runtime
- Repository: https://github.com/microsoft/copilot-managed-runtime

## Overview

This repository is a catalog of Copilot Managed Runtime starter templates, sample applications, agent tooling, and GitHub Actions—not the implementation of the separately published SDK or CLI. A developer can start from a template or sample, use the plugin’s skills and agents for app-building guidance, then use the CLI and GitHub Actions to package or deploy an app. README statements support the product-level links; sampled action code confirms CLI installation, packing, and deployment. Other sample and plugin internals were not inspected.

Main entry points: [`plugins/copilot-managed-runtime/plugin.json`](https://github.com/microsoft/copilot-managed-runtime/blob/main/plugins/copilot-managed-runtime/plugin.json) (Runtime Plugin), [`github-actions/src/actions/install-ms-cli/index.ts`](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/install-ms-cli/index.ts) (Install CLI Action), [`github-actions/src/shared/env.ts`](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/shared/env.ts) (Action Env Names), [`github-actions/src/actions/ms-app-pack/index.ts`](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/ms-app-pack/index.ts) (Pack Action)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_starter["Templates and Samples"]
  node_template["Vite Starter<br/>[App.tsx]"]
  node_sample["Sample Apps"]
  node_codeflow["CodeFlow Sample"]
end

subgraph group_agents["Agent Tooling"]
  node_plugin["Runtime Plugin<br/>[plugin.json]"]
  node_skills["App Skills"]
  node_agents["Architect Agents"]
  node_hooks["Agent Hooks"]
  node_marketplace["Marketplace Manifests<br/>[marketplace.json]"]
end

subgraph group_actions["GitHub Actions"]
  node_install["Install CLI Action<br/>[index.ts]"]
  node_env["Action Env Names<br/>[env.ts]"]
  node_pack["Pack Action<br/>[index.ts]"]
  node_deploy["Deploy Action<br/>[index.ts]"]
end

node_developer(("Developer"))
node_cli["CMR CLI"]
node_npm["npm Registry"]
node_runner(("GitHub Actions Runner"))

node_developer -->|"starts from"| node_template
node_developer -->|"sets up"| node_sample
node_sample -->|"includes"| node_codeflow
node_developer -->|"installs"| node_plugin
node_marketplace -->|"registers"| node_plugin
node_plugin -->|"provides"| node_skills
node_plugin -->|"provides"| node_agents
node_plugin -->|"provides"| node_hooks
node_runner -->|"runs"| node_install
node_install -->|"installs from"| node_npm
node_install -->|"exports state"| node_env
node_pack -->|"checks state"| node_env
node_deploy -->|"checks state"| node_env
node_pack -->|"runs pack"| node_cli
node_deploy -->|"runs deploy"| node_cli
node_install -->|"installs"| node_cli
node_cli -->|"creates managed app"| node_developer

click node_template "https://github.com/microsoft/copilot-managed-runtime/blob/main/templates/vite8/src/App.tsx"
click node_sample "https://github.com/microsoft/copilot-managed-runtime/tree/main/samples"
click node_codeflow "https://github.com/microsoft/copilot-managed-runtime/tree/main/samples/CodeFlow/src"
click node_plugin "https://github.com/microsoft/copilot-managed-runtime/blob/main/plugins/copilot-managed-runtime/plugin.json"
click node_skills "https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/skills"
click node_agents "https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/agents"
click node_hooks "https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/hooks"
click node_marketplace "https://github.com/microsoft/copilot-managed-runtime/blob/main/.claude-plugin/marketplace.json"
click node_install "https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/install-ms-cli/index.ts"
click node_env "https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/shared/env.ts"
click node_pack "https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/ms-app-pack/index.ts"
click node_deploy "https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/ms-app-deploy/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_template,node_sample,node_codeflow toneBlue
class node_plugin,node_skills,node_agents,node_hooks,node_marketplace toneAmber
class node_install,node_env,node_pack,node_deploy toneMint
class node_developer,node_cli,node_npm,node_runner toneIndigo
```

## Components

### Templates and Samples

- [Vite Starter](https://github.com/microsoft/copilot-managed-runtime/blob/main/templates/vite8/src/App.tsx): `templates/vite8/src/App.tsx`
- [Sample Apps](https://github.com/microsoft/copilot-managed-runtime/tree/main/samples): `samples`
- [CodeFlow Sample](https://github.com/microsoft/copilot-managed-runtime/tree/main/samples/CodeFlow/src): `samples/CodeFlow/src`

### Agent Tooling

- [Runtime Plugin](https://github.com/microsoft/copilot-managed-runtime/blob/main/plugins/copilot-managed-runtime/plugin.json): `plugins/copilot-managed-runtime/plugin.json`
- [App Skills](https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/skills): `plugins/copilot-managed-runtime/skills`
- [Architect Agents](https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/agents): `plugins/copilot-managed-runtime/agents`
- [Agent Hooks](https://github.com/microsoft/copilot-managed-runtime/tree/main/plugins/copilot-managed-runtime/hooks): `plugins/copilot-managed-runtime/hooks`
- [Marketplace Manifests](https://github.com/microsoft/copilot-managed-runtime/blob/main/.claude-plugin/marketplace.json): `.claude-plugin/marketplace.json`

### GitHub Actions

- [Install CLI Action](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/install-ms-cli/index.ts): `github-actions/src/actions/install-ms-cli/index.ts`
- [Action Env Names](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/shared/env.ts): `github-actions/src/shared/env.ts`
- [Pack Action](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/ms-app-pack/index.ts): `github-actions/src/actions/ms-app-pack/index.ts`
- [Deploy Action](https://github.com/microsoft/copilot-managed-runtime/blob/main/github-actions/src/actions/ms-app-deploy/index.ts): `github-actions/src/actions/ms-app-deploy/index.ts`

### Other components

- **Developer**
- **CMR CLI**
- **npm Registry**
- **GitHub Actions Runner**

## Connections

- Developer → Vite Starter: starts from (evidence: `README.md`)
- Developer → Sample Apps: sets up (evidence: `README.md`)
- Sample Apps → CodeFlow Sample: includes (evidence: `README.md`)
- Developer → Runtime Plugin: installs (evidence: `README.md`)
- Marketplace Manifests → Runtime Plugin: registers (evidence: `README.md`)
- Runtime Plugin → App Skills: provides (evidence: `README.md`)
- Runtime Plugin → Architect Agents: provides (evidence: `README.md`)
- Runtime Plugin → Agent Hooks: provides (evidence: `README.md`)
- GitHub Actions Runner → Install CLI Action: runs (evidence: `github-actions/src/actions/install-ms-cli/index.ts`)
- Install CLI Action → npm Registry: installs from (evidence: `github-actions/src/actions/install-ms-cli/index.ts`)
- Install CLI Action → Action Env Names: exports state (evidence: `github-actions/src/actions/install-ms-cli/index.ts`)
- Pack Action → Action Env Names: checks state (evidence: `github-actions/src/actions/ms-app-pack/index.ts`)
- Deploy Action → Action Env Names: checks state (evidence: `github-actions/src/actions/ms-app-deploy/index.ts`)
- Pack Action → CMR CLI: runs pack (evidence: `github-actions/src/actions/ms-app-pack/index.ts`)
- Deploy Action → CMR CLI: runs deploy (evidence: `github-actions/src/actions/ms-app-deploy/index.ts`)
- Install CLI Action → CMR CLI: installs (evidence: `github-actions/src/actions/install-ms-cli/index.ts`)
- CMR CLI → Developer: creates managed app (evidence: `README.md`)
