@parcha/agentrun-dsl 0.1.0-beta.47 → 0.1.0-beta.48
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.
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* against, so each local `$ref` (`#`, `#/...`) is relocated under `#/properties/value`. A subschema
|
|
5
5
|
* that sets its own `$id` is a separate resource: its local references do not move. Every runner that
|
|
6
6
|
* delivers a node's record through a tool call uses this one envelope, so a schema behaves the same on
|
|
7
|
-
* every harness. A keyword
|
|
7
|
+
* every harness. A keyword the host alone reads (`criteria`, `x-carried`) is left out of every schema in it, never a property or
|
|
8
8
|
* definition of that name; the submission is still checked against the node's schema as written. */
|
|
9
9
|
export declare function submitParameters(schema: unknown): Record<string, unknown>;
|
package/dist/submit-envelope.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// Keywords that may sit on a schema but are not JSON Schema, read by the host alone: the DSL's `criteria` (System One's
|
|
2
|
+
// question keyword) and AgentRun's `x-carried` (the fields of an agent's answer its next run reads back, an annotation an
|
|
3
|
+
// agent's output schema carries and a learned workflow's output node can copy; Google's OpenAPI-subset `parameters`
|
|
4
|
+
// refuses a field it does not know). The model never sees them.
|
|
5
|
+
const DSL_ONLY_SCHEMA_KEYWORDS = new Set(["criteria", "x-carried"]);
|
|
3
6
|
/** The input schema of a node runner's `submit` tool: the node's output schema under `value`, as
|
|
4
7
|
* `{ value: <schema> }`. A node schema is not a valid tool input as it stands (a root `$ref` or `$defs`
|
|
5
8
|
* is not an object schema), and embedding it moves the document root its local pointers resolve
|
|
6
9
|
* against, so each local `$ref` (`#`, `#/...`) is relocated under `#/properties/value`. A subschema
|
|
7
10
|
* that sets its own `$id` is a separate resource: its local references do not move. Every runner that
|
|
8
11
|
* delivers a node's record through a tool call uses this one envelope, so a schema behaves the same on
|
|
9
|
-
* every harness. A keyword
|
|
12
|
+
* every harness. A keyword the host alone reads (`criteria`, `x-carried`) is left out of every schema in it, never a property or
|
|
10
13
|
* definition of that name; the submission is still checked against the node's schema as written. */
|
|
11
14
|
export function submitParameters(schema) {
|
|
12
15
|
const maps = new Set(["properties", "patternProperties", "$defs", "definitions", "dependentSchemas"]);
|