@nylorun/create-agent 0.12.0-beta → 0.13.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 +23 -0
- package/README.md +7 -8
- package/compatibility.json +6 -6
- package/dist/arguments.d.ts +1 -1
- package/dist/arguments.js +1 -1
- package/dist/compatibility.json +6 -6
- package/dist/contracts.d.ts +1 -1
- package/dist/docker.d.ts +1 -1
- package/dist/docker.js +1 -1
- package/dist/project.js +4 -4
- package/dist/starter/README.md +15 -16
- package/dist/starter/src/main.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.1-beta
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
|
|
8
|
+
|
|
9
|
+
## 0.13.0-beta
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 4b9906f: **Breaking: "Tenant" replaces "stack", and `nylorun start` works anywhere.** Each local installation holds one Tenant, and its name is the Tenant's name, so help, output, errors and docs say Tenant. See MIGRATION.md.
|
|
14
|
+
|
|
15
|
+
- **Breaking (`nylorun`): selection.** Every command acts on the Tenant `--tenant <name>` names (replaces `--name`, which is removed), else `NYLORUN_TENANT` (replaces `NYLORUN_STACK`), else the Project link's `tenant`; `start` in a project names a new one after the project directory. Outside a project, or with `start --no-link`, commands act on the Tenant `default`. In a project without a link, commands other than `start` exit 2 and list the machine's Tenants. A name starting with `tn_` (a Tenant id) is refused.
|
|
16
|
+
- **Breaking (`nylorun`): files.** Host roots are under `~/.nylorun/tenants/<name>/` (was `~/.nylorun/stacks/<name>/`) with `tenant.json` (was `stack.json`); the `.env` key is `NYLORUN_TENANT_NAME` (was `NYLORUN_STACK_NAME`); `NYLORUN_COMPOSE_PROJECT` replaces `NYLORUN_STACK_PROJECT`. Compose projects stay `nylorun-<name>`. Every command first moves 0.4 Host roots from `~/.nylorun/stacks/` to `~/.nylorun/tenants/` (renaming `stack.json` and the `.env` key), so they keep their volumes and keys. `nylorun ls` lists only directories with `tenant.json`.
|
|
17
|
+
- **Breaking (`nylorun`): removed.** `nylorun legacy` and all handling of the single stack of releases before 0.4; the hidden `nylorun stack <cmd>` alias; `nylorun doctor stack|runtime`. Output says Tenant: `ls` prints `TENANT` and JSON `{ "tenants": [...] }`, `status` prints the Tenant id on its own line, and `doctor`'s row is `tenant`.
|
|
18
|
+
- **Breaking: Project link format 3.** `.nylorun/link.json` is `{ "format": 3, "tenant", "tenantId", "hostUrl", "hostId" }`; `tenant` replaces `stack`. `@nylorun/agents`, `@nylorun/cli` and `@nylorun/admin` refuse an older link and name `npx nylorun start`, which rewrites it. `@nylorun/core`'s `ProjectLinkFileSchema` parses formats 0–3 with `tenant`.
|
|
19
|
+
- **Breaking (`@nylorun/admin`):** `createAdmin({ tenant })` replaces `{ stack }`, `tenantHostRoot(name)` replaces `stackHostRoot(name)`, and local resolution reads `NYLORUN_TENANT` and the link's `tenant`.
|
|
20
|
+
- `@nylorun/cli`: `status` and `endpoints` drop the `stack` line and JSON key; messages say Tenant. `@nylorun/agents`: a Runtime too old for the client says "update the Runtime (npx nylorun@latest start)". `@nylorun/studio`: setup hints say Tenant. `@nylorun/create-agent`: the next steps describe `npx nylorun@beta start` as this project's Tenant and its link.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
|
|
25
|
+
|
|
3
26
|
## 0.12.0-beta
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Install the prerequisites first (the creator checks them and never installs
|
|
|
4
4
|
them): Node 24 or newer, and Docker with Compose v2 ([Docker
|
|
5
5
|
Desktop](https://docs.docker.com/get-started/get-docker/),
|
|
6
6
|
[OrbStack](https://orbstack.dev) or [Colima](https://github.com/abiosoft/colima)).
|
|
7
|
-
The local Runtime and Studio run
|
|
7
|
+
The local Runtime and Studio run in Docker Compose, which `nylorun`
|
|
8
8
|
manages. On Windows, work inside
|
|
9
9
|
[WSL2](https://learn.microsoft.com/windows/wsl/install) with Docker Desktop's WSL
|
|
10
10
|
integration; native Windows is not supported.
|
|
@@ -30,7 +30,7 @@ ignored: the creator starts nothing and opens no browser.
|
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
32
|
cd my-agent
|
|
33
|
-
npx nylorun@beta start # this project's
|
|
33
|
+
npx nylorun@beta start # this project's Tenant (Docker) and the link in .nylorun/
|
|
34
34
|
npm run dev # tsx watch src/main.ts
|
|
35
35
|
npx nylorun studio # a fresh Studio login on this project's Tenant
|
|
36
36
|
npm run build
|
|
@@ -38,9 +38,8 @@ npm start
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
`nylorun start` in the project creates and starts the project's own local
|
|
41
|
-
|
|
42
|
-
`--
|
|
43
|
-
Tenant. It writes the Project link and the derived application credentials to
|
|
41
|
+
Tenant (Runtime, Studio and their infrastructure in Docker, named after the
|
|
42
|
+
directory; `--tenant` picks or shares another). It writes the Project link and the derived application credentials to
|
|
44
43
|
gitignored `.nylorun/`, and seeds the model provider from `.env`
|
|
45
44
|
(`MODEL_PROVIDER`, `MODEL`, `MODEL_PROVIDER_API_KEY`) into the Tenant vault.
|
|
46
45
|
`@nylorun/cli` (command `nylo`) is the Runtime client: `nylo status`,
|
|
@@ -49,7 +48,7 @@ gitignored `.nylorun/`, and seeds the model provider from `.env`
|
|
|
49
48
|
`npm start` runs `node dist/src/main.js` with the same entry as development.
|
|
50
49
|
Export the Project environment (`eval "$(npx @nylorun/cli env)"`) before a
|
|
51
50
|
production start when there is no Project link. Tenant data, including the
|
|
52
|
-
vault, lives in the
|
|
51
|
+
vault, lives in the Tenant's Docker volumes. Definitions have no model provider or
|
|
53
52
|
`agent.run()`.
|
|
54
53
|
|
|
55
54
|
`starter/` is the canonical template. `compatibility.json` pins core, harness,
|
|
@@ -65,8 +64,8 @@ remain outside that registry for later migration.
|
|
|
65
64
|
`npm run test:starter` (`create-agent/scripts/smoke-starter.mjs`) packs the
|
|
66
65
|
workspace, scaffolds the starter from the packed creator, installs `nylorun`
|
|
67
66
|
and `@nylorun/cli` beside it (never into it), runs `nylorun start` in it and
|
|
68
|
-
`npm run dev` against a temporary local
|
|
69
|
-
|
|
67
|
+
`npm run dev` against a temporary local Tenant, then resets that Tenant,
|
|
68
|
+
seeds the fixture model and runs one turn that calls the starter's
|
|
70
69
|
tool.
|
|
71
70
|
|
|
72
71
|
See [RELEASING](../RELEASING.md) for the Changesets beta workflow. Nothing is
|
package/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.21.
|
|
3
|
-
"runtime": "0.15.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.2-beta",
|
|
3
|
+
"runtime": "0.15.2-beta",
|
|
4
|
+
"agents": "0.12.0-beta",
|
|
5
|
+
"admin": "0.8.0-beta",
|
|
6
|
+
"core": "0.11.0-beta",
|
|
7
|
+
"cli": "0.8.0-beta"
|
|
8
8
|
}
|
package/dist/arguments.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export declare const usage = "Usage: npm create @nylorun/agent@beta <directory>
|
|
|
3
3
|
/** Printed when `--no-open` is passed; the flag is accepted and ignored. */
|
|
4
4
|
export declare const NO_OPEN_IGNORED = "--no-open is ignored: the creator no longer starts development, so it opens no browser.";
|
|
5
5
|
/** Printed when `--no-studio` is passed; the flag is accepted and ignored. */
|
|
6
|
-
export declare const NO_STUDIO_DEPRECATED = "--no-studio is deprecated and ignored: Studio runs in
|
|
6
|
+
export declare const NO_STUDIO_DEPRECATED = "--no-studio is deprecated and ignored: Studio runs in Docker with each local Tenant, so generated projects no longer depend on @nylorun/studio. Use --no-open to keep the browser closed.";
|
|
7
7
|
export declare function parse(argv: readonly string[]): CreateOptions;
|
package/dist/arguments.js
CHANGED
|
@@ -2,7 +2,7 @@ export const usage = "Usage: npm create @nylorun/agent@beta <directory> [--yes]"
|
|
|
2
2
|
/** Printed when `--no-open` is passed; the flag is accepted and ignored. */
|
|
3
3
|
export const NO_OPEN_IGNORED = "--no-open is ignored: the creator no longer starts development, so it opens no browser.";
|
|
4
4
|
/** Printed when `--no-studio` is passed; the flag is accepted and ignored. */
|
|
5
|
-
export const NO_STUDIO_DEPRECATED = "--no-studio is deprecated and ignored: Studio runs in
|
|
5
|
+
export const NO_STUDIO_DEPRECATED = "--no-studio is deprecated and ignored: Studio runs in Docker with each local Tenant, so generated projects no longer depend on @nylorun/studio. Use --no-open to keep the browser closed.";
|
|
6
6
|
export function parse(argv) {
|
|
7
7
|
const [directory, ...flags] = argv;
|
|
8
8
|
if (!directory || directory.startsWith("-"))
|
package/dist/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.21.
|
|
3
|
-
"runtime": "0.15.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.2-beta",
|
|
3
|
+
"runtime": "0.15.2-beta",
|
|
4
|
+
"agents": "0.12.0-beta",
|
|
5
|
+
"admin": "0.8.0-beta",
|
|
6
|
+
"core": "0.11.0-beta",
|
|
7
|
+
"cli": "0.8.0-beta"
|
|
8
8
|
}
|
package/dist/contracts.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type CreateOptions = Readonly<{
|
|
|
12
12
|
/** Deprecation notes for accepted-and-ignored flags, printed first. */
|
|
13
13
|
notes?: readonly string[];
|
|
14
14
|
}>;
|
|
15
|
-
/** Docker and Compose v2, which
|
|
15
|
+
/** Docker and Compose v2, which local Tenants need. */
|
|
16
16
|
export type DockerCheck = Readonly<{
|
|
17
17
|
ok: true;
|
|
18
18
|
}> | Readonly<{
|
package/dist/docker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DockerCheck } from "./contracts.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A local Nylorun Tenant runs in Docker Compose. Report, never fix: a missing
|
|
4
4
|
* docker command, an engine that does not answer, or Compose older than v2.
|
|
5
5
|
*/
|
|
6
6
|
export declare function checkDocker(): Promise<DockerCheck>;
|
package/dist/docker.js
CHANGED
|
@@ -19,7 +19,7 @@ function run(args) {
|
|
|
19
19
|
}
|
|
20
20
|
const firstLine = (text) => text.trim().split(/\r?\n/u)[0] ?? "";
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* A local Nylorun Tenant runs in Docker Compose. Report, never fix: a missing
|
|
23
23
|
* docker command, an engine that does not answer, or Compose older than v2.
|
|
24
24
|
*/
|
|
25
25
|
export async function checkDocker() {
|
package/dist/project.js
CHANGED
|
@@ -75,12 +75,12 @@ export async function createProject(options, compatibility, dependencies) {
|
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* After creation: `nylorun start` in the project creates and starts its
|
|
78
|
-
* local
|
|
79
|
-
*
|
|
78
|
+
* local Tenant (Runtime and Studio in Docker) and links the project to it;
|
|
79
|
+
* then develop. The creator runs neither; the project itself
|
|
80
80
|
* depends only on @nylorun/agents.
|
|
81
81
|
*/
|
|
82
82
|
const NEXT = [
|
|
83
|
-
"npx nylorun@beta start # this project's
|
|
83
|
+
"npx nylorun@beta start # this project's Tenant (Docker) and the link in .nylorun/",
|
|
84
84
|
"npm run dev",
|
|
85
85
|
];
|
|
86
86
|
function nextSteps(destination) {
|
|
@@ -90,7 +90,7 @@ function nextSteps(destination) {
|
|
|
90
90
|
const MIN_NODE_MAJOR = 24;
|
|
91
91
|
/**
|
|
92
92
|
* Prerequisites the developer installs before `npm run dev`: Node 24 and
|
|
93
|
-
* Docker with Compose v2 (
|
|
93
|
+
* Docker with Compose v2 (local Tenants). The creator only reports them; it
|
|
94
94
|
* never downloads or starts anything.
|
|
95
95
|
*/
|
|
96
96
|
async function missingPrerequisites(dependencies) {
|
package/dist/starter/README.md
CHANGED
|
@@ -7,7 +7,7 @@ you; `npx nylorun@beta doctor` checks them.
|
|
|
7
7
|
- Docker with Compose v2: [Docker
|
|
8
8
|
Desktop](https://docs.docker.com/get-started/get-docker/),
|
|
9
9
|
[OrbStack](https://orbstack.dev) or [Colima](https://github.com/abiosoft/colima).
|
|
10
|
-
The local Runtime and Studio run
|
|
10
|
+
The local Runtime and Studio run in Docker Compose.
|
|
11
11
|
|
|
12
12
|
On Windows, use [WSL2](https://learn.microsoft.com/windows/wsl/install): install
|
|
13
13
|
Node inside your WSL distribution, enable Docker Desktop's WSL integration, and
|
|
@@ -16,27 +16,26 @@ watching works.
|
|
|
16
16
|
|
|
17
17
|
Agent and tool definitions live in `agents/`. The **Runtime** holds your
|
|
18
18
|
sessions in its **Tenant**, one per installation; this project attaches to
|
|
19
|
-
its own local
|
|
19
|
+
its own local Tenant through a **Project link**. Your tools run in this app: `src/main.ts` serves them as an **Action
|
|
20
20
|
endpoint** (`createActionHandler`) on `http://localhost:3001/nylorun/actions`
|
|
21
21
|
and registers that URL, and the Runtime delivers each tool call there, signed.
|
|
22
22
|
The project depends only on `@nylorun/agents`; the two Nylorun tools run with
|
|
23
23
|
`npx`:
|
|
24
24
|
|
|
25
|
-
- `nylorun` sets up and runs this project's local
|
|
25
|
+
- `nylorun` sets up and runs this project's local Tenant (Runtime and Studio)
|
|
26
26
|
and links the project to it.
|
|
27
27
|
- `@nylorun/cli` (command `nylo`) talks to a Runtime: its Tenant's status,
|
|
28
28
|
reset, Action endpoints and model provider.
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
npx nylorun@beta start # this project's
|
|
31
|
+
npx nylorun@beta start # this project's Tenant and the link; the first run pulls the images
|
|
32
32
|
npm run dev
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`nylorun start` in this directory sets up the project's
|
|
36
|
-
run (named after the directory, under `~/.nylorun/
|
|
37
|
-
starts it after that
|
|
38
|
-
|
|
39
|
-
stack keeps running after you stop `npm run dev`, so sessions survive a source
|
|
35
|
+
`nylorun start` in this directory sets up the project's Tenant on the first
|
|
36
|
+
run (named after the directory, under `~/.nylorun/tenants/<name>/`) and just
|
|
37
|
+
starts it after that. It prints the Runtime and Studio URLs and opens Studio,
|
|
38
|
+
signed in, in your browser. The Tenant keeps running after you stop `npm run dev`, so sessions survive a source
|
|
40
39
|
change; `npx nylorun stop` stops it (volumes are kept), `npx nylorun status`
|
|
41
40
|
shows its health, and `npx nylorun logs runtime -f` its logs.
|
|
42
41
|
|
|
@@ -50,7 +49,7 @@ incur its usual charges.
|
|
|
50
49
|
|
|
51
50
|
`npm run dev` runs `src/main.ts` with `tsx watch`: it serves the Action
|
|
52
51
|
endpoint on port 3001 (`PORT` changes it) and registers it with the Runtime,
|
|
53
|
-
which it finds through the Project link. The local
|
|
52
|
+
which it finds through the Project link. The local Runtime runs in
|
|
54
53
|
Docker and reaches `localhost` on this machine. `npx @nylorun/cli endpoints`
|
|
55
54
|
shows the endpoint and how its deliveries are doing. `npx nylorun studio` opens Studio on this
|
|
56
55
|
project's Tenant, and signs in a browser that is not signed in yet. In
|
|
@@ -82,16 +81,16 @@ eval "$(npx @nylorun/cli@beta env)"
|
|
|
82
81
|
```
|
|
83
82
|
|
|
84
83
|
Project link and credentials live in gitignored `.nylorun/` beside this project.
|
|
85
|
-
The
|
|
86
|
-
its files and the admin key; Tenant data lives in
|
|
84
|
+
The Tenant's Host root (`~/.nylorun/tenants/<name>/`, or `NYLORUN_HOME`) holds
|
|
85
|
+
its files and the admin key; Tenant data lives in its Docker volumes.
|
|
87
86
|
A fresh clone or second worktree does not reuse this link: `npx nylorun start`
|
|
88
|
-
there gives it a
|
|
89
|
-
links it to this project's
|
|
90
|
-
Keep `.nylorun/` private. The application key is derived from the
|
|
87
|
+
there gives it a Tenant of its own, and `npx nylorun start --tenant <name>`
|
|
88
|
+
links it to this project's Tenant instead.
|
|
89
|
+
Keep `.nylorun/` private. The application key is derived from the Tenant's
|
|
91
90
|
admin key when the project is linked. Each delivery carries a short-lived
|
|
92
91
|
token the endpoint verifies with the Tenant's public keys. Ordinary
|
|
93
92
|
shutdown/restart preserves completed session history; `npx @nylorun/cli reset
|
|
94
|
-
--all` empties the Tenant, and `npx nylorun reset` deletes
|
|
93
|
+
--all` empties the Tenant, and `npx nylorun reset` deletes all its data.
|
|
95
94
|
`NYLORUN_IMPLEMENTATION_VERSION` defaults to `dev`; assign an explicit version
|
|
96
95
|
when changing a versioned implementation.
|
|
97
96
|
|
package/dist/starter/src/main.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { createServer } from "node:http";
|
|
|
2
2
|
import { createActionHandler } from "@nylorun/agents";
|
|
3
3
|
import { agents } from "../agents/index.js";
|
|
4
4
|
|
|
5
|
-
// The Runtime delivers each tool call to this URL. On
|
|
5
|
+
// The Runtime delivers each tool call to this URL. On a local Tenant `localhost` means this
|
|
6
6
|
// machine; in production set NYLORUN_ACTIONS_URL to the URL the Runtime reaches this app at.
|
|
7
7
|
const port = Number(process.env.PORT ?? 3001);
|
|
8
8
|
const url = process.env.NYLORUN_ACTIONS_URL ?? `http://localhost:${port}/nylorun/actions`;
|