An open-source, faster Devin alternative
TypeScript
Add secrets docs and consolidate SDK references (#69)
Mohamed Habib73e5a2604b99
diff --git a/docs/cli/projects.mdx b/docs/cli/projects.mdxdeleted file mode 100644index 05c20806..00000000--- a/docs/cli/projects.mdx+++ /dev/null@@ -1,168 +0,0 @@-----title: "Secret Stores & Secrets"-description: "Manage secret stores and encrypted secrets from the CLI"------Secret stores hold encrypted secrets that are injected into sandboxes as sealed tokens. Use `oc secret-store` to manage stores and `oc secret` to manage their secrets.--## Secret Stores--### Create a Secret Store--```bash-oc secret-store create --name my-agent-secrets --egress-allowlist api.anthropic.com-```--#### `oc secret-store create`--| Flag | Type | Default | Description |-| --- | --- | --- | --- |-| `--name` | string | *required* | Store name (unique per org) |-| `--egress-allowlist` | string[] | — | Allowed egress hosts (comma-separated) |--### List Secret Stores--```bash-oc secret-store list-```--Output:--```-ID NAME EGRESS ALLOWLIST-9961c10e-c83c-4e6b-ad61-b91144323a3d my-agent-secrets api.anthropic.com-```--### Get Secret Store Details--```bash-oc secret-store get <store-id>-```--### Update a Secret Store--Partial updates — only the flags you pass are changed.--```bash-oc secret-store update <store-id> --name new-name --egress-allowlist api.anthropic.com,*.openai.com-```--#### `oc secret-store update`--| Flag | Type | Description |-| --- | --- | --- |-| `--name` | string | New store name |-| `--egress-allowlist` | string[] | New allowed egress hosts |--### Delete a Secret Store--```bash-oc secret-store delete <store-id>-```--Deletes the store and all its secrets. Running sandboxes are not affected.--## Secrets--Secrets are encrypted at rest and injected as sealed tokens when a sandbox is created with a secret store. The real values are never visible inside the sandbox — they are only substituted by the MITM proxy on outbound HTTPS requests.--### Set a Secret--```bash-oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-...-```--Or pipe from stdin (useful for multiline values or scripts):--```bash-cat ~/.anthropic_key | oc secret set <store-id> ANTHROPIC_API_KEY --from-stdin-```--```bash-echo "sk-ant-..." | oc secret set <store-id> ANTHROPIC_API_KEY --from-stdin-```--#### `oc secret set`--| Argument | Description |-| --- | --- |-| `<store-id>` | UUID of the secret store |-| `<name>` | Secret name (becomes the env var name in sandboxes) |-| `<value>` | Secret value (omit if using `--from-stdin`) |--| Flag | Description |-| --- | --- |-| `--from-stdin` | Read the secret value from stdin |-| `--allowed-hosts` | Restrict this secret to specific hosts only |--### List Secrets--```bash-oc secret list <store-id>-```--Output:--```-NAME ALLOWED HOSTS-ANTHROPIC_API_KEY api.anthropic.com-DATABASE_URL-```--Returns names and host restrictions only. Values are never exposed.--### Delete a Secret--```bash-oc secret delete <store-id> ANTHROPIC_API_KEY-```--## Creating Sandboxes with Secret Stores--Use the `--secret-store` flag on `oc create` to inject a store's secrets:--```bash-oc create --secret-store my-agent-secrets --timeout 600-```--Secrets are injected as sealed tokens:--```bash-oc exec <sandbox-id> -- echo '$ANTHROPIC_API_KEY'-# osb_sealed_2ce9277be9baafcb... (sealed, never the real key)-```--The proxy replaces sealed tokens with real values on outbound HTTPS requests, so code running in the sandbox can use API keys normally without ever seeing the actual secret.--## Example Workflow--```bash-# Create a secret store-oc secret-store create --name my-agent-secrets --egress-allowlist api.anthropic.com--# Add secrets-oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-...-oc secret set <store-id> DATABASE_URL postgres://user:pass@host/db--# Verify secrets are stored-oc secret list <store-id>--# Create a sandbox — inherits secrets-oc create --secret-store my-agent-secrets--# Secrets are sealed inside the sandbox-oc exec <sandbox-id> -- env | grep -E 'API_KEY|DATABASE'-# ANTHROPIC_API_KEY=osb_sealed_...-# DATABASE_URL=osb_sealed_...--# But HTTPS requests get real values via the proxy-oc exec <sandbox-id> -- curl -s https://api.anthropic.com/v1/messages \- -H "x-api-key: \$ANTHROPIC_API_KEY" \- -H "anthropic-version: 2023-06-01" \- -H "content-type: application/json" \- -d '{"model":"claude-haiku-4-5-20251001","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'--# Clean up-oc sandbox delete <sandbox-id>-oc secret-store delete <store-id>-```diff --git a/docs/cli/secrets.mdx b/docs/cli/secrets.mdxnew file mode 100644index 00000000..7a4a22ec--- /dev/null+++ b/docs/cli/secrets.mdx@@ -0,0 +1,52 @@+---+title: "Secrets"+description: "Manage secret stores and secrets from the CLI"+---++## Secret stores++```bash+# Create a store (with optional egress restrictions)+oc secret-store create --name my-secrets --egress-allowlist api.anthropic.com++# List stores+oc secret-store list++# Update a store+oc secret-store update <store-id> --egress-allowlist api.anthropic.com,*.openai.com++# Delete a store (and all its secrets)+oc secret-store delete <store-id>+```++## Secrets++```bash+# Set a secret+oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-...++# Set from stdin+echo "sk-ant-..." | oc secret set <store-id> ANTHROPIC_API_KEY --from-stdin++# Restrict a secret to specific hosts+oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-... --allowed-hosts api.anthropic.com++# List secrets (names only — values are never returned)+oc secret list <store-id>++# Delete a secret+oc secret delete <store-id> ANTHROPIC_API_KEY+```++## Using secrets in sandboxes++```bash+# Create a sandbox with a secret store+oc create --secret-store my-secrets++# Env vars are sealed — real values are never in the VM+oc exec <sandbox-id> -- echo '$ANTHROPIC_API_KEY'+# osb_sealed_7f3a9c... (not the real key)+```++For how secrets work under the hood, see [Secrets](/sandboxes/secrets).diff --git a/docs/mint.json b/docs/mint.jsonindex e4b82200..9299e056 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -53,6 +53,7 @@"sandboxes/interactive-terminals","sandboxes/checkpoints","sandboxes/templates",+ "sandboxes/secrets","sandboxes/patches","sandboxes/preview-urls"]@@ -66,7 +67,8 @@"cli/shell","cli/checkpoint","cli/patch",- "cli/preview"+ "cli/preview",+ "cli/secrets"]},{diff --git a/docs/reference/python-sdk.mdx b/docs/reference/python-sdk.mdxindex 97c606ab..88b7ed76 100644--- a/docs/reference/python-sdk.mdx+++ b/docs/reference/python-sdk.mdx@@ -531,3 +531,163 @@ Snapshot methods return dicts with these fields:"lastUsedAt": str, # ISO 8601 last usage timestamp}```++---++## Secret Stores++### `await SecretStore.create(**kwargs)`++Create a new secret store.++```python+from opencomputer import SecretStore++store = await SecretStore.create(+ name='my-agent-secrets',+ egress_allowlist=['api.anthropic.com'],+)+```++<ParamField body="name" type="str" required>+ Store name (unique per organization).+</ParamField>+<ParamField body="egress_allowlist" type="list[str] | None" default="None">+ Allowed egress hosts (e.g. `["api.anthropic.com"]`).+</ParamField>++**Returns:** `dict` — Secret store info with `id`, `name`, `egressAllowlist`, etc.++### `await SecretStore.list(**kwargs)`++List all secret stores.++```python+stores = await SecretStore.list()+```++**Returns:** `list[dict]`++### `await SecretStore.get(store_id, **kwargs)`++Get a secret store by ID.++```python+store = await SecretStore.get('store-uuid')+```++<ParamField body="store_id" type="str" required>+ UUID of the secret store.+</ParamField>++**Returns:** `dict`++### `await SecretStore.update(store_id, **kwargs)`++Partial updates — only the fields you pass are changed.++```python+updated = await SecretStore.update(+ 'store-uuid',+ name='new-name',+ egress_allowlist=['api.anthropic.com', '*.openai.com'],+)+```++<ParamField body="store_id" type="str" required>+ UUID of the store to update.+</ParamField>+<ParamField body="name" type="str" default="">+ New store name (empty = no change).+</ParamField>+<ParamField body="egress_allowlist" type="list[str] | None" default="None">+ New allowed egress hosts (None = no change).+</ParamField>++**Returns:** `dict`++### `await SecretStore.delete(store_id, **kwargs)`++Deletes the store and all its secrets. Running sandboxes are not affected.++```python+await SecretStore.delete('store-uuid')+```++**Returns:** `None`++### `await SecretStore.set_secret(store_id, name, value, **kwargs)`++Set a secret in a store. Secrets are encrypted at rest. The value is never returned by the API.++```python+await SecretStore.set_secret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...')+```++Optionally restrict which hosts can receive this secret:++```python+await SecretStore.set_secret(+ 'store-uuid',+ 'ANTHROPIC_API_KEY',+ 'sk-ant-...',+ allowed_hosts=['api.anthropic.com'],+)+```++<ParamField body="store_id" type="str" required>+ UUID of the secret store.+</ParamField>+<ParamField body="name" type="str" required>+ Secret name (used as the env var name in sandboxes).+</ParamField>+<ParamField body="value" type="str" required>+ Secret value (encrypted at rest, never returned by API).+</ParamField>+<ParamField body="allowed_hosts" type="list[str] | None" default="None">+ Restrict this secret to specific hosts only.+</ParamField>++**Returns:** `None`++### `await SecretStore.list_secrets(store_id, **kwargs)`++Returns secret metadata only. Values are never exposed.++```python+entries = await SecretStore.list_secrets('store-uuid')+# [{'name': 'ANTHROPIC_API_KEY', 'allowedHosts': ['api.anthropic.com'], ...}, ...]+```++**Returns:** `list[dict]`++### `await SecretStore.delete_secret(store_id, name, **kwargs)`++```python+await SecretStore.delete_secret('store-uuid', 'DATABASE_URL')+```++**Returns:** `None`++### Creating a Sandbox with a Secret Store++Pass the `secret_store` parameter to `Sandbox.create()` to inject the store's secrets:++```python+from opencomputer import Sandbox++sandbox = await Sandbox.create(+ secret_store='my-agent-secrets',+ timeout=600,+)++# Secrets are available as sealed env vars+result = await sandbox.commands.run('echo $ANTHROPIC_API_KEY')+# stdout: "osb_sealed_abc123..." (sealed, not the real key)++# But outbound HTTPS requests get the real value substituted by the proxy+api_result = await sandbox.commands.run(+ 'curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" ...'+)+# The proxy replaces the sealed token with the real key before it hits Anthropic+```diff --git a/docs/reference/typescript-sdk.mdx b/docs/reference/typescript-sdk.mdxindex a1949936..43f042ad 100644--- a/docs/reference/typescript-sdk.mdx+++ b/docs/reference/typescript-sdk.mdx@@ -589,3 +589,188 @@ interface SnapshotInfo {lastUsedAt: string;}```++---++## Secret Stores++### `SecretStore.create(opts)`++Create a new secret store.++```typescript+import { SecretStore } from '@opencomputer/sdk';++const store = await SecretStore.create({+ name: 'my-agent-secrets',+ egressAllowlist: ['api.anthropic.com'],+});+```++<ParamField body="opts" type="CreateSecretStoreOpts" required>+ <Expandable title="properties">+ <ParamField body="name" type="string" required>+ Store name (unique per organization).+ </ParamField>+ <ParamField body="egressAllowlist" type="string[]" optional>+ Allowed egress hosts (e.g. `["api.anthropic.com"]`).+ </ParamField>+ </Expandable>+</ParamField>++**Returns:** `Promise<SecretStoreInfo>`++### `SecretStore.list(opts?)`++List all secret stores.++```typescript+const stores = await SecretStore.list();+```++**Returns:** `Promise<SecretStoreInfo[]>`++### `SecretStore.get(storeId, opts?)`++Get a secret store by ID.++```typescript+const store = await SecretStore.get('store-uuid');+```++<ParamField body="storeId" type="string" required>+ UUID of the secret store.+</ParamField>++**Returns:** `Promise<SecretStoreInfo>`++### `SecretStore.update(storeId, opts)`++Partial updates — only the fields you pass are changed.++```typescript+const updated = await SecretStore.update('store-uuid', {+ name: 'new-name',+ egressAllowlist: ['api.anthropic.com', '*.openai.com'],+});+```++<ParamField body="storeId" type="string" required>+ UUID of the store to update.+</ParamField>+<ParamField body="opts" type="UpdateSecretStoreOpts" required>+ <Expandable title="properties">+ <ParamField body="name" type="string" optional>+ New store name.+ </ParamField>+ <ParamField body="egressAllowlist" type="string[]" optional>+ New allowed egress hosts.+ </ParamField>+ </Expandable>+</ParamField>++**Returns:** `Promise<SecretStoreInfo>`++### `SecretStore.delete(storeId, opts?)`++Deletes the store and all its secrets. Running sandboxes are not affected.++```typescript+await SecretStore.delete('store-uuid');+```++**Returns:** `Promise<void>`++### `SecretStore.setSecret(storeId, name, value, opts?)`++Set a secret in a store. Secrets are encrypted at rest. The value is never returned by the API.++```typescript+await SecretStore.setSecret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...');+```++Optionally restrict which hosts can receive this secret:++```typescript+await SecretStore.setSecret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...', {+ allowedHosts: ['api.anthropic.com'],+});+```++<ParamField body="storeId" type="string" required>+ UUID of the secret store.+</ParamField>+<ParamField body="name" type="string" required>+ Secret name (used as the env var name in sandboxes).+</ParamField>+<ParamField body="value" type="string" required>+ Secret value (encrypted at rest, never returned by API).+</ParamField>++**Returns:** `Promise<void>`++### `SecretStore.listSecrets(storeId, opts?)`++Returns secret metadata only. Values are never exposed.++```typescript+const entries = await SecretStore.listSecrets('store-uuid');+// [{ name: 'ANTHROPIC_API_KEY', allowedHosts: ['api.anthropic.com'], ... }, ...]+```++**Returns:** `Promise<SecretEntryInfo[]>`++### `SecretStore.deleteSecret(storeId, name, opts?)`++```typescript+await SecretStore.deleteSecret('store-uuid', 'DATABASE_URL');+```++**Returns:** `Promise<void>`++### Creating a Sandbox with a Secret Store++Pass the `secretStore` option to `Sandbox.create()` to inject the store's secrets:++```typescript+import { Sandbox } from '@opencomputer/sdk';++const sandbox = await Sandbox.create({+ secretStore: 'my-agent-secrets',+ timeout: 600,+});++// Secrets are available as sealed env vars+const result = await sandbox.commands.run('echo $ANTHROPIC_API_KEY');+// stdout: "osb_sealed_abc123..." (sealed, not the real key)++// But outbound HTTPS requests get the real value substituted by the proxy+const apiResult = await sandbox.commands.run(+ 'curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" ...'+);+// The proxy replaces the sealed token with the real key before it hits Anthropic+```++### Types++#### SecretStoreInfo++| Property | Type | Description |+| --- | --- | --- |+| `id` | `string` | Store UUID |+| `orgId` | `string` | Organization UUID |+| `name` | `string` | Store name |+| `egressAllowlist` | `string[]` | Allowed egress hosts |+| `createdAt` | `string` | ISO 8601 timestamp |+| `updatedAt` | `string` | ISO 8601 timestamp |++#### SecretEntryInfo++| Property | Type | Description |+| --- | --- | --- |+| `id` | `string` | Entry UUID |+| `storeId` | `string` | Parent store UUID |+| `name` | `string` | Secret name (env var name) |+| `allowedHosts` | `string[]` | Host restrictions for this secret |+| `createdAt` | `string` | ISO 8601 timestamp |+| `updatedAt` | `string` | ISO 8601 timestamp |diff --git a/docs/sandboxes/secrets.mdx b/docs/sandboxes/secrets.mdxnew file mode 100644index 00000000..d2285e37--- /dev/null+++ b/docs/sandboxes/secrets.mdx@@ -0,0 +1,218 @@+---+title: "Secrets"+description: "Inject encrypted secrets into sandboxes without exposing them to the VM"+---++Secrets let you pass API keys, tokens, and credentials into sandboxes without the real values ever entering the VM. They are encrypted at rest, sealed into opaque tokens at boot, and only revealed by a host-side proxy on outbound HTTPS requests.++## How it works++```mermaid+sequenceDiagram+ participant You as Your Code+ participant S as Server+ participant W as Worker+ participant VM as Sandbox VM+ participant P as MITM Proxy+ participant API as External API++ You->>S: Store secret (sk-ant-...)+ Note over S: Encrypted with AES-256-GCM<br/>in Postgres++ You->>S: Create sandbox with secret store+ S->>S: Decrypt secrets+ S->>W: Send decrypted secrets++ W->>W: Seal into opaque tokens+ Note over W: sk-ant-... → osb_sealed_7f3a9c...++ W->>VM: Inject sealed env vars+ Note over VM: $API_KEY = osb_sealed_7f3a9c...<br/>Real secret NEVER in VM memory++ VM->>P: HTTPS request with sealed token+ P->>P: Replace sealed token with real secret+ P->>API: Request with real API key+ API-->>VM: Response+```++<Info>+The real secret value only exists in the host-side proxy's memory — it is never written to disk, never sent to the VM, and never visible via `env` or `/proc` inside the sandbox.+</Info>++## Quick start++Create a secret store, add a secret, and launch a sandbox that uses it:++<CodeGroup>++```typescript TypeScript+import { Sandbox, SecretStore } from '@opencomputer/sdk';++// 1. Create a secret store with egress restrictions+const store = await SecretStore.create({+ name: 'my-agent-secrets',+ egressAllowlist: ['api.anthropic.com'],+});++// 2. Add an encrypted secret+await SecretStore.setSecret(store.id, 'ANTHROPIC_API_KEY', 'sk-ant-...');++// 3. Create a sandbox — secrets are injected as sealed tokens+const sandbox = await Sandbox.create({+ secretStore: 'my-agent-secrets',+ timeout: 600,+});++// Inside the VM, the env var is sealed — not the real key+const result = await sandbox.exec.run('echo $ANTHROPIC_API_KEY');+console.log(result.stdout); // "osb_sealed_7f3a9c..."++// But HTTPS requests to allowed hosts get the real value via the proxy+const apiResult = await sandbox.exec.run(`+ curl -s https://api.anthropic.com/v1/messages \\+ -H "x-api-key: $ANTHROPIC_API_KEY" \\+ -H "anthropic-version: 2023-06-01" \\+ -H "content-type: application/json" \\+ -d '{"model":"claude-haiku-4-5-20251001","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'+`);+console.log(apiResult.stdout); // 200 OK — real key was substituted by the proxy+```++```python Python+from opencomputer import Sandbox, SecretStore++# 1. Create a secret store with egress restrictions+store = await SecretStore.create(+ name='my-agent-secrets',+ egress_allowlist=['api.anthropic.com'],+)++# 2. Add an encrypted secret+await SecretStore.set_secret(store['id'], 'ANTHROPIC_API_KEY', 'sk-ant-...')++# 3. Create a sandbox — secrets are injected as sealed tokens+sandbox = await Sandbox.create(+ secret_store='my-agent-secrets',+ timeout=600,+)++# Inside the VM, the env var is sealed — not the real key+result = await sandbox.exec.run('echo $ANTHROPIC_API_KEY')+print(result.stdout) # "osb_sealed_7f3a9c..."++# But HTTPS requests to allowed hosts get the real value via the proxy+api_result = await sandbox.exec.run(+ 'curl -s https://api.anthropic.com/v1/messages '+ '-H "x-api-key: $ANTHROPIC_API_KEY" '+ '-H "anthropic-version: 2023-06-01" '+ '-H "content-type: application/json" '+ '-d \'{"model":"claude-haiku-4-5-20251001","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}\''+)+print(api_result.stdout) # 200 OK — real key was substituted by the proxy+```++</CodeGroup>++## Per-secret host restrictions++You can restrict individual secrets so they are only substituted in requests to specific hosts. This prevents a compromised dependency from exfiltrating secrets to an attacker-controlled server.++<CodeGroup>++```typescript TypeScript+// This secret will only be substituted in requests to api.anthropic.com+await SecretStore.setSecret(store.id, 'ANTHROPIC_API_KEY', 'sk-ant-...', {+ allowedHosts: ['api.anthropic.com'],+});++// This secret works on any allowed egress host+await SecretStore.setSecret(store.id, 'GENERIC_TOKEN', 'tok-...');+```++```python Python+# This secret will only be substituted in requests to api.anthropic.com+await SecretStore.set_secret(+ store['id'], 'ANTHROPIC_API_KEY', 'sk-ant-...',+ allowed_hosts=['api.anthropic.com'],+)++# This secret works on any allowed egress host+await SecretStore.set_secret(store['id'], 'GENERIC_TOKEN', 'tok-...')+```++</CodeGroup>++## Egress allowlists++Secret stores can restrict which hosts the sandbox can make HTTPS requests to. Requests to hosts not on the list are blocked by the proxy.++<CodeGroup>++```typescript TypeScript+const store = await SecretStore.create({+ name: 'restricted-store',+ egressAllowlist: ['api.anthropic.com', '*.openai.com'],+});+```++```python Python+store = await SecretStore.create(+ name='restricted-store',+ egress_allowlist=['api.anthropic.com', '*.openai.com'],+)+```++</CodeGroup>++Supports exact matches (`api.anthropic.com`) and wildcards (`*.openai.com`). An empty allowlist means all hosts are allowed.++## Managing secrets++<CodeGroup>++```typescript TypeScript+// List all secret stores+const stores = await SecretStore.list();++// List secrets in a store (metadata only — values are never returned)+const entries = await SecretStore.listSecrets(store.id);++// Delete a secret+await SecretStore.deleteSecret(store.id, 'OLD_KEY');++// Delete a store and all its secrets+await SecretStore.delete(store.id);+```++```python Python+# List all secret stores+stores = await SecretStore.list()++# List secrets in a store (metadata only — values are never returned)+entries = await SecretStore.list_secrets(store['id'])++# Delete a secret+await SecretStore.delete_secret(store['id'], 'OLD_KEY')++# Delete a store and all its secrets+await SecretStore.delete(store['id'])+```++</CodeGroup>++## Security properties++| Property | Detail |+| --- | --- |+| **Encryption at rest** | AES-256-GCM in Postgres, key via `OPENSANDBOX_SECRET_ENCRYPTION_KEY` |+| **Never in VM memory** | Env vars contain opaque `osb_sealed_*` tokens |+| **Host-side only** | Real values exist only in the MITM proxy process on the worker host |+| **Egress control** | Allowlists restrict which domains receive secrets |+| **Per-secret scoping** | Individual secrets can be locked to specific hosts |+| **Values never returned** | The API only returns secret names and metadata, never values |++## Next steps++- [CLI reference](/cli/secrets) — manage secret stores and secrets from the command line+- [TypeScript SDK reference](/reference/typescript-sdk#secret-stores) — full API reference+- [Python SDK reference](/reference/python-sdk#secret-stores) — full API referencediff --git a/docs/sdks/python/projects.mdx b/docs/sdks/python/projects.mdxdeleted file mode 100644index 085a4336..00000000--- a/docs/sdks/python/projects.mdx+++ /dev/null@@ -1,184 +0,0 @@-----title: "Secret Stores & Secrets"-description: "Manage secret stores and encrypted secrets that are securely injected into sandboxes"------Secret stores hold encrypted secrets that are injected into sandboxes as sealed tokens. When you create a sandbox with a secret store, secrets are sealed inside the sandbox so they never exist as plaintext in VM memory.--## How Secrets Work--When a sandbox is created with a secret store:--1. The server decrypts the store's secrets-2. Secrets are sent to the worker and **sealed** into opaque tokens (`osb_sealed_...`)-3. Inside the sandbox, env vars contain sealed tokens — never real values-4. When the sandbox makes an outbound HTTPS request, the MITM proxy intercepts it and replaces sealed tokens with real values in headers and request body-5. The real secret only exists in the proxy's memory on the host, never inside the VM--## Creating a Secret Store--```python-from opencomputer import SecretStore--store = await SecretStore.create(- name='my-agent-secrets',- egress_allowlist=['api.anthropic.com'],-)-```--### `SecretStore.create(**kwargs)`--<ParamField body="name" type="str" required>- Store name (unique per organization).-</ParamField>-<ParamField body="egress_allowlist" type="list[str] | None" default="None">- Allowed egress hosts (e.g. `["api.anthropic.com"]`).-</ParamField>--**Returns:** `dict` — Secret store info with `id`, `name`, `egressAllowlist`, etc.--## Listing Secret Stores--```python-stores = await SecretStore.list()-```--### `SecretStore.list(**kwargs)`--**Returns:** `list[dict]`--## Getting a Secret Store--```python-store = await SecretStore.get('store-uuid')-```--### `SecretStore.get(store_id, **kwargs)`--<ParamField body="store_id" type="str" required>- UUID of the secret store.-</ParamField>--**Returns:** `dict`--## Updating a Secret Store--Partial updates — only the fields you pass are changed.--```python-updated = await SecretStore.update(- 'store-uuid',- name='new-name',- egress_allowlist=['api.anthropic.com', '*.openai.com'],-)-```--### `SecretStore.update(store_id, **kwargs)`--<ParamField body="store_id" type="str" required>- UUID of the store to update.-</ParamField>-<ParamField body="name" type="str" default="">- New store name (empty = no change).-</ParamField>-<ParamField body="egress_allowlist" type="list[str] | None" default="None">- New allowed egress hosts (None = no change).-</ParamField>--**Returns:** `dict`--## Deleting a Secret Store--```python-await SecretStore.delete('store-uuid')-```--Deletes the store and all its secrets. Running sandboxes are not affected.--### `SecretStore.delete(store_id, **kwargs)`--**Returns:** `None`--## Setting a Secret--```python-await SecretStore.set_secret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...')-```--Secrets are encrypted at rest. The value is never returned by the API.--Optionally restrict which hosts can receive this secret:--```python-await SecretStore.set_secret(- 'store-uuid',- 'ANTHROPIC_API_KEY',- 'sk-ant-...',- allowed_hosts=['api.anthropic.com'],-)-```--### `SecretStore.set_secret(store_id, name, value, **kwargs)`--<ParamField body="store_id" type="str" required>- UUID of the secret store.-</ParamField>-<ParamField body="name" type="str" required>- Secret name (used as the env var name in sandboxes).-</ParamField>-<ParamField body="value" type="str" required>- Secret value (encrypted at rest, never returned by API).-</ParamField>-<ParamField body="allowed_hosts" type="list[str] | None" default="None">- Restrict this secret to specific hosts only.-</ParamField>--**Returns:** `None`--## Listing Secrets--```python-entries = await SecretStore.list_secrets('store-uuid')-# [{'name': 'ANTHROPIC_API_KEY', 'allowedHosts': ['api.anthropic.com'], ...}, ...]-```--Returns secret metadata only. Values are never exposed.--### `SecretStore.list_secrets(store_id, **kwargs)`--**Returns:** `list[dict]`--## Deleting a Secret--```python-await SecretStore.delete_secret('store-uuid', 'DATABASE_URL')-```--### `SecretStore.delete_secret(store_id, name, **kwargs)`--**Returns:** `None`--## Creating a Sandbox with a Secret Store--Pass the `secret_store` parameter to `Sandbox.create()` to inject the store's secrets:--```python-from opencomputer import Sandbox--sandbox = await Sandbox.create(- secret_store='my-agent-secrets',- timeout=600,-)--# Secrets are available as sealed env vars-result = await sandbox.commands.run('echo $ANTHROPIC_API_KEY')-# stdout: "osb_sealed_abc123..." (sealed, not the real key)--# But outbound HTTPS requests get the real value substituted by the proxy-api_result = await sandbox.commands.run(- 'curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" ...'-)-# The proxy replaces the sealed token with the real key before it hits Anthropic-```--Request-level options (`timeout`, `envs`, `cpu_count`, etc.) work as normal alongside `secret_store`.diff --git a/docs/sdks/typescript/projects.mdx b/docs/sdks/typescript/projects.mdxdeleted file mode 100644index a0752995..00000000--- a/docs/sdks/typescript/projects.mdx+++ /dev/null@@ -1,207 +0,0 @@-----title: "Secret Stores & Secrets"-description: "Manage secret stores and encrypted secrets that are securely injected into sandboxes"------Secret stores hold encrypted secrets that are injected into sandboxes as sealed tokens. When you create a sandbox with a secret store, secrets are sealed inside the sandbox so they never exist as plaintext in VM memory.--## How Secrets Work--When a sandbox is created with a secret store:--1. The server decrypts the store's secrets-2. Secrets are sent to the worker and **sealed** into opaque tokens (`osb_sealed_...`)-3. Inside the sandbox, env vars contain sealed tokens — never real values-4. When the sandbox makes an outbound HTTPS request, the MITM proxy intercepts it and replaces sealed tokens with real values in headers and request body-5. The real secret only exists in the proxy's memory on the host, never inside the VM--## Creating a Secret Store--```typescript-import { SecretStore } from '@opencomputer/sdk';--const store = await SecretStore.create({- name: 'my-agent-secrets',- egressAllowlist: ['api.anthropic.com'],-});-```--### `SecretStore.create(opts)`--<ParamField body="opts" type="CreateSecretStoreOpts" required>- <Expandable title="properties">- <ParamField body="name" type="string" required>- Store name (unique per organization).- </ParamField>- <ParamField body="egressAllowlist" type="string[]" optional>- Allowed egress hosts (e.g. `["api.anthropic.com"]`).- </ParamField>- </Expandable>-</ParamField>--**Returns:** `Promise<SecretStoreInfo>`--## Listing Secret Stores--```typescript-const stores = await SecretStore.list();-```--### `SecretStore.list(opts?)`--**Returns:** `Promise<SecretStoreInfo[]>`--## Getting a Secret Store--```typescript-const store = await SecretStore.get('store-uuid');-```--### `SecretStore.get(storeId, opts?)`--<ParamField body="storeId" type="string" required>- UUID of the secret store.-</ParamField>--**Returns:** `Promise<SecretStoreInfo>`--## Updating a Secret Store--Partial updates — only the fields you pass are changed.--```typescript-const updated = await SecretStore.update('store-uuid', {- name: 'new-name',- egressAllowlist: ['api.anthropic.com', '*.openai.com'],-});-```--### `SecretStore.update(storeId, opts)`--<ParamField body="storeId" type="string" required>- UUID of the store to update.-</ParamField>-<ParamField body="opts" type="UpdateSecretStoreOpts" required>- <Expandable title="properties">- <ParamField body="name" type="string" optional>- New store name.- </ParamField>- <ParamField body="egressAllowlist" type="string[]" optional>- New allowed egress hosts.- </ParamField>- </Expandable>-</ParamField>--**Returns:** `Promise<SecretStoreInfo>`--## Deleting a Secret Store--```typescript-await SecretStore.delete('store-uuid');-```--Deletes the store and all its secrets. Running sandboxes are not affected.--### `SecretStore.delete(storeId, opts?)`--**Returns:** `Promise<void>`--## Setting a Secret--```typescript-await SecretStore.setSecret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...');-```--Secrets are encrypted at rest. The value is never returned by the API.--### `SecretStore.setSecret(storeId, name, value, opts?)`--<ParamField body="storeId" type="string" required>- UUID of the secret store.-</ParamField>-<ParamField body="name" type="string" required>- Secret name (used as the env var name in sandboxes).-</ParamField>-<ParamField body="value" type="string" required>- Secret value (encrypted at rest, never returned by API).-</ParamField>--Optionally restrict which hosts can receive this secret:--```typescript-await SecretStore.setSecret('store-uuid', 'ANTHROPIC_API_KEY', 'sk-ant-...', {- allowedHosts: ['api.anthropic.com'],-});-```--**Returns:** `Promise<void>`--## Listing Secrets--```typescript-const entries = await SecretStore.listSecrets('store-uuid');-// [{ name: 'ANTHROPIC_API_KEY', allowedHosts: ['api.anthropic.com'], ... }, ...]-```--Returns secret metadata only. Values are never exposed.--### `SecretStore.listSecrets(storeId, opts?)`--**Returns:** `Promise<SecretEntryInfo[]>`--## Deleting a Secret--```typescript-await SecretStore.deleteSecret('store-uuid', 'DATABASE_URL');-```--### `SecretStore.deleteSecret(storeId, name, opts?)`--**Returns:** `Promise<void>`--## Creating a Sandbox with a Secret Store--Pass the `secretStore` option to `Sandbox.create()` to inject the store's secrets:--```typescript-import { Sandbox } from '@opencomputer/sdk';--const sandbox = await Sandbox.create({- secretStore: 'my-agent-secrets',- timeout: 600,-});--// Secrets are available as sealed env vars-const result = await sandbox.commands.run('echo $ANTHROPIC_API_KEY');-// stdout: "osb_sealed_abc123..." (sealed, not the real key)--// But outbound HTTPS requests get the real value substituted by the proxy-const apiResult = await sandbox.commands.run(- 'curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" ...'-);-// The proxy replaces the sealed token with the real key before it hits Anthropic-```--Request-level options (`timeout`, `envs`, `cpuCount`, etc.) work as normal alongside `secretStore`.--## SecretStoreInfo Type--| Property | Type | Description |-| --- | --- | --- |-| `id` | `string` | Store UUID |-| `orgId` | `string` | Organization UUID |-| `name` | `string` | Store name |-| `egressAllowlist` | `string[]` | Allowed egress hosts |-| `createdAt` | `string` | ISO 8601 timestamp |-| `updatedAt` | `string` | ISO 8601 timestamp |--## SecretEntryInfo Type--| Property | Type | Description |-| --- | --- | --- |-| `id` | `string` | Entry UUID |-| `storeId` | `string` | Parent store UUID |-| `name` | `string` | Secret name (env var name) |-| `allowedHosts` | `string[]` | Host restrictions for this secret |-| `createdAt` | `string` | ISO 8601 timestamp |-| `updatedAt` | `string` | ISO 8601 timestamp |diff --git a/sdks/python/opencomputer/__init__.py b/sdks/python/opencomputer/__init__.pyindex e642b792..54d1298f 100644--- a/sdks/python/opencomputer/__init__.py+++ b/sdks/python/opencomputer/__init__.py@@ -28,4 +28,4 @@ __all__ = ["Snapshots",]-__version__ = "0.5.0"+__version__ = "0.5.1"diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.tomlindex 903b7969..3f21849d 100644--- a/sdks/python/pyproject.toml+++ b/sdks/python/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "hatchling.build"[project]name = "opencomputer-sdk"-version = "0.4.7"+version = "0.4.8"description = "Python SDK for OpenComputer - cloud sandbox platform"readme = "README.md"requires-python = ">=3.10"diff --git a/sdks/typescript/package.json b/sdks/typescript/package.jsonindex 2a787ad1..adba4319 100644--- a/sdks/typescript/package.json+++ b/sdks/typescript/package.json@@ -1,6 +1,6 @@{"name": "@opencomputer/sdk",- "version": "0.5.11",+ "version": "0.5.12","description": "TypeScript SDK for OpenComputer - cloud sandbox platform","type": "module","main": "dist/index.js",