@wildo-ai/external-connectors-models 1.1.3 → 1.1.5

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.
Files changed (120) hide show
  1. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +13 -132
  2. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  3. package/dist/esm/core/commons.external-connectors-models.schemas.js +13 -31
  4. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  5. package/dist/esm/core/security.external-connectors-models.schemas.d.ts +40 -8
  6. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  7. package/dist/esm/core/security.external-connectors-models.schemas.js +61 -14
  8. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  9. package/dist/esm/index.d.ts +2 -2
  10. package/dist/esm/index.d.ts.map +1 -1
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +167 -164
  14. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
  15. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +188 -94
  16. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
  17. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +130 -10
  18. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  19. package/dist/esm/protocols/billing.standard-interface.schemas.js +42 -1
  20. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  21. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +73 -16
  22. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
  23. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +76 -7
  24. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
  25. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -56
  26. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
  27. package/dist/esm/protocols/email.external-connectors-models.schemas.js +0 -20
  28. package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
  29. package/dist/esm/protocols/email.standard-interface.schemas.d.ts +1 -1
  30. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +1 -16
  31. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
  32. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +4 -9
  33. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
  34. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts +6 -13
  35. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
  36. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js +0 -9
  37. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
  38. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +1 -15
  39. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  40. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +1 -9
  41. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  42. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts +1 -18
  43. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
  44. package/dist/esm/protocols/image.external-connectors-models.schemas.js +1 -7
  45. package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
  46. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +92 -40
  47. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  48. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +154 -41
  49. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  50. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts +7 -0
  51. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -0
  52. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js +36 -0
  53. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -0
  54. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts +23 -0
  55. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -0
  56. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js +25 -0
  57. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -0
  58. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +0 -148
  59. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
  60. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js +1 -40
  61. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
  62. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +530 -15
  63. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
  64. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +380 -0
  65. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
  66. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts +0 -39
  67. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
  68. package/dist/esm/protocols/sms.external-connectors-models.schemas.js +0 -13
  69. package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
  70. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +66 -6
  71. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
  72. package/dist/esm/protocols/sms.standard-interface.schemas.js +71 -1
  73. package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
  74. package/dist/tsconfig.build.tsbuildinfo +1 -1
  75. package/package.json +2 -3
  76. package/dist/esm/.native.tsbuildinfo +0 -1
  77. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -74
  78. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +0 -1
  79. package/dist/esm/core/protocols.external-connectors-models.schemas.js +0 -1
  80. package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +0 -1
  81. package/dist/esm/features/core.external-connectors-models.schemas.d.ts +0 -0
  82. package/dist/esm/features/core.external-connectors-models.schemas.d.ts.map +0 -0
  83. package/dist/esm/features/core.external-connectors-models.schemas.js +0 -0
  84. package/dist/esm/features/core.external-connectors-models.schemas.js.map +0 -0
  85. package/dist/esm/features/email.external-connectors-models.schemas.d.ts +0 -0
  86. package/dist/esm/features/email.external-connectors-models.schemas.d.ts.map +0 -0
  87. package/dist/esm/features/email.external-connectors-models.schemas.js +0 -0
  88. package/dist/esm/features/email.external-connectors-models.schemas.js.map +0 -0
  89. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts +0 -0
  90. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts.map +0 -0
  91. package/dist/esm/features/hooks.external-connectors-models.schemas.js +0 -0
  92. package/dist/esm/features/hooks.external-connectors-models.schemas.js.map +0 -0
  93. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts +0 -0
  94. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts.map +0 -0
  95. package/dist/esm/features/sms.external-connectors-models.schemas.js +0 -0
  96. package/dist/esm/features/sms.external-connectors-models.schemas.js.map +0 -0
  97. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts +0 -0
  98. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts.map +0 -0
  99. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js +0 -0
  100. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js.map +0 -0
  101. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts +0 -0
  102. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts.map +0 -0
  103. package/dist/esm/protocols/git.external-connectors-models.schemas.js +0 -0
  104. package/dist/esm/protocols/git.external-connectors-models.schemas.js.map +0 -0
  105. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts +0 -0
  106. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts.map +0 -0
  107. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js +0 -0
  108. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js.map +0 -0
  109. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts +0 -0
  110. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts.map +0 -0
  111. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js +0 -0
  112. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js.map +0 -0
  113. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +0 -37
  114. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +0 -1
  115. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +0 -10
  116. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +0 -1
  117. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts +0 -0
  118. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts.map +0 -0
  119. package/dist/esm/protocols/saml.external-connectors-models.schemas.js +0 -0
  120. package/dist/esm/protocols/saml.external-connectors-models.schemas.js.map +0 -0
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Status_BaseSchema } from "../core/commons.external-connectors-models.schemas.js";
2
+ import { ExternalProvider_ExchangeProtocol_Kind } from "../core/commons.external-connectors-models.schemas.js";
3
3
  import { ExternalProvider_OperationContextSchema } from "../core/operations.external-connectors-models.schemas.js";
4
4
  //===============================================================
5
5
  // LLM Provider
@@ -55,7 +55,9 @@ export var LLM_Model;
55
55
  // rejects temperature+topP together.
56
56
  /** Anthropic's most intelligent generally-available model (Claude 5 family, Mythos-class tier). */
57
57
  LLM_Model["CLAUDE_FABLE_5"] = "claude-fable-5";
58
- /** Claude 5 family Opus tier. Same no-sampling-params contract as the rest of the family. */
58
+ /** Claude 5 family Opus tier, 5.5 revision. Same no-sampling-params contract as the rest of the family. */
59
+ LLM_Model["CLAUDE_OPUS_5_5"] = "claude-opus-5-5";
60
+ /** Claude 5 family Opus tier (superseded by CLAUDE_OPUS_5_5). Same no-sampling-params contract as the rest of the family. */
59
61
  LLM_Model["CLAUDE_OPUS_5"] = "claude-opus-5";
60
62
  /** Claude 5 family workhorse. */
61
63
  LLM_Model["CLAUDE_SONNET_5"] = "claude-sonnet-5";
@@ -125,12 +127,13 @@ export var LLM_Model_Thinking_Capability;
125
127
  LLM_Model_Thinking_Capability["OPTIONAL"] = "optional";
126
128
  /**
127
129
  * The model ALWAYS reasons and thinking CANNOT be disabled (o-series,
128
- * `claude-fable-5`). Every effort is valid EXCEPT `NONE` — asking such a model
130
+ * `claude-fable-5`, `claude-opus-5-5`). Every effort is valid EXCEPT `NONE` — asking such a model
129
131
  * not to think is a provider error, not a preference.
130
132
  *
131
133
  * NOT a property of a model FAMILY: measured 2026-09-08, `claude-fable-5`
132
134
  * refuses `thinking.type.disabled` while `claude-sonnet-5` and
133
- * `claude-opus-5` accept it. Both siblings carried this value on the family's
135
+ * `claude-opus-5` accept it — and on 2026-09-24 `claude-opus-5-5` refused it,
136
+ * so even two revisions of one tier differ. Both siblings carried this value on the family's
134
137
  * behalf for a month, which made `validateReasoningEffortForModel` refuse a
135
138
  * configuration the provider would have honoured.
136
139
  */
@@ -315,12 +318,13 @@ export const LLMProvider_ToolChoice_Schema = z.union([
315
318
  * | Model | Supported | Rejected |
316
319
  * |--------------------------------------|---------------------------------|-------------------------------|
317
320
  * | GPT-5.6 sol / terra / luna | none, low, medium, high, xhigh | `minimal`, `provider-default` |
318
- * | claude-fable-5 | low, medium, high, xhigh | **`none`**, `minimal`, `provider-default` |
321
+ * | claude-fable-5 · claude-opus-5-5 | low, medium, high, xhigh | **`none`**, `minimal`, `provider-default` |
319
322
  * | claude-sonnet-5 · claude-opus-5 | none, low, medium, high, xhigh | `minimal`, `provider-default` |
320
323
  *
321
324
  * ⚠️ `NONE` is NOT portable, but the line is finer than "OpenAI yes, Anthropic
322
- * no": `claude-fable-5` alone refuses it. Its siblings accept it, so a level
323
- * that is legal on `claude-sonnet-5` can still be illegal on `claude-fable-5` —
325
+ * no": `claude-fable-5` and `claude-opus-5-5` refuse it while `claude-sonnet-5`
326
+ * and `claude-opus-5` accept it, so a level legal on one Opus revision is
327
+ * illegal on the next —
324
328
  * which is why the capability is a per-model probed fact and never a family
325
329
  * assumption. `PROVIDER_DEFAULT` is rejected as an explicit value by BOTH
326
330
  * providers — omit the field entirely for the model's own default.
@@ -433,9 +437,10 @@ export const LLM_MODEL_CATALOG = {
433
437
  // Thinking posture re-probed 2026-09-08 and it is PER MODEL, not per family.
434
438
  // `claude-fable-5` refuses `thinking: {type:'disabled'}` (400 "…is not
435
439
  // supported for this model; thinking defaults to adaptive") — ALWAYS.
436
- // `claude-sonnet-5` and `claude-opus-5` ACCEPT it (200) — OPTIONAL. All three
437
- // reject `minimal` and `provider-default` as `output_config.effort` values,
438
- // whose accepted set is `low|medium|high|xhigh|max`.
440
+ // `claude-sonnet-5` and `claude-opus-5` ACCEPT it (200) — OPTIONAL.
441
+ // `claude-opus-5-5` (probed 2026-09-24) REFUSES it, like fable — ALWAYS. All
442
+ // four reject `minimal` and `provider-default` as `output_config.effort`
443
+ // values, whose accepted set is `low|medium|high|xhigh|max`.
439
444
  // ---------------------------------------------------------------
440
445
  [LLM_Model.CLAUDE_FABLE_5]: {
441
446
  providerRef: "anthropic",
@@ -452,8 +457,35 @@ export const LLM_MODEL_CATALOG = {
452
457
  LLM_Model_IO_Capability.TOOL_USE,
453
458
  LLM_Model_IO_Capability.LONG_CONTEXT,
454
459
  ],
455
- // The ONLY model that still refuses `thinking: {type:'disabled'}` (re-probed
456
- // 2026-09-08); its two siblings accept it, so this value is not the family's.
460
+ // Refuses `thinking: {type:'disabled'}` (re-probed 2026-09-08). Sonnet 5 and Opus 5 accept it
461
+ // and Opus 5.5 refuses it (2026-09-24), so this value is per model, never the family's.
462
+ thinkingCapability: LLM_Model_Thinking_Capability.ALWAYS,
463
+ unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
464
+ rejectsExplicitTemperature: true,
465
+ },
466
+ [LLM_Model.CLAUDE_OPUS_5_5]: {
467
+ providerRef: "anthropic",
468
+ availability: LLM_Model_Availability.PRODUCTION,
469
+ // Probed live 2026-09-24 through `live-model-smoke.test.ts` (generation, temperature
470
+ // rejection, thinking posture and every effort level) when the ACP coding/research lane
471
+ // moved onto it. Every value below is that measurement, not an inheritance from CLAUDE_OPUS_5 —
472
+ // and the measurement DISAGREED with Opus 5 on thinking: 5.5 refuses `thinking: {type:'disabled'}`
473
+ // (400 "…is not supported for this model. Use thinking.type.adaptive…"), so it is ALWAYS, as
474
+ // Fable is, where Opus 5 is OPTIONAL. Copying the sibling row would have been wrong.
475
+ probedOn: "2026-09-24",
476
+ applicabilities: [
477
+ LLM_Model_Applicability.DEEP_JUDGMENT,
478
+ LLM_Model_Applicability.LONG_CONTEXT_ANALYSIS,
479
+ LLM_Model_Applicability.STRUCTURED_AUTHORING,
480
+ LLM_Model_Applicability.WORKSPACE_CODING_AGENT,
481
+ ],
482
+ ioCapabilities: [
483
+ LLM_Model_IO_Capability.MULTIMODAL_VISION,
484
+ LLM_Model_IO_Capability.STRUCTURED_OUTPUTS,
485
+ LLM_Model_IO_Capability.TOOL_USE,
486
+ LLM_Model_IO_Capability.CODE_GENERATION,
487
+ LLM_Model_IO_Capability.LONG_CONTEXT,
488
+ ],
457
489
  thinkingCapability: LLM_Model_Thinking_Capability.ALWAYS,
458
490
  unsupportedReasoningEfforts: [LLMProvider_ReasoningEffort.MINIMAL, LLMProvider_ReasoningEffort.PROVIDER_DEFAULT],
459
491
  rejectsExplicitTemperature: true,
@@ -965,14 +997,52 @@ export var LLMProvider_StructuredGenerationFailureKind;
965
997
  /**
966
998
  * One structural validation issue recovered from the SDK/Zod cause chain.
967
999
  *
968
- * `code` + `path` ONLY, never the issue's `message`: a provider validation error
969
- * retains the rejected value in its message, so carrying it would copy private model
970
- * output into any log, trace or persisted failure record that receives this reason.
971
- * The path is what a caller actually needs — it names the field the model omitted.
1000
+ * Never the issue's `message`: a provider validation error retains the rejected value in its message,
1001
+ * so carrying it would copy private model output into any log, trace or persisted failure record that
1002
+ * receives this reason. The path names the field the model got wrong.
1003
+ *
1004
+ * ## What the SCHEMA expected, which is not model output
1005
+ *
1006
+ * A path and a code say WHERE and roughly WHAT, and that is not enough for a retry to succeed. Measured
1007
+ * 2026-09-13 on Wonder CRM's `document-release-policy`: three attempts in a row were rejected with
1008
+ * `operatorAttestationLimitationRefs: invalid_type`, and the model repeated the same answer each time
1009
+ * because nothing told it an ARRAY was expected. Zod 4 carries that in fields separate from the message,
1010
+ * and every one of them is read off the SCHEMA, never off the value:
1011
+ *
1012
+ * - `expected` — the type an `invalid_type` wanted (`array`, `string`);
1013
+ * - `format` / `pattern` — the format an `invalid_format` wanted, and the schema's own regex;
1014
+ * - `values` — the options an `invalid_value` admits, i.e. the enum's members;
1015
+ * - `keys` — the key names an `unrecognized_keys` found. Schema shape against a strict object, and it
1016
+ * was PROJECTED by the provider service while this schema did not declare it, so the caller-side
1017
+ * parse silently stripped it — the diagnosis its projection existed for never arrived.
1018
+ *
1019
+ * ## The one code for which the MESSAGE is the only content: `custom`
1020
+ *
1021
+ * A `custom` issue is raised by a `.refine()` / `.superRefine()` this repository AUTHORED, and it carries
1022
+ * none of the fields above — no `expected`, no `values`, nothing read off a leaf schema, because what it
1023
+ * refuses is a relationship BETWEEN fields that no leaf can state. Its message is where the author wrote
1024
+ * that relationship down, so an issue projected without it says `sharedResponsibility: custom` and nothing
1025
+ * else. Measured 2026-09-16 on Wonder CRM's `top_down.compliance-conception`: three attempts in a row were
1026
+ * refused on `obligations.N.sharedResponsibility: custom` and the model could not correct an answer whose
1027
+ * rule — "several governance actors require a shared-responsibility judgement" — never reached it.
1028
+ *
1029
+ * It is SAFE for the same reason the fields above are, and for no weaker one: the text is the schema
1030
+ * author's, written in this repository's source, not the provider's rendering of the rejected value.
1031
+ * `code: "custom"` is what guarantees that — every other code's message is composed by Zod around the
1032
+ * input. **A refinement author therefore owes this field a message that names schema-shaped identifiers
1033
+ * only** — a slug, a ref, a key, an index — exactly the category `keys` already admits, and never a
1034
+ * fragment of the rejected content.
972
1035
  */
973
1036
  export const LLMProvider_StructuredValidationIssueSchema = z.object({
974
1037
  code: z.string(),
975
1038
  path: z.array(z.union([z.string(), z.number()])),
1039
+ expected: z.string().optional(),
1040
+ format: z.string().optional(),
1041
+ pattern: z.string().optional(),
1042
+ values: z.array(z.string()).optional(),
1043
+ keys: z.array(z.string()).optional(),
1044
+ /** The authored message of a `custom` refinement, and present for no other code. See above. */
1045
+ refinementMessage: z.string().optional(),
976
1046
  });
977
1047
  /**
978
1048
  * The reason a structured generation produced no object, carried back to the CALLER.
@@ -1006,7 +1076,18 @@ export const LLMProvider_StructuredValidationIssueSchema = z.object({
1006
1076
  */
1007
1077
  export const LLMProvider_StructuredGenerationFailureSchema = z.object({
1008
1078
  kind: z.enum(LLMProvider_StructuredGenerationFailureKind),
1009
- /** Human-readable one-liner, resolved through the engine's caught-error description. */
1079
+ /**
1080
+ * Human-readable one-liner, built from PAYLOAD-FREE facts — the thrown value's `name` and this
1081
+ * failure's `kind`.
1082
+ *
1083
+ * Deliberately NOT the caught error's own message, which is what it used to be. A provider's
1084
+ * structured-generation error serializes the WHOLE error into its message — the model's rejected
1085
+ * `text`, the `response.body`, the validation `value` — so resolving this field through it copied
1086
+ * private model output into every log, trace and persisted failure record that receives this
1087
+ * envelope, breaking the Privacy note above. Same reasoning as
1088
+ * {@link LLMProvider_StructuredValidationIssueSchema}, which drops each issue's message for
1089
+ * exactly this reason one field over.
1090
+ */
1010
1091
  message: z.string(),
1011
1092
  /** The thrown value's `name` when it had one, else its `typeof`. */
1012
1093
  errorName: z.string().optional(),
@@ -1035,26 +1116,39 @@ export const LLMProvider_StructuredGenerationFailureSchema = z.object({
1035
1116
  rootKeys: z.array(z.string()).optional(),
1036
1117
  });
1037
1118
  /**
1038
- * Read the structured-generation failure reason off an invocation's `executionContext`.
1119
+ * Render ONE validation issue as `path: code (what the schema wanted)`.
1039
1120
  *
1040
- * THE supported way to reach it. Provided as a function rather than left to each caller
1041
- * because the alternative is the cast every `usage` reader already hand-rolls
1042
- * (`response.executionContext as { usage?: … }`) — N copies of one shape, each free to
1043
- * drift from the schema, none of them validated. Here the schema IS the reader.
1121
+ * THE renderer for an issue, and the reason it is exported rather than inlined into the failure line
1122
+ * below: a caller that needs issues one at a time — the meta-workflow generation port turns each into a
1123
+ * finding fed back to the model — otherwise hand-rolls this list, and every field added to the issue
1124
+ * afterwards reaches one copy. That has now happened three times, each time silently, each time costing
1125
+ * live runs: the paths themselves were dropped (2026-08-29), then `expected` (2026-09-13), then a
1126
+ * `custom` refinement's message (2026-09-16). Keeping one renderer means a site that reports an issue at
1127
+ * all reports the whole issue.
1044
1128
  *
1045
- * Returns `undefined` both when the generation succeeded and when the context predates
1046
- * this field, so a caller never has to distinguish "no failure" from "no reason
1047
- * recorded" — in either case there is nothing more specific to report than the absence
1048
- * of an object.
1129
+ * Carries no generated text — see {@link LLMProvider_StructuredValidationIssueSchema} for why each field
1130
+ * it prints is schema shape rather than the rejected value.
1049
1131
  */
1132
+ export function describeStructuredValidationIssue(issue) {
1133
+ // What the schema expected rides beside the code: "invalid_type" alone does not say "array", and
1134
+ // `custom` says nothing at all without the refinement's own words — which is why that one comes first.
1135
+ const hints = [
1136
+ ...(issue.refinementMessage ? [issue.refinementMessage] : []),
1137
+ ...(issue.expected ? [`expected ${issue.expected}`] : []),
1138
+ ...(issue.format ? [`format ${issue.format}`] : []),
1139
+ ...(issue.pattern ? [`must match ${issue.pattern}`] : []),
1140
+ ...(issue.values?.length ? [`one of ${issue.values.join(" | ")}`] : []),
1141
+ ...(issue.keys?.length ? [`unexpected key(s) ${issue.keys.join(", ")}`] : []),
1142
+ ];
1143
+ const where = issue.path.length > 0 ? issue.path.join(".") : "<root>";
1144
+ return `${where}: ${issue.code}${hints.length > 0 ? ` (${hints.join("; ")})` : ""}`;
1145
+ }
1050
1146
  /**
1051
1147
  * Render a structured-generation failure as one operator-readable line.
1052
1148
  *
1053
- * Lives here, beside the schema, rather than in each caller: the two labelling
1054
- * orchestrators alone would otherwise have hand-rolled the same rendering twice, and the
1055
- * value of `validationIssues` is entirely in how it is presented — a caller that quietly
1056
- * drops it reports "no object" with extra words. Keeping one renderer means a site that
1057
- * reports the reason at all reports the whole reason.
1149
+ * Lives here, beside the schema, rather than in each caller: the two labelling orchestrators alone would
1150
+ * otherwise have hand-rolled the same rendering twice, and the value of `validationIssues` is entirely in
1151
+ * how it is presented — a caller that quietly drops it reports "no object" with extra words.
1058
1152
  *
1059
1153
  * Carries no generated text, only its length — see
1060
1154
  * {@link LLMProvider_StructuredGenerationFailureSchema}.
@@ -1065,16 +1159,26 @@ export function describeStructuredGenerationFailure(failure) {
1065
1159
  parts.push(`finishReason=${failure.finishReason}`);
1066
1160
  }
1067
1161
  if (failure.validationIssues !== undefined && failure.validationIssues.length > 0) {
1068
- const issues = failure.validationIssues
1069
- .map((issue) => `${issue.path.length > 0 ? issue.path.join(".") : "<root>"} (${issue.code})`)
1070
- .join(", ");
1071
- parts.push(`schema paths: ${issues}`);
1162
+ parts.push(`schema paths: ${failure.validationIssues.map(describeStructuredValidationIssue).join(", ")}`);
1072
1163
  }
1073
1164
  if (failure.generatedTextLength !== undefined && failure.generatedTextLength !== null) {
1074
1165
  parts.push(`generatedTextLength=${failure.generatedTextLength}`);
1075
1166
  }
1076
1167
  return parts.join(" \u00b7 ");
1077
1168
  }
1169
+ /**
1170
+ * Read the structured-generation failure reason off an invocation's `executionContext`.
1171
+ *
1172
+ * THE supported way to reach it. Provided as a function rather than left to each caller
1173
+ * because the alternative is the cast every `usage` reader already hand-rolls
1174
+ * (`response.executionContext as { usage?: … }`) — N copies of one shape, each free to
1175
+ * drift from the schema, none of them validated. Here the schema IS the reader.
1176
+ *
1177
+ * Returns `undefined` both when the generation succeeded and when the context predates
1178
+ * this field, so a caller never has to distinguish "no failure" from "no reason
1179
+ * recorded" — in either case there is nothing more specific to report than the absence
1180
+ * of an object.
1181
+ */
1078
1182
  export function readStructuredGenerationFailure(executionContext) {
1079
1183
  if (typeof executionContext !== "object" || executionContext === null)
1080
1184
  return undefined;
@@ -1186,9 +1290,24 @@ export const LLMProvider_GenerateStructuredInputSchema = z.object({
1186
1290
  * data URI or an image URL. Generic across providers/models; no domain logic.
1187
1291
  */
1188
1292
  images: z.array(LLMProvider_ImageContentSchema).optional(),
1293
+ /**
1294
+ * OPT-IN: when the provider rejects the answer against `schema`, return the rejected answer's TEXT as
1295
+ * `rejectedAnswer` on the output, so a caller that retries can show the model what it wrote.
1296
+ *
1297
+ * Opt-in because the rejected text is model output, and the default for every caller stays "no generated
1298
+ * text on a failed call". It is carried on the OUTPUT — never on the execution context, whose telemetry
1299
+ * every trace sink emits at every level — so it is persisted exactly where and when a successful answer
1300
+ * is: only as an agent-call payload, only at `DEBUG_VERBOSE`. It never reaches the failure log line.
1301
+ *
1302
+ * Added 2026-09-13 (#1143): a playbook retry that could not see its own answer fixed each reported field
1303
+ * and broke another, three attempts in a row, on every family of Wonder CRM's compliance-conception run.
1304
+ */
1305
+ includeRejectedAnswer: z.boolean().optional(),
1189
1306
  });
1190
1307
  export const LLMProvider_GenerateStructuredOutputSchema = z.object({
1191
1308
  object: z.unknown(),
1309
+ /** The rejected answer's text, present only when the input set `includeRejectedAnswer` and no object was produced. */
1310
+ rejectedAnswer: z.string().optional(),
1192
1311
  });
1193
1312
  // Chat Multimodal Operation (for models with MULTIMODAL_VISION/AUDIO/VIDEO capability)
1194
1313
  export const LLMProvider_ChatMultimodalInputSchema = z.object({
@@ -1207,10 +1326,4 @@ export const LLMProvider_StreamStructuredOutputSchema = z.object({
1207
1326
  partialObject: z.unknown().optional(),
1208
1327
  object: z.unknown().optional(),
1209
1328
  });
1210
- // ===============================================================
1211
- // STATUS
1212
- // ===============================================================
1213
- export const LLMProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({
1214
- protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER),
1215
- });
1216
1329
  //# sourceMappingURL=llm.external-connectors-models.schemas.js.map