@nylorun/core 0.25.0-beta → 0.27.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 +15 -0
- package/README.md +4 -0
- package/dist/compatibility.d.ts +14 -2
- package/dist/compatibility.js +14 -0
- package/dist/contracts.d.ts +339 -6
- package/dist/contracts.js +148 -6
- package/dist/folder/compile.d.ts +49 -0
- package/dist/folder/compile.js +869 -0
- package/dist/folder/frontmatter.d.ts +18 -0
- package/dist/folder/frontmatter.js +87 -0
- package/dist/folder/index.d.ts +7 -0
- package/dist/folder/index.js +7 -0
- package/dist/folder/json.d.ts +28 -0
- package/dist/folder/json.js +183 -0
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.27.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9ba6634: Agent folders (track T6, D79): `@nylorun/core/folder` exports `compileAgentFolder`, which turns a folder of Markdown and JSON into agent manifest v8. It is pure, so the Runtime and `nylorun check` give one verdict: `AGENT.md` (frontmatter and instructions) and `instructions/*.md`, `runtime.json`, `mcp.json` in Agent Plugins syntax (`${NAME}` in a header names the credential; a slot `runtime.json` does not declare is derived for the server's URL), `skills/<name>/`, HTTP `tools/<name>.json` with schemas inline or by path, `triggers/<id>.md` and `files/**`. Every problem comes back in one pass, with file, line and column for parse and schema errors, and an unknown key gets a "did you mean". JSON is strict; frontmatter is YAML 1.2 core with no aliases, tags or merge keys. Flows, subagents and vendored plugins are refused for now. `folderTextPaths` names the files the compiler reads; `AGENT_FOLDER_LIMITS` holds the folder limits (2,000 files, 50 MiB, 1 MiB per Markdown or JSON file).
|
|
8
|
+
- aaa079f: The Runtime saves agent folders (track T6). `PUT /v1/agent-manifests/{name}` with `Content-Type: application/vnd.nylorun.folder+json` takes a folder by hash (`PutAgentFolderRequestSchema`): the files uploaded first, the Markdown and JSON read back from the definition file store and compiled with `compileAgentFolder`. A folder that does not compile is `422 folder_invalid`, with the compiler's diagnostics by file, line and column in `details.diagnostics`. A save keeps the folder as the version's source: `AgentManifestView.source` summarises it, `GET /v1/agent-manifests/{name}/versions/{v}/source` lists its files and `.../source/files/{path}` returns one. With `?dryRun=true` the plan adds the compiled `manifest`, the `diagnostics` and the `compiler`. A folder whose manifest is unchanged saves no version, and says so (`source_not_saved`). New Host feature `agent-folders`; new error code `folder_invalid`.
|
|
9
|
+
|
|
10
|
+
## 0.26.0-beta
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- fce0c9b: Headers for a custom model endpoint (#493). A custom endpoint's `settings` (`PUT /v1/tenant/model`) take `headers`, sent on every call, and `callHeaders`, whose values the Runtime resolves per call from the calling Agent: one of its labels (`{ from: "agent.label", key: "org" }`), its id (`agent.id`) or the session's owner when it is a person (`session.owner`). A source with no value sends no header. A Runtime that serves several orgs' Agents can then send each call's org (`x-nylorun-org` from the `org` label), so a model gateway attributes and budgets it while the call is made, in process and through the gates service alike. They are settings, read back by `GET /v1/tenant/model`: neither map may set `authorization`, a hop-by-hop or transport header, or `Nylorun-*`, and a name appears once across both. Studio keeps them when it saves the model.
|
|
15
|
+
- ab7c08a: A gateway's tool prefix (#494, Host feature `gateway-credentials`). A `bearer` or `headers` credential with `via`, written to an Agent's vault, may add `toolPrefix`: what the gateway at `via` puts before each tool name it lists, such as LiteLLM's `github-`. The Runtime lists the server's tools without it, so tool names (`github__create_issue`), a manifest's `tools` settings and tool policy rules name the server's own tools whether or not a gateway is in between, and calls each tool by the name the gateway listed. A listed tool that lacks the prefix keeps its name, and the server's `mcp.discovered` message names it. `toolPrefix` needs `via`, and secret views carry it. It is the installation's routing, never a manifest's: a manifest's secret slot cannot name it, and a slot's value write (`{ headers, toolPrefix }`) adds it. A fork keeps it while the new slot keeps `via`. No protocol change.
|
|
16
|
+
- 4a563e7: The workload token (#496). A Runtime given `NYLORUN_WORKLOAD_TOKEN_FILE`, a token a platform rotates through a file, reads it at each use and keeps nothing, so a rotation applies to the next request with no restart; a missing, unreadable or empty file fails the request, naming the variable, and nothing is sent without it. A custom model with `auth: { type: "workload" }` sends it as the endpoint's bearer. A new credential type, `workload` (`{ url, via, identity?, toolPrefix? }`, no value), sends `Authorization: Bearer <token>` to its `via` only, and only when `via`'s origin is in `NYLORUN_WORKLOAD_TOKEN_ORIGINS`, since an Agent's writer chooses `via`. A gateway's `401` is `credential_rejected` with `gateway`, its origin. The token stays in the process that makes the call: never in a sandbox, the model, an event or a log. Studio shows the credential and the model's auth.
|
|
17
|
+
|
|
3
18
|
## 0.25.0-beta
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ HTTP client, Node host or SDK dependencies.
|
|
|
6
6
|
- `/define`: `Agent`, `tool`, the manifest, schemas and explicit local bindings.
|
|
7
7
|
- `/contracts`: runtime request, event, action and response schemas.
|
|
8
8
|
- `/compatibility`: protocol/definition versions and canonical manifest hashing.
|
|
9
|
+
- `/folder`: agent folders. `compileAgentFolder` turns a folder of Markdown and JSON
|
|
10
|
+
(`AGENT.md`, `runtime.json`, `mcp.json`, `skills/`, `tools/`, `triggers/`, `files/`) into
|
|
11
|
+
agent manifest v8, with every diagnostic by file, line and column. Pure: the Runtime
|
|
12
|
+
compiles every folder it is sent with it, and `nylorun check` checks one offline.
|
|
9
13
|
- `/transport`: what every Runtime client does on the wire: the `/health`
|
|
10
14
|
compatibility probe (`checkHealth`), protocol ranges, request headers and
|
|
11
15
|
response bodies. Browser-safe; `@nylorun/agents` and `@nylorun/admin` build on it.
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -194,10 +194,16 @@ export type ProtocolFeature = (typeof PROTOCOL_FEATURES)[number];
|
|
|
194
194
|
* `traces`: `GET /v1/sessions/{id}/turns/{turnId}/trace` answers a turn's spans as OTLP JSON,
|
|
195
195
|
* the spans the Runtime posts to an OTLP collector when one is configured; a command or an AG-UI
|
|
196
196
|
* or A2A request sent with a `traceparent` joins the caller's trace.
|
|
197
|
+
* `gateway-credentials`: a `bearer` or `headers` credential with `via`, written to an Agent's vault,
|
|
198
|
+
* may name the gateway's tool prefix (`toolPrefix`), which the Runtime takes off the tools it lists
|
|
199
|
+
* and puts back on each call.
|
|
200
|
+
* `agent-folders`: `PUT /v1/agent-manifests/{name}` also takes an agent folder by hash
|
|
201
|
+
* (`application/vnd.nylorun.folder+json`), compiles it with `@nylorun/core/folder` and keeps it
|
|
202
|
+
* as the version's source, read at `GET .../versions/{v}/source` and `.../source/files/{path}`.
|
|
197
203
|
*/
|
|
198
204
|
export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "transcript-events", "subject-headers", "ag-ui-endpoint", "a2a-endpoint", "sandbox-pods", "trusted-issuers", "session-reads", "calls-export", "credential-coverage", "tool-calls", "environment-setup", "environment-disk-versions", "tool-policy", "traces",
|
|
199
205
|
/** Opt-in artifact metadata pages (`GET /v1/artifacts?limit=…`). */
|
|
200
|
-
"artifact-reads"];
|
|
206
|
+
"artifact-reads", "gateway-credentials", "agent-folders"];
|
|
201
207
|
export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
|
|
202
208
|
export interface ProtocolRange {
|
|
203
209
|
min: number;
|
|
@@ -349,7 +355,13 @@ export declare const ERROR_CODES: readonly ["not_found",
|
|
|
349
355
|
* `If-Match` named a version that is no longer the latest: `412`. Read the manifest
|
|
350
356
|
* again, or save without `If-Match` (the CLI's `--if-match`, the SDK's `ifMatch`).
|
|
351
357
|
*/
|
|
352
|
-
"manifest_changed",
|
|
358
|
+
"manifest_changed",
|
|
359
|
+
/**
|
|
360
|
+
* An agent folder that does not compile (track T6): `422` when it is saved or planned.
|
|
361
|
+
* `details.diagnostics` names every problem, each with its file and, for parse and schema
|
|
362
|
+
* errors, its line and column.
|
|
363
|
+
*/
|
|
364
|
+
"folder_invalid", "internal_error"];
|
|
353
365
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
354
366
|
export declare const TENANT_ID_PATTERN: RegExp;
|
|
355
367
|
export declare const PRINCIPAL_ID_PATTERN: RegExp;
|
package/dist/compatibility.js
CHANGED
|
@@ -196,6 +196,12 @@ export const PROTOCOL_FEATURES = [
|
|
|
196
196
|
* `traces`: `GET /v1/sessions/{id}/turns/{turnId}/trace` answers a turn's spans as OTLP JSON,
|
|
197
197
|
* the spans the Runtime posts to an OTLP collector when one is configured; a command or an AG-UI
|
|
198
198
|
* or A2A request sent with a `traceparent` joins the caller's trace.
|
|
199
|
+
* `gateway-credentials`: a `bearer` or `headers` credential with `via`, written to an Agent's vault,
|
|
200
|
+
* may name the gateway's tool prefix (`toolPrefix`), which the Runtime takes off the tools it lists
|
|
201
|
+
* and puts back on each call.
|
|
202
|
+
* `agent-folders`: `PUT /v1/agent-manifests/{name}` also takes an agent folder by hash
|
|
203
|
+
* (`application/vnd.nylorun.folder+json`), compiles it with `@nylorun/core/folder` and keeps it
|
|
204
|
+
* as the version's source, read at `GET .../versions/{v}/source` and `.../source/files/{path}`.
|
|
199
205
|
*/
|
|
200
206
|
export const OPTIONAL_HOST_FEATURES = [
|
|
201
207
|
"tenant-fixture-model",
|
|
@@ -215,6 +221,8 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
215
221
|
"traces",
|
|
216
222
|
/** Opt-in artifact metadata pages (`GET /v1/artifacts?limit=…`). */
|
|
217
223
|
"artifact-reads",
|
|
224
|
+
"gateway-credentials",
|
|
225
|
+
"agent-folders",
|
|
218
226
|
];
|
|
219
227
|
/**
|
|
220
228
|
* What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
|
|
@@ -377,6 +385,12 @@ export const ERROR_CODES = [
|
|
|
377
385
|
* again, or save without `If-Match` (the CLI's `--if-match`, the SDK's `ifMatch`).
|
|
378
386
|
*/
|
|
379
387
|
"manifest_changed",
|
|
388
|
+
/**
|
|
389
|
+
* An agent folder that does not compile (track T6): `422` when it is saved or planned.
|
|
390
|
+
* `details.diagnostics` names every problem, each with its file and, for parse and schema
|
|
391
|
+
* errors, its line and column.
|
|
392
|
+
*/
|
|
393
|
+
"folder_invalid",
|
|
380
394
|
"internal_error",
|
|
381
395
|
];
|
|
382
396
|
/** Crockford Base32 alphabet (lowercase); excludes i, l, o, u. */
|