@relayfx/sdk 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/ai.js +67 -37
  2. package/dist/http-server.js +22 -0
  3. package/dist/index-25gwk9tj.js +3423 -0
  4. package/dist/{index-3sv8mmz5.js → index-49fm2rdv.js} +23 -30
  5. package/dist/{index-c2skef55.js → index-8pa5e2yn.js} +16521 -18783
  6. package/dist/index-cphmds30.js +2852 -0
  7. package/dist/index-nb39b5ae.js +17 -0
  8. package/dist/index.js +315 -844
  9. package/dist/mysql.js +18 -18
  10. package/dist/postgres.js +724 -24
  11. package/dist/sqlite.js +57 -168
  12. package/dist/types/ai/index.d.ts +2 -1
  13. package/dist/types/ai/language-model/language-model-registration.d.ts +9 -6
  14. package/dist/types/relay/adapter-outbox.d.ts +1 -1
  15. package/dist/types/relay/ai.d.ts +34 -2
  16. package/dist/types/relay/child-fan-out-admission.d.ts +5 -0
  17. package/dist/types/relay/child-fan-out-host.d.ts +73 -0
  18. package/dist/types/relay/client-public.d.ts +481 -0
  19. package/dist/types/relay/client.d.ts +1 -478
  20. package/dist/types/relay/database-identity.d.ts +4 -0
  21. package/dist/types/relay/http-server.d.ts +95 -0
  22. package/dist/types/relay/index.d.ts +37 -14
  23. package/dist/types/relay/internal-client.d.ts +22 -0
  24. package/dist/types/relay/language-model-registration.d.ts +13 -0
  25. package/dist/types/relay/mysql.d.ts +6 -7
  26. package/dist/types/relay/operation.d.ts +4 -4
  27. package/dist/types/relay/postgres.d.ts +10 -7
  28. package/dist/types/relay/runtime-acquisition-error.d.ts +61 -0
  29. package/dist/types/relay/runtime-database-adapter.d.ts +8 -5
  30. package/dist/types/relay/runtime-database-owner.d.ts +13 -0
  31. package/dist/types/relay/runtime-database-public.d.ts +10 -0
  32. package/dist/types/relay/runtime.d.ts +77 -72
  33. package/dist/types/relay/sqlite-runtime.d.ts +5 -18
  34. package/dist/types/relay/sqlite.d.ts +4 -31
  35. package/dist/types/relay/state-version-conflict.d.ts +12 -0
  36. package/dist/types/relay/tool-runtime.d.ts +44 -0
  37. package/dist/types/relay/tool-worker.d.ts +2 -2
  38. package/dist/types/relay/workflow-definition-host.d.ts +32 -0
  39. package/dist/types/runtime/agent/agent-loop-error.d.ts +21 -0
  40. package/dist/types/runtime/agent/agent-loop-service.d.ts +6 -16
  41. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +3 -3
  42. package/dist/types/runtime/cluster/execution-entity.d.ts +3 -3
  43. package/dist/types/runtime/execution/execution-service.d.ts +3 -0
  44. package/dist/types/runtime/index.d.ts +1 -0
  45. package/dist/types/runtime/model/language-model-service.d.ts +5 -12
  46. package/dist/types/runtime/model/model-hub.d.ts +27 -0
  47. package/dist/types/runtime/presence/presence-contract.d.ts +24 -0
  48. package/dist/types/runtime/presence/presence-service.d.ts +6 -24
  49. package/dist/types/runtime/runner/runner-runtime-service.d.ts +29 -13
  50. package/dist/types/runtime/session/session-store-service.d.ts +4 -1
  51. package/dist/types/runtime/tool/tool-runtime-contract.d.ts +121 -0
  52. package/dist/types/runtime/tool/tool-runtime-service.d.ts +6 -120
  53. package/dist/types/runtime/workflow/execution-workflow.d.ts +22 -24
  54. package/dist/types/schema/agent-schema.d.ts +4 -1
  55. package/dist/types/schema/execution-schema.d.ts +13 -2
  56. package/dist/types/schema/index.d.ts +1 -0
  57. package/dist/types/schema/pagination-schema.d.ts +17 -0
  58. package/dist/types/schema/shared-schema.d.ts +4 -0
  59. package/dist/types/store-sql/schema/relay-schema.d.ts +12 -12
  60. package/dist/types/store-sql/session/session-repository.d.ts +54 -11
  61. package/package.json +17 -14
  62. package/dist/index-9k4k3wq1.js +0 -2860
  63. package/dist/index-d3dme13d.js +0 -141
  64. package/dist/types/relay/database.d.ts +0 -16
@@ -0,0 +1,481 @@
1
+ import { StateVersionConflict } from "./state-version-conflict";
2
+ export { StateVersionConflict } from "./state-version-conflict";
3
+ import type { Agent as BatonAgent } from "@batonfx/core";
4
+ import { Address, Agent, ChildOrchestration, Content, Entity, Envelope, Execution, Ids, Inbox, Presence, Shared, Skill, State, Tool, Workflow } from "../schema/index";
5
+ import { Context, Effect, Schema, Stream } from "effect";
6
+ import type { Tool as BatonTool } from "effect/unstable/ai";
7
+ import type { AckEnvelopeReadyInput, CancelExecutionAccepted, CancelExecutionInput, CancelScheduleInput, CancelScheduleResult, ClaimEnvelopeReadyInput, CreateScheduleInput, CreateScheduleResult, EnvelopeReadyAcked, EnvelopeReadyLease, EnvelopeReadyReleased, ExecutionInspection, ExecutionListChange, GetSessionInput, GetSessionResult, GetEntityStateInput, PutEntityStateInput, DeleteEntityStateInput, ListEntityStateInput, GetOrCreateEntityInput, GetEntityInput, DestroyEntityInput, ListEntitiesInput, ListExecutionsInput, ListExecutionsResult, ListInboxMessagesInput, ListTopicSubscriptionsInput, PublishTopicInput, SubscribeTopicInput, TopicPublishAccepted, TopicSubscription, UnsubscribeTopicInput, ListPendingApprovalsInput, SessionStreamItem, StreamSessionInput, WatchExecutionsInput, ListRunnersResult, ListSchedulesInput, ListSchedulesResult, ListSessionsInput, ListSessionsResult, ListWaitsInput, PendingToolApprovalList, PendingToolCallList, ListPendingToolCallsInput, FulfillToolCallInput, ClaimToolWorkInput, CompleteToolWorkInput, ReleaseToolWorkInput, ListToolAttemptsInput, ToolAttemptList, ToolOutcomeAccepted, ToolWorkLease, ToolWorkReleased, ReleaseEnvelopeReadyInput, PageExecutionEventsInput, PageExecutionEventsResult, ReplayExecutionInput, ReplayExecutionResult, ResolvePermissionInput, ResolveToolApprovalInput, RouteExecutionResult, StartExecutionInput, StartExecutionResult, SpawnChildRunInput, CancelChildFanOutInput, CancelChildFanOutResult, CreateChildFanOutInput, InspectChildFanOutInput, InspectChildFanOutResult, SteerAccepted, SteerInput, StreamExecutionInput, SubmitInboundEnvelopeAccepted, SubmitInboundEnvelopeInput, WaitView, WakeAccepted, WakeInput } from "./operation";
8
+ import { EventLogCursorNotFound } from "./operation";
9
+ export { EventLogCursorNotFound } from "./operation";
10
+ import { AwaitWaitInput, WaitOutcome } from "./operation";
11
+ import { FollowExecutionInput, FollowExecutionItem } from "./operation";
12
+ import { CommandReplyInvalid, CommandTimedOut, EntityNotFound } from "./command";
13
+ import type { Command } from "./command";
14
+ import { type RuntimeCapabilityUnavailable } from "./runtime-capability-policy";
15
+ declare const ClientError_base: Schema.Class<ClientError, Schema.TaggedStruct<"ClientError", {
16
+ readonly message: Schema.String;
17
+ }>, import("effect/Cause").YieldableError>;
18
+ export declare class ClientError extends ClientError_base {
19
+ }
20
+ declare const ExecutionNotFound_base: Schema.Class<ExecutionNotFound, Schema.TaggedStruct<"ExecutionNotFound", {
21
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
22
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
23
+ };
24
+ }>, import("effect/Cause").YieldableError>;
25
+ export declare class ExecutionNotFound extends ExecutionNotFound_base {
26
+ }
27
+ declare const EntityNamespaceReserved_base: Schema.Class<EntityNamespaceReserved, Schema.TaggedStruct<"EntityNamespaceReserved", {
28
+ readonly id: Schema.String;
29
+ readonly message: Schema.String;
30
+ }>, import("effect/Cause").YieldableError>;
31
+ export declare class EntityNamespaceReserved extends EntityNamespaceReserved_base {
32
+ }
33
+ declare const WaitKindMismatch_base: Schema.Class<WaitKindMismatch, Schema.TaggedStruct<"WaitKindMismatch", {
34
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
35
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
36
+ };
37
+ readonly expected: Schema.String;
38
+ readonly actual: Schema.String;
39
+ readonly message: Schema.String;
40
+ }>, import("effect/Cause").YieldableError>;
41
+ export declare class WaitKindMismatch extends WaitKindMismatch_base {
42
+ }
43
+ export interface AskEntityInput<Name extends string, I extends Schema.Top, O extends Schema.Top> {
44
+ readonly kind: Ids.EntityKindName;
45
+ readonly key: Ids.EntityKey;
46
+ readonly command: Command<Name, I, O>;
47
+ readonly input: I["Type"];
48
+ readonly from: Ids.AddressId;
49
+ readonly timeout?: string;
50
+ readonly metadata?: Shared.Metadata;
51
+ }
52
+ export interface StartExecutionByAddressInput {
53
+ readonly address_id: Ids.AddressId;
54
+ readonly session_id?: Ids.SessionId;
55
+ readonly input?: ReadonlyArray<Content.Part>;
56
+ readonly idempotency_key: Shared.NonEmptyString;
57
+ readonly execution_id?: Ids.ExecutionId;
58
+ readonly event_sequence?: Execution.ExecutionEventSequence;
59
+ readonly started_at: Shared.TimestampMillis;
60
+ readonly completed_at: Shared.TimestampMillis;
61
+ readonly wait_id?: Ids.WaitId;
62
+ readonly metadata?: Shared.Metadata;
63
+ }
64
+ export interface StartExecutionByAgentDefinitionInput {
65
+ readonly root_address_id: Ids.AddressId;
66
+ readonly session_id?: Ids.SessionId;
67
+ readonly agent_id: Ids.AgentId;
68
+ readonly agent_revision: Agent.DefinitionRevision;
69
+ readonly input?: ReadonlyArray<Content.Part>;
70
+ readonly idempotency_key: Shared.NonEmptyString;
71
+ readonly execution_id?: Ids.ExecutionId;
72
+ readonly event_sequence?: Execution.ExecutionEventSequence;
73
+ readonly started_at: Shared.TimestampMillis;
74
+ readonly completed_at: Shared.TimestampMillis;
75
+ readonly wait_id?: Ids.WaitId;
76
+ readonly metadata?: Shared.Metadata;
77
+ }
78
+ export interface RegisterDefinedAgentInput extends Agent.DefineInput {
79
+ readonly address?: Ids.AddressId;
80
+ }
81
+ export interface RegisterBatonAgentInput<Tools extends Record<string, BatonTool.Any>, Requirements> {
82
+ readonly id: Ids.AgentId;
83
+ readonly address?: Ids.AddressId;
84
+ readonly agent: BatonAgent.Agent<Tools, Requirements>;
85
+ readonly model?: Agent.ModelSelection;
86
+ readonly permissions?: ReadonlyArray<Tool.Permission>;
87
+ readonly skill_definition_ids?: ReadonlyArray<Ids.SkillDefinitionId>;
88
+ readonly permission_rules?: Agent.PermissionRuleset;
89
+ readonly compaction_policy?: Agent.CompactionPolicy;
90
+ readonly max_tool_turns?: number;
91
+ readonly max_wait_turns?: number;
92
+ readonly token_budget?: number;
93
+ readonly child_run_presets?: Readonly<Record<string, Agent.ChildRunPreset>>;
94
+ readonly handoff_targets?: ReadonlyArray<Agent.HandoffTarget>;
95
+ readonly output_schema_ref?: string;
96
+ readonly metadata?: Shared.Metadata;
97
+ }
98
+ export type RegisterAgentInput<Tools extends Record<string, BatonTool.Any>, Requirements> = RegisterDefinedAgentInput | RegisterBatonAgentInput<Tools, Requirements>;
99
+ export interface RegisterAgent {
100
+ <Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>): Effect.Effect<Agent.DefinitionRegistered, ClientError>;
101
+ (input: RegisterDefinedAgentInput): Effect.Effect<Agent.DefinitionRegistered, ClientError>;
102
+ }
103
+ export interface Interface {
104
+ readonly registerEntityKind: (input: Entity.KindDefinition) => Effect.Effect<Entity.KindDefinition, ClientError>;
105
+ readonly getOrCreateEntity: (input: GetOrCreateEntityInput) => Effect.Effect<Entity.Instance, ClientError>;
106
+ readonly getEntity: (input: GetEntityInput) => Effect.Effect<Entity.Instance | undefined, ClientError>;
107
+ readonly destroyEntity: (input: DestroyEntityInput) => Effect.Effect<Entity.Instance, ClientError>;
108
+ readonly listEntities: (input: ListEntitiesInput) => Effect.Effect<ReadonlyArray<Entity.Instance>, ClientError>;
109
+ readonly registerWorkflowDefinition: (input: Workflow.RegisterDefinitionPayload) => Effect.Effect<Workflow.DefinitionRegistered, ClientError>;
110
+ readonly getWorkflowDefinitionRevision: (id: Ids.WorkflowDefinitionId, revision?: Workflow.DefinitionRevision) => Effect.Effect<Workflow.DefinitionRevisionRecord | undefined, ClientError>;
111
+ readonly listWorkflowDefinitionRevisions: (id: Ids.WorkflowDefinitionId) => Effect.Effect<Workflow.DefinitionRevisionList, ClientError>;
112
+ readonly startWorkflowRun: (input: Workflow.StartRunPayload) => Effect.Effect<Workflow.RunRecord, ClientError | RuntimeCapabilityUnavailable>;
113
+ readonly inspectWorkflowRun: (id: Ids.ExecutionId) => Effect.Effect<Workflow.RunRecord | undefined, ClientError>;
114
+ readonly replayWorkflowRun: (id: Ids.ExecutionId) => Effect.Effect<ReadonlyArray<Workflow.LifecycleEvent>, ClientError>;
115
+ readonly cancelWorkflowRun: (id: Ids.ExecutionId) => Effect.Effect<Workflow.RunRecord | undefined, ClientError>;
116
+ readonly registerAgent: RegisterAgent;
117
+ readonly registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError>;
118
+ readonly getAgentDefinition: (id: Ids.AgentId) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError>;
119
+ readonly listAgentDefinitions: (_?: void) => Effect.Effect<Agent.DefinitionList, ClientError>;
120
+ readonly listAgentDefinitionRevisions: (id: Ids.AgentId) => Effect.Effect<Agent.DefinitionRevisionList, ClientError>;
121
+ readonly getSkillDefinition: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRecord | undefined, ClientError>;
122
+ readonly listSkillDefinitions: (_?: void) => Effect.Effect<Skill.DefinitionList, ClientError>;
123
+ readonly listSkillDefinitionRevisions: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRevisionList, ClientError>;
124
+ readonly registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, EntityNamespaceReserved | ClientError>;
125
+ readonly getAddressBookRoute: (id: Ids.AddressId) => Effect.Effect<Address.RouteRecord | undefined, ClientError>;
126
+ readonly listAddressBookRoutes: (_?: void) => Effect.Effect<Address.RouteList, ClientError>;
127
+ readonly startExecution: (input: StartExecutionInput) => Effect.Effect<StartExecutionResult, EntityNamespaceReserved | ClientError>;
128
+ readonly startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<StartExecutionResult, EntityNamespaceReserved | ClientError>;
129
+ readonly startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<StartExecutionResult, EntityNamespaceReserved | ClientError>;
130
+ readonly cancelExecution: (input: CancelExecutionInput) => Effect.Effect<CancelExecutionAccepted, ClientError>;
131
+ readonly steer: (input: SteerInput) => Effect.Effect<SteerAccepted, ClientError>;
132
+ readonly getExecution: (id: Ids.ExecutionId) => Effect.Effect<Execution.Execution | undefined, ClientError>;
133
+ readonly inspectExecution: (executionId: Ids.ExecutionId) => Effect.Effect<ExecutionInspection, ExecutionNotFound | ClientError>;
134
+ readonly listExecutions: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ClientError>;
135
+ readonly listInboxMessages: (input: ListInboxMessagesInput) => Effect.Effect<ReadonlyArray<Inbox.Message>, ClientError>;
136
+ readonly subscribeTopic: (input: SubscribeTopicInput) => Effect.Effect<TopicSubscription, ClientError>;
137
+ readonly unsubscribeTopic: (input: UnsubscribeTopicInput) => Effect.Effect<void, ClientError>;
138
+ readonly publishTopic: (input: PublishTopicInput) => Effect.Effect<TopicPublishAccepted, ClientError>;
139
+ readonly listTopicSubscriptions: (input: ListTopicSubscriptionsInput) => Effect.Effect<ReadonlyArray<TopicSubscription>, ClientError>;
140
+ readonly listSessions: (input: ListSessionsInput) => Effect.Effect<ListSessionsResult, ClientError>;
141
+ readonly getSession: (input: GetSessionInput) => Effect.Effect<GetSessionResult, ClientError>;
142
+ readonly listWaits: (input: ListWaitsInput) => Effect.Effect<ReadonlyArray<WaitView>, ClientError>;
143
+ readonly replayExecution: (input: ReplayExecutionInput) => Effect.Effect<ReplayExecutionResult, ClientError>;
144
+ readonly pageExecutionEvents: (input: PageExecutionEventsInput) => Effect.Effect<PageExecutionEventsResult, EventLogCursorNotFound | ClientError>;
145
+ readonly listRunners: (_?: void) => Effect.Effect<ListRunnersResult, ClientError>;
146
+ readonly routeExecution: (executionId: Ids.ExecutionId) => Effect.Effect<RouteExecutionResult, ClientError>;
147
+ readonly send: (input: Envelope.SendInput) => Effect.Effect<Envelope.EnvelopeAccepted, ClientError>;
148
+ readonly askEntity: <Name extends string, I extends Schema.Top, O extends Schema.Top>(input: AskEntityInput<Name, I, O>) => Effect.Effect<O["Type"], CommandTimedOut | CommandReplyInvalid | EntityNotFound | ClientError, I["EncodingServices"] | O["DecodingServices"]>;
149
+ readonly awaitWait: (input: AwaitWaitInput) => Effect.Effect<WaitOutcome, ClientError>;
150
+ readonly streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, EventLogCursorNotFound | ClientError>;
151
+ readonly followExecution: (input: FollowExecutionInput) => Stream.Stream<FollowExecutionItem, EventLogCursorNotFound | ClientError>;
152
+ readonly streamSession: (input: StreamSessionInput) => Stream.Stream<SessionStreamItem, EventLogCursorNotFound | ClientError>;
153
+ readonly watchExecutions: (input: WatchExecutionsInput) => Stream.Stream<ExecutionListChange, ClientError>;
154
+ readonly getEntityState: (input: GetEntityStateInput) => Effect.Effect<State.StateRecordView | undefined, ClientError>;
155
+ readonly putEntityState: (input: PutEntityStateInput) => Effect.Effect<State.StateRecordView, StateVersionConflict | ClientError>;
156
+ readonly deleteEntityState: (input: DeleteEntityStateInput) => Effect.Effect<State.StateRecordView | undefined, StateVersionConflict | ClientError>;
157
+ readonly listEntityState: (input: ListEntityStateInput) => Effect.Effect<ReadonlyArray<State.StateRecordView>, ClientError>;
158
+ readonly getPresence: (scope: Presence.Scope) => Effect.Effect<Presence.View, ClientError>;
159
+ readonly watchPresence: (scope: Presence.Scope) => Stream.Stream<Presence.View, ClientError>;
160
+ readonly wake: (input: WakeInput) => Effect.Effect<WakeAccepted, WaitKindMismatch | ClientError>;
161
+ readonly listPendingApprovals: (input: ListPendingApprovalsInput) => Effect.Effect<PendingToolApprovalList, ClientError>;
162
+ readonly resolveToolApproval: (input: ResolveToolApprovalInput) => Effect.Effect<WakeAccepted, WaitKindMismatch | ClientError>;
163
+ readonly resolvePermission: (input: ResolvePermissionInput) => Effect.Effect<WakeAccepted, WaitKindMismatch | ClientError>;
164
+ readonly listPendingToolCalls: (input: ListPendingToolCallsInput) => Effect.Effect<PendingToolCallList, ClientError>;
165
+ readonly fulfillToolCall: (input: FulfillToolCallInput) => Effect.Effect<ToolOutcomeAccepted, ClientError>;
166
+ readonly claimToolWork: (input: ClaimToolWorkInput) => Effect.Effect<ToolWorkLease | null, ClientError>;
167
+ readonly completeToolWork: (input: CompleteToolWorkInput) => Effect.Effect<ToolOutcomeAccepted, ClientError>;
168
+ readonly releaseToolWork: (input: ReleaseToolWorkInput) => Effect.Effect<ToolWorkReleased, ClientError>;
169
+ readonly listToolAttempts: (input: ListToolAttemptsInput) => Effect.Effect<ToolAttemptList, ClientError>;
170
+ readonly submitInboundEnvelope: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, WaitKindMismatch | ClientError>;
171
+ readonly spawnChildRun: (input: SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError>;
172
+ readonly createChildFanOut: (input: CreateChildFanOutInput) => Effect.Effect<ChildOrchestration.FanOutState, ClientError | RuntimeCapabilityUnavailable>;
173
+ readonly cancelChildFanOut: (input: CancelChildFanOutInput) => Effect.Effect<CancelChildFanOutResult, ClientError>;
174
+ readonly inspectChildFanOut: (input: InspectChildFanOutInput) => Effect.Effect<InspectChildFanOutResult, ClientError>;
175
+ readonly claimEnvelopeReady: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError>;
176
+ readonly ackEnvelopeReady: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError>;
177
+ readonly releaseEnvelopeReady: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError>;
178
+ readonly createSchedule: (input: CreateScheduleInput) => Effect.Effect<CreateScheduleResult, ClientError>;
179
+ readonly cancelSchedule: (input: CancelScheduleInput) => Effect.Effect<CancelScheduleResult, ClientError>;
180
+ readonly listSchedules: (input: ListSchedulesInput) => Effect.Effect<ListSchedulesResult, ClientError>;
181
+ }
182
+ export type Identifier = "@relayfx/sdk/client-public/Service";
183
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/client-public/Service", Interface>;
184
+ export declare class Service extends Service_base {
185
+ }
186
+ export interface FollowExecutionDependencies {
187
+ readonly getExecution: (id: Ids.ExecutionId) => Effect.Effect<Execution.Execution | undefined, ClientError>;
188
+ readonly inspectExecution: (executionId: Ids.ExecutionId) => Effect.Effect<ExecutionInspection, ExecutionNotFound | ClientError>;
189
+ readonly streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, EventLogCursorNotFound | ClientError>;
190
+ }
191
+ export declare const followExecutionFrom: (dependencies: FollowExecutionDependencies) => (input: FollowExecutionInput) => Stream.Stream<FollowExecutionItem, EventLogCursorNotFound | ClientError>;
192
+ export declare const registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
193
+ export declare const registerEntityKind: (input: Entity.KindDefinition) => Effect.Effect<Entity.KindDefinition, ClientError, Service>;
194
+ export declare const getOrCreateEntity: (input: GetOrCreateEntityInput) => Effect.Effect<Entity.Instance, ClientError, Service>;
195
+ export declare const getEntity: (input: GetEntityInput) => Effect.Effect<Entity.Instance | undefined, ClientError, Service>;
196
+ export declare const destroyEntity: (input: DestroyEntityInput) => Effect.Effect<Entity.Instance, ClientError, Service>;
197
+ export declare const listEntities: (input: ListEntitiesInput) => Effect.Effect<readonly Entity.Instance[], ClientError, Service>;
198
+ export declare function registerAgent<Tools extends Record<string, BatonTool.Any>, Requirements>(input: RegisterBatonAgentInput<Tools, Requirements>): Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
199
+ export declare function registerAgent(input: RegisterDefinedAgentInput): Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
200
+ export declare const getAgentDefinition: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError, Service>;
201
+ export declare const listAgentDefinitions: () => Effect.Effect<Agent.DefinitionList, ClientError, Service>;
202
+ export declare const listAgentDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRevisionList, ClientError, Service>;
203
+ export declare const getSkillDefinition: (id: string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">) => Effect.Effect<Skill.DefinitionRecord | undefined, ClientError, Service>;
204
+ export declare const listSkillDefinitions: () => Effect.Effect<Skill.DefinitionList, ClientError, Service>;
205
+ export declare const listSkillDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">) => Effect.Effect<Skill.DefinitionRevisionList, ClientError, Service>;
206
+ export declare const registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError | EntityNamespaceReserved, Service>;
207
+ export declare const getAddressBookRoute: (id: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Address.RouteRecord | undefined, ClientError, Service>;
208
+ export declare const listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError, Service>;
209
+ export declare const startExecution: (input: StartExecutionInput) => Effect.Effect<StartExecutionResult, ClientError | EntityNamespaceReserved, Service>;
210
+ export declare const startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<StartExecutionResult, ClientError | EntityNamespaceReserved, Service>;
211
+ export declare const startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<StartExecutionResult, ClientError | EntityNamespaceReserved, Service>;
212
+ export declare const cancelExecution: (input: CancelExecutionInput) => Effect.Effect<CancelExecutionAccepted, ClientError, Service>;
213
+ export declare const steer: (input: SteerInput) => Effect.Effect<SteerAccepted, ClientError, Service>;
214
+ export declare const getExecution: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Execution.Execution | undefined, ClientError, Service>;
215
+ export declare const listExecutions: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ClientError, Service>;
216
+ export declare const listSessions: (input: ListSessionsInput) => Effect.Effect<ListSessionsResult, ClientError, Service>;
217
+ export declare const getSession: (input: GetSessionInput) => Effect.Effect<GetSessionResult, ClientError, Service>;
218
+ export declare const listWaits: (input: ListWaitsInput) => Effect.Effect<readonly WaitView[], ClientError, Service>;
219
+ export declare const replayExecution: (input: ReplayExecutionInput) => Effect.Effect<ReplayExecutionResult, ClientError, Service>;
220
+ export declare const pageExecutionEvents: (input: PageExecutionEventsInput) => Effect.Effect<PageExecutionEventsResult, ClientError | EventLogCursorNotFound, Service>;
221
+ export declare const listRunners: () => Effect.Effect<ListRunnersResult, ClientError, Service>;
222
+ export declare const routeExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<RouteExecutionResult, ClientError, Service>;
223
+ export declare const subscribeTopic: (input: SubscribeTopicInput) => Effect.Effect<TopicSubscription, ClientError, Service>;
224
+ export declare const unsubscribeTopic: (input: UnsubscribeTopicInput) => Effect.Effect<void, ClientError, Service>;
225
+ export declare const publishTopic: (input: PublishTopicInput) => Effect.Effect<TopicPublishAccepted, ClientError, Service>;
226
+ export declare const listTopicSubscriptions: (input: ListTopicSubscriptionsInput) => Effect.Effect<readonly TopicSubscription[], ClientError, Service>;
227
+ export declare const listInboxMessages: (input: ListInboxMessagesInput) => Effect.Effect<readonly Inbox.Message[], ClientError, Service>;
228
+ export declare const inspectExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<ExecutionInspection, ClientError | ExecutionNotFound, Service>;
229
+ export declare const send: (input: Envelope.SendInput) => Effect.Effect<Envelope.EnvelopeAccepted, ClientError, Service>;
230
+ export declare const streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, ClientError | EventLogCursorNotFound, Service>;
231
+ export declare const followExecution: (input: FollowExecutionInput) => Stream.Stream<Schema.Struct.ReadonlySide<{
232
+ readonly _tag: Schema.tag<"event">;
233
+ readonly event: Schema.Struct<{
234
+ readonly id: Schema.brand<Schema.String, "Relay.EventId"> & {
235
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EventId">;
236
+ };
237
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
238
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
239
+ };
240
+ readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
241
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
242
+ }>;
243
+ readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.toolcall.delta", "model.output.completed", "model.usage.reported", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
244
+ readonly sequence: Schema.Int;
245
+ readonly cursor: Schema.String;
246
+ readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
247
+ readonly type: Schema.Literal<"text">;
248
+ readonly text: Schema.String;
249
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
250
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
251
+ }>, Schema.Struct<{
252
+ readonly type: Schema.Literal<"structured">;
253
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
254
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
255
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
256
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
257
+ }>, Schema.Struct<{
258
+ readonly type: Schema.Literal<"blob-reference">;
259
+ readonly uri: Schema.String;
260
+ readonly media_type: Schema.String;
261
+ readonly filename: Schema.optionalKey<Schema.String>;
262
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
263
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
264
+ }>, Schema.Struct<{
265
+ readonly type: Schema.Literal<"artifact-reference">;
266
+ readonly artifact_id: Schema.String;
267
+ readonly media_type: Schema.optionalKey<Schema.String>;
268
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
269
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
270
+ }>, Schema.Struct<{
271
+ readonly type: Schema.Literal<"tool-call">;
272
+ readonly call: Schema.Struct<{
273
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
274
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
275
+ };
276
+ readonly name: Schema.String;
277
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
278
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
279
+ }>;
280
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
281
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
282
+ }>, Schema.Struct<{
283
+ readonly type: Schema.Literal<"tool-result">;
284
+ readonly result: Schema.Struct<{
285
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
286
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
287
+ };
288
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
289
+ readonly error: Schema.optionalKey<Schema.String>;
290
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
291
+ }>;
292
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
293
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
294
+ }>]>>>;
295
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
296
+ readonly created_at: Schema.Int;
297
+ }>;
298
+ }, "Type"> | Schema.Struct.ReadonlySide<{
299
+ readonly _tag: Schema.tag<"reconnecting">;
300
+ readonly message: Schema.String;
301
+ readonly attempt: Schema.Int;
302
+ }, "Type"> | Schema.Struct.ReadonlySide<{
303
+ readonly _tag: Schema.tag<"stopped">;
304
+ readonly reason: Schema.Union<readonly [Schema.Struct<{
305
+ readonly _tag: Schema.tag<"terminal">;
306
+ readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
307
+ }>, Schema.Struct<{
308
+ readonly _tag: Schema.tag<"actionable_wait">;
309
+ readonly wait: Schema.Struct<{
310
+ readonly wait_id: Schema.brand<Schema.String, "Relay.WaitId"> & {
311
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
312
+ };
313
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
314
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
315
+ };
316
+ readonly envelope_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.EnvelopeId"> & {
317
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EnvelopeId">;
318
+ }>;
319
+ readonly kind: Schema.optionalKey<Schema.Literals<readonly ["permission", "tool_approval", "tool_placement", "child_join", "inbox", "reply", "timer", "external"]>>;
320
+ readonly mode: Schema.Literals<readonly ["reply", "event", "until", "child"]>;
321
+ readonly correlation_key: Schema.optionalKey<Schema.String>;
322
+ readonly state: Schema.Literals<readonly ["open", "resolved", "timed_out", "cancelled"]>;
323
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
324
+ readonly created_at: Schema.Int;
325
+ readonly resolved_at: Schema.optionalKey<Schema.Int>;
326
+ }>;
327
+ }>]>;
328
+ readonly cursor: Schema.NullOr<Schema.String>;
329
+ }, "Type">, ClientError | EventLogCursorNotFound, Service>;
330
+ export declare const streamSession: (input: StreamSessionInput) => Stream.Stream<Schema.Struct.ReadonlySide<{
331
+ readonly _tag: Schema.tag<"execution_joined">;
332
+ readonly execution: Schema.Struct<{
333
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
334
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
335
+ };
336
+ readonly root_address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
337
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
338
+ };
339
+ readonly session_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.SessionId"> & {
340
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionId">;
341
+ }>;
342
+ readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
343
+ readonly kind: Schema.Literals<readonly ["user-agent", "agent-agent"]>;
344
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
345
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
346
+ }>;
347
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
348
+ readonly created_at: Schema.Int;
349
+ readonly updated_at: Schema.Int;
350
+ }>;
351
+ }, "Type"> | Schema.Struct.ReadonlySide<{
352
+ readonly _tag: Schema.tag<"execution_event">;
353
+ readonly event: Schema.Struct<{
354
+ readonly id: Schema.brand<Schema.String, "Relay.EventId"> & {
355
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.EventId">;
356
+ };
357
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
358
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
359
+ };
360
+ readonly child_execution_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.ChildExecutionId"> & {
361
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ChildExecutionId">;
362
+ }>;
363
+ readonly type: Schema.Literals<readonly ["execution.accepted", "execution.started", "execution.completed", "execution.failed", "execution.cancelled", "model.input.prepared", "model.output.delta", "model.reasoning.delta", "model.toolcall.delta", "model.output.completed", "model.usage.reported", "agent.compaction.committed", "budget.exceeded", "tool.call.requested", "tool.result.received", "tool.approval.requested", "tool.approval.resolved", "permission.ask.requested", "permission.ask.resolved", "steering.received", "state.updated", "state.deleted", "inbox.enqueued", "inbox.drained", "entity.created", "entity.destroyed", "envelope.accepted", "envelope.routed", "envelope.ready", "delivery.attempt", "wait.created", "wait.woken", "wait.timed_out", "wait.cancelled", "child_run.spawned", "child_run.event", "child_fan_out.created", "child_fan_out.member.admitted", "child_fan_out.member.terminal", "child_fan_out.terminal", "workspace.lease.planned", "workspace.lease.acquired", "workspace.suspended", "workspace.resumed", "workspace.snapshot.created", "workspace.lease.released", "workspace.lease.failed"]>;
364
+ readonly sequence: Schema.Int;
365
+ readonly cursor: Schema.String;
366
+ readonly content: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
367
+ readonly type: Schema.Literal<"text">;
368
+ readonly text: Schema.String;
369
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
370
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
371
+ }>, Schema.Struct<{
372
+ readonly type: Schema.Literal<"structured">;
373
+ readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
374
+ readonly schema_ref: Schema.optionalKey<Schema.String>;
375
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
376
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
377
+ }>, Schema.Struct<{
378
+ readonly type: Schema.Literal<"blob-reference">;
379
+ readonly uri: Schema.String;
380
+ readonly media_type: Schema.String;
381
+ readonly filename: Schema.optionalKey<Schema.String>;
382
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
383
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
384
+ }>, Schema.Struct<{
385
+ readonly type: Schema.Literal<"artifact-reference">;
386
+ readonly artifact_id: Schema.String;
387
+ readonly media_type: Schema.optionalKey<Schema.String>;
388
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
389
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
390
+ }>, Schema.Struct<{
391
+ readonly type: Schema.Literal<"tool-call">;
392
+ readonly call: Schema.Struct<{
393
+ readonly id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
394
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
395
+ };
396
+ readonly name: Schema.String;
397
+ readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
398
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
399
+ }>;
400
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
401
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
402
+ }>, Schema.Struct<{
403
+ readonly type: Schema.Literal<"tool-result">;
404
+ readonly result: Schema.Struct<{
405
+ readonly call_id: Schema.brand<Schema.String, "Relay.ToolCallId"> & {
406
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ToolCallId">;
407
+ };
408
+ readonly output: Schema.Codec<Schema.Json, Schema.Json, never, never>;
409
+ readonly error: Schema.optionalKey<Schema.String>;
410
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
411
+ }>;
412
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
413
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
414
+ }>]>>>;
415
+ readonly data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
416
+ readonly created_at: Schema.Int;
417
+ }>;
418
+ }, "Type">, ClientError | EventLogCursorNotFound, Service>;
419
+ export declare const watchExecutions: (input: WatchExecutionsInput) => Stream.Stream<Schema.Struct.ReadonlySide<{
420
+ readonly _tag: Schema.tag<"upsert">;
421
+ readonly record: Schema.Struct<{
422
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
423
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
424
+ };
425
+ readonly root_address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
426
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
427
+ };
428
+ readonly session_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.SessionId"> & {
429
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.SessionId">;
430
+ }>;
431
+ readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
432
+ readonly kind: Schema.Literals<readonly ["user-agent", "agent-agent"]>;
433
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
434
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
435
+ }>;
436
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
437
+ readonly created_at: Schema.Int;
438
+ readonly updated_at: Schema.Int;
439
+ }>;
440
+ }, "Type"> | {
441
+ readonly _tag: "snapshot";
442
+ readonly records: readonly {
443
+ readonly execution_id: string & import("effect/Brand").Brand<"Relay.ExecutionId">;
444
+ readonly root_address_id: string & import("effect/Brand").Brand<"Relay.AddressId">;
445
+ readonly session_id?: string & import("effect/Brand").Brand<"Relay.SessionId">;
446
+ readonly status: "cancelled" | "completed" | "failed" | "queued" | "running" | "waiting";
447
+ readonly kind: "agent-agent" | "user-agent";
448
+ readonly agent_id?: string & import("effect/Brand").Brand<"Relay.AgentId">;
449
+ readonly metadata: {
450
+ readonly [x: string]: Schema.Json;
451
+ };
452
+ readonly created_at: number;
453
+ readonly updated_at: number;
454
+ }[];
455
+ readonly next_cursor?: string;
456
+ }, ClientError, Service>;
457
+ export declare const getPresence: (scope: Presence.Scope) => Effect.Effect<Presence.View, ClientError, Service>;
458
+ export declare const watchPresence: (scope: Presence.Scope) => Stream.Stream<Presence.View, ClientError, Service>;
459
+ export declare const wake: (input: WakeInput) => Effect.Effect<WakeAccepted, ClientError | WaitKindMismatch, Service>;
460
+ export declare const listPendingApprovals: (input: ListPendingApprovalsInput) => Effect.Effect<PendingToolApprovalList, ClientError, Service>;
461
+ export declare const resolveToolApproval: (input: ResolveToolApprovalInput) => Effect.Effect<WakeAccepted, ClientError | WaitKindMismatch, Service>;
462
+ export declare const resolvePermission: (input: ResolvePermissionInput) => Effect.Effect<WakeAccepted, ClientError | WaitKindMismatch, Service>;
463
+ export declare const listPendingToolCalls: (input: ListPendingToolCallsInput) => Effect.Effect<PendingToolCallList, ClientError, Service>;
464
+ export declare const fulfillToolCall: (input: FulfillToolCallInput) => Effect.Effect<ToolOutcomeAccepted, ClientError, Service>;
465
+ export declare const claimToolWork: (input: ClaimToolWorkInput) => Effect.Effect<ToolWorkLease | null, ClientError, Service>;
466
+ export declare const completeToolWork: (input: CompleteToolWorkInput) => Effect.Effect<ToolOutcomeAccepted, ClientError, Service>;
467
+ export declare const releaseToolWork: (input: ReleaseToolWorkInput) => Effect.Effect<ToolWorkReleased, ClientError, Service>;
468
+ export declare const listToolAttempts: (input: ListToolAttemptsInput) => Effect.Effect<ToolAttemptList, ClientError, Service>;
469
+ export declare const submitInboundEnvelope: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, ClientError | WaitKindMismatch, Service>;
470
+ export declare const spawnChildRun: (input: SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError, Service>;
471
+ export declare const createChildFanOut: (input: CreateChildFanOutInput) => Effect.Effect<ChildOrchestration.FanOutState, ClientError | RuntimeCapabilityUnavailable, Service>;
472
+ export declare const cancelChildFanOut: (input: CancelChildFanOutInput) => Effect.Effect<CancelChildFanOutResult, ClientError, Service>;
473
+ export declare const inspectChildFanOut: (input: InspectChildFanOutInput) => Effect.Effect<InspectChildFanOutResult, ClientError, Service>;
474
+ export declare const claimEnvelopeReady: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError, Service>;
475
+ export declare const ackEnvelopeReady: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError, Service>;
476
+ export declare const releaseEnvelopeReady: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError, Service>;
477
+ export declare const createSchedule: (input: CreateScheduleInput) => Effect.Effect<CreateScheduleResult, ClientError, Service>;
478
+ export declare const cancelSchedule: (input: CancelScheduleInput) => Effect.Effect<CancelScheduleResult, ClientError, Service>;
479
+ export declare const listSchedules: (input: ListSchedulesInput) => Effect.Effect<ListSchedulesResult, ClientError, Service>;
480
+ export declare const askEntity: <Name extends string, I extends Schema.Top, O extends Schema.Top>(input: AskEntityInput<Name, I, O>) => Effect.Effect<O["Type"], ClientError | CommandReplyInvalid | CommandTimedOut | EntityNotFound, Service | I["EncodingServices"] | O["DecodingServices"]>;
481
+ export declare const awaitWait: (input: AwaitWaitInput) => Effect.Effect<WaitOutcome, ClientError, Service>;