Migrate from 0.18 to 0.19
Move a subagents-era Project to Runtime Hosts, Tenants, protocol 2, workflows, and Hosted Studio.
Harness 0.19 is a breaking pre-1.0 release. Upgrade the tested package set together; do not mix protocol-1 clients with a protocol-2 Runtime Host.
Upgrade packages and scripts
| Package | From | To |
|---|---|---|
@nylorun/agents | 0.5.0-beta | 0.6.0-beta |
@nylorun/core | 0.4.0-beta | 0.5.0-beta |
@nylorun/harness | 0.18.0-beta | 0.19.0-beta |
@nylorun/runtime | 0.9.0-beta | 0.10.0-beta |
@nylorun/cli | 0.2.1-beta | 0.3.0-beta |
@nylorun/studio | 0.8.0-beta | 0.9.0-beta |
@nylorun/create-agent | 0.8.1-beta | 0.9.0-beta |
Keep @nylorun/agents in dependencies. Move CLI and Studio to
devDependencies; application code no longer depends on @nylorun/runtime.
Operator applications can add @nylorun/admin@0.2.0-beta.
Install the Runtime separately. The CLI does not download it:
node --version
npm install --global @nylorun/runtime@0.10.0-beta
npx nylorun doctor runtimeThe Runtime supports macOS and Linux. On Windows, install it inside WSL2 and keep Projects in the Linux filesystem.
Replace the compiled entry:
"scripts": {
"dev": "nylorun dev",
- "studio": "nylorun studio",
- "start": "nylorun serve"
+ "studio": "nylorun-studio",
+ "start": "node dist/src/main.js"
}Add src/main.ts:
import { connectAgents } from "@nylorun/agents";
import { agents } from "../agents/index.js";
await connectAgents({ agents }).ready;Ensure the TypeScript build emits that file to dist/src/main.js.
Move from Project Runtime to Host and Tenant
The old Project .nylorun/ directory held SQLite, Runtime credentials, pid,
logs, and vault data. The new layout is:
- Host root:
NYLORUN_HOMEor~/.nylorun. - Tenant data:
<host root>/tenants/<tenantId>/. - Project link:
.nylorun/link.jsonplus.nylorun/credentials.json.
Stop the old Runtime, preserve a backup of its .nylorun/ directory, upgrade,
then run nylorun runtime up followed by nylorun dev. The CLI creates a new
Tenant or lets you select an existing one and writes the Project link.
Old SQLite checkpoints and session/event files are not automatically imported. Keep backups for audit needs and start new sessions after upgrading.
Update clients and HTTP calls
Every Tenant request now requires protocol 2 and an explicit Tenant:
import { createClient } from "@nylorun/agents";
const client = createClient({
url: process.env.NYLORUN_RUNTIME_URL!,
key: process.env.NYLORUN_SERVER_KEY!,
tenant: process.env.NYLORUN_TENANT!,
});The SDK sends Nylorun-Tenant and Nylorun-Protocol. Code that performs raw
HTTP must send both. Move model routes from /v1/host/* to /v1/tenant/* and
replace startup executor configuration with PUT /v1/executors or
connectAgents.
With no arguments, createClient() and connectAgents() resolve environment
variables first and then the nearest Project link. A partial explicit or
environment connection is an error rather than a signal to fall through.
Replace CLI commands
| Before | After |
|---|---|
Top-level nylorun up, down, or logs | Canonical nylorun runtime up, down, or logs; short aliases remain. |
nylorun serve | nylorun dev for watch mode; node dist/src/main.js for production. |
| Project/global SQLite selectors | Host root plus Project link and nylorun tenant …. |
| Runtime package in the application | Separately installed Runtime providing nylorun-runtime; CLI records the recommended version. |
nylorun studio, nylorun-studio, and development --no-studio remain
supported. Hosted Studio is the default; use --local-ui for Safari or offline
work.
Verify the migration
- Run
nylorun doctor runtime,npm run check, andnpm run build. - Run
nylorun runtime statusand confirm protocol 2 and the intended Tenant. - Run
nylorun tenant current, thennpm run dev. - Open a new Studio session and exercise one tool or workflow.
- Stop the application and confirm the Host remains available before using
nylorun runtime down.