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

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 (87) hide show
  1. package/dist/esm/.native.tsbuildinfo +1 -0
  2. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +49 -9
  3. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  4. package/dist/esm/core/commons.external-connectors-models.schemas.js +46 -7
  5. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  6. package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts +13 -0
  7. package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -0
  8. package/dist/esm/core/operation-classification.external-connectors-models.schemas.js +14 -0
  9. package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -0
  10. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -25
  11. package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +1 -1
  12. package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +1 -1
  13. package/dist/esm/core/security.external-connectors-models.schemas.d.ts +132 -2
  14. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  15. package/dist/esm/core/security.external-connectors-models.schemas.js +164 -0
  16. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  17. package/dist/esm/features/core.external-connectors-models.schemas.d.ts +0 -63
  18. package/dist/esm/features/core.external-connectors-models.schemas.d.ts.map +0 -1
  19. package/dist/esm/features/core.external-connectors-models.schemas.js +0 -101
  20. package/dist/esm/features/core.external-connectors-models.schemas.js.map +0 -1
  21. package/dist/esm/features/email.external-connectors-models.schemas.d.ts +0 -181
  22. package/dist/esm/features/email.external-connectors-models.schemas.d.ts.map +0 -1
  23. package/dist/esm/features/email.external-connectors-models.schemas.js +0 -34
  24. package/dist/esm/features/email.external-connectors-models.schemas.js.map +0 -1
  25. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts +0 -101
  26. package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts.map +0 -1
  27. package/dist/esm/features/hooks.external-connectors-models.schemas.js +0 -11
  28. package/dist/esm/features/hooks.external-connectors-models.schemas.js.map +0 -1
  29. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts +0 -21
  30. package/dist/esm/features/sms.external-connectors-models.schemas.d.ts.map +0 -1
  31. package/dist/esm/features/sms.external-connectors-models.schemas.js +0 -8
  32. package/dist/esm/features/sms.external-connectors-models.schemas.js.map +0 -1
  33. package/dist/esm/index.d.ts +3 -9
  34. package/dist/esm/index.d.ts.map +1 -1
  35. package/dist/esm/index.js +6 -10
  36. package/dist/esm/index.js.map +1 -1
  37. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts +0 -57
  38. package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts.map +0 -1
  39. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js +0 -73
  40. package/dist/esm/protocols/a2a.external-connectors-models.schemas.js.map +0 -1
  41. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +242 -3
  42. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
  43. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +294 -2
  44. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
  45. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +154 -0
  46. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  47. package/dist/esm/protocols/billing.standard-interface.schemas.js +50 -1
  48. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  49. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -1
  50. package/dist/esm/protocols/email.standard-interface.schemas.d.ts +5 -5
  51. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts +0 -14
  52. package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts.map +0 -1
  53. package/dist/esm/protocols/git.external-connectors-models.schemas.js +0 -9
  54. package/dist/esm/protocols/git.external-connectors-models.schemas.js.map +0 -1
  55. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts +0 -14
  56. package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts.map +0 -1
  57. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js +0 -9
  58. package/dist/esm/protocols/grpc.external-connectors-models.schemas.js.map +0 -1
  59. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts +101 -0
  60. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -0
  61. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js +11 -0
  62. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -0
  63. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +39 -20
  64. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  65. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +113 -27
  66. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  67. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts +0 -60
  68. package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts.map +0 -1
  69. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js +0 -35
  70. package/dist/esm/protocols/mcp.external-connectors-models.schemas.js.map +0 -1
  71. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +2 -2
  72. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +1 -89
  73. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +1 -1
  74. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +1 -83
  75. package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +1 -1
  76. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +370 -0
  77. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -0
  78. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +89 -0
  79. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -0
  80. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts +0 -135
  81. package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts.map +0 -1
  82. package/dist/esm/protocols/saml.external-connectors-models.schemas.js +0 -9
  83. package/dist/esm/protocols/saml.external-connectors-models.schemas.js.map +0 -1
  84. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +2 -2
  85. package/dist/tsconfig.build.tsbuildinfo +1 -1
  86. package/package.json +2 -2
  87. package/dist/esm/.builder.pid +0 -9
@@ -99,10 +99,19 @@ 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: PROMPT_ALWAYS < AUTO_ACCEPT_EDITS <
102
+ * Ordering is meaningful and increasing over all FIVE members: PROMPT_ALWAYS <
103
+ * AUTO_ACCEPT_READS < AUTO_ACCEPT_EDITS < AUTO_ACCEPT_READS_AND_EDITS <
103
104
  * UNRESTRICTED. Compare through {@link agentClientProtocolPermissionCeilingRank}
104
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.
105
113
  */
114
+ /** @wildo_source:part:start acp.permission-ceiling facet:layer:config facet:audience:app-developer */
106
115
  export var AgentClientProtocol_PermissionCeiling;
107
116
  (function (AgentClientProtocol_PermissionCeiling) {
108
117
  /**
@@ -150,9 +159,28 @@ export var AgentClientProtocol_PermissionCeiling;
150
159
  * outright, and {@link AUTO_ACCEPT_EDITS} admits precisely the inverse of what research needs.
151
160
  */
152
161
  AgentClientProtocol_PermissionCeiling["AUTO_ACCEPT_READS"] = "auto_accept_reads";
162
+ /**
163
+ * The non-mutating kinds AND the file-mutating kinds are auto-accepted; `execute` and the
164
+ * unclassified `other` must still be answered — and with no human at the other end, that means
165
+ * denied.
166
+ *
167
+ * Added 2026-09-04 for the research-agent evidence store, and MEASURED before it existed rather
168
+ * than after: switching the research profile from {@link AUTO_ACCEPT_READS} to
169
+ * {@link AUTO_ACCEPT_EDITS} — so the agent could persist findings to disk — silently inverted the
170
+ * lane's whole posture, because the ceilings are kind-SETS, not nested ranks: a live compliance
171
+ * run spent two rounds with every WebFetch/WebSearch refused, and its only output was a store
172
+ * note titled "NO EVIDENCE COLLECTED". A lane that both reads the world and persists what it
173
+ * read needs this member; neither existing set contains the other.
174
+ *
175
+ * The confinement story is unchanged: this ceiling decides KINDS, and the dispatch's location
176
+ * predicate still decides PATHS — a research profile on this ceiling with a store-only predicate
177
+ * can fetch anything and write only its evidence directory.
178
+ */
179
+ AgentClientProtocol_PermissionCeiling["AUTO_ACCEPT_READS_AND_EDITS"] = "auto_accept_reads_and_edits";
153
180
  /** No permission gate. Reserve for a disposable or isolated workspace. */
154
181
  AgentClientProtocol_PermissionCeiling["UNRESTRICTED"] = "unrestricted";
155
182
  })(AgentClientProtocol_PermissionCeiling || (AgentClientProtocol_PermissionCeiling = {}));
183
+ /** @wildo_source:part:end acp.permission-ceiling */
156
184
  /**
157
185
  * Increasing rank for {@link AgentClientProtocol_PermissionCeiling}; the single ordering definition.
158
186
  *
@@ -180,8 +208,109 @@ export function agentClientProtocolPermissionCeilingRank(ceiling) {
180
208
  return 1;
181
209
  case AgentClientProtocol_PermissionCeiling.AUTO_ACCEPT_EDITS:
182
210
  return 2;
183
- case AgentClientProtocol_PermissionCeiling.UNRESTRICTED:
211
+ case AgentClientProtocol_PermissionCeiling.AUTO_ACCEPT_READS_AND_EDITS:
184
212
  return 3;
213
+ case AgentClientProtocol_PermissionCeiling.UNRESTRICTED:
214
+ return 4;
215
+ }
216
+ }
217
+ /**
218
+ * Whether THIS agent raises `session/request_permission` before it mutates —
219
+ * the one property that decides whether Wildo's in-flight guards can fire at all.
220
+ *
221
+ * # Why a permission ceiling needs this to mean anything
222
+ *
223
+ * Both of Wildo's in-flight controls are enforced in the CLIENT's ANSWER to a
224
+ * permission request: {@link AgentClientProtocol_PermissionCeiling} decides the
225
+ * tool KIND, and the dispatch's location predicate decides the PATHS. Neither is
226
+ * 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
228
+ * an application authored is a LABEL rather than a guarantee.
229
+ *
230
+ * That is not hypothetical and it is not a fault in the agents. MEASURED with
231
+ * `wildo acp probe`:
232
+ *
233
+ * - Codex (`@agentclientprotocol/codex-acp`, 2026-09-06) raises nothing before
234
+ * an in-workspace write in ANY of its three modes, including with an explicit
235
+ * `approval_policy = "untrusted"`. Its safety model is a SANDBOX, so an
236
+ * in-workspace write is safe by ITS construction and there is nothing to ask
237
+ * about. A different architecture, not a defect.
238
+ * - OpenCode (1.18.27, 2026-09-04/05) does the same under its DEFAULT
239
+ * configuration, and escalates correctly when pointed at a permission
240
+ * configuration file. So for that agent the answer is conditional on
241
+ * something the HOST supplies.
242
+ * - Claude's adapter (`@agentclientprotocol/claude-agent-acp` 0.73.0) raises,
243
+ * and both guards fire.
244
+ *
245
+ * # Why it is DECLARED rather than inferred, and why it is required
246
+ *
247
+ * It cannot be inferred before a run: an agent that never asks and an agent that
248
+ * had nothing to ask about are indistinguishable from an empty decision list, and
249
+ * by the time the list is empty the workspace has already been mutated. The
250
+ * post-run change set remains the authoritative account of what a run touched —
251
+ * this declaration is what lets the framework say, BEFORE the run, whether that
252
+ * change set is the only account there will be.
253
+ *
254
+ * The provider declares it because the provider is the party that ran the probe.
255
+ * It is REQUIRED on the runtime contract for the same reason `modelDelivery` is:
256
+ * this lane has now shipped three safety-relevant fields that were authored,
257
+ * documented and read by nothing (`hostConfigurationInheritance`, the model
258
+ * channel, the provider's inherited environment). An author who cannot ship the
259
+ * gap is better than one who discovers it on a dispatched run.
260
+ *
261
+ * It is a CLAIM, never an alibi. The companion still judges each completed run
262
+ * from that run's OWN permission decisions and change set, so an agent whose
263
+ * behaviour changes between versions cannot keep a stale, reassuring declaration.
264
+ */
265
+ /** @wildo_source:part:start acp.permission-escalation facet:layer:config facet:audience:app-developer */
266
+ export var AgentClientProtocol_PermissionEscalationBehaviour;
267
+ (function (AgentClientProtocol_PermissionEscalationBehaviour) {
268
+ /**
269
+ * The agent escalates before mutating, so the ceiling and the mutation scope
270
+ * are both enforceable in flight. The only value under which a ceiling
271
+ * narrower than UNRESTRICTED means what it says.
272
+ */
273
+ AgentClientProtocol_PermissionEscalationBehaviour["RAISES_BEFORE_MUTATION"] = "raises_before_mutation";
274
+ /**
275
+ * The agent escalates ONLY when the host points it at a permission
276
+ * configuration it does not adopt by default.
277
+ *
278
+ * The configuration is therefore not hardening — it is the condition under
279
+ * which the agent may be dispatched with a gate at all, and the variable that
280
+ * carries the pointer is named on the contract so the dispatch can CHECK that
281
+ * a profile supplies it instead of trusting a docstring that says it must.
282
+ */
283
+ AgentClientProtocol_PermissionEscalationBehaviour["RAISES_ONLY_UNDER_HOST_CONFIGURATION"] = "raises_only_under_host_configuration";
284
+ /**
285
+ * The agent never escalates before mutating, under any configuration this
286
+ * framework can supply. Its own safety model is elsewhere (a sandbox), and
287
+ * Wildo's in-flight guards are inert for it by construction — the post-run
288
+ * change set is the only account of what it touched.
289
+ */
290
+ AgentClientProtocol_PermissionEscalationBehaviour["NEVER_RAISES"] = "never_raises";
291
+ })(AgentClientProtocol_PermissionEscalationBehaviour || (AgentClientProtocol_PermissionEscalationBehaviour = {}));
292
+ /** @wildo_source:part:end acp.permission-escalation */
293
+ /**
294
+ * Can Wildo's in-flight permission ceiling and mutation-scope predicate fire for
295
+ * this agent, as it will actually be started?
296
+ *
297
+ * The single definition of that question, so the dispatch's refusal, the run's
298
+ * recorded metadata and any operator-facing report cannot disagree about it.
299
+ *
300
+ * `escalationConfigurationSupplied` answers only the conditional member: it is
301
+ * whether the composed child environment will actually carry the pointer the
302
+ * contract names. Deliberately a parameter rather than something this function
303
+ * reads, because the environment is composed by the dispatch and a predicate
304
+ * that guessed at it would be a second, quieter answer.
305
+ */
306
+ export function agentClientProtocolInFlightGuardsCanFire(behaviour, escalationConfigurationSupplied) {
307
+ switch (behaviour) {
308
+ case AgentClientProtocol_PermissionEscalationBehaviour.RAISES_BEFORE_MUTATION:
309
+ return true;
310
+ case AgentClientProtocol_PermissionEscalationBehaviour.RAISES_ONLY_UNDER_HOST_CONFIGURATION:
311
+ return escalationConfigurationSupplied;
312
+ case AgentClientProtocol_PermissionEscalationBehaviour.NEVER_RAISES:
313
+ return false;
185
314
  }
186
315
  }
187
316
  /**
@@ -200,6 +329,7 @@ export function agentClientProtocolPermissionCeilingRank(ceiling) {
200
329
  * application teaches the agent to use its framework. What it should not
201
330
  * silently absorb is whoever happens to be logged in.
202
331
  */
332
+ /** @wildo_source:part:start acp.host-configuration-inheritance facet:layer:config facet:audience:app-developer */
203
333
  export var AgentClientProtocol_HostConfigurationInheritance;
204
334
  (function (AgentClientProtocol_HostConfigurationInheritance) {
205
335
  /** No filesystem-sourced agent configuration. The prompt is the whole instruction. */
@@ -218,12 +348,14 @@ export var AgentClientProtocol_HostConfigurationInheritance;
218
348
  */
219
349
  AgentClientProtocol_HostConfigurationInheritance["HOST_INHERITED"] = "host_inherited";
220
350
  })(AgentClientProtocol_HostConfigurationInheritance || (AgentClientProtocol_HostConfigurationInheritance = {}));
351
+ /** @wildo_source:part:end acp.host-configuration-inheritance */
221
352
  /**
222
353
  * One authored way to start an ACP agent.
223
354
  *
224
355
  * Mirrors the shape a provider's execution profiles have always had: the
225
356
  * spawnable command plus the policy that decides whether it may run at all.
226
357
  */
358
+ /** @wildo_source:part:start acp.execution-profile facet:layer:config facet:audience:app-developer */
227
359
  export const AgentClientProtocol_ExecutionProfileSchema = z.object({
228
360
  runnerHost: z.enum(AgentClientProtocol_RunnerHost).default(AgentClientProtocol_RunnerHost.BACKEND_SUBPROCESS),
229
361
  /**
@@ -274,6 +406,32 @@ export const AgentClientProtocol_ExecutionProfileSchema = z.object({
274
406
  * cleanly. A hard kill remains the fallback if the agent does not honour it.
275
407
  */
276
408
  turnTimeoutMs: z.number().int().positive().optional(),
409
+ /**
410
+ * How many times one invocation may AUTO-CONTINUE the agent after it ends a
411
+ * turn with a self-imposed pause ("shall I continue?").
412
+ *
413
+ * The autonomous lane's answer to the agent's own checkpoint reflex: a turn
414
+ * classified as SELF_PAUSE is re-prompted to continue on the same session
415
+ * rather than read as a finished result. Bounded because an agent that pauses
416
+ * forever must eventually be settled rather than looped — on exhaustion the
417
+ * run settles with what it has, recorded as such. Zero disables continuation
418
+ * entirely (every END_TURN is final, the pre-2026-09 behaviour).
419
+ */
420
+ maxAutoContinuations: z.number().int().nonnegative().default(8),
421
+ /**
422
+ * How long an operator answer to a parked question stays valid — the deadline
423
+ * stamped onto the suspension as `parkedUntil`.
424
+ *
425
+ * The parked run does NOT hold a live agent process open for this window: the
426
+ * child is closed the moment the run parks (holding it would occupy the lane's
427
+ * single-flight slot while an operator who may never answer decides). Because
428
+ * the agent persists the session on disk, a later answer re-enters it through
429
+ * `session/load` — so this is an informational freshness bound the host and UX
430
+ * surface, not a timer that reaps a process. It applies only when the agent
431
+ * advertises `loadSession`; otherwise the question is real but unanswerable
432
+ * on the same session, and `resumable` says so.
433
+ */
434
+ awaitingInputTtlMs: z.number().int().positive().default(900_000),
277
435
  /**
278
436
  * Ceiling on the bytes of session events this run PERSISTS.
279
437
  *
@@ -350,6 +508,7 @@ export const AgentClientProtocol_ExecutionProfileSchema = z.object({
350
508
  });
351
509
  }
352
510
  });
511
+ /** @wildo_source:part:end acp.execution-profile */
353
512
  /**
354
513
  * Transport capability metadata for an ACP-speaking provider.
355
514
  *
@@ -469,6 +628,86 @@ export var CodingAgent_StopReason;
469
628
  */
470
629
  CodingAgent_StopReason["UNRECOGNISED"] = "wildo.unrecognised";
471
630
  })(CodingAgent_StopReason || (CodingAgent_StopReason = {}));
631
+ /**
632
+ * What an END_TURN actually meant — the judgment the turn ladder branches on.
633
+ *
634
+ * ACP delivers every voluntary stop identically: `end_turn` plus whatever the
635
+ * agent last said. Three very different situations arrive in that one shape,
636
+ * and only reading the message tells them apart, which is why this is decided
637
+ * by an auxiliary LLM classification rather than by a heuristic on the text:
638
+ * a regex that recognises "shall I continue?" is an invented vocabulary for
639
+ * someone else's prose.
640
+ */
641
+ export var CodingAgent_EndOfTurnClassification;
642
+ (function (CodingAgent_EndOfTurnClassification) {
643
+ /** The agent finished the task; the turn is a final result. */
644
+ CodingAgent_EndOfTurnClassification["TASK_COMPLETE"] = "task_complete";
645
+ /**
646
+ * The agent paused of its own accord — "next?", "want me to proceed?" — a
647
+ * checkpoint reflex, not a need. The ladder answers it with the continuation
648
+ * prompt instead of surfacing it, because at this level those checkpoints are
649
+ * deliberately avoided (autonomy directive, 2026-09-04).
650
+ */
651
+ CodingAgent_EndOfTurnClassification["SELF_PAUSE"] = "self_pause";
652
+ /**
653
+ * The agent asked something only the caller can answer — a real decision, a
654
+ * missing credential, an ambiguity in the task. The session parks and the
655
+ * question is surfaced; auto-continuing would make the agent answer itself.
656
+ */
657
+ CodingAgent_EndOfTurnClassification["NEEDS_INPUT"] = "needs_input";
658
+ /**
659
+ * The classifier itself failed or timed out. FAILS OPEN to settlement: the
660
+ * turn is treated as TASK_COMPLETE, because an auxiliary call must never hang
661
+ * the autonomous lane or discard a mutated workspace — but the failure is
662
+ * recorded as this value rather than laundered into a confident judgment.
663
+ */
664
+ CodingAgent_EndOfTurnClassification["CLASSIFIER_UNAVAILABLE"] = "classifier_unavailable";
665
+ })(CodingAgent_EndOfTurnClassification || (CodingAgent_EndOfTurnClassification = {}));
666
+ /**
667
+ * One auto-continuation the turn ladder performed, recorded per turn boundary.
668
+ *
669
+ * Kept as a record rather than a counter for the same reason permission
670
+ * decisions are: a run that continued five times and one that never paused are
671
+ * different runs, and the difference is diagnosable only if each boundary says
672
+ * what was classified and what was sent back.
673
+ */
674
+ export const CodingAgent_ContinuationRecordSchema = z.strictObject({
675
+ /** 1-based index of the turn that ENDED at this boundary. */
676
+ turnIndex: z.number().int().positive(),
677
+ classification: z.enum(CodingAgent_EndOfTurnClassification),
678
+ /**
679
+ * The tail of the agent's end-of-turn message the classification was made
680
+ * from. A bounded excerpt, not the transcript — enough to audit the judgment.
681
+ */
682
+ agentMessageTail: z.string().optional(),
683
+ });
684
+ /**
685
+ * A run that STOPPED WITHOUT FINISHING because the agent needs an answer.
686
+ *
687
+ * The ACP sibling of `AgentApprovalSuspension` on the LLM transport: the
688
+ * invocation returns, but its output must not be read as a completed result —
689
+ * `suspension` present means the final message is a QUESTION. The caller
690
+ * surfaces the question, and the answer re-enters the SAME session:
691
+ * `resumable: true` promises the agent advertised `loadSession`, so the session
692
+ * survives the child process and even a host restart.
693
+ */
694
+ export const CodingAgent_SessionSuspensionSchema = z.strictObject({
695
+ /** The ACP session to resume with the answer. */
696
+ sessionId: z.string().min(1),
697
+ /** The agent's question, verbatim — its end-of-turn message. */
698
+ question: z.string().min(1),
699
+ /** 1-based turn the session parked after. */
700
+ turnIndex: z.number().int().positive(),
701
+ /**
702
+ * Whether the session can be re-entered after the agent process is gone.
703
+ * False when the agent does not advertise `loadSession`: the question is
704
+ * still real, but answering it starts a NEW session that must restate task
705
+ * context — a degradation the caller should surface, not hide.
706
+ */
707
+ resumable: z.boolean(),
708
+ /** When the parked child process will be closed (ISO timestamp). */
709
+ parkedUntil: z.string().optional(),
710
+ });
472
711
  /**
473
712
  * What one coding turn consumed.
474
713
  *
@@ -537,6 +776,32 @@ export const AgentClientProtocol_ExecutionTransportMetadataSchema = z.object({
537
776
  * which of the agent's modes that became.
538
777
  */
539
778
  sessionModeId: z.string().optional(),
779
+ /**
780
+ * Whether the agent this run started DECLARES that it escalates before
781
+ * mutating, and whether Wildo's in-flight guards could therefore fire.
782
+ *
783
+ * Recorded on the run because the ceiling alone no longer explains the run:
784
+ * `permissionCeiling: PROMPT_ALWAYS` against an agent that never asks and
785
+ * against one that always asks describe two completely different runs, and
786
+ * nothing else in this metadata tells them apart. A later reader looking at a
787
+ * change set needs to know whether anything stood between the agent and it.
788
+ *
789
+ * Optional because the declaration is a provider fact and a run recorded
790
+ * before this field existed genuinely has no answer — absence must not read as
791
+ * `false`, which would assert an unbound run that may have been fully bound.
792
+ */
793
+ permissionEscalation: z.enum(AgentClientProtocol_PermissionEscalationBehaviour).optional(),
794
+ /**
795
+ * The resolved answer for THIS run, from
796
+ * {@link agentClientProtocolInFlightGuardsCanFire} — the declared behaviour
797
+ * combined with whether the composed environment actually supplied the
798
+ * configuration a conditionally-escalating agent needs.
799
+ *
800
+ * Kept beside the behaviour rather than derived by each reader, because the
801
+ * conditional member cannot be resolved from the behaviour alone and a reader
802
+ * that tried would answer `true` for an agent that was dispatched unconfigured.
803
+ */
804
+ inFlightPermissionGuardsCanFire: z.boolean().optional(),
540
805
  /** The ACP session, retained so a later turn can resume or fork it. */
541
806
  sessionId: z.string().optional(),
542
807
  });
@@ -585,6 +850,16 @@ export const CodingAgent_RunTaskInputSchema = z.object({
585
850
  * authority, only leave it where the profile put it.
586
851
  */
587
852
  requestedPermissionCeiling: z.enum(AgentClientProtocol_PermissionCeiling).optional(),
853
+ /**
854
+ * Present when this run ANSWERS a parked session rather than starting a task.
855
+ *
856
+ * Carries the `sessionId` from a prior run's `suspension`; the transport
857
+ * re-enters that session via `session/load` and delivers `prompt` (the
858
+ * answer) as the next turn. Refused — not degraded — when the agent does not
859
+ * advertise `loadSession`: silently starting a fresh session would present a
860
+ * context-less answer as a continuation.
861
+ */
862
+ continuationOfSessionId: z.string().min(1).optional(),
588
863
  });
589
864
  export const CodingAgent_RunTaskOutputSchema = z.object({
590
865
  /** The agent's closing message — its own account of what it did. */
@@ -635,5 +910,22 @@ export const CodingAgent_RunTaskOutputSchema = z.object({
635
910
  * define. Present exactly when `stopReason` is `UNRECOGNISED`.
636
911
  */
637
912
  rawStopReason: z.string().optional(),
913
+ /**
914
+ * How many prompt turns this invocation drove on the session. Absent means
915
+ * one — the single-turn shape every pre-ladder consumer already assumes.
916
+ */
917
+ turnCount: z.number().int().positive().optional(),
918
+ /**
919
+ * One record per turn boundary the ladder judged — auto-continues, the park,
920
+ * the settlement. See {@link CodingAgent_ContinuationRecordSchema}.
921
+ */
922
+ continuations: z.array(CodingAgent_ContinuationRecordSchema).optional(),
923
+ /**
924
+ * Present when the run PARKED on a genuine question instead of finishing.
925
+ * `finalMessage` is then the QUESTION, and `stopReason` is the wire-true
926
+ * `END_TURN` — this field is what stops that reading as a completed result.
927
+ * Callers that ignore it record work as done that is waiting on an answer.
928
+ */
929
+ suspension: CodingAgent_SessionSuspensionSchema.optional(),
638
930
  });
639
931
  //# sourceMappingURL=agent-client-protocol.external-connectors-models.schemas.js.map