@agegr/pi-web 0.3.5 → 0.3.7
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-path-routes-manifest.json +5 -0
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +3 -1
- package/.next/required-server-files.json +3 -1
- package/.next/routes-manifest.json +30 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +2 -2
- package/.next/server/app/api/agent/new/route.js +2 -2
- package/.next/server/app/api/default-cwd/route.js +1 -0
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/server/app/api/home/route.js +1 -0
- package/.next/server/app/api/home/route.js.nft.json +1 -0
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +2 -2
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/route.js +2 -2
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/skills/install/route.js +1 -0
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +4 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/search/route.js +1 -0
- package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +5 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/43qJa3KEyTajLJdyH7Iv5/_buildManifest.js +1 -0
- package/.next/static/chunks/app/_global-error/page-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/home/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/models/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/skills/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/app/page-7e60487765d4f432.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-60ef9a2f388b61b3.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-60ef9a2f388b61b3.js +1 -0
- package/.next/trace +3 -3
- package/.next/trace-build +1 -1
- package/.next/types/app/api/default-cwd/route.ts +351 -0
- package/.next/types/app/api/home/route.ts +351 -0
- package/.next/types/app/api/skills/install/route.ts +351 -0
- package/.next/types/app/api/skills/route.ts +351 -0
- package/.next/types/app/api/skills/search/route.ts +351 -0
- package/.next/types/routes.d.ts +6 -1
- package/.next/types/validator.ts +45 -0
- package/next.config.ts +7 -0
- package/package.json +1 -1
- package/.next/static/chunks/app/_global-error/page-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/models/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-957de1f71e826217.js +0 -1
- package/.next/static/chunks/app/page-8d02664b52fb8562.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-957de1f71e826217.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-957de1f71e826217.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-957de1f71e826217.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-957de1f71e826217.js +0 -1
- package/.next/static/o5v8sZDYNWZYyZTqhuhxl/_buildManifest.js +0 -1
- /package/.next/static/{o5v8sZDYNWZYyZTqhuhxl → 43qJa3KEyTajLJdyH7Iv5}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
// File: /Users/alex/Documents/Workspace/pi-web/app/api/skills/search/route.ts
|
|
2
|
+
import * as entry from '../../../../../../app/api/skills/search/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
|
+
|
|
7
|
+
type TEntry = typeof import('../../../../../../app/api/skills/search/route.js')
|
|
8
|
+
|
|
9
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
10
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
11
|
+
: T
|
|
12
|
+
|
|
13
|
+
// Check that the entry is a valid entry
|
|
14
|
+
checkFields<Diff<{
|
|
15
|
+
GET?: Function
|
|
16
|
+
HEAD?: Function
|
|
17
|
+
OPTIONS?: Function
|
|
18
|
+
POST?: Function
|
|
19
|
+
PUT?: Function
|
|
20
|
+
DELETE?: Function
|
|
21
|
+
PATCH?: Function
|
|
22
|
+
config?: {}
|
|
23
|
+
generateStaticParams?: Function
|
|
24
|
+
unstable_instant?: InstantConfigForTypeCheckInternal
|
|
25
|
+
unstable_dynamicStaleTime?: number
|
|
26
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
27
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
28
|
+
dynamicParams?: boolean
|
|
29
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
30
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
31
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
32
|
+
maxDuration?: number
|
|
33
|
+
|
|
34
|
+
}, TEntry, ''>>()
|
|
35
|
+
|
|
36
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
37
|
+
// Check the prop type of the entry function
|
|
38
|
+
if ('GET' in entry) {
|
|
39
|
+
checkFields<
|
|
40
|
+
Diff<
|
|
41
|
+
ParamCheck<Request | NextRequest>,
|
|
42
|
+
{
|
|
43
|
+
__tag__: 'GET'
|
|
44
|
+
__param_position__: 'first'
|
|
45
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
46
|
+
},
|
|
47
|
+
'GET'
|
|
48
|
+
>
|
|
49
|
+
>()
|
|
50
|
+
checkFields<
|
|
51
|
+
Diff<
|
|
52
|
+
ParamCheck<RouteContext>,
|
|
53
|
+
{
|
|
54
|
+
__tag__: 'GET'
|
|
55
|
+
__param_position__: 'second'
|
|
56
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
57
|
+
},
|
|
58
|
+
'GET'
|
|
59
|
+
>
|
|
60
|
+
>()
|
|
61
|
+
|
|
62
|
+
checkFields<
|
|
63
|
+
Diff<
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
__tag__: 'GET',
|
|
70
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
71
|
+
},
|
|
72
|
+
'GET'
|
|
73
|
+
>
|
|
74
|
+
>()
|
|
75
|
+
}
|
|
76
|
+
// Check the prop type of the entry function
|
|
77
|
+
if ('HEAD' in entry) {
|
|
78
|
+
checkFields<
|
|
79
|
+
Diff<
|
|
80
|
+
ParamCheck<Request | NextRequest>,
|
|
81
|
+
{
|
|
82
|
+
__tag__: 'HEAD'
|
|
83
|
+
__param_position__: 'first'
|
|
84
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
85
|
+
},
|
|
86
|
+
'HEAD'
|
|
87
|
+
>
|
|
88
|
+
>()
|
|
89
|
+
checkFields<
|
|
90
|
+
Diff<
|
|
91
|
+
ParamCheck<RouteContext>,
|
|
92
|
+
{
|
|
93
|
+
__tag__: 'HEAD'
|
|
94
|
+
__param_position__: 'second'
|
|
95
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
96
|
+
},
|
|
97
|
+
'HEAD'
|
|
98
|
+
>
|
|
99
|
+
>()
|
|
100
|
+
|
|
101
|
+
checkFields<
|
|
102
|
+
Diff<
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
__tag__: 'HEAD',
|
|
109
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
110
|
+
},
|
|
111
|
+
'HEAD'
|
|
112
|
+
>
|
|
113
|
+
>()
|
|
114
|
+
}
|
|
115
|
+
// Check the prop type of the entry function
|
|
116
|
+
if ('OPTIONS' in entry) {
|
|
117
|
+
checkFields<
|
|
118
|
+
Diff<
|
|
119
|
+
ParamCheck<Request | NextRequest>,
|
|
120
|
+
{
|
|
121
|
+
__tag__: 'OPTIONS'
|
|
122
|
+
__param_position__: 'first'
|
|
123
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
124
|
+
},
|
|
125
|
+
'OPTIONS'
|
|
126
|
+
>
|
|
127
|
+
>()
|
|
128
|
+
checkFields<
|
|
129
|
+
Diff<
|
|
130
|
+
ParamCheck<RouteContext>,
|
|
131
|
+
{
|
|
132
|
+
__tag__: 'OPTIONS'
|
|
133
|
+
__param_position__: 'second'
|
|
134
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
135
|
+
},
|
|
136
|
+
'OPTIONS'
|
|
137
|
+
>
|
|
138
|
+
>()
|
|
139
|
+
|
|
140
|
+
checkFields<
|
|
141
|
+
Diff<
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
__tag__: 'OPTIONS',
|
|
148
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
149
|
+
},
|
|
150
|
+
'OPTIONS'
|
|
151
|
+
>
|
|
152
|
+
>()
|
|
153
|
+
}
|
|
154
|
+
// Check the prop type of the entry function
|
|
155
|
+
if ('POST' in entry) {
|
|
156
|
+
checkFields<
|
|
157
|
+
Diff<
|
|
158
|
+
ParamCheck<Request | NextRequest>,
|
|
159
|
+
{
|
|
160
|
+
__tag__: 'POST'
|
|
161
|
+
__param_position__: 'first'
|
|
162
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
163
|
+
},
|
|
164
|
+
'POST'
|
|
165
|
+
>
|
|
166
|
+
>()
|
|
167
|
+
checkFields<
|
|
168
|
+
Diff<
|
|
169
|
+
ParamCheck<RouteContext>,
|
|
170
|
+
{
|
|
171
|
+
__tag__: 'POST'
|
|
172
|
+
__param_position__: 'second'
|
|
173
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
174
|
+
},
|
|
175
|
+
'POST'
|
|
176
|
+
>
|
|
177
|
+
>()
|
|
178
|
+
|
|
179
|
+
checkFields<
|
|
180
|
+
Diff<
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
__tag__: 'POST',
|
|
187
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
188
|
+
},
|
|
189
|
+
'POST'
|
|
190
|
+
>
|
|
191
|
+
>()
|
|
192
|
+
}
|
|
193
|
+
// Check the prop type of the entry function
|
|
194
|
+
if ('PUT' in entry) {
|
|
195
|
+
checkFields<
|
|
196
|
+
Diff<
|
|
197
|
+
ParamCheck<Request | NextRequest>,
|
|
198
|
+
{
|
|
199
|
+
__tag__: 'PUT'
|
|
200
|
+
__param_position__: 'first'
|
|
201
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
202
|
+
},
|
|
203
|
+
'PUT'
|
|
204
|
+
>
|
|
205
|
+
>()
|
|
206
|
+
checkFields<
|
|
207
|
+
Diff<
|
|
208
|
+
ParamCheck<RouteContext>,
|
|
209
|
+
{
|
|
210
|
+
__tag__: 'PUT'
|
|
211
|
+
__param_position__: 'second'
|
|
212
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
213
|
+
},
|
|
214
|
+
'PUT'
|
|
215
|
+
>
|
|
216
|
+
>()
|
|
217
|
+
|
|
218
|
+
checkFields<
|
|
219
|
+
Diff<
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
__tag__: 'PUT',
|
|
226
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
227
|
+
},
|
|
228
|
+
'PUT'
|
|
229
|
+
>
|
|
230
|
+
>()
|
|
231
|
+
}
|
|
232
|
+
// Check the prop type of the entry function
|
|
233
|
+
if ('DELETE' in entry) {
|
|
234
|
+
checkFields<
|
|
235
|
+
Diff<
|
|
236
|
+
ParamCheck<Request | NextRequest>,
|
|
237
|
+
{
|
|
238
|
+
__tag__: 'DELETE'
|
|
239
|
+
__param_position__: 'first'
|
|
240
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
241
|
+
},
|
|
242
|
+
'DELETE'
|
|
243
|
+
>
|
|
244
|
+
>()
|
|
245
|
+
checkFields<
|
|
246
|
+
Diff<
|
|
247
|
+
ParamCheck<RouteContext>,
|
|
248
|
+
{
|
|
249
|
+
__tag__: 'DELETE'
|
|
250
|
+
__param_position__: 'second'
|
|
251
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
252
|
+
},
|
|
253
|
+
'DELETE'
|
|
254
|
+
>
|
|
255
|
+
>()
|
|
256
|
+
|
|
257
|
+
checkFields<
|
|
258
|
+
Diff<
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
__tag__: 'DELETE',
|
|
265
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
266
|
+
},
|
|
267
|
+
'DELETE'
|
|
268
|
+
>
|
|
269
|
+
>()
|
|
270
|
+
}
|
|
271
|
+
// Check the prop type of the entry function
|
|
272
|
+
if ('PATCH' in entry) {
|
|
273
|
+
checkFields<
|
|
274
|
+
Diff<
|
|
275
|
+
ParamCheck<Request | NextRequest>,
|
|
276
|
+
{
|
|
277
|
+
__tag__: 'PATCH'
|
|
278
|
+
__param_position__: 'first'
|
|
279
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
280
|
+
},
|
|
281
|
+
'PATCH'
|
|
282
|
+
>
|
|
283
|
+
>()
|
|
284
|
+
checkFields<
|
|
285
|
+
Diff<
|
|
286
|
+
ParamCheck<RouteContext>,
|
|
287
|
+
{
|
|
288
|
+
__tag__: 'PATCH'
|
|
289
|
+
__param_position__: 'second'
|
|
290
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
291
|
+
},
|
|
292
|
+
'PATCH'
|
|
293
|
+
>
|
|
294
|
+
>()
|
|
295
|
+
|
|
296
|
+
checkFields<
|
|
297
|
+
Diff<
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
__tag__: 'PATCH',
|
|
304
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
305
|
+
},
|
|
306
|
+
'PATCH'
|
|
307
|
+
>
|
|
308
|
+
>()
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
312
|
+
if ('generateStaticParams' in entry) {
|
|
313
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
314
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface PageProps {
|
|
318
|
+
params?: Promise<SegmentParams>
|
|
319
|
+
searchParams?: Promise<any>
|
|
320
|
+
}
|
|
321
|
+
export interface LayoutProps {
|
|
322
|
+
children?: React.ReactNode
|
|
323
|
+
|
|
324
|
+
params?: Promise<SegmentParams>
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// =============
|
|
328
|
+
// Utility types
|
|
329
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
330
|
+
|
|
331
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
332
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
333
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
334
|
+
|
|
335
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
336
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
337
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
338
|
+
|
|
339
|
+
type ParamCheck<T> = {
|
|
340
|
+
__tag__: string
|
|
341
|
+
__param_position__: string
|
|
342
|
+
__param_type__: T
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
346
|
+
|
|
347
|
+
// https://github.com/sindresorhus/type-fest
|
|
348
|
+
type Numeric = number | bigint
|
|
349
|
+
type Zero = 0 | 0n
|
|
350
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
351
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
package/.next/types/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
|
|
4
4
|
type AppRoutes = "/"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/files/[...path]" | "/api/models" | "/api/models-config" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/context" | "/api/sessions/new"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/default-cwd" | "/api/files/[...path]" | "/api/home" | "/api/models" | "/api/models-config" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/context" | "/api/sessions/new" | "/api/skills" | "/api/skills/install" | "/api/skills/search"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -15,13 +15,18 @@ interface ParamMap {
|
|
|
15
15
|
"/api/agent/[id]": { "id": string; }
|
|
16
16
|
"/api/agent/[id]/events": { "id": string; }
|
|
17
17
|
"/api/agent/new": {}
|
|
18
|
+
"/api/default-cwd": {}
|
|
18
19
|
"/api/files/[...path]": { "path": string[]; }
|
|
20
|
+
"/api/home": {}
|
|
19
21
|
"/api/models": {}
|
|
20
22
|
"/api/models-config": {}
|
|
21
23
|
"/api/sessions": {}
|
|
22
24
|
"/api/sessions/[id]": { "id": string; }
|
|
23
25
|
"/api/sessions/[id]/context": { "id": string; }
|
|
24
26
|
"/api/sessions/new": {}
|
|
27
|
+
"/api/skills": {}
|
|
28
|
+
"/api/skills/install": {}
|
|
29
|
+
"/api/skills/search": {}
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
|
package/.next/types/validator.ts
CHANGED
|
@@ -83,6 +83,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
83
83
|
type __Unused = __Check
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
// Validate ../../app/api/default-cwd/route.ts
|
|
87
|
+
{
|
|
88
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/default-cwd">> = Specific
|
|
89
|
+
const handler = {} as typeof import("../../app/api/default-cwd/route.js")
|
|
90
|
+
type __Check = __IsExpected<typeof handler>
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
type __Unused = __Check
|
|
93
|
+
}
|
|
94
|
+
|
|
86
95
|
// Validate ../../app/api/files/[...path]/route.ts
|
|
87
96
|
{
|
|
88
97
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/files/[...path]">> = Specific
|
|
@@ -92,6 +101,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
92
101
|
type __Unused = __Check
|
|
93
102
|
}
|
|
94
103
|
|
|
104
|
+
// Validate ../../app/api/home/route.ts
|
|
105
|
+
{
|
|
106
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/home">> = Specific
|
|
107
|
+
const handler = {} as typeof import("../../app/api/home/route.js")
|
|
108
|
+
type __Check = __IsExpected<typeof handler>
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
type __Unused = __Check
|
|
111
|
+
}
|
|
112
|
+
|
|
95
113
|
// Validate ../../app/api/models-config/route.ts
|
|
96
114
|
{
|
|
97
115
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config">> = Specific
|
|
@@ -146,6 +164,33 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
146
164
|
type __Unused = __Check
|
|
147
165
|
}
|
|
148
166
|
|
|
167
|
+
// Validate ../../app/api/skills/install/route.ts
|
|
168
|
+
{
|
|
169
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/install">> = Specific
|
|
170
|
+
const handler = {} as typeof import("../../app/api/skills/install/route.js")
|
|
171
|
+
type __Check = __IsExpected<typeof handler>
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
type __Unused = __Check
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Validate ../../app/api/skills/route.ts
|
|
177
|
+
{
|
|
178
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills">> = Specific
|
|
179
|
+
const handler = {} as typeof import("../../app/api/skills/route.js")
|
|
180
|
+
type __Check = __IsExpected<typeof handler>
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
type __Unused = __Check
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Validate ../../app/api/skills/search/route.ts
|
|
186
|
+
{
|
|
187
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/search">> = Specific
|
|
188
|
+
const handler = {} as typeof import("../../app/api/skills/search/route.js")
|
|
189
|
+
type __Check = __IsExpected<typeof handler>
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
type __Unused = __Check
|
|
192
|
+
}
|
|
193
|
+
|
|
149
194
|
|
|
150
195
|
|
|
151
196
|
|
package/next.config.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { NextConfig } from "next";
|
|
2
|
+
import { readFileSync } from "fs";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
|
|
5
|
+
const { version } = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8")) as { version: string };
|
|
2
6
|
|
|
3
7
|
const nextConfig: NextConfig = {
|
|
4
8
|
serverExternalPackages: ["@mariozechner/pi-coding-agent", "@mariozechner/pi-ai"],
|
|
5
9
|
allowedDevOrigins: ['192.168.*.*'],
|
|
10
|
+
env: {
|
|
11
|
+
NEXT_PUBLIC_APP_VERSION: version,
|
|
12
|
+
},
|
|
6
13
|
};
|
|
7
14
|
|
|
8
15
|
export default nextConfig;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37,97,167,221,222,450,483,552,709,819,849,851,896,907,988],{4441:()=>{}},_=>{_.O(0,[441,794,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|