apps 0.0.1-beta.40 → 0.0.1-beta.41

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.
@@ -3,7 +3,7 @@ import {
3
3
  answeredError,
4
4
  mcpClient,
5
5
  mcpJsonSchemaValidator
6
- } from "./chunk-MYF7KWUB.js";
6
+ } from "./chunk-FXWRE655.js";
7
7
  import {
8
8
  failOnNetworkRefusal
9
9
  } from "./chunk-KIM5HXNK.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  joinPath,
6
6
  mergeMeta
7
- } from "./chunk-6KABJTDO.js";
7
+ } from "./chunk-MJZYV7IO.js";
8
8
  import {
9
9
  isShortenedUpstream,
10
10
  parseProviderError,
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-UOZMSUJ2.js";
40
40
  import {
41
41
  jsonSchemaDocument
42
- } from "./chunk-GHXRRFZA.js";
42
+ } from "./chunk-WPBR4AWB.js";
43
43
  import {
44
44
  AccountId,
45
45
  HttpUrl,
@@ -11,7 +11,7 @@ import {
11
11
  parseSkillLoadFailed,
12
12
  readCatalog,
13
13
  routerSkills
14
- } from "./chunk-4TLZGG4B.js";
14
+ } from "./chunk-ADD6H64X.js";
15
15
  import {
16
16
  appInvocationFetch
17
17
  } from "./chunk-KIM5HXNK.js";
@@ -22,14 +22,14 @@ import {
22
22
  ResponseStatusError,
23
23
  isApp,
24
24
  toEffectApp
25
- } from "./chunk-XDGUGB2A.js";
25
+ } from "./chunk-JJSLEJ6T.js";
26
26
  import {
27
27
  declaredOperations,
28
28
  fromPromise,
29
29
  locate,
30
30
  nativeOperation,
31
31
  toPromise
32
- } from "./chunk-6KABJTDO.js";
32
+ } from "./chunk-MJZYV7IO.js";
33
33
  import {
34
34
  accountProviderError,
35
35
  httpProviderError,
@@ -99,12 +99,15 @@ import {
99
99
  decoderOf,
100
100
  echoableKey,
101
101
  importedJsonSchema,
102
+ importedSchemaKeys,
102
103
  jsonSchemaDecoder,
103
104
  jsonSchemaDocument,
104
105
  maxAlternativeKeys,
106
+ missingKey,
107
+ missingKeyText,
105
108
  objectShape,
106
109
  unionShape
107
- } from "./chunk-GHXRRFZA.js";
110
+ } from "./chunk-WPBR4AWB.js";
108
111
  import {
109
112
  JsonObject,
110
113
  JsonValue
@@ -364,19 +367,33 @@ var memberSelector = (members) => {
364
367
  )
365
368
  );
366
369
  };
367
- var expectedUnion = (ast) => {
370
+ var unionExpectation = (ast) => {
368
371
  const members = unionMembers(ast);
369
372
  const fixed = members.map(fixedValues);
370
373
  const values = fixed.flatMap((memberValues) => memberValues === void 0 ? [] : memberValues);
371
374
  const others = members.filter((_, index) => fixed[index] === void 0);
372
- if (others.length === 0) return `Expected ${allowedValues(values)}`;
373
- return `Expected ${unionShape(
375
+ if (others.length === 0) return allowedValues(values);
376
+ return unionShape(
374
377
  [
375
378
  ...values.length === 0 ? [] : [allowedValues(values)],
376
379
  ...new Set(others.map(describeMember))
377
380
  ],
378
381
  memberSelector(members)
379
- )}`;
382
+ );
383
+ };
384
+ var expectedUnion = (ast) => `Expected ${unionExpectation(ast)}`;
385
+ var expectedValue = (ast) => {
386
+ const encoded = SchemaAST_exports.toEncoded(ast);
387
+ const values = fixedValues(encoded);
388
+ if (values !== void 0) return allowedValues(values);
389
+ const members = unionMembers(encoded);
390
+ const [only] = members;
391
+ if (only === void 0) return void 0;
392
+ if (members.length > 1 && SchemaAST_exports.isUnion(encoded)) return unionExpectation(encoded);
393
+ if (SchemaAST_exports.isObjects(only) && only.propertySignatures.length > 0)
394
+ return nativeObjectShape(only);
395
+ const described = describeMember(only);
396
+ return described === "a value with other constraints" ? void 0 : described;
380
397
  };
381
398
  var leafHook = (issue) => SchemaIssue_exports.hasInput(issue) ? "Invalid value" : Match_exports.value(issue).pipe(
382
399
  Match_exports.tag("InvalidType", ({ ast }) => {
@@ -387,30 +404,68 @@ var leafHook = (issue) => SchemaIssue_exports.hasInput(issue) ? "Invalid value"
387
404
  );
388
405
  var checkHook = (issue) => SchemaIssue_exports.hasInput(issue) || SchemaIssue_exports.hasInput(issue.issue) ? SchemaIssue_exports.defaultCheckHook(issue) ?? "Invalid value" : SchemaIssue_exports.defaultCheckHook(issue);
389
406
  var format = SchemaIssue_exports.makeFormatterStandardSchemaV1({ leafHook, checkHook });
390
- var located = (issue, path) => Match_exports.value(issue).pipe(
391
- Match_exports.tag("Pointer", (pointer) => located(pointer.issue, [...path, ...pointer.path])),
392
- Match_exports.tag("Composite", ({ issues }) => issues.flatMap((issue2) => located(issue2, path))),
407
+ var declaredKey = (parent, key) => parent !== void 0 && SchemaAST_exports.isObjects(parent) ? parent.propertySignatures.find(({ name }) => name === key)?.type : void 0;
408
+ var nativeKeys = (parent) => (key) => parent.indexSignatures.length > 0 || parent.propertySignatures.some(({ name }) => name === key);
409
+ var located = (issue, path, parent) => Match_exports.value(issue).pipe(
410
+ Match_exports.tag("Pointer", (pointer) => {
411
+ const declared = pointer.issue._tag === "MissingKey" && pointer.path.length === 1 ? declaredKey(parent, pointer.path[0]) : void 0;
412
+ return declared === void 0 || parent === void 0 || !SchemaAST_exports.isObjects(parent) ? located(pointer.issue, [...path, ...pointer.path]) : [
413
+ {
414
+ path: [...path, ...pointer.path],
415
+ message: missingKey(expectedValue(declared)),
416
+ accepts: nativeKeys(parent)
417
+ }
418
+ ];
419
+ }),
420
+ Match_exports.tag(
421
+ "Composite",
422
+ ({ ast, issues }) => issues.flatMap((issue2) => located(issue2, path, ast))
423
+ ),
393
424
  Match_exports.tag("Encoding", (encoding) => located(encoding.issue, path)),
394
425
  Match_exports.tag(
395
426
  "AnyOf",
396
427
  ({ ast, issues }) => issues.length === 0 ? [{ path, message: expectedUnion(ast) }] : issues.flatMap((issue2) => located(issue2, path))
397
428
  ),
398
- Match_exports.orElse(
399
- (issue2) => format(issue2).issues.map((problem) => ({
429
+ Match_exports.orElse((issue2) => {
430
+ const accepts = issue2._tag === "Filter" ? importedSchemaKeys(issue2.filter) : void 0;
431
+ return format(issue2).issues.map((problem) => ({
400
432
  path: [
401
433
  ...path,
402
434
  ...(problem.path ?? []).map((key) => typeof key === "object" ? key.key : key)
403
435
  ],
404
- message: problem.message
405
- }))
406
- )
436
+ message: problem.message,
437
+ ...accepts === void 0 ? {} : { accepts }
438
+ }));
439
+ })
407
440
  );
408
441
  var segment = (key) => typeof key === "number" ? `[${key}]` : typeof key === "string" && echoableKey(key) ? `.${key}` : "[key]";
409
- var inputInvalid = (error) => {
442
+ var rendered = (path) => `input${path.map(segment).join("")}`;
443
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
444
+ var valueAt = (input, path) => path.reduce(
445
+ (value, key) => Array.isArray(value) && typeof key === "number" ? value[key] : isRecord(value) && typeof key === "string" && Object.hasOwn(value, key) ? value[key] : void 0,
446
+ input
447
+ );
448
+ var spelling = (key) => key.toLowerCase().replace(/[-_]/g, "");
449
+ var suppliedElsewhere = (input, path, accepts) => {
450
+ const key = path.at(-1);
451
+ if (typeof key !== "string" || !echoableKey(key)) return void 0;
452
+ const at = path.slice(0, -1);
453
+ const holder = valueAt(input, at);
454
+ if (!isRecord(holder)) return void 0;
455
+ const candidates = Object.keys(holder).filter((name) => echoableKey(name) && !accepts(name));
456
+ const respelled = candidates.find((name) => name !== key && spelling(name) === spelling(key));
457
+ const deeper = candidates.find((name) => {
458
+ const child = holder[name];
459
+ return isRecord(child) && Object.hasOwn(child, key);
460
+ });
461
+ const found = respelled !== void 0 ? [...at, respelled] : deeper !== void 0 ? [...at, deeper, key] : void 0;
462
+ return found === void 0 ? void 0 : `The input has ${String(found.at(-1))} at ${rendered(found)}; did you mean ${rendered(path)}?`;
463
+ };
464
+ var inputInvalid = (error, input) => {
410
465
  if (!Schema_exports.isSchemaError(error)) return new HostInputInvalid();
411
- const problems = located(error.issue, []).slice(0, maxInputProblems).map(({ path, message }) => {
412
- const location = path.map(segment);
413
- return `${location.length === 0 ? "input" : `input${location.join("")}`}: ${message}`.slice(
466
+ const problems = located(error.issue, []).slice(0, maxInputProblems).map(({ path, message, accepts }) => {
467
+ const elsewhere = accepts !== void 0 && message.startsWith(missingKeyText) ? suppliedElsewhere(input, path, accepts) : void 0;
468
+ return `${rendered(path)}: ${message}${elsewhere === void 0 ? "" : `. ${elsewhere}`}`.slice(
414
469
  0,
415
470
  512
416
471
  );
@@ -1450,7 +1505,7 @@ function dispatch(app, request, context, signal) {
1450
1505
  () => Schema_exports.decodeUnknownEffect(tool.input)(request.input)
1451
1506
  ).pipe(
1452
1507
  Effect_exports.catchCause(
1453
- (cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : Effect_exports.fail(inputInvalid(Cause_exports.squash(cause)))
1508
+ (cause) => Cause_exports.hasInterrupts(cause) ? Effect_exports.interrupt : Effect_exports.fail(inputInvalid(Cause_exports.squash(cause), request.input))
1454
1509
  )
1455
1510
  );
1456
1511
  if (context.approval !== void 0) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  prepareElicitation
3
- } from "./chunk-SALJXSS3.js";
3
+ } from "./chunk-AHGGO2VY.js";
4
4
  import {
5
5
  fromPromise
6
- } from "./chunk-6KABJTDO.js";
6
+ } from "./chunk-MJZYV7IO.js";
7
7
  import {
8
8
  bodyUpstreamError
9
9
  } from "./chunk-EM4UL26F.js";
@@ -23,7 +23,7 @@ import {
23
23
  jsonSchemaDecoder,
24
24
  nestJsonSchema,
25
25
  preparedJsonSchemaDecoder
26
- } from "./chunk-GHXRRFZA.js";
26
+ } from "./chunk-WPBR4AWB.js";
27
27
  import {
28
28
  JsonObject
29
29
  } from "./chunk-YQ35E7KS.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-P7MGDPFD.js";
4
4
  import {
5
5
  wrap
6
- } from "./chunk-GHXRRFZA.js";
6
+ } from "./chunk-WPBR4AWB.js";
7
7
  import {
8
8
  JsonObject
9
9
  } from "./chunk-YQ35E7KS.js";
@@ -3,7 +3,7 @@ import {
3
3
  fromPromise,
4
4
  nativeOperation,
5
5
  nativeRouter
6
- } from "./chunk-6KABJTDO.js";
6
+ } from "./chunk-MJZYV7IO.js";
7
7
  import {
8
8
  ScheduleTiming
9
9
  } from "./chunk-OTCLXFLL.js";
@@ -11,7 +11,7 @@ import {
11
11
  decoderOf,
12
12
  isSchema,
13
13
  schemaArgument
14
- } from "./chunk-GHXRRFZA.js";
14
+ } from "./chunk-WPBR4AWB.js";
15
15
  import {
16
16
  JsonValue
17
17
  } from "./chunk-YQ35E7KS.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  decoderOf,
9
9
  schemaArgument
10
- } from "./chunk-GHXRRFZA.js";
10
+ } from "./chunk-WPBR4AWB.js";
11
11
  import {
12
12
  Effect_exports,
13
13
  Schema_exports
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  fixedRouter
3
- } from "./chunk-4TLZGG4B.js";
3
+ } from "./chunk-ADD6H64X.js";
4
4
  import {
5
5
  nativeOperation,
6
6
  operationDeclaration,
7
7
  routerDeclaration
8
- } from "./chunk-6KABJTDO.js";
8
+ } from "./chunk-MJZYV7IO.js";
9
9
 
10
10
  // src/implementation/protocol-operations.ts
11
11
  var protocolOperations = (operations, kinds = {}) => {
@@ -1335,6 +1335,8 @@ var unionShape = (alternatives, selector) => {
1335
1335
  const rest = alternatives.length - listed.length;
1336
1336
  return `${[...listed, ...rest > 0 ? [`${rest} more`] : []].join(" or ")}${selector === void 0 ? "" : `, told apart by ${schemaKey(selector)}`}`;
1337
1337
  };
1338
+ var missingKey = (expected) => expected === void 0 ? missingKeyText : `${missingKeyText}. Expected ${expected}`;
1339
+ var missingKeyText = "Missing key";
1338
1340
  var isJsonRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1339
1341
  var pointerSegments = (pointer) => pointer === "#" || pointer === "" ? [] : pointer.replace(/^#?\//, "").split("/").map((segment) => decodeURIComponent(segment).replace(/~1/g, "/").replace(/~0/g, "~"));
1340
1342
  var resolved = (lookup, uri2) => typeof uri2 === "string" && Object.hasOwn(lookup, uri2) ? lookup[uri2] : void 0;
@@ -1418,7 +1420,8 @@ var outlineOf = (node, inspection, seen = /* @__PURE__ */ new Set()) => {
1418
1420
  own
1419
1421
  );
1420
1422
  };
1421
- var describeOutline = (outline) => {
1423
+ var otherConstraints = "a value with other constraints";
1424
+ var outlineText = (outline, limit) => {
1422
1425
  if (outline.values !== void 0) return allowedValues(outline.values);
1423
1426
  const names = [
1424
1427
  ...outline.properties.keys(),
@@ -1427,12 +1430,63 @@ var describeOutline = (outline) => {
1427
1430
  const shape = names.length === 0 && !outline.closed ? "object" : objectShape(
1428
1431
  names.map((name) => ({ name, optional: !outline.required.has(name) })),
1429
1432
  !outline.closed,
1430
- maxAlternativeKeys
1433
+ limit
1431
1434
  );
1432
1435
  if (outline.types === void 0)
1433
- return names.length > 0 || outline.closed ? shape : "a value with other constraints";
1436
+ return names.length > 0 || outline.closed ? shape : otherConstraints;
1434
1437
  return [...outline.types].map((type) => type === "object" ? shape : type).join(" or ");
1435
1438
  };
1439
+ var describeOutline = (outline) => outlineText(outline, maxAlternativeKeys);
1440
+ var typed = (outline) => outline.values !== void 0 || outline.types !== void 0;
1441
+ var describeProperty = (node, inspection) => {
1442
+ const target = inspection.referenced(node) ?? node;
1443
+ if (isJsonRecord(target) && Object.hasOwn(target, "oneOf")) return void 0;
1444
+ const outline = outlineOf(node, inspection);
1445
+ if (typed(outline)) return outlineText(outline, maxShapeKeys);
1446
+ const members = isJsonRecord(target) && Array.isArray(target.anyOf) ? target.anyOf : [];
1447
+ const outlines = members.filter((member) => member !== false).map((member) => outlineOf(member, inspection));
1448
+ return outlines.length === 0 || !outlines.every(typed) ? void 0 : unionShape([...new Set(outlines.map(describeOutline))], void 0);
1449
+ };
1450
+ var maxPatternText = 160;
1451
+ var count = (amount, noun) => `${amount} ${noun}${amount === 1 ? "" : "s"}`;
1452
+ var constraintProblem = (keyword, node) => {
1453
+ if (!isJsonRecord(node)) return void 0;
1454
+ const value = node[keyword];
1455
+ if (keyword === "pattern")
1456
+ return typeof value !== "string" ? void 0 : value.length <= maxPatternText ? `Expected a string matching the pattern ${JSON.stringify(value)}` : "Expected a string matching the schema's pattern, which is too long to show";
1457
+ if (keyword === "format")
1458
+ return typeof value === "string" ? `Expected a string in the ${JSON.stringify(value.slice(0, 64))} format` : void 0;
1459
+ if (keyword === "uniqueItems") return "Expected an array without repeated items";
1460
+ if (typeof value !== "number") return void 0;
1461
+ switch (keyword) {
1462
+ // Draft 4's boolean `exclusiveMinimum` is not applied: imported schemas validate as draft 7
1463
+ // or 2020-12, where `minimum` and `maximum` always include their bound.
1464
+ case "minimum":
1465
+ return `Expected a number of at least ${value}`;
1466
+ case "maximum":
1467
+ return `Expected a number of at most ${value}`;
1468
+ case "exclusiveMinimum":
1469
+ return `Expected a number greater than ${value}`;
1470
+ case "exclusiveMaximum":
1471
+ return `Expected a number less than ${value}`;
1472
+ case "multipleOf":
1473
+ return `Expected a multiple of ${value}`;
1474
+ case "minLength":
1475
+ return `Expected a string of at least ${count(value, "character")}`;
1476
+ case "maxLength":
1477
+ return `Expected a string of at most ${count(value, "character")}`;
1478
+ case "minItems":
1479
+ return `Expected an array of at least ${count(value, "item")}`;
1480
+ case "maxItems":
1481
+ return `Expected an array of at most ${count(value, "item")}`;
1482
+ case "minProperties":
1483
+ return `Expected an object with at least ${count(value, "key")}`;
1484
+ case "maxProperties":
1485
+ return `Expected an object with at most ${count(value, "key")}`;
1486
+ default:
1487
+ return void 0;
1488
+ }
1489
+ };
1436
1490
  var overlap = (outline, value, inspection, depth = 0) => !isJsonRecord(value) || depth > 16 ? 0 : Object.entries(value).reduce((total, [key, item]) => {
1437
1491
  const property = outline.properties.get(key);
1438
1492
  return property === void 0 ? total : total + 1 + overlap(outlineOf(property, inspection), item, inspection, depth + 1);
@@ -1523,14 +1577,19 @@ var unionProblems = (union, schemas, errorsByAlternative, inspection) => {
1523
1577
  const shared = outlineOf(holder, inspection);
1524
1578
  const own = alternatives.map(({ schema }) => outlineOf(schema, inspection));
1525
1579
  const outlines = own.map((outline) => mergeOutlines(shared, outline));
1526
- const fixed = outlines.flatMap(({ values }) => values === void 0 ? [] : [values]);
1527
- if (fixed.length === outlines.length)
1528
- return [{ path, issue: `Expected ${allowedValues(fixed.flat())}` }];
1529
1580
  const selector = selectorOf(holder, own, inspection);
1530
1581
  const expected = `Expected ${unionShape(outlines.map(describeOutline), selector)}`;
1531
1582
  const matched = alternatives.filter((alternative) => alternative.matched).length;
1532
1583
  if (union.keyword === "oneOf" && matched > 1)
1533
1584
  return [{ path, issue: `${expected}. Exactly one may match, but ${matched} do` }];
1585
+ const fixed = outlines.flatMap(({ values }) => values === void 0 ? [] : [values]);
1586
+ if (fixed.length === outlines.length)
1587
+ return [
1588
+ {
1589
+ path,
1590
+ issue: union.keyword === "oneOf" ? `${expected}. Exactly one alternative must match` : `Expected ${allowedValues(fixed.flat())}`
1591
+ }
1592
+ ];
1534
1593
  const value = valueAt(inspection.input, location2);
1535
1594
  const selectorValue = selector !== void 0 && isJsonRecord(value) && Object.hasOwn(value, selector) ? { value: value[selector] } : void 0;
1536
1595
  const named = discriminatedName(holder, selectorValue?.value);
@@ -1597,7 +1656,12 @@ var problemsOf = (errors, inspection) => {
1597
1656
  }
1598
1657
  const required = keyword === "required" ? /required property "([^"]*)"/.exec(error.error) : null;
1599
1658
  if (required !== null) {
1600
- problem("Missing key", [...path, required[1] ?? ""]);
1659
+ const name = required[1] ?? "";
1660
+ const property = outlineOf(node(), inspection).properties.get(name);
1661
+ problem(
1662
+ missingKey(property === void 0 ? void 0 : describeProperty(property, inspection)),
1663
+ [...path, name]
1664
+ );
1601
1665
  continue;
1602
1666
  }
1603
1667
  const expected = keyword === "type" ? /Expected "([^.]*)"\.?$/.exec(error.error) : null;
@@ -1614,10 +1678,37 @@ var problemsOf = (errors, inspection) => {
1614
1678
  );
1615
1679
  continue;
1616
1680
  }
1617
- problem(`Failed the "${keyword}" constraint`);
1681
+ problem(constraintProblem(keyword, node()) ?? `Failed the "${keyword}" constraint`);
1618
1682
  }
1619
1683
  return problems;
1620
1684
  };
1685
+ var documentKeys = (document) => {
1686
+ const named = /* @__PURE__ */ new Set();
1687
+ let any = false;
1688
+ const visit = (node, depth) => {
1689
+ if (depth > 64 || typeof node !== "object" || node === null) return;
1690
+ if (Array.isArray(node)) {
1691
+ for (const item of node) visit(item, depth + 1);
1692
+ return;
1693
+ }
1694
+ const record2 = node;
1695
+ if (isJsonRecord(record2.properties))
1696
+ for (const name of Object.keys(record2.properties)) named.add(name);
1697
+ for (const name of strings(record2.required)) named.add(name);
1698
+ if (isJsonRecord(record2.dependentRequired))
1699
+ for (const [name, names] of Object.entries(record2.dependentRequired)) {
1700
+ named.add(name);
1701
+ for (const other of strings(names)) named.add(other);
1702
+ }
1703
+ if (isJsonRecord(record2.patternProperties) && Object.keys(record2.patternProperties).length > 0 || isJsonRecord(record2.additionalProperties) || isJsonRecord(record2.unevaluatedProperties))
1704
+ any = true;
1705
+ for (const value of Object.values(record2)) visit(value, depth + 1);
1706
+ };
1707
+ visit(document, 0);
1708
+ return (key) => any || named.has(key);
1709
+ };
1710
+ var importedKeys = /* @__PURE__ */ new WeakMap();
1711
+ var importedSchemaKeys = (check) => importedKeys.get(check);
1621
1712
  var jsonSchemaProblems = (errors, inspection) => {
1622
1713
  const problems = problemsOf(errors, inspection);
1623
1714
  return problems.length === 0 ? false : problems;
@@ -1666,19 +1757,19 @@ var compileJsonSchemaDecoder = (document) => Effect_exports.gen(function* () {
1666
1757
  },
1667
1758
  catch: () => new ValidationError()
1668
1759
  });
1669
- const decoder = Schema_exports.Json.check(
1670
- Schema_exports.makeFilter(
1671
- (value) => {
1672
- try {
1673
- const result = validator.validate(value);
1674
- return result.valid || jsonSchemaProblems(result.errors, validator.inspection(value));
1675
- } catch {
1676
- return false;
1677
- }
1678
- },
1679
- { expected: "a value matching a supported imported JSON Schema" }
1680
- )
1760
+ const check = Schema_exports.makeFilter(
1761
+ (value) => {
1762
+ try {
1763
+ const result = validator.validate(value);
1764
+ return result.valid || jsonSchemaProblems(result.errors, validator.inspection(value));
1765
+ } catch {
1766
+ return false;
1767
+ }
1768
+ },
1769
+ { expected: "a value matching a supported imported JSON Schema" }
1681
1770
  );
1771
+ importedKeys.set(check, documentKeys(document));
1772
+ const decoder = Schema_exports.Json.check(check);
1682
1773
  return Object.assign(decoder, { [ImportedJsonSchema]: document });
1683
1774
  });
1684
1775
  var lazyCompiledDecoder = (document) => {
@@ -1772,6 +1863,9 @@ export {
1772
1863
  allowedValues,
1773
1864
  maxAlternativeKeys,
1774
1865
  unionShape,
1866
+ missingKey,
1867
+ missingKeyText,
1868
+ importedSchemaKeys,
1775
1869
  compileJsonSchemaDecoder,
1776
1870
  lazyJsonSchemaDecoder,
1777
1871
  preparedJsonSchemaDecoder,
package/js/client.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-VJQXXOQ3.js";
23
23
  import {
24
24
  decoderOf
25
- } from "./chunk-GHXRRFZA.js";
25
+ } from "./chunk-WPBR4AWB.js";
26
26
  import "./chunk-KAQD3DTI.js";
27
27
  import {
28
28
  JsonValue
package/js/effect.js CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  ApprovalDecision,
4
4
  createAppHandler,
5
5
  prepareElicitation
6
- } from "./chunk-SALJXSS3.js";
6
+ } from "./chunk-AHGGO2VY.js";
7
7
  import "./chunk-RIXVGVA6.js";
8
- import "./chunk-4TLZGG4B.js";
8
+ import "./chunk-ADD6H64X.js";
9
9
  import "./chunk-KIM5HXNK.js";
10
10
  import "./chunk-CQD3WSYH.js";
11
- import "./chunk-XDGUGB2A.js";
12
- import "./chunk-6KABJTDO.js";
11
+ import "./chunk-JJSLEJ6T.js";
12
+ import "./chunk-MJZYV7IO.js";
13
13
  import "./chunk-EM4UL26F.js";
14
14
  import {
15
15
  ToolAnnotations
@@ -23,7 +23,7 @@ import {
23
23
  decoderOf,
24
24
  jsonSchemaDecoder,
25
25
  wrap
26
- } from "./chunk-GHXRRFZA.js";
26
+ } from "./chunk-WPBR4AWB.js";
27
27
  import "./chunk-KAQD3DTI.js";
28
28
  import {
29
29
  HttpUrl,
package/js/graphql.js CHANGED
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  catalogCache,
3
3
  catalogScope
4
- } from "./chunk-KANDIVIH.js";
4
+ } from "./chunk-JI3EP2GL.js";
5
5
  import {
6
6
  protocolOperations
7
- } from "./chunk-PDS2E2OZ.js";
7
+ } from "./chunk-UTJIGUSS.js";
8
8
  import "./chunk-BCSNKUAC.js";
9
- import "./chunk-SALJXSS3.js";
9
+ import "./chunk-AHGGO2VY.js";
10
10
  import {
11
11
  cacheKey
12
12
  } from "./chunk-RIXVGVA6.js";
13
- import "./chunk-4TLZGG4B.js";
13
+ import "./chunk-ADD6H64X.js";
14
14
  import {
15
15
  failOnNetworkRefusal
16
16
  } from "./chunk-KIM5HXNK.js";
17
17
  import "./chunk-CQD3WSYH.js";
18
- import "./chunk-XDGUGB2A.js";
18
+ import "./chunk-JJSLEJ6T.js";
19
19
  import {
20
20
  nativeOperation,
21
21
  routerDeclaration
22
- } from "./chunk-6KABJTDO.js";
22
+ } from "./chunk-MJZYV7IO.js";
23
23
  import {
24
24
  accountProviderError,
25
25
  graphqlProviderError,
@@ -37,7 +37,7 @@ import {
37
37
  } from "./chunk-VJQXXOQ3.js";
38
38
  import {
39
39
  jsonSchemaDecoder
40
- } from "./chunk-GHXRRFZA.js";
40
+ } from "./chunk-WPBR4AWB.js";
41
41
  import "./chunk-KAQD3DTI.js";
42
42
  import {
43
43
  AccountId,
package/js/host.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createAppHandler
3
- } from "./chunk-SALJXSS3.js";
3
+ } from "./chunk-AHGGO2VY.js";
4
4
  import "./chunk-RIXVGVA6.js";
5
- import "./chunk-4TLZGG4B.js";
5
+ import "./chunk-ADD6H64X.js";
6
6
  import "./chunk-KIM5HXNK.js";
7
7
  import "./chunk-CQD3WSYH.js";
8
- import "./chunk-XDGUGB2A.js";
9
- import "./chunk-6KABJTDO.js";
8
+ import "./chunk-JJSLEJ6T.js";
9
+ import "./chunk-MJZYV7IO.js";
10
10
  import "./chunk-EM4UL26F.js";
11
11
  import {
12
12
  ElicitationFailed,
@@ -33,7 +33,7 @@ import {
33
33
  withRemoteSpan
34
34
  } from "./chunk-PNVCCB4L.js";
35
35
  import "./chunk-VJQXXOQ3.js";
36
- import "./chunk-GHXRRFZA.js";
36
+ import "./chunk-WPBR4AWB.js";
37
37
  import "./chunk-KAQD3DTI.js";
38
38
  import "./chunk-YQ35E7KS.js";
39
39
  import "./chunk-VIU2XXA7.js";
package/js/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  ResponseStatusError,
4
4
  defineApp,
5
5
  workflow
6
- } from "./chunk-XDGUGB2A.js";
6
+ } from "./chunk-JJSLEJ6T.js";
7
7
  import {
8
8
  dynamicRouter,
9
9
  fromPromise,
@@ -17,7 +17,7 @@ import {
17
17
  toolAnnotations,
18
18
  withApproval,
19
19
  withApprovals
20
- } from "./chunk-6KABJTDO.js";
20
+ } from "./chunk-MJZYV7IO.js";
21
21
  import {
22
22
  accountProviderError
23
23
  } from "./chunk-EM4UL26F.js";
@@ -64,7 +64,7 @@ import {
64
64
  string,
65
65
  withLazyJsonSchemaDocument,
66
66
  wrap
67
- } from "./chunk-GHXRRFZA.js";
67
+ } from "./chunk-WPBR4AWB.js";
68
68
  import "./chunk-KAQD3DTI.js";
69
69
  import {
70
70
  JsonObject,
package/js/mcp/effect.js CHANGED
@@ -2,23 +2,23 @@ import {
2
2
  mcpClientEffect,
3
3
  mcpHealthEffect,
4
4
  mcpToolsEffect
5
- } from "../chunk-DHX2OI2X.js";
6
- import "../chunk-MYF7KWUB.js";
5
+ } from "../chunk-6XGB4BAL.js";
6
+ import "../chunk-FXWRE655.js";
7
7
  import "../chunk-BCSNKUAC.js";
8
- import "../chunk-SALJXSS3.js";
8
+ import "../chunk-AHGGO2VY.js";
9
9
  import "../chunk-RIXVGVA6.js";
10
- import "../chunk-4TLZGG4B.js";
10
+ import "../chunk-ADD6H64X.js";
11
11
  import "../chunk-KIM5HXNK.js";
12
12
  import "../chunk-CQD3WSYH.js";
13
- import "../chunk-XDGUGB2A.js";
14
- import "../chunk-6KABJTDO.js";
13
+ import "../chunk-JJSLEJ6T.js";
14
+ import "../chunk-MJZYV7IO.js";
15
15
  import "../chunk-EM4UL26F.js";
16
16
  import "../chunk-OTCLXFLL.js";
17
17
  import "../chunk-P7MGDPFD.js";
18
18
  import "../chunk-UOZMSUJ2.js";
19
19
  import "../chunk-PNVCCB4L.js";
20
20
  import "../chunk-VJQXXOQ3.js";
21
- import "../chunk-GHXRRFZA.js";
21
+ import "../chunk-WPBR4AWB.js";
22
22
  import "../chunk-KAQD3DTI.js";
23
23
  import "../chunk-YQ35E7KS.js";
24
24
  import "../chunk-VIU2XXA7.js";