@profoundlogic/coderflow-server 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/LICENSE.txt +322 -0
  2. package/README.md +158 -0
  3. package/dist/LICENSE.txt +322 -0
  4. package/dist/README.md +158 -0
  5. package/dist/base-image/Dockerfile +184 -0
  6. package/dist/base-image/agent-wrapper.sh +143 -0
  7. package/dist/base-image/apply-local-state.sh +357 -0
  8. package/dist/base-image/coder-git-credential-helper +307 -0
  9. package/dist/base-image/entrypoint.sh +942 -0
  10. package/dist/base-image/ssh_config_template +41 -0
  11. package/dist/base-image/start-code-server.sh +76 -0
  12. package/dist/base-image/sync-repos.sh +170 -0
  13. package/dist/base-image/vscode-extensions.txt +10 -0
  14. package/dist/base-image/vscode-settings.json +41 -0
  15. package/dist/coder-server.js +2 -0
  16. package/dist/config/cli-models.json +45 -0
  17. package/dist/config/imported-skills.schema.json +83 -0
  18. package/dist/config/skill-catalog.json +18 -0
  19. package/dist/config/skill-catalog.schema.json +140 -0
  20. package/dist/config.js +1 -0
  21. package/dist/examples/oidc.json.example +11 -0
  22. package/dist/lib/agent-keepalive.js +1 -0
  23. package/dist/lib/api-keys.js +1 -0
  24. package/dist/lib/apiKeys.js +1 -0
  25. package/dist/lib/auto-judge.js +1 -0
  26. package/dist/lib/basic-auth.js +1 -0
  27. package/dist/lib/build-history.js +1 -0
  28. package/dist/lib/build-output-service.js +1 -0
  29. package/dist/lib/build-scheduler.js +1 -0
  30. package/dist/lib/build-service.js +1 -0
  31. package/dist/lib/claude-oauth-refresh.js +1 -0
  32. package/dist/lib/cli/build.js +1 -0
  33. package/dist/lib/cli/config-command.js +1 -0
  34. package/dist/lib/cli/config.js +1 -0
  35. package/dist/lib/cli/create-user.js +1 -0
  36. package/dist/lib/cli/init.js +1 -0
  37. package/dist/lib/cli/jira.js +1 -0
  38. package/dist/lib/cli/license.js +1 -0
  39. package/dist/lib/cli/server-manager.js +1 -0
  40. package/dist/lib/container-tokens.js +1 -0
  41. package/dist/lib/data-dir.js +1 -0
  42. package/dist/lib/deployment-history.js +1 -0
  43. package/dist/lib/deployment-service.js +1 -0
  44. package/dist/lib/docker-utils.js +1 -0
  45. package/dist/lib/email.js +1 -0
  46. package/dist/lib/emailTemplates.js +1 -0
  47. package/dist/lib/entitlement.js +1 -0
  48. package/dist/lib/fetch-utils.js +1 -0
  49. package/dist/lib/git-provider-service.js +1 -0
  50. package/dist/lib/git-provider-setup/assets/coderflow_github_app.png +0 -0
  51. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -0
  52. package/dist/lib/git-provider-setup/index.js +1 -0
  53. package/dist/lib/git-provider-setup/setup-factory.js +1 -0
  54. package/dist/lib/git-provider-setup/setup-interface.js +1 -0
  55. package/dist/lib/git-providers/azure-devops-provider.js +1 -0
  56. package/dist/lib/git-providers/github-app-provider.js +1 -0
  57. package/dist/lib/git-providers/index.js +1 -0
  58. package/dist/lib/git-providers/provider-factory.js +1 -0
  59. package/dist/lib/git-providers/provider-interface.js +1 -0
  60. package/dist/lib/jira-client.js +1 -0
  61. package/dist/lib/logger.js +1 -0
  62. package/dist/lib/model-fetcher.js +1 -0
  63. package/dist/lib/notifications.js +1 -0
  64. package/dist/lib/oidc-auth.js +1 -0
  65. package/dist/lib/oidc-device-flow.js +1 -0
  66. package/dist/lib/passwordTokens.js +1 -0
  67. package/dist/lib/pin-cascade.js +1 -0
  68. package/dist/lib/provider-accounts.js +1 -0
  69. package/dist/lib/provider-oauth.js +1 -0
  70. package/dist/lib/provider-profile.js +1 -0
  71. package/dist/lib/provider-token-refresh.js +1 -0
  72. package/dist/lib/roles.js +1 -0
  73. package/dist/lib/secrets.js +1 -0
  74. package/dist/lib/state-capture.js +1 -0
  75. package/dist/lib/static-files.js +1 -0
  76. package/dist/lib/task-name-generator.js +1 -0
  77. package/dist/lib/users.js +1 -0
  78. package/dist/middleware/requireAuth.js +1 -0
  79. package/dist/middleware/requireInit.js +1 -0
  80. package/dist/middleware/requirePermission.js +1 -0
  81. package/dist/package-lock.json +4151 -0
  82. package/dist/package.json +50 -0
  83. package/dist/routes/apiKeys.js +1 -0
  84. package/dist/routes/auth-oidc.js +1 -0
  85. package/dist/routes/auth.js +1 -0
  86. package/dist/routes/build.js +1 -0
  87. package/dist/routes/containers.js +1 -0
  88. package/dist/routes/deploy-task.js +1 -0
  89. package/dist/routes/environment-management.js +1 -0
  90. package/dist/routes/environments.js +1 -0
  91. package/dist/routes/external-skills.js +1 -0
  92. package/dist/routes/git-credentials.js +1 -0
  93. package/dist/routes/git-provider-setup.js +1 -0
  94. package/dist/routes/health.js +1 -0
  95. package/dist/routes/jira.js +1 -0
  96. package/dist/routes/objective-management.js +1 -0
  97. package/dist/routes/password.js +1 -0
  98. package/dist/routes/prompt.js +1 -0
  99. package/dist/routes/provider-auth.js +1 -0
  100. package/dist/routes/qa.js +1 -0
  101. package/dist/routes/settings.js +1 -0
  102. package/dist/routes/skill-management.js +1 -0
  103. package/dist/routes/skills.js +1 -0
  104. package/dist/routes/tasks.js +2 -0
  105. package/dist/routes/templates.js +1 -0
  106. package/dist/routes/test-task.js +1 -0
  107. package/dist/routes/test.js +1 -0
  108. package/dist/routes/users.js +1 -0
  109. package/dist/routes/visualizations.js +1 -0
  110. package/dist/schemas/template-metadata.schema.json +178 -0
  111. package/dist/scripts/create-user.js +2 -0
  112. package/dist/shipped-skills/environment-instructions/SKILL.md +154 -0
  113. package/dist/shipped-skills/environment-templates/SKILL.md +282 -0
  114. package/dist/shipped-skills/objective-management/SKILL.md +238 -0
  115. package/dist/shipped-skills/skill-editor/SKILL.md +326 -0
  116. package/dist/start.js +2 -0
  117. package/dist/web-ui/public/activity-detail-modal.js +1 -0
  118. package/dist/web-ui/public/activity-feed.js +1 -0
  119. package/dist/web-ui/public/activity-formatters.js +1 -0
  120. package/dist/web-ui/public/agent-event-parser.js +1 -0
  121. package/dist/web-ui/public/app.js +1 -0
  122. package/dist/web-ui/public/approve-dialog.js +1 -0
  123. package/dist/web-ui/public/coderflow-logo-reversed.svg +46 -0
  124. package/dist/web-ui/public/coderflow-logo.svg +46 -0
  125. package/dist/web-ui/public/comments-widget.js +1 -0
  126. package/dist/web-ui/public/docs/.nojekyll +0 -0
  127. package/dist/web-ui/public/docs/README.md +26 -0
  128. package/dist/web-ui/public/docs/_sidebar.md +47 -0
  129. package/dist/web-ui/public/docs/admin/ai-providers.md +132 -0
  130. package/dist/web-ui/public/docs/admin/email-notifications.md +69 -0
  131. package/dist/web-ui/public/docs/admin/environments.md +215 -0
  132. package/dist/web-ui/public/docs/admin/git-providers.md +147 -0
  133. package/dist/web-ui/public/docs/admin/installation.md +313 -0
  134. package/dist/web-ui/public/docs/admin/skills.md +35 -0
  135. package/dist/web-ui/public/docs/admin/sso.md +241 -0
  136. package/dist/web-ui/public/docs/admin/users-and-roles.md +57 -0
  137. package/dist/web-ui/public/docs/code/cli.md +102 -0
  138. package/dist/web-ui/public/docs/code/files-and-editing.md +86 -0
  139. package/dist/web-ui/public/docs/code/terminal-access.md +110 -0
  140. package/dist/web-ui/public/docs/code/vscode-extension.md +58 -0
  141. package/dist/web-ui/public/docs/getting-started/core-concepts.md +129 -0
  142. package/dist/web-ui/public/docs/getting-started/overview.md +46 -0
  143. package/dist/web-ui/public/docs/index.html +151 -0
  144. package/dist/web-ui/public/docs/integrations/custom.md +58 -0
  145. package/dist/web-ui/public/docs/integrations/ibmi/overview.md +58 -0
  146. package/dist/web-ui/public/docs/integrations/overview.md +48 -0
  147. package/dist/web-ui/public/docs/objectives/qa-mode.md +90 -0
  148. package/dist/web-ui/public/docs/objectives/staged-tasks.md +60 -0
  149. package/dist/web-ui/public/docs/objectives/working-with-objectives.md +102 -0
  150. package/dist/web-ui/public/docs/tasks/approval-and-deployment.md +83 -0
  151. package/dist/web-ui/public/docs/tasks/creating-tasks.md +111 -0
  152. package/dist/web-ui/public/docs/tasks/judging.md +114 -0
  153. package/dist/web-ui/public/docs/tasks/providing-feedback.md +41 -0
  154. package/dist/web-ui/public/docs/tasks/task-groups.md +73 -0
  155. package/dist/web-ui/public/docs/tasks/winner-selection.md +75 -0
  156. package/dist/web-ui/public/docs/templates/batch-processing.md +152 -0
  157. package/dist/web-ui/public/docs/templates/task-templates.md +44 -0
  158. package/dist/web-ui/public/docs/templates/template-examples.md +93 -0
  159. package/dist/web-ui/public/docs/testing/profound-automated-testing.md +77 -0
  160. package/dist/web-ui/public/docs/testing/task-visualizations.md +42 -0
  161. package/dist/web-ui/public/docs/testing/testing-menu.md +118 -0
  162. package/dist/web-ui/public/environments.css +3942 -0
  163. package/dist/web-ui/public/environments.html +1791 -0
  164. package/dist/web-ui/public/environments.js +1 -0
  165. package/dist/web-ui/public/favicon-16.png +0 -0
  166. package/dist/web-ui/public/favicon-32.png +0 -0
  167. package/dist/web-ui/public/favicon.ico +0 -0
  168. package/dist/web-ui/public/feedback-widget.css +3133 -0
  169. package/dist/web-ui/public/feedback-widget.js +1 -0
  170. package/dist/web-ui/public/git-history.css +2663 -0
  171. package/dist/web-ui/public/git-history.html +272 -0
  172. package/dist/web-ui/public/git-history.js +1 -0
  173. package/dist/web-ui/public/git-status.js +1 -0
  174. package/dist/web-ui/public/index.html +1459 -0
  175. package/dist/web-ui/public/index.js +1 -0
  176. package/dist/web-ui/public/login.html +346 -0
  177. package/dist/web-ui/public/login.js +1 -0
  178. package/dist/web-ui/public/markdown-editor.js +1 -0
  179. package/dist/web-ui/public/markdown-file-editor.js +1 -0
  180. package/dist/web-ui/public/modal-maximize.js +1 -0
  181. package/dist/web-ui/public/notifications.js +1 -0
  182. package/dist/web-ui/public/server-health.js +1 -0
  183. package/dist/web-ui/public/settings.css +761 -0
  184. package/dist/web-ui/public/settings.html +1044 -0
  185. package/dist/web-ui/public/settings.js +1 -0
  186. package/dist/web-ui/public/setup-password.html +355 -0
  187. package/dist/web-ui/public/setup-password.js +1 -0
  188. package/dist/web-ui/public/skills.css +1949 -0
  189. package/dist/web-ui/public/skills.html +820 -0
  190. package/dist/web-ui/public/skills.js +1 -0
  191. package/dist/web-ui/public/sse-client.js +1 -0
  192. package/dist/web-ui/public/sse-shared-worker.js +1 -0
  193. package/dist/web-ui/public/styles.css +18614 -0
  194. package/dist/web-ui/public/task.html +1779 -0
  195. package/dist/web-ui/public/task.js +1 -0
  196. package/dist/web-ui/public/terminal.html +45 -0
  197. package/dist/web-ui/public/terminal.js +1 -0
  198. package/dist/web-ui/public/theme.js +1 -0
  199. package/dist/web-ui/public/users.html +298 -0
  200. package/dist/web-ui/public/users.js +1 -0
  201. package/dist/web-ui/public/variant-grouping.js +1 -0
  202. package/package.json +63 -0
@@ -0,0 +1,26 @@
1
+ # CoderFlow Documentation
2
+
3
+ CoderFlow runs AI coding agents in isolated containers to complete coding tasks on your repositories. You review the results and apply the changes you want.
4
+
5
+ ## Getting Started
6
+
7
+ - [Overview](getting-started/overview.md) - What is CoderFlow and how it works
8
+ - [Core Concepts](getting-started/core-concepts.md) - Environments, containers, and the task lifecycle
9
+
10
+ ## Using CoderFlow
11
+
12
+ - [Objectives & Staging](objectives/working-with-objectives.md) - Plan work before execution
13
+ - [Tasks](tasks/creating-tasks.md) - Create, run, and manage AI coding tasks
14
+ - [Working with Code](code/files-and-editing.md) - Edit files, use terminal, VS Code, and CLI
15
+ - [Testing](testing/application-servers.md) - Test your applications
16
+ - [Templates](templates/task-templates.md) - Create reusable task templates
17
+
18
+ ## Integrations
19
+
20
+ - [IBM i](integrations/ibmi/overview.md) - RAS, IBMiMake, and AI tools for IBM i
21
+
22
+ ## Administration
23
+
24
+ - [Installation](admin/installation.md) - Set up the server
25
+ - [Users & Roles](admin/users-and-roles.md) - Manage users and permissions
26
+ - [Environments](admin/environments.md) - Configure your projects
@@ -0,0 +1,47 @@
1
+ - **Getting Started**
2
+ - [Overview](getting-started/overview.md)
3
+ - [Core Concepts](getting-started/core-concepts.md)
4
+
5
+ - **Objectives & Staging**
6
+ - [Working with Objectives](objectives/working-with-objectives.md)
7
+ - [QA Mode](objectives/qa-mode.md)
8
+ - [Staged Tasks](objectives/staged-tasks.md)
9
+
10
+ - **Tasks**
11
+ - [Creating Tasks](tasks/creating-tasks.md)
12
+ - [Task Groups & Variants](tasks/task-groups.md)
13
+ - [Providing Feedback](tasks/providing-feedback.md)
14
+ - [Winner Selection](tasks/winner-selection.md)
15
+ - [Judging](tasks/judging.md)
16
+ - [Approval & Deployment](tasks/approval-and-deployment.md)
17
+
18
+ - **Working with Code**
19
+ - [Files & Editing](code/files-and-editing.md)
20
+ - [Terminal Access](code/terminal-access.md)
21
+ - [VS Code Extension](code/vscode-extension.md)
22
+ - [CLI](code/cli.md)
23
+
24
+ - **Testing**
25
+ - [Testing Menu](testing/testing-menu.md)
26
+ - [Task Visualizations](testing/task-visualizations.md)
27
+ - [Profound Automated Testing](testing/profound-automated-testing.md)
28
+
29
+ - **Templates**
30
+ - [Task Templates](templates/task-templates.md)
31
+ - [Template Examples](templates/template-examples.md)
32
+ - [Batch Processing](templates/batch-processing.md)
33
+
34
+ - **Integrations**
35
+ - [Overview](integrations/overview.md)
36
+ - [IBM i](integrations/ibmi/overview.md)
37
+ - [Custom](integrations/custom.md)
38
+
39
+ - **Administration**
40
+ - [Installation](admin/installation.md)
41
+ - [Users & Roles](admin/users-and-roles.md)
42
+ - [Single Sign-On](admin/sso.md)
43
+ - [Environments](admin/environments.md)
44
+ - [AI Providers](admin/ai-providers.md)
45
+ - [Git Providers](admin/git-providers.md)
46
+ - [Email Notifications](admin/email-notifications.md)
47
+ - [Skills](admin/skills.md)
@@ -0,0 +1,132 @@
1
+ # AI Provider Authentication
2
+
3
+ AI Provider Authentication connects CoderFlow to Claude (Anthropic), Codex (OpenAI), and Gemini (Google) using OAuth. This enables agents to run tasks using your existing subscriptions to these services without managing API keys.
4
+
5
+ > **Note**: CoderFlow is completely functional using only OAuth authentication, but be aware that certain features like automatic task naming require at least one API key to be defined.
6
+
7
+ ## Overview
8
+
9
+ CoderFlow supports multiple accounts per provider, allowing teams to:
10
+
11
+ - Connect different accounts for different purposes (e.g., production vs. development)
12
+ - Share provider access across the team without sharing credentials
13
+ - Switch between accounts as needed
14
+ - Automatically refresh tokens to maintain continuous access
15
+
16
+ Provider authentication is configured globally and applies to all environments. The active account for each provider is used when launching tasks.
17
+
18
+ ## Connecting Accounts
19
+
20
+ Navigate to **Settings → Provider Authentication** to manage AI provider accounts.
21
+
22
+ ### Adding an Account
23
+
24
+ 1. Click **Add Account** next to the provider you want to connect (Claude, Codex, or Gemini)
25
+ 2. Optionally enter a label to identify this account (e.g., "Production", "Team Account")
26
+ 3. Click **Start Sign-In** to open the provider's authentication page
27
+ 4. Complete the sign-in process in your browser:
28
+ - **Claude**: Sign in and copy the authorization code displayed
29
+ - **Codex/Gemini**: Sign in and copy the URL from your browser's address bar after the redirect
30
+ 5. Paste the code or URL into CoderFlow and click **Complete Sign-In**
31
+
32
+ The account will appear in your provider list. If this is your first account for that provider, it becomes the active account automatically.
33
+
34
+ ### Account Labels
35
+
36
+ Labels help identify accounts when you have multiple connected. Good label examples:
37
+ - Production
38
+ - Development
39
+ - Team Shared
40
+ - Personal
41
+
42
+ If you don't provide a label, the account email address is used when available. For Claude (which doesn't expose email through OAuth), a timestamp-based label is generated.
43
+
44
+ ## Managing Accounts
45
+
46
+ ### Setting the Active Account
47
+
48
+ The active account (marked with a green checkmark and "Active" badge) is used for all task execution with that provider.
49
+
50
+ To change the active account, click the **checkmark button** next to the account you want to activate. The button only appears for non-active accounts.
51
+
52
+ Changing the active account immediately affects new task launches. Running tasks continue using the account they started with.
53
+
54
+ ### Renaming Accounts
55
+
56
+ 1. Click the **Edit** (pencil) icon next to the account
57
+ 2. Enter a new label
58
+ 3. Click **Save**
59
+
60
+ ### Removing Accounts
61
+
62
+ 1. Click the **Delete** (trash) icon next to the account
63
+ 2. Confirm the removal
64
+
65
+ If you remove the active account, the next account in the list becomes active. If no accounts remain, tasks using that provider will fail until a new account is connected.
66
+
67
+ ## Token Refresh
68
+
69
+ OAuth tokens expire periodically. CoderFlow automatically refreshes tokens before they expire. Token refresh is managed by the Agent Keep-Alive service.
70
+
71
+ To configure token refresh, navigate to **Settings → Agent Keep-Alive**:
72
+
73
+ - **Enable/Disable**: Toggle automatic refresh for each provider
74
+ - **Refresh Interval**: Set how often to check and refresh tokens (1-24 hours)
75
+ - **Status**: View the last refresh time and next scheduled refresh
76
+
77
+ Failed refreshes are retried up to 3 times. If token refresh fails repeatedly (e.g., if you revoked access from the provider), you may need to reconnect the account.
78
+
79
+ ## Provider-Specific Notes
80
+
81
+ ### Claude (Anthropic)
82
+
83
+ - Uses Anthropic's OAuth flow with PKCE for security
84
+ - Displays an authorization code that you copy back to CoderFlow
85
+ - Email address is not available through OAuth (labels are especially useful)
86
+ - Access includes Claude Code inference capabilities
87
+
88
+ ### Codex (OpenAI)
89
+
90
+ - Uses OpenAI's OAuth flow with PKCE
91
+ - Redirects to a URL that you copy back to CoderFlow
92
+ - Email is extracted from the OAuth token
93
+ - Provides access to ChatGPT subscription models
94
+
95
+ ### Gemini (Google)
96
+
97
+ - Uses Google's standard OAuth flow
98
+ - Redirects to a URL that you copy back to CoderFlow
99
+ - Email is fetched from Google's user info endpoint
100
+ - Requires Google Cloud Platform access
101
+
102
+ ## CLI Compatibility
103
+
104
+ CoderFlow maintains compatibility with Claude Code, Codex CLI, and Gemini CLI by synchronizing the active account's credentials to the standard CLI credential files:
105
+
106
+ - Claude: `~/.claude/.credentials.json`
107
+ - Codex: `~/.codex/auth.json`
108
+ - Gemini: `~/.gemini/oauth_creds.json`
109
+
110
+ When you change the active account in CoderFlow, the CLI credential files are updated automatically. This allows you to use the CLI tools with the same account that CoderFlow is using.
111
+
112
+ ## Troubleshooting
113
+
114
+ ### "Provider not configured" Error
115
+
116
+ This error appears when launching tasks if no account is connected for the required provider. Connect an account in **Settings → Provider Authentication**.
117
+
118
+ ### Authentication Expired
119
+
120
+ If you see authentication errors during task execution:
121
+ 1. Check if the account still appears in Provider Authentication
122
+ 2. Try removing and re-adding the account
123
+ 3. Verify your subscription is still active with the provider
124
+
125
+ ### Token Refresh Failures
126
+
127
+ Check the server logs for refresh errors. Common causes:
128
+ - Provider subscription expired
129
+ - Access revoked from provider's settings
130
+ - Network connectivity issues
131
+
132
+ Re-authenticate by removing and re-adding the account to get fresh tokens.
@@ -0,0 +1,69 @@
1
+ # Email Notifications
2
+
3
+ Email notifications allow CoderFlow to send messages when users are mentioned in comments or when others comment on their tasks and objectives.
4
+
5
+ ## Configuration
6
+
7
+ Navigate to **Settings → Email** to configure SMTP settings:
8
+
9
+ - **SMTP Host** — Your mail server hostname (e.g., `smtp.office365.com`)
10
+ - **Port** — SMTP port (typically `587` for STARTTLS or `465` for SSL)
11
+ - **Use SSL/TLS** — Enable for port 465; leave disabled for port 587 with STARTTLS
12
+ - **Username** — SMTP authentication username
13
+ - **Password** — SMTP authentication password
14
+ - **From Address** — Email address shown as the sender
15
+ - **From Name** — Display name shown alongside the sender address (optional)
16
+
17
+ After entering your settings, use **Test Connection** to verify the SMTP server is reachable, then **Send Test Email** to confirm full delivery.
18
+
19
+ ## User Preferences
20
+
21
+ Each user can control which notifications they receive via **Profile Settings → Email Notifications**:
22
+
23
+ - **@Mentions** — Receive emails when mentioned in comments
24
+ - **Comments on my tasks/objectives** — Receive emails when others comment on tasks or objectives you created
25
+
26
+ Users must have an email address configured in their profile to receive notifications.
27
+
28
+ ## Provider-Specific Notes
29
+
30
+ ### Office 365
31
+
32
+ Use `smtp.office365.com` on port `587` with SSL/TLS disabled (STARTTLS is used automatically). Ensure your account allows SMTP authentication — you may need to enable "Authenticated SMTP" in the Microsoft 365 admin center for the sending account.
33
+
34
+ ### Gmail
35
+
36
+ Use `smtp.gmail.com` on port `587` with SSL/TLS disabled. Gmail requires an App Password rather than your regular account password. Generate one at [Google Account → Security → App Passwords](https://myaccount.google.com/apppasswords). You must have 2-Step Verification enabled.
37
+
38
+ ### SendGrid
39
+
40
+ Use `smtp.sendgrid.net` on port `587`. The username is literally `apikey` and the password is your SendGrid API key.
41
+
42
+ ### AWS SES
43
+
44
+ Use `email-smtp.<region>.amazonaws.com` on port `587` (replace `<region>` with your AWS region, e.g., `us-east-1`). SES SMTP credentials are different from your AWS access keys — generate them in the AWS SES console under "SMTP Settings".
45
+
46
+ ## Troubleshooting
47
+
48
+ ### Connection Timeout
49
+
50
+ - Verify the SMTP host and port are correct
51
+ - Check that your firewall or network allows outbound connections on the SMTP port
52
+ - Some cloud providers block port 25; use port 587 or 465 instead
53
+
54
+ ### Authentication Failed
55
+
56
+ - Verify your username and password are correct
57
+ - For Gmail, ensure you're using an App Password, not your regular password
58
+ - For Office 365, confirm SMTP authentication is enabled for the account
59
+
60
+ ### Emails Not Received
61
+
62
+ - Check the recipient's spam/junk folder
63
+ - Verify the From address is valid and authorized to send from your mail server
64
+ - For SES, ensure the From address is verified in your SES configuration
65
+
66
+ ### Certificate Errors
67
+
68
+ - If using a self-signed certificate on your mail server, you may need to configure your environment to trust it
69
+ - Ensure your server's system time is correct, as certificate validation depends on accurate timestamps
@@ -0,0 +1,215 @@
1
+ # Environments
2
+
3
+ An environment defines where agents work—the Docker image, repositories, tools, and configuration they need to complete tasks. Administrators manage environments through the Web UI.
4
+
5
+ ## Configuration Storage
6
+
7
+ All environment configuration is stored in your organization's coder setup repository—a git repository that defines your CoderFlow installation. This includes Dockerfiles, setup scripts, agent instructions, templates, and environment settings.
8
+
9
+ The Web UI provides a complete interface for managing this configuration:
10
+
11
+ - **Save** — Write changes to disk without committing
12
+ - **Discard** — Revert uncommitted changes
13
+ - **Commit & Push** — Commit changes to git and push to the remote repository
14
+
15
+ This workflow lets you experiment with configuration changes before committing them. The repository status shows uncommitted changes, and you can pull updates from the remote to stay in sync with your team.
16
+
17
+ ## Environment Configuration
18
+
19
+ Navigate to **Environments** in the Web UI to create and configure environments. Each environment has the following tabs:
20
+
21
+ ### Overview
22
+
23
+ Basic environment settings:
24
+ - **Description** — What this environment is for
25
+ - **Default Agent** — AI agent to use for tasks
26
+ - **Docker Image** — Container image name
27
+ - **Timezone** — Timezone for the environment
28
+ - **Skills** — Skills assigned to this environment
29
+ - **README** — Documentation displayed to users
30
+
31
+ ### Repositories
32
+
33
+ Git repositories cloned into the environment. To add a repository, click **Add Repository** and choose one of:
34
+
35
+ - **With Git Provider** — Select a [Git Provider](admin/git-providers.md) from the dropdown, then choose a repository from the list of repos the provider can access. Authentication is automatic for all Git operations (clone, fetch, push) in builds, tasks, and deployments.
36
+ - **Manual Entry** — Enter a repository URL directly without selecting a provider. Use this for public repositories or when using [PAT secrets](#using-secrets-as-git-pat) for authentication.
37
+
38
+ Repository settings:
39
+ - **Branch** — Default branch to check out
40
+ - **Allow Branch Selection** — Let users choose branches when creating tasks
41
+ - **Path** — Where to clone the repository in the container
42
+
43
+ ### Application Server
44
+
45
+ Configuration for running and testing applications:
46
+ - **Start Command** — How to launch the application server
47
+ - **Proxy URL** — URL for proxying requests to the application
48
+ - **QA URL** — URL template for testing (supports placeholders)
49
+ - **Authentication** — Credentials for accessing the application
50
+ - **Ports** — Ports to expose from the container
51
+ - **Launch URLs** — Quick links for testing the application
52
+
53
+ ### Agent Instructions
54
+
55
+ The AGENTS.md file that guides AI agents working in this environment. This markdown file describes:
56
+ - Project structure and architecture
57
+ - Build and test commands
58
+ - Coding conventions and patterns
59
+ - Domain-specific knowledge agents need
60
+
61
+ ### Skills
62
+
63
+ Skills are reusable prompt-based actions that agents can invoke during tasks. In the **Overview** tab, use **Manage Skills** to assign skills to the environment. Assigned skills are injected into every task launched in this environment, so agents have them available immediately.
64
+
65
+ If you need different skills for different projects, create separate environments or update the assigned skill set before launching new tasks.
66
+
67
+ ### Files
68
+
69
+ Configuration files that define the environment:
70
+ - **Dockerfile** — How the Docker image is built
71
+ - **setup.sh** — Initialization script run when containers start
72
+ - **cleanup.sh** — Cleanup script run when tasks complete
73
+
74
+ ### Secrets
75
+
76
+ Secrets store sensitive values like API keys, credentials, and certificates for use in builds, tasks, and deployments. They are also used to define non-sensitive environment values like external service URLs, ports, and so on.
77
+
78
+ **Defining Secrets**
79
+
80
+ Navigate to the environment's **Secrets** tab and click **Add Secret**:
81
+
82
+ - **Name** — Identifier for the secret (letters, numbers, underscores)
83
+ - **Type** — Value (literal string) or File (path to a file on the host)
84
+ - **Available For** — Where the secret can be used: Build, Tasks, Deploy
85
+ - **Expose As** — How to expose the secret in Tasks/Deploy contexts: environment variable or file mount
86
+ - **Target** — Variable name (for env var) or container path (for file mount)
87
+
88
+ **Secret Types**
89
+
90
+ - **Value** — Stores literal strings such as API keys, passwords, or tokens. Can be exposed as an environment variable.
91
+ - **File** — References a file on the host system such as SSH keys or certificates. Can be mounted read-only in containers.
92
+
93
+ **Using Secrets in Tasks**
94
+
95
+ Secrets with **Tasks** availability are injected when task containers start:
96
+
97
+ - **Expose as environment variable** — The secret value becomes available as the specified variable name
98
+ - **Expose as file** — The file is mounted read-only at the specified container path
99
+
100
+ **Using Secrets in Builds**
101
+
102
+ Secrets with **Build** availability are passed to Docker BuildKit during image builds. Access them in your Dockerfile using `--mount=type=secret`:
103
+
104
+ ```dockerfile
105
+ RUN --mount=type=secret,id=my_secret cat /run/secrets/my_secret
106
+ ```
107
+
108
+ For example, to use an `.npmrc` file during build:
109
+
110
+ ```dockerfile
111
+ RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install
112
+ ```
113
+
114
+ To expose a secret as an environment variable:
115
+
116
+ ```dockerfile
117
+ RUN --mount=type=secret,id=api_key,env=API_KEY ./configure.sh
118
+ ```
119
+
120
+ See [Docker Build Secrets](https://docs.docker.com/build/building/secrets/) for more details.
121
+
122
+ **Using Secrets in Deployments**
123
+
124
+ Secrets with **Deploy** availability are injected when deployment scripts run:
125
+
126
+ - **Expose as environment variable** — The secret value becomes available as the specified variable name in the deployment script
127
+ - **Expose as file** — The file is mounted read-only at the specified container path during deployment
128
+
129
+ This is useful for storing deployment credentials, SSH keys for remote servers, API tokens for deployment services, or configuration files specific to deployment targets (Base, QA, Production).
130
+
131
+ **Using Secrets as Git PAT**
132
+
133
+ A secret can provide Git authentication for HTTPS repositories. When adding a secret, check **Use as Git PAT** and specify a **Git Host** (e.g., `github.com`) to use the secret as a Personal Access Token for Git operations. The PAT applies to any repository under [Repositories](#repositories) that matches the hostname.
134
+
135
+ PAT secrets can be either **Value** type (token entered directly) or **File** type (token read from a file on the host). Select **Available For** contexts as needed—Build, Tasks, or Deploy. PAT secrets do not require "Expose as" configuration.
136
+
137
+ In **builds**, PAT credentials are available as the `git-credentials` build secret. Mount it to the standard Git credentials location:
138
+
139
+ ```dockerfile
140
+ RUN --mount=type=secret,id=git-credentials,target=/root/.git-credentials \
141
+ git clone https://github.com/myorg/private-repo.git
142
+ ```
143
+
144
+ In **task and deployment containers**, the PAT is automatically configured in the Git credential store.
145
+
146
+ **Note:** PAT secrets are ignored for repositories that have a [Git Provider](admin/git-providers.md) configured.
147
+
148
+ ### Build
149
+
150
+ Building and scheduling:
151
+ - **Schedule** — Automatic rebuild interval (e.g., nightly)
152
+ - **Build History** — Previous builds with status and duration
153
+ - **Build Now** — Trigger an immediate rebuild
154
+
155
+ For build-time secrets (SSH keys, tokens), see [Secrets / Env Vars](#secrets).
156
+
157
+ Rebuild the environment after changing the Dockerfile, setup scripts, or dependencies.
158
+
159
+ ### Tests
160
+
161
+ Test commands available in the Testing menu:
162
+ - Define commands agents can run to verify their changes
163
+ - Configure expected outputs or assertions
164
+
165
+ ### Templates
166
+
167
+ Task templates for this environment:
168
+ - Reusable task definitions with parameters
169
+ - See **Templates** section for details
170
+
171
+ ### Deployment Profiles
172
+
173
+ Deployment Profiles provide built-in CI/CD capabilities for deploying code to different targets.
174
+
175
+ Each profile defines:
176
+ - **Target** — Where code deploys (Base, QA, Production, etc.)
177
+ - **Deployment script** — Commands to run (e.g., setting environment variables, running build tools)
178
+ - **Credentials** — Separate authentication for each target
179
+
180
+ Deployments aren't just for production—they're part of the regular workflow. For example, with IBM i development, after code is approved and pushed to repositories, a deployment compiles the changes to the base environment. Additional profiles can then deploy to QA or production systems.
181
+
182
+ For IBM i environments, this includes setting the right library list and running `ibmimake` against the target system.
183
+
184
+ Deployments can be triggered from the Web UI.
185
+
186
+ ## Creating Environments
187
+
188
+ To create a new environment:
189
+ 1. Navigate to **Environments** in the Web UI
190
+ 2. Click **New Environment**
191
+ 3. Configure the basic settings
192
+ 4. Add repositories and set up the Dockerfile
193
+ 5. Build the environment
194
+
195
+ ## Building Environments
196
+
197
+ After configuring an environment, build its Docker image from the Build tab. Click **Build Now** to trigger a build. The build history shows previous builds with their status and duration.
198
+
199
+ For automation or command-line workflows, you can also build from the server:
200
+
201
+ ```bash
202
+ coder-server build <env-name>
203
+ ```
204
+
205
+ For automated workflows, scheduled rebuilds can pull the latest code and rebuild the image at regular intervals.
206
+
207
+ ### Base Image
208
+
209
+ All environments build on top of a shared base image. Rebuild the base image to update agent CLIs (Claude Code, Codex, Gemini) to the latest version or after updating core dependencies. Use the **Build Base Image** option in **Settings → Environments → Actions**, or from the CLI:
210
+
211
+ ```bash
212
+ coder-server build base
213
+ ```
214
+
215
+ After rebuilding the base image, rebuild any environments that depend on it.
@@ -0,0 +1,147 @@
1
+ # Git Providers
2
+
3
+ Git Providers integrate with Git hosting services to provide automatic repository authentication. Once configured, agents can clone, fetch, and push to repositories without manual credential management.
4
+
5
+ Provider configuration is stored in your coder setup repository alongside environment definitions, giving you version control and backup of your authentication settings.
6
+
7
+ ## Provider Types
8
+
9
+ Each provider type has its own setup process. GitHub providers are created through an automated wizard in CoderFlow. Azure DevOps providers require manual setup in the Azure Portal before adding the provider in CoderFlow.
10
+
11
+ ### GitHub
12
+
13
+ GitHub providers use GitHub Apps for authentication, providing fine-grained repository access without personal access tokens. CoderFlow automates the GitHub App creation process through a guided setup wizard.
14
+
15
+ #### Requirements
16
+
17
+ - You must be logged into GitHub before starting the setup wizard
18
+ - To install the app into an organization, you must be an **organization owner**
19
+
20
+ #### Permissions Requested
21
+
22
+ The GitHub App requests these permissions:
23
+ - **Contents** — Read and write (for clone/fetch/push)
24
+ - **Metadata** — Read-only (required by GitHub)
25
+ - **Pull requests** — Read and write
26
+ - **Issues** — Read and write
27
+ - **Statuses** — Read and write
28
+ - **Checks** — Read and write
29
+
30
+ For more details about GitHub Apps, see [About GitHub Apps](https://docs.github.com/en/apps/overview).
31
+
32
+ #### Setup Wizard
33
+
34
+ Navigate to **Settings → Server Settings → Git Providers** and click **Add Git Provider** to start the automated setup:
35
+
36
+ 1. **Configure the provider**:
37
+ - **Provider Name** — Identifier for this provider in CoderFlow
38
+ - **App Name** — Name for the GitHub App (will appear in GitHub)
39
+ - **Description** — Optional description shown on the GitHub App page
40
+ - **Account Type** — Organization or Personal account
41
+ - **Organization Name** — Required if using an organization account
42
+
43
+ 2. **Create the GitHub App**: Click "Create GitHub App" to be redirected to GitHub. Review the app permissions and click "Create GitHub App" on GitHub to approve.
44
+
45
+ 3. **Install the App**: After creation, you'll be redirected to install the app. Choose **All repositories** or select specific repositories, then click **Install**.
46
+
47
+ 4. **Complete**: CoderFlow automatically captures all credentials and creates the provider. You'll see a success message with the new provider details.
48
+
49
+ #### After Setup
50
+
51
+ Use **Test Connection** on the provider to verify the configuration. You can edit the provider later to view or update settings.
52
+
53
+ ### Azure DevOps
54
+
55
+ Azure DevOps providers use Service Principals (App Registrations) with OAuth 2.0 client credentials flow for authentication. This supports both Azure DevOps Services (cloud) and Azure DevOps Server (on-premises).
56
+
57
+ #### Prerequisites
58
+
59
+ - An Azure subscription with access to Microsoft Entra ID (formerly Azure AD)
60
+ - Owner or admin access to your Azure DevOps organization
61
+ - Permissions to create App Registrations in Microsoft Entra ID
62
+
63
+ #### In Azure Portal: Create App Registration
64
+
65
+ 1. Navigate to **Microsoft Entra ID -> App registrations**
66
+ 2. Click **New registration**
67
+ 3. Configure the application:
68
+ - **Name** — A descriptive name (e.g., "CoderFlow Git Access")
69
+ - **Supported account types** — "Accounts in this organizational directory only"
70
+ - **Redirect URI** — Leave blank (not needed for client credentials flow)
71
+ 4. Click **Register**
72
+
73
+ After creation, note the **Application (client) ID** and **Directory (tenant) ID** from the app's Overview page.
74
+
75
+ #### In Azure Portal: Create Credentials
76
+
77
+ Choose one authentication method:
78
+
79
+ **Client Secret** (simpler setup)
80
+ 1. In your App Registration, go to **Certificates & secrets -> Client secrets**
81
+ 2. Click **New client secret**
82
+ 3. Add a description and select expiration period
83
+ 4. Click **Add** and copy the secret value immediately (it won't be shown again)
84
+
85
+ **Certificate** (more secure, recommended by Microsoft)
86
+ 1. Generate a certificate with private key:
87
+ ```
88
+ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=CoderFlow"
89
+ cat cert.pem key.pem > combined.pem
90
+ ```
91
+ 2. In your App Registration, go to **Certificates & secrets -> Certificates**
92
+ 3. Click **Upload certificate** and upload `cert.pem`
93
+ 4. Keep `combined.pem` (certificate + private key) for CoderFlow configuration
94
+
95
+ #### In Azure DevOps: Grant Access
96
+
97
+ 1. Navigate to your Azure DevOps organization: `https://dev.azure.com/{org}`
98
+ 2. Go to **Organization settings -> Users**
99
+ 3. Click **Add users**
100
+ 4. Search for your App Registration by name or client ID
101
+ 5. Add it with the appropriate access level:
102
+ - **Basic** — For read/write access to repositories
103
+ - **Stakeholder** — For read-only access
104
+ 6. Optionally, add the Service Principal to specific project teams for granular access
105
+
106
+ For more details, see [Use service principals in Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/service-principal-managed-identity?view=azure-devops)
107
+
108
+ The steps above correspond to the **Implementation guide** sections:
109
+ - **Step 1: Create your identity**
110
+ - **Option A: Create a service principal (application registration)**
111
+ - **Step 2: Add the identity to Azure DevOps**
112
+ - **Step 3: Configure permissions**
113
+
114
+ #### In CoderFlow: Add the Provider
115
+
116
+ Navigate to **Settings → Git Providers** and click **Add Provider**. Configure these fields:
117
+
118
+ - **Name** — Identifier for this provider (lowercase, alphanumeric, hyphens)
119
+ - **Type** — Select "Azure DevOps"
120
+ - **Organization** — Your Azure DevOps organization name
121
+ - **Tenant ID** — Directory (tenant) ID from Azure Portal (GUID format)
122
+ - **Client ID** — Application (client) ID from Azure Portal (GUID format)
123
+ - **Authentication Method**:
124
+ - **Client Secret** — Enter the secret value from Azure Portal
125
+ - **Certificate** — Upload the PEM file containing both certificate and private key
126
+
127
+ After adding the provider, use **Test Connection** to verify the configuration.
128
+
129
+ ## Using Providers in Environments
130
+
131
+ To add a repository using a Git Provider:
132
+
133
+ 1. Open an environment and go to the **Repositories** tab
134
+ 2. Click **Add Repository**
135
+ 3. Select a **Git Provider** from the dropdown
136
+ 4. Choose a repository from the list of repos the provider can access
137
+
138
+ See [Environments - Repositories](admin/environments.md#repositories) for more about repository configuration.
139
+
140
+ ## Authentication
141
+
142
+ Once a repository is associated with a Git Provider, authentication is automatic in all contexts:
143
+
144
+ - **Builds** — Repositories are cloned automatically with credentials injected by the build system.
145
+ - **Tasks & Deployments** — A built-in credential helper provides credentials transparently. Git operations (clone, fetch, push) work without additional configuration.
146
+
147
+ Repositories with a Git Provider ignore any PAT secrets configured for the same host.