@sascha384/tic 1.35.0 → 2.0.1

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 (101) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +17 -63
  3. package/dist/backends/availability.js +4 -2
  4. package/dist/backends/availability.js.map +1 -1
  5. package/dist/backends/factory.d.ts +5 -3
  6. package/dist/backends/factory.js +28 -43
  7. package/dist/backends/factory.js.map +1 -1
  8. package/dist/backends/files/hash.d.ts +1 -0
  9. package/dist/backends/files/hash.js +5 -0
  10. package/dist/backends/files/hash.js.map +1 -0
  11. package/dist/backends/files/index.d.ts +48 -0
  12. package/dist/backends/files/index.js +174 -0
  13. package/dist/backends/files/index.js.map +1 -0
  14. package/dist/backends/files/sync.d.ts +13 -0
  15. package/dist/backends/files/sync.js +69 -0
  16. package/dist/backends/files/sync.js.map +1 -0
  17. package/dist/backends/jira/config.d.ts +1 -1
  18. package/dist/backends/jira/config.js +6 -9
  19. package/dist/backends/jira/config.js.map +1 -1
  20. package/dist/backends/types.d.ts +12 -0
  21. package/dist/backends/types.js +5 -1
  22. package/dist/backends/types.js.map +1 -1
  23. package/dist/cli/commands/config.js +27 -14
  24. package/dist/cli/commands/config.js.map +1 -1
  25. package/dist/cli/commands/init.js +10 -3
  26. package/dist/cli/commands/init.js.map +1 -1
  27. package/dist/cli/commands/mcp.d.ts +4 -4
  28. package/dist/cli/commands/mcp.js +16 -25
  29. package/dist/cli/commands/mcp.js.map +1 -1
  30. package/dist/cli/index.js +16 -19
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/commands.js +0 -6
  33. package/dist/commands.js.map +1 -1
  34. package/dist/components/Header.js +3 -2
  35. package/dist/components/Header.js.map +1 -1
  36. package/dist/components/OverlayPanel.d.ts +2 -1
  37. package/dist/components/OverlayPanel.js +8 -1
  38. package/dist/components/OverlayPanel.js.map +1 -1
  39. package/dist/components/Settings.js +6 -11
  40. package/dist/components/Settings.js.map +1 -1
  41. package/dist/components/StatusScreen.js +1 -1
  42. package/dist/components/StatusScreen.js.map +1 -1
  43. package/dist/components/WorkItemForm.js +6 -9
  44. package/dist/components/WorkItemForm.js.map +1 -1
  45. package/dist/components/WorkItemList.js +102 -51
  46. package/dist/components/WorkItemList.js.map +1 -1
  47. package/dist/index.js +20 -8
  48. package/dist/index.js.map +1 -1
  49. package/dist/storage/config.d.ts +61 -0
  50. package/dist/storage/config.js +309 -0
  51. package/dist/storage/config.js.map +1 -0
  52. package/dist/storage/db.d.ts +11 -0
  53. package/dist/storage/db.js +34 -0
  54. package/dist/storage/db.js.map +1 -0
  55. package/dist/storage/index.d.ts +73 -0
  56. package/dist/storage/index.js +966 -0
  57. package/dist/storage/index.js.map +1 -0
  58. package/dist/storage/mappers.d.ts +35 -0
  59. package/dist/storage/mappers.js +70 -0
  60. package/dist/storage/mappers.js.map +1 -0
  61. package/dist/storage/schema.d.ts +1844 -0
  62. package/dist/storage/schema.js +197 -0
  63. package/dist/storage/schema.js.map +1 -0
  64. package/dist/storage/syncQueue.d.ts +13 -0
  65. package/dist/storage/syncQueue.js +98 -0
  66. package/dist/storage/syncQueue.js.map +1 -0
  67. package/dist/storage/undo.d.ts +22 -0
  68. package/dist/storage/undo.js +129 -0
  69. package/dist/storage/undo.js.map +1 -0
  70. package/dist/stores/backendDataStore.d.ts +4 -1
  71. package/dist/stores/backendDataStore.js +61 -40
  72. package/dist/stores/backendDataStore.js.map +1 -1
  73. package/dist/stores/configStore.d.ts +3 -1
  74. package/dist/stores/configStore.js +25 -65
  75. package/dist/stores/configStore.js.map +1 -1
  76. package/dist/stores/filterStore.d.ts +2 -0
  77. package/dist/stores/filterStore.js +7 -2
  78. package/dist/stores/filterStore.js.map +1 -1
  79. package/dist/stores/uiStore.d.ts +0 -2
  80. package/dist/stores/uiStore.js.map +1 -1
  81. package/dist/stores/undoStore.d.ts +4 -0
  82. package/dist/stores/undoStore.js +32 -0
  83. package/dist/stores/undoStore.js.map +1 -1
  84. package/dist/sync/SyncManager.d.ts +3 -4
  85. package/dist/sync/SyncManager.js +78 -37
  86. package/dist/sync/SyncManager.js.map +1 -1
  87. package/dist/sync/types.d.ts +10 -1
  88. package/drizzle/0000_next_vance_astro.sql +183 -0
  89. package/drizzle/meta/0000_snapshot.json +1188 -0
  90. package/drizzle/meta/_journal.json +13 -0
  91. package/package.json +6 -1
  92. package/skills/config/SKILL.md +2 -2
  93. package/dist/backends/local/config.d.ts +0 -38
  94. package/dist/backends/local/config.js +0 -42
  95. package/dist/backends/local/config.js.map +0 -1
  96. package/dist/backends/local/index.d.ts +0 -45
  97. package/dist/backends/local/index.js +0 -291
  98. package/dist/backends/local/index.js.map +0 -1
  99. package/dist/sync/queue.d.ts +0 -12
  100. package/dist/sync/queue.js +0 -56
  101. package/dist/sync/queue.js.map +0 -1
@@ -11,9 +11,18 @@ export interface QueueEntry {
11
11
  /** For templates: the template slug */
12
12
  templateSlug?: string;
13
13
  }
14
- export interface SyncQueue {
14
+ export interface SyncQueueData {
15
15
  pending: QueueEntry[];
16
16
  }
17
+ export interface SyncQueueAdapter {
18
+ read(): SyncQueueData | Promise<SyncQueueData>;
19
+ append(entry: QueueEntry): void | Promise<void>;
20
+ remove(itemId: string, action: QueueAction): void | Promise<void>;
21
+ removeByIds(itemIds: string[], action: QueueAction): void | Promise<void>;
22
+ claimNext(): QueueEntry | null | Promise<QueueEntry | null>;
23
+ clear(): void | Promise<void>;
24
+ renameItem(oldId: string, newId: string): void | Promise<void>;
25
+ }
17
26
  export interface SyncError {
18
27
  entry: QueueEntry;
19
28
  message: string;
@@ -0,0 +1,183 @@
1
+ CREATE TABLE `comments` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `work_item_id` text NOT NULL,
4
+ `author` text DEFAULT '' NOT NULL,
5
+ `body` text NOT NULL,
6
+ `created` text NOT NULL,
7
+ FOREIGN KEY (`work_item_id`) REFERENCES `work_items`(`id`) ON UPDATE no action ON DELETE cascade
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE INDEX `idx_comment_item` ON `comments` (`work_item_id`);--> statement-breakpoint
11
+ CREATE TABLE `file_sync_state` (
12
+ `item_id` text PRIMARY KEY NOT NULL,
13
+ `hash` text NOT NULL,
14
+ `synced_at` text NOT NULL
15
+ );
16
+ --> statement-breakpoint
17
+ CREATE TABLE `iterations` (
18
+ `name` text PRIMARY KEY NOT NULL,
19
+ `sort_order` integer DEFAULT 0 NOT NULL
20
+ );
21
+ --> statement-breakpoint
22
+ CREATE TABLE `jira_config` (
23
+ `id` integer PRIMARY KEY DEFAULT 1 NOT NULL,
24
+ `site` text DEFAULT '' NOT NULL,
25
+ `project` text DEFAULT '' NOT NULL,
26
+ `board_id` text DEFAULT '' NOT NULL
27
+ );
28
+ --> statement-breakpoint
29
+ CREATE TABLE `project_config` (
30
+ `id` integer PRIMARY KEY DEFAULT 1 NOT NULL,
31
+ `backend` text DEFAULT 'none' NOT NULL,
32
+ `current_iteration` text DEFAULT '' NOT NULL,
33
+ `next_id` integer DEFAULT 1 NOT NULL,
34
+ `branch_mode` text DEFAULT 'branch' NOT NULL,
35
+ `branch_command` text DEFAULT '' NOT NULL,
36
+ `copy_to_clipboard` integer DEFAULT true NOT NULL,
37
+ `auto_update` integer DEFAULT true NOT NULL,
38
+ `default_type` text DEFAULT 'issue' NOT NULL,
39
+ `show_detail_panel` integer DEFAULT false NOT NULL,
40
+ `default_view` text DEFAULT '' NOT NULL
41
+ );
42
+ --> statement-breakpoint
43
+ CREATE TABLE `saved_view_filters` (
44
+ `view_name` text NOT NULL,
45
+ `field` text NOT NULL,
46
+ `value` text NOT NULL,
47
+ PRIMARY KEY(`view_name`, `field`, `value`),
48
+ FOREIGN KEY (`view_name`) REFERENCES `saved_views`(`name`) ON UPDATE no action ON DELETE cascade
49
+ );
50
+ --> statement-breakpoint
51
+ CREATE TABLE `saved_view_sort_entries` (
52
+ `view_name` text NOT NULL,
53
+ `column` text NOT NULL,
54
+ `direction` text NOT NULL,
55
+ `sort_order` integer NOT NULL,
56
+ PRIMARY KEY(`view_name`, `sort_order`),
57
+ FOREIGN KEY (`view_name`) REFERENCES `saved_views`(`name`) ON UPDATE no action ON DELETE cascade
58
+ );
59
+ --> statement-breakpoint
60
+ CREATE TABLE `saved_views` (
61
+ `name` text PRIMARY KEY NOT NULL
62
+ );
63
+ --> statement-breakpoint
64
+ CREATE TABLE `statuses` (
65
+ `name` text PRIMARY KEY NOT NULL,
66
+ `sort_order` integer DEFAULT 0 NOT NULL
67
+ );
68
+ --> statement-breakpoint
69
+ CREATE TABLE `sync_queue` (
70
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
71
+ `action` text NOT NULL,
72
+ `item_id` text NOT NULL,
73
+ `timestamp` text NOT NULL,
74
+ `comment_data` text,
75
+ `template_slug` text
76
+ );
77
+ --> statement-breakpoint
78
+ CREATE INDEX `idx_queue_item` ON `sync_queue` (`item_id`,`action`);--> statement-breakpoint
79
+ CREATE TABLE `template_deps` (
80
+ `template_slug` text NOT NULL,
81
+ `depends_on_id` text NOT NULL,
82
+ PRIMARY KEY(`template_slug`, `depends_on_id`),
83
+ FOREIGN KEY (`template_slug`) REFERENCES `templates`(`slug`) ON UPDATE no action ON DELETE cascade
84
+ );
85
+ --> statement-breakpoint
86
+ CREATE TABLE `template_labels` (
87
+ `template_slug` text NOT NULL,
88
+ `label` text NOT NULL,
89
+ PRIMARY KEY(`template_slug`, `label`),
90
+ FOREIGN KEY (`template_slug`) REFERENCES `templates`(`slug`) ON UPDATE no action ON DELETE cascade
91
+ );
92
+ --> statement-breakpoint
93
+ CREATE TABLE `templates` (
94
+ `slug` text PRIMARY KEY NOT NULL,
95
+ `name` text NOT NULL,
96
+ `type` text DEFAULT '' NOT NULL,
97
+ `status` text DEFAULT '' NOT NULL,
98
+ `priority` text DEFAULT '' NOT NULL,
99
+ `assignee` text DEFAULT '' NOT NULL,
100
+ `iteration` text DEFAULT '' NOT NULL,
101
+ `parent` text,
102
+ `description` text DEFAULT '' NOT NULL
103
+ );
104
+ --> statement-breakpoint
105
+ CREATE TABLE `undo_item_snapshot` (
106
+ `undo_id` integer PRIMARY KEY NOT NULL,
107
+ `title` text NOT NULL,
108
+ `type` text NOT NULL,
109
+ `status` text NOT NULL,
110
+ `iteration` text NOT NULL,
111
+ `priority` text NOT NULL,
112
+ `assignee` text NOT NULL,
113
+ `description` text NOT NULL,
114
+ `parent` text,
115
+ `created` text NOT NULL,
116
+ `updated` text NOT NULL,
117
+ FOREIGN KEY (`undo_id`) REFERENCES `undo_stack`(`id`) ON UPDATE no action ON DELETE cascade
118
+ );
119
+ --> statement-breakpoint
120
+ CREATE TABLE `undo_item_snapshot_deps` (
121
+ `undo_id` integer NOT NULL,
122
+ `depends_on_id` text NOT NULL,
123
+ PRIMARY KEY(`undo_id`, `depends_on_id`),
124
+ FOREIGN KEY (`undo_id`) REFERENCES `undo_stack`(`id`) ON UPDATE no action ON DELETE cascade
125
+ );
126
+ --> statement-breakpoint
127
+ CREATE TABLE `undo_item_snapshot_labels` (
128
+ `undo_id` integer NOT NULL,
129
+ `label` text NOT NULL,
130
+ PRIMARY KEY(`undo_id`, `label`),
131
+ FOREIGN KEY (`undo_id`) REFERENCES `undo_stack`(`id`) ON UPDATE no action ON DELETE cascade
132
+ );
133
+ --> statement-breakpoint
134
+ CREATE TABLE `undo_stack` (
135
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
136
+ `action` text NOT NULL,
137
+ `item_id` text NOT NULL,
138
+ `created_at` text NOT NULL
139
+ );
140
+ --> statement-breakpoint
141
+ CREATE TABLE `work_item_deps` (
142
+ `work_item_id` text NOT NULL,
143
+ `depends_on_id` text NOT NULL,
144
+ PRIMARY KEY(`work_item_id`, `depends_on_id`),
145
+ FOREIGN KEY (`work_item_id`) REFERENCES `work_items`(`id`) ON UPDATE no action ON DELETE cascade,
146
+ FOREIGN KEY (`depends_on_id`) REFERENCES `work_items`(`id`) ON UPDATE no action ON DELETE cascade
147
+ );
148
+ --> statement-breakpoint
149
+ CREATE INDEX `idx_dep_target` ON `work_item_deps` (`depends_on_id`);--> statement-breakpoint
150
+ CREATE TABLE `work_item_labels` (
151
+ `work_item_id` text NOT NULL,
152
+ `label` text NOT NULL,
153
+ PRIMARY KEY(`work_item_id`, `label`),
154
+ FOREIGN KEY (`work_item_id`) REFERENCES `work_items`(`id`) ON UPDATE no action ON DELETE cascade
155
+ );
156
+ --> statement-breakpoint
157
+ CREATE INDEX `idx_label` ON `work_item_labels` (`label`);--> statement-breakpoint
158
+ CREATE TABLE `work_item_types` (
159
+ `name` text PRIMARY KEY NOT NULL,
160
+ `sort_order` integer DEFAULT 0 NOT NULL
161
+ );
162
+ --> statement-breakpoint
163
+ CREATE TABLE `work_items` (
164
+ `id` text PRIMARY KEY NOT NULL,
165
+ `title` text NOT NULL,
166
+ `type` text NOT NULL,
167
+ `status` text NOT NULL,
168
+ `iteration` text DEFAULT '' NOT NULL,
169
+ `priority` text DEFAULT '' NOT NULL,
170
+ `assignee` text DEFAULT '' NOT NULL,
171
+ `description` text DEFAULT '' NOT NULL,
172
+ `parent` text,
173
+ `created` text NOT NULL,
174
+ `updated` text NOT NULL,
175
+ `deleted_at` text
176
+ );
177
+ --> statement-breakpoint
178
+ CREATE INDEX `idx_status` ON `work_items` (`status`);--> statement-breakpoint
179
+ CREATE INDEX `idx_type` ON `work_items` (`type`);--> statement-breakpoint
180
+ CREATE INDEX `idx_assignee` ON `work_items` (`assignee`);--> statement-breakpoint
181
+ CREATE INDEX `idx_priority` ON `work_items` (`priority`);--> statement-breakpoint
182
+ CREATE INDEX `idx_iteration` ON `work_items` (`iteration`);--> statement-breakpoint
183
+ CREATE INDEX `idx_parent` ON `work_items` (`parent`);