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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +13 -132
  2. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  3. package/dist/esm/core/commons.external-connectors-models.schemas.js +13 -31
  4. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  5. package/dist/esm/core/security.external-connectors-models.schemas.d.ts +40 -8
  6. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  7. package/dist/esm/core/security.external-connectors-models.schemas.js +61 -14
  8. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  9. package/dist/esm/index.d.ts +2 -2
  10. package/dist/esm/index.d.ts.map +1 -1
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +167 -164
  14. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
  15. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +188 -94
  16. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
  17. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +130 -10
  18. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  19. package/dist/esm/protocols/billing.standard-interface.schemas.js +42 -1
  20. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  21. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +73 -16
  22. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
  23. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +76 -7
  24. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
  25. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -56
  26. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
  27. package/dist/esm/protocols/email.external-connectors-models.schemas.js +0 -20
  28. package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
  29. package/dist/esm/protocols/email.standard-interface.schemas.d.ts +1 -1
  30. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +1 -16
  31. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
  32. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +4 -9
  33. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
  34. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts +6 -13
  35. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
  36. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js +0 -9
  37. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
  38. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +1 -15
  39. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  40. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +1 -9
  41. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  42. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts +1 -18
  43. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
  44. package/dist/esm/protocols/image.external-connectors-models.schemas.js +1 -7
  45. package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
  46. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +92 -40
  47. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  48. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +154 -41
  49. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  50. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts +7 -0
  51. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -0
  52. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js +36 -0
  53. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -0
  54. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts +23 -0
  55. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -0
  56. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js +25 -0
  57. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -0
  58. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +0 -148
  59. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
  60. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js +1 -40
  61. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
  62. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +530 -15
  63. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
  64. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +380 -0
  65. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
  66. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts +0 -39
  67. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
  68. package/dist/esm/protocols/sms.external-connectors-models.schemas.js +0 -13
  69. package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
  70. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +66 -6
  71. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
  72. package/dist/esm/protocols/sms.standard-interface.schemas.js +71 -1
  73. package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
  74. package/dist/tsconfig.build.tsbuildinfo +1 -1
  75. package/package.json +2 -3
  76. package/dist/esm/.native.tsbuildinfo +0 -1
  77. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -74
  78. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +0 -1
  79. package/dist/esm/core/protocols.external-connectors-models.schemas.js +0 -1
  80. package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +0 -1
  81. package/dist/esm/features/core.external-connectors-models.schemas.d.ts +0 -0
  82. package/dist/esm/features/core.external-connectors-models.schemas.d.ts.map +0 -0
  83. package/dist/esm/features/core.external-connectors-models.schemas.js +0 -0
  84. package/dist/esm/features/core.external-connectors-models.schemas.js.map +0 -0
  85. package/dist/esm/features/email.external-connectors-models.schemas.d.ts +0 -0
  86. package/dist/esm/features/email.external-connectors-models.schemas.d.ts.map +0 -0
  87. package/dist/esm/features/email.external-connectors-models.schemas.js +0 -0
  88. package/dist/esm/features/email.external-connectors-models.schemas.js.map +0 -0
  89. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts +0 -0
  90. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts.map +0 -0
  91. package/dist/esm/features/hooks.external-connectors-models.schemas.js +0 -0
  92. package/dist/esm/features/hooks.external-connectors-models.schemas.js.map +0 -0
  93. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts +0 -0
  94. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts.map +0 -0
  95. package/dist/esm/features/sms.external-connectors-models.schemas.js +0 -0
  96. package/dist/esm/features/sms.external-connectors-models.schemas.js.map +0 -0
  97. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts +0 -0
  98. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts.map +0 -0
  99. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js +0 -0
  100. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js.map +0 -0
  101. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts +0 -0
  102. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts.map +0 -0
  103. package/dist/esm/protocols/git.external-connectors-models.schemas.js +0 -0
  104. package/dist/esm/protocols/git.external-connectors-models.schemas.js.map +0 -0
  105. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts +0 -0
  106. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts.map +0 -0
  107. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js +0 -0
  108. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js.map +0 -0
  109. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts +0 -0
  110. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts.map +0 -0
  111. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js +0 -0
  112. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js.map +0 -0
  113. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +0 -37
  114. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +0 -1
  115. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +0 -10
  116. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +0 -1
  117. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts +0 -0
  118. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts.map +0 -0
  119. package/dist/esm/protocols/saml.external-connectors-models.schemas.js +0 -0
  120. package/dist/esm/protocols/saml.external-connectors-models.schemas.js.map +0 -0
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_Auth_Kind } from "./security.external-connectors-models.schemas";
3
2
  /**
4
3
  * The ONE protocol vocabulary a provider can speak. Every other list is derived from or pinned
5
4
  * to this enum: the backend runtime-contract discriminants (`ProviderProtocolRuntimeKind`, a
@@ -108,13 +107,6 @@ export declare enum APPLICATION_ENVIRONMENT {
108
107
  STAGING = "staging",
109
108
  PRODUCTION = "production"
110
109
  }
111
- export declare enum ExternalProvider_Status {
112
- ACTIVE = "active",
113
- INACTIVE = "inactive",
114
- BUZY = "busy",
115
- OFFLINE = "offline",
116
- DEPRECATED = "deprecated"
117
- }
118
110
  export declare enum API_HttpMethod {
119
111
  GET = "GET",
120
112
  POST = "POST",
@@ -125,128 +117,25 @@ export declare enum API_HttpMethod {
125
117
  OPTIONS = "OPTIONS"
126
118
  }
127
119
  /**
128
- * Shared protocol profile fields.
120
+ * Shared protocol configuration fields — the ONE survivor of the per-protocol profile /
121
+ * configuration / status triple (#965), and the reason it stays is a reader, not a legacy.
129
122
  *
130
- * These fields are transport-oriented hints that many protocols use, but they
131
- * are not universally meaningful. Execution-oriented protocols such as a local
132
- * CLI runtime should not need to invent fake HTTP endpoints or auth profiles
133
- * just to satisfy the shared contract.
134
- */
135
- export declare const ExternalProvider_ExchangeProtocol_Profile_BaseSchema: z.ZodObject<{
136
- endpoints: z.ZodOptional<z.ZodRecord<z.ZodEnum<typeof APPLICATION_ENVIRONMENT>, z.ZodString>>;
137
- availableAuthMethods: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof ExternalProvider_Auth_Kind>>>;
138
- authProfiles: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
139
- ref: z.ZodOptional<z.ZodString>;
140
- isDefault: z.ZodDefault<z.ZodBoolean>;
141
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
142
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.API_KEY>;
143
- locationField: z.ZodDefault<z.ZodString>;
144
- prefix: z.ZodOptional<z.ZodString>;
145
- }, z.core.$strip>, z.ZodObject<{
146
- ref: z.ZodOptional<z.ZodString>;
147
- isDefault: z.ZodDefault<z.ZodBoolean>;
148
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
149
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.HMAC_SIGNATURE>;
150
- locationField: z.ZodDefault<z.ZodString>;
151
- algorithm: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_HMAC_Signature_Algorithm>>;
152
- signaturePayload: z.ZodOptional<z.ZodEnum<{
153
- custom: "custom";
154
- body: "body";
155
- timestamp: "timestamp";
156
- }>>;
157
- timestampHeader: z.ZodOptional<z.ZodString>;
158
- nonceHeader: z.ZodOptional<z.ZodString>;
159
- }, z.core.$strip>, z.ZodObject<{
160
- ref: z.ZodOptional<z.ZodString>;
161
- isDefault: z.ZodDefault<z.ZodBoolean>;
162
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.BEARER>;
163
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
164
- locationField: z.ZodDefault<z.ZodString>;
165
- prefix: z.ZodDefault<z.ZodString>;
166
- format: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_Bearer_Format>>;
167
- }, z.core.$strip>, z.ZodObject<{
168
- ref: z.ZodOptional<z.ZodString>;
169
- isDefault: z.ZodDefault<z.ZodBoolean>;
170
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
171
- locationField: z.ZodDefault<z.ZodString>;
172
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.OPENID_CONNECT>;
173
- discoveryUrl: z.ZodOptional<z.ZodURL>;
174
- issuer: z.ZodOptional<z.ZodString>;
175
- audience: z.ZodOptional<z.ZodString>;
176
- validationMode: z.ZodOptional<z.ZodEnum<{
177
- jwks: "jwks";
178
- introspection: "introspection";
179
- local: "local";
180
- }>>;
181
- }, z.core.$strip>, z.ZodObject<{
182
- ref: z.ZodOptional<z.ZodString>;
183
- isDefault: z.ZodDefault<z.ZodBoolean>;
184
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
185
- locationField: z.ZodDefault<z.ZodString>;
186
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.OAUTH2>;
187
- oauth2ProviderRef: z.ZodOptional<z.ZodString>;
188
- authUrl: z.ZodOptional<z.ZodURL>;
189
- tokenUrl: z.ZodOptional<z.ZodURL>;
190
- refreshUrl: z.ZodOptional<z.ZodURL>;
191
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
192
- grantType: z.ZodOptional<z.ZodEnum<typeof import("./oauth2.enums").OAuth2_GrantType>>;
193
- tokenEndpointAuthMethod: z.ZodOptional<z.ZodEnum<typeof import("./oauth2.enums").OAuth2_TokenEndpoint_AuthMethod>>;
194
- pkce: z.ZodOptional<z.ZodBoolean>;
195
- pkceMethod: z.ZodOptional<z.ZodEnum<typeof import("./oauth2.enums").OAuth2_PKCE_Method>>;
196
- prompt: z.ZodOptional<z.ZodEnum<typeof import("./oauth2.enums").OAuth2_Prompt>>;
197
- accessType: z.ZodOptional<z.ZodEnum<typeof import("./oauth2.enums").OAuth2_AccessType>>;
198
- extraAuthParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
199
- extraTokenParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
200
- tokenFormat: z.ZodDefault<z.ZodEnum<{
201
- custom: "custom";
202
- bearer: "bearer";
203
- token: "token";
204
- oauth: "oauth";
205
- }>>;
206
- customTokenPrefix: z.ZodOptional<z.ZodString>;
207
- }, z.core.$strip>, z.ZodObject<{
208
- ref: z.ZodOptional<z.ZodString>;
209
- isDefault: z.ZodDefault<z.ZodBoolean>;
210
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
211
- locationField: z.ZodDefault<z.ZodString>;
212
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.BASIC>;
213
- usernameRef: z.ZodOptional<z.ZodString>;
214
- passwordRef: z.ZodOptional<z.ZodString>;
215
- }, z.core.$strip>, z.ZodObject<{
216
- ref: z.ZodOptional<z.ZodString>;
217
- isDefault: z.ZodDefault<z.ZodBoolean>;
218
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
219
- locationField: z.ZodDefault<z.ZodString>;
220
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.NONE>;
221
- }, z.core.$strip>, z.ZodObject<{
222
- ref: z.ZodOptional<z.ZodString>;
223
- isDefault: z.ZodDefault<z.ZodBoolean>;
224
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
225
- locationField: z.ZodDefault<z.ZodString>;
226
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.FRONTEND_SECRET>;
227
- frontendOnly: z.ZodDefault<z.ZodBoolean>;
228
- }, z.core.$strip>, z.ZodObject<{
229
- ref: z.ZodOptional<z.ZodString>;
230
- isDefault: z.ZodDefault<z.ZodBoolean>;
231
- location: z.ZodDefault<z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_ApiKey_Location>>;
232
- locationField: z.ZodDefault<z.ZodString>;
233
- kind: z.ZodLiteral<ExternalProvider_Auth_Kind.MUTUAL_TLS>;
234
- certificateRef: z.ZodOptional<z.ZodString>;
235
- privateKeyRef: z.ZodOptional<z.ZodString>;
236
- caRef: z.ZodOptional<z.ZodString>;
237
- }, z.core.$strip>], "kind">>>;
238
- }, z.core.$strip>;
239
- /**
240
- * Shared protocol configuration fields.
123
+ * `authConfig` is read on a resolved provider configuration by the OAuth2 connection resolver
124
+ * (`clientId`, `secretRef`) and by the registry's default-over-custom merge, and `enabled` is what
125
+ * a provider configuration parses at the boundary (`AgentClientProtocol_ConfigurationSchema`,
126
+ * `OAuth2Provider_ConfigurationSchema` extend this; the LLM and webhook configurations intersect
127
+ * with the inferred type). It is optional because execution-oriented protocols can own their own
128
+ * auth/runtime policy contract.
241
129
  *
242
- * `authConfig` remains available for protocols that resolve secrets through the
243
- * generic provider auth model, but it is optional because execution-oriented
244
- * protocols can own their own auth/runtime policy contract.
130
+ * What is gone: the profile base (a provider's transport facts now live on its runtime contract,
131
+ * `ProviderProtocolRuntimeContract`, which the registry projects) and the status base (nothing
132
+ * ever recorded a per-protocol status). Both had no reader outside the declarations that extended
133
+ * them.
245
134
  */
246
135
  export declare const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema: z.ZodObject<{
247
136
  enabled: z.ZodBoolean;
248
137
  authConfig: z.ZodOptional<z.ZodObject<{
249
- authKind: z.ZodEnum<typeof ExternalProvider_Auth_Kind>;
138
+ authKind: z.ZodEnum<typeof import("./security.external-connectors-models.schemas").ExternalProvider_Auth_Kind>;
250
139
  profileRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
251
140
  isDefault: z.ZodOptional<z.ZodBoolean>;
252
141
  secretRef: z.ZodString;
@@ -260,15 +149,7 @@ export declare const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema:
260
149
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
261
150
  }, z.core.$strip>>;
262
151
  }, z.core.$strip>;
263
- export declare const ExternalProvider_ExchangeProtocol_Status_BaseSchema: z.ZodObject<{
264
- protocolKind: z.ZodEnum<typeof ExternalProvider_ExchangeProtocol_Kind>;
265
- status: z.ZodEnum<typeof ExternalProvider_Status>;
266
- lastCheckedAt: z.ZodString;
267
- errorReason: z.ZodOptional<z.ZodString>;
268
- }, z.core.$strip>;
269
- export type ExternalProvider_ExchangeProtocol_Profile_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Profile_BaseSchema>;
270
152
  export type ExternalProvider_ExchangeProtocol_Configuration_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Configuration_BaseSchema>;
271
- export type ExternalProvider_ExchangeProtocol_Status_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Status_BaseSchema>;
272
153
  export declare enum ExternalProvider_IO_Direction {
273
154
  INBOUND = "inbound",
274
155
  OUTBOUND = "outbound",
@@ -1 +1 @@
1
- {"version":3,"file":"commons.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/core/commons.external-connectors-models.schemas.ts"],"names":[],"m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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/D,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,0DAA0D;;;;;;;;;;;;;;;;iBAIrE,CAAC;AAEH,eAAO,MAAM,mDAAmD;;;;;iBAK9D,CAAC;AAEH,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oDAAoD,CAAC,CAAC;AAClI,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0DAA0D,CAAC,CAAC;AAC9I,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mDAAmD,CAAC,CAAC;AAEhI,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"}
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,iGAAiG;IACjG,cAAc,mBAAmB;IACjC,mFAAmF;IACnF,cAAc,mBAAmB;IAGjC,cAAc,mBAAmB;IAGjC,UAAU,eAAe;IAIzB,gBAAgB,qBAAqB;IAGrC,YAAY,iBAAiB;IAG7B,YAAY,iBAAiB;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAY7B,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,MAAM,0DAA0D;;;;;;;;;;;;;;;;iBAIrE,CAAC;AAEH,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0DAA0D,CAAC,CAAC;AAE9I,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"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ExternalProvider_Auth_ConfigurationSchema, ExternalProvider_Auth_Kind, ExternalProvider_AuthProfile_Schema, ExternalProvider_RateLimitConfigurationSchema } from "./security.external-connectors-models.schemas.js";
2
+ import { ExternalProvider_Auth_ConfigurationSchema, ExternalProvider_RateLimitConfigurationSchema } from "./security.external-connectors-models.schemas.js";
3
3
  /**
4
4
  * The ONE protocol vocabulary a provider can speak. Every other list is derived from or pinned
5
5
  * to this enum: the backend runtime-contract discriminants (`ProviderProtocolRuntimeKind`, a
@@ -119,14 +119,6 @@ export var APPLICATION_ENVIRONMENT;
119
119
  APPLICATION_ENVIRONMENT["STAGING"] = "staging";
120
120
  APPLICATION_ENVIRONMENT["PRODUCTION"] = "production";
121
121
  })(APPLICATION_ENVIRONMENT || (APPLICATION_ENVIRONMENT = {}));
122
- export var ExternalProvider_Status;
123
- (function (ExternalProvider_Status) {
124
- ExternalProvider_Status["ACTIVE"] = "active";
125
- ExternalProvider_Status["INACTIVE"] = "inactive";
126
- ExternalProvider_Status["BUZY"] = "busy";
127
- ExternalProvider_Status["OFFLINE"] = "offline";
128
- ExternalProvider_Status["DEPRECATED"] = "deprecated";
129
- })(ExternalProvider_Status || (ExternalProvider_Status = {}));
130
122
  export var API_HttpMethod;
131
123
  (function (API_HttpMethod) {
132
124
  API_HttpMethod["GET"] = "GET";
@@ -138,36 +130,26 @@ export var API_HttpMethod;
138
130
  API_HttpMethod["OPTIONS"] = "OPTIONS";
139
131
  })(API_HttpMethod || (API_HttpMethod = {}));
140
132
  /**
141
- * Shared protocol profile fields.
133
+ * Shared protocol configuration fields — the ONE survivor of the per-protocol profile /
134
+ * configuration / status triple (#965), and the reason it stays is a reader, not a legacy.
142
135
  *
143
- * These fields are transport-oriented hints that many protocols use, but they
144
- * are not universally meaningful. Execution-oriented protocols such as a local
145
- * CLI runtime should not need to invent fake HTTP endpoints or auth profiles
146
- * just to satisfy the shared contract.
147
- */
148
- export const ExternalProvider_ExchangeProtocol_Profile_BaseSchema = z.object({
149
- endpoints: z.record(z.enum(APPLICATION_ENVIRONMENT), z.string()).optional(),
150
- availableAuthMethods: z.array(z.enum(ExternalProvider_Auth_Kind)).optional(),
151
- authProfiles: z.array(ExternalProvider_AuthProfile_Schema).optional(),
152
- });
153
- /**
154
- * Shared protocol configuration fields.
136
+ * `authConfig` is read on a resolved provider configuration by the OAuth2 connection resolver
137
+ * (`clientId`, `secretRef`) and by the registry's default-over-custom merge, and `enabled` is what
138
+ * a provider configuration parses at the boundary (`AgentClientProtocol_ConfigurationSchema`,
139
+ * `OAuth2Provider_ConfigurationSchema` extend this; the LLM and webhook configurations intersect
140
+ * with the inferred type). It is optional because execution-oriented protocols can own their own
141
+ * auth/runtime policy contract.
155
142
  *
156
- * `authConfig` remains available for protocols that resolve secrets through the
157
- * generic provider auth model, but it is optional because execution-oriented
158
- * protocols can own their own auth/runtime policy contract.
143
+ * What is gone: the profile base (a provider's transport facts now live on its runtime contract,
144
+ * `ProviderProtocolRuntimeContract`, which the registry projects) and the status base (nothing
145
+ * ever recorded a per-protocol status). Both had no reader outside the declarations that extended
146
+ * them.
159
147
  */
160
148
  export const ExternalProvider_ExchangeProtocol_Configuration_BaseSchema = z.object({
161
149
  enabled: z.boolean(),
162
150
  authConfig: ExternalProvider_Auth_ConfigurationSchema.optional(),
163
151
  rateLimitConfig: ExternalProvider_RateLimitConfigurationSchema.optional(),
164
152
  });
165
- export const ExternalProvider_ExchangeProtocol_Status_BaseSchema = z.object({
166
- protocolKind: z.enum(ExternalProvider_ExchangeProtocol_Kind),
167
- status: z.enum(ExternalProvider_Status),
168
- lastCheckedAt: z.string(),
169
- errorReason: z.string().optional(),
170
- });
171
153
  export var ExternalProvider_IO_Direction;
172
154
  (function (ExternalProvider_IO_Direction) {
173
155
  ExternalProvider_IO_Direction["INBOUND"] = "inbound";
@@ -1 +1 @@
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,0BAA0B,EAAE,mCAAmC,EAAE,6CAA6C,EAAE,MAAM,+CAA+C,CAAC;AAG1N;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAN,IAAY,sCA2EX;AA3ED,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,2EAAi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AQ,EAAE;CACnC,CAAC,CAAC;AAMH,MAAM,CAAN,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,oDAAmB,CAAA;IACnB,sDAAqB,CAAA;IACrB,gEAA+B,CAAA;AACjC,CAAC,EAJW,6BAA6B,KAA7B,6BAA6B,QAIxC;AAED,MAAM,CAAN,IAAY,sCAIX;AAJD,WAAY,sCAAsC;IAChD,+EAAqC,CAAA;IACrC,qEAA2B,CAAA;IAC3B,8DAAoB,CAAA;AACtB,CAAC,EAJW,sCAAsC,KAAtC,sCAAsC,QAIjD","sourcesContent":["import { z } from \"zod\";\nimport { ExternalProvider_Auth_ConfigurationSchema, ExternalProvider_Auth_Kind, ExternalProvider_AuthProfile_Schema, 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 // 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 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\nexport enum ExternalProvider_Status {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n BUZY = \"busy\",\n OFFLINE = \"offline\",\n DEPRECATED = \"deprecated\",\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 profile fields.\n *\n * These fields are transport-oriented hints that many protocols use, but they\n * are not universally meaningful. Execution-oriented protocols such as a local\n * CLI runtime should not need to invent fake HTTP endpoints or auth profiles\n * just to satisfy the shared contract.\n */\nexport const ExternalProvider_ExchangeProtocol_Profile_BaseSchema = z.object({\n endpoints: z.record(z.enum(APPLICATION_ENVIRONMENT), z.string()).optional(),\n availableAuthMethods: z.array(z.enum(ExternalProvider_Auth_Kind)).optional(),\n authProfiles: z.array(ExternalProvider_AuthProfile_Schema).optional(),\n});\n\n/**\n * Shared protocol configuration fields.\n *\n * `authConfig` remains available for protocols that resolve secrets through the\n * generic provider auth model, but it is optional because execution-oriented\n * protocols can own their own auth/runtime policy contract.\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 const ExternalProvider_ExchangeProtocol_Status_BaseSchema = z.object({\n protocolKind: z.enum(ExternalProvider_ExchangeProtocol_Kind),\n status: z.enum(ExternalProvider_Status),\n lastCheckedAt: z.string(),\n errorReason: z.string().optional(),\n});\n\nexport type ExternalProvider_ExchangeProtocol_Profile_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Profile_BaseSchema>;\nexport type ExternalProvider_ExchangeProtocol_Configuration_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Configuration_BaseSchema>;\nexport type ExternalProvider_ExchangeProtocol_Status_Base = z.infer<typeof ExternalProvider_ExchangeProtocol_Status_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,sCA2EX;AA3ED,WAAY,sCAAsC;IAChD,MAAM;IACN,+DAAqB,CAAA;IACrB,mFAAyC,CAAA;IACzC,SAAS;IAET,KAAK;IACL,uEAA6B,CAAA;IAC7B;;;;;;;;;;;;;;;OA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c;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;IACb,6BAAW,CAAA;IACX,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,qCAAmB,CAAA;AACrB,CAAC,EARW,cAAc,KAAd,cAAc,QAQzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,0DAA0D,GAAG,CAAC,CAAC,MAAM,CAAC;IACjF,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,UAAU,EAAE,yCAAyC,CAAC,QAAQ,EAAE;IAChE,eAAe,EAAE,6CAA6C,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAIH,MAAM,CAAN,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,oDAAmB,CAAA;IACnB,sDAAqB,CAAA;IACrB,gEAA+B,CAAA;AACjC,CAAC,EAJW,6BAA6B,KAA7B,6BAA6B,QAIxC;AAED,MAAM,CAAN,IAAY,sCAIX;AAJD,WAAY,sCAAsC;IAChD,+EAAqC,CAAA;IACrC,qEAA2B,CAAA;IAC3B,8DAAoB,CAAA;AACtB,CAAC,EAJW,sCAAsC,KAAtC,sCAAsC,QAIjD","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 /** 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 // 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 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"]}
@@ -76,7 +76,6 @@ export declare const ExternalProvider_AuthProfile_BaseSchema: z.ZodObject<{
76
76
  location: z.ZodDefault<z.ZodEnum<typeof ExternalProvider_Auth_ApiKey_Location>>;
77
77
  locationField: z.ZodDefault<z.ZodString>;
78
78
  }, z.core.$strip>;
79
- export type ExternalProvider_Auth_Configuration = z.infer<typeof ExternalProvider_Auth_ConfigurationSchema>;
80
79
  export type ExternalProvider_RateLimitConfiguration = z.infer<typeof ExternalProvider_RateLimitConfigurationSchema>;
81
80
  export type ExternalProvider_AuthProfile_Base = z.infer<typeof ExternalProvider_AuthProfile_BaseSchema>;
82
81
  /**
@@ -146,10 +145,10 @@ export declare const ExternalProvider_AuthProfile_Schema: z.ZodDiscriminatedUnio
146
145
  extraAuthParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
147
146
  extraTokenParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
148
147
  tokenFormat: z.ZodDefault<z.ZodEnum<{
149
- custom: "custom";
150
- bearer: "bearer";
151
148
  token: "token";
149
+ bearer: "bearer";
152
150
  oauth: "oauth";
151
+ custom: "custom";
153
152
  }>>;
154
153
  customTokenPrefix: z.ZodOptional<z.ZodString>;
155
154
  }, z.core.$strip>, z.ZodObject<{
@@ -266,8 +265,23 @@ export declare enum ExternalProvider_SecretScope {
266
265
  * | APPLICATION × SERVICE | a platform API key |
267
266
  * | APPLICATION × USER | the application's service identity impersonating a user |
268
267
  * | ORGANIZATION × SERVICE | the tenant's own bot or workspace token |
269
- * | ORGANIZATION × USER | the tenant's registration, acting for one of its members |
270
- * | USER × SERVICE | a personal key the user authored |
268
+ * | ORGANIZATION × USER | ONE member's own account, linked for the whole organization |
269
+ * | USER × SERVICE | a person's own account, for that person |
270
+ *
271
+ * ## `ORGANIZATION × USER`, decided 2026-09-12 (Paul, recorded on wildo-ai/wildo-ai#18)
272
+ *
273
+ * A member connects THEIR OWN vendor account on the organization's behalf — the common pattern that
274
+ * lets a tenant integrate without a service account. There is ONE grant per organization, and every
275
+ * member's call spends it transparently. The member who links it carries the responsibility for
276
+ * that: they are trusting their colleagues' activity with their account, they ACKNOWLEDGE it when
277
+ * they link, and that acknowledgement is the whole control — no per-call gate. What the audit trail
278
+ * must then say, on every call, is WHOSE account was spent: the member who linked it.
279
+ *
280
+ * So the person behind this shape is fixed by the GRANT, not by the call, which is why a call never
281
+ * names `actingForUserId` for it. The rejected readings are worth keeping: per-member grants keyed
282
+ * `(organization, member)` is a real model and not what this shape means here; and requiring the
283
+ * call to name the linking member would stop every other member using a grant that exists to be
284
+ * shared. A person's connection for themselves is the USER-owned row.
271
285
  *
272
286
  * OAuth 2.0 carries the same split in its grant types: the client is the REGISTRATION, and the grant
273
287
  * decides on whose behalf a token is minted.
@@ -302,9 +316,9 @@ export declare const ExternalProvider_ConnectionShapeSchema: z.ZodObject<{
302
316
  *
303
317
  * The capability and the call are the same two axes and different objects, which is why this is a
304
318
  * separate schema rather than the target with its identifiers made optional. A provider admitting
305
- * `ORGANIZATION × USER` says nothing about which organization; a call naming an organization and no
306
- * user is incomplete. Making one schema serve both would have to relax exactly the refinements that
307
- * make the call safe.
319
+ * `ORGANIZATION × USER` says nothing about which organization; a call naming no organization is
320
+ * incomplete. Making one schema serve both would have to relax exactly the refinements that make the
321
+ * call safe.
308
322
  */
309
323
  export type ExternalProvider_ConnectionShape = z.infer<typeof ExternalProvider_ConnectionShapeSchema>;
310
324
  export declare const ExternalProvider_ConnectionTargetSchema: z.ZodObject<{
@@ -313,5 +327,23 @@ export declare const ExternalProvider_ConnectionTargetSchema: z.ZodObject<{
313
327
  ownerId: z.ZodOptional<z.ZodString>;
314
328
  actingForUserId: z.ZodOptional<z.ZodString>;
315
329
  }, z.core.$strip>;
330
+ /**
331
+ * Whether a connection target must NAME the user it acts for — true only for APPLICATION × USER.
332
+ *
333
+ * One predicate rather than a condition restated at each builder: the target schema, the HTTP-API
334
+ * binding's target builder and the connect panel all ask this question, and three spellings of it
335
+ * are how a target comes to carry a person the refinement then refuses.
336
+ */
337
+ export declare function connectionTargetNamesActingUser(shape: ExternalProvider_ConnectionShape): boolean;
338
+ /**
339
+ * Whether linking this connection lends ONE member's own account to their whole organization —
340
+ * true only for ORGANIZATION × USER.
341
+ *
342
+ * The member who links such a connection is trusting every colleague's activity with their account,
343
+ * so the connect surface asks them to ACKNOWLEDGE it and the connect leg refuses a link that did not
344
+ * (decision on wildo-ai/wildo-ai#18). One predicate for the panel that shows the acknowledgement and
345
+ * the controller that requires it, so the two cannot come to disagree about which links owe one.
346
+ */
347
+ export declare function connectionLendsMemberAccountToOrganization(shape: ExternalProvider_ConnectionShape): boolean;
316
348
  export type ExternalProvider_ConnectionTarget = z.infer<typeof ExternalProvider_ConnectionTargetSchema>;
317
349
  //# sourceMappingURL=security.external-connectors-models.schemas.d.ts.map
@@ -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,eAAO,MAAM,6CAA6C;;;;;;;iBAkBxD,CAAC;AAMH,eAAO,MAAM,uCAAuC;;;;;;iBAelD,CAAC;AAMH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAC5G,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6CAA6C,CAAC,CAAC;AACpH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AAMxG;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAmI9C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAM/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,sCAAsC;IAChD,qGAAqG;IACrG,WAAW,gBAAgB;IAC3B,mGAAmG;IACnG,YAAY,iBAAiB;IAC7B,uFAAuF;IACvF,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oBAAY,4BAA4B;IACtC;;;OAGG;IACH,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oBAAY,0CAA0C;IACpD,2EAA2E;IAC3E,OAAO,YAAY;IACnB,wFAAwF;IACxF,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sCAAsC;;;iBAIjD,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,eAAO,MAAM,uCAAuC;;;;;iBA2ClD,CAAC;AAEH,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,E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O,mCAAmC,CAAC,CAAC;AAM/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,sCAAsC;IAChD,qGAAqG;IACrG,WAAW,gBAAgB;IAC3B,mGAAmG;IACnG,YAAY,iBAAiB;IAC7B,uFAAuF;IACvF,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oBAAY,4BAA4B;IACtC;;;OAGG;IACH,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,oBAAY,0CAA0C;IACpD,2EAA2E;IAC3E,OAAO,YAAY;IACnB,wFAAwF;IACxF,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sCAAsC;;;iBAIjD,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,eAAO,MAAM,uCAAuC;;;;;iBAkDlD,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,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"}
@@ -317,8 +317,23 @@ export var ExternalProvider_SecretScope;
317
317
  * | APPLICATION × SERVICE | a platform API key |
318
318
  * | APPLICATION × USER | the application's service identity impersonating a user |
319
319
  * | ORGANIZATION × SERVICE | the tenant's own bot or workspace token |
320
- * | ORGANIZATION × USER | the tenant's registration, acting for one of its members |
321
- * | USER × SERVICE | a personal key the user authored |
320
+ * | ORGANIZATION × USER | ONE member's own account, linked for the whole organization |
321
+ * | USER × SERVICE | a person's own account, for that person |
322
+ *
323
+ * ## `ORGANIZATION × USER`, decided 2026-09-12 (Paul, recorded on wildo-ai/wildo-ai#18)
324
+ *
325
+ * A member connects THEIR OWN vendor account on the organization's behalf — the common pattern that
326
+ * lets a tenant integrate without a service account. There is ONE grant per organization, and every
327
+ * member's call spends it transparently. The member who links it carries the responsibility for
328
+ * that: they are trusting their colleagues' activity with their account, they ACKNOWLEDGE it when
329
+ * they link, and that acknowledgement is the whole control — no per-call gate. What the audit trail
330
+ * must then say, on every call, is WHOSE account was spent: the member who linked it.
331
+ *
332
+ * So the person behind this shape is fixed by the GRANT, not by the call, which is why a call never
333
+ * names `actingForUserId` for it. The rejected readings are worth keeping: per-member grants keyed
334
+ * `(organization, member)` is a real model and not what this shape means here; and requiring the
335
+ * call to name the linking member would stop every other member using a grant that exists to be
336
+ * shared. A person's connection for themselves is the USER-owned row.
322
337
  *
323
338
  * OAuth 2.0 carries the same split in its grant types: the client is the REGISTRATION, and the grant
324
339
  * decides on whose behalf a token is minted.
@@ -357,9 +372,13 @@ export const ExternalProvider_ConnectionTargetSchema = ExternalProvider_Connecti
357
372
  */
358
373
  ownerId: z.string().optional(),
359
374
  /**
360
- * The user the act is performed for, when `delegation` is USER. Independent of `ownerId`: a
361
- * tenant-owned connection acting for one of its members carries an organization in `ownerId` and a
362
- * person here.
375
+ * The user an APPLICATION-owned, USER-delegated call impersonates — the ONLY shape where the call
376
+ * itself must say who, because the application's identity could impersonate anyone.
377
+ *
378
+ * Refused everywhere else. An ORGANIZATION-owned USER-delegated connection spends the account of
379
+ * the member who LINKED it, whoever triggers the call (see the decision above), so a person named
380
+ * here would describe an identity the runtime will not act as. A USER-owned connection already
381
+ * names its person in `ownerId`.
363
382
  */
364
383
  actingForUserId: z.string().optional(),
365
384
  }).superRefine((target, ctx) => {
@@ -378,20 +397,48 @@ export const ExternalProvider_ConnectionTargetSchema = ExternalProvider_Connecti
378
397
  message: 'An application-owned connection has exactly one instance, so an ownerId here names something that does not exist.',
379
398
  });
380
399
  }
381
- const delegated = target.delegation === ExternalProvider_Connection_DelegationMode.USER;
382
- if (delegated && (target.actingForUserId === undefined || target.actingForUserId === '')) {
383
- ctx.addIssue({
384
- code: 'custom',
385
- path: ['actingForUserId'],
386
- message: 'A delegated call acts FOR someone, and the user it acts for is what makes it permissible — it cannot be left to be inferred.',
387
- });
400
+ if (connectionTargetNamesActingUser(target)) {
401
+ if (target.actingForUserId === undefined || target.actingForUserId === '') {
402
+ ctx.addIssue({
403
+ code: 'custom',
404
+ path: ['actingForUserId'],
405
+ message: 'An application-owned delegated call impersonates someone, and who is what makes it permissible — it cannot be left to be inferred.',
406
+ });
407
+ }
388
408
  }
389
- if (!delegated && target.actingForUserId !== undefined) {
409
+ else if (target.actingForUserId !== undefined) {
390
410
  ctx.addIssue({
391
411
  code: 'custom',
392
412
  path: ['actingForUserId'],
393
- message: 'A SERVICE call acts for nobody. Naming a user here reads as delegation the runtime will not perform, which is worse than an error: the call succeeds as the wrong identity.',
413
+ message: target.delegation === ExternalProvider_Connection_DelegationMode.USER
414
+ ? `A ${target.ownerScope}-owned connection's person is fixed by the account itself — the member who linked it, or the owner. `
415
+ + 'Naming a user here describes an identity the runtime will not act as.'
416
+ : 'A SERVICE call acts for nobody. Naming a user here reads as delegation the runtime will not perform, which is worse than an error: the call succeeds as the wrong identity.',
394
417
  });
395
418
  }
396
419
  });
420
+ /**
421
+ * Whether a connection target must NAME the user it acts for — true only for APPLICATION × USER.
422
+ *
423
+ * One predicate rather than a condition restated at each builder: the target schema, the HTTP-API
424
+ * binding's target builder and the connect panel all ask this question, and three spellings of it
425
+ * are how a target comes to carry a person the refinement then refuses.
426
+ */
427
+ export function connectionTargetNamesActingUser(shape) {
428
+ return shape.ownerScope === ExternalProvider_Connection_OwnerScope.APPLICATION
429
+ && shape.delegation === ExternalProvider_Connection_DelegationMode.USER;
430
+ }
431
+ /**
432
+ * Whether linking this connection lends ONE member's own account to their whole organization —
433
+ * true only for ORGANIZATION × USER.
434
+ *
435
+ * The member who links such a connection is trusting every colleague's activity with their account,
436
+ * so the connect surface asks them to ACKNOWLEDGE it and the connect leg refuses a link that did not
437
+ * (decision on wildo-ai/wildo-ai#18). One predicate for the panel that shows the acknowledgement and
438
+ * the controller that requires it, so the two cannot come to disagree about which links owe one.
439
+ */
440
+ export function connectionLendsMemberAccountToOrganization(shape) {
441
+ return shape.ownerScope === ExternalProvider_Connection_OwnerScope.ORGANIZATION
442
+ && shape.delegation === ExternalProvider_Connection_DelegationMode.USER;
443
+ }
397
444
  //# sourceMappingURL=security.external-connectors-models.schemas.js.map