jinn-cli 0.5.1 → 0.5.3

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 (56) hide show
  1. package/dist/src/gateway/api.d.ts.map +1 -1
  2. package/dist/src/gateway/api.js +12 -3
  3. package/dist/src/gateway/api.js.map +1 -1
  4. package/dist/src/gateway/server.d.ts.map +1 -1
  5. package/dist/src/gateway/server.js +0 -12
  6. package/dist/src/gateway/server.js.map +1 -1
  7. package/dist/src/mcp/resolver.d.ts.map +1 -1
  8. package/dist/src/mcp/resolver.js +8 -2
  9. package/dist/src/mcp/resolver.js.map +1 -1
  10. package/dist/src/shared/types.d.ts +15 -2
  11. package/dist/src/shared/types.d.ts.map +1 -1
  12. package/dist/web/404.html +1 -1
  13. package/dist/web/_next/static/chunks/app/settings/page-f62176848534f90a.js +1 -0
  14. package/dist/web/app-build-manifest.json +3 -0
  15. package/dist/web/build-manifest.json +17 -0
  16. package/dist/web/chat.html +1 -1
  17. package/dist/web/chat.txt +1 -1
  18. package/dist/web/costs.html +2 -2
  19. package/dist/web/costs.txt +1 -1
  20. package/dist/web/cron.html +1 -1
  21. package/dist/web/cron.txt +1 -1
  22. package/dist/web/index.html +1 -1
  23. package/dist/web/index.txt +1 -1
  24. package/dist/web/kanban.html +1 -1
  25. package/dist/web/kanban.txt +1 -1
  26. package/dist/web/logs.html +2 -2
  27. package/dist/web/logs.txt +1 -1
  28. package/dist/web/org.html +1 -1
  29. package/dist/web/org.txt +1 -1
  30. package/dist/web/react-loadable-manifest.json +1 -0
  31. package/dist/web/server/app-paths-manifest.json +1 -0
  32. package/dist/web/server/interception-route-rewrite-manifest.js +1 -0
  33. package/dist/web/server/middleware-build-manifest.js +19 -0
  34. package/dist/web/server/middleware-manifest.json +6 -0
  35. package/dist/web/server/middleware-react-loadable-manifest.js +1 -0
  36. package/dist/web/server/next-font-manifest.js +1 -0
  37. package/dist/web/server/next-font-manifest.json +1 -0
  38. package/dist/web/server/pages-manifest.json +1 -0
  39. package/dist/web/server/server-reference-manifest.js +1 -0
  40. package/dist/web/server/server-reference-manifest.json +5 -0
  41. package/dist/web/sessions.html +1 -1
  42. package/dist/web/sessions.txt +1 -1
  43. package/dist/web/settings.html +1 -1
  44. package/dist/web/settings.txt +2 -2
  45. package/dist/web/skills.html +1 -1
  46. package/dist/web/skills.txt +1 -1
  47. package/dist/web/static/development/_buildManifest.js +1 -0
  48. package/dist/web/static/development/_ssgManifest.js +1 -0
  49. package/dist/web/types/cache-life.d.ts +141 -0
  50. package/dist/web/types/package.json +1 -0
  51. package/dist/web/types/routes.d.ts +66 -0
  52. package/dist/web/types/validator.ts +142 -0
  53. package/package.json +1 -1
  54. package/dist/web/_next/static/chunks/app/settings/page-beb4dce244545649.js +0 -1
  55. /package/dist/web/_next/static/{PdaYoul-532GSdcvOaz-m → J4YFiPdzNcFHieP2FIPPe}/_buildManifest.js +0 -0
  56. /package/dist/web/_next/static/{PdaYoul-532GSdcvOaz-m → J4YFiPdzNcFHieP2FIPPe}/_ssgManifest.js +0 -0
@@ -11,7 +11,7 @@ f:I[2051,[],"MetadataBoundary"]
11
11
  10:"$Sreact.suspense"
12
12
  12:I[7698,[],""]
13
13
  :HL["/_next/static/css/bd612b1ca9b40306.css","style"]
14
- 0:{"P":null,"b":"PdaYoul-532GSdcvOaz-m","p":"","c":["","skills"],"i":false,"f":[[["",{"children":["skills",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bd612b1ca9b40306.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["skills",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],null],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
14
+ 0:{"P":null,"b":"J4YFiPdzNcFHieP2FIPPe","p":"","c":["","skills"],"i":false,"f":[[["",{"children":["skills",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bd612b1ca9b40306.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["skills",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],null],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
15
15
  7:{}
16
16
  8:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
17
17
  e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST = (function(a){return {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:a,__routerFilterDynamic:a,sortedPages:["\u002F_app"]}}(void 0));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
@@ -0,0 +1 @@
1
+ self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
@@ -0,0 +1,141 @@
1
+ // Type definitions for Next.js cacheLife configs
2
+
3
+ declare module 'next/cache' {
4
+ export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'
5
+ export {
6
+ revalidateTag,
7
+ revalidatePath,
8
+ unstable_expireTag,
9
+ unstable_expirePath,
10
+ } from 'next/dist/server/web/spec-extension/revalidate'
11
+ export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'
12
+
13
+
14
+ /**
15
+ * Cache this `"use cache"` for a timespan defined by the `"default"` profile.
16
+ * ```
17
+ * stale: 300 seconds (5 minutes)
18
+ * revalidate: 900 seconds (15 minutes)
19
+ * expire: never
20
+ * ```
21
+ *
22
+ * This cache may be stale on clients for 5 minutes before checking with the server.
23
+ * If the server receives a new request after 15 minutes, start revalidating new values in the background.
24
+ * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
25
+ */
26
+ export function unstable_cacheLife(profile: "default"): void
27
+
28
+ /**
29
+ * Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
30
+ * ```
31
+ * stale: 30 seconds
32
+ * revalidate: 1 seconds
33
+ * expire: 60 seconds (1 minute)
34
+ * ```
35
+ *
36
+ * This cache may be stale on clients for 30 seconds before checking with the server.
37
+ * If the server receives a new request after 1 seconds, start revalidating new values in the background.
38
+ * If this entry has no traffic for 1 minute it will expire. The next request will recompute it.
39
+ */
40
+ export function unstable_cacheLife(profile: "seconds"): void
41
+
42
+ /**
43
+ * Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
44
+ * ```
45
+ * stale: 300 seconds (5 minutes)
46
+ * revalidate: 60 seconds (1 minute)
47
+ * expire: 3600 seconds (1 hour)
48
+ * ```
49
+ *
50
+ * This cache may be stale on clients for 5 minutes before checking with the server.
51
+ * If the server receives a new request after 1 minute, start revalidating new values in the background.
52
+ * If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
53
+ */
54
+ export function unstable_cacheLife(profile: "minutes"): void
55
+
56
+ /**
57
+ * Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
58
+ * ```
59
+ * stale: 300 seconds (5 minutes)
60
+ * revalidate: 3600 seconds (1 hour)
61
+ * expire: 86400 seconds (1 day)
62
+ * ```
63
+ *
64
+ * This cache may be stale on clients for 5 minutes before checking with the server.
65
+ * If the server receives a new request after 1 hour, start revalidating new values in the background.
66
+ * If this entry has no traffic for 1 day it will expire. The next request will recompute it.
67
+ */
68
+ export function unstable_cacheLife(profile: "hours"): void
69
+
70
+ /**
71
+ * Cache this `"use cache"` for a timespan defined by the `"days"` profile.
72
+ * ```
73
+ * stale: 300 seconds (5 minutes)
74
+ * revalidate: 86400 seconds (1 day)
75
+ * expire: 604800 seconds (1 week)
76
+ * ```
77
+ *
78
+ * This cache may be stale on clients for 5 minutes before checking with the server.
79
+ * If the server receives a new request after 1 day, start revalidating new values in the background.
80
+ * If this entry has no traffic for 1 week it will expire. The next request will recompute it.
81
+ */
82
+ export function unstable_cacheLife(profile: "days"): void
83
+
84
+ /**
85
+ * Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
86
+ * ```
87
+ * stale: 300 seconds (5 minutes)
88
+ * revalidate: 604800 seconds (1 week)
89
+ * expire: 2592000 seconds (30 days)
90
+ * ```
91
+ *
92
+ * This cache may be stale on clients for 5 minutes before checking with the server.
93
+ * If the server receives a new request after 1 week, start revalidating new values in the background.
94
+ * If this entry has no traffic for 30 days it will expire. The next request will recompute it.
95
+ */
96
+ export function unstable_cacheLife(profile: "weeks"): void
97
+
98
+ /**
99
+ * Cache this `"use cache"` for a timespan defined by the `"max"` profile.
100
+ * ```
101
+ * stale: 300 seconds (5 minutes)
102
+ * revalidate: 2592000 seconds (30 days)
103
+ * expire: never
104
+ * ```
105
+ *
106
+ * This cache may be stale on clients for 5 minutes before checking with the server.
107
+ * If the server receives a new request after 30 days, start revalidating new values in the background.
108
+ * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
109
+ */
110
+ export function unstable_cacheLife(profile: "max"): void
111
+
112
+ /**
113
+ * Cache this `"use cache"` using a custom timespan.
114
+ * ```
115
+ * stale: ... // seconds
116
+ * revalidate: ... // seconds
117
+ * expire: ... // seconds
118
+ * ```
119
+ *
120
+ * This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
121
+ *
122
+ * If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
123
+ */
124
+ export function unstable_cacheLife(profile: {
125
+ /**
126
+ * This cache may be stale on clients for ... seconds before checking with the server.
127
+ */
128
+ stale?: number,
129
+ /**
130
+ * If the server receives a new request after ... seconds, start revalidating new values in the background.
131
+ */
132
+ revalidate?: number,
133
+ /**
134
+ * If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
135
+ */
136
+ expire?: number
137
+ }): void
138
+
139
+
140
+ export { cacheTag as unstable_cacheTag } from 'next/dist/server/use-cache/cache-tag'
141
+ }
@@ -0,0 +1 @@
1
+ {"type": "module"}
@@ -0,0 +1,66 @@
1
+ // This file is generated automatically by Next.js
2
+ // Do not edit this file manually
3
+
4
+ type AppRoutes = "/" | "/chat" | "/costs" | "/cron" | "/kanban" | "/logs" | "/org" | "/sessions" | "/settings" | "/skills"
5
+ type PageRoutes = never
6
+ type LayoutRoutes = "/"
7
+ type RedirectRoutes = never
8
+ type RewriteRoutes = never
9
+ type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes
10
+
11
+
12
+ interface ParamMap {
13
+ "/": {}
14
+ "/chat": {}
15
+ "/costs": {}
16
+ "/cron": {}
17
+ "/kanban": {}
18
+ "/logs": {}
19
+ "/org": {}
20
+ "/sessions": {}
21
+ "/settings": {}
22
+ "/skills": {}
23
+ }
24
+
25
+
26
+ export type ParamsOf<Route extends Routes> = ParamMap[Route]
27
+
28
+ interface LayoutSlotMap {
29
+ "/": never
30
+ }
31
+
32
+
33
+ export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap }
34
+
35
+ declare global {
36
+ /**
37
+ * Props for Next.js App Router page components
38
+ * @example
39
+ * ```tsx
40
+ * export default function Page(props: PageProps<'/blog/[slug]'>) {
41
+ * const { slug } = await props.params
42
+ * return <div>Blog post: {slug}</div>
43
+ * }
44
+ * ```
45
+ */
46
+ interface PageProps<AppRoute extends AppRoutes> {
47
+ params: Promise<ParamMap[AppRoute]>
48
+ searchParams: Promise<Record<string, string | string[] | undefined>>
49
+ }
50
+
51
+ /**
52
+ * Props for Next.js App Router layout components
53
+ * @example
54
+ * ```tsx
55
+ * export default function Layout(props: LayoutProps<'/dashboard'>) {
56
+ * return <div>{props.children}</div>
57
+ * }
58
+ * ```
59
+ */
60
+ type LayoutProps<LayoutRoute extends LayoutRoutes> = {
61
+ params: Promise<ParamMap[LayoutRoute]>
62
+ children: React.ReactNode
63
+ } & {
64
+ [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
65
+ }
66
+ }
@@ -0,0 +1,142 @@
1
+ // This file is generated automatically by Next.js
2
+ // Do not edit this file manually
3
+ // This file validates that all pages and layouts export the correct types
4
+
5
+ import type { AppRoutes, LayoutRoutes, ParamMap } from "./routes.js"
6
+ import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
7
+
8
+ type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
9
+ default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
10
+ generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
11
+ generateMetadata?: (
12
+ props: { params: Promise<ParamMap[Route]> } & any,
13
+ parent: ResolvingMetadata
14
+ ) => Promise<any> | any
15
+ generateViewport?: (
16
+ props: { params: Promise<ParamMap[Route]> } & any,
17
+ parent: ResolvingViewport
18
+ ) => Promise<any> | any
19
+ metadata?: any
20
+ viewport?: any
21
+ }
22
+
23
+ type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
24
+ default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
25
+ generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
26
+ generateMetadata?: (
27
+ props: { params: Promise<ParamMap[Route]> } & any,
28
+ parent: ResolvingMetadata
29
+ ) => Promise<any> | any
30
+ generateViewport?: (
31
+ props: { params: Promise<ParamMap[Route]> } & any,
32
+ parent: ResolvingViewport
33
+ ) => Promise<any> | any
34
+ metadata?: any
35
+ viewport?: any
36
+ }
37
+
38
+
39
+ // Validate ../../src/app/chat/page.tsx
40
+ {
41
+ type __IsExpected<Specific extends AppPageConfig<"/chat">> = Specific
42
+ const handler = {} as typeof import("../../src/app/chat/page.js")
43
+ type __Check = __IsExpected<typeof handler>
44
+ // @ts-ignore
45
+ type __Unused = __Check
46
+ }
47
+
48
+ // Validate ../../src/app/costs/page.tsx
49
+ {
50
+ type __IsExpected<Specific extends AppPageConfig<"/costs">> = Specific
51
+ const handler = {} as typeof import("../../src/app/costs/page.js")
52
+ type __Check = __IsExpected<typeof handler>
53
+ // @ts-ignore
54
+ type __Unused = __Check
55
+ }
56
+
57
+ // Validate ../../src/app/cron/page.tsx
58
+ {
59
+ type __IsExpected<Specific extends AppPageConfig<"/cron">> = Specific
60
+ const handler = {} as typeof import("../../src/app/cron/page.js")
61
+ type __Check = __IsExpected<typeof handler>
62
+ // @ts-ignore
63
+ type __Unused = __Check
64
+ }
65
+
66
+ // Validate ../../src/app/kanban/page.tsx
67
+ {
68
+ type __IsExpected<Specific extends AppPageConfig<"/kanban">> = Specific
69
+ const handler = {} as typeof import("../../src/app/kanban/page.js")
70
+ type __Check = __IsExpected<typeof handler>
71
+ // @ts-ignore
72
+ type __Unused = __Check
73
+ }
74
+
75
+ // Validate ../../src/app/logs/page.tsx
76
+ {
77
+ type __IsExpected<Specific extends AppPageConfig<"/logs">> = Specific
78
+ const handler = {} as typeof import("../../src/app/logs/page.js")
79
+ type __Check = __IsExpected<typeof handler>
80
+ // @ts-ignore
81
+ type __Unused = __Check
82
+ }
83
+
84
+ // Validate ../../src/app/org/page.tsx
85
+ {
86
+ type __IsExpected<Specific extends AppPageConfig<"/org">> = Specific
87
+ const handler = {} as typeof import("../../src/app/org/page.js")
88
+ type __Check = __IsExpected<typeof handler>
89
+ // @ts-ignore
90
+ type __Unused = __Check
91
+ }
92
+
93
+ // Validate ../../src/app/page.tsx
94
+ {
95
+ type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
96
+ const handler = {} as typeof import("../../src/app/page.js")
97
+ type __Check = __IsExpected<typeof handler>
98
+ // @ts-ignore
99
+ type __Unused = __Check
100
+ }
101
+
102
+ // Validate ../../src/app/sessions/page.tsx
103
+ {
104
+ type __IsExpected<Specific extends AppPageConfig<"/sessions">> = Specific
105
+ const handler = {} as typeof import("../../src/app/sessions/page.js")
106
+ type __Check = __IsExpected<typeof handler>
107
+ // @ts-ignore
108
+ type __Unused = __Check
109
+ }
110
+
111
+ // Validate ../../src/app/settings/page.tsx
112
+ {
113
+ type __IsExpected<Specific extends AppPageConfig<"/settings">> = Specific
114
+ const handler = {} as typeof import("../../src/app/settings/page.js")
115
+ type __Check = __IsExpected<typeof handler>
116
+ // @ts-ignore
117
+ type __Unused = __Check
118
+ }
119
+
120
+ // Validate ../../src/app/skills/page.tsx
121
+ {
122
+ type __IsExpected<Specific extends AppPageConfig<"/skills">> = Specific
123
+ const handler = {} as typeof import("../../src/app/skills/page.js")
124
+ type __Check = __IsExpected<typeof handler>
125
+ // @ts-ignore
126
+ type __Unused = __Check
127
+ }
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ // Validate ../../src/app/layout.tsx
136
+ {
137
+ type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
138
+ const handler = {} as typeof import("../../src/app/layout.js")
139
+ type __Check = __IsExpected<typeof handler>
140
+ // @ts-ignore
141
+ type __Unused = __Check
142
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinn-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Lightweight AI gateway daemon orchestrating Claude Code and Codex",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{755:(e,a,t)=>{Promise.resolve().then(t.bind(t,3662))},3662:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>C});var l=t(8111),r=t(5271),n=t(1509),o=t(1983);let i=(0,o.A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),s=(0,o.A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),d=(0,o.A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var c=t(5896),u=t(8700),v=t(2755),p=t(7460),g=t(9834),h=t(3176);let x=[{label:"Red",value:"#EF4444"},{label:"Orange",value:"#F97316"},{label:"Amber",value:"#F59E0B"},{label:"Yellow",value:"#EAB308"},{label:"Lime",value:"#84CC16"},{label:"Green",value:"#22C55E"},{label:"Emerald",value:"#10B981"},{label:"Cyan",value:"#06B6D4"},{label:"Blue",value:"#3B82F6"},{label:"Indigo",value:"#6366F1"},{label:"Violet",value:"#8B5CF6"},{label:"Pink",value:"#EC4899"}];function b(e){let{title:a,children:t}=e;return(0,l.jsxs)("section",{style:{marginBottom:"var(--space-6)"},children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",letterSpacing:"var(--tracking-wide)",textTransform:"uppercase",color:"var(--text-tertiary)",padding:"0 var(--space-2) var(--space-2)"},children:a}),(0,l.jsx)("div",{style:{background:"var(--material-regular)",borderRadius:"var(--radius-md)",border:"1px solid var(--separator)",padding:"var(--space-4)"},children:t})]})}function m(e){let{label:a,children:t}=e;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--space-2) 0",gap:"var(--space-4)"},children:[(0,l.jsx)("label",{style:{fontSize:"var(--text-subheadline)",color:"var(--text-secondary)",flexShrink:0},children:a}),(0,l.jsx)("div",{style:{width:240,flexShrink:0},children:t})]})}function f(e){let{value:a,onChange:t,type:r="text",placeholder:n}=e;return(0,l.jsx)("input",{type:r,value:a,onChange:e=>t(e.target.value),placeholder:n,className:"apple-input",style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)"}})}function y(e){let{value:a,onChange:t,options:r}=e;return(0,l.jsx)("select",{value:a,onChange:e=>t(e.target.value),style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)",cursor:"pointer"},children:r.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))})}function j(e){let{checked:a,onChange:t}=e;return(0,l.jsx)("button",{role:"switch","aria-checked":a,onClick:()=>t(!a),style:{width:44,height:24,borderRadius:12,background:a?"var(--system-green)":"var(--fill-primary)",border:"none",cursor:"pointer",position:"relative",flexShrink:0,transition:"background 200ms var(--ease-smooth)"},children:(0,l.jsx)("span",{style:{position:"absolute",top:2,left:a?22:2,width:20,height:20,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",transition:"left 200ms var(--ease-spring)"}})})}let k={en:"English",bg:"Bulgarian",de:"German",fr:"French",es:"Spanish",it:"Italian",pt:"Portuguese",ru:"Russian",zh:"Chinese",ja:"Japanese",ko:"Korean",ar:"Arabic",hi:"Hindi",tr:"Turkish",pl:"Polish",nl:"Dutch",sv:"Swedish",cs:"Czech",el:"Greek",ro:"Romanian",uk:"Ukrainian",he:"Hebrew",da:"Danish",fi:"Finnish",hu:"Hungarian",no:"Norwegian",sk:"Slovak",hr:"Croatian",ca:"Catalan",th:"Thai",vi:"Vietnamese",id:"Indonesian",ms:"Malay",tl:"Filipino",sr:"Serbian",lt:"Lithuanian",lv:"Latvian",sl:"Slovenian",et:"Estonian"};function S(){let[e,a]=(0,r.useState)(null),[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)("");if((0,r.useEffect)(()=>{h.F.sttStatus().then(a).catch(()=>{})},[]),(0,r.useEffect)(()=>{if(!(null==e?void 0:e.downloading))return;let t=setInterval(()=>{h.F.sttStatus().then(a).catch(()=>{})},1500);return()=>clearInterval(t)},[null==e?void 0:e.downloading]),!e)return null;let s=Object.entries(k).filter(a=>{let[t]=a;return!e.languages.includes(t)}).sort((e,a)=>e[1].localeCompare(a[1]));return(0,l.jsxs)(b,{title:"Voice Input",children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-3)",marginBottom:"var(--space-4)"},children:[(0,l.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:e.available?"var(--system-green)":"var(--system-red)",flexShrink:0}}),(0,l.jsxs)("div",{style:{flex:1},children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-subheadline)",fontWeight:"var(--weight-medium)",color:"var(--text-primary)"},children:e.available?"Whisper ".concat((e.model||"small").charAt(0).toUpperCase()+(e.model||"small").slice(1)):"No model installed"}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",color:"var(--text-tertiary)"},children:e.available?"Offline speech recognition ready":"Download a model to enable voice input"})]})]}),!e.available&&!e.downloading&&(0,l.jsx)("button",{onClick:function(){h.F.sttDownload().then(()=>a(e=>e?{...e,downloading:!0,progress:0}:e)).catch(()=>{})},style:{width:"100%",padding:"var(--space-3)",borderRadius:"var(--radius-md)",background:"var(--accent)",color:"var(--accent-contrast)",border:"none",cursor:"pointer",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-semibold)",marginBottom:"var(--space-4)"},children:"Download Whisper Small (~500MB)"}),e.downloading&&(0,l.jsxs)("div",{style:{marginBottom:"var(--space-4)"},children:[(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"var(--space-2)",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)"},children:[(0,l.jsx)("span",{children:"Downloading model…"}),(0,l.jsxs)("span",{children:[e.progress,"%"]})]}),(0,l.jsx)("div",{style:{height:6,borderRadius:3,background:"var(--fill-tertiary)",overflow:"hidden"},children:(0,l.jsx)("div",{style:{height:"100%",width:"".concat(e.progress,"%"),borderRadius:3,background:"var(--accent)",transition:"width 300ms ease"}})})]}),e.available&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{style:{borderTop:"1px solid var(--separator)",marginTop:"var(--space-2)",paddingTop:"var(--space-3)"},children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Transcription Languages"}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption2)",color:"var(--text-tertiary)",marginBottom:"var(--space-3)"},children:"First language is the default. Add multiple to show a language picker in chat."}),(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-2)",marginBottom:"var(--space-3)"},children:e.languages.map(r=>(0,l.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:"var(--space-1)",padding:"3px 8px",borderRadius:"var(--radius-sm)",background:"var(--fill-secondary)",fontSize:"var(--text-caption1)",fontWeight:"var(--weight-medium)",color:"var(--text-primary)"},children:[(0,l.jsx)("span",{style:{fontFamily:"var(--font-mono)",textTransform:"uppercase",fontSize:"var(--text-caption2)",fontWeight:"var(--weight-semibold)",color:"var(--accent)",marginRight:2},children:r}),k[r]||r,e.languages.length>1&&(0,l.jsx)("button",{onClick:()=>(function(t){if(!e||e.languages.length<=1)return;let l=e.languages.filter(e=>e!==t);n(!0),h.F.sttUpdateConfig(l).then(()=>a(e=>e?{...e,languages:l}:e)).catch(()=>{}).finally(()=>n(!1))})(r),disabled:t,"aria-label":"Remove ".concat(k[r]||r),style:{background:"none",border:"none",cursor:"pointer",padding:0,marginLeft:2,color:"var(--text-quaternary)",fontSize:14,lineHeight:1,display:"flex",alignItems:"center"},children:"\xd7"})]},r))}),(0,l.jsxs)("div",{style:{display:"flex",gap:"var(--space-2)"},children:[(0,l.jsxs)("select",{value:o,onChange:e=>i(e.target.value),style:{flex:1,background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:o?"var(--text-primary)":"var(--text-tertiary)",cursor:"pointer"},children:[(0,l.jsx)("option",{value:"",children:"Add a language…"}),s.map(e=>{let[a,t]=e;return(0,l.jsxs)("option",{value:a,children:[a.toUpperCase()," — ",t]},a)})]}),(0,l.jsx)("button",{onClick:function(){if(!o||!e||e.languages.includes(o))return;let t=[...e.languages,o];n(!0),i(""),h.F.sttUpdateConfig(t).then(()=>a(e=>e?{...e,languages:t}:e)).catch(()=>{}).finally(()=>n(!1))},disabled:!o||t,style:{padding:"6px 14px",borderRadius:"var(--radius-sm)",background:o?"var(--accent)":"var(--fill-tertiary)",color:o?"var(--accent-contrast)":"var(--text-quaternary)",border:"none",cursor:o?"pointer":"default",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-semibold)",flexShrink:0},children:"Add"})]})]})})]})}function C(){var e,a,t,o,k,C,w,z,B,R,F,W,E,I,T,N,A,D,L,M,P,O,H,G,U,_,q,V,J,K,Y,$,Q,X,Z,ee,ea,et,el,er,en,eo,ei,es,ed,ec,eu,ev,ep,eg,eh,ex,eb,em,ef,ey,ej,ek,eS,eC,ew,ez,eB,eR,eF;let{settings:eW,setAccentColor:eE,setPortalName:eI,setPortalSubtitle:eT,setOperatorName:eN,setPortalEmoji:eA,setLanguage:eD,resetAll:eL}=(0,v.t0)(),{theme:eM,setTheme:eP}=(0,p.D)(),[eO,eH]=(0,r.useState)(null!=(er=eW.portalName)?er:""),[eG,eU]=(0,r.useState)(null!=(en=eW.portalSubtitle)?en:""),[e_,eq]=(0,r.useState)(null!=(eo=eW.operatorName)?eo:""),[eV,eJ]=(0,r.useState)(null!=(ei=eW.portalEmoji)?ei:""),[eK,eY]=(0,r.useState)(null!=(es=eW.language)?es:"English"),[e$,eQ]=(0,r.useState)(null!=(ed=eW.accentColor)?ed:""),[eX,eZ]=(0,r.useState)({}),[e0,e1]=(0,r.useState)(!0),[e2,e3]=(0,r.useState)(null),[e6,e4]=(0,r.useState)(!1),[e5,e8]=(0,r.useState)(null);function e7(){e1(!0),h.F.getConfig().then(e=>{eZ(e),e3(null)}).catch(e=>e3(e.message)).finally(()=>e1(!1))}function e9(e,a){eZ(t=>{let l=structuredClone(t),r=l;for(let a=0;a<e.length-1;a++)r[e[a]]&&"object"==typeof r[e[a]]||(r[e[a]]={}),r=r[e[a]];return r[e[e.length-1]]=a,l})}return(0,r.useEffect)(()=>{var e,a,t,l,r,n;eH(null!=(e=eW.portalName)?e:""),eU(null!=(a=eW.portalSubtitle)?a:""),eq(null!=(t=eW.operatorName)?t:""),eJ(null!=(l=eW.portalEmoji)?l:""),eY(null!=(r=eW.language)?r:"English"),eQ(null!=(n=eW.accentColor)?n:"")},[eW.portalName,eW.portalSubtitle,eW.operatorName,eW.portalEmoji,eW.language,eW.accentColor]),(0,r.useEffect)(()=>{e7()},[]),(0,l.jsx)(u.M,{children:(0,l.jsx)("div",{className:"h-full overflow-y-auto",style:{background:"var(--bg)"},children:(0,l.jsxs)("div",{style:{maxWidth:640,margin:"0 auto",padding:"var(--space-6) var(--space-4) var(--space-12)"},children:[(0,l.jsx)("h1",{style:{fontSize:"var(--text-title1)",fontWeight:"var(--weight-bold)",letterSpacing:"var(--tracking-tight)",color:"var(--text-primary)",margin:"0 0 var(--space-6)"},children:"Settings"}),(0,l.jsxs)(b,{title:"Appearance",children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-footnote)",fontWeight:"var(--weight-medium)",color:"var(--text-secondary)",marginBottom:"var(--space-2)"},children:"Theme"}),(0,l.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:"var(--space-2)",marginBottom:"var(--space-4)"},children:g.z.map(e=>{let a=eM===e.id;return(0,l.jsxs)("button",{onClick:()=>eP(e.id),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--space-1)",padding:"var(--space-3) var(--space-2)",borderRadius:"var(--radius-md)",background:"var(--fill-quaternary)",border:a?"2px solid var(--accent)":"2px solid var(--separator)",cursor:"pointer",transition:"all 150ms var(--ease-smooth)"},children:[(0,l.jsx)("span",{style:{fontSize:24},children:e.emoji}),(0,l.jsx)("span",{style:{fontSize:"var(--text-caption2)",fontWeight:a?"var(--weight-semibold)":"var(--weight-medium)",color:a?"var(--accent)":"var(--text-secondary)"},children:e.label})]},e.id)})}),(0,l.jsx)("div",{style:{fontSize:"var(--text-footnote)",fontWeight:"var(--weight-medium)",color:"var(--text-secondary)",marginBottom:"var(--space-2)"},children:"Accent Color"}),(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-2)",marginBottom:"var(--space-3)"},children:x.map(e=>{let a=eW.accentColor===e.value;return(0,l.jsx)("button",{onClick:()=>eE(e.value),"aria-label":e.label,title:e.label,style:{width:32,height:32,borderRadius:"50%",background:e.value,border:a?"2px solid var(--text-primary)":"2px solid transparent",outline:a?"2px solid ".concat(e.value):"none",outlineOffset:2,cursor:"pointer",transition:"all 100ms var(--ease-smooth)",display:"flex",alignItems:"center",justifyContent:"center"},children:a&&(0,l.jsx)(n.A,{size:14,color:"#fff",strokeWidth:3})},e.value)})}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-3)"},children:[(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-2)",fontSize:"var(--text-footnote)",color:"var(--text-secondary)",cursor:"pointer"},children:["Custom:",(0,l.jsx)("input",{type:"color",value:null!=(ec=eW.accentColor)?ec:"#3B82F6",onChange:e=>eE(e.target.value),style:{width:28,height:28,border:"none",borderRadius:"50%",cursor:"pointer",background:"none",padding:0}})]}),(0,l.jsx)("input",{type:"text",placeholder:"#3B82F6",value:e$,onChange:e=>{eQ(e.target.value),/^#[0-9a-fA-F]{6}$/.test(e.target.value)&&eE(e.target.value)},className:"apple-input",style:{width:90,padding:"4px 8px",fontSize:"var(--text-caption1)",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)",fontFamily:"monospace"}}),eW.accentColor&&(0,l.jsxs)("button",{onClick:()=>eE(null),style:{fontSize:"var(--text-footnote)",color:"var(--system-blue)",background:"none",border:"none",cursor:"pointer",padding:0,display:"inline-flex",alignItems:"center",gap:4},children:[(0,l.jsx)(i,{size:12}),"Reset"]})]})]}),(0,l.jsx)(b,{title:"Branding",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-3)"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{style:{display:"block",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)",marginBottom:"var(--space-1)"},children:"Portal Name"}),(0,l.jsx)("input",{type:"text",className:"apple-input",placeholder:"Jinn",value:eO,onChange:e=>eH(e.target.value),onBlur:()=>{eI(eO||null),h.F.completeOnboarding({portalName:eO||void 0}).catch(()=>{})},style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)"}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{style:{display:"block",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)",marginBottom:"var(--space-1)"},children:"Portal Subtitle"}),(0,l.jsx)("input",{type:"text",className:"apple-input",placeholder:"Command Centre",value:eG,onChange:e=>eU(e.target.value),onBlur:()=>eT(eG||null),style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)"}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{style:{display:"block",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)",marginBottom:"var(--space-1)"},children:"Operator Name"}),(0,l.jsx)("input",{type:"text",className:"apple-input",placeholder:"Your Name",value:e_,onChange:e=>eq(e.target.value),onBlur:()=>{eN(e_||null),h.F.completeOnboarding({operatorName:e_||void 0}).catch(()=>{})},style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)"}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{style:{display:"block",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)",marginBottom:"var(--space-1)"},children:"Portal Emoji"}),(0,l.jsx)("input",{type:"text",className:"apple-input",placeholder:"\ud83e\udd16",value:eV,onChange:e=>eJ(e.target.value),onBlur:()=>eA(eV||null),style:{width:80,textAlign:"center",fontSize:"var(--text-title2)",padding:"6px 8px",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)"}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{style:{display:"block",fontSize:"var(--text-caption1)",color:"var(--text-tertiary)",marginBottom:"var(--space-1)"},children:"Language"}),(0,l.jsxs)("select",{value:eK,onChange:e=>eY(e.target.value),onBlur:()=>{eD(eK||"English"),h.F.completeOnboarding({language:eK||void 0}).catch(()=>{})},style:{width:"100%",background:"var(--bg-secondary)",border:"1px solid var(--separator)",borderRadius:"var(--radius-sm)",padding:"6px 10px",fontSize:"var(--text-footnote)",color:"var(--text-primary)",cursor:"pointer"},children:[(0,l.jsx)("option",{value:"English",children:"English"}),(0,l.jsx)("option",{value:"Spanish",children:"Spanish"}),(0,l.jsx)("option",{value:"French",children:"French"}),(0,l.jsx)("option",{value:"German",children:"German"}),(0,l.jsx)("option",{value:"Portuguese",children:"Portuguese"}),(0,l.jsx)("option",{value:"Italian",children:"Italian"}),(0,l.jsx)("option",{value:"Dutch",children:"Dutch"}),(0,l.jsx)("option",{value:"Russian",children:"Russian"}),(0,l.jsx)("option",{value:"Chinese",children:"Chinese"}),(0,l.jsx)("option",{value:"Japanese",children:"Japanese"}),(0,l.jsx)("option",{value:"Korean",children:"Korean"}),(0,l.jsx)("option",{value:"Arabic",children:"Arabic"}),(0,l.jsx)("option",{value:"Hindi",children:"Hindi"}),(0,l.jsx)("option",{value:"Bulgarian",children:"Bulgarian"})]})]})]})}),e5&&(0,l.jsx)("div",{style:{marginBottom:"var(--space-4)",padding:"var(--space-3) var(--space-4)",borderRadius:"var(--radius-md)",background:"success"===e5.type?"rgba(34,197,94,0.1)":"rgba(239,68,68,0.1)",border:"1px solid ".concat("success"===e5.type?"rgba(34,197,94,0.3)":"rgba(239,68,68,0.3)"),fontSize:"var(--text-footnote)",color:"success"===e5.type?"var(--system-green)":"var(--system-red)"},children:e5.message}),e0?(0,l.jsxs)("div",{style:{textAlign:"center",padding:"var(--space-8)",color:"var(--text-tertiary)",fontSize:"var(--text-footnote)"},children:[(0,l.jsx)(s,{size:20,style:{animation:"spin 1s linear infinite",margin:"0 auto var(--space-2)"}}),"Loading gateway config..."]}):e2?(0,l.jsxs)("div",{style:{marginBottom:"var(--space-6)",padding:"var(--space-3) var(--space-4)",borderRadius:"var(--radius-md)",background:"rgba(239,68,68,0.1)",border:"1px solid rgba(239,68,68,0.3)",fontSize:"var(--text-footnote)",color:"var(--system-red)"},children:["Failed to load config: ",e2]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(b,{title:"Gateway Configuration",children:[(0,l.jsx)(m,{label:"Port",children:(0,l.jsx)(f,{type:"number",value:String(null!=(eu=null==(e=eX.gateway)?void 0:e.port)?eu:""),onChange:e=>e9(["gateway","port"],Number(e)||0),placeholder:"7777"})}),(0,l.jsx)(m,{label:"Host",children:(0,l.jsx)(f,{value:null!=(ev=null==(a=eX.gateway)?void 0:a.host)?ev:"",onChange:e=>e9(["gateway","host"],e),placeholder:"127.0.0.1"})}),(0,l.jsx)(m,{label:"Default Engine",children:(0,l.jsx)(y,{value:null!=(ep=null==(t=eX.engines)?void 0:t.default)?ep:"claude",onChange:e=>e9(["engines","default"],e),options:[{value:"claude",label:"Claude"},{value:"codex",label:"Codex"}]})})]}),(0,l.jsxs)(b,{title:"Engine Configuration",children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Claude"}),(0,l.jsx)(m,{label:"Binary Path",children:(0,l.jsx)(f,{value:null!=(eg=null==(k=eX.engines)||null==(o=k.claude)?void 0:o.bin)?eg:"",onChange:e=>e9(["engines","claude","bin"],e),placeholder:"claude"})}),(0,l.jsx)(m,{label:"Model",children:(0,l.jsx)(y,{value:null!=(eh=null==(w=eX.engines)||null==(C=w.claude)?void 0:C.model)?eh:"opus",onChange:e=>e9(["engines","claude","model"],e),options:[{value:"opus",label:"Opus (claude-opus-4-6)"},{value:"sonnet",label:"Sonnet (claude-sonnet-4-6)"},{value:"haiku",label:"Haiku (claude-haiku-4-5)"}]})}),(0,l.jsx)(m,{label:"Effort Level",children:(0,l.jsx)(y,{value:null!=(ex=null==(B=eX.engines)||null==(z=B.claude)?void 0:z.effortLevel)?ex:"default",onChange:e=>e9(["engines","claude","effortLevel"],e),options:[{value:"default",label:"Default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}]})}),(0,l.jsx)("div",{style:{borderTop:"1px solid var(--separator)",marginTop:"var(--space-3)",paddingTop:"var(--space-3)"}}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Codex"}),(0,l.jsx)(m,{label:"Binary Path",children:(0,l.jsx)(f,{value:null!=(eb=null==(F=eX.engines)||null==(R=F.codex)?void 0:R.bin)?eb:"",onChange:e=>e9(["engines","codex","bin"],e),placeholder:"codex"})}),(0,l.jsx)(m,{label:"Model",children:(0,l.jsx)(y,{value:null!=(em=null==(E=eX.engines)||null==(W=E.codex)?void 0:W.model)?em:"gpt-5.4",onChange:e=>e9(["engines","codex","model"],e),options:[{value:"gpt-5.4",label:"GPT-5.4"},{value:"gpt-5.3-codex",label:"GPT-5.3 Codex"},{value:"gpt-5.2-codex",label:"GPT-5.2 Codex"},{value:"gpt-5.2",label:"GPT-5.2"},{value:"gpt-5.1-codex-max",label:"GPT-5.1 Codex Max"},{value:"gpt-5.1-codex-mini",label:"GPT-5.1 Codex Mini"}]})}),(0,l.jsx)(m,{label:"Effort Level",children:(0,l.jsx)(y,{value:null!=(ef=null==(T=eX.engines)||null==(I=T.codex)?void 0:I.effortLevel)?ef:"default",onChange:e=>e9(["engines","codex","effortLevel"],e),options:[{value:"default",label:"Default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra High"}]})})]}),(0,l.jsxs)(b,{title:"Connectors",children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Slack"}),(0,l.jsx)(m,{label:"App Token",children:(0,l.jsx)(f,{type:"password",value:null!=(ey=null==(A=eX.connectors)||null==(N=A.slack)?void 0:N.appToken)?ey:"",onChange:e=>e9(["connectors","slack","appToken"],e),placeholder:"xapp-..."})}),(0,l.jsx)(m,{label:"Bot Token",children:(0,l.jsx)(f,{type:"password",value:null!=(ej=null==(L=eX.connectors)||null==(D=L.slack)?void 0:D.botToken)?ej:"",onChange:e=>e9(["connectors","slack","botToken"],e),placeholder:"xoxb-..."})}),(0,l.jsx)(m,{label:"Share Session in Channel",children:(0,l.jsx)(j,{checked:null!=(ek=null==(P=eX.connectors)||null==(M=P.slack)?void 0:M.shareSessionInChannel)&&ek,onChange:e=>e9(["connectors","slack","shareSessionInChannel"],e)})}),(0,l.jsx)(m,{label:"Allowed Users",children:(0,l.jsx)(f,{value:Array.isArray(null==(H=eX.connectors)||null==(O=H.slack)?void 0:O.allowFrom)?null==(_=eX.connectors)||null==(U=_.slack)||null==(G=U.allowFrom)?void 0:G.join(", "):null!=(eS=null==(V=eX.connectors)||null==(q=V.slack)?void 0:q.allowFrom)?eS:"",onChange:e=>e9(["connectors","slack","allowFrom"],e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0),placeholder:"U123, U456"})}),(0,l.jsx)(m,{label:"Ignore Old Messages on Boot",children:(0,l.jsx)(j,{checked:null==(eC=null==(K=eX.connectors)||null==(J=K.slack)?void 0:J.ignoreOldMessagesOnBoot)||eC,onChange:e=>e9(["connectors","slack","ignoreOldMessagesOnBoot"],e)})}),(0,l.jsx)("div",{style:{borderTop:"1px solid var(--separator)",marginTop:"var(--space-3)",paddingTop:"var(--space-3)"}}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Web UI"}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption2)",color:"var(--text-tertiary)"},children:"Web conversations use queued one-shot resume flow for both engines."})]}),(0,l.jsxs)(b,{title:"Cron",children:[(0,l.jsx)("div",{style:{fontSize:"var(--text-caption1)",fontWeight:"var(--weight-semibold)",color:"var(--text-tertiary)",marginBottom:"var(--space-2)"},children:"Default Delivery"}),(0,l.jsx)("div",{style:{fontSize:"var(--text-caption2)",color:"var(--text-tertiary)",marginBottom:"var(--space-3)"},children:"When a cron job has no delivery configured, results will be sent here."}),(0,l.jsx)(m,{label:"Connector",children:(0,l.jsx)(y,{value:null!=(ew=null==($=eX.cron)||null==(Y=$.defaultDelivery)?void 0:Y.connector)?ew:"",onChange:e=>e9(["cron","defaultDelivery","connector"],e||void 0),options:[{value:"",label:"None (fire & forget)"},{value:"web",label:"Web"},{value:"slack",label:"Slack"}]})}),(null==(X=eX.cron)||null==(Q=X.defaultDelivery)?void 0:Q.connector)&&(0,l.jsx)(m,{label:"Channel",children:(0,l.jsx)(f,{value:null!=(ez=null==(ee=eX.cron)||null==(Z=ee.defaultDelivery)?void 0:Z.channel)?ez:"",onChange:e=>e9(["cron","defaultDelivery","channel"],e),placeholder:"#general"})})]}),(0,l.jsxs)(b,{title:"Logging",children:[(0,l.jsx)(m,{label:"Level",children:(0,l.jsx)(y,{value:null!=(eB=null==(ea=eX.logging)?void 0:ea.level)?eB:"info",onChange:e=>e9(["logging","level"],e),options:[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}]})}),(0,l.jsx)(m,{label:"Stdout",children:(0,l.jsx)(j,{checked:null==(eR=null==(et=eX.logging)?void 0:et.stdout)||eR,onChange:e=>e9(["logging","stdout"],e)})}),(0,l.jsx)(m,{label:"File Logging",children:(0,l.jsx)(j,{checked:null!=(eF=null==(el=eX.logging)?void 0:el.file)&&eF,onChange:e=>e9(["logging","file"],e)})})]}),(0,l.jsx)(S,{}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--space-3)",marginBottom:"var(--space-6)"},children:[(0,l.jsxs)("button",{onClick:()=>e7(),style:{padding:"var(--space-2) var(--space-4)",borderRadius:"var(--radius-md)",background:"var(--fill-tertiary)",color:"var(--text-secondary)",border:"none",cursor:"pointer",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-medium)",display:"inline-flex",alignItems:"center",gap:6},children:[(0,l.jsx)(i,{size:14}),"Reload"]}),(0,l.jsxs)("button",{onClick:function(){e4(!0),e8(null),h.F.updateConfig(eX).then(()=>e8({type:"success",message:"Settings saved successfully"})).catch(e=>e8({type:"error",message:"Failed to save: ".concat(e.message)})).finally(()=>e4(!1))},disabled:e6,style:{padding:"var(--space-2) var(--space-5)",borderRadius:"var(--radius-md)",background:"var(--accent)",color:"var(--accent-contrast)",border:"none",cursor:e6?"wait":"pointer",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-semibold)",display:"inline-flex",alignItems:"center",gap:6,opacity:e6?.7:1,transition:"all 150ms var(--ease-smooth)"},children:[(0,l.jsx)(d,{size:14}),e6?"Saving...":"Save Config"]})]})]}),(0,l.jsx)(b,{title:"Reset",children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--space-3)",flexWrap:"wrap"},children:[(0,l.jsxs)("button",{onClick:()=>{localStorage.removeItem("jinn-onboarded"),window.location.reload()},style:{padding:"var(--space-2) var(--space-5)",borderRadius:"var(--radius-md)",background:"var(--accent)",color:"var(--accent-contrast)",border:"none",cursor:"pointer",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-semibold)",transition:"all 150ms var(--ease-spring)",display:"inline-flex",alignItems:"center",gap:"var(--space-2)"},children:[(0,l.jsx)(i,{size:14}),"Re-run Onboarding Wizard"]}),(0,l.jsxs)("button",{onClick:()=>{window.confirm("Reset all settings to defaults?")&&(localStorage.removeItem("jinn-settings"),localStorage.removeItem("jinn-theme"),eL(),window.location.reload())},style:{padding:"var(--space-2) var(--space-5)",borderRadius:"var(--radius-md)",background:"var(--system-red)",color:"#fff",border:"none",cursor:"pointer",fontSize:"var(--text-footnote)",fontWeight:"var(--weight-semibold)",transition:"all 150ms var(--ease-spring)",display:"inline-flex",alignItems:"center",gap:"var(--space-2)"},children:[(0,l.jsx)(c.A,{size:14}),"Reset All Settings"]})]})})]})})})}}},e=>{e.O(0,[282,700,814,743,358],()=>e(e.s=755)),_N_E=e.O()}]);