@wildo-ai/external-connectors-models 1.0.1 → 1.1.1

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 (133) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/companion-exports.d.ts +8 -0
  4. package/dist/esm/companion-exports.d.ts.map +1 -0
  5. package/dist/esm/companion-exports.js +8 -0
  6. package/dist/esm/companion-exports.js.map +1 -0
  7. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +66 -19
  8. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  9. package/dist/esm/core/commons.external-connectors-models.schemas.js +51 -3
  10. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  11. package/dist/esm/core/oauth2.enums.d.ts.map +1 -1
  12. package/dist/esm/core/oauth2.enums.js +1 -1
  13. package/dist/esm/core/oauth2.enums.js.map +1 -1
  14. package/dist/esm/core/operations.external-connectors-models.schemas.d.ts.map +1 -1
  15. package/dist/esm/core/operations.external-connectors-models.schemas.js +1 -1
  16. package/dist/esm/core/operations.external-connectors-models.schemas.js.map +1 -1
  17. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +35 -20
  18. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +1 -1
  19. package/dist/esm/core/protocols.external-connectors-models.schemas.js +1 -1
  20. package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +1 -1
  21. package/dist/esm/core/security.external-connectors-models.schemas.d.ts +1 -1
  22. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  23. package/dist/esm/core/security.external-connectors-models.schemas.js +1 -1
  24. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  25. package/dist/esm/features/core.external-connectors-models.schemas.d.ts +4 -4
  26. package/dist/esm/features/core.external-connectors-models.schemas.d.ts.map +1 -1
  27. package/dist/esm/features/core.external-connectors-models.schemas.js +13 -13
  28. package/dist/esm/features/core.external-connectors-models.schemas.js.map +1 -1
  29. package/dist/esm/features/email.external-connectors-models.schemas.d.ts +12 -12
  30. package/dist/esm/features/email.external-connectors-models.schemas.d.ts.map +1 -1
  31. package/dist/esm/features/email.external-connectors-models.schemas.js +2 -2
  32. package/dist/esm/features/email.external-connectors-models.schemas.js.map +1 -1
  33. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  34. package/dist/esm/features/hooks.external-connectors-models.schemas.js +1 -1
  35. package/dist/esm/features/hooks.external-connectors-models.schemas.js.map +1 -1
  36. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts +4 -4
  37. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts.map +1 -1
  38. package/dist/esm/features/sms.external-connectors-models.schemas.js +1 -1
  39. package/dist/esm/features/sms.external-connectors-models.schemas.js.map +1 -1
  40. package/dist/esm/index.d.ts +27 -27
  41. package/dist/esm/index.d.ts.map +1 -1
  42. package/dist/esm/index.js +5 -6
  43. package/dist/esm/index.js.map +1 -1
  44. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts +3 -3
  45. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts.map +1 -1
  46. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js +1 -1
  47. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js.map +1 -1
  48. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +526 -0
  49. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -0
  50. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +639 -0
  51. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -0
  52. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +67 -0
  53. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  54. package/dist/esm/protocols/billing.standard-interface.schemas.js +1 -1
  55. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  56. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +179 -0
  57. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -0
  58. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +217 -0
  59. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -0
  60. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +5 -5
  61. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
  62. package/dist/esm/protocols/email.external-connectors-models.schemas.js +1 -1
  63. package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
  64. package/dist/esm/protocols/email.standard-interface.schemas.d.ts +37 -10
  65. package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
  66. package/dist/esm/protocols/email.standard-interface.schemas.js +137 -4
  67. package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
  68. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +175 -0
  69. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -0
  70. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +191 -0
  71. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -0
  72. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts +4 -4
  73. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
  74. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js +2 -2
  75. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
  76. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts +3 -3
  77. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts.map +1 -1
  78. package/dist/esm/protocols/git.external-connectors-models.schemas.js +1 -1
  79. package/dist/esm/protocols/git.external-connectors-models.schemas.js.map +1 -1
  80. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts +3 -3
  81. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts.map +1 -1
  82. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js +1 -1
  83. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js.map +1 -1
  84. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +14 -6
  85. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  86. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +1 -1
  87. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  88. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts +151 -0
  89. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -0
  90. package/dist/esm/protocols/image.external-connectors-models.schemas.js +150 -0
  91. package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -0
  92. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +567 -67
  93. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  94. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +815 -36
  95. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  96. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts +3 -3
  97. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts.map +1 -1
  98. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js +1 -1
  99. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js.map +1 -1
  100. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +27 -28
  101. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
  102. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js +1 -3
  103. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
  104. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +3 -3
  105. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +1 -1
  106. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +1 -1
  107. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +1 -1
  108. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts +30 -30
  109. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts.map +1 -1
  110. package/dist/esm/protocols/saml.external-connectors-models.schemas.js +1 -1
  111. package/dist/esm/protocols/saml.external-connectors-models.schemas.js.map +1 -1
  112. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts +2 -2
  113. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
  114. package/dist/esm/protocols/sms.external-connectors-models.schemas.js +1 -1
  115. package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
  116. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +1 -1
  117. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
  118. package/dist/esm/protocols/sms.standard-interface.schemas.js +1 -1
  119. package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
  120. package/dist/tsconfig.build.tsbuildinfo +1 -1
  121. package/package.json +20 -10
  122. package/dist/esm/core/lazy-loading.external-connectors-models.schemas.d.ts +0 -127
  123. package/dist/esm/core/lazy-loading.external-connectors-models.schemas.d.ts.map +0 -1
  124. package/dist/esm/core/lazy-loading.external-connectors-models.schemas.js +0 -22
  125. package/dist/esm/core/lazy-loading.external-connectors-models.schemas.js.map +0 -1
  126. package/dist/esm/core/providers.external-connectors-models.schemas.d.ts +0 -80
  127. package/dist/esm/core/providers.external-connectors-models.schemas.d.ts.map +0 -1
  128. package/dist/esm/core/providers.external-connectors-models.schemas.js +0 -55
  129. package/dist/esm/core/providers.external-connectors-models.schemas.js.map +0 -1
  130. package/dist/esm/protocols/cli-runtime.external-connectors-models.schemas.d.ts +0 -214
  131. package/dist/esm/protocols/cli-runtime.external-connectors-models.schemas.d.ts.map +0 -1
  132. package/dist/esm/protocols/cli-runtime.external-connectors-models.schemas.js +0 -188
  133. package/dist/esm/protocols/cli-runtime.external-connectors-models.schemas.js.map +0 -1
@@ -1,29 +1,37 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base } from "../core/commons.external-connectors-models.schemas.js";
3
- import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas.js";
4
- import { CLIRuntime_OutputParserMode, CLIRuntime_RunnerHost } from "./cli-runtime.external-connectors-models.schemas.js";
2
+ import { ExternalProvider_ExchangeProtocol_Configuration_Base, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base } from "../core/commons.external-connectors-models.schemas";
3
+ import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas";
5
4
  export declare enum LLM_Model {
6
5
  OPEN_AI_O1 = "o1",
7
6
  OPEN_AI_O1_MINI = "o1-mini",
8
7
  OPEN_AI_O3_MINI = "o3-mini",
9
8
  OPEN_AI_O4_MINI = "o4-mini",
9
+ /** GPT-5.6 frontier flagship tier. */
10
+ OPEN_AI_GPT_5_6_SOL = "gpt-5.6-sol",
11
+ /** GPT-5.6 balanced tier for everyday work. */
12
+ OPEN_AI_GPT_5_6_TERRA = "gpt-5.6-terra",
13
+ /** GPT-5.6 fast/affordable tier. */
14
+ OPEN_AI_GPT_5_6_LUNA = "gpt-5.6-luna",
15
+ /** Dec-2025 flagship (accepts `temperature`, unlike the 5.6 family). */
16
+ OPEN_AI_GPT_5_2 = "gpt-5.2",
17
+ /** Extended-reasoning 5.2 variant. */
18
+ OPEN_AI_GPT_5_2_PRO = "gpt-5.2-pro",
19
+ OPEN_AI_GPT_5_1 = "gpt-5.1",
10
20
  OPEN_AI_GPT_5 = "gpt-5",
11
- OPEN_AI_GPT_5_1_INSTANT = "gpt-5.1-instant",
12
- OPEN_AI_GPT_5_1_THINKING = "gpt-5.1-thinking",
21
+ OPEN_AI_GPT_5_MINI = "gpt-5-mini",
13
22
  OPEN_AI_GPT_4O = "gpt-4o",
14
23
  OPEN_AI_GPT_4O_MINI = "gpt-4o-mini",
15
24
  OPEN_AI_GPT_4_TURBO = "gpt-4-turbo",
16
25
  OPEN_AI_GPT_4 = "gpt-4",
17
26
  OPEN_AI_GPT_3_5_TURBO = "gpt-3.5-turbo",
18
- CLAUDE_4_OPUS = "claude-4-opus",
27
+ /** Anthropic's most intelligent generally-available model (Claude 5 family, Mythos-class tier). */
28
+ CLAUDE_FABLE_5 = "claude-fable-5",
29
+ /** Claude 5 family workhorse. */
30
+ CLAUDE_SONNET_5 = "claude-sonnet-5",
31
+ /** Latest Opus-tier model (4.x line). */
32
+ CLAUDE_OPUS_4_8 = "claude-opus-4-8",
19
33
  CLAUDE_SONNET_4_5 = "claude-sonnet-4-5",
20
34
  CLAUDE_HAIKU_4_5 = "claude-haiku-4-5",
21
- CLAUDE_3_7_SONNET = "claude-3-7-sonnet",
22
- CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
23
- CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
24
- CLAUDE_3_OPUS = "claude-3-opus-20240229",
25
- CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
26
- CLAUDE_3_HAIKU = "claude-3-haiku-20240307",
27
35
  GOOGLE_GEMINI_3_DEEP_THINK = "gemini-3-deep-think",
28
36
  GOOGLE_GEMINI_3_PRO = "gemini-3-pro",
29
37
  GOOGLE_GEMINI_2_5_PRO = "gemini-2.5-pro",
@@ -59,9 +67,30 @@ export declare enum LLM_Model_IO_Capability {
59
67
  LONG_CONTEXT = "long_context",
60
68
  CODE_GENERATION = "code_generation"
61
69
  }
70
+ /**
71
+ * Whether a model can think, and whether that thinking can be turned OFF.
72
+ *
73
+ * This is the MODEL-PROPERTY axis of reasoning. It answers "what is this model
74
+ * capable of", never "how hard should this call think" — the latter is
75
+ * {@link LLMProvider_ReasoningEffort}, a per-call parameter. Keeping the two
76
+ * apart is deliberate: a capability is a fact about the model, an effort is a
77
+ * choice by the author. (The six `*_THINKING` operation keys that once encoded
78
+ * this as a third axis were retired on 2026-07-17.)
79
+ *
80
+ * Consumed by {@link LLM_MODEL_THINKING_CAPABILITY} +
81
+ * {@link validateReasoningEffortForModel} to reject impossible
82
+ * model × effort pairs at authoring time instead of as a provider 400.
83
+ */
62
84
  export declare enum LLM_Model_Thinking_Capability {
63
- NONE = "none",// Model does not support thinking/reasoning mode
64
- OPTIONAL = "optional",// Model supports optional thinking mode (can enable/disable)
85
+ /** Not a reasoning model — it cannot think, so NO `reasoningEffort` is valid. */
86
+ NONE = "none",
87
+ /** Thinking can be enabled AND disabled — every effort level is valid, incl. `NONE`. */
88
+ OPTIONAL = "optional",
89
+ /**
90
+ * The model ALWAYS reasons and thinking CANNOT be disabled (o-series,
91
+ * Claude 5). Every effort is valid EXCEPT `NONE` — asking such a model not to
92
+ * think is a provider error, not a preference.
93
+ */
65
94
  ALWAYS = "always"
66
95
  }
67
96
  export declare enum LLM_Model_Availability {
@@ -71,20 +100,126 @@ export declare enum LLM_Model_Availability {
71
100
  DEPRECATED = "deprecated",// Still available but deprecated
72
101
  DISCONTINUED = "discontinued"
73
102
  }
103
+ /**
104
+ * WHAT A MODEL IS CHOSEN FOR — the durable axis of model selection.
105
+ *
106
+ * Concrete model ids churn monthly; the kinds of work a model is selected for
107
+ * do not. This enum is therefore the surface an AUTHOR names
108
+ * (`config.modelApplicability`), while the concrete id is resolved by the
109
+ * framework from {@link LLM_MODEL_CATALOG} +
110
+ * {@link LLM_MODEL_APPLICABILITY_PREFERENCE}. A model launch becomes one
111
+ * catalog row and one preference edit, with no agent definition touched.
112
+ *
113
+ * Members name the WORK, never the model's SIZE or a vendor tier. A tier
114
+ * ("mini", "pro", "Sol/Terra/Luna", "Opus/Sonnet/Haiku") is a property of one
115
+ * vendor's line-up — it renames (GPT-5.6 already did), it differs per provider,
116
+ * and it still never says what to choose it FOR.
117
+ *
118
+ * Import path: `@wildo-ai/external-connectors-models`.
119
+ */
120
+ export declare enum LLM_Model_Applicability {
121
+ /**
122
+ * High-stakes semantic judgment where being wrong is expensive and the answer
123
+ * is read by a human or gates a durable decision — critique, deliberation,
124
+ * persona derivation, acceptance judgment.
125
+ *
126
+ * Choose it when: cost and latency are worth trading for quality, the input is
127
+ * ambiguous, and there is no mechanical check downstream that would catch a
128
+ * poor answer.
129
+ * Do NOT choose it for: volume work, or anything a schema already constrains.
130
+ */
131
+ DEEP_JUDGMENT = "deep_judgment",
132
+ /**
133
+ * Everyday generation of application artifacts against a declared schema —
134
+ * structured output, copy, plans, summaries.
135
+ *
136
+ * Choose it when: the shape is constrained by a schema or a template, quality
137
+ * matters but the task is bounded, and the call happens tens of times rather
138
+ * than thousands. This is the correct default when no other member obviously
139
+ * fits.
140
+ */
141
+ STRUCTURED_AUTHORING = "structured_authoring",
142
+ /**
143
+ * High-volume, low-judgment transformation — labelling, translation,
144
+ * extraction, reformatting, classification against a fixed vocabulary.
145
+ *
146
+ * Choose it when: the same call runs hundreds or thousands of times, the
147
+ * answer is checkable, and unit cost dominates quality. The trade is
148
+ * deliberate: paying a judgment-tier price per label is the failure this
149
+ * member exists to prevent.
150
+ */
151
+ HIGH_VOLUME_MECHANICAL = "high_volume_mechanical",
152
+ /**
153
+ * Work whose binding constraint is how much material must be in ONE call —
154
+ * whole-corpus analysis, cross-document reconciliation, large-codebase
155
+ * reading.
156
+ *
157
+ * Choose it when: chunking would destroy the semantics (the answer depends on
158
+ * relating parts that must be seen together). If the work chunks cleanly,
159
+ * choose by judgment level instead and let the caller chunk.
160
+ */
161
+ LONG_CONTEXT_ANALYSIS = "long_context_analysis",
162
+ /**
163
+ * Judgment that requires SEEING an artifact — logo/brand assessment, rendered
164
+ * layout review, screenshot triage.
165
+ *
166
+ * Choose it when: the input is an image and the output is an assessment of it.
167
+ * Resolution refuses any model whose catalog row does not evidence
168
+ * {@link LLM_Model_IO_Capability.MULTIMODAL_VISION}, so an unverified model is
169
+ * never silently selected for vision work.
170
+ */
171
+ VISUAL_JUDGMENT = "visual_judgment",
172
+ /**
173
+ * Autonomous, workspace-mutating code authoring driven through a coding-agent
174
+ * CLI rather than a chat API.
175
+ *
176
+ * Choose it when: the agent edits files in a trusted workspace and needs long
177
+ * tool-using turns. This member is transport-bound — it is only serviceable
178
+ * on a provider that declares an `AGENT_CLIENT_PROTOCOL` transport, so resolving it never
179
+ * silently downgrades workspace work to a chat call that can only describe an
180
+ * edit.
181
+ */
182
+ WORKSPACE_CODING_AGENT = "workspace_coding_agent"
183
+ }
184
+ /** @wildo_source:part:start saas.external-providers.llm.operation-key facet:kind:api facet:audience:app-developer
185
+ *
186
+ * The LLM operation vocabulary — WHAT a call does, never HOW HARD it thinks.
187
+ *
188
+ * This is the key you put on an agent's `config.operationKey`. It selects the
189
+ * executor, and with it BOTH the invocation `input` shape you must supply and
190
+ * the `output` shape you get back:
191
+ *
192
+ * | Operation key | `invocation.input` | `invocation.output` |
193
+ * |-----------------------|-------------------------------|---------------------|
194
+ * | `GENERATE_TEXT` | `{ prompt }` | `{ text }` |
195
+ * | `GENERATE_STRUCTURED` | `{ prompt, schema }` (Zod) | `{ object }` |
196
+ * | `CHAT_COMPLETION` | `{ messages }` or `{ prompt }`| `{ message }` |
197
+ * | `CHAT_MULTIMODAL` | `{ prompt, images }` | `{ message }` |
198
+ *
199
+ * `GENERATE_STRUCTURED` REQUIRES `input.schema`; omitting it is a validation
200
+ * error, not a silent fallback to text. The `STREAM_*` keys exist for the
201
+ * conversational runtime — a one-shot caller uses the buffered keys above.
202
+ *
203
+ * Import path: `@wildo-ai/external-connectors-models`.
204
+ *
205
+ * Reasoning depth is a PARAMETER ({@link LLMProvider_ReasoningEffort} on the
206
+ * model configuration), not an operation. The six `*_THINKING` op keys that
207
+ * used to live here were RETIRED (2026-07-17): they were inert at execution
208
+ * (each routed to the exact same executor as its non-thinking sibling) and,
209
+ * once `reasoningEffort` landed, they became a SECOND authority axis for the
210
+ * same concept — two ways to say "think harder", neither carrying its own
211
+ * semantic weight. A model's ability to reason is a property of the model +
212
+ * the effort parameter, not a parallel operation surface.
213
+ */
74
214
  export declare enum LLMProvider_OperationKey {
75
215
  GENERATE_TEXT = "llm.generateText",
76
216
  CHAT_COMPLETION = "llm.chatCompletion",
77
217
  STREAM_TEXT = "llm.streamText",
78
218
  GENERATE_STRUCTURED = "llm.generateStructured",
79
219
  CHAT_MULTIMODAL = "llm.chatMultimodal",
80
- STREAM_STRUCTURED = "llm.streamStructured",
81
- GENERATE_TEXT_THINKING = "llm.generateText.thinking",
82
- CHAT_COMPLETION_THINKING = "llm.chatCompletion.thinking",
83
- STREAM_TEXT_THINKING = "llm.streamText.thinking",
84
- GENERATE_STRUCTURED_THINKING = "llm.generateStructured.thinking",
85
- CHAT_MULTIMODAL_THINKING = "llm.chatMultimodal.thinking",
86
- STREAM_STRUCTURED_THINKING = "llm.streamStructured.thinking"
220
+ STREAM_STRUCTURED = "llm.streamStructured"
87
221
  }
222
+ /** @wildo_source:part:end saas.external-providers.llm.operation-key */
88
223
  /**
89
224
  * Prompt format preference for provider-specific rendering
90
225
  * Used by PromptCompilerBackendService to select optimal format
@@ -115,6 +250,249 @@ export declare const LLMProvider_ToolChoice_Schema: z.ZodUnion<readonly [z.ZodLi
115
250
  name: z.ZodString;
116
251
  }, z.core.$strip>]>;
117
252
  export type LLMProvider_ToolChoice = z.infer<typeof LLMProvider_ToolChoice_Schema>;
253
+ /** @wildo_source:part:start saas.external-providers.llm.model-configuration facet:kind:api facet:audience:app-developer
254
+ *
255
+ * Reasoning-effort control for reasoning-capable models (GPT-5.6 Sol/Terra/Luna,
256
+ * OpenAI o-series, Claude 5 thinking, Gemini reasoning, …). The values mirror
257
+ * the AI SDK 7 top-level `reasoning` option EXACTLY, which the SDK translates to
258
+ * each provider's native reasoning setting (OpenAI `reasoning_effort`, Anthropic
259
+ * thinking budget, …). Omit for non-reasoning models or to accept the provider
260
+ * default.
261
+ *
262
+ * Effort ladder (cost/latency ↑ with depth):
263
+ * - `NONE` — reasoning off; mechanical tasks (extraction, formatting, labelling).
264
+ * - `MINIMAL` / `LOW` — brief reasoning; simple structured output.
265
+ * - `MEDIUM` — balanced; most authored generation (market/email copy).
266
+ * - `HIGH` / `XHIGH` — deep reasoning; judgment work (persona derivation,
267
+ * deliberation, logo/quality judges).
268
+ * - `PROVIDER_DEFAULT` — explicitly defer to the model's own default effort.
269
+ *
270
+ * NOT EVERY MODEL SUPPORTS EVERY LEVEL — the SDK forwards the value and the
271
+ * provider validates it. Support matrix VERIFIED LIVE (2026-07-16/17); pick a
272
+ * level the target model actually supports:
273
+ *
274
+ * | Model family | Supported | Rejected |
275
+ * |---------------------|------------------------------------|--------------------------------|
276
+ * | OpenAI GPT-5.6 | none, low, medium, high, xhigh | `minimal`, `max` |
277
+ * | Anthropic Claude 5 | low, medium, high, xhigh | **`none`** — thinking CANNOT |
278
+ * | (fable-5, …) | | be disabled ("thinking.type. |
279
+ * | | | disabled is not supported…"; |
280
+ * | | | defaults to adaptive) |
281
+ *
282
+ * ⚠️ `NONE` is therefore NOT portable: it turns reasoning off on GPT-5.6 but
283
+ * ERRORS on Claude 5. `PROVIDER_DEFAULT` as an explicit value is also rejected
284
+ * by GPT-5.6 — omit the field entirely for the model's default instead.
285
+ */
286
+ export declare enum LLMProvider_ReasoningEffort {
287
+ PROVIDER_DEFAULT = "provider-default",
288
+ NONE = "none",
289
+ MINIMAL = "minimal",
290
+ LOW = "low",
291
+ MEDIUM = "medium",
292
+ HIGH = "high",
293
+ XHIGH = "xhigh"
294
+ }
295
+ /** @wildo_source:part:end saas.external-providers.llm.model-configuration */
296
+ /**
297
+ * One row per model: everything the framework knows about a concrete id.
298
+ *
299
+ * The entry deliberately separates TWO kinds of knowledge, because they carry
300
+ * different burdens of proof and different consequences when wrong:
301
+ *
302
+ * **Probed facts** — `availability`, `thinkingCapability`,
303
+ * `unsupportedReasoningEfforts`, `rejectsExplicitTemperature`. These are
304
+ * assertions about the provider's API and are populated ONLY from a live probe
305
+ * (`live-model-smoke.test.ts`, `WILDO_LIVE_MODEL_SMOKE=1`). Absence means
306
+ * "not yet verified", never "false" — a wrong value here BLOCKS a legal
307
+ * configuration, so guessing is worse than omitting. Never infer them from
308
+ * published docs: the docs have already been wrong once (they claimed GPT-5.6
309
+ * supports `minimal`; the API rejects it).
310
+ *
311
+ * **Framework opinion** — `applicabilities`, `ioCapabilities`. These express
312
+ * what Wildo is willing to SELECT this model for. Being wrong here degrades
313
+ * quality or cost, it does not make a call illegal, and the remedy is an edit
314
+ * to one row rather than to every agent definition.
315
+ */
316
+ export type LLM_ModelCatalogEntry = {
317
+ /** The `ref` of the provider module that serves this id. */
318
+ providerRef: string;
319
+ /**
320
+ * PROBED. Omitted when this repository has never verified the id against the
321
+ * provider's live model list. An unverified model is never auto-resolved
322
+ * ({@link resolveModelForApplicability}); it stays nameable as an explicit
323
+ * pin, which is the escape hatch for custom and fine-tuned deployments.
324
+ */
325
+ availability?: LLM_Model_Availability;
326
+ /** ISO date of the live verification behind the probed fields. */
327
+ probedOn?: string;
328
+ /**
329
+ * FRAMEWORK OPINION. Which kinds of work this model may be selected for.
330
+ * Empty means "never auto-selected" — a legal, deliberate state for an id we
331
+ * keep nameable (legacy, pinned, or recorded in an old trace) but do not want
332
+ * chosen on an author's behalf.
333
+ */
334
+ applicabilities: readonly LLM_Model_Applicability[];
335
+ /** FRAMEWORK OPINION, except where a probe confirmed it. */
336
+ ioCapabilities?: readonly LLM_Model_IO_Capability[];
337
+ /** PROBED. See {@link LLM_Model_Thinking_Capability}. */
338
+ thinkingCapability?: LLM_Model_Thinking_Capability;
339
+ /** PROBED. Effort levels this model rejects despite its thinking capability. */
340
+ unsupportedReasoningEfforts?: readonly LLMProvider_ReasoningEffort[];
341
+ /** PROBED. `true` when sending any explicit `temperature` is a provider error. */
342
+ rejectsExplicitTemperature?: boolean;
343
+ };
344
+ /**
345
+ * THE model catalog — the single per-model fact table.
346
+ *
347
+ * It is an EXHAUSTIVE `Record`, not a `Partial`: adding a member to
348
+ * {@link LLM_Model} without a row here is a compile error. That exhaustiveness
349
+ * is the entire guarantee. Before this record existed, model knowledge lived in
350
+ * four parallel partial maps keyed by the same string — a thinking-capability
351
+ * map, an unsupported-effort map, a pricing table and a capacity registry —
352
+ * plus two enums ({@link LLM_Model_Availability},
353
+ * {@link LLM_Model_IO_Capability}) that had no per-model facts and no consumer
354
+ * at all. Partial maps are how a vocabulary silently stops describing the
355
+ * running system.
356
+ *
357
+ * Per-field burden of proof: see {@link LLM_ModelCatalogEntry}.
358
+ */
359
+ export declare const LLM_MODEL_CATALOG: Record<LLM_Model, LLM_ModelCatalogEntry>;
360
+ /**
361
+ * Availability states a model may be auto-RESOLVED in. `DEPRECATED` and
362
+ * `DISCONTINUED` are deliberately absent: a retired id stays nameable as an
363
+ * explicit pin and readable in a stored trace, but the framework will not
364
+ * choose it on an author's behalf.
365
+ */
366
+ export declare const LLM_MODEL_RESOLVABLE_AVAILABILITIES: readonly LLM_Model_Availability[];
367
+ /**
368
+ * The framework's DEFAULT answer to "which model serves this kind of work",
369
+ * ordered by preference, highest first.
370
+ *
371
+ * This is the one place a monthly model launch lands: add its catalog row, then
372
+ * put it at the head of the applicabilities it should now serve. No agent
373
+ * definition changes. An application may override this per applicability (see
374
+ * the resolution options on {@link resolveModelForApplicability}) when it wants
375
+ * a different cost/quality trade without forking the engine.
376
+ *
377
+ * A preference entry is only a CANDIDATE — resolution still requires the row to
378
+ * name the requesting provider, to be in a resolvable availability, and to
379
+ * declare the applicability. So an entry can never resurrect a retired model or
380
+ * quietly widen what a model is used for.
381
+ */
382
+ export declare const LLM_MODEL_APPLICABILITY_PREFERENCE: Record<LLM_Model_Applicability, readonly LLM_Model[]>;
383
+ /** Why {@link resolveModelForApplicability} could not answer — carried into a named CONFIGURATION error. */
384
+ export declare enum LLM_ModelResolutionFailure {
385
+ /** The applicability has no candidate at all for this provider. */
386
+ NO_CANDIDATE_FOR_PROVIDER = "no_candidate_for_provider",
387
+ /** Candidates exist for this provider but none is in a resolvable availability. */
388
+ NO_RESOLVABLE_AVAILABILITY = "no_resolvable_availability",
389
+ /** Candidates exist and are available, but none evidences the required IO capability. */
390
+ REQUIRED_IO_CAPABILITY_UNEVIDENCED = "required_io_capability_unevidenced"
391
+ }
392
+ export type LLM_ModelResolutionInput = {
393
+ applicability: LLM_Model_Applicability;
394
+ /** Resolve within ONE provider — the provider the agent is configured against. */
395
+ providerRef: string;
396
+ /**
397
+ * Application-level override of the default preference order, per
398
+ * applicability. Only the ORDER and MEMBERSHIP of candidates is overridable;
399
+ * every catalog gate still applies, so an override cannot select a retired
400
+ * model, a model of another provider, or a model that does not declare the
401
+ * applicability.
402
+ */
403
+ preferenceOverride?: Partial<Record<LLM_Model_Applicability, readonly LLM_Model[]>>;
404
+ };
405
+ export type LLM_ModelResolution = {
406
+ resolved: true;
407
+ model: LLM_Model;
408
+ entry: LLM_ModelCatalogEntry;
409
+ fromOverride: boolean;
410
+ } | {
411
+ resolved: false;
412
+ failure: LLM_ModelResolutionFailure;
413
+ consideredModels: readonly LLM_Model[];
414
+ };
415
+ /**
416
+ * Resolve an applicability to ONE concrete model id for a given provider.
417
+ *
418
+ * Fails CLOSED and explains itself: an unresolvable applicability must surface
419
+ * as a named startup/configuration error naming what was considered, never as a
420
+ * silent fallback to some other model. A fallback here would be the exact defect
421
+ * this layer exists to remove — the author asked for a KIND of model, and
422
+ * quietly handing them a different kind is worse than refusing.
423
+ *
424
+ * Note this function answers the semantic question only. Whether the resolved
425
+ * model is reachable over the agent's TRANSPORT (a profile that
426
+ * declares it) is a separate gate owned by the backend, because the transport
427
+ * declaration lives on the provider registry rather than in this catalog.
428
+ *
429
+ * `catalog` is a parameter rather than a closed-over constant so each gate can
430
+ * be exercised INDEPENDENTLY: with the real catalog, several gates are
431
+ * unreachable simply because no shipped row has the shape that trips them (no
432
+ * model is currently both applicability-declaring and unverified), and a gate
433
+ * that cannot be reached is a gate nobody has tested. Production callers pass
434
+ * nothing.
435
+ */
436
+ export declare const resolveModelForApplicability: (input: LLM_ModelResolutionInput, catalog?: Record<LLM_Model, LLM_ModelCatalogEntry>) => LLM_ModelResolution;
437
+ /**
438
+ * Model → thinking capability, DERIVED from {@link LLM_MODEL_CATALOG}.
439
+ *
440
+ * Still partial and still evidence-only: a model appears here only when its
441
+ * catalog row carries a probed `thinkingCapability`. Absence means "not yet
442
+ * verified", NOT "no thinking". Validation FAILS OPEN on absent/unknown models
443
+ * — `LLMProvider_OperationModelConfiguration.model` is a free `z.string()`
444
+ * (fine-tuned + custom deployment ids are legitimate), so we can neither
445
+ * enumerate every id nor guess safely. Guessing is worse than omitting: a wrong
446
+ * `ALWAYS` blocks a legal config, whereas an omission leaves runtime behavior
447
+ * untouched.
448
+ */
449
+ export declare const LLM_MODEL_THINKING_CAPABILITY: Partial<Record<LLM_Model, LLM_Model_Thinking_Capability>>;
450
+ /**
451
+ * Effort levels a specific model REJECTS despite its thinking capability,
452
+ * DERIVED from {@link LLM_MODEL_CATALOG} — per-provider vocabulary quirks,
453
+ * distinct from the capability axis above. Evidence-only, same rule.
454
+ *
455
+ * `PROVIDER_DEFAULT` is rejected by GPT-5.6 as an explicit value: to get the
456
+ * model's own default, OMIT `reasoningEffort` entirely rather than naming it.
457
+ */
458
+ export declare const LLM_MODEL_UNSUPPORTED_REASONING_EFFORTS: Partial<Record<LLM_Model, readonly LLMProvider_ReasoningEffort[]>>;
459
+ /**
460
+ * Resolve a model's verified thinking capability, or `undefined` when the model
461
+ * id is unknown/unverified (free-form ids are legitimate — see
462
+ * {@link LLM_MODEL_THINKING_CAPABILITY}).
463
+ */
464
+ export declare const getModelThinkingCapability: (model: string) => LLM_Model_Thinking_Capability | undefined;
465
+ /** @wildo_source:part:start saas.external-providers.llm.model-configuration facet:kind:api facet:audience:app-developer
466
+ *
467
+ * Validate a `model × reasoningEffort` pair against verified capability.
468
+ *
469
+ * Returns a human-readable violation, or `null` when the pair is valid OR
470
+ * cannot be judged. **Fails OPEN by design** (unknown model, or omitted effort
471
+ * → `null`): the alternative would reject legitimate custom deployments.
472
+ *
473
+ * Call this at authoring/registration time so an impossible pair surfaces as a
474
+ * named startup error instead of a provider 400 in the middle of a long agent
475
+ * pipeline — the trap this exists to catch is `NONE`, which turns reasoning off
476
+ * on GPT-5.6 but hard-errors on Claude 5.
477
+ *
478
+ * @param model The configured model id (free-form; unknown ids pass).
479
+ * @param effort The configured effort; omit/undefined always passes.
480
+ * @returns A violation message, or `null` if valid/unjudgeable.
481
+ */
482
+ export declare const validateReasoningEffortForModel: (model: string, effort: LLMProvider_ReasoningEffort | undefined) => string | null;
483
+ /** @wildo_source:part:start saas.external-providers.llm.model-configuration facet:kind:api facet:audience:app-developer
484
+ *
485
+ * The provider/model/sampling surface every LLM agent config inherits — this is
486
+ * the shape behind an agent's `config` (an agent adds `operationKey` on top).
487
+ *
488
+ * `providerRef` names a provider you enabled for the `AI_LLM` capability in
489
+ * `defineSaaSProviders`; `model` is a free-form string so fine-tuned and custom
490
+ * deployment ids stay legal. Every sampling field is OPTIONAL and every one of
491
+ * them is forwarded to the provider verbatim — so an unsupported value is a
492
+ * provider 400, not a framework-side clamp. Omit a field to accept the model's
493
+ * own default; that is the portable choice (notably: the Claude 5 family
494
+ * REJECTS an explicit `temperature`).
495
+ */
118
496
  export declare const LLMProvider_OperationModelConfiguration_Schema: z.ZodObject<{
119
497
  model: z.ZodString;
120
498
  providerRef: z.ZodString;
@@ -124,7 +502,7 @@ export declare const LLMProvider_OperationModelConfiguration_Schema: z.ZodObject
124
502
  frequencyPenalty: z.ZodOptional<z.ZodNumber>;
125
503
  presencePenalty: z.ZodOptional<z.ZodNumber>;
126
504
  stopStringSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
127
- thinkingEnabled: z.ZodOptional<z.ZodBoolean>;
505
+ reasoningEffort: z.ZodOptional<z.ZodEnum<typeof LLMProvider_ReasoningEffort>>;
128
506
  toolingFunctionEnabled: z.ZodOptional<z.ZodBoolean>;
129
507
  mcpCompatible: z.ZodOptional<z.ZodBoolean>;
130
508
  toolChoice: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{
@@ -133,6 +511,7 @@ export declare const LLMProvider_OperationModelConfiguration_Schema: z.ZodObject
133
511
  }, z.core.$strip>]>>;
134
512
  }, z.core.$strip>;
135
513
  export type LLMProvider_OperationModelConfiguration = z.infer<typeof LLMProvider_OperationModelConfiguration_Schema>;
514
+ /** @wildo_source:part:end saas.external-providers.llm.model-configuration */
136
515
  export declare enum LLMProvider_FinishReason {
137
516
  STOP = "stop",
138
517
  LENGTH = "length",
@@ -145,6 +524,12 @@ export declare const LLMProvider_UsageSchema: z.ZodObject<{
145
524
  promptTokens: z.ZodOptional<z.ZodNumber>;
146
525
  completionTokens: z.ZodOptional<z.ZodNumber>;
147
526
  totalTokens: z.ZodOptional<z.ZodNumber>;
527
+ tokenUsageComplete: z.ZodOptional<z.ZodBoolean>;
528
+ inputTokenDetails: z.ZodOptional<z.ZodObject<{
529
+ noCacheTokens: z.ZodOptional<z.ZodNumber>;
530
+ cacheReadTokens: z.ZodOptional<z.ZodNumber>;
531
+ cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
532
+ }, z.core.$strip>>;
148
533
  }, z.core.$strip>;
149
534
  export type LLMProvider_Usage = z.infer<typeof LLMProvider_UsageSchema>;
150
535
  export declare const LLMProvider_TrackingSchema: z.ZodObject<{
@@ -186,9 +571,19 @@ export declare const LLMProvider_TrackingSchema: z.ZodObject<{
186
571
  }, z.core.$strip>>>;
187
572
  }, z.core.$strip>;
188
573
  export type LLMProvider_Tracking = z.infer<typeof LLMProvider_TrackingSchema>;
574
+ /**
575
+ * How an LLM operation was physically executed.
576
+ *
577
+ * One member, deliberately. A `CLI` member existed while a coding agent was
578
+ * mis-modelled as a text completion and reached the model through a subprocess;
579
+ * with coding agents moved to their own operation family and their own
580
+ * execution-transport metadata, an LLM call is served over HTTP and nothing
581
+ * else. Kept as an enum rather than collapsed away because the field is
582
+ * recorded on durable execution contexts, where a bare literal would carry no
583
+ * explanation and a second transport may yet be real.
584
+ */
189
585
  export declare enum LLMProvider_ExecutionTransportKind {
190
- API = "api",
191
- CLI = "cli"
586
+ API = "api"
192
587
  }
193
588
  export declare const LLMProvider_ExecutionArtifactKindSchema: z.ZodEnum<{
194
589
  stdout: "stdout";
@@ -204,32 +599,134 @@ export declare const LLMProvider_ExecutionArtifactMetadataSchema: z.ZodObject<{
204
599
  }, z.core.$strip>;
205
600
  export type LLMProvider_ExecutionArtifactMetadata = z.infer<typeof LLMProvider_ExecutionArtifactMetadataSchema>;
206
601
  export declare const LLMProvider_ExecutionTransportMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
207
- kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind.API>;
602
+ kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind>;
208
603
  protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER>;
209
604
  providerRef: z.ZodString;
210
605
  model: z.ZodOptional<z.ZodString>;
211
- }, z.core.$strip>, z.ZodObject<{
212
- kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind.CLI>;
213
- protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.CLI_RUNTIME>;
214
- providerRef: z.ZodString;
215
- model: z.ZodOptional<z.ZodString>;
216
- resolvedModel: z.ZodOptional<z.ZodString>;
217
- executionProfileRef: z.ZodString;
218
- runnerHost: z.ZodEnum<typeof CLIRuntime_RunnerHost>;
219
- outputParserMode: z.ZodEnum<typeof CLIRuntime_OutputParserMode>;
220
- command: z.ZodString;
221
- workingDirectory: z.ZodString;
222
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
223
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
- kind: z.ZodEnum<{
226
- stdout: "stdout";
227
- stderr: "stderr";
228
- }>;
229
- byteLength: z.ZodNumber;
230
- }, z.core.$strip>>>;
231
606
  }, z.core.$strip>], "kind">;
232
607
  export type LLMProvider_ExecutionTransportMetadata = z.infer<typeof LLMProvider_ExecutionTransportMetadataSchema>;
608
+ /**
609
+ * Why a `GENERATE_STRUCTURED` call returned `{ object: undefined }` even though a
610
+ * physical provider call completed.
611
+ *
612
+ * The two members are the two distinct code paths that can produce a missing object,
613
+ * and they are NOT interchangeable — they differ in whether the call is billable and
614
+ * in whether the provider told us anything about the shape of the failure:
615
+ *
616
+ * - `INVALID_OBJECT_AFTER_COMPLETED_CALL` — the provider answered, its usage is real
617
+ * and metered, and the SDK rejected what came back: schema validation failed, the
618
+ * JSON was unparseable, or the completion was truncated. This is the member that
619
+ * carries `validationIssues` (the exact schema paths the model omitted) and
620
+ * `finishReason`.
621
+ * - `NO_OBJECT_GENERATED` — the SDK raised `AI_NoObjectGeneratedError` without a
622
+ * usage-bearing payload, so no shape metadata was recovered. Distinguished from the
623
+ * above precisely because a caller must NOT read the absence of `validationIssues`
624
+ * here as "the schema was satisfied".
625
+ * - `RESOLVED_WITHOUT_OBJECT` — the SDK call RESOLVED, raising nothing at all, and the
626
+ * object was still absent. Off-contract for the AI SDK, whose `generateObject` declares
627
+ * a non-optional `object` and signals absence by throwing; it is a member because the
628
+ * engine does not validate that contract, so without it this vocabulary would have a
629
+ * hole exactly where the invariant below is least defensible. A caller seeing this is
630
+ * looking at an SDK or provider-adapter defect, not at a model that answered badly.
631
+ *
632
+ * Deliberately NOT a member: a provider transport failure. Those still THROW a typed
633
+ * backend error rather than returning `{ object: undefined }`, and folding them in
634
+ * here would let a caller treat a network fault as a model-output problem.
635
+ *
636
+ * The invariant these three members exist to uphold: **every path that hands a caller
637
+ * `{ object: undefined }` attaches one of them.** That is what lets the field's absence
638
+ * mean "not a structured-output failure" rather than "no reason was recorded" — and it is
639
+ * why the third member was added rather than the third path left unattached.
640
+ */
641
+ export declare enum LLMProvider_StructuredGenerationFailureKind {
642
+ INVALID_OBJECT_AFTER_COMPLETED_CALL = "invalid-object-after-completed-call",
643
+ NO_OBJECT_GENERATED = "no-object-generated",
644
+ RESOLVED_WITHOUT_OBJECT = "resolved-without-object"
645
+ }
646
+ /**
647
+ * One structural validation issue recovered from the SDK/Zod cause chain.
648
+ *
649
+ * `code` + `path` ONLY, never the issue's `message`: a provider validation error
650
+ * retains the rejected value in its message, so carrying it would copy private model
651
+ * output into any log, trace or persisted failure record that receives this reason.
652
+ * The path is what a caller actually needs — it names the field the model omitted.
653
+ */
654
+ export declare const LLMProvider_StructuredValidationIssueSchema: z.ZodObject<{
655
+ code: z.ZodString;
656
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
657
+ }, z.core.$strip>;
658
+ export type LLMProvider_StructuredValidationIssue = z.infer<typeof LLMProvider_StructuredValidationIssueSchema>;
659
+ /**
660
+ * The reason a structured generation produced no object, carried back to the CALLER.
661
+ *
662
+ * ## Why this exists
663
+ *
664
+ * `GENERATE_STRUCTURED` logs a rich failure line (error name, message, validation
665
+ * cause, the exact schema paths that failed, finish reason, generated-text length)
666
+ * and then used to return `{ object: undefined }` with nothing attached. Every caller
667
+ * therefore knew only "no object" and had to invent a generic message, so the only way
668
+ * to learn WHY a unit failed was to grep the process's own log file for the preceding
669
+ * line — which is not available to the operator reading a CLI summary, a persisted
670
+ * failure record, or a retry classifier.
671
+ *
672
+ * ## Where it is delivered
673
+ *
674
+ * On {@link LLMProvider_OperationContext_BaseSchema}, i.e. the invocation's
675
+ * `executionContext` — the same envelope that already carries `usage`, `finishReason`
676
+ * and `transport`. It is OPTIONAL and present only on a failed structured generation,
677
+ * so no existing caller is affected; a caller that wants the reason reads
678
+ * `executionContext.structuredGenerationFailure` exactly as it already reads
679
+ * `executionContext.usage`.
680
+ *
681
+ * Because the whole envelope is what the agent-call trace sink receives as its
682
+ * `context`, the reason reaches traceability for free.
683
+ *
684
+ * ## Privacy
685
+ *
686
+ * Contains NO generated text. `generatedTextLength` is a length, not a sample; it
687
+ * distinguishes a truncation from an empty completion without disclosing content.
688
+ */
689
+ export declare const LLMProvider_StructuredGenerationFailureSchema: z.ZodObject<{
690
+ kind: z.ZodEnum<typeof LLMProvider_StructuredGenerationFailureKind>;
691
+ message: z.ZodString;
692
+ errorName: z.ZodOptional<z.ZodString>;
693
+ validationCauseName: z.ZodOptional<z.ZodString>;
694
+ validationIssues: z.ZodOptional<z.ZodArray<z.ZodObject<{
695
+ code: z.ZodString;
696
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
697
+ }, z.core.$strip>>>;
698
+ finishReason: z.ZodOptional<z.ZodString>;
699
+ generatedTextLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
700
+ rootKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
701
+ }, z.core.$strip>;
702
+ export type LLMProvider_StructuredGenerationFailure = z.infer<typeof LLMProvider_StructuredGenerationFailureSchema>;
703
+ /**
704
+ * Read the structured-generation failure reason off an invocation's `executionContext`.
705
+ *
706
+ * THE supported way to reach it. Provided as a function rather than left to each caller
707
+ * because the alternative is the cast every `usage` reader already hand-rolls
708
+ * (`response.executionContext as { usage?: … }`) — N copies of one shape, each free to
709
+ * drift from the schema, none of them validated. Here the schema IS the reader.
710
+ *
711
+ * Returns `undefined` both when the generation succeeded and when the context predates
712
+ * this field, so a caller never has to distinguish "no failure" from "no reason
713
+ * recorded" — in either case there is nothing more specific to report than the absence
714
+ * of an object.
715
+ */
716
+ /**
717
+ * Render a structured-generation failure as one operator-readable line.
718
+ *
719
+ * Lives here, beside the schema, rather than in each caller: the two labelling
720
+ * orchestrators alone would otherwise have hand-rolled the same rendering twice, and the
721
+ * value of `validationIssues` is entirely in how it is presented — a caller that quietly
722
+ * drops it reports "no object" with extra words. Keeping one renderer means a site that
723
+ * reports the reason at all reports the whole reason.
724
+ *
725
+ * Carries no generated text, only its length — see
726
+ * {@link LLMProvider_StructuredGenerationFailureSchema}.
727
+ */
728
+ export declare function describeStructuredGenerationFailure(failure: LLMProvider_StructuredGenerationFailure): string;
729
+ export declare function readStructuredGenerationFailure(executionContext: unknown): LLMProvider_StructuredGenerationFailure | undefined;
233
730
  export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
234
731
  callTimestamp: z.ZodISODateTime;
235
732
  callDuration: z.ZodOptional<z.ZodNumber>;
@@ -239,6 +736,12 @@ export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
239
736
  promptTokens: z.ZodOptional<z.ZodNumber>;
240
737
  completionTokens: z.ZodOptional<z.ZodNumber>;
241
738
  totalTokens: z.ZodOptional<z.ZodNumber>;
739
+ tokenUsageComplete: z.ZodOptional<z.ZodBoolean>;
740
+ inputTokenDetails: z.ZodOptional<z.ZodObject<{
741
+ noCacheTokens: z.ZodOptional<z.ZodNumber>;
742
+ cacheReadTokens: z.ZodOptional<z.ZodNumber>;
743
+ cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
744
+ }, z.core.$strip>>;
242
745
  }, z.core.$strip>>;
243
746
  outputTracking: z.ZodOptional<z.ZodObject<{
244
747
  toolsUsed: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -281,31 +784,24 @@ export declare const LLMProvider_OperationContext_BaseSchema: z.ZodObject<{
281
784
  executionTime: z.ZodOptional<z.ZodNumber>;
282
785
  finishedAt: z.ZodOptional<z.ZodString>;
283
786
  transport: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
284
- kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind.API>;
787
+ kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind>;
285
788
  protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER>;
286
789
  providerRef: z.ZodString;
287
790
  model: z.ZodOptional<z.ZodString>;
288
- }, z.core.$strip>, z.ZodObject<{
289
- kind: z.ZodLiteral<LLMProvider_ExecutionTransportKind.CLI>;
290
- protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.CLI_RUNTIME>;
291
- providerRef: z.ZodString;
292
- model: z.ZodOptional<z.ZodString>;
293
- resolvedModel: z.ZodOptional<z.ZodString>;
294
- executionProfileRef: z.ZodString;
295
- runnerHost: z.ZodEnum<typeof CLIRuntime_RunnerHost>;
296
- outputParserMode: z.ZodEnum<typeof CLIRuntime_OutputParserMode>;
297
- command: z.ZodString;
298
- workingDirectory: z.ZodString;
299
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
300
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
- artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
302
- kind: z.ZodEnum<{
303
- stdout: "stdout";
304
- stderr: "stderr";
305
- }>;
306
- byteLength: z.ZodNumber;
307
- }, z.core.$strip>>>;
308
791
  }, z.core.$strip>], "kind">>;
792
+ structuredGenerationFailure: z.ZodOptional<z.ZodObject<{
793
+ kind: z.ZodEnum<typeof LLMProvider_StructuredGenerationFailureKind>;
794
+ message: z.ZodString;
795
+ errorName: z.ZodOptional<z.ZodString>;
796
+ validationCauseName: z.ZodOptional<z.ZodString>;
797
+ validationIssues: z.ZodOptional<z.ZodArray<z.ZodObject<{
798
+ code: z.ZodString;
799
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
800
+ }, z.core.$strip>>>;
801
+ finishReason: z.ZodOptional<z.ZodString>;
802
+ generatedTextLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
803
+ rootKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
804
+ }, z.core.$strip>>;
309
805
  }, z.core.$strip>;
310
806
  export type LLMProvider_OperationContext_Base = z.infer<typeof LLMProvider_OperationContext_BaseSchema>;
311
807
  export type LLMProvider_OperationDefinitionBase = ExternalProvider_OperationDefinition_Base & {
@@ -432,6 +928,10 @@ export type LLMProvider_StreamTextOutput = z.infer<typeof LLMProvider_StreamText
432
928
  export declare const LLMProvider_GenerateStructuredInputSchema: z.ZodObject<{
433
929
  prompt: z.ZodString;
434
930
  schema: z.ZodCustom<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
931
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
932
+ type: z.ZodLiteral<"image">;
933
+ image: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
934
+ }, z.core.$strip>>>;
435
935
  }, z.core.$strip>;
436
936
  export declare const LLMProvider_GenerateStructuredOutputSchema: z.ZodObject<{
437
937
  object: z.ZodUnknown;
@@ -490,7 +990,7 @@ export declare const LLMProvider_StreamStructuredOutputSchema: z.ZodObject<{
490
990
  export type LLMProvider_StreamStructuredInput = z.infer<typeof LLMProvider_StreamStructuredInputSchema>;
491
991
  export type LLMProvider_StreamStructuredOutput = z.infer<typeof LLMProvider_StreamStructuredOutputSchema>;
492
992
  export declare const LLMProvider_StatusSchema: z.ZodObject<{
493
- status: z.ZodEnum<typeof import("../index.js").ExternalProvider_Status>;
993
+ status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
494
994
  lastCheckedAt: z.ZodString;
495
995
  errorReason: z.ZodOptional<z.ZodString>;
496
996
  protocolKind: z.ZodLiteral<ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER>;