Open History to see the last commit
1import type { OrchestrationV2HistoricalMessage } from "@t3tools/contracts";
2import {
3 ChatAttachment,
4 CheckpointId,
5 MessageId,
6 ModelSelection,
7 NodeId,
8 OrchestrationV2AppThread,
9 OrchestrationV2ConversationMessage,
10 OrchestrationV2ExecutionNode,
11 OrchestrationV2ProviderSession,
12 OrchestrationV2PlanArtifact,
13 OrchestrationV2ProviderCapabilities,
14 OrchestrationV2ProviderFailure,
15 OrchestrationV2ProviderRetry,
16 OrchestrationV2ProviderThread,
17 OrchestrationV2ProviderTurn,
18 OrchestrationV2RuntimeRequest,
19 OrchestrationV2Subagent,
20 OrchestrationV2TurnItem,
21 ProviderApprovalDecision,
22 ProviderInteractionMode,
23 ProviderDriverKind,
24 ProviderInstanceId,
25 PositiveInt,
26 ProviderUserInputAnswers,
27 ProviderSessionId,
28 ProviderThreadId,
29 ProviderTurnId,
30 RuntimeMode,
31 RuntimeRequestId,
32 RunAttemptId,
33 RunId,
34 ThreadId,
35} from "@t3tools/contracts";
36import * as Context from "effect/Context";
37import * as Schema from "effect/Schema";
38import type * as Effect from "effect/Effect";
39import type * as Scope from "effect/Scope";
40import type * as Stream from "effect/Stream";
41
42import type {
43 ProviderSelectionTransitionInput,
44 ProviderSelectionTransitionPlan,
45} from "./ProviderSelectionTransition.ts";
46
47export const ProviderAdapterV2RuntimePolicy = Schema.Struct({
48 runtimeMode: RuntimeMode,
49 interactionMode: ProviderInteractionMode,
50 cwd: Schema.NullOr(Schema.String),
51 approvalPolicy: Schema.optional(Schema.Unknown),
52 sandboxPolicy: Schema.optional(Schema.Unknown),
53 reasoningEffort: Schema.optional(Schema.String),
54});
55export type ProviderAdapterV2RuntimePolicy = typeof ProviderAdapterV2RuntimePolicy.Type;
56
57export const ProviderAdapterV2TurnMessage = Schema.Struct({
58 messageId: MessageId,
59 text: Schema.String,
60 attachments: Schema.Array(ChatAttachment),
61 createdBy: OrchestrationV2ConversationMessage.fields.createdBy,
62 creationSource: OrchestrationV2ConversationMessage.fields.creationSource,
63 scheduledTaskId: OrchestrationV2ConversationMessage.fields.scheduledTaskId,
64 senderThreadId: OrchestrationV2ConversationMessage.fields.senderThreadId,
65});
66export type ProviderAdapterV2TurnMessage = typeof ProviderAdapterV2TurnMessage.Type;
67
68export const ProviderAdapterV2SessionStatus = Schema.Literals([
69 "starting",
70 "ready",
71 "running",
72 "waiting",
73 "stopped",
74 "error",
75]);
76export type ProviderAdapterV2SessionStatus = typeof ProviderAdapterV2SessionStatus.Type;
77
78export const ProviderAdapterV2Event = Schema.Union([
79 Schema.Struct({
80 type: Schema.Literal("app_thread.created"),
81 driver: ProviderDriverKind,
82 appThread: OrchestrationV2AppThread,
83 }),
84 Schema.Struct({
85 type: Schema.Literal("provider_session.updated"),
86 driver: ProviderDriverKind,
87 providerSession: OrchestrationV2ProviderSession,
88 }),
89 Schema.Struct({
90 type: Schema.Literal("provider_thread.updated"),
91 driver: ProviderDriverKind,
92 providerThread: OrchestrationV2ProviderThread,
93 }),
94 Schema.Struct({
95 type: Schema.Literal("provider_turn.updated"),
96 driver: ProviderDriverKind,
97 threadId: Schema.optional(ThreadId),
98 providerTurn: OrchestrationV2ProviderTurn,
99 }),
100 Schema.Struct({
101 type: Schema.Literal("node.updated"),
102 driver: ProviderDriverKind,
103 node: OrchestrationV2ExecutionNode,
104 }),
105 Schema.Struct({
106 type: Schema.Literal("subagent.updated"),
107 driver: ProviderDriverKind,
108 subagent: OrchestrationV2Subagent,
109 }),
110 Schema.Struct({
111 type: Schema.Literal("message.updated"),
112 driver: ProviderDriverKind,
113 message: OrchestrationV2ConversationMessage,
114 }),
115 Schema.Struct({
116 type: Schema.Literal("turn_item.updated"),
117 driver: ProviderDriverKind,
118 turnItem: OrchestrationV2TurnItem,
119 }),
120 Schema.Struct({
121 type: Schema.Literal("runtime_request.updated"),
122 driver: ProviderDriverKind,
123 threadId: Schema.optional(ThreadId),
124 runtimeRequest: OrchestrationV2RuntimeRequest,
125 }),
126 Schema.Struct({
127 type: Schema.Literal("plan.updated"),
128 driver: ProviderDriverKind,
129 plan: OrchestrationV2PlanArtifact,
130 }),
131 Schema.Struct({
132 type: Schema.Literal("turn.terminal"),
133 driver: ProviderDriverKind,
134 providerThreadId: ProviderThreadId,
135 providerTurnId: ProviderTurnId,
136 runOrdinal: PositiveInt,
137 status: Schema.Literals(["completed", "interrupted", "cancelled"]),
138 failure: Schema.Null,
139 threadDisposition: Schema.Literals(["reusable", "broken"]),
140 }),
141 Schema.Struct({
142 type: Schema.Literal("turn.terminal"),
143 driver: ProviderDriverKind,
144 providerThreadId: ProviderThreadId,
145 providerTurnId: ProviderTurnId,
146 runOrdinal: PositiveInt,
147 failureItemOrdinal: PositiveInt,
148 status: Schema.Literal("failed"),
149 failure: OrchestrationV2ProviderFailure,
150 retry: Schema.optional(OrchestrationV2ProviderRetry),
151 retryStartedAt: Schema.optional(Schema.DateTimeUtc),
152 threadDisposition: Schema.Literals(["reusable", "broken"]),
153 }),
154]);
155export type ProviderAdapterV2Event = typeof ProviderAdapterV2Event.Type;
156
157export class ProviderAdapterCapabilitiesError extends Schema.TaggedError<ProviderAdapterCapabilitiesError>()(
158 "ProviderAdapterCapabilitiesError",
159 {
160 driver: ProviderDriverKind,
161 cause: Schema.optional(Schema.Defect()),
162 },
163) {
164 override get message(): string {
165 return `Failed to read ${this.driver} provider capabilities.`;
166 }
167}
168
169export class ProviderAdapterOpenSessionError extends Schema.TaggedError<ProviderAdapterOpenSessionError>()(
170 "ProviderAdapterOpenSessionError",
171 {
172 driver: ProviderDriverKind,
173 providerSessionId: ProviderSessionId,
174 cause: Schema.optional(Schema.Defect()),
175 },
176) {
177 override get message(): string {
178 return `Failed to open ${this.driver} provider session ${this.providerSessionId}.`;
179 }
180}
181
182export class ProviderAdapterCloseSessionError extends Schema.TaggedError<ProviderAdapterCloseSessionError>()(
183 "ProviderAdapterCloseSessionError",
184 {
185 driver: ProviderDriverKind,
186 providerSessionId: ProviderSessionId,
187 cause: Schema.optional(Schema.Defect()),
188 },
189) {
190 override get message(): string {
191 return `Failed to close ${this.driver} provider session ${this.providerSessionId}.`;
192 }
193}
194
195export class ProviderAdapterResumeThreadError extends Schema.TaggedError<ProviderAdapterResumeThreadError>()(
196 "ProviderAdapterResumeThreadError",
197 {
198 driver: ProviderDriverKind,
199 providerSessionId: ProviderSessionId,
200 providerThreadId: ProviderThreadId,
201 cause: Schema.optional(Schema.Defect()),
202 },
203) {
204 override get message(): string {
205 return `Failed to resume ${this.driver} provider thread ${this.providerThreadId}.`;
206 }
207}
208
209export class ProviderAdapterEnsureThreadError extends Schema.TaggedError<ProviderAdapterEnsureThreadError>()(
210 "ProviderAdapterEnsureThreadError",
211 {
212 driver: ProviderDriverKind,
213 threadId: ThreadId,
214 cause: Schema.optional(Schema.Defect()),
215 },
216) {
217 override get message(): string {
218 return `Failed to ensure ${this.driver} provider thread for app thread ${this.threadId}.`;
219 }
220}
221
222export class ProviderAdapterReadThreadSnapshotError extends Schema.TaggedError<ProviderAdapterReadThreadSnapshotError>()(
223 "ProviderAdapterReadThreadSnapshotError",
224 {
225 driver: ProviderDriverKind,
226 providerThreadId: ProviderThreadId,
227 cause: Schema.optional(Schema.Defect()),
228 },
229) {
230 override get message(): string {
231 return `Failed to read ${this.driver} provider thread snapshot ${this.providerThreadId}.`;
232 }
233}
234
235export class ProviderAdapterRollbackThreadError extends Schema.TaggedError<ProviderAdapterRollbackThreadError>()(
236 "ProviderAdapterRollbackThreadError",
237 {
238 driver: ProviderDriverKind,
239 providerThreadId: ProviderThreadId,
240 checkpointId: Schema.optional(CheckpointId),
241 cause: Schema.optional(Schema.Defect()),
242 },
243) {
244 override get message(): string {
245 return `Failed to roll back ${this.driver} provider thread ${this.providerThreadId}.`;
246 }
247}
248
249export class ProviderAdapterForkThreadError extends Schema.TaggedError<ProviderAdapterForkThreadError>()(
250 "ProviderAdapterForkThreadError",
251 {
252 driver: ProviderDriverKind,
253 providerThreadId: ProviderThreadId,
254 cause: Schema.optional(Schema.Defect()),
255 },
256) {
257 override get message(): string {
258 return `Failed to fork ${this.driver} provider thread ${this.providerThreadId}.`;
259 }
260}
261
262export class ProviderAdapterTurnStartError extends Schema.TaggedError<ProviderAdapterTurnStartError>()(
263 "ProviderAdapterTurnStartError",
264 {
265 driver: ProviderDriverKind,
266 threadId: ThreadId,
267 providerThreadId: ProviderThreadId,
268 runId: RunId,
269 cause: Schema.optional(Schema.Defect()),
270 },
271) {
272 override get message(): string {
273 return `Failed to start run ${this.runId} on ${this.driver} provider thread ${this.providerThreadId}.`;
274 }
275}
276
277export class ProviderAdapterSteerRunUnsupportedError extends Schema.TaggedError<ProviderAdapterSteerRunUnsupportedError>()(
278 "ProviderAdapterSteerRunUnsupportedError",
279 {
280 driver: ProviderDriverKind,
281 providerThreadId: ProviderThreadId,
282 },
283) {
284 override get message(): string {
285 return `${this.driver} provider thread ${this.providerThreadId} does not support active-run steering.`;
286 }
287}
288
289export class ProviderAdapterSteerRunError extends Schema.TaggedError<ProviderAdapterSteerRunError>()(
290 "ProviderAdapterSteerRunError",
291 {
292 driver: ProviderDriverKind,
293 providerThreadId: ProviderThreadId,
294 providerTurnId: ProviderTurnId,
295 cause: Schema.optional(Schema.Defect()),
296 },
297) {
298 override get message(): string {
299 return `Failed to steer active run ${this.providerTurnId} on ${this.driver} provider thread ${this.providerThreadId}.`;
300 }
301}
302
303export class ProviderAdapterInterruptError extends Schema.TaggedError<ProviderAdapterInterruptError>()(
304 "ProviderAdapterInterruptError",
305 {
306 driver: ProviderDriverKind,
307 providerThreadId: ProviderThreadId,
308 providerTurnId: ProviderTurnId,
309 cause: Schema.optional(Schema.Defect()),
310 },
311) {
312 override get message(): string {
313 return `Failed to interrupt ${this.driver} provider turn ${this.providerTurnId}.`;
314 }
315}
316
317export class ProviderAdapterRuntimeRequestResponseError extends Schema.TaggedError<ProviderAdapterRuntimeRequestResponseError>()(
318 "ProviderAdapterRuntimeRequestResponseError",
319 {
320 driver: ProviderDriverKind,
321 requestId: RuntimeRequestId,
322 cause: Schema.optional(Schema.Defect()),
323 },
324) {
325 override get message(): string {
326 return `Failed to respond to ${this.driver} runtime request ${this.requestId}.`;
327 }
328}
329
330export class ProviderAdapterEventStreamError extends Schema.TaggedError<ProviderAdapterEventStreamError>()(
331 "ProviderAdapterEventStreamError",
332 {
333 driver: ProviderDriverKind,
334 providerSessionId: ProviderSessionId,
335 cause: Schema.optional(Schema.Defect()),
336 },
337) {
338 override get message(): string {
339 return `Failed while streaming ${this.driver} provider session ${this.providerSessionId} events.`;
340 }
341}
342
343export class ProviderAdapterProtocolError extends Schema.TaggedError<ProviderAdapterProtocolError>()(
344 "ProviderAdapterProtocolError",
345 {
346 driver: ProviderDriverKind,
347 detail: Schema.String,
348 cause: Schema.optional(Schema.Defect()),
349 payload: Schema.optional(Schema.Unknown),
350 },
351) {
352 override get message(): string {
353 return `${this.driver} provider protocol error: ${this.detail}.`;
354 }
355}
356
357export const ProviderAdapterV2Error = Schema.Union([
358 ProviderAdapterCapabilitiesError,
359 ProviderAdapterOpenSessionError,
360 ProviderAdapterCloseSessionError,
361 ProviderAdapterResumeThreadError,
362 ProviderAdapterEnsureThreadError,
363 ProviderAdapterReadThreadSnapshotError,
364 ProviderAdapterRollbackThreadError,
365 ProviderAdapterForkThreadError,
366 ProviderAdapterTurnStartError,
367 ProviderAdapterSteerRunUnsupportedError,
368 ProviderAdapterSteerRunError,
369 ProviderAdapterInterruptError,
370 ProviderAdapterRuntimeRequestResponseError,
371 ProviderAdapterEventStreamError,
372 ProviderAdapterProtocolError,
373]);
374export type ProviderAdapterV2Error = typeof ProviderAdapterV2Error.Type;
375
376export interface ProviderAdapterV2OpenSessionInput {
377 readonly threadId: ThreadId;
378 readonly providerSessionId: ProviderSessionId;
379 readonly modelSelection: ModelSelection;
380 readonly runtimePolicy: ProviderAdapterV2RuntimePolicy;
381 readonly resumeFromSession?: OrchestrationV2ProviderSession;
382 /** Native thread to activate while an eager adapter opens its provider process. */
383 readonly initialNativeThreadId?: string;
384 /** Preserves provider item identity across eager activation of a persisted thread. */
385 readonly initialProviderItemIdentityVersion?: 2;
386}
387
388export interface ProviderAdapterV2EnsureThreadInput {
389 readonly threadId: ThreadId;
390 readonly modelSelection: ModelSelection;
391 readonly runtimePolicy: ProviderAdapterV2RuntimePolicy;
392 readonly providerSessionId?: ProviderSessionId;
393 readonly existingProviderThread?: OrchestrationV2ProviderThread;
394}
395
396export interface ProviderAdapterV2TurnInput {
397 readonly appThread: OrchestrationV2AppThread;
398 readonly threadId: ThreadId;
399 readonly runId: RunId;
400 readonly runOrdinal: number;
401 readonly providerTurnOrdinal: number;
402 readonly restartContinuationOfRunId?: RunId;
403 readonly attemptId: RunAttemptId;
404 readonly rootNodeId: NodeId;
405 readonly providerThread: OrchestrationV2ProviderThread;
406 readonly message: ProviderAdapterV2TurnMessage;
407 readonly modelSelection: ModelSelection;
408 readonly runtimePolicy: ProviderAdapterV2RuntimePolicy;
409}
410
411export interface ProviderAdapterV2SteerInput {
412 readonly threadId: ThreadId;
413 readonly runId: RunId;
414 readonly providerThread: OrchestrationV2ProviderThread;
415 readonly providerTurnId: ProviderTurnId;
416 readonly message: ProviderAdapterV2TurnMessage;
417}
418
419export interface ProviderAdapterV2InterruptInput {
420 readonly providerThread: OrchestrationV2ProviderThread;
421 readonly providerTurnId: ProviderTurnId;
422 /** When true, the next `startTurn` may respawn the provider runtime (Grok Stop recovery). */
423 readonly requestRuntimeRestart?: boolean;
424}
425
426export interface ProviderAdapterV2RuntimeRequestResponseInput {
427 readonly requestId: RuntimeRequestId;
428 readonly decision?: ProviderApprovalDecision;
429 readonly answers?: ProviderUserInputAnswers;
430 readonly response?: unknown;
431}
432
433export interface ProviderAdapterV2ThreadSnapshot {
434 readonly providerThread: OrchestrationV2ProviderThread;
435 readonly providerTurns: ReadonlyArray<OrchestrationV2ProviderTurn>;
436 readonly messages: ReadonlyArray<OrchestrationV2ConversationMessage>;
437 readonly runtimeRequests: ReadonlyArray<OrchestrationV2RuntimeRequest>;
438 readonly providerPayload?: unknown;
439}
440
441export interface ProviderAdapterV2ReadThreadSnapshotInput {
442 readonly providerThread: OrchestrationV2ProviderThread;
443}
444
445export type ProviderAdapterV2RollbackTarget =
446 | {
447 readonly type: "thread_start";
448 readonly checkpointId: CheckpointId;
449 readonly appRunOrdinal: 0;
450 }
451 | {
452 readonly type: "provider_turn";
453 readonly checkpointId: CheckpointId;
454 readonly appRunOrdinal: number;
455 readonly providerTurn: OrchestrationV2ProviderTurn;
456 };
457
458export interface ProviderAdapterV2RollbackThreadInput {
459 readonly providerThread: OrchestrationV2ProviderThread;
460 readonly target: ProviderAdapterV2RollbackTarget;
461 readonly providerThreadTurns: ReadonlyArray<OrchestrationV2ProviderTurn>;
462}
463
464export interface ProviderAdapterV2ForkThreadInput {
465 readonly sourceProviderThread: OrchestrationV2ProviderThread;
466 readonly sourceProviderTurns?: ReadonlyArray<OrchestrationV2ProviderTurn>;
467 readonly providerTurnId?: ProviderTurnId;
468 readonly targetThreadId: ThreadId;
469 readonly ownerNodeId?: NodeId;
470 readonly modelSelection?: ModelSelection;
471 readonly runtimePolicy?: ProviderAdapterV2RuntimePolicy;
472}
473
474export interface ProviderAdapterV2EventSubscription {
475 readonly events: Stream.Stream<ProviderAdapterV2Event, ProviderAdapterV2Error>;
476 readonly close: Effect.Effect<void>;
477}
478
479export interface ProviderAdapterV2HistoricalContext {
480 readonly messages: ReadonlyArray<OrchestrationV2HistoricalMessage>;
481 readonly context: string;
482}
483
484export interface ProviderAdapterV2SessionRuntime {
485 readonly instanceId: ProviderInstanceId;
486 readonly driver: ProviderDriverKind;
487 readonly providerSessionId: ProviderSessionId;
488 readonly providerSession: OrchestrationV2ProviderSession;
489 readonly events: Stream.Stream<ProviderAdapterV2Event, ProviderAdapterV2Error>;
490 /**
491 * Manager-owned runtimes expose a synchronous subscription so concurrent
492 * provider threads receive independent copies of the process event stream.
493 * Adapter runtimes may omit this and expose only their single-consumer event stream.
494 */
495 readonly subscribeEvents?: Effect.Effect<ProviderAdapterV2EventSubscription>;
496 /**
497 * Adapters whose native runtime can hold pending work outside an active
498 * turn (for example Claude background tasks and their wake turns) report it
499 * here so the session manager defers idle release while it is pending.
500 */
501 readonly hasPendingBackgroundWork?: Effect.Effect<boolean>;
502 /**
503 * Per-provider-thread pending work for root-run ingestion stop gates. When
504 * present, RunExecutionService uses only this probe (never the session-wide
505 * hasPendingBackgroundWork) so sibling native threads cannot pin an
506 * unrelated root subscription open.
507 */
508 readonly hasPendingBackgroundWorkForThread?: (
509 providerThread: OrchestrationV2ProviderThread,
510 ) => Effect.Effect<boolean>;
511 /**
512 * Capacity for the requested model/options, independent of native thread usage.
513 * `cwd` is the thread's working directory, for providers whose project config
514 * can change a model's limits.
515 */
516 readonly getModelContextWindow?: (
517 modelSelection: ModelSelection,
518 cwd?: string | null,
519 ) => number | undefined;
520 /** Whether an option-only change preserves measured native usage and capacity.
521 * Compaction thresholds are still discarded. Unknown transitions invalidate usage.
522 */
523 readonly canReuseContextUsage?: (previous: ModelSelection, next: ModelSelection) => boolean;
524 readonly ensureThread: (
525 input: ProviderAdapterV2EnsureThreadInput,
526 ) => Effect.Effect<OrchestrationV2ProviderThread, ProviderAdapterV2Error>;
527 readonly resumeThread: (input: {
528 readonly providerThread: OrchestrationV2ProviderThread;
529 readonly threadId?: ThreadId;
530 readonly modelSelection?: ModelSelection;
531 readonly runtimePolicy?: ProviderAdapterV2RuntimePolicy;
532 }) => Effect.Effect<OrchestrationV2ProviderThread, ProviderAdapterV2Error>;
533 /** False means the native protocol explicitly does not support history injection. */
534 readonly injectHistory?: (
535 input: ProviderAdapterV2HistoricalContext & {
536 readonly providerThread: OrchestrationV2ProviderThread;
537 },
538 ) => Effect.Effect<boolean, ProviderAdapterV2Error>;
539 readonly startTurn: (
540 input: ProviderAdapterV2TurnInput,
541 ) => Effect.Effect<void, ProviderAdapterV2Error>;
542 readonly compactThread?: (
543 input: ProviderAdapterV2TurnInput,
544 ) => Effect.Effect<void, ProviderAdapterV2Error>;
545 readonly steerTurn: (
546 input: ProviderAdapterV2SteerInput,
547 ) => Effect.Effect<void, ProviderAdapterV2Error>;
548 readonly interruptTurn: (
549 input: ProviderAdapterV2InterruptInput,
550 ) => Effect.Effect<void, ProviderAdapterV2Error>;
551 /**
552 * Lets a runtime shared by several app threads unload one provider thread's
553 * native state (and its MCP servers) when that app thread detaches, while
554 * the runtime keeps serving the others. A later resume reloads it.
555 */
556 readonly unloadThread?: (input: {
557 readonly providerThread: OrchestrationV2ProviderThread;
558 }) => Effect.Effect<void, ProviderAdapterV2Error>;
559 readonly respondToRuntimeRequest: (
560 input: ProviderAdapterV2RuntimeRequestResponseInput,
561 ) => Effect.Effect<void, ProviderAdapterV2Error>;
562 readonly readThreadSnapshot: (
563 input: ProviderAdapterV2ReadThreadSnapshotInput,
564 ) => Effect.Effect<ProviderAdapterV2ThreadSnapshot, ProviderAdapterV2Error>;
565 /**
566 * Providers that accept product feedback for a thread (#7949, Codex → OpenAI)
567 * expose it here; absent means the driver has no feedback channel.
568 */
569 readonly uploadFeedback?: (input: {
570 readonly providerThread: OrchestrationV2ProviderThread;
571 readonly reason?: string;
572 }) => Effect.Effect<{ readonly feedbackId: string }, ProviderAdapterV2Error>;
573 readonly rollbackThread: (
574 input: ProviderAdapterV2RollbackThreadInput,
575 ) => Effect.Effect<ProviderAdapterV2ThreadSnapshot, ProviderAdapterV2Error>;
576 readonly forkThread: (
577 input: ProviderAdapterV2ForkThreadInput,
578 ) => Effect.Effect<OrchestrationV2ProviderThread, ProviderAdapterV2Error>;
579}
580
581export interface ProviderAdapterV2Shape {
582 readonly instanceId: ProviderInstanceId;
583 readonly driver: ProviderDriverKind;
584 readonly getCapabilities: () => Effect.Effect<
585 OrchestrationV2ProviderCapabilities,
586 ProviderAdapterV2Error
587 >;
588 readonly planSelectionTransition: (
589 input: ProviderSelectionTransitionInput,
590 ) => Effect.Effect<ProviderSelectionTransitionPlan, ProviderAdapterV2Error>;
591 readonly openSession: (
592 input: ProviderAdapterV2OpenSessionInput,
593 ) => Effect.Effect<ProviderAdapterV2SessionRuntime, ProviderAdapterV2Error, Scope.Scope>;
594}
595
596export class ProviderAdapterV2 extends Context.Service<ProviderAdapterV2, ProviderAdapterV2Shape>()(
597 "t3/orchestration-v2/ProviderAdapter/ProviderAdapterV2",
598) {}