@relayfx/sdk 0.0.50 → 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.
- package/README.md +5 -0
- package/dist/ai.js +42 -17222
- package/dist/index-q0z11q9m.js +18726 -0
- package/dist/index-sms8x6cq.js +137 -0
- package/dist/index-vbf5hcw8.js +2156 -0
- package/dist/index.js +741 -18839
- package/dist/migrations/20260712120000_durable_inbox/migration.sql +9 -0
- package/dist/migrations/20260712140000_execution_state/migration.sql +5 -0
- package/dist/migrations/20260712150000_durable_entities/migration.sql +15 -0
- package/dist/migrations/20260712160000_ephemeral_presence/migration.sql +13 -0
- package/dist/migrations/20260712170000_topic_subscriptions/migration.sql +3 -0
- package/dist/migrations/mysql/0003_durable_inbox.sql +3 -0
- package/dist/migrations/mysql/0004_execution_state.sql +3 -0
- package/dist/migrations/mysql/0005_durable_entities.sql +13 -0
- package/dist/migrations/mysql/0006_ephemeral_presence.sql +12 -0
- package/dist/migrations/mysql/0007_topic_subscriptions.sql +1 -0
- package/dist/migrations/pg/20260712120000_durable_inbox/migration.sql +9 -0
- package/dist/migrations/pg/20260712140000_execution_state/migration.sql +5 -0
- package/dist/migrations/pg/20260712150000_durable_entities/migration.sql +15 -0
- package/dist/migrations/pg/20260712160000_ephemeral_presence/migration.sql +13 -0
- package/dist/migrations/pg/20260712170000_topic_subscriptions/migration.sql +3 -0
- package/dist/migrations/sqlite/0003_durable_inbox.sql +9 -0
- package/dist/migrations/sqlite/0004_execution_state.sql +3 -0
- package/dist/migrations/sqlite/0005_durable_entities.sql +15 -0
- package/dist/migrations/sqlite/0006_ephemeral_presence.sql +12 -0
- package/dist/migrations/sqlite/0007_topic_subscriptions.sql +3 -0
- package/dist/sqlite.js +688 -0
- package/dist/types/relay/client.d.ts +197 -17
- package/dist/types/relay/command.d.ts +41 -0
- package/dist/types/relay/database.d.ts +1 -0
- package/dist/types/relay/index.d.ts +3 -2
- package/dist/types/relay/operation.d.ts +520 -2
- package/dist/types/relay/sqlite-migrations.d.ts +39 -0
- package/dist/types/relay/sqlite-runtime.d.ts +5 -0
- package/dist/types/relay/sqlite.d.ts +27 -0
- package/dist/types/runtime/address/address-book-service.d.ts +4 -4
- package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
- package/dist/types/runtime/agent/agent-loop-service.d.ts +2 -2
- package/dist/types/runtime/agent/agent-registry-service.d.ts +1 -1
- package/dist/types/runtime/agent/relay-compaction.d.ts +1 -1
- package/dist/types/runtime/agent/relay-permissions.d.ts +1 -1
- package/dist/types/runtime/agent/relay-steering.d.ts +1 -1
- package/dist/types/runtime/child/child-run-service.d.ts +1 -1
- package/dist/types/runtime/child/parent-notifier-service.d.ts +1 -1
- package/dist/types/runtime/cluster/execution-entity.d.ts +1 -1
- package/dist/types/runtime/entity/entity-instance-service.d.ts +67 -0
- package/dist/types/runtime/entity/entity-registry-service.d.ts +35 -0
- package/dist/types/runtime/envelope/envelope-service.d.ts +7 -3
- package/dist/types/runtime/execution/event-log-service.d.ts +1 -1
- package/dist/types/runtime/execution/execution-service.d.ts +1 -1
- package/dist/types/runtime/execution/execution-watch-service.d.ts +32 -0
- package/dist/types/runtime/execution/session-stream-service.d.ts +33 -0
- package/dist/types/runtime/inbox/inbox-service.d.ts +76 -0
- package/dist/types/runtime/inbox/send-message-tool.d.ts +27 -0
- package/dist/types/runtime/inbox/wait-for-messages-tool.d.ts +34 -0
- package/dist/types/runtime/index.d.ts +13 -0
- package/dist/types/runtime/memory/memory-service.d.ts +1 -1
- package/dist/types/runtime/presence/presence-service.d.ts +30 -0
- package/dist/types/runtime/presence/presence-tool.d.ts +20 -0
- package/dist/types/runtime/runner/runner-runtime-service.d.ts +18 -18
- package/dist/types/runtime/schedule/scheduler-service.d.ts +1 -1
- package/dist/types/runtime/session/session-store-service.d.ts +1 -1
- package/dist/types/runtime/skill/skill-registry-service.d.ts +1 -1
- package/dist/types/runtime/state/execution-state-service.d.ts +57 -0
- package/dist/types/runtime/state/state-tools.d.ts +5 -0
- package/dist/types/runtime/tool/tool-runtime-service.d.ts +1 -1
- package/dist/types/runtime/topic/publish-to-topic-tool.d.ts +24 -0
- package/dist/types/runtime/topic/topic-service.d.ts +50 -0
- package/dist/types/runtime/wait/wait-service.d.ts +2 -1
- package/dist/types/runtime/wait/wait-signal.d.ts +1 -1
- package/dist/types/runtime/workflow/execution-workflow.d.ts +2 -2
- package/dist/types/runtime/workspace/workspace-planner-service.d.ts +1 -1
- package/dist/types/schema/address-schema.d.ts +6 -6
- package/dist/types/schema/entity-schema.d.ts +40 -0
- package/dist/types/schema/envelope-schema.d.ts +1 -0
- package/dist/types/schema/execution-schema.d.ts +2 -2
- package/dist/types/schema/ids-schema.d.ts +8 -0
- package/dist/types/schema/inbox-schema.d.ts +81 -0
- package/dist/types/schema/index.d.ts +4 -0
- package/dist/types/schema/presence-schema.d.ts +28 -0
- package/dist/types/schema/state-schema.d.ts +35 -0
- package/dist/types/store-sql/address/address-book-repository.d.ts +1 -1
- package/dist/types/store-sql/database/database-service.d.ts +4 -18
- package/dist/types/store-sql/database/notification-bus.d.ts +2 -0
- package/dist/types/store-sql/database/sql-dialect.d.ts +13 -0
- package/dist/types/store-sql/entity/entity-repository.d.ts +36 -0
- package/dist/types/store-sql/envelope/envelope-repository.d.ts +1 -0
- package/dist/types/store-sql/execution/execution-event-repository.d.ts +2 -1
- package/dist/types/store-sql/execution/execution-repository.d.ts +12 -2
- package/dist/types/store-sql/inbox/inbox-repository.d.ts +56 -0
- package/dist/types/store-sql/index.d.ts +6 -0
- package/dist/types/store-sql/portable.d.ts +27 -0
- package/dist/types/store-sql/presence/presence-repository.d.ts +51 -0
- package/dist/types/store-sql/schema/relay-schema.d.ts +1352 -140
- package/dist/types/store-sql/state/execution-state-repository.d.ts +80 -0
- package/dist/types/store-sql/tenant/tenant-id.d.ts +0 -2
- package/dist/types/store-sql/topic/topic-repository.d.ts +44 -0
- package/package.json +26 -4
- package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +0 -1971
- package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +0 -2372
- package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +0 -2442
- package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +0 -2495
- package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
- package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
- package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +0 -2954
- package/dist/migrations/20260705012626_common_stryfe/snapshot.json +0 -3378
- package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
- package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
- package/dist/migrations/20260705030344_short_patriot/snapshot.json +0 -3873
- package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
- package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +0 -4844
- package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +0 -4883
- package/dist/migrations/20260709030349_agent_id_rename/snapshot.json +0 -4883
- package/dist/migrations/20260709214238_faithful_black_widow/snapshot.json +0 -5426
- package/dist/migrations/20260709220016_fearless_aaron_stack/snapshot.json +0 -5426
- package/dist/migrations/pg/20260701002839_sour_cerebro/snapshot.json +0 -1971
- package/dist/migrations/pg/20260701041134_acoustic_hulk/snapshot.json +0 -2372
- package/dist/migrations/pg/20260701160543_condemned_stryfe/snapshot.json +0 -2442
- package/dist/migrations/pg/20260701220315_heavy_gorgon/snapshot.json +0 -2495
- package/dist/migrations/pg/20260701225444_polite_lord_hawal/snapshot.json +0 -2821
- package/dist/migrations/pg/20260702030128_flaky_misty_knight/snapshot.json +0 -2821
- package/dist/migrations/pg/20260705003847_nervous_banshee/snapshot.json +0 -2954
- package/dist/migrations/pg/20260705012626_common_stryfe/snapshot.json +0 -3378
- package/dist/migrations/pg/20260705015420_sweet_captain_marvel/snapshot.json +0 -3485
- package/dist/migrations/pg/20260705023041_chunky_scalphunter/snapshot.json +0 -3753
- package/dist/migrations/pg/20260705030344_short_patriot/snapshot.json +0 -3873
- package/dist/migrations/pg/20260705045546_heavy_ben_grimm/snapshot.json +0 -4193
- package/dist/migrations/pg/20260706185931_regular_shadow_king/snapshot.json +0 -4844
- package/dist/migrations/pg/20260706233300_equal_cyclops/snapshot.json +0 -4883
- package/dist/migrations/pg/20260709030349_agent_id_rename/snapshot.json +0 -4883
- package/dist/migrations/pg/20260709214238_faithful_black_widow/snapshot.json +0 -5426
- 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 {};
|