sandcovery 0.7.0 → 0.9.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/README.md +7 -6
- package/dist/cli/index.mjs +13015 -19892
- package/dist/cli/sandcovery-docker.mjs +8550 -3
- package/dist/cli/sandcovery-kubectl.mjs +7 -4
- package/dist/cli/sandcovery-t3.mjs +76 -51
- package/dist/index.d.mts +8716 -134
- package/dist/index.mjs +1 -1
- package/dist/{kubectl-ClFWX65x.mjs → kubectl-Ck04daor.mjs} +131 -97
- package/dist/saved-sandboxes-BMjkAVGx.mjs +389 -0
- package/dist/{x-account-BSasf-z-.mjs → src-DjOLw-ft.mjs} +19057 -8175
- package/dist/sync-rEFjHNC4.mjs +4171 -0
- package/dist/third-party-licenses.md +630 -0
- package/dist/types-DotsDqXt.d.mts +1264 -0
- package/dist/types.d.mts +2 -2
- package/package.json +4 -4
- package/dist/src-gAv6vIvE.mjs +0 -566
- package/dist/tool-B8KvfvY5.mjs +0 -12890
- package/dist/types-B52jOW9v.d.mts +0 -853
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ import { Sandcovery } from 'sandcovery'
|
|
|
24
24
|
const sandcovery = new Sandcovery()
|
|
25
25
|
|
|
26
26
|
const sandbox = await sandcovery.sandboxes.create({
|
|
27
|
+
api_key_id: null,
|
|
27
28
|
disk_mib: null,
|
|
28
29
|
egress: null,
|
|
29
30
|
env: null,
|
|
@@ -65,11 +66,11 @@ Sandcovery destroys every sandbox at its `ttl_seconds`, even when your process e
|
|
|
65
66
|
|
|
66
67
|
## Command line
|
|
67
68
|
|
|
68
|
-
The package also installs the `sandcovery` command. Each operation in the [OpenAPI document](https://www.sandcovery.com/
|
|
69
|
+
The package also installs the `sandcovery` command. Each operation in the [OpenAPI document](https://www.sandcovery.com/openapi.json) is one command, `sandcovery <group> <operation>`, named as the document names it, and each of its parameters and body fields is a flag of the same name.
|
|
69
70
|
|
|
70
71
|
```sh
|
|
71
72
|
npm install --global sandcovery
|
|
72
|
-
export SANDCOVERY_API_KEY=
|
|
73
|
+
export SANDCOVERY_API_KEY=ak_...
|
|
73
74
|
|
|
74
75
|
id=$(sandcovery sandboxes createSandbox --slug sandcovery/2x4:cheapest --ttl_seconds 600 | jq -r .id)
|
|
75
76
|
sandcovery sandboxes execSandbox --sandbox_id "$id" --command 'npm test'
|
|
@@ -91,7 +92,7 @@ The package installs three more commands that run your tools on sandboxes throug
|
|
|
91
92
|
|
|
92
93
|
## Routing
|
|
93
94
|
|
|
94
|
-
A slug names a provider and a size, written `<provider>/<vcpu>x<memory_gib>`, in the shape of OpenRouter model slugs. `boat/2x4` pins boat at 2 vCPU and 4 GiB, and `sandcovery/2x4` routes across every candidate provider. Either number may be `n` for any value, so `sandcovery/nx16` runs each provider's cheapest size with 16 GiB. A slug routes as `:cheapest`, sorting candidates by
|
|
95
|
+
A slug names a provider and a size, written `<provider>/<vcpu>x<memory_gib>`, in the shape of OpenRouter model slugs. `boat/2x4` pins boat at 2 vCPU and 4 GiB, and `sandcovery/2x4` routes across every candidate provider. Either number may be `n` for any value, so `sandcovery/nx16` runs each provider's cheapest size with 16 GiB. A slug routes as `:cheapest`, sorting candidates by hourly price, and a provider that charges by the month has no per-use price to compare, so `:cheapest` never picks one. Add `:fastest` or `:most-reliable` to sort them by measured create latency or uptime over the last 15 minutes instead. With no slug, a create runs `sandcovery/2x4`.
|
|
95
96
|
|
|
96
97
|
`slugs` takes up to 8 slugs to try in order, as OpenRouter takes `models`, and `slug` goes first when both are set. Within a `sandcovery/` slug, a failed create falls back across that slug's candidates first, then moves to the next slug. `provider` takes `order`, `only`, `ignore`, `sort`, and `allow_fallbacks` and applies them to every slug. Every create attempt is listed in `sandbox.attempts`, and `sandbox.slug` is the provider and size it runs on.
|
|
97
98
|
|
|
@@ -104,12 +105,12 @@ Provider, region, and slug names are open strings, so a name the API adds later
|
|
|
104
105
|
```ts
|
|
105
106
|
const admin = new Sandcovery({ apiKey: process.env.SANDCOVERY_MANAGEMENT_KEY })
|
|
106
107
|
|
|
107
|
-
await admin.credentials.set('e2b', { api_key: process.env.E2B_API_KEY })
|
|
108
|
+
await admin.credentials.set('e2b', { api_key: process.env.E2B_API_KEY ?? '' })
|
|
108
109
|
```
|
|
109
110
|
|
|
110
111
|
On Pro or the Enterprise plan, an organization holds as many credentials per provider as it needs: `credentials.add(provider, fields)` adds another, a create tries a provider's credentials in the order they were added, and `credentials.deleteOne(provider, id)` deletes one. A Free organization routes one of its own keys per provider, so adding a second key of the same provider receives 403. When an organization leaves Pro or the Enterprise plan, it keeps every key, routes the oldest key of each provider, and `paused` is `true` on the others until it is on Pro or the Enterprise plan again.
|
|
111
112
|
|
|
112
|
-
The fields each provider takes are its `credential_fields` on `sandcovery.providers.get(provider)`. `sandcovery.providers.catalog()` lists every provider on the [provider board](https://www.sandcovery.com/providers), where `routed` is `false` for a provider that is coming soon. `credentials.offer()` reads the free
|
|
113
|
+
The fields each provider takes are its `credential_fields` on `sandcovery.providers.get(provider)`. `sandcovery.providers.catalog()` lists every provider on the [provider board](https://www.sandcovery.com/providers), where `routed` is `false` for a provider that is coming soon. `credentials.offer()` reads the free vCPUh your keys have earned, `credentials.countXPost()` finds your newest post on X of the last day that tags @Sandcovery and counts it as one key, reading X at most 10 times a UTC day and 30 seconds apart for an organization and otherwise answering `retry_later` with `retry_at`, `billing.get()` reads the plan, the credit balance, and auto top-up, `billing.buyCredits({ amount_micro_usd })` answers the Stripe Checkout page that takes a credit payment, `billing.setAutoTopUp({ amount_micro_usd, threshold_micro_usd })` sets the amount Sandcovery charges the saved card each time the credit balance falls below the threshold and answers the Stripe Checkout page that saves a card when none is saved, and `billing.stopAutoTopUp()` turns auto top-up off.
|
|
113
114
|
|
|
114
115
|
## X account
|
|
115
116
|
|
|
@@ -117,7 +118,7 @@ The fields each provider takes are its `credential_fields` on `sandcovery.provid
|
|
|
117
118
|
|
|
118
119
|
## Interfaces
|
|
119
120
|
|
|
120
|
-
This client, the `sandcovery` command
|
|
121
|
+
This client, the Python client, and the `sandcovery` command cover the product operations they expose. Health, usable keys, credential field choices, CLI sign-in, and agents live on the HTTP API and the CLI.
|
|
121
122
|
|
|
122
123
|
## Errors
|
|
123
124
|
|