Repository navigation
Highlights
- Agent state is private to each caller, and it expires. An agent with
state: { type: kv }now keeps one notebook per caller by default (scope: per_caller;scope: sharedkeeps the old behaviour), andstate.ttlfinally applies: a notebook expiresttlafter its last write. What one client stored is no longer replayed into the next client's prompt. - Refused before it costs anything. A push whose bundle no run could load, whose
agent.yamldeclares a setting no code honours, or that is too large or too complex to read is refused before anything is stored. A run nobody holds a model key for is refused before it starts — each refusal with its own error code and a message saying what to do. - Credentials, hardened end to end. API keys take a scanner-recognisable format (
skrun_sk_…), reading runs, stats, files or an agent's source takes a full-access credential, the sign-in cookies are host-locked, the CLI keeps one session per server and never sends a token elsewhere, neither the CLI nor the SDK follows a redirect, outbound requests refuse every reserved address range, redirects are held to an agent'sallowed_hosts, and log lines no longer carry error messages, model output or full URLs. - Accounts can be deleted.
DELETE /api/accountdeletes an account with its keys, sessions, agents, bundles, attached model keys and notebooks — its runs stay, their content cleared;DELETE /api/admin/accounts/:idlets an administrator do the same. An optional deletion journal (SKRUN_DELETION_JOURNAL) records deletions and key revocations so they can be done again on a database restored from an earlier copy. - Per-account limits, off until the operator sets them. Runs in progress, compute seconds per window, bundle storage and live uploads, an instance-wide capacity, and per-account plans an administrator assigns (
PUT /api/admin/accounts/:id/plan). Each account reads its own consumption withGET /api/usage,client.usage()in the SDK, or the dashboard's usage strip. - A sturdier Fly.io runtime (
SKRUN_RUNTIME=flyio). Every machine carries a label and a lifetime, a creation whose outcome is unknown is looked for instead of sent again, runner machines destroy themselves when they stop, the run stream beats while a machine is prepared, and the server ends its runs in flight cleanly onSIGTERM.
Breaking
This is a major release: the full list, with every error code, is in the CHANGELOG. What you must do:
- If you self-host: upgrading deletes every agent's state (export
agent_statefirst if you need it), and every instance on one Postgres database must be upgraded together. The Docker Compose stack readsinfra/.env(Docker Compose ≥ 2.24).@skrun-dev/runtime,@skrun-dev/apiand@skrun-dev/clineed Node ≥ 22.19. On Postgres, a statement stops after 10 s by default (SKRUN_DB_STATEMENT_TIMEOUT_MS); the server refuses to start on a malformedSKRUN_DB_STATEMENT_TIMEOUT_MS,SKRUN_DELETION_JOURNAL,SKRUN_PRIMARY_FAILOVER_MSorBUNDLE_MAX_DECOMPRESSED_MB. In production, the session cookie is now__Host-skrun_session: users sign in once more. Log events carryerror_name/error_code/error_statusinstead oferror: queries and alerts readingerrorstop matching. - If you run on Fly.io (
SKRUN_RUNTIME=flyio):flyctl machine stoporrestarton a runner machine now destroys it;skrun admin cleanup-machineshas no default age — a schedule that relied on one must pass--older-than; a synchronousPOST /runis refused400 SYNC_MODE_UNSUPPORTED— use the event stream or awebhook_url; anallowed_hostsentry the sandbox cannot enforce (a pattern, a port, a path) is refused400 EGRESS_HOST_UNSUPPORTED. - If you write agents:
state.typedefaults tonone— an agent that relied on the oldkvdefault must declare it;state.scopeneeds a 2.0.0 server. Validation and push refuse by name the settings no code honours (an MCPauthother thannone, a non-emptyenvironment.secrets, ametamodel withoutmodel.base_url, atimeoutout of range), YAML aliases,!!omap, a%YAMLversion other than 1.2, and anagent.yamlover 128 KB.environment.sandboxandenvironment.filesystemare retired. Afallbacknow takes over only before any tool has run. - If you call the API, the CLI or the SDK: API keys minted before this release are refused — mint replacements after the upgrade, then revoke the old ones; run
skrun login --registry <url>again (the CLI's sign-in file changed). A reduced key reads only what it launched or uploaded. The body ofPOST /runmust carryinput; a missing input is400 MISSING_INPUT(REQUIRED_INPUT_MISSINGis retired); a run nobody holds a model key for is400 LLM_KEY_REQUIRED. - If you embed
@skrun-dev/apior write an adapter:DbAdapterandStorageAdaptergain and change methods (state, account deletion, run admission and final writes); the CHANGELOG lists each.
Migration
- Before upgrading, if you need the agents' state:
SELECT * FROM agent_state. - Stop every instance that shares the database, then upgrade them together; the migrations apply at boot.
- Docker Compose: move your file to
infra/.env(keepPOSTGRES_PASSWORDand the storage keys as they are), thendocker compose -f infra/docker-compose.yml up -d. See Self-hosting with Docker. - After upgrading, each account mints new API keys and revokes the old ones; everyone runs
skrun login --registry <url>. - Agents that kept state without declaring it: add
state: { type: kv }and publish a new version.
Stats
- 7108 unit + integration tests pass (was 1973 at v1.2.1)
- 346 E2E in-memory (was 144), plus the live multi-provider suite
- OpenAPI 3.1 spec at 2.0.0
Install
npx @skrun-dev/cli@2.0.0 --version
# or
npm i -g @skrun-dev/cli@2.0.0Full changelog: CHANGELOG.md