@relayfx/sdk 0.0.39 → 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 (70) hide show
  1. package/dist/index.js +1185 -1086
  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 +50 -163
  11. package/dist/types/relay/database.d.ts +11 -10
  12. package/dist/types/relay/operation.d.ts +7 -7
  13. package/dist/types/runtime/address/address-resolution-service.d.ts +7 -7
  14. package/dist/types/runtime/agent/agent-loop-service.d.ts +15 -15
  15. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +6 -44
  16. package/dist/types/runtime/agent/relay-approvals.d.ts +0 -19
  17. package/dist/types/runtime/agent/relay-instructions.d.ts +0 -15
  18. package/dist/types/runtime/agent/relay-permissions.d.ts +4 -4
  19. package/dist/types/runtime/agent/relay-steering.d.ts +2 -2
  20. package/dist/types/runtime/agent/relay-tool-executor.d.ts +5 -21
  21. package/dist/types/runtime/agent/relay-tool-output.d.ts +5 -5
  22. package/dist/types/runtime/agent/sequence-allocator.d.ts +0 -19
  23. package/dist/types/runtime/child/child-run-service.d.ts +2 -2
  24. package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -4
  25. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +14 -14
  26. package/dist/types/runtime/cluster/execution-entity.d.ts +25 -25
  27. package/dist/types/runtime/content/artifact-store-service.d.ts +0 -47
  28. package/dist/types/runtime/content/blob-store-service.d.ts +0 -33
  29. package/dist/types/runtime/envelope/envelope-service.d.ts +4 -4
  30. package/dist/types/runtime/execution/event-log-service.d.ts +0 -5
  31. package/dist/types/runtime/execution/execution-service.d.ts +9 -8
  32. package/dist/types/runtime/memory/memory-service.d.ts +5 -4
  33. package/dist/types/runtime/model/embedding-model-service.d.ts +3 -3
  34. package/dist/types/runtime/model/language-model-service.d.ts +0 -30
  35. package/dist/types/runtime/model/model-call-policy.d.ts +0 -58
  36. package/dist/types/runtime/runner/runner-runtime-service.d.ts +63 -74
  37. package/dist/types/runtime/schedule/scheduler-service.d.ts +5 -5
  38. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +0 -40
  39. package/dist/types/runtime/tool/tool-runtime-service.d.ts +6 -6
  40. package/dist/types/runtime/wait/wait-service.d.ts +2 -2
  41. package/dist/types/runtime/wait/wait-signal.d.ts +3 -3
  42. package/dist/types/runtime/workflow/execution-workflow.d.ts +15 -20
  43. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +16 -15
  44. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +4 -4
  45. package/dist/types/schema/agent-schema.d.ts +0 -8
  46. package/dist/types/schema/execution-schema.d.ts +4 -4
  47. package/dist/types/store-sql/address/address-book-repository.d.ts +2 -2
  48. package/dist/types/store-sql/agent/agent-definition-repository.d.ts +3 -3
  49. package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
  50. package/dist/types/store-sql/child/child-execution-repository.d.ts +2 -2
  51. package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +2 -2
  52. package/dist/types/store-sql/compaction/compaction-repository.d.ts +2 -2
  53. package/dist/types/store-sql/database/database-service.d.ts +11 -12
  54. package/dist/types/store-sql/database/notification-bus.d.ts +3 -3
  55. package/dist/types/store-sql/envelope/envelope-repository.d.ts +2 -2
  56. package/dist/types/store-sql/execution/execution-event-repository.d.ts +4 -4
  57. package/dist/types/store-sql/execution/execution-repository.d.ts +12 -12
  58. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +3 -3
  59. package/dist/types/store-sql/memory/memory-repository.d.ts +5 -5
  60. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
  61. package/dist/types/store-sql/schedule/schedule-repository.d.ts +2 -2
  62. package/dist/types/store-sql/schema/relay-schema.d.ts +21 -21
  63. package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
  64. package/dist/types/store-sql/session/session-repository.d.ts +6 -6
  65. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +2 -2
  66. package/dist/types/store-sql/steering/steering-repository.d.ts +2 -2
  67. package/dist/types/store-sql/tenant/tenant-id.d.ts +3 -1
  68. package/dist/types/store-sql/tool/tool-call-repository.d.ts +2 -2
  69. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +2 -2
  70. package/package.json +3 -14
@@ -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.AgentId"> & {
76
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
82
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.AgentId"> & {
319
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
325
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 {};
@@ -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;
@@ -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.AgentId"> & {
15
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
16
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;
@@ -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,6 +1,6 @@
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>;
@@ -50,13 +50,13 @@ 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>;
@@ -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 {};
@@ -1,6 +1,6 @@
1
1
  import { Address, Envelope, 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 WaitState: Schema.Literals<readonly ["open", "resolved", "timed_out", "cancelled"]>;
5
5
  export type WaitState = typeof WaitState.Type;
6
6
  export declare const EnvelopeReadyState: Schema.Literals<readonly ["ready", "claimed", "acknowledged"]>;
@@ -182,7 +182,7 @@ export declare const EnvelopeReadyRow: Schema.Struct<{
182
182
  readonly claimed_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
183
183
  readonly acknowledged_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
184
184
  }>;
185
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
185
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
186
186
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
187
187
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
188
188
  export declare const acceptEnvelope: (input: AcceptEnvelopeInput) => Effect.Effect<Envelope.EnvelopeAccepted, EnvelopeRepositoryError, Service>;
@@ -1,7 +1,7 @@
1
1
  import { Execution, Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Option, Schema, Stream } from "effect";
3
- import * as SqlClient from "effect/unstable/sql/SqlClient";
4
- import * as NotificationBus from "../database/notification-bus";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
+ import { Service as NotificationBusService } from "../database/notification-bus";
5
5
  export declare const executionEventsChannel = "relay_execution_events";
6
6
  declare const DuplicateExecutionEvent_base: Schema.Class<DuplicateExecutionEvent, Schema.TaggedStruct<"DuplicateExecutionEvent", {
7
7
  readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
@@ -84,8 +84,8 @@ export declare const ExecutionEventRow: Schema.Struct<{
84
84
  readonly data_json: Schema.Unknown;
85
85
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
86
86
  }>;
87
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient | NotificationBus.Service>;
88
- export declare const layerWithBus: Layer.Layer<Service, never, SqlClient.SqlClient>;
87
+ export declare const layer: Layer.Layer<Service, never, SqlClient | NotificationBusService>;
88
+ export declare const layerWithBus: Layer.Layer<Service, never, SqlClient>;
89
89
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
90
90
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
91
91
  export declare const append: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, DuplicateExecutionEvent | ExecutionEventOrderViolation | ExecutionEventRepositoryError, Service>;
@@ -1,6 +1,6 @@
1
1
  import { Agent, 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 ExecutionRepositoryError_base: Schema.Class<ExecutionRepositoryError, Schema.TaggedStruct<"ExecutionRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -26,9 +26,9 @@ export interface ExecutionRecord {
26
26
  readonly sessionId?: Ids.SessionId;
27
27
  readonly status: Execution.ExecutionStatus;
28
28
  readonly agentId?: Ids.AgentId;
29
- readonly agentDefinitionRevision?: Agent.DefinitionRevision;
30
- readonly agentDefinitionSnapshot?: Agent.Definition;
31
- readonly agentDefinitionToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
29
+ readonly agentRevision?: Agent.DefinitionRevision;
30
+ readonly agentSnapshot?: Agent.Definition;
31
+ readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
32
32
  readonly metadata: Shared.Metadata;
33
33
  readonly createdAt: number;
34
34
  readonly updatedAt: number;
@@ -39,9 +39,9 @@ export interface CreateExecutionInput {
39
39
  readonly sessionId?: Ids.SessionId;
40
40
  readonly status: Execution.ExecutionStatus;
41
41
  readonly agentId?: Ids.AgentId;
42
- readonly agentDefinitionRevision?: Agent.DefinitionRevision;
43
- readonly agentDefinitionSnapshot?: Agent.Definition;
44
- readonly agentDefinitionToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
42
+ readonly agentRevision?: Agent.DefinitionRevision;
43
+ readonly agentSnapshot?: Agent.Definition;
44
+ readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
45
45
  readonly metadata?: Shared.Metadata;
46
46
  readonly createdAt: number;
47
47
  }
@@ -80,15 +80,15 @@ export declare const ExecutionRow: Schema.Struct<{
80
80
  readonly root_address_id: Schema.String;
81
81
  readonly session_id: Schema.NullishOr<Schema.String>;
82
82
  readonly status: Schema.String;
83
- readonly agent_definition_id: Schema.NullishOr<Schema.String>;
84
- readonly agent_definition_revision: Schema.NullishOr<Schema.Number>;
85
- readonly agent_definition_snapshot_json: Schema.NullishOr<Schema.Unknown>;
86
- readonly agent_definition_tool_input_schema_digests_json: Schema.Unknown;
83
+ readonly agent_id: Schema.NullishOr<Schema.String>;
84
+ readonly agent_revision: Schema.NullishOr<Schema.Number>;
85
+ readonly agent_snapshot_json: Schema.NullishOr<Schema.Unknown>;
86
+ readonly agent_tool_input_schema_digests_json: Schema.Unknown;
87
87
  readonly metadata_json: Schema.Unknown;
88
88
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
89
89
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
90
90
  }>;
91
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
91
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
92
92
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
93
93
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
94
94
  export declare const create: (input: CreateExecutionInput) => Effect.Effect<ExecutionRecord, ExecutionRepositoryError | DuplicateExecution, Service>;
@@ -1,6 +1,6 @@
1
1
  import { 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 IdempotencyRepositoryError_base: Schema.Class<IdempotencyRepositoryError, Schema.TaggedStruct<"IdempotencyRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -43,9 +43,9 @@ export declare const IdempotencyRow: Schema.Struct<{
43
43
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
44
44
  readonly expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>>;
45
45
  }>;
46
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
46
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
47
47
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
48
48
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
49
- export declare const runOnce: <R>(input: OperationInput, create: Effect.Effect<Shared.JsonValue, IdempotencyRepositoryError, R>) => Effect.Effect<IdempotencyOutcome, IdempotencyRepositoryError, Service | R>;
49
+ export declare const runOnce: <R>(input: OperationInput, create: Effect.Effect<Schema.Json, IdempotencyRepositoryError, R>) => Effect.Effect<IdempotencyOutcome, IdempotencyRepositoryError, Service | R>;
50
50
  export declare const transaction: <A, R>(effect: Effect.Effect<A, IdempotencyRepositoryError, R>) => Effect.Effect<A, IdempotencyRepositoryError, Service | R>;
51
51
  export {};
@@ -1,7 +1,7 @@
1
1
  import { Ids, Shared } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import type * as Ai from "effect/unstable/ai";
4
- import * as SqlClient from "effect/unstable/sql/SqlClient";
3
+ import type { Part } from "effect/unstable/ai/Prompt";
4
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
5
5
  declare const MemoryRepositoryError_base: Schema.Class<MemoryRepositoryError, Schema.TaggedStruct<"MemoryRepositoryError", {
6
6
  readonly message: Schema.String;
7
7
  }>, import("effect/Cause").YieldableError>;
@@ -12,7 +12,7 @@ export interface MemoryRecord {
12
12
  readonly agent: string;
13
13
  readonly subject: Ids.MemorySubjectId;
14
14
  readonly embedding: ReadonlyArray<number>;
15
- readonly parts: ReadonlyArray<Ai.Prompt.Part>;
15
+ readonly parts: ReadonlyArray<Part>;
16
16
  readonly metadata: Shared.Metadata;
17
17
  readonly createdAt: number;
18
18
  }
@@ -25,7 +25,7 @@ export interface UpsertInput {
25
25
  readonly agent: string;
26
26
  readonly subject: Ids.MemorySubjectId;
27
27
  readonly embedding: ReadonlyArray<number>;
28
- readonly parts: ReadonlyArray<Ai.Prompt.Part>;
28
+ readonly parts: ReadonlyArray<Part>;
29
29
  readonly metadata?: Shared.Metadata | undefined;
30
30
  readonly createdAt: number;
31
31
  }
@@ -52,7 +52,7 @@ export declare const MemoryRow: Schema.Struct<{
52
52
  readonly metadata_json: Schema.Unknown;
53
53
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
54
54
  }>;
55
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
55
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
56
56
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
57
57
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
58
58
  export declare const upsert: (input: UpsertInput) => Effect.Effect<MemoryRecord, MemoryRepositoryError, Service>;
@@ -1,6 +1,6 @@
1
1
  import type { Agent } 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 PermissionRuleRepositoryError_base: Schema.Class<PermissionRuleRepositoryError, Schema.TaggedStruct<"PermissionRuleRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -35,7 +35,7 @@ export declare const PermissionRuleRow: Schema.Struct<{
35
35
  readonly rule_json: Schema.Unknown;
36
36
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
37
37
  }>;
38
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
38
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
39
39
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
40
40
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
41
41
  export declare const remember: (input: RememberInput) => Effect.Effect<PermissionRuleRecord, PermissionRuleRepositoryError, Service>;
@@ -1,6 +1,6 @@
1
1
  import { Content, Ids, Schedule, 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 ScheduleRepositoryError_base: Schema.Class<ScheduleRepositoryError, Schema.TaggedStruct<"ScheduleRepositoryError", {
5
5
  readonly message: Schema.String;
6
6
  }>, import("effect/Cause").YieldableError>;
@@ -89,7 +89,7 @@ export declare const ScheduleRow: Schema.Struct<{
89
89
  readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
90
90
  readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
91
91
  }>;
92
- export declare const layer: Layer.Layer<Service, never, SqlClient.SqlClient>;
92
+ export declare const layer: Layer.Layer<Service, never, SqlClient>;
93
93
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
94
94
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
95
95
  export declare const create: (input: CreateScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleRepositoryError, Service>;