@nylorun/create-agent 0.11.0-beta → 0.12.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 +18 -0
- package/README.md +14 -12
- package/compatibility.json +6 -6
- package/dist/compatibility.json +6 -6
- package/dist/project.js +5 -6
- package/dist/starter/.env.example +2 -2
- package/dist/starter/README.md +27 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5ca1923: **Clients for one Tenant per installation: a stack per project, nothing selects a Tenant.** Upgrade these with the Runtime; they speak protocol 5. Existing stacks are left as they are: see MIGRATION.md.
|
|
8
|
+
|
|
9
|
+
- **Breaking (`nylorun`): one stack per project.** `nylorun start` in a project creates the project's stack (named after the project directory, or `--name`; Host root `~/.nylorun/stacks/<name>/`, Compose project `nylorun-<name>`, its own free ports and volumes), waits for its Runtime to create the stack's Tenant, writes the Project link (`.nylorun/link.json` format 2: `stack`, `hostUrl`, `hostId`, `tenantId`) and `.nylorun/credentials.json` (the key of the derived principal `project`, derived from the stack's admin key), and seeds the model provider from the project's `.env`. `nylorun ls` lists the machine's stacks and `nylorun delete <name>` removes one with its volumes and Host root. `nylorun status` shows the stack's Tenant; `nylorun studio` opens it. The old single stack under `~/.nylorun` is never touched: `start` notes it, and `nylorun legacy stop|delete` handles it. Every stack command takes `--name <stack>` (or `NYLORUN_STACK`, or the Project link's stack); `start --no-link` starts a stack without linking the directory; `nylorun reset` resets the selected stack only. The runtime container's healthcheck is now `/health`, so a Tenant that cannot open is reported by `start` from the Admin status at once instead of after a 300 s wait. `NYLORUN_HOME` still overrides the Host root. Stacks start and stop only when you say so.
|
|
10
|
+
- **Breaking (`@nylorun/cli`): no Tenant commands.** `nylo tenant create|use|list|current|delete` are removed; `nylo status`, `nylo reset` and `nylo endpoints` replace `nylo tenant status|reset|endpoints` on the linked installation. `nylo env` prints `NYLORUN_RUNTIME_URL` and `NYLORUN_SERVER_KEY` only. `nylo` no longer writes Project links.
|
|
11
|
+
- **Breaking (`@nylorun/agents`): no Tenant to name.** The `tenant` option (`createClient`, `Transport`, `resolveConnection`, `createActionHandler({ runtime })`, `JwksCache`) and `NYLORUN_TENANT` are gone, and no request sends `Nylorun-Tenant`; a connection is a URL and a key. A Project link of format 0 or 1 is refused with `connection_missing`, naming `npx nylorun start`. `verifyDeliveryToken`'s `tenantId` is optional: without it any Tenant issuer is accepted, since the installation's keys bind it. `TENANT_HEADER` is no longer re-exported.
|
|
12
|
+
- **Breaking (`@nylorun/admin`): status only.** `createTenant`, `listTenants`, `getTenant` and `deleteTenant` are removed; `status().tenant` names the Host's Tenant, and `deriveTenantKey` / `deriveStudioToken` derive its keys. Local Host resolution reads the stack's Host root (`stack` option, `NYLORUN_STACK`, or the Project link's `stack`); `NYLORUN_HOME` and `home` still override it. `stackHostRoot(name)` is exported.
|
|
13
|
+
- **Breaking (`@nylorun/studio`): Studio serves its installation's Tenant.** The Tenant picker, list and create are gone, with `/_studio/tenants`; `/` opens `/tenants/<id>`. The `/tenants/:tenant` routes and the login token's `tenant` claim stay for embedders and must name that Tenant. The proxy sends no `Nylorun-Tenant`.
|
|
14
|
+
- **`@nylorun/create-agent`:** the next steps are `npx nylorun start`, then `npm run dev`.
|
|
15
|
+
- `@nylorun/core`: `ProjectLinkFileSchema` accepts format 2 with `stack`, and `tenantId` is optional; `ERROR_CODES` loses `tenant_conflict` and `active_work`.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
|
|
20
|
+
|
|
3
21
|
## 0.11.0-beta
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -30,20 +30,22 @@ ignored: the creator starts nothing and opens no browser.
|
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
32
|
cd my-agent
|
|
33
|
-
npx nylorun@beta
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
npx nylorun studio # a fresh Studio login on this project's Tenant
|
|
33
|
+
npx nylorun@beta start # this project's stack (Docker), its Tenant, linked in .nylorun/
|
|
34
|
+
npm run dev # tsx watch src/main.ts
|
|
35
|
+
npx nylorun studio # a fresh Studio login on this project's Tenant
|
|
37
36
|
npm run build
|
|
38
37
|
npm start
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
`nylorun`
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
`nylorun start` in the project creates and starts the project's own local
|
|
41
|
+
stack (Runtime, Studio and their infrastructure, named after the directory;
|
|
42
|
+
`--name` picks or shares another), whose Runtime creates the stack's one
|
|
43
|
+
Tenant. It writes the Project link and the derived application credentials to
|
|
44
44
|
gitignored `.nylorun/`, and seeds the model provider from `.env`
|
|
45
45
|
(`MODEL_PROVIDER`, `MODEL`, `MODEL_PROVIDER_API_KEY`) into the Tenant vault.
|
|
46
|
-
|
|
46
|
+
`@nylorun/cli` (command `nylo`) is the Runtime client: `nylo status`,
|
|
47
|
+
`nylo reset` and `nylo endpoints` work on the linked Tenant. Studio or
|
|
48
|
+
`npx @nylorun/cli configure` sets or replaces the provider.
|
|
47
49
|
`npm start` runs `node dist/src/main.js` with the same entry as development.
|
|
48
50
|
Export the Project environment (`eval "$(npx @nylorun/cli env)"`) before a
|
|
49
51
|
production start when there is no Project link. Tenant data, including the
|
|
@@ -62,10 +64,10 @@ remain outside that registry for later migration.
|
|
|
62
64
|
|
|
63
65
|
`npm run test:starter` (`create-agent/scripts/smoke-starter.mjs`) packs the
|
|
64
66
|
workspace, scaffolds the starter from the packed creator, installs `nylorun`
|
|
65
|
-
and `@nylorun/cli` beside it (never into it), runs `nylorun
|
|
66
|
-
`
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
and `@nylorun/cli` beside it (never into it), runs `nylorun start` in it and
|
|
68
|
+
`npm run dev` against a temporary local Docker stack, then resets the stack's
|
|
69
|
+
Tenant, seeds the fixture model and runs one turn that calls the starter's
|
|
70
|
+
tool.
|
|
69
71
|
|
|
70
72
|
See [RELEASING](../RELEASING.md) for the Changesets beta workflow. Nothing is
|
|
71
73
|
published by the smoke check.
|
package/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.21.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.1-beta",
|
|
3
|
+
"runtime": "0.15.0-beta",
|
|
4
|
+
"agents": "0.11.0-beta",
|
|
5
|
+
"admin": "0.7.0-beta",
|
|
6
|
+
"core": "0.10.0-beta",
|
|
7
|
+
"cli": "0.7.0-beta"
|
|
8
8
|
}
|
package/dist/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.21.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.1-beta",
|
|
3
|
+
"runtime": "0.15.0-beta",
|
|
4
|
+
"agents": "0.11.0-beta",
|
|
5
|
+
"admin": "0.7.0-beta",
|
|
6
|
+
"core": "0.10.0-beta",
|
|
7
|
+
"cli": "0.7.0-beta"
|
|
8
8
|
}
|
package/dist/project.js
CHANGED
|
@@ -74,14 +74,13 @@ export async function createProject(options, compatibility, dependencies) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* After creation: start the
|
|
78
|
-
*
|
|
79
|
-
* creator runs
|
|
80
|
-
* @nylorun/agents.
|
|
77
|
+
* After creation: `nylorun start` in the project creates and starts its
|
|
78
|
+
* local stack, whose Runtime creates the stack's one Tenant, and links the
|
|
79
|
+
* project to it; then develop. The creator runs neither; the project itself
|
|
80
|
+
* depends only on @nylorun/agents.
|
|
81
81
|
*/
|
|
82
82
|
const NEXT = [
|
|
83
|
-
"npx nylorun@beta
|
|
84
|
-
"npx @nylorun/cli@beta tenant create # this project's Tenant, linked in .nylorun/",
|
|
83
|
+
"npx nylorun@beta start # this project's stack, its Tenant and the link in .nylorun/ (Docker)",
|
|
85
84
|
"npm run dev",
|
|
86
85
|
];
|
|
87
86
|
function nextSteps(destination) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Read by `npm run dev` (tsx --env-file-if-exists=.env) and, once, by
|
|
2
|
-
# `npx
|
|
3
|
-
# from these into the Runtime vault (never back into this file):
|
|
2
|
+
# `npx nylorun start` when it links the project, which seeds the Tenant's model
|
|
3
|
+
# provider from these into the Runtime vault (never back into this file):
|
|
4
4
|
# MODEL_PROVIDER=...
|
|
5
5
|
# MODEL=...
|
|
6
6
|
# MODEL_PROVIDER_API_KEY=...
|
package/dist/starter/README.md
CHANGED
|
@@ -15,31 +15,32 @@ keep the project in the Linux filesystem (`~/…`, not `/mnt/c/…`), where file
|
|
|
15
15
|
watching works.
|
|
16
16
|
|
|
17
17
|
Agent and tool definitions live in `agents/`. The **Runtime** holds your
|
|
18
|
-
sessions in
|
|
19
|
-
link**. Your tools run in this app: `src/main.ts` serves them as an **Action
|
|
18
|
+
sessions in its **Tenant**, one per installation; this project attaches to
|
|
19
|
+
its own local stack 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
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
- `nylorun` sets up and runs this project's local stack (Runtime and Studio)
|
|
26
|
+
and links the project to it.
|
|
27
|
+
- `@nylorun/cli` (command `nylo`) talks to a Runtime: its Tenant's status,
|
|
28
|
+
reset, Action endpoints and model provider.
|
|
28
29
|
|
|
29
30
|
```sh
|
|
30
|
-
npx nylorun@beta
|
|
31
|
-
npx @nylorun/cli@beta tenant create # this project's Tenant, linked in .nylorun/
|
|
31
|
+
npx nylorun@beta start # this project's stack, its Tenant and the link; the first run pulls the images
|
|
32
32
|
npm run dev
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`nylorun
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
`nylorun start` in this directory sets up the project's stack on the first
|
|
36
|
+
run (named after the directory, under `~/.nylorun/stacks/<name>/`) and just
|
|
37
|
+
starts it after that; its Runtime creates the stack's one Tenant. It prints
|
|
38
|
+
the Runtime and Studio URLs and opens Studio, signed in, in your browser. The
|
|
38
39
|
stack keeps running after you stop `npm run dev`, so sessions survive a source
|
|
39
|
-
change; `npx nylorun
|
|
40
|
+
change; `npx nylorun stop` stops it (volumes are kept), `npx nylorun status`
|
|
40
41
|
shows its health, and `npx nylorun logs runtime -f` its logs.
|
|
41
42
|
|
|
42
|
-
`
|
|
43
|
+
The first `nylorun start` writes `.nylorun/link.json` and
|
|
43
44
|
`.nylorun/credentials.json`, and seeds the Tenant's model provider from
|
|
44
45
|
`MODEL_PROVIDER`, `MODEL` and `MODEL_PROVIDER_API_KEY` in `.env` (see
|
|
45
46
|
`.env.example`). The key is stored in the Tenant vault, never back in `.env`.
|
|
@@ -50,8 +51,8 @@ incur its usual charges.
|
|
|
50
51
|
`npm run dev` runs `src/main.ts` with `tsx watch`: it serves the Action
|
|
51
52
|
endpoint on port 3001 (`PORT` changes it) and registers it with the Runtime,
|
|
52
53
|
which it finds through the Project link. The local stack's Runtime runs in
|
|
53
|
-
Docker and reaches `localhost` on this machine. `npx @nylorun/cli
|
|
54
|
-
|
|
54
|
+
Docker and reaches `localhost` on this machine. `npx @nylorun/cli endpoints`
|
|
55
|
+
shows the endpoint and how its deliveries are doing. `npx nylorun studio` opens Studio on this
|
|
55
56
|
project's Tenant, and signs in a browser that is not signed in yet. In
|
|
56
57
|
Studio, ask **Look up order demo-123**. The local tool returns `shipped`;
|
|
57
58
|
Studio shows the tool call and assistant response. The Runtime listens on
|
|
@@ -64,7 +65,7 @@ npm start
|
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
`npm start` runs `node dist/src/main.js`, the same entry as development. Set
|
|
67
|
-
`NYLORUN_RUNTIME_URL
|
|
68
|
+
`NYLORUN_RUNTIME_URL` and `NYLORUN_SERVER_KEY` before
|
|
68
69
|
starting, or keep the Project link beside this directory, and set
|
|
69
70
|
`NYLORUN_ACTIONS_URL` to the URL the Runtime reaches this app at (a public URL,
|
|
70
71
|
or a tunnel such as ngrok for a remote Runtime). `agents/index.ts` exports the
|
|
@@ -77,19 +78,20 @@ Export the linked Project environment:
|
|
|
77
78
|
|
|
78
79
|
```sh
|
|
79
80
|
eval "$(npx @nylorun/cli@beta env)"
|
|
80
|
-
# → NYLORUN_RUNTIME_URL, NYLORUN_SERVER_KEY
|
|
81
|
+
# → NYLORUN_RUNTIME_URL, NYLORUN_SERVER_KEY
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
Project link and credentials live in gitignored `.nylorun/` beside this project.
|
|
84
|
-
The Host root (
|
|
85
|
-
admin key; Tenant data lives in the stack's Docker volumes.
|
|
86
|
-
second worktree does not reuse this link:
|
|
87
|
-
`npx
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
The stack's Host root (`~/.nylorun/stacks/<name>/`, or `NYLORUN_HOME`) holds
|
|
86
|
+
its files and the admin key; Tenant data lives in the stack's Docker volumes.
|
|
87
|
+
A fresh clone or second worktree does not reuse this link: `npx nylorun start`
|
|
88
|
+
there gives it a stack of its own, and `npx nylorun start --name <stack>`
|
|
89
|
+
links it to this project's stack instead.
|
|
90
|
+
Keep `.nylorun/` private. The application key is derived from the stack's
|
|
91
|
+
admin key when the project is linked. Each delivery carries a short-lived
|
|
92
|
+
token the endpoint verifies with the Tenant's public keys. Ordinary
|
|
93
|
+
shutdown/restart preserves completed session history; `npx @nylorun/cli reset
|
|
94
|
+
--all` empties the Tenant, and `npx nylorun reset` deletes the stack's data.
|
|
93
95
|
`NYLORUN_IMPLEMENTATION_VERSION` defaults to `dev`; assign an explicit version
|
|
94
96
|
when changing a versioned implementation.
|
|
95
97
|
|