@nylorun/create-agent 0.13.4-beta → 0.14.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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.1-beta
4
+
5
+ ### Patch Changes
6
+
7
+ - Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
8
+
9
+ ## 0.14.0-beta
10
+
11
+ ### Major Changes
12
+
13
+ - c135267: **Action endpoints are removed (manifest-only agents, M6).** The Runtime runs no code of yours during a session: an agent's tools are HTTP tools, remote MCP servers, agents used as tools and the Runtime's built-ins. Protocol stays 8; the `action-endpoints` feature is gone, so a client that requires it is refused. See MIGRATION.md, "Action endpoints are removed".
14
+
15
+ - **Breaking (`@nylorun/core`):** the `Action`, endpoint (`PutEndpointsRequest`, `Endpoint`, `EndpointHealth`, …) and delivery schemas, `SIGNATURE_HEADER`, `OUTCOME_HEADER`, `DELIVERY_TOKEN_TYPE` and the `action.*` events (`action.pending`, `.delivered`, `.delivery_failed`, `.completed`, `.uncertain`) are removed, and `ToolDefinition.background` with them. `ActionOutcome` is renamed `EffectOutcome`. Tenant status loses `checks.endpoints`, `agents[].registered` and `agents[].endpoint`, and `counts.pendingActions`; the session view loses `actions`. A `turn.paused` interaction carries the tool call's `callId`. New `codeToolsOf` and `codeToolRefusal` name a definition's tools that would run your code. The Harness API is v2 (`HARNESS_API_VERSION = 2`): `TurnStart.options.holdMs` and `effect.resolved` are removed.
16
+ - **Breaking (`@nylorun/harness`):** held runs are gone: `createHarness` loses `holdMs`, and `apiHost` its `hold` option.
17
+ - **Breaking (`@nylorun/agents`):** `createActionHandler`, `executeAction`, `createActionSandbox`, `definitionDeclaresSandbox`, `isActionSandboxTool` and the `Action`, `ActionOutcome`, `ActionHandler`, `ActionHandlerOptions`, `RegisterOptions`, `ExecuteActionOptions` and `ExecutableDefinition` types are removed. `saveAgent` refuses a code tool (`tool({ run })`) or a flow tool stage before sending; its `implementationVersion` is optional (`NYLORUN_IMPLEMENTATION_VERSION`, else `dev`).
18
+ - **Breaking (`@nylorun/runtime`):** `/v1/endpoints` and `/v1/actions/*` answer `404`; delivery tokens, the deliverer, background tools, held runs (`TenantConfig.actionHoldMs`), `DurableExecution.deliver`, the Restate `NylorunAction` object, the `action_result` wake and the gates service's `/nylorun/v1/deliveries` are removed, and a migration drops the `actions` and `endpoints` tables. `PUT /v1/agents/:id` refuses a definition with a code tool or a flow tool stage (`400`); a tool the Runtime cannot run fails with `tool.unavailable`. The fixture model answers in text when the agent offers no `lookup_order` tool.
19
+ - **Breaking (`@nylorun/cli`):** `nylo endpoints` is removed (a usage error that says why); `nylo status` shows uncertain effects instead of pending Actions.
20
+ - **Breaking (`@nylorun/create-agent`):** the starter saves its agent with `saveAgent` and runs no server: no Action endpoint, `PORT` or `NYLORUN_ACTIONS_URL`. Its assistant has no tools, with a commented `http()` tool to start from.
21
+ - `nylorun`: the local stack's comments speak of MCP servers and HTTP tools on this machine, not Action endpoints.
22
+ - `@nylorun/studio`: the `action.*` event views and delivery status are removed; the chat shows `tool.completed`, and the Agent Manifest tab lists tools without a target as code tools.
23
+
24
+ ### Patch Changes
25
+
26
+ - Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
27
+
28
+ ## 0.13.5-beta
29
+
30
+ ### Patch Changes
31
+
32
+ - Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
33
+
3
34
  ## 0.13.4-beta
4
35
 
5
36
  ### Patch Changes
package/README.md CHANGED
@@ -17,10 +17,10 @@ npm create @nylorun/agent@beta my-agent
17
17
 
18
18
  Creates a Node 24 project whose only Nylorun dependency is `@nylorun/agents`
19
19
  (plus Zod). The registry in `agents/index.ts` exports agent definitions.
20
- `src/main.ts` serves the agents' tools with `createActionHandler` and registers
21
- its URL, for both `npm run dev` and `npm start`. The
22
- starter includes one ordinary `lookup_order` tool; ask “Look up order
23
- demo-123”.
20
+ `src/main.ts` saves each agent to the Runtime with `client.saveAgent`: on every
21
+ source edit under `npm run dev`, once under `npm start`. No code of the
22
+ project runs during a session; the starter's assistant has no tools, and a
23
+ comment shows how to add an `http()` tool.
24
24
 
25
25
  Creation installs the project's dependencies and prints the next steps. If a
26
26
  prerequisite is missing (Node older than 24, no `docker`, an engine that does
@@ -31,7 +31,7 @@ ignored: the creator starts nothing and opens no browser.
31
31
  ```sh
32
32
  cd my-agent
33
33
  npx nylorun@beta start # this project's Tenant (Docker) and the link in .nylorun/
34
- npm run dev # tsx watch src/main.ts
34
+ npm run dev # tsx watch src/main.ts: saves the agents
35
35
  npx nylorun studio # a fresh Studio login on this project's Tenant
36
36
  npm run build
37
37
  npm start
@@ -42,8 +42,8 @@ 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
- `@nylorun/cli` (command `nylo`) is the Runtime client: `nylo status`,
46
- `nylo reset` and `nylo endpoints` work on the linked Tenant. Studio or
45
+ `@nylorun/cli` (command `nylo`) is the Runtime client: `nylo status`
46
+ and `nylo reset` work on the linked Tenant. Studio or
47
47
  `npx @nylorun/cli configure` sets or replaces the provider.
48
48
  `npm start` runs `node dist/src/main.js` with the same entry as development.
49
49
  Export the Project environment (`eval "$(npx @nylorun/cli env)"`) before a
@@ -65,8 +65,7 @@ remain outside that registry for later migration.
65
65
  workspace, scaffolds the starter from the packed creator, installs `nylorun`
66
66
  and `@nylorun/cli` beside it (never into it), runs `nylorun start` in it and
67
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
69
- tool.
68
+ seeds the fixture model and runs one turn with the starter's assistant.
70
69
 
71
70
  See [RELEASING](../RELEASING.md) for the Changesets beta workflow. Nothing is
72
71
  published by the smoke check.
@@ -1,8 +1,8 @@
1
1
  {
2
- "harness": "0.22.1-beta",
3
- "runtime": "0.17.0-beta",
4
- "agents": "0.14.0-beta",
5
- "admin": "0.10.0-beta",
6
- "core": "0.13.0-beta",
7
- "cli": "0.10.0-beta"
2
+ "harness": "0.23.0-beta",
3
+ "runtime": "0.19.1-beta",
4
+ "agents": "0.16.1-beta",
5
+ "admin": "0.11.1-beta",
6
+ "core": "0.15.0-beta",
7
+ "cli": "0.12.1-beta"
8
8
  }
@@ -1,8 +1,8 @@
1
1
  {
2
- "harness": "0.22.1-beta",
3
- "runtime": "0.17.0-beta",
4
- "agents": "0.14.0-beta",
5
- "admin": "0.10.0-beta",
6
- "core": "0.13.0-beta",
7
- "cli": "0.10.0-beta"
2
+ "harness": "0.23.0-beta",
3
+ "runtime": "0.19.1-beta",
4
+ "agents": "0.16.1-beta",
5
+ "admin": "0.11.1-beta",
6
+ "core": "0.15.0-beta",
7
+ "cli": "0.12.1-beta"
8
8
  }
@@ -5,5 +5,4 @@
5
5
  # MODEL=...
6
6
  # MODEL_PROVIDER_API_KEY=...
7
7
  # MODEL_PROVIDER_BASE_URL=... # only for a custom provider
8
- # PORT=8787
9
8
  # NYLORUN_IMPLEMENTATION_VERSION=dev
@@ -14,18 +14,17 @@ Node inside your WSL distribution, enable Docker Desktop's WSL integration, and
14
14
  keep the project in the Linux filesystem (`~/…`, not `/mnt/c/…`), where file
15
15
  watching works.
16
16
 
17
- Agent and tool definitions live in `agents/`. The **Runtime** holds your
18
- sessions in its **Tenant**, one per installation; this project attaches to
19
- its own local Tenant through a **Project link**. Your tools run in this app: `src/main.ts` serves them as an **Action
20
- endpoint** (`createActionHandler`) on `http://localhost:3001/nylorun/actions`
21
- and registers that URL, and the Runtime delivers each tool call there, signed.
22
- The project depends only on `@nylorun/agents`; the two Nylorun tools run with
23
- `npx`:
17
+ Agent definitions live in `agents/`. The **Runtime** runs your agents and
18
+ holds their sessions in its **Tenant**, one per installation; this project
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
+ exits; no code of yours runs during a session. The project depends only on
22
+ `@nylorun/agents`; the two Nylorun tools run with `npx`:
24
23
 
25
24
  - `nylorun` sets up and runs this project's local Tenant (Runtime and Studio)
26
25
  and links the project to it.
27
26
  - `@nylorun/cli` (command `nylo`) talks to a Runtime: its Tenant's status,
28
- reset, Action endpoints and model provider.
27
+ reset and model provider.
29
28
 
30
29
  ```sh
31
30
  npx nylorun@beta start # this project's Tenant and the link; the first run pulls the images
@@ -34,8 +33,8 @@ npm run dev
34
33
 
35
34
  `nylorun start` in this directory sets up the project's Tenant on the first
36
35
  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
36
+ starts it after that. It prints the Runtime and Studio URLs; `npx nylorun
37
+ studio` signs your browser in to Studio. The Tenant keeps running after you stop `npm run dev`, so sessions survive a source
39
38
  change; `npx nylorun stop` stops it (volumes are kept), `npx nylorun status`
40
39
  shows its health, and `npx nylorun logs runtime -f` its logs.
41
40
 
@@ -47,14 +46,11 @@ Without them, set the provider in Studio's Model provider screen, or with
47
46
  `npx @nylorun/cli configure`. Model calls use the Tenant's provider and may
48
47
  incur its usual charges.
49
48
 
50
- `npm run dev` runs `src/main.ts` with `tsx watch`: it serves the Action
51
- endpoint on port 3001 (`PORT` changes it) and registers it with the Runtime,
52
- which it finds through the Project link. The local Runtime runs in
53
- Docker and reaches `localhost` on this machine. `npx @nylorun/cli endpoints`
54
- shows the endpoint and how its deliveries are doing. `npx nylorun studio` opens Studio on this
55
- project's Tenant, and signs in a browser that is not signed in yet. In
56
- Studio, ask **Look up order demo-123**. The local tool returns `shipped`;
57
- Studio shows the tool call and assistant response. The Runtime listens on
49
+ `npm run dev` runs `src/main.ts` with `tsx watch`: it saves the agents to the
50
+ Runtime, which it finds through the Project link, and saves them again on
51
+ every source edit. `npx nylorun studio` opens Studio on this project's Tenant,
52
+ and signs in a browser that is not signed in yet; chat with the assistant
53
+ there. The Runtime listens on
58
54
  `http://localhost:8787` and Studio on `http://localhost:4161`, or on free ports
59
55
  chosen on the first start.
60
56
 
@@ -63,15 +59,17 @@ npm run build
63
59
  npm start
64
60
  ```
65
61
 
66
- `npm start` runs `node dist/src/main.js`, the same entry as development. Set
67
- `NYLORUN_RUNTIME_URL` and `NYLORUN_SERVER_KEY` before
68
- starting, or keep the Project link beside this directory, and set
69
- `NYLORUN_ACTIONS_URL` to the URL the Runtime reaches this app at (a public URL,
70
- or a tunnel such as ngrok for a remote Runtime). `agents/index.ts` exports the
71
- registry. A source edit restarts the app, which re-registers the agents and
72
- the endpoint; the Runtime is untouched. Start a new session
73
- after changing definitions or implementations; active-session upgrades are not
74
- supported.
62
+ `npm start` runs `node dist/src/main.js`, the same entry as development: it
63
+ saves the agents once, a deploy step. Set `NYLORUN_RUNTIME_URL` and
64
+ `NYLORUN_SERVER_KEY` before starting, or keep the Project link beside this
65
+ directory. `agents/index.ts` exports the registry. Start a new session after
66
+ changing definitions; active-session upgrades are not supported.
67
+
68
+ The assistant has no tools yet. A tool is an `http()` tool, a request the
69
+ Runtime makes to a service of yours (see the comment in
70
+ `agents/assistant/agent.ts`), a remote MCP server, or another agent used as a
71
+ tool. A code tool (`tool({ run })`) is refused when it is saved: the Runtime
72
+ runs no code of yours during a session.
75
73
 
76
74
  Export the linked Project environment:
77
75
 
@@ -87,14 +85,12 @@ A fresh clone or second worktree does not reuse this link: `npx nylorun start`
87
85
  there gives it a Tenant of its own, and `npx nylorun start --tenant <name>`
88
86
  links it to this project's Tenant instead.
89
87
  Keep `.nylorun/` private. The application key is derived from the Tenant's
90
- admin key when the project is linked. Each delivery carries a short-lived
91
- token the endpoint verifies with the Tenant's public keys. Ordinary
88
+ admin key when the project is linked. Ordinary
92
89
  shutdown/restart preserves completed session history; `npx @nylorun/cli reset
93
90
  --all` empties the Tenant, and `npx nylorun reset` deletes all its data.
94
- `NYLORUN_IMPLEMENTATION_VERSION` defaults to `dev`; assign an explicit version
95
- when changing a versioned implementation.
91
+ `NYLORUN_IMPLEMENTATION_VERSION` (default `dev`) labels each saved
92
+ definition.
96
93
 
97
- This beta supports local text and ordinary tools. Advanced waits, media, MCP,
94
+ This beta supports local text, HTTP tools, remote MCP servers and agents used
95
+ as tools; the starter itself wires none of them. Advanced waits, media,
98
96
  deployment, reconciliation and broad recovery guarantees are deferred.
99
- Subagents are supported in the SDK and examples (`agents used as tools`); the
100
- starter itself does not wire them.
@@ -1,17 +1,20 @@
1
- import { Agent, tool } from "@nylorun/agents";
2
- import { z } from "zod";
1
+ import { Agent } from "@nylorun/agents";
3
2
 
4
- const lookupOrder = tool({
5
- name: "lookup_order",
6
- description: "Look up a sample order by ID. Try demo-123.",
7
- input: z.object({ orderId: z.string() }),
8
- output: z.object({ orderId: z.string(), status: z.string() }),
9
- async run({ orderId }) {
10
- return { orderId, status: orderId === "demo-123" ? "shipped" : "not found" };
11
- },
12
- });
3
+ // To give the assistant a tool, describe an HTTP service the Runtime calls (it runs no code
4
+ // of yours during a session), or serve it from a remote MCP server:
5
+ //
6
+ // import { http } from "@nylorun/agents";
7
+ // import { z } from "zod";
8
+ //
9
+ // const lookupOrder = http({
10
+ // name: "lookup_order",
11
+ // description: "Look up an order by ID.",
12
+ // input: z.object({ orderId: z.string() }),
13
+ // url: "https://orders.example.com/lookup",
14
+ // });
15
+ //
16
+ // and add `.tools(lookupOrder)` below.
13
17
 
14
- export const assistant = Agent({ id: "assistant", name: "Order assistant" })
15
- .instructions("Help with orders. Always use lookup_order for order questions. Remember conversation context.")
16
- .tools(lookupOrder)
18
+ export const assistant = Agent({ id: "assistant", name: "Assistant" })
19
+ .instructions("You are a helpful assistant. Answer concisely and remember conversation context.")
17
20
  .build();
@@ -1,24 +1,11 @@
1
- import { createServer } from "node:http";
2
- import { createActionHandler } from "@nylorun/agents";
1
+ import { createClient } from "@nylorun/agents";
3
2
  import { agents } from "../agents/index.js";
4
3
 
5
- // The Runtime delivers each tool call to this URL. On a local Tenant `localhost` means this
6
- // machine; in production set NYLORUN_ACTIONS_URL to the URL the Runtime reaches this app at.
7
- const port = Number(process.env.PORT ?? 3001);
8
- const url = process.env.NYLORUN_ACTIONS_URL ?? `http://localhost:${port}/nylorun/actions`;
9
-
10
- const actions = createActionHandler({ agents, url });
11
- const server = createServer(actions.node);
12
- await new Promise<void>((resolve) => server.listen(port, resolve));
13
- // `tsx watch` often emits a delayed change after the first listen; keep the
14
- // server up and retry so a raced ping does not exit the process.
15
- for (let attempt = 0; ; attempt++) {
16
- try {
17
- await actions.register({ url });
18
- break;
19
- } catch (error) {
20
- if (attempt >= 8) throw error;
21
- await new Promise((resolve) => setTimeout(resolve, 250 * 2 ** Math.min(attempt, 3)));
22
- }
4
+ // Saves each agent's definition to the Runtime, which runs it; nothing here keeps running.
5
+ // The client finds the Runtime through the Project link, or NYLORUN_RUNTIME_URL and
6
+ // NYLORUN_SERVER_KEY.
7
+ const client = await createClient();
8
+ for (const agent of agents) {
9
+ await client.saveAgent(agent);
10
+ console.log(`Saved agent ${agent.id}`);
23
11
  }
24
- console.log(`Serving Actions at ${url}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/create-agent",
3
- "version": "0.13.4-beta",
3
+ "version": "0.14.1-beta",
4
4
  "description": "Create a local Nylorun Harness agent project.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",