@nylorun/create-agent 0.10.3-beta → 0.11.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 +46 -0
- package/README.md +2 -1
- package/compatibility.json +6 -6
- package/dist/compatibility.json +6 -6
- package/dist/starter/README.md +19 -11
- package/dist/starter/src/main.ts +22 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e28b8a9: **New projects serve their tools as an Action endpoint.** Everything Nylorun ships now uses Action endpoints instead of executors. `connectAgents` still works, but it is deprecated.
|
|
8
|
+
|
|
9
|
+
- **Starter (`create-agent`).** `src/main.ts` serves the agents with `createActionHandler` on `http://localhost:3001/nylorun/actions` (`PORT`, `NYLORUN_ACTIONS_URL`) and registers it. `npm run dev` and `npm start` work as before. The README explains which URL the Runtime must reach.
|
|
10
|
+
- **Local stack (`nylorun`).** The Runtime container sets `NYLORUN_ENDPOINT_LOOPBACK=docker-host` and maps `host.docker.internal` to the Docker host, so a `localhost` endpoint on the developer's machine is reachable, on Linux Docker Engine too.
|
|
11
|
+
- **Examples.** The AG-UI and browser-direct apps serve their Action endpoint at `/nylorun/actions` beside their other routes, and `register(origin)` replaces `connection.ready`.
|
|
12
|
+
- **Docs.** The README, `DEPLOYMENT.md` and the `@nylorun/agents` README describe Action endpoints.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 4282d5f: **Breaking: executors are removed; protocol 3.** The Runtime delivers every Action (tool, hook, `fn`, `verify`) to the Action endpoint an agent registers. It no longer offers Actions for executors to claim. See `MIGRATION.md`, "Action endpoints replace executors".
|
|
17
|
+
|
|
18
|
+
- **Core.** `PROTOCOL_VERSION` is 3 and a Host serves only protocol 3. `action-endpoints` is a protocol feature instead of an optional Host feature. Removed:
|
|
19
|
+
|
|
20
|
+
- the executor, claim and Action-list schemas;
|
|
21
|
+
- `action_result` from `SessionCommandSchema`;
|
|
22
|
+
- the `claimed` Action status, `claimId` and `leaseExpiresAt`.
|
|
23
|
+
|
|
24
|
+
New: `ActionResultReceiptSchema`, the receipt of `POST /v1/actions/:id/result`, which is `AcceptedResponse` without `requestId`.
|
|
25
|
+
|
|
26
|
+
- **Runtime.** Removed:
|
|
27
|
+
|
|
28
|
+
- `PUT`/`GET /v1/executors`, `DELETE /v1/executors/:agentId`, `GET /v1/executors/connect`;
|
|
29
|
+
- `GET /v1/actions`, `POST /v1/actions/:id/claim`, and the executor form of `POST /v1/actions/:id/heartbeat`;
|
|
30
|
+
- the `tenant/work` stream;
|
|
31
|
+
- claim expiry;
|
|
32
|
+
- executor credentials.
|
|
33
|
+
|
|
34
|
+
`POST /v1/actions/:id/sandbox/:tool` takes the delivery token only. Tenant summaries report `inFlightDeliveries` instead of `connectedExecutors`. Tenant status lists each agent's endpoint and has an `endpoints` check instead of `executors`.
|
|
35
|
+
|
|
36
|
+
Postgres migration 6 drops the `executors` table. Actions an executor had claimed are handled like lost deliveries: a tool becomes `uncertain`, and a hook, `fn` or `verify` is delivered again.
|
|
37
|
+
|
|
38
|
+
- **Agents.** Removed: `connectAgents`, the `@nylorun/agents/executor` subpath, derived executor keys and `NYLORUN_EXECUTOR_KEY`. Serve agents with `createActionHandler` and call `register({ url })`.
|
|
39
|
+
- **CLI.** Executor keys are gone from Project credentials. `nylo tenant endpoints` shows each endpoint and its health.
|
|
40
|
+
|
|
41
|
+
- Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
|
|
42
|
+
|
|
43
|
+
## 0.10.4-beta
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Update the tested Harness, SDK, Runtime, and CLI compatibility combination.
|
|
48
|
+
|
|
3
49
|
## 0.10.3-beta
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@ 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`
|
|
20
|
+
`src/main.ts` serves the agents' tools with `createActionHandler` and registers
|
|
21
|
+
its URL, for both `npm run dev` and `npm start`. The
|
|
21
22
|
starter includes one ordinary `lookup_order` tool; ask “Look up order
|
|
22
23
|
demo-123”.
|
|
23
24
|
|
package/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.0-beta",
|
|
3
|
+
"runtime": "0.14.0-beta",
|
|
4
|
+
"agents": "0.10.0-beta",
|
|
5
|
+
"admin": "0.6.0-beta",
|
|
6
|
+
"core": "0.9.0-beta",
|
|
7
|
+
"cli": "0.6.0-beta"
|
|
8
8
|
}
|
package/dist/compatibility.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"harness": "0.
|
|
3
|
-
"runtime": "0.
|
|
4
|
-
"agents": "0.
|
|
5
|
-
"admin": "0.
|
|
6
|
-
"core": "0.
|
|
7
|
-
"cli": "0.
|
|
2
|
+
"harness": "0.21.0-beta",
|
|
3
|
+
"runtime": "0.14.0-beta",
|
|
4
|
+
"agents": "0.10.0-beta",
|
|
5
|
+
"admin": "0.6.0-beta",
|
|
6
|
+
"core": "0.9.0-beta",
|
|
7
|
+
"cli": "0.6.0-beta"
|
|
8
8
|
}
|
package/dist/starter/README.md
CHANGED
|
@@ -16,9 +16,11 @@ watching works.
|
|
|
16
16
|
|
|
17
17
|
Agent and tool definitions live in `agents/`. The **Runtime** holds your
|
|
18
18
|
sessions in isolated **Tenants**; this project attaches through a **Project
|
|
19
|
-
link
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
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`:
|
|
22
24
|
|
|
23
25
|
- `nylorun` sets up and runs the local stack (Runtime and Studio).
|
|
24
26
|
- `@nylorun/cli` (command `nylo`) talks to a Runtime: Tenants, the Project
|
|
@@ -45,8 +47,11 @@ Without them, set the provider in Studio's Model provider screen, or with
|
|
|
45
47
|
`npx @nylorun/cli configure`. Model calls use the Tenant's provider and may
|
|
46
48
|
incur its usual charges.
|
|
47
49
|
|
|
48
|
-
`npm run dev` runs `src/main.ts` with `tsx watch
|
|
49
|
-
|
|
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 stack's Runtime runs in
|
|
53
|
+
Docker and reaches `localhost` on this machine. `npx @nylorun/cli tenant
|
|
54
|
+
endpoints` shows the endpoint and how its deliveries are doing. `npx nylorun studio` opens Studio on this
|
|
50
55
|
project's Tenant, and signs in a browser that is not signed in yet. In
|
|
51
56
|
Studio, ask **Look up order demo-123**. The local tool returns `shipped`;
|
|
52
57
|
Studio shows the tool call and assistant response. The Runtime listens on
|
|
@@ -58,11 +63,13 @@ npm run build
|
|
|
58
63
|
npm start
|
|
59
64
|
```
|
|
60
65
|
|
|
61
|
-
`npm start` runs `node dist/src/main.js`, the same
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
`npm start` runs `node dist/src/main.js`, the same entry as development. Set
|
|
67
|
+
`NYLORUN_RUNTIME_URL`, `NYLORUN_TENANT`, 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
|
|
66
73
|
after changing definitions or implementations; active-session upgrades are not
|
|
67
74
|
supported.
|
|
68
75
|
|
|
@@ -79,7 +86,8 @@ admin key; Tenant data lives in the stack's Docker volumes. A fresh clone or
|
|
|
79
86
|
second worktree does not reuse this link: run `tenant create` there, or
|
|
80
87
|
`npx @nylorun/cli tenant use <name>` with that Tenant's credentials.
|
|
81
88
|
Keep `.nylorun/` private. Application credentials are generated when the
|
|
82
|
-
Tenant is created
|
|
89
|
+
Tenant is created. Each delivery carries a short-lived token the endpoint
|
|
90
|
+
verifies with the Tenant's public keys. Ordinary
|
|
83
91
|
shutdown/restart preserves completed session history; `npx nylorun reset`
|
|
84
92
|
deletes every Tenant.
|
|
85
93
|
`NYLORUN_IMPLEMENTATION_VERSION` defaults to `dev`; assign an explicit version
|
package/dist/starter/src/main.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createServer } from "node:http";
|
|
2
|
+
import { createActionHandler } from "@nylorun/agents";
|
|
2
3
|
import { agents } from "../agents/index.js";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// The Runtime delivers each tool call to this URL. On the local stack `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
|
+
}
|
|
23
|
+
}
|
|
24
|
+
console.log(`Serving Actions at ${url}`);
|