@relayfx/test 0.3.0 → 0.3.2
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/README.md +2 -2
- package/dist/index.js +29 -20481
- package/dist/types/test/index.d.ts +0 -2
- package/dist/types/test/test-runtime.d.ts +6 -7
- package/dist/types/test/test-tools.d.ts +2 -2
- package/dist/types/test/wait-test-kit.d.ts +1 -1
- package/package.json +7 -6
- package/dist/types/runtime/address/address-book-service.d.ts +0 -74
- package/dist/types/runtime/address/address-resolution-service.d.ts +0 -172
- package/dist/types/runtime/agent/agent-loop-service.d.ts +0 -92
- package/dist/types/runtime/agent/agent-registry-service.d.ts +0 -31
- package/dist/types/runtime/agent/prompt-assembler-service.d.ts +0 -64
- package/dist/types/runtime/agent/relay-approvals.d.ts +0 -2
- package/dist/types/runtime/agent/relay-compaction.d.ts +0 -24
- package/dist/types/runtime/agent/relay-instructions.d.ts +0 -7
- package/dist/types/runtime/agent/relay-permissions.d.ts +0 -25
- package/dist/types/runtime/agent/relay-steering.d.ts +0 -17
- package/dist/types/runtime/agent/relay-tool-executor.d.ts +0 -22
- package/dist/types/runtime/agent/relay-tool-output.d.ts +0 -10
- package/dist/types/runtime/agent/sequence-allocator.d.ts +0 -8
- package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +0 -30
- package/dist/types/runtime/child/child-fan-out-runtime.d.ts +0 -40
- package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +0 -25
- package/dist/types/runtime/child/child-run-service.d.ts +0 -96
- package/dist/types/runtime/child/parent-notifier-service.d.ts +0 -42
- package/dist/types/runtime/child/spawn-child-run-tool.d.ts +0 -225
- package/dist/types/runtime/cluster/execution-entity.d.ts +0 -39
- package/dist/types/runtime/content/artifact-store-service.d.ts +0 -26
- package/dist/types/runtime/content/blob-store-service.d.ts +0 -54
- package/dist/types/runtime/entity/entity-instance-service.d.ts +0 -76
- package/dist/types/runtime/entity/entity-registry-service.d.ts +0 -35
- package/dist/types/runtime/envelope/envelope-service.d.ts +0 -56
- package/dist/types/runtime/execution/active-execution-registry.d.ts +0 -12
- package/dist/types/runtime/execution/event-log-service.d.ts +0 -93
- package/dist/types/runtime/execution/execution-service.d.ts +0 -66
- package/dist/types/runtime/execution/execution-watch-service.d.ts +0 -32
- package/dist/types/runtime/execution/session-stream-service.d.ts +0 -33
- package/dist/types/runtime/inbox/inbox-service.d.ts +0 -76
- package/dist/types/runtime/inbox/send-message-tool.d.ts +0 -27
- package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +0 -34
- package/dist/types/runtime/index.d.ts +0 -56
- package/dist/types/runtime/memory/memory-service.d.ts +0 -22
- package/dist/types/runtime/model/embedding-model-service.d.ts +0 -81
- package/dist/types/runtime/model/language-model-service.d.ts +0 -48
- package/dist/types/runtime/model/model-call-policy.d.ts +0 -14
- package/dist/types/runtime/observability/runtime-metrics.d.ts +0 -28
- package/dist/types/runtime/presence/presence-service.d.ts +0 -30
- package/dist/types/runtime/presence/presence-tool.d.ts +0 -20
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +0 -149
- package/dist/types/runtime/schedule/scheduler-service.d.ts +0 -34
- package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +0 -27
- package/dist/types/runtime/session/session-store-service.d.ts +0 -23
- package/dist/types/runtime/skill/skill-registry-service.d.ts +0 -44
- package/dist/types/runtime/state/execution-state-service.d.ts +0 -60
- package/dist/types/runtime/state/state-tools.d.ts +0 -5
- package/dist/types/runtime/tool/tool-input-schema-digest.d.ts +0 -6
- package/dist/types/runtime/tool/tool-runtime-service.d.ts +0 -162
- package/dist/types/runtime/tool/tool-transition-coordinator.d.ts +0 -13
- package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +0 -24
- package/dist/types/runtime/topic/topic-service.d.ts +0 -50
- package/dist/types/runtime/wait/wait-service.d.ts +0 -81
- package/dist/types/runtime/wait/wait-signal.d.ts +0 -25
- package/dist/types/runtime/workflow/activity-version-registry.d.ts +0 -93
- package/dist/types/runtime/workflow/definition-runtime.d.ts +0 -95
- package/dist/types/runtime/workflow/execution-workflow.d.ts +0 -534
- package/dist/types/runtime/workspace/workspace-planner-service.d.ts +0 -64
- package/dist/types/runtime/workspace/workspace-provider-service.d.ts +0 -112
- package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +0 -21
- package/dist/types/schema/address-schema.d.ts +0 -77
- package/dist/types/schema/agent-schema.d.ts +0 -901
- package/dist/types/schema/child-orchestration-schema.d.ts +0 -429
- package/dist/types/schema/content-schema.d.ts +0 -118
- package/dist/types/schema/entity-schema.d.ts +0 -40
- package/dist/types/schema/envelope-schema.d.ts +0 -180
- package/dist/types/schema/execution-schema.d.ts +0 -453
- package/dist/types/schema/ids-schema.d.ts +0 -106
- package/dist/types/schema/inbox-schema.d.ts +0 -81
- package/dist/types/schema/index.d.ts +0 -19
- package/dist/types/schema/presence-schema.d.ts +0 -28
- package/dist/types/schema/schedule-schema.d.ts +0 -79
- package/dist/types/schema/shared-schema.d.ts +0 -13
- package/dist/types/schema/skill-schema.d.ts +0 -260
- package/dist/types/schema/state-schema.d.ts +0 -35
- package/dist/types/schema/tool-schema.d.ts +0 -84
- package/dist/types/schema/wait-schema.d.ts +0 -98
- package/dist/types/schema/workflow-schema.d.ts +0 -2062
- package/dist/types/schema/workspace-schema.d.ts +0 -78
- package/dist/types/test/captured-model.d.ts +0 -19
- package/dist/types/test/scripted-model.d.ts +0 -49
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ChildOrchestration, Execution, Ids } from "../../schema/index";
|
|
2
|
-
import { ChildFanOutRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
4
|
-
import { Service as ChildRunService, type AgentContext } from "./child-run-service";
|
|
5
|
-
declare const ChildFanOutAdmissionError_base: Schema.Class<ChildFanOutAdmissionError, Schema.TaggedStruct<"ChildFanOutAdmissionError", {
|
|
6
|
-
readonly message: Schema.String;
|
|
7
|
-
}>, import("effect/Cause").YieldableError>;
|
|
8
|
-
export declare class ChildFanOutAdmissionError extends ChildFanOutAdmissionError_base {
|
|
9
|
-
}
|
|
10
|
-
export interface AdmitInput {
|
|
11
|
-
readonly fanOutId: Ids.ChildFanOutId;
|
|
12
|
-
readonly parent: AgentContext;
|
|
13
|
-
readonly eventSequence: Execution.ExecutionEventSequence;
|
|
14
|
-
readonly admittedAt: number;
|
|
15
|
-
}
|
|
16
|
-
export interface Interface {
|
|
17
|
-
readonly admit: (input: AdmitInput) => Effect.Effect<ReadonlyArray<Execution.ChildRunAccepted>, ChildFanOutAdmissionError>;
|
|
18
|
-
readonly recover: (input: AdmitInput) => Effect.Effect<ReadonlyArray<Execution.ChildRunAccepted>, ChildFanOutAdmissionError>;
|
|
19
|
-
readonly recoverAll: (inputFor: (fanOut: ChildOrchestration.FanOutState) => AdmitInput) => Effect.Effect<ReadonlyArray<Execution.ChildRunAccepted>, ChildFanOutAdmissionError>;
|
|
20
|
-
}
|
|
21
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/child/child-fan-out-admission-service/Service", Interface>;
|
|
22
|
-
export declare class Service extends Service_base {
|
|
23
|
-
}
|
|
24
|
-
export declare const layer: Layer.Layer<Service, never, ChildFanOutRepository.Service | ChildRunService>;
|
|
25
|
-
export declare const memoryLayer: Layer.Layer<Service, never, never>;
|
|
26
|
-
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
|
|
27
|
-
export declare const admit: (input: AdmitInput) => Effect.Effect<readonly Execution.ChildRunAccepted[], ChildFanOutAdmissionError, Service>;
|
|
28
|
-
export declare const recover: (input: AdmitInput) => Effect.Effect<readonly Execution.ChildRunAccepted[], ChildFanOutAdmissionError, Service>;
|
|
29
|
-
export declare const recoverAll: (inputFor: (fanOut: ChildOrchestration.FanOutState) => AdmitInput) => Effect.Effect<readonly Execution.ChildRunAccepted[], ChildFanOutAdmissionError, Service>;
|
|
30
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ChildOrchestration, Content, Ids } from "../../schema/index";
|
|
2
|
-
import { ChildFanOutRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
4
|
-
import { Service as TransitionService } from "./child-fan-out-transition-service";
|
|
5
|
-
export interface ChildResult {
|
|
6
|
-
readonly status: "completed" | "failed" | "cancelled";
|
|
7
|
-
readonly output: ReadonlyArray<Content.Part>;
|
|
8
|
-
readonly error?: string;
|
|
9
|
-
readonly completedAt?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface Handlers {
|
|
12
|
-
readonly execute: (child: ChildOrchestration.FanOutChild, fanOut: ChildOrchestration.FanOutState, idempotencyKey: string) => Effect.Effect<ChildResult, {
|
|
13
|
-
readonly _tag: string;
|
|
14
|
-
}>;
|
|
15
|
-
readonly cancel: (childExecutionId: Ids.ChildExecutionId, reason: string) => Effect.Effect<void, {
|
|
16
|
-
readonly _tag: string;
|
|
17
|
-
}>;
|
|
18
|
-
}
|
|
19
|
-
declare const HandlerService_base: Context.ServiceClass<HandlerService, "@relayfx/runtime/child/child-fan-out-runtime/HandlerService", Handlers>;
|
|
20
|
-
export declare class HandlerService extends HandlerService_base {
|
|
21
|
-
}
|
|
22
|
-
declare const ChildFanOutRuntimeError_base: Schema.Class<ChildFanOutRuntimeError, Schema.TaggedStruct<"ChildFanOutRuntimeError", {
|
|
23
|
-
readonly message: Schema.String;
|
|
24
|
-
}>, import("effect/Cause").YieldableError>;
|
|
25
|
-
export declare class ChildFanOutRuntimeError extends ChildFanOutRuntimeError_base {
|
|
26
|
-
}
|
|
27
|
-
export interface Interface {
|
|
28
|
-
readonly create: (definition: ChildOrchestration.FanOutDefinition) => Effect.Effect<ChildOrchestration.FanOutState, ChildFanOutRuntimeError>;
|
|
29
|
-
readonly recover: (_?: never) => Effect.Effect<ReadonlyArray<Ids.ChildFanOutId>, ChildFanOutRuntimeError>;
|
|
30
|
-
readonly cancel: (fanOutId: Ids.ChildFanOutId, cancelledAt: number, reason: string) => Effect.Effect<ChildOrchestration.FanOutState | undefined, ChildFanOutRuntimeError>;
|
|
31
|
-
readonly inspect: (fanOutId: Ids.ChildFanOutId) => Effect.Effect<ChildOrchestration.FanOutState | undefined, ChildFanOutRuntimeError>;
|
|
32
|
-
}
|
|
33
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/child/child-fan-out-runtime/Service", Interface>;
|
|
34
|
-
export declare class Service extends Service_base {
|
|
35
|
-
}
|
|
36
|
-
export declare const layerFromRuntime: Layer.Layer<Service, ChildFanOutRuntimeError, HandlerService | ChildFanOutRepository.Service | TransitionService>;
|
|
37
|
-
export declare const layer: Layer.Layer<Service, ChildFanOutRuntimeError, HandlerService | ChildFanOutRepository.Service | TransitionService>;
|
|
38
|
-
export declare const handlersLayer: (handlers: Handlers) => Layer.Layer<HandlerService, never, never>;
|
|
39
|
-
export declare const testHandlersLayer: typeof handlersLayer;
|
|
40
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Content, Ids } from "../../schema/index";
|
|
2
|
-
import { ChildFanOutRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
4
|
-
import { Service as EventLogService } from "../execution/event-log-service";
|
|
5
|
-
declare const ChildFanOutTransitionError_base: Schema.Class<ChildFanOutTransitionError, Schema.TaggedStruct<"ChildFanOutTransitionError", {
|
|
6
|
-
readonly message: Schema.String;
|
|
7
|
-
}>, import("effect/Cause").YieldableError>;
|
|
8
|
-
export declare class ChildFanOutTransitionError extends ChildFanOutTransitionError_base {
|
|
9
|
-
}
|
|
10
|
-
export interface TerminalInput {
|
|
11
|
-
readonly childExecutionId: Ids.ChildExecutionId;
|
|
12
|
-
readonly status: "completed" | "failed" | "cancelled";
|
|
13
|
-
readonly output: ReadonlyArray<Content.Part>;
|
|
14
|
-
readonly error?: string;
|
|
15
|
-
readonly completedAt: number;
|
|
16
|
-
}
|
|
17
|
-
export interface Interface {
|
|
18
|
-
readonly terminal: (input: TerminalInput) => Effect.Effect<ChildFanOutRepository.RecordTerminalResult | undefined, ChildFanOutTransitionError>;
|
|
19
|
-
}
|
|
20
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/child/child-fan-out-transition-service/Service", Interface>;
|
|
21
|
-
export declare class Service extends Service_base {
|
|
22
|
-
}
|
|
23
|
-
export declare const layer: Layer.Layer<Service, never, ChildFanOutRepository.Service | EventLogService>;
|
|
24
|
-
export declare const terminal: (input: TerminalInput) => Effect.Effect<ChildFanOutRepository.RecordTerminalResult | undefined, ChildFanOutTransitionError, Service>;
|
|
25
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Agent, Execution, Ids, Shared } from "../../schema/index";
|
|
2
|
-
import { ChildExecutionRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
4
|
-
import { Service as EventLogService } from "../execution/event-log-service";
|
|
5
|
-
declare const StaticChildRunPresetNotFound_base: Schema.Class<StaticChildRunPresetNotFound, Schema.TaggedStruct<"StaticChildRunPresetNotFound", {
|
|
6
|
-
readonly preset_name: Schema.String;
|
|
7
|
-
}>, import("effect/Cause").YieldableError>;
|
|
8
|
-
export declare class StaticChildRunPresetNotFound extends StaticChildRunPresetNotFound_base {
|
|
9
|
-
}
|
|
10
|
-
declare const ChildRunScopeBroadened_base: Schema.Class<ChildRunScopeBroadened, Schema.TaggedStruct<"ChildRunScopeBroadened", {
|
|
11
|
-
readonly field: Schema.Literals<readonly ["tool_names", "permissions"]>;
|
|
12
|
-
readonly value: Schema.String;
|
|
13
|
-
}>, import("effect/Cause").YieldableError>;
|
|
14
|
-
export declare class ChildRunScopeBroadened extends ChildRunScopeBroadened_base {
|
|
15
|
-
}
|
|
16
|
-
declare const ChildRunServiceError_base: Schema.Class<ChildRunServiceError, Schema.TaggedStruct<"ChildRunServiceError", {
|
|
17
|
-
readonly message: Schema.String;
|
|
18
|
-
}>, import("effect/Cause").YieldableError>;
|
|
19
|
-
export declare class ChildRunServiceError extends ChildRunServiceError_base {
|
|
20
|
-
}
|
|
21
|
-
declare const ChildRunWorkspaceUnavailable_base: Schema.Class<ChildRunWorkspaceUnavailable, Schema.TaggedStruct<"ChildRunWorkspaceUnavailable", {
|
|
22
|
-
readonly reason: Schema.String;
|
|
23
|
-
}>, import("effect/Cause").YieldableError>;
|
|
24
|
-
export declare class ChildRunWorkspaceUnavailable extends ChildRunWorkspaceUnavailable_base {
|
|
25
|
-
}
|
|
26
|
-
declare const ChildRunModelMissing_base: Schema.Class<ChildRunModelMissing, Schema.TaggedStruct<"ChildRunModelMissing", {}>, import("effect/Cause").YieldableError>;
|
|
27
|
-
export declare class ChildRunModelMissing extends ChildRunModelMissing_base {
|
|
28
|
-
}
|
|
29
|
-
export interface AgentContext {
|
|
30
|
-
readonly instructions?: string;
|
|
31
|
-
readonly model?: Agent.ModelSelection;
|
|
32
|
-
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
33
|
-
readonly toolNames: ReadonlyArray<string>;
|
|
34
|
-
readonly permissions: ReadonlyArray<string>;
|
|
35
|
-
readonly outputSchemaRef?: string;
|
|
36
|
-
readonly metadata?: Shared.Metadata;
|
|
37
|
-
}
|
|
38
|
-
export interface ChildRunOverride {
|
|
39
|
-
readonly instructions?: string;
|
|
40
|
-
readonly model?: Agent.ModelSelection;
|
|
41
|
-
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
42
|
-
readonly toolNames?: ReadonlyArray<string>;
|
|
43
|
-
readonly permissions?: ReadonlyArray<string>;
|
|
44
|
-
readonly workspacePolicy?: Agent.ChildRunWorkspacePolicy;
|
|
45
|
-
readonly outputSchemaRef?: string;
|
|
46
|
-
readonly metadata?: Shared.Metadata;
|
|
47
|
-
}
|
|
48
|
-
export interface ChildRunPreset extends ChildRunOverride {
|
|
49
|
-
}
|
|
50
|
-
export interface SpawnStaticInput {
|
|
51
|
-
readonly childExecutionId: Ids.ChildExecutionId;
|
|
52
|
-
readonly executionId: Ids.ExecutionId;
|
|
53
|
-
readonly addressId: Ids.AddressId;
|
|
54
|
-
readonly parent: AgentContext;
|
|
55
|
-
readonly presets: ReadonlyMap<string, ChildRunPreset>;
|
|
56
|
-
readonly presetName: string;
|
|
57
|
-
readonly eventSequence: Execution.ExecutionEventSequence;
|
|
58
|
-
readonly createdAt: number;
|
|
59
|
-
}
|
|
60
|
-
export interface SpawnDynamicInput {
|
|
61
|
-
readonly childExecutionId: Ids.ChildExecutionId;
|
|
62
|
-
readonly executionId: Ids.ExecutionId;
|
|
63
|
-
readonly addressId: Ids.AddressId;
|
|
64
|
-
readonly parent: AgentContext;
|
|
65
|
-
readonly override?: ChildRunOverride;
|
|
66
|
-
readonly eventSequence: Execution.ExecutionEventSequence;
|
|
67
|
-
readonly createdAt: number;
|
|
68
|
-
}
|
|
69
|
-
export interface Interface {
|
|
70
|
-
readonly spawnStatic: (input: SpawnStaticInput) => Effect.Effect<Execution.ChildRunAccepted, StaticChildRunPresetNotFound | ChildRunScopeBroadened | ChildRunWorkspaceUnavailable | ChildRunServiceError>;
|
|
71
|
-
readonly spawnDynamic: (input: SpawnDynamicInput) => Effect.Effect<Execution.ChildRunAccepted, ChildRunScopeBroadened | ChildRunWorkspaceUnavailable | ChildRunServiceError>;
|
|
72
|
-
}
|
|
73
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/child/child-run-service/Service", Interface>;
|
|
74
|
-
export declare class Service extends Service_base {
|
|
75
|
-
}
|
|
76
|
-
export interface ResolvedChildContext {
|
|
77
|
-
readonly instructions?: string;
|
|
78
|
-
readonly model?: Agent.ModelSelection;
|
|
79
|
-
readonly compactionPolicy?: Agent.CompactionPolicy;
|
|
80
|
-
readonly toolNames: ReadonlyArray<string>;
|
|
81
|
-
readonly permissions: ReadonlyArray<string>;
|
|
82
|
-
readonly workspacePolicy?: Agent.ChildRunWorkspacePolicy;
|
|
83
|
-
readonly outputSchemaRef?: string;
|
|
84
|
-
readonly metadata: Shared.Metadata;
|
|
85
|
-
}
|
|
86
|
-
export declare const layer: Layer.Layer<Service, never, ChildExecutionRepository.Service | EventLogService>;
|
|
87
|
-
export declare const memoryLayer: Layer.Layer<Service, never, never>;
|
|
88
|
-
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
|
|
89
|
-
export declare const resolveForDispatch: (input: Execution.SpawnChildRunInput) => Effect.Effect<ResolvedChildContext, ChildRunScopeBroadened | StaticChildRunPresetNotFound, never>;
|
|
90
|
-
export declare const childDefinition: {
|
|
91
|
-
(context: ResolvedChildContext): (parentDefinition: Agent.Definition) => Effect.Effect<Agent.Definition, ChildRunModelMissing>;
|
|
92
|
-
(parentDefinition: Agent.Definition, context: ResolvedChildContext): Effect.Effect<Agent.Definition, ChildRunModelMissing>;
|
|
93
|
-
};
|
|
94
|
-
export declare const spawnStatic: (input: SpawnStaticInput) => Effect.Effect<Execution.ChildRunAccepted, ChildRunScopeBroadened | ChildRunServiceError | ChildRunWorkspaceUnavailable | StaticChildRunPresetNotFound, Service>;
|
|
95
|
-
export declare const spawnDynamic: (input: SpawnDynamicInput) => Effect.Effect<Execution.ChildRunAccepted, ChildRunScopeBroadened | ChildRunServiceError | ChildRunWorkspaceUnavailable, Service>;
|
|
96
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Content, Ids } from "../../schema/index";
|
|
2
|
-
import { ChildExecutionRepository } from "@relayfx/store-sql/portable";
|
|
3
|
-
import { Context, Effect, Layer, Ref, Schema } from "effect";
|
|
4
|
-
import { Service as EventLogService } from "../execution/event-log-service";
|
|
5
|
-
import { Service as WaitServiceService } from "../wait/wait-service";
|
|
6
|
-
declare const ParentNotifyError_base: Schema.Class<ParentNotifyError, Schema.TaggedStruct<"ParentNotifyError", {
|
|
7
|
-
readonly message: Schema.String;
|
|
8
|
-
}>, import("effect/Cause").YieldableError>;
|
|
9
|
-
export declare class ParentNotifyError extends ParentNotifyError_base {
|
|
10
|
-
}
|
|
11
|
-
export declare const ChildTerminalStatus: Schema.Literals<readonly ["completed", "failed", "cancelled"]>;
|
|
12
|
-
export type ChildTerminalStatus = typeof ChildTerminalStatus.Type;
|
|
13
|
-
export interface NotifyInput {
|
|
14
|
-
readonly parentExecutionId: Ids.ExecutionId;
|
|
15
|
-
readonly childExecutionId: Ids.ChildExecutionId;
|
|
16
|
-
readonly parentWaitId?: Ids.WaitId;
|
|
17
|
-
readonly status: ChildTerminalStatus;
|
|
18
|
-
readonly output: ReadonlyArray<Content.Part>;
|
|
19
|
-
readonly notifiedAt: number;
|
|
20
|
-
}
|
|
21
|
-
export interface Interface {
|
|
22
|
-
readonly notify: (input: NotifyInput) => Effect.Effect<void, ParentNotifyError>;
|
|
23
|
-
}
|
|
24
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/child/parent-notifier-service/Service", Interface>;
|
|
25
|
-
export declare class Service extends Service_base {
|
|
26
|
-
}
|
|
27
|
-
export interface SignalParentWaitInput {
|
|
28
|
-
readonly executionId: Ids.ExecutionId;
|
|
29
|
-
readonly waitId: Ids.WaitId;
|
|
30
|
-
readonly signaledAt: number;
|
|
31
|
-
}
|
|
32
|
-
export interface MakeOptions {
|
|
33
|
-
readonly signalWait: (input: SignalParentWaitInput) => Effect.Effect<void, {
|
|
34
|
-
readonly _tag: string;
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
export declare const make: (options: MakeOptions) => Effect.Effect<Interface, never, ChildExecutionRepository.Service | EventLogService | WaitServiceService>;
|
|
38
|
-
export declare const layerWith: (options: MakeOptions) => Layer.Layer<Service, never, ChildExecutionRepository.Service | EventLogService | WaitServiceService>;
|
|
39
|
-
export declare const memoryLayer: (notifications?: Ref.Ref<ReadonlyArray<NotifyInput>>) => Layer.Layer<Service, never, never>;
|
|
40
|
-
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
|
|
41
|
-
export declare const notify: (input: NotifyInput) => Effect.Effect<void, ParentNotifyError, Service>;
|
|
42
|
-
export {};
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { Agent, Content, Execution, Ids, Shared } from "../../schema/index";
|
|
2
|
-
import { Effect, Schema } from "effect";
|
|
3
|
-
import { ToolRuntimeError } from "../tool/tool-runtime-service";
|
|
4
|
-
import type { RegisteredTool } from "../tool/tool-runtime-service";
|
|
5
|
-
import type { Interface as EventLogInterface } from "../execution/event-log-service";
|
|
6
|
-
import type { Interface as WaitServiceInterface } from "../wait/wait-service";
|
|
7
|
-
import type { Interface as ChildRunServiceInterface } from "./child-run-service";
|
|
8
|
-
export declare const toolName = "spawn_child_run";
|
|
9
|
-
export declare const permissionName = "relay.child_run.spawn";
|
|
10
|
-
export declare const Input: Schema.Struct<{
|
|
11
|
-
readonly preset_name: Schema.optionalKey<Schema.String>;
|
|
12
|
-
readonly instructions: Schema.optionalKey<Schema.String>;
|
|
13
|
-
readonly model: Schema.optionalKey<Schema.Struct<{
|
|
14
|
-
readonly provider: Schema.String;
|
|
15
|
-
readonly model: Schema.String;
|
|
16
|
-
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
17
|
-
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
18
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
19
|
-
}>>;
|
|
20
|
-
readonly compaction_policy: Schema.optionalKey<Schema.Struct<{
|
|
21
|
-
readonly context_window: Schema.Finite;
|
|
22
|
-
readonly reserve_tokens: Schema.Finite;
|
|
23
|
-
readonly keep_recent_tokens: Schema.Finite;
|
|
24
|
-
readonly summary_model: Schema.optionalKey<Schema.Struct<{
|
|
25
|
-
readonly provider: Schema.String;
|
|
26
|
-
readonly model: Schema.String;
|
|
27
|
-
readonly registration_key: Schema.optionalKey<Schema.String>;
|
|
28
|
-
readonly request_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
29
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
30
|
-
}>>;
|
|
31
|
-
}>>;
|
|
32
|
-
readonly tool_names: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
33
|
-
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
34
|
-
readonly output_schema_ref: Schema.optionalKey<Schema.String>;
|
|
35
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
36
|
-
readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
37
|
-
readonly type: Schema.Literal<"text">;
|
|
38
|
-
readonly text: Schema.String;
|
|
39
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
40
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
41
|
-
}>, Schema.Struct<{
|
|
42
|
-
readonly type: Schema.Literal<"structured">;
|
|
43
|
-
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
44
|
-
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
45
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
46
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
47
|
-
}>, Schema.Struct<{
|
|
48
|
-
readonly type: Schema.Literal<"blob-reference">;
|
|
49
|
-
readonly uri: Schema.String;
|
|
50
|
-
readonly media_type: Schema.String;
|
|
51
|
-
readonly filename: Schema.optionalKey<Schema.String>;
|
|
52
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
53
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
54
|
-
}>, Schema.Struct<{
|
|
55
|
-
readonly type: Schema.Literal<"artifact-reference">;
|
|
56
|
-
readonly artifact_id: Schema.String;
|
|
57
|
-
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
58
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
59
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
60
|
-
}>, Schema.Struct<{
|
|
61
|
-
readonly type: Schema.Literal<"tool-call">;
|
|
62
|
-
readonly call: Schema.Struct<{
|
|
63
|
-
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
64
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
65
|
-
};
|
|
66
|
-
readonly name: Schema.String;
|
|
67
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
68
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
69
|
-
}>;
|
|
70
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
71
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
72
|
-
}>, Schema.Struct<{
|
|
73
|
-
readonly type: Schema.Literal<"tool-result">;
|
|
74
|
-
readonly result: Schema.Struct<{
|
|
75
|
-
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
76
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
77
|
-
};
|
|
78
|
-
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
79
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
80
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
81
|
-
}>;
|
|
82
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
83
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
84
|
-
}>]>>>;
|
|
85
|
-
}>;
|
|
86
|
-
export interface Input extends Schema.Schema.Type<typeof Input> {
|
|
87
|
-
}
|
|
88
|
-
export declare const Output: Schema.Struct<{
|
|
89
|
-
readonly child_execution_id: Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
|
|
90
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
|
|
91
|
-
};
|
|
92
|
-
readonly status: Schema.Literals<readonly ["completed", "failed", "cancelled"]>;
|
|
93
|
-
readonly output: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
94
|
-
readonly type: Schema.Literal<"text">;
|
|
95
|
-
readonly text: Schema.String;
|
|
96
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
97
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
98
|
-
}>, Schema.Struct<{
|
|
99
|
-
readonly type: Schema.Literal<"structured">;
|
|
100
|
-
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
101
|
-
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
102
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
103
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
104
|
-
}>, Schema.Struct<{
|
|
105
|
-
readonly type: Schema.Literal<"blob-reference">;
|
|
106
|
-
readonly uri: Schema.String;
|
|
107
|
-
readonly media_type: Schema.String;
|
|
108
|
-
readonly filename: Schema.optionalKey<Schema.String>;
|
|
109
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
110
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
111
|
-
}>, Schema.Struct<{
|
|
112
|
-
readonly type: Schema.Literal<"artifact-reference">;
|
|
113
|
-
readonly artifact_id: Schema.String;
|
|
114
|
-
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
115
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
116
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
117
|
-
}>, Schema.Struct<{
|
|
118
|
-
readonly type: Schema.Literal<"tool-call">;
|
|
119
|
-
readonly call: Schema.Struct<{
|
|
120
|
-
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
121
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
122
|
-
};
|
|
123
|
-
readonly name: Schema.String;
|
|
124
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
125
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
126
|
-
}>;
|
|
127
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
128
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
129
|
-
}>, Schema.Struct<{
|
|
130
|
-
readonly type: Schema.Literal<"tool-result">;
|
|
131
|
-
readonly result: Schema.Struct<{
|
|
132
|
-
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
133
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
134
|
-
};
|
|
135
|
-
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
136
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
137
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
138
|
-
}>;
|
|
139
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
140
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
141
|
-
}>]>>;
|
|
142
|
-
}>;
|
|
143
|
-
export interface Output extends Schema.Schema.Type<typeof Output> {
|
|
144
|
-
}
|
|
145
|
-
export declare const TransferInput: Schema.Struct<{
|
|
146
|
-
readonly input: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
147
|
-
readonly type: Schema.Literal<"text">;
|
|
148
|
-
readonly text: Schema.String;
|
|
149
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
150
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
151
|
-
}>, Schema.Struct<{
|
|
152
|
-
readonly type: Schema.Literal<"structured">;
|
|
153
|
-
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
154
|
-
readonly schema_ref: Schema.optionalKey<Schema.String>;
|
|
155
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
156
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
157
|
-
}>, Schema.Struct<{
|
|
158
|
-
readonly type: Schema.Literal<"blob-reference">;
|
|
159
|
-
readonly uri: Schema.String;
|
|
160
|
-
readonly media_type: Schema.String;
|
|
161
|
-
readonly filename: Schema.optionalKey<Schema.String>;
|
|
162
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
163
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
164
|
-
}>, Schema.Struct<{
|
|
165
|
-
readonly type: Schema.Literal<"artifact-reference">;
|
|
166
|
-
readonly artifact_id: Schema.String;
|
|
167
|
-
readonly media_type: Schema.optionalKey<Schema.String>;
|
|
168
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
169
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
170
|
-
}>, Schema.Struct<{
|
|
171
|
-
readonly type: Schema.Literal<"tool-call">;
|
|
172
|
-
readonly call: Schema.Struct<{
|
|
173
|
-
readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
174
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
175
|
-
};
|
|
176
|
-
readonly name: Schema.String;
|
|
177
|
-
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
178
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
179
|
-
}>;
|
|
180
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
181
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
182
|
-
}>, Schema.Struct<{
|
|
183
|
-
readonly type: Schema.Literal<"tool-result">;
|
|
184
|
-
readonly result: Schema.Struct<{
|
|
185
|
-
readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
|
|
186
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
|
|
187
|
-
};
|
|
188
|
-
readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
189
|
-
readonly error: Schema.optionalKey<Schema.String>;
|
|
190
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
191
|
-
}>;
|
|
192
|
-
readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
193
|
-
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
194
|
-
}>]>>>;
|
|
195
|
-
}>;
|
|
196
|
-
export interface TransferInput extends Schema.Schema.Type<typeof TransferInput> {
|
|
197
|
-
}
|
|
198
|
-
export interface DispatchInput {
|
|
199
|
-
readonly executionId: Ids.ExecutionId;
|
|
200
|
-
readonly rootAddressId: Ids.AddressId;
|
|
201
|
-
readonly sessionId: Ids.SessionId;
|
|
202
|
-
readonly input: ReadonlyArray<Content.Part>;
|
|
203
|
-
readonly eventSequence: Execution.ExecutionEventSequence;
|
|
204
|
-
readonly startedAt: number;
|
|
205
|
-
readonly completedAt: number;
|
|
206
|
-
readonly agentId: Ids.AgentId;
|
|
207
|
-
readonly agentRevision: Agent.DefinitionRevision;
|
|
208
|
-
readonly agentSnapshot: Agent.Definition;
|
|
209
|
-
readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
|
|
210
|
-
readonly metadata: Shared.Metadata;
|
|
211
|
-
}
|
|
212
|
-
export interface Config {
|
|
213
|
-
readonly agent: Agent.Definition;
|
|
214
|
-
readonly agentId: Ids.AgentId;
|
|
215
|
-
readonly agentRevision: Agent.DefinitionRevision;
|
|
216
|
-
readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
|
|
217
|
-
readonly childRuns: ChildRunServiceInterface;
|
|
218
|
-
readonly eventLog: EventLogInterface;
|
|
219
|
-
readonly waits: WaitServiceInterface;
|
|
220
|
-
readonly dispatch: (input: DispatchInput) => Effect.Effect<void, ToolRuntimeError>;
|
|
221
|
-
}
|
|
222
|
-
export declare const enabled: (agent: Agent.Definition) => boolean;
|
|
223
|
-
export declare const registeredTool: (config: Config) => RegisteredTool;
|
|
224
|
-
export declare const transferToolName: (name: string) => string;
|
|
225
|
-
export declare const transferTools: (config: Config) => ReadonlyArray<RegisteredTool>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ChildExecutionRepository, EnvelopeRepository, ExecutionRepository, ToolCallRepository } from "@relayfx/store-sql/portable";
|
|
2
|
-
import { Entity } from "effect/unstable/cluster";
|
|
3
|
-
import { Rpc } from "effect/unstable/rpc";
|
|
4
|
-
import type { WorkflowEngine } from "effect/unstable/workflow";
|
|
5
|
-
import { Schema } from "effect";
|
|
6
|
-
import type { Effect } from "effect";
|
|
7
|
-
import { ExecutionWorkflowFailed, StartInput, StartResult } from "../workflow/execution-workflow";
|
|
8
|
-
import type { Service as ActiveExecutionRegistryService } from "../execution/active-execution-registry";
|
|
9
|
-
import type { Service as EventLogService } from "../execution/event-log-service";
|
|
10
|
-
import type { Service as ExecutionServiceService } from "../execution/execution-service";
|
|
11
|
-
import type { Service as ToolTransitionCoordinatorService } from "../tool/tool-transition-coordinator";
|
|
12
|
-
import type { Service as WaitServiceService } from "../wait/wait-service";
|
|
13
|
-
export declare const Start: Rpc.Rpc<"start", typeof StartInput, typeof StartResult, typeof ExecutionWorkflowFailed>;
|
|
14
|
-
export declare const SignalWait: Rpc.Rpc<"signalWait", Schema.Struct<{
|
|
15
|
-
readonly workflow_execution_id: Schema.String;
|
|
16
|
-
readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
|
|
17
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
|
|
18
|
-
};
|
|
19
|
-
readonly state: Schema.Literals<readonly ["resolved", "timed_out", "cancelled"]>;
|
|
20
|
-
readonly signaled_at: Schema.Int;
|
|
21
|
-
}>, Schema.Void, typeof ExecutionWorkflowFailed, never, never>;
|
|
22
|
-
export declare const Dispatch: Rpc.Rpc<"dispatch", typeof StartInput, typeof Schema.Void, typeof ExecutionWorkflowFailed>;
|
|
23
|
-
export declare const Cancel: Rpc.Rpc<"cancel", Schema.Struct<{
|
|
24
|
-
readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
|
|
25
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
26
|
-
};
|
|
27
|
-
readonly cancelled_at: Schema.Int;
|
|
28
|
-
readonly reason: Schema.optionalKey<Schema.String>;
|
|
29
|
-
}>, Schema.Struct<{
|
|
30
|
-
readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
|
|
31
|
-
make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
|
|
32
|
-
};
|
|
33
|
-
readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
|
|
34
|
-
}>, typeof ExecutionWorkflowFailed, never, never>;
|
|
35
|
-
type ExecutionRpc = typeof Start | typeof Dispatch | typeof SignalWait | typeof Cancel;
|
|
36
|
-
export declare const entity: Entity.Entity<"Relay/Execution", ExecutionRpc>;
|
|
37
|
-
export declare const layer: import("effect/Layer").Layer<never, never, ChildExecutionRepository.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ToolCallRepository.Service | EventLogService | WaitServiceService | ExecutionServiceService | ActiveExecutionRegistryService | ToolTransitionCoordinatorService | import("effect/unstable/cluster/Sharding").Sharding | WorkflowEngine.WorkflowEngine>;
|
|
38
|
-
export declare const client: Effect.Effect<(entityId: string) => import("effect/unstable/rpc/RpcClient").RpcClient.From<ExecutionRpc, import("effect/unstable/cluster/ClusterError").AlreadyProcessingMessage | import("effect/unstable/cluster/ClusterError").MailboxFull | import("effect/unstable/cluster/ClusterError").PersistenceError>, never, import("effect/unstable/cluster/Sharding").Sharding>;
|
|
39
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Content } from "../../schema/index";
|
|
2
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
-
declare const ArtifactNotResolvable_base: Schema.Class<ArtifactNotResolvable, Schema.TaggedStruct<"ArtifactNotResolvable", {
|
|
4
|
-
readonly artifact_id: Schema.String;
|
|
5
|
-
readonly reason: Schema.String;
|
|
6
|
-
}>, import("effect/Cause").YieldableError>;
|
|
7
|
-
export declare class ArtifactNotResolvable extends ArtifactNotResolvable_base {
|
|
8
|
-
}
|
|
9
|
-
export interface Interface {
|
|
10
|
-
readonly resolve: (part: Content.ArtifactReferencePart) => Effect.Effect<ReadonlyArray<Content.Part>, ArtifactNotResolvable>;
|
|
11
|
-
}
|
|
12
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/content/artifact-store-service/Service", Interface>;
|
|
13
|
-
export declare class Service extends Service_base {
|
|
14
|
-
}
|
|
15
|
-
export declare const passthroughLayer: Layer.Layer<Service>;
|
|
16
|
-
export interface MemoryInterface extends Interface {
|
|
17
|
-
readonly register: (artifact_id: string, parts: ReadonlyArray<Content.Part>) => Effect.Effect<void>;
|
|
18
|
-
}
|
|
19
|
-
declare const Memory_base: Context.ServiceClass<Memory, "@relayfx/runtime/content/artifact-store-service/Memory", MemoryInterface>;
|
|
20
|
-
export declare class Memory extends Memory_base {
|
|
21
|
-
}
|
|
22
|
-
export declare const memoryLayer: Layer.Layer<Service | Memory>;
|
|
23
|
-
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service>;
|
|
24
|
-
export declare const resolve: (part: Content.ArtifactReferencePart) => Effect.Effect<readonly Content.Part[], ArtifactNotResolvable, Service>;
|
|
25
|
-
export declare const register: (artifact_id: string, parts: readonly Content.Part[]) => Effect.Effect<void, never, Memory>;
|
|
26
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Content, Shared } from "../../schema/index";
|
|
2
|
-
import { Context, Effect, Layer, Schema } from "effect";
|
|
3
|
-
declare const BlobNotResolvable_base: Schema.Class<BlobNotResolvable, Schema.TaggedStruct<"BlobNotResolvable", {
|
|
4
|
-
readonly uri: Schema.String;
|
|
5
|
-
readonly reason: Schema.String;
|
|
6
|
-
}>, import("effect/Cause").YieldableError>;
|
|
7
|
-
export declare class BlobNotResolvable extends BlobNotResolvable_base {
|
|
8
|
-
}
|
|
9
|
-
declare const BlobStoreError_base: Schema.Class<BlobStoreError, Schema.TaggedStruct<"BlobStoreError", {
|
|
10
|
-
readonly message: Schema.String;
|
|
11
|
-
}>, import("effect/Cause").YieldableError>;
|
|
12
|
-
export declare class BlobStoreError extends BlobStoreError_base {
|
|
13
|
-
}
|
|
14
|
-
export type ResolvedBlob = {
|
|
15
|
-
readonly _tag: "Bytes";
|
|
16
|
-
readonly bytes: Uint8Array;
|
|
17
|
-
readonly mediaType: string;
|
|
18
|
-
readonly fileName?: string;
|
|
19
|
-
} | {
|
|
20
|
-
readonly _tag: "Url";
|
|
21
|
-
readonly url: string;
|
|
22
|
-
readonly mediaType: string;
|
|
23
|
-
readonly fileName?: string;
|
|
24
|
-
};
|
|
25
|
-
export interface PutBlobInput {
|
|
26
|
-
readonly bytes: Uint8Array;
|
|
27
|
-
readonly mediaType: string;
|
|
28
|
-
readonly fileName?: string;
|
|
29
|
-
readonly metadata?: Shared.Metadata;
|
|
30
|
-
}
|
|
31
|
-
export interface Interface {
|
|
32
|
-
readonly resolve: (part: Content.BlobReferencePart) => Effect.Effect<ResolvedBlob, BlobNotResolvable | BlobStoreError>;
|
|
33
|
-
readonly put: (input: PutBlobInput) => Effect.Effect<Content.BlobReferencePart, BlobStoreError>;
|
|
34
|
-
}
|
|
35
|
-
declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/content/blob-store-service/Service", Interface>;
|
|
36
|
-
export declare class Service extends Service_base {
|
|
37
|
-
}
|
|
38
|
-
export declare const passthroughLayer: Layer.Layer<Service>;
|
|
39
|
-
export declare const memoryLayer: Layer.Layer<Service>;
|
|
40
|
-
/**
|
|
41
|
-
* Wraps a custom store implementation as a layer.
|
|
42
|
-
*
|
|
43
|
-
* @experimental
|
|
44
|
-
*/
|
|
45
|
-
export declare const testLayer: (implementation: Interface) => Layer.Layer<Service>;
|
|
46
|
-
/**
|
|
47
|
-
* @experimental
|
|
48
|
-
*/
|
|
49
|
-
export declare const resolve: (part: Content.BlobReferencePart) => Effect.Effect<ResolvedBlob, BlobNotResolvable | BlobStoreError, Service>;
|
|
50
|
-
/**
|
|
51
|
-
* @experimental
|
|
52
|
-
*/
|
|
53
|
-
export declare const put: (input: PutBlobInput) => Effect.Effect<Content.BlobReferencePart, BlobStoreError, Service>;
|
|
54
|
-
export {};
|