@relayfx/sdk 0.2.14 → 0.2.16
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-9q3yh32k.js → index-5x686v8w.js} +1815 -1543
- package/dist/{index-15f2ewt8.js → index-6dv1dqq1.js} +8 -8
- package/dist/{index-gb7d1wfm.js → index-a6vwwhcp.js} +116 -105
- package/dist/{index-qg0hy7s1.js → index-per7tyzq.js} +12 -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 +28 -28
- 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 +173 -123
- 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 +60 -38
- 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-compaction.d.ts +3 -2
- 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 +12 -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 +5 -2
- 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 +20 -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 +143 -104
- 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 +388 -228
- package/dist/types/schema/child-orchestration-schema.d.ts +78 -57
- package/dist/types/schema/execution-schema.d.ts +118 -54
- 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 +4 -4
- 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
|
@@ -68,83 +68,105 @@ export declare const StartExecutionInput: Schema.Struct<{
|
|
|
68
68
|
readonly agent_revision: Schema.optionalKey<Schema.Int>;
|
|
69
69
|
readonly agent_snapshot: Schema.optionalKey<Schema.Codec<Agent.Definition, {
|
|
70
70
|
readonly name: string;
|
|
71
|
-
readonly
|
|
72
|
-
readonly name: string;
|
|
73
|
-
readonly value: Schema.Json;
|
|
74
|
-
readonly metadata?: {
|
|
75
|
-
readonly [x: string]: Schema.Json;
|
|
76
|
-
};
|
|
77
|
-
}[];
|
|
71
|
+
readonly instructions?: string;
|
|
78
72
|
readonly model: {
|
|
79
73
|
readonly provider: string;
|
|
80
74
|
readonly model: string;
|
|
81
|
-
readonly metadata?: {
|
|
82
|
-
readonly [x: string]: Schema.Json;
|
|
83
|
-
};
|
|
84
75
|
readonly registration_key?: string;
|
|
85
76
|
readonly request_options?: {
|
|
86
77
|
readonly [x: string]: Schema.Json;
|
|
87
78
|
};
|
|
79
|
+
readonly metadata?: {
|
|
80
|
+
readonly [x: string]: Schema.Json;
|
|
81
|
+
};
|
|
88
82
|
};
|
|
89
83
|
readonly tool_names: readonly string[];
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
readonly keep_recent_tokens: Schema.Number;
|
|
98
|
-
}, "Encoded">;
|
|
99
|
-
readonly output_schema_ref?: string;
|
|
84
|
+
readonly permissions: readonly {
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly value: Schema.Json;
|
|
87
|
+
readonly metadata?: {
|
|
88
|
+
readonly [x: string]: Schema.Json;
|
|
89
|
+
};
|
|
90
|
+
}[];
|
|
100
91
|
readonly skill_definition_ids?: readonly string[];
|
|
101
92
|
readonly permission_rules?: {
|
|
102
93
|
readonly rules: readonly {
|
|
103
94
|
readonly pattern: string;
|
|
104
|
-
readonly level: "allow" | "
|
|
95
|
+
readonly level: "allow" | "ask" | "deny";
|
|
105
96
|
readonly reason?: string;
|
|
106
97
|
}[];
|
|
107
|
-
readonly fallback?: "allow" | "
|
|
98
|
+
readonly fallback?: "allow" | "ask" | "deny";
|
|
108
99
|
};
|
|
109
100
|
readonly turn_policy?: Agent.TurnPolicySnapshot;
|
|
101
|
+
readonly compaction_policy?: {
|
|
102
|
+
readonly context_window: number;
|
|
103
|
+
readonly reserve_tokens: number;
|
|
104
|
+
readonly keep_recent_tokens: number;
|
|
105
|
+
readonly summary_model?: {
|
|
106
|
+
readonly provider: string;
|
|
107
|
+
readonly model: string;
|
|
108
|
+
readonly registration_key?: string;
|
|
109
|
+
readonly request_options?: {
|
|
110
|
+
readonly [x: string]: Schema.Json;
|
|
111
|
+
};
|
|
112
|
+
readonly metadata?: {
|
|
113
|
+
readonly [x: string]: Schema.Json;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
110
117
|
readonly max_tool_turns?: number;
|
|
111
118
|
readonly max_wait_turns?: number;
|
|
112
119
|
readonly token_budget?: number;
|
|
113
120
|
readonly child_run_presets?: {
|
|
114
121
|
readonly [x: string]: {
|
|
115
|
-
readonly
|
|
116
|
-
readonly [x: string]: Schema.Json;
|
|
117
|
-
};
|
|
118
|
-
readonly permissions?: readonly string[];
|
|
122
|
+
readonly instructions?: string;
|
|
119
123
|
readonly model?: {
|
|
120
124
|
readonly provider: string;
|
|
121
125
|
readonly model: string;
|
|
122
|
-
readonly metadata?: {
|
|
123
|
-
readonly [x: string]: Schema.Json;
|
|
124
|
-
};
|
|
125
126
|
readonly registration_key?: string;
|
|
126
127
|
readonly request_options?: {
|
|
127
128
|
readonly [x: string]: Schema.Json;
|
|
128
129
|
};
|
|
130
|
+
readonly metadata?: {
|
|
131
|
+
readonly [x: string]: Schema.Json;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly compaction_policy?: {
|
|
135
|
+
readonly context_window: number;
|
|
136
|
+
readonly reserve_tokens: number;
|
|
137
|
+
readonly keep_recent_tokens: number;
|
|
138
|
+
readonly summary_model?: {
|
|
139
|
+
readonly provider: string;
|
|
140
|
+
readonly model: string;
|
|
141
|
+
readonly registration_key?: string;
|
|
142
|
+
readonly request_options?: {
|
|
143
|
+
readonly [x: string]: Schema.Json;
|
|
144
|
+
};
|
|
145
|
+
readonly metadata?: {
|
|
146
|
+
readonly [x: string]: Schema.Json;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
129
149
|
};
|
|
130
|
-
readonly instructions?: string;
|
|
131
|
-
readonly compaction_policy?: Schema.Struct.ReadonlySide<{
|
|
132
|
-
readonly context_window: Schema.Number;
|
|
133
|
-
readonly reserve_tokens: Schema.Number;
|
|
134
|
-
readonly keep_recent_tokens: Schema.Number;
|
|
135
|
-
}, "Encoded">;
|
|
136
150
|
readonly tool_names?: readonly string[];
|
|
151
|
+
readonly permissions?: readonly string[];
|
|
137
152
|
readonly workspace_policy?: {
|
|
138
|
-
readonly mode: "
|
|
153
|
+
readonly mode: "fork" | "share";
|
|
139
154
|
readonly fallback?: "fail" | "fresh";
|
|
140
155
|
};
|
|
141
156
|
readonly output_schema_ref?: string;
|
|
157
|
+
readonly metadata?: {
|
|
158
|
+
readonly [x: string]: Schema.Json;
|
|
159
|
+
};
|
|
142
160
|
};
|
|
143
161
|
};
|
|
144
162
|
readonly handoff_targets?: readonly Schema.Struct.ReadonlySide<{
|
|
145
163
|
readonly name: Schema.String;
|
|
146
164
|
readonly preset_name: Schema.String;
|
|
147
165
|
}, "Encoded">[];
|
|
166
|
+
readonly output_schema_ref?: string;
|
|
167
|
+
readonly metadata?: {
|
|
168
|
+
readonly [x: string]: Schema.Json;
|
|
169
|
+
};
|
|
148
170
|
}, never, never>>;
|
|
149
171
|
readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
150
172
|
readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
@@ -1085,9 +1107,16 @@ export declare const SpawnChildRunInput: Schema.Struct<{
|
|
|
1085
1107
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1086
1108
|
}>>;
|
|
1087
1109
|
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
1088
|
-
readonly context_window: Schema.
|
|
1089
|
-
readonly reserve_tokens: Schema.
|
|
1090
|
-
readonly keep_recent_tokens: Schema.
|
|
1110
|
+
readonly context_window: Schema.Finite;
|
|
1111
|
+
readonly reserve_tokens: Schema.Finite;
|
|
1112
|
+
readonly keep_recent_tokens: Schema.Finite;
|
|
1113
|
+
readonly summary_model: Schema.optionalKey<Schema.Struct<{
|
|
1114
|
+
readonly provider: Schema.String;
|
|
1115
|
+
readonly model: Schema.String;
|
|
1116
|
+
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
1117
|
+
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1118
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1119
|
+
}>>;
|
|
1091
1120
|
}>>;
|
|
1092
1121
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1093
1122
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
@@ -1174,9 +1203,16 @@ export declare const CreateChildFanOutInput: Schema.Struct<{
|
|
|
1174
1203
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1175
1204
|
}>>;
|
|
1176
1205
|
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
1177
|
-
readonly context_window: Schema.
|
|
1178
|
-
readonly reserve_tokens: Schema.
|
|
1179
|
-
readonly keep_recent_tokens: Schema.
|
|
1206
|
+
readonly context_window: Schema.Finite;
|
|
1207
|
+
readonly reserve_tokens: Schema.Finite;
|
|
1208
|
+
readonly keep_recent_tokens: Schema.Finite;
|
|
1209
|
+
readonly summary_model: Schema.optionalKey<Schema.Struct<{
|
|
1210
|
+
readonly provider: Schema.String;
|
|
1211
|
+
readonly model: Schema.String;
|
|
1212
|
+
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
1213
|
+
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1214
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1215
|
+
}>>;
|
|
1180
1216
|
}>>;
|
|
1181
1217
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1182
1218
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
@@ -1258,68 +1294,6 @@ export interface CancelChildFanOutInput extends Schema.Schema.Type<typeof Cancel
|
|
|
1258
1294
|
}
|
|
1259
1295
|
export declare const CancelChildFanOutResult: Schema.Struct<{
|
|
1260
1296
|
readonly fan_out: Schema.Struct<{
|
|
1261
|
-
readonly state: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
|
|
1262
|
-
readonly members: Schema.$Array<Schema.Struct<{
|
|
1263
|
-
readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
1264
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
1265
|
-
};
|
|
1266
|
-
readonly ordinal: Schema.Int;
|
|
1267
|
-
readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
1268
|
-
readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1269
|
-
readonly type: Schema.Literal<"text">;
|
|
1270
|
-
readonly text: Schema.String;
|
|
1271
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1272
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1273
|
-
}>, Schema.Struct<{
|
|
1274
|
-
readonly type: Schema.Literal<"structured">;
|
|
1275
|
-
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1276
|
-
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
1277
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1278
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1279
|
-
}>, Schema.Struct<{
|
|
1280
|
-
readonly type: Schema.Literal<"blob-reference">;
|
|
1281
|
-
readonly uri: Schema.String;
|
|
1282
|
-
readonly media_type: Schema.String;
|
|
1283
|
-
readonly filename: Schema.optionalKey<Schema.String>;
|
|
1284
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1285
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1286
|
-
}>, Schema.Struct<{
|
|
1287
|
-
readonly type: Schema.Literal<"artifact-reference">;
|
|
1288
|
-
readonly artifact_id: Schema.String;
|
|
1289
|
-
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
1290
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1291
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1292
|
-
}>, Schema.Struct<{
|
|
1293
|
-
readonly type: Schema.Literal<"tool-call">;
|
|
1294
|
-
readonly call: Schema.Struct<{
|
|
1295
|
-
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
1296
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
1297
|
-
};
|
|
1298
|
-
readonly name: Schema.String;
|
|
1299
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1300
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1301
|
-
}>;
|
|
1302
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1303
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1304
|
-
}>, Schema.Struct<{
|
|
1305
|
-
readonly type: Schema.Literal<"tool-result">;
|
|
1306
|
-
readonly result: Schema.Struct<{
|
|
1307
|
-
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
1308
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
1309
|
-
};
|
|
1310
|
-
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1311
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
1312
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1313
|
-
}>;
|
|
1314
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1315
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1316
|
-
}>]>>>;
|
|
1317
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
1318
|
-
readonly completed_at: Schema.optionalKey<Schema.Int>;
|
|
1319
|
-
}>>;
|
|
1320
|
-
readonly satisfied_at: Schema.optionalKey<Schema.Int>;
|
|
1321
|
-
readonly failed_at: Schema.optionalKey<Schema.Int>;
|
|
1322
|
-
readonly cancelled_at: Schema.optionalKey<Schema.Int>;
|
|
1323
1297
|
readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
1324
1298
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
1325
1299
|
};
|
|
@@ -1343,9 +1317,16 @@ export declare const CancelChildFanOutResult: Schema.Struct<{
|
|
|
1343
1317
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1344
1318
|
}>>;
|
|
1345
1319
|
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
1346
|
-
readonly context_window: Schema.
|
|
1347
|
-
readonly reserve_tokens: Schema.
|
|
1348
|
-
readonly keep_recent_tokens: Schema.
|
|
1320
|
+
readonly context_window: Schema.Finite;
|
|
1321
|
+
readonly reserve_tokens: Schema.Finite;
|
|
1322
|
+
readonly keep_recent_tokens: Schema.Finite;
|
|
1323
|
+
readonly summary_model: Schema.optionalKey<Schema.Struct<{
|
|
1324
|
+
readonly provider: Schema.String;
|
|
1325
|
+
readonly model: Schema.String;
|
|
1326
|
+
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
1327
|
+
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1328
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1329
|
+
}>>;
|
|
1349
1330
|
}>>;
|
|
1350
1331
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1351
1332
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
@@ -1413,19 +1394,6 @@ export declare const CancelChildFanOutResult: Schema.Struct<{
|
|
|
1413
1394
|
}>, Schema.TaggedStruct<"best-effort", {}>]>;
|
|
1414
1395
|
readonly created_at: Schema.Int;
|
|
1415
1396
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1416
|
-
}>;
|
|
1417
|
-
}>;
|
|
1418
|
-
export interface CancelChildFanOutResult extends Schema.Schema.Type<typeof CancelChildFanOutResult> {
|
|
1419
|
-
}
|
|
1420
|
-
export declare const InspectChildFanOutInput: Schema.Struct<{
|
|
1421
|
-
readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
1422
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
1423
|
-
};
|
|
1424
|
-
}>;
|
|
1425
|
-
export interface InspectChildFanOutInput extends Schema.Schema.Type<typeof InspectChildFanOutInput> {
|
|
1426
|
-
}
|
|
1427
|
-
export declare const InspectChildFanOutResult: Schema.Struct<{
|
|
1428
|
-
readonly fan_out: Schema.NullOr<Schema.Struct<{
|
|
1429
1397
|
readonly state: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
|
|
1430
1398
|
readonly members: Schema.$Array<Schema.Struct<{
|
|
1431
1399
|
readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
@@ -1488,6 +1456,19 @@ export declare const InspectChildFanOutResult: Schema.Struct<{
|
|
|
1488
1456
|
readonly satisfied_at: Schema.optionalKey<Schema.Int>;
|
|
1489
1457
|
readonly failed_at: Schema.optionalKey<Schema.Int>;
|
|
1490
1458
|
readonly cancelled_at: Schema.optionalKey<Schema.Int>;
|
|
1459
|
+
}>;
|
|
1460
|
+
}>;
|
|
1461
|
+
export interface CancelChildFanOutResult extends Schema.Schema.Type<typeof CancelChildFanOutResult> {
|
|
1462
|
+
}
|
|
1463
|
+
export declare const InspectChildFanOutInput: Schema.Struct<{
|
|
1464
|
+
readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
1465
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
1466
|
+
};
|
|
1467
|
+
}>;
|
|
1468
|
+
export interface InspectChildFanOutInput extends Schema.Schema.Type<typeof InspectChildFanOutInput> {
|
|
1469
|
+
}
|
|
1470
|
+
export declare const InspectChildFanOutResult: Schema.Struct<{
|
|
1471
|
+
readonly fan_out: Schema.NullOr<Schema.Struct<{
|
|
1491
1472
|
readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
1492
1473
|
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
1493
1474
|
};
|
|
@@ -1511,9 +1492,16 @@ export declare const InspectChildFanOutResult: Schema.Struct<{
|
|
|
1511
1492
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1512
1493
|
}>>;
|
|
1513
1494
|
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
1514
|
-
readonly context_window: Schema.
|
|
1515
|
-
readonly reserve_tokens: Schema.
|
|
1516
|
-
readonly keep_recent_tokens: Schema.
|
|
1495
|
+
readonly context_window: Schema.Finite;
|
|
1496
|
+
readonly reserve_tokens: Schema.Finite;
|
|
1497
|
+
readonly keep_recent_tokens: Schema.Finite;
|
|
1498
|
+
readonly summary_model: Schema.optionalKey<Schema.Struct<{
|
|
1499
|
+
readonly provider: Schema.String;
|
|
1500
|
+
readonly model: Schema.String;
|
|
1501
|
+
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
1502
|
+
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1503
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1504
|
+
}>>;
|
|
1517
1505
|
}>>;
|
|
1518
1506
|
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1519
1507
|
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
@@ -1581,6 +1569,68 @@ export declare const InspectChildFanOutResult: Schema.Struct<{
|
|
|
1581
1569
|
}>, Schema.TaggedStruct<"best-effort", {}>]>;
|
|
1582
1570
|
readonly created_at: Schema.Int;
|
|
1583
1571
|
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1572
|
+
readonly state: Schema.Literals<readonly ["joining", "satisfied", "failed", "cancelled"]>;
|
|
1573
|
+
readonly members: Schema.$Array<Schema.Struct<{
|
|
1574
|
+
readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
1575
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
1576
|
+
};
|
|
1577
|
+
readonly ordinal: Schema.Int;
|
|
1578
|
+
readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
1579
|
+
readonly output: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1580
|
+
readonly type: Schema.Literal<"text">;
|
|
1581
|
+
readonly text: Schema.String;
|
|
1582
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1583
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1584
|
+
}>, Schema.Struct<{
|
|
1585
|
+
readonly type: Schema.Literal<"structured">;
|
|
1586
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1587
|
+
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
1588
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1589
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1590
|
+
}>, Schema.Struct<{
|
|
1591
|
+
readonly type: Schema.Literal<"blob-reference">;
|
|
1592
|
+
readonly uri: Schema.String;
|
|
1593
|
+
readonly media_type: Schema.String;
|
|
1594
|
+
readonly filename: Schema.optionalKey<Schema.String>;
|
|
1595
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1596
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1597
|
+
}>, Schema.Struct<{
|
|
1598
|
+
readonly type: Schema.Literal<"artifact-reference">;
|
|
1599
|
+
readonly artifact_id: Schema.String;
|
|
1600
|
+
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
1601
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1602
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1603
|
+
}>, Schema.Struct<{
|
|
1604
|
+
readonly type: Schema.Literal<"tool-call">;
|
|
1605
|
+
readonly call: Schema.Struct<{
|
|
1606
|
+
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
1607
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
1608
|
+
};
|
|
1609
|
+
readonly name: Schema.String;
|
|
1610
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1611
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1612
|
+
}>;
|
|
1613
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1614
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1615
|
+
}>, Schema.Struct<{
|
|
1616
|
+
readonly type: Schema.Literal<"tool-result">;
|
|
1617
|
+
readonly result: Schema.Struct<{
|
|
1618
|
+
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
1619
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
1620
|
+
};
|
|
1621
|
+
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1622
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
1623
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1624
|
+
}>;
|
|
1625
|
+
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1626
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1627
|
+
}>]>>>;
|
|
1628
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
1629
|
+
readonly completed_at: Schema.optionalKey<Schema.Int>;
|
|
1630
|
+
}>>;
|
|
1631
|
+
readonly satisfied_at: Schema.optionalKey<Schema.Int>;
|
|
1632
|
+
readonly failed_at: Schema.optionalKey<Schema.Int>;
|
|
1633
|
+
readonly cancelled_at: Schema.optionalKey<Schema.Int>;
|
|
1584
1634
|
}>>;
|
|
1585
1635
|
}>;
|
|
1586
1636
|
export interface InspectChildFanOutResult extends Schema.Schema.Type<typeof InspectChildFanOutResult> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Effect,
|
|
1
|
+
import { Effect, Layer } from "effect";
|
|
2
2
|
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
3
|
-
import type
|
|
3
|
+
import { RuntimeMigrationError, type DatabaseIdentity, type DatabaseLayer, type RuntimeConfigurationError } from "./runtime";
|
|
4
4
|
export interface PostgresRuntimeDatabaseOptions<E, R> {
|
|
5
5
|
readonly clientLayer: Layer.Layer<SqlClient, E, R>;
|
|
6
6
|
readonly databaseIdentity: DatabaseIdentity;
|
|
@@ -9,11 +9,17 @@ export declare class RuntimeCapabilityUnavailable extends RuntimeCapabilityUnava
|
|
|
9
9
|
export interface Interface {
|
|
10
10
|
readonly admit: (capability: "fan-out" | "workflow-definition") => Effect.Effect<void, RuntimeCapabilityUnavailable>;
|
|
11
11
|
}
|
|
12
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/
|
|
12
|
+
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/runtime-capability-policy/Service", Interface>;
|
|
13
13
|
export declare class Service extends Service_base {
|
|
14
14
|
}
|
|
15
|
-
export declare const layer:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
export declare const layer: {
|
|
16
|
+
(capabilities: {
|
|
17
|
+
readonly fanOut: boolean;
|
|
18
|
+
readonly workflowDefinition: boolean;
|
|
19
|
+
}): (role: "embedded" | "runner" | "client") => Layer.Layer<Service>;
|
|
20
|
+
(role: "embedded" | "runner" | "client", capabilities: {
|
|
21
|
+
readonly fanOut: boolean;
|
|
22
|
+
readonly workflowDefinition: boolean;
|
|
23
|
+
}): Layer.Layer<Service>;
|
|
24
|
+
};
|
|
19
25
|
export {};
|
|
@@ -16,6 +16,6 @@ export type Interface = {
|
|
|
16
16
|
readonly notification: "pg-listen-notify" | "polling";
|
|
17
17
|
readonly verifySchema: Effect.Effect<void, RuntimeMigrationError>;
|
|
18
18
|
};
|
|
19
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/
|
|
19
|
+
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/runtime-database/Service", Interface>;
|
|
20
20
|
export declare class Service extends Service_base {
|
|
21
21
|
}
|
|
@@ -9,7 +9,7 @@ export { RuntimeCapabilityUnavailable } from "./runtime-capability-policy";
|
|
|
9
9
|
export * as RuntimeDatabase from "./runtime-database";
|
|
10
10
|
export declare const DatabaseIdentity: Schema.brand<Schema.NonEmptyString, "@relayfx/sdk/DatabaseIdentity">;
|
|
11
11
|
export type DatabaseIdentity = typeof DatabaseIdentity.Type;
|
|
12
|
-
export declare const makeDatabaseIdentity: (input: unknown
|
|
12
|
+
export declare const makeDatabaseIdentity: (input: unknown) => DatabaseIdentity;
|
|
13
13
|
export declare const Dialect: Schema.Literals<readonly ["pg", "mysql", "sqlite"]>;
|
|
14
14
|
export type Dialect = typeof Dialect.Type;
|
|
15
15
|
export declare const DatabaseDialect: unique symbol;
|
|
@@ -144,7 +144,7 @@ export interface ReadinessStatus {
|
|
|
144
144
|
export interface Interface {
|
|
145
145
|
readonly readiness: Effect.Effect<ReadinessStatus, RuntimeReadinessError>;
|
|
146
146
|
}
|
|
147
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/
|
|
147
|
+
declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/runtime/Service", Interface>;
|
|
148
148
|
export declare class Service extends Service_base {
|
|
149
149
|
}
|
|
150
150
|
export interface ClusterHttpOptions {
|
|
@@ -189,9 +189,9 @@ export interface ClientOptions<DBE, DBR> {
|
|
|
189
189
|
export type EmbeddedOutput = Service | ClientService;
|
|
190
190
|
export type RunnerOutput = Service | ClientService;
|
|
191
191
|
export type ClientOutput = Service | ClientService;
|
|
192
|
-
export declare
|
|
192
|
+
export declare function layerEmbedded<D extends Dialect, DBE, DBR, HostE, HostR, ChildE = never, ChildR = never, WorkflowE = never, WorkflowR = never, ToolE = never, ToolR = never>(options: EmbeddedHostOptions<HostE, HostR, ChildE, ChildR, WorkflowE, WorkflowR, ToolE, ToolR> & {
|
|
193
193
|
readonly databaseLayer: DatabaseLayer<D, DBE, DBR>;
|
|
194
|
-
})
|
|
194
|
+
}): Layer.Layer<EmbeddedOutput, AcquisitionError, DBR | HostR | ToolR | Exclude<ChildR, RunnerRuntime.Service | ClientRuntimeRequirements> | Exclude<WorkflowR, RunnerRuntime.Service | ChildFanOutRuntime.Service | ClientRuntimeRequirements>>;
|
|
195
195
|
export declare const layerRunner: <DBE, DBR, HostE, HostR, ToolE, ToolR>(options: Omit<RunnerOptions<DBE, DBR, HostE, HostR>, "toolRuntimeLayer"> & {
|
|
196
196
|
readonly toolRuntimeLayer: Layer.Layer<ToolRuntime.Service, ToolE, ToolR>;
|
|
197
197
|
}) => Layer.Layer<RunnerOutput, AcquisitionError, DBR | HostR | ToolR | HttpServer>;
|
|
@@ -51,4 +51,4 @@ export declare const migrations: readonly [{
|
|
|
51
51
|
readonly file: "0010_workflow_runtime.sql";
|
|
52
52
|
readonly source: string;
|
|
53
53
|
}];
|
|
54
|
-
export declare const loader: Effect.Effect<(readonly [1 | 2 |
|
|
54
|
+
export declare const loader: Effect.Effect<(readonly [1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, "baseline" | "child_fan_out" | "durable_entities" | "durable_inbox" | "durable_tool_placement" | "ephemeral_presence" | "execution_state" | "topic_subscriptions" | "workflow_definitions" | "workflow_runtime", Effect.Effect<Effect.Effect<void, import("effect/unstable/sql/SqlError").SqlError, SqlClient>, never, never>])[], never, never>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type SqliteClientConfig } from "@effect/sql-sqlite-bun/SqliteClient";
|
|
2
2
|
import { ChildFanOutRuntime, WorkflowDefinitionRuntime } from "../runtime/index";
|
|
3
|
-
import { WorkflowDefinitionRepository } from "../store-sql/portable";
|
|
4
3
|
import { Layer } from "effect";
|
|
5
4
|
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
6
5
|
import { RuntimeConfigurationError, RuntimeMigrationError, RuntimeTopologyError, type DatabaseLayer } from "./runtime";
|
|
@@ -13,7 +12,13 @@ export interface SQLiteRuntimeDatabaseOptions {
|
|
|
13
12
|
readonly transformQueryNames?: (name: string) => string;
|
|
14
13
|
}
|
|
15
14
|
export declare const runtimeDatabaseLayer: (options: SQLiteRuntimeDatabaseOptions) => DatabaseLayer<"sqlite", RuntimeConfigurationError | RuntimeTopologyError | RuntimeMigrationError>;
|
|
16
|
-
export declare const migrationsLayer: Layer.Layer<never, import("effect/
|
|
17
|
-
export declare const layer: (options: SqliteClientConfig) => Layer.Layer<SqlClient, import("effect/
|
|
18
|
-
export declare const workflowLayer:
|
|
19
|
-
|
|
15
|
+
export declare const migrationsLayer: Layer.Layer<never, import("@effect/sql-sqlite-bun/SqliteMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, SqlClient>;
|
|
16
|
+
export declare const layer: (options: SqliteClientConfig) => Layer.Layer<SqlClient, import("@effect/sql-sqlite-bun/SqliteMigrator").MigrationError | import("effect/unstable/sql/SqlError").SqlError, never>;
|
|
17
|
+
export declare const workflowLayer: {
|
|
18
|
+
<E, R>(handlersLayer: Layer.Layer<WorkflowDefinitionRuntime.HandlerService, E, R>): (options: SqliteClientConfig) => ReturnType<typeof workflowLayer<E, R>>;
|
|
19
|
+
<E, R>(options: SqliteClientConfig, handlersLayer: Layer.Layer<WorkflowDefinitionRuntime.HandlerService, E, R>): Layer.Layer<WorkflowDefinitionRuntime.Service, unknown, R>;
|
|
20
|
+
};
|
|
21
|
+
export declare const childFanOutLayer: {
|
|
22
|
+
<E, R>(handlersLayer: Layer.Layer<ChildFanOutRuntime.HandlerService, E, R>): (options: SqliteClientConfig) => Layer.Layer<ChildFanOutRuntime.Service, unknown, R>;
|
|
23
|
+
<E, R>(options: SqliteClientConfig, handlersLayer: Layer.Layer<ChildFanOutRuntime.HandlerService, E, R>): Layer.Layer<ChildFanOutRuntime.Service, unknown, R>;
|
|
24
|
+
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { Shared, Tool } from "../schema/index";
|
|
2
2
|
import { Duration, Effect } from "effect";
|
|
3
|
+
import { Service as ClientService } from "./client";
|
|
3
4
|
import type { ClientError } from "./client";
|
|
4
5
|
import type { ToolWorkLease } from "./operation";
|
|
5
6
|
export interface HandlerContext {
|
|
6
7
|
readonly lease: ToolWorkLease;
|
|
7
8
|
readonly idempotencyKey: string;
|
|
8
9
|
}
|
|
9
|
-
export type Handler = (input: Shared.JsonValue, context: HandlerContext) => Effect.Effect<Shared.JsonValue,
|
|
10
|
-
export interface Options {
|
|
10
|
+
export type Handler<E = Error, R = never> = (input: Shared.JsonValue, context: HandlerContext) => Effect.Effect<Shared.JsonValue, E, R>;
|
|
11
|
+
export interface Options<E = Error, R = never> {
|
|
11
12
|
readonly queue: Tool.PlacementKey;
|
|
12
13
|
readonly workerId: Tool.WorkerId;
|
|
13
14
|
readonly leaseDuration: Duration.Input;
|
|
14
15
|
readonly pollInterval?: Duration.Input | undefined;
|
|
15
|
-
readonly handlers: Readonly<Record<string, Handler
|
|
16
|
+
readonly handlers: Readonly<Record<string, Handler<E, R>>>;
|
|
16
17
|
}
|
|
17
|
-
export declare const runOnce: (options: Options) => Effect.Effect<boolean, ClientError,
|
|
18
|
-
export declare const run: (options: Options) => Effect.Effect<never, ClientError,
|
|
18
|
+
export declare const runOnce: <E, R>(options: Options<E, R>) => Effect.Effect<boolean, ClientError, R | ClientService>;
|
|
19
|
+
export declare const run: <E, R>(options: Options<E, R>) => Effect.Effect<never, ClientError, R | ClientService>;
|
|
19
20
|
export type Error = ClientError;
|
|
@@ -59,15 +59,15 @@ export interface Interface {
|
|
|
59
59
|
readonly resolve: (addressId: Ids.AddressId) => Effect.Effect<Route, AddressNotFound | AddressUnavailable | AddressDeferred | AddressBookServiceError>;
|
|
60
60
|
readonly register: (addressId: Ids.AddressId, route: Route) => Effect.Effect<Address.RouteRegistered, AddressBookServiceError>;
|
|
61
61
|
readonly get: (addressId: Ids.AddressId) => Effect.Effect<RouteRecord | undefined, AddressBookServiceError>;
|
|
62
|
-
readonly list:
|
|
62
|
+
readonly list: Effect.Effect<Address.RouteList, AddressBookServiceError>;
|
|
63
63
|
}
|
|
64
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/
|
|
64
|
+
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/address/address-book-service/Service", Interface>;
|
|
65
65
|
export declare class Service extends Service_base {
|
|
66
66
|
}
|
|
67
67
|
export declare const layerFromRepository: Layer.Layer<Service, never, AddressBookRepository.Service>;
|
|
68
68
|
export declare const memoryLayer: (entries?: Iterable<readonly [Ids.AddressId, Route]>) => Layer.Layer<Service, never, never>;
|
|
69
69
|
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
|
|
70
|
-
export declare const resolve: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Route,
|
|
70
|
+
export declare const resolve: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Route, AddressBookServiceError | AddressDeferred | AddressNotFound | AddressUnavailable, Service>;
|
|
71
71
|
export declare const register: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">, route: Route) => Effect.Effect<Address.RouteRegistered, AddressBookServiceError, Service>;
|
|
72
72
|
export declare const get: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<RouteRecord | undefined, AddressBookServiceError, Service>;
|
|
73
73
|
export declare const list: () => Effect.Effect<Address.RouteList, AddressBookServiceError, Service>;
|