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.
- package/LICENSE +93 -0
- package/README.md +248 -0
- package/bin/oma.mjs +499 -0
- package/dist/scripts/alpha-openai-compatible-fixture.mjs +134 -0
- package/dist/scripts/alpha-smoke-models.mjs +92 -0
- package/dist/scripts/alpha-smoke.mjs +581 -0
- package/dist/scripts/oma-doctor.js +230 -0
- package/dist/scripts/oma-models.js +299 -0
- package/dist/scripts/oma-workspaces.js +133 -0
- package/dist/src/control-plane/admin/auth.js +43 -0
- package/dist/src/control-plane/admin/routes.js +76 -0
- package/dist/src/control-plane/admin/service.js +102 -0
- package/dist/src/control-plane/admission.js +90 -0
- package/dist/src/control-plane/agents/routes.js +63 -0
- package/dist/src/control-plane/agents/service.js +687 -0
- package/dist/src/control-plane/agents/store.js +391 -0
- package/dist/src/control-plane/agents/types.js +1 -0
- package/dist/src/control-plane/api-constants.js +3 -0
- package/dist/src/control-plane/app.js +907 -0
- package/dist/src/control-plane/console/auth.js +68 -0
- package/dist/src/control-plane/console/static.js +112 -0
- package/dist/src/control-plane/deployment-runtime-config.js +328 -0
- package/dist/src/control-plane/deployment-runtime-event-coordinator.js +25 -0
- package/dist/src/control-plane/deployment-runtime-turn-guard.js +14 -0
- package/dist/src/control-plane/deployment-session-coordinator.js +25 -0
- package/dist/src/control-plane/deployment-session-output-coordinator.js +27 -0
- package/dist/src/control-plane/deployment-storage.js +354 -0
- package/dist/src/control-plane/egress/image.js +48 -0
- package/dist/src/control-plane/egress/policy.js +571 -0
- package/dist/src/control-plane/egress/presets.js +77 -0
- package/dist/src/control-plane/egress/proxy.js +72 -0
- package/dist/src/control-plane/egress/ssrf.js +106 -0
- package/dist/src/control-plane/egress/utils/debug.js +14 -0
- package/dist/src/control-plane/egress/vendor/http-proxy.js +335 -0
- package/dist/src/control-plane/egress/vendor/mitm-ca.js +226 -0
- package/dist/src/control-plane/egress/vendor/mitm-leaf.js +124 -0
- package/dist/src/control-plane/egress/vendor/parent-proxy.js +438 -0
- package/dist/src/control-plane/egress/vendor/request-filter.js +105 -0
- package/dist/src/control-plane/egress/vendor/sandbox-config.js +1 -0
- package/dist/src/control-plane/egress/vendor/tls-terminate-proxy.js +269 -0
- package/dist/src/control-plane/environments/routes.js +54 -0
- package/dist/src/control-plane/environments/service.js +112 -0
- package/dist/src/control-plane/environments/store.js +132 -0
- package/dist/src/control-plane/environments/types.js +1 -0
- package/dist/src/control-plane/errors.js +81 -0
- package/dist/src/control-plane/events/broadcaster.js +217 -0
- package/dist/src/control-plane/events/constants.js +2 -0
- package/dist/src/control-plane/events/persist.js +39 -0
- package/dist/src/control-plane/events/request.js +190 -0
- package/dist/src/control-plane/events/routes.js +159 -0
- package/dist/src/control-plane/events/runtime-helpers.js +134 -0
- package/dist/src/control-plane/events/service.js +1985 -0
- package/dist/src/control-plane/events/session-guards.js +29 -0
- package/dist/src/control-plane/events/sse.js +6 -0
- package/dist/src/control-plane/events/store.js +772 -0
- package/dist/src/control-plane/events/tool-persistence.js +102 -0
- package/dist/src/control-plane/events/types.js +21 -0
- package/dist/src/control-plane/files/routes.js +121 -0
- package/dist/src/control-plane/files/service.js +65 -0
- package/dist/src/control-plane/files/store-common.js +87 -0
- package/dist/src/control-plane/files/store-local.js +488 -0
- package/dist/src/control-plane/files/store-memory.js +270 -0
- package/dist/src/control-plane/files/store.js +2 -0
- package/dist/src/control-plane/files/types.js +7 -0
- package/dist/src/control-plane/http.js +25 -0
- package/dist/src/control-plane/ids.js +43 -0
- package/dist/src/control-plane/logging.js +263 -0
- package/dist/src/control-plane/models/auth-storage-backend.js +238 -0
- package/dist/src/control-plane/models/catalog.js +78 -0
- package/dist/src/control-plane/models/config-security.js +376 -0
- package/dist/src/control-plane/models/deployment-config.js +93 -0
- package/dist/src/control-plane/models/routes.js +32 -0
- package/dist/src/control-plane/models/service.js +138 -0
- package/dist/src/control-plane/observability/instruments.js +65 -0
- package/dist/src/control-plane/observability/metrics.js +125 -0
- package/dist/src/control-plane/observability/routes.js +95 -0
- package/dist/src/control-plane/openapi/document.js +282 -0
- package/dist/src/control-plane/openapi/routes.js +78 -0
- package/dist/src/control-plane/request-idempotency.js +85 -0
- package/dist/src/control-plane/secrets/envelope.js +132 -0
- package/dist/src/control-plane/secrets/master-key.js +44 -0
- package/dist/src/control-plane/secrets/routes.js +20 -0
- package/dist/src/control-plane/secrets/service.js +71 -0
- package/dist/src/control-plane/secrets/store.js +212 -0
- package/dist/src/control-plane/secrets/types.js +3 -0
- package/dist/src/control-plane/sessions/pi/custom-tools.js +146 -0
- package/dist/src/control-plane/sessions/pi/mcp/bridge.js +527 -0
- package/dist/src/control-plane/sessions/pi/mcp/client.js +157 -0
- package/dist/src/control-plane/sessions/pi/mcp/credential.js +28 -0
- package/dist/src/control-plane/sessions/pi/mcp/fetch.js +69 -0
- package/dist/src/control-plane/sessions/pi/mcp/probe.js +202 -0
- package/dist/src/control-plane/sessions/pi/mcp/runtime.js +13 -0
- package/dist/src/control-plane/sessions/pi/runner.js +1104 -0
- package/dist/src/control-plane/sessions/pi/sandbox/cma-glob.js +388 -0
- package/dist/src/control-plane/sessions/pi/sandbox/cma-grep.js +124 -0
- package/dist/src/control-plane/sessions/pi/sandbox/docker-egress.js +347 -0
- package/dist/src/control-plane/sessions/pi/sandbox/docker.js +1589 -0
- package/dist/src/control-plane/sessions/pi/sandbox/glob.js +48 -0
- package/dist/src/control-plane/sessions/pi/sandbox/image.js +7 -0
- package/dist/src/control-plane/sessions/pi/sandbox/microsandbox.js +1677 -0
- package/dist/src/control-plane/sessions/pi/sandbox/provider.js +561 -0
- package/dist/src/control-plane/sessions/pi/sandbox/selection.js +168 -0
- package/dist/src/control-plane/sessions/pi/span-normalizer.js +82 -0
- package/dist/src/control-plane/sessions/pi/tool-permissions.js +392 -0
- package/dist/src/control-plane/sessions/pi/translator.js +100 -0
- package/dist/src/control-plane/sessions/request.js +164 -0
- package/dist/src/control-plane/sessions/resources.js +63 -0
- package/dist/src/control-plane/sessions/routes.js +88 -0
- package/dist/src/control-plane/sessions/serialize.js +24 -0
- package/dist/src/control-plane/sessions/service.js +733 -0
- package/dist/src/control-plane/sessions/store.js +538 -0
- package/dist/src/control-plane/sessions/types.js +1 -0
- package/dist/src/control-plane/skills/archive.js +169 -0
- package/dist/src/control-plane/skills/routes.js +41 -0
- package/dist/src/control-plane/skills/service.js +29 -0
- package/dist/src/control-plane/skills/store.js +233 -0
- package/dist/src/control-plane/skills/types.js +5 -0
- package/dist/src/control-plane/sqlite-transaction.js +15 -0
- package/dist/src/control-plane/vaults/mcp-oauth-validate.js +165 -0
- package/dist/src/control-plane/vaults/oauth-refresh-ticker.js +43 -0
- package/dist/src/control-plane/vaults/oauth-refresh.js +448 -0
- package/dist/src/control-plane/vaults/routes.js +66 -0
- package/dist/src/control-plane/vaults/service.js +553 -0
- package/dist/src/control-plane/vaults/store.js +691 -0
- package/dist/src/control-plane/vaults/types.js +1 -0
- package/dist/src/control-plane/wake-loop.js +65 -0
- package/dist/src/control-plane/wiring.js +92 -0
- package/dist/src/control-plane/workspace.js +4 -0
- package/dist/src/control-plane/workspaces/store.js +158 -0
- package/dist/src/egress-proxy-main.js +103 -0
- package/dist/src/main.js +124 -0
- package/dist/src/types/agents.js +1 -0
- package/dist/src/types/common.js +1 -0
- package/dist/src/types/environments.js +1 -0
- package/dist/src/types/events.js +121 -0
- package/dist/src/types/files.js +1 -0
- package/dist/src/types/json.js +19 -0
- package/dist/src/types/sessions.js +1 -0
- package/dist/ui/managed-agents-console/README.md +52 -0
- package/dist/ui/managed-agents-console/docs/agents.md +23 -0
- package/dist/ui/managed-agents-console/docs/console.md +23 -0
- package/dist/ui/managed-agents-console/docs/dreams.md +5 -0
- package/dist/ui/managed-agents-console/docs/environments.md +27 -0
- package/dist/ui/managed-agents-console/docs/events.md +19 -0
- package/dist/ui/managed-agents-console/docs/files.md +17 -0
- package/dist/ui/managed-agents-console/docs/github.md +11 -0
- package/dist/ui/managed-agents-console/docs/integrations.md +19 -0
- package/dist/ui/managed-agents-console/docs/memory.md +11 -0
- package/dist/ui/managed-agents-console/docs/migration.md +17 -0
- package/dist/ui/managed-agents-console/docs/multiagent.md +11 -0
- package/dist/ui/managed-agents-console/docs/outcomes.md +11 -0
- package/dist/ui/managed-agents-console/docs/overview.md +41 -0
- package/dist/ui/managed-agents-console/docs/permissions.md +24 -0
- package/dist/ui/managed-agents-console/docs/quickstart.md +51 -0
- package/dist/ui/managed-agents-console/docs/reference.md +27 -0
- package/dist/ui/managed-agents-console/docs/sandbox-reference.md +19 -0
- package/dist/ui/managed-agents-console/docs/sandbox-security.md +15 -0
- package/dist/ui/managed-agents-console/docs/scheduled-deployments.md +5 -0
- package/dist/ui/managed-agents-console/docs/self-hosted-sandboxes.md +15 -0
- package/dist/ui/managed-agents-console/docs/session-operations.md +21 -0
- package/dist/ui/managed-agents-console/docs/sessions.md +21 -0
- package/dist/ui/managed-agents-console/docs/skills.md +15 -0
- package/dist/ui/managed-agents-console/docs/tools.md +23 -0
- package/dist/ui/managed-agents-console/docs/vaults.md +19 -0
- package/dist/ui/managed-agents-console/docs/webhooks.md +11 -0
- package/dist/ui/managed-agents-console/index.html +47 -0
- package/dist/ui/managed-agents-console/serve.mjs +116 -0
- package/dist/ui/managed-agents-console/src/agents-files.jsx +273 -0
- package/dist/ui/managed-agents-console/src/api.js +1043 -0
- package/dist/ui/managed-agents-console/src/app.jsx +633 -0
- package/dist/ui/managed-agents-console/src/auth.jsx +215 -0
- package/dist/ui/managed-agents-console/src/console.css +733 -0
- package/dist/ui/managed-agents-console/src/data.js +188 -0
- package/dist/ui/managed-agents-console/src/detail.jsx +719 -0
- package/dist/ui/managed-agents-console/src/docs.jsx +200 -0
- package/dist/ui/managed-agents-console/src/environments.jsx +365 -0
- package/dist/ui/managed-agents-console/src/forms.jsx +494 -0
- package/dist/ui/managed-agents-console/src/icons.jsx +48 -0
- package/dist/ui/managed-agents-console/src/skills.jsx +21 -0
- package/dist/ui/managed-agents-console/src/sse.js +185 -0
- package/dist/ui/managed-agents-console/src/states.jsx +90 -0
- package/dist/ui/managed-agents-console/src/tweaks-panel.jsx +541 -0
- package/dist/ui/managed-agents-console/src/ui.jsx +190 -0
- package/dist/ui/managed-agents-console/src/vaults-data.js +89 -0
- package/dist/ui/managed-agents-console/src/vaults.jsx +171 -0
- package/dist/ui/managed-agents-console/vendor/babel.min.js +4 -0
- package/dist/ui/managed-agents-console/vendor/react-dom.production.min.js +267 -0
- package/dist/ui/managed-agents-console/vendor/react.production.min.js +31 -0
- package/dist/ui/openapi-docs/VENDOR.md +27 -0
- package/dist/ui/openapi-docs/index.html +16 -0
- package/dist/ui/openapi-docs/swagger-initializer.js +14 -0
- package/dist/ui/openapi-docs/vendor/LICENSE +202 -0
- package/dist/ui/openapi-docs/vendor/NOTICE +2 -0
- package/dist/ui/openapi-docs/vendor/swagger-ui-bundle.js +2 -0
- package/dist/ui/openapi-docs/vendor/swagger-ui-standalone-preset.js +2 -0
- package/dist/ui/openapi-docs/vendor/swagger-ui.css +3 -0
- 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.
|