Files
oh-my-pi/patches/@ark%2Fschema@0.56.2.patch
T
can1357 883e68f2d2 deps(deps): bumped dependency versions and refreshed patch mappings
- Upgraded `@agentclientprotocol/sdk` from `0.25.0` to `1.2.1` and `@ark/schema` from `0.56.1` to `0.56.2` in `package.json` and `bun.lock`, updating `patchedDependencies` and override entries accordingly.
- Updated lockfile package metadata to match new manifest versions, including TypeScript `7.0.2`, arktype `2.2.3`, and several related dependency/version dependency-tree entries.
- Added a new `@agentclientprotocol/sdk@1.2.1` patch that extends the package exports with `./dist/schema/zod.gen.js` including type and default import mappings.
2026-07-13 18:51:17 +02:00

27 lines
1.4 KiB
Diff

diff --git a/out/constraint.js b/out/constraint.js
index 19ad1869c46cf57bde4a09dcb6400ab2c83809e1..4f3df3198713856ad76dd49cc378f0f41fc769e6 100644
--- a/out/constraint.js
+++ b/out/constraint.js
@@ -51,8 +51,10 @@ export const constraintKeyParser = (kind) => (schema, ctx) => {
}
const nodes = schema.map(schema => ctx.$.node(kind, schema));
// predicate order must be preserved to ensure inputs are narrowed
- // and checked in the correct order
- if (kind === "predicate")
+ // and checked in the correct order; required/optional preserve authored
+ // key order too so tool wire schemas stream in declaration order rather
+ // than alphabetized-by-hash order (oh-my-pi patch)
+ if (kind === "predicate" || kind === "required" || kind === "optional")
return nodes;
return nodes.sort((l, r) => (l.hash < r.hash ? -1 : 1));
}
@@ -111,7 +113,7 @@ export const flattenConstraints = (inner) => {
.sort((l, r) => l.precedence < r.precedence ? -1
: l.precedence > r.precedence ? 1
// preserve order for predicates
- : l.kind === "predicate" && r.kind === "predicate" ? 0
+ : (l.kind === "predicate" && r.kind === "predicate") || (l.kind === r.kind && (l.kind === "required" || l.kind === "optional")) ? 0
: l.hash < r.hash ? -1
: 1);
return result;