@crewx/sdk 0.9.0-rc.198 → 0.9.0-rc.199

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.
@@ -0,0 +1,47 @@
1
+ CREATE TABLE IF NOT EXISTS `route_decisions` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `route_id` text NOT NULL,
4
+ `task_id` text NOT NULL,
5
+ `config_revision` text NOT NULL,
6
+ `candidate_id` text NOT NULL,
7
+ `provider` text NOT NULL,
8
+ `model` text NOT NULL,
9
+ `reason` text NOT NULL,
10
+ `eligible_ids` text NOT NULL,
11
+ `blocked_causes` text NOT NULL,
12
+ `link_errors` text NOT NULL,
13
+ `created_at` text NOT NULL
14
+ );
15
+ --> statement-breakpoint
16
+ CREATE UNIQUE INDEX IF NOT EXISTS `uniq_route_task_decision` ON `route_decisions` (`route_id`,`task_id`);--> statement-breakpoint
17
+ CREATE INDEX IF NOT EXISTS `idx_route_decisions_created` ON `route_decisions` (`created_at`);--> statement-breakpoint
18
+ CREATE TABLE IF NOT EXISTS `route_quota_observations` (
19
+ `id` text PRIMARY KEY NOT NULL,
20
+ `provider` text NOT NULL,
21
+ `account_ref` text DEFAULT 'default' NOT NULL,
22
+ `model` text,
23
+ `status` text NOT NULL,
24
+ `source` text NOT NULL,
25
+ `reset_at` text,
26
+ `observed_at` text NOT NULL
27
+ );
28
+ --> statement-breakpoint
29
+ CREATE UNIQUE INDEX IF NOT EXISTS `uniq_route_quota_observation` ON `route_quota_observations` (`provider`,`account_ref`,`model`,`source`);--> statement-breakpoint
30
+ CREATE INDEX IF NOT EXISTS `idx_route_quota_observations_reset` ON `route_quota_observations` (`reset_at`);--> statement-breakpoint
31
+ CREATE TABLE IF NOT EXISTS `route_states` (
32
+ `route_id` text PRIMARY KEY NOT NULL,
33
+ `config_revision` text NOT NULL,
34
+ `state_json` text NOT NULL,
35
+ `revision` integer DEFAULT 0 NOT NULL,
36
+ `updated_at` text NOT NULL
37
+ );
38
+ --> statement-breakpoint
39
+ CREATE TABLE IF NOT EXISTS `route_sticky_bindings` (
40
+ `route_id` text NOT NULL,
41
+ `thread_id` text NOT NULL,
42
+ `candidate_id` text NOT NULL,
43
+ `updated_at` text NOT NULL
44
+ );
45
+ --> statement-breakpoint
46
+ CREATE UNIQUE INDEX IF NOT EXISTS `uniq_route_sticky_thread` ON `route_sticky_bindings` (`route_id`,`thread_id`);--> statement-breakpoint
47
+ CREATE INDEX IF NOT EXISTS `idx_route_sticky_candidate` ON `route_sticky_bindings` (`route_id`,`candidate_id`);