@relayfx/sdk 0.2.15 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/ai.js +2 -2
  2. package/dist/{index-z9xk02sv.js → index-c2skef55.js} +1898 -1556
  3. package/dist/{index-d8q4kfjy.js → index-d3dme13d.js} +12 -8
  4. package/dist/{index-xbbfagnb.js → index-pn652eef.js} +166 -105
  5. package/dist/{index-gxskhyra.js → index-vwbatywf.js} +8 -8
  6. package/dist/index.js +5 -5
  7. package/dist/mysql.js +24 -9
  8. package/dist/postgres.js +18 -13
  9. package/dist/sqlite.js +26 -29
  10. package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +2 -2
  11. package/dist/types/relay/adapter-outbox.d.ts +1 -1
  12. package/dist/types/relay/client.d.ts +32 -30
  13. package/dist/types/relay/command.d.ts +10 -4
  14. package/dist/types/relay/database.d.ts +4 -4
  15. package/dist/types/relay/migration-errors.d.ts +8 -2
  16. package/dist/types/relay/mysql.d.ts +2 -2
  17. package/dist/types/relay/operation.d.ts +211 -126
  18. package/dist/types/relay/postgres.d.ts +2 -2
  19. package/dist/types/relay/runtime-capability-policy.d.ts +11 -5
  20. package/dist/types/relay/runtime-database.d.ts +1 -1
  21. package/dist/types/relay/runtime.d.ts +4 -4
  22. package/dist/types/relay/sqlite-migrations.d.ts +1 -1
  23. package/dist/types/relay/sqlite-runtime.d.ts +10 -5
  24. package/dist/types/relay/tool-worker.d.ts +6 -5
  25. package/dist/types/runtime/address/address-book-service.d.ts +3 -3
  26. package/dist/types/runtime/address/address-resolution-service.d.ts +41 -41
  27. package/dist/types/runtime/agent/agent-loop-service.d.ts +14 -5
  28. package/dist/types/runtime/agent/agent-registry-service.d.ts +2 -2
  29. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +1 -1
  30. package/dist/types/runtime/agent/relay-tool-output.d.ts +4 -1
  31. package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +1 -1
  32. package/dist/types/runtime/child/child-fan-out-runtime.d.ts +12 -8
  33. package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +1 -1
  34. package/dist/types/runtime/child/child-run-service.d.ts +7 -4
  35. package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -2
  36. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +5 -4
  37. package/dist/types/runtime/cluster/execution-entity.d.ts +2 -2
  38. package/dist/types/runtime/content/artifact-store-service.d.ts +2 -2
  39. package/dist/types/runtime/content/blob-store-service.d.ts +1 -1
  40. package/dist/types/runtime/entity/entity-instance-service.d.ts +14 -5
  41. package/dist/types/runtime/entity/entity-registry-service.d.ts +2 -2
  42. package/dist/types/runtime/envelope/envelope-service.d.ts +2 -2
  43. package/dist/types/runtime/execution/active-execution-registry.d.ts +1 -1
  44. package/dist/types/runtime/execution/event-log-service.d.ts +28 -3
  45. package/dist/types/runtime/execution/execution-service.d.ts +1 -1
  46. package/dist/types/runtime/execution/execution-watch-service.d.ts +1 -1
  47. package/dist/types/runtime/execution/session-stream-service.d.ts +1 -1
  48. package/dist/types/runtime/inbox/inbox-service.d.ts +1 -1
  49. package/dist/types/runtime/memory/memory-service.d.ts +1 -1
  50. package/dist/types/runtime/model/embedding-model-service.d.ts +23 -10
  51. package/dist/types/runtime/model/language-model-service.d.ts +19 -6
  52. package/dist/types/runtime/model/model-call-policy.d.ts +1 -1
  53. package/dist/types/runtime/observability/runtime-metrics.d.ts +12 -3
  54. package/dist/types/runtime/presence/presence-service.d.ts +1 -1
  55. package/dist/types/runtime/presence/presence-tool.d.ts +1 -1
  56. package/dist/types/runtime/runner/runner-runtime-service.d.ts +19 -19
  57. package/dist/types/runtime/schedule/scheduler-service.d.ts +3 -3
  58. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +2 -2
  59. package/dist/types/runtime/session/session-store-service.d.ts +13 -4
  60. package/dist/types/runtime/skill/skill-registry-service.d.ts +2 -2
  61. package/dist/types/runtime/state/execution-state-service.d.ts +5 -2
  62. package/dist/types/runtime/tool/tool-runtime-service.d.ts +42 -19
  63. package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +2 -2
  64. package/dist/types/runtime/topic/topic-service.d.ts +1 -1
  65. package/dist/types/runtime/wait/wait-service.d.ts +1 -1
  66. package/dist/types/runtime/wait/wait-signal.d.ts +12 -3
  67. package/dist/types/runtime/workflow/activity-version-registry.d.ts +7 -3
  68. package/dist/types/runtime/workflow/definition-runtime.d.ts +37 -22
  69. package/dist/types/runtime/workflow/execution-workflow.d.ts +105 -110
  70. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +6 -6
  71. package/dist/types/runtime/workspace/workspace-provider-service.d.ts +11 -7
  72. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +1 -1
  73. package/dist/types/schema/agent-schema.d.ts +246 -246
  74. package/dist/types/schema/child-orchestration-schema.d.ts +64 -64
  75. package/dist/types/schema/execution-schema.d.ts +57 -57
  76. package/dist/types/schema/workflow-schema.d.ts +243 -243
  77. package/dist/types/schema/workspace-schema.d.ts +1 -1
  78. package/dist/types/store-sql/address/address-book-repository.d.ts +5 -5
  79. package/dist/types/store-sql/agent/agent-definition-repository.d.ts +7 -7
  80. package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
  81. package/dist/types/store-sql/child/child-execution-repository.d.ts +4 -4
  82. package/dist/types/store-sql/child/child-fan-out-repository.d.ts +2 -2
  83. package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +5 -5
  84. package/dist/types/store-sql/compaction/compaction-repository.d.ts +3 -3
  85. package/dist/types/store-sql/database/database-service.d.ts +3 -3
  86. package/dist/types/store-sql/database/notification-bus.d.ts +1 -1
  87. package/dist/types/store-sql/database/sql-dialect.d.ts +4 -1
  88. package/dist/types/store-sql/entity/entity-repository.d.ts +2 -2
  89. package/dist/types/store-sql/envelope/envelope-repository.d.ts +13 -13
  90. package/dist/types/store-sql/execution/execution-event-repository.d.ts +27 -5
  91. package/dist/types/store-sql/execution/execution-repository.d.ts +8 -8
  92. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +5 -5
  93. package/dist/types/store-sql/inbox/inbox-repository.d.ts +1 -1
  94. package/dist/types/store-sql/memory/memory-repository.d.ts +3 -3
  95. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
  96. package/dist/types/store-sql/presence/presence-repository.d.ts +2 -2
  97. package/dist/types/store-sql/schedule/schedule-repository.d.ts +9 -9
  98. package/dist/types/store-sql/schema/relay-schema.d.ts +257 -257
  99. package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
  100. package/dist/types/store-sql/session/session-repository.d.ts +5 -5
  101. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +9 -9
  102. package/dist/types/store-sql/state/execution-state-repository.d.ts +2 -2
  103. package/dist/types/store-sql/steering/steering-repository.d.ts +5 -5
  104. package/dist/types/store-sql/tenant/tenant-id.d.ts +2 -2
  105. package/dist/types/store-sql/tool/tool-call-repository.d.ts +19 -16
  106. package/dist/types/store-sql/topic/topic-repository.d.ts +1 -1
  107. package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +16 -14
  108. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +11 -11
  109. package/package.json +3 -3
@@ -11,7 +11,7 @@ export declare const WorkspaceCapabilities: Schema.Struct<{
11
11
  readonly can_fork: Schema.Boolean;
12
12
  readonly persistent_by_default: Schema.Boolean;
13
13
  readonly suspend_granularity: Schema.Literals<readonly ["memory", "filesystem", "none"]>;
14
- readonly max_suspend_duration_ms: Schema.optionalKey<Schema.Number>;
14
+ readonly max_suspend_duration_ms: Schema.optionalKey<Schema.Finite>;
15
15
  readonly reattach_by_ref: Schema.Boolean;
16
16
  }>;
17
17
  export interface WorkspaceCapabilities extends Schema.Schema.Type<typeof WorkspaceCapabilities> {
@@ -34,9 +34,9 @@ export interface UpsertAddressBookEntryInput {
34
34
  export interface Interface {
35
35
  readonly upsert: (input: UpsertAddressBookEntryInput) => Effect.Effect<AddressBookEntry, AddressBookRepositoryError>;
36
36
  readonly resolve: (addressId: Ids.AddressId) => Effect.Effect<AddressBookEntry, AddressNotFound | AddressBookRepositoryError>;
37
- readonly list: () => Effect.Effect<ReadonlyArray<AddressBookEntry>, AddressBookRepositoryError>;
37
+ readonly list: (_?: never) => Effect.Effect<ReadonlyArray<AddressBookEntry>, AddressBookRepositoryError>;
38
38
  }
39
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/AddressBookRepository", Interface>;
39
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/address/address-book-repository/Service", Interface>;
40
40
  export declare class Service extends Service_base {
41
41
  }
42
42
  export declare const AddressBookRow: Schema.Struct<{
@@ -45,13 +45,13 @@ export declare const AddressBookRow: Schema.Struct<{
45
45
  readonly route_kind: Schema.String;
46
46
  readonly route_key: Schema.String;
47
47
  readonly metadata_json: Schema.Unknown;
48
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
49
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
48
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
49
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
50
50
  }>;
51
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>;
55
- export declare const resolve: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<AddressBookEntry, AddressNotFound | AddressBookRepositoryError, Service>;
55
+ export declare const resolve: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<AddressBookEntry, AddressBookRepositoryError | AddressNotFound, Service>;
56
56
  export declare const list: () => Effect.Effect<readonly AddressBookEntry[], AddressBookRepositoryError, Service>;
57
57
  export {};
@@ -35,26 +35,26 @@ export interface Interface {
35
35
  readonly put: (input: PutAgentDefinitionInput) => Effect.Effect<AgentDefinitionRecord, AgentDefinitionRepositoryError>;
36
36
  readonly get: (id: Ids.AgentId) => Effect.Effect<AgentDefinitionRecord | undefined, AgentDefinitionRepositoryError>;
37
37
  readonly getRevision: (input: GetAgentDefinitionRevisionInput) => Effect.Effect<AgentDefinitionRevisionRecord | undefined, AgentDefinitionRepositoryError>;
38
- readonly list: () => Effect.Effect<ReadonlyArray<AgentDefinitionRecord>, AgentDefinitionRepositoryError>;
38
+ readonly list: (_?: never) => Effect.Effect<ReadonlyArray<AgentDefinitionRecord>, AgentDefinitionRepositoryError>;
39
39
  readonly listRevisions: (id: Ids.AgentId) => Effect.Effect<ReadonlyArray<AgentDefinitionRevisionRecord>, AgentDefinitionRepositoryError>;
40
40
  }
41
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/AgentDefinitionRepository", Interface>;
41
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/agent/agent-definition-repository/Service", Interface>;
42
42
  export declare class Service extends Service_base {
43
43
  }
44
44
  export declare const AgentDefinitionRow: Schema.Struct<{
45
45
  readonly id: Schema.String;
46
- readonly current_revision: Schema.Number;
46
+ readonly current_revision: Schema.Finite;
47
47
  readonly definition_json: Schema.Unknown;
48
48
  readonly tool_input_schema_digests_json: Schema.Unknown;
49
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
50
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
49
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
50
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
51
51
  }>;
52
52
  export declare const AgentDefinitionRevisionRow: Schema.Struct<{
53
53
  readonly agent_id: Schema.String;
54
- readonly revision: Schema.Number;
54
+ readonly revision: Schema.Finite;
55
55
  readonly definition_json: Schema.Unknown;
56
56
  readonly tool_input_schema_digests_json: Schema.Unknown;
57
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
57
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
58
58
  }>;
59
59
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
60
60
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -20,13 +20,13 @@ export interface Interface {
20
20
  readonly save: (input: SaveInput) => Effect.Effect<AgentChatRecord, AgentChatRepositoryError>;
21
21
  readonly get: (executionId: Ids.ExecutionId) => Effect.Effect<AgentChatRecord | undefined, AgentChatRepositoryError>;
22
22
  }
23
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/AgentChatRepository", Interface>;
23
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/chat/agent-chat-repository/Service", Interface>;
24
24
  export declare class Service extends Service_base {
25
25
  }
26
26
  export declare const AgentChatRow: Schema.Struct<{
27
27
  readonly execution_id: Schema.String;
28
28
  readonly export_json: Schema.Unknown;
29
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
29
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
30
30
  }>;
31
31
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
32
32
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -49,7 +49,7 @@ export interface Interface {
49
49
  readonly listByExecution: (executionId: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<ChildExecutionRecord>, ChildExecutionRepositoryError>;
50
50
  readonly updateStatus: (input: UpdateChildExecutionStatusInput) => Effect.Effect<ChildExecutionRecord, ChildExecutionNotFound | ChildExecutionRepositoryError>;
51
51
  }
52
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ChildExecutionRepository", Interface>;
52
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/child/child-execution-repository/Service", Interface>;
53
53
  export declare class Service extends Service_base {
54
54
  }
55
55
  export declare const ChildExecutionRow: Schema.Struct<{
@@ -58,8 +58,8 @@ export declare const ChildExecutionRow: Schema.Struct<{
58
58
  readonly address_id: Schema.String;
59
59
  readonly status: Schema.String;
60
60
  readonly metadata_json: Schema.Unknown;
61
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
62
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
61
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
62
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
63
63
  }>;
64
64
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
65
65
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -67,5 +67,5 @@ export declare const testLayer: (implementation: Interface) => Layer.Layer<Servi
67
67
  export declare const create: (input: CreateChildExecutionInput) => Effect.Effect<ChildExecutionRecord, ChildExecutionRepositoryError | DuplicateChildExecution, Service>;
68
68
  export declare const get: (id: string & import("effect/Brand").Brand<"Relay.ChildExecutionId">) => Effect.Effect<ChildExecutionRecord | undefined, ChildExecutionRepositoryError, Service>;
69
69
  export declare const listByExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<readonly ChildExecutionRecord[], ChildExecutionRepositoryError, Service>;
70
- export declare const updateStatus: (input: UpdateChildExecutionStatusInput) => Effect.Effect<ChildExecutionRecord, ChildExecutionRepositoryError | ChildExecutionNotFound, Service>;
70
+ export declare const updateStatus: (input: UpdateChildExecutionStatusInput) => Effect.Effect<ChildExecutionRecord, ChildExecutionNotFound | ChildExecutionRepositoryError, Service>;
71
71
  export {};
@@ -39,12 +39,12 @@ export interface CancelResult {
39
39
  readonly transitioned: boolean;
40
40
  readonly activeChildExecutionIds: ReadonlyArray<Ids.ChildExecutionId>;
41
41
  }
42
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ChildFanOutRepository", Interface>;
42
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/child/child-fan-out-repository/Service", Interface>;
43
43
  export declare class Service extends Service_base {
44
44
  }
45
45
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
46
46
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
47
- export declare const create: (definition: ChildOrchestration.FanOutDefinition) => Effect.Effect<ChildOrchestration.FanOutState, ChildFanOutRepositoryError | ChildFanOutConflict, Service>;
47
+ export declare const create: (definition: ChildOrchestration.FanOutDefinition) => Effect.Effect<ChildOrchestration.FanOutState, ChildFanOutConflict | ChildFanOutRepositoryError, Service>;
48
48
  export declare const get: (id: string & import("effect/Brand").Brand<"Relay.ChildFanOutId">) => Effect.Effect<ChildOrchestration.FanOutState | undefined, ChildFanOutRepositoryError, Service>;
49
49
  export declare const claimAdmissions: (id: string & import("effect/Brand").Brand<"Relay.ChildFanOutId">) => Effect.Effect<readonly ChildOrchestration.FanOutChild[], ChildFanOutRepositoryError, Service>;
50
50
  export declare const recordTerminal: (input: RecordTerminalInput) => Effect.Effect<RecordTerminalResult | undefined, ChildFanOutRepositoryError, Service>;
@@ -12,17 +12,17 @@ export interface RunnerRecord {
12
12
  readonly ownedShards: number;
13
13
  }
14
14
  export interface Interface {
15
- readonly listRunners: () => Effect.Effect<ReadonlyArray<RunnerRecord>, ClusterRegistryError>;
15
+ readonly listRunners: (_?: never) => Effect.Effect<ReadonlyArray<RunnerRecord>, ClusterRegistryError>;
16
16
  readonly lockOwner: (shardId: string) => Effect.Effect<string | undefined, ClusterRegistryError>;
17
17
  }
18
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ClusterRegistryRepository", Interface>;
18
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/cluster/cluster-registry-repository/Service", Interface>;
19
19
  export declare class Service extends Service_base {
20
20
  }
21
21
  export declare const RunnerRow: Schema.Struct<{
22
22
  readonly address: Schema.String;
23
- readonly healthy: Schema.Union<readonly [Schema.Boolean, Schema.Number, Schema.String]>;
24
- readonly last_heartbeat: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
25
- readonly owned_shards: Schema.Union<readonly [Schema.Number, Schema.String, Schema.BigInt]>;
23
+ readonly healthy: Schema.Union<readonly [Schema.Boolean, Schema.Finite, Schema.String]>;
24
+ readonly last_heartbeat: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
25
+ readonly owned_shards: Schema.Union<readonly [Schema.Finite, Schema.String, Schema.BigInt]>;
26
26
  }>;
27
27
  export declare const LockRow: Schema.Struct<{
28
28
  readonly address: Schema.String;
@@ -25,7 +25,7 @@ export interface Interface {
25
25
  readonly record: (input: RecordInput) => Effect.Effect<CompactionCheckpointRecord, CompactionRepositoryError>;
26
26
  readonly list: (executionId: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<CompactionCheckpointRecord>, CompactionRepositoryError>;
27
27
  }
28
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/CompactionRepository", Interface>;
28
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/compaction/compaction-repository/Service", Interface>;
29
29
  export declare class Service extends Service_base {
30
30
  }
31
31
  export declare const CompactionCheckpointRow: Schema.Struct<{
@@ -33,8 +33,8 @@ export declare const CompactionCheckpointRow: Schema.Struct<{
33
33
  readonly checkpoint_id: Schema.String;
34
34
  readonly summary: Schema.String;
35
35
  readonly first_kept_entry_id: Schema.String;
36
- readonly turn: Schema.Number;
37
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
36
+ readonly turn: Schema.Finite;
37
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
38
38
  }>;
39
39
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
40
40
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -8,16 +8,16 @@ export type Drizzle = EffectPgDatabase & {
8
8
  };
9
9
  export type PgTimestamp = Date | string | number;
10
10
  export type DatabaseError = EffectDrizzleQueryError | SqlError;
11
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/Database", Drizzle>;
11
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/database/database-service/Service", Drizzle>;
12
12
  export declare class Service extends Service_base {
13
13
  }
14
14
  export { fromDbTimestamp as fromPgDate, fromNullableDbTimestamp as fromNullablePgDate } from "./sql-dialect";
15
15
  export declare const pgTypeParsers: {
16
16
  getTypeParser: (typeId: number, format?: "text" | "binary") => any;
17
17
  };
18
- export declare const PgClientLive: Layer.Layer<import("effect/unstable/sql/SqlClient").SqlClient | PgClient, SqlError | Config.ConfigError, never>;
18
+ export declare const PgClientLive: Layer.Layer<PgClient | import("effect/unstable/sql/SqlClient").SqlClient, Config.ConfigError | SqlError, never>;
19
19
  export declare const layerFromPgClient: Layer.Layer<Service, never, PgClient>;
20
- export declare const layer: Layer.Layer<Service, SqlError | Config.ConfigError, never>;
20
+ export declare const layer: Layer.Layer<Service, Config.ConfigError | SqlError, never>;
21
21
  export declare const testLayer: (db: Drizzle) => Layer.Layer<Service, never, never>;
22
22
  export declare const check: () => Effect.Effect<void, EffectDrizzleQueryError, Service>;
23
23
  export { Dialect, decodeBool, decodeJson, dialect, encodeJson, fromDbTimestamp, fromNullableDbTimestamp, timestampParam, } from "./sql-dialect";
@@ -7,7 +7,7 @@ export interface Interface {
7
7
  readonly publish: (channel: string, payload: string) => Effect.Effect<void, SqlError>;
8
8
  readonly subscribe: (channel: string) => Stream.Stream<string, SqlError>;
9
9
  }
10
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/NotificationBus", Interface>;
10
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/database/notification-bus/Service", Interface>;
11
11
  export declare class Service extends Service_base {
12
12
  }
13
13
  export declare const pgLayer: Layer.Layer<Service, never, SqlClient>;
@@ -7,7 +7,10 @@ export declare const dialect: Effect.Effect<Dialect, never, SqlClient>;
7
7
  export declare const toDbDate: (timestamp: number) => Date;
8
8
  export declare const fromDbTimestamp: (timestamp: DbTimestamp) => number;
9
9
  export declare const fromNullableDbTimestamp: (timestamp: DbTimestamp | null | undefined) => number | undefined;
10
- export declare const timestampParam: (client: SqlClient, millis: number) => Date | number;
10
+ export declare const timestampParam: {
11
+ (client: SqlClient, millis: number): Date | number;
12
+ (millis: number): (client: SqlClient) => Date | number;
13
+ };
11
14
  export declare const encodeJson: (value: unknown) => string;
12
15
  export declare const decodeJson: (value: unknown) => unknown;
13
16
  export declare const decodeBool: (value: unknown) => boolean;
@@ -16,7 +16,7 @@ export interface CreateInstanceInput {
16
16
  export interface Interface {
17
17
  readonly putKind: (definition: Entity.KindDefinition) => Effect.Effect<Entity.KindDefinition, EntityRepositoryError>;
18
18
  readonly getKind: (kind: Ids.EntityKindName) => Effect.Effect<Entity.KindDefinition | undefined, EntityRepositoryError>;
19
- readonly listKinds: () => Effect.Effect<ReadonlyArray<Entity.KindDefinition>, EntityRepositoryError>;
19
+ readonly listKinds: (_?: never) => Effect.Effect<ReadonlyArray<Entity.KindDefinition>, EntityRepositoryError>;
20
20
  readonly getOrCreate: (input: CreateInstanceInput) => Effect.Effect<Entity.Instance, EntityRepositoryError>;
21
21
  readonly get: (kind: Ids.EntityKindName, key: Ids.EntityKey) => Effect.Effect<Entity.Instance | undefined, EntityRepositoryError>;
22
22
  readonly destroy: (kind: Ids.EntityKindName, key: Ids.EntityKey, destroyedAt: number) => Effect.Effect<Entity.Instance | undefined, EntityRepositoryError>;
@@ -27,7 +27,7 @@ export interface Interface {
27
27
  readonly limit?: number;
28
28
  }) => Effect.Effect<ReadonlyArray<Entity.Instance>, EntityRepositoryError>;
29
29
  }
30
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/EntityRepository", Interface>;
30
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/entity/entity-repository/Service", Interface>;
31
31
  export declare class Service extends Service_base {
32
32
  }
33
33
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
@@ -145,7 +145,7 @@ export interface Interface {
145
145
  readonly completeWait: (input: CompleteWaitInput) => Effect.Effect<CompleteWaitResult, WaitNotFound | EnvelopeRepositoryError>;
146
146
  readonly resolveWait: (input: ResolveWaitInput) => Effect.Effect<WaitRecord, WaitNotFound | EnvelopeRepositoryError>;
147
147
  }
148
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/EnvelopeRepository", Interface>;
148
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/envelope/envelope-repository/Service", Interface>;
149
149
  export declare class Service extends Service_base {
150
150
  }
151
151
  export declare const EnvelopeRow: Schema.Struct<{
@@ -157,7 +157,7 @@ export declare const EnvelopeRow: Schema.Struct<{
157
157
  readonly wait_json: Schema.Unknown;
158
158
  readonly correlation_key: Schema.Union<readonly [Schema.String, Schema.Null]>;
159
159
  readonly metadata_json: Schema.Unknown;
160
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
160
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
161
161
  }>;
162
162
  export declare const WaitRow: Schema.Struct<{
163
163
  readonly id: Schema.String;
@@ -167,8 +167,8 @@ export declare const WaitRow: Schema.Struct<{
167
167
  readonly correlation_key: Schema.Union<readonly [Schema.String, Schema.Null]>;
168
168
  readonly state: Schema.String;
169
169
  readonly metadata_json: Schema.Unknown;
170
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
171
- readonly resolved_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
170
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
171
+ readonly resolved_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite, Schema.Null]>;
172
172
  }>;
173
173
  export declare const EnvelopeReadyRow: Schema.Struct<{
174
174
  readonly id: Schema.String;
@@ -176,17 +176,17 @@ export declare const EnvelopeReadyRow: Schema.Struct<{
176
176
  readonly route_type: Schema.String;
177
177
  readonly route_key: Schema.String;
178
178
  readonly state: Schema.String;
179
- readonly available_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
180
- readonly attempt: Schema.Number;
179
+ readonly available_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
180
+ readonly attempt: Schema.Finite;
181
181
  readonly claim_owner: Schema.Union<readonly [Schema.String, Schema.Null]>;
182
- readonly claim_expires_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
182
+ readonly claim_expires_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite, Schema.Null]>;
183
183
  readonly last_error: Schema.Union<readonly [Schema.String, Schema.Null]>;
184
184
  readonly idempotency_key: Schema.Union<readonly [Schema.String, Schema.Null]>;
185
185
  readonly metadata_json: Schema.Unknown;
186
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
187
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
188
- readonly claimed_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
189
- readonly acknowledged_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number, Schema.Null]>;
186
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
187
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
188
+ readonly claimed_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite, Schema.Null]>;
189
+ readonly acknowledged_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite, Schema.Null]>;
190
190
  }>;
191
191
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
192
192
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -198,8 +198,8 @@ export declare const createWait: (input: CreateWaitInput) => Effect.Effect<WaitR
198
198
  export declare const listWaits: (input: ListWaitsInput) => Effect.Effect<readonly WaitRecord[], EnvelopeRepositoryError, Service>;
199
199
  export declare const listAllWaits: (input: ListAllWaitsInput) => Effect.Effect<readonly WaitRecord[], EnvelopeRepositoryError, Service>;
200
200
  export declare const claimReady: (input: ClaimReadyInput) => Effect.Effect<EnvelopeReadyRecord | undefined, EnvelopeRepositoryError, Service>;
201
- export declare const releaseReady: (input: ReleaseReadyInput) => Effect.Effect<EnvelopeReadyRecord, EnvelopeRepositoryError | EnvelopeReadyNotFound | EnvelopeReadyClaimMismatch, Service>;
202
- export declare const ackReady: (input: AckReadyInput) => Effect.Effect<EnvelopeReadyRecord, EnvelopeRepositoryError | EnvelopeReadyNotFound | EnvelopeReadyClaimMismatch, Service>;
201
+ export declare const releaseReady: (input: ReleaseReadyInput) => Effect.Effect<EnvelopeReadyRecord, EnvelopeReadyClaimMismatch | EnvelopeReadyNotFound | EnvelopeRepositoryError, Service>;
202
+ export declare const ackReady: (input: AckReadyInput) => Effect.Effect<EnvelopeReadyRecord, EnvelopeReadyClaimMismatch | EnvelopeReadyNotFound | EnvelopeRepositoryError, Service>;
203
203
  export declare const completeWait: (input: CompleteWaitInput) => Effect.Effect<CompleteWaitResult, EnvelopeRepositoryError | WaitNotFound, Service>;
204
204
  export declare const resolveWait: (input: ResolveWaitInput) => Effect.Effect<WaitRecord, EnvelopeRepositoryError | WaitNotFound, Service>;
205
205
  export {};
@@ -62,6 +62,25 @@ export interface ListAfterSequenceInput {
62
62
  readonly afterSequence: Execution.ExecutionEventSequence | undefined;
63
63
  readonly limit: number;
64
64
  }
65
+ export type PageInput = {
66
+ readonly executionId: Ids.ExecutionId;
67
+ readonly direction: "forward";
68
+ readonly afterCursor?: string;
69
+ readonly beforeCursor?: never;
70
+ readonly limit?: number;
71
+ } | {
72
+ readonly executionId: Ids.ExecutionId;
73
+ readonly direction: "backward";
74
+ readonly afterCursor?: never;
75
+ readonly beforeCursor?: string;
76
+ readonly limit?: number;
77
+ };
78
+ export interface PageResult {
79
+ readonly events: ReadonlyArray<Execution.ExecutionEvent>;
80
+ readonly hasMore: boolean;
81
+ readonly oldestCursor?: string;
82
+ readonly newestCursor?: string;
83
+ }
65
84
  export interface Interface {
66
85
  readonly signalTransport: Transport;
67
86
  readonly append: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, DuplicateExecutionEvent | ExecutionEventOrderViolation | ExecutionEventRepositoryError>;
@@ -75,8 +94,9 @@ export interface Interface {
75
94
  readonly notifyAppended: (event: Execution.ExecutionEvent) => Effect.Effect<void, ExecutionEventRepositoryError>;
76
95
  readonly appendedSignals: (executionId: Ids.ExecutionId) => Stream.Stream<Execution.ExecutionEventSequence, ExecutionEventRepositoryError>;
77
96
  readonly listAfterSequence: (input: ListAfterSequenceInput) => Effect.Effect<ReadonlyArray<Execution.ExecutionEvent>, ExecutionEventRepositoryError>;
97
+ readonly page: (input: PageInput) => Effect.Effect<PageResult, ExecutionEventCursorNotFound | ExecutionEventRepositoryError>;
78
98
  }
79
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ExecutionEventRepository", Interface>;
99
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/execution/execution-event-repository/Service", Interface>;
80
100
  export declare class Service extends Service_base {
81
101
  }
82
102
  export declare const ExecutionEventRow: Schema.Struct<{
@@ -84,18 +104,20 @@ export declare const ExecutionEventRow: Schema.Struct<{
84
104
  readonly execution_id: Schema.String;
85
105
  readonly child_execution_id: Schema.NullishOr<Schema.String>;
86
106
  readonly type: Schema.String;
87
- readonly sequence: Schema.Union<readonly [Schema.Number, Schema.String]>;
107
+ readonly sequence: Schema.Union<readonly [Schema.Finite, Schema.String]>;
88
108
  readonly cursor: Schema.String;
89
109
  readonly content_json: Schema.NullishOr<Schema.Unknown>;
90
110
  readonly data_json: Schema.Unknown;
91
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
111
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
92
112
  }>;
93
- export declare const layer: Layer.Layer<Service, never, SqlClient | NotificationBusService>;
113
+ export declare const layer: Layer.Layer<Service, never, NotificationBusService | SqlClient>;
94
114
  export declare const layerWithBus: Layer.Layer<Service, never, SqlClient>;
95
115
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
96
- export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
116
+ type TestImplementation = Omit<Interface, "page"> & Partial<Pick<Interface, "page">>;
117
+ export declare const testLayer: (implementation: TestImplementation) => Layer.Layer<Service, never, never>;
97
118
  export declare const append: (input: Execution.ExecutionEvent) => Effect.Effect<Execution.ExecutionEvent, DuplicateExecutionEvent | ExecutionEventOrderViolation | ExecutionEventRepositoryError, Service>;
98
119
  export declare const list: (input: ListInput) => Effect.Effect<readonly Execution.ExecutionEvent[], ExecutionEventCursorNotFound | ExecutionEventRepositoryError, Service>;
120
+ export declare const page: (input: PageInput) => Effect.Effect<PageResult, ExecutionEventCursorNotFound | ExecutionEventRepositoryError, Service>;
99
121
  export declare const findBySequenceOrCursor: (input: FindBySequenceOrCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, ExecutionEventRepositoryError, Service>;
100
122
  export declare const findByCursor: (input: FindByCursorInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, ExecutionEventRepositoryError, Service>;
101
123
  export declare const findBySequence: (input: FindBySequenceInput) => Effect.Effect<Option.Option<Execution.ExecutionEvent>, ExecutionEventRepositoryError, Service>;
@@ -78,10 +78,10 @@ export interface Interface {
78
78
  readonly list: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ExecutionRepositoryError>;
79
79
  readonly transition: (input: TransitionExecutionInput) => Effect.Effect<ExecutionRecord, ExecutionNotFound | ExecutionRepositoryError>;
80
80
  readonly notifyChanged: (record: ExecutionRecord) => Effect.Effect<void, ExecutionRepositoryError>;
81
- readonly changedSignals: () => Stream.Stream<Ids.ExecutionId, ExecutionRepositoryError>;
81
+ readonly changedSignals: (_?: never) => Stream.Stream<Ids.ExecutionId, ExecutionRepositoryError>;
82
82
  readonly listChangedSince: (input: ListChangedSinceInput) => Effect.Effect<ReadonlyArray<ExecutionRecord>, ExecutionRepositoryError>;
83
83
  }
84
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ExecutionRepository", Interface>;
84
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/execution/execution-repository/Service", Interface>;
85
85
  export declare class Service extends Service_base {
86
86
  }
87
87
  export declare const ExecutionRow: Schema.Struct<{
@@ -90,19 +90,19 @@ export declare const ExecutionRow: Schema.Struct<{
90
90
  readonly session_id: Schema.NullishOr<Schema.String>;
91
91
  readonly status: Schema.String;
92
92
  readonly agent_id: Schema.NullishOr<Schema.String>;
93
- readonly agent_revision: Schema.NullishOr<Schema.Number>;
93
+ readonly agent_revision: Schema.NullishOr<Schema.Finite>;
94
94
  readonly agent_snapshot_json: Schema.NullishOr<Schema.Unknown>;
95
95
  readonly agent_tool_input_schema_digests_json: Schema.Unknown;
96
96
  readonly metadata_json: Schema.Unknown;
97
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
98
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
97
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
98
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
99
99
  }>;
100
- export declare const layerWithoutBus: Layer.Layer<Service, never, SqlClient | NotificationBusService>;
100
+ export declare const layerWithoutBus: Layer.Layer<Service, never, NotificationBusService | SqlClient>;
101
101
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
102
102
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
103
103
  export declare const testLayer: (implementation: Omit<Interface, "notifyChanged" | "changedSignals" | "listChangedSince"> & Partial<Pick<Interface, "notifyChanged" | "changedSignals" | "listChangedSince">>) => Layer.Layer<Service, never, never>;
104
- export declare const create: (input: CreateExecutionInput) => Effect.Effect<ExecutionRecord, ExecutionRepositoryError | DuplicateExecution, Service>;
104
+ export declare const create: (input: CreateExecutionInput) => Effect.Effect<ExecutionRecord, DuplicateExecution | ExecutionRepositoryError, Service>;
105
105
  export declare const get: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<ExecutionRecord | undefined, ExecutionRepositoryError, Service>;
106
106
  export declare const list: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ExecutionRepositoryError, Service>;
107
- export declare const transition: (input: TransitionExecutionInput) => Effect.Effect<ExecutionRecord, ExecutionRepositoryError | ExecutionNotFound, Service>;
107
+ export declare const transition: (input: TransitionExecutionInput) => Effect.Effect<ExecutionRecord, ExecutionNotFound | ExecutionRepositoryError, Service>;
108
108
  export {};
@@ -31,7 +31,7 @@ export interface Interface {
31
31
  readonly runOnce: <R>(input: OperationInput, create: Effect.Effect<Shared.JsonValue, IdempotencyRepositoryError, R>) => Effect.Effect<IdempotencyOutcome, IdempotencyRepositoryError, R>;
32
32
  readonly transaction: <A, R>(effect: Effect.Effect<A, IdempotencyRepositoryError, R>) => Effect.Effect<A, IdempotencyRepositoryError, R>;
33
33
  }
34
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/IdempotencyRepository", Interface>;
34
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/idempotency/idempotency-repository/Service", Interface>;
35
35
  export declare class Service extends Service_base {
36
36
  }
37
37
  export declare const IdempotencyRow: Schema.Struct<{
@@ -40,12 +40,12 @@ export declare const IdempotencyRow: Schema.Struct<{
40
40
  readonly key: Schema.String;
41
41
  readonly result_json: Schema.NullishOr<Schema.Unknown>;
42
42
  readonly metadata_json: Schema.Unknown;
43
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
44
- readonly expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>>;
43
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
44
+ readonly expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>>;
45
45
  }>;
46
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<Schema.Json, IdempotencyRepositoryError, R>) => Effect.Effect<IdempotencyOutcome, IdempotencyRepositoryError, Service | R>;
50
- export declare const transaction: <A, R>(effect: Effect.Effect<A, IdempotencyRepositoryError, R>) => Effect.Effect<A, IdempotencyRepositoryError, Service | R>;
49
+ export declare const runOnce: <R>(input: OperationInput, create: Effect.Effect<Schema.Json, IdempotencyRepositoryError, R>) => Effect.Effect<IdempotencyOutcome, IdempotencyRepositoryError, R | Service>;
50
+ export declare const transaction: <A, R>(effect: Effect.Effect<A, IdempotencyRepositoryError, R>) => Effect.Effect<A, IdempotencyRepositoryError, R | Service>;
51
51
  export {};
@@ -43,7 +43,7 @@ export interface Interface {
43
43
  readonly countUndrained: (executionId: Ids.ExecutionId) => Effect.Effect<number, InboxRepositoryError>;
44
44
  readonly list: (input: ListInput) => Effect.Effect<ReadonlyArray<Inbox.Message>, InboxRepositoryError>;
45
45
  }
46
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/InboxRepository", Interface>;
46
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/inbox/inbox-repository/Service", Interface>;
47
47
  export declare class Service extends Service_base {
48
48
  }
49
49
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
@@ -45,7 +45,7 @@ export interface Interface {
45
45
  readonly query: (input: QueryInput) => Effect.Effect<ReadonlyArray<MemoryMatch>, MemoryRepositoryError>;
46
46
  readonly forget: (input: ForgetInput) => Effect.Effect<void, MemoryRepositoryError>;
47
47
  }
48
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/MemoryRepository", Interface>;
48
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/memory/memory-repository/Service", Interface>;
49
49
  export declare class Service extends Service_base {
50
50
  }
51
51
  export declare const recallCandidateCap = 1000;
@@ -53,10 +53,10 @@ export declare const MemoryRow: Schema.Struct<{
53
53
  readonly id: Schema.String;
54
54
  readonly agent: Schema.String;
55
55
  readonly subject: Schema.String;
56
- readonly embedding: Schema.Union<readonly [Schema.$Array<Schema.Number>, Schema.String]>;
56
+ readonly embedding: Schema.Union<readonly [Schema.$Array<Schema.Finite>, Schema.String]>;
57
57
  readonly parts_json: Schema.Unknown;
58
58
  readonly metadata_json: Schema.Unknown;
59
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
59
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
60
60
  }>;
61
61
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
62
62
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -26,14 +26,14 @@ export interface Interface {
26
26
  readonly remember: (input: RememberInput) => Effect.Effect<PermissionRuleRecord, PermissionRuleRepositoryError>;
27
27
  readonly list: (input: ListInput) => Effect.Effect<ReadonlyArray<PermissionRuleRecord>, PermissionRuleRepositoryError>;
28
28
  }
29
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/PermissionRuleRepository", Interface>;
29
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/permission/permission-rule-repository/Service", Interface>;
30
30
  export declare class Service extends Service_base {
31
31
  }
32
32
  export declare const PermissionRuleRow: Schema.Struct<{
33
33
  readonly agent: Schema.String;
34
34
  readonly scope: Schema.String;
35
35
  readonly rule_json: Schema.Unknown;
36
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
36
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
37
37
  }>;
38
38
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
39
39
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -37,10 +37,10 @@ export interface Interface {
37
37
  readonly notifyChanged: (scope: ScopeInput) => Effect.Effect<void, PresenceRepositoryError>;
38
38
  readonly changedSignals: (scope: ScopeInput) => Stream.Stream<void, PresenceRepositoryError>;
39
39
  }
40
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/PresenceRepository", Interface>;
40
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/presence/presence-repository/Service", Interface>;
41
41
  export declare class Service extends Service_base {
42
42
  }
43
- export declare const layer: Layer.Layer<Service, never, SqlClient | NotificationBusService>;
43
+ export declare const layer: Layer.Layer<Service, never, NotificationBusService | SqlClient>;
44
44
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
45
45
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
46
46
  export declare const upsertHeartbeat: (input: HeartbeatInput) => Effect.Effect<void, PresenceRepositoryError, Service>;
@@ -67,7 +67,7 @@ export interface Interface {
67
67
  readonly ack: (input: AckScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleNotFound | ScheduleClaimMismatch | ScheduleRepositoryError>;
68
68
  readonly release: (input: ReleaseScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleNotFound | ScheduleClaimMismatch | ScheduleRepositoryError>;
69
69
  }
70
- declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ScheduleRepository", Interface>;
70
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/schedule/schedule-repository/Service", Interface>;
71
71
  export declare class Service extends Service_base {
72
72
  }
73
73
  export declare const ScheduleRow: Schema.Struct<{
@@ -79,15 +79,15 @@ export declare const ScheduleRow: Schema.Struct<{
79
79
  readonly cron_expr: Schema.NullishOr<Schema.String>;
80
80
  readonly input_json: Schema.NullishOr<Schema.Unknown>;
81
81
  readonly state: Schema.String;
82
- readonly next_run_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
83
- readonly attempt: Schema.Union<readonly [Schema.Number, Schema.String, Schema.BigInt]>;
82
+ readonly next_run_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
83
+ readonly attempt: Schema.Union<readonly [Schema.Finite, Schema.String, Schema.BigInt]>;
84
84
  readonly claim_owner: Schema.NullishOr<Schema.String>;
85
- readonly claim_expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>>;
85
+ readonly claim_expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>>;
86
86
  readonly last_error: Schema.NullishOr<Schema.String>;
87
87
  readonly idempotency_key: Schema.NullishOr<Schema.String>;
88
88
  readonly metadata_json: Schema.Unknown;
89
- readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
90
- readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Number]>;
89
+ readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
90
+ readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
91
91
  }>;
92
92
  export declare const layer: Layer.Layer<Service, never, SqlClient>;
93
93
  export declare const memoryLayer: Layer.Layer<Service, never, never>;
@@ -95,8 +95,8 @@ export declare const testLayer: (implementation: Interface) => Layer.Layer<Servi
95
95
  export declare const create: (input: CreateScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleRepositoryError, Service>;
96
96
  export declare const get: (id: string & import("effect/Brand").Brand<"Relay.ScheduleId">) => Effect.Effect<Schedule.ScheduleRecord | undefined, ScheduleRepositoryError, Service>;
97
97
  export declare const list: (input: ListSchedulesInput) => Effect.Effect<readonly Schedule.ScheduleRecord[], ScheduleRepositoryError, Service>;
98
- export declare const cancel: (input: CancelScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleRepositoryError | ScheduleNotFound, Service>;
98
+ export declare const cancel: (input: CancelScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleNotFound | ScheduleRepositoryError, Service>;
99
99
  export declare const claimDue: (input: ClaimDueInput) => Effect.Effect<Schedule.ScheduleRecord | undefined, ScheduleRepositoryError, Service>;
100
- export declare const ack: (input: AckScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleRepositoryError | ScheduleNotFound | ScheduleClaimMismatch, Service>;
101
- export declare const release: (input: ReleaseScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleRepositoryError | ScheduleNotFound | ScheduleClaimMismatch, Service>;
100
+ export declare const ack: (input: AckScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleClaimMismatch | ScheduleNotFound | ScheduleRepositoryError, Service>;
101
+ export declare const release: (input: ReleaseScheduleInput) => Effect.Effect<Schedule.ScheduleRecord, ScheduleClaimMismatch | ScheduleNotFound | ScheduleRepositoryError, Service>;
102
102
  export {};