@nylorun/create-agent 0.15.1-beta → 0.16.0-beta

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - 22c61ce: Protocol 16, Agents from one manifest (track T2), a fresh start. An agent manifest (v8) is one versioned document at `/v1/agent-manifests/{name}` with a `harness` section (what runs inside the loop, including the harness's id) and a `runtime` section (what an environment manifest said). The Runtime checks the two against each other when it is saved (`422 manifest_inconsistent` with `details.gaps`), in place of `requires` at session open. Agent definitions and environment manifests are gone.
8
+
9
+ Environments are Agents: `/v1/agents/{id}` and its sub-routes, made from a saved manifest only (`manifest: "name"` tracks it, `"name@n"` pins a version; either resolves once, into `resolvedVersion`), with a derived `state` (`working`, `sleeping`, `input_required`, `failing`, `paused`) and `attention`. Every session runs on one Agent (`PUT /v1/sessions/{id} { agent, ownerUserId }`) and pins its manifest version. No session is special (D71). Error codes, events (`agent.*`), scopes (`agents:write`, `agent-manifests:write`) and identity-file grants (`agents`) say Agent; model budget scope `agent` is `manifest`. Harness API 5: `turn.start.agent` replaces `turn.start.environment`, with `definition` and `loop`. Migration 0032 closes older sessions (`protocol_16`) and drops Environments with their disks and vaults.
10
+
11
+ The SDK has `client.agentManifests`, `client.agents` and `composeManifest(dir)` for three-file authoring; the CLI has `nylorun apply`, `nylorun agent-manifests`, `nylorun agents` and `nylorun migrate v8`; Studio has an Agents screen, an Agent page and an Agent manifests screen. See MIGRATION.md.
12
+
13
+ ### Patch Changes
14
+
15
+ - cc8d034: Track T3 in the clients. The SDK has `client.agents.plan(id, input)` (what a move would do), `client.agents.restart(id, { retry? })` and `list({ outdated: true })`. The CLI has `nylorun agents pin <id> <n>`, `track <id>`, `restart <id> [--retry]`, `put --dry-run`, and `list --outdated` (`--behind` kept as its alias), and prints the version an Agent moves to. Studio's Agent page moves an Agent (Move to vN, Pin, Track), restarts it on a pending version or retries a failed one, and shows "vN at next start", a version waiting for secrets, or one that failed to start. The starter's dev loop no longer deletes and remakes its Agent: the tracking Agent moves on each save.
16
+ - Update the tested Harness, SDK, Admin and Runtime compatibility combination.
17
+
18
+ ## 0.15.2-beta
19
+
20
+ ### Patch Changes
21
+
22
+ - Update the tested Harness, SDK, Admin and Runtime compatibility combination.
23
+
3
24
  ## 0.15.1-beta
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -17,10 +17,12 @@ npm create @nylorun/agent@beta my-agent
17
17
 
18
18
  Creates a Node 24 project whose only Nylorun dependency is `@nylorun/agents`
19
19
  (plus Zod). The registry in `agents/index.ts` exports agent definitions.
20
- `src/main.ts` saves each agent to the Runtime with `client.saveAgent`: on every
21
- source edit under `npm run dev`, once under `npm start`. No code of the
22
- project runs during a session; the starter's assistant has no tools, and a
23
- comment shows how to add an `http()` tool.
20
+ `src/main.ts` saves each agent to the Runtime as an agent manifest
21
+ (`client.agentManifests.save`, with the runtime section in
22
+ `runtime/scratch.runtime.json`) and makes its Agent (`client.agents.put`, id the
23
+ agent's): on every source edit under `npm run dev`, once under `npm start`. No
24
+ code of the project runs during a session; the starter's assistant has no
25
+ tools, and a comment shows how to add an `http()` tool.
24
26
 
25
27
  Creation installs the project's dependencies and prints the next steps. If a
26
28
  prerequisite is missing (Node older than 24, no `docker`, an engine that does
@@ -31,7 +33,7 @@ ignored: the creator starts nothing and opens no browser.
31
33
  ```sh
32
34
  cd my-agent
33
35
  npx nylorun@beta start # this project's Tenant (Docker) and the link in .nylorun/
34
- npm run dev # tsx watch src/main.ts: saves the agents
36
+ npm run dev # tsx watch src/main.ts: saves the agents, makes their Agents
35
37
  npx nylorun studio # a fresh Studio login on this project's Tenant
36
38
  npm run build
37
39
  npm start
@@ -1,7 +1,7 @@
1
1
  {
2
- "harness": "0.27.1-beta",
3
- "runtime": "0.26.0-beta",
4
- "agents": "0.22.0-beta",
5
- "admin": "0.17.1-beta",
6
- "core": "0.22.0-beta"
2
+ "harness": "0.29.0-beta",
3
+ "runtime": "0.28.0-beta",
4
+ "agents": "0.24.0-beta",
5
+ "admin": "0.19.0-beta",
6
+ "core": "0.24.0-beta"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "harness": "0.27.1-beta",
3
- "runtime": "0.26.0-beta",
4
- "agents": "0.22.0-beta",
5
- "admin": "0.17.1-beta",
6
- "core": "0.22.0-beta"
2
+ "harness": "0.29.0-beta",
3
+ "runtime": "0.28.0-beta",
4
+ "agents": "0.24.0-beta",
5
+ "admin": "0.19.0-beta",
6
+ "core": "0.24.0-beta"
7
7
  }
@@ -5,4 +5,3 @@
5
5
  # MODEL=...
6
6
  # MODEL_PROVIDER_API_KEY=...
7
7
  # MODEL_PROVIDER_BASE_URL=... # only for a custom provider
8
- # NYLORUN_IMPLEMENTATION_VERSION=dev
@@ -17,12 +17,14 @@ watching works.
17
17
  Agent definitions live in `agents/`. The **Runtime** runs your agents and
18
18
  holds their sessions in its **Tenant**, one per installation; this project
19
19
  attaches to its own local Tenant through a **Project link**. `src/main.ts`
20
- saves each agent in `agents/index.ts` to the Runtime (`client.saveAgent`), and
21
- each environment manifest in `environments/` (`environments/scratch.json`, a
22
- virtual workspace with no network), and exits; from then on the Runtime runs
23
- them from what was saved. Make an Environment from a manifest with
24
- `npx nylorun@beta environments put <id> --manifest scratch`; it keeps that
25
- version for life, and `environments fork` moves it to a newer one. The project
20
+ saves each agent in `agents/index.ts` to the Runtime as an agent manifest
21
+ (`client.agentManifests.save`), with the runtime section in
22
+ `runtime/scratch.runtime.json` (a virtual workspace with no network), makes the
23
+ **Agent** its sessions run on (`client.agents.put`, named after the agent), and
24
+ exits; from then on the Runtime runs them from what was saved. The Agent tracks
25
+ its manifest: each save moves it to the new version in place, and each
26
+ session's next turn runs it (`npx nylorun@beta agents pin assistant <n>` keeps
27
+ it on one version). The project
26
28
  depends only on `@nylorun/agents`; `nylorun` runs with `npx`. It sets up and
27
29
  runs this project's local Tenant (Runtime and Studio), links the project to it,
28
30
  and manages the Tenant: its status, reset and model provider
@@ -49,7 +51,7 @@ Without them, set the provider in Studio's Model provider screen, or with
49
51
  incur its usual charges.
50
52
 
51
53
  `npm run dev` runs `src/main.ts` with `tsx watch`: it saves the agents to the
52
- Runtime, which it finds through the Project link, and saves them again on
54
+ Runtime, which it finds through the Project link, and saves a new version on
53
55
  every source edit. `npx nylorun studio` opens Studio on this project's Tenant,
54
56
  and signs in a browser that is not signed in yet; chat with the assistant
55
57
  there. The Runtime listens on
@@ -64,8 +66,10 @@ npm start
64
66
  `npm start` runs `node dist/src/main.js`, the same entry as development: it
65
67
  saves the agents once, a deploy step. Set `NYLORUN_RUNTIME_URL` and
66
68
  `NYLORUN_SERVER_KEY` before starting, or keep the Project link beside this
67
- directory. `agents/index.ts` exports the registry. Start a new session after
68
- changing definitions; active-session upgrades are not supported.
69
+ directory. `agents/index.ts` exports the registry. Under `npm run dev` and
70
+ `npm start` alike, each save moves the Agent to the new version: its sessions,
71
+ open ones included, run your edit from their next turn, with its workspace as
72
+ it was (a turn already running ends on its version).
69
73
 
70
74
  The assistant has no tools yet. A tool is an `http()` tool, a request the
71
75
  Runtime makes to a service of yours (see the comment in
@@ -86,8 +90,6 @@ Keep `.nylorun/` private. The application key is derived from the Tenant's
86
90
  admin key when the project is linked. Ordinary
87
91
  shutdown/restart preserves completed session history; `npx -p nylorun nylo
88
92
  reset --all` empties the Tenant, and `npx nylorun local reset` deletes all its data.
89
- `NYLORUN_IMPLEMENTATION_VERSION` (default `dev`) labels each saved
90
- definition.
91
93
 
92
94
  This beta supports local text, HTTP tools, remote MCP servers and agents used
93
95
  as tools; the starter itself wires none of them. Advanced waits, media,
@@ -7,8 +7,8 @@
7
7
  "node": ">=24.0.0"
8
8
  },
9
9
  "scripts": {
10
- "dev": "tsx watch --env-file-if-exists=.env src/main.ts",
11
- "build": "node -e \"import('node:fs/promises').then(async ({rm,cp}) => { await rm('dist', { recursive: true, force: true }); await cp('agents', 'dist/agents', { recursive: true, filter: (source) => !source.endsWith('.ts') }); await cp('environments', 'dist/environments', { recursive: true }); })\" && tsc -p tsconfig.json",
10
+ "dev": "tsx watch --env-file-if-exists=.env src/main.ts --dev",
11
+ "build": "node -e \"import('node:fs/promises').then(async ({rm,cp}) => { await rm('dist', { recursive: true, force: true }); await cp('agents', 'dist/agents', { recursive: true, filter: (source) => !source.endsWith('.ts') }); await cp('runtime', 'dist/runtime', { recursive: true }); })\" && tsc -p tsconfig.json",
12
12
  "start": "node dist/src/main.js",
13
13
  "check": "tsc --noEmit"
14
14
  },
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://docs.nylorun.com/schemas/runtime-manifest/v1.json",
3
+ "kind": "virtual",
4
+ "network": { "allowedHosts": [] }
5
+ }
@@ -1,20 +1,20 @@
1
- import { readdir, readFile } from "node:fs/promises";
1
+ import { readFile } from "node:fs/promises";
2
2
  import { createClient } from "@nylorun/agents";
3
3
  import { agents } from "../agents/index.js";
4
4
 
5
- // Saves each agent's definition and each environment manifest to the Runtime, which runs them;
6
- // nothing here keeps running. The client finds the Runtime through the Project link, or
7
- // NYLORUN_RUNTIME_URL and NYLORUN_SERVER_KEY.
5
+ // Saves each agent as an agent manifest, with the runtime it runs in, and makes the Agent its
6
+ // sessions run on (named after it); nothing here keeps running. The client finds the Runtime
7
+ // through the Project link, or NYLORUN_RUNTIME_URL and NYLORUN_SERVER_KEY.
8
8
  const client = await createClient();
9
+ // The runtime section the agents share: a virtual workspace with no network.
10
+ const { $schema: _, ...runtime } = JSON.parse(
11
+ await readFile(new URL("../runtime/scratch.runtime.json", import.meta.url), "utf8"),
12
+ );
13
+ // The Agent tracks its manifest: each save moves it to the new version in place, with its disk,
14
+ // vault and sessions, and each session's next turn runs your edit (a turn already running ends on
15
+ // its version).
9
16
  for (const agent of agents) {
10
- await client.saveAgent(agent);
11
- console.log(`Saved agent ${agent.id}`);
12
- }
13
- // An Environment is made from one version of a manifest and never changes; a new version
14
- // reaches it through a fork.
15
- const environments = new URL("../environments/", import.meta.url);
16
- for (const file of (await readdir(environments)).filter((name) => name.endsWith(".json"))) {
17
- const manifest = JSON.parse(await readFile(new URL(file, environments), "utf8"));
18
- const { manifest: saved, unchanged } = await client.environments.manifests.save(manifest);
19
- console.log(`${unchanged ? "Unchanged" : "Saved"} environment manifest ${saved.name} v${saved.version}`);
17
+ const { manifest } = await client.agentManifests.save({ agent, runtime });
18
+ const made = await client.agents.put(agent.id, { manifest: agent.id });
19
+ console.log(`Saved agent ${agent.id} v${manifest.version} (Agent ${made.id} runs v${made.resolvedVersion})`);
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/create-agent",
3
- "version": "0.15.1-beta",
3
+ "version": "0.16.0-beta",
4
4
  "description": "Create a local Nylorun Harness agent project.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -41,11 +41,11 @@
41
41
  "devDependencies": {
42
42
  "@nylorun/harness": "file:../../runtime/harness",
43
43
  "@nylorun/runtime": "file:../../runtime/server",
44
- "@types/node": "^26.6.4",
44
+ "@types/node": "^26.6.5",
45
45
  "@typescript/native": "npm:typescript@^7.0.2",
46
46
  "typescript": "npm:@typescript/typescript6@^6.0.2",
47
- "vitest": "^5.0.2",
48
- "zod": "^4.6.5",
47
+ "vitest": "^5.0.4",
48
+ "zod": "^4.6.7",
49
49
  "@nylorun/core": "file:../../core",
50
50
  "@nylorun/agents": "file:../../sdks/agents"
51
51
  }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "https://docs.nylorun.com/schemas/environment-manifest/v1.json",
3
- "manifestSchemaVersion": 1,
4
- "name": "scratch",
5
- "kind": "virtual",
6
- "network": { "allowedHosts": [] }
7
- }