@nylorun/agents 0.6.0-beta → 0.7.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,30 @@
1
1
  # @nylorun/agents
2
2
 
3
+ ## 0.7.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - bf1c2da: **Tenants can register a Studio principal.** `CreateTenantRequest` gains optional `studioCredentialHash` behind the new protocol feature `studio-principal`; the Runtime stores it as application principal `studio`, and idempotent create compares it too. `@nylorun/admin` exports `deriveStudioToken(adminKey, tenantId)` (HMAC-SHA256 over `nylorun/studio/v1`, NUL, Tenant id) and `createTenant` sends the hash of that key, so Studio can reach any Tenant's API with a key derived from the admin key. Clients require the new feature, so upgrade the Runtime with them.
8
+
9
+ ### Patch Changes
10
+
11
+ - ba1b239: **`nylorun` sets up the local stack; `@nylorun/cli` becomes the Runtime client `nylo` (breaking beta).**
12
+
13
+ - New unscoped package **`nylorun`**: `npx nylorun up` sets up the Docker stack on the first run and starts it after that, from any directory; `npx nylorun down` stops it (volumes are kept). `up` and `down` are aliases of `start` and `stop`. It also owns `status`, `logs`, `studio`, `reset` and `doctor`, pins the Runtime and Studio images (`package.json` `nylorun.runtime` / `nylorun.studio`), depends on `@nylorun/core` only, and never creates Tenants.
14
+ - **`@nylorun/cli`** is the Runtime client with the command **`nylo`**: `nylo tenant create [name]` (creates the Tenant; in a project, writes the Project link and seeds the model provider and sandbox from `.env`), `nylo tenant current|list|use|status|reset|delete`, `nylo configure`, `nylo env` (was `nylorun status --env`) and `nylo doctor sandbox`. It no longer provides the `nylorun` command or the stack commands.
15
+ - **Removed:** `nylorun dev` and `nylorun dev --ephemeral`. Link once with `nylo tenant create`, then run the project's own `npm run dev`. Moved commands exit 2 and name their replacement.
16
+ - **Starter:** the generated project depends on `@nylorun/agents` only (no Nylorun devDependency); `dev` is `tsx watch --env-file-if-exists=.env src/main.ts`. `npm create @nylorun/agent` installs the project and prints the next steps (`npx nylorun up`, `npx @nylorun/cli tenant create`, `npm run dev`) instead of starting development; `--no-open` is accepted and ignored.
17
+ - `connectAgents` names those steps when it finds no Runtime connection. Runtime repair hints, model errors and core's sandbox message name `nylo` and `nylorun up`.
18
+
19
+ - bf1c2da: **The microsandbox backend is removed; the Runtime runs sandbox tools on the virtual backend only.** The optional `microsandbox` dependency is gone. `sandbox.backend` and `NYLORUN_SANDBOX` accept `auto` or `virtual`, and `auto` selects `virtual`. A Tenant that stored `microsandbox` reads it as `auto`. `nylorun doctor sandbox` and the `nylorun dev` banner report only the virtual shell.
20
+ - Pin core to the tested release.
21
+ - Updated dependencies [bf1c2da]
22
+ - Updated dependencies [ba1b239]
23
+ - Updated dependencies [bf1c2da]
24
+ - Updated dependencies [bf1c2da]
25
+ - Updated dependencies [bf1c2da]
26
+ - @nylorun/core@0.6.0-beta
27
+
3
28
  ## 0.6.0-beta
4
29
 
5
30
  ### Minor Changes
package/README.md CHANGED
@@ -19,8 +19,10 @@ await connectAgents({ agents }).ready;
19
19
  Application mode saves definitions, registers **derived** executor credentials
20
20
  (HMAC of the application key + Tenant + agent id), and connects. Restarts and
21
21
  replicas re-register the same hashes; tokens are never stored in the Project.
22
- The same entry runs under `nylorun dev` and as `node dist/src/main.js`
23
- (`npm start`). See [MIGRATION.md](../MIGRATION.md#runtime-clients-and-admin-api-breaking-beta)
22
+ The same entry runs under the project's `npm run dev` (`tsx watch`) and as
23
+ `node dist/src/main.js` (`npm start`). It finds the Runtime through the three
24
+ `NYLORUN_*` variables or the Project link that `npx @nylorun/cli tenant create`
25
+ writes; with neither, it fails with `connection_missing` and names those steps. See [MIGRATION.md](../MIGRATION.md#runtime-clients-and-admin-api-breaking-beta)
24
26
  for upgrading from `nylorun serve`.
25
27
 
26
28
  ## Connection resolution
@@ -84,7 +86,7 @@ await connection.close();
84
86
  ```
85
87
 
86
88
  ```sh
87
- eval "$(npx nylorun runtime status --env)"
89
+ eval "$(npx @nylorun/cli env)"
88
90
  # → NYLORUN_RUNTIME_URL, NYLORUN_SERVER_KEY, NYLORUN_TENANT
89
91
  ```
90
92
 
@@ -143,7 +145,7 @@ const analyst = Agent({
143
145
  }).use(sandbox());
144
146
  ```
145
147
 
146
- The model gets `bash`, `read`, `write`, `edit`, `grep` and `glob` on a Linux machine with a persistent `/workspace`. These tools run in the Runtime, not in your process, so sandbox-only agents need no connected executor. The agent declares what it needs; the Runtime decides where it runs (a microsandbox VM where the machine supports it, otherwise an emulated shell). Every option is optional plain data:
148
+ The model gets `bash`, `read`, `write`, `edit`, `grep` and `glob` on a Linux machine with a persistent `/workspace`. These tools run in the Runtime, not in your process, so sandbox-only agents need no connected executor. The agent declares what it needs; the Runtime decides where it runs (today an emulated shell in the Runtime process). Every option is optional plain data:
147
149
 
148
150
  ```ts
149
151
  .use(sandbox({
@@ -154,7 +156,7 @@ The model gets `bash`, `read`, `write`, `edit`, `grep` and `glob` on a Linux mac
154
156
  }))
155
157
  ```
156
158
 
157
- The `dev` preset allows package registries and code hosts. Private networks, loopback, the host and cloud metadata endpoints are always blocked. Options from the full design that are not in this version (`setup`, `files`, `secrets`, `mount`, `onStart`, …) throw a `SandboxError` that says so. See [the sandbox design](../docs/design/sandboxes.md).
159
+ The `dev` preset allows package registries and code hosts. Private networks, loopback, the host and cloud metadata endpoints are always blocked. Options from the full design that are not in this version (`setup`, `files`, `secrets`, `mount`, `onStart`, …) throw a `SandboxError` that says so.
158
160
 
159
161
  Put an agent in another agent's `tools` to let the model delegate to it:
160
162
 
@@ -10,7 +10,9 @@ export class ConnectionError extends Error {
10
10
  }
11
11
  }
12
12
  function missing(tried) {
13
- throw new ConnectionError(`connection_missing: no Runtime connection found (tried ${tried.join(", ")})`);
13
+ throw new ConnectionError(`connection_missing: no Runtime connection found (tried ${tried.join(", ")}). ` +
14
+ `Start the local stack with "npx nylorun up" and link this project with "npx @nylorun/cli tenant create", ` +
15
+ `or set NYLORUN_RUNTIME_URL, NYLORUN_TENANT and NYLORUN_SERVER_KEY.`);
14
16
  }
15
17
  function stripTrailingSlash(url) {
16
18
  return url.replace(/\/$/, "");
@@ -17,8 +17,7 @@ export declare class SandboxError extends Error {
17
17
  * Give the agent an isolated Linux machine with a persistent `/workspace`.
18
18
  *
19
19
  * Adds the built-in `bash`, `read`, `write`, `edit`, `grep` and `glob` tools. They run in the
20
- * Nylorun Runtime, which picks the backend (a microsandbox VM where available). Agent code
21
- * declares requirements only.
20
+ * Nylorun Runtime, which picks the backend. Agent code declares requirements only.
22
21
  *
23
22
  * ```ts
24
23
  * Agent({ id: "analyst", instructions: "..." }).use(sandbox())
@@ -11,8 +11,7 @@ export class SandboxError extends Error {
11
11
  * Give the agent an isolated Linux machine with a persistent `/workspace`.
12
12
  *
13
13
  * Adds the built-in `bash`, `read`, `write`, `edit`, `grep` and `glob` tools. They run in the
14
- * Nylorun Runtime, which picks the backend (a microsandbox VM where available). Agent code
15
- * declares requirements only.
14
+ * Nylorun Runtime, which picks the backend. Agent code declares requirements only.
16
15
  *
17
16
  * ```ts
18
17
  * Agent({ id: "analyst", instructions: "..." }).use(sandbox())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/agents",
3
- "version": "0.6.0-beta",
3
+ "version": "0.7.0-beta",
4
4
  "description": "Nylorun agent definitions, session client and connected executor",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "test": "vitest run --passWithNoTests"
36
36
  },
37
37
  "dependencies": {
38
- "@nylorun/core": "0.5.0-beta",
38
+ "@nylorun/core": "0.6.0-beta",
39
39
  "gray-matter": "^4.0.3"
40
40
  },
41
41
  "peerDependencies": {