@catamorphic/work-server 0.0.0-stage → 0.1.0-alpha.30

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 (168) hide show
  1. package/LICENSE.txt +202 -0
  2. package/NOTICE.txt +32 -0
  3. package/README.md +146 -2
  4. package/dist/admission/admission-service.d.ts +134 -0
  5. package/dist/admission/admission-service.d.ts.map +1 -0
  6. package/dist/admission/routes.d.ts +17 -0
  7. package/dist/admission/routes.d.ts.map +1 -0
  8. package/dist/agent-capabilities.d.ts +9 -0
  9. package/dist/agent-capabilities.d.ts.map +1 -0
  10. package/dist/agents.d.ts +32 -0
  11. package/dist/agents.d.ts.map +1 -0
  12. package/dist/auth/auth-config.d.ts +114 -0
  13. package/dist/auth/auth-config.d.ts.map +1 -0
  14. package/dist/auth/auth-database.d.ts +20 -0
  15. package/dist/auth/auth-database.d.ts.map +1 -0
  16. package/dist/auth/client-address.d.ts +30 -0
  17. package/dist/auth/client-address.d.ts.map +1 -0
  18. package/dist/auth/fastify-auth.d.ts +38 -0
  19. package/dist/auth/fastify-auth.d.ts.map +1 -0
  20. package/dist/auth/schema-scoped-postgres-dialect.d.ts +15 -0
  21. package/dist/auth/schema-scoped-postgres-dialect.d.ts.map +1 -0
  22. package/dist/auth/work-auth-types.d.ts +84 -0
  23. package/dist/auth/work-auth-types.d.ts.map +1 -0
  24. package/dist/auth/work-auth.d.ts +38 -0
  25. package/dist/auth/work-auth.d.ts.map +1 -0
  26. package/dist/brand.d.ts +6 -0
  27. package/dist/brand.d.ts.map +1 -0
  28. package/dist/cluster.d.ts +80 -0
  29. package/dist/cluster.d.ts.map +1 -0
  30. package/dist/company-sync.d.ts +60 -0
  31. package/dist/company-sync.d.ts.map +1 -0
  32. package/dist/config.d.ts +130 -0
  33. package/dist/config.d.ts.map +1 -0
  34. package/dist/credential-vault.d.ts +10 -0
  35. package/dist/credential-vault.d.ts.map +1 -0
  36. package/dist/execution-config.d.ts +158 -0
  37. package/dist/execution-config.d.ts.map +1 -0
  38. package/dist/fake-agent.d.ts +21 -0
  39. package/dist/fake-agent.d.ts.map +1 -0
  40. package/dist/gateway/gateway-config.d.ts +103 -0
  41. package/dist/gateway/gateway-config.d.ts.map +1 -0
  42. package/dist/identity/account-lifecycle.d.ts +170 -0
  43. package/dist/identity/account-lifecycle.d.ts.map +1 -0
  44. package/dist/identity/administrator-routes.d.ts +25 -0
  45. package/dist/identity/administrator-routes.d.ts.map +1 -0
  46. package/dist/identity/administrators.d.ts +48 -0
  47. package/dist/identity/administrators.d.ts.map +1 -0
  48. package/dist/identity/directory.d.ts +37 -0
  49. package/dist/identity/directory.d.ts.map +1 -0
  50. package/dist/identity/google-directory.d.ts +51 -0
  51. package/dist/identity/google-directory.d.ts.map +1 -0
  52. package/dist/index.d.ts +23 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +10562 -0
  55. package/dist/index.js.map +58 -0
  56. package/dist/mdns.d.ts +19 -0
  57. package/dist/mdns.d.ts.map +1 -0
  58. package/dist/replica-process.fixture.d.ts +2 -0
  59. package/dist/replica-process.fixture.d.ts.map +1 -0
  60. package/dist/server.d.ts +106 -0
  61. package/dist/server.d.ts.map +1 -0
  62. package/dist/setup/connections.d.ts +19 -0
  63. package/dist/setup/connections.d.ts.map +1 -0
  64. package/dist/setup/github-app.d.ts +46 -0
  65. package/dist/setup/github-app.d.ts.map +1 -0
  66. package/dist/setup/machines.d.ts +40 -0
  67. package/dist/setup/machines.d.ts.map +1 -0
  68. package/dist/setup/operator-access.d.ts +11 -0
  69. package/dist/setup/operator-access.d.ts.map +1 -0
  70. package/dist/setup/provision-project.d.ts +144 -0
  71. package/dist/setup/provision-project.d.ts.map +1 -0
  72. package/dist/setup/provision.d.ts +55 -0
  73. package/dist/setup/provision.d.ts.map +1 -0
  74. package/dist/shares/share-routes.d.ts +21 -0
  75. package/dist/shares/share-routes.d.ts.map +1 -0
  76. package/dist/shares/share-tools.d.ts +14 -0
  77. package/dist/shares/share-tools.d.ts.map +1 -0
  78. package/dist/shares/shares-service.d.ts +98 -0
  79. package/dist/shares/shares-service.d.ts.map +1 -0
  80. package/dist/test-support.d.ts +127 -0
  81. package/dist/test-support.d.ts.map +1 -0
  82. package/dist/workers/codex-sign-ins.d.ts +107 -0
  83. package/dist/workers/codex-sign-ins.d.ts.map +1 -0
  84. package/dist/workers/fake-claude-cli.d.ts +3 -0
  85. package/dist/workers/fake-claude-cli.d.ts.map +1 -0
  86. package/dist/workers/fake-codex-cli.d.ts +3 -0
  87. package/dist/workers/fake-codex-cli.d.ts.map +1 -0
  88. package/dist/workers/install-script.d.ts +72 -0
  89. package/dist/workers/install-script.d.ts.map +1 -0
  90. package/dist/workers/machine-classes.d.ts +115 -0
  91. package/dist/workers/machine-classes.d.ts.map +1 -0
  92. package/dist/workers/machine-rules.d.ts +402 -0
  93. package/dist/workers/machine-rules.d.ts.map +1 -0
  94. package/dist/workers/member-machine-routes.d.ts +13 -0
  95. package/dist/workers/member-machine-routes.d.ts.map +1 -0
  96. package/dist/workers/member-machines.d.ts +69 -0
  97. package/dist/workers/member-machines.d.ts.map +1 -0
  98. package/dist/workers/placement.d.ts +59 -0
  99. package/dist/workers/placement.d.ts.map +1 -0
  100. package/dist/workers/sign-ins.d.ts +107 -0
  101. package/dist/workers/sign-ins.d.ts.map +1 -0
  102. package/dist/workers/volume-pruning.d.ts +15 -0
  103. package/dist/workers/volume-pruning.d.ts.map +1 -0
  104. package/dist/workers/worker-identity.d.ts +44 -0
  105. package/dist/workers/worker-identity.d.ts.map +1 -0
  106. package/dist/workers/worker-protocol.d.ts +40 -0
  107. package/dist/workers/worker-protocol.d.ts.map +1 -0
  108. package/dist/workers/worker-registry.d.ts +593 -0
  109. package/dist/workers/worker-registry.d.ts.map +1 -0
  110. package/dist/workers/worker-routes.d.ts +18 -0
  111. package/dist/workers/worker-routes.d.ts.map +1 -0
  112. package/dist/workers/worker-runtime.d.ts +59 -0
  113. package/dist/workers/worker-runtime.d.ts.map +1 -0
  114. package/package.json +77 -4
  115. package/src/admission/admission-service.ts +675 -0
  116. package/src/admission/routes.ts +296 -0
  117. package/src/agent-capabilities.ts +129 -0
  118. package/src/agents.ts +314 -0
  119. package/src/auth/auth-config.ts +288 -0
  120. package/src/auth/auth-database.ts +212 -0
  121. package/src/auth/client-address.ts +104 -0
  122. package/src/auth/fastify-auth.ts +819 -0
  123. package/src/auth/schema-scoped-postgres-dialect.ts +132 -0
  124. package/src/auth/work-auth-types.ts +70 -0
  125. package/src/auth/work-auth.ts +393 -0
  126. package/src/brand.ts +8 -0
  127. package/src/cluster.ts +454 -0
  128. package/src/company-sync.ts +162 -0
  129. package/src/config.ts +332 -0
  130. package/src/credential-vault.ts +73 -0
  131. package/src/execution-config.ts +633 -0
  132. package/src/fake-agent.ts +331 -0
  133. package/src/gateway/gateway-config.ts +331 -0
  134. package/src/identity/account-lifecycle.ts +880 -0
  135. package/src/identity/administrator-routes.ts +93 -0
  136. package/src/identity/administrators.ts +125 -0
  137. package/src/identity/directory.ts +53 -0
  138. package/src/identity/google-directory.ts +242 -0
  139. package/src/index.ts +99 -0
  140. package/src/mdns.ts +187 -0
  141. package/src/replica-process.fixture.ts +14 -0
  142. package/src/server.ts +1519 -0
  143. package/src/setup/connections.ts +252 -0
  144. package/src/setup/github-app.ts +532 -0
  145. package/src/setup/machines.ts +405 -0
  146. package/src/setup/operator-access.ts +78 -0
  147. package/src/setup/provision-project.ts +273 -0
  148. package/src/setup/provision.ts +140 -0
  149. package/src/shares/share-routes.ts +516 -0
  150. package/src/shares/share-tools.ts +62 -0
  151. package/src/shares/shares-service.ts +351 -0
  152. package/src/test-support.ts +360 -0
  153. package/src/workers/codex-sign-ins.ts +360 -0
  154. package/src/workers/fake-claude-cli.ts +444 -0
  155. package/src/workers/fake-codex-cli.ts +162 -0
  156. package/src/workers/install-script.ts +395 -0
  157. package/src/workers/machine-classes.ts +152 -0
  158. package/src/workers/machine-rules.ts +1950 -0
  159. package/src/workers/member-machine-routes.ts +122 -0
  160. package/src/workers/member-machines.ts +206 -0
  161. package/src/workers/placement.ts +104 -0
  162. package/src/workers/sign-ins.ts +247 -0
  163. package/src/workers/volume-pruning.ts +45 -0
  164. package/src/workers/worker-identity.ts +167 -0
  165. package/src/workers/worker-protocol.ts +67 -0
  166. package/src/workers/worker-registry.ts +1578 -0
  167. package/src/workers/worker-routes.ts +261 -0
  168. package/src/workers/worker-runtime.ts +872 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE.txt ADDED
@@ -0,0 +1,32 @@
1
+ Catamorphic
2
+ Copyright 2026 The Catamorphic Authors
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (the
5
+ "License"); see the LICENSE file for the full text.
6
+
7
+ --------------------------------------------------------------------------------
8
+ This product includes third-party software under separate license terms:
9
+
10
+ command-score
11
+ apps/desktop/src/renderer/lib/command-score.ts is a port of Superhuman's
12
+ command-score fuzzy matcher.
13
+
14
+ Copyright (c) 2016 Superhuman
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,147 @@
1
- # Temporary Holding Version
1
+ # @catamorphic/work-server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Work server as a library (ADR 0160). The published `work-server` image is
4
+ a thin process around this package; a company that needs custom code runs the
5
+ same server with its own hooks instead of forking it.
6
+
7
+ ```ts
8
+ import {
9
+ createWorkServer,
10
+ workServerConfigFromEnv,
11
+ } from "@catamorphic/work-server";
12
+
13
+ const server = await createWorkServer({
14
+ config: workServerConfigFromEnv(process.env),
15
+ hooks: {
16
+ connectionProviders: [myInternalToolsProvider],
17
+ routes: ({ app }) => {
18
+ app.get("/internal/ping", async () => ({ ok: true }));
19
+ },
20
+ },
21
+ });
22
+ await server.operatorApp.listen({ port: 4701, host: "127.0.0.1" });
23
+ await server.app.listen({ port: 4700, host: "0.0.0.0" });
24
+ ```
25
+
26
+ ## Config is data, hooks are code
27
+
28
+ `config` is a typed, serializable `WorkServerConfig`, validated at boot by the
29
+ same schemas as the image's files. `hooks` are code. Only
30
+ `workServerConfigFromEnv` knows the `WORK_*` variables and file paths
31
+ documented in [`apps/server`](../../apps/server/README.md): it reads
32
+ `WORK_AUTH_CONFIG` (default `<WORK_DATA_DIR>/auth-config.json`) into
33
+ `config.auth` and `WORK_GATEWAY_CONFIG` into `config.gateway`, resolving each
34
+ secret a file names by variable into its value (ADR 0183). `createWorkServer`
35
+ reads no configuration file.
36
+
37
+ A server can build the config in code instead, for example from a secret
38
+ manager:
39
+
40
+ ```ts
41
+ const base = workServerConfigFromEnv(process.env);
42
+ const server = await createWorkServer({
43
+ config: {
44
+ ...base,
45
+ auth: {
46
+ providers: [
47
+ {
48
+ kind: "google-workspace",
49
+ clientId: secrets.googleClientId,
50
+ clientSecret: secrets.googleClientSecret,
51
+ domains: ["example.com"],
52
+ // The service account key itself; no file on disk.
53
+ directory: { credentials: { key: secrets.directoryKey } },
54
+ },
55
+ ],
56
+ },
57
+ gateway: {
58
+ connections: [
59
+ {
60
+ kind: "slack-mcp",
61
+ displayName: "Slack",
62
+ url: "https://mcp.slack.com/mcp",
63
+ oauth: { client: { id: "1234.5678", secret: secrets.slackSecret } },
64
+ },
65
+ ],
66
+ },
67
+ },
68
+ });
69
+ ```
70
+
71
+ `WorkAuthConfigSchema` and `GatewayConfigSchema` are exported for hosts that
72
+ validate earlier. Generated state stays in files under `dataDir` (the vault
73
+ key, the generated secrets, the host id, worker credentials); the matching
74
+ config fields and hooks (`secret`, `vaultKeys`, `operatorSecret`) supply them
75
+ instead. With `databaseUrl` the server is a disposable replica (ADR 0190):
76
+ `secret`, vault keys, and `operatorSecret` are required, it writes no identity
77
+ to `dataDir`, and it registers a new machine at every start. `server.lost`
78
+ resolves when that machine's lease is lost (`/healthz` then answers 503;
79
+ `/readyz` answers 503 whenever renewals fail); the host should then shut down so
80
+ its supervisor starts a fresh process.
81
+
82
+ ## Hooks
83
+
84
+ | Hook | Adds |
85
+ | --- | --- |
86
+ | `agentCapabilities` | Host capabilities, profiles, and approvals for agents |
87
+ | `connectionProviders` | Connection providers beside the configured MCP endpoints |
88
+ | `github` | Options of the built-in `github` connection provider: Enterprise Server URLs, the App's OAuth client for members' own connections (ADR 0177) |
89
+ | `connectionGuards` | Guards that review each gateway action (ADR 0162). Work ships none; a guard is host code (ADR 0183) |
90
+ | `vaultKeys` | Credential vault keys from a key service instead of `WORK_VAULT_KEY` |
91
+ | `directories` | Upstream directories (beyond Google Workspace) that keep accounts active or disable them (ADR 0161) |
92
+ | `machineProvisioner` | Creates and destroys worker machines on a platform Work does not ship, for `custom` machine classes, so machine rules give people and teams their own machines, or machines on demand for waiting work. `create` gets the class's `options`, the rule, and what the waiting work needs, and is idempotent per enrollment code (`enrollment.idempotencyKey`); `destroy` removes every machine with the name and answers `{ done }` (ADRs 0167, 0205, 0258) |
93
+ | `hetzner` | Hetzner Cloud API options for `hetzner-cloud` machine classes: another endpoint, or a `fetch` for tests (the token is `WORK_HETZNER_TOKEN`) |
94
+ | `projectSeeds` | Changes to the files seeded into new projects |
95
+ | `routes` | Extra routes on the public application |
96
+
97
+ Hooks extend the server. They cannot remove sign-in, admission, membership
98
+ resolution, the loopback-only operator listener, or execution fencing.
99
+
100
+ ## Guards
101
+
102
+ A guard is a `ConnectionActionGuard`: a `name`, optional connection `kinds`,
103
+ and `review(context)` answering `allow`, `deny`, or `escalate`. Guards are
104
+ company policy, so they live in the host's code, not in Work (ADR 0183). The
105
+ server keeps the mechanics: a guard that throws denies, one slower than
106
+ `config.connectionGuardTimeoutMs` (default 30 seconds) escalates, an
107
+ escalation asks the agent's person or the chat's approvers, and every verdict
108
+ is in the connection audit. Name `kinds` so a guard only sees the connections
109
+ it judges. Examples:
110
+ [secrets and the gateway](../../skills/setup-work-server/references/secrets-and-gateway.md#guards-are-host-code).
111
+
112
+ ## Your own image
113
+
114
+ The stock server is one file,
115
+ [`apps/server/src/index.ts`](../../apps/server/src/index.ts). Anything it
116
+ does not do is code in your own image built from that file (ADR 0261):
117
+ guards, model request rewrites (pinning the providers an aggregator routes
118
+ to), your own connection providers, a machine provisioner for your cloud,
119
+ seeds, routes. The stock configuration does not grow to cover them, so this
120
+ is the path a setup agent takes whenever the stock server is not enough:
121
+
122
+ 1. Copy `apps/server/src/index.ts` from the release you run to `server.ts`
123
+ and fill in its `hooks: {}`. It imports only `@catamorphic/work-server`,
124
+ which also exports the guard and rewrite types, the connection provider
125
+ definers, and `ConnectionActionRefusedError`.
126
+ 2. Build it on the published image, so security fixes arrive with each
127
+ release:
128
+
129
+ ```dockerfile
130
+ FROM ghcr.io/<owner>/work-server:<version>
131
+ COPY server.ts /app/apps/server/custom/server.ts
132
+ # More packages, when the hooks need them:
133
+ # RUN cd /app/apps/server && bun add @anthropic-ai/sdk zod
134
+ CMD ["bun", "apps/server/custom/server.ts"]
135
+ ```
136
+
137
+ The image's workspace uses isolated installs, so place the file under
138
+ `apps/server/`: from there it resolves `@catamorphic/work-server`.
139
+ 3. Push the image to your registry and run it in place of the published one,
140
+ with the same volume and variables.
141
+
142
+ Workers keep the published image: hooks run on the control plane, and the
143
+ machines the server creates are given the image it was built from. Pin an
144
+ exact version and rebuild on every release, copying that release's
145
+ `index.ts` again when it changed. Examples:
146
+ [guards](../../skills/setup-work-server/references/secrets-and-gateway.md#guards-are-host-code),
147
+ [pinned model routing](../../skills/setup-work-server/references/harnesses.md#pin-what-requests-carry-your-own-server-image).
@@ -0,0 +1,134 @@
1
+ import { type Identity, type Membership, type ProjectRoleEntry, type RoleDefinition } from "@catamorphic/core";
2
+ import type { DB } from "@catamorphic/db";
3
+ import type { Kysely } from "kysely";
4
+ export type AdmissionMode = "invitation_only" | "approved_domain" | "request" | "open";
5
+ /** Members of a directory group hold these committed roles (ADR 0161). */
6
+ export interface DirectoryRoleMapping {
7
+ group: string;
8
+ roles: readonly string[];
9
+ }
10
+ export interface AdmissionUser {
11
+ id: string;
12
+ email: string;
13
+ emailVerified: boolean;
14
+ }
15
+ interface AdmissionServices {
16
+ db: Kysely<DB>;
17
+ membershipWriterIdentity: Identity;
18
+ roles: {
19
+ list(identity: Identity, projectId: string): Promise<ProjectRoleEntry[]>;
20
+ };
21
+ memberships: {
22
+ list(input: {
23
+ identity: Identity;
24
+ projectId: string;
25
+ }): Promise<Membership[]>;
26
+ get(input: {
27
+ identity: Identity;
28
+ projectId: string;
29
+ externalUserId: string;
30
+ }): Promise<Membership | null>;
31
+ grant(input: {
32
+ identity: Identity;
33
+ projectId: string;
34
+ externalUserId: string;
35
+ roles: readonly string[];
36
+ grants?: Readonly<Record<string, readonly string[]>>;
37
+ }): Promise<Membership>;
38
+ revoke(input: {
39
+ identity: Identity;
40
+ projectId: string;
41
+ externalUserId: string;
42
+ }): Promise<boolean>;
43
+ };
44
+ }
45
+ export declare class WorkAdmissionService {
46
+ private readonly services;
47
+ constructor(services: AdmissionServices);
48
+ listJoinableProjects(user: AdmissionUser): Promise<Array<{
49
+ id: string;
50
+ name: string;
51
+ }>>;
52
+ listMembers(input: {
53
+ identity: Identity;
54
+ projectId: string;
55
+ }): Promise<Membership[]>;
56
+ setPolicy(input: {
57
+ identity: Identity;
58
+ projectId: string;
59
+ mode: AdmissionMode;
60
+ defaultRole: string;
61
+ approvedDomains: readonly string[];
62
+ directoryRoles?: readonly DirectoryRoleMapping[];
63
+ /**
64
+ * Roles proposed to an attached repository and not merged yet (ADR 0170).
65
+ * The policy may name them now; nobody is admitted with them until the
66
+ * default branch commits them, because admission reads committed roles.
67
+ */
68
+ pendingRoles?: Readonly<Record<string, RoleDefinition>>;
69
+ }): Promise<void>;
70
+ createInvitation(input: {
71
+ identity: Identity;
72
+ projectId: string;
73
+ email?: string;
74
+ roles?: readonly string[];
75
+ grants?: Readonly<Record<string, readonly string[]>>;
76
+ expiresAt?: Date;
77
+ }): Promise<{
78
+ id: string;
79
+ projectId: string;
80
+ projectName: string;
81
+ expiresAt: string;
82
+ }>;
83
+ redeemInvitation(input: {
84
+ projectId: string;
85
+ invitationId: string;
86
+ user: AdmissionUser;
87
+ }): Promise<Membership>;
88
+ join(input: {
89
+ projectId: string;
90
+ user: AdmissionUser;
91
+ }): Promise<Membership>;
92
+ requestAccess(input: {
93
+ projectId: string;
94
+ user: AdmissionUser;
95
+ }): Promise<{
96
+ id: string;
97
+ status: string;
98
+ }>;
99
+ listAccessRequests(input: {
100
+ identity: Identity;
101
+ projectId: string;
102
+ }): Promise<Array<{
103
+ id: string;
104
+ externalUserId: string;
105
+ email: string;
106
+ emailVerified: boolean;
107
+ status: string;
108
+ requestedAt: string;
109
+ }>>;
110
+ decideRequest(input: {
111
+ identity: Identity;
112
+ requestId: string;
113
+ decision: "approved" | "denied";
114
+ }): Promise<{
115
+ id: string;
116
+ status: string;
117
+ }>;
118
+ /** Every directory group some project maps to roles. */
119
+ mappedDirectoryGroups(): Promise<string[]>;
120
+ /**
121
+ * Make one user's directory-derived roles match their current groups. Only
122
+ * roles this mapping granted are removed; invited or managed roles stay.
123
+ */
124
+ reconcileDirectoryRoles(input: {
125
+ userId: string;
126
+ groups: readonly string[];
127
+ }): Promise<void>;
128
+ private requirePolicy;
129
+ private validateRoles;
130
+ private grant;
131
+ private existingMembership;
132
+ }
133
+ export {};
134
+ //# sourceMappingURL=admission-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admission-service.d.ts","sourceRoot":"","sources":["../../src/admission/admission-service.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,17 @@
1
+ import type { Identity } from "@catamorphic/core";
2
+ import type { FastifyInstance } from "fastify";
3
+ import type { WorkAuth } from "../auth/work-auth-types.js";
4
+ import type { WorkAdmissionService } from "./admission-service.js";
5
+ interface AdmissionRoutesOptions {
6
+ publicBases: readonly string[];
7
+ auth: Pick<WorkAuth, "findUserById" | "resolveAccessToken">;
8
+ identityForUser(input: {
9
+ externalUserId: string;
10
+ }): Promise<Identity>;
11
+ /** Disabled accounts and guests never act on admission (ADRs 0161, 0165). */
12
+ mayAct(userId: string): Promise<boolean>;
13
+ admission: Pick<WorkAdmissionService, "setPolicy" | "listJoinableProjects" | "listAccessRequests" | "listMembers" | "createInvitation" | "redeemInvitation" | "join" | "requestAccess" | "decideRequest">;
14
+ }
15
+ export declare function registerWorkAdmissionRoutes(app: FastifyInstance, options: AdmissionRoutesOptions): void;
16
+ export {};
17
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/admission/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAE7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AA4BhC,UAAU,sBAAsB;IAC9B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,oBAAoB,CAAC,CAAC;IAC5D,eAAe,CAAC,KAAK,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtE,6EAA6E;IAC7E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,SAAS,EAAE,IAAI,CACb,oBAAoB,EAClB,WAAW,GACX,sBAAsB,GACtB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,MAAM,GACN,eAAe,GACf,eAAe,CAClB,CAAC;CACH;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CAwKN"}
@@ -0,0 +1,9 @@
1
+ import { type AgentCapabilityOptions, type CatamorphicCore } from "@catamorphic/core";
2
+ import type { WorkAuth } from "./auth/work-auth-types.js";
3
+ /** Work server profile and directory; no framework-owned identity model. */
4
+ export declare function workAgentCapabilities(args: {
5
+ core(): CatamorphicCore;
6
+ auth(): WorkAuth;
7
+ custom?: AgentCapabilityOptions;
8
+ }): AgentCapabilityOptions;
9
+ //# sourceMappingURL=agent-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-capabilities.d.ts","sourceRoot":"","sources":["../src/agent-capabilities.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAKrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AA4B1D,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,IAAI,IAAI,eAAe,CAAC;IACxB,IAAI,IAAI,QAAQ,CAAC;IACjB,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC,GAAG,sBAAsB,CAmFzB"}
@@ -0,0 +1,32 @@
1
+ import { type CodingAgentRegistry } from "@catamorphic/core";
2
+ import type { SignInHarness } from "@catamorphic/sandbox";
3
+ import type { WorkAgentSettings } from "./config.js";
4
+ /**
5
+ * The Work server's agent roster: one "assistant" agent backed by the
6
+ * configured model provider (ADR 0160). Anthropic defaults to
7
+ * claude-opus-5; OpenRouter and OpenAI need an explicit model id. Without a
8
+ * provider the server still runs (documents, projects, invites) with chat
9
+ * off; `/me` reports agentSessions accordingly.
10
+ */
11
+ export interface AgentSetup {
12
+ registry?: CodingAgentRegistry;
13
+ description: string;
14
+ }
15
+ export declare function buildAgentRegistry(deps: {
16
+ settings: WorkAgentSettings;
17
+ }): AgentSetup;
18
+ export declare const ASSISTANT_SLUG = "assistant";
19
+ /**
20
+ * Codex on the chat owner's own sign-in, made on the machine that runs the
21
+ * chat (ADR 0199). Offered in projects with an Environment that allows
22
+ * personal credentials; a chat places only on a machine of the owner's
23
+ * that reports their sign-in (ADR 0213). Claude Code subscriptions run
24
+ * only on the member's own computer, so the server offers none.
25
+ */
26
+ export declare const SIGN_IN_AGENTS: Readonly<Record<SignInHarness, {
27
+ name: string;
28
+ description: string;
29
+ }>>;
30
+ /** The registry id a scoped member's role ref resolves to (ADR 0055). */
31
+ export declare function projectAssistantId(projectId: string): string;
32
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,GAAG,UAAU,CAmEb;AAED,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CACnC,MAAM,CAAC,aAAa,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAM7D,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5D"}