@nylorun/core 0.15.0-beta → 0.17.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 +69 -0
- package/dist/compatibility.d.ts +40 -14
- package/dist/compatibility.js +38 -12
- package/dist/contracts.d.ts +171 -51
- package/dist/contracts.js +246 -57
- package/dist/define.d.ts +6 -5
- package/dist/define.js +3 -2
- package/dist/definition/assemble.d.ts +3 -1
- package/dist/definition/assemble.js +3 -0
- package/dist/definition/code-tools.d.ts +4 -4
- package/dist/definition/code-tools.js +3 -2
- package/dist/definition/from.d.ts +5 -0
- package/dist/definition/from.js +16 -7
- package/dist/definition/manifest.d.ts +3 -1
- package/dist/definition/manifest.js +4 -1
- package/dist/definition/mcp.d.ts +45 -1
- package/dist/definition/mcp.js +85 -2
- package/dist/definition/removed.d.ts +4 -1
- package/dist/definition/removed.js +5 -2
- package/dist/definition/sandbox-capability.d.ts +21 -4
- package/dist/definition/sandbox-capability.js +56 -19
- package/dist/definition/tools-capability.d.ts +37 -0
- package/dist/definition/tools-capability.js +98 -0
- package/dist/definition/variant.d.ts +2 -1
- package/dist/definition/variant.js +40 -4
- package/dist/harness-api/transcript.d.ts +5 -1
- package/dist/harness-api/transcript.js +6 -2
- package/dist/types/manifest.d.ts +42 -14
- package/dist/types/tool.d.ts +22 -0
- package/package.json +1 -1
package/dist/types/manifest.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { JsonObject } from "./shared.js";
|
|
2
2
|
import type { WorkflowManifest } from "./workflow.js";
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Published manifest schema version (no top-level model — Runtime-owned). Version 6 (R2b C9) adds
|
|
5
|
+
* an MCP server's `tools` and `deferred`; a manifest that uses neither stays version 5, so its
|
|
6
|
+
* hash is unchanged, and the Runtime accepts both.
|
|
7
|
+
*/
|
|
8
|
+
export type ManifestSchemaVersion = 5 | 6;
|
|
5
9
|
/** Whether each call waits for a person's approval (`approve` on the session). Default `never`. */
|
|
6
10
|
export type ApprovalMode = "never" | "always";
|
|
7
11
|
/** The methods an HTTP tool may use: each sends the tool input as a JSON body. */
|
|
@@ -17,8 +21,10 @@ export interface HttpToolTarget {
|
|
|
17
21
|
readonly method?: HttpToolMethod;
|
|
18
22
|
/**
|
|
19
23
|
* Adds a vault credential to each request, as for a remote MCP server: a credential in the
|
|
20
|
-
* session's vaults bound to `url
|
|
21
|
-
*
|
|
24
|
+
* session's vaults bound to `url` (a `bearer` token or a `headers` map, sent to its `via` when
|
|
25
|
+
* it has one, with its identity header), chosen by the session's credential selection with
|
|
26
|
+
* this name (`credentialSelections[].serverName`) when several are. When the vaults hold none,
|
|
27
|
+
* the call fails with `http.credential` and is not sent.
|
|
22
28
|
*/
|
|
23
29
|
readonly credential?: string;
|
|
24
30
|
/** How long the service may take to answer. Default 60000, at most 300000. */
|
|
@@ -50,22 +56,43 @@ export interface SkillManifest {
|
|
|
50
56
|
*/
|
|
51
57
|
readonly files: Readonly<Record<string, string>>;
|
|
52
58
|
}
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* One tool's settings on an MCP server (manifest v6, R2b C9). Each setting resolves from the
|
|
61
|
+
* tool's own entry, then the `"*"` entry, then the server, then the default.
|
|
62
|
+
*/
|
|
63
|
+
export interface McpToolSettings {
|
|
64
|
+
/** `false`: the tool never reaches the model and cannot be called. Default `true`. */
|
|
65
|
+
readonly enabled?: boolean;
|
|
66
|
+
/** `always`: each call waits for approval. Default: the server's `approval`, else `never`. */
|
|
60
67
|
readonly approval?: ApprovalMode;
|
|
61
|
-
|
|
68
|
+
/**
|
|
69
|
+
* `true`: the tool leaves the model's tool list; the model finds it with `tool_search` and runs
|
|
70
|
+
* it with `tool_call` (R2b C10). Default: the server's `deferred`, else deferred when the
|
|
71
|
+
* agent's MCP tools would take more than a tenth of the model's context window.
|
|
72
|
+
*/
|
|
73
|
+
readonly deferred?: boolean;
|
|
74
|
+
}
|
|
75
|
+
interface McpServerFields {
|
|
62
76
|
readonly name: string;
|
|
63
|
-
readonly type: "sse";
|
|
64
77
|
readonly url: string;
|
|
65
78
|
readonly headers?: Readonly<Record<string, string>>;
|
|
66
79
|
/** Each call of every tool of the server waits for approval. */
|
|
67
80
|
readonly approval?: ApprovalMode;
|
|
68
|
-
|
|
81
|
+
/** Defers every tool of the server, or none (manifest v6, R2b C10). Default: automatic. */
|
|
82
|
+
readonly deferred?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Settings per tool (manifest v6, R2b C9), keyed by the server's own tool name (before C6
|
|
85
|
+
* renaming), with `"*"` for every tool without an entry: `{"*": {enabled: false}}` and an
|
|
86
|
+
* entry per wanted tool make an allowlist.
|
|
87
|
+
*/
|
|
88
|
+
readonly tools?: Readonly<Record<string, McpToolSettings>>;
|
|
89
|
+
}
|
|
90
|
+
/** A remote MCP server, declared by URL. Nylorun accepts no stdio servers (`stdioMcpRefusal`). */
|
|
91
|
+
export type McpServerManifest = (McpServerFields & {
|
|
92
|
+
readonly type: "streamable-http";
|
|
93
|
+
}) | (McpServerFields & {
|
|
94
|
+
readonly type: "sse";
|
|
95
|
+
});
|
|
69
96
|
/** Network egress preset for a sandbox. Private ranges and metadata endpoints are always blocked. */
|
|
70
97
|
export type SandboxNetworkPreset = "none" | "dev" | "open";
|
|
71
98
|
/**
|
|
@@ -115,3 +142,4 @@ export interface AgentManifest {
|
|
|
115
142
|
readonly capabilities: readonly CapabilityManifest[];
|
|
116
143
|
readonly runtime?: RuntimeManifest;
|
|
117
144
|
}
|
|
145
|
+
export {};
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -153,9 +153,25 @@ export type ToolExecutionContext<Info = unknown> = ToolExecutionContextBase & {
|
|
|
153
153
|
readonly info?: Info;
|
|
154
154
|
};
|
|
155
155
|
export type ToolContent = JsonValue;
|
|
156
|
+
/**
|
|
157
|
+
* A file the model sees beside a tool's output (R2b C11): an image a tool returned, which the
|
|
158
|
+
* Runtime stored as an artifact. `reference` is the host's, as a message's media part carries it:
|
|
159
|
+
* the model call resolves it, and a model that reads no images gets a note instead.
|
|
160
|
+
*/
|
|
161
|
+
export type ToolResultFile = {
|
|
162
|
+
readonly mediaType: string;
|
|
163
|
+
readonly reference: JsonValue;
|
|
164
|
+
};
|
|
156
165
|
export type ToolOutcome<Output = ToolContent> = {
|
|
157
166
|
readonly kind: "completed";
|
|
158
167
|
readonly output: Output;
|
|
168
|
+
/** Files the model sees beside the output (R2b C11). */
|
|
169
|
+
readonly files?: readonly ToolResultFile[];
|
|
170
|
+
/**
|
|
171
|
+
* The output is the Runtime's preview of a larger result it stored as an artifact (R2b
|
|
172
|
+
* C11), not the tool's own, so the tool's output schema is not checked against it.
|
|
173
|
+
*/
|
|
174
|
+
readonly truncated?: boolean;
|
|
159
175
|
} | {
|
|
160
176
|
readonly kind: "denied";
|
|
161
177
|
readonly reason: string;
|
|
@@ -163,6 +179,8 @@ export type ToolOutcome<Output = ToolContent> = {
|
|
|
163
179
|
readonly kind: "failed";
|
|
164
180
|
readonly code: string;
|
|
165
181
|
readonly message: string;
|
|
182
|
+
/** True when calling again may work (an MCP server that could not be reached). */
|
|
183
|
+
readonly retryable?: boolean;
|
|
166
184
|
} | {
|
|
167
185
|
readonly kind: "interaction-required";
|
|
168
186
|
readonly interaction: Interaction;
|
|
@@ -177,6 +195,8 @@ export type ToolResult = {
|
|
|
177
195
|
readonly toolName: string;
|
|
178
196
|
readonly kind: "completed";
|
|
179
197
|
readonly output: ToolContent;
|
|
198
|
+
/** The outcome's `files`, when it has any. */
|
|
199
|
+
readonly files?: readonly ToolResultFile[];
|
|
180
200
|
} | {
|
|
181
201
|
readonly callId: string;
|
|
182
202
|
readonly toolName: string;
|
|
@@ -189,6 +209,8 @@ export type ToolResult = {
|
|
|
189
209
|
readonly code: string;
|
|
190
210
|
readonly message: string;
|
|
191
211
|
readonly details?: ToolValidationFailureDetails;
|
|
212
|
+
/** The outcome's `retryable`, when it says. */
|
|
213
|
+
readonly retryable?: boolean;
|
|
192
214
|
};
|
|
193
215
|
/** Immutable tool metadata supplied to model adapters and observers. */
|
|
194
216
|
export interface ToolDescriptor {
|