@relayfx/sdk 0.0.39 → 0.0.40

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 (70) hide show
  1. package/dist/index.js +1185 -1086
  2. package/dist/migrations/20260709030349_agent_id_rename/migration.sql +8 -0
  3. package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +4883 -0
  4. package/dist/migrations/mysql/0001_baseline.sql +8 -8
  5. package/dist/migrations/pg/20260709030349_agent_id_rename/migration.sql +8 -0
  6. package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +4883 -0
  7. package/dist/migrations/sqlite/0001_baseline.sql +8 -8
  8. package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +2 -4
  9. package/dist/types/relay/adapter-outbox.d.ts +11 -11
  10. package/dist/types/relay/client.d.ts +50 -163
  11. package/dist/types/relay/database.d.ts +11 -10
  12. package/dist/types/relay/operation.d.ts +7 -7
  13. package/dist/types/runtime/address/address-resolution-service.d.ts +7 -7
  14. package/dist/types/runtime/agent/agent-loop-service.d.ts +15 -15
  15. package/dist/types/runtime/agent/prompt-assembler-service.d.ts +6 -44
  16. package/dist/types/runtime/agent/relay-approvals.d.ts +0 -19
  17. package/dist/types/runtime/agent/relay-instructions.d.ts +0 -15
  18. package/dist/types/runtime/agent/relay-permissions.d.ts +4 -4
  19. package/dist/types/runtime/agent/relay-steering.d.ts +2 -2
  20. package/dist/types/runtime/agent/relay-tool-executor.d.ts +5 -21
  21. package/dist/types/runtime/agent/relay-tool-output.d.ts +5 -5
  22. package/dist/types/runtime/agent/sequence-allocator.d.ts +0 -19
  23. package/dist/types/runtime/child/child-run-service.d.ts +2 -2
  24. package/dist/types/runtime/child/parent-notifier-service.d.ts +4 -4
  25. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +14 -14
  26. package/dist/types/runtime/cluster/execution-entity.d.ts +25 -25
  27. package/dist/types/runtime/content/artifact-store-service.d.ts +0 -47
  28. package/dist/types/runtime/content/blob-store-service.d.ts +0 -33
  29. package/dist/types/runtime/envelope/envelope-service.d.ts +4 -4
  30. package/dist/types/runtime/execution/event-log-service.d.ts +0 -5
  31. package/dist/types/runtime/execution/execution-service.d.ts +9 -8
  32. package/dist/types/runtime/memory/memory-service.d.ts +5 -4
  33. package/dist/types/runtime/model/embedding-model-service.d.ts +3 -3
  34. package/dist/types/runtime/model/language-model-service.d.ts +0 -30
  35. package/dist/types/runtime/model/model-call-policy.d.ts +0 -58
  36. package/dist/types/runtime/runner/runner-runtime-service.d.ts +63 -74
  37. package/dist/types/runtime/schedule/scheduler-service.d.ts +5 -5
  38. package/dist/types/runtime/schema-registry/schema-registry-service.d.ts +0 -40
  39. package/dist/types/runtime/tool/tool-runtime-service.d.ts +6 -6
  40. package/dist/types/runtime/wait/wait-service.d.ts +2 -2
  41. package/dist/types/runtime/wait/wait-signal.d.ts +3 -3
  42. package/dist/types/runtime/workflow/execution-workflow.d.ts +15 -20
  43. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +16 -15
  44. package/dist/types/runtime/workspace/workspace-runtime-service.d.ts +4 -4
  45. package/dist/types/schema/agent-schema.d.ts +0 -8
  46. package/dist/types/schema/execution-schema.d.ts +4 -4
  47. package/dist/types/store-sql/address/address-book-repository.d.ts +2 -2
  48. package/dist/types/store-sql/agent/agent-definition-repository.d.ts +3 -3
  49. package/dist/types/store-sql/chat/agent-chat-repository.d.ts +2 -2
  50. package/dist/types/store-sql/child/child-execution-repository.d.ts +2 -2
  51. package/dist/types/store-sql/cluster/cluster-registry-repository.d.ts +2 -2
  52. package/dist/types/store-sql/compaction/compaction-repository.d.ts +2 -2
  53. package/dist/types/store-sql/database/database-service.d.ts +11 -12
  54. package/dist/types/store-sql/database/notification-bus.d.ts +3 -3
  55. package/dist/types/store-sql/envelope/envelope-repository.d.ts +2 -2
  56. package/dist/types/store-sql/execution/execution-event-repository.d.ts +4 -4
  57. package/dist/types/store-sql/execution/execution-repository.d.ts +12 -12
  58. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +3 -3
  59. package/dist/types/store-sql/memory/memory-repository.d.ts +5 -5
  60. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +2 -2
  61. package/dist/types/store-sql/schedule/schedule-repository.d.ts +2 -2
  62. package/dist/types/store-sql/schema/relay-schema.d.ts +21 -21
  63. package/dist/types/store-sql/session/context-epoch-repository.d.ts +2 -2
  64. package/dist/types/store-sql/session/session-repository.d.ts +6 -6
  65. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +2 -2
  66. package/dist/types/store-sql/steering/steering-repository.d.ts +2 -2
  67. package/dist/types/store-sql/tenant/tenant-id.d.ts +3 -1
  68. package/dist/types/store-sql/tool/tool-call-repository.d.ts +2 -2
  69. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +2 -2
  70. package/package.json +3 -14
@@ -26,18 +26,18 @@ CREATE TABLE "relay_agent_definitions" (
26
26
  --> statement-breakpoint
27
27
  CREATE INDEX "idx_relay_agent_definitions_name" ON "relay_agent_definitions" ("tenant_id", "name");
28
28
  --> statement-breakpoint
29
- CREATE TABLE "relay_agent_definition_revisions" (
29
+ CREATE TABLE "relay_agent_revisions" (
30
30
  "tenant_id" TEXT NOT NULL DEFAULT 'system',
31
- "agent_definition_id" TEXT NOT NULL,
31
+ "agent_id" TEXT NOT NULL,
32
32
  "revision" INTEGER NOT NULL,
33
33
  "name" TEXT NOT NULL,
34
34
  "definition_json" TEXT NOT NULL,
35
35
  "tool_input_schema_digests_json" TEXT NOT NULL DEFAULT '{}',
36
36
  "created_at" INTEGER NOT NULL DEFAULT (CAST(unixepoch('subsec') * 1000 AS INTEGER)),
37
- CONSTRAINT "pk_relay_agent_definition_revisions" PRIMARY KEY ("tenant_id", "agent_definition_id", "revision")
37
+ CONSTRAINT "pk_relay_agent_revisions" PRIMARY KEY ("tenant_id", "agent_id", "revision")
38
38
  );
39
39
  --> statement-breakpoint
40
- CREATE INDEX "idx_relay_agent_definition_revisions_definition" ON "relay_agent_definition_revisions" ("tenant_id", "agent_definition_id", "revision");
40
+ CREATE INDEX "idx_relay_agent_revisions_definition" ON "relay_agent_revisions" ("tenant_id", "agent_id", "revision");
41
41
  --> statement-breakpoint
42
42
  CREATE TABLE "relay_skill_definitions" (
43
43
  "tenant_id" TEXT NOT NULL DEFAULT 'system',
@@ -194,10 +194,10 @@ CREATE TABLE "relay_executions" (
194
194
  "root_address_id" TEXT NOT NULL,
195
195
  "session_id" TEXT,
196
196
  "status" TEXT NOT NULL,
197
- "agent_definition_id" TEXT,
198
- "agent_definition_revision" INTEGER,
199
- "agent_definition_snapshot_json" TEXT,
200
- "agent_definition_tool_input_schema_digests_json" TEXT NOT NULL DEFAULT '{}',
197
+ "agent_id" TEXT,
198
+ "agent_revision" INTEGER,
199
+ "agent_snapshot_json" TEXT,
200
+ "agent_tool_input_schema_digests_json" TEXT NOT NULL DEFAULT '{}',
201
201
  "metadata_json" TEXT NOT NULL DEFAULT '{}',
202
202
  "created_at" INTEGER NOT NULL DEFAULT (CAST(unixepoch('subsec') * 1000 AS INTEGER)),
203
203
  "updated_at" INTEGER NOT NULL DEFAULT (CAST(unixepoch('subsec') * 1000 AS INTEGER)),
@@ -1,7 +1,5 @@
1
- import * as OpenAiClient from "@effect/ai-openai/OpenAiClient";
2
- import * as OpenAiEmbeddingModel from "@effect/ai-openai/OpenAiEmbeddingModel";
3
- import * as OpenAiCompatibleClient from "@effect/ai-openai-compat/OpenAiClient";
4
- import * as OpenAiCompatibleEmbeddingModel from "@effect/ai-openai-compat/OpenAiEmbeddingModel";
1
+ import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai";
2
+ import { OpenAiClient as OpenAiCompatibleClient, OpenAiEmbeddingModel as OpenAiCompatibleEmbeddingModel } from "@effect/ai-openai-compat";
5
3
  import { EmbeddingModelService } from "../../runtime/index";
6
4
  export interface OpenAiEmbeddingInput {
7
5
  readonly model: OpenAiEmbeddingModel.Model | (string & {});
@@ -1,19 +1,19 @@
1
1
  import { Context, Effect, Layer } from "effect";
2
- import * as Client from "./client";
3
- import * as Operation from "./operation";
2
+ import { ClientError, Service as ClientService } from "./client";
3
+ import { AckEnvelopeReadyInput, ClaimEnvelopeReadyInput, EnvelopeReadyAcked, EnvelopeReadyLease, EnvelopeReadyReleased, ReleaseEnvelopeReadyInput, SubmitInboundEnvelopeAccepted, SubmitInboundEnvelopeInput } from "./operation";
4
4
  export interface Interface {
5
- readonly claim: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, Client.ClientError>;
6
- readonly ack: (input: Operation.AckEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyAcked, Client.ClientError>;
7
- readonly release: (input: Operation.ReleaseEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyReleased, Client.ClientError>;
8
- readonly submitInbound: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, Client.ClientError>;
5
+ readonly claim: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError>;
6
+ readonly ack: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError>;
7
+ readonly release: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError>;
8
+ readonly submitInbound: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, ClientError>;
9
9
  }
10
10
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/AdapterOutbox", Interface>;
11
11
  export declare class Service extends Service_base {
12
12
  }
13
- export declare const layer: Layer.Layer<Service, never, Client.Service>;
13
+ export declare const layer: Layer.Layer<Service, never, ClientService>;
14
14
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
15
- export declare const claim: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, Client.ClientError, Service>;
16
- export declare const ack: (input: Operation.AckEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyAcked, Client.ClientError, Service>;
17
- export declare const release: (input: Operation.ReleaseEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyReleased, Client.ClientError, Service>;
18
- export declare const submitInbound: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, Client.ClientError, Service>;
15
+ export declare const claim: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError, Service>;
16
+ export declare const ack: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError, Service>;
17
+ export declare const release: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError, Service>;
18
+ export declare const submitInbound: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, ClientError, Service>;
19
19
  export {};
@@ -3,7 +3,7 @@ import { Address, Agent, Content, Envelope, Execution, Ids, Shared, Skill } from
3
3
  import { ClusterRegistryRepository, EnvelopeRepository, ExecutionRepository, ScheduleRepository, SessionRepository, SteeringRepository } from "../store-sql/index";
4
4
  import { Context, Effect, Layer, Schema, Stream } from "effect";
5
5
  import { Sharding, ShardingConfig } from "effect/unstable/cluster";
6
- import * as Operation from "./operation";
6
+ import type { AckEnvelopeReadyInput, CancelExecutionAccepted, CancelExecutionInput, CancelScheduleInput, CancelScheduleResult, ClaimEnvelopeReadyInput, CreateScheduleInput, CreateScheduleResult, EnvelopeReadyAcked, EnvelopeReadyLease, EnvelopeReadyReleased, GetSessionInput, GetSessionResult, ListExecutionsInput, ListExecutionsResult, ListPendingApprovalsInput, ListRunnersResult, ListSchedulesInput, ListSchedulesResult, ListSessionsInput, ListSessionsResult, ListWaitsInput, PendingToolApprovalList, ReleaseEnvelopeReadyInput, ReplayExecutionInput, ReplayExecutionResult, ResolvePermissionInput, ResolveToolApprovalInput, RouteExecutionResult, StartExecutionInput, StartExecutionResult, SteerAccepted, SteerInput, StreamExecutionInput, SubmitInboundEnvelopeAccepted, SubmitInboundEnvelopeInput, WaitView, WakeAccepted, WakeInput } from "./operation";
7
7
  declare const ClientError_base: Schema.Class<ClientError, Schema.TaggedStruct<"ClientError", {
8
8
  readonly message: Schema.String;
9
9
  }>, import("effect/Cause").YieldableError>;
@@ -24,7 +24,7 @@ export interface StartExecutionByAddressInput {
24
24
  export interface StartExecutionByAgentDefinitionInput {
25
25
  readonly root_address_id: Ids.AddressId;
26
26
  readonly session_id?: Ids.SessionId;
27
- readonly agent_definition_id: Ids.AgentId;
27
+ readonly agent_id: Ids.AgentId;
28
28
  readonly input?: ReadonlyArray<Content.Part>;
29
29
  readonly idempotency_key: Shared.NonEmptyString;
30
30
  readonly execution_id?: Ids.ExecutionId;
@@ -37,35 +37,6 @@ export interface StartExecutionByAgentDefinitionInput {
37
37
  export interface RegisterAgentInput extends Agent.DefineInput {
38
38
  readonly address?: Ids.AddressId;
39
39
  }
40
- export interface AgentOptions extends Omit<Agent.DefineInput, "id" | "name" | "permissions"> {
41
- readonly id?: Ids.AgentId;
42
- readonly address?: Ids.AddressId;
43
- readonly name?: Shared.NonEmptyString;
44
- readonly permissions?: Agent.DefineInput["permissions"];
45
- }
46
- export interface RegisteredAgent {
47
- readonly id: Ids.AgentId;
48
- readonly address_id: Ids.AddressId;
49
- readonly record: Agent.DefinitionRecord;
50
- }
51
- export type StartTarget = Ids.AddressId | RegisteredAgent | {
52
- readonly address_id: Ids.AddressId;
53
- };
54
- export interface StartInput {
55
- readonly session_id?: Ids.SessionId;
56
- readonly input?: ReadonlyArray<Content.Part>;
57
- readonly idempotency_key?: Shared.NonEmptyString;
58
- readonly execution_id?: Ids.ExecutionId;
59
- readonly event_sequence?: Execution.ExecutionEventSequence;
60
- readonly started_at?: Shared.TimestampMillis;
61
- readonly completed_at?: Shared.TimestampMillis;
62
- readonly wait_id?: Ids.WaitId;
63
- readonly metadata?: Shared.Metadata;
64
- }
65
- export interface RunInput extends StartInput {
66
- readonly after_cursor?: Shared.NonEmptyString;
67
- readonly limit?: number;
68
- }
69
40
  export interface Interface {
70
41
  readonly registerAgent: (input: RegisterAgentInput) => Effect.Effect<Agent.DefinitionRegistered, ClientError>;
71
42
  readonly registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError>;
@@ -78,33 +49,33 @@ export interface Interface {
78
49
  readonly registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError>;
79
50
  readonly getAddressBookRoute: (id: Ids.AddressId) => Effect.Effect<Address.RouteRecord | undefined, ClientError>;
80
51
  readonly listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError>;
81
- readonly startExecution: (input: Operation.StartExecutionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError>;
82
- readonly startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<Operation.StartExecutionResult, ClientError>;
83
- readonly startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError>;
84
- readonly cancelExecution: (input: Operation.CancelExecutionInput) => Effect.Effect<Operation.CancelExecutionAccepted, ClientError>;
85
- readonly steer: (input: Operation.SteerInput) => Effect.Effect<Operation.SteerAccepted, ClientError>;
52
+ readonly startExecution: (input: StartExecutionInput) => Effect.Effect<StartExecutionResult, ClientError>;
53
+ readonly startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<StartExecutionResult, ClientError>;
54
+ readonly startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<StartExecutionResult, ClientError>;
55
+ readonly cancelExecution: (input: CancelExecutionInput) => Effect.Effect<CancelExecutionAccepted, ClientError>;
56
+ readonly steer: (input: SteerInput) => Effect.Effect<SteerAccepted, ClientError>;
86
57
  readonly getExecution: (id: Ids.ExecutionId) => Effect.Effect<Execution.Execution | undefined, ClientError>;
87
- readonly listExecutions: (input: Operation.ListExecutionsInput) => Effect.Effect<Operation.ListExecutionsResult, ClientError>;
88
- readonly listSessions: (input: Operation.ListSessionsInput) => Effect.Effect<Operation.ListSessionsResult, ClientError>;
89
- readonly getSession: (input: Operation.GetSessionInput) => Effect.Effect<Operation.GetSessionResult, ClientError>;
90
- readonly listWaits: (input: Operation.ListWaitsInput) => Effect.Effect<ReadonlyArray<Operation.WaitView>, ClientError>;
91
- readonly replayExecution: (input: Operation.ReplayExecutionInput) => Effect.Effect<Operation.ReplayExecutionResult, ClientError>;
92
- readonly listRunners: () => Effect.Effect<Operation.ListRunnersResult, ClientError>;
93
- readonly routeExecution: (executionId: Ids.ExecutionId) => Effect.Effect<Operation.RouteExecutionResult, ClientError>;
58
+ readonly listExecutions: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ClientError>;
59
+ readonly listSessions: (input: ListSessionsInput) => Effect.Effect<ListSessionsResult, ClientError>;
60
+ readonly getSession: (input: GetSessionInput) => Effect.Effect<GetSessionResult, ClientError>;
61
+ readonly listWaits: (input: ListWaitsInput) => Effect.Effect<ReadonlyArray<WaitView>, ClientError>;
62
+ readonly replayExecution: (input: ReplayExecutionInput) => Effect.Effect<ReplayExecutionResult, ClientError>;
63
+ readonly listRunners: () => Effect.Effect<ListRunnersResult, ClientError>;
64
+ readonly routeExecution: (executionId: Ids.ExecutionId) => Effect.Effect<RouteExecutionResult, ClientError>;
94
65
  readonly send: (input: Envelope.SendInput) => Effect.Effect<Envelope.EnvelopeAccepted, ClientError>;
95
- readonly streamExecution: (input: Operation.StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, ClientError>;
96
- readonly wake: (input: Operation.WakeInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
97
- readonly listPendingApprovals: (input: Operation.ListPendingApprovalsInput) => Effect.Effect<Operation.PendingToolApprovalList, ClientError>;
98
- readonly resolveToolApproval: (input: Operation.ResolveToolApprovalInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
99
- readonly resolvePermission: (input: Operation.ResolvePermissionInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
100
- readonly submitInboundEnvelope: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, ClientError>;
66
+ readonly streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, ClientError>;
67
+ readonly wake: (input: WakeInput) => Effect.Effect<WakeAccepted, ClientError>;
68
+ readonly listPendingApprovals: (input: ListPendingApprovalsInput) => Effect.Effect<PendingToolApprovalList, ClientError>;
69
+ readonly resolveToolApproval: (input: ResolveToolApprovalInput) => Effect.Effect<WakeAccepted, ClientError>;
70
+ readonly resolvePermission: (input: ResolvePermissionInput) => Effect.Effect<WakeAccepted, ClientError>;
71
+ readonly submitInboundEnvelope: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, ClientError>;
101
72
  readonly spawnChildRun: (input: Execution.SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError>;
102
- readonly claimEnvelopeReady: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, ClientError>;
103
- readonly ackEnvelopeReady: (input: Operation.AckEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyAcked, ClientError>;
104
- readonly releaseEnvelopeReady: (input: Operation.ReleaseEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyReleased, ClientError>;
105
- readonly createSchedule: (input: Operation.CreateScheduleInput) => Effect.Effect<Operation.CreateScheduleResult, ClientError>;
106
- readonly cancelSchedule: (input: Operation.CancelScheduleInput) => Effect.Effect<Operation.CancelScheduleResult, ClientError>;
107
- readonly listSchedules: (input: Operation.ListSchedulesInput) => Effect.Effect<Operation.ListSchedulesResult, ClientError>;
73
+ readonly claimEnvelopeReady: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError>;
74
+ readonly ackEnvelopeReady: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError>;
75
+ readonly releaseEnvelopeReady: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError>;
76
+ readonly createSchedule: (input: CreateScheduleInput) => Effect.Effect<CreateScheduleResult, ClientError>;
77
+ readonly cancelSchedule: (input: CancelScheduleInput) => Effect.Effect<CancelScheduleResult, ClientError>;
78
+ readonly listSchedules: (input: ListSchedulesInput) => Effect.Effect<ListSchedulesResult, ClientError>;
108
79
  }
109
80
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/Client", Interface>;
110
81
  export declare class Service extends Service_base {
@@ -113,88 +84,6 @@ export declare const layerFromRuntime: Layer.Layer<Service, never, AgentRegistry
113
84
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
114
85
  export declare const registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
115
86
  export declare const registerAgent: (input: RegisterAgentInput) => Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
116
- export declare const agent: (slug: string, input: AgentOptions) => Effect.Effect<{
117
- id: string & import("effect/Brand").Brand<"Relay.AgentId">;
118
- address_id: string & import("effect/Brand").Brand<"Relay.AddressId">;
119
- record: {
120
- readonly id: string & import("effect/Brand").Brand<"Relay.AgentId">;
121
- readonly created_at: number;
122
- readonly updated_at: number;
123
- readonly current_revision: number;
124
- readonly definition: {
125
- readonly name: string;
126
- readonly permissions: readonly {
127
- readonly name: string;
128
- readonly value: Schema.Json;
129
- readonly metadata?: {
130
- readonly [x: string]: Schema.Json;
131
- };
132
- }[];
133
- readonly model: {
134
- readonly provider: string;
135
- readonly model: string;
136
- readonly metadata?: {
137
- readonly [x: string]: Schema.Json;
138
- };
139
- readonly registration_key?: string;
140
- readonly request_options?: {
141
- readonly [x: string]: Schema.Json;
142
- };
143
- };
144
- readonly tool_names: readonly string[];
145
- readonly metadata?: {
146
- readonly [x: string]: Schema.Json;
147
- };
148
- readonly instructions?: string;
149
- readonly output_schema_ref?: string;
150
- readonly skill_definition_ids?: readonly (string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">)[];
151
- readonly permission_rules?: {
152
- readonly rules: readonly {
153
- readonly pattern: string;
154
- readonly level: "allow" | "deny" | "ask";
155
- readonly reason?: string;
156
- }[];
157
- readonly fallback?: "allow" | "deny" | "ask";
158
- };
159
- readonly max_tool_turns?: number;
160
- readonly max_wait_turns?: number;
161
- readonly token_budget?: number;
162
- readonly child_run_presets?: {
163
- readonly [x: string]: {
164
- readonly metadata?: {
165
- readonly [x: string]: Schema.Json;
166
- };
167
- readonly permissions?: readonly string[];
168
- readonly model?: {
169
- readonly provider: string;
170
- readonly model: string;
171
- readonly metadata?: {
172
- readonly [x: string]: Schema.Json;
173
- };
174
- readonly registration_key?: string;
175
- readonly request_options?: {
176
- readonly [x: string]: Schema.Json;
177
- };
178
- };
179
- readonly instructions?: string;
180
- readonly tool_names?: readonly string[];
181
- readonly workspace_policy?: {
182
- readonly mode: "share" | "fork";
183
- readonly fallback?: "fail" | "fresh";
184
- };
185
- readonly output_schema_ref?: string;
186
- };
187
- };
188
- readonly handoff_targets?: readonly Schema.Struct.ReadonlySide<{
189
- readonly name: Schema.String;
190
- readonly preset_name: Schema.String;
191
- }, "Type">[];
192
- };
193
- readonly tool_input_schema_digests?: {
194
- readonly [x: string]: string;
195
- };
196
- };
197
- }, ClientError, Service>;
198
87
  export declare const getAgentDefinition: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError, Service>;
199
88
  export declare const listAgentDefinitions: () => Effect.Effect<Agent.DefinitionList, ClientError, Service>;
200
89
  export declare const listAgentDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentId">) => Effect.Effect<Agent.DefinitionRevisionList, ClientError, Service>;
@@ -204,33 +93,31 @@ export declare const listSkillDefinitionRevisions: (id: string & import("effect/
204
93
  export declare const registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError, Service>;
205
94
  export declare const getAddressBookRoute: (id: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Address.RouteRecord | undefined, ClientError, Service>;
206
95
  export declare const listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError, Service>;
207
- export declare const startExecution: (input: Operation.StartExecutionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
208
- export declare const startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
209
- export declare const startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
210
- export declare const start: (target: StartTarget, input?: StartInput | undefined) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
211
- export declare const run: (target: StartTarget, input?: RunInput) => Stream.Stream<Execution.ExecutionEvent, ClientError, Service>;
212
- export declare const cancelExecution: (input: Operation.CancelExecutionInput) => Effect.Effect<Operation.CancelExecutionAccepted, ClientError, Service>;
213
- export declare const steer: (input: Operation.SteerInput) => Effect.Effect<Operation.SteerAccepted, ClientError, Service>;
96
+ export declare const startExecution: (input: StartExecutionInput) => Effect.Effect<StartExecutionResult, ClientError, Service>;
97
+ export declare const startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<StartExecutionResult, ClientError, Service>;
98
+ export declare const startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<StartExecutionResult, ClientError, Service>;
99
+ export declare const cancelExecution: (input: CancelExecutionInput) => Effect.Effect<CancelExecutionAccepted, ClientError, Service>;
100
+ export declare const steer: (input: SteerInput) => Effect.Effect<SteerAccepted, ClientError, Service>;
214
101
  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: Operation.ListExecutionsInput) => Effect.Effect<Operation.ListExecutionsResult, ClientError, Service>;
216
- export declare const listSessions: (input: Operation.ListSessionsInput) => Effect.Effect<Operation.ListSessionsResult, ClientError, Service>;
217
- export declare const getSession: (input: Operation.GetSessionInput) => Effect.Effect<Operation.GetSessionResult, ClientError, Service>;
218
- export declare const listWaits: (input: Operation.ListWaitsInput) => Effect.Effect<readonly Operation.WaitView[], ClientError, Service>;
219
- export declare const replayExecution: (input: Operation.ReplayExecutionInput) => Effect.Effect<Operation.ReplayExecutionResult, ClientError, Service>;
220
- export declare const listRunners: () => Effect.Effect<Operation.ListRunnersResult, ClientError, Service>;
221
- export declare const routeExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Operation.RouteExecutionResult, ClientError, Service>;
102
+ export declare const listExecutions: (input: ListExecutionsInput) => Effect.Effect<ListExecutionsResult, ClientError, Service>;
103
+ export declare const listSessions: (input: ListSessionsInput) => Effect.Effect<ListSessionsResult, ClientError, Service>;
104
+ export declare const getSession: (input: GetSessionInput) => Effect.Effect<GetSessionResult, ClientError, Service>;
105
+ export declare const listWaits: (input: ListWaitsInput) => Effect.Effect<readonly WaitView[], ClientError, Service>;
106
+ export declare const replayExecution: (input: ReplayExecutionInput) => Effect.Effect<ReplayExecutionResult, ClientError, Service>;
107
+ export declare const listRunners: () => Effect.Effect<ListRunnersResult, ClientError, Service>;
108
+ export declare const routeExecution: (executionId: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<RouteExecutionResult, ClientError, Service>;
222
109
  export declare const send: (input: Envelope.SendInput) => Effect.Effect<Envelope.EnvelopeAccepted, ClientError, Service>;
223
- export declare const streamExecution: (input: Operation.StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, ClientError, Service>;
224
- export declare const wake: (input: Operation.WakeInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
225
- export declare const listPendingApprovals: (input: Operation.ListPendingApprovalsInput) => Effect.Effect<Operation.PendingToolApprovalList, ClientError, Service>;
226
- export declare const resolveToolApproval: (input: Operation.ResolveToolApprovalInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
227
- export declare const resolvePermission: (input: Operation.ResolvePermissionInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
228
- export declare const submitInboundEnvelope: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, ClientError, Service>;
110
+ export declare const streamExecution: (input: StreamExecutionInput) => Stream.Stream<Execution.ExecutionEvent, ClientError, Service>;
111
+ export declare const wake: (input: WakeInput) => Effect.Effect<WakeAccepted, ClientError, Service>;
112
+ export declare const listPendingApprovals: (input: ListPendingApprovalsInput) => Effect.Effect<PendingToolApprovalList, ClientError, Service>;
113
+ export declare const resolveToolApproval: (input: ResolveToolApprovalInput) => Effect.Effect<WakeAccepted, ClientError, Service>;
114
+ export declare const resolvePermission: (input: ResolvePermissionInput) => Effect.Effect<WakeAccepted, ClientError, Service>;
115
+ export declare const submitInboundEnvelope: (input: SubmitInboundEnvelopeInput) => Effect.Effect<SubmitInboundEnvelopeAccepted, ClientError, Service>;
229
116
  export declare const spawnChildRun: (input: Execution.SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError, Service>;
230
- export declare const claimEnvelopeReady: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, ClientError, Service>;
231
- export declare const ackEnvelopeReady: (input: Operation.AckEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyAcked, ClientError, Service>;
232
- export declare const releaseEnvelopeReady: (input: Operation.ReleaseEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyReleased, ClientError, Service>;
233
- export declare const createSchedule: (input: Operation.CreateScheduleInput) => Effect.Effect<Operation.CreateScheduleResult, ClientError, Service>;
234
- export declare const cancelSchedule: (input: Operation.CancelScheduleInput) => Effect.Effect<Operation.CancelScheduleResult, ClientError, Service>;
235
- export declare const listSchedules: (input: Operation.ListSchedulesInput) => Effect.Effect<Operation.ListSchedulesResult, ClientError, Service>;
117
+ export declare const claimEnvelopeReady: (input: ClaimEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyLease | null, ClientError, Service>;
118
+ export declare const ackEnvelopeReady: (input: AckEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyAcked, ClientError, Service>;
119
+ export declare const releaseEnvelopeReady: (input: ReleaseEnvelopeReadyInput) => Effect.Effect<EnvelopeReadyReleased, ClientError, Service>;
120
+ export declare const createSchedule: (input: CreateScheduleInput) => Effect.Effect<CreateScheduleResult, ClientError, Service>;
121
+ export declare const cancelSchedule: (input: CancelScheduleInput) => Effect.Effect<CancelScheduleResult, ClientError, Service>;
122
+ export declare const listSchedules: (input: ListSchedulesInput) => Effect.Effect<ListSchedulesResult, ClientError, Service>;
236
123
  export {};
@@ -1,14 +1,15 @@
1
- import * as StoreSql from "../store-sql/index";
2
- export type Drizzle = StoreSql.Database.Drizzle;
3
- export type PgTimestamp = StoreSql.Database.PgTimestamp;
4
- export type DatabaseError = StoreSql.Database.DatabaseError;
5
- export type Dialect = StoreSql.Database.Dialect;
6
- export declare const Service: typeof StoreSql.Database.Service;
7
- export declare const layerFromPgClient: import("effect/Layer").Layer<StoreSql.Database.Service, never, import("@effect/sql-pg/PgClient").PgClient>;
8
- export declare const testLayer: (db: StoreSql.Database.Drizzle) => import("effect/Layer").Layer<StoreSql.Database.Service, never, never>;
9
- export declare const check: () => import("effect/Effect").Effect<void, import("drizzle-orm/effect-core").EffectDrizzleQueryError, StoreSql.Database.Service>;
1
+ import { Database } from "../store-sql/index";
2
+ import type { Context, Effect } from "effect";
3
+ export type Drizzle = Context.Service.Shape<typeof Database.Service>;
4
+ export type PgTimestamp = Parameters<typeof Database.fromPgDate>[0];
5
+ export type DatabaseError = Effect.Error<ReturnType<typeof Database.check>>;
6
+ export type Dialect = typeof Database.Dialect.Type;
7
+ export declare const Service: typeof Database.Service;
8
+ export declare const layerFromPgClient: import("effect/Layer").Layer<Database.Service, never, import("@effect/sql-pg/PgClient").PgClient>;
9
+ export declare const testLayer: (db: Database.Drizzle) => import("effect/Layer").Layer<Database.Service, never, never>;
10
+ export declare const check: () => Effect.Effect<void, import("drizzle-orm/effect-core").EffectDrizzleQueryError, Database.Service>;
10
11
  export declare const pgTypeParsers: {
11
12
  getTypeParser: (typeId: number, format?: "text" | "binary") => any;
12
13
  };
13
14
  export declare const Dialect: import("effect/Schema").Literals<readonly ["pg", "mysql", "sqlite"]>;
14
- export declare const dialect: import("effect/Effect").Effect<"pg" | "mysql" | "sqlite", never, import("effect/unstable/sql/SqlClient").SqlClient>;
15
+ export declare const dialect: Effect.Effect<"pg" | "mysql" | "sqlite", never, import("effect/unstable/sql/SqlClient").SqlClient>;
@@ -61,11 +61,11 @@ export declare const StartExecutionInput: Schema.Struct<{
61
61
  readonly event_sequence: Schema.Int;
62
62
  readonly started_at: Schema.Int;
63
63
  readonly completed_at: Schema.Int;
64
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
64
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
65
65
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
66
66
  }>;
67
- readonly agent_definition_revision: Schema.optionalKey<Schema.Int>;
68
- readonly agent_definition_snapshot: Schema.optionalKey<Schema.Struct<{
67
+ readonly agent_revision: Schema.optionalKey<Schema.Int>;
68
+ readonly agent_snapshot: Schema.optionalKey<Schema.Struct<{
69
69
  readonly name: Schema.String;
70
70
  readonly instructions: Schema.optionalKey<Schema.String>;
71
71
  readonly model: Schema.Struct<{
@@ -120,7 +120,7 @@ export declare const StartExecutionInput: Schema.Struct<{
120
120
  readonly output_schema_ref: Schema.optionalKey<Schema.String>;
121
121
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
122
122
  }>>;
123
- readonly agent_definition_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
123
+ readonly agent_tool_input_schema_digests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
124
124
  readonly wait_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.WaitId"> & {
125
125
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.WaitId">;
126
126
  }>;
@@ -942,7 +942,7 @@ export declare const ConversationSummary: Schema.Struct<{
942
942
  }>;
943
943
  readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
944
944
  readonly kind: Schema.Literals<readonly ["user-agent", "agent-agent"]>;
945
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
945
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
946
946
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
947
947
  }>;
948
948
  readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
@@ -964,7 +964,7 @@ export declare const ListExecutionsResult: Schema.Struct<{
964
964
  }>;
965
965
  readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
966
966
  readonly kind: Schema.Literals<readonly ["user-agent", "agent-agent"]>;
967
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
967
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
968
968
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
969
969
  }>;
970
970
  readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
@@ -1046,7 +1046,7 @@ export declare const GetSessionResult: Schema.Struct<{
1046
1046
  }>;
1047
1047
  readonly status: Schema.Literals<readonly ["queued", "running", "waiting", "completed", "failed", "cancelled"]>;
1048
1048
  readonly kind: Schema.Literals<readonly ["user-agent", "agent-agent"]>;
1049
- readonly agent_definition_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
1049
+ readonly agent_id: Schema.optionalKey<Schema.brand<Schema.String, "Relay.AgentId"> & {
1050
1050
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
1051
1051
  }>;
1052
1052
  readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
@@ -1,7 +1,7 @@
1
1
  import { Ids } from "../../schema/index";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
- import * as AddressBook from "./address-book-service";
4
- import * as AgentRegistry from "../agent/agent-registry-service";
3
+ import { Service as AddressBookService } from "./address-book-service";
4
+ import { Service as AgentRegistryService } from "../agent/agent-registry-service";
5
5
  declare const AddressRouteNotFound_base: Schema.Class<AddressRouteNotFound, Schema.TaggedStruct<"AddressRouteNotFound", {
6
6
  readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
7
7
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
@@ -23,7 +23,7 @@ declare const AddressAgentDefinitionNotFound_base: Schema.Class<AddressAgentDefi
23
23
  readonly address_id: Schema.brand<Schema.String, "Relay.AddressId"> & {
24
24
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AddressId">;
25
25
  };
26
- readonly agent_definition_id: Schema.brand<Schema.String, "Relay.AgentId"> & {
26
+ readonly agent_id: Schema.brand<Schema.String, "Relay.AgentId"> & {
27
27
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
28
28
  };
29
29
  }>, import("effect/Cause").YieldableError>;
@@ -50,11 +50,11 @@ export declare const LocalAgentTarget: Schema.Struct<{
50
50
  readonly route_key: Schema.String;
51
51
  readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
52
52
  }>;
53
- readonly agent_definition_id: Schema.brand<Schema.String, "Relay.AgentId"> & {
53
+ readonly agent_id: Schema.brand<Schema.String, "Relay.AgentId"> & {
54
54
  make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.AgentId">;
55
55
  };
56
- readonly agent_definition_revision: Schema.Int;
57
- readonly agent_definition_snapshot: Schema.Struct<{
56
+ readonly agent_revision: Schema.Int;
57
+ readonly agent_snapshot: Schema.Struct<{
58
58
  readonly name: Schema.String;
59
59
  readonly instructions: Schema.optionalKey<Schema.String>;
60
60
  readonly model: Schema.Struct<{
@@ -119,7 +119,7 @@ export interface Interface {
119
119
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/AddressResolution", Interface>;
120
120
  export declare class Service extends Service_base {
121
121
  }
122
- export declare const layer: Layer.Layer<Service, never, AddressBook.Service | AgentRegistry.Service>;
122
+ export declare const layer: Layer.Layer<Service, never, AddressBookService | AgentRegistryService>;
123
123
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
124
124
  export declare const resolveLocalAgent: (addressId: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<LocalAgentTarget, AddressRouteNotFound | AddressRouteKindMismatch | AddressAgentDefinitionNotFound | AddressResolutionError, Service>;
125
125
  export {};
@@ -1,15 +1,15 @@
1
1
  import { Agent, Content, Execution, Ids, Shared, Tool } from "../../schema/index";
2
2
  import { AgentChatRepository } from "../../store-sql/index";
3
3
  import { Context, Effect, Layer, Schema } from "effect";
4
- import * as Ai from "effect/unstable/ai";
5
- import * as SpawnChildRunTool from "../child/spawn-child-run-tool";
6
- import * as EventLog from "../execution/event-log-service";
7
- import * as LanguageModelService from "../model/language-model-service";
8
- import * as ModelCallPolicy from "../model/model-call-policy";
9
- import * as SchemaRegistry from "../schema-registry/schema-registry-service";
10
- import * as ToolRuntime from "../tool/tool-runtime-service";
11
- import * as PromptAssembler from "./prompt-assembler-service";
12
- import * as RelayCompaction from "./relay-compaction";
4
+ import { Tool as AiTool } from "effect/unstable/ai";
5
+ import type { DispatchInput } from "../child/spawn-child-run-tool";
6
+ import { Service as EventLogService } from "../execution/event-log-service";
7
+ import { Service as LanguageModelServiceService } from "../model/language-model-service";
8
+ import { Service as ModelCallPolicyService } from "../model/model-call-policy";
9
+ import { Service as SchemaRegistryService } from "../schema-registry/schema-registry-service";
10
+ import { Service as ToolRuntimeService } from "../tool/tool-runtime-service";
11
+ import { Service as PromptAssemblerService } from "./prompt-assembler-service";
12
+ import type { Options } from "./relay-compaction";
13
13
  declare const AgentLoopError_base: Schema.Class<AgentLoopError, Schema.TaggedStruct<"AgentLoopError", {
14
14
  readonly message: Schema.String;
15
15
  readonly next_event_sequence: Schema.optionalKey<Schema.Int>;
@@ -44,8 +44,8 @@ export interface RunInput {
44
44
  readonly sessionId?: Ids.SessionId;
45
45
  readonly agent: Agent.Definition;
46
46
  readonly agentId?: Ids.AgentId;
47
- readonly agentDefinitionRevision?: Agent.DefinitionRevision;
48
- readonly agentDefinitionToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
47
+ readonly agentRevision?: Agent.DefinitionRevision;
48
+ readonly agentToolInputSchemaDigests?: Agent.ToolInputSchemaDigests;
49
49
  readonly input: ReadonlyArray<Content.Part>;
50
50
  readonly resumeToolCall?: Tool.Call;
51
51
  readonly memorySubjectId?: Ids.MemorySubjectId;
@@ -54,9 +54,9 @@ export interface RunInput {
54
54
  readonly completedAt: number;
55
55
  readonly steeringEnabled?: boolean;
56
56
  readonly toolOutputMaxBytes?: number | null;
57
- readonly compaction?: RelayCompaction.Options | null;
57
+ readonly compaction?: Options | null;
58
58
  readonly sessionEntryScope?: string;
59
- readonly dispatchChildRun?: (input: SpawnChildRunTool.DispatchInput) => Effect.Effect<void, unknown, any>;
59
+ readonly dispatchChildRun?: (input: DispatchInput) => Effect.Effect<void, unknown, any>;
60
60
  }
61
61
  export interface RunResult {
62
62
  readonly metadata: Shared.Metadata;
@@ -76,10 +76,10 @@ export declare class Service extends Service_base {
76
76
  * @experimental
77
77
  */
78
78
  export declare const STRUCTURED_TURN_PROMPT = "Return the final structured output for the task above.";
79
- export declare const toolFromDefinition: (definition: Tool.Definition) => Ai.Tool.Any;
79
+ export declare const toolFromDefinition: (definition: Tool.Definition) => AiTool.Any;
80
80
  /** Map a Baton run failure (or an upstream model error) to the public error types. */
81
81
  export declare const mapBoundaryError: (error: unknown, current: Execution.ExecutionEventSequence) => AgentLoopError | AgentLoopWaitRequested | AgentLoopBudgetExceeded;
82
- export declare const layer: Layer.Layer<Service, never, AgentChatRepository.Service | EventLog.Service | ToolRuntime.Service | LanguageModelService.Service | ModelCallPolicy.Service | SchemaRegistry.Service | PromptAssembler.Service>;
82
+ export declare const layer: Layer.Layer<Service, never, AgentChatRepository.Service | EventLogService | ToolRuntimeService | LanguageModelServiceService | ModelCallPolicyService | SchemaRegistryService | PromptAssemblerService>;
83
83
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
84
84
  export declare const run: (input: RunInput) => Effect.Effect<RunResult, AgentLoopError | AgentLoopWaitRequested | AgentLoopBudgetExceeded, Service>;
85
85
  export {};