@relayfx/sdk 0.1.0 → 0.2.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-q0z11q9m.js → index-2xztzkfr.js} +5705 -3835
- package/dist/{index-sms8x6cq.js → index-bcbbm5wt.js} +1 -1
- package/dist/{index-vbf5hcw8.js → index-qgt9z94q.js} +320 -33
- package/dist/index.js +92 -3
- package/dist/migrations/20260712180000_child_fan_out/migration.sql +27 -0
- package/dist/migrations/20260712190000_workflow_definitions/migration.sql +3 -0
- package/dist/migrations/20260712200000_workflow_runtime/migration.sql +2 -0
- package/dist/migrations/mysql/0008_child_fan_out.sql +26 -0
- package/dist/migrations/mysql/0009_workflow_definitions.sql +3 -0
- package/dist/migrations/mysql/0010_workflow_runtime.sql +3 -0
- package/dist/migrations/pg/20260712180000_child_fan_out/migration.sql +27 -0
- package/dist/migrations/pg/20260712190000_workflow_definitions/migration.sql +3 -0
- package/dist/migrations/pg/20260712200000_workflow_runtime/migration.sql +2 -0
- package/dist/migrations/sqlite/0008_child_fan_out.sql +27 -0
- package/dist/migrations/sqlite/0009_workflow_definitions.sql +3 -0
- package/dist/migrations/sqlite/0010_workflow_runtime.sql +3 -0
- package/dist/sqlite.js +60 -11
- package/dist/types/relay/adapter-outbox.d.ts +3 -3
- package/dist/types/relay/client.d.ts +147 -17
- package/dist/types/relay/index.d.ts +2 -2
- package/dist/types/relay/operation.d.ts +559 -2
- package/dist/types/relay/sqlite-migrations.d.ts +16 -1
- package/dist/types/relay/sqlite-runtime.d.ts +8 -3
- package/dist/types/relay/sqlite.d.ts +3 -1
- package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +30 -0
- package/dist/types/runtime/child/child-fan-out-runtime.d.ts +34 -0
- package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +25 -0
- package/dist/types/runtime/cluster/execution-entity.d.ts +4 -2
- package/dist/types/runtime/execution/active-execution-registry.d.ts +12 -0
- package/dist/types/runtime/execution/execution-service.d.ts +1 -0
- package/dist/types/runtime/index.d.ts +5 -0
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +14 -14
- package/dist/types/runtime/workflow/definition-runtime.d.ts +78 -0
- package/dist/types/runtime/workflow/execution-workflow.d.ts +5 -5
- package/dist/types/schema/child-orchestration-schema.d.ts +393 -0
- package/dist/types/schema/execution-schema.d.ts +2 -2
- package/dist/types/schema/ids-schema.d.ts +12 -0
- package/dist/types/schema/index.d.ts +3 -0
- package/dist/types/schema/wait-schema.d.ts +98 -0
- package/dist/types/schema/workflow-schema.d.ts +2062 -0
- package/dist/types/store-sql/child/child-fan-out-repository.d.ts +53 -0
- package/dist/types/store-sql/index.d.ts +2 -0
- package/dist/types/store-sql/portable.d.ts +2 -0
- package/dist/types/store-sql/schema/relay-schema.d.ts +1266 -1
- package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ChildOrchestration, Content, Ids } from "../../schema/index";
|
|
2
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
+
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
4
|
+
declare const ChildFanOutRepositoryError_base: Schema.Class<ChildFanOutRepositoryError, Schema.TaggedStruct<"ChildFanOutRepositoryError", {
|
|
5
|
+
readonly message: Schema.String;
|
|
6
|
+
}>, import("effect/Cause").YieldableError>;
|
|
7
|
+
export declare class ChildFanOutRepositoryError extends ChildFanOutRepositoryError_base {
|
|
8
|
+
}
|
|
9
|
+
declare const ChildFanOutConflict_base: Schema.Class<ChildFanOutConflict, Schema.TaggedStruct<"ChildFanOutConflict", {
|
|
10
|
+
readonly fan_out_id: Schema.brand<Schema.String, "Relay.ChildFanOutId"> & {
|
|
11
|
+
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildFanOutId">;
|
|
12
|
+
};
|
|
13
|
+
}>, import("effect/Cause").YieldableError>;
|
|
14
|
+
export declare class ChildFanOutConflict extends ChildFanOutConflict_base {
|
|
15
|
+
}
|
|
16
|
+
export interface Interface {
|
|
17
|
+
readonly create: (definition: ChildOrchestration.FanOutDefinition) => Effect.Effect<ChildOrchestration.FanOutState, ChildFanOutConflict | ChildFanOutRepositoryError>;
|
|
18
|
+
readonly get: (id: Ids.ChildFanOutId) => Effect.Effect<ChildOrchestration.FanOutState | undefined, ChildFanOutRepositoryError>;
|
|
19
|
+
readonly claimAdmissions: (id: Ids.ChildFanOutId) => Effect.Effect<ReadonlyArray<ChildOrchestration.FanOutChild>, ChildFanOutRepositoryError>;
|
|
20
|
+
readonly recordTerminal: (input: RecordTerminalInput) => Effect.Effect<RecordTerminalResult | undefined, ChildFanOutRepositoryError>;
|
|
21
|
+
readonly cancel: (id: Ids.ChildFanOutId, cancelledAt: number) => Effect.Effect<CancelResult | undefined, ChildFanOutRepositoryError>;
|
|
22
|
+
readonly listNonTerminal: (parentExecutionId?: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<ChildOrchestration.FanOutState>, ChildFanOutRepositoryError>;
|
|
23
|
+
}
|
|
24
|
+
export interface RecordTerminalInput {
|
|
25
|
+
readonly childExecutionId: Ids.ChildExecutionId;
|
|
26
|
+
readonly state: "completed" | "failed" | "cancelled";
|
|
27
|
+
readonly output: ReadonlyArray<Content.Part>;
|
|
28
|
+
readonly error?: string;
|
|
29
|
+
readonly completedAt: number;
|
|
30
|
+
}
|
|
31
|
+
export interface RecordTerminalResult {
|
|
32
|
+
readonly fanOut: ChildOrchestration.FanOutState;
|
|
33
|
+
readonly memberTransitioned: boolean;
|
|
34
|
+
readonly aggregateTransitioned: boolean;
|
|
35
|
+
readonly admitted: ReadonlyArray<ChildOrchestration.FanOutChild>;
|
|
36
|
+
}
|
|
37
|
+
export interface CancelResult {
|
|
38
|
+
readonly fanOut: ChildOrchestration.FanOutState;
|
|
39
|
+
readonly transitioned: boolean;
|
|
40
|
+
readonly activeChildExecutionIds: ReadonlyArray<Ids.ChildExecutionId>;
|
|
41
|
+
}
|
|
42
|
+
declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/ChildFanOutRepository", Interface>;
|
|
43
|
+
export declare class Service extends Service_base {
|
|
44
|
+
}
|
|
45
|
+
export declare const layer: Layer.Layer<Service, never, SqlClient>;
|
|
46
|
+
export declare const memoryLayer: Layer.Layer<Service, never, never>;
|
|
47
|
+
export declare const create: (definition: ChildOrchestration.FanOutDefinition) => Effect.Effect<ChildOrchestration.FanOutState, ChildFanOutRepositoryError | ChildFanOutConflict, Service>;
|
|
48
|
+
export declare const get: (id: string & import("effect/Brand").Brand<"Relay.ChildFanOutId">) => Effect.Effect<ChildOrchestration.FanOutState | undefined, ChildFanOutRepositoryError, Service>;
|
|
49
|
+
export declare const claimAdmissions: (id: string & import("effect/Brand").Brand<"Relay.ChildFanOutId">) => Effect.Effect<readonly ChildOrchestration.FanOutChild[], ChildFanOutRepositoryError, Service>;
|
|
50
|
+
export declare const recordTerminal: (input: RecordTerminalInput) => Effect.Effect<RecordTerminalResult | undefined, ChildFanOutRepositoryError, Service>;
|
|
51
|
+
export declare const cancel: (id: string & import("effect/Brand").Brand<"Relay.ChildFanOutId">, cancelledAt: number) => Effect.Effect<CancelResult | undefined, ChildFanOutRepositoryError, Service>;
|
|
52
|
+
export declare const listNonTerminal: (parentExecutionId?: (string & import("effect/Brand").Brand<"Relay.ExecutionId">) | undefined) => Effect.Effect<readonly ChildOrchestration.FanOutState[], ChildFanOutRepositoryError, Service>;
|
|
53
|
+
export {};
|
|
@@ -2,6 +2,7 @@ export * as AddressBookRepository from "./address/address-book-repository";
|
|
|
2
2
|
export * as AgentChatRepository from "./chat/agent-chat-repository";
|
|
3
3
|
export * as AgentDefinitionRepository from "./agent/agent-definition-repository";
|
|
4
4
|
export * as ChildExecutionRepository from "./child/child-execution-repository";
|
|
5
|
+
export * as ChildFanOutRepository from "./child/child-fan-out-repository";
|
|
5
6
|
export * as ClusterRegistryRepository from "./cluster/cluster-registry-repository";
|
|
6
7
|
export * as CompactionRepository from "./compaction/compaction-repository";
|
|
7
8
|
export * as Database from "./database/database-service";
|
|
@@ -27,4 +28,5 @@ export * as SteeringRepository from "./steering/steering-repository";
|
|
|
27
28
|
export * as ToolCallRepository from "./tool/tool-call-repository";
|
|
28
29
|
export * as TenantId from "./tenant/tenant-id";
|
|
29
30
|
export * as WorkspaceLeaseRepository from "./workspace/workspace-lease-repository";
|
|
31
|
+
export * as WorkflowDefinitionRepository from "./workflow/workflow-definition-repository";
|
|
30
32
|
export declare const storeSqlPackage = "./index";
|
|
@@ -2,6 +2,7 @@ export * as AddressBookRepository from "./address/address-book-repository";
|
|
|
2
2
|
export * as AgentChatRepository from "./chat/agent-chat-repository";
|
|
3
3
|
export * as AgentDefinitionRepository from "./agent/agent-definition-repository";
|
|
4
4
|
export * as ChildExecutionRepository from "./child/child-execution-repository";
|
|
5
|
+
export * as ChildFanOutRepository from "./child/child-fan-out-repository";
|
|
5
6
|
export * as ClusterRegistryRepository from "./cluster/cluster-registry-repository";
|
|
6
7
|
export * as CompactionRepository from "./compaction/compaction-repository";
|
|
7
8
|
export * as ContextEpochRepository from "./session/context-epoch-repository";
|
|
@@ -25,3 +26,4 @@ export * as SteeringRepository from "./steering/steering-repository";
|
|
|
25
26
|
export * as TenantId from "./tenant/tenant-id";
|
|
26
27
|
export * as ToolCallRepository from "./tool/tool-call-repository";
|
|
27
28
|
export * as WorkspaceLeaseRepository from "./workspace/workspace-lease-repository";
|
|
29
|
+
export * as WorkflowDefinitionRepository from "./workflow/workflow-definition-repository";
|