@nylorun/create-agent 0.14.6-beta → 0.15.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 +21 -0
- package/README.md +8 -9
- package/compatibility.json +5 -5
- package/dist/compatibility.json +5 -5
- package/dist/starter/README.md +16 -18
- package/dist/starter/environments/scratch.json +7 -0
- package/dist/starter/package.json +1 -1
- package/dist/starter/src/main.ts +12 -3
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9b07bdd: **Studio and the starter for environment manifests (protocol 14).**
|
|
8
|
+
|
|
9
|
+
- **Studio, Environments page:** lists the environment manifests (each one's latest version, its kind, how many Environments were made from it, and who saved it). It saves a new version from JSON, with Check showing the plan first, under `If-Match`, so a save over someone else's is refused. It also makes an Environment from a version. Studio is one more client: any credential that may write Environments can do the same from the CLI or the SDK.
|
|
10
|
+
- **Studio, Environment page:** shows the manifest version it was made from and whether a newer one exists ("Fork to vN"), the Environment it was forked from, its secret slots set or missing, and its pod's image digest. **Fork** opens the fork with its plan (disk, secrets copied and left behind, slots still missing, changes) before it makes the new Environment.
|
|
11
|
+
- **The starter** ships `environments/scratch.json` (a virtual workspace with no network). `src/main.ts` saves each manifest in `environments/` beside the agents.
|
|
12
|
+
- `@nylorun/agents` exports the manifest and fork contract types (`EnvironmentManifestView`, `EnvironmentManifestPlan`, `EnvironmentForkPlan`, …).
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Update the tested Harness, SDK, Admin and Runtime compatibility combination.
|
|
17
|
+
|
|
18
|
+
## 0.14.7-beta
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Update the tested Harness, SDK, Admin and Runtime compatibility combination.
|
|
23
|
+
|
|
3
24
|
## 0.14.6-beta
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -42,18 +42,17 @@ Tenant (Runtime, Studio and their infrastructure in Docker, named after the
|
|
|
42
42
|
directory; `--tenant` picks or shares another). It writes the Project link and the derived application credentials to
|
|
43
43
|
gitignored `.nylorun/`, and seeds the model provider from `.env`
|
|
44
44
|
(`MODEL_PROVIDER`, `MODEL`, `MODEL_PROVIDER_API_KEY`) into the Tenant vault.
|
|
45
|
-
`
|
|
46
|
-
|
|
47
|
-
`npx -p nylorun nylo configure` sets or replaces the provider.
|
|
45
|
+
`nylorun status` and `nylorun tenant reset` work on the linked Tenant. Studio or
|
|
46
|
+
`npx nylorun tenant models set` sets or replaces the provider.
|
|
48
47
|
`npm start` runs `node dist/src/main.js` with the same entry as development.
|
|
49
|
-
|
|
50
|
-
production start
|
|
48
|
+
Without a Project link, set `NYLORUN_RUNTIME_URL` and `NYLORUN_SERVER_KEY`
|
|
49
|
+
before a production start. Tenant data, including the
|
|
51
50
|
vault, lives in the Tenant's Docker volumes. Definitions have no model provider or
|
|
52
51
|
`agent.run()`.
|
|
53
52
|
|
|
54
53
|
`starter/` is the canonical template. `compatibility.json` pins core, harness,
|
|
55
54
|
agents, admin and Runtime. `nylorun` pins the Runtime and Studio images
|
|
56
|
-
it runs (`nylorun/package.json` `nylorun`). The examples recipe adds local
|
|
55
|
+
it runs (`cli/nylorun/package.json` `nylorun`). The examples recipe adds local
|
|
57
56
|
package dependencies. Run `npm run examples:sync` after template changes, then
|
|
58
57
|
`npm install --prefix examples`. Sync preserves authored agents, tests,
|
|
59
58
|
credentials, and local state; it rejects conflicting edits to generated files.
|
|
@@ -61,12 +60,12 @@ credentials, and local state; it rejects conflicting edits to generated files.
|
|
|
61
60
|
The default examples registry contains the release starter. Advanced examples
|
|
62
61
|
remain outside that registry for later migration.
|
|
63
62
|
|
|
64
|
-
`npm run test:starter` (`create-agent/scripts/smoke-starter.mjs`) packs the
|
|
63
|
+
`npm run test:starter` (`cli/create-agent/scripts/smoke-starter.mjs`) packs the
|
|
65
64
|
workspace, scaffolds the starter from the packed creator, installs `nylorun`
|
|
66
|
-
(and the deprecated `@nylorun/cli`, which it checks
|
|
65
|
+
(and the deprecated `@nylorun/cli`, which it checks names the nylorun command that replaced `nylo`)
|
|
67
66
|
beside it (never into it), runs `nylorun start` in it and
|
|
68
67
|
`npm run dev` against a temporary local Tenant, then resets that Tenant,
|
|
69
68
|
seeds the fixture model and runs one turn with the starter's assistant.
|
|
70
69
|
|
|
71
|
-
See [RELEASING](
|
|
70
|
+
See [RELEASING](../../guides/RELEASING.md) for the Changesets beta workflow. Nothing is
|
|
72
71
|
published by the smoke check.
|
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.27.0-beta",
|
|
3
|
+
"runtime": "0.25.0-beta",
|
|
4
|
+
"agents": "0.21.0-beta",
|
|
5
|
+
"admin": "0.17.0-beta",
|
|
6
|
+
"core": "0.21.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.27.0-beta",
|
|
3
|
+
"runtime": "0.25.0-beta",
|
|
4
|
+
"agents": "0.21.0-beta",
|
|
5
|
+
"admin": "0.17.0-beta",
|
|
6
|
+
"core": "0.21.0-beta"
|
|
7
7
|
}
|
package/dist/starter/README.md
CHANGED
|
@@ -17,14 +17,16 @@ 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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
26
|
+
depends only on `@nylorun/agents`; `nylorun` runs with `npx`. It sets up and
|
|
27
|
+
runs this project's local Tenant (Runtime and Studio), links the project to it,
|
|
28
|
+
and manages the Tenant: its status, reset and model provider
|
|
29
|
+
(`npx nylorun@beta <command>`).
|
|
28
30
|
|
|
29
31
|
```sh
|
|
30
32
|
npx nylorun@beta start # this project's Tenant and the link; the first run pulls the images
|
|
@@ -36,14 +38,14 @@ run (named after the directory, under `~/.nylorun/tenants/<name>/`) and just
|
|
|
36
38
|
starts it after that. It prints the Runtime and Studio URLs; `npx nylorun
|
|
37
39
|
studio` signs your browser in to Studio. The Tenant keeps running after you stop `npm run dev`, so sessions survive a source
|
|
38
40
|
change; `npx nylorun stop` stops it (volumes are kept), `npx nylorun status`
|
|
39
|
-
shows its health, and `npx nylorun logs runtime -f` its logs.
|
|
41
|
+
shows its health, and `npx nylorun local logs runtime -f` its logs.
|
|
40
42
|
|
|
41
43
|
The first `nylorun start` writes `.nylorun/link.json` and
|
|
42
44
|
`.nylorun/credentials.json`, and seeds the Tenant's model provider from
|
|
43
45
|
`MODEL_PROVIDER`, `MODEL` and `MODEL_PROVIDER_API_KEY` in `.env` (see
|
|
44
46
|
`.env.example`). The key is stored in the Tenant vault, never back in `.env`.
|
|
45
47
|
Without them, set the provider in Studio's Model provider screen, or with
|
|
46
|
-
`npx
|
|
48
|
+
`npx nylorun@beta tenant models set`. Model calls use the Tenant's provider and may
|
|
47
49
|
incur its usual charges.
|
|
48
50
|
|
|
49
51
|
`npm run dev` runs `src/main.ts` with `tsx watch`: it saves the agents to the
|
|
@@ -69,14 +71,10 @@ The assistant has no tools yet. A tool is an `http()` tool, a request the
|
|
|
69
71
|
Runtime makes to a service of yours (see the comment in
|
|
70
72
|
`agents/assistant/agent.ts`), a remote MCP server, or another agent used as a
|
|
71
73
|
tool. A code tool (`tool({ run })`) is refused when it is saved: the Runtime
|
|
72
|
-
runs
|
|
73
|
-
|
|
74
|
-
Export the linked Project environment:
|
|
74
|
+
runs agents from their manifests alone.
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
# → NYLORUN_RUNTIME_URL, NYLORUN_SERVER_KEY
|
|
79
|
-
```
|
|
76
|
+
The SDK reads the Project link itself; set `NYLORUN_RUNTIME_URL` and
|
|
77
|
+
`NYLORUN_SERVER_KEY` only to run the app outside this project.
|
|
80
78
|
|
|
81
79
|
Project link and credentials live in gitignored `.nylorun/` beside this project.
|
|
82
80
|
The Tenant's Host root (`~/.nylorun/tenants/<name>/`, or `NYLORUN_HOME`) holds
|
|
@@ -87,7 +85,7 @@ links it to this project's Tenant instead.
|
|
|
87
85
|
Keep `.nylorun/` private. The application key is derived from the Tenant's
|
|
88
86
|
admin key when the project is linked. Ordinary
|
|
89
87
|
shutdown/restart preserves completed session history; `npx -p nylorun nylo
|
|
90
|
-
reset --all` empties the Tenant, and `npx nylorun reset` deletes all its data.
|
|
88
|
+
reset --all` empties the Tenant, and `npx nylorun local reset` deletes all its data.
|
|
91
89
|
`NYLORUN_IMPLEMENTATION_VERSION` (default `dev`) labels each saved
|
|
92
90
|
definition.
|
|
93
91
|
|
|
@@ -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') }); })\" && tsc -p tsconfig.json",
|
|
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",
|
|
12
12
|
"start": "node dist/src/main.js",
|
|
13
13
|
"check": "tsc --noEmit"
|
|
14
14
|
},
|
package/dist/starter/src/main.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
1
2
|
import { createClient } from "@nylorun/agents";
|
|
2
3
|
import { agents } from "../agents/index.js";
|
|
3
4
|
|
|
4
|
-
// Saves each agent's definition to the Runtime, which runs
|
|
5
|
-
// The client finds the Runtime through the Project link, or
|
|
6
|
-
// NYLORUN_SERVER_KEY.
|
|
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.
|
|
7
8
|
const client = await createClient();
|
|
8
9
|
for (const agent of agents) {
|
|
9
10
|
await client.saveAgent(agent);
|
|
10
11
|
console.log(`Saved agent ${agent.id}`);
|
|
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}`);
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/create-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-beta",
|
|
4
4
|
"description": "Create a local Nylorun Harness agent project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/nylorun/agents.git",
|
|
10
|
-
"directory": "create-agent"
|
|
10
|
+
"directory": "cli/create-agent"
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/nylorun/agents",
|
|
13
13
|
"bugs": "https://github.com/nylorun/agents/issues",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"node": ">=24.0.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "npm run clean && node
|
|
32
|
+
"build": "npm run clean && node ../../scripts/check-typescript-version.mjs && tsc -p tsconfig.json && node scripts/copy-compatibility.mjs",
|
|
33
33
|
"check": "npm run build && npm run test:types && npm test && node scripts/check-package.mjs",
|
|
34
34
|
"test": "vitest run",
|
|
35
35
|
"test:types": "tsc -p test/tsconfig.json",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"prepack": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@nylorun/harness": "file
|
|
43
|
-
"@nylorun/runtime": "file
|
|
44
|
-
"@types/node": "^26.
|
|
42
|
+
"@nylorun/harness": "file:../../runtime/harness",
|
|
43
|
+
"@nylorun/runtime": "file:../../runtime/server",
|
|
44
|
+
"@types/node": "^26.6.4",
|
|
45
45
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
46
46
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
47
47
|
"vitest": "^5.0.2",
|
|
48
48
|
"zod": "^4.6.5",
|
|
49
|
-
"@nylorun/core": "file
|
|
50
|
-
"@nylorun/agents": "file
|
|
49
|
+
"@nylorun/core": "file:../../core",
|
|
50
|
+
"@nylorun/agents": "file:../../sdks/agents"
|
|
51
51
|
}
|
|
52
52
|
}
|