microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ecec6489db2ad85ccd1be99c0860dc3b057af2b1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.devcontainer/devcontainer.json

100lines · modecode

1{
2 "name": "TypeAgent Development",
3 "image": "mcr.microsoft.com/devcontainers/universal:2",
4
5 // This configuration works with:
6 // - VS Code + Docker Desktop (local)
7 // - GitHub Codespaces (cloud)
8 // - JetBrains IDEs with Dev Containers support
9
10 // Fix stale yarn GPG key in base image before features install
11 "initializeCommand": "docker run --rm mcr.microsoft.com/devcontainers/universal:2 echo 'Pulling base image...' || true",
12
13 "features": {
14 "ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
15 "ghcr.io/devcontainers/features/node:1": {
16 "version": "22",
17 "nodeGypDependencies": true
18 },
19 "ghcr.io/devcontainers/features/python:1": {
20 "version": "3.12",
21 "installTools": true
22 },
23 "ghcr.io/devcontainers/features/dotnet:2": {
24 "version": "8.0"
25 },
26 "ghcr.io/devcontainers/features/azure-cli:1": {},
27 "ghcr.io/devcontainers/features/github-cli:1": {}
28 // Note: common-utils removed - universal:2 already includes zsh, oh-my-zsh, and common utilities
29 },
30
31 // Fix yarn GPG key issue in base image
32 "onCreateCommand": "sudo rm -f /etc/apt/sources.list.d/yarn.list || true",
33
34 "forwardPorts": [8999, 8081, 8082, 3000, 3443],
35 "portsAttributes": {
36 "8999": { "label": "Agent Server (WebSocket)", "onAutoForward": "notify" },
37 "8081": { "label": "Browser Agent (WebSocket)", "onAutoForward": "notify" },
38 "8082": { "label": "Code Agent (WebSocket)", "onAutoForward": "notify" },
39 "3000": { "label": "API Server (HTTP)", "onAutoForward": "notify" },
40 "3443": { "label": "API Server (HTTPS)", "onAutoForward": "notify" }
41 },
42
43 "mounts": [
44 // Global pnpm store - shared across containers for fast installs
45 "source=pnpm-global-store,target=/home/codespace/.local/share/pnpm/store,type=volume",
46 // Per-container node_modules (symlinks to global store)
47 "source=typeagent-node_modules-${devcontainerId},target=${containerWorkspaceFolder}/ts/node_modules,type=volume",
48 // Claude Code config persistence
49 "source=claude-code-config-${devcontainerId},target=/home/codespace/.claude,type=volume"
50 ],
51
52 "containerEnv": {
53 "PNPM_HOME": "/home/codespace/.local/share/pnpm"
54 // For Codespaces, set these as repository secrets:
55 // - AZURE_OPENAI_API_KEY
56 // - AZURE_OPENAI_ENDPOINT
57 // - ANTHROPIC_API_KEY (for Claude Code)
58 },
59
60 "postCreateCommand": "cat .devcontainer/scripts/post-create.sh | tr -d '\\r' | bash",
61 "postStartCommand": "cat .devcontainer/scripts/post-start.sh | tr -d '\\r' | bash",
62
63 "customizations": {
64 "vscode": {
65 "extensions": [
66 "dbaeumer.vscode-eslint",
67 "esbenp.prettier-vscode",
68 "ms-python.python",
69 "ms-python.vscode-pylance",
70 "ms-dotnettools.csharp",
71 "ms-azuretools.vscode-azurefunctions",
72 "github.copilot",
73 "humao.rest-client"
74 ],
75 "settings": {
76 "editor.formatOnSave": true,
77 "editor.defaultFormatter": "esbenp.prettier-vscode",
78 "typescript.tsdk": "node_modules/typescript/lib",
79 "terminal.integrated.defaultProfile.linux": "zsh"
80 }
81 },
82 // Codespaces-specific settings
83 "codespaces": {
84 "openFiles": [
85 "ts/README.md"
86 ]
87 }
88 },
89
90 "remoteUser": "codespace",
91
92 // Resource requirements
93 // Codespaces: Choose "4-core" or higher machine type
94 // Local: Ensure Docker has at least these resources allocated
95 "hostRequirements": {
96 "cpus": 4,
97 "memory": "8gb",
98 "storage": "32gb"
99 }
100}
101