@nylorun/core 0.33.0-beta → 0.35.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 +85 -0
- package/dist/compatibility.d.ts +25 -1
- package/dist/compatibility.js +24 -0
- package/dist/contracts.d.ts +749 -17
- package/dist/contracts.js +360 -22
- package/dist/define.d.ts +1 -1
- package/dist/define.js +1 -1
- package/dist/definition/assemble.d.ts +2 -1
- package/dist/definition/assemble.js +1 -0
- package/dist/definition/from.js +1 -0
- package/dist/definition/manifest.d.ts +2 -1
- package/dist/definition/manifest.js +1 -0
- package/dist/definition/sections.d.ts +1 -1
- package/dist/definition/sections.js +5 -1
- package/dist/definition/variant.d.ts +16 -1
- package/dist/definition/variant.js +81 -3
- package/dist/engine/blocks.d.ts +54 -0
- package/dist/engine/blocks.js +162 -0
- package/dist/engine/explain.d.ts +36 -0
- package/dist/engine/explain.js +113 -0
- package/dist/engine/features.d.ts +28 -0
- package/dist/engine/features.js +34 -0
- package/dist/engine/index.d.ts +14 -0
- package/dist/engine/index.js +14 -0
- package/dist/engine/mcp.d.ts +119 -0
- package/dist/engine/mcp.js +267 -0
- package/dist/engine/names.d.ts +12 -0
- package/dist/engine/names.js +26 -0
- package/dist/engine/preview.d.ts +93 -0
- package/dist/engine/preview.js +120 -0
- package/dist/engine/projection.d.ts +63 -0
- package/dist/engine/projection.js +109 -0
- package/dist/engine/tools.d.ts +118 -0
- package/dist/engine/tools.js +508 -0
- package/dist/folder/compile.d.ts +11 -4
- package/dist/folder/compile.js +126 -13
- package/dist/folder/context.d.ts +5 -0
- package/dist/folder/decompile.js +22 -1
- package/dist/folder/engine.d.ts +73 -0
- package/dist/folder/engine.js +224 -0
- package/dist/folder/nested.js +6 -0
- package/dist/folder/schemas.js +47 -3
- package/dist/harness-api/harness-api.schema.json +29 -7
- package/dist/harness-api/json-schema.js +6 -2
- package/dist/harness-api/messages.d.ts +4 -2
- package/dist/harness-api/messages.js +4 -1
- package/dist/harness-api/schema.d.ts +15 -4
- package/dist/harness-api/schema.js +20 -4
- package/dist/manifest-schemas.js +9 -4
- package/dist/schemas/agent-folder/agent-md.schema.json +84 -3
- package/dist/schemas/agent-folder/runtime.schema.json +34 -1
- package/dist/schemas/agent-manifest.schema.json +166 -1
- package/dist/schemas/harness-manifest.schema.json +130 -1
- package/dist/schemas/runtime-manifest.schema.json +34 -1
- package/dist/types/manifest.d.ts +49 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.35.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 714bee2: The triggers capability (Host feature `agent-triggers`): an agent-folder/2 folder declares `engine: { triggers: true }` (the root agent's only; `engine.instructions.triggers` replaces its wording), which compiles to `harness.engine.triggers` and offers the root agent the `triggers` tool (`list`, `create`, `delete`) and the text block `triggers@1`. The Runtime serves each call as a `runtime` effect (operation `triggers`, `turn.start.agent.triggers`, Harness API v5.3): a trigger an agent makes is the Agent's (`origin: "agent"`, with its title and the session that made it), runs in the calling session (`session: "this"`) or one of its own (`"own"`, `<session>_t_<id>`), is checked against the limits in force (`runtime.limits.triggers` within the Tenant's), survives upgrades and waits paused while a version lacks the capability; a turn a trigger started can't create one. Tool rules take `kind: "runtime"`, so an `ask` rule can hold a `triggers` call (its interaction carries `metadata.input`); `DELETE /v1/agents/{id}/triggers/{triggerId}` deletes an agent's trigger (`409 trigger_from_manifest` for a manifest's); `GET /v1/runs/stream` serves the Tenant's runs as server-sent events from a cursor (`410 cursor_expired` across a reset). `client.agents.deleteTrigger`, `client.runs.stream` and `nylorun agents triggers rm` follow. The JSON Schemas are republished as `agent-manifest/v8.3`, `harness-manifest/v1.3`, `runtime-manifest/v1.2`, `agent-folder/v1/agent-md.3`, `agent-folder/v1/runtime.2` and `harness-api/v5.3`.
|
|
8
|
+
|
|
9
|
+
## 0.34.0-beta
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 67ed2ea: `agent-folder/2` (ADR-100): a folder that declares every engine feature it uses. `format:
|
|
14
|
+
agent-folder/2` (or `2`) in `AGENT.md` turns it on; `agent-folder/1` and a folder with no format
|
|
15
|
+
compile exactly as before. Its `engine:` block declares `sandbox` (any of the six sandbox tools;
|
|
16
|
+
needs a computer), `artifacts: { read, save }` (`save` needs a computer), `outputs` (needs a
|
|
17
|
+
computer) and `toolSearch`, and `instructions.<block>` replaces a block's wording with a Markdown
|
|
18
|
+
file under `engine/`; `memory.index: false` pins no memory index. A computer with no sandbox tools
|
|
19
|
+
is a warning (`sandbox_undeclared`). A subagent declares its own `engine:` block, a subset of its
|
|
20
|
+
parent's (`engine_subset`).
|
|
21
|
+
|
|
22
|
+
The compiled manifest holds it as `harness.engine` (agent manifest v8, JSON Schema
|
|
23
|
+
`agent-manifest/v8.2.json`; the harness file `harness-manifest/v1.2.json`; the frontmatter
|
|
24
|
+
`agent-folder/v1/agent-md.2.json`), and the loop manifest the harness runs as `engine`
|
|
25
|
+
(`loopManifestOf`). `harness.engine.blocks` lists the engine text blocks the agent gets, each with
|
|
26
|
+
its version and the SHA-256 of its text, so an engine release that changes one changes the
|
|
27
|
+
version's hash.
|
|
28
|
+
|
|
29
|
+
New `@nylorun/core/engine`: our engine's text blocks by name and version (`skills`, `sandbox`,
|
|
30
|
+
`skill_folder`, `artifacts_save`, `outputs`, `artifacts_read`, `wake`, `memory`, `plan`,
|
|
31
|
+
`connection`, `tool_search`, each `@1`), the definitions of its own tools, the MCP tools' naming
|
|
32
|
+
and deferral (`mcpToolSet`, which no longer defers automatically for an agent that declares its
|
|
33
|
+
engine features without `toolSearch: true` and reports `mcp_tools_inline` instead), the projection
|
|
34
|
+
for one agent (`engineProjection`), `previewTurn` and `explainEngine`. Harness API v5 takes the
|
|
35
|
+
claim `engine.diagnostic` (a new event type) and a `turn.start.memory` without `index`
|
|
36
|
+
(`harness-api/v5.2.json`).
|
|
37
|
+
|
|
38
|
+
- 67ed2ea: An MCP server that failed at a session's first discovery is tried again at each later turn's first
|
|
39
|
+
segment, and joins the session's snapshot once it answers: its tools are offered from that turn on,
|
|
40
|
+
its diagnostic is replaced, and `mcp.discovered` names it again with `rejoined: true`. `session.mcp`
|
|
41
|
+
takes a later snapshot of servers the session lacks and merges them within `mcpSnapshotBytes`.
|
|
42
|
+
- 67ed2ea: The memory index a session pinned is refreshed at its next turn's first segment (never mid-turn)
|
|
43
|
+
when another session of the Agent, or the API, wrote the Agent's memory since its last turn started:
|
|
44
|
+
`turn.start.memory.refresh` (Harness API), and our engine pins the index again (`runDurable`'s
|
|
45
|
+
`refreshPinned`). The Runtime keeps the newest memory version a turn saw on the session
|
|
46
|
+
(`Session.memoryIndex`, `memoryWritesSince`). A session's own writes leave its index as pinned.
|
|
47
|
+
- 67ed2ea: A message's `removeTools` (Host feature `remove-tools`): the tools its turn may not use, by name. A
|
|
48
|
+
declared tool or an agent used as a tool by its name (in the agent and the agents it uses as tools),
|
|
49
|
+
an MCP server's tool as `<server>__<tool>`, a whole server by its name. The Runtime applies it to the
|
|
50
|
+
version the turn runs, after the turn's first segment re-pins the session to its Agent's version, so
|
|
51
|
+
a session that always sends it still moves to new versions; names that version lacks are ignored.
|
|
52
|
+
A message's turn manifest is validated again against the version a re-pin moves to; one that is no
|
|
53
|
+
variant of it keeps the turn on the version it pinned (`turn.version_kept`). A variant may narrow an
|
|
54
|
+
agent it uses as a tool (`isVariantOf`; `withoutTools` in `@nylorun/core/define`). An HTTP tool call
|
|
55
|
+
is checked against the turn's manifest. `session.input` and `session.inputParts` take
|
|
56
|
+
`removeTools`.
|
|
57
|
+
- 67ed2ea: Secret routing: the agent folder names, the installation routes (Host feature `secret-routing`, no
|
|
58
|
+
protocol change). A `bearer` or `headers` secret slot (`runtime.json`, `runtime.secrets`) takes the
|
|
59
|
+
gateway's `toolPrefix`, with or without `via`, and a slot's value write
|
|
60
|
+
(`PUT /v1/agents/{id}/secrets/{name}` with `{ value }` or `{ headers }`) takes `via`, with the same
|
|
61
|
+
URL rules as a slot's. At each request the secret's `via` wins, else the slot's in the version the
|
|
62
|
+
Agent runs, else none (the slot's `url`); the slot's `toolPrefix` wins over the secret's and
|
|
63
|
+
applies only with a `via`; the slot's `url` still picks the credential, for MCP servers and HTTP
|
|
64
|
+
tools alike, and an HTTP tool whose URL has `{field}` parameters still fails behind a `via`. A
|
|
65
|
+
write whose `toolPrefix` differs from its slot's is accepted, with a warning in the log. A `via` a
|
|
66
|
+
write copied from its slot follows the slot when the Agent moves, and a fork keeps a secret's own
|
|
67
|
+
`via`. Secret views show the `via` and `toolPrefix` in force, never a value.
|
|
68
|
+
`client.agents.secrets.put` takes `{ value | headers, via?, toolPrefix? }` (`AgentSecretRouting`),
|
|
69
|
+
and `nylorun agents secrets put` takes `--via` and `--tool-prefix`, and a slot's JSON without a
|
|
70
|
+
`type`. The JSON Schemas that gained the slot's `toolPrefix` are published as
|
|
71
|
+
`agent-manifest/v8.2`, `runtime-manifest/v1.1` and `agent-folder/v1/runtime.1`, which `nylorun init`
|
|
72
|
+
maps; the old `$schema` URLs are still read.
|
|
73
|
+
- 67ed2ea: A session records the model its turns call and why (`SessionModelRecord`): `model` on `GET
|
|
74
|
+
/v1/sessions/{id}` is `{provider, model, source: "manifest" | "session" | "tenant", reason?,
|
|
75
|
+
requested?}`, with the fallback's `reason` (`provider_not_connected`, `not_in_catalog`,
|
|
76
|
+
`invalid_model`) and the model `requested` by the manifest or the session. It is set when the
|
|
77
|
+
session opens, chooses or clears its model, and again at each segment's start, and each change
|
|
78
|
+
writes the new `session.model` event with the `previous` record. `SessionView.model` in
|
|
79
|
+
`@nylorun/agents`.
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- 67ed2ea: A tool policy rule whose `agent` names the session's root agent (its manifest's name) also matches
|
|
84
|
+
the MCP and HTTP calls of the agents it uses as tools; a rule naming the subagent's id still matches
|
|
85
|
+
them. `PolicyCall.root` carries the root for a subagent's call. The `agent` selector's contract
|
|
86
|
+
comments say so.
|
|
87
|
+
|
|
3
88
|
## 0.33.0-beta
|
|
4
89
|
|
|
5
90
|
### Minor Changes
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -234,7 +234,31 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
|
|
|
234
234
|
* opened on a version that names one starts with it as its own model (`session-model`), when
|
|
235
235
|
* its provider is connected and lists it; otherwise the Tenant's model applies.
|
|
236
236
|
*/
|
|
237
|
-
"agent-model"
|
|
237
|
+
"agent-model",
|
|
238
|
+
/**
|
|
239
|
+
* Secret routing bound by the installation, naming by the folder: a manifest's `bearer` or
|
|
240
|
+
* `headers` secret slot may name the gateway's `toolPrefix` (with or without a `via`), and a
|
|
241
|
+
* slot's value write (`PUT /v1/agents/{id}/secrets/{name}` with `{ value }` or `{ headers }`)
|
|
242
|
+
* may name `via`, where the credential's requests go. At each request the secret's `via` wins
|
|
243
|
+
* over the slot's, the slot's `toolPrefix` over the secret's, and the credential is still
|
|
244
|
+
* chosen by the slot's `url`. Secret reads show the `via` and `toolPrefix` in force.
|
|
245
|
+
*/
|
|
246
|
+
"secret-routing",
|
|
247
|
+
/**
|
|
248
|
+
* A message's `removeTools`: the tools its turn may not use, by name (declared tools, agents
|
|
249
|
+
* used as tools and their tools, `<server>__<tool>` and `<server>` for MCP), applied to the
|
|
250
|
+
* version the turn runs after its first segment re-pins it to the Agent's, so a session that
|
|
251
|
+
* always sends it still moves to new versions.
|
|
252
|
+
*/
|
|
253
|
+
"remove-tools",
|
|
254
|
+
/**
|
|
255
|
+
* The triggers capability (D83): an agent whose version declares `harness.engine.triggers` sets
|
|
256
|
+
* up its own triggers with the `triggers` tool, kept by the Agent (`origin: agent` in
|
|
257
|
+
* `GET /v1/agents/{id}/triggers`); `DELETE /v1/agents/{id}/triggers/{triggerId}` deletes one;
|
|
258
|
+
* a tool rule of `kind: "runtime"` decides the operations the Runtime serves; the manifest's
|
|
259
|
+
* `runtime.limits.triggers`; and `GET /v1/runs/stream`, the Tenant's runs as server-sent events.
|
|
260
|
+
*/
|
|
261
|
+
"agent-triggers"];
|
|
238
262
|
export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
|
|
239
263
|
export interface ProtocolRange {
|
|
240
264
|
min: number;
|
package/dist/compatibility.js
CHANGED
|
@@ -257,6 +257,30 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
257
257
|
* its provider is connected and lists it; otherwise the Tenant's model applies.
|
|
258
258
|
*/
|
|
259
259
|
"agent-model",
|
|
260
|
+
/**
|
|
261
|
+
* Secret routing bound by the installation, naming by the folder: a manifest's `bearer` or
|
|
262
|
+
* `headers` secret slot may name the gateway's `toolPrefix` (with or without a `via`), and a
|
|
263
|
+
* slot's value write (`PUT /v1/agents/{id}/secrets/{name}` with `{ value }` or `{ headers }`)
|
|
264
|
+
* may name `via`, where the credential's requests go. At each request the secret's `via` wins
|
|
265
|
+
* over the slot's, the slot's `toolPrefix` over the secret's, and the credential is still
|
|
266
|
+
* chosen by the slot's `url`. Secret reads show the `via` and `toolPrefix` in force.
|
|
267
|
+
*/
|
|
268
|
+
"secret-routing",
|
|
269
|
+
/**
|
|
270
|
+
* A message's `removeTools`: the tools its turn may not use, by name (declared tools, agents
|
|
271
|
+
* used as tools and their tools, `<server>__<tool>` and `<server>` for MCP), applied to the
|
|
272
|
+
* version the turn runs after its first segment re-pins it to the Agent's, so a session that
|
|
273
|
+
* always sends it still moves to new versions.
|
|
274
|
+
*/
|
|
275
|
+
"remove-tools",
|
|
276
|
+
/**
|
|
277
|
+
* The triggers capability (D83): an agent whose version declares `harness.engine.triggers` sets
|
|
278
|
+
* up its own triggers with the `triggers` tool, kept by the Agent (`origin: agent` in
|
|
279
|
+
* `GET /v1/agents/{id}/triggers`); `DELETE /v1/agents/{id}/triggers/{triggerId}` deletes one;
|
|
280
|
+
* a tool rule of `kind: "runtime"` decides the operations the Runtime serves; the manifest's
|
|
281
|
+
* `runtime.limits.triggers`; and `GET /v1/runs/stream`, the Tenant's runs as server-sent events.
|
|
282
|
+
*/
|
|
283
|
+
"agent-triggers",
|
|
260
284
|
];
|
|
261
285
|
/**
|
|
262
286
|
* What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
|