@nylorun/core 0.40.0-beta → 0.42.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 +21 -0
- package/dist/compatibility.d.ts +9 -1
- package/dist/compatibility.js +8 -0
- package/dist/contracts.d.ts +43 -4
- package/dist/contracts.js +20 -5
- package/dist/definition/variant.d.ts +3 -1
- package/dist/definition/variant.js +7 -4
- package/dist/engine/explain.js +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.42.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6b49200: A2A `SendMessage` takes `message.metadata.delivery: "steer"` (Host feature `a2a-steer`, ADR-140), a session message's steer (D85): to a busy context the message waits marked `steer`, and the running turn takes it before its next step, so its task becomes that turn's. To an idle context it starts a turn; to a workflow's, or a turn past its last step, it is an ordinary queued message. The task answered to a steer carries `metadata.delivery`: `steered`, or `queued` when the message started a turn or waits unmarked; callers that don't ask for steer get the same answer as before. `createA2aClient`'s `send` takes `delivery: "steer"`, and `readDelivery(task)` reads what applied.
|
|
8
|
+
|
|
9
|
+
## 0.41.0-beta
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- fe118db: The Tenant's sandbox settings round-trip, and `engine.images` comes back (#588).
|
|
14
|
+
|
|
15
|
+
- **Breaking (`@nylorun/runtime`, `@nylorun/core`, `@nylorun/admin`): `config` is the settings as stored.** `GET` and `PUT /v1/tenant/sandbox` (`admin.settings.sandbox`) answer `config` as the Tenant set it, with no defaults, in exactly the shape `PUT` takes (`limits.resources.memory: "8GiB"`), so `put(get().config)` changes nothing and saves no default as a setting. The settings in force, every default filled in and sizes in MiB (`memoryMiB`), are `effective`, which is what `config` was. Before, `PUT` refused what `GET` answered (`unrecognized_keys "memoryMiB"`). Read the settings in force from `effective` (`view.effective.limits.resources.memoryMiB`), and build a `PUT` body from `view.config`. `TenantSandboxViewSchema` has `config: TenantEnvironmentsConfigSchema` and `effective: EffectiveSandboxConfigSchema`.
|
|
16
|
+
- **`engine.images` is answered.** A `PUT` with `engine.images` was stored and used, but left out of its answer and of the next `GET`. Both now carry it, in `config` as set and in `effective` (`[]` when unset).
|
|
17
|
+
- `@nylorun/studio`: Edit compute settings puts the stored settings with only the fields it changed, so it no longer erases `engine.images` set through the API, keeps `placement`, and saves no default as a setting; clearing idle, stop grace or most Agents puts back the default. The Compute tab lists the engine images.
|
|
18
|
+
- `nylorun`: `nylorun tenant settings sandbox put` takes what `get` printed and puts back its `config`. `nylorun doctor sandbox` reads the limits in force from `effective`, or from `config` on an older Runtime.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- fe118db: A message's `removeTools` turns a Runtime plugin's tool off by its own name too: `memory` now does what `nylorun__memory` does, so the name events and `check --explain` showed no longer leaves the tool on without a word (#589). `nylorun check --explain` lists a plugin's tools by the names the model reads (`nylorun__memory`, `nylorun__update_plan`), the ones `removeTools` and tool policy take, and its memory note says the index is pinned again at a turn after a write from elsewhere (#590, #591).
|
|
23
|
+
|
|
3
24
|
## 0.40.0-beta
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -275,7 +275,15 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
|
|
|
275
275
|
* queue (`queue.cancelled`), and a failed or cancelled queued task answers, and pushes,
|
|
276
276
|
* `FAILED` or `CANCELED`.
|
|
277
277
|
*/
|
|
278
|
-
"queue-recovery"
|
|
278
|
+
"queue-recovery",
|
|
279
|
+
/**
|
|
280
|
+
* The A2A endpoint's `message.metadata.delivery: "steer"` (ADR-140): a session message's steer
|
|
281
|
+
* (`steer`, D85). To a busy context the message waits marked `steer` and the running turn takes
|
|
282
|
+
* it before its next step, its task then that turn's; to an idle context, a workflow's, or a
|
|
283
|
+
* turn past its last step it is an ordinary queued message. The task `SendMessage` answers
|
|
284
|
+
* carries `metadata.delivery`: `steered` or `queued`.
|
|
285
|
+
*/
|
|
286
|
+
"a2a-steer"];
|
|
279
287
|
export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
|
|
280
288
|
export interface ProtocolRange {
|
|
281
289
|
min: number;
|
package/dist/compatibility.js
CHANGED
|
@@ -298,6 +298,14 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
298
298
|
* `FAILED` or `CANCELED`.
|
|
299
299
|
*/
|
|
300
300
|
"queue-recovery",
|
|
301
|
+
/**
|
|
302
|
+
* The A2A endpoint's `message.metadata.delivery: "steer"` (ADR-140): a session message's steer
|
|
303
|
+
* (`steer`, D85). To a busy context the message waits marked `steer` and the running turn takes
|
|
304
|
+
* it before its next step, its task then that turn's; to an idle context, a workflow's, or a
|
|
305
|
+
* turn past its last step it is an ordinary queued message. The task `SendMessage` answers
|
|
306
|
+
* carries `metadata.delivery`: `steered` or `queued`.
|
|
307
|
+
*/
|
|
308
|
+
"a2a-steer",
|
|
301
309
|
];
|
|
302
310
|
/**
|
|
303
311
|
* What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
|
package/dist/contracts.d.ts
CHANGED
|
@@ -4215,8 +4215,8 @@ export type MessageDelivery = z.infer<typeof MessageDeliverySchema>;
|
|
|
4215
4215
|
* A message's `removeTools` (Host feature `remove-tools`): the tools its turn may not use, by
|
|
4216
4216
|
* name. In the root agent and each agent it uses as a tool, a name removes the declared tool of
|
|
4217
4217
|
* that name (an agent used as a tool included), `<server>__<tool>` disables an MCP server's tool
|
|
4218
|
-
* (the server's name and the tool's own name on it),
|
|
4219
|
-
* Applied to the version the turn runs, after a turn's first segment re-pins the session to its
|
|
4218
|
+
* (the server's name and the tool's own name on it), `<server>` every tool of that server, and a
|
|
4219
|
+
* Runtime plugin's tool is named `nylorun__<tool>` or by its own name (`memory`). Applied to the version the turn runs, after a turn's first segment re-pins the session to its
|
|
4220
4220
|
* Agent's version; names that version does not have are ignored. Any caller may send it: it
|
|
4221
4221
|
* only narrows.
|
|
4222
4222
|
*/
|
|
@@ -7628,7 +7628,10 @@ export declare const ListProvidersResponseSchema: z.ZodObject<{
|
|
|
7628
7628
|
}, z.core.$strict>>;
|
|
7629
7629
|
}, z.core.$strict>;
|
|
7630
7630
|
export type ListProvidersResponse = z.infer<typeof ListProvidersResponseSchema>;
|
|
7631
|
-
/**
|
|
7631
|
+
/**
|
|
7632
|
+
* A Tenant's Environment settings with every default applied (sizes in MiB): the configuration in
|
|
7633
|
+
* force. `GET /v1/tenant/sandbox` answers it as `effective`, beside `config`, the settings as set.
|
|
7634
|
+
*/
|
|
7632
7635
|
export declare const EffectiveSandboxConfigSchema: z.ZodObject<{
|
|
7633
7636
|
limits: z.ZodObject<{
|
|
7634
7637
|
network: z.ZodArray<z.ZodString>;
|
|
@@ -7652,9 +7655,15 @@ export declare const EffectiveSandboxConfigSchema: z.ZodObject<{
|
|
|
7652
7655
|
sandbox: "sandbox";
|
|
7653
7656
|
}>>;
|
|
7654
7657
|
}, z.core.$strict>>>;
|
|
7658
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
7659
|
+
images: z.ZodArray<z.ZodString>;
|
|
7660
|
+
}, z.core.$strict>>;
|
|
7655
7661
|
}, z.core.$strict>;
|
|
7656
7662
|
export type EffectiveSandboxConfig = z.infer<typeof EffectiveSandboxConfigSchema>;
|
|
7657
|
-
/**
|
|
7663
|
+
/**
|
|
7664
|
+
* `GET` and `PUT /v1/tenant/sandbox`: the backend chosen, the Tenant's settings as it set them
|
|
7665
|
+
* (`config`) and the configuration in force (`effective`).
|
|
7666
|
+
*/
|
|
7658
7667
|
export declare const TenantSandboxViewSchema: z.ZodObject<{
|
|
7659
7668
|
preference: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodEnum<{
|
|
7660
7669
|
local: "local";
|
|
@@ -7684,6 +7693,33 @@ export declare const TenantSandboxViewSchema: z.ZodObject<{
|
|
|
7684
7693
|
}, z.core.$strict>>;
|
|
7685
7694
|
defaultImage: z.ZodString;
|
|
7686
7695
|
config: z.ZodObject<{
|
|
7696
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
7697
|
+
network: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7698
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
7699
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
7700
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
7701
|
+
}, z.core.$strict>>;
|
|
7702
|
+
defaultResources: z.ZodOptional<z.ZodObject<{
|
|
7703
|
+
cpus: z.ZodOptional<z.ZodNumber>;
|
|
7704
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
7705
|
+
}, z.core.$strict>>;
|
|
7706
|
+
idle: z.ZodOptional<z.ZodString>;
|
|
7707
|
+
environments: z.ZodOptional<z.ZodNumber>;
|
|
7708
|
+
}, z.core.$strict>>;
|
|
7709
|
+
lifecycle: z.ZodOptional<z.ZodObject<{
|
|
7710
|
+
stopGrace: z.ZodOptional<z.ZodString>;
|
|
7711
|
+
}, z.core.$strict>>;
|
|
7712
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
7713
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7714
|
+
}, z.core.$strict>>;
|
|
7715
|
+
placement: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
7716
|
+
hosts: z.ZodArray<z.ZodEnum<{
|
|
7717
|
+
"harness-container": "harness-container";
|
|
7718
|
+
sandbox: "sandbox";
|
|
7719
|
+
}>>;
|
|
7720
|
+
}, z.core.$strict>>>;
|
|
7721
|
+
}, z.core.$strict>;
|
|
7722
|
+
effective: z.ZodObject<{
|
|
7687
7723
|
limits: z.ZodObject<{
|
|
7688
7724
|
network: z.ZodArray<z.ZodString>;
|
|
7689
7725
|
resources: z.ZodObject<{
|
|
@@ -7706,6 +7742,9 @@ export declare const TenantSandboxViewSchema: z.ZodObject<{
|
|
|
7706
7742
|
sandbox: "sandbox";
|
|
7707
7743
|
}>>;
|
|
7708
7744
|
}, z.core.$strict>>>;
|
|
7745
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
7746
|
+
images: z.ZodArray<z.ZodString>;
|
|
7747
|
+
}, z.core.$strict>>;
|
|
7709
7748
|
}, z.core.$strict>;
|
|
7710
7749
|
cluster: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7711
7750
|
namespace: z.ZodString;
|
package/dist/contracts.js
CHANGED
|
@@ -2898,8 +2898,8 @@ export const MessageDeliverySchema = z.enum(["queue", "reject", "steer"]);
|
|
|
2898
2898
|
* A message's `removeTools` (Host feature `remove-tools`): the tools its turn may not use, by
|
|
2899
2899
|
* name. In the root agent and each agent it uses as a tool, a name removes the declared tool of
|
|
2900
2900
|
* that name (an agent used as a tool included), `<server>__<tool>` disables an MCP server's tool
|
|
2901
|
-
* (the server's name and the tool's own name on it),
|
|
2902
|
-
* Applied to the version the turn runs, after a turn's first segment re-pins the session to its
|
|
2901
|
+
* (the server's name and the tool's own name on it), `<server>` every tool of that server, and a
|
|
2902
|
+
* Runtime plugin's tool is named `nylorun__<tool>` or by its own name (`memory`). Applied to the version the turn runs, after a turn's first segment re-pins the session to its
|
|
2903
2903
|
* Agent's version; names that version does not have are ignored. Any caller may send it: it
|
|
2904
2904
|
* only narrows.
|
|
2905
2905
|
*/
|
|
@@ -4588,7 +4588,10 @@ export const ListProvidersResponseSchema = z
|
|
|
4588
4588
|
const SandboxResourcesLimitSchema = z
|
|
4589
4589
|
.object({ cpus: z.number(), memoryMiB: z.number() })
|
|
4590
4590
|
.strict();
|
|
4591
|
-
/**
|
|
4591
|
+
/**
|
|
4592
|
+
* A Tenant's Environment settings with every default applied (sizes in MiB): the configuration in
|
|
4593
|
+
* force. `GET /v1/tenant/sandbox` answers it as `effective`, beside `config`, the settings as set.
|
|
4594
|
+
*/
|
|
4592
4595
|
export const EffectiveSandboxConfigSchema = z
|
|
4593
4596
|
.object({
|
|
4594
4597
|
limits: z
|
|
@@ -4607,11 +4610,16 @@ export const EffectiveSandboxConfigSchema = z
|
|
|
4607
4610
|
placement: z
|
|
4608
4611
|
.record(z.string(), z.object({ hosts: z.array(z.enum(PLACEMENT_HOSTS)) }).strict())
|
|
4609
4612
|
.optional(),
|
|
4613
|
+
/** Pods: the image repositories that carry this Runtime's engine (ADR-99); none by default. */
|
|
4614
|
+
engine: z.object({ images: z.array(z.string()) }).strict().optional(),
|
|
4610
4615
|
})
|
|
4611
4616
|
.strict();
|
|
4612
4617
|
const SandboxBackendNameSchema = z.enum(["virtual", "local"]);
|
|
4613
4618
|
const SandboxIsolationSchema = z.enum(["process", "container"]);
|
|
4614
|
-
/**
|
|
4619
|
+
/**
|
|
4620
|
+
* `GET` and `PUT /v1/tenant/sandbox`: the backend chosen, the Tenant's settings as it set them
|
|
4621
|
+
* (`config`) and the configuration in force (`effective`).
|
|
4622
|
+
*/
|
|
4615
4623
|
export const TenantSandboxViewSchema = z
|
|
4616
4624
|
.object({
|
|
4617
4625
|
preference: z.union([z.literal("auto"), SandboxBackendNameSchema]),
|
|
@@ -4628,7 +4636,14 @@ export const TenantSandboxViewSchema = z
|
|
|
4628
4636
|
})
|
|
4629
4637
|
.strict()),
|
|
4630
4638
|
defaultImage: z.string(),
|
|
4631
|
-
|
|
4639
|
+
/**
|
|
4640
|
+
* The Tenant's settings as stored (Tenant setting `environments.config`): only what it set,
|
|
4641
|
+
* with no defaults, in exactly the shape `PUT /v1/tenant/sandbox` takes. Put it back, changed,
|
|
4642
|
+
* to change one setting and keep the others. `{}` when the Tenant set nothing.
|
|
4643
|
+
*/
|
|
4644
|
+
config: TenantEnvironmentsConfigSchema,
|
|
4645
|
+
/** The configuration in force: `config` with every default filled in, sizes in MiB. */
|
|
4646
|
+
effective: EffectiveSandboxConfigSchema,
|
|
4632
4647
|
/**
|
|
4633
4648
|
* The Tenant's cluster for pod sandboxes (`nylorun local sandbox enable`), as the sandboxes
|
|
4634
4649
|
* service reports it; null without one, or when the service does not answer.
|
|
@@ -16,7 +16,9 @@ export declare function isVariantOf(candidate: AgentManifest, pinned: AgentManif
|
|
|
16
16
|
* - the tool of that name: an agent used as a tool, an HTTP tool, any declared tool;
|
|
17
17
|
* - `<server>__<tool>`, an MCP server's tool by the server's name and the tool's own name on it:
|
|
18
18
|
* disabled in the server's `tools` settings (`{enabled: false}`);
|
|
19
|
-
* - `<server>`, an MCP server's name: every tool of it disabled (`"*"` and each entry)
|
|
19
|
+
* - `<server>`, an MCP server's name: every tool of it disabled (`"*"` and each entry);
|
|
20
|
+
* - a Runtime plugin's tool, by the name the model reads (`nylorun__memory`) or its own name
|
|
21
|
+
* (`memory`): turned off in the declared plugin (ADR-106).
|
|
20
22
|
*
|
|
21
23
|
* A name that matches nothing is ignored: the version the turn runs may not have it. Returns
|
|
22
24
|
* `manifest` itself when nothing matched.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runtimeToolOf } from "../plugins/index.js";
|
|
1
|
+
import { pluginOfTool, runtimeToolOf } from "../plugins/index.js";
|
|
2
2
|
import { canonical } from "../utils/canonical.js";
|
|
3
3
|
function same(a, b) {
|
|
4
4
|
return canonical(a) === canonical(b);
|
|
@@ -108,7 +108,9 @@ export function isVariantOf(candidate, pinned) {
|
|
|
108
108
|
* - the tool of that name: an agent used as a tool, an HTTP tool, any declared tool;
|
|
109
109
|
* - `<server>__<tool>`, an MCP server's tool by the server's name and the tool's own name on it:
|
|
110
110
|
* disabled in the server's `tools` settings (`{enabled: false}`);
|
|
111
|
-
* - `<server>`, an MCP server's name: every tool of it disabled (`"*"` and each entry)
|
|
111
|
+
* - `<server>`, an MCP server's name: every tool of it disabled (`"*"` and each entry);
|
|
112
|
+
* - a Runtime plugin's tool, by the name the model reads (`nylorun__memory`) or its own name
|
|
113
|
+
* (`memory`): turned off in the declared plugin (ADR-106).
|
|
112
114
|
*
|
|
113
115
|
* A name that matches nothing is ignored: the version the turn runs may not have it. Returns
|
|
114
116
|
* `manifest` itself when nothing matched.
|
|
@@ -122,8 +124,9 @@ export function withoutTools(manifest, names) {
|
|
|
122
124
|
}
|
|
123
125
|
function narrowAgent(agent, removed, root) {
|
|
124
126
|
const { tools: _tools, mcpServers: _servers, engine: _engine, ...rest } = agent;
|
|
125
|
-
// A Runtime plugin's tool by the name the model reads (ADR-106): `nylorun__ask` turns `ask` off
|
|
126
|
-
|
|
127
|
+
// A Runtime plugin's tool by the name the model reads (ADR-106): `nylorun__ask` turns `ask` off,
|
|
128
|
+
// and so does its own name `ask`, the one events and `check --explain` show.
|
|
129
|
+
const offPlugin = new Set([...removed].flatMap((name) => runtimeToolOf(name) ?? (pluginOfTool(name) === undefined ? [] : [name])));
|
|
127
130
|
const engine = agent.engine?.plugins !== undefined && offPlugin.size > 0
|
|
128
131
|
? { ...agent.engine, plugins: agent.engine.plugins.map((plugin) => ({ ...plugin, tools: plugin.tools.filter((tool) => !offPlugin.has(tool)) })) }
|
|
129
132
|
: agent.engine;
|
package/dist/engine/explain.js
CHANGED
|
@@ -80,10 +80,12 @@ function explainOne(id, preview, facts) {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
const blocks = new Set(preview.blocks.map((block) => block.name));
|
|
83
|
-
// A Runtime plugin's tool by its own name
|
|
84
|
-
|
|
83
|
+
// A Runtime plugin's tool matches by its own name (nylorun__memory is memory, ADR-106), and is
|
|
84
|
+
// shown by the name the model reads, the one `removeTools` and tool policy take.
|
|
85
|
+
const modelNames = new Map(preview.engineTools.map((name) => [runtimeToolOf(name) ?? name, name]));
|
|
86
|
+
const tools = new Set(modelNames.keys());
|
|
85
87
|
const features = ENGINE_FEATURES.map((feature) => {
|
|
86
|
-
const added = TOOLS[feature].filter((name) => tools.has(name));
|
|
88
|
+
const added = TOOLS[feature].filter((name) => tools.has(name)).map((name) => modelNames.get(name) ?? name);
|
|
87
89
|
const text = BLOCKS[feature].filter((name) => blocks.has(name)).map((name) => `${name}@${ENGINE_BLOCK_VERSIONS[name]}`);
|
|
88
90
|
let on = added.length > 0 || text.length > 0;
|
|
89
91
|
let note;
|
|
@@ -95,7 +97,7 @@ function explainOne(id, preview, facts) {
|
|
|
95
97
|
note = !facts.root
|
|
96
98
|
? "view only: the root agent's memory"
|
|
97
99
|
: facts.pinned
|
|
98
|
-
? "the memory index is pinned at the head of each session"
|
|
100
|
+
? "the memory index is pinned at the head of each session, and again at a turn after a write from elsewhere"
|
|
99
101
|
: "no memory index is pinned (memory.index: false)";
|
|
100
102
|
if (feature === "toolSearch") {
|
|
101
103
|
on = preview.features.toolSearch;
|