@relayfx/sdk 0.0.50 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +5 -0
  2. package/dist/ai.js +42 -17222
  3. package/dist/index-2xztzkfr.js +20596 -0
  4. package/dist/index-bcbbm5wt.js +137 -0
  5. package/dist/index-qgt9z94q.js +2443 -0
  6. package/dist/index.js +830 -18839
  7. package/dist/migrations/20260712120000_durable_inbox/migration.sql +9 -0
  8. package/dist/migrations/20260712140000_execution_state/migration.sql +5 -0
  9. package/dist/migrations/20260712150000_durable_entities/migration.sql +15 -0
  10. package/dist/migrations/20260712160000_ephemeral_presence/migration.sql +13 -0
  11. package/dist/migrations/20260712170000_topic_subscriptions/migration.sql +3 -0
  12. package/dist/migrations/20260712180000_child_fan_out/migration.sql +27 -0
  13. package/dist/migrations/20260712190000_workflow_definitions/migration.sql +3 -0
  14. package/dist/migrations/20260712200000_workflow_runtime/migration.sql +2 -0
  15. package/dist/migrations/mysql/0003_durable_inbox.sql +3 -0
  16. package/dist/migrations/mysql/0004_execution_state.sql +3 -0
  17. package/dist/migrations/mysql/0005_durable_entities.sql +13 -0
  18. package/dist/migrations/mysql/0006_ephemeral_presence.sql +12 -0
  19. package/dist/migrations/mysql/0007_topic_subscriptions.sql +1 -0
  20. package/dist/migrations/mysql/0008_child_fan_out.sql +26 -0
  21. package/dist/migrations/mysql/0009_workflow_definitions.sql +3 -0
  22. package/dist/migrations/mysql/0010_workflow_runtime.sql +3 -0
  23. package/dist/migrations/pg/20260712120000_durable_inbox/migration.sql +9 -0
  24. package/dist/migrations/pg/20260712140000_execution_state/migration.sql +5 -0
  25. package/dist/migrations/pg/20260712150000_durable_entities/migration.sql +15 -0
  26. package/dist/migrations/pg/20260712160000_ephemeral_presence/migration.sql +13 -0
  27. package/dist/migrations/pg/20260712170000_topic_subscriptions/migration.sql +3 -0
  28. package/dist/migrations/pg/20260712180000_child_fan_out/migration.sql +27 -0
  29. package/dist/migrations/pg/20260712190000_workflow_definitions/migration.sql +3 -0
  30. package/dist/migrations/pg/20260712200000_workflow_runtime/migration.sql +2 -0
  31. package/dist/migrations/sqlite/0003_durable_inbox.sql +9 -0
  32. package/dist/migrations/sqlite/0004_execution_state.sql +3 -0
  33. package/dist/migrations/sqlite/0005_durable_entities.sql +15 -0
  34. package/dist/migrations/sqlite/0006_ephemeral_presence.sql +12 -0
  35. package/dist/migrations/sqlite/0007_topic_subscriptions.sql +3 -0
  36. package/dist/migrations/sqlite/0008_child_fan_out.sql +27 -0
  37. package/dist/migrations/sqlite/0009_workflow_definitions.sql +3 -0
  38. package/dist/migrations/sqlite/0010_workflow_runtime.sql +3 -0
  39. package/dist/sqlite.js +737 -0
  40. package/dist/types/relay/adapter-outbox.d.ts +3 -3
  41. package/dist/types/relay/client.d.ts +335 -25
  42. package/dist/types/relay/command.d.ts +41 -0
  43. package/dist/types/relay/database.d.ts +1 -0
  44. package/dist/types/relay/index.d.ts +3 -2
  45. package/dist/types/relay/operation.d.ts +1082 -7
  46. package/dist/types/relay/sqlite-migrations.d.ts +54 -0
  47. package/dist/types/relay/sqlite-runtime.d.ts +10 -0
  48. package/dist/types/relay/sqlite.d.ts +29 -0
  49. package/dist/types/runtime/address/address-book-service.d.ts +4 -4
  50. package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
  51. package/dist/types/runtime/agent/agent-loop-service.d.ts +2 -2
  52. package/dist/types/runtime/agent/agent-registry-service.d.ts +1 -1
  53. package/dist/types/runtime/agent/relay-compaction.d.ts +1 -1
  54. package/dist/types/runtime/agent/relay-permissions.d.ts +1 -1
  55. package/dist/types/runtime/agent/relay-steering.d.ts +1 -1
  56. package/dist/types/runtime/child/child-fan-out-admission-service.d.ts +30 -0
  57. package/dist/types/runtime/child/child-fan-out-runtime.d.ts +34 -0
  58. package/dist/types/runtime/child/child-fan-out-transition-service.d.ts +25 -0
  59. package/dist/types/runtime/child/child-run-service.d.ts +1 -1
  60. package/dist/types/runtime/child/parent-notifier-service.d.ts +1 -1
  61. package/dist/types/runtime/cluster/execution-entity.d.ts +5 -3
  62. package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
  63. package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
  64. package/dist/types/runtime/envelope/envelope-service.d.ts +7 -3
  65. package/dist/types/runtime/execution/active-execution-registry.d.ts +12 -0
  66. package/dist/types/runtime/execution/event-log-service.d.ts +1 -1
  67. package/dist/types/runtime/execution/execution-service.d.ts +2 -1
  68. package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
  69. package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
  70. package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
  71. package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
  72. package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
  73. package/dist/types/runtime/index.d.ts +18 -0
  74. package/dist/types/runtime/memory/memory-service.d.ts +1 -1
  75. package/dist/types/runtime/presence/presence-service.d.ts +30 -0
  76. package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
  77. package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -18
  78. package/dist/types/runtime/schedule/scheduler-service.d.ts +1 -1
  79. package/dist/types/runtime/session/session-store-service.d.ts +1 -1
  80. package/dist/types/runtime/skill/skill-registry-service.d.ts +1 -1
  81. package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
  82. package/dist/types/runtime/state/state-tools.d.ts +5 -0
  83. package/dist/types/runtime/tool/tool-runtime-service.d.ts +1 -1
  84. package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
  85. package/dist/types/runtime/topic/topic-service.d.ts +50 -0
  86. package/dist/types/runtime/wait/wait-service.d.ts +2 -1
  87. package/dist/types/runtime/wait/wait-signal.d.ts +1 -1
  88. package/dist/types/runtime/workflow/definition-runtime.d.ts +78 -0
  89. package/dist/types/runtime/workflow/execution-workflow.d.ts +7 -7
  90. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +1 -1
  91. package/dist/types/schema/address-schema.d.ts +6 -6
  92. package/dist/types/schema/child-orchestration-schema.d.ts +393 -0
  93. package/dist/types/schema/entity-schema.d.ts +40 -0
  94. package/dist/types/schema/envelope-schema.d.ts +1 -0
  95. package/dist/types/schema/execution-schema.d.ts +2 -2
  96. package/dist/types/schema/ids-schema.d.ts +20 -0
  97. package/dist/types/schema/inbox-schema.d.ts +81 -0
  98. package/dist/types/schema/index.d.ts +7 -0
  99. package/dist/types/schema/presence-schema.d.ts +28 -0
  100. package/dist/types/schema/state-schema.d.ts +35 -0
  101. package/dist/types/schema/wait-schema.d.ts +98 -0
  102. package/dist/types/schema/workflow-schema.d.ts +2062 -0
  103. package/dist/types/store-sql/address/address-book-repository.d.ts +1 -1
  104. package/dist/types/store-sql/child/child-fan-out-repository.d.ts +53 -0
  105. package/dist/types/store-sql/database/database-service.d.ts +4 -18
  106. package/dist/types/store-sql/database/notification-bus.d.ts +2 -0
  107. package/dist/types/store-sql/database/sql-dialect.d.ts +13 -0
  108. package/dist/types/store-sql/entity/entity-repository.d.ts +36 -0
  109. package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -0
  110. package/dist/types/store-sql/execution/execution-event-repository.d.ts +2 -1
  111. package/dist/types/store-sql/execution/execution-repository.d.ts +12 -2
  112. package/dist/types/store-sql/inbox/inbox-repository.d.ts +56 -0
  113. package/dist/types/store-sql/index.d.ts +8 -0
  114. package/dist/types/store-sql/portable.d.ts +29 -0
  115. package/dist/types/store-sql/presence/presence-repository.d.ts +51 -0
  116. package/dist/types/store-sql/schema/relay-schema.d.ts +3064 -587
  117. package/dist/types/store-sql/state/execution-state-repository.d.ts +80 -0
  118. package/dist/types/store-sql/tenant/tenant-id.d.ts +0 -2
  119. package/dist/types/store-sql/topic/topic-repository.d.ts +44 -0
  120. package/dist/types/store-sql/workflow/workflow-definition-repository.d.ts +29 -0
  121. package/package.json +26 -4
  122. package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +0 -1971
  123. package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  124. package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  125. package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  126. package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  127. package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  128. package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +0 -2954
  129. package/dist/migrations/20260705012626_common_stryfe/snapshot.json +0 -3378
  130. package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  131. package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  132. package/dist/migrations/20260705030344_short_patriot/snapshot.json +0 -3873
  133. package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  134. package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  135. package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +0 -4883
  136. package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +0 -4883
  137. package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  138. package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
  139. package/dist/migrations/pg/20260701002839_sour_cerebro/snapshot.json +0 -1971
  140. package/dist/migrations/pg/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  141. package/dist/migrations/pg/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  142. package/dist/migrations/pg/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  143. package/dist/migrations/pg/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  144. package/dist/migrations/pg/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  145. package/dist/migrations/pg/20260705003847_nervous_banshee/snapshot.json +0 -2954
  146. package/dist/migrations/pg/20260705012626_common_stryfe/snapshot.json +0 -3378
  147. package/dist/migrations/pg/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  148. package/dist/migrations/pg/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  149. package/dist/migrations/pg/20260705030344_short_patriot/snapshot.json +0 -3873
  150. package/dist/migrations/pg/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  151. package/dist/migrations/pg/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  152. package/dist/migrations/pg/20260706233300_equal_cyclops/snapshot.json +0 -4883
  153. package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +0 -4883
  154. package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  155. package/dist/migrations/pg/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
@@ -0,0 +1,76 @@
1
+ import { Content, Envelope, Execution, Ids, Inbox } from "../../schema/index";
2
+ import { EnvelopeRepository, ExecutionRepository, InboxRepository } from "../../store-sql/portable";
3
+ import { Context, Effect, Layer, Schema } from "effect";
4
+ import { Service as EventLogService } from "../execution/event-log-service";
5
+ import { Service as WaitService } from "../wait/wait-service";
6
+ import type { ExecutionClientFactory } from "../wait/wait-signal";
7
+ declare const InboxDeliveryError_base: Schema.Class<InboxDeliveryError, Schema.TaggedStruct<"InboxDeliveryError", {
8
+ readonly execution_id: Schema.brand<Schema.String, "Relay.ExecutionId"> & {
9
+ make: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"Relay.ExecutionId">;
10
+ };
11
+ readonly message: Schema.String;
12
+ }>, import("effect/Cause").YieldableError>;
13
+ export declare class InboxDeliveryError extends InboxDeliveryError_base {
14
+ }
15
+ declare const InboxReplyTokenInvalid_base: Schema.Class<InboxReplyTokenInvalid, Schema.TaggedStruct<"InboxReplyTokenInvalid", {
16
+ readonly reply_token: Schema.String;
17
+ }>, import("effect/Cause").YieldableError>;
18
+ export declare class InboxReplyTokenInvalid extends InboxReplyTokenInvalid_base {
19
+ }
20
+ declare const InboxServiceError_base: Schema.Class<InboxServiceError, Schema.TaggedStruct<"InboxServiceError", {
21
+ readonly message: Schema.String;
22
+ }>, import("effect/Cause").YieldableError>;
23
+ export declare class InboxServiceError extends InboxServiceError_base {
24
+ }
25
+ export interface DeliverInput {
26
+ readonly executionId: Ids.ExecutionId;
27
+ readonly envelope: Envelope.Envelope;
28
+ readonly acceptance?: EnvelopeRepository.AcceptEnvelopeInput;
29
+ readonly idempotencyKey?: string;
30
+ readonly replyWaitId?: Ids.WaitId;
31
+ readonly eventSequence: Execution.ExecutionEventSequence;
32
+ readonly createdAt: number;
33
+ }
34
+ export interface DeliverResult {
35
+ readonly sequence: Inbox.MessageSequence;
36
+ readonly deduplicated: boolean;
37
+ }
38
+ export interface DrainInput {
39
+ readonly executionId: Ids.ExecutionId;
40
+ readonly drainId: string;
41
+ readonly maxBatch?: number;
42
+ }
43
+ export interface EnsureReplyWaitInput {
44
+ readonly envelope: Envelope.Envelope;
45
+ readonly waitId: Ids.WaitId;
46
+ }
47
+ export interface ReplyInput {
48
+ readonly replyToken: string;
49
+ readonly from: Ids.AddressId;
50
+ readonly content: ReadonlyArray<Content.Part>;
51
+ readonly createdAt: number;
52
+ }
53
+ export interface Interface {
54
+ readonly deliver: (input: DeliverInput) => Effect.Effect<DeliverResult, InboxDeliveryError>;
55
+ readonly ensureReplyWait: (input: EnsureReplyWaitInput) => Effect.Effect<void, InboxDeliveryError>;
56
+ readonly drain: (input: DrainInput) => Effect.Effect<ReadonlyArray<Inbox.Message>, InboxServiceError>;
57
+ readonly undrainedCount: (executionId: Ids.ExecutionId) => Effect.Effect<number, InboxServiceError>;
58
+ readonly reply: (input: ReplyInput) => Effect.Effect<Envelope.EnvelopeAccepted, InboxReplyTokenInvalid | InboxDeliveryError>;
59
+ }
60
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/InboxService", Interface>;
61
+ export declare class Service extends Service_base {
62
+ }
63
+ export interface SignalDependencies {
64
+ readonly makeExecutionClient: ExecutionClientFactory;
65
+ readonly executionRepository: ExecutionRepository.Service["Service"];
66
+ }
67
+ export declare const layer: Layer.Layer<Service, never, EnvelopeRepository.Service | InboxRepository.Service | EventLogService | WaitService>;
68
+ export declare const layerWithSignal: (dependencies: SignalDependencies) => Layer.Layer<Service, never, EnvelopeRepository.Service | InboxRepository.Service | EventLogService | WaitService>;
69
+ export declare const memoryLayer: Layer.Layer<Service, never, EventLogService | WaitService>;
70
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
71
+ export declare const deliver: (input: DeliverInput) => Effect.Effect<DeliverResult, InboxDeliveryError, Service>;
72
+ export declare const ensureReplyWait: (input: EnsureReplyWaitInput) => Effect.Effect<void, InboxDeliveryError, Service>;
73
+ export declare const drain: (input: DrainInput) => Effect.Effect<readonly Inbox.Message[], InboxServiceError, Service>;
74
+ export declare const undrainedCount: (id: Ids.ExecutionId) => Effect.Effect<number, InboxServiceError, Service>;
75
+ export declare const reply: (input: ReplyInput) => Effect.Effect<Envelope.EnvelopeAccepted, InboxDeliveryError | InboxReplyTokenInvalid, Service>;
76
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Ids } from "../../schema/index";
2
+ import { Schema } from "effect";
3
+ import type { Interface as EnvelopeInterface } from "../envelope/envelope-service";
4
+ import type { RegisteredTool } from "../tool/tool-runtime-service";
5
+ import type { Interface as InboxInterface } from "./inbox-service";
6
+ export declare const toolName = "send_message";
7
+ export declare const permissionName = "relay.inbox.send";
8
+ export declare const Input: Schema.Struct<{
9
+ readonly to: Schema.String;
10
+ readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Struct<{
11
+ readonly type: Schema.Literal<"text">;
12
+ readonly text: Schema.String;
13
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
14
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
15
+ }>>]>;
16
+ readonly reply_token: Schema.optionalKey<Schema.String>;
17
+ }>;
18
+ export declare const Output: Schema.Struct<{
19
+ readonly envelope_id: Schema.String;
20
+ readonly delivered: Schema.Literals<readonly ["inbox", "outbox", "reply"]>;
21
+ }>;
22
+ export interface Config {
23
+ readonly inbox: InboxInterface;
24
+ readonly envelopes: EnvelopeInterface;
25
+ readonly from: Ids.AddressId;
26
+ }
27
+ export declare const registeredTool: (config: Config) => RegisteredTool;
@@ -0,0 +1,34 @@
1
+ import { Schema } from "effect";
2
+ import type { Interface as EventLogInterface } from "../execution/event-log-service";
3
+ import type { Interface as WaitServiceInterface } from "../wait/wait-service";
4
+ import type { RegisteredTool } from "../tool/tool-runtime-service";
5
+ import type { Interface as InboxInterface } from "./inbox-service";
6
+ export declare const toolName = "wait_for_messages";
7
+ export declare const permissionName = "relay.inbox.wait";
8
+ export declare const Input: Schema.Struct<{
9
+ readonly timeout: Schema.optionalKey<Schema.String>;
10
+ }>;
11
+ export interface Input extends Schema.Schema.Type<typeof Input> {
12
+ }
13
+ export declare const Output: Schema.Struct<{
14
+ readonly status: Schema.Literals<readonly ["messages", "timed_out"]>;
15
+ readonly messages: Schema.$Array<Schema.Struct<{
16
+ readonly sequence: Schema.Int;
17
+ readonly from: Schema.String;
18
+ readonly content: Schema.$Array<Schema.Struct<{
19
+ readonly type: Schema.Literal<"text">;
20
+ readonly text: Schema.String;
21
+ readonly provider_options: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
22
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
23
+ }>>;
24
+ readonly reply_token: Schema.optionalKey<Schema.String>;
25
+ readonly correlation_key: Schema.optionalKey<Schema.String>;
26
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
27
+ }>>;
28
+ }>;
29
+ export interface Config {
30
+ readonly inbox: InboxInterface;
31
+ readonly waits: WaitServiceInterface;
32
+ readonly eventLog: EventLogInterface;
33
+ }
34
+ export declare const registeredTool: (config: Config) => RegisteredTool;
@@ -5,16 +5,31 @@ export * as AgentRegistry from "./agent/agent-registry-service";
5
5
  export * as ArtifactStore from "./content/artifact-store-service";
6
6
  export * as BlobStore from "./content/blob-store-service";
7
7
  export * as ChildRunService from "./child/child-run-service";
8
+ export * as ChildFanOutAdmission from "./child/child-fan-out-admission-service";
9
+ export * as ChildFanOutTransition from "./child/child-fan-out-transition-service";
10
+ export * as ChildFanOutRuntime from "./child/child-fan-out-runtime";
8
11
  export * as SpawnChildRunTool from "./child/spawn-child-run-tool";
9
12
  export * as ExecutionEntity from "./cluster/execution-entity";
10
13
  export * as EnvelopeService from "./envelope/envelope-service";
14
+ export * as EntityInstanceService from "./entity/entity-instance-service";
15
+ export * as EntityRegistry from "./entity/entity-registry-service";
16
+ export * as InboxService from "./inbox/inbox-service";
17
+ export * as TopicService from "./topic/topic-service";
18
+ export * as PublishToTopicTool from "./topic/publish-to-topic-tool";
19
+ export * as SendMessageTool from "./inbox/send-message-tool";
20
+ export * as WaitForMessagesTool from "./inbox/wait-for-messages-tool";
11
21
  export * as EventLog from "./execution/event-log-service";
22
+ export * as ActiveExecutionRegistry from "./execution/active-execution-registry";
23
+ export * as ExecutionWatch from "./execution/execution-watch-service";
12
24
  export * as ExecutionService from "./execution/execution-service";
25
+ export * as SessionStream from "./execution/session-stream-service";
13
26
  export * as EmbeddingModelService from "./model/embedding-model-service";
14
27
  export * as LanguageModelService from "./model/language-model-service";
15
28
  export * as MemoryService from "./memory/memory-service";
16
29
  export * as ModelCallPolicy from "./model/model-call-policy";
17
30
  export * as ParentNotifier from "./child/parent-notifier-service";
31
+ export * as PresenceService from "./presence/presence-service";
32
+ export * as PresenceTool from "./presence/presence-tool";
18
33
  export * as PromptAssembler from "./agent/prompt-assembler-service";
19
34
  export * as RelayCompaction from "./agent/relay-compaction";
20
35
  export * as RelayPermissions from "./agent/relay-permissions";
@@ -25,6 +40,8 @@ export * as SchedulerService from "./schedule/scheduler-service";
25
40
  export * as SchemaRegistry from "./schema-registry/schema-registry-service";
26
41
  export * as RelaySessionStore from "./session/session-store-service";
27
42
  export * as SkillRegistry from "./skill/skill-registry-service";
43
+ export * as ExecutionState from "./state/execution-state-service";
44
+ export * as StateTools from "./state/state-tools";
28
45
  export * as ToolRuntime from "./tool/tool-runtime-service";
29
46
  export * as ToolTransitionCoordinator from "./tool/tool-transition-coordinator";
30
47
  export * as ToolInputSchemaDigest from "./tool/tool-input-schema-digest";
@@ -34,5 +51,6 @@ export * as WorkspacePlanner from "./workspace/workspace-planner-service";
34
51
  export * as WorkspaceProvider from "./workspace/workspace-provider-service";
35
52
  export * as WorkspaceRuntime from "./workspace/workspace-runtime-service";
36
53
  export * as ExecutionWorkflow from "./workflow/execution-workflow";
54
+ export * as WorkflowDefinitionRuntime from "./workflow/definition-runtime";
37
55
  export * as ActivityVersionRegistry from "./workflow/activity-version-registry";
38
56
  export declare const runtimePackage = "./index";
@@ -1,5 +1,5 @@
1
1
  import { Memory } from "@batonfx/core";
2
- import { MemoryRepository } from "../../store-sql/index";
2
+ import { MemoryRepository } from "../../store-sql/portable";
3
3
  import { Context, Effect, Layer } from "effect";
4
4
  import { Service as EmbeddingModelServiceService } from "../model/embedding-model-service";
5
5
  import type { ModelSelection } from "../model/embedding-model-service";
@@ -0,0 +1,30 @@
1
+ import { Presence, Shared } from "../../schema/index";
2
+ import { PresenceRepository } from "../../store-sql/portable";
3
+ import { Config, Context, Effect, Layer, Schema, Scope, Stream } from "effect";
4
+ declare const PresenceError_base: Schema.Class<PresenceError, Schema.TaggedStruct<"PresenceError", {
5
+ readonly message: Schema.String;
6
+ }>, import("effect/Cause").YieldableError>;
7
+ export declare class PresenceError extends PresenceError_base {
8
+ }
9
+ export interface RegisterInput {
10
+ readonly id: string;
11
+ readonly scope: Presence.Scope;
12
+ readonly metadata?: Shared.Metadata;
13
+ }
14
+ export interface Interface {
15
+ readonly register: (input: RegisterInput) => Effect.Effect<void, never, Scope.Scope>;
16
+ readonly tracked: (scope: Presence.Scope, metadata?: Shared.Metadata) => <A, E, R>(stream: Stream.Stream<A, E, R>) => Stream.Stream<A, E, R>;
17
+ readonly list: (scope: Presence.Scope) => Effect.Effect<Presence.View, PresenceError>;
18
+ readonly watch: (scope: Presence.Scope) => Stream.Stream<Presence.View, PresenceError>;
19
+ }
20
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/runtime/Presence", Interface>;
21
+ export declare class Service extends Service_base {
22
+ }
23
+ export declare const PresenceIdentity: Context.Reference<Shared.Metadata>;
24
+ export declare const layerFromRepository: Layer.Layer<Service, Config.ConfigError, PresenceRepository.Service>;
25
+ export declare const memoryLayer: Layer.Layer<Service, Config.ConfigError, never>;
26
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
27
+ export declare const register: (input: RegisterInput) => Effect.Effect<void, never, Scope.Scope | Service>;
28
+ export declare const list: (scope: Presence.Scope) => Effect.Effect<Presence.View, PresenceError, Service>;
29
+ export declare const watch: (scope: Presence.Scope) => Stream.Stream<Presence.View, PresenceError, Service>;
30
+ export {};
@@ -0,0 +1,20 @@
1
+ import { Schema } from "effect";
2
+ import type { Interface as PresenceInterface } from "./presence-service";
3
+ import type { RegisteredTool } from "../tool/tool-runtime-service";
4
+ export declare const toolName = "relay_presence";
5
+ export declare const permissionName = "relay.presence.read";
6
+ export declare const Input: Schema.Struct<{
7
+ readonly scope: Schema.optionalKey<Schema.Struct<{
8
+ readonly kind: Schema.Literals<readonly ["execution", "session"]>;
9
+ readonly id: Schema.String;
10
+ }>>;
11
+ }>;
12
+ export declare const Output: Schema.Struct<{
13
+ readonly watcher_count: Schema.Number;
14
+ readonly entries: Schema.$Array<Schema.Struct<{
15
+ readonly id: Schema.String;
16
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
17
+ readonly connected_at: Schema.Int;
18
+ }>>;
19
+ }>;
20
+ export declare const registeredTool: (presence: PresenceInterface) => RegisteredTool;