@relayfx/sdk 0.0.50 → 0.2.0

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 (155) hide show
  1. package/README.md +5 -0
  2. package/dist/ai.js +42 -17222
  3. package/dist/index-2xztzkfr.js +20596 -0
  4. package/dist/index-bcbbm5wt.js +137 -0
  5. package/dist/index-qgt9z94q.js +2443 -0
  6. package/dist/index.js +830 -18839
  7. package/dist/migrations/20260712120000_durable_inbox/migration.sql +9 -0
  8. package/dist/migrations/20260712140000_execution_state/migration.sql +5 -0
  9. package/dist/migrations/20260712150000_durable_entities/migration.sql +15 -0
  10. package/dist/migrations/20260712160000_ephemeral_presence/migration.sql +13 -0
  11. package/dist/migrations/20260712170000_topic_subscriptions/migration.sql +3 -0
  12. package/dist/migrations/20260712180000_child_fan_out/migration.sql +27 -0
  13. package/dist/migrations/20260712190000_workflow_definitions/migration.sql +3 -0
  14. package/dist/migrations/20260712200000_workflow_runtime/migration.sql +2 -0
  15. package/dist/migrations/mysql/0003_durable_inbox.sql +3 -0
  16. package/dist/migrations/mysql/0004_execution_state.sql +3 -0
  17. package/dist/migrations/mysql/0005_durable_entities.sql +13 -0
  18. package/dist/migrations/mysql/0006_ephemeral_presence.sql +12 -0
  19. package/dist/migrations/mysql/0007_topic_subscriptions.sql +1 -0
  20. package/dist/migrations/mysql/0008_child_fan_out.sql +26 -0
  21. package/dist/migrations/mysql/0009_workflow_definitions.sql +3 -0
  22. package/dist/migrations/mysql/0010_workflow_runtime.sql +3 -0
  23. package/dist/migrations/pg/20260712120000_durable_inbox/migration.sql +9 -0
  24. package/dist/migrations/pg/20260712140000_execution_state/migration.sql +5 -0
  25. package/dist/migrations/pg/20260712150000_durable_entities/migration.sql +15 -0
  26. package/dist/migrations/pg/20260712160000_ephemeral_presence/migration.sql +13 -0
  27. package/dist/migrations/pg/20260712170000_topic_subscriptions/migration.sql +3 -0
  28. package/dist/migrations/pg/20260712180000_child_fan_out/migration.sql +27 -0
  29. package/dist/migrations/pg/20260712190000_workflow_definitions/migration.sql +3 -0
  30. package/dist/migrations/pg/20260712200000_workflow_runtime/migration.sql +2 -0
  31. package/dist/migrations/sqlite/0003_durable_inbox.sql +9 -0
  32. package/dist/migrations/sqlite/0004_execution_state.sql +3 -0
  33. package/dist/migrations/sqlite/0005_durable_entities.sql +15 -0
  34. package/dist/migrations/sqlite/0006_ephemeral_presence.sql +12 -0
  35. package/dist/migrations/sqlite/0007_topic_subscriptions.sql +3 -0
  36. package/dist/migrations/sqlite/0008_child_fan_out.sql +27 -0
  37. package/dist/migrations/sqlite/0009_workflow_definitions.sql +3 -0
  38. package/dist/migrations/sqlite/0010_workflow_runtime.sql +3 -0
  39. package/dist/sqlite.js +737 -0
  40. package/dist/types/relay/adapter-outbox.d.ts +3 -3
  41. package/dist/types/relay/client.d.ts +335 -25
  42. package/dist/types/relay/command.d.ts +41 -0
  43. package/dist/types/relay/database.d.ts +1 -0
  44. package/dist/types/relay/index.d.ts +3 -2
  45. package/dist/types/relay/operation.d.ts +1082 -7
  46. package/dist/types/relay/sqlite-migrations.d.ts +54 -0
  47. package/dist/types/relay/sqlite-runtime.d.ts +10 -0
  48. package/dist/types/relay/sqlite.d.ts +29 -0
  49. package/dist/types/runtime/address/address-book-service.d.ts +4 -4
  50. package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
  51. package/dist/types/runtime/agent/agent-loop-service.d.ts +2 -2
  52. package/dist/types/runtime/agent/agent-registry-service.d.ts +1 -1
  53. package/dist/types/runtime/agent/relay-compaction.d.ts +1 -1
  54. package/dist/types/runtime/agent/relay-permissions.d.ts +1 -1
  55. package/dist/types/runtime/agent/relay-steering.d.ts +1 -1
  56. package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +30 -0
  57. package/dist/types/runtime/child/child-fan-out-runtime.d.ts +34 -0
  58. package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +25 -0
  59. package/dist/types/runtime/child/child-run-service.d.ts +1 -1
  60. package/dist/types/runtime/child/parent-notifier-service.d.ts +1 -1
  61. package/dist/types/runtime/cluster/execution-entity.d.ts +5 -3
  62. package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
  63. package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
  64. package/dist/types/runtime/envelope/envelope-service.d.ts +7 -3
  65. package/dist/types/runtime/execution/active-execution-registry.d.ts +12 -0
  66. package/dist/types/runtime/execution/event-log-service.d.ts +1 -1
  67. package/dist/types/runtime/execution/execution-service.d.ts +2 -1
  68. package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
  69. package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
  70. package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
  71. package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
  72. package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
  73. package/dist/types/runtime/index.d.ts +18 -0
  74. package/dist/types/runtime/memory/memory-service.d.ts +1 -1
  75. package/dist/types/runtime/presence/presence-service.d.ts +30 -0
  76. package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
  77. package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -18
  78. package/dist/types/runtime/schedule/scheduler-service.d.ts +1 -1
  79. package/dist/types/runtime/session/session-store-service.d.ts +1 -1
  80. package/dist/types/runtime/skill/skill-registry-service.d.ts +1 -1
  81. package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
  82. package/dist/types/runtime/state/state-tools.d.ts +5 -0
  83. package/dist/types/runtime/tool/tool-runtime-service.d.ts +1 -1
  84. package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
  85. package/dist/types/runtime/topic/topic-service.d.ts +50 -0
  86. package/dist/types/runtime/wait/wait-service.d.ts +2 -1
  87. package/dist/types/runtime/wait/wait-signal.d.ts +1 -1
  88. package/dist/types/runtime/workflow/definition-runtime.d.ts +78 -0
  89. package/dist/types/runtime/workflow/execution-workflow.d.ts +7 -7
  90. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +1 -1
  91. package/dist/types/schema/address-schema.d.ts +6 -6
  92. package/dist/types/schema/child-orchestration-schema.d.ts +393 -0
  93. package/dist/types/schema/entity-schema.d.ts +40 -0
  94. package/dist/types/schema/envelope-schema.d.ts +1 -0
  95. package/dist/types/schema/execution-schema.d.ts +2 -2
  96. package/dist/types/schema/ids-schema.d.ts +20 -0
  97. package/dist/types/schema/inbox-schema.d.ts +81 -0
  98. package/dist/types/schema/index.d.ts +7 -0
  99. package/dist/types/schema/presence-schema.d.ts +28 -0
  100. package/dist/types/schema/state-schema.d.ts +35 -0
  101. package/dist/types/schema/wait-schema.d.ts +98 -0
  102. package/dist/types/schema/workflow-schema.d.ts +2062 -0
  103. package/dist/types/store-sql/address/address-book-repository.d.ts +1 -1
  104. package/dist/types/store-sql/child/child-fan-out-repository.d.ts +53 -0
  105. package/dist/types/store-sql/database/database-service.d.ts +4 -18
  106. package/dist/types/store-sql/database/notification-bus.d.ts +2 -0
  107. package/dist/types/store-sql/database/sql-dialect.d.ts +13 -0
  108. package/dist/types/store-sql/entity/entity-repository.d.ts +36 -0
  109. package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -0
  110. package/dist/types/store-sql/execution/execution-event-repository.d.ts +2 -1
  111. package/dist/types/store-sql/execution/execution-repository.d.ts +12 -2
  112. package/dist/types/store-sql/inbox/inbox-repository.d.ts +56 -0
  113. package/dist/types/store-sql/index.d.ts +8 -0
  114. package/dist/types/store-sql/portable.d.ts +29 -0
  115. package/dist/types/store-sql/presence/presence-repository.d.ts +51 -0
  116. package/dist/types/store-sql/schema/relay-schema.d.ts +3064 -587
  117. package/dist/types/store-sql/state/execution-state-repository.d.ts +80 -0
  118. package/dist/types/store-sql/tenant/tenant-id.d.ts +0 -2
  119. package/dist/types/store-sql/topic/topic-repository.d.ts +44 -0
  120. package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +29 -0
  121. package/package.json +26 -4
  122. package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +0 -1971
  123. package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  124. package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  125. package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  126. package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  127. package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  128. package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +0 -2954
  129. package/dist/migrations/20260705012626_common_stryfe/snapshot.json +0 -3378
  130. package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  131. package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  132. package/dist/migrations/20260705030344_short_patriot/snapshot.json +0 -3873
  133. package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  134. package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  135. package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +0 -4883
  136. package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +0 -4883
  137. package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  138. package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
  139. package/dist/migrations/pg/20260701002839_sour_cerebro/snapshot.json +0 -1971
  140. package/dist/migrations/pg/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  141. package/dist/migrations/pg/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  142. package/dist/migrations/pg/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  143. package/dist/migrations/pg/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  144. package/dist/migrations/pg/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  145. package/dist/migrations/pg/20260705003847_nervous_banshee/snapshot.json +0 -2954
  146. package/dist/migrations/pg/20260705012626_common_stryfe/snapshot.json +0 -3378
  147. package/dist/migrations/pg/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  148. package/dist/migrations/pg/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  149. package/dist/migrations/pg/20260705030344_short_patriot/snapshot.json +0 -3873
  150. package/dist/migrations/pg/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  151. package/dist/migrations/pg/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  152. package/dist/migrations/pg/20260706233300_equal_cyclops/snapshot.json +0 -4883
  153. package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +0 -4883
  154. package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  155. package/dist/migrations/pg/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
@@ -0,0 +1,78 @@
1
+ import { ChildOrchestration, Ids, Shared, Workflow } from "../../schema/index";
2
+ import { WorkflowDefinitionRepository } from "../../store-sql/portable";
3
+ import { Cause, Context, Effect, Layer, Schema } from "effect";
4
+ export interface SideEffectContext {
5
+ readonly execution_id: Ids.ExecutionId;
6
+ readonly operation_id: Ids.WorkflowOperationId;
7
+ readonly idempotency_key: string;
8
+ }
9
+ declare const UnsupportedOperation_base: Schema.Class<UnsupportedOperation, Schema.TaggedStruct<"UnsupportedWorkflowOperation", {
10
+ readonly operation_id: Schema.brand<Schema.String, "Relay.WorkflowOperationId"> & {
11
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowOperationId">;
12
+ };
13
+ readonly kind: Schema.String;
14
+ }>, Cause.YieldableError>;
15
+ export declare class UnsupportedOperation extends UnsupportedOperation_base {
16
+ }
17
+ declare const PinnedDefinitionNotFound_base: Schema.Class<PinnedDefinitionNotFound, Schema.TaggedStruct<"PinnedWorkflowDefinitionNotFound", {
18
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
19
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
20
+ };
21
+ }>, Cause.YieldableError>;
22
+ export declare class PinnedDefinitionNotFound extends PinnedDefinitionNotFound_base {
23
+ }
24
+ declare const PinnedDefinitionMismatch_base: Schema.Class<PinnedDefinitionMismatch, Schema.TaggedStruct<"PinnedWorkflowDefinitionMismatch", {
25
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
26
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
27
+ };
28
+ }>, Cause.YieldableError>;
29
+ export declare class PinnedDefinitionMismatch extends PinnedDefinitionMismatch_base {
30
+ }
31
+ export interface Handlers {
32
+ readonly tool?: (executionId: Ids.ExecutionId, operation: typeof Workflow.ToolOperation.Type, context: SideEffectContext) => Effect.Effect<Shared.JsonValue, unknown>;
33
+ readonly child: (executionId: Ids.ExecutionId, operation: typeof Workflow.ChildOperation.Type | typeof Workflow.DispatchableChildOperation.Type, context: SideEffectContext) => Effect.Effect<Shared.JsonValue, unknown>;
34
+ readonly approval: (executionId: Ids.ExecutionId, operation: typeof Workflow.ApprovalOperation.Type, context: SideEffectContext) => Effect.Effect<Shared.JsonValue, unknown>;
35
+ readonly timer: (executionId: Ids.ExecutionId, operation: typeof Workflow.TimerOperation.Type, context: SideEffectContext) => Effect.Effect<void, unknown>;
36
+ readonly branch: (executionId: Ids.ExecutionId, operation: typeof Workflow.BranchOperation.Type, context: SideEffectContext) => Effect.Effect<boolean, unknown>;
37
+ readonly structuredCompletion: (schemaRef: string, value: Shared.JsonValue | undefined, context: SideEffectContext) => Effect.Effect<Shared.JsonValue, unknown>;
38
+ readonly createChildFanOut?: (definition: ChildOrchestration.FanOutDefinition, context: SideEffectContext) => Effect.Effect<ChildOrchestration.FanOutState, unknown>;
39
+ readonly admitChildFanOut?: (fanOutId: Ids.ChildFanOutId) => Effect.Effect<void, unknown>;
40
+ readonly inspectChildFanOut?: (fanOutId: Ids.ChildFanOutId) => Effect.Effect<ChildOrchestration.FanOutState | undefined, unknown>;
41
+ }
42
+ declare const HandlerService_base: Context.ServiceClass<HandlerService, "@relayfx/runtime/WorkflowDefinitionHandlers", Handlers>;
43
+ export declare class HandlerService extends HandlerService_base {
44
+ }
45
+ export interface Interface {
46
+ readonly start: (input: Workflow.StartRunPayload) => Effect.Effect<Workflow.RunRecord, unknown>;
47
+ readonly run: (executionId: Ids.ExecutionId) => Effect.Effect<Shared.JsonValue | undefined, unknown>;
48
+ readonly recover: () => Effect.Effect<ReadonlyArray<Ids.ExecutionId>, unknown>;
49
+ readonly inspect: (executionId: Ids.ExecutionId) => Effect.Effect<Workflow.RunRecord | undefined, unknown>;
50
+ readonly replay: (executionId: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<Workflow.LifecycleEvent>, unknown>;
51
+ readonly cancel: (executionId: Ids.ExecutionId) => Effect.Effect<Workflow.RunRecord | undefined, unknown>;
52
+ }
53
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkflowDefinitionRuntime", Interface>;
54
+ export declare class Service extends Service_base {
55
+ }
56
+ export declare const fanOutIdFor: (executionId: Ids.ExecutionId, fanOutKey: string) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
57
+ declare const WorkflowCancelled_base: Schema.Class<WorkflowCancelled, Schema.TaggedStruct<"WorkflowCancelled", {}>, Cause.YieldableError>;
58
+ export declare class WorkflowCancelled extends WorkflowCancelled_base {
59
+ }
60
+ declare const WorkflowBudgetExceeded_base: Schema.Class<WorkflowBudgetExceeded, Schema.TaggedStruct<"WorkflowBudgetExceeded", {
61
+ readonly operation_id: Schema.brand<Schema.String, "Relay.WorkflowOperationId"> & {
62
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WorkflowOperationId">;
63
+ };
64
+ }>, Cause.YieldableError>;
65
+ export declare class WorkflowBudgetExceeded extends WorkflowBudgetExceeded_base {
66
+ }
67
+ declare const WorkflowJoining_base: Schema.Class<WorkflowJoining, Schema.TaggedStruct<"WorkflowJoining", {
68
+ readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
69
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
70
+ };
71
+ }>, Cause.YieldableError>;
72
+ export declare class WorkflowJoining extends WorkflowJoining_base {
73
+ }
74
+ export declare const validate: (definition: Workflow.Definition) => Effect.Effect<void, never, never> | Effect.Effect<never, UnsupportedOperation, never>;
75
+ export declare const run: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Schema.Json | undefined, unknown, WorkflowDefinitionRepository.Service | HandlerService>;
76
+ export declare const testHandlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
77
+ export declare const layer: Layer.Layer<Service, unknown, WorkflowDefinitionRepository.Service | HandlerService>;
78
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { Agent, Ids } from "../../schema/index";
2
- import { ChildExecutionRepository, EnvelopeRepository, ExecutionRepository, ToolCallRepository } from "../../store-sql/index";
2
+ import { ChildExecutionRepository, EnvelopeRepository, ExecutionRepository, ToolCallRepository } from "../../store-sql/portable";
3
3
  import { Workflow } from "effect/unstable/workflow";
4
4
  import { Effect, Layer, Option, Schema } from "effect";
5
5
  import { Service as AgentLoopService } from "../agent/agent-loop-service";
@@ -432,12 +432,12 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
432
432
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
433
433
  }>, typeof ExecutionWorkflowFailed>;
434
434
  export declare const sessionEntryScope: (input: StartInput, turn: number) => string;
435
- export declare const layer: Layer.Layer<never, never, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | import("../wait/wait-service").Service | ToolRuntimeService | import("../address/address-resolution-service").Service | AgentLoopService | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
435
+ export declare const layer: Layer.Layer<never, never, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | import("../wait/wait-service").Service | ToolRuntimeService | import("../address/address-resolution-service").Service | import("../skill/skill-registry-service").Service | import("../execution/execution-service").Service | ToolTransitionCoordinatorService | import("../workspace/workspace-planner-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine | AgentLoopService>;
436
436
  export declare const start: <const Discard extends boolean = false>(input: StartInput, options?: {
437
437
  readonly discard?: Discard;
438
438
  }) => Effect.Effect<Discard extends true ? string : {
439
- readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
440
439
  readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
440
+ readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
441
441
  readonly metadata?: {
442
442
  readonly [x: string]: Schema.Json;
443
443
  };
@@ -445,22 +445,22 @@ export declare const start: <const Discard extends boolean = false>(input: Start
445
445
  readonly wait_state?: "cancelled" | "resolved" | "timed_out";
446
446
  }, Discard extends true ? never : ExecutionWorkflowFailed, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
447
447
  export declare const startRequest: (input: StartInput) => Effect.Effect<{
448
- readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
449
448
  readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
449
+ readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
450
450
  readonly metadata?: {
451
451
  readonly [x: string]: Schema.Json;
452
452
  };
453
453
  readonly wait_id?: string & import("effect/Brand").Brand<"Relay.WaitId">;
454
454
  readonly wait_state?: "cancelled" | "resolved" | "timed_out";
455
- }, ExecutionWorkflowFailed, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
455
+ }, ExecutionWorkflowFailed, ExecutionRepository.Service | import("../wait/wait-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
456
456
  export declare const dispatchRequest: (input: StartInput) => Effect.Effect<void, never, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
457
457
  export declare const cancelRequest: (input: CancelExecutionInput) => Effect.Effect<{
458
458
  execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
459
459
  status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
460
- }, ExecutionWorkflowFailed, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | import("../wait/wait-service").Service | ToolTransitionCoordinatorService | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
460
+ }, ExecutionWorkflowFailed, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | import("../wait/wait-service").Service | import("../execution/execution-service").Service | ToolTransitionCoordinatorService | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
461
461
  export declare const poll: (executionId: string) => Effect.Effect<Option.Option<Workflow.Result<{
462
- readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
463
462
  readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
463
+ readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
464
464
  readonly metadata?: {
465
465
  readonly [x: string]: Schema.Json;
466
466
  };
@@ -1,5 +1,5 @@
1
1
  import { Agent, Ids, Shared, Tool, Workspace } from "../../schema/index";
2
- import { WorkspaceLeaseRepository } from "../../store-sql/index";
2
+ import { WorkspaceLeaseRepository } from "../../store-sql/portable";
3
3
  import { Context, Effect, Layer, Schema } from "effect";
4
4
  import { Service as EventLogService } from "../execution/event-log-service";
5
5
  import { WorkspaceCapabilityUnsupported } from "./workspace-provider-service";
@@ -1,8 +1,8 @@
1
1
  import { Schema } from "effect";
2
- export declare const RouteKind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
2
+ export declare const RouteKind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
3
3
  export type RouteKind = typeof RouteKind.Type;
4
4
  export declare const Route: Schema.Struct<{
5
- readonly kind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
5
+ readonly kind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
6
6
  readonly route_key: Schema.String;
7
7
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
8
8
  }>;
@@ -16,7 +16,7 @@ export declare const RouteRecord: Schema.Struct<{
16
16
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
17
17
  };
18
18
  readonly route: Schema.Struct<{
19
- readonly kind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
19
+ readonly kind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
20
20
  readonly route_key: Schema.String;
21
21
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
22
22
  }>;
@@ -30,7 +30,7 @@ export declare const RegisterRoutePayload: Schema.Struct<{
30
30
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
31
31
  };
32
32
  readonly route: Schema.Struct<{
33
- readonly kind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
33
+ readonly kind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
34
34
  readonly route_key: Schema.String;
35
35
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
36
36
  }>;
@@ -46,7 +46,7 @@ export declare const RouteRegistered: Schema.Struct<{
46
46
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
47
47
  };
48
48
  readonly route: Schema.Struct<{
49
- readonly kind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
49
+ readonly kind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
50
50
  readonly route_key: Schema.String;
51
51
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
52
52
  }>;
@@ -65,7 +65,7 @@ export declare const RouteList: Schema.Struct<{
65
65
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
66
66
  };
67
67
  readonly route: Schema.Struct<{
68
- readonly kind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
68
+ readonly kind: Schema.Literals<readonly ["local-agent", "local-execution", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
69
69
  readonly route_key: Schema.String;
70
70
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
71
71
  }>;
@@ -0,0 +1,393 @@
1
+ import { Schema } from "effect";
2
+ export declare const JoinPolicy: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
3
+ readonly count: Schema.Int;
4
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
5
+ export type JoinPolicy = typeof JoinPolicy.Type;
6
+ export declare const FanOutChild: Schema.Struct<{
7
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
8
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
9
+ };
10
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
11
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
12
+ };
13
+ readonly override: Schema.optionalKey<Schema.Struct<{
14
+ readonly instructions: Schema.optionalKey<Schema.String>;
15
+ readonly model: Schema.optionalKey<Schema.Struct<{
16
+ readonly provider: Schema.String;
17
+ readonly model: Schema.String;
18
+ readonly registration_key: Schema.optionalKey<Schema.String>;
19
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
20
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
21
+ }>>;
22
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
23
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
24
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
25
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
26
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
27
+ }>>;
28
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
29
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
30
+ }>>;
31
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
32
+ readonly type: Schema.Literal<"text">;
33
+ readonly text: Schema.String;
34
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
35
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
36
+ }>, Schema.Struct<{
37
+ readonly type: Schema.Literal<"structured">;
38
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
39
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
40
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
41
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
42
+ }>, Schema.Struct<{
43
+ readonly type: Schema.Literal<"blob-reference">;
44
+ readonly uri: Schema.String;
45
+ readonly media_type: Schema.String;
46
+ readonly filename: Schema.optionalKey<Schema.String>;
47
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
48
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
49
+ }>, Schema.Struct<{
50
+ readonly type: Schema.Literal<"artifact-reference">;
51
+ readonly artifact_id: Schema.String;
52
+ readonly media_type: Schema.optionalKey<Schema.String>;
53
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
54
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
55
+ }>, Schema.Struct<{
56
+ readonly type: Schema.Literal<"tool-call">;
57
+ readonly call: Schema.Struct<{
58
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
59
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
60
+ };
61
+ readonly name: Schema.String;
62
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
63
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
64
+ }>;
65
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
66
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
67
+ }>, Schema.Struct<{
68
+ readonly type: Schema.Literal<"tool-result">;
69
+ readonly result: Schema.Struct<{
70
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
71
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
72
+ };
73
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
74
+ readonly error: Schema.optionalKey<Schema.String>;
75
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
76
+ }>;
77
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
78
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
79
+ }>]>>>;
80
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
81
+ }>;
82
+ export interface FanOutChild extends Schema.Schema.Type<typeof FanOutChild> {
83
+ }
84
+ export declare const FanOutDefinition: Schema.Struct<{
85
+ readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
86
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
87
+ };
88
+ readonly parent_execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
89
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
90
+ };
91
+ readonly children: Schema.$Array<Schema.Struct<{
92
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
93
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
94
+ };
95
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
96
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
97
+ };
98
+ readonly override: Schema.optionalKey<Schema.Struct<{
99
+ readonly instructions: Schema.optionalKey<Schema.String>;
100
+ readonly model: Schema.optionalKey<Schema.Struct<{
101
+ readonly provider: Schema.String;
102
+ readonly model: Schema.String;
103
+ readonly registration_key: Schema.optionalKey<Schema.String>;
104
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
105
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
106
+ }>>;
107
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
108
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
109
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
110
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
111
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
112
+ }>>;
113
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
114
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
115
+ }>>;
116
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
117
+ readonly type: Schema.Literal<"text">;
118
+ readonly text: Schema.String;
119
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
120
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
121
+ }>, Schema.Struct<{
122
+ readonly type: Schema.Literal<"structured">;
123
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
124
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
125
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
126
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
127
+ }>, Schema.Struct<{
128
+ readonly type: Schema.Literal<"blob-reference">;
129
+ readonly uri: Schema.String;
130
+ readonly media_type: Schema.String;
131
+ readonly filename: Schema.optionalKey<Schema.String>;
132
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
133
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
134
+ }>, Schema.Struct<{
135
+ readonly type: Schema.Literal<"artifact-reference">;
136
+ readonly artifact_id: Schema.String;
137
+ readonly media_type: Schema.optionalKey<Schema.String>;
138
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
139
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
140
+ }>, Schema.Struct<{
141
+ readonly type: Schema.Literal<"tool-call">;
142
+ readonly call: Schema.Struct<{
143
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
144
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
145
+ };
146
+ readonly name: Schema.String;
147
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
148
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
149
+ }>;
150
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
151
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
152
+ }>, Schema.Struct<{
153
+ readonly type: Schema.Literal<"tool-result">;
154
+ readonly result: Schema.Struct<{
155
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
156
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
157
+ };
158
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
159
+ readonly error: Schema.optionalKey<Schema.String>;
160
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
161
+ }>;
162
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
163
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
164
+ }>]>>>;
165
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
166
+ }>>;
167
+ readonly max_concurrency: Schema.Int;
168
+ readonly join: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
169
+ readonly count: Schema.Int;
170
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
171
+ readonly created_at: Schema.Int;
172
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
173
+ }>;
174
+ export interface FanOutDefinition extends Schema.Schema.Type<typeof FanOutDefinition> {
175
+ }
176
+ export declare const MemberState: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
177
+ export type MemberState = typeof MemberState.Type;
178
+ export declare const AggregateState: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
179
+ export type AggregateState = typeof AggregateState.Type;
180
+ export declare const FanOutMember: Schema.Struct<{
181
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
182
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
183
+ };
184
+ readonly ordinal: Schema.Int;
185
+ readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
186
+ readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
187
+ readonly type: Schema.Literal<"text">;
188
+ readonly text: Schema.String;
189
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
190
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
191
+ }>, Schema.Struct<{
192
+ readonly type: Schema.Literal<"structured">;
193
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
194
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
195
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
196
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
197
+ }>, Schema.Struct<{
198
+ readonly type: Schema.Literal<"blob-reference">;
199
+ readonly uri: Schema.String;
200
+ readonly media_type: Schema.String;
201
+ readonly filename: Schema.optionalKey<Schema.String>;
202
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
203
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
204
+ }>, Schema.Struct<{
205
+ readonly type: Schema.Literal<"artifact-reference">;
206
+ readonly artifact_id: Schema.String;
207
+ readonly media_type: Schema.optionalKey<Schema.String>;
208
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
209
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
210
+ }>, Schema.Struct<{
211
+ readonly type: Schema.Literal<"tool-call">;
212
+ readonly call: Schema.Struct<{
213
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
214
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
215
+ };
216
+ readonly name: Schema.String;
217
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
218
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
219
+ }>;
220
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
221
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
222
+ }>, Schema.Struct<{
223
+ readonly type: Schema.Literal<"tool-result">;
224
+ readonly result: Schema.Struct<{
225
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
226
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
227
+ };
228
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
229
+ readonly error: Schema.optionalKey<Schema.String>;
230
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
231
+ }>;
232
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
233
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
234
+ }>]>>>;
235
+ readonly error: Schema.optionalKey<Schema.String>;
236
+ readonly completed_at: Schema.optionalKey<Schema.Int>;
237
+ }>;
238
+ export interface FanOutMember extends Schema.Schema.Type<typeof FanOutMember> {
239
+ }
240
+ export declare const FanOutState: Schema.Struct<{
241
+ readonly state: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
242
+ readonly members: Schema.$Array<Schema.Struct<{
243
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
244
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
245
+ };
246
+ readonly ordinal: Schema.Int;
247
+ readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
248
+ readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
249
+ readonly type: Schema.Literal<"text">;
250
+ readonly text: Schema.String;
251
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
252
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
253
+ }>, Schema.Struct<{
254
+ readonly type: Schema.Literal<"structured">;
255
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
256
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
257
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
258
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
259
+ }>, Schema.Struct<{
260
+ readonly type: Schema.Literal<"blob-reference">;
261
+ readonly uri: Schema.String;
262
+ readonly media_type: Schema.String;
263
+ readonly filename: Schema.optionalKey<Schema.String>;
264
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
265
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
266
+ }>, Schema.Struct<{
267
+ readonly type: Schema.Literal<"artifact-reference">;
268
+ readonly artifact_id: Schema.String;
269
+ readonly media_type: Schema.optionalKey<Schema.String>;
270
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
271
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
272
+ }>, Schema.Struct<{
273
+ readonly type: Schema.Literal<"tool-call">;
274
+ readonly call: Schema.Struct<{
275
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
276
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
277
+ };
278
+ readonly name: Schema.String;
279
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
280
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
281
+ }>;
282
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
283
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
284
+ }>, Schema.Struct<{
285
+ readonly type: Schema.Literal<"tool-result">;
286
+ readonly result: Schema.Struct<{
287
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
288
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
289
+ };
290
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
291
+ readonly error: Schema.optionalKey<Schema.String>;
292
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
293
+ }>;
294
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
295
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
296
+ }>]>>>;
297
+ readonly error: Schema.optionalKey<Schema.String>;
298
+ readonly completed_at: Schema.optionalKey<Schema.Int>;
299
+ }>>;
300
+ readonly satisfied_at: Schema.optionalKey<Schema.Int>;
301
+ readonly failed_at: Schema.optionalKey<Schema.Int>;
302
+ readonly cancelled_at: Schema.optionalKey<Schema.Int>;
303
+ readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
304
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
305
+ };
306
+ readonly parent_execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
307
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
308
+ };
309
+ readonly children: Schema.$Array<Schema.Struct<{
310
+ readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
311
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
312
+ };
313
+ readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
314
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
315
+ };
316
+ readonly override: Schema.optionalKey<Schema.Struct<{
317
+ readonly instructions: Schema.optionalKey<Schema.String>;
318
+ readonly model: Schema.optionalKey<Schema.Struct<{
319
+ readonly provider: Schema.String;
320
+ readonly model: Schema.String;
321
+ readonly registration_key: Schema.optionalKey<Schema.String>;
322
+ readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
323
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
324
+ }>>;
325
+ readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
326
+ readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
327
+ readonly workspace_policy: Schema.optionalKey<Schema.Struct<{
328
+ readonly mode: Schema.Literals<readonly ["share", "fork"]>;
329
+ readonly fallback: Schema.optionalKey<Schema.Literals<readonly ["fail", "fresh"]>>;
330
+ }>>;
331
+ readonly output_schema_ref: Schema.optionalKey<Schema.String>;
332
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
333
+ }>>;
334
+ readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
335
+ readonly type: Schema.Literal<"text">;
336
+ readonly text: Schema.String;
337
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
338
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
339
+ }>, Schema.Struct<{
340
+ readonly type: Schema.Literal<"structured">;
341
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
342
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
343
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
344
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
345
+ }>, Schema.Struct<{
346
+ readonly type: Schema.Literal<"blob-reference">;
347
+ readonly uri: Schema.String;
348
+ readonly media_type: Schema.String;
349
+ readonly filename: Schema.optionalKey<Schema.String>;
350
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
351
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
352
+ }>, Schema.Struct<{
353
+ readonly type: Schema.Literal<"artifact-reference">;
354
+ readonly artifact_id: Schema.String;
355
+ readonly media_type: Schema.optionalKey<Schema.String>;
356
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
357
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
358
+ }>, Schema.Struct<{
359
+ readonly type: Schema.Literal<"tool-call">;
360
+ readonly call: Schema.Struct<{
361
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
362
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
363
+ };
364
+ readonly name: Schema.String;
365
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
366
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
367
+ }>;
368
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
369
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
370
+ }>, Schema.Struct<{
371
+ readonly type: Schema.Literal<"tool-result">;
372
+ readonly result: Schema.Struct<{
373
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
374
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
375
+ };
376
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
377
+ readonly error: Schema.optionalKey<Schema.String>;
378
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
379
+ }>;
380
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
381
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
382
+ }>]>>>;
383
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
384
+ }>>;
385
+ readonly max_concurrency: Schema.Int;
386
+ readonly join: Schema.Union<readonly [Schema.TaggedStruct<"all", {}>, Schema.TaggedStruct<"first-success", {}>, Schema.TaggedStruct<"quorum", {
387
+ readonly count: Schema.Int;
388
+ }>, Schema.TaggedStruct<"best-effort", {}>]>;
389
+ readonly created_at: Schema.Int;
390
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
391
+ }>;
392
+ export interface FanOutState extends Schema.Schema.Type<typeof FanOutState> {
393
+ }