claude-ws 0.1.23 → 0.1.25

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,164 @@
1
+ CREATE TABLE `agent_factory_plugins` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `type` text NOT NULL,
4
+ `name` text NOT NULL,
5
+ `description` text,
6
+ `source_path` text,
7
+ `storage_type` text DEFAULT 'local' NOT NULL,
8
+ `agent_set_path` text,
9
+ `metadata` text,
10
+ `created_at` integer NOT NULL,
11
+ `updated_at` integer NOT NULL
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE TABLE `attempt_files` (
15
+ `id` text PRIMARY KEY NOT NULL,
16
+ `attempt_id` text NOT NULL,
17
+ `filename` text NOT NULL,
18
+ `original_name` text NOT NULL,
19
+ `mime_type` text NOT NULL,
20
+ `size` integer NOT NULL,
21
+ `created_at` integer NOT NULL,
22
+ FOREIGN KEY (`attempt_id`) REFERENCES `attempts`(`id`) ON UPDATE no action ON DELETE cascade
23
+ );
24
+ --> statement-breakpoint
25
+ CREATE INDEX `idx_attempt_files_attempt` ON `attempt_files` (`attempt_id`);--> statement-breakpoint
26
+ CREATE TABLE `attempt_logs` (
27
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
28
+ `attempt_id` text NOT NULL,
29
+ `type` text NOT NULL,
30
+ `content` text NOT NULL,
31
+ `created_at` integer NOT NULL,
32
+ FOREIGN KEY (`attempt_id`) REFERENCES `attempts`(`id`) ON UPDATE no action ON DELETE cascade
33
+ );
34
+ --> statement-breakpoint
35
+ CREATE INDEX `idx_logs_attempt` ON `attempt_logs` (`attempt_id`,`created_at`);--> statement-breakpoint
36
+ CREATE TABLE `attempts` (
37
+ `id` text PRIMARY KEY NOT NULL,
38
+ `task_id` text NOT NULL,
39
+ `prompt` text NOT NULL,
40
+ `display_prompt` text,
41
+ `status` text DEFAULT 'running' NOT NULL,
42
+ `session_id` text,
43
+ `branch` text,
44
+ `diff_additions` integer DEFAULT 0 NOT NULL,
45
+ `diff_deletions` integer DEFAULT 0 NOT NULL,
46
+ `total_tokens` integer DEFAULT 0 NOT NULL,
47
+ `input_tokens` integer DEFAULT 0 NOT NULL,
48
+ `output_tokens` integer DEFAULT 0 NOT NULL,
49
+ `cache_creation_tokens` integer DEFAULT 0 NOT NULL,
50
+ `cache_read_tokens` integer DEFAULT 0 NOT NULL,
51
+ `total_cost_usd` integer DEFAULT 0 NOT NULL,
52
+ `num_turns` integer DEFAULT 0 NOT NULL,
53
+ `duration_ms` integer DEFAULT 0 NOT NULL,
54
+ `created_at` integer NOT NULL,
55
+ `completed_at` integer,
56
+ FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE cascade
57
+ );
58
+ --> statement-breakpoint
59
+ CREATE INDEX `idx_attempts_task` ON `attempts` (`task_id`,`created_at`);--> statement-breakpoint
60
+ CREATE TABLE `checkpoints` (
61
+ `id` text PRIMARY KEY NOT NULL,
62
+ `task_id` text NOT NULL,
63
+ `attempt_id` text NOT NULL,
64
+ `session_id` text NOT NULL,
65
+ `git_commit_hash` text,
66
+ `message_count` integer NOT NULL,
67
+ `summary` text,
68
+ `created_at` integer NOT NULL,
69
+ FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE cascade,
70
+ FOREIGN KEY (`attempt_id`) REFERENCES `attempts`(`id`) ON UPDATE no action ON DELETE cascade
71
+ );
72
+ --> statement-breakpoint
73
+ CREATE INDEX `idx_checkpoints_task` ON `checkpoints` (`task_id`,`created_at`);--> statement-breakpoint
74
+ CREATE TABLE `plugin_dependencies` (
75
+ `id` text PRIMARY KEY NOT NULL,
76
+ `plugin_id` text NOT NULL,
77
+ `dependency_type` text NOT NULL,
78
+ `spec` text NOT NULL,
79
+ `plugin_dependency_id` text,
80
+ `installed` integer DEFAULT false NOT NULL,
81
+ `created_at` integer NOT NULL,
82
+ FOREIGN KEY (`plugin_id`) REFERENCES `agent_factory_plugins`(`id`) ON UPDATE no action ON DELETE cascade,
83
+ FOREIGN KEY (`plugin_dependency_id`) REFERENCES `agent_factory_plugins`(`id`) ON UPDATE no action ON DELETE set null
84
+ );
85
+ --> statement-breakpoint
86
+ CREATE INDEX `idx_plugin_deps` ON `plugin_dependencies` (`plugin_id`);--> statement-breakpoint
87
+ CREATE INDEX `idx_plugin_depends_on` ON `plugin_dependencies` (`plugin_dependency_id`);--> statement-breakpoint
88
+ CREATE TABLE `plugin_dependency_cache` (
89
+ `id` text PRIMARY KEY NOT NULL,
90
+ `plugin_id` text,
91
+ `source_path` text,
92
+ `source_hash` text,
93
+ `type` text NOT NULL,
94
+ `library_deps` text,
95
+ `plugin_deps` text,
96
+ `install_script_npm` text,
97
+ `install_script_pnpm` text,
98
+ `install_script_yarn` text,
99
+ `install_script_pip` text,
100
+ `install_script_poetry` text,
101
+ `install_script_cargo` text,
102
+ `install_script_go` text,
103
+ `dockerfile` text,
104
+ `depth` integer DEFAULT 0 NOT NULL,
105
+ `has_cycles` integer DEFAULT false NOT NULL,
106
+ `resolved_at` integer NOT NULL,
107
+ `created_at` integer NOT NULL,
108
+ FOREIGN KEY (`plugin_id`) REFERENCES `agent_factory_plugins`(`id`) ON UPDATE no action ON DELETE cascade
109
+ );
110
+ --> statement-breakpoint
111
+ CREATE INDEX `idx_cache_plugin` ON `plugin_dependency_cache` (`plugin_id`);--> statement-breakpoint
112
+ CREATE INDEX `idx_cache_source` ON `plugin_dependency_cache` (`source_path`);--> statement-breakpoint
113
+ CREATE TABLE `project_plugins` (
114
+ `id` text PRIMARY KEY NOT NULL,
115
+ `project_id` text NOT NULL,
116
+ `plugin_id` text NOT NULL,
117
+ `enabled` integer DEFAULT true NOT NULL,
118
+ `created_at` integer NOT NULL,
119
+ FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
120
+ FOREIGN KEY (`plugin_id`) REFERENCES `agent_factory_plugins`(`id`) ON UPDATE no action ON DELETE cascade
121
+ );
122
+ --> statement-breakpoint
123
+ CREATE INDEX `idx_project_plugins` ON `project_plugins` (`project_id`,`plugin_id`);--> statement-breakpoint
124
+ CREATE TABLE `projects` (
125
+ `id` text PRIMARY KEY NOT NULL,
126
+ `name` text NOT NULL,
127
+ `path` text NOT NULL,
128
+ `created_at` integer NOT NULL
129
+ );
130
+ --> statement-breakpoint
131
+ CREATE UNIQUE INDEX `projects_path_unique` ON `projects` (`path`);--> statement-breakpoint
132
+ CREATE TABLE `shells` (
133
+ `id` text PRIMARY KEY NOT NULL,
134
+ `project_id` text NOT NULL,
135
+ `attempt_id` text,
136
+ `command` text NOT NULL,
137
+ `cwd` text NOT NULL,
138
+ `pid` integer,
139
+ `status` text DEFAULT 'running' NOT NULL,
140
+ `exit_code` integer,
141
+ `exit_signal` text,
142
+ `created_at` integer NOT NULL,
143
+ `stopped_at` integer,
144
+ FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
145
+ FOREIGN KEY (`attempt_id`) REFERENCES `attempts`(`id`) ON UPDATE no action ON DELETE set null
146
+ );
147
+ --> statement-breakpoint
148
+ CREATE INDEX `idx_shells_project` ON `shells` (`project_id`,`status`);--> statement-breakpoint
149
+ CREATE TABLE `tasks` (
150
+ `id` text PRIMARY KEY NOT NULL,
151
+ `project_id` text NOT NULL,
152
+ `title` text NOT NULL,
153
+ `description` text,
154
+ `status` text DEFAULT 'todo' NOT NULL,
155
+ `position` integer NOT NULL,
156
+ `chat_init` integer DEFAULT false NOT NULL,
157
+ `rewind_session_id` text,
158
+ `rewind_message_uuid` text,
159
+ `created_at` integer NOT NULL,
160
+ `updated_at` integer NOT NULL,
161
+ FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade
162
+ );
163
+ --> statement-breakpoint
164
+ CREATE INDEX `idx_tasks_project` ON `tasks` (`project_id`,`status`,`position`);
@@ -0,0 +1,33 @@
1
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
+ CREATE TABLE `__new_attempts` (
3
+ `id` text PRIMARY KEY NOT NULL,
4
+ `task_id` text NOT NULL,
5
+ `prompt` text NOT NULL,
6
+ `display_prompt` text,
7
+ `status` text DEFAULT 'running' NOT NULL,
8
+ `session_id` text,
9
+ `branch` text,
10
+ `diff_additions` integer DEFAULT 0 NOT NULL,
11
+ `diff_deletions` integer DEFAULT 0 NOT NULL,
12
+ `total_tokens` integer DEFAULT 0 NOT NULL,
13
+ `input_tokens` integer DEFAULT 0 NOT NULL,
14
+ `output_tokens` integer DEFAULT 0 NOT NULL,
15
+ `cache_creation_tokens` integer DEFAULT 0 NOT NULL,
16
+ `cache_read_tokens` integer DEFAULT 0 NOT NULL,
17
+ `total_cost_usd` text DEFAULT '0' NOT NULL,
18
+ `num_turns` integer DEFAULT 0 NOT NULL,
19
+ `duration_ms` integer DEFAULT 0 NOT NULL,
20
+ `context_used` integer DEFAULT 0 NOT NULL,
21
+ `context_limit` integer DEFAULT 200000 NOT NULL,
22
+ `context_percentage` integer DEFAULT 0 NOT NULL,
23
+ `baseline_context` integer DEFAULT 0 NOT NULL,
24
+ `created_at` integer NOT NULL,
25
+ `completed_at` integer,
26
+ FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE cascade
27
+ );
28
+ --> statement-breakpoint
29
+ INSERT INTO `__new_attempts`("id", "task_id", "prompt", "display_prompt", "status", "session_id", "branch", "diff_additions", "diff_deletions", "total_tokens", "input_tokens", "output_tokens", "cache_creation_tokens", "cache_read_tokens", "total_cost_usd", "num_turns", "duration_ms", "context_used", "context_limit", "context_percentage", "baseline_context", "created_at", "completed_at") SELECT "id", "task_id", "prompt", "display_prompt", "status", "session_id", "branch", "diff_additions", "diff_deletions", "total_tokens", "input_tokens", "output_tokens", "cache_creation_tokens", "cache_read_tokens", "total_cost_usd", "num_turns", "duration_ms", "context_used", "context_limit", "context_percentage", "baseline_context", "created_at", "completed_at" FROM `attempts`;--> statement-breakpoint
30
+ DROP TABLE `attempts`;--> statement-breakpoint
31
+ ALTER TABLE `__new_attempts` RENAME TO `attempts`;--> statement-breakpoint
32
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
33
+ CREATE INDEX `idx_attempts_task` ON `attempts` (`task_id`,`created_at`);