@relayfx/sdk 0.0.5 → 0.0.7

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 (63) hide show
  1. package/dist/index.js +7437 -3239
  2. package/dist/migrations/20260705003847_nervous_banshee/migration.sql +11 -0
  3. package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +2954 -0
  4. package/dist/migrations/20260705012626_common_stryfe/migration.sql +31 -0
  5. package/dist/migrations/20260705012626_common_stryfe/snapshot.json +3378 -0
  6. package/dist/migrations/20260705015420_sweet_captain_marvel/migration.sql +10 -0
  7. package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +3485 -0
  8. package/dist/migrations/20260705023041_chunky_scalphunter/migration.sql +22 -0
  9. package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +3753 -0
  10. package/dist/migrations/20260705030344_short_patriot/migration.sql +11 -0
  11. package/dist/migrations/20260705030344_short_patriot/snapshot.json +3873 -0
  12. package/dist/migrations/20260705045546_heavy_ben_grimm/migration.sql +30 -0
  13. package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +4193 -0
  14. package/dist/types/ai/embedding-model/embedding-model-registration.d.ts +45 -0
  15. package/dist/types/ai/index.d.ts +1 -0
  16. package/dist/types/relay/client.d.ts +20 -4
  17. package/dist/types/relay/index.d.ts +3 -3
  18. package/dist/types/relay/operation.d.ts +242 -1
  19. package/dist/types/runtime/address/address-resolution-service.d.ts +15 -0
  20. package/dist/types/runtime/agent/agent-loop-service.d.ts +39 -5
  21. package/dist/types/runtime/agent/relay-approvals.d.ts +15 -3
  22. package/dist/types/runtime/agent/relay-compaction.d.ts +22 -0
  23. package/dist/types/runtime/agent/relay-instructions.d.ts +22 -0
  24. package/dist/types/runtime/agent/relay-permissions.d.ts +25 -0
  25. package/dist/types/runtime/agent/relay-steering.d.ts +17 -0
  26. package/dist/types/runtime/agent/relay-tool-executor.d.ts +3 -0
  27. package/dist/types/runtime/agent/relay-tool-output.d.ts +7 -0
  28. package/dist/types/runtime/child/spawn-child-run-tool.d.ts +209 -0
  29. package/dist/types/runtime/cluster/execution-entity.d.ts +101 -2
  30. package/dist/types/runtime/execution/event-log-service.d.ts +6 -0
  31. package/dist/types/runtime/execution/execution-service.d.ts +1 -0
  32. package/dist/types/runtime/index.d.ts +9 -0
  33. package/dist/types/runtime/memory/memory-service.d.ts +20 -0
  34. package/dist/types/runtime/model/embedding-model-service.d.ts +68 -0
  35. package/dist/types/runtime/model/model-call-policy.d.ts +30 -11
  36. package/dist/types/runtime/runner/runner-runtime-service.d.ts +41 -21
  37. package/dist/types/runtime/schedule/scheduler-service.d.ts +4 -4
  38. package/dist/types/runtime/session/session-store-service.d.ts +14 -0
  39. package/dist/types/runtime/skill/skill-registry-service.d.ts +44 -0
  40. package/dist/types/runtime/tool/tool-runtime-service.d.ts +5 -0
  41. package/dist/types/runtime/wait/wait-signal.d.ts +2 -1
  42. package/dist/types/runtime/workflow/execution-workflow.d.ts +73 -4
  43. package/dist/types/schema/agent-schema.d.ts +130 -0
  44. package/dist/types/schema/content-schema.d.ts +12 -0
  45. package/dist/types/schema/envelope-schema.d.ts +12 -0
  46. package/dist/types/schema/execution-schema.d.ts +32 -2
  47. package/dist/types/schema/ids-schema.d.ts +16 -0
  48. package/dist/types/schema/index.d.ts +1 -0
  49. package/dist/types/schema/schedule-schema.d.ts +6 -0
  50. package/dist/types/schema/skill-schema.d.ts +260 -0
  51. package/dist/types/schema/tool-schema.d.ts +2 -0
  52. package/dist/types/store-sql/child/child-execution-repository.d.ts +1 -0
  53. package/dist/types/store-sql/compaction/compaction-repository.d.ts +37 -0
  54. package/dist/types/store-sql/execution/execution-repository.d.ts +3 -0
  55. package/dist/types/store-sql/index.d.ts +7 -0
  56. package/dist/types/store-sql/memory/memory-repository.d.ts +50 -0
  57. package/dist/types/store-sql/permission/permission-rule-repository.d.ts +37 -0
  58. package/dist/types/store-sql/schema/relay-schema.d.ts +1039 -8
  59. package/dist/types/store-sql/session/context-epoch-repository.d.ts +33 -0
  60. package/dist/types/store-sql/session/session-repository.d.ts +138 -0
  61. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +71 -0
  62. package/dist/types/store-sql/steering/steering-repository.d.ts +59 -0
  63. package/package.json +3 -3
@@ -0,0 +1,45 @@
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";
5
+ import { EmbeddingModelService } from "../../runtime/index";
6
+ export interface OpenAiEmbeddingInput {
7
+ readonly model: OpenAiEmbeddingModel.Model | (string & {});
8
+ readonly dimensions?: number | undefined;
9
+ readonly config?: Omit<typeof OpenAiEmbeddingModel.Config.Service, "model" | "dimensions"> | undefined;
10
+ readonly registrationKey?: string | undefined;
11
+ readonly provider?: string | undefined;
12
+ readonly metadata?: EmbeddingModelService.Registration["metadata"] | undefined;
13
+ }
14
+ export interface OpenAiCompatibleEmbeddingInput {
15
+ readonly model: string;
16
+ readonly dimensions?: number | undefined;
17
+ readonly config?: Omit<typeof OpenAiCompatibleEmbeddingModel.Config.Service, "model" | "dimensions"> | undefined;
18
+ readonly registrationKey?: string | undefined;
19
+ readonly provider?: string | undefined;
20
+ readonly metadata?: EmbeddingModelService.Registration["metadata"] | undefined;
21
+ }
22
+ export interface OpenRouterEmbeddingInput extends Omit<OpenAiCompatibleEmbeddingInput, "provider"> {
23
+ readonly provider?: string | undefined;
24
+ }
25
+ export declare const openAi: (input: OpenAiEmbeddingInput) => import("effect/Effect").Effect<EmbeddingModelService.Registration, never, OpenAiClient.OpenAiClient>;
26
+ export declare const openAiCompatible: (input: OpenAiCompatibleEmbeddingInput) => import("effect/Effect").Effect<EmbeddingModelService.Registration, never, OpenAiCompatibleClient.OpenAiClient>;
27
+ export declare const openRouterApiUrl = "https://openrouter.ai/api/v1";
28
+ export declare const openRouter: (input: OpenRouterEmbeddingInput) => import("effect/Effect").Effect<EmbeddingModelService.Registration, never, OpenAiCompatibleClient.OpenAiClient>;
29
+ export declare const openAiClientLayer: (options: OpenAiClient.Options) => import("effect/Layer").Layer<OpenAiClient.OpenAiClient, never, import("effect/unstable/http/HttpClient").HttpClient>;
30
+ export declare const openAiClientLayerConfig: (options?: {
31
+ readonly apiKey?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
32
+ readonly apiUrl?: import("effect/Config").Config<string> | undefined;
33
+ readonly organizationId?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
34
+ readonly projectId?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
35
+ readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
36
+ }) => import("effect/Layer").Layer<OpenAiClient.OpenAiClient, import("effect/Config").ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
37
+ export declare const openAiCompatibleClientLayer: (options: OpenAiCompatibleClient.Options) => import("effect/Layer").Layer<OpenAiCompatibleClient.OpenAiClient, never, import("effect/unstable/http/HttpClient").HttpClient>;
38
+ export declare const openAiCompatibleClientLayerConfig: (options?: {
39
+ readonly apiKey?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
40
+ readonly apiUrl?: import("effect/Config").Config<string> | undefined;
41
+ readonly organizationId?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
42
+ readonly projectId?: import("effect/Config").Config<import("effect/Redacted").Redacted<string> | undefined> | undefined;
43
+ readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
44
+ }) => import("effect/Layer").Layer<OpenAiCompatibleClient.OpenAiClient, import("effect/Config").ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
45
+ export declare const openRouterClientLayer: (options?: Omit<OpenAiCompatibleClient.Options, "apiUrl">) => import("effect/Layer").Layer<OpenAiCompatibleClient.OpenAiClient, never, import("effect/unstable/http/HttpClient").HttpClient>;
@@ -1,2 +1,3 @@
1
+ export * as EmbeddingModelRegistration from "./embedding-model/embedding-model-registration";
1
2
  export * as LanguageModelRegistration from "./language-model/language-model-registration";
2
3
  export declare const aiPackage = "./index";
@@ -1,6 +1,6 @@
1
- import { AddressBook, AgentRegistry, EventLog, ExecutionService, WaitService } from "../runtime/index";
2
- import { Address, Agent, Content, Envelope, Execution, Ids, Shared } from "../schema/index";
3
- import { ClusterRegistryRepository, EnvelopeRepository, ExecutionRepository, ScheduleRepository } from "../store-sql/index";
1
+ import { AddressBook, AgentRegistry, EventLog, ExecutionService, SkillRegistry, WaitService } from "../runtime/index";
2
+ import { Address, Agent, Content, Envelope, Execution, Ids, Shared, Skill } from "../schema/index";
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
6
  import * as Operation from "./operation";
@@ -11,6 +11,7 @@ export declare class ClientError extends ClientError_base {
11
11
  }
12
12
  export interface StartExecutionByAddressInput {
13
13
  readonly address_id: Ids.AddressId;
14
+ readonly session_id?: Ids.SessionId;
14
15
  readonly input?: ReadonlyArray<Content.Part>;
15
16
  readonly idempotency_key: Shared.NonEmptyString;
16
17
  readonly execution_id?: Ids.ExecutionId;
@@ -22,6 +23,7 @@ export interface StartExecutionByAddressInput {
22
23
  }
23
24
  export interface StartExecutionByAgentDefinitionInput {
24
25
  readonly root_address_id: Ids.AddressId;
26
+ readonly session_id?: Ids.SessionId;
25
27
  readonly agent_definition_id: Ids.AgentDefinitionId;
26
28
  readonly input?: ReadonlyArray<Content.Part>;
27
29
  readonly idempotency_key: Shared.NonEmptyString;
@@ -37,6 +39,9 @@ export interface Interface {
37
39
  readonly getAgentDefinition: (id: Ids.AgentDefinitionId) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError>;
38
40
  readonly listAgentDefinitions: () => Effect.Effect<Agent.DefinitionList, ClientError>;
39
41
  readonly listAgentDefinitionRevisions: (id: Ids.AgentDefinitionId) => Effect.Effect<Agent.DefinitionRevisionList, ClientError>;
42
+ readonly getSkillDefinition: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRecord | undefined, ClientError>;
43
+ readonly listSkillDefinitions: () => Effect.Effect<Skill.DefinitionList, ClientError>;
44
+ readonly listSkillDefinitionRevisions: (id: Ids.SkillDefinitionId) => Effect.Effect<Skill.DefinitionRevisionList, ClientError>;
40
45
  readonly registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError>;
41
46
  readonly getAddressBookRoute: (id: Ids.AddressId) => Effect.Effect<Address.RouteRecord | undefined, ClientError>;
42
47
  readonly listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError>;
@@ -44,8 +49,11 @@ export interface Interface {
44
49
  readonly startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<Operation.StartExecutionResult, ClientError>;
45
50
  readonly startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError>;
46
51
  readonly cancelExecution: (input: Operation.CancelExecutionInput) => Effect.Effect<Operation.CancelExecutionAccepted, ClientError>;
52
+ readonly steer: (input: Operation.SteerInput) => Effect.Effect<Operation.SteerAccepted, ClientError>;
47
53
  readonly getExecution: (id: Ids.ExecutionId) => Effect.Effect<Execution.Execution | undefined, ClientError>;
48
54
  readonly listExecutions: (input: Operation.ListExecutionsInput) => Effect.Effect<Operation.ListExecutionsResult, ClientError>;
55
+ readonly listSessions: (input: Operation.ListSessionsInput) => Effect.Effect<Operation.ListSessionsResult, ClientError>;
56
+ readonly getSession: (input: Operation.GetSessionInput) => Effect.Effect<Operation.GetSessionResult, ClientError>;
49
57
  readonly listWaits: (input: Operation.ListWaitsInput) => Effect.Effect<ReadonlyArray<Operation.WaitView>, ClientError>;
50
58
  readonly replayExecution: (input: Operation.ReplayExecutionInput) => Effect.Effect<Operation.ReplayExecutionResult, ClientError>;
51
59
  readonly listRunners: () => Effect.Effect<Operation.ListRunnersResult, ClientError>;
@@ -55,6 +63,7 @@ export interface Interface {
55
63
  readonly wake: (input: Operation.WakeInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
56
64
  readonly listPendingApprovals: (input: Operation.ListPendingApprovalsInput) => Effect.Effect<Operation.PendingToolApprovalList, ClientError>;
57
65
  readonly resolveToolApproval: (input: Operation.ResolveToolApprovalInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
66
+ readonly resolvePermission: (input: Operation.ResolvePermissionInput) => Effect.Effect<Operation.WakeAccepted, ClientError>;
58
67
  readonly submitInboundEnvelope: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, ClientError>;
59
68
  readonly spawnChildRun: (input: Execution.SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError>;
60
69
  readonly claimEnvelopeReady: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, ClientError>;
@@ -67,12 +76,15 @@ export interface Interface {
67
76
  declare const Service_base: Context.ServiceClass<Service, "@relayfx/sdk/Client", Interface>;
68
77
  export declare class Service extends Service_base {
69
78
  }
70
- export declare const layerFromRuntime: Layer.Layer<Service, never, AgentRegistry.Service | AddressBook.Service | ExecutionService.Service | WaitService.Service | EventLog.Service | EnvelopeRepository.Service | ExecutionRepository.Service | ClusterRegistryRepository.Service | ScheduleRepository.Service | Sharding.Sharding | ShardingConfig.ShardingConfig>;
79
+ export declare const layerFromRuntime: Layer.Layer<Service, never, AgentRegistry.Service | AddressBook.Service | ExecutionService.Service | WaitService.Service | EventLog.Service | EnvelopeRepository.Service | ExecutionRepository.Service | SessionRepository.Service | SteeringRepository.Service | ClusterRegistryRepository.Service | ScheduleRepository.Service | SkillRegistry.Service | Sharding.Sharding | ShardingConfig.ShardingConfig>;
71
80
  export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
72
81
  export declare const registerAgentDefinition: (input: Agent.RegisterDefinitionPayload) => Effect.Effect<Agent.DefinitionRegistered, ClientError, Service>;
73
82
  export declare const getAgentDefinition: (id: string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">) => Effect.Effect<Agent.DefinitionRecord | undefined, ClientError, Service>;
74
83
  export declare const listAgentDefinitions: () => Effect.Effect<Agent.DefinitionList, ClientError, Service>;
75
84
  export declare const listAgentDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.AgentDefinitionId">) => Effect.Effect<Agent.DefinitionRevisionList, ClientError, Service>;
85
+ export declare const getSkillDefinition: (id: string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">) => Effect.Effect<Skill.DefinitionRecord | undefined, ClientError, Service>;
86
+ export declare const listSkillDefinitions: () => Effect.Effect<Skill.DefinitionList, ClientError, Service>;
87
+ export declare const listSkillDefinitionRevisions: (id: string & import("effect/Brand").Brand<"Relay.SkillDefinitionId">) => Effect.Effect<Skill.DefinitionRevisionList, ClientError, Service>;
76
88
  export declare const registerAddressBookRoute: (input: Address.RegisterRoutePayload) => Effect.Effect<Address.RouteRegistered, ClientError, Service>;
77
89
  export declare const getAddressBookRoute: (id: string & import("effect/Brand").Brand<"Relay.AddressId">) => Effect.Effect<Address.RouteRecord | undefined, ClientError, Service>;
78
90
  export declare const listAddressBookRoutes: () => Effect.Effect<Address.RouteList, ClientError, Service>;
@@ -80,8 +92,11 @@ export declare const startExecution: (input: Operation.StartExecutionInput) => E
80
92
  export declare const startExecutionByAddress: (input: StartExecutionByAddressInput) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
81
93
  export declare const startExecutionByAgentDefinition: (input: StartExecutionByAgentDefinitionInput) => Effect.Effect<Operation.StartExecutionResult, ClientError, Service>;
82
94
  export declare const cancelExecution: (input: Operation.CancelExecutionInput) => Effect.Effect<Operation.CancelExecutionAccepted, ClientError, Service>;
95
+ export declare const steer: (input: Operation.SteerInput) => Effect.Effect<Operation.SteerAccepted, ClientError, Service>;
83
96
  export declare const getExecution: (id: string & import("effect/Brand").Brand<"Relay.ExecutionId">) => Effect.Effect<Execution.Execution | undefined, ClientError, Service>;
84
97
  export declare const listExecutions: (input: Operation.ListExecutionsInput) => Effect.Effect<Operation.ListExecutionsResult, ClientError, Service>;
98
+ export declare const listSessions: (input: Operation.ListSessionsInput) => Effect.Effect<Operation.ListSessionsResult, ClientError, Service>;
99
+ export declare const getSession: (input: Operation.GetSessionInput) => Effect.Effect<Operation.GetSessionResult, ClientError, Service>;
85
100
  export declare const listWaits: (input: Operation.ListWaitsInput) => Effect.Effect<readonly Operation.WaitView[], ClientError, Service>;
86
101
  export declare const replayExecution: (input: Operation.ReplayExecutionInput) => Effect.Effect<Operation.ReplayExecutionResult, ClientError, Service>;
87
102
  export declare const listRunners: () => Effect.Effect<Operation.ListRunnersResult, ClientError, Service>;
@@ -91,6 +106,7 @@ export declare const streamExecution: (input: Operation.StreamExecutionInput) =>
91
106
  export declare const wake: (input: Operation.WakeInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
92
107
  export declare const listPendingApprovals: (input: Operation.ListPendingApprovalsInput) => Effect.Effect<Operation.PendingToolApprovalList, ClientError, Service>;
93
108
  export declare const resolveToolApproval: (input: Operation.ResolveToolApprovalInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
109
+ export declare const resolvePermission: (input: Operation.ResolvePermissionInput) => Effect.Effect<Operation.WakeAccepted, ClientError, Service>;
94
110
  export declare const submitInboundEnvelope: (input: Operation.SubmitInboundEnvelopeInput) => Effect.Effect<Operation.SubmitInboundEnvelopeAccepted, ClientError, Service>;
95
111
  export declare const spawnChildRun: (input: Execution.SpawnChildRunInput) => Effect.Effect<Execution.ChildRunAccepted, ClientError, Service>;
96
112
  export declare const claimEnvelopeReady: (input: Operation.ClaimEnvelopeReadyInput) => Effect.Effect<Operation.EnvelopeReadyLease | null, ClientError, Service>;
@@ -2,9 +2,9 @@ export * as AdapterOutbox from "./adapter-outbox";
2
2
  export * as Client from "./client";
3
3
  export * as Database from "./database";
4
4
  export * as Operation from "./operation";
5
- export { Address, Agent, Content, Envelope, Execution, Ids, Schedule, Shared, Tool } from "../schema/index";
6
- export { AddressBook, AddressResolution, AgentLoop, AgentRegistry, ArtifactStore, BlobStore, ChildRunService, EnvelopeService, EventLog, ExecutionEntity, ExecutionService, ExecutionWorkflow, LanguageModelService, ModelCallPolicy, PromptAssembler, SchedulerService, SchemaRegistry, ToolRuntime, WaitService, } from "../runtime/index";
5
+ export { Address, Agent, Content, Envelope, Execution, Ids, Schedule, Shared, Skill, Tool } from "../schema/index";
6
+ export { AddressBook, AddressResolution, AgentLoop, AgentRegistry, ArtifactStore, BlobStore, ChildRunService, EnvelopeService, EventLog, ExecutionEntity, ExecutionService, ExecutionWorkflow, LanguageModelService, ModelCallPolicy, PromptAssembler, SchedulerService, SchemaRegistry, SkillRegistry, ToolRuntime, WaitService, } from "../runtime/index";
7
7
  export { RunnerRuntime } from "../runtime/index";
8
8
  export { LanguageModelRegistration } from "../ai/index";
9
- export { RelaySchema } from "../store-sql/index";
9
+ export { RelaySchema, SkillDefinitionRepository } from "../store-sql/index";
10
10
  export declare const relayPackage = "@relayfx/sdk";