@nylorun/agents 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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @nylorun/agents
2
2
 
3
+ ## 0.12.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - 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.
8
+
9
+ - **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.
10
+ - **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`.
11
+ - **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`.
12
+ - **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`.
13
+ - **Breaking (`@nylorun/admin`):** `createAdmin({ tenant })` replaces `{ stack }`, `tenantHostRoot(name)` replaces `stackHostRoot(name)`, and local resolution reads `NYLORUN_TENANT` and the link's `tenant`.
14
+ - `@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.
15
+
16
+ ### Patch Changes
17
+
18
+ - Pin core to the tested release.
19
+ - Updated dependencies [4b9906f]
20
+ - @nylorun/core@0.11.0-beta
21
+
3
22
  ## 0.11.0-beta
4
23
 
5
24
  ### Major Changes
package/README.md CHANGED
@@ -30,7 +30,7 @@ reads the Tenant's public keys. Mark a long tool
30
30
  posts the result. `npx @nylorun/cli endpoints` shows each endpoint and how its
31
31
  deliveries are doing.
32
32
 
33
- The URL must be one the Runtime can reach: `localhost` on the local stack
33
+ The URL must be one the Runtime can reach: `localhost` on a local Tenant
34
34
  (its Runtime runs in Docker and maps `localhost` to this machine), a public URL
35
35
  in production, or a tunnel (ngrok, Cloudflare Tunnel) for a remote Runtime.
36
36
 
@@ -49,13 +49,14 @@ for upgrading from `nylorun serve`.
49
49
  2. Environment — if `NYLORUN_RUNTIME_URL` or `NYLORUN_SERVER_KEY` is set, both
50
50
  must be present
51
51
  3. Project link — `.nylorun/link.json` + `credentials.json` (the application
52
- key), written by `npx nylorun start`. A link from before one Tenant per
53
- installation (format 0 or 1) fails with `connection_missing`: run
54
- `npx nylorun start` in the project again.
52
+ key), written by `npx nylorun start`. A link from an older nylorun
53
+ (format 0 to 2) fails with `connection_missing`: run `npx nylorun start` in
54
+ the project again.
55
55
 
56
56
  Sources never mix. Partial environment fails with `connection_missing`. A
57
- Runtime serves one Tenant, so nothing names it: the `tenant` option and
58
- `NYLORUN_TENANT` are gone (protocol 5).
57
+ Runtime serves one Tenant, so nothing names it: the `tenant` option is gone
58
+ (protocol 5), and `NYLORUN_TENANT`, which picks a local Tenant for `nylorun`,
59
+ is ignored.
59
60
 
60
61
  ```ts
61
62
  import { Agent, createActionHandler, createClient, tool } from "@nylorun/agents";
@@ -45,7 +45,7 @@ export function createA2aHandler(options) {
45
45
  const client = await (options.client ?? createClient());
46
46
  const features = await client.hostFeatures();
47
47
  if (!features.includes(REQUIRED_FEATURE))
48
- throw new Problem(502, `The Runtime does not support ${REQUIRED_FEATURE}; upgrade the stack (nylorun up).`, "runtime_feature_missing");
48
+ throw new Problem(502, `The Runtime does not support ${REQUIRED_FEATURE}; update the Runtime (npx nylorun@latest start).`, "runtime_feature_missing");
49
49
  return client;
50
50
  })();
51
51
  ready.catch(() => {
@@ -65,7 +65,7 @@ export function createAgUiHandler(options) {
65
65
  const features = await client.hostFeatures();
66
66
  const missing = REQUIRED_FEATURES.filter((f) => !features.includes(f));
67
67
  if (missing.length > 0)
68
- throw new Problem(502, `The Runtime does not support ${missing.join(", ")}; upgrade the stack (nylorun up).`, "runtime_feature_missing");
68
+ throw new Problem(502, `The Runtime does not support ${missing.join(", ")}; update the Runtime (npx nylorun@latest start).`, "runtime_feature_missing");
69
69
  return client;
70
70
  })();
71
71
  ready.catch(() => {
@@ -11,7 +11,7 @@ export class ConnectionError extends Error {
11
11
  }
12
12
  function missing(tried) {
13
13
  throw new ConnectionError(`connection_missing: no Runtime connection found (tried ${tried.join(", ")}). ` +
14
- `Run "npx nylorun start" in this project to start its stack and link it, ` +
14
+ `Run "npx nylorun start" in this project to start its Tenant and link it, ` +
15
15
  `or set NYLORUN_RUNTIME_URL and NYLORUN_SERVER_KEY.`);
16
16
  }
17
17
  function stripTrailingSlash(url) {
@@ -37,11 +37,10 @@ async function readProjectLink(startDir) {
37
37
  throw error;
38
38
  }
39
39
  const link = ProjectLinkFileSchema.parse(JSON.parse(linkRaw));
40
- // Formats 0 and 1 named a Tenant on a multi-Tenant Host of an older Runtime.
41
- if (link.format < 2)
42
- throw new ConnectionError(`connection_missing: the Project link at ${linkPath} is for a stack of an older ` +
43
- `Runtime, before one Tenant per installation. Run "npx nylorun start" in this project ` +
44
- `to start its own stack and link it again.`);
40
+ // Formats 0 to 2 are from older releases.
41
+ if (link.format < 3)
42
+ throw new ConnectionError(`connection_missing: the Project link at ${linkPath} is from an older nylorun. ` +
43
+ `Run "npx nylorun start" in this project to link it again.`);
45
44
  const credentials = ProjectCredentialsFileSchema.parse(JSON.parse(await readFile(join(nylorun, "credentials.json"), "utf8")));
46
45
  return {
47
46
  url: stripTrailingSlash(link.hostUrl),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/agents",
3
- "version": "0.11.0-beta",
3
+ "version": "0.12.0-beta",
4
4
  "description": "Nylorun agent definitions, session client and Action endpoint",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "test": "vitest run --passWithNoTests"
48
48
  },
49
49
  "dependencies": {
50
- "@nylorun/core": "0.10.0-beta",
50
+ "@nylorun/core": "0.11.0-beta",
51
51
  "gray-matter": "^4.0.3"
52
52
  },
53
53
  "peerDependencies": {