@relayfx/sdk 0.0.38 → 0.0.40

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 (72) hide show
  1. package/dist/index.js +1366 -1215
  2. package/dist/migrations/20260709030349_agent_id_rename/migration.sql +8 -0
  3. package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +4883 -0
  4. package/dist/migrations/mysql/0001_baseline.sql +8 -8
  5. package/dist/migrations/pg/20260709030349_agent_id_rename/migration.sql +8 -0
  6. package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +4883 -0
  7. package/dist/migrations/sqlite/0001_baseline.sql +8 -8
  8. package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +2 -4
  9. package/dist/types/relay/adapter-outbox.d.ts +11 -11
  10. package/dist/types/relay/client.d.ts +54 -54
  11. package/dist/types/relay/database.d.ts +11 -10
  12. package/dist/types/relay/operation.d.ts +11 -11
  13. package/dist/types/runtime/address/address-resolution-service.d.ts +9 -9
  14. package/dist/types/runtime/agent/agent-loop-service.d.ts +16 -35
  15. package/dist/types/runtime/agent/agent-registry-service.d.ts +4 -4
  16. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +6 -44
  17. package/dist/types/runtime/agent/relay-approvals.d.ts +0 -19
  18. package/dist/types/runtime/agent/relay-instructions.d.ts +0 -15
  19. package/dist/types/runtime/agent/relay-permissions.d.ts +4 -4
  20. package/dist/types/runtime/agent/relay-steering.d.ts +2 -2
  21. package/dist/types/runtime/agent/relay-tool-executor.d.ts +5 -21
  22. package/dist/types/runtime/agent/relay-tool-output.d.ts +5 -5
  23. package/dist/types/runtime/agent/sequence-allocator.d.ts +0 -19
  24. package/dist/types/runtime/child/child-run-service.d.ts +2 -2
  25. package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -4
  26. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +16 -16
  27. package/dist/types/runtime/cluster/execution-entity.d.ts +28 -28
  28. package/dist/types/runtime/content/artifact-store-service.d.ts +0 -47
  29. package/dist/types/runtime/content/blob-store-service.d.ts +0 -33
  30. package/dist/types/runtime/envelope/envelope-service.d.ts +4 -4
  31. package/dist/types/runtime/execution/event-log-service.d.ts +0 -5
  32. package/dist/types/runtime/execution/execution-service.d.ts +10 -9
  33. package/dist/types/runtime/memory/memory-service.d.ts +5 -4
  34. package/dist/types/runtime/model/embedding-model-service.d.ts +3 -3
  35. package/dist/types/runtime/model/language-model-service.d.ts +0 -30
  36. package/dist/types/runtime/model/model-call-policy.d.ts +0 -58
  37. package/dist/types/runtime/runner/runner-runtime-service.d.ts +63 -74
  38. package/dist/types/runtime/schedule/scheduler-service.d.ts +5 -5
  39. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +0 -40
  40. package/dist/types/runtime/tool/tool-runtime-service.d.ts +40 -13
  41. package/dist/types/runtime/wait/wait-service.d.ts +2 -2
  42. package/dist/types/runtime/wait/wait-signal.d.ts +3 -3
  43. package/dist/types/runtime/workflow/execution-workflow.d.ts +17 -22
  44. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +16 -15
  45. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +4 -4
  46. package/dist/types/schema/agent-schema.d.ts +14 -22
  47. package/dist/types/schema/execution-schema.d.ts +5 -5
  48. package/dist/types/schema/ids-schema.d.ts +3 -3
  49. package/dist/types/store-sql/address/address-book-repository.d.ts +2 -2
  50. package/dist/types/store-sql/agent/agent-definition-repository.d.ts +11 -11
  51. package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
  52. package/dist/types/store-sql/child/child-execution-repository.d.ts +2 -2
  53. package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +2 -2
  54. package/dist/types/store-sql/compaction/compaction-repository.d.ts +2 -2
  55. package/dist/types/store-sql/database/database-service.d.ts +11 -12
  56. package/dist/types/store-sql/database/notification-bus.d.ts +3 -3
  57. package/dist/types/store-sql/envelope/envelope-repository.d.ts +2 -2
  58. package/dist/types/store-sql/execution/execution-event-repository.d.ts +4 -4
  59. package/dist/types/store-sql/execution/execution-repository.d.ts +14 -14
  60. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +3 -3
  61. package/dist/types/store-sql/memory/memory-repository.d.ts +5 -5
  62. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
  63. package/dist/types/store-sql/schedule/schedule-repository.d.ts +2 -2
  64. package/dist/types/store-sql/schema/relay-schema.d.ts +26 -26
  65. package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
  66. package/dist/types/store-sql/session/session-repository.d.ts +6 -6
  67. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +2 -2
  68. package/dist/types/store-sql/steering/steering-repository.d.ts +2 -2
  69. package/dist/types/store-sql/tenant/tenant-id.d.ts +3 -1
  70. package/dist/types/store-sql/tool/tool-call-repository.d.ts +2 -2
  71. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +2 -2
  72. package/package.json +3 -14
@@ -1,7 +1,7 @@
1
1
  import { Envelope, Execution, Ids, Shared } from "../../schema/index";
2
2
  import { EnvelopeRepository, ScheduleRepository } from "../../store-sql/index";
3
3
  import { Context, Effect, Layer, Schema } from "effect";
4
- import * as EventLog from "../execution/event-log-service";
4
+ import { Service as EventLogService } from "../execution/event-log-service";
5
5
  declare const WaitNotFound_base: Schema.Class<WaitNotFound, Schema.TaggedStruct<"WaitNotFound", {
6
6
  readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
7
7
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
@@ -68,7 +68,7 @@ export interface Interface {
68
68
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WaitService", Interface>;
69
69
  export declare class Service extends Service_base {
70
70
  }
71
- export declare const layer: Layer.Layer<Service, never, EnvelopeRepository.Service | ScheduleRepository.Service | EventLog.Service>;
71
+ export declare const layer: Layer.Layer<Service, never, EnvelopeRepository.Service | ScheduleRepository.Service | EventLogService>;
72
72
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
73
73
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
74
74
  export declare const create: (input: CreateWaitInput) => Effect.Effect<EnvelopeRepository.WaitRecord, WaitDefinitionMissing | WaitServiceError, Service>;
@@ -1,16 +1,16 @@
1
1
  import { Ids } from "../../schema/index";
2
2
  import { ExecutionRepository } from "../../store-sql/index";
3
3
  import { Effect } from "effect";
4
- import * as ExecutionWorkflow from "../workflow/execution-workflow";
4
+ import type { SignalWaitInput, WaitSignalState } from "../workflow/execution-workflow";
5
5
  export interface ExecutionSignalClient {
6
- readonly signalWait: (input: ExecutionWorkflow.SignalWaitInput) => Effect.Effect<void, unknown>;
6
+ readonly signalWait: (input: SignalWaitInput) => Effect.Effect<void, unknown>;
7
7
  }
8
8
  export type ExecutionClientFactory = (executionId: Ids.ExecutionId) => ExecutionSignalClient;
9
9
  export interface SignalWorkflowWaitInput {
10
10
  readonly makeExecutionClient: ExecutionClientFactory;
11
11
  readonly executionId: Ids.ExecutionId;
12
12
  readonly waitId: Ids.WaitId;
13
- readonly state: ExecutionWorkflow.WaitSignalState;
13
+ readonly state: WaitSignalState;
14
14
  readonly signaledAt: number;
15
15
  }
16
16
  export declare const signalWorkflowWait: (input: SignalWorkflowWaitInput) => Effect.Effect<void, unknown, ExecutionRepository.Service>;
@@ -2,15 +2,10 @@ import { Ids } from "../../schema/index";
2
2
  import { ChildExecutionRepository, ExecutionRepository } from "../../store-sql/index";
3
3
  import { Workflow } from "effect/unstable/workflow";
4
4
  import { Effect, Layer, Option, Schema } from "effect";
5
- import * as AddressResolution from "../address/address-resolution-service";
6
- import * as AgentLoop from "../agent/agent-loop-service";
7
- import * as ParentNotifier from "../child/parent-notifier-service";
8
- import * as SkillRegistry from "../skill/skill-registry-service";
9
- import * as EventLog from "../execution/event-log-service";
10
- import * as ExecutionService from "../execution/execution-service";
11
- import * as ToolRuntime from "../tool/tool-runtime-service";
12
- import * as WaitService from "../wait/wait-service";
13
- import * as WorkspacePlanner from "../workspace/workspace-planner-service";
5
+ import { Service as AgentLoopService } from "../agent/agent-loop-service";
6
+ import { ChildTerminalStatus } from "../child/parent-notifier-service";
7
+ import { Service as EventLogService } from "../execution/event-log-service";
8
+ import { Service as ToolRuntimeService } from "../tool/tool-runtime-service";
14
9
  declare const ExecutionWorkflowFailed_base: Schema.Class<ExecutionWorkflowFailed, Schema.TaggedStruct<"ExecutionWorkflowFailed", {
15
10
  readonly message: Schema.String;
16
11
  }>, import("effect/Cause").YieldableError>;
@@ -78,11 +73,11 @@ export declare const StartInput: Schema.Struct<{
78
73
  readonly event_sequence: Schema.Int;
79
74
  readonly started_at: Schema.Int;
80
75
  readonly completed_at: Schema.Int;
81
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
82
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
76
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
77
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
83
78
  }>;
84
- readonly agent_definition_revision: Schema.optionalKey<Schema.Int>;
85
- readonly agent_definition_snapshot: Schema.optionalKey<Schema.Struct<{
79
+ readonly agent_revision: Schema.optionalKey<Schema.Int>;
80
+ readonly agent_snapshot: Schema.optionalKey<Schema.Struct<{
86
81
  readonly name: Schema.String;
87
82
  readonly instructions: Schema.optionalKey<Schema.String>;
88
83
  readonly model: Schema.Struct<{
@@ -137,7 +132,7 @@ export declare const StartInput: Schema.Struct<{
137
132
  readonly output_schema_ref: Schema.optionalKey<Schema.String>;
138
133
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
139
134
  }>>;
140
- readonly agent_definition_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
135
+ readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
141
136
  readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
142
137
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
143
138
  }>;
@@ -239,7 +234,7 @@ export declare const ActivityNames: {
239
234
  readonly releaseWorkspace: "Relay/Execution/Start/ReleaseWorkspace";
240
235
  readonly complete: (turn: number) => string;
241
236
  readonly checkQueuedChildCancellation: "Relay/Execution/Start/CheckQueuedChildCancellation";
242
- readonly notifyParent: (status: ParentNotifier.ChildTerminalStatus) => string;
237
+ readonly notifyParent: (status: ChildTerminalStatus) => string;
243
238
  readonly continueAsNew: (turn: number) => string;
244
239
  };
245
240
  export declare const ActivityNameTemplates: {
@@ -321,11 +316,11 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
321
316
  readonly event_sequence: Schema.Int;
322
317
  readonly started_at: Schema.Int;
323
318
  readonly completed_at: Schema.Int;
324
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
325
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
319
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
320
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
326
321
  }>;
327
- readonly agent_definition_revision: Schema.optionalKey<Schema.Int>;
328
- readonly agent_definition_snapshot: Schema.optionalKey<Schema.Struct<{
322
+ readonly agent_revision: Schema.optionalKey<Schema.Int>;
323
+ readonly agent_snapshot: Schema.optionalKey<Schema.Struct<{
329
324
  readonly name: Schema.String;
330
325
  readonly instructions: Schema.optionalKey<Schema.String>;
331
326
  readonly model: Schema.Struct<{
@@ -380,7 +375,7 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
380
375
  readonly output_schema_ref: Schema.optionalKey<Schema.String>;
381
376
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
382
377
  }>>;
383
- readonly agent_definition_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
378
+ readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
384
379
  readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
385
380
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
386
381
  }>;
@@ -406,7 +401,7 @@ export declare const StartExecutionWorkflow: Workflow.Workflow<"Relay/Execution/
406
401
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
407
402
  }>, typeof ExecutionWorkflowFailed>;
408
403
  export declare const sessionEntryScope: (input: StartInput, turn: number) => string;
409
- export declare const layer: Layer.Layer<never, never, ChildExecutionRepository.Service | ExecutionRepository.Service | EventLog.Service | WaitService.Service | ToolRuntime.Service | AddressResolution.Service | AgentLoop.Service | SkillRegistry.Service | ExecutionService.Service | WorkspacePlanner.Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
404
+ export declare const layer: Layer.Layer<never, never, ChildExecutionRepository.Service | ExecutionRepository.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 | import("../workspace/workspace-planner-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
410
405
  export declare const start: <const Discard extends boolean = false>(input: StartInput, options?: {
411
406
  readonly discard?: Discard;
412
407
  }) => Effect.Effect<Discard extends true ? string : {
@@ -430,7 +425,7 @@ export declare const startRequest: (input: StartInput) => Effect.Effect<{
430
425
  export declare const cancelRequest: (input: CancelExecutionInput) => Effect.Effect<{
431
426
  execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
432
427
  status: "queued" | "running" | "waiting" | "completed" | "failed" | "cancelled";
433
- }, ExecutionWorkflowFailed, ChildExecutionRepository.Service | ExecutionRepository.Service | EventLog.Service | WaitService.Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
428
+ }, ExecutionWorkflowFailed, ChildExecutionRepository.Service | ExecutionRepository.Service | EventLogService | import("../wait/wait-service").Service | import("effect/unstable/workflow/WorkflowEngine").WorkflowEngine>;
434
429
  export declare const poll: (executionId: string) => Effect.Effect<Option.Option<Workflow.Result<{
435
430
  readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
436
431
  readonly status: "queued" | "running" | "waiting" | "completed" | "failed" | "cancelled";
@@ -1,9 +1,10 @@
1
1
  import { Agent, Ids, Shared, Tool, Workspace } from "../../schema/index";
2
2
  import { WorkspaceLeaseRepository } from "../../store-sql/index";
3
3
  import { Context, Effect, Layer, Schema } from "effect";
4
- import * as EventLog from "../execution/event-log-service";
5
- import * as WorkspaceProvider from "./workspace-provider-service";
6
- import * as WorkspaceRuntime from "./workspace-runtime-service";
4
+ import { Service as EventLogService } from "../execution/event-log-service";
5
+ import { WorkspaceCapabilityUnsupported } from "./workspace-provider-service";
6
+ import type { WorkspaceNotFound, WorkspaceProviderError, WorkspaceUnavailable } from "./workspace-provider-service";
7
+ import { Service as WorkspaceRuntimeService } from "./workspace-runtime-service";
7
8
  declare const WorkspaceRuntimeMissing_base: Schema.Class<WorkspaceRuntimeMissing, Schema.TaggedStruct<"WorkspaceRuntimeMissing", {
8
9
  readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
9
10
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
@@ -32,7 +33,7 @@ export interface EnsureInput {
32
33
  }
33
34
  export interface WorkspacePlan {
34
35
  readonly lease: Workspace.WorkspaceLeaseRecord;
35
- readonly runtimeLayer: Layer.Layer<WorkspaceRuntime.Service>;
36
+ readonly runtimeLayer: Layer.Layer<WorkspaceRuntimeService>;
36
37
  }
37
38
  export interface LifecycleInput {
38
39
  readonly executionId: Ids.ExecutionId;
@@ -42,22 +43,22 @@ export interface FailureInput extends LifecycleInput {
42
43
  readonly metadata?: Shared.Metadata;
43
44
  }
44
45
  export interface Interface {
45
- readonly ensure: (input: EnsureInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError>;
46
- readonly suspend: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceCapabilityUnsupported | WorkspaceProvider.WorkspaceProviderError>;
47
- readonly resume: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError>;
48
- readonly attach: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError>;
49
- readonly release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProvider.WorkspaceProviderError>;
46
+ readonly ensure: (input: EnsureInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError>;
47
+ readonly suspend: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceNotFound | WorkspaceCapabilityUnsupported | WorkspaceProviderError>;
48
+ readonly resume: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError>;
49
+ readonly attach: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceNotFound | WorkspaceUnavailable | WorkspaceProviderError>;
50
+ readonly release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError | WorkspaceProviderError>;
50
51
  readonly fail: (input: FailureInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspacePlannerError>;
51
52
  }
52
53
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkspacePlanner", Interface>;
53
54
  export declare class Service extends Service_base {
54
55
  }
55
- export declare const layer: Layer.Layer<Service, never, WorkspaceLeaseRepository.Service | EventLog.Service>;
56
+ export declare const layer: Layer.Layer<Service, never, WorkspaceLeaseRepository.Service | EventLogService>;
56
57
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
57
- export declare const ensure: (input: EnsureInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
58
- export declare const suspend: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceCapabilityUnsupported | WorkspaceProvider.WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
59
- export declare const resume: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
60
- export declare const attach: (input: LifecycleInput) => Effect.Effect<WorkspacePlan | undefined, WorkspaceProvider.WorkspaceNotFound | WorkspaceProvider.WorkspaceUnavailable | WorkspaceProvider.WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
61
- export declare const release: (input: LifecycleInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspaceProvider.WorkspaceProviderError | WorkspaceRuntimeMissing | WorkspaceLeaseMissingRef | WorkspacePlannerError, Service>;
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>;
62
63
  export declare const fail: (input: FailureInput) => Effect.Effect<Workspace.WorkspaceLeaseRecord | undefined, WorkspacePlannerError, Service>;
63
64
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Schema } from "effect";
2
- import * as WorkspaceProvider from "./workspace-provider-service";
2
+ import type { WorkspaceCommandInput, WorkspaceCommandResult, WorkspaceHandle } from "./workspace-provider-service";
3
3
  declare const WorkspaceRuntimeError_base: Schema.Class<WorkspaceRuntimeError, Schema.TaggedStruct<"WorkspaceRuntimeError", {
4
4
  readonly message: Schema.String;
5
5
  }>, import("effect/Cause").YieldableError>;
@@ -8,14 +8,14 @@ export declare class WorkspaceRuntimeError extends WorkspaceRuntimeError_base {
8
8
  export interface Interface {
9
9
  readonly readFile: (path: string) => Effect.Effect<string, WorkspaceRuntimeError>;
10
10
  readonly writeFile: (path: string, content: string) => Effect.Effect<void, WorkspaceRuntimeError>;
11
- readonly exec: (input: WorkspaceProvider.WorkspaceCommandInput) => Effect.Effect<WorkspaceProvider.WorkspaceCommandResult, WorkspaceRuntimeError>;
11
+ readonly exec: (input: WorkspaceCommandInput) => Effect.Effect<WorkspaceCommandResult, WorkspaceRuntimeError>;
12
12
  }
13
13
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/WorkspaceRuntime", Interface>;
14
14
  export declare class Service extends Service_base {
15
15
  }
16
- export declare const layerFromHandle: (handle: WorkspaceProvider.WorkspaceHandle) => Layer.Layer<Service, never, never>;
16
+ export declare const layerFromHandle: (handle: WorkspaceHandle) => Layer.Layer<Service, never, never>;
17
17
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
18
18
  export declare const readFile: (path: string) => Effect.Effect<string, WorkspaceRuntimeError, Service>;
19
19
  export declare const writeFile: (path: string, content: string) => Effect.Effect<void, WorkspaceRuntimeError, Service>;
20
- export declare const exec: (input: WorkspaceProvider.WorkspaceCommandInput) => Effect.Effect<WorkspaceProvider.WorkspaceCommandResult, WorkspaceRuntimeError, Service>;
20
+ export declare const exec: (input: WorkspaceCommandInput) => Effect.Effect<WorkspaceCommandResult, WorkspaceRuntimeError, Service>;
21
21
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { AgentDefinitionId, SkillDefinitionId } from "./ids-schema";
2
+ import { AgentId, SkillDefinitionId } from "./ids-schema";
3
3
  import { Metadata, NonEmptyString } from "./shared-schema";
4
4
  import { Permission } from "./tool-schema";
5
5
  export declare const DefinitionRevision: Schema.Int;
@@ -67,15 +67,7 @@ export interface PermissionRuleset extends Schema.Schema.Type<typeof PermissionR
67
67
  export declare const ToolInputSchemaDigests: Schema.$Record<Schema.String, Schema.String>;
68
68
  export interface ToolInputSchemaDigests extends Schema.Schema.Type<typeof ToolInputSchemaDigests> {
69
69
  }
70
- /**
71
- * Default per-`AgentLoop.run` tool-turn budget when `max_tool_turns` is absent.
72
- * Preserves pre-configuration behavior bit-for-bit.
73
- */
74
70
  export declare const defaultMaxToolTurns = 8;
75
- /**
76
- * Default per-execution wait-turn budget when `max_wait_turns` is absent.
77
- * Preserves pre-configuration behavior bit-for-bit.
78
- */
79
71
  export declare const defaultMaxWaitTurns = 8;
80
72
  export declare const Definition: Schema.Struct<{
81
73
  readonly name: Schema.String;
@@ -140,7 +132,7 @@ export type ToolRef = {
140
132
  readonly name: string;
141
133
  } & Readonly<Record<string, unknown>>);
142
134
  export interface DefineInput {
143
- readonly id: AgentDefinitionId;
135
+ readonly id: AgentId;
144
136
  readonly name: NonEmptyString;
145
137
  readonly instructions?: string;
146
138
  readonly model: ModelSelection;
@@ -158,8 +150,8 @@ export interface DefineInput {
158
150
  }
159
151
  export declare const define: (input: DefineInput) => RegisterDefinitionPayload;
160
152
  export declare const DefinitionRecord: Schema.Struct<{
161
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
162
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
153
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
154
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
163
155
  };
164
156
  readonly current_revision: Schema.Int;
165
157
  readonly definition: Schema.Struct<{
@@ -224,8 +216,8 @@ export declare const DefinitionRecord: Schema.Struct<{
224
216
  export interface DefinitionRecord extends Schema.Schema.Type<typeof DefinitionRecord> {
225
217
  }
226
218
  export declare const DefinitionRevisionRecord: Schema.Struct<{
227
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
228
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
219
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
220
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
229
221
  };
230
222
  readonly revision: Schema.Int;
231
223
  readonly definition: Schema.Struct<{
@@ -289,8 +281,8 @@ export declare const DefinitionRevisionRecord: Schema.Struct<{
289
281
  export interface DefinitionRevisionRecord extends Schema.Schema.Type<typeof DefinitionRevisionRecord> {
290
282
  }
291
283
  export declare const RegisterDefinitionPayload: Schema.Struct<{
292
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
293
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
284
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
285
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
294
286
  };
295
287
  readonly definition: Schema.Struct<{
296
288
  readonly name: Schema.String;
@@ -352,8 +344,8 @@ export interface RegisterDefinitionPayload extends Schema.Schema.Type<typeof Reg
352
344
  }
353
345
  export declare const DefinitionRegistered: Schema.Struct<{
354
346
  readonly record: Schema.Struct<{
355
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
356
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
347
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
348
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
357
349
  };
358
350
  readonly current_revision: Schema.Int;
359
351
  readonly definition: Schema.Struct<{
@@ -420,8 +412,8 @@ export interface DefinitionRegistered extends Schema.Schema.Type<typeof Definiti
420
412
  }
421
413
  export declare const DefinitionList: Schema.Struct<{
422
414
  readonly records: Schema.$Array<Schema.Struct<{
423
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
424
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
415
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
416
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
425
417
  };
426
418
  readonly current_revision: Schema.Int;
427
419
  readonly definition: Schema.Struct<{
@@ -488,8 +480,8 @@ export interface DefinitionList extends Schema.Schema.Type<typeof DefinitionList
488
480
  }
489
481
  export declare const DefinitionRevisionList: Schema.Struct<{
490
482
  readonly records: Schema.$Array<Schema.Struct<{
491
- readonly id: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
492
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
483
+ readonly id: Schema.brand<Schema.String, "Relay.AgentId"> & {
484
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
493
485
  };
494
486
  readonly revision: Schema.Int;
495
487
  readonly definition: Schema.Struct<{
@@ -12,11 +12,11 @@ export declare const Execution: Schema.Struct<{
12
12
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionId">;
13
13
  }>;
14
14
  readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
15
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
16
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
15
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
16
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
17
17
  }>;
18
- readonly agent_definition_revision: Schema.optionalKey<Schema.Int>;
19
- readonly agent_definition_snapshot: Schema.optionalKey<Schema.Struct<{
18
+ readonly agent_revision: Schema.optionalKey<Schema.Int>;
19
+ readonly agent_snapshot: Schema.optionalKey<Schema.Struct<{
20
20
  readonly name: Schema.String;
21
21
  readonly instructions: Schema.optionalKey<Schema.String>;
22
22
  readonly model: Schema.Struct<{
@@ -71,7 +71,7 @@ export declare const Execution: Schema.Struct<{
71
71
  readonly output_schema_ref: Schema.optionalKey<Schema.String>;
72
72
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
73
73
  }>>;
74
- readonly agent_definition_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
74
+ readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
75
75
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
76
76
  readonly created_at: Schema.Int;
77
77
  readonly updated_at: Schema.Int;
@@ -12,10 +12,10 @@ export declare const AddressBookEntryId: Schema.brand<Schema.String, "Relay.Addr
12
12
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressBookEntryId">;
13
13
  };
14
14
  export type AddressBookEntryId = typeof AddressBookEntryId.Type;
15
- export declare const AgentDefinitionId: Schema.brand<Schema.String, "Relay.AgentDefinitionId"> & {
16
- make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">;
15
+ export declare const AgentId: Schema.brand<Schema.String, "Relay.AgentId"> & {
16
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
17
17
  };
18
- export type AgentDefinitionId = typeof AgentDefinitionId.Type;
18
+ export type AgentId = typeof AgentId.Type;
19
19
  export declare const SkillDefinitionId: Schema.brand<Schema.String, "Relay.SkillDefinitionId"> & {
20
20
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">;
21
21
  };
@@ -1,6 +1,6 @@
1
1
  import { Ids, Shared } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
4
  export declare const RouteKind: Schema.Literals<readonly ["local-agent", "remote-relay", "local-adapter", "unavailable", "deferred-retry"]>;
5
5
  export type RouteKind = typeof RouteKind.Type;
6
6
  declare const AddressNotFound_base: Schema.Class<AddressNotFound, Schema.TaggedStruct<"AddressNotFound", {
@@ -48,7 +48,7 @@ export declare const AddressBookRow: Schema.Struct<{
48
48
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
49
49
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
50
50
  }>;
51
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
51
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
52
52
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
53
53
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
54
54
  export declare const upsert: (input: UpsertAddressBookEntryInput) => Effect.Effect<AddressBookEntry, AddressBookRepositoryError, Service>;
@@ -1,13 +1,13 @@
1
1
  import { Agent, Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
4
  declare const AgentDefinitionRepositoryError_base: Schema.Class<AgentDefinitionRepositoryError, Schema.TaggedStruct<"AgentDefinitionRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
7
7
  export declare class AgentDefinitionRepositoryError extends AgentDefinitionRepositoryError_base {
8
8
  }
9
9
  export interface AgentDefinitionRecord {
10
- readonly id: Ids.AgentDefinitionId;
10
+ readonly id: Ids.AgentId;
11
11
  readonly currentRevision: Agent.DefinitionRevision;
12
12
  readonly definition: Agent.Definition;
13
13
  readonly toolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
@@ -15,28 +15,28 @@ export interface AgentDefinitionRecord {
15
15
  readonly updatedAt: number;
16
16
  }
17
17
  export interface AgentDefinitionRevisionRecord {
18
- readonly id: Ids.AgentDefinitionId;
18
+ readonly id: Ids.AgentId;
19
19
  readonly revision: Agent.DefinitionRevision;
20
20
  readonly definition: Agent.Definition;
21
21
  readonly toolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
22
22
  readonly createdAt: number;
23
23
  }
24
24
  export interface PutAgentDefinitionInput {
25
- readonly id: Ids.AgentDefinitionId;
25
+ readonly id: Ids.AgentId;
26
26
  readonly definition: Agent.Definition;
27
27
  readonly toolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
28
28
  readonly now: number;
29
29
  }
30
30
  export interface GetAgentDefinitionRevisionInput {
31
- readonly id: Ids.AgentDefinitionId;
31
+ readonly id: Ids.AgentId;
32
32
  readonly revision: Agent.DefinitionRevision;
33
33
  }
34
34
  export interface Interface {
35
35
  readonly put: (input: PutAgentDefinitionInput) => Effect.Effect<AgentDefinitionRecord, AgentDefinitionRepositoryError>;
36
- readonly get: (id: Ids.AgentDefinitionId) => Effect.Effect<AgentDefinitionRecord | undefined, AgentDefinitionRepositoryError>;
36
+ readonly get: (id: Ids.AgentId) => Effect.Effect<AgentDefinitionRecord | undefined, AgentDefinitionRepositoryError>;
37
37
  readonly getRevision: (input: GetAgentDefinitionRevisionInput) => Effect.Effect<AgentDefinitionRevisionRecord | undefined, AgentDefinitionRepositoryError>;
38
38
  readonly list: () => Effect.Effect<ReadonlyArray<AgentDefinitionRecord>, AgentDefinitionRepositoryError>;
39
- readonly listRevisions: (id: Ids.AgentDefinitionId) => Effect.Effect<ReadonlyArray<AgentDefinitionRevisionRecord>, AgentDefinitionRepositoryError>;
39
+ readonly listRevisions: (id: Ids.AgentId) => Effect.Effect<ReadonlyArray<AgentDefinitionRevisionRecord>, AgentDefinitionRepositoryError>;
40
40
  }
41
41
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/AgentDefinitionRepository", Interface>;
42
42
  export declare class Service extends Service_base {
@@ -50,18 +50,18 @@ export declare const AgentDefinitionRow: Schema.Struct<{
50
50
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
51
51
  }>;
52
52
  export declare const AgentDefinitionRevisionRow: Schema.Struct<{
53
- readonly agent_definition_id: Schema.String;
53
+ readonly agent_id: Schema.String;
54
54
  readonly revision: Schema.Number;
55
55
  readonly definition_json: Schema.Unknown;
56
56
  readonly tool_input_schema_digests_json: Schema.Unknown;
57
57
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
58
58
  }>;
59
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
59
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
60
60
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
61
61
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
62
62
  export declare const put: (input: PutAgentDefinitionInput) => Effect.Effect<AgentDefinitionRecord, AgentDefinitionRepositoryError, Service>;
63
- export declare const get: (id: string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">) => Effect.Effect<AgentDefinitionRecord | undefined, AgentDefinitionRepositoryError, Service>;
63
+ export declare const get: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<AgentDefinitionRecord | undefined, AgentDefinitionRepositoryError, Service>;
64
64
  export declare const getRevision: (input: GetAgentDefinitionRevisionInput) => Effect.Effect<AgentDefinitionRevisionRecord | undefined, AgentDefinitionRepositoryError, Service>;
65
65
  export declare const list: () => Effect.Effect<readonly AgentDefinitionRecord[], AgentDefinitionRepositoryError, Service>;
66
- export declare const listRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">) => Effect.Effect<readonly AgentDefinitionRevisionRecord[], AgentDefinitionRepositoryError, Service>;
66
+ export declare const listRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<readonly AgentDefinitionRevisionRecord[], AgentDefinitionRepositoryError, Service>;
67
67
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
4
  declare const AgentChatRepositoryError_base: Schema.Class<AgentChatRepositoryError, Schema.TaggedStruct<"AgentChatRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -28,7 +28,7 @@ export declare const AgentChatRow: Schema.Struct<{
28
28
  readonly export_json: Schema.Unknown;
29
29
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
30
30
  }>;
31
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
31
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
32
32
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
33
33
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
34
34
  export declare const save: (input: SaveInput) => Effect.Effect<AgentChatRecord, AgentChatRepositoryError, Service>;
@@ -1,6 +1,6 @@
1
1
  import { Execution, Ids, Shared } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
4
  declare const ChildExecutionRepositoryError_base: Schema.Class<ChildExecutionRepositoryError, Schema.TaggedStruct<"ChildExecutionRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -61,7 +61,7 @@ export declare const ChildExecutionRow: Schema.Struct<{
61
61
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
62
62
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
63
63
  }>;
64
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
64
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
65
65
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
66
66
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
67
67
  export declare const create: (input: CreateChildExecutionInput) => Effect.Effect<ChildExecutionRecord, ChildExecutionRepositoryError | DuplicateChildExecution, Service>;
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Schema } from "effect";
2
- import * as SqlClient from "effect/unstable/sql/SqlClient";
2
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
3
3
  declare const ClusterRegistryError_base: Schema.Class<ClusterRegistryError, Schema.TaggedStruct<"ClusterRegistryError", {
4
4
  readonly message: Schema.String;
5
5
  }>, import("effect/Cause").YieldableError>;
@@ -27,7 +27,7 @@ export declare const RunnerRow: Schema.Struct<{
27
27
  export declare const LockRow: Schema.Struct<{
28
28
  readonly address: Schema.String;
29
29
  }>;
30
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
30
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
31
31
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
32
32
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
33
33
  export declare const listRunners: () => Effect.Effect<readonly RunnerRecord[], ClusterRegistryError, Service>;
@@ -1,6 +1,6 @@
1
1
  import { Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
4
  declare const CompactionRepositoryError_base: Schema.Class<CompactionRepositoryError, Schema.TaggedStruct<"CompactionRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -36,7 +36,7 @@ export declare const CompactionCheckpointRow: Schema.Struct<{
36
36
  readonly turn: Schema.Number;
37
37
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
38
38
  }>;
39
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
39
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
40
40
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
41
41
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
42
42
  export declare const get: (input: GetInput) => Effect.Effect<CompactionCheckpointRecord | undefined, CompactionRepositoryError, Service>;
@@ -1,12 +1,11 @@
1
- import * as MysqlClient from "@effect/sql-mysql2/MysqlClient";
2
- import * as PgClient from "@effect/sql-pg/PgClient";
3
- import * as PgDrizzle from "drizzle-orm/effect-postgres";
1
+ import { PgClient } from "@effect/sql-pg/PgClient";
2
+ import { EffectPgDatabase } from "drizzle-orm/effect-postgres";
4
3
  import type { EffectDrizzleQueryError } from "drizzle-orm/effect-core/errors";
5
4
  import { Config, Context, Effect, Layer, Schema } from "effect";
6
- import * as SqlClient from "effect/unstable/sql/SqlClient";
5
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
7
6
  import type { SqlError } from "effect/unstable/sql/SqlError";
8
- export type Drizzle = PgDrizzle.EffectPgDatabase & {
9
- readonly $client: PgClient.PgClient;
7
+ export type Drizzle = EffectPgDatabase & {
8
+ readonly $client: PgClient;
10
9
  };
11
10
  export type PgTimestamp = Date | string | number;
12
11
  export type DatabaseError = EffectDrizzleQueryError | SqlError;
@@ -19,17 +18,17 @@ export declare const fromNullablePgDate: (timestamp: PgTimestamp | null | undefi
19
18
  export declare const pgTypeParsers: {
20
19
  getTypeParser: (typeId: number, format?: "text" | "binary") => any;
21
20
  };
22
- export declare const PgClientLive: Layer.Layer<PgClient.PgClient | SqlClient.SqlClient, SqlError | Config.ConfigError, never>;
23
- export declare const layerFromPgClient: Layer.Layer<Service, never, PgClient.PgClient>;
21
+ export declare const PgClientLive: Layer.Layer<PgClient | SqlClient, SqlError | Config.ConfigError, never>;
22
+ export declare const layerFromPgClient: Layer.Layer<Service, never, PgClient>;
24
23
  export declare const layer: Layer.Layer<Service, SqlError | Config.ConfigError, never>;
25
24
  export declare const testLayer: (db: Drizzle) => Layer.Layer<Service, never, never>;
26
25
  export declare const check: () => Effect.Effect<void, EffectDrizzleQueryError, Service>;
27
26
  export declare const Dialect: Schema.Literals<readonly ["pg", "mysql", "sqlite"]>;
28
27
  export type Dialect = typeof Dialect.Type;
29
- export declare const dialect: Effect.Effect<Dialect, never, SqlClient.SqlClient>;
30
- export declare const MysqlClientLive: Layer.Layer<SqlClient.SqlClient | MysqlClient.MysqlClient, SqlError | Config.ConfigError, never>;
31
- export declare const SqliteClientLive: Layer.Layer<SqlClient.SqlClient | import("@effect/sql-sqlite-bun/SqliteClient").SqliteClient, Config.ConfigError, never>;
32
- export declare const timestampParam: (client: SqlClient.SqlClient, millis: number) => Date | number;
28
+ export declare const dialect: Effect.Effect<Dialect, never, SqlClient>;
29
+ export declare const MysqlClientLive: Layer.Layer<SqlClient | import("@effect/sql-mysql2/MysqlClient").MysqlClient, SqlError | Config.ConfigError, never>;
30
+ export declare const SqliteClientLive: Layer.Layer<SqlClient | import("@effect/sql-sqlite-bun/SqliteClient").SqliteClient, Config.ConfigError, never>;
31
+ export declare const timestampParam: (client: SqlClient, millis: number) => Date | number;
33
32
  export declare const fromDbTimestamp: (timestamp: PgTimestamp) => number;
34
33
  export declare const fromNullableDbTimestamp: (timestamp: PgTimestamp | null | undefined) => number | undefined;
35
34
  export declare const encodeJson: (value: unknown) => string;
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Stream } from "effect";
2
- import * as SqlClient from "effect/unstable/sql/SqlClient";
2
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
3
3
  import type { SqlError } from "effect/unstable/sql/SqlError";
4
4
  export interface Interface {
5
5
  readonly publish: (channel: string, payload: string) => Effect.Effect<void, SqlError>;
@@ -8,9 +8,9 @@ export interface Interface {
8
8
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/NotificationBus", Interface>;
9
9
  export declare class Service extends Service_base {
10
10
  }
11
- export declare const pgLayer: Layer.Layer<Service, never, SqlClient.SqlClient>;
11
+ export declare const pgLayer: Layer.Layer<Service, never, SqlClient>;
12
12
  export declare const inProcessLayer: Layer.Layer<Service, never, never>;
13
13
  export declare const mysqlLayer: Layer.Layer<Service, never, never>;
14
- export declare const layerFromDialect: Layer.Layer<Service, never, SqlClient.SqlClient>;
14
+ export declare const layerFromDialect: Layer.Layer<Service, never, SqlClient>;
15
15
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
16
16
  export {};