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
@@ -0,0 +1,19 @@
1
+ export function isJsonObject(value) {
2
+ return (typeof value === "object" &&
3
+ value !== null &&
4
+ !Array.isArray(value));
5
+ }
6
+ export function isJsonValue(value) {
7
+ if (value === null ||
8
+ typeof value === "string" ||
9
+ typeof value === "boolean") {
10
+ return true;
11
+ }
12
+ if (typeof value === "number")
13
+ return Number.isFinite(value);
14
+ if (Array.isArray(value))
15
+ return value.every(isJsonValue);
16
+ if (!isJsonObject(value))
17
+ return false;
18
+ return Object.values(value).every(isJsonValue);
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,52 @@
1
+ # Managed Agents Console
2
+
3
+ The appliance's bundled operator UI. **The primary way to run it is not this
4
+ directory** — the OMA server serves it at `/console`:
5
+
6
+ ```text
7
+ http://127.0.0.1:4180/console
8
+ ```
9
+
10
+ No build step: React + ReactDOM + Babel-standalone are vendored under
11
+ `vendor/` (production UMD builds from the npm registry) and the JSX compiles
12
+ in the browser. Nothing loads from a CDN, so the console works on air-gapped
13
+ hosts.
14
+
15
+ ## Logging in
16
+
17
+ The console asks for a key on load (unless the server runs with
18
+ `OMA_AUTH_MODE=disabled`, in which case it browses `wrk_default` directly):
19
+
20
+ - **Workspace key** (`oma_…`, e.g. the one printed on first boot) — read-only
21
+ browsing of that workspace's agents, sessions, events, spans, and files,
22
+ including authenticated file downloads.
23
+ - **Admin key** (`OMA_ADMIN_KEY`) — everything above plus the Admin panel:
24
+ create workspaces, mint/list/revoke API keys. Minted plaintext is shown
25
+ once, with copy and a "browse as this workspace" shortcut. Setup:
26
+ [dev-deployment.md](../../docs/dev-deployment.md#the-admin-api-and-console-admin-mode).
27
+
28
+ Keys live in page memory only — never `localStorage`, `sessionStorage`, or a
29
+ cookie (enforced by `src/control-plane/__tests__/console-security.test.ts`).
30
+ A reload asks again.
31
+
32
+ Admin mutations (workspace/key CRUD) are live. `/v1` mutations — create
33
+ agent/session, send message, interrupt, archive — remain deliberately
34
+ disabled in this slice.
35
+
36
+ ## Dev server (optional)
37
+
38
+ For UI work without a full appliance, a static server + `/v1` proxy:
39
+
40
+ ```bash
41
+ npm run ui:dev # http://127.0.0.1:4177/
42
+ ```
43
+
44
+ It proxies `/v1/*` to `OMA_CONSOLE_API_BASE` (default the CWC example server
45
+ on `http://127.0.0.1:40178`). Local development convenience only — do not
46
+ expose it as a shared gateway; it forwards browser request headers to the
47
+ configured API. Admin mode needs same-origin `/admin` routes, so use the
48
+ appliance-served `/console` for that.
49
+
50
+ Demo review mode with bundled fake data: append `?mode=demo` to either URL.
51
+ If the API is unreachable, the console falls back to the same demo data with
52
+ a warning banner.
@@ -0,0 +1,23 @@
1
+ # Define your agent
2
+
3
+ > [!NOTE] Status: **Shipped alpha.** Agents are versioned, workspace-scoped configuration objects.
4
+
5
+ ## Agent configuration
6
+
7
+ An agent selects an exact provider and model, system instructions, built-in tool configuration, skills, MCP servers, metadata, and a default confirmation policy. The model must be enabled by the appliance and have configured credentials before it can run a provider-backed session.
8
+
9
+ ## Create an agent
10
+
11
+ Create an agent from the console or `POST /v1/agents`. The API validates built-in tool names and policies before persistence. Use the model catalog to discover deployment-enabled, credential-ready choices rather than assuming a hosted model name will work locally.
12
+
13
+ ## Update semantics
14
+
15
+ Updating an agent creates a new immutable version with optimistic version checks. Existing sessions keep their originally selected version. Use the versions endpoint or console detail to inspect history.
16
+
17
+ ## Agent lifecycle
18
+
19
+ List active agents by default, include archived agents only when the API requests them, and archive an agent when it should no longer begin new work. Archiving is an API-backed lifecycle action, not a browser-only label.
20
+
21
+ ## What an agent does not define
22
+
23
+ An agent does not grant network access, choose arbitrary images, or make a sandbox healthy. Those properties belong to the [environment](#docs=environments) and are exercised only when a session runs.
@@ -0,0 +1,23 @@
1
+ # Prototype in Console
2
+
3
+ > [!NOTE] Status: **Shipped alpha.** The console is a local appliance UI, not a conversational agent builder.
4
+
5
+ Use the console to exercise the same workspace-scoped API that your integration will use. It is available at the URL printed by `oma up`; sign in with a workspace key.
6
+
7
+ The key is used once to establish a revocable console session. The browser never stores or can read the session token; the server stores only its hash. A workspace-key session is invalidated as soon as its source key is revoked. When admin mode is enabled, an admin can use the workspace selector to open any workspace directly; the selected workspace remains a separate `/v1` session, not implicit admin access.
8
+
9
+ ## Build an agent
10
+
11
+ Create an agent, choose a credential-ready model, set instructions, and choose its tools and confirmation policy. Agent updates create immutable versions, so an existing session continues with the version it started with.
12
+
13
+ ## Test a session
14
+
15
+ Create an immutable environment, then create a session with the selected agent and environment. Send a prompt and inspect persisted events, tool input and output, generated files, errors, and confirmation requests.
16
+
17
+ ## What the console does not do
18
+
19
+ The alpha console does not generate agents from a chat, provision hosted infrastructure, or simulate writes that the server cannot perform. If an API capability is unavailable, the console leaves the action absent or explains the limitation.
20
+
21
+ ## Move to code
22
+
23
+ Use the console to understand the workflow, then use the bundled [OpenAPI reference](/docs/) for request and response details. The API requires a workspace key and the managed-agents beta header; the console supplies these for its own requests.
@@ -0,0 +1,5 @@
1
+ # Dreams
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA does not run asynchronous dream or memory-distillation jobs.
4
+
5
+ Dreams depend on durable memory stores, which OMA also does not implement. Session history remains available for inspection, but OMA does not automatically summarize it into reusable memory or expose dream status, cancellation, output, billing, or limits.
@@ -0,0 +1,27 @@
1
+ # Environments
2
+
3
+ > [!NOTE] Status: **Shipped alpha for local sandbox configuration and bounded egress.**
4
+
5
+ Environments define where a session runs and which outbound destinations, if any, it may reach. They are immutable: changing the policy means creating a new environment and session.
6
+
7
+ ## Create an environment
8
+
9
+ Create environments from the console or API. The environment stores its configuration, while the configured local provider enforces it when a session starts. The console queries the server for supported networking presets rather than inventing local options.
10
+
11
+ ## Networking
12
+
13
+ New environments are Offline by default. Docker-local supports reviewed npm + PyPI, GitHub + package registries, and validated custom HTTPS host allowlists. Custom lists accept exact hosts and leading wildcards; a wildcard does not match the bare domain.
14
+
15
+ > [!WARNING] OMA has no unrestricted networking. Microsandbox-local remains offline-only. A network preset is not a promise that every third-party service or protocol will work.
16
+
17
+ ## Lifecycle
18
+
19
+ List and retrieve environments through the API and console. Environment archive and delete endpoints are not available yet, so environments currently accumulate. The console does not pretend otherwise.
20
+
21
+ ## Prove the supported path
22
+
23
+ ```
24
+ oma smoke --egress
25
+ ```
26
+
27
+ This deterministic Docker proof checks approved package and GitHub access, denial of an unrelated HTTPS host, and cleanup.
@@ -0,0 +1,19 @@
1
+ # Session event stream
2
+
3
+ > [!NOTE] Status: **Shipped alpha.** Events are persisted, listable, and streamable over server-sent events (SSE).
4
+
5
+ ## Read the event history
6
+
7
+ Use `GET /v1/sessions/{id}/events` to page through persisted history, or open the console session detail. Events include user messages and interrupts, tool use and results, agent messages, status changes, model-request spans, and terminal errors where OMA emits them.
8
+
9
+ ## Stream and resume
10
+
11
+ Use `GET /v1/sessions/{id}/events/stream` for SSE. Send `Last-Event-ID` to resume after a known event. A reconnecting stream is not the source of truth: list persisted events to backfill if a client needs reliable consolidation.
12
+
13
+ ## Text and previews
14
+
15
+ OMA emits a complete buffered `agent.message` after generation. It does not emit token previews, `agent.thinking`, or `system.message`; requests using the unsupported `event_deltas[]` parameter fail with HTTP 400 rather than silently doing nothing.
16
+
17
+ ## Confirmation and custom tools
18
+
19
+ `user.tool_confirmation` resolves an ask-gated built-in or MCP tool request. `user.custom_tool_result` resolves a custom-tool wait. These events are part of the session's persisted audit trail.
@@ -0,0 +1,17 @@
1
+ # Files
2
+
3
+ > [!NOTE] Status: **Shipped alpha for uploads, session mounts, output files, listing, downloading, and deletion.**
4
+
5
+ ## Upload and inspect
6
+
7
+ Files are workspace-scoped resources. Use the Files console screen or API to upload, list, download, and delete them. Session output files remain available for inspection through the session and Files surfaces.
8
+
9
+ ## Mount files when creating a session
10
+
11
+ Pass file resources at session creation. OMA validates ownership and creates the internal snapshot required by the selected sandbox provider before the session starts.
12
+
13
+ > [!WARNING] A session accepts at most 10 mounted files, while CMA documents 100. OMA also rewrites mount paths below its session uploads root and returns the original upload file ID; do not rely on CMA's literal mount-path or session-scoped file-ID behavior.
14
+
15
+ ## Running-session changes
16
+
17
+ OMA does not support adding, listing, or deleting mounts on an already-created session. Create a new session when its file inputs need to change.
@@ -0,0 +1,11 @@
1
+ # Accessing GitHub
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA does not currently provide CMA-style GitHub repository resources, repository mounts, pull-request creation, or token rotation for GitHub integration.
4
+
5
+ ## What works today
6
+
7
+ An environment may allow approved GitHub HTTPS hosts for sandbox commands when Docker-local egress is enabled. That is ordinary bounded network access, not a GitHub integration feature.
8
+
9
+ ## Do not assume
10
+
11
+ OMA does not clone or mount a repository from a session resource, manage repository credentials, create pull requests on a user's behalf, or expose hosted GitHub lifecycle controls. A future GitHub integration will be documented only when its resource, credential, permission, and audit behavior exist.
@@ -0,0 +1,19 @@
1
+ # MCP connector
2
+
3
+ > [!NOTE] Status: **Shipped alpha for supported MCP servers and vault-backed authentication.**
4
+
5
+ ## Declare MCP servers on an agent
6
+
7
+ Configure an MCP server in the agent's versioned configuration. OMA resolves it when the session starts and records MCP tool use and result events in the session history.
8
+
9
+ ## Configure available tools
10
+
11
+ MCP tools remain subject to the agent's permission policy. Inspect the session event stream to see evaluation, confirmation, execution, and result behavior rather than treating a configured server as proof that every tool is usable.
12
+
13
+ ## Provide authentication
14
+
15
+ Attach the needed [vault](#docs=vaults) at session creation. OMA supports the shipped static-bearer and MCP OAuth flows, including configured validation. Credentials are not rendered as plaintext in the console or passed as ordinary browser data.
16
+
17
+ ## Current boundaries
18
+
19
+ OMA does not provide MCP tunnels, arbitrary rich content blocks, or long-output spill-to-file behavior. It also does not provide generic environment-variable credential injection.
@@ -0,0 +1,11 @@
1
+ # Using agent memory
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA has no memory-store, memory-version, or cross-session memory resource API.
4
+
5
+ ## Current behavior
6
+
7
+ Each session has its own persisted event record and explicitly attached input files. That persistence helps inspection and replay, but it is not agent memory that can be mounted into a later session.
8
+
9
+ ## Compatibility note
10
+
11
+ Memory-store resources are rejected at the session-resource boundary. Do not build an integration around CMA memory endpoints or paths until OMA ships the underlying storage, access, versioning, and audit semantics.
@@ -0,0 +1,17 @@
1
+ # Migration
2
+
3
+ > [!NOTE] Status: **Partial alpha guidance.** OMA borrows the managed-agent resource model, but it is not a drop-in replacement for every hosted CMA feature.
4
+
5
+ ## From a custom agent loop
6
+
7
+ Move durable configuration into an agent, choose an environment before execution, create a session for each persisted run, and consume the session event log over HTTP or SSE. OMA owns the local runtime bridge, sandbox lifecycle, persisted transcript, and tool-confirmation state.
8
+
9
+ You still own model-provider credentials, appliance operation, workspace-key distribution, and any application UI or job queue around OMA.
10
+
11
+ ## Compatibility boundary
12
+
13
+ Start from the synchronous single-agent path: agent, environment, session, user event, and persisted event stream. Check [API reference and compatibility](#docs=reference) before depending on a request shape or lifecycle detail.
14
+
15
+ ## Features not to assume
16
+
17
+ Per-session agent overrides, live session updates, hosted provisioning, memory stores, outcomes, webhooks, GitHub repository resources, scheduled deployments, and multi-agent threads are not part of the current alpha. Use the dedicated deferred pages for their current status rather than designing against hosted-only behavior.
@@ -0,0 +1,11 @@
1
+ # Multi-agent orchestration
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA supports the synchronous single-agent workflow only.
4
+
5
+ ## Current behavior
6
+
7
+ An agent cannot delegate to a roster, create session threads, or emit thread lifecycle events. Non-null multi-agent configuration is rejected rather than stored as an inert promise.
8
+
9
+ ## What to use instead
10
+
11
+ Coordinate separate OMA sessions from your own application if needed, but treat that orchestration as application-owned. OMA does not provide coordinator semantics, shared agent context, or CMA-compatible thread APIs today.
@@ -0,0 +1,11 @@
1
+ # Define outcomes
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA has no outcome rubric, grader, evaluation events, deliverable retrieval, or outcome status API.
4
+
5
+ ## Current alternative
6
+
7
+ Use session events, tool results, output files, and your own application-level evaluation to assess a completed run. These are execution records, not a managed outcome system.
8
+
9
+ ## Compatibility note
10
+
11
+ Do not send outcome-definition events or expect outcome-evaluation spans. OMA deliberately does not advertise those event types until it can process them with a defensible public contract.
@@ -0,0 +1,41 @@
1
+ # Open Managed Agents overview
2
+
3
+ Open Managed Agents (OMA) is a local-first appliance for creating, running, and inspecting managed-agent workflows on infrastructure you control.
4
+
5
+ > [!NOTE] Status: **Alpha.** This guide describes behavior that ships in OMA. Where CMA offers a broader feature, OMA names the boundary rather than implying parity.
6
+
7
+ ## Start here
8
+
9
+ - [Quickstart](#docs=quickstart) — install from a checkout, prove the local runtime, and start the appliance.
10
+ - [Prototype in Console](#docs=console) — create a real agent, environment, session, and prompt from the browser.
11
+ - [Start a session](#docs=sessions) — understand the persisted work unit.
12
+ - [API reference and compatibility](#docs=reference) — use exact endpoint contracts and see current differences.
13
+
14
+ ## Core concepts
15
+
16
+ | Concept | OMA meaning |
17
+ | --- | --- |
18
+ | Agent | A versioned model, instruction, tool, MCP-server, and skill configuration. |
19
+ | Environment | An immutable sandbox and networking policy selected before a session runs. |
20
+ | Session | A persisted run of one agent in one environment. |
21
+ | Event | A persisted user, tool, agent, model-span, status, or error record that can be listed or streamed. |
22
+ | Vault | A workspace credential container for supported integrations. |
23
+
24
+ ## How it works
25
+
26
+ 1. **Create an agent.** Select a configured provider and model, instructions, capabilities, and tool-confirmation policy.
27
+ 2. **Create an environment.** Keep it offline or choose a bounded HTTPS allowlist before work begins.
28
+ 3. **Start a session.** Select the agent and environment, attach allowed resources, and send a user event.
29
+ 4. **Inspect and steer.** Read persisted events, respond to confirmations, interrupt work, and inspect outputs.
30
+
31
+ ## When to use OMA
32
+
33
+ Use OMA when you want a self-hosted, inspectable, synchronous single-agent coding workflow with explicit sandbox and network boundaries. It is an alpha appliance, not a hosted long-running automation platform.
34
+
35
+ ## Supported tools
36
+
37
+ The current coding path provides Bash, read, write, edit, glob, and provider-owned grep in a pinned local image. Files, custom skills, MCP servers, and vault credentials are available within their documented boundaries. [Web fetch and web search](#docs=tools) are not enabled.
38
+
39
+ ## Beyond v1
40
+
41
+ Memory, dreams, outcomes, multi-agent orchestration, GitHub repository resources, scheduled deployments, and webhooks have dedicated pages in this guide. They are intentional **not-ready-in-v1** states, not hidden controls.
@@ -0,0 +1,24 @@
1
+ # Permission policies
2
+
3
+ > [!NOTE] Status: **Shipped alpha for built-in tools and MCP tools.**
4
+
5
+ Permission policies decide whether a tool call is automatically allowed or requires a human decision. They complement, rather than replace, the environment's filesystem and network boundaries.
6
+
7
+ ## Policy types
8
+
9
+ | Policy | Behavior |
10
+ | --- | --- |
11
+ | `always_allow` | OMA runs the permitted tool without a confirmation prompt. |
12
+ | `always_ask` | OMA pauses the session and emits a confirmation request. |
13
+
14
+ Unknown policy types and duplicate built-in tool configuration are rejected before an agent is persisted. Omitted built-in tool configuration receives OMA's documented default policy.
15
+
16
+ ## Respond to a confirmation
17
+
18
+ Use the session detail in the console, or send a `user.tool_confirmation` event through the API with `allow` or `deny`. Inspect the requested tool and input before allowing it.
19
+
20
+ > [!WARNING] OMA auto-denies an unanswered confirmation after five minutes. CMA documents indefinite waiting, so do not use the alpha for unattended long approval workflows.
21
+
22
+ ## What a policy cannot grant
23
+
24
+ An allow decision cannot bypass the environment's immutable network policy, escape the sandbox, enable web tools, or expose vault secret values to the guest. It only resolves the pending tool action.
@@ -0,0 +1,51 @@
1
+ # Get started with OMA
2
+
3
+ > [!NOTE] Status: **Canonical alpha path.** This flow installs from a source checkout; public package installers and Homebrew are not available yet.
4
+
5
+ ## Prerequisites
6
+
7
+ Use Node.js 22.19 or newer and Docker or OrbStack. A model credential is optional for the deterministic local proof and required for a real provider-backed session.
8
+
9
+ ## Install and diagnose
10
+
11
+ ```
12
+ git clone https://github.com/oneryalcin/open-managed-agents.git
13
+ cd open-managed-agents
14
+ npm ci
15
+ npm link
16
+ oma doctor
17
+ ```
18
+
19
+ `oma doctor` is read-only and secret-safe. A missing provider credential is a warning for the local-compatible proof, not a reason to skip it.
20
+
21
+ ## Prove the local runtime
22
+
23
+ ```
24
+ oma smoke --local-compatible
25
+ ```
26
+
27
+ The smoke starts isolated temporary services, uses a local-compatible model fixture, executes a real Docker tool call, observes public events, and cleans up afterward.
28
+
29
+ ## Start the appliance
30
+
31
+ ```
32
+ export ANTHROPIC_API_KEY="…"
33
+ oma up
34
+ ```
35
+
36
+ Startup prints the API URL, console URL, and first workspace key once. Keep the appliance process running while you use it. Other supported provider credentials can be configured with the `oma auth` and `oma models` commands described in the repository's Getting Started guide.
37
+
38
+ ## Create your first session
39
+
40
+ 1. **Sign in with a workspace key.** The key is exchanged for an opaque, revocable console session, so a reload restores the workspace without storing the key in the browser.
41
+ 2. **Create an agent.** Select a credential-ready model and choose its tools and confirmation policy.
42
+ 3. **Create an environment.** Start Offline unless the work requires an approved HTTPS allowlist.
43
+ 4. **Create a session and send a prompt.** Inspect the event stream, tool calls, results, confirmations, output files, and errors.
44
+
45
+ ## What's happening
46
+
47
+ OMA persists the agent version selected for the session, creates the sandbox state required by its environment, and records events in a durable session log. Sandbox readiness is proved by a real tool call, not guessed by the browser.
48
+
49
+ ## Next steps
50
+
51
+ Read [Agent setup](#docs=agents), [Environments](#docs=environments), and [Session event stream](#docs=events). For a deterministic proof of supported network behavior, run `oma smoke --egress`.
@@ -0,0 +1,27 @@
1
+ # API reference and compatibility
2
+
3
+ > [!NOTE] Status: **Shipped alpha reference.** The OpenAPI schema is the wire-contract authority.
4
+
5
+ Use the console for guided operations and the bundled [OpenAPI reference](/docs/) for endpoint-level integration details. The machine-readable schema is available at `/openapi.json`.
6
+
7
+ ## Authentication and errors
8
+
9
+ Managed-agent API requests are workspace-scoped and require a workspace key plus the managed-agents beta header. Successful POST operations use the documented API response shape; errors use a structured envelope with a request ID. Use the schema rather than this guide as the field-level authority.
10
+
11
+ ## Shipped alpha scope
12
+
13
+ | Area | Current behavior |
14
+ | --- | --- |
15
+ | Agents | Create, retrieve, list, immutable update/version history, and archive. |
16
+ | Environments | Create, retrieve, list, safe networking presets, and custom-host validation. No archive/delete yet. |
17
+ | Sessions | Create, retrieve, list with bidirectional cursors, archive/delete when idle, send events, list events, and SSE resume. |
18
+ | Tools | Bounded coding tools, tool confirmations, custom-tool result events, files, skills, MCP, and supported vault credentials. |
19
+ | Console | Real API-backed alpha workflow and interactive OpenAPI documentation. |
20
+
21
+ ## Deliberate differences and deferred surfaces
22
+
23
+ OMA is not a complete hosted CMA implementation. It currently lacks web tools, memory, dreams, outcomes, GitHub repository resources, webhooks, scheduled deployments, multi-agent threads, per-session overrides, live session updates, streaming token previews, and broad hosted-provisioning options. The corresponding pages in this guide explain each boundary.
24
+
25
+ ## Source of truth
26
+
27
+ This documentation is a user guide. The appliance's OpenAPI schema is authoritative for wire contracts, while the repository's `PARITY.md` records evidence-backed compatibility work and known differences. When those sources change, this guide must be updated before the console advertises a new capability.
@@ -0,0 +1,19 @@
1
+ # Sandbox reference
2
+
3
+ > [!NOTE] Status: **Shipped alpha image reference.** This describes the pinned coding image used by the supported local providers, not a hosted CMA cloud image.
4
+
5
+ ## Included tooling
6
+
7
+ The default image includes Bash, Node and npm, Python and uv, Git, curl, jq, ripgrep, common archive tools, and a basic C/C++ build baseline. It supports the built-in read, write, edit, glob, grep, and Bash workflow.
8
+
9
+ ## Filesystem and identity
10
+
11
+ The guest runs as a non-root user with a read-only root filesystem. Project files, virtual environments, package caches, and npm globals belong under `/workspace`. This is an alpha coding baseline, not a promise that arbitrary system packages or language runtimes are available.
12
+
13
+ ## Network access
14
+
15
+ Networking is controlled by the environment, not by the image. New environments are offline. Docker-local can use approved HTTPS presets or a validated custom host allowlist; microsandbox-local stays offline-only.
16
+
17
+ ## Image selection
18
+
19
+ OMA uses a reviewed, digest-pinned image. Users cannot provide arbitrary image references through the public environment API because image selection and egress are security boundaries.
@@ -0,0 +1,15 @@
1
+ # Sandbox security
2
+
3
+ > [!NOTE] Status: **Shipped baseline for Docker-local.** Security posture is provider-specific and is not a substitute for your own host security controls.
4
+
5
+ ## OMA-enforced baseline
6
+
7
+ Docker-local drops Linux capabilities, uses `no-new-privileges`, runs a non-root UID, mounts a read-only root filesystem, and uses constrained temporary filesystems. The default environment denies network access.
8
+
9
+ ## Egress and credentials
10
+
11
+ When a Docker environment uses an approved allowlist, OMA limits traffic to HTTPS and the selected hosts. Network permission is explicit and immutable. Vault secret values are not displayed to the sandbox or console user as plaintext.
12
+
13
+ ## Operator responsibilities
14
+
15
+ Protect the appliance host, Docker daemon, workspace and admin keys, and persistent OMA data. Review custom host allowlists carefully. Do not treat alpha sandboxing as a multi-tenant isolation guarantee, and do not enable an untrusted workload solely because a tool-confirmation policy allows it.
@@ -0,0 +1,5 @@
1
+ # Scheduled deployments
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA has no deployment, deployment-run, cron, pause, archive, or manual-run API.
4
+
5
+ Run sessions from your own scheduler only if you can own the credential, idempotency, monitoring, retry, and cleanup behavior around it. OMA does not yet expose a managed scheduling contract or webhook-based deployment reporting.
@@ -0,0 +1,15 @@
1
+ # Self-hosted sandboxes
2
+
3
+ > [!WARNING] Status: **Not a CMA-compatible feature in v1.** OMA is a self-hosted appliance, but it does not implement CMA's remote self-hosted worker protocol or custom-tool tunnels.
4
+
5
+ ## What OMA supports now
6
+
7
+ The local appliance runs sessions through its configured local sandbox provider. Docker-local is the recommended alpha provider. Microsandbox-local is available for offline execution only.
8
+
9
+ ## What is not available
10
+
11
+ OMA has no worker registration, remote queue, tunnel, externally hosted custom-tool service, or caller-submitted sandbox result protocol. Do not point an external worker at the session API expecting CMA self-hosted sandbox semantics.
12
+
13
+ ## Operator guidance
14
+
15
+ Run the appliance on infrastructure you control, keep the workspace and API keys private, and use the supported local smoke commands before admitting real workloads. A future remote-worker architecture must preserve the same default-deny network and secret-boundary guarantees.
@@ -0,0 +1,21 @@
1
+ # Session operations
2
+
3
+ > [!NOTE] Status: **Shipped alpha for create, retrieve, list, archive, and delete.**
4
+
5
+ ## Session states
6
+
7
+ A session is persisted and can be idle, running, rescheduling, or terminated. Runtime activity is observed through events; status is not a promise that a browser still has a live SSE connection.
8
+
9
+ ## Retrieve and list
10
+
11
+ Use the console or API to retrieve a session and inspect its selected agent reference, environment, events, resources, and timestamps. Session lists support cursor pagination in both directions and preserve the requested order.
12
+
13
+ ## Archive and delete
14
+
15
+ Archive an idle session to retain its record without continuing work. Delete an idle session only when you no longer need its persisted events and files.
16
+
17
+ > [!WARNING] OMA rejects archive and delete for a running session. Send an interrupt event or wait for the turn to settle; a rejected deletion does not stop work.
18
+
19
+ ## Operations not available
20
+
21
+ OMA does not yet support updating a session, changing its agent configuration while idle, or adding and removing session resources after creation.
@@ -0,0 +1,21 @@
1
+ # Start a session
2
+
3
+ > [!NOTE] Status: **Shipped alpha for synchronous, single-agent sessions.**
4
+
5
+ ## Create a session
6
+
7
+ Create a session with an agent and environment. A bare agent ID selects the latest version; an agent reference with a version pins that immutable revision. The stored session keeps the resolved version for runtime execution.
8
+
9
+ At creation, supply any supported vault and file resources. Resources are validated and prepared before execution; OMA does not support adding or removing them later.
10
+
11
+ ## Start work
12
+
13
+ Send a `user.message` event to begin a turn. The console supports prompts, interrupts, and confirmation responses when its live API capability allows them. API clients should use the documented idempotency contract for retry-safe writes.
14
+
15
+ ## Follow progress
16
+
17
+ Use the session detail and [event stream](#docs=events) to inspect complete agent messages, tool calls and results, confirmations, errors, and raw payloads. Persisted history survives an SSE reconnect.
18
+
19
+ ## Current limitations
20
+
21
+ OMA does not support agent overrides at session creation, live session updates, token previews, multi-agent threads, or hosted-style asynchronous session scheduling.
@@ -0,0 +1,15 @@
1
+ # Skills
2
+
3
+ > [!NOTE] Status: **Shipped alpha.** Custom skills are versioned workspace resources delivered to the runtime.
4
+
5
+ ## Create a skill
6
+
7
+ Upload a skill bundle through the API or console. OMA stores the skill and its versions, validates admission, and snapshots the selected version for runtime use. The API supports creating, listing, retrieving, versioning, and deleting skills.
8
+
9
+ ## Attach a skill to an agent
10
+
11
+ Reference the desired skill configuration in the agent. A session uses the agent's immutable version, so later agent updates do not change a running or historical session.
12
+
13
+ ## Boundaries
14
+
15
+ Skills are not arbitrary host access. They run within the selected sandbox and environment policy. Some skill-specific hardening follow-ups remain tracked separately; consult the API reference for the accepted bundle and resource shapes.
@@ -0,0 +1,23 @@
1
+ # Tools
2
+
3
+ > [!NOTE] Status: **Shipped alpha for the bounded coding toolset.**
4
+
5
+ ## Available tools
6
+
7
+ OMA supports `bash`, `read`, `write`, `edit`, `glob`, and provider-owned `grep` for the supported local providers. The pinned coding image contains Node/npm, Python/uv, Git, curl, jq, archive tools, and a basic native build baseline.
8
+
9
+ ## Configure a toolset
10
+
11
+ Tool configuration lives on the agent. OMA validates known built-in names, rejects duplicate configuration, and supports `always_allow` and `always_ask` policies. Use [Permission policies](#docs=permissions) for the review workflow and timeout boundary.
12
+
13
+ ## Custom tools
14
+
15
+ Custom-tool calls are persisted as events and wait for a `user.custom_tool_result` response from the API client. They are not an invitation to run arbitrary code in the browser or appliance host.
16
+
17
+ ## Web tools
18
+
19
+ > [!WARNING] `web_fetch` and `web_search` are disabled. Approved Docker egress permits only the environment's HTTPS allowlist; it does not turn host-network access into provider-owned web tools.
20
+
21
+ ## Related resources
22
+
23
+ Use [Files](#docs=files) for mounts and output, [Skills](#docs=skills) for reusable bundles, and [MCP connector](#docs=integrations) for external tool servers.
@@ -0,0 +1,19 @@
1
+ # Authenticate with vaults
2
+
3
+ > [!NOTE] Status: **Shipped alpha for vaults and supported MCP credential flows.**
4
+
5
+ ## Create a vault
6
+
7
+ Vaults organize workspace-scoped credentials. The console can show vault and credential metadata and health without rendering secret values. The API supports vault and credential lifecycle operations, including archive and delete where the server permits them.
8
+
9
+ ## Use a credential in a session
10
+
11
+ Attach the needed vault at session creation and configure the compatible MCP server on the agent. OMA resolves supported authentication inside the connector path; the sandbox does not receive a browser-visible plaintext secret.
12
+
13
+ ## Supported and deferred types
14
+
15
+ OMA supports the shipped static bearer and MCP OAuth flows, including validation where configured. Environment-variable substitution and arbitrary secret injection are not current public credential types.
16
+
17
+ ## Rotation and failures
18
+
19
+ Archive, update, or replace credentials through their real lifecycle actions. If an OAuth refresh or connector call fails, inspect the resulting session events and credential health; OMA does not claim that a credential is usable merely because its metadata exists.
@@ -0,0 +1,11 @@
1
+ # Subscribe to webhooks
2
+
3
+ > [!WARNING] Status: **Not ready in v1.** OMA has no webhook endpoint registration, signing, delivery queue, retry policy, or event-family subscription API.
4
+
5
+ ## Current alternative
6
+
7
+ Use the persisted session event API and SSE stream from an application you control. Your application is responsible for reconnecting, backfilling history, deduplicating events, and delivering any downstream notifications.
8
+
9
+ ## Compatibility note
10
+
11
+ Do not expose a webhook receiver expecting OMA callbacks. A future webhook surface will document its event names, signature verification, delivery semantics, and retry behavior before it is considered available.