@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,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { ExternalProvider_OperationContextSchema, } from "../core/operations.external-connectors-models.schemas.js";
3
- import { APPLICATION_ENVIRONMENT, ExternalProvider_ExchangeProtocol_Configuration_BaseSchema, ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_BaseSchema, ExternalProvider_ExchangeProtocol_Status_BaseSchema, } from "../core/commons.external-connectors-models.schemas.js";
3
+ import { APPLICATION_ENVIRONMENT, ExternalProvider_ExchangeProtocol_Configuration_BaseSchema, ExternalProvider_ExchangeProtocol_Kind, } from "../core/commons.external-connectors-models.schemas.js";
4
4
  //===============================================================
5
5
  // Agent Client Protocol (ACP)
6
6
  // --------
@@ -99,17 +99,9 @@ export var AgentClientProtocol_WorkingDirectoryPolicy;
99
99
  * what lets an application say "no session started from this profile may ever
100
100
  * skip the permission gate" independently of what any individual run requests.
101
101
  *
102
- * Ordering is meaningful and increasing over all FIVE members: PROMPT_ALWAYS <
103
- * AUTO_ACCEPT_READS < AUTO_ACCEPT_EDITS < AUTO_ACCEPT_READS_AND_EDITS <
104
- * UNRESTRICTED. Compare through {@link agentClientProtocolPermissionCeilingRank}
105
- * rather than by string, so the ordering has one definition.
106
- *
107
- * Read that order as a CLAMP — how much is pre-approved without a human — and never
108
- * as containment. The ceilings are kind-SETS and are deliberately not nested:
109
- * AUTO_ACCEPT_EDITS outranks AUTO_ACCEPT_READS and still refuses `fetch`, which is
110
- * exactly why AUTO_ACCEPT_READS_AND_EDITS had to be added rather than being implied
111
- * by the higher rank. Each member's own docstring states the set it admits, and the
112
- * rank function carries the full argument for why containment is the wrong reading.
102
+ * Policies describe admitted tool-kind sets, not nested levels. Invocation overrides
103
+ * intersect those sets with the profile: READS and EDITS have an empty intersection.
104
+ * The rank helper is a presentation ordering only and must not select authority.
113
105
  */
114
106
  /** @wildo_source:part:start acp.permission-ceiling facet:layer:config facet:audience:app-developer */
115
107
  export var AgentClientProtocol_PermissionCeiling;
@@ -177,28 +169,42 @@ export var AgentClientProtocol_PermissionCeiling;
177
169
  * can fetch anything and write only its evidence directory.
178
170
  */
179
171
  AgentClientProtocol_PermissionCeiling["AUTO_ACCEPT_READS_AND_EDITS"] = "auto_accept_reads_and_edits";
180
- /** No permission gate. Reserve for a disposable or isolated workspace. */
172
+ /**
173
+ * No permission gate: every tool kind is pre-approved, `execute` and the unclassified `other`
174
+ * included. Reserve for a disposable or isolated workspace.
175
+ *
176
+ * **This member also removes the task's mutation scope for shell commands, and that is a property
177
+ * of shell commands rather than of this value.** The scope predicate runs AFTER the ceiling and
178
+ * denies any location the task did not authorise even here — so declared file EDITS stay confined.
179
+ * But it decides on the `locations` a permission request carries, and a shell command carries
180
+ * NONE, because what a command writes is not derivable from the command string. Every ceiling
181
+ * below this one refuses `execute` outright, so the empty-location case never reaches the
182
+ * predicate; under this one it does, and `locations.some(...)` over an empty array is vacuously
183
+ * satisfied. A mutating command therefore reaches the workspace inside a complete, well-formed
184
+ * permission record showing it was allowed.
185
+ *
186
+ * Not closable by deriving a scope from the command: any parse is defeated by `sh -c "$CMD"` or a
187
+ * redirect through a substituted path, and an invented scope that can be walked around is worse
188
+ * than a stated absence. So the residual exposure under this member is exactly "shell commands are
189
+ * unbounded", the answer to it is git plus the post-run change set, and the companion WARNS on
190
+ * every run whose mutation followed a permitted act that declared no location — which is how it
191
+ * stops being invisible. Author this member to state that plainly; do not author it expecting the
192
+ * mutation scope to hold for commands.
193
+ *
194
+ * Note this is a DIFFERENT hole from an agent that never asks (see
195
+ * {@link AgentClientProtocol_PermissionEscalationBehaviour}): that one costs you both guards for
196
+ * every act, and dispatch refuses a narrower ceiling against such an agent. This one costs you the
197
+ * scope guard for one act kind, against a fully compliant agent.
198
+ */
181
199
  AgentClientProtocol_PermissionCeiling["UNRESTRICTED"] = "unrestricted";
182
200
  })(AgentClientProtocol_PermissionCeiling || (AgentClientProtocol_PermissionCeiling = {}));
183
201
  /** @wildo_source:part:end acp.permission-ceiling */
184
202
  /**
185
- * Increasing rank for {@link AgentClientProtocol_PermissionCeiling}; the single ordering definition.
186
- *
187
- * ## It is a CLAMP order, not a subset lattice — and that distinction is load-bearing
188
- *
189
- * Rank answers one question: how much is pre-approved without a human. It is used to LOWER a
190
- * request that asks for more autonomy than its profile allows, never to reason about which
191
- * permissions contain which.
192
- *
193
- * The sets are deliberately NOT nested. {@link AgentClientProtocol_PermissionCeiling.AUTO_ACCEPT_EDITS}
194
- * (rank 2) admits the mutating kinds and still refuses `fetch`, while
195
- * {@link AgentClientProtocol_PermissionCeiling.AUTO_ACCEPT_READS} (rank 1) admits `fetch` and refuses
196
- * every mutating kind. Reading rank as containment would say the higher ceiling must also admit
197
- * `fetch` — and making that true would hand every coding agent network access as a side effect of
198
- * building a research lane. That is a change to the coding lane's posture and it needs its own
199
- * evidence, not a corollary. Clamping still behaves correctly: a coding profile lowered to
200
- * AUTO_ACCEPT_READS may fetch and may not edit, which is exactly what asking for less autonomy in
201
- * the read direction should mean.
203
+ * Stable presentation order for {@link AgentClientProtocol_PermissionCeiling}.
204
+ *
205
+ * Never use this rank to authorize or clamp a request. READS and EDITS admit disjoint
206
+ * tool-kind sets; choosing the numerically lower one can grant operations forbidden
207
+ * by the profile. Dispatch computes their intersection instead.
202
208
  */
203
209
  export function agentClientProtocolPermissionCeilingRank(ceiling) {
204
210
  switch (ceiling) {
@@ -220,11 +226,12 @@ export function agentClientProtocolPermissionCeilingRank(ceiling) {
220
226
  *
221
227
  * # Why a permission ceiling needs this to mean anything
222
228
  *
223
- * Both of Wildo's in-flight controls are enforced in the CLIENT's ANSWER to a
229
+ * For agent-owned I/O, Wildo's in-flight controls are enforced in the CLIENT's ANSWER to a
224
230
  * permission request: {@link AgentClientProtocol_PermissionCeiling} decides the
225
231
  * tool KIND, and the dispatch's location predicate decides the PATHS. Neither is
226
232
  * a sandbox, an interposed filesystem, or a syscall filter — they are answers.
227
- * So an agent that writes without asking is bound by neither, and the ceiling
233
+ * Client-hosted writes independently check both controls. An agent doing its OWN I/O
234
+ * without asking is bound by neither, and the ceiling
228
235
  * an application authored is a LABEL rather than a guarantee.
229
236
  *
230
237
  * That is not hypothetical and it is not a fault in the agents. MEASURED with
@@ -349,6 +356,71 @@ export var AgentClientProtocol_HostConfigurationInheritance;
349
356
  AgentClientProtocol_HostConfigurationInheritance["HOST_INHERITED"] = "host_inherited";
350
357
  })(AgentClientProtocol_HostConfigurationInheritance || (AgentClientProtocol_HostConfigurationInheritance = {}));
351
358
  /** @wildo_source:part:end acp.host-configuration-inheritance */
359
+ /** @wildo_source:part:start acp.execution-profile facet:layer:config facet:audience:app-developer */
360
+ /**
361
+ * WHERE a coding run's content actually goes, per MODEL (issue #308, join 2).
362
+ *
363
+ * An ACP coding session sends the composed task prompt, retrieved context and — through the agent's
364
+ * own file reads — the application's SOURCE CODE to the selected model vendor. For an application
365
+ * built with Wildo that can include the customer's domain model, schemas, seed data shapes and
366
+ * business rules. So the destination is a processor-register fact, not a runtime detail.
367
+ *
368
+ * ## Why this is per MODEL and not per provider
369
+ *
370
+ * A generalist agent routes to several vendors, so its OWN legal identity is not the identity of the
371
+ * vendor a given run reaches: OpenCode is a binary on the host, and the same profile can send code to
372
+ * Anthropic or to OpenAI depending on one model id. A per-provider declaration structurally cannot
373
+ * express that — it would name the agent's publisher as the recipient of code the publisher never
374
+ * receives, which is false in the direction a reader cannot check.
375
+ *
376
+ * ## Why it lives on the EXECUTION PROFILE
377
+ *
378
+ * The profile is already where an application authors the policy it owns, and the model is selected at
379
+ * dispatch time against that profile. The competing home — `providerComplianceChoices`, where every
380
+ * other compliance answer lives — cannot carry it: that surface is keyed by provider ref and has one
381
+ * entry per provider, which is exactly the shape that cannot say "per model".
382
+ *
383
+ * `ApplicationProviderComplianceChoice` warns against putting a compliance answer somewhere "nothing
384
+ * can read it without knowing the provider", and `providerConfigurations` is genuinely an opaque
385
+ * `Record<string, unknown>` bag. That objection is answered rather than ignored:
386
+ * {@link readCodingModelDestinations} is the named reader, exported beside this schema, and the
387
+ * compliance renderer calls it instead of reaching into the bag and guessing a shape. The hazard the
388
+ * warning names is a fact nobody can FIND; a named reader is what removes it.
389
+ */
390
+ export const AgentClientProtocol_ModelDestinationSchema = z.object({
391
+ /**
392
+ * The legal entity that receives the code — the model vendor, NOT the agent's publisher.
393
+ *
394
+ * Required, because a destination that cannot be named is not a destination a processor register can
395
+ * state. There is no framework default: the framework does not know which account an operator
396
+ * authorised, and inventing one would publish a recipient nobody declared.
397
+ */
398
+ vendorLegalEntityName: z.string().trim().min(1),
399
+ /**
400
+ * Where that vendor processes it.
401
+ *
402
+ * Open strings for the same reason `ProviderComplianceProfile.processingRegions` uses them: these
403
+ * are the VENDOR's own labels and a closed enum here would be this repository inventing a
404
+ * vocabulary it does not own.
405
+ */
406
+ processingRegions: z.array(z.string().trim().min(1)).min(1),
407
+ /**
408
+ * The INTERMEDIARY, when the run reaches the vendor through one (issue #308, join 3).
409
+ *
410
+ * A hosted gateway — OpenCode Zen, an Anthropic-compatible proxy reached through a base-URL
411
+ * override — receives the content before the vendor does. It is therefore its own processor and must
412
+ * appear as a sub-processor DISTINCT from the vendor behind it: naming only the vendor understates
413
+ * the chain by one party, and naming only the gateway understates it by the other.
414
+ *
415
+ * Absent means the run reaches the vendor directly. That is a claim, not a silence — declaring a
416
+ * destination at all is what makes it one.
417
+ */
418
+ gateway: z.object({
419
+ legalEntityName: z.string().trim().min(1),
420
+ processingRegions: z.array(z.string().trim().min(1)).min(1),
421
+ }).optional(),
422
+ }).strict();
423
+ /** @wildo_source:part:end acp.execution-profile */
352
424
  /**
353
425
  * One authored way to start an ACP agent.
354
426
  *
@@ -441,6 +513,16 @@ export const AgentClientProtocol_ExecutionProfileSchema = z.object({
441
513
  * reporting loss; losing the run is a work loss.
442
514
  */
443
515
  maximumRecordedEventBytes: z.number().int().positive().optional(),
516
+ /**
517
+ * Per-model processing destinations — see {@link AgentClientProtocol_ModelDestinationSchema}.
518
+ *
519
+ * OPTIONAL, and its absence is REPORTED rather than refused. A stale framework region list must not
520
+ * be able to brick an application build, and an operator who has just moved a vendor should be able
521
+ * to say so before the framework catches up — the same warn-do-not-block posture
522
+ * `appAssertedProcessingRegions` already takes for provider regions. The compliance brief names a
523
+ * coding profile that declares none, so the gap is visible without being fatal.
524
+ */
525
+ modelDestinations: z.record(z.string().trim().min(1), AgentClientProtocol_ModelDestinationSchema).optional(),
444
526
  /**
445
527
  * Opaque, agent-specific options passed as `_meta` on `session/new`.
446
528
  *
@@ -509,51 +591,6 @@ export const AgentClientProtocol_ExecutionProfileSchema = z.object({
509
591
  }
510
592
  });
511
593
  /** @wildo_source:part:end acp.execution-profile */
512
- /**
513
- * Transport capability metadata for an ACP-speaking provider.
514
- *
515
- * Note how little is declared here compared with a one-shot CLI contract, and
516
- * why: ACP agents advertise their own capabilities, session modes and available
517
- * commands during `initialize` and `session/new`. Re-declaring any of that in
518
- * authored configuration would create a second source of truth that drifts the
519
- * first time the agent is upgraded. What remains is what the HOST must know
520
- * before it opens a connection.
521
- */
522
- export const AgentClientProtocol_ProfileSchema = ExternalProvider_ExchangeProtocol_Profile_BaseSchema.extend({
523
- supportedRunnerHosts: z.array(z.enum(AgentClientProtocol_RunnerHost)).default([
524
- AgentClientProtocol_RunnerHost.BACKEND_SUBPROCESS,
525
- ]),
526
- /**
527
- * The ACP major versions this provider is known to speak.
528
- *
529
- * ACP negotiates a single integer at `initialize`: the client offers its
530
- * latest, the agent answers with that or its own. This list is what the
531
- * runner is willing to accept in that answer — an agent that returns anything
532
- * else is refused rather than spoken to hopefully.
533
- */
534
- supportedProtocolVersions: z.array(z.number().int().positive()).min(1).default([1]),
535
- /**
536
- * The semantic operations this transport can execute truthfully.
537
- *
538
- * Kept as strings to avoid a circular runtime import with the operation
539
- * family that consumes this protocol — the same reason the CLI contract this
540
- * replaces did so.
541
- */
542
- supportedOperationKeys: z.array(z.string().min(1)).min(1),
543
- /**
544
- * The semantic models valid on this transport.
545
- *
546
- * The agent also advertises its own model options per session; this list is
547
- * the authored subset an application is willing to select from, and it is
548
- * what a requested model is validated against before a session is opened.
549
- */
550
- supportedModels: z.array(z.string().min(1)).min(1),
551
- supportedAuthModes: z.array(z.enum(AgentClientProtocol_AuthMode)).default([
552
- AgentClientProtocol_AuthMode.NONE,
553
- AgentClientProtocol_AuthMode.HOST_MANAGED,
554
- AgentClientProtocol_AuthMode.SECRET_REF_ENV_INJECTION,
555
- ]),
556
- });
557
594
  export const AgentClientProtocol_ConfigurationSchema = ExternalProvider_ExchangeProtocol_Configuration_BaseSchema.extend({
558
595
  defaultExecutionProfileRef: z.string().optional(),
559
596
  executionProfiles: z.record(z.string(), AgentClientProtocol_ExecutionProfileSchema),
@@ -566,20 +603,6 @@ export const AgentClientProtocol_ConfigurationSchema = ExternalProvider_Exchange
566
603
  });
567
604
  }
568
605
  });
569
- export const AgentClientProtocol_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({
570
- protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL),
571
- /** The version actually agreed at the last `initialize`, when one succeeded. */
572
- negotiatedProtocolVersion: z.number().int().positive().optional(),
573
- /**
574
- * The agent's self-reported identity from its last `initialize` response.
575
- *
576
- * Recorded because the agent is an independently released dependency: when a
577
- * run starts behaving differently, "which build answered" is the first
578
- * question, and it is not answerable from anything Wildo authored.
579
- */
580
- observedAgentName: z.string().optional(),
581
- observedAgentVersion: z.string().optional(),
582
- });
583
606
  //===============================================================
584
607
  // Coding-agent operation family
585
608
  // --------
@@ -705,7 +728,13 @@ export const CodingAgent_SessionSuspensionSchema = z.strictObject({
705
728
  * context — a degradation the caller should surface, not hide.
706
729
  */
707
730
  resumable: z.boolean(),
708
- /** When the parked child process will be closed (ISO timestamp). */
731
+ /**
732
+ * An INFORMATIONAL freshness bound for the question (ISO timestamp), surfaced to the operator —
733
+ * never a reaping deadline. No child process is held open while a run is parked (see
734
+ * `awaitingInputTtlMs`), so there is nothing that closes at this instant. It said "when the parked
735
+ * child process will be closed" until 2026-09-24, contradicting the contract above it, and a host
736
+ * read it that way and aborted answerable questions at boot (#1533).
737
+ */
709
738
  parkedUntil: z.string().optional(),
710
739
  });
711
740
  /**
@@ -844,8 +873,8 @@ export const CodingAgent_RunTaskInputSchema = z.object({
844
873
  /**
845
874
  * The autonomy this particular run asks for.
846
875
  *
847
- * CLAMPED, never honoured blindly: the runner takes the lower of this and the
848
- * execution profile's `permissionCeiling`. Absent means the profile's ceiling
876
+ * INTERSECTED, never honoured blindly: dispatch admits only tool kinds shared by
877
+ * this policy and the execution profile's `permissionCeiling`. Absent means the profile's ceiling
849
878
  * — which is itself the safe default — so omitting it can never widen
850
879
  * authority, only leave it where the profile put it.
851
880
  */
@@ -928,4 +957,69 @@ export const CodingAgent_RunTaskOutputSchema = z.object({
928
957
  */
929
958
  suspension: CodingAgent_SessionSuspensionSchema.optional(),
930
959
  });
960
+ /**
961
+ * Read per-model coding destinations out of an application's provider configurations.
962
+ *
963
+ * ## Why this function exists at all
964
+ *
965
+ * `providerConfigurations` is `Record<string, Record<string, unknown>>` — genuinely opaque, and
966
+ * `ApplicationProviderComplianceChoice` warns for that reason that "a compliance answer must not live
967
+ * somewhere nothing can read it without knowing the provider". The destination has to live there
968
+ * anyway (it is per MODEL, and no per-provider surface can hold it), so the objection is answered by
969
+ * making the reader NAMED and exported beside the schema instead of leaving each consumer to reach in
970
+ * and guess a shape. A compliance renderer calls this; it never parses the bag.
971
+ *
972
+ * ## What it does with malformed input
973
+ *
974
+ * SKIPS it, silently, and this is deliberate rather than lax. The function's job is to report what an
975
+ * application declared, and it is called from a compliance BRIEF — a lane that must not fail because
976
+ * one provider's opaque configuration has an unexpected shape. A profile whose destinations do not
977
+ * parse contributes nothing and therefore surfaces in `profilesWithoutDestinations`, which is the
978
+ * honest reading: nothing usable was declared.
979
+ *
980
+ * Nothing is lost by that leniency, because a malformed profile is ALREADY refused where it matters:
981
+ * `getAgentClientProtocolExecutionProfile` parses every profile through
982
+ * {@link AgentClientProtocol_ExecutionProfileSchema} when a run resolves one, and throws
983
+ * `ErrorType.CONFIGURATION` naming the provider and profile. So a bad destination fails the CODING RUN
984
+ * loudly, with an author present, while the compliance brief still reports the other twenty providers.
985
+ * Two surfaces, two correct answers — and note that the profile schema is `.strict()`, so before
986
+ * `modelDestinations` existed as a declared field an application COULD NOT have authored it at all.
987
+ */
988
+ export function readCodingModelDestinations(
989
+ /*
990
+ * `unknown` per value, not `Record<string, unknown>`, because that is what the bag genuinely is at
991
+ * every consumer — `ProviderConfigurations` types each entry as optional and the companion's own
992
+ * local view types it as `unknown`. Declaring a narrower parameter would push a cast onto every
993
+ * caller, which is how a reader written to STOP callers guessing a shape starts making them assert
994
+ * one.
995
+ */
996
+ providerConfigurations) {
997
+ const destinations = [];
998
+ const profilesWithoutDestinations = [];
999
+ for (const providerRef of Object.keys(providerConfigurations).sort()) {
1000
+ const providerConfiguration = providerConfigurations[providerRef];
1001
+ if (providerConfiguration === null || typeof providerConfiguration !== 'object')
1002
+ continue;
1003
+ const acpConfiguration = providerConfiguration[ExternalProvider_ExchangeProtocol_Kind.AGENT_CLIENT_PROTOCOL];
1004
+ if (acpConfiguration === null || typeof acpConfiguration !== 'object')
1005
+ continue;
1006
+ const profiles = acpConfiguration.executionProfiles;
1007
+ if (profiles === null || typeof profiles !== 'object')
1008
+ continue;
1009
+ for (const executionProfileRef of Object.keys(profiles).sort()) {
1010
+ const profile = profiles[executionProfileRef];
1011
+ const declared = profile?.modelDestinations;
1012
+ const parsed = z.record(z.string().trim().min(1), AgentClientProtocol_ModelDestinationSchema)
1013
+ .safeParse(declared);
1014
+ if (!parsed.success || Object.keys(parsed.data).length === 0) {
1015
+ profilesWithoutDestinations.push({ providerRef, executionProfileRef });
1016
+ continue;
1017
+ }
1018
+ for (const model of Object.keys(parsed.data).sort()) {
1019
+ destinations.push({ providerRef, executionProfileRef, model, destination: parsed.data[model] });
1020
+ }
1021
+ }
1022
+ }
1023
+ return { destinations, profilesWithoutDestinations };
1024
+ }
931
1025
  //# sourceMappingURL=agent-client-protocol.external-connectors-models.schemas.js.map