@relayfx/sdk 0.0.49 → 0.1.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 (132) hide show
  1. package/README.md +5 -0
  2. package/dist/ai.js +42 -17218
  3. package/dist/index-q0z11q9m.js +18726 -0
  4. package/dist/index-sms8x6cq.js +137 -0
  5. package/dist/index-vbf5hcw8.js +2156 -0
  6. package/dist/index.js +741 -18835
  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/mysql/0003_durable_inbox.sql +3 -0
  13. package/dist/migrations/mysql/0004_execution_state.sql +3 -0
  14. package/dist/migrations/mysql/0005_durable_entities.sql +13 -0
  15. package/dist/migrations/mysql/0006_ephemeral_presence.sql +12 -0
  16. package/dist/migrations/mysql/0007_topic_subscriptions.sql +1 -0
  17. package/dist/migrations/pg/20260712120000_durable_inbox/migration.sql +9 -0
  18. package/dist/migrations/pg/20260712140000_execution_state/migration.sql +5 -0
  19. package/dist/migrations/pg/20260712150000_durable_entities/migration.sql +15 -0
  20. package/dist/migrations/pg/20260712160000_ephemeral_presence/migration.sql +13 -0
  21. package/dist/migrations/pg/20260712170000_topic_subscriptions/migration.sql +3 -0
  22. package/dist/migrations/sqlite/0003_durable_inbox.sql +9 -0
  23. package/dist/migrations/sqlite/0004_execution_state.sql +3 -0
  24. package/dist/migrations/sqlite/0005_durable_entities.sql +15 -0
  25. package/dist/migrations/sqlite/0006_ephemeral_presence.sql +12 -0
  26. package/dist/migrations/sqlite/0007_topic_subscriptions.sql +3 -0
  27. package/dist/sqlite.js +688 -0
  28. package/dist/types/relay/client.d.ts +197 -17
  29. package/dist/types/relay/command.d.ts +41 -0
  30. package/dist/types/relay/database.d.ts +1 -0
  31. package/dist/types/relay/index.d.ts +3 -2
  32. package/dist/types/relay/operation.d.ts +520 -2
  33. package/dist/types/relay/sqlite-migrations.d.ts +39 -0
  34. package/dist/types/relay/sqlite-runtime.d.ts +5 -0
  35. package/dist/types/relay/sqlite.d.ts +27 -0
  36. package/dist/types/runtime/address/address-book-service.d.ts +4 -4
  37. package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
  38. package/dist/types/runtime/agent/agent-loop-service.d.ts +2 -2
  39. package/dist/types/runtime/agent/agent-registry-service.d.ts +1 -1
  40. package/dist/types/runtime/agent/relay-compaction.d.ts +1 -1
  41. package/dist/types/runtime/agent/relay-permissions.d.ts +1 -1
  42. package/dist/types/runtime/agent/relay-steering.d.ts +1 -1
  43. package/dist/types/runtime/child/child-run-service.d.ts +1 -1
  44. package/dist/types/runtime/child/parent-notifier-service.d.ts +1 -1
  45. package/dist/types/runtime/cluster/execution-entity.d.ts +1 -1
  46. package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
  47. package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
  48. package/dist/types/runtime/envelope/envelope-service.d.ts +7 -3
  49. package/dist/types/runtime/execution/event-log-service.d.ts +1 -1
  50. package/dist/types/runtime/execution/execution-service.d.ts +1 -1
  51. package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
  52. package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
  53. package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
  54. package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
  55. package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
  56. package/dist/types/runtime/index.d.ts +13 -0
  57. package/dist/types/runtime/memory/memory-service.d.ts +1 -1
  58. package/dist/types/runtime/presence/presence-service.d.ts +30 -0
  59. package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
  60. package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -18
  61. package/dist/types/runtime/schedule/scheduler-service.d.ts +1 -1
  62. package/dist/types/runtime/session/session-store-service.d.ts +1 -1
  63. package/dist/types/runtime/skill/skill-registry-service.d.ts +1 -1
  64. package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
  65. package/dist/types/runtime/state/state-tools.d.ts +5 -0
  66. package/dist/types/runtime/tool/tool-runtime-service.d.ts +1 -1
  67. package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
  68. package/dist/types/runtime/topic/topic-service.d.ts +50 -0
  69. package/dist/types/runtime/wait/wait-service.d.ts +2 -1
  70. package/dist/types/runtime/wait/wait-signal.d.ts +1 -1
  71. package/dist/types/runtime/workflow/execution-workflow.d.ts +2 -2
  72. package/dist/types/runtime/workspace/workspace-planner-service.d.ts +1 -1
  73. package/dist/types/schema/address-schema.d.ts +6 -6
  74. package/dist/types/schema/entity-schema.d.ts +40 -0
  75. package/dist/types/schema/envelope-schema.d.ts +1 -0
  76. package/dist/types/schema/execution-schema.d.ts +2 -2
  77. package/dist/types/schema/ids-schema.d.ts +8 -0
  78. package/dist/types/schema/inbox-schema.d.ts +81 -0
  79. package/dist/types/schema/index.d.ts +4 -0
  80. package/dist/types/schema/presence-schema.d.ts +28 -0
  81. package/dist/types/schema/state-schema.d.ts +35 -0
  82. package/dist/types/store-sql/address/address-book-repository.d.ts +1 -1
  83. package/dist/types/store-sql/database/database-service.d.ts +4 -18
  84. package/dist/types/store-sql/database/notification-bus.d.ts +2 -0
  85. package/dist/types/store-sql/database/sql-dialect.d.ts +13 -0
  86. package/dist/types/store-sql/entity/entity-repository.d.ts +36 -0
  87. package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -0
  88. package/dist/types/store-sql/execution/execution-event-repository.d.ts +2 -1
  89. package/dist/types/store-sql/execution/execution-repository.d.ts +12 -2
  90. package/dist/types/store-sql/inbox/inbox-repository.d.ts +56 -0
  91. package/dist/types/store-sql/index.d.ts +6 -0
  92. package/dist/types/store-sql/portable.d.ts +27 -0
  93. package/dist/types/store-sql/presence/presence-repository.d.ts +51 -0
  94. package/dist/types/store-sql/schema/relay-schema.d.ts +1352 -140
  95. package/dist/types/store-sql/state/execution-state-repository.d.ts +80 -0
  96. package/dist/types/store-sql/tenant/tenant-id.d.ts +0 -2
  97. package/dist/types/store-sql/topic/topic-repository.d.ts +44 -0
  98. package/package.json +26 -4
  99. package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +0 -1971
  100. package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  101. package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  102. package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  103. package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  104. package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  105. package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +0 -2954
  106. package/dist/migrations/20260705012626_common_stryfe/snapshot.json +0 -3378
  107. package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  108. package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  109. package/dist/migrations/20260705030344_short_patriot/snapshot.json +0 -3873
  110. package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  111. package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  112. package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +0 -4883
  113. package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +0 -4883
  114. package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  115. package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
  116. package/dist/migrations/pg/20260701002839_sour_cerebro/snapshot.json +0 -1971
  117. package/dist/migrations/pg/20260701041134_acoustic_hulk/snapshot.json +0 -2372
  118. package/dist/migrations/pg/20260701160543_condemned_stryfe/snapshot.json +0 -2442
  119. package/dist/migrations/pg/20260701220315_heavy_gorgon/snapshot.json +0 -2495
  120. package/dist/migrations/pg/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
  121. package/dist/migrations/pg/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
  122. package/dist/migrations/pg/20260705003847_nervous_banshee/snapshot.json +0 -2954
  123. package/dist/migrations/pg/20260705012626_common_stryfe/snapshot.json +0 -3378
  124. package/dist/migrations/pg/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
  125. package/dist/migrations/pg/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
  126. package/dist/migrations/pg/20260705030344_short_patriot/snapshot.json +0 -3873
  127. package/dist/migrations/pg/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
  128. package/dist/migrations/pg/20260706185931_regular_shadow_king/snapshot.json +0 -4844
  129. package/dist/migrations/pg/20260706233300_equal_cyclops/snapshot.json +0 -4883
  130. package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +0 -4883
  131. package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +0 -5426
  132. package/dist/migrations/pg/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
@@ -0,0 +1,51 @@
1
+ import { Presence, Shared } from "../../schema/index";
2
+ import { Context, Effect, Layer, Schema, Stream } from "effect";
3
+ import { SqlClient } from "effect/unstable/sql/SqlClient";
4
+ import { Service as NotificationBusService } from "../database/notification-bus";
5
+ export declare const presenceChangedChannel = "relay_presence";
6
+ declare const PresenceRepositoryError_base: Schema.Class<PresenceRepositoryError, Schema.TaggedStruct<"PresenceRepositoryError", {
7
+ readonly message: Schema.String;
8
+ }>, import("effect/Cause").YieldableError>;
9
+ export declare class PresenceRepositoryError extends PresenceRepositoryError_base {
10
+ }
11
+ export interface HeartbeatInput {
12
+ readonly id: string;
13
+ readonly scope: Presence.Scope;
14
+ readonly metadata?: Shared.Metadata;
15
+ readonly connectedAt: number;
16
+ readonly expiresAt: number;
17
+ }
18
+ export interface RemoveInput {
19
+ readonly id: string;
20
+ readonly scope: Presence.Scope;
21
+ }
22
+ export interface ScopeInput {
23
+ readonly kind: Presence.Scope["kind"];
24
+ readonly id: string;
25
+ }
26
+ export interface PresenceRecord {
27
+ readonly id: string;
28
+ readonly scope: Presence.Scope;
29
+ readonly metadata: Shared.Metadata;
30
+ readonly connectedAt: number;
31
+ readonly expiresAt: number;
32
+ }
33
+ export interface Interface {
34
+ readonly upsertHeartbeat: (input: HeartbeatInput) => Effect.Effect<void, PresenceRepositoryError>;
35
+ readonly remove: (input: RemoveInput) => Effect.Effect<void, PresenceRepositoryError>;
36
+ readonly listByScope: (scope: ScopeInput) => Effect.Effect<ReadonlyArray<PresenceRecord>, PresenceRepositoryError>;
37
+ readonly notifyChanged: (scope: ScopeInput) => Effect.Effect<void, PresenceRepositoryError>;
38
+ readonly changedSignals: (scope: ScopeInput) => Stream.Stream<void, PresenceRepositoryError>;
39
+ }
40
+ declare const Service_base: Context.ServiceClass<Service, "@relayfx/store-sql/PresenceRepository", Interface>;
41
+ export declare class Service extends Service_base {
42
+ }
43
+ export declare const layer: Layer.Layer<Service, never, SqlClient | NotificationBusService>;
44
+ export declare const memoryLayer: Layer.Layer<Service, never, never>;
45
+ export declare const testLayer: (implementation: Interface) => Layer.Layer<Service, never, never>;
46
+ export declare const upsertHeartbeat: (input: HeartbeatInput) => Effect.Effect<void, PresenceRepositoryError, Service>;
47
+ export declare const remove: (input: RemoveInput) => Effect.Effect<void, PresenceRepositoryError, Service>;
48
+ export declare const listByScope: (scope: ScopeInput) => Effect.Effect<readonly PresenceRecord[], PresenceRepositoryError, Service>;
49
+ export declare const notifyChanged: (scope: ScopeInput) => Effect.Effect<void, PresenceRepositoryError, Service>;
50
+ export declare const changedSignals: (scope: ScopeInput) => Stream.Stream<void, PresenceRepositoryError, Service>;
51
+ export {};