@vxnus/siduri 2.0.39 → 2.0.40
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/dist/generator.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/web-dist/404/index.html +1 -1
- package/dist/web-dist/404.html +1 -1
- package/dist/web-dist/__next.__PAGE__.txt +3 -3
- package/dist/web-dist/__next._full.txt +2 -2
- package/dist/web-dist/__next._tree.txt +2 -2
- package/dist/web-dist/_next/static/chunks/app/chat/page-52a6bd7bcba80f13.js +34 -0
- package/dist/web-dist/_next/static/css/695ca1bf036a1d5f.css +1 -0
- package/dist/web-dist/_not-found/__next._full.txt +2 -2
- package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web-dist/_not-found/__next._tree.txt +2 -2
- package/dist/web-dist/_not-found/index.html +1 -1
- package/dist/web-dist/_not-found/index.txt +2 -2
- package/dist/web-dist/chat/__next._full.txt +3 -3
- package/dist/web-dist/chat/__next._tree.txt +2 -2
- package/dist/web-dist/chat/__next.chat.__PAGE__.txt +3 -3
- package/dist/web-dist/chat/index.html +1 -1
- package/dist/web-dist/chat/index.txt +3 -3
- package/dist/web-dist/index.html +1 -1
- package/dist/web-dist/index.txt +2 -2
- package/dist/web-dist/operator/__next._full.txt +2 -2
- package/dist/web-dist/operator/__next._tree.txt +2 -2
- package/dist/web-dist/operator/__next.operator.__PAGE__.txt +2 -2
- package/dist/web-dist/operator/index.html +1 -1
- package/dist/web-dist/operator/index.txt +2 -2
- package/package.json +1 -1
- package/dist/web-dist/_next/static/chunks/app/chat/page-ab036ea25d23b1ee.js +0 -30
- package/dist/web-dist/_next/static/css/5295df1ca5e44779.css +0 -1
- /package/dist/web-dist/_next/static/{gwoBwxvzaJ6JerUVTkuz1 → H07nP7g1flHWQqLOgp3e-}/_buildManifest.js +0 -0
- /package/dist/web-dist/_next/static/{gwoBwxvzaJ6JerUVTkuz1 → H07nP7g1flHWQqLOgp3e-}/_ssgManifest.js +0 -0
package/dist/generator.js
CHANGED
|
@@ -75,7 +75,7 @@ function generateInstanceFiles(options) {
|
|
|
75
75
|
const instanceName = options.name || 'my-siduri';
|
|
76
76
|
const instanceId = options.id || 'default';
|
|
77
77
|
const coreVersion = options.coreVersion || '^2.0.16';
|
|
78
|
-
const cliVersion = options.cliVersion || '^2.0.
|
|
78
|
+
const cliVersion = options.cliVersion || '^2.0.40';
|
|
79
79
|
const canonicalOrder = ['brain', 'memory', 'knowledge', 'behavior', 'voice', 'body', 'mouth', 'hands', 'vision', 'ear', 'observation'];
|
|
80
80
|
const manifests = [...options.selectedManifests].sort((a, b) => {
|
|
81
81
|
const idxA = canonicalOrder.indexOf(a.organType);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ const doctor_1 = require("./doctor");
|
|
|
61
61
|
const db_1 = require("./db");
|
|
62
62
|
const configurators_1 = require("./configurators");
|
|
63
63
|
const execFile = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
64
|
-
exports.CLI_VERSION = '2.0.
|
|
64
|
+
exports.CLI_VERSION = '2.0.40';
|
|
65
65
|
const colors_1 = require("./colors");
|
|
66
66
|
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return colors_1.colors; } });
|
|
67
67
|
function printHeader() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="h-full antialiased dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="h-full antialiased dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="stylesheet" href="/_next/static/css/695ca1bf036a1d5f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f73cedc256be153e.js"/><script src="/_next/static/chunks/563b947f-8e2871a2ab7cd91e.js" async=""></script><script src="/_next/static/chunks/136-1d10af93b770a1c8.js" async=""></script><script src="/_next/static/chunks/main-app-9e6a144626e5a5b9.js" async=""></script><link rel="preload" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap" as="style"/><meta name="robots" content="noindex"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0b0b0e"/><title>Siduri — Local-First Companion</title><meta name="description" content="Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."/><link rel="icon" href="/favicon.ico?7715e5163ea8ac02" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/favicon.ico"/><link rel="icon" href="/favicon.svg" type="image/svg+xml"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap" rel="stylesheet"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-f73cedc256be153e.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8766,[],\"\"]\n3:I[356,[],\"\"]\n4:I[5127,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5127,[],\"ViewportBoundary\"]\na:I[5127,[],\"MetadataBoundary\"]\nc:I[6886,[],\"default\",1]\n:HL[\"/_next/static/css/695ca1bf036a1d5f.css\",\"style\"]\n:HL[\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500\u0026family=Noto+Sans+JP:wght@400;500;700\u0026family=Noto+Serif+JP:wght@400;500;700\u0026display=swap\",\"style\"]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/695ca1bf036a1d5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full antialiased dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500\u0026family=Noto+Sans+JP:wght@400;500;700\u0026family=Noto+Serif+JP:wght@400;500;700\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"H07nP7g1flHWQqLOgp3e-\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0b0b0e\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[3366,[],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Siduri — Local-First Companion\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?7715e5163ea8ac02\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"5\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\"}],[\"$\",\"$Ld\",\"6\",{}]]\n"])</script></body></html>
|
package/dist/web-dist/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="h-full antialiased dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="h-full antialiased dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="stylesheet" href="/_next/static/css/695ca1bf036a1d5f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f73cedc256be153e.js"/><script src="/_next/static/chunks/563b947f-8e2871a2ab7cd91e.js" async=""></script><script src="/_next/static/chunks/136-1d10af93b770a1c8.js" async=""></script><script src="/_next/static/chunks/main-app-9e6a144626e5a5b9.js" async=""></script><link rel="preload" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap" as="style"/><meta name="robots" content="noindex"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0b0b0e"/><title>Siduri — Local-First Companion</title><meta name="description" content="Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."/><link rel="icon" href="/favicon.ico?7715e5163ea8ac02" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/favicon.ico"/><link rel="icon" href="/favicon.svg" type="image/svg+xml"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap" rel="stylesheet"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-f73cedc256be153e.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8766,[],\"\"]\n3:I[356,[],\"\"]\n4:I[5127,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5127,[],\"ViewportBoundary\"]\na:I[5127,[],\"MetadataBoundary\"]\nc:I[6886,[],\"default\",1]\n:HL[\"/_next/static/css/695ca1bf036a1d5f.css\",\"style\"]\n:HL[\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500\u0026family=Noto+Sans+JP:wght@400;500;700\u0026family=Noto+Serif+JP:wght@400;500;700\u0026display=swap\",\"style\"]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/695ca1bf036a1d5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full antialiased dark\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500\u0026family=Noto+Sans+JP:wght@400;500;700\u0026family=Noto+Serif+JP:wght@400;500;700\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"H07nP7g1flHWQqLOgp3e-\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0b0b0e\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[3366,[],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Siduri — Local-First Companion\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?7715e5163ea8ac02\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"5\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\"}],[\"$\",\"$Ld\",\"6\",{}]]\n"])</script></body></html>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
2:I[7443,["974","static/chunks/app/page-fc4bf56cf33ae27b.js"],""]
|
|
3
3
|
:HL["/logo-circle.svg","image"]
|
|
4
4
|
a:X
|
|
5
|
-
0:{"buildId":"
|
|
5
|
+
0:{"buildId":"H07nP7g1flHWQqLOgp3e-","data":[{"rsc":["$","$1","c",{"children":[["$","div",null,{"className":"home-page bg-[#09090c] min-h-screen text-[var(--siduri-text-primary)] font-sans","children":[["$","header",null,{"className":"home-nav","children":["$","div",null,{"className":"home-container home-nav-inner flex items-center justify-between py-3 sm:py-4","children":[["$","$L2",null,{"href":"/","className":"brand-link flex items-center gap-2","aria-label":"Siduri Home","children":[["$","img",null,{"src":"/logo-circle.svg","alt":"Siduri-X Logo","className":"w-6 h-6 rounded-full shrink-0","width":24,"height":24}],["$","span",null,{"className":"font-bold tracking-widest text-sm","children":"SIDURI-X"}]]}],["$","nav",null,{"className":"nav-links hidden sm:flex gap-6 text-sm text-[var(--siduri-text-muted)]","aria-label":"Main Navigation","children":[["$","$L2",null,{"href":"/chat","className":"hover:text-[var(--siduri-text-primary)] transition-colors","children":"Chat"}],["$","$L2",null,{"href":"/operator","className":"hover:text-[var(--siduri-text-primary)] transition-colors","children":"Operator Console"}]]}],["$","div",null,{"className":"flex items-center gap-3","children":["$","$L2",null,{"href":"/chat","className":"nav-cta inline-flex items-center gap-1.5 text-xs font-mono border border-[var(--siduri-border-subtle)] px-3 sm:px-4 py-2 rounded-full hover:bg-[var(--siduri-surface)] transition-all","children":[["$","span",null,{"children":"Chat"}]," ",["$","svg",null,{"width":12,"height":12,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round","aria-hidden":"true","children":[["$","line",null,{"x1":"5","y1":"12","x2":"19","y2":"12"}],["$","polyline",null,{"points":"12 5 19 12 12 19"}]]}]]}]}]]}]}],["$","main",null,{"children":[["$","section",null,{"className":"py-16 sm:py-24 md:py-32 border-b border-[var(--siduri-border-subtle)] relative overflow-hidden","children":["$","div",null,{"className":"home-container relative z-10 text-center flex flex-col items-center","children":[["$","div",null,{"className":"inline-flex items-center gap-2 px-3 py-1 rounded-full border border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-low)] text-[var(--siduri-ember-light)] text-[10px] font-mono tracking-widest uppercase mb-6 sm:mb-8 text-center max-w-full","children":[["$","span",null,{"className":"w-1.5 h-1.5 rounded-full bg-[var(--siduri-online)] shadow-[0_0_8px_rgba(127,199,154,0.6)] shrink-0"}],["$","span",null,{"className":"truncate","children":"Standalone Companion · Version 1.0"}]]}],["$","h1",null,{"className":"text-3xl sm:text-5xl md:text-6xl font-normal font-serif text-[var(--siduri-text-primary)] tracking-tight leading-[1.2] sm:leading-[1.15] mb-6 max-w-4xl px-2","children":"A companion grown from memory, powered by modular cognition."}],["$","p",null,{"className":"text-sm sm:text-lg text-[var(--siduri-text-secondary)] font-sans leading-relaxed mb-8 sm:mb-10 max-w-2xl font-light px-2","children":"Siduri-X is an intelligent companion designed with authoritative memory, atomic behavioral gating, and a strict 10-organ architecture. She starts as a blank slate and forms her identity entirely through your interactions."}],["$","div",null,{"className":"flex flex-col sm:flex-row justify-center items-stretch sm:items-center gap-3 sm:gap-4 w-full max-w-md sm:max-w-none px-4","children":[["$","$L2",null,{"href":"/chat","className":"inline-flex justify-center items-center gap-3 px-6 py-3.5 rounded-xl bg-[var(--siduri-ember)] text-[#1b1619] font-sans font-semibold text-sm tracking-wide transition-all hover:brightness-110 shadow-[0_4px_20px_rgba(217,154,104,0.2)]","children":["Launch Companion",["$","svg",null,{"width":16,"height":16,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round","aria-hidden":"true","children":[["$","line",null,{"x1":"5","y1":"12","x2":"19","y2":"12"}],["$","polyline",null,{"points":"12 5 19 12 12 19"}]]}]]}],"$L3"]}]]}]}],"$L4","$L5","$L6"]}],"$L7"]}],null,"$L8"]}],"isPartial":"$@9","staleTime":"$a","varyParams":null},{"rsc":"$Lb","isPartial":"$@c","staleTime":"$a","varyParams":null},{"rsc":"$Ld","isPartial":"$@e","staleTime":"$a","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@f","rootVaryParams":null,"needsRuntimeRequest":"$@10"}
|
|
6
6
|
15:I[5127,[],"OutletBoundary"]
|
|
7
7
|
16:"$Sreact.suspense"
|
|
8
8
|
18:I[5127,[],"ViewportBoundary"]
|
|
@@ -10,7 +10,7 @@ a:X
|
|
|
10
10
|
1a:I[3366,[],"IconMark"]
|
|
11
11
|
1b:I[8766,[],""]
|
|
12
12
|
1c:I[356,[],""]
|
|
13
|
-
:HL["/_next/static/css/
|
|
13
|
+
:HL["/_next/static/css/695ca1bf036a1d5f.css","style"]
|
|
14
14
|
:HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
|
|
15
15
|
3:["$","$L2",null,{"href":"/operator","className":"inline-flex justify-center items-center gap-2.5 px-6 py-3.5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] text-[var(--siduri-text-primary)] font-sans font-medium text-sm transition-all hover:border-[var(--siduri-border-ember)] hover:bg-[var(--siduri-tint-low)]","children":[["$","svg",null,{"width":14,"height":14,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round","className":"shrink-0","aria-hidden":"true","children":["$","path",null,{"d":"M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}]}],"Operator Console"]}]
|
|
16
16
|
4:["$","section",null,{"className":"py-20 md:py-28 border-b border-[var(--siduri-border-subtle)] bg-[#0e0e12]","children":["$","div",null,{"className":"home-container","children":[["$","div",null,{"className":"mb-14 text-center max-w-3xl mx-auto","children":[["$","p",null,{"className":"text-[10px] font-mono uppercase tracking-widest text-[var(--siduri-ember)] mb-2","children":"Decoupled Philosophy"}],["$","h2",null,{"className":"text-2xl sm:text-3xl font-serif font-normal text-[var(--siduri-text-primary)] mb-4","children":"The 10-Organ Architecture"}],["$","p",null,{"className":"text-sm text-[var(--siduri-text-secondary)] leading-relaxed","children":"Siduri is not a chatbot. She is a cognition runtime composed of independent organs. Every decision originates from the Brain, while other organs perceive, remember, act, and embody."}]]}],["$","div",null,{"className":"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-4","children":[["$","div","Brain",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Brain"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Cognition, planning, and authoritative decision making."}]]}],["$","div","Memory",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Memory"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"SQLite FTS5 authoritative storage of verified claims and episodic memory."}]]}],["$","div","Behavior",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Behavior"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Atomic directive state machine and personality projection."}]]}],["$","div","Knowledge",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Knowledge"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"External factual context and verifiable E-compatible packs."}]]}],["$","div","Hands",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Hands"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Tool execution and strict cryptographic action policy capabilities."}]]}],["$","div","Ear",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Ear"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Audio transcription, perception, and sensory input ingestion."}]]}],"$L11","$L12","$L13","$L14"]}]]}]}]
|
|
@@ -19,7 +19,7 @@ a:X
|
|
|
19
19
|
7:["$","footer",null,{"className":"py-14 border-t border-[var(--siduri-border-subtle)] bg-[#0e0e12]","children":["$","div",null,{"className":"home-container flex flex-col sm:flex-row items-center justify-between gap-6","children":[["$","div",null,{"className":"flex items-center gap-3","children":[["$","img",null,{"src":"/logo-circle.svg","alt":"Siduri-X Logo","className":"w-5 h-5 rounded-full shrink-0","width":20,"height":20}],["$","span",null,{"className":"font-bold tracking-widest text-xs text-[var(--siduri-text-primary)]","children":"SIDURI-X"}]]}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-dim)] font-sans text-center sm:text-left","children":"Local-first AI companion framework."}],["$","div",null,{"className":"flex items-center gap-5 text-xs text-[var(--siduri-text-muted)]","children":[["$","$L2",null,{"href":"/chat","className":"hover:text-[var(--siduri-text-primary)]","children":"Chat"}],["$","$L2",null,{"href":"/operator","className":"hover:text-[var(--siduri-text-primary)]","children":"Operator"}]]}]]}]}]
|
|
20
20
|
8:["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}]
|
|
21
21
|
b:["$","$1","h",{"children":[null,["$","$L18",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#0b0b0e"}]]}],["$","div",null,{"hidden":true,"children":["$","$L19",null,{"children":["$","$16",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Siduri — Local-First Companion"}],["$","meta","1",{"name":"description","content":"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?7715e5163ea8ac02","type":"image/x-icon","sizes":"16x16"}],["$","link","3",{"rel":"icon","href":"/favicon.ico"}],["$","link","4",{"rel":"icon","href":"/favicon.svg","type":"image/svg+xml"}],["$","link","5",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L1a","6",{}]]}]}]}],null]}]
|
|
22
|
-
d:["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/
|
|
22
|
+
d:["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/695ca1bf036a1d5f.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$L1b",null,{"parallelRouterKey":"children","template":["$","$L1c",null,{}],"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."}]}]]}]}]],[]]}]}]]}]]}]
|
|
23
23
|
11:["$","div","Vision",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Vision"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Visual observation, cropping, and OCR interpretation."}]]}]
|
|
24
24
|
12:["$","div","Voice",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Voice"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Queued speech synthesis (Edge-TTS, Kokoro, Piper, VOICEVOX) and auditory expression."}]]}]
|
|
25
25
|
13:["$","div","Body",{"className":"p-4 sm:p-5 rounded-xl border border-[var(--siduri-border-subtle)] bg-[var(--siduri-surface)] transition-all hover:border-[var(--siduri-border-ember)]","children":[["$","h3",null,{"className":"text-sm font-bold font-mono text-[var(--siduri-ember-light)] mb-2","children":"Body"}],["$","p",null,{"className":"text-xs text-[var(--siduri-text-secondary)] leading-relaxed","children":"Renderer-agnostic avatar expression (Live2D) and embodiment."}]]}]
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
3:I[356,[],""]
|
|
4
4
|
4:I[7443,["974","static/chunks/app/page-fc4bf56cf33ae27b.js"],""]
|
|
5
5
|
10:I[6886,[],"default",1]
|
|
6
|
-
:HL["/_next/static/css/
|
|
6
|
+
:HL["/_next/static/css/695ca1bf036a1d5f.css","style"]
|
|
7
7
|
:HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
|
|
8
8
|
:HL["/logo-circle.svg","image"]
|
|
9
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/
|
|
9
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/695ca1bf036a1d5f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",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":[["$","$1","c",{"children":[["$","div",null,{"className":"home-page bg-[#09090c] min-h-screen text-[var(--siduri-text-primary)] font-sans","children":[["$","header",null,{"className":"home-nav","children":["$","div",null,{"className":"home-container home-nav-inner flex items-center justify-between py-3 sm:py-4","children":[["$","$L4",null,{"href":"/","className":"brand-link flex items-center gap-2","aria-label":"Siduri Home","children":[["$","img",null,{"src":"/logo-circle.svg","alt":"Siduri-X Logo","className":"w-6 h-6 rounded-full shrink-0","width":24,"height":24}],["$","span",null,{"className":"font-bold tracking-widest text-sm","children":"SIDURI-X"}]]}],["$","nav",null,{"className":"nav-links hidden sm:flex gap-6 text-sm text-[var(--siduri-text-muted)]","aria-label":"Main Navigation","children":[["$","$L4",null,{"href":"/chat","className":"hover:text-[var(--siduri-text-primary)] transition-colors","children":"Chat"}],["$","$L4",null,{"href":"/operator","className":"hover:text-[var(--siduri-text-primary)] transition-colors","children":"Operator Console"}]]}],["$","div",null,{"className":"flex items-center gap-3","children":["$","$L4",null,{"href":"/chat","className":"nav-cta inline-flex items-center gap-1.5 text-xs font-mono border border-[var(--siduri-border-subtle)] px-3 sm:px-4 py-2 rounded-full hover:bg-[var(--siduri-surface)] transition-all","children":[["$","span",null,{"children":"Chat"}]," ",["$","svg",null,{"width":12,"height":12,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round","className":"$undefined","aria-hidden":"true","children":[["$","line",null,{"x1":"5","y1":"12","x2":"19","y2":"12"}],["$","polyline",null,{"points":"12 5 19 12 12 19"}]]}]]}]}]]}]}],["$","main",null,{"children":[["$","section",null,{"className":"py-16 sm:py-24 md:py-32 border-b border-[var(--siduri-border-subtle)] relative overflow-hidden","children":["$","div",null,{"className":"home-container relative z-10 text-center flex flex-col items-center","children":[["$","div",null,{"className":"inline-flex items-center gap-2 px-3 py-1 rounded-full border border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-low)] text-[var(--siduri-ember-light)] text-[10px] font-mono tracking-widest uppercase mb-6 sm:mb-8 text-center max-w-full","children":["$L5","$L6"]}],"$L7","$L8","$L9"]}]}],"$La","$Lb","$Lc"]}],"$Ld"]}],null,"$Le"]}],{},null,false,null]},null,false,null],"$Lf",false]],"m":"$undefined","G":["$10",[]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"H07nP7g1flHWQqLOgp3e-"}
|
|
10
10
|
15:I[5127,[],"OutletBoundary"]
|
|
11
11
|
16:"$Sreact.suspense"
|
|
12
12
|
18:I[5127,[],"ViewportBoundary"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:HL["/_next/static/css/
|
|
1
|
+
:HL["/_next/static/css/695ca1bf036a1d5f.css","style"]
|
|
2
2
|
:HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
|
|
3
3
|
:HL["/logo-circle.svg","image"]
|
|
4
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}},"staleTime":300,"buildId":"
|
|
4
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}},"staleTime":300,"buildId":"H07nP7g1flHWQqLOgp3e-"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[457],{2186:(e,t,s)=>{"use strict";s.d(t,{default:()=>C});var a=s(2184),i=s(276),r=s(3265);function n({onSelectPrompt:e,className:t="",companionName:s="your companion"}){return(0,a.jsxs)("div",{className:`chat-empty-state ${t}`,"data-testid":"preferences-starter",children:[(0,a.jsx)("div",{className:"siduri-orb",children:"✦"}),(0,a.jsxs)("h2",{children:["Teach ",s," your preferences."]}),(0,a.jsx)("p",{children:"Choose a starting point, replace the blanks, and send it. Nothing becomes memory until you approve the receipt."}),(0,a.jsxs)("div",{className:"starter-prompts onboarding-prompts",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>e("Call me [preferred name]."),children:[(0,a.jsx)("span",{children:"Identity"}),"Preferred name or title"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>e("My timezone is [timezone] and my preferred language is [language]."),children:[(0,a.jsx)("span",{children:"Localization"}),"Timezone and language"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>e("My preferred response style is [concise / detailed / technical]."),children:[(0,a.jsx)("span",{children:"Response style"}),"Tone and verbosity"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>e("I am interested in [topics or domains of interest]."),children:[(0,a.jsx)("span",{children:"Knowledge"}),"Topics of interest"]})]}),(0,a.jsxs)("p",{className:"onboarding-privacy",children:["Teach ",s," preferences explicitly. Information is stored in private memory only after you approve the receipt."]})]})}function o(e){return"number"!=typeof e||isNaN(e)||e<0?0:e>1?1:e}class l{constructor(e){this.expression="neutral",this.action="idle",this.state="idle",this.lipSyncValue=0,this.reducedMotion=!1,this.actionStartTime=0,this.stateStartTime=0,this.lastUpdateTime=Date.now(),e&&this.updateConfig(e)}updateConfig(e){e.expression&&e.expression!==this.expression&&(this.expression=e.expression),e.action&&e.action!==this.action&&(this.action=e.action,this.actionStartTime=Date.now()),e.state&&e.state!==this.state&&(this.state=e.state,this.stateStartTime=Date.now()),void 0!==e.speechId&&(this.speechId=e.speechId),void 0!==e.lipSyncValue&&(this.lipSyncValue=o(e.lipSyncValue)),void 0!==e.reducedMotion&&(this.reducedMotion=e.reducedMotion)}setReducedMotion(e){this.reducedMotion=e}setExpression(e){this.expression=e}setAction(e){this.action=e,this.actionStartTime=Date.now()}setState(e){this.state=e,this.stateStartTime=Date.now()}setLipSync(e){this.lipSyncValue=o(e)}calculateFrameParameters(e=Date.now()){this.lastUpdateTime,this.lastUpdateTime=e;let t=this.reducedMotion?.2:(Math.sin(e/1800)+1)*.5,s=this.reducedMotion?0:2.5*Math.sin(e/2400),a=this.reducedMotion?0:1.8*Math.cos(e/3200),i=this.reducedMotion?0:1.2*Math.sin(e/4e3),r=function(e){if(!e)return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1};switch(e.toLowerCase().trim()){case"nod":return{angleX:0,angleY:-12,angleZ:2,bodyAngleX:0,eyeBallX:0,eyeBallY:-.2,speed:2.5};case"wave":return{angleX:8,angleY:4,angleZ:-5,bodyAngleX:5,eyeBallX:.2,eyeBallY:.1,speed:1.8};case"listen":return{angleX:-5,angleY:2,angleZ:4,bodyAngleX:-2,eyeBallX:.1,eyeBallY:.1,speed:1};case"talk":return{angleX:2,angleY:-2,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1.5};default:return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1}}}(this.action),n=(e-this.actionStartTime)/1e3,l=0,c=0,d=0,m=0;this.reducedMotion?"nod"===this.action?c=.5*r.angleY:"wave"===this.action?(l=.5*r.angleX,m=.5*r.bodyAngleX):"listen"===this.action&&(d=.5*r.angleZ,l=.5*r.angleX):"nod"===this.action?c=Math.sin(n*Math.PI*3)*r.angleY:"wave"===this.action?(d=Math.sin(n*Math.PI*2.4)*r.angleZ,l=r.angleX,m=r.bodyAngleX):"listen"===this.action?(d=r.angleZ,l=r.angleX):"talk"===this.action&&(c=2*Math.sin(4*n));let u=0;if("speaking"===this.state){let t=function(e,t){if("number"==typeof t&&!isNaN(t)&&t>0)return o(t);let s=e/1e3;return o(Math.max(0,.45*Math.sin(14*s)+.25*Math.sin(22*s)+.2*Math.sin(8*s)+.1))}(e,this.lipSyncValue);u=this.reducedMotion?.6*t:t}let h=e%4e3/4e3,p=1;return h>.95&&(p=Math.abs(Math.sin((h-.95)/.05*Math.PI-Math.PI/2))),{mouthOpenY:u,angleX:s+l,angleY:a+c,angleZ:i+d,bodyAngleX:m,breath:t,eyeOpenL:p,eyeOpenR:p}}reset(){this.expression="neutral",this.action="idle",this.state="idle",this.lipSyncValue=0,this.speechId=void 0}}async function c(e="/live2d/live2dcubismcore.min.js"){return window.Live2DCubismCore?window.Live2DCubismCore:new Promise((t,s)=>{let a=document.querySelector(`script[src="${e}"]`);if(a)return window.Live2DCubismCore?t(window.Live2DCubismCore):(a.addEventListener("load",()=>t(window.Live2DCubismCore)),void a.addEventListener("error",t=>s(Error(`Failed to load Cubism Core from ${e}: ${t}`))));let i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):s(Error("Live2DCubismCore global not found after script load"))},i.onerror=()=>{let e="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js";console.warn(`[Live2D] Failed to load local Cubism Core, attempting fallback: ${e}`);let a=document.createElement("script");a.src=e,a.async=!0,a.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):s(Error("Live2DCubismCore global not found after fallback load"))},a.onerror=e=>s(Error(`Failed to load Cubism Core from both local and remote sources: ${e}`)),document.head.appendChild(a)},document.head.appendChild(i)})}async function d(e){let t=e.lastIndexOf("/"),s=-1!==t?e.slice(0,t+1):"",a=await fetch(e);if(!a.ok)throw Error(`Failed to fetch model manifest from ${e} (${a.status})`);let i=await a.json();if(!i.FileReferences||!i.FileReferences.Moc)throw Error(`Invalid model3.json: missing Moc file reference in ${e}`);let r=s+i.FileReferences.Moc,n=await fetch(r);if(!n.ok)throw Error(`Failed to fetch .moc3 file from ${r} (${n.status})`);let o=await n.arrayBuffer(),l=(i.FileReferences.Textures||[]).map(e=>s+e),c=await Promise.all(l.map(e=>new Promise((t,s)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>t(a),a.onerror=t=>s(Error(`Failed to load texture from ${e}`)),a.src=e}))),d=new Map;return i.FileReferences.Expressions&&i.FileReferences.Expressions.length>0&&await Promise.all(i.FileReferences.Expressions.map(async e=>{try{let t=s+e.File,a=await fetch(t);if(a.ok){let t=await a.json();d.set(e.File,t),e.Name&&d.set(e.Name,t)}}catch{}})),{model3:i,mocBuffer:o,textures:c,expressions:d,basePath:s}}let m=`
|
|
2
|
+
attribute vec2 a_position;
|
|
3
|
+
attribute vec2 a_texCoord;
|
|
4
|
+
uniform mat4 u_matrix;
|
|
5
|
+
varying vec2 v_texCoord;
|
|
6
|
+
void main() {
|
|
7
|
+
gl_Position = u_matrix * vec4(a_position.x, a_position.y, 0.0, 1.0);
|
|
8
|
+
v_texCoord = vec2(a_texCoord.x, 1.0 - a_texCoord.y);
|
|
9
|
+
}
|
|
10
|
+
`,u=`
|
|
11
|
+
precision mediump float;
|
|
12
|
+
uniform sampler2D u_texture;
|
|
13
|
+
uniform float u_opacity;
|
|
14
|
+
varying vec2 v_texCoord;
|
|
15
|
+
void main() {
|
|
16
|
+
vec4 color = texture2D(u_texture, v_texCoord);
|
|
17
|
+
gl_FragColor = color * u_opacity;
|
|
18
|
+
}
|
|
19
|
+
`,h=`
|
|
20
|
+
precision mediump float;
|
|
21
|
+
uniform sampler2D u_texture;
|
|
22
|
+
varying vec2 v_texCoord;
|
|
23
|
+
void main() {
|
|
24
|
+
vec4 color = texture2D(u_texture, v_texCoord);
|
|
25
|
+
if (color.a < 0.1) {
|
|
26
|
+
discard;
|
|
27
|
+
}
|
|
28
|
+
gl_FragColor = vec4(1.0);
|
|
29
|
+
}
|
|
30
|
+
`;function p(e,t,s){let a=e.createShader(t);if(!a)throw Error("Failed to create shader");if(e.shaderSource(a,s),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS)){let t=e.getShaderInfoLog(a);throw e.deleteShader(a),Error(`Shader compilation error: ${t}`)}return a}class x{constructor(e){this.gl=null,this.program=null,this.maskProgram=null,this.vertexBuffer=null,this.uvBuffer=null,this.indexBuffer=null,this.aPositionLocation=-1,this.aTexCoordLocation=-1,this.uMatrixLocation=null,this.uTextureLocation=null,this.uOpacityLocation=null,this.maskAPositionLocation=-1,this.maskATexCoordLocation=-1,this.maskUMatrixLocation=null,this.maskUTextureLocation=null,this.textures=[],this.moc=null,this.model=null,this.core=null,this.paramIndices=new Map,this.isDisposed=!1,this.modelBounds={minX:-.39,maxX:.4,minY:-.98,maxY:.18,width:.79,height:1.16,centerX:.006,centerY:-.4},this.canvas=e}initialize(e,t){this.core=e;let s={alpha:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,antialias:!0,stencil:!0},a=this.canvas.getContext("webgl",s)||this.canvas.getContext("experimental-webgl",s)||this.canvas.getContext("webgl2",s);if(!a)throw Error("WebGL is not supported in this browser environment");this.gl=a;let i=p(a,a.VERTEX_SHADER,m),r=p(a,a.FRAGMENT_SHADER,u),n=a.createProgram();if(!n)throw Error("Failed to create WebGL program");if(a.attachShader(n,i),a.attachShader(n,r),a.linkProgram(n),!a.getProgramParameter(n,a.LINK_STATUS))throw Error(`Program link error: ${a.getProgramInfoLog(n)}`);this.program=n,this.aPositionLocation=a.getAttribLocation(n,"a_position"),this.aTexCoordLocation=a.getAttribLocation(n,"a_texCoord"),this.uMatrixLocation=a.getUniformLocation(n,"u_matrix"),this.uTextureLocation=a.getUniformLocation(n,"u_texture"),this.uOpacityLocation=a.getUniformLocation(n,"u_opacity");let o=p(a,a.FRAGMENT_SHADER,h),l=a.createProgram();if(!l)throw Error("Failed to create Mask WebGL program");if(a.attachShader(l,i),a.attachShader(l,o),a.linkProgram(l),!a.getProgramParameter(l,a.LINK_STATUS))throw Error(`Mask Program link error: ${a.getProgramInfoLog(l)}`);if(this.maskProgram=l,this.maskAPositionLocation=a.getAttribLocation(l,"a_position"),this.maskATexCoordLocation=a.getAttribLocation(l,"a_texCoord"),this.maskUMatrixLocation=a.getUniformLocation(l,"u_matrix"),this.maskUTextureLocation=a.getUniformLocation(l,"u_texture"),this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1),this.textures=t.textures.map(e=>{let t=a.createTexture();if(!t)throw Error("Failed to create WebGL texture");return a.bindTexture(a.TEXTURE_2D,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,e),a.generateMipmap(a.TEXTURE_2D),t}),this.moc=e.Moc.fromArrayBuffer(t.mocBuffer),!this.moc)throw Error("Failed to create Live2D Moc from ArrayBuffer");if(this.model=e.Model.fromMoc(this.moc),!this.model)throw Error("Failed to create Live2D Model from Moc");let c=this.model.parameters.ids;for(let e=0;e<c.length;e++)this.paramIndices.set(c[e],e);this.initializeNeutralMouth(),this.model.update(),this.calculateModelBounds()}initializeNeutralMouth(){this.model&&(this.setParamDirect("ParamMouthOpenY",0),this.setParamDirect("ParamMouthForm",0))}setParamDirect(e,t){let s=this.paramIndices.get(e);if(void 0!==s&&this.model){let e=this.model.parameters.minimumValues[s],a=this.model.parameters.maximumValues[s];this.model.parameters.values[s]=Math.max(e,Math.min(a,t))}}calculateModelBounds(){if(!this.model)return;let e=this.model.drawables,t=e.count,s=1/0,a=-1/0,i=1/0,r=-1/0;for(let n=0;n<t;n++){let t=e.vertexPositions[n];if(t&&0!==t.length)for(let e=0;e<t.length;e+=2){let n=t[e],o=t[e+1];n<s&&(s=n),n>a&&(a=n),o<i&&(i=o),o>r&&(r=o)}}s!==1/0&&a!==-1/0&&i!==1/0&&r!==-1/0&&(this.modelBounds={minX:s,maxX:a,minY:i,maxY:r,width:a-s,height:r-i,centerX:(s+a)/2,centerY:(i+r)/2})}getModelBounds(){return{...this.modelBounds}}setParam(e,t,s=1){let a=this.paramIndices.get(e);if(void 0!==a&&this.model){let e=this.model.parameters.values[a],i=Math.max(this.model.parameters.minimumValues[a],Math.min(this.model.parameters.maximumValues[a],t));this.model.parameters.values[a]=e+(i-e)*s}}render(e,t=Date.now()){let s;if(this.isDisposed||!this.gl||!this.model||!this.program)return;let a=this.gl,i=this.canvas.width,r=this.canvas.height;if(0===i||0===r)return;let n=e.calculateFrameParameters(t);this.setParam("ParamAngleX",n.angleX,.2),this.setParam("ParamAngleY",n.angleY,.2),this.setParam("ParamAngleZ",n.angleZ,.2),this.setParam("ParamBodyAngleX",n.bodyAngleX,.15),this.setParam("ParamBreath",n.breath,.3),this.setParam("ParamEyeLOpen",n.eyeOpenL,.4),this.setParam("ParamEyeROpen",n.eyeOpenR,.4),this.setParam("ParamMouthOpenY",n.mouthOpenY,.35);let o=function(e){if(!e)return"neutral";switch(e.toLowerCase().trim()){case"surprised":return"face_aozame.exp3.json";case"concerned":case"thinking":return"eyes_zetubou.exp3.json";case"happy":return"hair_open.exp3.json";default:return"neutral"}}(e.expression);"face_aozame.exp3.json"===o?(this.setParam("Param10",1,.2),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"eyes_zetubou.exp3.json"===o?(this.setParam("Param9",1,.2),this.setParam("Param10",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"hair_open.exp3.json"===o?(this.setParam("Param11",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param12",0,.15)):"eye_color.exp3.json"===o?(this.setParam("Param12",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15)):(this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)),this.model.update(),a.viewport(0,0,i,r),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT|a.STENCIL_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.program);let l=i/r,c=this.modelBounds.width,d=this.modelBounds.height,m=this.modelBounds.centerX,u=this.modelBounds.centerY,h=(s=l>=c/d?1.84/d:1.84/c*l)/l,p=new Float32Array([h,0,0,0,0,s,0,0,0,0,1,0,-m*h,-u*s,0,1]);a.uniformMatrix4fv(this.uMatrixLocation,!1,p),a.uniform1i(this.uTextureLocation,0);let x=this.model.drawables,f=x.count,v=x.renderOrders,b=[];for(let e=0;e<f;e++)b.push(e);b.sort((e,t)=>v[e]-v[t]),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation);let g=(e,t)=>{let s=void 0!==t?t:x.opacities[e];if(s<=.001)return;let i=x.textureIndices[e],r=this.textures[i];if(!r)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,r),a.uniform1f(this.uOpacityLocation,s);let n=x.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aPositionLocation,2,a.FLOAT,!1,0,0);let o=x.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,o,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aTexCoordLocation,2,a.FLOAT,!1,0,0);let l=x.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,l,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,l.length,a.UNSIGNED_SHORT,0)},j=e=>{if(!this.maskProgram)return;a.useProgram(this.maskProgram),a.uniformMatrix4fv(this.maskUMatrixLocation,!1,p),a.uniform1i(this.maskUTextureLocation,0),a.enableVertexAttribArray(this.maskAPositionLocation),a.enableVertexAttribArray(this.maskATexCoordLocation);let t=x.textureIndices[e],s=this.textures[t];if(!s)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,s);let i=x.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,i,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskAPositionLocation,2,a.FLOAT,!1,0,0);let r=x.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,r,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskATexCoordLocation,2,a.FLOAT,!1,0,0);let n=x.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,n.length,a.UNSIGNED_SHORT,0),a.useProgram(this.program),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation)},y=-1;for(let e of b)if(!(x.opacities[e]<=.001))if(x.maskCounts[e]>0){let t=x.masks[e][0];t!==y&&(y=t,a.enable(a.STENCIL_TEST),a.stencilMask(255),a.clear(a.STENCIL_BUFFER_BIT),a.stencilFunc(a.ALWAYS,1,255),a.stencilOp(a.KEEP,a.KEEP,a.REPLACE),a.colorMask(!1,!1,!1,!1),j(t),a.colorMask(!0,!0,!0,!0)),a.stencilFunc(a.EQUAL,1,255),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),g(e)}else -1!==y&&(a.disable(a.STENCIL_TEST),y=-1),g(e);-1!==y&&a.disable(a.STENCIL_TEST)}dispose(){if(this.isDisposed=!0,this.gl){for(let e of this.textures)this.gl.deleteTexture(e);this.textures=[],this.vertexBuffer&&this.gl.deleteBuffer(this.vertexBuffer),this.uvBuffer&&this.gl.deleteBuffer(this.uvBuffer),this.indexBuffer&&this.gl.deleteBuffer(this.indexBuffer),this.program&&this.gl.deleteProgram(this.program)}this.model&&"function"==typeof this.model.release&&this.model.release(),this.moc&&"function"==typeof this.moc.release&&this.moc.release(),this.model=null,this.moc=null,this.gl=null}}function f({modelUrl:e,expression:t="neutral",action:s="idle",state:r="idle",speechId:n,lipSyncValue:o,durationMs:m,className:u="",onStatusChange:h}){let p=(0,i.useRef)(null),v=(0,i.useRef)(null),b=(0,i.useRef)(new l({expression:t,action:s,state:r,speechId:n,lipSyncValue:o,durationMs:m})),g=(0,i.useRef)(null),j=(0,i.useRef)(null),[y,N]=(0,i.useState)("loading"),[w,C]=(0,i.useState)(null),[k,P]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{b.current.setReducedMotion(e.matches)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,i.useEffect)(()=>{b.current.updateConfig({expression:t,action:s,state:r,speechId:n,lipSyncValue:o,durationMs:m})},[t,s,r,n,o,m]),(0,i.useEffect)(()=>{let t=!1,s=null;async function a(){if(v.current&&p.current){if(!e){N("error"),C("No Live2D model configured. Place model in assets/body/<name>/"),h?.("error","No Live2D model URL specified");return}N("loading"),h?.("loading"),C(null);try{let a=await c();if(t)return;let i=await d(e);if(t)return;let r=v.current;if(!r)return;let n=new x(r);n.initialize(a,i),g.current=n;let o=()=>{if(!p.current||!v.current)return;let e=p.current.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=Math.min(window.devicePixelRatio||1,2),s=Math.max(1,Math.floor(e.width*t)),a=Math.max(1,Math.floor(e.height*t));(v.current.width!==s||v.current.height!==a)&&(v.current.width=s,v.current.height=a)};o(),(s=new ResizeObserver(o)).observe(p.current);let l=()=>{t||(g.current&&g.current.render(b.current,performance.now()),j.current=requestAnimationFrame(l))};j.current=requestAnimationFrame(l),N("ready"),h?.("ready")}catch(s){if(t)return;let e=s?.message||"Failed to initialize Live2D avatar";console.warn("[AvatarCanvas] Initialization error:",s),N("error"),C("Avatar model unavailable or failed to load."),h?.("error",e)}}}a();let i=v.current,r=e=>{e.preventDefault(),console.warn("[AvatarCanvas] WebGL context lost"),j.current&&cancelAnimationFrame(j.current),N("error"),C("WebGL context lost.")},n=()=>{console.log("[AvatarCanvas] WebGL context restored, re-initializing..."),a()};return i&&(i.addEventListener("webglcontextlost",r,!1),i.addEventListener("webglcontextrestored",n,!1)),()=>{t=!0,j.current&&(cancelAnimationFrame(j.current),j.current=null),s&&s.disconnect(),i&&(i.removeEventListener("webglcontextlost",r),i.removeEventListener("webglcontextrestored",n)),g.current&&(g.current.dispose(),g.current=null)}},[e,k,h]),(0,a.jsxs)("div",{ref:p,"data-testid":"avatar-canvas-container",className:`relative w-full h-full min-h-0 flex items-center justify-center overflow-hidden bg-transparent ${u}`,"aria-label":"Live2D Companion Presence",children:[(0,a.jsx)("canvas",{ref:v,role:"img","data-testid":"avatar-webgl-canvas","aria-label":"Live2D companion presence",style:{width:"100%",height:"100%",display:"block"},className:`absolute inset-0 w-full h-full block transition-opacity duration-500 ${"ready"===y?"opacity-100":"opacity-0"}`}),"loading"===y&&(0,a.jsxs)("div",{role:"status","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-[#0b0b0e]/90 text-[var(--siduri-text-muted)]",children:[(0,a.jsx)("div",{className:"siduri-glyph w-10 h-10 text-base animate-pulse motion-reduce:animate-none",children:"✦"}),(0,a.jsx)("span",{className:"text-[11px] font-mono tracking-widest uppercase text-[var(--siduri-ember-light)]",children:"Initializing Presence..."})]}),"error"===y&&(0,a.jsxs)("div",{role:"alert","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center p-6 text-center bg-[#0b0b0e]/95 text-[var(--siduri-text-muted)]",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full border border-[var(--siduri-border-subtle)] grid place-items-center text-xs text-[var(--siduri-text-dim)] mb-2 font-mono",children:"!"}),(0,a.jsx)("p",{className:"text-xs font-sans text-[var(--siduri-text-secondary)] mb-1",children:w||"Avatar unavailable in this browser."}),(0,a.jsx)("span",{className:"text-[10px] font-mono text-[var(--siduri-text-dim)] mb-3",children:"Conversational text mode remains active"}),(0,a.jsx)("button",{type:"button",onClick:()=>P(e=>e+1),className:"px-3 py-1 text-[11px] font-mono tracking-wider uppercase rounded border border-[var(--siduri-border-subtle)] hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)] hover:text-[var(--siduri-text-primary)] transition-colors focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none","aria-label":"Retry avatar initialization",children:"Retry"})]})]})}var v=s(2914),b=s(8839);let g="siduri.chat.conversations.v1";function j(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function y(e){return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit"}).format(e)}function N(e){if("[interrupted]"===e.content)return{...e,content:"",interrupted:!0,interruptionReason:"interrupted"};if(e.content&&e.content.endsWith(" [interrupted]"))return{...e,content:e.content.slice(0,-14).trim(),interrupted:!0,interruptionReason:"interrupted"};if(e.content&&e.content.startsWith("I couldn’t reach the orchestrator. ")){let t=e.content.slice(35);return{...e,content:"",error:t}}return e}function w(e){switch(e){case"client_disconnect":return{label:"Disconnected",text:"Response stopped due to connection close.",hint:"The connection to the companion service closed prematurely."};case"user_stop":return{label:"Stopped",text:"Response stopped by user.",hint:"Generation was manually cancelled via the stop control."};case"user_barge_in":return{label:"Interrupted",text:"Response interrupted by new message.",hint:"Generation was cancelled because a new prompt was submitted."};case"timeout":return{label:"Timed Out",text:"Response timed out.",hint:"The request exceeded the allotted time limit before finishing."};default:return{label:"Interrupted",text:"Response was interrupted.",hint:e&&"interrupted"!==e?`Reason: ${e}`:void 0}}}function C(){let e,t,s,o,l,c,d,m,[u,h]=(0,i.useState)([]),[p,x]=(0,i.useState)(null),[C,k]=(0,i.useState)(""),[P,A]=(0,i.useState)("connecting"),[E,L]=(0,i.useState)(!1),[_,S]=(0,i.useState)(!1),[R,T]=(0,i.useState)(!1),[I,D]=(0,i.useState)(!1),[M,B]=(0,i.useState)(!1),[F,U]=(0,i.useState)(!1),[$,z]=(0,i.useState)(null),[O,X]=(0,i.useState)(void 0),[Y,W]=(0,i.useState)("hybrid"),[G,q]=(0,i.useState)("hybrid"),[Z,V]=(0,i.useState)("off"),[H,K]=(0,i.useState)("Siduri"),[J,Q]=(0,i.useState)(null),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(null),[ei,er]=(0,i.useState)({}),[en,eo]=(0,i.useState)(null),el=(0,i.useRef)(null),[ec,ed]=(0,i.useState)({}),[em,eu]=(0,i.useState)({}),[eh,ep]=(0,i.useState)(null),ex=(0,i.useRef)(null),ef=(0,i.useRef)(null),ev=(0,i.useRef)(null),eb=(0,i.useMemo)(()=>u.find(e=>e.id===p)??null,[p,u]);function eg(){return{id:j(),title:"New conversation",messages:[],updatedAt:Date.now()}}function ej(e,t){h(s=>s.map(s=>s.id===e?t(s):s))}async function ey(e){e.preventDefault();let t=C.trim();if(!t)return;if(/\[[^\]]+\]/.test(t))return void A("replace the blanks first");E&&ev.current&&(ev.current.abort("user_barge_in"),ev.current=null,(0,b.Uo)("default","user_barge_in"));let s=eb;s||(s=eg(),h(e=>[s,...e]),x(s.id));let a=s.messages.filter(e=>!("assistant"===e.role&&!e.content.trim()&&!e.error&&!e.interrupted)),i={id:j(),role:"user",content:t,createdAt:Date.now()},r=j(),n=[...a,i,{id:r,role:"assistant",content:"",createdAt:Date.now()}],o=0===s.messages.length?t.slice(0,42):s.title;ej(s.id,e=>({...e,title:o,messages:n,updatedAt:Date.now()})),k(""),L(!0),A("streaming");let l=new AbortController;ev.current=l;try{await (0,b.ZB)("/chat/stream",{id:"default",message:t,medium:"web",mode:Y,subtitleLanguage:"off"!==Z?Z:void 0,history:s.messages.slice(-20).map(e=>({role:e.role,content:e.content}))},{onStaged:e=>{e?.mode&&("casual"===e.mode||"teach"===e.mode||"hybrid"===e.mode)&&q(e.mode)},onAvatar:e=>{let t=e.speech_id;ef.current&&clearTimeout(ef.current),z({eventId:e.event_id,expression:e.expression||"neutral",action:e.action||"talk",state:"speaking",speechId:t,durationMs:e.durationMs});let s=e.durationMs||4500;ef.current=setTimeout(()=>{z(e=>e?{...e,state:"idle",action:"idle"}:null)},s)},onChunk:e=>{e.deltaText&&ej(s.id,t=>({...t,messages:t.messages.map(t=>t.id===r?{...t,content:t.content+e.deltaText}:t)})),(e.expression||e.action)&&z(t=>t?{...t,expression:e.expression||t.expression,action:e.action||t.action}:null)},onDone:e=>{e?.metadata?.mode&&("casual"===e.metadata.mode||"teach"===e.metadata.mode||"hybrid"===e.metadata.mode)&&q(e.metadata.mode);let t=e.response||{},a=e.metadata?.memory_proposals,i=e.metadata?.behavioral_proposals,n=t.citations||e.metadata?.citations||[],o=t.gate||e.metadata?.gate;ej(s.id,e=>({...e,messages:e.messages.map(e=>e.id===r?{...e,content:e.content||t.subtitle_en||t.subtitle_ja||"",subtitle:t.subtitle,subtitleLanguage:t.subtitle_language||("off"!==Z?Z:void 0),subtitles:t.subtitles,spokenJa:t.spoken_ja,evidenceIds:t.evidence_ids||(n.length>0?n.map(e=>e.evidence_id||e.evidenceId).filter(Boolean):void 0),citations:n.length>0?n:void 0,gate:o,memoryProposals:a,behavioralProposals:i}:e),updatedAt:Date.now()})),A("online")},onInterrupted:e=>{let t=e?.reason||l.signal.reason||"interrupted";ej(s.id,e=>{let s=e.messages.find(e=>e.id===r);return"user_barge_in"!==t||s&&s.content.trim()?{...e,messages:e.messages.map(e=>e.id===r?{...e,interrupted:!0,interruptionReason:"string"==typeof t?t:"interrupted"}:e),updatedAt:Date.now()}:{...e,messages:e.messages.filter(e=>e.id!==r),updatedAt:Date.now()}}),A("online")},onError:e=>{let t=e?.message||String(e)||"Unknown error";ej(s.id,e=>({...e,messages:e.messages.map(e=>e.id===r?{...e,error:t}:e),updatedAt:Date.now()})),A("offline")}},l.signal)}catch(e){if(!l.signal.aborted){let t=e?.message||String(e)||"Connection error";ej(s.id,e=>({...e,messages:e.messages.map(e=>e.id===r?{...e,error:t}:e),updatedAt:Date.now()})),A("offline")}}finally{ev.current===l&&(ev.current=null),L(!1)}}(0,i.useEffect)(()=>()=>{ef.current&&clearTimeout(ef.current),ev.current&&ev.current.abort("unmounted")},[]),(0,i.useEffect)(()=>{let e=function(){try{let e=JSON.parse(window.localStorage.getItem(g)??"[]");if(!Array.isArray(e))return[];return e.map(e=>({...e,messages:(e.messages||[]).map(N)}))}catch{return[]}}();h(e),x(e[0]?.id??null);try{let e=localStorage.getItem("siduri.chat.subtitleLanguage");e&&V(e)}catch{}S(!0),(0,b.Zq)("/health").then(async e=>{if(e.ok){let t=await e.json().catch(()=>({}));A("online"),t.organs?.body?.modelUrl?X(t.organs.body.modelUrl):(0,b.Zq)("/api/models/body").then(async e=>{if(e.ok){let t=(await e.json().catch(()=>({}))).models||[],s=t.find(e=>"default"!==e);s?X(`/assets/body/${s}/model.model3.json`):t.length>0&&"default"!==t[0]&&X(`/assets/body/${t[0]}/model.model3.json`)}}).catch(()=>{})}else A("online")}).catch(()=>A("offline")),(0,b.Zq)("/teach/identity").then(async e=>{if(e.ok){let t=await e.json().catch(()=>null);t&&t.name&&K(t.name)}else(0,b.Zq)("/me").then(async e=>{if(e.ok){let t=await e.json().catch(()=>null);t&&t.name&&K(t.name)}}).catch(()=>{})}).catch(()=>{}),(0,b.Zq)("/teach/detected-self").then(async e=>{if(e.ok){let t=await e.json().catch(()=>null);t&&t.detected&&(sessionStorage.getItem(`siduri.dismissedSelf:${t.filename}`)||Q(t))}}).catch(()=>{})},[]),(0,i.useEffect)(()=>{_&&window.localStorage.setItem(g,JSON.stringify(u))},[u,_]),(0,i.useEffect)(()=>{ex.current?.scrollTo({top:ex.current.scrollHeight,behavior:"smooth"})},[p,eb?.messages.length,E]);let eN=eb?.messages??[],ew=eN.at(-1)?.evidenceIds?.length??0;async function eC(e,t,s){if(eb)try{let a=await (0,b.B2)(`/memory/proposals/${s}`,{id:t,companionId:"default"}),i=a?.status||("approve"===s?"approved":"rejected");if("approve"===s){a?.name&&K(a.name);let s=eb.messages.find(t=>t.id===e),i=s?.memoryProposals?.find(e=>(e.proposal_id||e.id)===t),r=s?.memoryProposals?.find(e=>"name"===(e.predicate||"").toLowerCase()&&!(e.subject||"").toLowerCase().startsWith("actor:")&&"user"!==(e.subject||"").toLowerCase()&&"primary_user"!==(e.subject||"").toLowerCase()),n=(i?.subject||"").toLowerCase(),o=(i?.predicate||"").toLowerCase(),l=!n.startsWith("actor:")&&"user"!==n&&"primary_user"!==n&&"owner"!==n&&"creator"!==n;"name"===o&&l&&i?.value?K(i.value):r?.value&&K(r.value),(0,b.Zq)("/teach/identity").then(async e=>{if(e.ok){let t=await e.json().catch(()=>null);t?.name&&K(t.name)}}).catch(()=>{})}ej(eb.id,s=>({...s,messages:s.messages.map(s=>s.id===e&&s.memoryProposals?{...s,memoryProposals:s.memoryProposals.map(e=>(e.proposal_id||e.id)===t?{...e,status:i}:e)}:s)}))}catch(e){console.error("Failed to update memory proposal:",e)}}async function ek(e,t,s){if(eb)try{let a=await (0,b.B2)(`/memory/behavioral/${s}`,{id:t,companionId:"default"}),i=a?.status||("approve"===s?"active":"rejected");if("approve"===s){a?.name&&K(a.name);let s=eb.messages.find(t=>t.id===e),i=s?.behavioralProposals?.find(e=>(e.directive_id||e.id)===t),r=i?.directive||i?.value||i?.behavior?.instruction||"";if(r){let e=r.match(/^(?:address\s+companion\s+as|your\s+name\s+is|call\s+yourself|acknowledge\s+name\s+as|companion\s+name\s+is)\s+["“']?([^"”'.]+)["”']?/i);e?.[1]?.trim()&&K(e[1].trim())}(0,b.Zq)("/teach/identity").then(async e=>{if(e.ok){let t=await e.json().catch(()=>null);t?.name&&K(t.name)}}).catch(()=>{})}ej(eb.id,s=>({...s,messages:s.messages.map(s=>s.id===e&&s.behavioralProposals?{...s,behavioralProposals:s.behavioralProposals.map(e=>(e.directive_id||e.id)===t?{...e,status:i}:e)}:s)}))}catch(e){console.error("Failed to update behavioral proposal:",e)}}function eP(e){if(!e?.manifest)return;let t=e.scannedDirectives||e.manifest?.directives||[];return{manifest:e.manifest,scannedDirectives:t,compiledBy:e.compiledBy||"parser",status:"pending"}}function eA(e,t){let s={};t.scannedDirectives.forEach(e=>{s[e.id]=e.approvedByDefault??e.scanResult?.safe??!0}),er(t=>({...t,[e]:s}))}async function eE(e){let t=e.target.files?.[0];if(!t)return;e.target&&(e.target.value="");let s=await t.text(),a=t.name,i=eb;i||(i=eg(),h(e=>[i,...e]),x(i.id));let r={id:j(),role:"user",content:"Teach Siduri from this persona file.",selfAttachment:{filename:a},createdAt:Date.now()},n=j(),o={id:n,role:"assistant",content:"",createdAt:Date.now()};ej(i.id,e=>({...e,title:0===e.messages.length?`Persona: ${a}`:e.title,messages:[...e.messages,r,o],updatedAt:Date.now()})),L(!0),A("streaming");try{let e=await (0,b.B2)("/teach/upload-self",{content:s,companionId:"default"});if(e&&e.isValid&&e.manifest){let t=eP(e),s=t?.manifest?.identity?.name||t?.manifest?.name||"persona",r=t?.scannedDirectives?.length??0,o="brain"===e.compiledBy?"AI Cognitive Compiler":"Manifest Parser",l=`I've reviewed **${a}** and compiled the persona **"${s}"** using the ${o}.
|
|
31
|
+
|
|
32
|
+
Found **${r} behavioral directive${1!==r?"s":""}**. Review and approve the directives below.`;ej(i.id,e=>({...e,messages:e.messages.map(e=>e.id===n?{...e,content:l,selfProposal:t}:e),updatedAt:Date.now()})),t&&eA(n,t),"teach"!==Y&&(W("teach"),q("teach"))}else{let t=e?.errors?.join("\n")||"Invalid persona or .self package format";ej(i.id,e=>({...e,messages:e.messages.map(e=>e.id===n?{...e,error:t,content:"Could not compile this persona file."}:e),updatedAt:Date.now()}))}}catch(t){let e=`Failed to parse persona file: ${t.message}`;ej(i.id,t=>({...t,messages:t.messages.map(t=>t.id===n?{...t,error:e,content:"Could not compile this persona file."}:t),updatedAt:Date.now()}))}finally{L(!1),A("online")}}async function eL(e,t){let s=Object.entries(ei[e]||{}).filter(([,e])=>e).map(([e])=>e);eo(e);try{let a=await (0,b.B2)("/teach/install-self",{companionId:"default",manifest:t.manifest,approvedDirectiveIds:s});if(a&&a.success){let a=t.manifest?.identity?.name||t.manifest?.name;a&&K(a),eb&&ej(eb.id,t=>({...t,messages:t.messages.map(t=>t.id===e?{...t,selfProposal:{...t.selfProposal,status:"installed"}}:t)})),ea(`Installed '${t.manifest.name}' ethos (${s.length} directives active).`),setTimeout(()=>ea(null),6e3),et(!0),J?.filename&&sessionStorage.setItem(`siduri.dismissedSelf:${J.filename}`,"true")}else alert(a?.error||"Failed to install .self package")}catch(e){alert(`Install error: ${e.message}`)}finally{eo(null)}}return(0,a.jsxs)("div",{className:`chat-app ${R?"sidebar-collapsed":""} ${I?"mobile-drawer-open":""}`,children:[I&&(0,a.jsx)("div",{className:"chat-backdrop",onClick:()=>D(!1),"aria-hidden":"true"}),(0,a.jsxs)("aside",{className:"chat-sidebar","aria-label":"Conversation history",children:[(0,a.jsxs)("div",{className:"chat-sidebar-top",children:[(0,a.jsxs)("a",{className:"chat-brand",href:"/chat",children:[(0,a.jsx)("span",{className:"chat-brand-mark",children:"S"}),(0,a.jsx)("span",{children:"SIDURI"})]}),(0,a.jsx)("button",{className:"sidebar-collapse",type:"button",onClick:()=>T(e=>!e),"aria-label":R?"Expand sidebar":"Collapse sidebar",children:R?(0,a.jsx)(v.fl,{size:14}):(0,a.jsx)(v.A6,{size:14})}),(0,a.jsx)("button",{className:"mobile-drawer-close flex items-center justify-center",type:"button",onClick:()=>D(!1),"aria-label":"Close conversation drawer",children:(0,a.jsx)(v.US,{size:14})})]}),(0,a.jsxs)("button",{className:"new-chat-button flex items-center gap-1.5",type:"button",onClick:()=>{let e;e=eg(),h(t=>[e,...t]),x(e.id),k(""),A("online"),D(!1)},children:[(0,a.jsx)(v.c1,{size:13,className:"shrink-0"}),(0,a.jsx)("span",{children:"New conversation"})]}),(0,a.jsxs)("div",{className:"history-heading",children:[(0,a.jsx)("span",{children:"Recent conversations"}),(0,a.jsx)("span",{children:u.length})]}),(0,a.jsx)("div",{className:"conversation-list",children:_?0===u.length?(0,a.jsx)("p",{className:"history-empty",children:"Your private conversations will appear here."}):u.slice().sort((e,t)=>t.updatedAt-e.updatedAt).map(e=>(0,a.jsxs)("div",{className:`conversation-row ${e.id===p?"selected":""}`,children:[(0,a.jsxs)("button",{type:"button",className:"conversation-select",onClick:()=>{x(e.id),D(!1)},children:[(0,a.jsx)("span",{className:"conversation-title",children:e.title}),(0,a.jsx)("span",{className:"conversation-date",children:y(e.updatedAt)})]}),(0,a.jsx)("button",{type:"button",className:"conversation-delete flex items-center justify-center",onClick:t=>{t.stopPropagation();var s=e.id;if(h(e=>e.filter(e=>e.id!==s)),p===s){let e=u.find(e=>e.id!==s);x(e?.id??null)}},"aria-label":`Delete ${e.title}`,children:(0,a.jsx)(v.US,{size:12})})]},e.id)):(0,a.jsx)("p",{className:"history-empty",children:"Loading history…"})}),(0,a.jsxs)("div",{className:"sidebar-footer",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{D(!1),B(!0)},className:"sidebar-settings-btn md:hidden flex items-center gap-1.5",children:[(0,a.jsx)(v.Ze,{size:14,className:"shrink-0"}),(0,a.jsxs)("span",{className:"truncate",children:["Preferences (",Y,"off"!==Z?` \xb7 ${Z.toUpperCase()}`:"",")"]})]}),(0,a.jsxs)("a",{className:"sidebar-console",href:"/operator",children:[(0,a.jsx)(v.t$,{size:13,className:"shrink-0"}),(0,a.jsx)("span",{children:"Operator console"}),(0,a.jsx)("b",{children:(0,a.jsx)(v.pT,{size:12})})]})]})]}),(0,a.jsxs)("main",{className:"chat-workspace",children:[(0,a.jsxs)("header",{className:"chat-header",children:[(0,a.jsxs)("div",{className:"chat-header-brand-group",children:[(0,a.jsx)("button",{type:"button",className:"mobile-menu-toggle flex items-center justify-center",onClick:()=>D(!0),"aria-label":"Open conversation menu",children:(0,a.jsx)(v.ZB,{size:16})}),(0,a.jsxs)("a",{href:"/chat",className:"chat-header-title",children:[(0,a.jsx)("span",{className:"chat-brand-mark",children:"S"}),(0,a.jsx)("span",{className:"font-bold tracking-widest text-xs hidden xs:inline",children:"SIDURI"})]})]}),(0,a.jsxs)("div",{className:"chat-header-actions flex items-center gap-1.5 sm:gap-2.5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>U(e=>!e),className:`connection-pill cursor-pointer transition-all focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none ${F?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)]":"hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)]"}`,"aria-label":"Toggle avatar presence","aria-expanded":F,title:F?"Disable Avatar Presence":"Enable Avatar Presence",children:[(0,a.jsx)("span",{className:`status-light ${F?"online":""}`}),(0,a.jsx)("span",{className:"text-xs",children:"Presence"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>B(!0),className:`connection-pill cursor-pointer transition-all md:hidden flex items-center gap-1.5 ${"off"!==Z||"hybrid"!==Y?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)]":"hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)]"}`,"aria-label":"Open chat preferences",title:"Preferences & Subtitles",children:[(0,a.jsx)(v.Ze,{size:12,className:"shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-mono font-medium tracking-wide",children:"hybrid"!==Y&&"off"!==Z?`${Y.slice(0,4)}\xb7${Z.slice(0,2).toUpperCase()}`:"hybrid"!==Y?Y:"off"!==Z?`CC:${Z.slice(0,2).toUpperCase()}`:"Options"})]}),(0,a.jsxs)("div",{className:`connection-pill hidden md:flex items-center gap-1 sm:gap-1.5 transition-all focus-within:ring-1 focus-within:ring-[var(--siduri-border-ember)] ${"off"!==Z?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)]":"hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)]"}`,title:"Subtitle translation language",children:[(0,a.jsx)("span",{className:`status-light ${"off"!==Z?"online":""}`}),(0,a.jsx)("span",{className:"text-[10px] uppercase font-mono tracking-wider opacity-60",children:"Subtitles:"}),(0,a.jsxs)("select",{value:["off","en","ja","id","es","zh","ko","fr","de"].includes(Z)?Z:"custom-selected",onChange:e=>{let t=e.target.value;if("custom"===t){let e=prompt("Enter subtitle language code or name (e.g. it, ru, de, pt, vi):");if(e&&e.trim()){let t=e.trim().toLowerCase();V(t);try{localStorage.setItem("siduri.chat.subtitleLanguage",t)}catch{}}}else if("custom-selected"!==t){V(t);try{localStorage.setItem("siduri.chat.subtitleLanguage",t)}catch{}}},className:"bg-transparent text-xs text-[var(--siduri-text-primary)] font-medium outline-none cursor-pointer border-none p-0","aria-label":"Select subtitle language",children:[(0,a.jsx)("option",{value:"off",className:"bg-[#121214] text-white",children:"Subtitles: Off"}),(0,a.jsx)("option",{value:"en",className:"bg-[#121214] text-white",children:"English (EN)"}),(0,a.jsx)("option",{value:"ja",className:"bg-[#121214] text-white",children:"Japanese (JA)"}),(0,a.jsx)("option",{value:"id",className:"bg-[#121214] text-white",children:"Indonesian (ID)"}),(0,a.jsx)("option",{value:"es",className:"bg-[#121214] text-white",children:"Spanish (ES)"}),(0,a.jsx)("option",{value:"zh",className:"bg-[#121214] text-white",children:"Chinese (ZH)"}),(0,a.jsx)("option",{value:"ko",className:"bg-[#121214] text-white",children:"Korean (KO)"}),(0,a.jsx)("option",{value:"fr",className:"bg-[#121214] text-white",children:"French (FR)"}),(0,a.jsx)("option",{value:"de",className:"bg-[#121214] text-white",children:"German (DE)"}),!["off","en","ja","id","es","zh","ko","fr","de"].includes(Z)&&(0,a.jsx)("option",{value:"custom-selected",className:"bg-[#121214] text-white",children:Z.toUpperCase()}),(0,a.jsx)("option",{value:"custom",className:"bg-[#121214] text-white",children:"Other..."})]})]}),(0,a.jsxs)("span",{className:"connection-pill hidden lg:inline-flex",title:`Status: ${P}`,children:[(0,a.jsx)("span",{className:`status-light ${"online"===P?"online":""}`}),(0,a.jsx)("span",{className:"text-xs",children:P})]}),(0,a.jsxs)("div",{className:"connection-pill hidden md:flex items-center gap-1 sm:gap-1.5",title:"Operating interaction mode",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase font-mono tracking-wider opacity-60",children:"Mode:"}),(0,a.jsxs)("select",{value:Y,onChange:e=>W(e.target.value),className:"bg-transparent text-xs text-[var(--siduri-text-primary)] font-medium outline-none cursor-pointer border-none p-0","aria-label":"Select interaction mode",children:[(0,a.jsx)("option",{value:"hybrid",className:"bg-[#121214] text-white",children:"Hybrid (Default)"}),(0,a.jsx)("option",{value:"teach",className:"bg-[#121214] text-white",children:"Teach"}),(0,a.jsx)("option",{value:"casual",className:"bg-[#121214] text-white",children:"Casual"})]})]})]})]}),J&&!ee&&(0,a.jsxs)("div",{"data-testid":"detected-self-banner",className:"bg-[#1c1814] border-b border-[var(--siduri-border-ember)] px-4 py-2.5 flex flex-wrap items-center justify-between gap-3 text-xs text-[#f1e6d0] z-20 shadow-md animate-fade-in",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(v.qD,{size:18,className:"text-[var(--siduri-ember-highlight)] shrink-0"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("strong",{children:".self file detected on path:"})," ",(0,a.jsx)("code",{className:"px-1.5 py-0.5 rounded bg-black/50 text-[var(--siduri-ember-highlight)] font-mono font-medium border border-[var(--siduri-border-subtle)]",children:J.filename}),J.alreadyInstalled?(0,a.jsx)("span",{className:"ml-1.5 text-[var(--siduri-text-muted)] text-[11px]",children:"(already imported)"}):null," — Import to companion ethos & directives?"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{et(!0),J.filename&&sessionStorage.setItem(`siduri.dismissedSelf:${J.filename}`,"true")},className:"px-2.5 py-1 rounded text-[var(--siduri-text-muted)] hover:text-white hover:bg-white/5 transition-colors cursor-pointer",children:"Dismiss"}),(0,a.jsx)("button",{type:"button",onClick:function(){if(!J?.parsed)return;"teach"!==Y&&(W("teach"),q("teach"));let e=eb;e||(e=eg(),h(t=>[e,...t]),x(e.id));let t=eP(J.parsed);if(!t)return;let s=t.manifest?.identity?.name||t.manifest?.name||"persona",a=j(),i=j(),r=`I've reviewed **${J.filename}** detected on your companion path and compiled the persona **"${s}"**.
|
|
33
|
+
|
|
34
|
+
Found **${t.scannedDirectives.length} behavioral directive${1!==t.scannedDirectives.length?"s":""}**. Review and approve below.`;ej(e.id,e=>({...e,messages:[...e.messages,{id:a,role:"user",content:"Import detected persona file.",selfAttachment:{filename:J.filename||".self"},createdAt:Date.now()},{id:i,role:"assistant",content:r,selfProposal:t,createdAt:Date.now()}],updatedAt:Date.now()})),eA(i,t),et(!0)},className:"px-3.5 py-1 rounded bg-[var(--siduri-ember)] text-[#151214] font-semibold hover:brightness-110 shadow-sm transition-all cursor-pointer",children:"Import"})]})]}),es&&(0,a.jsxs)("div",{className:"bg-[#132218] border-b border-[#3e8555] px-4 py-2 text-xs text-[#a9dfbf] flex items-center justify-between z-20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(v.Sr,{size:14,className:"shrink-0 text-[#a9dfbf]"}),(0,a.jsx)("span",{children:es})]}),(0,a.jsx)("button",{type:"button",onClick:()=>ea(null),className:"text-[#a9dfbf] hover:text-white cursor-pointer",children:(0,a.jsx)(v.US,{size:13})})]}),(0,a.jsx)("div",{className:"flex flex-col flex-1 min-h-0 w-full overflow-hidden relative",children:(0,a.jsxs)("section",{className:"conversation-surface","aria-label":"Private chat",children:[(0,a.jsxs)("div",{ref:ex,className:`conversation-scroll ${F?"presence-active":""}`,"aria-live":"polite",children:[F?(0,a.jsx)("div",{className:"avatar-presence-area","data-testid":"avatar-presence-area",children:(0,a.jsx)(f,{modelUrl:O,expression:$?.expression||"neutral",action:$?.action||"idle",state:$?.state||"idle",speechId:$?.speechId,lipSyncValue:$?.lipSyncValue,durationMs:$?.durationMs,className:"w-full h-full"})}):0===eN.length?(0,a.jsx)(n,{companionName:H,onSelectPrompt:e=>k(e)}):eN.map(e=>{let t,s,i,n,o,l,c,d,m,u,h,p,x,f,b,g;return(0,a.jsxs)("article",{id:`msg-${e.id}`,className:`platform-message ${e.role}`,children:[(0,a.jsx)("div",{className:"message-avatar",children:"user"===e.role?"U":H.charAt(0).toUpperCase()||"S"}),(0,a.jsxs)("div",{className:"message-body",children:[(0,a.jsxs)("div",{className:"message-meta",children:[(0,a.jsx)("span",{children:"user"===e.role?"You":H}),"assistant"!==e.role||e.content||e.error||e.interrupted||!E?(0,a.jsx)("time",{children:y(e.createdAt)}):(0,a.jsx)("span",{className:"thinking-label",children:"thinking"}),e.interrupted&&(t=w(e.interruptionReason),(0,a.jsx)("span",{className:"interrupted-pill",title:t.hint||t.text,children:t.label})),e.error&&(0,a.jsx)("span",{className:"error-pill",title:"An error occurred during response",children:"error"})]}),e.error?(s=function(e){if(!e)return{title:"Connection or service issue"};let t=e.toLowerCase();return t.includes("401")||t.includes("unauthorized")||t.includes("invalid api key")||t.includes("api_key")?{title:"LLM Provider Authentication Failed",hint:"Your API key is invalid or missing. Please check your API key in your .env file or environment variables."}:t.includes("402")||t.includes("insufficient")||t.includes("balance")||t.includes("credits")||t.includes("quota")?{title:"LLM Credits / Quota Exhausted",hint:"Your LLM provider account has run out of credits or reached its usage quota."}:t.includes("429")||t.includes("rate limit")||t.includes("too many requests")?{title:"LLM Rate Limit Reached",hint:"The LLM provider received too many requests. Please wait a moment before trying again."}:t.includes("404")||t.includes("model")&&t.includes("not found")?{title:"LLM Model Not Found",hint:"The configured model could not be found or is unavailable on this provider."}:t.includes("context length")||t.includes("maximum context")||t.includes("token limit")?{title:"Context Window Exceeded",hint:"The conversation exceeded the model's token limit. Consider starting a new chat."}:t.includes("timeout")||t.includes("timed out")||t.includes("deadline")?{title:"LLM Request Timed Out",hint:"The AI provider took too long to generate a response (wall-clock deadline exceeded)."}:t.includes("500")||t.includes("502")||t.includes("503")||t.includes("504")||t.includes("bad gateway")?{title:"LLM Provider Service Outage",hint:"The AI provider is temporarily unavailable or overloaded."}:{title:"Connection or service issue",hint:void 0}}(e.error),(0,a.jsxs)("div",{className:"message-error-container",children:[e.content?(0,a.jsx)("p",{className:"message-primary",children:e.content}):(0,a.jsx)("p",{className:"message-primary text-[var(--siduri-text-muted)] italic",children:"I couldn't complete the response."}),(0,a.jsxs)("div",{className:"message-error-callout",children:[(0,a.jsxs)("div",{className:"error-callout-header flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"error-icon flex items-center justify-center text-[var(--siduri-warning)]","aria-hidden":"true",children:(0,a.jsx)(v.eq,{size:14})}),(0,a.jsx)("span",{className:"error-text",children:s.title})]}),s.hint&&(0,a.jsx)("p",{className:"error-hint text-xs text-[var(--siduri-text-secondary)] mt-1 mb-1",children:s.hint}),(0,a.jsxs)("details",{className:"error-details",children:[(0,a.jsx)("summary",{children:"View technical details"}),(0,a.jsx)("pre",{className:"error-trace",children:e.error})]})]})]})):e.interrupted&&!e.content?(i=w(e.interruptionReason),(0,a.jsxs)("div",{className:"message-cancelled-container",children:[(0,a.jsx)("p",{className:"message-cancelled",children:i.text}),i.hint&&(0,a.jsx)("p",{className:"message-cancelled-hint text-xs text-[var(--siduri-text-dim)] mt-0.5",children:i.hint})]})):"assistant"===e.role&&!e.content&&E?(0,a.jsxs)("div",{className:"thinking-dots",children:[(0,a.jsx)("i",{}),(0,a.jsx)("i",{}),(0,a.jsx)("i",{})]}):(0,a.jsxs)(a.Fragment,{children:[e.selfAttachment&&(0,a.jsxs)("div",{className:"self-attachment-chip",children:[(0,a.jsx)("span",{className:"self-attachment-icon","aria-hidden":"true",children:"\uD83D\uDCCE"}),(0,a.jsx)("span",{className:"self-attachment-name",children:e.selfAttachment.filename}),(0,a.jsx)("span",{className:"self-attachment-label",children:"persona"})]}),(0,a.jsx)("p",{className:"message-primary",children:e.content}),e.interrupted&&(0,a.jsxs)("p",{className:"message-interrupted-footnote text-xs text-[var(--siduri-text-dim)] italic mt-1",children:["— ",w(e.interruptionReason).text.toLowerCase()]})]}),"off"!==Z&&"assistant"===e.role&&((n=e.subtitles?.[Z]||(e.subtitleLanguage===Z?e.subtitle:void 0)||("ja"===Z&&e.spokenJa&&e.spokenJa!==e.content?e.spokenJa:void 0)||(e.subtitle&&e.subtitle!==e.content?e.subtitle:void 0))&&n.trim()!==e.content.trim()?(0,a.jsxs)("p",{className:"message-translation",title:`Subtitle: ${Z.toUpperCase()}`,children:[(0,a.jsxs)("span",{className:"text-[10px] font-mono uppercase tracking-wider opacity-60 mr-1.5 not-italic",children:["[",Z,"]:"]}),n]}):null),"assistant"===e.role&&(e.gate?.requires_approval||em[e.id])&&(l="requires_approval"===(o=em[e.id]||(e.gate?.requires_approval?"requires_approval":e.gate?.status?.toLowerCase()||"approved")),c="approved"===o,(0,a.jsxs)("div",{className:`truth-gate-card gate-${o}`,children:[(0,a.jsxs)("div",{className:"truth-gate-header",children:[(0,a.jsx)("span",{className:"truth-gate-badge flex items-center gap-1.5",children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Sr,{size:12,className:"shrink-0"}),(0,a.jsx)("span",{children:"TRUTH GATE: AUTHORIZED"})]}):l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.eq,{size:12,className:"shrink-0"}),(0,a.jsx)("span",{children:"TRUTH GATE: REQUIRES APPROVAL"})]}):(0,a.jsxs)("span",{children:["TRUTH GATE: ",o.toUpperCase()]})}),e.gate?.confidence&&(0,a.jsxs)("span",{className:"truth-gate-metric",children:["Confidence: ",e.gate.confidence]}),e.gate?.uncertainty&&(0,a.jsxs)("span",{className:"truth-gate-metric",children:["Uncertainty: ",e.gate.uncertainty]})]}),l&&(0,a.jsxs)("div",{className:"truth-gate-actions",children:[(0,a.jsx)("span",{className:"truth-gate-prompt",children:"This response contains unverified claims or side-effects that require manual confirmation."}),(0,a.jsxs)("div",{className:"receipt-actions",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eu(t=>({...t,[e.id]:"approved"})),children:"Authorize Response"}),(0,a.jsx)("button",{type:"button",onClick:()=>eu(t=>({...t,[e.id]:"rejected"})),children:"Reject / Block"})]})]})]})),"assistant"===e.role&&e.selfProposal&&(d=e.selfProposal,m=e.id,u=d.scannedDirectives,p=Object.values(h=ei[m]||{}).filter(Boolean).length,x="installed"===d.status,f=en===m,(0,a.jsxs)("div",{className:`self-proposal-card ${x?"self-proposal-installed":""}`,children:[(0,a.jsxs)("div",{className:"self-proposal-header",children:[(0,a.jsx)("span",{className:"self-proposal-badge",children:x?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Sr,{size:12,className:"shrink-0"}),(0,a.jsx)("span",{children:"PERSONA INSTALLED"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.qD,{size:12,className:"shrink-0"}),(0,a.jsx)("span",{children:"PERSONA PROPOSAL"})]})}),(0,a.jsxs)("span",{className:"self-proposal-meta",children:[d.manifest?.name||"Self Package"," \xb7 ",(0,a.jsx)("span",{className:"font-mono opacity-60",children:"brain"===d.compiledBy?"AI":"Parser"})]})]}),!x&&u.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"self-proposal-toolbar",children:[(0,a.jsxs)("span",{className:"self-proposal-count",children:[p," of ",u.length," selected"]}),(0,a.jsx)("button",{type:"button",className:"self-proposal-link",onClick:()=>{let e={};u.forEach(t=>{e[t.id]=!0}),er(t=>({...t,[m]:e}))},children:"Select all"}),(0,a.jsx)("span",{className:"opacity-40",children:"\xb7"}),(0,a.jsx)("button",{type:"button",className:"self-proposal-link opacity-60",onClick:()=>er(e=>({...e,[m]:{}})),children:"None"})]}),(0,a.jsx)("div",{className:"self-proposal-directives",children:u.map((e,t)=>{let s=!!h[e.id],i=e.scanResult?.safe!==!1;return(0,a.jsxs)("div",{className:`self-directive-row ${s?"checked":""} ${!i?"blocked":""}`,onClick:()=>er(t=>({...t,[m]:{...t[m]||{},[e.id]:!s}})),children:[(0,a.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{},className:"shrink-0 mt-0.5 accent-[var(--siduri-ember)] cursor-pointer"}),(0,a.jsxs)("div",{className:"self-directive-body",children:[(0,a.jsxs)("div",{className:"self-directive-meta",children:[(0,a.jsx)("span",{className:"opacity-50 font-mono",children:e.id}),(0,a.jsx)("span",{className:"self-directive-tag",children:e.category||"behavioral"}),!i&&(0,a.jsxs)("span",{className:"self-directive-blocked",children:[(0,a.jsx)(v.eq,{size:10,className:"shrink-0"}),"Blocked"]}),i&&s&&(0,a.jsxs)("span",{className:"self-directive-safe",children:[(0,a.jsx)(v.Sr,{size:10,className:"shrink-0"}),"Safe"]})]}),(0,a.jsx)("p",{className:"self-directive-text",children:e.directive})]})]},e.id||t)})}),(0,a.jsxs)("div",{className:"self-proposal-actions",children:[(0,a.jsx)("button",{type:"button",className:"self-proposal-btn-reject",onClick:()=>ej(e.id?eb.id:"",e=>({...e,messages:e.messages.map(e=>e.id===m?{...e,selfProposal:{...e.selfProposal,status:"rejected"}}:e)})),disabled:f,children:"Reject"}),(0,a.jsx)("button",{type:"button",className:"self-proposal-btn-install",onClick:()=>eL(m,d),disabled:f||0===p,children:f?"Installing…":`Install ${p} directive${1!==p?"s":""}`})]})]}),x&&(0,a.jsxs)("p",{className:"self-proposal-installed-note",children:["✨ ",d.manifest?.identity?.name||d.manifest?.name," adopted — behavioral predicates committed to explicit state."]})]})),(e.evidenceIds&&e.evidenceIds.length>0||e.citations&&e.citations.length>0)&&(b=!!ec[e.id],g=e.citations?.length||e.evidenceIds?.length||0,(0,a.jsxs)("div",{className:"evidence-trace-card",children:[(0,a.jsx)("button",{type:"button",className:"evidence-toggle-btn",onClick:()=>ed(t=>({...t,[e.id]:!t[e.id]})),title:b?"Collapse grounded evidence trace":"Click to view grounded sources and evidence",children:(0,a.jsxs)("span",{className:"evidence-chip",children:[(0,a.jsx)(v.WI,{size:12,className:"shrink-0"}),(0,a.jsxs)("span",{children:["Grounded in DB (",g," source",1===g?"":"s",")"]}),b?(0,a.jsxs)("span",{className:"inline-flex items-center gap-0.5 opacity-80 font-sans text-[10px]",children:[(0,a.jsx)(v.Mt,{size:11})," Hide"]}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-0.5 opacity-80 font-sans text-[10px]",children:[(0,a.jsx)(v.D3,{size:11})," Show"]})]})}),b&&(0,a.jsx)("div",{className:"evidence-details-tray",children:e.citations&&e.citations.length>0?e.citations.map((e,t)=>{let s=e.evidence_id||e.evidenceId||`ev-${t}`,i=e.provenance||e.source_id||e.sourceId||"grounded-db",r=e.locator&&(e.locator.startsWith("http://")||e.locator.startsWith("https://"));return(0,a.jsxs)("div",{className:"evidence-source-card",children:[(0,a.jsxs)("div",{className:"evidence-source-meta",children:[(0,a.jsxs)("span",{className:"evidence-provenance",children:["[",i,"]"]}),(0,a.jsxs)("span",{className:"evidence-id",children:["ID: ",s]}),e.revision&&(0,a.jsxs)("span",{className:"evidence-rev",children:["rev: ",e.revision]}),(0,a.jsxs)("div",{className:"evidence-actions",children:[r&&(0,a.jsxs)("a",{href:e.locator,target:"_blank",rel:"noopener noreferrer",className:"evidence-action-link",title:`Open external source: ${e.locator}`,children:["Open Source ",(0,a.jsx)(v.pT,{size:12,className:"inline ml-0.5"})]}),e.locator&&e.locator.startsWith("lifedb:")&&(0,a.jsxs)("a",{href:"/operator",className:"evidence-action-link",title:"View record in Operator Console",children:["Operator ",(0,a.jsx)(v.pT,{size:12,className:"inline ml-0.5"})]}),(0,a.jsxs)("button",{type:"button",className:"evidence-inspect-btn flex items-center gap-1",onClick:()=>ep(e),title:"Inspect complete cryptographic evidence payload",children:[(0,a.jsx)(v.WI,{size:10,className:"shrink-0"}),(0,a.jsx)("span",{children:"Inspect"})]})]})]}),e.preview&&(0,a.jsxs)("div",{className:"evidence-source-preview cursor-pointer",onClick:()=>ep(e),title:"Click to view full preview and metadata",children:["“",e.preview,"”"]})]},s||t)}):e.evidenceIds?.map((e,t)=>{let s=e.startsWith("ev-mem"),i=e.startsWith("ev-know"),r=e.startsWith("ev-life"),n=i?"knowledge":s?"memory":r?"life":"grounded-record",o=i?`External lore from configured Knowledge Pack (ID: ${e})`:s?`Episodic conversation claim stored in SQLite memory (ID: ${e})`:`Grounded database record (ID: ${e})`;return(0,a.jsx)("div",{className:"evidence-source-card",children:(0,a.jsxs)("div",{className:"evidence-source-meta",children:[(0,a.jsxs)("span",{className:"evidence-provenance",children:["[",n,"]"]}),(0,a.jsxs)("span",{className:"evidence-id",children:["ID: ",e]}),(0,a.jsx)("div",{className:"evidence-actions",children:(0,a.jsxs)("button",{type:"button",className:"evidence-inspect-btn flex items-center gap-1",onClick:()=>ep({evidence_id:e,provenance:n,preview:o}),title:"Click to inspect evidence details",children:[(0,a.jsx)(v.WI,{size:10,className:"shrink-0"}),(0,a.jsx)("span",{children:"Inspect"})]})})]})},e||t)})})]})),e.memoryProposals&&e.memoryProposals.length>0&&(0,a.jsx)("div",{className:"memory-receipts",children:e.memoryProposals.map((t,s)=>{let i=t.proposal_id||t.id||`mprop-${s}`,n=(t.status||"pending").toLowerCase().replace(/_/g,"-"),o="pending"===n;return(0,a.jsxs)("div",{className:`memory-receipt status-${n}`,children:[(0,a.jsxs)("strong",{children:["Remember",t.claim_type?` (${t.claim_type.toLowerCase()})`:"",":"]})," ",(0,r.I)(t),(0,a.jsx)("div",{className:"receipt-actions",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>eC(e.id,i,"approve"),children:"Approve"}),(0,a.jsx)("button",{type:"button",onClick:()=>eC(e.id,i,"reject"),children:"Reject"})]}):(0,a.jsx)("span",{children:n.toUpperCase()})})]},i)})}),e.behavioralProposals&&e.behavioralProposals.length>0&&(0,a.jsx)("div",{className:"memory-receipts",children:e.behavioralProposals.map((t,s)=>{let i=t.directive_id||t.id||`bprop-${s}`,n=(t.status||"pending").toLowerCase().replace(/_/g,"-"),o="pending"===n;return(0,a.jsxs)("div",{className:`memory-receipt status-${n}`,children:[(0,a.jsxs)("strong",{children:["Runtime effect [",((t.knowledge_domain??t.domain)||"").toLowerCase()," ",(0,a.jsx)(v.fl,{size:11,className:"inline mx-0.5"})," ",((t.runtime_effect??t.memory_class)||"").toLowerCase(),"]:"]})," ",(0,r.P)(t),(0,a.jsx)("div",{className:"receipt-actions",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>ek(e.id,i,"approve"),children:"Approve"}),(0,a.jsx)("button",{type:"button",onClick:()=>ek(e.id,i,"reject"),children:"Reject"})]}):(0,a.jsx)("span",{children:n.toUpperCase()})})]},i)})})]})]},e.id)}),E&&!F&&(!eN.length||eN[eN.length-1]?.role!=="assistant")&&(0,a.jsxs)("div",{className:"platform-message assistant thinking-message",children:[(0,a.jsx)("div",{className:"message-avatar",children:H.charAt(0).toUpperCase()||"S"}),(0,a.jsxs)("div",{className:"message-body",children:[(0,a.jsxs)("div",{className:"message-meta",children:[(0,a.jsx)("span",{children:H}),(0,a.jsx)("span",{className:"thinking-label",children:"thinking"})]}),(0,a.jsxs)("div",{className:"thinking-dots",children:[(0,a.jsx)("i",{}),(0,a.jsx)("i",{}),(0,a.jsx)("i",{})]})]})]})]}),(0,a.jsxs)("form",{className:"platform-composer",onSubmit:ey,children:[(0,a.jsx)("textarea",{value:C,onChange:e=>k(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e.currentTarget.form?.requestSubmit())},placeholder:`Message ${H}…`,rows:1,maxLength:4e3,"aria-label":`Message ${H}`}),(0,a.jsxs)("div",{className:"composer-bottom",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("span",{className:"composer-session-info inline-flex items-center gap-1.5",children:["Private local session \xb7"," ",ew>0?(0,a.jsxs)("button",{type:"button",onClick:()=>{let e=[...eN].reverse().find(e=>"assistant"===e.role&&(e.evidenceIds&&e.evidenceIds.length>0||e.citations&&e.citations.length>0));if(e){ed(t=>({...t,[e.id]:!0}));let t=document.getElementById(`msg-${e.id}`);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}},className:"composer-evidence-link-btn",title:"Click to view and inspect grounded evidence in the latest response",children:[(0,a.jsx)(v.WI,{size:12,className:"shrink-0"}),(0,a.jsxs)("span",{children:[ew," evidence link",1===ew?"":"s"]})]}):"No evidence attached"]}),"teach"===Y&&(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"file",ref:el,accept:".self,.yaml,.yml,.json,.md,.txt",className:"hidden",onChange:eE,"aria-label":"Upload persona or .self file"}),(0,a.jsxs)("button",{type:"button",onClick:()=>el.current?.click(),className:"composer-attach-btn",title:"Attach persona document or .self file for Cognitive Compiler review",children:[(0,a.jsx)("svg",{viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),(0,a.jsx)("span",{children:"Attach Persona"})]})]})]}),E&&!C.trim()?(0,a.jsx)("button",{type:"button",onClick:function(){ev.current&&(ev.current.abort("user_stop"),ev.current=null),(0,b.Uo)("default","user_stop"),L(!1),A("online")},"aria-label":"Stop generation",title:"Stop generation",className:"composer-action-btn flex items-center justify-center",children:(0,a.jsx)(v.wF,{size:12})}):(0,a.jsx)("button",{type:"submit",disabled:!C.trim(),"aria-label":"Send message",className:"composer-action-btn flex items-center justify-center",children:(0,a.jsx)(v.qx,{size:14})})]})]})]})}),(0,a.jsx)("p",{className:"chat-disclaimer",children:"Responses can be uncertain. Verify important details against the evidence."})]}),M&&(0,a.jsxs)("div",{className:"mobile-settings-overlay fixed inset-0 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4 md:hidden",children:[(0,a.jsx)("div",{className:"mobile-settings-backdrop absolute inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:()=>B(!1),"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"mobile-settings-sheet relative z-10 w-full max-w-lg bg-[#141418] border border-[var(--siduri-border-subtle)] rounded-t-2xl sm:rounded-2xl p-5 sm:p-6 shadow-2xl animate-slide-up flex flex-col gap-5 text-[#eee8df]",role:"dialog","aria-modal":"true","aria-label":"Chat preferences",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-[var(--siduri-border-subtle)]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-base font-semibold tracking-wide text-[#eee8df]",children:"Chat Preferences"}),(0,a.jsx)("span",{className:"text-[10px] font-mono uppercase px-2 py-0.5 rounded-full bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)] border border-[var(--siduri-border-ember)]",children:"Mobile"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>B(!1),className:"w-8 h-8 rounded-lg flex items-center justify-center text-sm text-[var(--siduri-text-muted)] hover:text-[var(--siduri-text-primary)] hover:bg-white/5 transition-all cursor-pointer border border-transparent hover:border-[var(--siduri-border-subtle)]","aria-label":"Close preferences",children:(0,a.jsx)(v.US,{size:16})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-mono uppercase tracking-wider text-[var(--siduri-text-secondary)]",children:"Interaction Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",children:[{id:"hybrid",label:"Hybrid",desc:"Balanced (Default)"},{id:"teach",label:"Teach",desc:"Establishing teaching"},{id:"casual",label:"Casual",desc:"Zero drift chat"}].map(e=>{let t=Y===e.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>W(e.id),className:`flex flex-col text-left p-2.5 rounded-xl border transition-all cursor-pointer ${t?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)] ring-1 ring-[var(--siduri-border-ember)]":"border-[var(--siduri-border-subtle)] bg-[#19191e]/60 text-[var(--siduri-text-secondary)] hover:border-[var(--siduri-border-ember)]/50 hover:text-[var(--siduri-text-primary)]"}`,children:[(0,a.jsx)("span",{className:"text-xs font-bold",children:e.label}),(0,a.jsx)("span",{className:"text-[10px] opacity-75 mt-0.5 line-clamp-1",children:e.desc})]},e.id)})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-mono uppercase tracking-wider text-[var(--siduri-text-secondary)]",children:"Subtitle Translation"}),"off"!==Z&&(0,a.jsxs)("span",{className:"text-[10px] font-mono uppercase text-[var(--siduri-ember-highlight)]",children:["Active: ",Z.toUpperCase()]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5 max-h-36 overflow-y-auto p-1 bg-[#101014] rounded-xl border border-[var(--siduri-border-subtle)]",children:[[{code:"off",label:"Off"},{code:"en",label:"English (EN)"},{code:"ja",label:"Japanese (JA)"},{code:"id",label:"Indonesian (ID)"},{code:"es",label:"Spanish (ES)"},{code:"zh",label:"Chinese (ZH)"},{code:"ko",label:"Korean (KO)"},{code:"fr",label:"French (FR)"},{code:"de",label:"German (DE)"}].map(e=>{let t=Z===e.code;return(0,a.jsx)("button",{type:"button",onClick:()=>{V(e.code);try{localStorage.setItem("siduri.chat.subtitleLanguage",e.code)}catch{}},className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all cursor-pointer ${t?"bg-[var(--siduri-ember)] text-[#19151a] font-semibold shadow":"bg-[#18181d] text-[var(--siduri-text-secondary)] hover:text-[var(--siduri-text-primary)] hover:bg-[#222228]"}`,children:e.label},e.code)}),(0,a.jsx)("button",{type:"button",onClick:()=>{let e=prompt("Enter subtitle language code (e.g. it, ru, pt, vi):");if(e&&e.trim()){let t=e.trim().toLowerCase();V(t);try{localStorage.setItem("siduri.chat.subtitleLanguage",t)}catch{}}},className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[#18181d] text-[var(--siduri-text-secondary)] hover:text-[var(--siduri-text-primary)] hover:bg-[#222228] cursor-pointer",children:"Custom..."})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-[#eee8df] block",children:"Live2D Avatar Presence"}),(0,a.jsx)("span",{className:"text-[11px] text-[var(--siduri-text-muted)]",children:"Render animated companion in chat"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>U(e=>!e),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${F?"bg-[var(--siduri-ember)]":"bg-[#282830]"}`,role:"switch","aria-checked":F,children:(0,a.jsx)("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${F?"translate-x-6":"translate-x-1"}`})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-[var(--siduri-border-subtle)]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`status-light ${"online"===P?"online":""}`}),(0,a.jsx)("span",{className:"text-xs text-[var(--siduri-text-muted)] capitalize",children:P})]}),(0,a.jsx)("button",{type:"button",onClick:()=>B(!1),className:"px-4 py-2 rounded-xl bg-[var(--siduri-tint-med)] border border-[var(--siduri-border-ember)] text-[var(--siduri-ember-highlight)] text-xs font-semibold hover:bg-[var(--siduri-border-ember)] hover:text-[#19151a] transition-all cursor-pointer",children:"Done"})]})]})]}),eh&&(0,a.jsx)("div",{className:"evidence-modal-overlay",onClick:()=>ep(null),role:"dialog","aria-modal":"true",children:(0,a.jsx)("div",{className:"evidence-modal-content",onClick:e=>e.stopPropagation(),children:(e=eh.evidence_id||eh.evidenceId,t=eh.source_id||eh.sourceId,s=eh.document_id||eh.documentId,o=eh.chunk_id||eh.chunkId,c=(l=eh.provenance||t||"grounded-record").includes("knowledge")||l.includes("hub")||l.startsWith("@"),d=l.includes("memory")||e&&e.startsWith("ev-mem"),m=c?`Cryptographically verifiable citation from Knowledge Pack (${l}).`:d?"Episodic verifiable claim from local SQLite memory store.":"Cryptographically verifiable ground truth record.",(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"evidence-modal-header",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"evidence-chip",children:["[",l,"]"]}),(0,a.jsx)("span",{className:"text-sm font-semibold tracking-wide text-[#eee8df]",children:"Evidence Inspector"})]}),(0,a.jsx)("button",{type:"button",className:"evidence-modal-close flex items-center justify-center",onClick:()=>ep(null),"aria-label":"Close evidence details",children:(0,a.jsx)(v.US,{size:14})})]}),(0,a.jsxs)("div",{className:"evidence-modal-body",children:[e&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Evidence ID"}),(0,a.jsx)("div",{className:"evidence-code-box",children:e})]}),t&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Source / Provenance"}),(0,a.jsx)("div",{className:"evidence-code-box",children:t})]}),s&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Document ID"}),(0,a.jsx)("div",{className:"evidence-code-box",children:s})]}),o&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Chunk ID"}),(0,a.jsx)("div",{className:"evidence-code-box",children:o})]}),eh.revision&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Revision"}),(0,a.jsx)("div",{className:"evidence-code-box",children:eh.revision})]}),eh.locator&&(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Locator / Source URL"}),(0,a.jsxs)("div",{className:"evidence-locator-row",children:[(0,a.jsx)("code",{className:"evidence-code-box evidence-locator-code",children:eh.locator}),eh.locator.startsWith("http://")||eh.locator.startsWith("https://")?(0,a.jsxs)("a",{href:eh.locator,target:"_blank",rel:"noopener noreferrer",className:"evidence-modal-open-btn",children:["Open Source URL ",(0,a.jsx)(v.pT,{size:12,className:"inline ml-1"})]}):eh.locator.startsWith("lifedb:")?(0,a.jsxs)("a",{href:"/operator",className:"evidence-modal-open-btn",children:["Operator Console ",(0,a.jsx)(v.pT,{size:12,className:"inline ml-1"})]}):null]})]}),(0,a.jsxs)("div",{className:"evidence-field-group",children:[(0,a.jsx)("label",{children:"Grounded Excerpt / Content"}),(0,a.jsx)("div",{className:"evidence-quote-box",children:eh.preview||"No preview excerpt available for this evidence entry."})]})]}),(0,a.jsxs)("div",{className:"evidence-modal-footer",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-[var(--siduri-text-muted)]",children:m}),(0,a.jsx)("button",{type:"button",className:"evidence-close-btn",onClick:()=>ep(null),children:"Close"})]})]}))})})]})}},7264:(e,t,s)=>{Promise.resolve().then(s.bind(s,2186))}},e=>{e.O(0,[426,461,136,358],()=>e(e.s=7264)),_N_E=e.O()}]);
|