open-managed-agents 0.1.0

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 (197) hide show
  1. package/LICENSE +93 -0
  2. package/README.md +248 -0
  3. package/bin/oma.mjs +499 -0
  4. package/dist/scripts/alpha-openai-compatible-fixture.mjs +134 -0
  5. package/dist/scripts/alpha-smoke-models.mjs +92 -0
  6. package/dist/scripts/alpha-smoke.mjs +581 -0
  7. package/dist/scripts/oma-doctor.js +230 -0
  8. package/dist/scripts/oma-models.js +299 -0
  9. package/dist/scripts/oma-workspaces.js +133 -0
  10. package/dist/src/control-plane/admin/auth.js +43 -0
  11. package/dist/src/control-plane/admin/routes.js +76 -0
  12. package/dist/src/control-plane/admin/service.js +102 -0
  13. package/dist/src/control-plane/admission.js +90 -0
  14. package/dist/src/control-plane/agents/routes.js +63 -0
  15. package/dist/src/control-plane/agents/service.js +687 -0
  16. package/dist/src/control-plane/agents/store.js +391 -0
  17. package/dist/src/control-plane/agents/types.js +1 -0
  18. package/dist/src/control-plane/api-constants.js +3 -0
  19. package/dist/src/control-plane/app.js +907 -0
  20. package/dist/src/control-plane/console/auth.js +68 -0
  21. package/dist/src/control-plane/console/static.js +112 -0
  22. package/dist/src/control-plane/deployment-runtime-config.js +328 -0
  23. package/dist/src/control-plane/deployment-runtime-event-coordinator.js +25 -0
  24. package/dist/src/control-plane/deployment-runtime-turn-guard.js +14 -0
  25. package/dist/src/control-plane/deployment-session-coordinator.js +25 -0
  26. package/dist/src/control-plane/deployment-session-output-coordinator.js +27 -0
  27. package/dist/src/control-plane/deployment-storage.js +354 -0
  28. package/dist/src/control-plane/egress/image.js +48 -0
  29. package/dist/src/control-plane/egress/policy.js +571 -0
  30. package/dist/src/control-plane/egress/presets.js +77 -0
  31. package/dist/src/control-plane/egress/proxy.js +72 -0
  32. package/dist/src/control-plane/egress/ssrf.js +106 -0
  33. package/dist/src/control-plane/egress/utils/debug.js +14 -0
  34. package/dist/src/control-plane/egress/vendor/http-proxy.js +335 -0
  35. package/dist/src/control-plane/egress/vendor/mitm-ca.js +226 -0
  36. package/dist/src/control-plane/egress/vendor/mitm-leaf.js +124 -0
  37. package/dist/src/control-plane/egress/vendor/parent-proxy.js +438 -0
  38. package/dist/src/control-plane/egress/vendor/request-filter.js +105 -0
  39. package/dist/src/control-plane/egress/vendor/sandbox-config.js +1 -0
  40. package/dist/src/control-plane/egress/vendor/tls-terminate-proxy.js +269 -0
  41. package/dist/src/control-plane/environments/routes.js +54 -0
  42. package/dist/src/control-plane/environments/service.js +112 -0
  43. package/dist/src/control-plane/environments/store.js +132 -0
  44. package/dist/src/control-plane/environments/types.js +1 -0
  45. package/dist/src/control-plane/errors.js +81 -0
  46. package/dist/src/control-plane/events/broadcaster.js +217 -0
  47. package/dist/src/control-plane/events/constants.js +2 -0
  48. package/dist/src/control-plane/events/persist.js +39 -0
  49. package/dist/src/control-plane/events/request.js +190 -0
  50. package/dist/src/control-plane/events/routes.js +159 -0
  51. package/dist/src/control-plane/events/runtime-helpers.js +134 -0
  52. package/dist/src/control-plane/events/service.js +1985 -0
  53. package/dist/src/control-plane/events/session-guards.js +29 -0
  54. package/dist/src/control-plane/events/sse.js +6 -0
  55. package/dist/src/control-plane/events/store.js +772 -0
  56. package/dist/src/control-plane/events/tool-persistence.js +102 -0
  57. package/dist/src/control-plane/events/types.js +21 -0
  58. package/dist/src/control-plane/files/routes.js +121 -0
  59. package/dist/src/control-plane/files/service.js +65 -0
  60. package/dist/src/control-plane/files/store-common.js +87 -0
  61. package/dist/src/control-plane/files/store-local.js +488 -0
  62. package/dist/src/control-plane/files/store-memory.js +270 -0
  63. package/dist/src/control-plane/files/store.js +2 -0
  64. package/dist/src/control-plane/files/types.js +7 -0
  65. package/dist/src/control-plane/http.js +25 -0
  66. package/dist/src/control-plane/ids.js +43 -0
  67. package/dist/src/control-plane/logging.js +263 -0
  68. package/dist/src/control-plane/models/auth-storage-backend.js +238 -0
  69. package/dist/src/control-plane/models/catalog.js +78 -0
  70. package/dist/src/control-plane/models/config-security.js +376 -0
  71. package/dist/src/control-plane/models/deployment-config.js +93 -0
  72. package/dist/src/control-plane/models/routes.js +32 -0
  73. package/dist/src/control-plane/models/service.js +138 -0
  74. package/dist/src/control-plane/observability/instruments.js +65 -0
  75. package/dist/src/control-plane/observability/metrics.js +125 -0
  76. package/dist/src/control-plane/observability/routes.js +95 -0
  77. package/dist/src/control-plane/openapi/document.js +282 -0
  78. package/dist/src/control-plane/openapi/routes.js +78 -0
  79. package/dist/src/control-plane/request-idempotency.js +85 -0
  80. package/dist/src/control-plane/secrets/envelope.js +132 -0
  81. package/dist/src/control-plane/secrets/master-key.js +44 -0
  82. package/dist/src/control-plane/secrets/routes.js +20 -0
  83. package/dist/src/control-plane/secrets/service.js +71 -0
  84. package/dist/src/control-plane/secrets/store.js +212 -0
  85. package/dist/src/control-plane/secrets/types.js +3 -0
  86. package/dist/src/control-plane/sessions/pi/custom-tools.js +146 -0
  87. package/dist/src/control-plane/sessions/pi/mcp/bridge.js +527 -0
  88. package/dist/src/control-plane/sessions/pi/mcp/client.js +157 -0
  89. package/dist/src/control-plane/sessions/pi/mcp/credential.js +28 -0
  90. package/dist/src/control-plane/sessions/pi/mcp/fetch.js +69 -0
  91. package/dist/src/control-plane/sessions/pi/mcp/probe.js +202 -0
  92. package/dist/src/control-plane/sessions/pi/mcp/runtime.js +13 -0
  93. package/dist/src/control-plane/sessions/pi/runner.js +1104 -0
  94. package/dist/src/control-plane/sessions/pi/sandbox/cma-glob.js +388 -0
  95. package/dist/src/control-plane/sessions/pi/sandbox/cma-grep.js +124 -0
  96. package/dist/src/control-plane/sessions/pi/sandbox/docker-egress.js +347 -0
  97. package/dist/src/control-plane/sessions/pi/sandbox/docker.js +1589 -0
  98. package/dist/src/control-plane/sessions/pi/sandbox/glob.js +48 -0
  99. package/dist/src/control-plane/sessions/pi/sandbox/image.js +7 -0
  100. package/dist/src/control-plane/sessions/pi/sandbox/microsandbox.js +1677 -0
  101. package/dist/src/control-plane/sessions/pi/sandbox/provider.js +561 -0
  102. package/dist/src/control-plane/sessions/pi/sandbox/selection.js +168 -0
  103. package/dist/src/control-plane/sessions/pi/span-normalizer.js +82 -0
  104. package/dist/src/control-plane/sessions/pi/tool-permissions.js +392 -0
  105. package/dist/src/control-plane/sessions/pi/translator.js +100 -0
  106. package/dist/src/control-plane/sessions/request.js +164 -0
  107. package/dist/src/control-plane/sessions/resources.js +63 -0
  108. package/dist/src/control-plane/sessions/routes.js +88 -0
  109. package/dist/src/control-plane/sessions/serialize.js +24 -0
  110. package/dist/src/control-plane/sessions/service.js +733 -0
  111. package/dist/src/control-plane/sessions/store.js +538 -0
  112. package/dist/src/control-plane/sessions/types.js +1 -0
  113. package/dist/src/control-plane/skills/archive.js +169 -0
  114. package/dist/src/control-plane/skills/routes.js +41 -0
  115. package/dist/src/control-plane/skills/service.js +29 -0
  116. package/dist/src/control-plane/skills/store.js +233 -0
  117. package/dist/src/control-plane/skills/types.js +5 -0
  118. package/dist/src/control-plane/sqlite-transaction.js +15 -0
  119. package/dist/src/control-plane/vaults/mcp-oauth-validate.js +165 -0
  120. package/dist/src/control-plane/vaults/oauth-refresh-ticker.js +43 -0
  121. package/dist/src/control-plane/vaults/oauth-refresh.js +448 -0
  122. package/dist/src/control-plane/vaults/routes.js +66 -0
  123. package/dist/src/control-plane/vaults/service.js +553 -0
  124. package/dist/src/control-plane/vaults/store.js +691 -0
  125. package/dist/src/control-plane/vaults/types.js +1 -0
  126. package/dist/src/control-plane/wake-loop.js +65 -0
  127. package/dist/src/control-plane/wiring.js +92 -0
  128. package/dist/src/control-plane/workspace.js +4 -0
  129. package/dist/src/control-plane/workspaces/store.js +158 -0
  130. package/dist/src/egress-proxy-main.js +103 -0
  131. package/dist/src/main.js +124 -0
  132. package/dist/src/types/agents.js +1 -0
  133. package/dist/src/types/common.js +1 -0
  134. package/dist/src/types/environments.js +1 -0
  135. package/dist/src/types/events.js +121 -0
  136. package/dist/src/types/files.js +1 -0
  137. package/dist/src/types/json.js +19 -0
  138. package/dist/src/types/sessions.js +1 -0
  139. package/dist/ui/managed-agents-console/README.md +52 -0
  140. package/dist/ui/managed-agents-console/docs/agents.md +23 -0
  141. package/dist/ui/managed-agents-console/docs/console.md +23 -0
  142. package/dist/ui/managed-agents-console/docs/dreams.md +5 -0
  143. package/dist/ui/managed-agents-console/docs/environments.md +27 -0
  144. package/dist/ui/managed-agents-console/docs/events.md +19 -0
  145. package/dist/ui/managed-agents-console/docs/files.md +17 -0
  146. package/dist/ui/managed-agents-console/docs/github.md +11 -0
  147. package/dist/ui/managed-agents-console/docs/integrations.md +19 -0
  148. package/dist/ui/managed-agents-console/docs/memory.md +11 -0
  149. package/dist/ui/managed-agents-console/docs/migration.md +17 -0
  150. package/dist/ui/managed-agents-console/docs/multiagent.md +11 -0
  151. package/dist/ui/managed-agents-console/docs/outcomes.md +11 -0
  152. package/dist/ui/managed-agents-console/docs/overview.md +41 -0
  153. package/dist/ui/managed-agents-console/docs/permissions.md +24 -0
  154. package/dist/ui/managed-agents-console/docs/quickstart.md +51 -0
  155. package/dist/ui/managed-agents-console/docs/reference.md +27 -0
  156. package/dist/ui/managed-agents-console/docs/sandbox-reference.md +19 -0
  157. package/dist/ui/managed-agents-console/docs/sandbox-security.md +15 -0
  158. package/dist/ui/managed-agents-console/docs/scheduled-deployments.md +5 -0
  159. package/dist/ui/managed-agents-console/docs/self-hosted-sandboxes.md +15 -0
  160. package/dist/ui/managed-agents-console/docs/session-operations.md +21 -0
  161. package/dist/ui/managed-agents-console/docs/sessions.md +21 -0
  162. package/dist/ui/managed-agents-console/docs/skills.md +15 -0
  163. package/dist/ui/managed-agents-console/docs/tools.md +23 -0
  164. package/dist/ui/managed-agents-console/docs/vaults.md +19 -0
  165. package/dist/ui/managed-agents-console/docs/webhooks.md +11 -0
  166. package/dist/ui/managed-agents-console/index.html +47 -0
  167. package/dist/ui/managed-agents-console/serve.mjs +116 -0
  168. package/dist/ui/managed-agents-console/src/agents-files.jsx +273 -0
  169. package/dist/ui/managed-agents-console/src/api.js +1043 -0
  170. package/dist/ui/managed-agents-console/src/app.jsx +633 -0
  171. package/dist/ui/managed-agents-console/src/auth.jsx +215 -0
  172. package/dist/ui/managed-agents-console/src/console.css +733 -0
  173. package/dist/ui/managed-agents-console/src/data.js +188 -0
  174. package/dist/ui/managed-agents-console/src/detail.jsx +719 -0
  175. package/dist/ui/managed-agents-console/src/docs.jsx +200 -0
  176. package/dist/ui/managed-agents-console/src/environments.jsx +365 -0
  177. package/dist/ui/managed-agents-console/src/forms.jsx +494 -0
  178. package/dist/ui/managed-agents-console/src/icons.jsx +48 -0
  179. package/dist/ui/managed-agents-console/src/skills.jsx +21 -0
  180. package/dist/ui/managed-agents-console/src/sse.js +185 -0
  181. package/dist/ui/managed-agents-console/src/states.jsx +90 -0
  182. package/dist/ui/managed-agents-console/src/tweaks-panel.jsx +541 -0
  183. package/dist/ui/managed-agents-console/src/ui.jsx +190 -0
  184. package/dist/ui/managed-agents-console/src/vaults-data.js +89 -0
  185. package/dist/ui/managed-agents-console/src/vaults.jsx +171 -0
  186. package/dist/ui/managed-agents-console/vendor/babel.min.js +4 -0
  187. package/dist/ui/managed-agents-console/vendor/react-dom.production.min.js +267 -0
  188. package/dist/ui/managed-agents-console/vendor/react.production.min.js +31 -0
  189. package/dist/ui/openapi-docs/VENDOR.md +27 -0
  190. package/dist/ui/openapi-docs/index.html +16 -0
  191. package/dist/ui/openapi-docs/swagger-initializer.js +14 -0
  192. package/dist/ui/openapi-docs/vendor/LICENSE +202 -0
  193. package/dist/ui/openapi-docs/vendor/NOTICE +2 -0
  194. package/dist/ui/openapi-docs/vendor/swagger-ui-bundle.js +2 -0
  195. package/dist/ui/openapi-docs/vendor/swagger-ui-standalone-preset.js +2 -0
  196. package/dist/ui/openapi-docs/vendor/swagger-ui.css +3 -0
  197. package/package.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,93 @@
1
+ Elastic License 2.0
2
+
3
+ URL: https://www.elastic.co/licensing/elastic-license
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim.*
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. **control** means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
package/README.md ADDED
@@ -0,0 +1,248 @@
1
+ # Open Managed Agents
2
+
3
+ **Claude Managed Agents, self-hosted.**
4
+
5
+ Swap the `base_url` in your Anthropic SDK and your agents run here instead:
6
+ same API, same event stream, same sandboxed execution — but the sessions,
7
+ files, and sandboxes live on your machines, under your policies.
8
+
9
+ > **Where OMA stands today:** wire-compatible on the synchronous single-agent
10
+ > core — agents, sessions, sandboxes, tools, skills, MCP, vaults, SSE — with
11
+ > sandbox security and egress controls that go beyond CMA's documented
12
+ > self-hosted baseline. The orchestration/persistence layer (multi-agent
13
+ > runtime, memory stores,
14
+ > scheduled deployments, webhooks, outcomes) is deliberately deferred. See
15
+ > **[PARITY.md](PARITY.md)** for the full domain-by-domain scorecard and the
16
+ > active parity worklist, and **[ALPHA.md](ALPHA.md)** for the first-user
17
+ > alpha readiness plan.
18
+
19
+ ## Quickstart
20
+
21
+ Start with the canonical source-checkout guide:
22
+
23
+ **[Getting Started](docs/getting-started.md)**
24
+
25
+ The alpha path is:
26
+
27
+ ```bash
28
+ git clone https://github.com/oneryalcin/open-managed-agents.git
29
+ cd open-managed-agents
30
+ npm ci
31
+ npm link
32
+ oma doctor
33
+ oma smoke --local-compatible
34
+ oma smoke --egress
35
+ export ANTHROPIC_API_KEY="..."
36
+ oma up
37
+ ```
38
+
39
+ `oma smoke --local-compatible` is the no-paid-API proof: it starts a temporary
40
+ OMA server, loopback OpenAI-compatible model fixture, and Docker-local sandbox,
41
+ then verifies model discovery, agent/session creation, a real `bash` tool call,
42
+ events, and cleanup.
43
+
44
+ `oma smoke --egress` extends that deterministic proof through the real
45
+ Docker-local egress boundary: npm, uv/PyPI, and GitHub must work under the
46
+ reviewed preset while an unrelated HTTPS destination remains denied.
47
+
48
+ `oma up` starts the durable local appliance in the foreground, stores data
49
+ under `~/.oma`, and prints the console URL plus the first workspace API key
50
+ once. Docker deployments have the pinned approved-HTTPS sidecar capability,
51
+ but every environment remains offline unless its immutable allowlist selects a
52
+ reviewed preset or custom hosts. Use that workspace key in the bundled console
53
+ to create an agent, environment, session, and prompt. If the key was not saved,
54
+ mint another while the server is running:
55
+
56
+ ```bash
57
+ oma keys mint
58
+ ```
59
+
60
+ Interactive, air-gap-safe OpenAPI documentation is served at `/docs/`, with
61
+ the same schema available to tools at `/openapi.json`. The documentation lists
62
+ only routes OMA currently ships; workspace and admin credentials entered in the
63
+ UI stay in page memory and are not persisted.
64
+
65
+ Then point the ordinary Anthropic SDK at it — no OMA-specific client:
66
+
67
+ ```python
68
+ import anthropic
69
+
70
+ client = anthropic.Anthropic(
71
+ base_url="http://127.0.0.1:4180",
72
+ api_key="oma_...", # printed on first boot
73
+ default_headers={"anthropic-beta": "managed-agents-2026-04-01"},
74
+ )
75
+
76
+ agent = client.beta.agents.create(name="helper", model="claude-sonnet-5")
77
+ env = client.beta.environments.create(
78
+ name="dev",
79
+ config={"networking": {"type": "limited", "allowed_hosts": []}}, # default-deny
80
+ )
81
+ session = client.beta.sessions.create(agent=agent.id, environment_id=env.id)
82
+
83
+ with client.beta.sessions.events.stream(session.id) as stream:
84
+ client.beta.sessions.events.send(session.id, events=[
85
+ {"type": "user.message", "content": [{"type": "text", "text": "hello"}]},
86
+ ])
87
+ for event in stream:
88
+ print(event.type)
89
+ ```
90
+
91
+ A complete working example (file mounts, custom tools, tool confirmations,
92
+ Streamlit UI) lives in
93
+ [examples/ship-your-first-managed-agent](examples/ship-your-first-managed-agent/README.md).
94
+ Config overrides, model providers, and key provisioning:
95
+ [Development and deployment setup](docs/dev-deployment.md).
96
+
97
+ ## Why This Exists
98
+
99
+ Managed Agents give agents a durable place to work: sessions, event history,
100
+ streaming updates, custom tools, and sandboxed filesystem/shell execution. The
101
+ hosted version is convenient, but some teams need the same API shape with
102
+ their own runtime, data boundary, sandbox policy, or deployment environment.
103
+ OMA is that control plane.
104
+
105
+ ## How It Is Built
106
+
107
+ Three habits shape every slice of this codebase, and they are the reason to
108
+ trust it over a feature checklist:
109
+
110
+ - **Wire parity is measured, not assumed.** Behavior is cloned by probing the
111
+ hosted API and recording the evidence — error envelopes, middleware
112
+ ordering, event sequences — before implementation
113
+ (`scratch/`, [docs/references/](docs/references.md)). When hosted says 405
114
+ before auth, so do we.
115
+ - **Everything fails closed.** Unknown config values refuse to start; auth
116
+ without durable storage refuses to start; sandbox providers must be
117
+ explicitly enabled; builtin tools without a provider refuse to run. The
118
+ default is always the safe posture, never the convenient one.
119
+ - **Narrow surface, high rigor.** Every slice ships with adversarial review,
120
+ mutation-checked tests, and a plan document recording what was decided and
121
+ why ([docs/plans/](docs/index.md)). We would rather do fewer things whose
122
+ failure modes are known than more things whose failure modes are a surprise.
123
+
124
+ ## Current Status
125
+
126
+ A working single-node appliance: durable, authenticated, multi-tenant on one
127
+ node, with real sandboxed execution. Not yet full parity with the hosted
128
+ Managed Agents beta surface.
129
+
130
+ What works today, at outcome level:
131
+
132
+ - **One command boots it** — durable SQLite storage, fail-closed auth, and a
133
+ first-boot API key ([plan 0115](docs/plans/0115-appliance-entrypoint.md)).
134
+ - **The full agent loop runs**: agents, environments, sessions, file mounts,
135
+ streaming events with reconnect/replay, custom-tool round trips, permission
136
+ gating, interrupts — on the Pi runtime with crash-safe recovery of pending
137
+ work.
138
+ - **Multi-tenant on one node**: hashed `x-api-key` workspaces, per-workspace
139
+ admission limits, request idempotency on the retry-sensitive endpoints
140
+ ([plan 0113](docs/plans/0113-workspace-authentication-admission.md)).
141
+ - **Real isolation for builtin tools**: Docker-local and microsandbox-local
142
+ providers behind a fail-closed selection boundary.
143
+ - **Credentialed sandbox egress + secrets at rest**: default-deny network
144
+ policy per environment, an envelope-encrypted secrets store, and boundary
145
+ credential injection — sandboxed agents reach allowlisted hosts with
146
+ secrets they can never read
147
+ ([ADR 0016](docs/adrs/0016-egress-proxy-and-secret-injection.md)).
148
+ - **MCP servers with vault-backed auth**: sessions connect to MCP servers
149
+ behind `OMA_ENABLE_MCP` — SSRF-guarded, `always_ask` by default. Credentials
150
+ live in `/v1/vaults` (`static_bearer` and `mcp_oauth`); OAuth tokens refresh
151
+ themselves (lazy on use, a proactive in-process ticker, and a 401-driven
152
+ retry) and rotate warm connections without reconnecting. Access tokens,
153
+ refresh tokens, and client secrets are injected control-plane-side and
154
+ leak-swept out of tool results and events — the same "usable but never
155
+ readable" boundary the sandbox egress applies, now on the auth leg
156
+ ([plan 0122](docs/plans/0122-mcp-connector.md)).
157
+ - **An admin API and a bundled operator console**, served by the appliance at
158
+ `/console`: browse agents, sessions, events, spans, files, and vaults with a
159
+ workspace key, and validate an `mcp_oauth` credential in place; create
160
+ workspaces, mint/revoke API keys, and inspect per-credential refresh health
161
+ with the admin key ([plan 0119](docs/plans/0119-admin-api.md),
162
+ [plan 0120](docs/plans/0120-dashboard.md),
163
+ [plan 0125](docs/plans/0125-console-vaults-mcp.md)). Fully self-contained —
164
+ no CDN at first paint; browser keys live in page memory only.
165
+ - **Custom skills execution**: upload/version private skill bundles, attach
166
+ them to agents, snapshot concrete content at session creation, advertise the
167
+ skill through Pi, and read or execute its root-owned files inside the Docker
168
+ sandbox under `/workspace/skills`. Session snapshots remain reproducible
169
+ after source deletion; the live exit smoke covers model discovery, `read`,
170
+ `bash`, leak checks, tamper resistance, and cleanup
171
+ ([plan 0126](docs/plans/0126-skills-execution.md)).
172
+
173
+ - **Observability.** `GET /health` (liveness + readiness, compose
174
+ healthcheck), fail-closed Prometheus `/metrics`, and structured JSON logs
175
+ with programmatically enforced secret redaction
176
+ ([plan 0121](docs/plans/0121-observability.md)).
177
+
178
+ What's still missing — the
179
+ [appliance product roadmap](docs/plans/0114-appliance-product-roadmap.md) is
180
+ the authoritative sequencing:
181
+
182
+ - session usage metering (`usage` is `null`);
183
+ - broader event-topology parity, file-upload idempotency, remote sandbox
184
+ providers, and RBAC within a workspace.
185
+
186
+ ## Architecture
187
+
188
+ OMA keeps the **harness** separate from **compute**.
189
+
190
+ The harness is the trusted control plane: API requests, session state, event
191
+ history, model/runtime orchestration, custom-tool correlation, approvals, and
192
+ recovery state.
193
+
194
+ Compute is the sandbox execution plane: shell commands, filesystem changes,
195
+ packages, and generated artifacts.
196
+
197
+ That split lets applications keep secrets, auth, billing, audit logs, and
198
+ human review outside the untrusted coding sandbox.
199
+
200
+ ## Compatibility
201
+
202
+ The north star is Claude Managed Agents wire compatibility: same endpoint
203
+ family, Anthropic-shaped error envelopes, persisted session event stream, SSE
204
+ replay and reconnect behavior, public custom-tool use/result events. Details
205
+ and intentional deviations:
206
+ [ADR 0004](docs/adrs/0004-managed-agents-rest-sse-surface-as-north-star.md).
207
+
208
+ ## Stack
209
+
210
+ | Layer | Current choice |
211
+ | --- | --- |
212
+ | Control plane | TypeScript + Hono |
213
+ | Runtime engine | Pi Agent SDK |
214
+ | Persistence | SQLite (single-node appliance); Postgres is the scale-out target behind existing store interfaces |
215
+ | Sandbox providers | Docker-local and microsandbox-local, fail-closed selection |
216
+
217
+ The default sandbox guest is an OMA-owned, multi-architecture image pinned by
218
+ immutable digest. The alpha coding image includes Node/npm, Python/uv, Git,
219
+ curl, jq, Bash, ripgrep, archive tools, and a basic native-build toolchain. It
220
+ is about 256 MiB compressed per platform and remains non-root with a read-only
221
+ root filesystem. Installed tools do not imply network access: environments are
222
+ still default-deny and package-registry access must be explicitly allowlisted.
223
+
224
+ ## Development
225
+
226
+ ```bash
227
+ npm ci
228
+ npm run typecheck
229
+ npm test
230
+ ```
231
+
232
+ Common tasks are also available through thin Make targets (`make check`,
233
+ `make ui`, `make server`, `make parallel-docker-smoke`); see
234
+ [Development and deployment setup](docs/dev-deployment.md).
235
+
236
+ Deeper docs:
237
+
238
+ - [Docs index](docs/index.md) — every plan, ADR, and reference note
239
+ - [Appliance product roadmap](docs/plans/0114-appliance-product-roadmap.md)
240
+ - [First Docker-local run](docs/tutorials/docker-local-first-run.md)
241
+ - [Examples](docs/examples.md)
242
+ - [Architecture](docs/architecture.md) · [Scope](docs/scope.md) · [ADRs](docs/adrs/)
243
+
244
+ ## License
245
+
246
+ [Elastic License 2.0](LICENSE): free to use, copy, modify, and distribute —
247
+ personally or inside your company — with one main limitation: you may not
248
+ offer OMA itself to third parties as a hosted or managed service.