{"owner":"OutlineFoundation","repo":"outline-apps","hasSkills":true,"totalSkillsCount":7,"totalTokensCount":2948,"categories":["root-instruction","anthropic-skill","claude-rule"],"hasMcp":false,"mcpConfig":null,"found":["client/AGENTS.md","client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json","client/capacitor/plugins/capacitor-plugin-outline/package.json","infrastructure/AGENTS.md","AGENTS.md","server_manager/AGENTS.md","CLAUDE.md"],"skills":{"client/AGENTS.md":"# <img alt=\"Outline Client Logo\" src=\"../docs/resources/logo_client.png\" title=\"Outline Client\" width=\"32\">&nbsp;&nbsp;Outline Client\n\nThis document provides a guide for AI and human agents working on the Outline Client.\n\n## Directory Structure\n\nThe `/client` directory contains the source code for all Outline client applications. Here's a breakdown of the key subdirectories:\n\n*   `/electron`: Contains the Electron-specific code for the desktop client, including the main process, preload scripts, and build configurations.\n*   `/go`: Contains shared Go source code that is used across platforms for networking and other functionality that cannot be done on the browser.\n*   `/src/cordova`: Contains the Cordova-specific code for the mobile (iOS and Android) and macOS (via Mac Catalyst) clients.\n*   `/src/www`: Contains the shared web-based UI components, built with TypeScript. This code is used by both the Electron and Cordova applications.\n\n## Key Technologies\n\n*   **Electron**: Used to build the desktop client for Windows and Linux.\n*   **Cordova**: Used to build the clients for macOS, iOS, Android.\n*   **[Lit](https://lit.dev/)**: The UI framework for all web components in the client.\n*   **TypeScript**: Used for all web-based code.\n*   **Go**: Used to implement the networking and other shared code.\n\n## Building and Running the Client\n\nThe `npm run action` command is used to build and run the client applications.\n\n### Shared Web App Development\n\nIf you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running:\n\n```sh\nnpm run action client/web/start\n```\n\nThe app logic is located in `src/www/app`. UI components are located in `src/www/ui_components`. To work on an individual UI element, use Storybook:\n\n```sh\nnpm run storybook\n```\n\n### Electron Client\n\n*   **Build (Linux)**: `npm run action client/electron/build linux -- --arch=[x64|arm64]`\n*   **Build (Windows)**: `npm run action client/electron/build windows -- --arch=[ia32|arm64]`\n\n### Cordova Clients\n\n*   **Build (Android)**: `npm run action client/src/cordova/build android`\n*   **Build (iOS)**: `npm run action client/src/cordova/build ios`\n*   **Build (macOS)**: `npm run action client/src/cordova/build macos`\n\n### Configuration Flags\n\nCertain actions take configuration flags. Since they are run through `npm`, you must use the `--` separator to pass them to the underlying process. For example:\n\n```sh\nSENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=<your version name>\n```\n\n## Testing the Client\n\n*   **Web Components**: `npm run action client/web/test`\n*   **Go Backend**: `go test -race -bench=. -benchtime=100ms ./client/...`\n*   **OutlineAppleLib (macOS)**: `npm run action client/src/cordova/test macos`\n*   **OutlineAppleLib (iOS)**: `npm run action client/src/cordova/test ios`\n\n## Additional Resources\n\n*   [Life of a Packet](/docs/life_of_a_packet.md): Learn how the Outline Client works.\n*   [Developing for Apple (macOS and iOS)](src/cordova/apple)\n*   [Developing for Android](src/cordova/android)\n*   [Developing for Electron (Windows and Linux)](electron)\n","client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json":"{\n    \"compilerOptions\": {\n        \"module\": \"ESNext\",\n        \"target\": \"ES2017\",\n        \"moduleResolution\": \"node\",\n        \"lib\": [\n            \"ES2017\"\n        ],\n        \"declaration\": true,\n        \"declarationMap\": true,\n        \"outDir\": \"./dist/esm\",\n        \"esModuleInterop\": true,\n        \"skipLibCheck\": true\n    },\n    \"include\": [\n        \"src\"\n    ],\n    \"exclude\": [\n        \"node_modules\"\n    ]\n}\n","client/capacitor/plugins/capacitor-plugin-outline/package.json":"{\n    \"name\": \"capacitor-plugin-outline\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Capacitor plugin for Outline VPN\",\n    \"main\": \"dist/plugin.cjs.js\",\n    \"module\": \"dist/esm/index.js\",\n    \"types\": \"dist/esm/index.d.ts\",\n    \"unpkg\": \"dist/plugin.js\",\n    \"files\": [\n        \"dist/\",\n        \"ios/\",\n        \"android/\",\n        \"src/\",\n        \"Package.swift\"\n    ],\n    \"author\": \"Outline Authors\",\n    \"license\": \"Apache-2.0\",\n    \"keywords\": [\n        \"capacitor\",\n        \"plugin\",\n        \"native\"\n    ],\n    \"scripts\": {\n        \"clean\": \"rm -rf node_modules dist\",\n        \"build\": \"tsc\"\n    },\n    \"devDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\",\n        \"typescript\": \"^5.0.0\"\n    },\n    \"peerDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\"\n    },\n    \"capacitor\": {\n        \"ios\": {\n            \"src\": \"ios\"\n        },\n        \"android\": {\n            \"src\": \"android\"\n        }\n    }\n}\n","infrastructure/AGENTS.md":"# Outline Infrastructure\n\nThis document provides a guide for AI agents working with the Outline infrastructure.\n\n## Directory Structure\n\nThe `/infrastructure` directory contains the build system, deployment scripts, and other application-independent code for the Outline project.\n\n*   `/build`: Contains the core scripts for the `npm run action` command.\n*   `*.ts`: Various TypeScript files providing utility functions for the build system and applications, similar to third-party dependencies.\n\n## The `npm run action` Build System\n\nThe `npm run action` command is the heart of the Outline build system. It is implemented as a set of Node.js scripts in the `/infrastructure/build` directory. The main entry point is `run_action.mjs`, which parses the command-line arguments and executes the corresponding action script.\n\n### Creating a New Action\n\nTo create a new action, you need to create a new `.mjs` file in the appropriate directory that matches the `*.action.mjs` naming convention (e.g., `server_manager/www/my_action.action.mjs`). This file should export a default function that will be executed when the action is run.\n\nThe function will be passed an `options` object containing the command-line arguments. You can use the utility functions in `/infrastructure` to perform common tasks like spawning processes, downloading files, and creating reload servers.\n\n### Example Action\n\n```javascript\n// server_manager/www/my_action.action.mjs\nimport { spawnStream } from '../../infrastructure/build/spawn_stream.mjs';\n\nexport default async function(options) {\n  await spawnStream('echo', ['Hello, World!']);\n}\n```\n\nThis action can be run with the command `npm run action server_manager/www/my_action`.\n\n## Testing the Infrastructure\n\nThe infrastructure code can be tested by running the following command:\n\n`npm run action infrastructure/test`\n","AGENTS.md":"# Welcome to the Outline Monorepo!\n\nThis document provides a guide for AI and human agents working with the Outline codebase.\n\n## Repository Structure\n\nThe Outline monorepo is organized into three main components:\n\n*   `/client`: The Outline Client application, available on all major platforms. See [`client/AGENTS.md`](client/AGENTS.md).\n*   `/server_manager`: A graphical application to create and manage Outline Servers. See [`server_manager/AGENTS.md`](server_manager/AGENTS.md).\n*   `/infrastructure`: The build system and shared TypeScript utilities. See [`infrastructure/AGENTS.md`](infrastructure/AGENTS.md).\n\n## The `npm run action` Command\n\nThe primary entry point for all development tasks is `npm run action <path>`, which resolves to `.action.sh` or `.action.mjs` files in the repo. Run `npm run action list` to see all available actions. Pass flags after `--`:\n\n```sh\nnpm run action client/src/cordova/setup macos -- --buildMode=release\n```\n\n### Common Actions\n\n*   `npm run action list`: Lists all available actions.\n*   `npm run action client/web/start`: Starts a dev server for the shared web UI.\n*   `npm run action server_manager/www/start`: Starts a dev server for the Manager UI.\n*   `npm run action <component>/test`: Runs tests (e.g. `npm run action client/web/test`).\n*   `npm run action <component>/build`: Builds a component (e.g. `npm run action client/electron/build linux -- --arch=x64`).\n\n### Other useful commands\n\n*   `npm run reset`: Clean and reinstall all dependencies (fixes most build issues).\n*   `npm run storybook`: Launch the Storybook UI component explorer.\n*   `npm run lint:gts`: Lint TypeScript (pass filepaths on macOS; works on all files on Linux).\n\n## Code Style\n\n*   **TypeScript**: Follows [Google's TypeScript style](https://google.github.io/styleguide/tsguide.html), enforced by [`gts`](https://github.com/google/gts). Run `npm run lint:gts` to check and `npm run format:all` to auto-fix (Linux only for whole codebase; pass specific filepaths on macOS).\n*   **Go**: Follows standard Go style. Use `gofmt` and `go vet`.\n\n## Requirements\n\n| Component | Version |\n|-----------|---------|\n| Node.js   | 22 — run `nvm use` if you have nvm |\n| Go        | 1.22+   |\n\nPlatform-specific requirements (Android SDK, Xcode, zig for cross-compilation) are documented in the relevant subdirectory AGENTS.md files.\n\n## Common Concepts\n\n*   **Access Keys**: Credentials used by Outline clients to connect to an Outline server. Generated by the Outline Manager.\n*   **Shadowbox**: The core proxy component of Outline, responsible for handling network traffic.\n*   **Outline Client**: The end-user application for connecting to the internet through an Outline server.\n*   **Server Manager**: The application used to create and manage Outline servers on cloud providers.\n*   **Electron**: Framework used to build the desktop versions of the Outline Client and Server Manager.\n*   **Cordova**: Framework used to build the mobile (iOS/Android) and macOS versions of the Outline Client.\n*   **Lit**: The UI framework for web components. All new components use Lit. The client has fully migrated; the server_manager still has legacy Polymer components in its app shell being migrated.\n*   **OutlineAction**: A custom build script (`.action.sh` or `.action.mjs`) that defines a task runnable via `npm run action`.\n","server_manager/AGENTS.md":"# Outline Server Manager\n\nThis document provides a guide for AI and human agents working on the Outline Server Manager.\n\n## Directory Structure\n\nThe `/server_manager` directory contains the source code for the Outline Server Manager, which is available as a web-based application and an Electron desktop application.\n\n*   `/www`: Contains the web application that serves as the main UI for the Server Manager.\n*   `/electron`: Houses the Electron-specific code for the desktop version of the Server Manager.\n*   `/cloud`: Includes the APIs for interacting with cloud providers like DigitalOcean and Google Cloud Platform.\n*   `/install_scripts`: Contains the shell scripts used to install and configure Outline servers on various cloud providers.\n\n## Key Technologies\n\n*   **Lit**: The primary UI framework for the Server Manager's web-based components. New components use Lit.\n*   **Polymer**: Still used in legacy app shell components (`/www/ui_components/`). Being migrated to Lit.\n*   **Electron**: Used to build the desktop version of the Server Manager.\n*   **TypeScript**: Used for all web-based code.\n*   **Shadowbox**: The core proxy component of Outline, which is managed by the Server Manager.\n\n## Prerequisites\n\nEnsure you have installed Node.js and have run `npm ci` in the root directory.\n\n## Building and Running the Server Manager\n\nThe `npm run action` command is used to build and run the Server Manager.\n\n### Web Application\n\n*   **Build**: `npm run action server_manager/www/build`\n*   **Run for development**: `npm run action server_manager/www/start`\n\n### Electron Application\n\n*   **Build**: `npm run action server_manager/electron/build ${PLATFORM}`\n*   **Run**: `npm run action server_manager/electron/start ${PLATFORM}`\n*   **Run with development build**: `BUILD_ENV=development npm run action server_manager/electron/start ${PLATFORM}`\n\nWhere `${PLATFORM}` is one of `linux`, `macos`, `windows`. If omitted, it assumes the host platform.\n\n### Packaging\n\nTo build the app binary:\n\n```\nnpm run action server_manager/electron/package ${PLATFORM} -- --buildMode=[debug,release]\n```\n\nThe per-platform standalone apps will be at `output/build/server_manager/electron/static/dist`:\n\n- **Windows**: `.exe` — only generated if [wine](https://www.winehq.org/download) is installed.\n- **Linux**: `.AppImage`\n- **macOS**: `.dmg` and `.zip` (both required for auto-update). You may need to run `security unlock-keychain login.keychain` so electron-builder has access to your certificates.\n\n## Debugging\n\nYou can run an existing binary in debug mode by setting `OUTLINE_DEBUG=true`. This will enable the Developer menu on the application window.\n\n## Error Reporting\n\nTo enable error reporting through [Sentry](https://sentry.io/) for local builds, run:\n\n```bash\nexport SENTRY_DSN=[Sentry DSN URL]\nnpm run action server_manager/electron/start ${PLATFORM}\n```\n\n## Testing the Server Manager\n\n*   **Web Application**: `npm run action server_manager/test`\n","CLAUDE.md":"This project uses AGENTS.md instead of CLAUDE.md.\n"},"files":{"client/AGENTS.md":"# <img alt=\"Outline Client Logo\" src=\"../docs/resources/logo_client.png\" title=\"Outline Client\" width=\"32\">&nbsp;&nbsp;Outline Client\n\nThis document provides a guide for AI and human agents working on the Outline Client.\n\n## Directory Structure\n\nThe `/client` directory contains the source code for all Outline client applications. Here's a breakdown of the key subdirectories:\n\n*   `/electron`: Contains the Electron-specific code for the desktop client, including the main process, preload scripts, and build configurations.\n*   `/go`: Contains shared Go source code that is used across platforms for networking and other functionality that cannot be done on the browser.\n*   `/src/cordova`: Contains the Cordova-specific code for the mobile (iOS and Android) and macOS (via Mac Catalyst) clients.\n*   `/src/www`: Contains the shared web-based UI components, built with TypeScript. This code is used by both the Electron and Cordova applications.\n\n## Key Technologies\n\n*   **Electron**: Used to build the desktop client for Windows and Linux.\n*   **Cordova**: Used to build the clients for macOS, iOS, Android.\n*   **[Lit](https://lit.dev/)**: The UI framework for all web components in the client.\n*   **TypeScript**: Used for all web-based code.\n*   **Go**: Used to implement the networking and other shared code.\n\n## Building and Running the Client\n\nThe `npm run action` command is used to build and run the client applications.\n\n### Shared Web App Development\n\nIf you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running:\n\n```sh\nnpm run action client/web/start\n```\n\nThe app logic is located in `src/www/app`. UI components are located in `src/www/ui_components`. To work on an individual UI element, use Storybook:\n\n```sh\nnpm run storybook\n```\n\n### Electron Client\n\n*   **Build (Linux)**: `npm run action client/electron/build linux -- --arch=[x64|arm64]`\n*   **Build (Windows)**: `npm run action client/electron/build windows -- --arch=[ia32|arm64]`\n\n### Cordova Clients\n\n*   **Build (Android)**: `npm run action client/src/cordova/build android`\n*   **Build (iOS)**: `npm run action client/src/cordova/build ios`\n*   **Build (macOS)**: `npm run action client/src/cordova/build macos`\n\n### Configuration Flags\n\nCertain actions take configuration flags. Since they are run through `npm`, you must use the `--` separator to pass them to the underlying process. For example:\n\n```sh\nSENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=<your version name>\n```\n\n## Testing the Client\n\n*   **Web Components**: `npm run action client/web/test`\n*   **Go Backend**: `go test -race -bench=. -benchtime=100ms ./client/...`\n*   **OutlineAppleLib (macOS)**: `npm run action client/src/cordova/test macos`\n*   **OutlineAppleLib (iOS)**: `npm run action client/src/cordova/test ios`\n\n## Additional Resources\n\n*   [Life of a Packet](/docs/life_of_a_packet.md): Learn how the Outline Client works.\n*   [Developing for Apple (macOS and iOS)](src/cordova/apple)\n*   [Developing for Android](src/cordova/android)\n*   [Developing for Electron (Windows and Linux)](electron)\n","client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json":"{\n    \"compilerOptions\": {\n        \"module\": \"ESNext\",\n        \"target\": \"ES2017\",\n        \"moduleResolution\": \"node\",\n        \"lib\": [\n            \"ES2017\"\n        ],\n        \"declaration\": true,\n        \"declarationMap\": true,\n        \"outDir\": \"./dist/esm\",\n        \"esModuleInterop\": true,\n        \"skipLibCheck\": true\n    },\n    \"include\": [\n        \"src\"\n    ],\n    \"exclude\": [\n        \"node_modules\"\n    ]\n}\n","client/capacitor/plugins/capacitor-plugin-outline/package.json":"{\n    \"name\": \"capacitor-plugin-outline\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Capacitor plugin for Outline VPN\",\n    \"main\": \"dist/plugin.cjs.js\",\n    \"module\": \"dist/esm/index.js\",\n    \"types\": \"dist/esm/index.d.ts\",\n    \"unpkg\": \"dist/plugin.js\",\n    \"files\": [\n        \"dist/\",\n        \"ios/\",\n        \"android/\",\n        \"src/\",\n        \"Package.swift\"\n    ],\n    \"author\": \"Outline Authors\",\n    \"license\": \"Apache-2.0\",\n    \"keywords\": [\n        \"capacitor\",\n        \"plugin\",\n        \"native\"\n    ],\n    \"scripts\": {\n        \"clean\": \"rm -rf node_modules dist\",\n        \"build\": \"tsc\"\n    },\n    \"devDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\",\n        \"typescript\": \"^5.0.0\"\n    },\n    \"peerDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\"\n    },\n    \"capacitor\": {\n        \"ios\": {\n            \"src\": \"ios\"\n        },\n        \"android\": {\n            \"src\": \"android\"\n        }\n    }\n}\n","infrastructure/AGENTS.md":"# Outline Infrastructure\n\nThis document provides a guide for AI agents working with the Outline infrastructure.\n\n## Directory Structure\n\nThe `/infrastructure` directory contains the build system, deployment scripts, and other application-independent code for the Outline project.\n\n*   `/build`: Contains the core scripts for the `npm run action` command.\n*   `*.ts`: Various TypeScript files providing utility functions for the build system and applications, similar to third-party dependencies.\n\n## The `npm run action` Build System\n\nThe `npm run action` command is the heart of the Outline build system. It is implemented as a set of Node.js scripts in the `/infrastructure/build` directory. The main entry point is `run_action.mjs`, which parses the command-line arguments and executes the corresponding action script.\n\n### Creating a New Action\n\nTo create a new action, you need to create a new `.mjs` file in the appropriate directory that matches the `*.action.mjs` naming convention (e.g., `server_manager/www/my_action.action.mjs`). This file should export a default function that will be executed when the action is run.\n\nThe function will be passed an `options` object containing the command-line arguments. You can use the utility functions in `/infrastructure` to perform common tasks like spawning processes, downloading files, and creating reload servers.\n\n### Example Action\n\n```javascript\n// server_manager/www/my_action.action.mjs\nimport { spawnStream } from '../../infrastructure/build/spawn_stream.mjs';\n\nexport default async function(options) {\n  await spawnStream('echo', ['Hello, World!']);\n}\n```\n\nThis action can be run with the command `npm run action server_manager/www/my_action`.\n\n## Testing the Infrastructure\n\nThe infrastructure code can be tested by running the following command:\n\n`npm run action infrastructure/test`\n","AGENTS.md":"# Welcome to the Outline Monorepo!\n\nThis document provides a guide for AI and human agents working with the Outline codebase.\n\n## Repository Structure\n\nThe Outline monorepo is organized into three main components:\n\n*   `/client`: The Outline Client application, available on all major platforms. See [`client/AGENTS.md`](client/AGENTS.md).\n*   `/server_manager`: A graphical application to create and manage Outline Servers. See [`server_manager/AGENTS.md`](server_manager/AGENTS.md).\n*   `/infrastructure`: The build system and shared TypeScript utilities. See [`infrastructure/AGENTS.md`](infrastructure/AGENTS.md).\n\n## The `npm run action` Command\n\nThe primary entry point for all development tasks is `npm run action <path>`, which resolves to `.action.sh` or `.action.mjs` files in the repo. Run `npm run action list` to see all available actions. Pass flags after `--`:\n\n```sh\nnpm run action client/src/cordova/setup macos -- --buildMode=release\n```\n\n### Common Actions\n\n*   `npm run action list`: Lists all available actions.\n*   `npm run action client/web/start`: Starts a dev server for the shared web UI.\n*   `npm run action server_manager/www/start`: Starts a dev server for the Manager UI.\n*   `npm run action <component>/test`: Runs tests (e.g. `npm run action client/web/test`).\n*   `npm run action <component>/build`: Builds a component (e.g. `npm run action client/electron/build linux -- --arch=x64`).\n\n### Other useful commands\n\n*   `npm run reset`: Clean and reinstall all dependencies (fixes most build issues).\n*   `npm run storybook`: Launch the Storybook UI component explorer.\n*   `npm run lint:gts`: Lint TypeScript (pass filepaths on macOS; works on all files on Linux).\n\n## Code Style\n\n*   **TypeScript**: Follows [Google's TypeScript style](https://google.github.io/styleguide/tsguide.html), enforced by [`gts`](https://github.com/google/gts). Run `npm run lint:gts` to check and `npm run format:all` to auto-fix (Linux only for whole codebase; pass specific filepaths on macOS).\n*   **Go**: Follows standard Go style. Use `gofmt` and `go vet`.\n\n## Requirements\n\n| Component | Version |\n|-----------|---------|\n| Node.js   | 22 — run `nvm use` if you have nvm |\n| Go        | 1.22+   |\n\nPlatform-specific requirements (Android SDK, Xcode, zig for cross-compilation) are documented in the relevant subdirectory AGENTS.md files.\n\n## Common Concepts\n\n*   **Access Keys**: Credentials used by Outline clients to connect to an Outline server. Generated by the Outline Manager.\n*   **Shadowbox**: The core proxy component of Outline, responsible for handling network traffic.\n*   **Outline Client**: The end-user application for connecting to the internet through an Outline server.\n*   **Server Manager**: The application used to create and manage Outline servers on cloud providers.\n*   **Electron**: Framework used to build the desktop versions of the Outline Client and Server Manager.\n*   **Cordova**: Framework used to build the mobile (iOS/Android) and macOS versions of the Outline Client.\n*   **Lit**: The UI framework for web components. All new components use Lit. The client has fully migrated; the server_manager still has legacy Polymer components in its app shell being migrated.\n*   **OutlineAction**: A custom build script (`.action.sh` or `.action.mjs`) that defines a task runnable via `npm run action`.\n","server_manager/AGENTS.md":"# Outline Server Manager\n\nThis document provides a guide for AI and human agents working on the Outline Server Manager.\n\n## Directory Structure\n\nThe `/server_manager` directory contains the source code for the Outline Server Manager, which is available as a web-based application and an Electron desktop application.\n\n*   `/www`: Contains the web application that serves as the main UI for the Server Manager.\n*   `/electron`: Houses the Electron-specific code for the desktop version of the Server Manager.\n*   `/cloud`: Includes the APIs for interacting with cloud providers like DigitalOcean and Google Cloud Platform.\n*   `/install_scripts`: Contains the shell scripts used to install and configure Outline servers on various cloud providers.\n\n## Key Technologies\n\n*   **Lit**: The primary UI framework for the Server Manager's web-based components. New components use Lit.\n*   **Polymer**: Still used in legacy app shell components (`/www/ui_components/`). Being migrated to Lit.\n*   **Electron**: Used to build the desktop version of the Server Manager.\n*   **TypeScript**: Used for all web-based code.\n*   **Shadowbox**: The core proxy component of Outline, which is managed by the Server Manager.\n\n## Prerequisites\n\nEnsure you have installed Node.js and have run `npm ci` in the root directory.\n\n## Building and Running the Server Manager\n\nThe `npm run action` command is used to build and run the Server Manager.\n\n### Web Application\n\n*   **Build**: `npm run action server_manager/www/build`\n*   **Run for development**: `npm run action server_manager/www/start`\n\n### Electron Application\n\n*   **Build**: `npm run action server_manager/electron/build ${PLATFORM}`\n*   **Run**: `npm run action server_manager/electron/start ${PLATFORM}`\n*   **Run with development build**: `BUILD_ENV=development npm run action server_manager/electron/start ${PLATFORM}`\n\nWhere `${PLATFORM}` is one of `linux`, `macos`, `windows`. If omitted, it assumes the host platform.\n\n### Packaging\n\nTo build the app binary:\n\n```\nnpm run action server_manager/electron/package ${PLATFORM} -- --buildMode=[debug,release]\n```\n\nThe per-platform standalone apps will be at `output/build/server_manager/electron/static/dist`:\n\n- **Windows**: `.exe` — only generated if [wine](https://www.winehq.org/download) is installed.\n- **Linux**: `.AppImage`\n- **macOS**: `.dmg` and `.zip` (both required for auto-update). You may need to run `security unlock-keychain login.keychain` so electron-builder has access to your certificates.\n\n## Debugging\n\nYou can run an existing binary in debug mode by setting `OUTLINE_DEBUG=true`. This will enable the Developer menu on the application window.\n\n## Error Reporting\n\nTo enable error reporting through [Sentry](https://sentry.io/) for local builds, run:\n\n```bash\nexport SENTRY_DSN=[Sentry DSN URL]\nnpm run action server_manager/electron/start ${PLATFORM}\n```\n\n## Testing the Server Manager\n\n*   **Web Application**: `npm run action server_manager/test`\n","CLAUDE.md":"This project uses AGENTS.md instead of CLAUDE.md.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Welcome to the Outline Monorepo!\n\nThis document provides a guide for AI and human agents working with the Outline codebase.\n\n## Repository Structure\n\nThe Outline monorepo is organized into three main components:\n\n*   `/client`: The Outline Client application, available on all major platforms. See [`client/AGENTS.md`](client/AGENTS.md).\n*   `/server_manager`: A graphical application to create and manage Outline Servers. See [`server_manager/AGENTS.md`](server_manager/AGENTS.md).\n*   `/infrastructure`: The build system and shared TypeScript utilities. See [`infrastructure/AGENTS.md`](infrastructure/AGENTS.md).\n\n## The `npm run action` Command\n\nThe primary entry point for all development tasks is `npm run action <path>`, which resolves to `.action.sh` or `.action.mjs` files in the repo. Run `npm run action list` to see all available actions. Pass flags after `--`:\n\n```sh\nnpm run action client/src/cordova/setup macos -- --buildMode=release\n```\n\n### Common Actions\n\n*   `npm run action list`: Lists all available actions.\n*   `npm run action client/web/start`: Starts a dev server for the shared web UI.\n*   `npm run action server_manager/www/start`: Starts a dev server for the Manager UI.\n*   `npm run action <component>/test`: Runs tests (e.g. `npm run action client/web/test`).\n*   `npm run action <component>/build`: Builds a component (e.g. `npm run action client/electron/build linux -- --arch=x64`).\n\n### Other useful commands\n\n*   `npm run reset`: Clean and reinstall all dependencies (fixes most build issues).\n*   `npm run storybook`: Launch the Storybook UI component explorer.\n*   `npm run lint:gts`: Lint TypeScript (pass filepaths on macOS; works on all files on Linux).\n\n## Code Style\n\n*   **TypeScript**: Follows [Google's TypeScript style](https://google.github.io/styleguide/tsguide.html), enforced by [`gts`](https://github.com/google/gts). Run `npm run lint:gts` to check and `npm run format:all` to auto-fix (Linux only for whole codebase; pass specific filepaths on macOS).\n*   **Go**: Follows standard Go style. Use `gofmt` and `go vet`.\n\n## Requirements\n\n| Component | Version |\n|-----------|---------|\n| Node.js   | 22 — run `nvm use` if you have nvm |\n| Go        | 1.22+   |\n\nPlatform-specific requirements (Android SDK, Xcode, zig for cross-compilation) are documented in the relevant subdirectory AGENTS.md files.\n\n## Common Concepts\n\n*   **Access Keys**: Credentials used by Outline clients to connect to an Outline server. Generated by the Outline Manager.\n*   **Shadowbox**: The core proxy component of Outline, responsible for handling network traffic.\n*   **Outline Client**: The end-user application for connecting to the internet through an Outline server.\n*   **Server Manager**: The application used to create and manage Outline servers on cloud providers.\n*   **Electron**: Framework used to build the desktop versions of the Outline Client and Server Manager.\n*   **Cordova**: Framework used to build the mobile (iOS/Android) and macOS versions of the Outline Client.\n*   **Lit**: The UI framework for web components. All new components use Lit. The client has fully migrated; the server_manager still has legacy Polymer components in its app shell being migrated.\n*   **OutlineAction**: A custom build script (`.action.sh` or `.action.mjs`) that defines a task runnable via `npm run action`.\n","isInternal":false,"tokens":780,"sizeBytes":3347},{"name":"AGENTS.md","path":"client/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/client/AGENTS.md","title":"client - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# <img alt=\"Outline Client Logo\" src=\"../docs/resources/logo_client.png\" title=\"Outline Client\" width=\"32\">&nbsp;&nbsp;Outline Client\n\nThis document provides a guide for AI and human agents working on the Outline Client.\n\n## Directory Structure\n\nThe `/client` directory contains the source code for all Outline client applications. Here's a breakdown of the key subdirectories:\n\n*   `/electron`: Contains the Electron-specific code for the desktop client, including the main process, preload scripts, and build configurations.\n*   `/go`: Contains shared Go source code that is used across platforms for networking and other functionality that cannot be done on the browser.\n*   `/src/cordova`: Contains the Cordova-specific code for the mobile (iOS and Android) and macOS (via Mac Catalyst) clients.\n*   `/src/www`: Contains the shared web-based UI components, built with TypeScript. This code is used by both the Electron and Cordova applications.\n\n## Key Technologies\n\n*   **Electron**: Used to build the desktop client for Windows and Linux.\n*   **Cordova**: Used to build the clients for macOS, iOS, Android.\n*   **[Lit](https://lit.dev/)**: The UI framework for all web components in the client.\n*   **TypeScript**: Used for all web-based code.\n*   **Go**: Used to implement the networking and other shared code.\n\n## Building and Running the Client\n\nThe `npm run action` command is used to build and run the client applications.\n\n### Shared Web App Development\n\nIf you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running:\n\n```sh\nnpm run action client/web/start\n```\n\nThe app logic is located in `src/www/app`. UI components are located in `src/www/ui_components`. To work on an individual UI element, use Storybook:\n\n```sh\nnpm run storybook\n```\n\n### Electron Client\n\n*   **Build (Linux)**: `npm run action client/electron/build linux -- --arch=[x64|arm64]`\n*   **Build (Windows)**: `npm run action client/electron/build windows -- --arch=[ia32|arm64]`\n\n### Cordova Clients\n\n*   **Build (Android)**: `npm run action client/src/cordova/build android`\n*   **Build (iOS)**: `npm run action client/src/cordova/build ios`\n*   **Build (macOS)**: `npm run action client/src/cordova/build macos`\n\n### Configuration Flags\n\nCertain actions take configuration flags. Since they are run through `npm`, you must use the `--` separator to pass them to the underlying process. For example:\n\n```sh\nSENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=<your version name>\n```\n\n## Testing the Client\n\n*   **Web Components**: `npm run action client/web/test`\n*   **Go Backend**: `go test -race -bench=. -benchtime=100ms ./client/...`\n*   **OutlineAppleLib (macOS)**: `npm run action client/src/cordova/test macos`\n*   **OutlineAppleLib (iOS)**: `npm run action client/src/cordova/test ios`\n\n## Additional Resources\n\n*   [Life of a Packet](/docs/life_of_a_packet.md): Learn how the Outline Client works.\n*   [Developing for Apple (macOS and iOS)](src/cordova/apple)\n*   [Developing for Android](src/cordova/android)\n*   [Developing for Electron (Windows and Linux)](electron)\n","isInternal":false,"tokens":765,"sizeBytes":3209},{"name":"AGENTS.md","path":"infrastructure/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/infrastructure/AGENTS.md","title":"infrastructure - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Outline Infrastructure\n\nThis document provides a guide for AI agents working with the Outline infrastructure.\n\n## Directory Structure\n\nThe `/infrastructure` directory contains the build system, deployment scripts, and other application-independent code for the Outline project.\n\n*   `/build`: Contains the core scripts for the `npm run action` command.\n*   `*.ts`: Various TypeScript files providing utility functions for the build system and applications, similar to third-party dependencies.\n\n## The `npm run action` Build System\n\nThe `npm run action` command is the heart of the Outline build system. It is implemented as a set of Node.js scripts in the `/infrastructure/build` directory. The main entry point is `run_action.mjs`, which parses the command-line arguments and executes the corresponding action script.\n\n### Creating a New Action\n\nTo create a new action, you need to create a new `.mjs` file in the appropriate directory that matches the `*.action.mjs` naming convention (e.g., `server_manager/www/my_action.action.mjs`). This file should export a default function that will be executed when the action is run.\n\nThe function will be passed an `options` object containing the command-line arguments. You can use the utility functions in `/infrastructure` to perform common tasks like spawning processes, downloading files, and creating reload servers.\n\n### Example Action\n\n```javascript\n// server_manager/www/my_action.action.mjs\nimport { spawnStream } from '../../infrastructure/build/spawn_stream.mjs';\n\nexport default async function(options) {\n  await spawnStream('echo', ['Hello, World!']);\n}\n```\n\nThis action can be run with the command `npm run action server_manager/www/my_action`.\n\n## Testing the Infrastructure\n\nThe infrastructure code can be tested by running the following command:\n\n`npm run action infrastructure/test`\n","isInternal":false,"tokens":368,"sizeBytes":1849},{"name":"AGENTS.md","path":"server_manager/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/server_manager/AGENTS.md","title":"server_manager - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Outline Server Manager\n\nThis document provides a guide for AI and human agents working on the Outline Server Manager.\n\n## Directory Structure\n\nThe `/server_manager` directory contains the source code for the Outline Server Manager, which is available as a web-based application and an Electron desktop application.\n\n*   `/www`: Contains the web application that serves as the main UI for the Server Manager.\n*   `/electron`: Houses the Electron-specific code for the desktop version of the Server Manager.\n*   `/cloud`: Includes the APIs for interacting with cloud providers like DigitalOcean and Google Cloud Platform.\n*   `/install_scripts`: Contains the shell scripts used to install and configure Outline servers on various cloud providers.\n\n## Key Technologies\n\n*   **Lit**: The primary UI framework for the Server Manager's web-based components. New components use Lit.\n*   **Polymer**: Still used in legacy app shell components (`/www/ui_components/`). Being migrated to Lit.\n*   **Electron**: Used to build the desktop version of the Server Manager.\n*   **TypeScript**: Used for all web-based code.\n*   **Shadowbox**: The core proxy component of Outline, which is managed by the Server Manager.\n\n## Prerequisites\n\nEnsure you have installed Node.js and have run `npm ci` in the root directory.\n\n## Building and Running the Server Manager\n\nThe `npm run action` command is used to build and run the Server Manager.\n\n### Web Application\n\n*   **Build**: `npm run action server_manager/www/build`\n*   **Run for development**: `npm run action server_manager/www/start`\n\n### Electron Application\n\n*   **Build**: `npm run action server_manager/electron/build ${PLATFORM}`\n*   **Run**: `npm run action server_manager/electron/start ${PLATFORM}`\n*   **Run with development build**: `BUILD_ENV=development npm run action server_manager/electron/start ${PLATFORM}`\n\nWhere `${PLATFORM}` is one of `linux`, `macos`, `windows`. If omitted, it assumes the host platform.\n\n### Packaging\n\nTo build the app binary:\n\n```\nnpm run action server_manager/electron/package ${PLATFORM} -- --buildMode=[debug,release]\n```\n\nThe per-platform standalone apps will be at `output/build/server_manager/electron/static/dist`:\n\n- **Windows**: `.exe` — only generated if [wine](https://www.winehq.org/download) is installed.\n- **Linux**: `.AppImage`\n- **macOS**: `.dmg` and `.zip` (both required for auto-update). You may need to run `security unlock-keychain login.keychain` so electron-builder has access to your certificates.\n\n## Debugging\n\nYou can run an existing binary in debug mode by setting `OUTLINE_DEBUG=true`. This will enable the Developer menu on the application window.\n\n## Error Reporting\n\nTo enable error reporting through [Sentry](https://sentry.io/) for local builds, run:\n\n```bash\nexport SENTRY_DSN=[Sentry DSN URL]\nnpm run action server_manager/electron/start ${PLATFORM}\n```\n\n## Testing the Server Manager\n\n*   **Web Application**: `npm run action server_manager/test`\n","isInternal":false,"tokens":645,"sizeBytes":2966},{"name":"package.json","path":"client/capacitor/plugins/capacitor-plugin-outline/package.json","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/client/capacitor/plugins/capacitor-plugin-outline/package.json","title":"capacitor-plugin-outline","category":"anthropic-skill","format":"json","content":"{\n    \"name\": \"capacitor-plugin-outline\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Capacitor plugin for Outline VPN\",\n    \"main\": \"dist/plugin.cjs.js\",\n    \"module\": \"dist/esm/index.js\",\n    \"types\": \"dist/esm/index.d.ts\",\n    \"unpkg\": \"dist/plugin.js\",\n    \"files\": [\n        \"dist/\",\n        \"ios/\",\n        \"android/\",\n        \"src/\",\n        \"Package.swift\"\n    ],\n    \"author\": \"Outline Authors\",\n    \"license\": \"Apache-2.0\",\n    \"keywords\": [\n        \"capacitor\",\n        \"plugin\",\n        \"native\"\n    ],\n    \"scripts\": {\n        \"clean\": \"rm -rf node_modules dist\",\n        \"build\": \"tsc\"\n    },\n    \"devDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\",\n        \"typescript\": \"^5.0.0\"\n    },\n    \"peerDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\"\n    },\n    \"capacitor\": {\n        \"ios\": {\n            \"src\": \"ios\"\n        },\n        \"android\": {\n            \"src\": \"android\"\n        }\n    }\n}\n","frontmatter":{"name":"capacitor-plugin-outline","version":"1.0.0","description":"Capacitor plugin for Outline VPN","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","files":["dist/","ios/","android/","src/","Package.swift"],"author":"Outline Authors","license":"Apache-2.0","keywords":["capacitor","plugin","native"],"scripts":{"clean":"rm -rf node_modules dist","build":"tsc"},"devDependencies":{"@capacitor/core":"^8.3.1","typescript":"^5.0.0"},"peerDependencies":{"@capacitor/core":"^8.3.1"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}}},"isInternal":false,"tokens":268,"sizeBytes":916},{"name":"tsconfig.json","path":"client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json","title":"Capacitor-plugin-outline Skill","category":"anthropic-skill","format":"json","content":"{\n    \"compilerOptions\": {\n        \"module\": \"ESNext\",\n        \"target\": \"ES2017\",\n        \"moduleResolution\": \"node\",\n        \"lib\": [\n            \"ES2017\"\n        ],\n        \"declaration\": true,\n        \"declarationMap\": true,\n        \"outDir\": \"./dist/esm\",\n        \"esModuleInterop\": true,\n        \"skipLibCheck\": true\n    },\n    \"include\": [\n        \"src\"\n    ],\n    \"exclude\": [\n        \"node_modules\"\n    ]\n}\n","frontmatter":{"compilerOptions":{"module":"ESNext","target":"ES2017","moduleResolution":"node","lib":["ES2017"],"declaration":true,"declarationMap":true,"outDir":"./dist/esm","esModuleInterop":true,"skipLibCheck":true},"include":["src"],"exclude":["node_modules"]},"isInternal":false,"tokens":109,"sizeBytes":416},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/OutlineFoundation/outline-apps/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"This project uses AGENTS.md instead of CLAUDE.md.\n","isInternal":false,"tokens":13,"sizeBytes":50}],"systemPromptSnippet":"<yakaai_skills repo=\"OutlineFoundation/outline-apps\">\n<!-- File: AGENTS.md (Tokens: ~780 | Category: root-instruction) -->\n# Welcome to the Outline Monorepo!\n\nThis document provides a guide for AI and human agents working with the Outline codebase.\n\n## Repository Structure\n\nThe Outline monorepo is organized into three main components:\n\n*   `/client`: The Outline Client application, available on all major platforms. See [`client/AGENTS.md`](client/AGENTS.md).\n*   `/server_manager`: A graphical application to create and manage Outline Servers. See [`server_manager/AGENTS.md`](server_manager/AGENTS.md).\n*   `/infrastructure`: The build system and shared TypeScript utilities. See [`infrastructure/AGENTS.md`](infrastructure/AGENTS.md).\n\n## The `npm run action` Command\n\nThe primary entry point for all development tasks is `npm run action <path>`, which resolves to `.action.sh` or `.action.mjs` files in the repo. Run `npm run action list` to see all available actions. Pass flags after `--`:\n\n```sh\nnpm run action client/src/cordova/setup macos -- --buildMode=release\n```\n\n### Common Actions\n\n*   `npm run action list`: Lists all available actions.\n*   `npm run action client/web/start`: Starts a dev server for the shared web UI.\n*   `npm run action server_manager/www/start`: Starts a dev server for the Manager UI.\n*   `npm run action <component>/test`: Runs tests (e.g. `npm run action client/web/test`).\n*   `npm run action <component>/build`: Builds a component (e.g. `npm run action client/electron/build linux -- --arch=x64`).\n\n### Other useful commands\n\n*   `npm run reset`: Clean and reinstall all dependencies (fixes most build issues).\n*   `npm run storybook`: Launch the Storybook UI component explorer.\n*   `npm run lint:gts`: Lint TypeScript (pass filepaths on macOS; works on all files on Linux).\n\n## Code Style\n\n*   **TypeScript**: Follows [Google's TypeScript style](https://google.github.io/styleguide/tsguide.html), enforced by [`gts`](https://github.com/google/gts). Run `npm run lint:gts` to check and `npm run format:all` to auto-fix (Linux only for whole codebase; pass specific filepaths on macOS).\n*   **Go**: Follows standard Go style. Use `gofmt` and `go vet`.\n\n## Requirements\n\n| Component | Version |\n|-----------|---------|\n| Node.js   | 22 — run `nvm use` if you have nvm |\n| Go        | 1.22+   |\n\nPlatform-specific requirements (Android SDK, Xcode, zig for cross-compilation) are documented in the relevant subdirectory AGENTS.md files.\n\n## Common Concepts\n\n*   **Access Keys**: Credentials used by Outline clients to connect to an Outline server. Generated by the Outline Manager.\n*   **Shadowbox**: The core proxy component of Outline, responsible for handling network traffic.\n*   **Outline Client**: The end-user application for connecting to the internet through an Outline server.\n*   **Server Manager**: The application used to create and manage Outline servers on cloud providers.\n*   **Electron**: Framework used to build the desktop versions of the Outline Client and Server Manager.\n*   **Cordova**: Framework used to build the mobile (iOS/Android) and macOS versions of the Outline Client.\n*   **Lit**: The UI framework for web components. All new components use Lit. The client has fully migrated; the server_manager still has legacy Polymer components in its app shell being migrated.\n*   **OutlineAction**: A custom build script (`.action.sh` or `.action.mjs`) that defines a task runnable via `npm run action`.\n\n<!-- File: client/AGENTS.md (Tokens: ~765 | Category: root-instruction) -->\n# <img alt=\"Outline Client Logo\" src=\"../docs/resources/logo_client.png\" title=\"Outline Client\" width=\"32\">&nbsp;&nbsp;Outline Client\n\nThis document provides a guide for AI and human agents working on the Outline Client.\n\n## Directory Structure\n\nThe `/client` directory contains the source code for all Outline client applications. Here's a breakdown of the key subdirectories:\n\n*   `/electron`: Contains the Electron-specific code for the desktop client, including the main process, preload scripts, and build configurations.\n*   `/go`: Contains shared Go source code that is used across platforms for networking and other functionality that cannot be done on the browser.\n*   `/src/cordova`: Contains the Cordova-specific code for the mobile (iOS and Android) and macOS (via Mac Catalyst) clients.\n*   `/src/www`: Contains the shared web-based UI components, built with TypeScript. This code is used by both the Electron and Cordova applications.\n\n## Key Technologies\n\n*   **Electron**: Used to build the desktop client for Windows and Linux.\n*   **Cordova**: Used to build the clients for macOS, iOS, Android.\n*   **[Lit](https://lit.dev/)**: The UI framework for all web components in the client.\n*   **TypeScript**: Used for all web-based code.\n*   **Go**: Used to implement the networking and other shared code.\n\n## Building and Running the Client\n\nThe `npm run action` command is used to build and run the client applications.\n\n### Shared Web App Development\n\nIf you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running:\n\n```sh\nnpm run action client/web/start\n```\n\nThe app logic is located in `src/www/app`. UI components are located in `src/www/ui_components`. To work on an individual UI element, use Storybook:\n\n```sh\nnpm run storybook\n```\n\n### Electron Client\n\n*   **Build (Linux)**: `npm run action client/electron/build linux -- --arch=[x64|arm64]`\n*   **Build (Windows)**: `npm run action client/electron/build windows -- --arch=[ia32|arm64]`\n\n### Cordova Clients\n\n*   **Build (Android)**: `npm run action client/src/cordova/build android`\n*   **Build (iOS)**: `npm run action client/src/cordova/build ios`\n*   **Build (macOS)**: `npm run action client/src/cordova/build macos`\n\n### Configuration Flags\n\nCertain actions take configuration flags. Since they are run through `npm`, you must use the `--` separator to pass them to the underlying process. For example:\n\n```sh\nSENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=<your version name>\n```\n\n## Testing the Client\n\n*   **Web Components**: `npm run action client/web/test`\n*   **Go Backend**: `go test -race -bench=. -benchtime=100ms ./client/...`\n*   **OutlineAppleLib (macOS)**: `npm run action client/src/cordova/test macos`\n*   **OutlineAppleLib (iOS)**: `npm run action client/src/cordova/test ios`\n\n## Additional Resources\n\n*   [Life of a Packet](/docs/life_of_a_packet.md): Learn how the Outline Client works.\n*   [Developing for Apple (macOS and iOS)](src/cordova/apple)\n*   [Developing for Android](src/cordova/android)\n*   [Developing for Electron (Windows and Linux)](electron)\n\n<!-- File: infrastructure/AGENTS.md (Tokens: ~368 | Category: root-instruction) -->\n# Outline Infrastructure\n\nThis document provides a guide for AI agents working with the Outline infrastructure.\n\n## Directory Structure\n\nThe `/infrastructure` directory contains the build system, deployment scripts, and other application-independent code for the Outline project.\n\n*   `/build`: Contains the core scripts for the `npm run action` command.\n*   `*.ts`: Various TypeScript files providing utility functions for the build system and applications, similar to third-party dependencies.\n\n## The `npm run action` Build System\n\nThe `npm run action` command is the heart of the Outline build system. It is implemented as a set of Node.js scripts in the `/infrastructure/build` directory. The main entry point is `run_action.mjs`, which parses the command-line arguments and executes the corresponding action script.\n\n### Creating a New Action\n\nTo create a new action, you need to create a new `.mjs` file in the appropriate directory that matches the `*.action.mjs` naming convention (e.g., `server_manager/www/my_action.action.mjs`). This file should export a default function that will be executed when the action is run.\n\nThe function will be passed an `options` object containing the command-line arguments. You can use the utility functions in `/infrastructure` to perform common tasks like spawning processes, downloading files, and creating reload servers.\n\n### Example Action\n\n```javascript\n// server_manager/www/my_action.action.mjs\nimport { spawnStream } from '../../infrastructure/build/spawn_stream.mjs';\n\nexport default async function(options) {\n  await spawnStream('echo', ['Hello, World!']);\n}\n```\n\nThis action can be run with the command `npm run action server_manager/www/my_action`.\n\n## Testing the Infrastructure\n\nThe infrastructure code can be tested by running the following command:\n\n`npm run action infrastructure/test`\n\n<!-- File: server_manager/AGENTS.md (Tokens: ~645 | Category: root-instruction) -->\n# Outline Server Manager\n\nThis document provides a guide for AI and human agents working on the Outline Server Manager.\n\n## Directory Structure\n\nThe `/server_manager` directory contains the source code for the Outline Server Manager, which is available as a web-based application and an Electron desktop application.\n\n*   `/www`: Contains the web application that serves as the main UI for the Server Manager.\n*   `/electron`: Houses the Electron-specific code for the desktop version of the Server Manager.\n*   `/cloud`: Includes the APIs for interacting with cloud providers like DigitalOcean and Google Cloud Platform.\n*   `/install_scripts`: Contains the shell scripts used to install and configure Outline servers on various cloud providers.\n\n## Key Technologies\n\n*   **Lit**: The primary UI framework for the Server Manager's web-based components. New components use Lit.\n*   **Polymer**: Still used in legacy app shell components (`/www/ui_components/`). Being migrated to Lit.\n*   **Electron**: Used to build the desktop version of the Server Manager.\n*   **TypeScript**: Used for all web-based code.\n*   **Shadowbox**: The core proxy component of Outline, which is managed by the Server Manager.\n\n## Prerequisites\n\nEnsure you have installed Node.js and have run `npm ci` in the root directory.\n\n## Building and Running the Server Manager\n\nThe `npm run action` command is used to build and run the Server Manager.\n\n### Web Application\n\n*   **Build**: `npm run action server_manager/www/build`\n*   **Run for development**: `npm run action server_manager/www/start`\n\n### Electron Application\n\n*   **Build**: `npm run action server_manager/electron/build ${PLATFORM}`\n*   **Run**: `npm run action server_manager/electron/start ${PLATFORM}`\n*   **Run with development build**: `BUILD_ENV=development npm run action server_manager/electron/start ${PLATFORM}`\n\nWhere `${PLATFORM}` is one of `linux`, `macos`, `windows`. If omitted, it assumes the host platform.\n\n### Packaging\n\nTo build the app binary:\n\n```\nnpm run action server_manager/electron/package ${PLATFORM} -- --buildMode=[debug,release]\n```\n\nThe per-platform standalone apps will be at `output/build/server_manager/electron/static/dist`:\n\n- **Windows**: `.exe` — only generated if [wine](https://www.winehq.org/download) is installed.\n- **Linux**: `.AppImage`\n- **macOS**: `.dmg` and `.zip` (both required for auto-update). You may need to run `security unlock-keychain login.keychain` so electron-builder has access to your certificates.\n\n## Debugging\n\nYou can run an existing binary in debug mode by setting `OUTLINE_DEBUG=true`. This will enable the Developer menu on the application window.\n\n## Error Reporting\n\nTo enable error reporting through [Sentry](https://sentry.io/) for local builds, run:\n\n```bash\nexport SENTRY_DSN=[Sentry DSN URL]\nnpm run action server_manager/electron/start ${PLATFORM}\n```\n\n## Testing the Server Manager\n\n*   **Web Application**: `npm run action server_manager/test`\n\n<!-- File: client/capacitor/plugins/capacitor-plugin-outline/package.json (Tokens: ~268 | Category: anthropic-skill) -->\n{\n    \"name\": \"capacitor-plugin-outline\",\n    \"version\": \"1.0.0\",\n    \"description\": \"Capacitor plugin for Outline VPN\",\n    \"main\": \"dist/plugin.cjs.js\",\n    \"module\": \"dist/esm/index.js\",\n    \"types\": \"dist/esm/index.d.ts\",\n    \"unpkg\": \"dist/plugin.js\",\n    \"files\": [\n        \"dist/\",\n        \"ios/\",\n        \"android/\",\n        \"src/\",\n        \"Package.swift\"\n    ],\n    \"author\": \"Outline Authors\",\n    \"license\": \"Apache-2.0\",\n    \"keywords\": [\n        \"capacitor\",\n        \"plugin\",\n        \"native\"\n    ],\n    \"scripts\": {\n        \"clean\": \"rm -rf node_modules dist\",\n        \"build\": \"tsc\"\n    },\n    \"devDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\",\n        \"typescript\": \"^5.0.0\"\n    },\n    \"peerDependencies\": {\n        \"@capacitor/core\": \"^8.3.1\"\n    },\n    \"capacitor\": {\n        \"ios\": {\n            \"src\": \"ios\"\n        },\n        \"android\": {\n            \"src\": \"android\"\n        }\n    }\n}\n\n<!-- File: client/capacitor/plugins/capacitor-plugin-outline/tsconfig.json (Tokens: ~109 | Category: anthropic-skill) -->\n{\n    \"compilerOptions\": {\n        \"module\": \"ESNext\",\n        \"target\": \"ES2017\",\n        \"moduleResolution\": \"node\",\n        \"lib\": [\n            \"ES2017\"\n        ],\n        \"declaration\": true,\n        \"declarationMap\": true,\n        \"outDir\": \"./dist/esm\",\n        \"esModuleInterop\": true,\n        \"skipLibCheck\": true\n    },\n    \"include\": [\n        \"src\"\n    ],\n    \"exclude\": [\n        \"node_modules\"\n    ]\n}\n\n<!-- File: CLAUDE.md (Tokens: ~13 | Category: claude-rule) -->\nThis project uses AGENTS.md instead of CLAUDE.md.\n</yakaai_skills>"}