@relayfx/sdk 0.2.15 → 0.3.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 (109) hide show
  1. package/dist/ai.js +2 -2
  2. package/dist/{index-z9xk02sv.js → index-c2skef55.js} +1898 -1556
  3. package/dist/{index-d8q4kfjy.js → index-d3dme13d.js} +12 -8
  4. package/dist/{index-xbbfagnb.js → index-pn652eef.js} +166 -105
  5. package/dist/{index-gxskhyra.js → index-vwbatywf.js} +8 -8
  6. package/dist/index.js +5 -5
  7. package/dist/mysql.js +24 -9
  8. package/dist/postgres.js +18 -13
  9. package/dist/sqlite.js +26 -29
  10. package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +2 -2
  11. package/dist/types/relay/adapter-outbox.d.ts +1 -1
  12. package/dist/types/relay/client.d.ts +32 -30
  13. package/dist/types/relay/command.d.ts +10 -4
  14. package/dist/types/relay/database.d.ts +4 -4
  15. package/dist/types/relay/migration-errors.d.ts +8 -2
  16. package/dist/types/relay/mysql.d.ts +2 -2
  17. package/dist/types/relay/operation.d.ts +211 -126
  18. package/dist/types/relay/postgres.d.ts +2 -2
  19. package/dist/types/relay/runtime-capability-policy.d.ts +11 -5
  20. package/dist/types/relay/runtime-database.d.ts +1 -1
  21. package/dist/types/relay/runtime.d.ts +4 -4
  22. package/dist/types/relay/sqlite-migrations.d.ts +1 -1
  23. package/dist/types/relay/sqlite-runtime.d.ts +10 -5
  24. package/dist/types/relay/tool-worker.d.ts +6 -5
  25. package/dist/types/runtime/address/address-book-service.d.ts +3 -3
  26. package/dist/types/runtime/address/address-resolution-service.d.ts +41 -41
  27. package/dist/types/runtime/agent/agent-loop-service.d.ts +14 -5
  28. package/dist/types/runtime/agent/agent-registry-service.d.ts +2 -2
  29. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +1 -1
  30. package/dist/types/runtime/agent/relay-tool-output.d.ts +4 -1
  31. package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +1 -1
  32. package/dist/types/runtime/child/child-fan-out-runtime.d.ts +12 -8
  33. package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +1 -1
  34. package/dist/types/runtime/child/child-run-service.d.ts +7 -4
  35. package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -2
  36. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +5 -4
  37. package/dist/types/runtime/cluster/execution-entity.d.ts +2 -2
  38. package/dist/types/runtime/content/artifact-store-service.d.ts +2 -2
  39. package/dist/types/runtime/content/blob-store-service.d.ts +1 -1
  40. package/dist/types/runtime/entity/entity-instance-service.d.ts +14 -5
  41. package/dist/types/runtime/entity/entity-registry-service.d.ts +2 -2
  42. package/dist/types/runtime/envelope/envelope-service.d.ts +2 -2
  43. package/dist/types/runtime/execution/active-execution-registry.d.ts +1 -1
  44. package/dist/types/runtime/execution/event-log-service.d.ts +28 -3
  45. package/dist/types/runtime/execution/execution-service.d.ts +1 -1
  46. package/dist/types/runtime/execution/execution-watch-service.d.ts +1 -1
  47. package/dist/types/runtime/execution/session-stream-service.d.ts +1 -1
  48. package/dist/types/runtime/inbox/inbox-service.d.ts +1 -1
  49. package/dist/types/runtime/memory/memory-service.d.ts +1 -1
  50. package/dist/types/runtime/model/embedding-model-service.d.ts +23 -10
  51. package/dist/types/runtime/model/language-model-service.d.ts +19 -6
  52. package/dist/types/runtime/model/model-call-policy.d.ts +1 -1
  53. package/dist/types/runtime/observability/runtime-metrics.d.ts +12 -3
  54. package/dist/types/runtime/presence/presence-service.d.ts +1 -1
  55. package/dist/types/runtime/presence/presence-tool.d.ts +1 -1
  56. package/dist/types/runtime/runner/runner-runtime-service.d.ts +19 -19
  57. package/dist/types/runtime/schedule/scheduler-service.d.ts +3 -3
  58. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +2 -2
  59. package/dist/types/runtime/session/session-store-service.d.ts +13 -4
  60. package/dist/types/runtime/skill/skill-registry-service.d.ts +2 -2
  61. package/dist/types/runtime/state/execution-state-service.d.ts +5 -2
  62. package/dist/types/runtime/tool/tool-runtime-service.d.ts +42 -19
  63. package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +2 -2
  64. package/dist/types/runtime/topic/topic-service.d.ts +1 -1
  65. package/dist/types/runtime/wait/wait-service.d.ts +1 -1
  66. package/dist/types/runtime/wait/wait-signal.d.ts +12 -3
  67. package/dist/types/runtime/workflow/activity-version-registry.d.ts +7 -3
  68. package/dist/types/runtime/workflow/definition-runtime.d.ts +37 -22
  69. package/dist/types/runtime/workflow/execution-workflow.d.ts +105 -110
  70. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +6 -6
  71. package/dist/types/runtime/workspace/workspace-provider-service.d.ts +11 -7
  72. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +1 -1
  73. package/dist/types/schema/agent-schema.d.ts +246 -246
  74. package/dist/types/schema/child-orchestration-schema.d.ts +64 -64
  75. package/dist/types/schema/execution-schema.d.ts +57 -57
  76. package/dist/types/schema/workflow-schema.d.ts +243 -243
  77. package/dist/types/schema/workspace-schema.d.ts +1 -1
  78. package/dist/types/store-sql/address/address-book-repository.d.ts +5 -5
  79. package/dist/types/store-sql/agent/agent-definition-repository.d.ts +7 -7
  80. package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
  81. package/dist/types/store-sql/child/child-execution-repository.d.ts +4 -4
  82. package/dist/types/store-sql/child/child-fan-out-repository.d.ts +2 -2
  83. package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +5 -5
  84. package/dist/types/store-sql/compaction/compaction-repository.d.ts +3 -3
  85. package/dist/types/store-sql/database/database-service.d.ts +3 -3
  86. package/dist/types/store-sql/database/notification-bus.d.ts +1 -1
  87. package/dist/types/store-sql/database/sql-dialect.d.ts +4 -1
  88. package/dist/types/store-sql/entity/entity-repository.d.ts +2 -2
  89. package/dist/types/store-sql/envelope/envelope-repository.d.ts +13 -13
  90. package/dist/types/store-sql/execution/execution-event-repository.d.ts +27 -5
  91. package/dist/types/store-sql/execution/execution-repository.d.ts +8 -8
  92. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +5 -5
  93. package/dist/types/store-sql/inbox/inbox-repository.d.ts +1 -1
  94. package/dist/types/store-sql/memory/memory-repository.d.ts +3 -3
  95. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
  96. package/dist/types/store-sql/presence/presence-repository.d.ts +2 -2
  97. package/dist/types/store-sql/schedule/schedule-repository.d.ts +9 -9
  98. package/dist/types/store-sql/schema/relay-schema.d.ts +257 -257
  99. package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
  100. package/dist/types/store-sql/session/session-repository.d.ts +5 -5
  101. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +9 -9
  102. package/dist/types/store-sql/state/execution-state-repository.d.ts +2 -2
  103. package/dist/types/store-sql/steering/steering-repository.d.ts +5 -5
  104. package/dist/types/store-sql/tenant/tenant-id.d.ts +2 -2
  105. package/dist/types/store-sql/tool/tool-call-repository.d.ts +19 -16
  106. package/dist/types/store-sql/topic/topic-repository.d.ts +1 -1
  107. package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +16 -14
  108. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +11 -11
  109. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { Agent, Ids } from "../../schema/index";
2
2
  import { ChildExecutionRepository, EnvelopeRepository, ExecutionRepository, ToolCallRepository } from "../../store-sql/portable";
3
- import { Workflow } from "effect/unstable/workflow";
3
+ import { Workflow, WorkflowEngine } from "effect/unstable/workflow";
4
4
  import { Effect, Layer, Option, Schema } from "effect";
5
5
  import { Service as AgentLoopService } from "../agent/agent-loop-service";
6
6
  import { ChildTerminalStatus } from "../child/parent-notifier-service";
@@ -80,29 +80,36 @@ export declare const StartInput: Schema.Struct<{
80
80
  readonly agent_revision: Schema.optionalKey<Schema.Int>;
81
81
  readonly agent_snapshot: Schema.optionalKey<Schema.Codec<Agent.Definition, {
82
82
  readonly name: string;
83
- readonly permissions: readonly {
84
- readonly name: string;
85
- readonly value: Schema.Json;
86
- readonly metadata?: {
87
- readonly [x: string]: Schema.Json;
88
- };
89
- }[];
83
+ readonly instructions?: string;
90
84
  readonly model: {
91
85
  readonly provider: string;
92
86
  readonly model: string;
93
- readonly metadata?: {
94
- readonly [x: string]: Schema.Json;
95
- };
96
87
  readonly registration_key?: string;
97
88
  readonly request_options?: {
98
89
  readonly [x: string]: Schema.Json;
99
90
  };
91
+ readonly metadata?: {
92
+ readonly [x: string]: Schema.Json;
93
+ };
100
94
  };
101
95
  readonly tool_names: readonly string[];
102
- readonly metadata?: {
103
- readonly [x: string]: Schema.Json;
96
+ readonly permissions: readonly {
97
+ readonly name: string;
98
+ readonly value: Schema.Json;
99
+ readonly metadata?: {
100
+ readonly [x: string]: Schema.Json;
101
+ };
102
+ }[];
103
+ readonly skill_definition_ids?: readonly string[];
104
+ readonly permission_rules?: {
105
+ readonly rules: readonly {
106
+ readonly pattern: string;
107
+ readonly level: "allow" | "ask" | "deny";
108
+ readonly reason?: string;
109
+ }[];
110
+ readonly fallback?: "allow" | "ask" | "deny";
104
111
  };
105
- readonly instructions?: string;
112
+ readonly turn_policy?: Agent.TurnPolicySnapshot;
106
113
  readonly compaction_policy?: {
107
114
  readonly context_window: number;
108
115
  readonly reserve_tokens: number;
@@ -110,47 +117,32 @@ export declare const StartInput: Schema.Struct<{
110
117
  readonly summary_model?: {
111
118
  readonly provider: string;
112
119
  readonly model: string;
113
- readonly metadata?: {
114
- readonly [x: string]: Schema.Json;
115
- };
116
120
  readonly registration_key?: string;
117
121
  readonly request_options?: {
118
122
  readonly [x: string]: Schema.Json;
119
123
  };
124
+ readonly metadata?: {
125
+ readonly [x: string]: Schema.Json;
126
+ };
120
127
  };
121
128
  };
122
- readonly output_schema_ref?: string;
123
- readonly skill_definition_ids?: readonly string[];
124
- readonly permission_rules?: {
125
- readonly rules: readonly {
126
- readonly pattern: string;
127
- readonly level: "allow" | "deny" | "ask";
128
- readonly reason?: string;
129
- }[];
130
- readonly fallback?: "allow" | "deny" | "ask";
131
- };
132
- readonly turn_policy?: Agent.TurnPolicySnapshot;
133
129
  readonly max_tool_turns?: number;
134
130
  readonly max_wait_turns?: number;
135
131
  readonly token_budget?: number;
136
132
  readonly child_run_presets?: {
137
133
  readonly [x: string]: {
138
- readonly metadata?: {
139
- readonly [x: string]: Schema.Json;
140
- };
141
- readonly permissions?: readonly string[];
134
+ readonly instructions?: string;
142
135
  readonly model?: {
143
136
  readonly provider: string;
144
137
  readonly model: string;
145
- readonly metadata?: {
146
- readonly [x: string]: Schema.Json;
147
- };
148
138
  readonly registration_key?: string;
149
139
  readonly request_options?: {
150
140
  readonly [x: string]: Schema.Json;
151
141
  };
142
+ readonly metadata?: {
143
+ readonly [x: string]: Schema.Json;
144
+ };
152
145
  };
153
- readonly instructions?: string;
154
146
  readonly compaction_policy?: {
155
147
  readonly context_window: number;
156
148
  readonly reserve_tokens: number;
@@ -158,27 +150,35 @@ export declare const StartInput: Schema.Struct<{
158
150
  readonly summary_model?: {
159
151
  readonly provider: string;
160
152
  readonly model: string;
161
- readonly metadata?: {
162
- readonly [x: string]: Schema.Json;
163
- };
164
153
  readonly registration_key?: string;
165
154
  readonly request_options?: {
166
155
  readonly [x: string]: Schema.Json;
167
156
  };
157
+ readonly metadata?: {
158
+ readonly [x: string]: Schema.Json;
159
+ };
168
160
  };
169
161
  };
170
162
  readonly tool_names?: readonly string[];
163
+ readonly permissions?: readonly string[];
171
164
  readonly workspace_policy?: {
172
- readonly mode: "share" | "fork";
165
+ readonly mode: "fork" | "share";
173
166
  readonly fallback?: "fail" | "fresh";
174
167
  };
175
168
  readonly output_schema_ref?: string;
169
+ readonly metadata?: {
170
+ readonly [x: string]: Schema.Json;
171
+ };
176
172
  };
177
173
  };
178
174
  readonly handoff_targets?: readonly Schema.Struct.ReadonlySide<{
179
175
  readonly name: Schema.String;
180
176
  readonly preset_name: Schema.String;
181
177
  }, "Encoded">[];
178
+ readonly output_schema_ref?: string;
179
+ readonly metadata?: {
180
+ readonly [x: string]: Schema.Json;
181
+ };
182
182
  }, never, never>>;
183
183
  readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
184
184
  readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
@@ -370,29 +370,36 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
370
370
  readonly agent_revision: Schema.optionalKey<Schema.Int>;
371
371
  readonly agent_snapshot: Schema.optionalKey<Schema.Codec<Agent.Definition, {
372
372
  readonly name: string;
373
- readonly permissions: readonly {
374
- readonly name: string;
375
- readonly value: Schema.Json;
376
- readonly metadata?: {
377
- readonly [x: string]: Schema.Json;
378
- };
379
- }[];
373
+ readonly instructions?: string;
380
374
  readonly model: {
381
375
  readonly provider: string;
382
376
  readonly model: string;
383
- readonly metadata?: {
384
- readonly [x: string]: Schema.Json;
385
- };
386
377
  readonly registration_key?: string;
387
378
  readonly request_options?: {
388
379
  readonly [x: string]: Schema.Json;
389
380
  };
381
+ readonly metadata?: {
382
+ readonly [x: string]: Schema.Json;
383
+ };
390
384
  };
391
385
  readonly tool_names: readonly string[];
392
- readonly metadata?: {
393
- readonly [x: string]: Schema.Json;
386
+ readonly permissions: readonly {
387
+ readonly name: string;
388
+ readonly value: Schema.Json;
389
+ readonly metadata?: {
390
+ readonly [x: string]: Schema.Json;
391
+ };
392
+ }[];
393
+ readonly skill_definition_ids?: readonly string[];
394
+ readonly permission_rules?: {
395
+ readonly rules: readonly {
396
+ readonly pattern: string;
397
+ readonly level: "allow" | "ask" | "deny";
398
+ readonly reason?: string;
399
+ }[];
400
+ readonly fallback?: "allow" | "ask" | "deny";
394
401
  };
395
- readonly instructions?: string;
402
+ readonly turn_policy?: Agent.TurnPolicySnapshot;
396
403
  readonly compaction_policy?: {
397
404
  readonly context_window: number;
398
405
  readonly reserve_tokens: number;
@@ -400,47 +407,32 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
400
407
  readonly summary_model?: {
401
408
  readonly provider: string;
402
409
  readonly model: string;
403
- readonly metadata?: {
404
- readonly [x: string]: Schema.Json;
405
- };
406
410
  readonly registration_key?: string;
407
411
  readonly request_options?: {
408
412
  readonly [x: string]: Schema.Json;
409
413
  };
414
+ readonly metadata?: {
415
+ readonly [x: string]: Schema.Json;
416
+ };
410
417
  };
411
418
  };
412
- readonly output_schema_ref?: string;
413
- readonly skill_definition_ids?: readonly string[];
414
- readonly permission_rules?: {
415
- readonly rules: readonly {
416
- readonly pattern: string;
417
- readonly level: "allow" | "deny" | "ask";
418
- readonly reason?: string;
419
- }[];
420
- readonly fallback?: "allow" | "deny" | "ask";
421
- };
422
- readonly turn_policy?: Agent.TurnPolicySnapshot;
423
419
  readonly max_tool_turns?: number;
424
420
  readonly max_wait_turns?: number;
425
421
  readonly token_budget?: number;
426
422
  readonly child_run_presets?: {
427
423
  readonly [x: string]: {
428
- readonly metadata?: {
429
- readonly [x: string]: Schema.Json;
430
- };
431
- readonly permissions?: readonly string[];
424
+ readonly instructions?: string;
432
425
  readonly model?: {
433
426
  readonly provider: string;
434
427
  readonly model: string;
435
- readonly metadata?: {
436
- readonly [x: string]: Schema.Json;
437
- };
438
428
  readonly registration_key?: string;
439
429
  readonly request_options?: {
440
430
  readonly [x: string]: Schema.Json;
441
431
  };
432
+ readonly metadata?: {
433
+ readonly [x: string]: Schema.Json;
434
+ };
442
435
  };
443
- readonly instructions?: string;
444
436
  readonly compaction_policy?: {
445
437
  readonly context_window: number;
446
438
  readonly reserve_tokens: number;
@@ -448,27 +440,35 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
448
440
  readonly summary_model?: {
449
441
  readonly provider: string;
450
442
  readonly model: string;
451
- readonly metadata?: {
452
- readonly [x: string]: Schema.Json;
453
- };
454
443
  readonly registration_key?: string;
455
444
  readonly request_options?: {
456
445
  readonly [x: string]: Schema.Json;
457
446
  };
447
+ readonly metadata?: {
448
+ readonly [x: string]: Schema.Json;
449
+ };
458
450
  };
459
451
  };
460
452
  readonly tool_names?: readonly string[];
453
+ readonly permissions?: readonly string[];
461
454
  readonly workspace_policy?: {
462
- readonly mode: "share" | "fork";
455
+ readonly mode: "fork" | "share";
463
456
  readonly fallback?: "fail" | "fresh";
464
457
  };
465
458
  readonly output_schema_ref?: string;
459
+ readonly metadata?: {
460
+ readonly [x: string]: Schema.Json;
461
+ };
466
462
  };
467
463
  };
468
464
  readonly handoff_targets?: readonly Schema.Struct.ReadonlySide<{
469
465
  readonly name: Schema.String;
470
466
  readonly preset_name: Schema.String;
471
467
  }, "Encoded">[];
468
+ readonly output_schema_ref?: string;
469
+ readonly metadata?: {
470
+ readonly [x: string]: Schema.Json;
471
+ };
472
472
  }, never, never>>;
473
473
  readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
474
474
  readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
@@ -495,45 +495,40 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
495
495
  readonly wait_state: Schema.optionalKey<Schema.Literals<readonly ["resolved", "timed_out", "cancelled"]>>;
496
496
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
497
497
  }>, typeof ExecutionWorkflowFailed>;
498
- export declare const sessionEntryScope: (input: StartInput, turn: number) => string;
499
- 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>;
500
- export declare const start: <const Discard extends boolean = false>(input: StartInput, options?: {
498
+ export declare const sessionEntryScope: {
499
+ (input: StartInput, turn: number): string;
500
+ (turn: number): (input: StartInput) => string;
501
+ };
502
+ 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 | AgentLoopService | WorkflowEngine.WorkflowEngine>;
503
+ interface StartOptions<Discard extends boolean> {
501
504
  readonly discard?: Discard;
502
- }) => Effect.Effect<Discard extends true ? string : {
503
- readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
504
- readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
505
- readonly metadata?: {
506
- readonly [x: string]: Schema.Json;
507
- };
508
- readonly wait_id?: string & import("effect/Brand").Brand<"Relay.WaitId">;
509
- readonly wait_state?: "cancelled" | "resolved" | "timed_out";
510
- }, Discard extends true ? never : ExecutionWorkflowFailed, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
511
- export declare const startRequest: (input: StartInput) => Effect.Effect<{
512
- readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
513
- readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
514
- readonly metadata?: {
515
- readonly [x: string]: Schema.Json;
516
- };
517
- readonly wait_id?: string & import("effect/Brand").Brand<"Relay.WaitId">;
518
- readonly wait_state?: "cancelled" | "resolved" | "timed_out";
519
- }, ExecutionWorkflowFailed, ExecutionRepository.Service | import("../wait/wait-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
520
- export declare const dispatchRequest: (input: StartInput) => Effect.Effect<void, never, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
505
+ }
506
+ export declare const start: {
507
+ <const Discard extends boolean = false>(input: StartInput, options?: StartOptions<Discard>): Effect.Effect<Discard extends true ? string : StartResult, ExecutionWorkflowFailed, WorkflowEngine.WorkflowEngine>;
508
+ <const Discard extends boolean = false>(options?: StartOptions<Discard>): (input: StartInput) => Effect.Effect<Discard extends true ? string : StartResult, ExecutionWorkflowFailed, WorkflowEngine.WorkflowEngine>;
509
+ };
510
+ export declare const startRequest: (input: StartInput) => Effect.Effect<StartResult, ExecutionWorkflowFailed, ExecutionRepository.Service | import("../wait/wait-service").Service | WorkflowEngine.WorkflowEngine>;
511
+ export declare const dispatchRequest: (input: StartInput) => Effect.Effect<void, ExecutionWorkflowFailed, WorkflowEngine.WorkflowEngine>;
521
512
  export declare const cancelRequest: (input: CancelExecutionInput) => Effect.Effect<{
522
513
  execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
523
- status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
524
- }, 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>;
514
+ status: "cancelled" | "completed" | "failed" | "queued" | "running" | "waiting";
515
+ }, ExecutionWorkflowFailed, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | import("../wait/wait-service").Service | import("../execution/execution-service").Service | ToolTransitionCoordinatorService | WorkflowEngine.WorkflowEngine>;
525
516
  export declare const poll: (executionId: string) => Effect.Effect<Option.Option<Workflow.Result<{
526
- readonly status: "waiting" | "running" | "completed" | "failed" | "queued" | "cancelled";
527
517
  readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
518
+ readonly status: "cancelled" | "completed" | "failed" | "queued" | "running" | "waiting";
519
+ readonly wait_id?: string & import("effect/Brand").Brand<"Relay.WaitId">;
520
+ readonly wait_state?: "cancelled" | "resolved" | "timed_out";
528
521
  readonly metadata?: {
529
522
  readonly [x: string]: Schema.Json;
530
523
  };
531
- readonly wait_id?: string & import("effect/Brand").Brand<"Relay.WaitId">;
532
- readonly wait_state?: "cancelled" | "resolved" | "timed_out";
533
- }, ExecutionWorkflowFailed>>, never, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
534
- export declare const resume: (executionId: string) => Effect.Effect<void, never, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
524
+ }, ExecutionWorkflowFailed>>, never, WorkflowEngine.WorkflowEngine>;
525
+ export declare const resume: (executionId: string) => Effect.Effect<void, never, WorkflowEngine.WorkflowEngine>;
535
526
  export declare const workflowExecutionId: (input: StartInput) => Effect.Effect<string, never, never>;
536
- export declare const workflowExecutionIdForExecution: (executionId: Ids.ExecutionId, workflowGeneration?: number) => Effect.Effect<string, never, never>;
527
+ export declare const workflowExecutionIdForExecution: {
528
+ (executionId: Ids.ExecutionId): Effect.Effect<string>;
529
+ (executionId: Ids.ExecutionId, workflowGeneration: number): Effect.Effect<string>;
530
+ (workflowGeneration: number): (executionId: Ids.ExecutionId) => Effect.Effect<string>;
531
+ };
537
532
  export declare const activeWorkflowExecutionIdForExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<string, ExecutionWorkflowFailed, ExecutionRepository.Service>;
538
- export declare const signalWait: (input: SignalWaitInput) => Effect.Effect<void, never, import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
533
+ export declare const signalWait: (input: SignalWaitInput) => Effect.Effect<void, never, WorkflowEngine.WorkflowEngine>;
539
534
  export {};
@@ -50,15 +50,15 @@ export interface Interface {
50
50
  readonly release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProviderError>;
51
51
  readonly fail: (input: FailureInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspacePlannerError>;
52
52
  }
53
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkspacePlanner", Interface>;
53
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/workspace/workspace-planner-service/Service", Interface>;
54
54
  export declare class Service extends Service_base {
55
55
  }
56
56
  export declare const layer: Layer.Layer<Service, never, WorkspaceLeaseRepository.Service | EventLogService>;
57
57
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
58
- export declare const ensure: (input: EnsureInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
59
- export declare const suspend: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceNotFound | WorkspaceCapabilityUnsupported | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
60
- export declare const resume: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
61
- export declare const attach: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
62
- export declare const release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
58
+ export declare const ensure: (input: EnsureInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceLeaseMissingRef | WorkspaceNotFound | WorkspacePlannerError | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceUnavailable, Service>;
59
+ export declare const suspend: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceCapabilityUnsupported | WorkspaceLeaseMissingRef | WorkspaceNotFound | WorkspacePlannerError | WorkspaceProviderError | WorkspaceRuntimeMissing, Service>;
60
+ export declare const resume: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceLeaseMissingRef | WorkspaceNotFound | WorkspacePlannerError | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceUnavailable, Service>;
61
+ export declare const attach: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceLeaseMissingRef | WorkspaceNotFound | WorkspacePlannerError | WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceUnavailable, Service>;
62
+ export declare const release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProviderError | WorkspaceRuntimeMissing, Service>;
63
63
  export declare const fail: (input: FailureInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspacePlannerError, Service>;
64
64
  export {};
@@ -60,16 +60,20 @@ export interface Interface {
60
60
  readonly fork: (ref: Ids.WorkspaceRef, spec?: Partial<WorkspaceSpec>) => Effect.Effect<Ids.WorkspaceRef, WorkspaceNotFound | WorkspaceCapabilityUnsupported | WorkspaceProviderError>;
61
61
  readonly destroy: (ref: Ids.WorkspaceRef) => Effect.Effect<void, WorkspaceProviderError>;
62
62
  }
63
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkspaceProvider", Interface>;
63
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/workspace/workspace-provider-service/Service", Interface>;
64
64
  export declare class Service extends Service_base {
65
65
  }
66
- export declare const memoryHandle: (ref: Ids.WorkspaceRef, providerKey?: Workspace.WorkspaceProviderKey) => WorkspaceHandle;
66
+ export declare const memoryHandle: {
67
+ (ref: Ids.WorkspaceRef, providerKey: Workspace.WorkspaceProviderKey): WorkspaceHandle;
68
+ (ref: Ids.WorkspaceRef): WorkspaceHandle;
69
+ (providerKey: Workspace.WorkspaceProviderKey): (ref: Ids.WorkspaceRef) => WorkspaceHandle;
70
+ };
67
71
  export declare const memoryLayer: (providerKey?: Workspace.WorkspaceProviderKey) => Layer.Layer<Service, never, never>;
68
72
  export interface DaytonaSandbox {
69
73
  readonly id: string;
70
74
  state?: string;
71
- readonly start: () => Effect.Effect<void, WorkspaceProviderError>;
72
- readonly stop: () => Effect.Effect<void, WorkspaceProviderError>;
75
+ readonly start: (_?: void) => Effect.Effect<void, WorkspaceProviderError>;
76
+ readonly stop: (_?: void) => Effect.Effect<void, WorkspaceProviderError>;
73
77
  readonly readFile?: (path: string) => Effect.Effect<string, WorkspaceProviderError>;
74
78
  readonly writeFile?: (path: string, content: string) => Effect.Effect<void, WorkspaceProviderError>;
75
79
  readonly exec?: (input: WorkspaceCommandInput) => Effect.Effect<WorkspaceCommandResult, WorkspaceProviderError>;
@@ -100,9 +104,9 @@ export interface LocalDockerLayerConfig {
100
104
  export declare const localDockerLayer: (config: LocalDockerLayerConfig) => Layer.Layer<Service, never, never>;
101
105
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
102
106
  export declare const acquire: (spec: WorkspaceSpec) => Effect.Effect<WorkspaceHandle, WorkspaceProviderError, Service>;
103
- export declare const resume: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">) => Effect.Effect<WorkspaceHandle, WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError, Service>;
107
+ export declare const resume: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">) => Effect.Effect<WorkspaceHandle, WorkspaceNotFound | WorkspaceProviderError | WorkspaceUnavailable, Service>;
104
108
  export declare const suspend: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, WorkspaceNotFound | WorkspaceProviderError, Service>;
105
- export declare const snapshot: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, name?: string | undefined) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.SnapshotRef">, WorkspaceNotFound | WorkspaceCapabilityUnsupported | WorkspaceProviderError, Service>;
106
- export declare const fork: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, spec?: Partial<WorkspaceSpec> | undefined) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, WorkspaceNotFound | WorkspaceCapabilityUnsupported | WorkspaceProviderError, Service>;
109
+ export declare const snapshot: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, name?: string | undefined) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.SnapshotRef">, WorkspaceCapabilityUnsupported | WorkspaceNotFound | WorkspaceProviderError, Service>;
110
+ export declare const fork: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, spec?: Partial<WorkspaceSpec> | undefined) => Effect.Effect<string & import("effect/Brand").Brand<"Relay.WorkspaceRef">, WorkspaceCapabilityUnsupported | WorkspaceNotFound | WorkspaceProviderError, Service>;
107
111
  export declare const destroy: (ref: string & import("effect/Brand").Brand<"Relay.WorkspaceRef">) => Effect.Effect<void, WorkspaceProviderError, Service>;
108
112
  export {};
@@ -10,7 +10,7 @@ export interface Interface {
10
10
  readonly writeFile: (path: string, content: string) => Effect.Effect<void, WorkspaceRuntimeError>;
11
11
  readonly exec: (input: WorkspaceCommandInput) => Effect.Effect<WorkspaceCommandResult, WorkspaceRuntimeError>;
12
12
  }
13
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkspaceRuntime", Interface>;
13
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/workspace/workspace-runtime-service/Service", Interface>;
14
14
  export declare class Service extends Service_base {
15
15
  }
16
16
  export declare const layerFromHandle: (handle: WorkspaceHandle) => Layer.Layer<Service, never, never>;