@wildo-ai/external-connectors-models 1.1.9 → 1.1.11

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 (59) hide show
  1. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +130 -0
  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 +193 -0
  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 +2 -0
  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 +10 -4
  8. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  9. package/dist/esm/index.d.ts +2 -0
  10. package/dist/esm/index.d.ts.map +1 -1
  11. package/dist/esm/index.js +2 -0
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +1 -0
  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 +10 -1
  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 +8 -0
  18. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  19. package/dist/esm/protocols/billing.standard-interface.schemas.js +8 -0
  20. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  21. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts +150 -0
  22. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts.map +1 -0
  23. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js +182 -0
  24. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js.map +1 -0
  25. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +41 -9
  26. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
  27. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +40 -14
  28. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
  29. package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
  30. package/dist/esm/protocols/email.standard-interface.schemas.js +4 -0
  31. package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
  32. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +37 -4
  33. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
  34. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +57 -1
  35. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
  36. package/dist/esm/protocols/file-storage.standard-interface.d.ts +6 -0
  37. package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -1
  38. package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -1
  39. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts +7 -2
  40. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
  41. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
  42. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +388 -7
  43. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  44. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +238 -0
  45. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  46. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +70 -5
  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 +96 -5
  49. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  50. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +446 -5
  51. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
  52. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +406 -0
  53. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
  54. package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts +133 -0
  55. package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts.map +1 -0
  56. package/dist/esm/protocols/subject-erasure-effect.standard-interface.js +61 -0
  57. package/dist/esm/protocols/subject-erasure-effect.standard-interface.js.map +1 -0
  58. package/dist/tsconfig.build.tsbuildinfo +1 -1
  59. package/package.json +2 -2
@@ -65,6 +65,15 @@ export declare enum ExternalProvider_ExchangeProtocol_Kind {
65
65
  * provider capability token could ever fill it.
66
66
  */
67
67
  DOCUMENT_EXTRACTION_PROVIDER = "document_extraction_provider",
68
+ /**
69
+ * Text → a classifier's verdict about it (#2292): first, whether third-party content entering an agent's prompt
70
+ * carries a prompt-injection attack. Serves an agent's declared content guardrails.
71
+ *
72
+ * Its own kind for the reason `EMBEDDINGS_PROVIDER` records above, and it fills its own
73
+ * `EngineCapability.AI_CONTENT_SAFETY` slot so an application chooses the vendor that screens its model's input
74
+ * independently of the vendor that answers it.
75
+ */
76
+ CONTENT_SAFETY_PROVIDER = "content_safety_provider",
68
77
  /** Reserved — audio generation (TTS / music). Serves the AUDIO modality. Not yet implemented. */
69
78
  AUDIO_PROVIDER = "audio_provider",
70
79
  /** Reserved — video generation. Serves the VIDEO modality. Not yet implemented. */
@@ -102,6 +111,7 @@ export declare const ProviderProtocolRuntimeKind: Readonly<{
102
111
  readonly IMAGE: ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER;
103
112
  readonly EMBEDDINGS: ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER;
104
113
  readonly DOCUMENT_EXTRACTION: ExternalProvider_ExchangeProtocol_Kind.DOCUMENT_EXTRACTION_PROVIDER;
114
+ readonly CONTENT_SAFETY: ExternalProvider_ExchangeProtocol_Kind.CONTENT_SAFETY_PROVIDER;
105
115
  readonly AGENT_CLIENT_PROTOCOL: ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL;
106
116
  readonly EMAIL: ExternalProvider_ExchangeProtocol_Kind.EMAIL_PROVIDER;
107
117
  readonly EMAIL_INBOUND: ExternalProvider_ExchangeProtocol_Kind.EMAIL_INBOUND_PROVIDER;
@@ -160,6 +170,111 @@ export declare const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema:
160
170
  }, z.core.$strip>>;
161
171
  }, z.core.$strip>;
162
172
  export type ExternalProvider_ExchangeProtocol_Configuration_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Configuration_BaseSchema>;
173
+ /**
174
+ * The keys of a `providerConfigurations.<providerRef>.<protocol>` bag that belong to the PROVIDER MODULE, never to the
175
+ * application (#2995). Each is projected by the backend registry from the module's own runtime contract, and each
176
+ * decides where a request goes and how its credential travels:
177
+ *
178
+ * - `runtimeContract` — the contract itself: the base URL or host slot, the API-key header, the operations.
179
+ * - `endpoints` — the webhook endpoints a `WEBHOOK_ORIGINATOR` contract declares (route keys, signature handling).
180
+ *
181
+ * An application cannot author either. The registry used to deep-merge an authored `runtimeContract` over the module's,
182
+ * so one configuration line (`runtimeContract: { baseUrl: 'http://anywhere' }`) sent the provider's key to any URL, over
183
+ * plain http, in any environment, around the host-held slot and its bare-DNS rule (#992 F3). The comments said the module
184
+ * owned the contract; nothing held it. Now three schemas refuse these keys when the configuration is parsed
185
+ * (`defineSaaSConfig`, the per-environment overlay, the backend's application configuration), and the registry refuses
186
+ * them again before it merges, so a configuration hydrated from anywhere else is refused too.
187
+ *
188
+ * The way to point a provider at a local double is the environment-gated loopback host of a host-held slot (#2991),
189
+ * which a deployment outside development and test refuses.
190
+ *
191
+ * Import path: `@wildo-ai/external-connectors-models`.
192
+ */
193
+ export declare enum ExternalProvider_ModuleOwnedConfigurationKey {
194
+ RUNTIME_CONTRACT = "runtimeContract",
195
+ ENDPOINTS = "endpoints"
196
+ }
197
+ /** One authored key a provider module owns: where it was written, so the refusal can name it. */
198
+ export interface ExternalProvider_ModuleOwnedConfigurationKeyFinding {
199
+ readonly providerRef: string;
200
+ /** The second-level key of the bag: a protocol kind, or a key the module reads itself (`registration`). */
201
+ readonly protocolKey: string;
202
+ readonly key: ExternalProvider_ModuleOwnedConfigurationKey;
203
+ }
204
+ /**
205
+ * Every module-owned key written anywhere in a `providerConfigurations` value. Total over the
206
+ * {@link ExternalProvider_ModuleOwnedConfigurationKey} vocabulary, and over every bag, a protocol bag or not: no bag can
207
+ * legitimately carry these names, and a bag the registry does not merge today is one a later reader might.
208
+ * Anything that is not a record of records (a malformed value) yields nothing here; the schema reports that itself.
209
+ */
210
+ export declare function findModuleOwnedProviderConfigurationKeys(providerConfigurations: unknown): ExternalProvider_ModuleOwnedConfigurationKeyFinding[];
211
+ /** The one sentence every door refuses a module-owned key with, so an operator greps one wording. */
212
+ export declare function describeModuleOwnedProviderConfigurationKey(finding: ExternalProvider_ModuleOwnedConfigurationKeyFinding): string;
213
+ /**
214
+ * Report every module-owned key as an issue on `ctx`, at its path. The refinement each `providerConfigurations` schema
215
+ * applies, so the three refuse the same keys with the same words.
216
+ *
217
+ * assurance-control: WILDO.SECRETS.CREDENTIAL_SCOPING — a configuration cannot author where a provider's credential is sent (#2995).
218
+ */
219
+ export declare function refuseModuleOwnedProviderConfigurationKeys(providerConfigurations: unknown, ctx: z.RefinementCtx): void;
220
+ /**
221
+ * The fields of a `providerConfigurations.<providerRef>.<protocol>` bag that NAME a credential (#3022). Each decides
222
+ * which secret a vendor or a coding agent receives, so each is held to a rule that leaves that choice to the provider
223
+ * module and the framework rather than to the configuration:
224
+ *
225
+ * | field | the rule | closed by |
226
+ * |---|---|---|
227
+ * | `authConfig.secretRef` | names only a slot the module's `secretsContract` declares, by its variable or its slug | #3002 |
228
+ * | an execution profile's `secretEnvVarName` | names only a variable the module declares (never a slug: it is the variable the agent reads) | #3002 |
229
+ * | an execution profile's `inheritedEnvironmentVariables` | names anything EXCEPT a secret the framework declares | #3018 |
230
+ *
231
+ * The vocabulary is the one named source for the doors that check these fields: the backend registry, on every read and
232
+ * in its startup walk, and the CLI's environment door. Each reads the fields through
233
+ * {@link readProviderConfigurationCredentialFields} and branches on the member, so a field added here gets a reader (a
234
+ * compile error until it does) and then reaches every door's exhaustive switch, where it is a compile error again until
235
+ * the door decides its rule. Before this vocabulary the three fields were string paths written out at each door.
236
+ *
237
+ * Where the credential then GOES is the other half of the property, and it is not a configuration field at all: the
238
+ * module owns its destination ({@link ExternalProvider_ModuleOwnedConfigurationKey}, #2995).
239
+ *
240
+ * Import path: `@wildo-ai/external-connectors-models`.
241
+ */
242
+ export declare enum ProviderConfigurationCredentialField {
243
+ /** `authConfig.secretRef`: the slot a protocol's key or client secret is read from, and sent to the vendor. */
244
+ AUTH_SECRET_REF = "auth_secret_ref",
245
+ /**
246
+ * `executionProfiles.<profile>.secretEnvVarName`, on the agent-client-protocol bag only: the one variable read from the
247
+ * spawning process and set in the coding agent's environment.
248
+ */
249
+ EXECUTION_PROFILE_SECRET_ENV_VAR_NAME = "execution_profile_secret_env_var_name",
250
+ /**
251
+ * `executionProfiles.<profile>.inheritedEnvironmentVariables`, on the agent-client-protocol bag only: the host's own
252
+ * variables (the agent's login, its tool paths) copied into the coding agent's environment.
253
+ */
254
+ EXECUTION_PROFILE_INHERITED_ENVIRONMENT = "execution_profile_inherited_environment"
255
+ }
256
+ /** One credential-naming field as authored, unchecked: the door that reads it decides whether it is admitted. */
257
+ export interface ProviderConfigurationCredentialFieldReading {
258
+ readonly field: ProviderConfigurationCredentialField;
259
+ /** Where it sits inside the protocol bag (`authConfig.secretRef`, `executionProfiles.mine.secretEnvVarName`), for a refusal to name. */
260
+ readonly path: string;
261
+ /** The execution profile it was read from, for the two profile fields. */
262
+ readonly executionProfileRef?: string;
263
+ /** The authored value. Never `undefined`: a field that is not written yields no reading. */
264
+ readonly value: unknown;
265
+ }
266
+ /**
267
+ * Whether a protocol key of a `providerConfigurations.<providerRef>` value holds the agent-client-protocol bag: the
268
+ * protocol's wire value, or its member name. The backend reads the configuration under the wire value only, but a
269
+ * credential-naming field is checked under either key, so a bag authored under the member name is refused by every door
270
+ * rather than by the CLI alone.
271
+ */
272
+ export declare function isAgentClientProtocolConfigurationKey(protocolKey: string): boolean;
273
+ /**
274
+ * Every credential-naming field written in one protocol bag of a provider configuration, in vocabulary order. Total over
275
+ * {@link ProviderConfigurationCredentialField}. A bag that is not a record yields nothing; its schema reports that itself.
276
+ */
277
+ export declare function readProviderConfigurationCredentialFields(protocolKey: string, bag: unknown): ProviderConfigurationCredentialFieldReading[];
163
278
  export declare enum ExternalProvider_IO_Direction {
164
279
  INBOUND = "inbound",
165
280
  OUTBOUND = "outbound",
@@ -170,4 +285,19 @@ export declare enum ExternalProvider_IO_InteractionPattern {
170
285
  EVENT_BASED = "event_based",
171
286
  STREAMING = "stream"
172
287
  }
288
+ /**
289
+ * An address a vendor registration asks a person to TYPE at the vendor, as opposed to one the registration file already
290
+ * carries (#2713). A provider module's `vendorRegistration` names each one it needs beside its steps, so a screen can
291
+ * show it as a value to copy, labelled from its own words, rather than leave it inside a sentence.
292
+ *
293
+ * Add a member when a provider's registration names another such address. A Slack app's request URLs are not one: the
294
+ * manifest file carries them, and nobody types them.
295
+ */
296
+ export declare enum ProviderVendorRegistrationAddressKind {
297
+ /**
298
+ * Where the vendor delivers a bot's messages: the Azure Bot's "Messaging endpoint", the route the engine mounts for the
299
+ * provider's inbound endpoint. Every bot of one application, its own or an organization's, is registered with the same one.
300
+ */
301
+ MESSAGING_ENDPOINT = "messaging_endpoint"
302
+ }
173
303
  //# sourceMappingURL=commons.external-connectors-models.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commons.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/commons.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,SAAS,WAAW;CACrB"}
1
+ {"version":3,"file":"commons.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/commons.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,sCAAsC;IAEhD,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IAIzC,YAAY,iBAAiB;IAC7B;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,0BAA0B;IAE/C,8EAA8E;IAC9E,cAAc,mBAAmB;IACjC;;;;;;;;;;OAUG;IACH,mBAAmB,wBAAwB;IAC3C;;;;;;;;;;;;;OAaG;IACH,4BAA4B,iCAAiC;IAC7D;;;;;;;OAOG;IACH,uBAAuB,4BAA4B;IACnD,iGAAiG;IACjG,cAAc,mBAAmB;IACjC,mFAAmF;IACnF,cAAc,mBAAmB;IAGjC,cAAc,mBAAmB;IACjC;;;;;;;OAOG;IACH,sBAAsB,2BAA2B;IAGjD,UAAU,eAAe;IAIzB,gBAAgB,qBAAqB;IAGrC,YAAY,iBAAiB;IAG7B,YAAY,iBAAiB;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;EAc7B,CAAC;AACZ,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,oBAAY,uBAAuB;IACjC,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAGD,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO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AAM,GAAG,OAAO,CAElF;AAuCD;;;GAGG;AACH,wBAAgB,yCAAyC,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,2CAA2C,EAAE,CAG1I;AAWD,oBAAY,6BAA6B;IACvC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAChC;AAED,oBAAY,sCAAsC;IAChD,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,SAAS,WAAW;CACrB;AAGD;;;;;;;GAOG;AACH,oBAAY,qCAAqC;IAC/C;;;OAGG;IACH,kBAAkB,uBAAuB;CAC1C"}
@@ -71,6 +71,15 @@ export var ExternalProvider_ExchangeProtocol_Kind;
71
71
  * provider capability token could ever fill it.
72
72
  */
73
73
  ExternalProvider_ExchangeProtocol_Kind["DOCUMENT_EXTRACTION_PROVIDER"] = "document_extraction_provider";
74
+ /**
75
+ * Text → a classifier's verdict about it (#2292): first, whether third-party content entering an agent's prompt
76
+ * carries a prompt-injection attack. Serves an agent's declared content guardrails.
77
+ *
78
+ * Its own kind for the reason `EMBEDDINGS_PROVIDER` records above, and it fills its own
79
+ * `EngineCapability.AI_CONTENT_SAFETY` slot so an application chooses the vendor that screens its model's input
80
+ * independently of the vendor that answers it.
81
+ */
82
+ ExternalProvider_ExchangeProtocol_Kind["CONTENT_SAFETY_PROVIDER"] = "content_safety_provider";
74
83
  /** Reserved — audio generation (TTS / music). Serves the AUDIO modality. Not yet implemented. */
75
84
  ExternalProvider_ExchangeProtocol_Kind["AUDIO_PROVIDER"] = "audio_provider";
76
85
  /** Reserved — video generation. Serves the VIDEO modality. Not yet implemented. */
@@ -114,6 +123,7 @@ export const ProviderProtocolRuntimeKind = Object.freeze({
114
123
  IMAGE: ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER,
115
124
  EMBEDDINGS: ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER,
116
125
  DOCUMENT_EXTRACTION: ExternalProvider_ExchangeProtocol_Kind.DOCUMENT_EXTRACTION_PROVIDER,
126
+ CONTENT_SAFETY: ExternalProvider_ExchangeProtocol_Kind.CONTENT_SAFETY_PROVIDER,
117
127
  AGENT_CLIENT_PROTOCOL: ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL,
118
128
  EMAIL: ExternalProvider_ExchangeProtocol_Kind.EMAIL_PROVIDER,
119
129
  EMAIL_INBOUND: ExternalProvider_ExchangeProtocol_Kind.EMAIL_INBOUND_PROVIDER,
@@ -160,6 +170,173 @@ export const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema = z.obje
160
170
  authConfig: ExternalProvider_Auth_ConfigurationSchema.optional(),
161
171
  rateLimitConfig: ExternalProvider_RateLimitConfigurationSchema.optional(),
162
172
  });
173
+ /**
174
+ * The keys of a `providerConfigurations.<providerRef>.<protocol>` bag that belong to the PROVIDER MODULE, never to the
175
+ * application (#2995). Each is projected by the backend registry from the module's own runtime contract, and each
176
+ * decides where a request goes and how its credential travels:
177
+ *
178
+ * - `runtimeContract` — the contract itself: the base URL or host slot, the API-key header, the operations.
179
+ * - `endpoints` — the webhook endpoints a `WEBHOOK_ORIGINATOR` contract declares (route keys, signature handling).
180
+ *
181
+ * An application cannot author either. The registry used to deep-merge an authored `runtimeContract` over the module's,
182
+ * so one configuration line (`runtimeContract: { baseUrl: 'http://anywhere' }`) sent the provider's key to any URL, over
183
+ * plain http, in any environment, around the host-held slot and its bare-DNS rule (#992 F3). The comments said the module
184
+ * owned the contract; nothing held it. Now three schemas refuse these keys when the configuration is parsed
185
+ * (`defineSaaSConfig`, the per-environment overlay, the backend's application configuration), and the registry refuses
186
+ * them again before it merges, so a configuration hydrated from anywhere else is refused too.
187
+ *
188
+ * The way to point a provider at a local double is the environment-gated loopback host of a host-held slot (#2991),
189
+ * which a deployment outside development and test refuses.
190
+ *
191
+ * Import path: `@wildo-ai/external-connectors-models`.
192
+ */
193
+ export var ExternalProvider_ModuleOwnedConfigurationKey;
194
+ (function (ExternalProvider_ModuleOwnedConfigurationKey) {
195
+ ExternalProvider_ModuleOwnedConfigurationKey["RUNTIME_CONTRACT"] = "runtimeContract";
196
+ ExternalProvider_ModuleOwnedConfigurationKey["ENDPOINTS"] = "endpoints";
197
+ })(ExternalProvider_ModuleOwnedConfigurationKey || (ExternalProvider_ModuleOwnedConfigurationKey = {}));
198
+ const MODULE_OWNED_CONFIGURATION_KEYS = Object.values(ExternalProvider_ModuleOwnedConfigurationKey);
199
+ /**
200
+ * Every module-owned key written anywhere in a `providerConfigurations` value. Total over the
201
+ * {@link ExternalProvider_ModuleOwnedConfigurationKey} vocabulary, and over every bag, a protocol bag or not: no bag can
202
+ * legitimately carry these names, and a bag the registry does not merge today is one a later reader might.
203
+ * Anything that is not a record of records (a malformed value) yields nothing here; the schema reports that itself.
204
+ */
205
+ export function findModuleOwnedProviderConfigurationKeys(providerConfigurations) {
206
+ const findings = [];
207
+ if (!isPlainRecord(providerConfigurations))
208
+ return findings;
209
+ for (const [providerRef, protocols] of Object.entries(providerConfigurations)) {
210
+ if (!isPlainRecord(protocols))
211
+ continue;
212
+ for (const [protocolKey, bag] of Object.entries(protocols)) {
213
+ if (!isPlainRecord(bag))
214
+ continue;
215
+ for (const key of MODULE_OWNED_CONFIGURATION_KEYS) {
216
+ if (Object.prototype.hasOwnProperty.call(bag, key))
217
+ findings.push({ providerRef, protocolKey, key });
218
+ }
219
+ }
220
+ }
221
+ return findings;
222
+ }
223
+ /** The one sentence every door refuses a module-owned key with, so an operator greps one wording. */
224
+ export function describeModuleOwnedProviderConfigurationKey(finding) {
225
+ return `providerConfigurations.${finding.providerRef}.${finding.protocolKey}.${finding.key} is refused: the provider module owns `
226
+ + `'${finding.key}' (where its requests go and how its credential travels), and a configuration cannot rewrite it. Remove the key. `
227
+ + 'To reach a local double of the vendor, set the provider\'s host slot to a loopback host:port in a development or test environment.';
228
+ }
229
+ /**
230
+ * Report every module-owned key as an issue on `ctx`, at its path. The refinement each `providerConfigurations` schema
231
+ * applies, so the three refuse the same keys with the same words.
232
+ *
233
+ * assurance-control: WILDO.SECRETS.CREDENTIAL_SCOPING — a configuration cannot author where a provider's credential is sent (#2995).
234
+ */
235
+ export function refuseModuleOwnedProviderConfigurationKeys(providerConfigurations, ctx) {
236
+ for (const finding of findModuleOwnedProviderConfigurationKeys(providerConfigurations)) {
237
+ ctx.addIssue({
238
+ code: "custom",
239
+ path: [finding.providerRef, finding.protocolKey, finding.key],
240
+ message: describeModuleOwnedProviderConfigurationKey(finding),
241
+ });
242
+ }
243
+ }
244
+ /**
245
+ * The fields of a `providerConfigurations.<providerRef>.<protocol>` bag that NAME a credential (#3022). Each decides
246
+ * which secret a vendor or a coding agent receives, so each is held to a rule that leaves that choice to the provider
247
+ * module and the framework rather than to the configuration:
248
+ *
249
+ * | field | the rule | closed by |
250
+ * |---|---|---|
251
+ * | `authConfig.secretRef` | names only a slot the module's `secretsContract` declares, by its variable or its slug | #3002 |
252
+ * | an execution profile's `secretEnvVarName` | names only a variable the module declares (never a slug: it is the variable the agent reads) | #3002 |
253
+ * | an execution profile's `inheritedEnvironmentVariables` | names anything EXCEPT a secret the framework declares | #3018 |
254
+ *
255
+ * The vocabulary is the one named source for the doors that check these fields: the backend registry, on every read and
256
+ * in its startup walk, and the CLI's environment door. Each reads the fields through
257
+ * {@link readProviderConfigurationCredentialFields} and branches on the member, so a field added here gets a reader (a
258
+ * compile error until it does) and then reaches every door's exhaustive switch, where it is a compile error again until
259
+ * the door decides its rule. Before this vocabulary the three fields were string paths written out at each door.
260
+ *
261
+ * Where the credential then GOES is the other half of the property, and it is not a configuration field at all: the
262
+ * module owns its destination ({@link ExternalProvider_ModuleOwnedConfigurationKey}, #2995).
263
+ *
264
+ * Import path: `@wildo-ai/external-connectors-models`.
265
+ */
266
+ export var ProviderConfigurationCredentialField;
267
+ (function (ProviderConfigurationCredentialField) {
268
+ /** `authConfig.secretRef`: the slot a protocol's key or client secret is read from, and sent to the vendor. */
269
+ ProviderConfigurationCredentialField["AUTH_SECRET_REF"] = "auth_secret_ref";
270
+ /**
271
+ * `executionProfiles.<profile>.secretEnvVarName`, on the agent-client-protocol bag only: the one variable read from the
272
+ * spawning process and set in the coding agent's environment.
273
+ */
274
+ ProviderConfigurationCredentialField["EXECUTION_PROFILE_SECRET_ENV_VAR_NAME"] = "execution_profile_secret_env_var_name";
275
+ /**
276
+ * `executionProfiles.<profile>.inheritedEnvironmentVariables`, on the agent-client-protocol bag only: the host's own
277
+ * variables (the agent's login, its tool paths) copied into the coding agent's environment.
278
+ */
279
+ ProviderConfigurationCredentialField["EXECUTION_PROFILE_INHERITED_ENVIRONMENT"] = "execution_profile_inherited_environment";
280
+ })(ProviderConfigurationCredentialField || (ProviderConfigurationCredentialField = {}));
281
+ const AGENT_CLIENT_PROTOCOL_MEMBER_NAME = Object.keys(ExternalProvider_ExchangeProtocol_Kind)
282
+ .find((member) => ExternalProvider_ExchangeProtocol_Kind[member] === ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL);
283
+ /**
284
+ * Whether a protocol key of a `providerConfigurations.<providerRef>` value holds the agent-client-protocol bag: the
285
+ * protocol's wire value, or its member name. The backend reads the configuration under the wire value only, but a
286
+ * credential-naming field is checked under either key, so a bag authored under the member name is refused by every door
287
+ * rather than by the CLI alone.
288
+ */
289
+ export function isAgentClientProtocolConfigurationKey(protocolKey) {
290
+ return protocolKey === ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL || protocolKey === AGENT_CLIENT_PROTOCOL_MEMBER_NAME;
291
+ }
292
+ /**
293
+ * The authored execution profiles of an agent-client-protocol bag; nothing for any other bag.
294
+ *
295
+ * Read from ANY object, an array included, and each profile that is any object, never only from plain records: the doors
296
+ * iterated `Object.entries` before this vocabulary, and the registry's merge turns an array into `{ '0': profile }`, which
297
+ * an agent or a default profile can select. Reading plain records only would leave such a profile's `secretEnvVarName`
298
+ * unchecked while dispatch still injects it (#3022 review F1). What is not an object carries no field to read.
299
+ */
300
+ function authoredExecutionProfiles(protocolKey, bag) {
301
+ if (!isAgentClientProtocolConfigurationKey(protocolKey) || !isObject(bag.executionProfiles))
302
+ return [];
303
+ return Object.entries(bag.executionProfiles).filter((entry) => isObject(entry[1]));
304
+ }
305
+ /** One reader per field, so a member added to the vocabulary without one is a compile error. */
306
+ const PROVIDER_CONFIGURATION_CREDENTIAL_FIELD_READERS = {
307
+ [ProviderConfigurationCredentialField.AUTH_SECRET_REF]: (_protocolKey, bag) => {
308
+ const value = isObject(bag.authConfig) ? bag.authConfig.secretRef : undefined;
309
+ return value === undefined ? [] : [{ field: ProviderConfigurationCredentialField.AUTH_SECRET_REF, path: "authConfig.secretRef", value }];
310
+ },
311
+ [ProviderConfigurationCredentialField.EXECUTION_PROFILE_SECRET_ENV_VAR_NAME]: (protocolKey, bag) => authoredExecutionProfiles(protocolKey, bag).flatMap(([executionProfileRef, profile]) => profile.secretEnvVarName === undefined ? [] : [{
312
+ field: ProviderConfigurationCredentialField.EXECUTION_PROFILE_SECRET_ENV_VAR_NAME,
313
+ path: `executionProfiles.${executionProfileRef}.secretEnvVarName`,
314
+ executionProfileRef,
315
+ value: profile.secretEnvVarName,
316
+ }]),
317
+ [ProviderConfigurationCredentialField.EXECUTION_PROFILE_INHERITED_ENVIRONMENT]: (protocolKey, bag) => authoredExecutionProfiles(protocolKey, bag).flatMap(([executionProfileRef, profile]) => profile.inheritedEnvironmentVariables === undefined ? [] : [{
318
+ field: ProviderConfigurationCredentialField.EXECUTION_PROFILE_INHERITED_ENVIRONMENT,
319
+ path: `executionProfiles.${executionProfileRef}.inheritedEnvironmentVariables`,
320
+ executionProfileRef,
321
+ value: profile.inheritedEnvironmentVariables,
322
+ }]),
323
+ };
324
+ /**
325
+ * Every credential-naming field written in one protocol bag of a provider configuration, in vocabulary order. Total over
326
+ * {@link ProviderConfigurationCredentialField}. A bag that is not a record yields nothing; its schema reports that itself.
327
+ */
328
+ export function readProviderConfigurationCredentialFields(protocolKey, bag) {
329
+ if (!isPlainRecord(bag))
330
+ return [];
331
+ return Object.values(ProviderConfigurationCredentialField).flatMap((field) => PROVIDER_CONFIGURATION_CREDENTIAL_FIELD_READERS[field](protocolKey, bag));
332
+ }
333
+ function isPlainRecord(value) {
334
+ return typeof value === "object" && value !== null && !Array.isArray(value);
335
+ }
336
+ /** Any object, an array included: the shape a credential-naming field is read from, so no authored object escapes it. */
337
+ function isObject(value) {
338
+ return typeof value === "object" && value !== null;
339
+ }
163
340
  export var ExternalProvider_IO_Direction;
164
341
  (function (ExternalProvider_IO_Direction) {
165
342
  ExternalProvider_IO_Direction["INBOUND"] = "inbound";
@@ -172,4 +349,20 @@ export var ExternalProvider_IO_InteractionPattern;
172
349
  ExternalProvider_IO_InteractionPattern["EVENT_BASED"] = "event_based";
173
350
  ExternalProvider_IO_InteractionPattern["STREAMING"] = "stream";
174
351
  })(ExternalProvider_IO_InteractionPattern || (ExternalProvider_IO_InteractionPattern = {}));
352
+ /**
353
+ * An address a vendor registration asks a person to TYPE at the vendor, as opposed to one the registration file already
354
+ * carries (#2713). A provider module's `vendorRegistration` names each one it needs beside its steps, so a screen can
355
+ * show it as a value to copy, labelled from its own words, rather than leave it inside a sentence.
356
+ *
357
+ * Add a member when a provider's registration names another such address. A Slack app's request URLs are not one: the
358
+ * manifest file carries them, and nobody types them.
359
+ */
360
+ export var ProviderVendorRegistrationAddressKind;
361
+ (function (ProviderVendorRegistrationAddressKind) {
362
+ /**
363
+ * Where the vendor delivers a bot's messages: the Azure Bot's "Messaging endpoint", the route the engine mounts for the
364
+ * provider's inbound endpoint. Every bot of one application, its own or an organization's, is registered with the same one.
365
+ */
366
+ ProviderVendorRegistrationAddressKind["MESSAGING_ENDPOINT"] = "messaging_endpoint";
367
+ })(ProviderVendorRegistrationAddressKind || (ProviderVendorRegistrationAddressKind = {}));
175
368
  //# sourceMappingURL=commons.external-connectors-models.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commons.external-connectors-models.schemas.js","sourceRoot":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Auth_ConfigurationSchema, ExternalProvider_RateLimitConfigurationSchema } from \"./security.external-connectors-models.schemas\";\n\n\n/**\n * The ONE protocol vocabulary a provider can speak. Every other list is derived from or pinned\n * to this enum: the backend runtime-contract discriminants (`ProviderProtocolRuntimeKind`, a\n * subset of these members) and the application-authoring keys (`BUILTIN_PROVIDER_PROTOCOL` in\n * `@wildo-ai/saas-models`, its key set pinned by a drift test because that package must not\n * import this one into browser bundles).\n *\n * RETIRED 2026-09-05 (#327): `MCP_CONNECTOR`, `A2A_CONNECTOR`, `GIT_PROVIDER`, `GRPC`,\n * `SSO_SAML`. Each had an authored profile/configuration module in this package and NOTHING\n * that read it — no runtime-contract arm, no provider module declaring it, no consumer of any\n * export outside the module itself (measured with a positive control). Wildo's own MCP server,\n * A2A plane and SAML SSO are engine-implemented surfaces, not provider-declared protocols, and\n * none of them referenced these members. A retired member is refused at CONFIG time by\n * `ProviderProtocolSelectorSchema`, naming the value. Re-admit one only together with a\n * runtime-contract arm and a provider module that declares it.\n */\nexport enum ExternalProvider_ExchangeProtocol_Kind {\n // WEB\n REST_API = \"rest_api\",\n WEBHOOK_ORIGINATOR = \"webhook_originator\",\n // SOAP ?\n \n // AI\n LLM_PROVIDER = \"llm_provider\",\n /**\n * Zed's Agent Client Protocol — a JSON-RPC session between Wildo (the client)\n * and a CODING AGENT subprocess that reads and writes a workspace, runs\n * commands, and calls back for permission.\n *\n * Its own protocol kind rather than a mode of `CLI_RUNTIME`, for the reason\n * `EMBEDDINGS_PROVIDER` records above and one more that is specific to it: a\n * coding agent is not a one-shot text call wearing a subprocess. Every\n * capability the previous CLI transport lacked — token and cost accounting, a\n * permission channel, cancellation, resumption, live progress — was missing\n * because the one-shot shape has nowhere to put it, not because nobody had\n * implemented it yet.\n *\n * NOT to be confused with the IBM/BeeAI \"Agent Communication Protocol\", which\n * shares the acronym and is agent-to-agent — that space is `A2A_CONNECTOR`.\n */\n AGENT_CLIENT_PROTOCOL = \"agent_client_protocol\",\n // AI — multimodal generation (artifact-modality axis)\n /** Text-to-image generation (wired: gpt-image). Serves the IMAGE modality. */\n IMAGE_PROVIDER = \"image_provider\",\n /**\n * Text → vector embeddings (wired: OpenAI `text-embedding-3-*`). Serves the RAG derived-data\n * tier (corpus embedding via the `rag:embedding-drain` worker; query-time embedding in\n * retrieval). Deliberately its OWN protocol kind rather than a sixth `LLMProvider_OperationKey`\n * (RAG plan DL2): an unmapped LLM operation key fails SILENTLY across six consumer surfaces\n * (registry semantic-operation map, output normalization, executor dispatch, capability slot,\n * usage completeness, observability sink), whereas a new protocol kind fails COMPILATION at\n * every `runtimeContract.kind` switch — the `IMAGE_PROVIDER` precedent. It also gets its own\n * `EngineCapability.AI_EMBEDDINGS` slot so an application can select its embeddings provider\n * independently of its chat provider.\n */\n EMBEDDINGS_PROVIDER = \"embeddings_provider\",\n /**\n * Document bytes → text (wired: Mistral `mistral-ocr-latest`). Serves the file-side text\n * provider that `FileTextExtractionBackendService` owns, whose largest consumer is\n * `.ragSource()` corpus ingestion.\n *\n * Its own kind for the reason `EMBEDDINGS_PROVIDER` records above, and it fills its own\n * `EngineCapability.AI_DOCUMENT_EXTRACTION` slot so an application selects its OCR provider\n * independently of chat and embeddings — three unrelated procurement decisions.\n *\n * NOT to be confused with PDF *generation* (templates → bytes), which is the `pdfTemplates`\n * surface and is semantically the opposite direction. It has no provider slot: the\n * `EngineCapability.DOCUMENT_GENERATION` this paragraph used to name was withdrawn because no\n * provider capability token could ever fill it.\n */\n DOCUMENT_EXTRACTION_PROVIDER = \"document_extraction_provider\",\n /** Reserved — audio generation (TTS / music). Serves the AUDIO modality. Not yet implemented. */\n AUDIO_PROVIDER = \"audio_provider\",\n /** Reserved — video generation. Serves the VIDEO modality. Not yet implemented. */\n VIDEO_PROVIDER = \"video_provider\",\n \n // INFRA\n EMAIL_PROVIDER = \"email_provider\",\n /**\n * RECEIVING email (#1630): the provider hosts a receiving domain, announces each message through a\n * `WEBHOOK_ORIGINATOR` endpoint whose `capability` is `EMAIL_INBOUND`, and serves the message on\n * request through `StandardInboundEmail_Interface`. Its own kind rather than a mode of\n * `EMAIL_PROVIDER` because sending and receiving are separate procurement decisions and share no\n * operation: a sending contract composes a request, a receiving one parses a notification and\n * fetches a message.\n */\n EMAIL_INBOUND_PROVIDER = \"email_inbound_provider\",\n \n // AUTH\n SSO_OAUTH2 = \"sso_oauth2\",\n // OPENID_CONNECT ?\n\n // BILLING\n BILLING_PROVIDER = \"billing_provider\",\n\n // SMS (Phase G2)\n SMS_PROVIDER = \"sms_provider\",\n\n // FRONTEND\n FRONTEND_SDK = \"frontend_sdk\",\n}\n\n/**\n * The BACKEND runtime-contract discriminants — the subset of `ExternalProvider_ExchangeProtocol_Kind`\n * a `BackendProviderModule` can execute. Its VALUES are the enum members themselves (one spelling per\n * member since 2026-09-05, #327), so a runtime contract's `kind` IS the exchange kind and no\n * protocol→kind map exists anywhere; `BackendProtocolBinding.protocol` (the authoring KEY) and\n * `runtimeContract.kind` are checked for agreement at composition. A member absent here has no\n * backend arm: `FRONTEND_SDK` is declared by browser-side modules only, `AUDIO_PROVIDER` /\n * `VIDEO_PROVIDER` are reserved.\n *\n * A frozen const rather than a second enum because provider modules are an extension boundary and\n * the union discriminant must stay the enum member type. Import from\n * `@wildo-ai/external-connectors-models`; the private backend package consumes it, never defines it.\n */\nexport const ProviderProtocolRuntimeKind = Object.freeze({\n LLM: ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER,\n IMAGE: ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER,\n EMBEDDINGS: ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER,\n DOCUMENT_EXTRACTION: ExternalProvider_ExchangeProtocol_Kind.DOCUMENT_EXTRACTION_PROVIDER,\n AGENT_CLIENT_PROTOCOL: ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL,\n EMAIL: ExternalProvider_ExchangeProtocol_Kind.EMAIL_PROVIDER,\n EMAIL_INBOUND: ExternalProvider_ExchangeProtocol_Kind.EMAIL_INBOUND_PROVIDER,\n OAUTH2_SSO: ExternalProvider_ExchangeProtocol_Kind.SSO_OAUTH2,\n BILLING: ExternalProvider_ExchangeProtocol_Kind.BILLING_PROVIDER,\n WEBHOOK_ORIGINATOR: ExternalProvider_ExchangeProtocol_Kind.WEBHOOK_ORIGINATOR,\n SMS: ExternalProvider_ExchangeProtocol_Kind.SMS_PROVIDER,\n REST: ExternalProvider_ExchangeProtocol_Kind.REST_API,\n} as const);\nexport type ProviderProtocolRuntimeKind =\n (typeof ProviderProtocolRuntimeKind)[keyof typeof ProviderProtocolRuntimeKind];\n\nexport enum APPLICATION_ENVIRONMENT {\n DEVELOPMENT = \"development\",\n STAGING = \"staging\",\n PRODUCTION = \"production\",\n}\n\n\nexport enum API_HttpMethod {\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n DELETE = \"DELETE\",\n HEAD = \"HEAD\",\n OPTIONS = \"OPTIONS\",\n}\n\n/**\n * Shared protocol configuration fields — the ONE survivor of the per-protocol profile /\n * configuration / status triple (#965), and the reason it stays is a reader, not a legacy.\n *\n * `authConfig` is read on a resolved provider configuration by the OAuth2 connection resolver\n * (`clientId`, `secretRef`) and by the registry's default-over-custom merge, and `enabled` is what\n * a provider configuration parses at the boundary (`AgentClientProtocol_ConfigurationSchema`,\n * `OAuth2Provider_ConfigurationSchema` extend this; the LLM and webhook configurations intersect\n * with the inferred type). It is optional because execution-oriented protocols can own their own\n * auth/runtime policy contract.\n *\n * What is gone: the profile base (a provider's transport facts now live on its runtime contract,\n * `ProviderProtocolRuntimeContract`, which the registry projects) and the status base (nothing\n * ever recorded a per-protocol status). Both had no reader outside the declarations that extended\n * them.\n */\nexport const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema = z.object({\n enabled: z.boolean(),\n authConfig: ExternalProvider_Auth_ConfigurationSchema.optional(),\n rateLimitConfig: ExternalProvider_RateLimitConfigurationSchema.optional(),\n});\n\nexport type ExternalProvider_ExchangeProtocol_Configuration_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Configuration_BaseSchema>;\n\nexport enum ExternalProvider_IO_Direction {\n INBOUND = \"inbound\",\n OUTBOUND = \"outbound\",\n BIDIRECTIONAL = \"bidirectional\",\n}\n\nexport enum ExternalProvider_IO_InteractionPattern {\n REQUEST_RESPONSE = \"request_response\",\n EVENT_BASED = \"event_based\",\n STREAMING = \"stream\",\n}\n\n"]}
1
+ {"version":3,"file":"commons.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/core/commons.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,6CAA6C,EAAE,MAAM,+CAA+C,CAAC;AAGzJ;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,sCA6FX;AA7FD,WAAY,sCAAsC;IAChD,MAAM;IACN,+DAAqB,CAAA;IACrB,mFAAyC,CAAA;IACzC,SAAS;IAET,KAAK;IACL,uEAA6B,CAAA;IAC7B;;;;;;;;;;;;;;;OAeG;IACH,yFAA+C,CAAA;IAC/C,sDAAsD;IACtD,8EAA8E;IAC9E,2EAAiC,CAAA;IACjC;;;;;;;;;;OAUG;IACH,qFAA2C,CAAA;IAC3C;;;;;;;;;;;;;OAaG;IACH,uGAA6D,CAAA;IAC7D;;;;;;;OAOG;IACH,6FAAmD,CAAA;IACnD,iGAAiG;IACjG,2EAAiC,CAAA;IACjC,mFAAmF;IACnF,2EAAiC,CAAA;IAEjC,QAAQ;IACR,2EAAiC,CAAA;IACjC;;;;;;;OAOG;IACH,2FAAiD,CAAA;IAEjD,OAAO;IACP,mEAAyB,CAAA;IACzB,mBAAmB;IAEnB,UAAU;IACV,+EAAqC,CAAA;IAErC,iBAAiB;IACjB,uEAA6B,CAAA;IAE7B,WAAW;IACX,uEAA6B,CAAA;AAC/B,CAAC,EA7FW,sCAAsC,K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WAAY,qCAAqC;IAC/C;;;OAGG;IACH,kFAAyC,CAAA;AAC3C,CAAC,EANW,qCAAqC,KAArC,qCAAqC,QAMhD","sourcesContent":["import { z } from \"zod\";\nimport { ExternalProvider_Auth_ConfigurationSchema, ExternalProvider_RateLimitConfigurationSchema } from \"./security.external-connectors-models.schemas\";\n\n\n/**\n * The ONE protocol vocabulary a provider can speak. Every other list is derived from or pinned\n * to this enum: the backend runtime-contract discriminants (`ProviderProtocolRuntimeKind`, a\n * subset of these members) and the application-authoring keys (`BUILTIN_PROVIDER_PROTOCOL` in\n * `@wildo-ai/saas-models`, its key set pinned by a drift test because that package must not\n * import this one into browser bundles).\n *\n * RETIRED 2026-09-05 (#327): `MCP_CONNECTOR`, `A2A_CONNECTOR`, `GIT_PROVIDER`, `GRPC`,\n * `SSO_SAML`. Each had an authored profile/configuration module in this package and NOTHING\n * that read it — no runtime-contract arm, no provider module declaring it, no consumer of any\n * export outside the module itself (measured with a positive control). Wildo's own MCP server,\n * A2A plane and SAML SSO are engine-implemented surfaces, not provider-declared protocols, and\n * none of them referenced these members. A retired member is refused at CONFIG time by\n * `ProviderProtocolSelectorSchema`, naming the value. Re-admit one only together with a\n * runtime-contract arm and a provider module that declares it.\n */\nexport enum ExternalProvider_ExchangeProtocol_Kind {\n // WEB\n REST_API = \"rest_api\",\n WEBHOOK_ORIGINATOR = \"webhook_originator\",\n // SOAP ?\n \n // AI\n LLM_PROVIDER = \"llm_provider\",\n /**\n * Zed's Agent Client Protocol — a JSON-RPC session between Wildo (the client)\n * and a CODING AGENT subprocess that reads and writes a workspace, runs\n * commands, and calls back for permission.\n *\n * Its own protocol kind rather than a mode of `CLI_RUNTIME`, for the reason\n * `EMBEDDINGS_PROVIDER` records above and one more that is specific to it: a\n * coding agent is not a one-shot text call wearing a subprocess. Every\n * capability the previous CLI transport lacked — token and cost accounting, a\n * permission channel, cancellation, resumption, live progress — was missing\n * because the one-shot shape has nowhere to put it, not because nobody had\n * implemented it yet.\n *\n * NOT to be confused with the IBM/BeeAI \"Agent Communication Protocol\", which\n * shares the acronym and is agent-to-agent — that space is `A2A_CONNECTOR`.\n */\n AGENT_CLIENT_PROTOCOL = \"agent_client_protocol\",\n // AI — multimodal generation (artifact-modality axis)\n /** Text-to-image generation (wired: gpt-image). Serves the IMAGE modality. */\n IMAGE_PROVIDER = \"image_provider\",\n /**\n * Text → vector embeddings (wired: OpenAI `text-embedding-3-*`). Serves the RAG derived-data\n * tier (corpus embedding via the `rag:embedding-drain` worker; query-time embedding in\n * retrieval). Deliberately its OWN protocol kind rather than a sixth `LLMProvider_OperationKey`\n * (RAG plan DL2): an unmapped LLM operation key fails SILENTLY across six consumer surfaces\n * (registry semantic-operation map, output normalization, executor dispatch, capability slot,\n * usage completeness, observability sink), whereas a new protocol kind fails COMPILATION at\n * every `runtimeContract.kind` switch — the `IMAGE_PROVIDER` precedent. It also gets its own\n * `EngineCapability.AI_EMBEDDINGS` slot so an application can select its embeddings provider\n * independently of its chat provider.\n */\n EMBEDDINGS_PROVIDER = \"embeddings_provider\",\n /**\n * Document bytes → text (wired: Mistral `mistral-ocr-latest`). Serves the file-side text\n * provider that `FileTextExtractionBackendService` owns, whose largest consumer is\n * `.ragSource()` corpus ingestion.\n *\n * Its own kind for the reason `EMBEDDINGS_PROVIDER` records above, and it fills its own\n * `EngineCapability.AI_DOCUMENT_EXTRACTION` slot so an application selects its OCR provider\n * independently of chat and embeddings — three unrelated procurement decisions.\n *\n * NOT to be confused with PDF *generation* (templates → bytes), which is the `pdfTemplates`\n * surface and is semantically the opposite direction. It has no provider slot: the\n * `EngineCapability.DOCUMENT_GENERATION` this paragraph used to name was withdrawn because no\n * provider capability token could ever fill it.\n */\n DOCUMENT_EXTRACTION_PROVIDER = \"document_extraction_provider\",\n /**\n * Text → a classifier's verdict about it (#2292): first, whether third-party content entering an agent's prompt\n * carries a prompt-injection attack. Serves an agent's declared content guardrails.\n *\n * Its own kind for the reason `EMBEDDINGS_PROVIDER` records above, and it fills its own\n * `EngineCapability.AI_CONTENT_SAFETY` slot so an application chooses the vendor that screens its model's input\n * independently of the vendor that answers it.\n */\n CONTENT_SAFETY_PROVIDER = \"content_safety_provider\",\n /** Reserved — audio generation (TTS / music). Serves the AUDIO modality. Not yet implemented. */\n AUDIO_PROVIDER = \"audio_provider\",\n /** Reserved — video generation. Serves the VIDEO modality. Not yet implemented. */\n VIDEO_PROVIDER = \"video_provider\",\n \n // INFRA\n EMAIL_PROVIDER = \"email_provider\",\n /**\n * RECEIVING email (#1630): the provider hosts a receiving domain, announces each message through a\n * `WEBHOOK_ORIGINATOR` endpoint whose `capability` is `EMAIL_INBOUND`, and serves the message on\n * request through `StandardInboundEmail_Interface`. Its own kind rather than a mode of\n * `EMAIL_PROVIDER` because sending and receiving are separate procurement decisions and share no\n * operation: a sending contract composes a request, a receiving one parses a notification and\n * fetches a message.\n */\n EMAIL_INBOUND_PROVIDER = \"email_inbound_provider\",\n \n // AUTH\n SSO_OAUTH2 = \"sso_oauth2\",\n // OPENID_CONNECT ?\n\n // BILLING\n BILLING_PROVIDER = \"billing_provider\",\n\n // SMS (Phase G2)\n SMS_PROVIDER = \"sms_provider\",\n\n // FRONTEND\n FRONTEND_SDK = \"frontend_sdk\",\n}\n\n/**\n * The BACKEND runtime-contract discriminants — the subset of `ExternalProvider_ExchangeProtocol_Kind`\n * a `BackendProviderModule` can execute. Its VALUES are the enum members themselves (one spelling per\n * member since 2026-09-05, #327), so a runtime contract's `kind` IS the exchange kind and no\n * protocol→kind map exists anywhere; `BackendProtocolBinding.protocol` (the authoring KEY) and\n * `runtimeContract.kind` are checked for agreement at composition. A member absent here has no\n * backend arm: `FRONTEND_SDK` is declared by browser-side modules only, `AUDIO_PROVIDER` /\n * `VIDEO_PROVIDER` are reserved.\n *\n * A frozen const rather than a second enum because provider modules are an extension boundary and\n * the union discriminant must stay the enum member type. Import from\n * `@wildo-ai/external-connectors-models`; the private backend package consumes it, never defines it.\n */\nexport const ProviderProtocolRuntimeKind = Object.freeze({\n LLM: ExternalProvider_ExchangeProtocol_Kind.LLM_PROVIDER,\n IMAGE: ExternalProvider_ExchangeProtocol_Kind.IMAGE_PROVIDER,\n EMBEDDINGS: ExternalProvider_ExchangeProtocol_Kind.EMBEDDINGS_PROVIDER,\n DOCUMENT_EXTRACTION: ExternalProvider_ExchangeProtocol_Kind.DOCUMENT_EXTRACTION_PROVIDER,\n CONTENT_SAFETY: ExternalProvider_ExchangeProtocol_Kind.CONTENT_SAFETY_PROVIDER,\n AGENT_CLIENT_PROTOCOL: ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL,\n EMAIL: ExternalProvider_ExchangeProtocol_Kind.EMAIL_PROVIDER,\n EMAIL_INBOUND: ExternalProvider_ExchangeProtocol_Kind.EMAIL_INBOUND_PROVIDER,\n OAUTH2_SSO: ExternalProvider_ExchangeProtocol_Kind.SSO_OAUTH2,\n BILLING: ExternalProvider_ExchangeProtocol_Kind.BILLING_PROVIDER,\n WEBHOOK_ORIGINATOR: ExternalProvider_ExchangeProtocol_Kind.WEBHOOK_ORIGINATOR,\n SMS: ExternalProvider_ExchangeProtocol_Kind.SMS_PROVIDER,\n REST: ExternalProvider_ExchangeProtocol_Kind.REST_API,\n} as const);\nexport type ProviderProtocolRuntimeKind =\n (typeof ProviderProtocolRuntimeKind)[keyof typeof ProviderProtocolRuntimeKind];\n\nexport enum APPLICATION_ENVIRONMENT {\n DEVELOPMENT = \"development\",\n STAGING = \"staging\",\n PRODUCTION = \"production\",\n}\n\n\nexport enum API_HttpMethod {\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n DELETE = \"DELETE\",\n HEAD = \"HEAD\",\n OPTIONS = \"OPTIONS\",\n}\n\n/**\n * Shared protocol configuration fields — the ONE survivor of the per-protocol profile /\n * configuration / status triple (#965), and the reason it stays is a reader, not a legacy.\n *\n * `authConfig` is read on a resolved provider configuration by the OAuth2 connection resolver\n * (`clientId`, `secretRef`) and by the registry's default-over-custom merge, and `enabled` is what\n * a provider configuration parses at the boundary (`AgentClientProtocol_ConfigurationSchema`,\n * `OAuth2Provider_ConfigurationSchema` extend this; the LLM and webhook configurations intersect\n * with the inferred type). It is optional because execution-oriented protocols can own their own\n * auth/runtime policy contract.\n *\n * What is gone: the profile base (a provider's transport facts now live on its runtime contract,\n * `ProviderProtocolRuntimeContract`, which the registry projects) and the status base (nothing\n * ever recorded a per-protocol status). Both had no reader outside the declarations that extended\n * them.\n */\nexport const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema = z.object({\n enabled: z.boolean(),\n authConfig: ExternalProvider_Auth_ConfigurationSchema.optional(),\n rateLimitConfig: ExternalProvider_RateLimitConfigurationSchema.optional(),\n});\n\nexport type ExternalProvider_ExchangeProtocol_Configuration_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Configuration_BaseSchema>;\n\n/**\n * The keys of a `providerConfigurations.<providerRef>.<protocol>` bag that belong to the PROVIDER MODULE, never to the\n * application (#2995). Each is projected by the backend registry from the module's own runtime contract, and each\n * decides where a request goes and how its credential travels:\n *\n * - `runtimeContract` — the contract itself: the base URL or host slot, the API-key header, the operations.\n * - `endpoints` — the webhook endpoints a `WEBHOOK_ORIGINATOR` contract declares (route keys, signature handling).\n *\n * An application cannot author either. The registry used to deep-merge an authored `runtimeContract` over the module's,\n * so one configuration line (`runtimeContract: { baseUrl: 'http://anywhere' }`) sent the provider's key to any URL, over\n * plain http, in any environment, around the host-held slot and its bare-DNS rule (#992 F3). The comments said the module\n * owned the contract; nothing held it. Now three schemas refuse these keys when the configuration is parsed\n * (`defineSaaSConfig`, the per-environment overlay, the backend's application configuration), and the registry refuses\n * them again before it merges, so a configuration hydrated from anywhere else is refused too.\n *\n * The way to point a provider at a local double is the environment-gated loopback host of a host-held slot (#2991),\n * which a deployment outside development and test refuses.\n *\n * Import path: `@wildo-ai/external-connectors-models`.\n */\nexport enum ExternalProvider_ModuleOwnedConfigurationKey {\n RUNTIME_CONTRACT = \"runtimeContract\",\n ENDPOINTS = \"endpoints\",\n}\n\n/** One authored key a provider module owns: where it was written, so the refusal can name it. */\nexport interface ExternalProvider_ModuleOwnedConfigurationKeyFinding {\n readonly providerRef: string;\n /** The second-level key of the bag: a protocol kind, or a key the module reads itself (`registration`). */\n readonly protocolKey: string;\n readonly key: ExternalProvider_ModuleOwnedConfigurationKey;\n}\n\nconst MODULE_OWNED_CONFIGURATION_KEYS: readonly ExternalProvider_ModuleOwnedConfigurationKey[] = Object.values(ExternalProvider_ModuleOwnedConfigurationKey);\n\n/**\n * Every module-owned key written anywhere in a `providerConfigurations` value. Total over the\n * {@link ExternalProvider_ModuleOwnedConfigurationKey} vocabulary, and over every bag, a protocol bag or not: no bag can\n * legitimately carry these names, and a bag the registry does not merge today is one a later reader might.\n * Anything that is not a record of records (a malformed value) yields nothing here; the schema reports that itself.\n */\nexport function findModuleOwnedProviderConfigurationKeys(providerConfigurations: unknown): ExternalProvider_ModuleOwnedConfigurationKeyFinding[] {\n const findings: ExternalProvider_ModuleOwnedConfigurationKeyFinding[] = [];\n if (!isPlainRecord(providerConfigurations)) return findings;\n for (const [providerRef, protocols] of Object.entries(providerConfigurations)) {\n if (!isPlainRecord(protocols)) continue;\n for (const [protocolKey, bag] of Object.entries(protocols)) {\n if (!isPlainRecord(bag)) continue;\n for (const key of MODULE_OWNED_CONFIGURATION_KEYS) {\n if (Object.prototype.hasOwnProperty.call(bag, key)) findings.push({ providerRef, protocolKey, key });\n }\n }\n }\n return findings;\n}\n\n/** The one sentence every door refuses a module-owned key with, so an operator greps one wording. */\nexport function describeModuleOwnedProviderConfigurationKey(finding: ExternalProvider_ModuleOwnedConfigurationKeyFinding): string {\n return `providerConfigurations.${finding.providerRef}.${finding.protocolKey}.${finding.key} is refused: the provider module owns `\n + `'${finding.key}' (where its requests go and how its credential travels), and a configuration cannot rewrite it. Remove the key. `\n + 'To reach a local double of the vendor, set the provider\\'s host slot to a loopback host:port in a development or test environment.';\n}\n\n/**\n * Report every module-owned key as an issue on `ctx`, at its path. The refinement each `providerConfigurations` schema\n * applies, so the three refuse the same keys with the same words.\n *\n * assurance-control: WILDO.SECRETS.CREDENTIAL_SCOPING — a configuration cannot author where a provider's credential is sent (#2995).\n */\nexport function refuseModuleOwnedProviderConfigurationKeys(providerConfigurations: unknown, ctx: z.RefinementCtx): void {\n for (const finding of findModuleOwnedProviderConfigurationKeys(providerConfigurations)) {\n ctx.addIssue({\n code: \"custom\",\n path: [finding.providerRef, finding.protocolKey, finding.key],\n message: describeModuleOwnedProviderConfigurationKey(finding),\n });\n }\n}\n\n/**\n * The fields of a `providerConfigurations.<providerRef>.<protocol>` bag that NAME a credential (#3022). Each decides\n * which secret a vendor or a coding agent receives, so each is held to a rule that leaves that choice to the provider\n * module and the framework rather than to the configuration:\n *\n * | field | the rule | closed by |\n * |---|---|---|\n * | `authConfig.secretRef` | names only a slot the module's `secretsContract` declares, by its variable or its slug | #3002 |\n * | an execution profile's `secretEnvVarName` | names only a variable the module declares (never a slug: it is the variable the agent reads) | #3002 |\n * | an execution profile's `inheritedEnvironmentVariables` | names anything EXCEPT a secret the framework declares | #3018 |\n *\n * The vocabulary is the one named source for the doors that check these fields: the backend registry, on every read and\n * in its startup walk, and the CLI's environment door. Each reads the fields through\n * {@link readProviderConfigurationCredentialFields} and branches on the member, so a field added here gets a reader (a\n * compile error until it does) and then reaches every door's exhaustive switch, where it is a compile error again until\n * the door decides its rule. Before this vocabulary the three fields were string paths written out at each door.\n *\n * Where the credential then GOES is the other half of the property, and it is not a configuration field at all: the\n * module owns its destination ({@link ExternalProvider_ModuleOwnedConfigurationKey}, #2995).\n *\n * Import path: `@wildo-ai/external-connectors-models`.\n */\nexport enum ProviderConfigurationCredentialField {\n /** `authConfig.secretRef`: the slot a protocol's key or client secret is read from, and sent to the vendor. */\n AUTH_SECRET_REF = \"auth_secret_ref\",\n /**\n * `executionProfiles.<profile>.secretEnvVarName`, on the agent-client-protocol bag only: the one variable read from the\n * spawning process and set in the coding agent's environment.\n */\n EXECUTION_PROFILE_SECRET_ENV_VAR_NAME = \"execution_profile_secret_env_var_name\",\n /**\n * `executionProfiles.<profile>.inheritedEnvironmentVariables`, on the agent-client-protocol bag only: the host's own\n * variables (the agent's login, its tool paths) copied into the coding agent's environment.\n */\n EXECUTION_PROFILE_INHERITED_ENVIRONMENT = \"execution_profile_inherited_environment\",\n}\n\n/** One credential-naming field as authored, unchecked: the door that reads it decides whether it is admitted. */\nexport interface ProviderConfigurationCredentialFieldReading {\n readonly field: ProviderConfigurationCredentialField;\n /** Where it sits inside the protocol bag (`authConfig.secretRef`, `executionProfiles.mine.secretEnvVarName`), for a refusal to name. */\n readonly path: string;\n /** The execution profile it was read from, for the two profile fields. */\n readonly executionProfileRef?: string;\n /** The authored value. Never `undefined`: a field that is not written yields no reading. */\n readonly value: unknown;\n}\n\nconst AGENT_CLIENT_PROTOCOL_MEMBER_NAME = (Object.keys(ExternalProvider_ExchangeProtocol_Kind) as Array<keyof typeof ExternalProvider_ExchangeProtocol_Kind>)\n .find((member) => ExternalProvider_ExchangeProtocol_Kind[member] === ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL);\n\n/**\n * Whether a protocol key of a `providerConfigurations.<providerRef>` value holds the agent-client-protocol bag: the\n * protocol's wire value, or its member name. The backend reads the configuration under the wire value only, but a\n * credential-naming field is checked under either key, so a bag authored under the member name is refused by every door\n * rather than by the CLI alone.\n */\nexport function isAgentClientProtocolConfigurationKey(protocolKey: string): boolean {\n return protocolKey === ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL || protocolKey === AGENT_CLIENT_PROTOCOL_MEMBER_NAME;\n}\n\n/**\n * The authored execution profiles of an agent-client-protocol bag; nothing for any other bag.\n *\n * Read from ANY object, an array included, and each profile that is any object, never only from plain records: the doors\n * iterated `Object.entries` before this vocabulary, and the registry's merge turns an array into `{ '0': profile }`, which\n * an agent or a default profile can select. Reading plain records only would leave such a profile's `secretEnvVarName`\n * unchecked while dispatch still injects it (#3022 review F1). What is not an object carries no field to read.\n */\nfunction authoredExecutionProfiles(protocolKey: string, bag: Record<string, unknown>): Array<[string, Record<string, unknown>]> {\n if (!isAgentClientProtocolConfigurationKey(protocolKey) || !isObject(bag.executionProfiles)) return [];\n return Object.entries(bag.executionProfiles).filter((entry): entry is [string, Record<string, unknown>] => isObject(entry[1]));\n}\n\n/** One reader per field, so a member added to the vocabulary without one is a compile error. */\nconst PROVIDER_CONFIGURATION_CREDENTIAL_FIELD_READERS: {\n readonly [Field in ProviderConfigurationCredentialField]: (protocolKey: string, bag: Record<string, unknown>) => ProviderConfigurationCredentialFieldReading[];\n} = {\n [ProviderConfigurationCredentialField.AUTH_SECRET_REF]: (_protocolKey, bag) => {\n const value = isObject(bag.authConfig) ? (bag.authConfig as Record<string, unknown>).secretRef : undefined;\n return value === undefined ? [] : [{ field: ProviderConfigurationCredentialField.AUTH_SECRET_REF, path: \"authConfig.secretRef\", value }];\n },\n [ProviderConfigurationCredentialField.EXECUTION_PROFILE_SECRET_ENV_VAR_NAME]: (protocolKey, bag) =>\n authoredExecutionProfiles(protocolKey, bag).flatMap(([executionProfileRef, profile]) => profile.secretEnvVarName === undefined ? [] : [{\n field: ProviderConfigurationCredentialField.EXECUTION_PROFILE_SECRET_ENV_VAR_NAME,\n path: `executionProfiles.${executionProfileRef}.secretEnvVarName`,\n executionProfileRef,\n value: profile.secretEnvVarName,\n }]),\n [ProviderConfigurationCredentialField.EXECUTION_PROFILE_INHERITED_ENVIRONMENT]: (protocolKey, bag) =>\n authoredExecutionProfiles(protocolKey, bag).flatMap(([executionProfileRef, profile]) => profile.inheritedEnvironmentVariables === undefined ? [] : [{\n field: ProviderConfigurationCredentialField.EXECUTION_PROFILE_INHERITED_ENVIRONMENT,\n path: `executionProfiles.${executionProfileRef}.inheritedEnvironmentVariables`,\n executionProfileRef,\n value: profile.inheritedEnvironmentVariables,\n }]),\n};\n\n/**\n * Every credential-naming field written in one protocol bag of a provider configuration, in vocabulary order. Total over\n * {@link ProviderConfigurationCredentialField}. A bag that is not a record yields nothing; its schema reports that itself.\n */\nexport function readProviderConfigurationCredentialFields(protocolKey: string, bag: unknown): ProviderConfigurationCredentialFieldReading[] {\n if (!isPlainRecord(bag)) return [];\n return Object.values(ProviderConfigurationCredentialField).flatMap((field) => PROVIDER_CONFIGURATION_CREDENTIAL_FIELD_READERS[field](protocolKey, bag));\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** Any object, an array included: the shape a credential-naming field is read from, so no authored object escapes it. */\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nexport enum ExternalProvider_IO_Direction {\n INBOUND = \"inbound\",\n OUTBOUND = \"outbound\",\n BIDIRECTIONAL = \"bidirectional\",\n}\n\nexport enum ExternalProvider_IO_InteractionPattern {\n REQUEST_RESPONSE = \"request_response\",\n EVENT_BASED = \"event_based\",\n STREAMING = \"stream\",\n}\n\n\n/**\n * An address a vendor registration asks a person to TYPE at the vendor, as opposed to one the registration file already\n * carries (#2713). A provider module's `vendorRegistration` names each one it needs beside its steps, so a screen can\n * show it as a value to copy, labelled from its own words, rather than leave it inside a sentence.\n *\n * Add a member when a provider's registration names another such address. A Slack app's request URLs are not one: the\n * manifest file carries them, and nobody types them.\n */\nexport enum ProviderVendorRegistrationAddressKind {\n /**\n * Where the vendor delivers a bot's messages: the Azure Bot's \"Messaging endpoint\", the route the engine mounts for the\n * provider's inbound endpoint. Every bot of one application, its own or an organization's, is registered with the same one.\n */\n MESSAGING_ENDPOINT = \"messaging_endpoint\",\n}\n"]}
@@ -292,6 +292,7 @@ export declare enum ExternalProvider_Connection_DelegationMode {
292
292
  /** The call acts for a named user, whose authorization is what makes it permissible. */
293
293
  USER = "user"
294
294
  }
295
+ /** @wildo_source:part:start external-connectors.models.connection-target facet:layer:shared facet:audience:app-developer */
295
296
  /**
296
297
  * WHICH owner instance a single call spends — supplied BY THE CALL, never read from ambient context.
297
298
  *
@@ -327,6 +328,7 @@ export declare const ExternalProvider_ConnectionTargetSchema: z.ZodObject<{
327
328
  ownerId: z.ZodOptional<z.ZodString>;
328
329
  actingForUserId: z.ZodOptional<z.ZodString>;
329
330
  }, z.core.$strip>;
331
+ /** @wildo_source:part:end external-connectors.models.connection-target */
330
332
  /**
331
333
  * Whether a connection target must NAME the user it acts for — true only for APPLICATION × USER.
332
334
  *
@@ -1 +1 @@
1
- {"version":3,"file":"security.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/security.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,+BAA+B,EAC/B,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAMxB;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,iCAAiC;IACjC,IAAI,SAAS;IAEb,0CAA0C;IAC1C,OAAO,YAAY;IAEnB,gDAAgD;IAChD,MAAM,WAAW;IAEjB,gCAAgC;IAChC,KAAK,UAAU;IAEf,kEAAkE;IAClE,MAAM,WAAW;IAEjB,0CAA0C;IAC1C,cAAc,mBAAmB;IAEjC,+CAA+C;IAC/C,cAAc,mBAAmB;IAEjC,uCAAuC;IACvC,UAAU,eAAe;IAEzB,qDAAqD;IACrD,eAAe,oBAAoB;CACpC;AAMD,oBAAY,qCAAqC;IAC/C,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,8CAA8C;IACxD,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,mCAAmC;IAC7C,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,mBAAmB,wBAAwB;CAC5C;AAMD;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;iBAYpD,CAAC;AAMH,e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,gCAAgC,GAAG,OAAO,CAGhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,0CAA0C,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAG3G;AAED,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
1
+ {"version":3,"file":"security.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/security.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,+BAA+B,EAC/B,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAMxB;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,iCAAiC;IACjC,IAAI,SAAS;IAEb,0CAA0C;IAC1C,OAAO,YAAY;IAEnB,gDAAgD;IAChD,MAAM,WAAW;IAEjB,gCAAgC;IAChC,KAAK,UAAU;IAEf,kEAAkE;IAClE,MAAM,WAAW;IAEjB,0CAA0C;IAC1C,cAAc,mBAAmB;IAEjC,+CAA+C;IAC/C,cAAc,mBAAmB;IAEjC,uCAAuC;IACvC,UAAU,eAAe;IAEzB,qDAAqD;IACrD,eAAe,oBAAoB;CACpC;AAMD,oBAAY,qCAAqC;IAC/C,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,8CAA8C;IACxD,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,mCAAmC;IAC7C,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,mBAAmB,wBAAwB;CAC5C;AAMD;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;iBAYpD,CAAC;AAMH,eAAO,MAAM,6CAA6C;;;;;;;iBAkBxD,CAAC;AAMH,eAAO,MAAM,uCAAuC;;;;;;iBAelD,CAAC;AAMH,MAAM,M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AAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAG3G;AAED,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
@@ -345,6 +345,7 @@ export var ExternalProvider_Connection_DelegationMode;
345
345
  /** The call acts for a named user, whose authorization is what makes it permissible. */
346
346
  ExternalProvider_Connection_DelegationMode["USER"] = "user";
347
347
  })(ExternalProvider_Connection_DelegationMode || (ExternalProvider_Connection_DelegationMode = {}));
348
+ /** @wildo_source:part:start external-connectors.models.connection-target facet:layer:shared facet:audience:app-developer */
348
349
  /**
349
350
  * WHICH owner instance a single call spends — supplied BY THE CALL, never read from ambient context.
350
351
  *
@@ -361,16 +362,19 @@ export var ExternalProvider_Connection_DelegationMode;
361
362
  * and the resolver cannot verify a target it also invented.
362
363
  */
363
364
  export const ExternalProvider_ConnectionShapeSchema = z.object({
364
- ownerScope: z.enum(ExternalProvider_Connection_OwnerScope),
365
+ ownerScope: z.enum(ExternalProvider_Connection_OwnerScope)
366
+ .describe('Who owns the provider account: the application itself, one organization, or one user.'),
365
367
  delegation: z.enum(ExternalProvider_Connection_DelegationMode)
366
- .default(ExternalProvider_Connection_DelegationMode.SERVICE),
368
+ .default(ExternalProvider_Connection_DelegationMode.SERVICE)
369
+ .describe('On whose behalf calls act: `service` acts as the account owner itself, `user` acts for a person. Defaults to `service`.'),
367
370
  });
368
371
  export const ExternalProvider_ConnectionTargetSchema = ExternalProvider_ConnectionShapeSchema.extend({
369
372
  /**
370
373
  * The organization or user whose account is spent. Absent for APPLICATION, which has exactly one
371
374
  * instance by construction — an id there would be a second name for the deployment.
372
375
  */
373
- ownerId: z.string().optional(),
376
+ ownerId: z.string().optional()
377
+ .describe('The id of the organization or user that owns the account. Required for an organization or user owner; omit it for the application.'),
374
378
  /**
375
379
  * The user an APPLICATION-owned, USER-delegated call impersonates — the ONLY shape where the call
376
380
  * itself must say who, because the application's identity could impersonate anyone.
@@ -380,7 +384,8 @@ export const ExternalProvider_ConnectionTargetSchema = ExternalProvider_Connecti
380
384
  * here would describe an identity the runtime will not act as. A USER-owned connection already
381
385
  * names its person in `ownerId`.
382
386
  */
383
- actingForUserId: z.string().optional(),
387
+ actingForUserId: z.string().optional()
388
+ .describe('The user an application-owned account acts for: required when `ownerScope` is `application` and `delegation` is `user`, refused otherwise.'),
384
389
  }).superRefine((target, ctx) => {
385
390
  const ownerIsInstance = target.ownerScope !== ExternalProvider_Connection_OwnerScope.APPLICATION;
386
391
  if (ownerIsInstance && (target.ownerId === undefined || target.ownerId === '')) {
@@ -417,6 +422,7 @@ export const ExternalProvider_ConnectionTargetSchema = ExternalProvider_Connecti
417
422
  });
418
423
  }
419
424
  });
425
+ /** @wildo_source:part:end external-connectors.models.connection-target */
420
426
  /**
421
427
  * Whether a connection target must NAME the user it acts for — true only for APPLICATION × USER.
422
428
  *