vibeman 0.0.3 → 0.0.6

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 (231) hide show
  1. package/dist/api.js +49 -0
  2. package/dist/cli.js +135 -0
  3. package/dist/ui/index-gnk6rhxs.js +9 -0
  4. package/dist/ui/index.html +10 -0
  5. package/dist/ui/index.js +2 -0
  6. package/package.json +10 -80
  7. package/README.md +0 -12
  8. package/dist/index.js +0 -114
  9. package/dist/runtime/api/.tsbuildinfo +0 -1
  10. package/dist/runtime/api/agent/agent-service.d.ts +0 -225
  11. package/dist/runtime/api/agent/agent-service.js +0 -904
  12. package/dist/runtime/api/agent/ai-providers/claude-code-adapter.d.ts +0 -61
  13. package/dist/runtime/api/agent/ai-providers/claude-code-adapter.js +0 -362
  14. package/dist/runtime/api/agent/ai-providers/codex-cli-provider.d.ts +0 -36
  15. package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +0 -347
  16. package/dist/runtime/api/agent/ai-providers/index.d.ts +0 -9
  17. package/dist/runtime/api/agent/ai-providers/index.js +0 -7
  18. package/dist/runtime/api/agent/ai-providers/types.d.ts +0 -182
  19. package/dist/runtime/api/agent/ai-providers/types.js +0 -5
  20. package/dist/runtime/api/agent/codex-cli-provider.test.d.ts +0 -1
  21. package/dist/runtime/api/agent/codex-cli-provider.test.js +0 -170
  22. package/dist/runtime/api/agent/core-agent-service.d.ts +0 -119
  23. package/dist/runtime/api/agent/core-agent-service.js +0 -267
  24. package/dist/runtime/api/agent/parsers.d.ts +0 -16
  25. package/dist/runtime/api/agent/parsers.js +0 -308
  26. package/dist/runtime/api/agent/prompt-service.d.ts +0 -30
  27. package/dist/runtime/api/agent/prompt-service.js +0 -449
  28. package/dist/runtime/api/agent/prompt-service.test.d.ts +0 -1
  29. package/dist/runtime/api/agent/prompt-service.test.js +0 -230
  30. package/dist/runtime/api/agent/routing-policy.d.ts +0 -171
  31. package/dist/runtime/api/agent/routing-policy.js +0 -196
  32. package/dist/runtime/api/agent/routing-policy.test.d.ts +0 -1
  33. package/dist/runtime/api/agent/routing-policy.test.js +0 -63
  34. package/dist/runtime/api/api/router-helpers.d.ts +0 -32
  35. package/dist/runtime/api/api/router-helpers.js +0 -31
  36. package/dist/runtime/api/api/routers/ai.d.ts +0 -200
  37. package/dist/runtime/api/api/routers/ai.js +0 -396
  38. package/dist/runtime/api/api/routers/executions.d.ts +0 -98
  39. package/dist/runtime/api/api/routers/executions.js +0 -94
  40. package/dist/runtime/api/api/routers/git.d.ts +0 -45
  41. package/dist/runtime/api/api/routers/git.js +0 -35
  42. package/dist/runtime/api/api/routers/provider-config.d.ts +0 -165
  43. package/dist/runtime/api/api/routers/provider-config.js +0 -252
  44. package/dist/runtime/api/api/routers/settings.d.ts +0 -139
  45. package/dist/runtime/api/api/routers/settings.js +0 -113
  46. package/dist/runtime/api/api/routers/tasks.d.ts +0 -141
  47. package/dist/runtime/api/api/routers/tasks.js +0 -238
  48. package/dist/runtime/api/api/routers/workflows.d.ts +0 -275
  49. package/dist/runtime/api/api/routers/workflows.js +0 -311
  50. package/dist/runtime/api/api/routers/worktrees.d.ts +0 -101
  51. package/dist/runtime/api/api/routers/worktrees.js +0 -80
  52. package/dist/runtime/api/api/trpc.d.ts +0 -118
  53. package/dist/runtime/api/api/trpc.js +0 -34
  54. package/dist/runtime/api/index.d.ts +0 -9
  55. package/dist/runtime/api/index.js +0 -117
  56. package/dist/runtime/api/lib/id-generator.d.ts +0 -70
  57. package/dist/runtime/api/lib/id-generator.js +0 -123
  58. package/dist/runtime/api/lib/local-config.d.ts +0 -245
  59. package/dist/runtime/api/lib/local-config.js +0 -288
  60. package/dist/runtime/api/lib/logger.d.ts +0 -11
  61. package/dist/runtime/api/lib/logger.js +0 -188
  62. package/dist/runtime/api/lib/provider-detection.d.ts +0 -59
  63. package/dist/runtime/api/lib/provider-detection.js +0 -244
  64. package/dist/runtime/api/lib/server/agent-service-singleton.d.ts +0 -6
  65. package/dist/runtime/api/lib/server/agent-service-singleton.js +0 -27
  66. package/dist/runtime/api/lib/server/bootstrap.d.ts +0 -38
  67. package/dist/runtime/api/lib/server/bootstrap.js +0 -197
  68. package/dist/runtime/api/lib/server/git-service-singleton.d.ts +0 -6
  69. package/dist/runtime/api/lib/server/git-service-singleton.js +0 -47
  70. package/dist/runtime/api/lib/server/project-root.d.ts +0 -2
  71. package/dist/runtime/api/lib/server/project-root.js +0 -61
  72. package/dist/runtime/api/lib/server/task-service-singleton.d.ts +0 -7
  73. package/dist/runtime/api/lib/server/task-service-singleton.js +0 -58
  74. package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.d.ts +0 -7
  75. package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.js +0 -57
  76. package/dist/runtime/api/lib/trpc/client.d.ts +0 -1
  77. package/dist/runtime/api/lib/trpc/client.js +0 -5
  78. package/dist/runtime/api/lib/trpc/server.d.ts +0 -935
  79. package/dist/runtime/api/lib/trpc/server.js +0 -11
  80. package/dist/runtime/api/lib/trpc/ws-server.d.ts +0 -8
  81. package/dist/runtime/api/lib/trpc/ws-server.js +0 -33
  82. package/dist/runtime/api/persistence/database-service.d.ts +0 -14
  83. package/dist/runtime/api/persistence/database-service.js +0 -74
  84. package/dist/runtime/api/persistence/execution-log-persistence.d.ts +0 -90
  85. package/dist/runtime/api/persistence/execution-log-persistence.js +0 -410
  86. package/dist/runtime/api/persistence/execution-log-persistence.test.d.ts +0 -1
  87. package/dist/runtime/api/persistence/execution-log-persistence.test.js +0 -170
  88. package/dist/runtime/api/router.d.ts +0 -938
  89. package/dist/runtime/api/router.js +0 -34
  90. package/dist/runtime/api/settings-service.d.ts +0 -110
  91. package/dist/runtime/api/settings-service.js +0 -661
  92. package/dist/runtime/api/tasks/file-watcher.d.ts +0 -23
  93. package/dist/runtime/api/tasks/file-watcher.js +0 -88
  94. package/dist/runtime/api/tasks/task-file-parser.d.ts +0 -13
  95. package/dist/runtime/api/tasks/task-file-parser.js +0 -161
  96. package/dist/runtime/api/tasks/task-service.d.ts +0 -36
  97. package/dist/runtime/api/tasks/task-service.js +0 -173
  98. package/dist/runtime/api/types/index.d.ts +0 -186
  99. package/dist/runtime/api/types/index.js +0 -1
  100. package/dist/runtime/api/types/settings.d.ts +0 -94
  101. package/dist/runtime/api/types/settings.js +0 -2
  102. package/dist/runtime/api/types.d.ts +0 -2
  103. package/dist/runtime/api/types.js +0 -1
  104. package/dist/runtime/api/utils/env.d.ts +0 -6
  105. package/dist/runtime/api/utils/env.js +0 -12
  106. package/dist/runtime/api/utils/stripNextEnv.d.ts +0 -7
  107. package/dist/runtime/api/utils/stripNextEnv.js +0 -22
  108. package/dist/runtime/api/utils/title-slug.d.ts +0 -6
  109. package/dist/runtime/api/utils/title-slug.js +0 -77
  110. package/dist/runtime/api/utils/url.d.ts +0 -2
  111. package/dist/runtime/api/utils/url.js +0 -19
  112. package/dist/runtime/api/vcs/git-history-service.d.ts +0 -57
  113. package/dist/runtime/api/vcs/git-history-service.js +0 -228
  114. package/dist/runtime/api/vcs/git-service.d.ts +0 -127
  115. package/dist/runtime/api/vcs/git-service.js +0 -284
  116. package/dist/runtime/api/vcs/worktree-service.d.ts +0 -93
  117. package/dist/runtime/api/vcs/worktree-service.js +0 -506
  118. package/dist/runtime/api/vcs/worktree-service.test.d.ts +0 -1
  119. package/dist/runtime/api/vcs/worktree-service.test.js +0 -20
  120. package/dist/runtime/api/workflows/quality-pipeline.d.ts +0 -58
  121. package/dist/runtime/api/workflows/quality-pipeline.js +0 -400
  122. package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +0 -318
  123. package/dist/runtime/api/workflows/vibing-orchestrator.js +0 -1891
  124. package/dist/runtime/web/.next/BUILD_ID +0 -1
  125. package/dist/runtime/web/.next/app-build-manifest.json +0 -66
  126. package/dist/runtime/web/.next/app-path-routes-manifest.json +0 -8
  127. package/dist/runtime/web/.next/build-manifest.json +0 -33
  128. package/dist/runtime/web/.next/package.json +0 -1
  129. package/dist/runtime/web/.next/prerender-manifest.json +0 -61
  130. package/dist/runtime/web/.next/react-loadable-manifest.json +0 -39
  131. package/dist/runtime/web/.next/required-server-files.json +0 -334
  132. package/dist/runtime/web/.next/routes-manifest.json +0 -70
  133. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js +0 -1
  134. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js.nft.json +0 -1
  135. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route_client-reference-manifest.js +0 -1
  136. package/dist/runtime/web/.next/server/app/_not-found/page.js +0 -2
  137. package/dist/runtime/web/.next/server/app/_not-found/page.js.nft.json +0 -1
  138. package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  139. package/dist/runtime/web/.next/server/app/_not-found.html +0 -7
  140. package/dist/runtime/web/.next/server/app/_not-found.meta +0 -8
  141. package/dist/runtime/web/.next/server/app/_not-found.rsc +0 -22
  142. package/dist/runtime/web/.next/server/app/api/health/route.js +0 -1
  143. package/dist/runtime/web/.next/server/app/api/health/route.js.nft.json +0 -1
  144. package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +0 -1
  145. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js +0 -1
  146. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js.nft.json +0 -1
  147. package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +0 -1
  148. package/dist/runtime/web/.next/server/app/api/upload/route.js +0 -1
  149. package/dist/runtime/web/.next/server/app/api/upload/route.js.nft.json +0 -1
  150. package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +0 -1
  151. package/dist/runtime/web/.next/server/app/index.html +0 -7
  152. package/dist/runtime/web/.next/server/app/index.meta +0 -7
  153. package/dist/runtime/web/.next/server/app/index.rsc +0 -27
  154. package/dist/runtime/web/.next/server/app/page.js +0 -147
  155. package/dist/runtime/web/.next/server/app/page.js.nft.json +0 -1
  156. package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +0 -1
  157. package/dist/runtime/web/.next/server/app-paths-manifest.json +0 -8
  158. package/dist/runtime/web/.next/server/chunks/217.js +0 -1
  159. package/dist/runtime/web/.next/server/chunks/383.js +0 -6
  160. package/dist/runtime/web/.next/server/chunks/458.js +0 -1
  161. package/dist/runtime/web/.next/server/chunks/576.js +0 -18
  162. package/dist/runtime/web/.next/server/chunks/635.js +0 -22
  163. package/dist/runtime/web/.next/server/chunks/761.js +0 -1
  164. package/dist/runtime/web/.next/server/chunks/777.js +0 -3
  165. package/dist/runtime/web/.next/server/chunks/825.js +0 -1
  166. package/dist/runtime/web/.next/server/chunks/838.js +0 -1
  167. package/dist/runtime/web/.next/server/chunks/973.js +0 -15
  168. package/dist/runtime/web/.next/server/functions-config-manifest.json +0 -4
  169. package/dist/runtime/web/.next/server/middleware-build-manifest.js +0 -1
  170. package/dist/runtime/web/.next/server/middleware-manifest.json +0 -6
  171. package/dist/runtime/web/.next/server/middleware-react-loadable-manifest.js +0 -1
  172. package/dist/runtime/web/.next/server/next-font-manifest.js +0 -1
  173. package/dist/runtime/web/.next/server/next-font-manifest.json +0 -1
  174. package/dist/runtime/web/.next/server/pages/404.html +0 -7
  175. package/dist/runtime/web/.next/server/pages/500.html +0 -1
  176. package/dist/runtime/web/.next/server/pages/_app.js +0 -1
  177. package/dist/runtime/web/.next/server/pages/_app.js.nft.json +0 -1
  178. package/dist/runtime/web/.next/server/pages/_document.js +0 -1
  179. package/dist/runtime/web/.next/server/pages/_document.js.nft.json +0 -1
  180. package/dist/runtime/web/.next/server/pages/_error.js +0 -19
  181. package/dist/runtime/web/.next/server/pages/_error.js.nft.json +0 -1
  182. package/dist/runtime/web/.next/server/pages-manifest.json +0 -6
  183. package/dist/runtime/web/.next/server/server-reference-manifest.js +0 -1
  184. package/dist/runtime/web/.next/server/server-reference-manifest.json +0 -1
  185. package/dist/runtime/web/.next/server/webpack-runtime.js +0 -1
  186. package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_buildManifest.js +0 -1
  187. package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_ssgManifest.js +0 -1
  188. package/dist/runtime/web/.next/static/chunks/18-15c10d3288afef2e.js +0 -1
  189. package/dist/runtime/web/.next/static/chunks/1c0ca389.537bbe362e3ffbd9.js +0 -3
  190. package/dist/runtime/web/.next/static/chunks/22747d63-ad5da0c19f4cfe41.js +0 -71
  191. package/dist/runtime/web/.next/static/chunks/355.056c2645878a799a.js +0 -1
  192. package/dist/runtime/web/.next/static/chunks/420.a5ccf151c9e2b2f1.js +0 -1
  193. package/dist/runtime/web/.next/static/chunks/439.1be0c6242fd248d5.js +0 -15
  194. package/dist/runtime/web/.next/static/chunks/440.c52e7c0f797e22b2.js +0 -1
  195. package/dist/runtime/web/.next/static/chunks/575-e2478287c27da87b.js +0 -1
  196. package/dist/runtime/web/.next/static/chunks/691.920d88c115087314.js +0 -1
  197. package/dist/runtime/web/.next/static/chunks/765-e838910065b50c3d.js +0 -1
  198. package/dist/runtime/web/.next/static/chunks/823-6f371a6e829adbba.js +0 -63
  199. package/dist/runtime/web/.next/static/chunks/87c73c54-09e1ba5c70e60a51.js +0 -1
  200. package/dist/runtime/web/.next/static/chunks/891cff7f.0f71fc028f87e683.js +0 -1
  201. package/dist/runtime/web/.next/static/chunks/8bb4d8db-3e2aa02b0a2384b9.js +0 -1
  202. package/dist/runtime/web/.next/static/chunks/9af238c7-271a911d4e99ab18.js +0 -1
  203. package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-751c9265a65409e5.js +0 -1
  204. package/dist/runtime/web/.next/static/chunks/app/_not-found/page-1cb74d1cba27d0ab.js +0 -1
  205. package/dist/runtime/web/.next/static/chunks/app/api/health/route-751c9265a65409e5.js +0 -1
  206. package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-751c9265a65409e5.js +0 -1
  207. package/dist/runtime/web/.next/static/chunks/app/api/upload/route-751c9265a65409e5.js +0 -1
  208. package/dist/runtime/web/.next/static/chunks/app/layout-8435322f09fd0975.js +0 -1
  209. package/dist/runtime/web/.next/static/chunks/app/page-9fe7d75095b4ccec.js +0 -1
  210. package/dist/runtime/web/.next/static/chunks/cac567b0-5b77dd12911823cd.js +0 -1
  211. package/dist/runtime/web/.next/static/chunks/framework-2518f1345b5b2806.js +0 -1
  212. package/dist/runtime/web/.next/static/chunks/main-17665e5e39de9a8a.js +0 -1
  213. package/dist/runtime/web/.next/static/chunks/main-app-c0b0f5ba4f7f9d75.js +0 -1
  214. package/dist/runtime/web/.next/static/chunks/pages/_app-d6f6b3bbc3d81ee1.js +0 -1
  215. package/dist/runtime/web/.next/static/chunks/pages/_error-75a96cf1997cc3b9.js +0 -1
  216. package/dist/runtime/web/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  217. package/dist/runtime/web/.next/static/chunks/webpack-c8de37305b4635cf.js +0 -1
  218. package/dist/runtime/web/.next/static/css/08c950681f1a9a92.css +0 -1
  219. package/dist/runtime/web/.next/static/css/2728291c68f99cb1.css +0 -3
  220. package/dist/runtime/web/.next/static/css/521bd69cc298cd1a.css +0 -1
  221. package/dist/runtime/web/.next/static/css/537e22821e101b87.css +0 -1
  222. package/dist/runtime/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  223. package/dist/runtime/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  224. package/dist/runtime/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  225. package/dist/runtime/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  226. package/dist/runtime/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  227. package/dist/runtime/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  228. package/dist/runtime/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  229. package/dist/runtime/web/package.json +0 -65
  230. package/dist/runtime/web/server.js +0 -44
  231. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,139 +0,0 @@
1
- /**
2
- * tRPC routes for settings management
3
- */
4
- export declare function buildSettingsRoutes(): {
5
- /**
6
- * Get current settings
7
- */
8
- getSettings: import("@trpc/server").TRPCQueryProcedure<{
9
- input: void;
10
- output: import("../../types/settings.js").VibemanSettings;
11
- meta: object;
12
- }>;
13
- /**
14
- * Detect quality checks using AI and persist them into settings
15
- */
16
- detectQualityChecks: import("@trpc/server").TRPCMutationProcedure<{
17
- input: void;
18
- output: {
19
- checks: {
20
- name: string;
21
- command: string;
22
- args: string[];
23
- timeout: number;
24
- enabled: boolean;
25
- }[];
26
- workingDirectory: string;
27
- };
28
- meta: object;
29
- }>;
30
- /**
31
- * Get a specific setting by path
32
- */
33
- getSetting: import("@trpc/server").TRPCQueryProcedure<{
34
- input: {
35
- path: string[];
36
- };
37
- output: unknown;
38
- meta: object;
39
- }>;
40
- /**
41
- * Update multiple settings
42
- */
43
- updateSettings: import("@trpc/server").TRPCMutationProcedure<{
44
- input: {
45
- path: string[];
46
- value?: unknown;
47
- }[];
48
- output: {
49
- success: boolean;
50
- errors: import("../../types/settings.js").SettingsValidationError[];
51
- };
52
- meta: object;
53
- }>;
54
- /**
55
- * Reset settings to defaults
56
- */
57
- resetToDefaults: import("@trpc/server").TRPCMutationProcedure<{
58
- input: void;
59
- output: import("../../types/settings.js").VibemanSettings;
60
- meta: object;
61
- }>;
62
- /**
63
- * Validate settings schema
64
- */
65
- validateSettings: import("@trpc/server").TRPCQueryProcedure<{
66
- input: Record<string, unknown>;
67
- output: {
68
- valid: boolean;
69
- errors: import("../../types/settings.js").SettingsValidationError[];
70
- };
71
- meta: object;
72
- }>;
73
- /**
74
- * Get settings file information
75
- */
76
- getSettingsInfo: import("@trpc/server").TRPCQueryProcedure<{
77
- input: void;
78
- output: {
79
- path: string;
80
- exists: boolean;
81
- };
82
- meta: object;
83
- }>;
84
- /**
85
- * Get available editor presets
86
- */
87
- getEditorPresets: import("@trpc/server").TRPCQueryProcedure<{
88
- input: void;
89
- output: Record<string, Partial<{
90
- type?: "vscode" | "cursor" | "vim" | "custom";
91
- command?: string;
92
- args?: string[];
93
- name?: string;
94
- openFileCommand?: string[];
95
- openFolderCommand?: string[];
96
- } | undefined>>;
97
- meta: object;
98
- }>;
99
- /**
100
- * Get available terminal presets
101
- */
102
- getTerminalPresets: import("@trpc/server").TRPCQueryProcedure<{
103
- input: void;
104
- output: Record<string, Partial<{
105
- type?: "system" | "iterm2" | "warp" | "custom";
106
- command?: string;
107
- args?: string[];
108
- name?: string;
109
- openCommand?: string[];
110
- } | undefined>>;
111
- meta: object;
112
- }>;
113
- /**
114
- * Apply editor preset configuration
115
- */
116
- applyEditorPreset: import("@trpc/server").TRPCMutationProcedure<{
117
- input: {
118
- presetName: string;
119
- };
120
- output: {
121
- success: boolean;
122
- errors: import("../../types/settings.js").SettingsValidationError[];
123
- };
124
- meta: object;
125
- }>;
126
- /**
127
- * Apply terminal preset configuration
128
- */
129
- applyTerminalPreset: import("@trpc/server").TRPCMutationProcedure<{
130
- input: {
131
- presetName: string;
132
- };
133
- output: {
134
- success: boolean;
135
- errors: import("../../types/settings.js").SettingsValidationError[];
136
- };
137
- meta: object;
138
- }>;
139
- };
@@ -1,113 +0,0 @@
1
- /**
2
- * tRPC routes for settings management
3
- */
4
- import { z } from 'zod';
5
- import { publicProcedure } from '../trpc.js';
6
- import { getSettingsService } from '../../settings-service.js';
7
- import { QualityPipeline } from '../../workflows/quality-pipeline.js';
8
- import { getProjectRoot } from '../../lib/server/project-root.js';
9
- // Input validation schemas
10
- const UpdateSettingsInputSchema = z.array(z.object({
11
- path: z.array(z.string().min(1)),
12
- value: z.unknown(),
13
- }));
14
- export function buildSettingsRoutes() {
15
- const settingsService = getSettingsService();
16
- // Initialize settings service on first router build
17
- settingsService.initialize().catch(console.error);
18
- return {
19
- /**
20
- * Get current settings
21
- */
22
- getSettings: publicProcedure.query(async () => {
23
- await settingsService.initialize();
24
- return settingsService.getSettings();
25
- }),
26
- /**
27
- * Detect quality checks using AI and persist them into settings
28
- */
29
- detectQualityChecks: publicProcedure.mutation(async () => {
30
- // TODO: Integrate this into the onboarding flow to auto-bootstrap
31
- // quality checks on first project setup.
32
- await settingsService.initialize();
33
- const pipeline = new QualityPipeline();
34
- const workingDirectory = getProjectRoot();
35
- const checks = await pipeline.detectAndPersistChecks(workingDirectory);
36
- return { checks, workingDirectory };
37
- }),
38
- /**
39
- * Get a specific setting by path
40
- */
41
- getSetting: publicProcedure
42
- .input(z.object({ path: z.array(z.string().min(1)) }))
43
- .query(async ({ input }) => {
44
- await settingsService.initialize();
45
- return settingsService.getSetting(input.path);
46
- }),
47
- /**
48
- * Update multiple settings
49
- */
50
- updateSettings: publicProcedure.input(UpdateSettingsInputSchema).mutation(async ({ input }) => {
51
- await settingsService.initialize();
52
- const updates = input.map((item) => ({
53
- path: item.path,
54
- value: item.value,
55
- }));
56
- return await settingsService.updateSettings(updates);
57
- }),
58
- /**
59
- * Reset settings to defaults
60
- */
61
- resetToDefaults: publicProcedure.mutation(async () => {
62
- await settingsService.initialize();
63
- await settingsService.resetToDefaults();
64
- return settingsService.getSettings();
65
- }),
66
- /**
67
- * Validate settings schema
68
- */
69
- validateSettings: publicProcedure.input(z.record(z.unknown())).query(async ({ input }) => {
70
- await settingsService.initialize();
71
- return settingsService.validateSettings(input);
72
- }),
73
- /**
74
- * Get settings file information
75
- */
76
- getSettingsInfo: publicProcedure.query(async () => {
77
- await settingsService.initialize();
78
- return settingsService.getSettingsInfo();
79
- }),
80
- /**
81
- * Get available editor presets
82
- */
83
- getEditorPresets: publicProcedure.query(async () => {
84
- await settingsService.initialize();
85
- return settingsService.getEditorPresets();
86
- }),
87
- /**
88
- * Get available terminal presets
89
- */
90
- getTerminalPresets: publicProcedure.query(async () => {
91
- await settingsService.initialize();
92
- return settingsService.getTerminalPresets();
93
- }),
94
- /**
95
- * Apply editor preset configuration
96
- */
97
- applyEditorPreset: publicProcedure
98
- .input(z.object({ presetName: z.string().min(1) }))
99
- .mutation(async ({ input }) => {
100
- await settingsService.initialize();
101
- return await settingsService.applyEditorPreset(input.presetName);
102
- }),
103
- /**
104
- * Apply terminal preset configuration
105
- */
106
- applyTerminalPreset: publicProcedure
107
- .input(z.object({ presetName: z.string().min(1) }))
108
- .mutation(async ({ input }) => {
109
- await settingsService.initialize();
110
- return await settingsService.applyTerminalPreset(input.presetName);
111
- }),
112
- };
113
- }
@@ -1,141 +0,0 @@
1
- import type { TaskService } from '../../tasks/task-service.js';
2
- import type { GitService } from '../../vcs/git-service.js';
3
- export declare function buildTaskRoutes(taskService: TaskService, gitService?: GitService): {
4
- readonly listTasks: import("@trpc/server").TRPCQueryProcedure<{
5
- input: {
6
- status?: "review" | "in-progress" | "backlog" | "done" | undefined;
7
- type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
8
- tags?: string[] | undefined;
9
- priority?: "low" | "medium" | "high" | undefined;
10
- search?: string | undefined;
11
- includeDeleted?: boolean | undefined;
12
- onlyDeleted?: boolean | undefined;
13
- } | undefined;
14
- output: import("../../types/index.js").Task[];
15
- meta: object;
16
- }>;
17
- readonly getTask: import("@trpc/server").TRPCQueryProcedure<{
18
- input: {
19
- id: string;
20
- };
21
- output: import("../../types/index.js").Task;
22
- meta: object;
23
- }>;
24
- readonly createTask: import("@trpc/server").TRPCMutationProcedure<{
25
- input: {
26
- title: string;
27
- type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
28
- content: string;
29
- status?: "review" | "in-progress" | "backlog" | "done" | undefined;
30
- id?: string | undefined;
31
- tags?: string[] | undefined;
32
- due_date?: string | undefined;
33
- assignee?: string[] | undefined;
34
- priority?: "low" | "medium" | "high" | undefined;
35
- comments?: string[] | undefined;
36
- };
37
- output: import("../../types/index.js").Task;
38
- meta: object;
39
- }>;
40
- readonly updateTask: import("@trpc/server").TRPCMutationProcedure<{
41
- input: {
42
- id: string;
43
- status?: "review" | "in-progress" | "backlog" | "done" | undefined;
44
- title?: string | undefined;
45
- type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
46
- tags?: string[] | undefined;
47
- due_date?: string | undefined;
48
- assignee?: string[] | undefined;
49
- priority?: "low" | "medium" | "high" | undefined;
50
- comments?: string[] | undefined;
51
- content?: string | undefined;
52
- deleted_at?: string | undefined;
53
- };
54
- output: import("../../types/index.js").Task;
55
- meta: object;
56
- }>;
57
- readonly deleteTask: import("@trpc/server").TRPCMutationProcedure<{
58
- input: {
59
- id: string;
60
- };
61
- output: {
62
- readonly success: true;
63
- };
64
- meta: object;
65
- }>;
66
- readonly moveTask: import("@trpc/server").TRPCMutationProcedure<{
67
- input: {
68
- status: "review" | "in-progress" | "backlog" | "done";
69
- id: string;
70
- };
71
- output: import("../../types/index.js").Task;
72
- meta: object;
73
- }>;
74
- readonly getTaskStats: import("@trpc/server").TRPCQueryProcedure<{
75
- input: void;
76
- output: any;
77
- meta: object;
78
- }>;
79
- readonly searchTasks: import("@trpc/server").TRPCQueryProcedure<{
80
- input: {
81
- query: string;
82
- includeDeleted?: boolean | undefined;
83
- onlyDeleted?: boolean | undefined;
84
- };
85
- output: import("../../types/index.js").Task[];
86
- meta: object;
87
- }>;
88
- readonly healthCheck: import("@trpc/server").TRPCQueryProcedure<{
89
- input: void;
90
- output: {
91
- status: string;
92
- timestamp: string;
93
- tasksLoaded: number;
94
- };
95
- meta: object;
96
- }>;
97
- readonly onTaskUpdate: import("@trpc/server").TRPCSubscriptionProcedure<{
98
- input: {
99
- taskId?: string | undefined;
100
- } | undefined;
101
- output: AsyncIterable<{
102
- type: "update" | "delete";
103
- taskId: string;
104
- task?: any;
105
- }, void, any>;
106
- meta: object;
107
- }>;
108
- readonly getTaskHistory: import("@trpc/server").TRPCQueryProcedure<{
109
- input: {
110
- taskId: string;
111
- limit?: number | undefined;
112
- };
113
- output: {
114
- available: boolean;
115
- history: import("../../vcs/git-history-service.js").TaskHistoryEntry[];
116
- error?: undefined;
117
- } | {
118
- available: boolean;
119
- history: never[];
120
- error: string;
121
- };
122
- meta: object;
123
- }>;
124
- readonly getTaskVersion: import("@trpc/server").TRPCQueryProcedure<{
125
- input: {
126
- taskId: string;
127
- commitHash: string;
128
- };
129
- output: import("../../vcs/git-history-service.js").TaskFileContent;
130
- meta: object;
131
- }>;
132
- readonly getTaskDiff: import("@trpc/server").TRPCQueryProcedure<{
133
- input: {
134
- taskId: string;
135
- fromHash: string;
136
- toHash: string;
137
- };
138
- output: import("../../vcs/git-history-service.js").TaskDiffEntry;
139
- meta: object;
140
- }>;
141
- };
@@ -1,238 +0,0 @@
1
- import { z } from 'zod';
2
- import { on, EventEmitter } from 'events';
3
- import path from 'path';
4
- import { publicProcedure, TaskCreateSchema, TaskUpdateSchema, TaskFilterSchema } from '../trpc.js';
5
- import { GitHistoryService } from '../../vcs/git-history-service.js';
6
- import { getVibeDir } from '../../lib/server/project-root.js';
7
- export function buildTaskRoutes(taskService, gitService) {
8
- const gitHistoryService = new GitHistoryService();
9
- return {
10
- // Get all tasks with optional filtering
11
- listTasks: publicProcedure.input(TaskFilterSchema.optional()).query(async ({ input }) => {
12
- await taskService.ensureInitialized();
13
- let tasks = taskService.getAllTasks();
14
- if (input) {
15
- if (input.status)
16
- tasks = tasks.filter((task) => task.status === input.status);
17
- if (input.type)
18
- tasks = tasks.filter((task) => task.type === input.type);
19
- if (input.priority)
20
- tasks = tasks.filter((task) => task.priority === input.priority);
21
- if (input.tags && input.tags.length > 0) {
22
- tasks = tasks.filter((task) => input.tags.some((tag) => task.tags.includes(tag)));
23
- }
24
- if (input.search)
25
- tasks = taskService.searchTasks(input.search);
26
- }
27
- if (input?.onlyDeleted) {
28
- tasks = tasks.filter((t) => !!t.deleted_at);
29
- }
30
- else if (!input?.includeDeleted) {
31
- tasks = tasks.filter((t) => !t.deleted_at);
32
- }
33
- return tasks;
34
- }),
35
- // Get single task by ID
36
- getTask: publicProcedure.input(z.object({ id: z.string() })).query(async ({ input }) => {
37
- const task = taskService.getTask(input.id);
38
- if (!task)
39
- throw new Error(`Task ${input.id} not found`);
40
- return task;
41
- }),
42
- // Create new task
43
- createTask: publicProcedure.input(TaskCreateSchema).mutation(async ({ input }) => {
44
- const newTask = await taskService.createTask(input);
45
- try {
46
- if (gitService) {
47
- const message = `Create ${newTask.id}: ${newTask.title}`;
48
- const taskFilePath = path.relative(process.cwd(), path.join(getVibeDir(), 'tasks', `${newTask.id}.md`));
49
- await gitService.commitChanges(newTask, message, [taskFilePath]);
50
- }
51
- }
52
- catch {
53
- // Non-fatal: ignore commit failure
54
- }
55
- return newTask;
56
- }),
57
- // Update existing task
58
- updateTask: publicProcedure.input(TaskUpdateSchema).mutation(async ({ input }) => {
59
- const { id, ...updates } = input;
60
- return await taskService.updateTask(id, updates);
61
- }),
62
- // Delete task (soft delete + optional git commit)
63
- deleteTask: publicProcedure.input(z.object({ id: z.string() })).mutation(async ({ input }) => {
64
- await taskService.deleteTask(input.id);
65
- try {
66
- if (gitService) {
67
- const t = taskService.getTask(input.id);
68
- if (t) {
69
- const message = `Delete ${t.id}: ${t.title}`;
70
- const taskFilePath = path.relative(process.cwd(), path.join(getVibeDir(), 'tasks', `${t.id}.md`));
71
- await gitService.commitChanges(t, message, [taskFilePath]);
72
- }
73
- }
74
- }
75
- catch {
76
- // Non-fatal
77
- }
78
- return { success: true };
79
- }),
80
- // Move task to different status
81
- moveTask: publicProcedure
82
- .input(z.object({ id: z.string(), status: z.enum(['backlog', 'in-progress', 'review', 'done']) }))
83
- .mutation(async ({ input }) => {
84
- const tsk = taskService.getTask(input.id);
85
- if (!tsk)
86
- throw new Error(`Task ${input.id} not found`);
87
- if (tsk.deleted_at)
88
- throw new Error(`Task ${input.id} is deleted`);
89
- const oldStatus = tsk.status;
90
- const updated = await taskService.moveTask(input.id, input.status);
91
- try {
92
- if (gitService) {
93
- const message = `chore: Update task ${tsk.id} status from ${oldStatus} to ${input.status}`;
94
- const taskFilePath = path.relative(process.cwd(), path.join(getVibeDir(), 'tasks', `${tsk.id}.md`));
95
- await gitService.commitChanges(updated, message, [taskFilePath]);
96
- }
97
- }
98
- catch {
99
- // Non-fatal
100
- }
101
- return updated;
102
- }),
103
- // Get task statistics
104
- getTaskStats: publicProcedure.query(async () => {
105
- const tasks = taskService.getAllTasks().filter((t) => !t.deleted_at);
106
- const stats = {
107
- total: tasks.length,
108
- backlog: 0,
109
- 'in-progress': 0,
110
- review: 0,
111
- done: 0,
112
- byType: {},
113
- byPriority: {},
114
- };
115
- for (const task of tasks) {
116
- stats[task.status]++;
117
- stats.byType[task.type] = (stats.byType[task.type] || 0) + 1;
118
- stats.byPriority[task.priority] = (stats.byPriority[task.priority] || 0) + 1;
119
- }
120
- return stats;
121
- }),
122
- // Search tasks
123
- searchTasks: publicProcedure
124
- .input(z.object({
125
- query: z.string(),
126
- includeDeleted: z.boolean().optional(),
127
- onlyDeleted: z.boolean().optional(),
128
- }))
129
- .query(async ({ input }) => {
130
- let results = taskService.searchTasks(input.query);
131
- if (input.onlyDeleted)
132
- results = results.filter((t) => !!t.deleted_at);
133
- else if (!input.includeDeleted)
134
- results = results.filter((t) => !t.deleted_at);
135
- return results;
136
- }),
137
- // Health check
138
- healthCheck: publicProcedure.query(async () => {
139
- return {
140
- status: 'ok',
141
- timestamp: new Date().toISOString(),
142
- tasksLoaded: taskService.getAllTasks().length,
143
- };
144
- }),
145
- // Subscriptions for task updates
146
- onTaskUpdate: publicProcedure
147
- .input(z.object({ taskId: z.string().optional() }).optional())
148
- .subscription(async function* (opts) {
149
- const input = opts.input;
150
- const proxy = new EventEmitter();
151
- const handleTaskUpdated = (task) => {
152
- if (!input?.taskId || task.id === input.taskId) {
153
- proxy.emit('data', { type: 'update', taskId: task.id, task });
154
- }
155
- };
156
- const handleTaskDeleted = (taskId) => {
157
- if (!input?.taskId || taskId === input.taskId) {
158
- proxy.emit('data', { type: 'delete', taskId });
159
- }
160
- };
161
- taskService.on('taskUpdated', handleTaskUpdated);
162
- taskService.on('taskDeleted', handleTaskDeleted);
163
- try {
164
- for await (const [payload] of on(proxy, 'data', { signal: opts.signal })) {
165
- yield payload;
166
- }
167
- }
168
- finally {
169
- taskService.off('taskUpdated', handleTaskUpdated);
170
- taskService.off('taskDeleted', handleTaskDeleted);
171
- }
172
- }),
173
- // Task History procedures
174
- getTaskHistory: publicProcedure
175
- .input(z.object({
176
- taskId: z.string(),
177
- limit: z.number().min(1).max(100).default(50),
178
- }))
179
- .query(async ({ input }) => {
180
- const { taskId, limit } = input;
181
- // Check if Git repository is available
182
- const isGitAvailable = await gitHistoryService.isGitRepositoryAvailable();
183
- if (!isGitAvailable) {
184
- return { available: false, history: [] };
185
- }
186
- try {
187
- const history = await gitHistoryService.getTaskHistory(taskId, limit);
188
- return { available: true, history };
189
- }
190
- catch (error) {
191
- return {
192
- available: false,
193
- history: [],
194
- error: error instanceof Error ? error.message : 'Unknown error',
195
- };
196
- }
197
- }),
198
- getTaskVersion: publicProcedure
199
- .input(z.object({
200
- taskId: z.string(),
201
- commitHash: z.string(),
202
- }))
203
- .query(async ({ input }) => {
204
- const { taskId, commitHash } = input;
205
- const isGitAvailable = await gitHistoryService.isGitRepositoryAvailable();
206
- if (!isGitAvailable) {
207
- throw new Error('Git repository not available');
208
- }
209
- try {
210
- const version = await gitHistoryService.getTaskVersionContent(taskId, commitHash);
211
- return version;
212
- }
213
- catch (error) {
214
- throw new Error(`Failed to get task version: ${error instanceof Error ? error.message : 'Unknown error'}`);
215
- }
216
- }),
217
- getTaskDiff: publicProcedure
218
- .input(z.object({
219
- taskId: z.string(),
220
- fromHash: z.string(),
221
- toHash: z.string(),
222
- }))
223
- .query(async ({ input }) => {
224
- const { taskId, fromHash, toHash } = input;
225
- const isGitAvailable = await gitHistoryService.isGitRepositoryAvailable();
226
- if (!isGitAvailable) {
227
- throw new Error('Git repository not available');
228
- }
229
- try {
230
- const diff = await gitHistoryService.getTaskDiff(taskId, fromHash, toHash);
231
- return diff;
232
- }
233
- catch (error) {
234
- throw new Error(`Failed to get task diff: ${error instanceof Error ? error.message : 'Unknown error'}`);
235
- }
236
- }),
237
- };
238
- }