@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.
- package/dist/ai.js +2 -2
- package/dist/{index-z9xk02sv.js → index-c2skef55.js} +1898 -1556
- package/dist/{index-d8q4kfjy.js → index-d3dme13d.js} +12 -8
- package/dist/{index-xbbfagnb.js → index-pn652eef.js} +166 -105
- package/dist/{index-gxskhyra.js → index-vwbatywf.js} +8 -8
- package/dist/index.js +5 -5
- package/dist/mysql.js +24 -9
- package/dist/postgres.js +18 -13
- package/dist/sqlite.js +26 -29
- package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +2 -2
- package/dist/types/relay/adapter-outbox.d.ts +1 -1
- package/dist/types/relay/client.d.ts +32 -30
- package/dist/types/relay/command.d.ts +10 -4
- package/dist/types/relay/database.d.ts +4 -4
- package/dist/types/relay/migration-errors.d.ts +8 -2
- package/dist/types/relay/mysql.d.ts +2 -2
- package/dist/types/relay/operation.d.ts +211 -126
- package/dist/types/relay/postgres.d.ts +2 -2
- package/dist/types/relay/runtime-capability-policy.d.ts +11 -5
- package/dist/types/relay/runtime-database.d.ts +1 -1
- package/dist/types/relay/runtime.d.ts +4 -4
- package/dist/types/relay/sqlite-migrations.d.ts +1 -1
- package/dist/types/relay/sqlite-runtime.d.ts +10 -5
- package/dist/types/relay/tool-worker.d.ts +6 -5
- package/dist/types/runtime/address/address-book-service.d.ts +3 -3
- package/dist/types/runtime/address/address-resolution-service.d.ts +41 -41
- package/dist/types/runtime/agent/agent-loop-service.d.ts +14 -5
- package/dist/types/runtime/agent/agent-registry-service.d.ts +2 -2
- package/dist/types/runtime/agent/prompt-assembler-service.d.ts +1 -1
- package/dist/types/runtime/agent/relay-tool-output.d.ts +4 -1
- package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +1 -1
- package/dist/types/runtime/child/child-fan-out-runtime.d.ts +12 -8
- package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +1 -1
- package/dist/types/runtime/child/child-run-service.d.ts +7 -4
- package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -2
- package/dist/types/runtime/child/spawn-child-run-tool.d.ts +5 -4
- package/dist/types/runtime/cluster/execution-entity.d.ts +2 -2
- package/dist/types/runtime/content/artifact-store-service.d.ts +2 -2
- package/dist/types/runtime/content/blob-store-service.d.ts +1 -1
- package/dist/types/runtime/entity/entity-instance-service.d.ts +14 -5
- package/dist/types/runtime/entity/entity-registry-service.d.ts +2 -2
- package/dist/types/runtime/envelope/envelope-service.d.ts +2 -2
- package/dist/types/runtime/execution/active-execution-registry.d.ts +1 -1
- package/dist/types/runtime/execution/event-log-service.d.ts +28 -3
- package/dist/types/runtime/execution/execution-service.d.ts +1 -1
- package/dist/types/runtime/execution/execution-watch-service.d.ts +1 -1
- package/dist/types/runtime/execution/session-stream-service.d.ts +1 -1
- package/dist/types/runtime/inbox/inbox-service.d.ts +1 -1
- package/dist/types/runtime/memory/memory-service.d.ts +1 -1
- package/dist/types/runtime/model/embedding-model-service.d.ts +23 -10
- package/dist/types/runtime/model/language-model-service.d.ts +19 -6
- package/dist/types/runtime/model/model-call-policy.d.ts +1 -1
- package/dist/types/runtime/observability/runtime-metrics.d.ts +12 -3
- package/dist/types/runtime/presence/presence-service.d.ts +1 -1
- package/dist/types/runtime/presence/presence-tool.d.ts +1 -1
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +19 -19
- package/dist/types/runtime/schedule/scheduler-service.d.ts +3 -3
- package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +2 -2
- package/dist/types/runtime/session/session-store-service.d.ts +13 -4
- package/dist/types/runtime/skill/skill-registry-service.d.ts +2 -2
- package/dist/types/runtime/state/execution-state-service.d.ts +5 -2
- package/dist/types/runtime/tool/tool-runtime-service.d.ts +42 -19
- package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +2 -2
- package/dist/types/runtime/topic/topic-service.d.ts +1 -1
- package/dist/types/runtime/wait/wait-service.d.ts +1 -1
- package/dist/types/runtime/wait/wait-signal.d.ts +12 -3
- package/dist/types/runtime/workflow/activity-version-registry.d.ts +7 -3
- package/dist/types/runtime/workflow/definition-runtime.d.ts +37 -22
- package/dist/types/runtime/workflow/execution-workflow.d.ts +105 -110
- package/dist/types/runtime/workspace/workspace-planner-service.d.ts +6 -6
- package/dist/types/runtime/workspace/workspace-provider-service.d.ts +11 -7
- package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +1 -1
- package/dist/types/schema/agent-schema.d.ts +246 -246
- package/dist/types/schema/child-orchestration-schema.d.ts +64 -64
- package/dist/types/schema/execution-schema.d.ts +57 -57
- package/dist/types/schema/workflow-schema.d.ts +243 -243
- package/dist/types/schema/workspace-schema.d.ts +1 -1
- package/dist/types/store-sql/address/address-book-repository.d.ts +5 -5
- package/dist/types/store-sql/agent/agent-definition-repository.d.ts +7 -7
- package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
- package/dist/types/store-sql/child/child-execution-repository.d.ts +4 -4
- package/dist/types/store-sql/child/child-fan-out-repository.d.ts +2 -2
- package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +5 -5
- package/dist/types/store-sql/compaction/compaction-repository.d.ts +3 -3
- package/dist/types/store-sql/database/database-service.d.ts +3 -3
- package/dist/types/store-sql/database/notification-bus.d.ts +1 -1
- package/dist/types/store-sql/database/sql-dialect.d.ts +4 -1
- package/dist/types/store-sql/entity/entity-repository.d.ts +2 -2
- package/dist/types/store-sql/envelope/envelope-repository.d.ts +13 -13
- package/dist/types/store-sql/execution/execution-event-repository.d.ts +27 -5
- package/dist/types/store-sql/execution/execution-repository.d.ts +8 -8
- package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +5 -5
- package/dist/types/store-sql/inbox/inbox-repository.d.ts +1 -1
- package/dist/types/store-sql/memory/memory-repository.d.ts +3 -3
- package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
- package/dist/types/store-sql/presence/presence-repository.d.ts +2 -2
- package/dist/types/store-sql/schedule/schedule-repository.d.ts +9 -9
- package/dist/types/store-sql/schema/relay-schema.d.ts +257 -257
- package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
- package/dist/types/store-sql/session/session-repository.d.ts +5 -5
- package/dist/types/store-sql/skill/skill-definition-repository.d.ts +9 -9
- package/dist/types/store-sql/state/execution-state-repository.d.ts +2 -2
- package/dist/types/store-sql/steering/steering-repository.d.ts +5 -5
- package/dist/types/store-sql/tenant/tenant-id.d.ts +2 -2
- package/dist/types/store-sql/tool/tool-call-repository.d.ts +19 -16
- package/dist/types/store-sql/topic/topic-repository.d.ts +1 -1
- package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +16 -14
- package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +11 -11
- 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.
|
|
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/
|
|
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.
|
|
49
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
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/
|
|
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.
|
|
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.
|
|
50
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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.
|
|
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.
|
|
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/
|
|
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.
|
|
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/
|
|
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.
|
|
62
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
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/
|
|
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,
|
|
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/
|
|
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.
|
|
24
|
-
readonly last_heartbeat: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
25
|
-
readonly owned_shards: Schema.Union<readonly [Schema.
|
|
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/
|
|
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.
|
|
37
|
-
readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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/
|
|
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
|
|
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,
|
|
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/
|
|
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:
|
|
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/
|
|
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/
|
|
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.
|
|
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.
|
|
171
|
-
readonly resolved_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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.
|
|
180
|
-
readonly attempt: Schema.
|
|
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.
|
|
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.
|
|
187
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
188
|
-
readonly claimed_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
189
|
-
readonly acknowledged_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
202
|
-
export declare const ackReady: (input: AckReadyInput) => Effect.Effect<EnvelopeReadyRecord,
|
|
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/
|
|
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.
|
|
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.
|
|
111
|
+
readonly created_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.Finite]>;
|
|
92
112
|
}>;
|
|
93
|
-
export declare const layer: Layer.Layer<Service, never,
|
|
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
|
-
|
|
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/
|
|
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.
|
|
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.
|
|
98
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
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,
|
|
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,
|
|
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/
|
|
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.
|
|
44
|
-
readonly expires_at: Schema.NullishOr<Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
50
|
-
export declare const transaction: <A, R>(effect: Effect.Effect<A, IdempotencyRepositoryError, R>) => Effect.Effect<A, IdempotencyRepositoryError,
|
|
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/
|
|
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/
|
|
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.
|
|
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.
|
|
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/
|
|
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.
|
|
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/
|
|
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,
|
|
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/
|
|
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.
|
|
83
|
-
readonly attempt: Schema.Union<readonly [Schema.
|
|
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.
|
|
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.
|
|
90
|
-
readonly updated_at: Schema.Union<readonly [Schema.Date, Schema.String, Schema.
|
|
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,
|
|
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,
|
|
101
|
-
export declare const release: (input: ReleaseScheduleInput) => Effect.Effect<Schedule.ScheduleRecord,
|
|
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 {};
|