@relayfx/sdk 0.0.28 → 0.0.30

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 (39) hide show
  1. package/dist/index.js +3832 -3186
  2. package/dist/migrations/20260701002839_sour_cerebro/migration.sql +160 -0
  3. package/dist/migrations/20260701002839_sour_cerebro/snapshot.json +1971 -0
  4. package/dist/migrations/20260701041134_acoustic_hulk/migration.sql +30 -0
  5. package/dist/migrations/20260701041134_acoustic_hulk/snapshot.json +2372 -0
  6. package/dist/migrations/20260701160543_condemned_stryfe/migration.sql +2 -0
  7. package/dist/migrations/20260701160543_condemned_stryfe/snapshot.json +2442 -0
  8. package/dist/migrations/20260701220315_heavy_gorgon/migration.sql +5 -0
  9. package/dist/migrations/20260701220315_heavy_gorgon/snapshot.json +2495 -0
  10. package/dist/migrations/20260701225444_polite_lord_hawal/migration.sql +24 -0
  11. package/dist/migrations/20260701225444_polite_lord_hawal/snapshot.json +2821 -0
  12. package/dist/migrations/20260702030128_flaky_misty_knight/migration.sql +1 -0
  13. package/dist/migrations/20260702030128_flaky_misty_knight/snapshot.json +2821 -0
  14. package/dist/migrations/20260705003847_nervous_banshee/migration.sql +11 -0
  15. package/dist/migrations/20260705003847_nervous_banshee/snapshot.json +2954 -0
  16. package/dist/migrations/20260705012626_common_stryfe/migration.sql +31 -0
  17. package/dist/migrations/20260705012626_common_stryfe/snapshot.json +3378 -0
  18. package/dist/migrations/20260705015420_sweet_captain_marvel/migration.sql +10 -0
  19. package/dist/migrations/20260705015420_sweet_captain_marvel/snapshot.json +3485 -0
  20. package/dist/migrations/20260705023041_chunky_scalphunter/migration.sql +22 -0
  21. package/dist/migrations/20260705023041_chunky_scalphunter/snapshot.json +3753 -0
  22. package/dist/migrations/20260705030344_short_patriot/migration.sql +11 -0
  23. package/dist/migrations/20260705030344_short_patriot/snapshot.json +3873 -0
  24. package/dist/migrations/20260705045546_heavy_ben_grimm/migration.sql +30 -0
  25. package/dist/migrations/20260705045546_heavy_ben_grimm/snapshot.json +4193 -0
  26. package/dist/migrations/20260706185931_regular_shadow_king/migration.sql +166 -0
  27. package/dist/migrations/20260706185931_regular_shadow_king/snapshot.json +4844 -0
  28. package/dist/migrations/20260706233300_equal_cyclops/migration.sql +3 -0
  29. package/dist/migrations/20260706233300_equal_cyclops/snapshot.json +4883 -0
  30. package/dist/types/runtime/runner/runner-runtime-service.d.ts +10 -9
  31. package/dist/types/store-sql/database/notification-bus.d.ts +16 -0
  32. package/dist/types/store-sql/execution/execution-event-repository.d.ts +15 -2
  33. package/dist/types/store-sql/idempotency/idempotency-repository.d.ts +11 -2
  34. package/dist/types/store-sql/index.d.ts +1 -0
  35. package/dist/types/store-sql/memory/memory-repository.d.ts +12 -2
  36. package/dist/types/store-sql/schedule/schedule-repository.d.ts +21 -2
  37. package/dist/types/store-sql/skill/skill-definition-repository.d.ts +22 -2
  38. package/dist/types/store-sql/workspace/workspace-lease-repository.d.ts +25 -2
  39. package/package.json +1 -1
@@ -0,0 +1,160 @@
1
+ CREATE TABLE "relay_address_book_entries" (
2
+ "id" text PRIMARY KEY,
3
+ "address_id" text NOT NULL,
4
+ "route_kind" text NOT NULL,
5
+ "route_key" text NOT NULL,
6
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
7
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
8
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
9
+ );
10
+ --> statement-breakpoint
11
+ CREATE TABLE "relay_agent_definition_revisions" (
12
+ "agent_definition_id" text,
13
+ "revision" integer,
14
+ "name" text NOT NULL,
15
+ "definition_json" jsonb NOT NULL,
16
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
17
+ CONSTRAINT "pk_relay_agent_definition_revisions" PRIMARY KEY("agent_definition_id","revision")
18
+ );
19
+ --> statement-breakpoint
20
+ CREATE TABLE "relay_agent_definitions" (
21
+ "id" text PRIMARY KEY,
22
+ "name" text NOT NULL,
23
+ "current_revision" integer NOT NULL,
24
+ "definition_json" jsonb NOT NULL,
25
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
26
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
27
+ );
28
+ --> statement-breakpoint
29
+ CREATE TABLE "relay_child_executions" (
30
+ "id" text PRIMARY KEY,
31
+ "execution_id" text NOT NULL,
32
+ "address_id" text NOT NULL,
33
+ "status" text NOT NULL,
34
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
35
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
36
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
37
+ );
38
+ --> statement-breakpoint
39
+ CREATE TABLE "relay_envelope_ready" (
40
+ "id" text PRIMARY KEY,
41
+ "envelope_id" text NOT NULL,
42
+ "route_type" text NOT NULL,
43
+ "route_key" text NOT NULL,
44
+ "state" text DEFAULT 'ready' NOT NULL,
45
+ "available_at" timestamp with time zone DEFAULT now() NOT NULL,
46
+ "attempt" integer DEFAULT 0 NOT NULL,
47
+ "claim_owner" text,
48
+ "claim_expires_at" timestamp with time zone,
49
+ "last_error" text,
50
+ "idempotency_key" text,
51
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
52
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
53
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
54
+ "claimed_at" timestamp with time zone,
55
+ "acknowledged_at" timestamp with time zone
56
+ );
57
+ --> statement-breakpoint
58
+ CREATE TABLE "relay_envelopes" (
59
+ "id" text PRIMARY KEY,
60
+ "execution_id" text NOT NULL,
61
+ "from_address_id" text NOT NULL,
62
+ "to_address_id" text NOT NULL,
63
+ "content_json" jsonb NOT NULL,
64
+ "wait_json" jsonb,
65
+ "correlation_key" text,
66
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
67
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
68
+ );
69
+ --> statement-breakpoint
70
+ CREATE TABLE "relay_execution_events" (
71
+ "id" text PRIMARY KEY,
72
+ "execution_id" text NOT NULL,
73
+ "child_execution_id" text,
74
+ "type" text NOT NULL,
75
+ "sequence" integer NOT NULL,
76
+ "cursor" text NOT NULL,
77
+ "content_json" jsonb,
78
+ "data_json" jsonb DEFAULT '{}' NOT NULL,
79
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
80
+ );
81
+ --> statement-breakpoint
82
+ CREATE TABLE "relay_executions" (
83
+ "id" text PRIMARY KEY,
84
+ "root_address_id" text NOT NULL,
85
+ "status" text NOT NULL,
86
+ "agent_definition_id" text,
87
+ "agent_definition_revision" integer,
88
+ "agent_definition_snapshot_json" jsonb,
89
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
90
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
91
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
92
+ );
93
+ --> statement-breakpoint
94
+ CREATE TABLE "relay_idempotency_keys" (
95
+ "id" text PRIMARY KEY,
96
+ "scope" text NOT NULL,
97
+ "operation" text NOT NULL,
98
+ "key" text NOT NULL,
99
+ "result_json" jsonb,
100
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
101
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
102
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
103
+ "expires_at" timestamp with time zone
104
+ );
105
+ --> statement-breakpoint
106
+ CREATE TABLE "relay_route_attempts" (
107
+ "id" text PRIMARY KEY,
108
+ "envelope_ready_id" text NOT NULL,
109
+ "route_key" text NOT NULL,
110
+ "state" text NOT NULL,
111
+ "detail" text,
112
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
113
+ );
114
+ --> statement-breakpoint
115
+ CREATE TABLE "relay_tool_calls" (
116
+ "id" text PRIMARY KEY,
117
+ "execution_id" text NOT NULL,
118
+ "name" text NOT NULL,
119
+ "input_json" jsonb NOT NULL,
120
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
121
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
122
+ );
123
+ --> statement-breakpoint
124
+ CREATE TABLE "relay_tool_results" (
125
+ "tool_call_id" text PRIMARY KEY,
126
+ "output_json" jsonb NOT NULL,
127
+ "error" text,
128
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
129
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
130
+ );
131
+ --> statement-breakpoint
132
+ CREATE TABLE "relay_waits" (
133
+ "id" text PRIMARY KEY,
134
+ "execution_id" text NOT NULL,
135
+ "envelope_id" text NOT NULL,
136
+ "mode" text NOT NULL,
137
+ "correlation_key" text,
138
+ "state" text DEFAULT 'open' NOT NULL,
139
+ "metadata_json" jsonb DEFAULT '{}' NOT NULL,
140
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
141
+ "resolved_at" timestamp with time zone
142
+ );
143
+ --> statement-breakpoint
144
+ CREATE UNIQUE INDEX "uq_relay_address_book_address" ON "relay_address_book_entries" ("address_id");--> statement-breakpoint
145
+ CREATE INDEX "idx_relay_agent_definition_revisions_definition" ON "relay_agent_definition_revisions" ("agent_definition_id","revision");--> statement-breakpoint
146
+ CREATE INDEX "idx_relay_agent_definitions_name" ON "relay_agent_definitions" ("name");--> statement-breakpoint
147
+ CREATE INDEX "idx_relay_child_executions_parent" ON "relay_child_executions" ("execution_id");--> statement-breakpoint
148
+ CREATE INDEX "idx_relay_envelope_ready_state_available" ON "relay_envelope_ready" ("state","available_at");--> statement-breakpoint
149
+ CREATE INDEX "idx_relay_envelope_ready_claim_expires" ON "relay_envelope_ready" ("claim_expires_at");--> statement-breakpoint
150
+ CREATE UNIQUE INDEX "uq_relay_envelope_ready_idempotency" ON "relay_envelope_ready" ("idempotency_key");--> statement-breakpoint
151
+ CREATE INDEX "idx_relay_envelopes_execution" ON "relay_envelopes" ("execution_id","created_at");--> statement-breakpoint
152
+ CREATE INDEX "idx_relay_envelopes_to_address" ON "relay_envelopes" ("to_address_id","created_at");--> statement-breakpoint
153
+ CREATE INDEX "idx_relay_execution_events_execution" ON "relay_execution_events" ("execution_id","created_at");--> statement-breakpoint
154
+ CREATE UNIQUE INDEX "uq_relay_execution_events_sequence" ON "relay_execution_events" ("execution_id","sequence");--> statement-breakpoint
155
+ CREATE UNIQUE INDEX "uq_relay_execution_events_cursor" ON "relay_execution_events" ("cursor");--> statement-breakpoint
156
+ CREATE INDEX "idx_relay_executions_root_status" ON "relay_executions" ("root_address_id","status");--> statement-breakpoint
157
+ CREATE UNIQUE INDEX "uq_relay_idempotency_scope_operation_key" ON "relay_idempotency_keys" ("scope","operation","key");--> statement-breakpoint
158
+ CREATE INDEX "idx_relay_route_attempts_ready" ON "relay_route_attempts" ("envelope_ready_id","created_at");--> statement-breakpoint
159
+ CREATE INDEX "idx_relay_tool_calls_execution" ON "relay_tool_calls" ("execution_id","created_at");--> statement-breakpoint
160
+ CREATE INDEX "idx_relay_waits_execution_state" ON "relay_waits" ("execution_id","state");