@nylorun/create-agent 0.15.2-beta → 0.16.1-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 +22 -0
- package/README.md +7 -5
- package/compatibility.json +5 -5
- package/dist/compatibility.json +5 -5
- package/dist/starter/.env.example +0 -1
- package/dist/starter/README.md +15 -13
- package/dist/starter/package.json +1 -1
- package/dist/starter/runtime/scratch.runtime.json +5 -0
- package/dist/starter/src/main.ts +14 -14
- package/package.json +4 -4
- package/dist/starter/environments/scratch.json +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.1-beta
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ed08ba8: The starter's `npm run dev` no longer passes `--dev`, which `src/main.ts` stopped reading when the Agent began tracking its manifest, and its README empties the Tenant with `npx nylorun tenant reset --all` instead of `npx -p nylorun nylo reset --all`, which exits 2.
|
|
8
|
+
- Update the tested Harness, SDK, Admin and Runtime compatibility combination.
|
|
9
|
+
|
|
10
|
+
## 0.16.0-beta
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 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.
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
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.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 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.
|
|
23
|
+
- Update the tested Harness, SDK, Admin and Runtime compatibility combination.
|
|
24
|
+
|
|
3
25
|
## 0.15.2-beta
|
|
4
26
|
|
|
5
27
|
### 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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
package/compatibility.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
2
|
+
"harness": "0.29.1-beta",
|
|
3
|
+
"runtime": "0.29.0-beta",
|
|
4
|
+
"agents": "0.25.0-beta",
|
|
5
|
+
"admin": "0.19.1-beta",
|
|
6
|
+
"core": "0.25.0-beta"
|
|
7
7
|
}
|
package/dist/compatibility.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
2
|
+
"harness": "0.29.1-beta",
|
|
3
|
+
"runtime": "0.29.0-beta",
|
|
4
|
+
"agents": "0.25.0-beta",
|
|
5
|
+
"admin": "0.19.1-beta",
|
|
6
|
+
"core": "0.25.0-beta"
|
|
7
7
|
}
|
package/dist/starter/README.md
CHANGED
|
@@ -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
|
|
21
|
-
|
|
22
|
-
virtual workspace with no network),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
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.
|
|
68
|
-
|
|
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
|
|
@@ -84,10 +88,8 @@ there gives it a Tenant of its own, and `npx nylorun start --tenant <name>`
|
|
|
84
88
|
links it to this project's Tenant instead.
|
|
85
89
|
Keep `.nylorun/` private. The application key is derived from the Tenant's
|
|
86
90
|
admin key when the project is linked. Ordinary
|
|
87
|
-
shutdown/restart preserves completed session history; `npx
|
|
88
|
-
|
|
89
|
-
`NYLORUN_IMPLEMENTATION_VERSION` (default `dev`) labels each saved
|
|
90
|
-
definition.
|
|
91
|
+
shutdown/restart preserves completed session history; `npx nylorun tenant reset
|
|
92
|
+
--all` empties the Tenant, and `npx nylorun local reset` deletes all its data.
|
|
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,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
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('
|
|
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
|
},
|
package/dist/starter/src/main.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
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
|
|
6
|
-
// nothing here keeps running. The client finds the Runtime
|
|
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.
|
|
11
|
-
|
|
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.
|
|
3
|
+
"version": "0.16.1-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.
|
|
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.
|
|
48
|
-
"zod": "^4.6.
|
|
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
|
}
|