commandmate 0.2.2 → 0.2.4
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +46 -50
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +9 -9
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/fetch-cache/799a63cbfa61e2ab38626c05fe43500464c7bbd38341bdde69f5ec4b25acff68 +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -0
- package/.next/server/app/{worktrees/[id]/simple-terminal/page.js.nft.json → api/app/update-check/route.js.nft.json} +1 -1
- package/.next/server/app/api/app/update-check.body +1 -0
- package/.next/server/app/api/app/update-check.meta +1 -0
- package/.next/server/app/api/repositories/restore/route.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +4 -4
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/page.js +2 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +3 -15
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page.js +3 -3
- package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +13 -13
- package/.next/server/chunks/1287.js +4 -0
- package/.next/server/chunks/2683.js +1 -0
- package/.next/server/chunks/3348.js +1 -0
- package/.next/server/chunks/369.js +1 -0
- package/.next/server/chunks/3860.js +1 -0
- package/.next/server/chunks/4559.js +1 -0
- package/.next/server/chunks/4704.js +35 -0
- package/.next/server/chunks/5488.js +1 -1
- package/.next/server/chunks/5781.js +1 -0
- package/.next/server/chunks/5823.js +1 -0
- package/.next/server/chunks/5853.js +1 -0
- package/.next/server/chunks/6837.js +1 -0
- package/.next/server/chunks/7266.js +1 -0
- package/.next/server/chunks/7425.js +3 -3
- package/.next/server/chunks/7458.js +1 -0
- package/.next/server/chunks/7536.js +1 -1
- package/.next/server/chunks/8705.js +1 -0
- package/.next/server/chunks/8744.js +1 -0
- package/.next/server/chunks/9367.js +2 -2
- package/.next/server/chunks/9582.js +1 -0
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1038-3509435b68c0967e.js +1 -0
- package/.next/static/chunks/216-f18f4a9d8b04a91e.js +1 -0
- package/.next/static/chunks/2330-0299b9879f4977d2.js +1 -0
- package/.next/static/chunks/4733-50bdfc169adb4881.js +1 -0
- package/.next/static/chunks/6140-389f1951062dcf4f.js +1 -0
- package/.next/static/chunks/816-af44cb865b0c980e.js +1 -0
- package/.next/static/chunks/8216-00e20326f32abd12.js +1 -0
- package/.next/static/chunks/9234-b0304101384ca079.js +3 -0
- package/.next/static/chunks/app/layout-07755491d5d57242.js +1 -0
- package/.next/static/chunks/app/page-43b5de1a0a788b1f.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-ce9ac3658f2b7d91.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-9632761937a4d1ad.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-5d85a7e508ce36d3.js +1 -0
- package/.next/static/chunks/{main-b6d727aa9248d4f2.js → main-f00f82f1cf18dd99.js} +1 -1
- package/.next/static/chunks/{webpack-4f85dcef6279c6ee.js → webpack-af8567a485ade35a.js} +1 -1
- package/.next/static/css/6a92c8ad3c94d15a.css +3 -0
- package/.next/trace +5 -5
- package/.next/types/app/api/app/update-check/route.ts +343 -0
- package/README.md +84 -82
- package/dist/server/src/config/auto-yes-config.js +4 -4
- package/dist/server/src/config/log-config.js +41 -0
- package/dist/server/src/lib/cli-tools/manager.js +0 -6
- package/dist/server/src/lib/log-manager.js +2 -6
- package/dist/server/src/lib/prompt-detector.js +272 -75
- package/dist/server/src/lib/response-poller.js +29 -43
- package/package.json +2 -1
- package/.next/server/app/_not-found.html +0 -1
- package/.next/server/app/_not-found.meta +0 -6
- package/.next/server/app/_not-found.rsc +0 -10
- package/.next/server/app/index.html +0 -9
- package/.next/server/app/index.meta +0 -5
- package/.next/server/app/index.rsc +0 -8
- package/.next/server/app/worktrees/[id]/simple-terminal/page.js +0 -4
- package/.next/server/app/worktrees/[id]/simple-terminal/page_client-reference-manifest.js +0 -1
- package/.next/server/chunks/3053.js +0 -1
- package/.next/server/chunks/434.js +0 -1
- package/.next/server/chunks/4471.js +0 -2
- package/.next/server/chunks/6550.js +0 -1
- package/.next/server/chunks/8174.js +0 -23
- package/.next/server/chunks/8887.js +0 -1
- package/.next/server/pages/404.html +0 -1
- package/.next/static/chunks/4343-ebe884a2a80eb033.js +0 -1
- package/.next/static/chunks/4851-45df4d388db5623f.js +0 -1
- package/.next/static/chunks/6568-c65d7e4d7db7655b.js +0 -1
- package/.next/static/chunks/6725-f7607851b7d57eb1.js +0 -1
- package/.next/static/chunks/7648-325564a6e12a3257.js +0 -1
- package/.next/static/chunks/816-c254f4e2406e696a.js +0 -1
- package/.next/static/chunks/9325-9e98829c1e75f42f.js +0 -1
- package/.next/static/chunks/app/layout-4804cfba519283cf.js +0 -1
- package/.next/static/chunks/app/page-3926224c4cdf315b.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-7eb14f8043796805.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-912c3c4c66821d99.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/simple-terminal/page-16feb3e86e42f4d1.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/terminal/page-be802baffc84dbd2.js +0 -1
- package/.next/static/css/d4b58a1129eff6af.css +0 -3
- package/.next/types/app/worktrees/[id]/simple-terminal/page.ts +0 -79
- package/dist/server/src/lib/claude-poller.js +0 -341
- /package/.next/static/{HhG0EHeG9E4wTJ4sqnLdv → b3UR0y5mw3Ubf_vI5JjIN}/_buildManifest.js +0 -0
- /package/.next/static/{HhG0EHeG9E4wTJ4sqnLdv → b3UR0y5mw3Ubf_vI5JjIN}/_ssgManifest.js +0 -0
- /package/.next/static/chunks/{2117-d845c2cd62e344a6.js → 2117-e31fa477cb500950.js} +0 -0
- /package/.next/static/chunks/app/_not-found/{page-a9d04e58c81115ec.js → page-ac4e4463b39d0cf7.js} +0 -0
- /package/.next/static/chunks/{fd9d1056-bbe86e4ae099d5cd.js → fd9d1056-cfdf4f91f13d3485.js} +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
// File: /home/runner/work/CommandMate/CommandMate/src/app/api/app/update-check/route.ts
|
|
2
|
+
import * as entry from '../../../../../../src/app/api/app/update-check/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
type TEntry = typeof import('../../../../../../src/app/api/app/update-check/route.js')
|
|
6
|
+
|
|
7
|
+
// Check that the entry is a valid entry
|
|
8
|
+
checkFields<Diff<{
|
|
9
|
+
GET?: Function
|
|
10
|
+
HEAD?: Function
|
|
11
|
+
OPTIONS?: Function
|
|
12
|
+
POST?: Function
|
|
13
|
+
PUT?: Function
|
|
14
|
+
DELETE?: Function
|
|
15
|
+
PATCH?: Function
|
|
16
|
+
config?: {}
|
|
17
|
+
generateStaticParams?: Function
|
|
18
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
19
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
20
|
+
dynamicParams?: boolean
|
|
21
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
22
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
23
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
24
|
+
maxDuration?: number
|
|
25
|
+
|
|
26
|
+
}, TEntry, ''>>()
|
|
27
|
+
|
|
28
|
+
// Check the prop type of the entry function
|
|
29
|
+
if ('GET' in entry) {
|
|
30
|
+
checkFields<
|
|
31
|
+
Diff<
|
|
32
|
+
ParamCheck<Request | NextRequest>,
|
|
33
|
+
{
|
|
34
|
+
__tag__: 'GET'
|
|
35
|
+
__param_position__: 'first'
|
|
36
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
37
|
+
},
|
|
38
|
+
'GET'
|
|
39
|
+
>
|
|
40
|
+
>()
|
|
41
|
+
checkFields<
|
|
42
|
+
Diff<
|
|
43
|
+
ParamCheck<PageParams>,
|
|
44
|
+
{
|
|
45
|
+
__tag__: 'GET'
|
|
46
|
+
__param_position__: 'second'
|
|
47
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
48
|
+
},
|
|
49
|
+
'GET'
|
|
50
|
+
>
|
|
51
|
+
>()
|
|
52
|
+
|
|
53
|
+
checkFields<
|
|
54
|
+
Diff<
|
|
55
|
+
{
|
|
56
|
+
__tag__: 'GET',
|
|
57
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
__tag__: 'GET',
|
|
61
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
62
|
+
},
|
|
63
|
+
'GET'
|
|
64
|
+
>
|
|
65
|
+
>()
|
|
66
|
+
}
|
|
67
|
+
// Check the prop type of the entry function
|
|
68
|
+
if ('HEAD' in entry) {
|
|
69
|
+
checkFields<
|
|
70
|
+
Diff<
|
|
71
|
+
ParamCheck<Request | NextRequest>,
|
|
72
|
+
{
|
|
73
|
+
__tag__: 'HEAD'
|
|
74
|
+
__param_position__: 'first'
|
|
75
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
76
|
+
},
|
|
77
|
+
'HEAD'
|
|
78
|
+
>
|
|
79
|
+
>()
|
|
80
|
+
checkFields<
|
|
81
|
+
Diff<
|
|
82
|
+
ParamCheck<PageParams>,
|
|
83
|
+
{
|
|
84
|
+
__tag__: 'HEAD'
|
|
85
|
+
__param_position__: 'second'
|
|
86
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
87
|
+
},
|
|
88
|
+
'HEAD'
|
|
89
|
+
>
|
|
90
|
+
>()
|
|
91
|
+
|
|
92
|
+
checkFields<
|
|
93
|
+
Diff<
|
|
94
|
+
{
|
|
95
|
+
__tag__: 'HEAD',
|
|
96
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
__tag__: 'HEAD',
|
|
100
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
101
|
+
},
|
|
102
|
+
'HEAD'
|
|
103
|
+
>
|
|
104
|
+
>()
|
|
105
|
+
}
|
|
106
|
+
// Check the prop type of the entry function
|
|
107
|
+
if ('OPTIONS' in entry) {
|
|
108
|
+
checkFields<
|
|
109
|
+
Diff<
|
|
110
|
+
ParamCheck<Request | NextRequest>,
|
|
111
|
+
{
|
|
112
|
+
__tag__: 'OPTIONS'
|
|
113
|
+
__param_position__: 'first'
|
|
114
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
115
|
+
},
|
|
116
|
+
'OPTIONS'
|
|
117
|
+
>
|
|
118
|
+
>()
|
|
119
|
+
checkFields<
|
|
120
|
+
Diff<
|
|
121
|
+
ParamCheck<PageParams>,
|
|
122
|
+
{
|
|
123
|
+
__tag__: 'OPTIONS'
|
|
124
|
+
__param_position__: 'second'
|
|
125
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
126
|
+
},
|
|
127
|
+
'OPTIONS'
|
|
128
|
+
>
|
|
129
|
+
>()
|
|
130
|
+
|
|
131
|
+
checkFields<
|
|
132
|
+
Diff<
|
|
133
|
+
{
|
|
134
|
+
__tag__: 'OPTIONS',
|
|
135
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
__tag__: 'OPTIONS',
|
|
139
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
140
|
+
},
|
|
141
|
+
'OPTIONS'
|
|
142
|
+
>
|
|
143
|
+
>()
|
|
144
|
+
}
|
|
145
|
+
// Check the prop type of the entry function
|
|
146
|
+
if ('POST' in entry) {
|
|
147
|
+
checkFields<
|
|
148
|
+
Diff<
|
|
149
|
+
ParamCheck<Request | NextRequest>,
|
|
150
|
+
{
|
|
151
|
+
__tag__: 'POST'
|
|
152
|
+
__param_position__: 'first'
|
|
153
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
154
|
+
},
|
|
155
|
+
'POST'
|
|
156
|
+
>
|
|
157
|
+
>()
|
|
158
|
+
checkFields<
|
|
159
|
+
Diff<
|
|
160
|
+
ParamCheck<PageParams>,
|
|
161
|
+
{
|
|
162
|
+
__tag__: 'POST'
|
|
163
|
+
__param_position__: 'second'
|
|
164
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
165
|
+
},
|
|
166
|
+
'POST'
|
|
167
|
+
>
|
|
168
|
+
>()
|
|
169
|
+
|
|
170
|
+
checkFields<
|
|
171
|
+
Diff<
|
|
172
|
+
{
|
|
173
|
+
__tag__: 'POST',
|
|
174
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
__tag__: 'POST',
|
|
178
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
179
|
+
},
|
|
180
|
+
'POST'
|
|
181
|
+
>
|
|
182
|
+
>()
|
|
183
|
+
}
|
|
184
|
+
// Check the prop type of the entry function
|
|
185
|
+
if ('PUT' in entry) {
|
|
186
|
+
checkFields<
|
|
187
|
+
Diff<
|
|
188
|
+
ParamCheck<Request | NextRequest>,
|
|
189
|
+
{
|
|
190
|
+
__tag__: 'PUT'
|
|
191
|
+
__param_position__: 'first'
|
|
192
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
193
|
+
},
|
|
194
|
+
'PUT'
|
|
195
|
+
>
|
|
196
|
+
>()
|
|
197
|
+
checkFields<
|
|
198
|
+
Diff<
|
|
199
|
+
ParamCheck<PageParams>,
|
|
200
|
+
{
|
|
201
|
+
__tag__: 'PUT'
|
|
202
|
+
__param_position__: 'second'
|
|
203
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
204
|
+
},
|
|
205
|
+
'PUT'
|
|
206
|
+
>
|
|
207
|
+
>()
|
|
208
|
+
|
|
209
|
+
checkFields<
|
|
210
|
+
Diff<
|
|
211
|
+
{
|
|
212
|
+
__tag__: 'PUT',
|
|
213
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
__tag__: 'PUT',
|
|
217
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
218
|
+
},
|
|
219
|
+
'PUT'
|
|
220
|
+
>
|
|
221
|
+
>()
|
|
222
|
+
}
|
|
223
|
+
// Check the prop type of the entry function
|
|
224
|
+
if ('DELETE' in entry) {
|
|
225
|
+
checkFields<
|
|
226
|
+
Diff<
|
|
227
|
+
ParamCheck<Request | NextRequest>,
|
|
228
|
+
{
|
|
229
|
+
__tag__: 'DELETE'
|
|
230
|
+
__param_position__: 'first'
|
|
231
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
232
|
+
},
|
|
233
|
+
'DELETE'
|
|
234
|
+
>
|
|
235
|
+
>()
|
|
236
|
+
checkFields<
|
|
237
|
+
Diff<
|
|
238
|
+
ParamCheck<PageParams>,
|
|
239
|
+
{
|
|
240
|
+
__tag__: 'DELETE'
|
|
241
|
+
__param_position__: 'second'
|
|
242
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
243
|
+
},
|
|
244
|
+
'DELETE'
|
|
245
|
+
>
|
|
246
|
+
>()
|
|
247
|
+
|
|
248
|
+
checkFields<
|
|
249
|
+
Diff<
|
|
250
|
+
{
|
|
251
|
+
__tag__: 'DELETE',
|
|
252
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
__tag__: 'DELETE',
|
|
256
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
257
|
+
},
|
|
258
|
+
'DELETE'
|
|
259
|
+
>
|
|
260
|
+
>()
|
|
261
|
+
}
|
|
262
|
+
// Check the prop type of the entry function
|
|
263
|
+
if ('PATCH' in entry) {
|
|
264
|
+
checkFields<
|
|
265
|
+
Diff<
|
|
266
|
+
ParamCheck<Request | NextRequest>,
|
|
267
|
+
{
|
|
268
|
+
__tag__: 'PATCH'
|
|
269
|
+
__param_position__: 'first'
|
|
270
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
271
|
+
},
|
|
272
|
+
'PATCH'
|
|
273
|
+
>
|
|
274
|
+
>()
|
|
275
|
+
checkFields<
|
|
276
|
+
Diff<
|
|
277
|
+
ParamCheck<PageParams>,
|
|
278
|
+
{
|
|
279
|
+
__tag__: 'PATCH'
|
|
280
|
+
__param_position__: 'second'
|
|
281
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
282
|
+
},
|
|
283
|
+
'PATCH'
|
|
284
|
+
>
|
|
285
|
+
>()
|
|
286
|
+
|
|
287
|
+
checkFields<
|
|
288
|
+
Diff<
|
|
289
|
+
{
|
|
290
|
+
__tag__: 'PATCH',
|
|
291
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
__tag__: 'PATCH',
|
|
295
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
296
|
+
},
|
|
297
|
+
'PATCH'
|
|
298
|
+
>
|
|
299
|
+
>()
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
303
|
+
if ('generateStaticParams' in entry) {
|
|
304
|
+
checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
305
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
type PageParams = any
|
|
309
|
+
export interface PageProps {
|
|
310
|
+
params?: any
|
|
311
|
+
searchParams?: any
|
|
312
|
+
}
|
|
313
|
+
export interface LayoutProps {
|
|
314
|
+
children?: React.ReactNode
|
|
315
|
+
|
|
316
|
+
params?: any
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// =============
|
|
320
|
+
// Utility types
|
|
321
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
322
|
+
|
|
323
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
324
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
325
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
326
|
+
|
|
327
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
328
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
329
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
330
|
+
|
|
331
|
+
type ParamCheck<T> = {
|
|
332
|
+
__tag__: string
|
|
333
|
+
__param_position__: string
|
|
334
|
+
__param_type__: T
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
338
|
+
|
|
339
|
+
// https://github.com/sindresorhus/type-fest
|
|
340
|
+
type Numeric = number | bigint
|
|
341
|
+
type Zero = 0 | 0n
|
|
342
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
343
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
package/README.md
CHANGED
|
@@ -1,152 +1,154 @@
|
|
|
1
1
|
# CommandMate
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> 「軽量。その場で完結。Claude Codeを、どこからでも動かす。」
|
|
3
|
+
[English](./README.md) | [日本語](./docs/ja/README.md)
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
> "Never miss a prompt — your development companion."
|
|
6
|
+
> "Lightweight. Self-contained. Run Claude Code from anywhere."
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+

|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## What is this?
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
A development companion tool that manages Claude Code sessions per Git worktree and lets you send instructions from your browser.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
During your commute, childcare breaks, or lunch — send the next instruction as easily as replying to an email, and keep your side projects moving forward.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- CLI の全機能を再現するものではなく、「入力待ち/未確認を見逃さず、すぐ指示を出す」ことに特化しています
|
|
16
|
+
## What it is NOT
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
- It is not a terminal replacement. It **complements** Claude Code
|
|
19
|
+
- It does not replicate all CLI features — it specializes in "never missing a prompt/confirmation and responding immediately"
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## Target Users
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Developers with Claude Code experience who want to continue personal projects alongside their day job.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
- **ブラウザから指示送信** — スマホ・PCどちらからでもメッセージUIで操作
|
|
27
|
-
- **実行履歴・メモ** — ブランチごとの会話履歴を保持、メモ機能付き
|
|
28
|
-
- **Markdownログビューア** — Claude の詳細出力をMarkdownで閲覧
|
|
29
|
-
- **ファイルビュー** — ワークツリー内のファイルをブラウザから確認
|
|
30
|
-
- **Auto Yes モード** — 確認ダイアログ付きで自動承認を制御
|
|
31
|
-
- **リポジトリ削除** — 不要になったリポジトリをアプリ管理から解除(実ファイルは削除しません)
|
|
32
|
-
- **クローンURL登録** — HTTPS/SSH URLを指定してリポジトリをクローン・登録
|
|
33
|
-
- **Claude Code 特化** — Claude Code セッションの管理に最適化
|
|
34
|
-
- **レスポンシブUI** — デスクトップは2カラム、モバイルはタブベースで最適表示
|
|
25
|
+
## Key Features
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
- **Prompt/confirmation detection** — Real-time status display in the sidebar (idle/ready/running/waiting)
|
|
28
|
+
- **Send instructions from browser** — Operate via message UI from both mobile and desktop
|
|
29
|
+
- **Execution history & notes** — Retains conversation history per branch with note-taking support
|
|
30
|
+
- **Markdown log viewer** — View Claude's detailed output in Markdown format
|
|
31
|
+
- **File viewer** — Browse worktree files from the browser
|
|
32
|
+
- **Auto Yes mode** — Control automatic approval with a confirmation dialog
|
|
33
|
+
- **Repository removal** — Remove repositories from app management (actual files are not deleted)
|
|
34
|
+
- **Clone URL registration** — Clone and register repositories by specifying HTTPS/SSH URLs
|
|
35
|
+
- **Claude Code optimized** — Optimized for Claude Code session management
|
|
36
|
+
- **Responsive UI** — Two-column layout on desktop, tab-based layout on mobile
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|--------|-------------------|-------------------|
|
|
40
|
-
|  |  |  |
|
|
38
|
+
### Worktree Detail View (Message / Console / History)
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
| Desktop | Mobile (History) | Mobile (Terminal) |
|
|
41
|
+
|---------|-----------------|-------------------|
|
|
42
|
+
|  |  |  |
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### Top Page (Mobile)
|
|
45
|
+
|
|
46
|
+

|
|
45
47
|
|
|
46
48
|
## Quick Start
|
|
47
49
|
|
|
48
|
-
###
|
|
50
|
+
### Prerequisites
|
|
49
51
|
|
|
50
|
-
- macOS / Linux
|
|
51
|
-
- Node.js v20
|
|
52
|
-
- Claude CLI
|
|
52
|
+
- macOS / Linux (Windows not supported due to tmux dependency)
|
|
53
|
+
- Node.js v20+, npm, git, tmux, openssl
|
|
54
|
+
- Claude CLI (optional)
|
|
53
55
|
|
|
54
|
-
###
|
|
56
|
+
### Installation
|
|
55
57
|
|
|
56
58
|
```bash
|
|
57
59
|
npm install -g commandmate
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
###
|
|
62
|
+
### Setup and Launch
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
|
-
commandmate init #
|
|
64
|
-
commandmate start --daemon #
|
|
65
|
+
commandmate init # Dependency check, environment setup, DB initialization
|
|
66
|
+
commandmate start --daemon # Start in background
|
|
65
67
|
```
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
Open http://localhost:3000 in your browser.
|
|
68
70
|
|
|
69
|
-
### CLI
|
|
71
|
+
### CLI Commands
|
|
70
72
|
|
|
71
|
-
|
|
|
72
|
-
|
|
73
|
-
| `commandmate init` |
|
|
74
|
-
| `commandmate init --defaults` |
|
|
75
|
-
| `commandmate start --daemon` |
|
|
76
|
-
| `commandmate start -p 3001` |
|
|
77
|
-
| `commandmate stop` |
|
|
78
|
-
| `commandmate status` |
|
|
73
|
+
| Command | Description |
|
|
74
|
+
|---------|-------------|
|
|
75
|
+
| `commandmate init` | Initial setup (interactive) |
|
|
76
|
+
| `commandmate init --defaults` | Initial setup (default values) |
|
|
77
|
+
| `commandmate start --daemon` | Start in background |
|
|
78
|
+
| `commandmate start -p 3001` | Start on a specific port |
|
|
79
|
+
| `commandmate stop` | Stop the server |
|
|
80
|
+
| `commandmate status` | Check status |
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
See the [CLI Setup Guide](./docs/en/user-guide/cli-setup-guide.md) for details.
|
|
81
83
|
|
|
82
|
-
###
|
|
84
|
+
### Mobile Access
|
|
83
85
|
|
|
84
|
-
`commandmate init`
|
|
86
|
+
Enabling external access via `commandmate init` sets `CM_BIND=0.0.0.0`. Access from the same LAN at `http://<your PC's IP>:3000`. For external access, we recommend authentication via a reverse proxy. See the [Security Guide](./docs/en/security-guide.md) for details.
|
|
85
87
|
|
|
86
|
-
##
|
|
88
|
+
## Developer Setup
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
For contributors or those building a development environment, use git clone.
|
|
89
91
|
|
|
90
92
|
```bash
|
|
91
93
|
git clone https://github.com/Kewton/CommandMate.git
|
|
92
94
|
cd CommandMate
|
|
93
|
-
./scripts/setup.sh #
|
|
95
|
+
./scripts/setup.sh # Auto-runs dependency check, env setup, build, and launch
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
###
|
|
98
|
+
### Manual Setup (for customization)
|
|
97
99
|
|
|
98
100
|
```bash
|
|
99
101
|
git clone https://github.com/Kewton/CommandMate.git
|
|
100
102
|
cd CommandMate
|
|
101
|
-
./scripts/preflight-check.sh #
|
|
103
|
+
./scripts/preflight-check.sh # Dependency check
|
|
102
104
|
npm install
|
|
103
|
-
./scripts/setup-env.sh #
|
|
105
|
+
./scripts/setup-env.sh # Interactive .env generation
|
|
104
106
|
npm run db:init
|
|
105
107
|
npm run build
|
|
106
108
|
npm start
|
|
107
109
|
```
|
|
108
110
|
|
|
109
|
-
> **Note**: `./scripts/*`
|
|
111
|
+
> **Note**: `./scripts/*` scripts are only available in the development environment. For global installs (`npm install -g`), use the `commandmate` CLI.
|
|
110
112
|
|
|
111
|
-
> **Note**:
|
|
113
|
+
> **Note**: Legacy environment variable names (`MCBD_*`) are still supported for backward compatibility, but using the new names (`CM_*`) is recommended.
|
|
112
114
|
|
|
113
115
|
## FAQ
|
|
114
116
|
|
|
115
|
-
**Q:
|
|
116
|
-
A:
|
|
117
|
+
**Q: Does everything run locally?**
|
|
118
|
+
A: The app, database, and sessions all run entirely locally. The only external communication is the Claude CLI's own API calls.
|
|
117
119
|
|
|
118
|
-
**Q:
|
|
119
|
-
A: Cloudflare Tunnel
|
|
120
|
+
**Q: How do I access it from my phone outside the house?**
|
|
121
|
+
A: You can use tunneling services like Cloudflare Tunnel. Within your home, simply connect your phone to the same Wi-Fi as your PC.
|
|
120
122
|
|
|
121
|
-
**Q: Claude Code
|
|
122
|
-
A: Claude Code
|
|
123
|
+
**Q: What about Claude Code's permissions?**
|
|
124
|
+
A: Claude Code's own permission settings apply as-is. This tool does not expand permissions. See [Trust & Safety](./docs/en/TRUST_AND_SAFETY.md) for details.
|
|
123
125
|
|
|
124
|
-
**Q: Windows
|
|
125
|
-
A:
|
|
126
|
+
**Q: Does it work on Windows?**
|
|
127
|
+
A: Not currently supported. macOS / Linux is required due to the tmux dependency. WSL2 has not been tested.
|
|
126
128
|
|
|
127
|
-
**Q:
|
|
128
|
-
A: Claude Code
|
|
129
|
+
**Q: Does it support CLI tools other than Claude Code?**
|
|
130
|
+
A: It supports Claude Code and Codex CLI. Thanks to the extensible Strategy pattern design, additional tools can be added in the future.
|
|
129
131
|
|
|
130
|
-
**Q:
|
|
131
|
-
A:
|
|
132
|
+
**Q: Can multiple people use it?**
|
|
133
|
+
A: Currently designed for individual use. Simultaneous multi-user access is not supported.
|
|
132
134
|
|
|
133
|
-
##
|
|
135
|
+
## Documentation
|
|
134
136
|
|
|
135
|
-
|
|
|
136
|
-
|
|
137
|
-
| [CLI
|
|
138
|
-
| [Web
|
|
139
|
-
| [
|
|
140
|
-
| [
|
|
141
|
-
| [
|
|
142
|
-
| [
|
|
143
|
-
| [
|
|
144
|
-
| [UI/UX
|
|
145
|
-
| [Trust & Safety](./docs/TRUST_AND_SAFETY.md) |
|
|
137
|
+
| Document | Description |
|
|
138
|
+
|----------|-------------|
|
|
139
|
+
| [CLI Setup Guide](./docs/en/user-guide/cli-setup-guide.md) | Installation and initial setup |
|
|
140
|
+
| [Web App Guide](./docs/en/user-guide/webapp-guide.md) | Basic web app operations |
|
|
141
|
+
| [Quick Start](./docs/en/user-guide/quick-start.md) | Using Claude Code commands |
|
|
142
|
+
| [Concept](./docs/en/concept.md) | Vision and problems solved |
|
|
143
|
+
| [Architecture](./docs/en/architecture.md) | System design |
|
|
144
|
+
| [Deployment Guide](./docs/en/DEPLOYMENT.md) | Production environment setup |
|
|
145
|
+
| [Migration Guide](./docs/en/migration-to-commandmate.md) | Migrating from MyCodeBranchDesk |
|
|
146
|
+
| [UI/UX Guide](./docs/en/UI_UX_GUIDE.md) | UI implementation details |
|
|
147
|
+
| [Trust & Safety](./docs/en/TRUST_AND_SAFETY.md) | Security and permissions |
|
|
146
148
|
|
|
147
149
|
## Contributing
|
|
148
150
|
|
|
149
|
-
|
|
151
|
+
Bug reports, feature suggestions, and documentation improvements are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
|
150
152
|
|
|
151
153
|
## License
|
|
152
154
|
|
|
@@ -16,11 +16,11 @@ exports.formatTimeRemaining = formatTimeRemaining;
|
|
|
16
16
|
exports.ALLOWED_DURATIONS = [3600000, 10800000, 28800000];
|
|
17
17
|
/** Default Auto-Yes duration (1 hour = 3600000ms) */
|
|
18
18
|
exports.DEFAULT_AUTO_YES_DURATION = 3600000;
|
|
19
|
-
/**
|
|
19
|
+
/** i18n translation keys for each duration value */
|
|
20
20
|
exports.DURATION_LABELS = {
|
|
21
|
-
3600000: '
|
|
22
|
-
10800000: '
|
|
23
|
-
28800000: '
|
|
21
|
+
3600000: 'autoYes.durations.1h',
|
|
22
|
+
10800000: 'autoYes.durations.3h',
|
|
23
|
+
28800000: 'autoYes.durations.8h',
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Type guard: check whether a value is a valid AutoYesDuration.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Log Directory Configuration
|
|
4
|
+
* Issue #11: Centralized LOG_DIR constant
|
|
5
|
+
*
|
|
6
|
+
* Eliminates duplicate LOG_DIR definitions previously found in:
|
|
7
|
+
* - src/lib/log-manager.ts
|
|
8
|
+
* - src/app/api/worktrees/[id]/logs/[filename]/route.ts
|
|
9
|
+
*
|
|
10
|
+
* Dependency chain: log-config.ts -> env.ts -> db-path-resolver.ts (no circular dependency)
|
|
11
|
+
*
|
|
12
|
+
* @module log-config
|
|
13
|
+
*/
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.getLogDir = getLogDir;
|
|
19
|
+
const path_1 = __importDefault(require("path"));
|
|
20
|
+
const env_1 = require("../lib/env");
|
|
21
|
+
/**
|
|
22
|
+
* Get the log directory path.
|
|
23
|
+
*
|
|
24
|
+
* Resolution order:
|
|
25
|
+
* 1. CM_LOG_DIR environment variable (with MCBD_LOG_DIR fallback via getEnvByKey)
|
|
26
|
+
* 2. Default: `${process.cwd()}/data/logs`
|
|
27
|
+
*
|
|
28
|
+
* @returns Absolute path to the log directory
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import { getLogDir } from '../config/log-config';
|
|
33
|
+
*
|
|
34
|
+
* const logDir = getLogDir();
|
|
35
|
+
* // => '/path/to/project/data/logs' (default)
|
|
36
|
+
* // => '/custom/log/dir' (when CM_LOG_DIR is set)
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
function getLogDir() {
|
|
40
|
+
return (0, env_1.getEnvByKey)('CM_LOG_DIR') || path_1.default.join(process.cwd(), 'data', 'logs');
|
|
41
|
+
}
|
|
@@ -9,7 +9,6 @@ const claude_1 = require("./claude");
|
|
|
9
9
|
const codex_1 = require("./codex");
|
|
10
10
|
const gemini_1 = require("./gemini");
|
|
11
11
|
const response_poller_1 = require("../response-poller");
|
|
12
|
-
const claude_poller_1 = require("../claude-poller");
|
|
13
12
|
/**
|
|
14
13
|
* CLI Tool Manager (Singleton)
|
|
15
14
|
* Provides centralized access to all CLI tools
|
|
@@ -160,11 +159,6 @@ class CLIToolManager {
|
|
|
160
159
|
stopPollers(worktreeId, cliToolId) {
|
|
161
160
|
// Stop response-poller for all tools
|
|
162
161
|
(0, response_poller_1.stopPolling)(worktreeId, cliToolId);
|
|
163
|
-
// claude-poller is Claude-specific
|
|
164
|
-
if (cliToolId === 'claude') {
|
|
165
|
-
(0, claude_poller_1.stopPolling)(worktreeId);
|
|
166
|
-
}
|
|
167
|
-
// Future: Add other tool-specific pollers here if needed
|
|
168
162
|
}
|
|
169
163
|
}
|
|
170
164
|
exports.CLIToolManager = CLIToolManager;
|