@treeport/treeport 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.
@@ -0,0 +1,579 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "48d2f60d-5732-47d5-a613-62175977c22c",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "operations": {
8
+ "name": "operations",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "kind": {
18
+ "name": "kind",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "project_id": {
25
+ "name": "project_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "worktree_id": {
32
+ "name": "worktree_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "status": {
39
+ "name": "status",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "request_json": {
46
+ "name": "request_json",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "result_json": {
53
+ "name": "result_json",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "error": {
60
+ "name": "error",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "created_at": {
67
+ "name": "created_at",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false
72
+ },
73
+ "updated_at": {
74
+ "name": "updated_at",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": true,
78
+ "autoincrement": false
79
+ }
80
+ },
81
+ "indexes": {
82
+ "operations_worktree_idx": {
83
+ "name": "operations_worktree_idx",
84
+ "columns": ["worktree_id"],
85
+ "isUnique": false
86
+ }
87
+ },
88
+ "foreignKeys": {
89
+ "operations_project_id_projects_id_fk": {
90
+ "name": "operations_project_id_projects_id_fk",
91
+ "tableFrom": "operations",
92
+ "tableTo": "projects",
93
+ "columnsFrom": ["project_id"],
94
+ "columnsTo": ["id"],
95
+ "onDelete": "set null",
96
+ "onUpdate": "no action"
97
+ },
98
+ "operations_worktree_id_worktrees_id_fk": {
99
+ "name": "operations_worktree_id_worktrees_id_fk",
100
+ "tableFrom": "operations",
101
+ "tableTo": "worktrees",
102
+ "columnsFrom": ["worktree_id"],
103
+ "columnsTo": ["id"],
104
+ "onDelete": "set null",
105
+ "onUpdate": "no action"
106
+ }
107
+ },
108
+ "compositePrimaryKeys": {},
109
+ "uniqueConstraints": {},
110
+ "checkConstraints": {
111
+ "operations_kind_check": {
112
+ "name": "operations_kind_check",
113
+ "value": "\"operations\".\"kind\" IN ('finish','discard','project_cleanup','remove','external_remove')"
114
+ },
115
+ "operations_status_check": {
116
+ "name": "operations_status_check",
117
+ "value": "\"operations\".\"status\" IN ('pending','running','completed','failed')"
118
+ }
119
+ }
120
+ },
121
+ "projects": {
122
+ "name": "projects",
123
+ "columns": {
124
+ "id": {
125
+ "name": "id",
126
+ "type": "text",
127
+ "primaryKey": true,
128
+ "notNull": true,
129
+ "autoincrement": false
130
+ },
131
+ "name": {
132
+ "name": "name",
133
+ "type": "text",
134
+ "primaryKey": false,
135
+ "notNull": true,
136
+ "autoincrement": false
137
+ },
138
+ "repository_path": {
139
+ "name": "repository_path",
140
+ "type": "text",
141
+ "primaryKey": false,
142
+ "notNull": true,
143
+ "autoincrement": false
144
+ },
145
+ "main_worktree_path": {
146
+ "name": "main_worktree_path",
147
+ "type": "text",
148
+ "primaryKey": false,
149
+ "notNull": true,
150
+ "autoincrement": false
151
+ },
152
+ "default_branch": {
153
+ "name": "default_branch",
154
+ "type": "text",
155
+ "primaryKey": false,
156
+ "notNull": true,
157
+ "autoincrement": false
158
+ },
159
+ "color": {
160
+ "name": "color",
161
+ "type": "text",
162
+ "primaryKey": false,
163
+ "notNull": false,
164
+ "autoincrement": false
165
+ },
166
+ "repository_device": {
167
+ "name": "repository_device",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": true,
171
+ "autoincrement": false
172
+ },
173
+ "repository_inode": {
174
+ "name": "repository_inode",
175
+ "type": "text",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "autoincrement": false
179
+ },
180
+ "name_is_custom": {
181
+ "name": "name_is_custom",
182
+ "type": "integer",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "autoincrement": false,
186
+ "default": 0
187
+ },
188
+ "is_open": {
189
+ "name": "is_open",
190
+ "type": "integer",
191
+ "primaryKey": false,
192
+ "notNull": true,
193
+ "autoincrement": false,
194
+ "default": 1
195
+ },
196
+ "last_opened_at": {
197
+ "name": "last_opened_at",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": true,
201
+ "autoincrement": false
202
+ },
203
+ "created_at": {
204
+ "name": "created_at",
205
+ "type": "text",
206
+ "primaryKey": false,
207
+ "notNull": true,
208
+ "autoincrement": false
209
+ },
210
+ "updated_at": {
211
+ "name": "updated_at",
212
+ "type": "text",
213
+ "primaryKey": false,
214
+ "notNull": true,
215
+ "autoincrement": false
216
+ }
217
+ },
218
+ "indexes": {
219
+ "projects_repository_path_unique": {
220
+ "name": "projects_repository_path_unique",
221
+ "columns": ["repository_path"],
222
+ "isUnique": true
223
+ },
224
+ "projects_fs_identity_idx": {
225
+ "name": "projects_fs_identity_idx",
226
+ "columns": ["repository_device", "repository_inode"],
227
+ "isUnique": true
228
+ },
229
+ "projects_recent_idx": {
230
+ "name": "projects_recent_idx",
231
+ "columns": ["is_open", "\"last_opened_at\" desc", "id"],
232
+ "isUnique": false
233
+ }
234
+ },
235
+ "foreignKeys": {},
236
+ "compositePrimaryKeys": {},
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {
239
+ "projects_color_check": {
240
+ "name": "projects_color_check",
241
+ "value": "\"projects\".\"color\" IS NULL OR \"projects\".\"color\" IN ('rose','orange','amber','emerald','cyan','blue','violet','pink')"
242
+ },
243
+ "projects_name_is_custom_check": {
244
+ "name": "projects_name_is_custom_check",
245
+ "value": "\"projects\".\"name_is_custom\" IN (0,1)"
246
+ },
247
+ "projects_is_open_check": {
248
+ "name": "projects_is_open_check",
249
+ "value": "\"projects\".\"is_open\" IN (0,1)"
250
+ }
251
+ }
252
+ },
253
+ "terminal_presets": {
254
+ "name": "terminal_presets",
255
+ "columns": {
256
+ "id": {
257
+ "name": "id",
258
+ "type": "text",
259
+ "primaryKey": true,
260
+ "notNull": true,
261
+ "autoincrement": false
262
+ },
263
+ "name": {
264
+ "name": "name",
265
+ "type": "text",
266
+ "primaryKey": false,
267
+ "notNull": true,
268
+ "autoincrement": false
269
+ },
270
+ "executable": {
271
+ "name": "executable",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": true,
275
+ "autoincrement": false
276
+ },
277
+ "args_json": {
278
+ "name": "args_json",
279
+ "type": "text",
280
+ "primaryKey": false,
281
+ "notNull": true,
282
+ "autoincrement": false
283
+ },
284
+ "close_on_success": {
285
+ "name": "close_on_success",
286
+ "type": "integer",
287
+ "primaryKey": false,
288
+ "notNull": true,
289
+ "autoincrement": false,
290
+ "default": 0
291
+ },
292
+ "created_at": {
293
+ "name": "created_at",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "updated_at": {
300
+ "name": "updated_at",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false
305
+ }
306
+ },
307
+ "indexes": {
308
+ "terminal_presets_order_idx": {
309
+ "name": "terminal_presets_order_idx",
310
+ "columns": ["created_at", "id"],
311
+ "isUnique": false
312
+ }
313
+ },
314
+ "foreignKeys": {},
315
+ "compositePrimaryKeys": {},
316
+ "uniqueConstraints": {},
317
+ "checkConstraints": {
318
+ "terminal_presets_close_on_success_check": {
319
+ "name": "terminal_presets_close_on_success_check",
320
+ "value": "\"terminal_presets\".\"close_on_success\" IN (0,1)"
321
+ }
322
+ }
323
+ },
324
+ "worktrees": {
325
+ "name": "worktrees",
326
+ "columns": {
327
+ "id": {
328
+ "name": "id",
329
+ "type": "text",
330
+ "primaryKey": true,
331
+ "notNull": true,
332
+ "autoincrement": false
333
+ },
334
+ "project_id": {
335
+ "name": "project_id",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false
340
+ },
341
+ "path": {
342
+ "name": "path",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "git_worktree_key": {
349
+ "name": "git_worktree_key",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": false,
353
+ "autoincrement": false
354
+ },
355
+ "head": {
356
+ "name": "head",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false,
361
+ "default": "''"
362
+ },
363
+ "branch": {
364
+ "name": "branch",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": false,
368
+ "autoincrement": false
369
+ },
370
+ "detached": {
371
+ "name": "detached",
372
+ "type": "integer",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "autoincrement": false,
376
+ "default": 0
377
+ },
378
+ "locked": {
379
+ "name": "locked",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": true,
383
+ "autoincrement": false,
384
+ "default": 0
385
+ },
386
+ "lock_reason": {
387
+ "name": "lock_reason",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": false,
391
+ "autoincrement": false
392
+ },
393
+ "prunable": {
394
+ "name": "prunable",
395
+ "type": "integer",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "autoincrement": false,
399
+ "default": 0
400
+ },
401
+ "kind": {
402
+ "name": "kind",
403
+ "type": "text",
404
+ "primaryKey": false,
405
+ "notNull": true,
406
+ "autoincrement": false
407
+ },
408
+ "tmux_socket_name": {
409
+ "name": "tmux_socket_name",
410
+ "type": "text",
411
+ "primaryKey": false,
412
+ "notNull": true,
413
+ "autoincrement": false
414
+ },
415
+ "status": {
416
+ "name": "status",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": true,
420
+ "autoincrement": false
421
+ },
422
+ "cleanup_error": {
423
+ "name": "cleanup_error",
424
+ "type": "text",
425
+ "primaryKey": false,
426
+ "notNull": false,
427
+ "autoincrement": false
428
+ },
429
+ "managed_wrapper_path": {
430
+ "name": "managed_wrapper_path",
431
+ "type": "text",
432
+ "primaryKey": false,
433
+ "notNull": false,
434
+ "autoincrement": false
435
+ },
436
+ "pr_state": {
437
+ "name": "pr_state",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": true,
441
+ "autoincrement": false,
442
+ "default": "'unknown'"
443
+ },
444
+ "pr_number": {
445
+ "name": "pr_number",
446
+ "type": "integer",
447
+ "primaryKey": false,
448
+ "notNull": false,
449
+ "autoincrement": false
450
+ },
451
+ "pr_url": {
452
+ "name": "pr_url",
453
+ "type": "text",
454
+ "primaryKey": false,
455
+ "notNull": false,
456
+ "autoincrement": false
457
+ },
458
+ "pr_base_branch": {
459
+ "name": "pr_base_branch",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": false,
463
+ "autoincrement": false
464
+ },
465
+ "pr_head_branch": {
466
+ "name": "pr_head_branch",
467
+ "type": "text",
468
+ "primaryKey": false,
469
+ "notNull": false,
470
+ "autoincrement": false
471
+ },
472
+ "pr_merged_at": {
473
+ "name": "pr_merged_at",
474
+ "type": "text",
475
+ "primaryKey": false,
476
+ "notNull": false,
477
+ "autoincrement": false
478
+ },
479
+ "pr_refreshed_at": {
480
+ "name": "pr_refreshed_at",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": false,
484
+ "autoincrement": false
485
+ },
486
+ "created_at": {
487
+ "name": "created_at",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": true,
491
+ "autoincrement": false
492
+ },
493
+ "updated_at": {
494
+ "name": "updated_at",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": true,
498
+ "autoincrement": false
499
+ }
500
+ },
501
+ "indexes": {
502
+ "worktrees_path_unique": {
503
+ "name": "worktrees_path_unique",
504
+ "columns": ["path"],
505
+ "isUnique": true
506
+ },
507
+ "worktrees_tmux_socket_name_unique": {
508
+ "name": "worktrees_tmux_socket_name_unique",
509
+ "columns": ["tmux_socket_name"],
510
+ "isUnique": true
511
+ },
512
+ "worktrees_project_idx": {
513
+ "name": "worktrees_project_idx",
514
+ "columns": ["project_id"],
515
+ "isUnique": false
516
+ },
517
+ "worktrees_git_key_idx": {
518
+ "name": "worktrees_git_key_idx",
519
+ "columns": ["project_id", "git_worktree_key"],
520
+ "isUnique": true,
521
+ "where": "\"worktrees\".\"git_worktree_key\" IS NOT NULL"
522
+ }
523
+ },
524
+ "foreignKeys": {
525
+ "worktrees_project_id_projects_id_fk": {
526
+ "name": "worktrees_project_id_projects_id_fk",
527
+ "tableFrom": "worktrees",
528
+ "tableTo": "projects",
529
+ "columnsFrom": ["project_id"],
530
+ "columnsTo": ["id"],
531
+ "onDelete": "cascade",
532
+ "onUpdate": "no action"
533
+ }
534
+ },
535
+ "compositePrimaryKeys": {},
536
+ "uniqueConstraints": {},
537
+ "checkConstraints": {
538
+ "worktrees_detached_check": {
539
+ "name": "worktrees_detached_check",
540
+ "value": "\"worktrees\".\"detached\" IN (0,1)"
541
+ },
542
+ "worktrees_locked_check": {
543
+ "name": "worktrees_locked_check",
544
+ "value": "\"worktrees\".\"locked\" IN (0,1)"
545
+ },
546
+ "worktrees_prunable_check": {
547
+ "name": "worktrees_prunable_check",
548
+ "value": "\"worktrees\".\"prunable\" IN (0,1)"
549
+ },
550
+ "worktrees_kind_check": {
551
+ "name": "worktrees_kind_check",
552
+ "value": "\"worktrees\".\"kind\" IN ('main','linked')"
553
+ },
554
+ "worktrees_status_check": {
555
+ "name": "worktrees_status_check",
556
+ "value": "\"worktrees\".\"status\" IN ('active','cleaning','cleanup_failed','removed')"
557
+ }
558
+ }
559
+ }
560
+ },
561
+ "views": {},
562
+ "enums": {},
563
+ "_meta": {
564
+ "schemas": {},
565
+ "tables": {},
566
+ "columns": {}
567
+ },
568
+ "internal": {
569
+ "indexes": {
570
+ "projects_recent_idx": {
571
+ "columns": {
572
+ "\"last_opened_at\" desc": {
573
+ "isExpression": true
574
+ }
575
+ }
576
+ }
577
+ }
578
+ }
579
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "6",
8
+ "when": 1785230060971,
9
+ "tag": "0000_public_baseline",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
package/package.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "@treeport/treeport",
3
+ "version": "0.1.0",
4
+ "description": "A worktree-first terminal driver for persistent development workspaces.",
5
+ "type": "module",
6
+ "bin": {
7
+ "treeport": "bin/treeport.mjs"
8
+ },
9
+ "main": "dist/node/cli/index.js",
10
+ "files": [
11
+ "bin",
12
+ "dist",
13
+ "drizzle",
14
+ "skills",
15
+ "LICENSE",
16
+ "README.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=24"
20
+ },
21
+ "os": [
22
+ "darwin",
23
+ "linux"
24
+ ],
25
+ "license": "Apache-2.0",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/noice-tech/treeport.git"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/noice-tech/treeport/issues"
32
+ },
33
+ "homepage": "https://treeport.app",
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "dependencies": {
38
+ "@hono/node-server": "^2.0.10",
39
+ "@libsql/client": "^0.17.4",
40
+ "@xterm/headless": "^6.0.0",
41
+ "commander": "14.0.3",
42
+ "drizzle-orm": "^0.45.2",
43
+ "effect": "^3.22.0",
44
+ "hono": "^4.11.7",
45
+ "jsonc-parser": "^3.3.1",
46
+ "node-pty": "1.2.0-beta.14",
47
+ "socket.io": "4.8.3",
48
+ "socket.io-client": "4.8.3",
49
+ "zod": "^4.3.6"
50
+ },
51
+ "devDependencies": {
52
+ "@fontsource-variable/inter": "^5.2.8",
53
+ "@heroicons/react": "^2.2.0",
54
+ "@radix-ui/react-alert-dialog": "^1.1.23",
55
+ "@radix-ui/react-checkbox": "^1.3.11",
56
+ "@radix-ui/react-dialog": "^1.1.23",
57
+ "@radix-ui/react-dropdown-menu": "^2.1.21",
58
+ "@radix-ui/react-popover": "^1.1.19",
59
+ "@radix-ui/react-separator": "^1.1.15",
60
+ "@radix-ui/react-slot": "^1.3.0",
61
+ "@radix-ui/react-tabs": "^1.1.17",
62
+ "@radix-ui/react-tooltip": "^1.2.12",
63
+ "@tailwindcss/vite": "^4.3.3",
64
+ "@tanstack/react-query": "^5.101.2",
65
+ "@tanstack/react-router": "^1.170.18",
66
+ "@types/react": "^19.2.10",
67
+ "@types/react-dom": "^19.2.3",
68
+ "@vitejs/plugin-react": "^5.1.4",
69
+ "@xterm/addon-fit": "^0.11.0",
70
+ "@xterm/addon-web-links": "^0.12.0",
71
+ "@xterm/xterm": "^6.0.0",
72
+ "class-variance-authority": "^0.7.1",
73
+ "clsx": "^2.1.1",
74
+ "drizzle-kit": "^0.31.10",
75
+ "lucide-react": "^1.25.0",
76
+ "react": "^19.2.4",
77
+ "react-dom": "^19.2.4",
78
+ "sonner": "^2.0.7",
79
+ "tailwind-merge": "^3.6.0",
80
+ "tailwindcss": "^4.3.3",
81
+ "tsdown": "0.22.14",
82
+ "vite": "^8.1.5",
83
+ "@treeport/shared": "0.1.0"
84
+ },
85
+ "scripts": {
86
+ "clean": "rm -rf dist dist-types",
87
+ "build": "pnpm clean && pnpm build:node && pnpm build:web && pnpm check:package",
88
+ "build:node": "tsdown",
89
+ "build:web": "vite build",
90
+ "check:package": "node scripts/check-package.mjs",
91
+ "test:package": "node scripts/smoke-package.mjs",
92
+ "dev": "node scripts/development.mjs",
93
+ "dev:server": "TREEPORT_DATA_DIR=.treeport-dev/data TREEPORT_RUNTIME_DIR=.treeport-dev/runtime tsdown --watch --on-success \"node --enable-source-maps dist/node/server/index.js\"",
94
+ "dev:web": "vite",
95
+ "start": "TREEPORT_WEB_DIST=dist/web node dist/node/server/index.js",
96
+ "db:generate": "drizzle-kit generate",
97
+ "typecheck": "pnpm typecheck:node && pnpm typecheck:web",
98
+ "typecheck:node": "tsc --noEmit -p tsconfig.node.json --pretty",
99
+ "typecheck:web": "tsc --noEmit -p tsconfig.web.json --pretty"
100
+ }
101
+ }