diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 6ed174f..e51f28d 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -19,6 +19,8 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm run prepare:assets
- run: pnpm run check
+ - run: pnpm run harmony:genui-runtime
+ - run: pnpm run harmony:genui-runtime:check
- run: pnpm run test:harmony
- run: pnpm run test:miniapps
- run: pnpm run test:brand
diff --git a/AGENTS.md b/AGENTS.md
index cbd2bc3..87e9f8f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -119,7 +119,7 @@ isolation, run from `shared/` with the Android guide's Java runtime:
`./gradlew :core-feature:jvmTest --tests '*promptSuggestion*' --tests '*SessionRecordReplicaTest*'`.
These are simulated host streams, not evidence of a live remote connection.
-Native mobile surfaces are controllers. Desktop and CLI own execution, files, terminals and SSH credentials. Mobile workspace selection may use only connections already saved on the controlled runtime; it must not create an SSH connection or instantiate another runtime. Carry the selected connection identity through every operation, and report missing identity instead of falling back to local files.
+Native mobile remote surfaces are controllers. Desktop and CLI own remote execution, files, terminals and SSH credentials. Mobile workspace selection may use only connections already saved on the controlled runtime; it must not create an SSH connection or instantiate another runtime. Carry the selected connection identity through every operation, and report missing identity instead of falling back to local files.
## Offline Mini Apps
diff --git a/package.json b/package.json
index 14dc31b..b1de16b 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,8 @@
"node": ">=22.12.0"
},
"scripts": {
+ "harmony:genui-runtime": "pnpm run prepare:design && node scripts/build-harmony-genui-runtime.mjs",
+ "harmony:genui-runtime:check": "node scripts/build-harmony-genui-runtime.mjs --check",
"prepare:design": "pnpm --filter @openbitfun/design-tokens run build && pnpm --filter @openbitfun/theme-openbitfun run build",
"prepare:assets": "pnpm run prepare:design && node scripts/build-mobile-terminal.mjs --harmony && node src/apps/mobile/miniapps/generate.cjs android && node src/apps/mobile/miniapps/generate.cjs ios",
"harmony:architecture": "node scripts/check-harmonyos-architecture.mjs",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4e15e35..c975b86 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -48,8 +48,140 @@ importers:
design-system/tooling/token-engine: {}
+ src/apps/mobile/harmonyos/genui-runtime:
+ dependencies:
+ '@openbitfun/theme-openbitfun':
+ specifier: workspace:^
+ version: link:../../../../../design-system/packages/theme-openbitfun
+ '@openuidev/lang-core':
+ specifier: 1.0.2
+ version: 1.0.2(zod@4.6.7)
+ '@openuidev/react-lang':
+ specifier: 1.0.2
+ version: 1.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.6.7)
+ decode-named-character-reference:
+ specifier: 1.3.0
+ version: 1.3.0
+ katex:
+ specifier: ^0.16.25
+ version: 0.16.47
+ lucide-react:
+ specifier: ^0.560.0
+ version: 0.560.0(react@18.3.1)
+ maplibre-gl:
+ specifier: ^6.16.0
+ version: 6.19.0(@types/react@19.3.0)(react@18.3.1)
+ react:
+ specifier: ^18.3.1
+ version: 18.3.1
+ react-dom:
+ specifier: ^18.3.1
+ version: 18.3.1(react@18.3.1)
+ react-markdown:
+ specifier: ^10.1.0
+ version: 10.1.0(@types/react@19.3.0)(react@18.3.1)
+ remark-gfm:
+ specifier: ^4.0.1
+ version: 4.0.1
+ zod:
+ specifier: ^4.6.7
+ version: 4.6.7
+ devDependencies:
+ '@vitejs/plugin-react':
+ specifier: ^4.6.0
+ version: 4.7.0(vite@7.3.8(@types/node@26.6.6)(sass@1.108.2)(yaml@2.8.1))
+ sass:
+ specifier: ^1.93.2
+ version: 1.108.2
+ vite:
+ specifier: ^7.0.4
+ version: 7.3.8(@types/node@26.6.6)(sass@1.108.2)(yaml@2.8.1)
+
packages:
+ '@babel/code-frame@7.29.7':
+ resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/compat-data@7.29.7':
+ resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/core@7.29.13':
+ resolution: {integrity: sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/generator@7.29.14':
+ resolution: {integrity: sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-compilation-targets@7.29.13':
+ resolution: {integrity: sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-globals@7.29.7':
+ resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-module-imports@7.29.7':
+ resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-module-transforms@7.29.14':
+ resolution: {integrity: sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0
+
+ '@babel/helper-plugin-utils@7.29.7':
+ resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-string-parser@7.29.14':
+ resolution: {integrity: sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-validator-identifier@7.29.7':
+ resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helper-validator-option@7.29.7':
+ resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/helpers@7.29.14':
+ resolution: {integrity: sha512-6E3Mi1r0B0umq6vmZa4/78q+64fqO2YY0THUdjDPKUCKhNb0yQy5NQIaPHCSD3ryTgiTss//P4JsWS80AsZ6LQ==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/parser@7.29.14':
+ resolution: {integrity: sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+
+ '@babel/plugin-transform-react-jsx-self@7.29.7':
+ resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+
+ '@babel/plugin-transform-react-jsx-source@7.29.7':
+ resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+
+ '@babel/template@7.29.7':
+ resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/traverse@7.29.14':
+ resolution: {integrity: sha512-RAdQJrBgmIH1FWvN0X+1hoDxzMzlP4cv/1Zi4dn4tG1H0cTb+rw7CzUxQJhp1f4ANd8j5vH3fy8BAWFGkBDEsA==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/types@7.29.14':
+ resolution: {integrity: sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==}
+ engines: {node: '>=6.9.0'}
+
'@emnapi/runtime@1.11.3':
resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==}
@@ -59,156 +191,312 @@ packages:
cpu: [ppc64]
os: [aix]
+ '@esbuild/aix-ppc64@0.28.2':
+ resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [aix]
+
'@esbuild/android-arm64@0.25.12':
resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [android]
+ '@esbuild/android-arm64@0.28.2':
+ resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [android]
+
'@esbuild/android-arm@0.25.12':
resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
engines: {node: '>=18'}
cpu: [arm]
os: [android]
+ '@esbuild/android-arm@0.28.2':
+ resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [android]
+
'@esbuild/android-x64@0.25.12':
resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
engines: {node: '>=18'}
cpu: [x64]
os: [android]
+ '@esbuild/android-x64@0.28.2':
+ resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [android]
+
'@esbuild/darwin-arm64@0.25.12':
resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [darwin]
+ '@esbuild/darwin-arm64@0.28.2':
+ resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [darwin]
+
'@esbuild/darwin-x64@0.25.12':
resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
engines: {node: '>=18'}
cpu: [x64]
os: [darwin]
+ '@esbuild/darwin-x64@0.28.2':
+ resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [darwin]
+
'@esbuild/freebsd-arm64@0.25.12':
resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [freebsd]
+ '@esbuild/freebsd-arm64@0.28.2':
+ resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [freebsd]
+
'@esbuild/freebsd-x64@0.25.12':
resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [freebsd]
+ '@esbuild/freebsd-x64@0.28.2':
+ resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [freebsd]
+
'@esbuild/linux-arm64@0.25.12':
resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
engines: {node: '>=18'}
cpu: [arm64]
os: [linux]
+ '@esbuild/linux-arm64@0.28.2':
+ resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [linux]
+
'@esbuild/linux-arm@0.25.12':
resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
engines: {node: '>=18'}
cpu: [arm]
os: [linux]
+ '@esbuild/linux-arm@0.28.2':
+ resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [linux]
+
'@esbuild/linux-ia32@0.25.12':
resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
engines: {node: '>=18'}
cpu: [ia32]
os: [linux]
+ '@esbuild/linux-ia32@0.28.2':
+ resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [linux]
+
'@esbuild/linux-loong64@0.25.12':
resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
engines: {node: '>=18'}
cpu: [loong64]
os: [linux]
+ '@esbuild/linux-loong64@0.28.2':
+ resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==}
+ engines: {node: '>=18'}
+ cpu: [loong64]
+ os: [linux]
+
'@esbuild/linux-mips64el@0.25.12':
resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
engines: {node: '>=18'}
cpu: [mips64el]
os: [linux]
+ '@esbuild/linux-mips64el@0.28.2':
+ resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==}
+ engines: {node: '>=18'}
+ cpu: [mips64el]
+ os: [linux]
+
'@esbuild/linux-ppc64@0.25.12':
resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
engines: {node: '>=18'}
cpu: [ppc64]
os: [linux]
+ '@esbuild/linux-ppc64@0.28.2':
+ resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [linux]
+
'@esbuild/linux-riscv64@0.25.12':
resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
engines: {node: '>=18'}
cpu: [riscv64]
os: [linux]
+ '@esbuild/linux-riscv64@0.28.2':
+ resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==}
+ engines: {node: '>=18'}
+ cpu: [riscv64]
+ os: [linux]
+
'@esbuild/linux-s390x@0.25.12':
resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
engines: {node: '>=18'}
cpu: [s390x]
os: [linux]
+ '@esbuild/linux-s390x@0.28.2':
+ resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==}
+ engines: {node: '>=18'}
+ cpu: [s390x]
+ os: [linux]
+
'@esbuild/linux-x64@0.25.12':
resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
engines: {node: '>=18'}
cpu: [x64]
os: [linux]
+ '@esbuild/linux-x64@0.28.2':
+ resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [linux]
+
'@esbuild/netbsd-arm64@0.25.12':
resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [netbsd]
+ '@esbuild/netbsd-arm64@0.28.2':
+ resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [netbsd]
+
'@esbuild/netbsd-x64@0.25.12':
resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [netbsd]
+ '@esbuild/netbsd-x64@0.28.2':
+ resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [netbsd]
+
'@esbuild/openbsd-arm64@0.25.12':
resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openbsd]
+ '@esbuild/openbsd-arm64@0.28.2':
+ resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openbsd]
+
'@esbuild/openbsd-x64@0.25.12':
resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
engines: {node: '>=18'}
cpu: [x64]
os: [openbsd]
+ '@esbuild/openbsd-x64@0.28.2':
+ resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [openbsd]
+
'@esbuild/openharmony-arm64@0.25.12':
resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openharmony]
+ '@esbuild/openharmony-arm64@0.28.2':
+ resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openharmony]
+
'@esbuild/sunos-x64@0.25.12':
resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
engines: {node: '>=18'}
cpu: [x64]
os: [sunos]
+ '@esbuild/sunos-x64@0.28.2':
+ resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [sunos]
+
'@esbuild/win32-arm64@0.25.12':
resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [win32]
+ '@esbuild/win32-arm64@0.28.2':
+ resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [win32]
+
'@esbuild/win32-ia32@0.25.12':
resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
engines: {node: '>=18'}
cpu: [ia32]
os: [win32]
+ '@esbuild/win32-ia32@0.28.2':
+ resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [win32]
+
'@esbuild/win32-x64@0.25.12':
resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
engines: {node: '>=18'}
cpu: [x64]
os: [win32]
+ '@esbuild/win32-x64@0.28.2':
+ resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [win32]
+
'@img/colour@1.1.0':
resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}
engines: {node: '>=18'}
@@ -346,149 +634,564 @@ packages:
cpu: [x64]
os: [win32]
- '@puppeteer/browsers@1.9.1':
- resolution: {integrity: sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==}
- engines: {node: '>=16.3.0'}
- hasBin: true
+ '@jridgewell/gen-mapping@0.3.13':
+ resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
- '@tootallnate/quickjs-emscripten@0.23.0':
- resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}
+ '@jridgewell/remapping@2.3.5':
+ resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==}
- '@types/node@26.6.6':
- resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==}
+ '@jridgewell/resolve-uri@3.1.3':
+ resolution: {integrity: sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==}
+ engines: {node: '>=6.0.0'}
- '@types/yauzl@2.10.3':
- resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
+ '@jridgewell/sourcemap-codec@1.6.0':
+ resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==}
- '@xterm/addon-fit@0.12.0-beta.141':
- resolution: {integrity: sha512-VwmjkK5JxfQOr7RLNKMrJz0j/m3fjW+iqw3/GHqlH0r+rBQUyuBbiV9vuHNfEFtNe6H9DcyjWLwOuyqTN00PJg==}
- peerDependencies:
- '@xterm/xterm': ^6.1.0-beta.141
+ '@jridgewell/trace-mapping@0.3.31':
+ resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
- '@xterm/xterm@6.1.0-beta.141':
- resolution: {integrity: sha512-dwcmHvdFfekzNkb6lirSZnkSET21LKBwlwyRENTsIeU2U+4u0MFztUjO44e+MpDR0y+Mv/eeQza0mvhnkmC1Mg==}
+ '@mapbox/jsonlint-lines-primitives@2.0.3':
+ resolution: {integrity: sha512-0SElaV0uMxEnxzBhhX9WTuPyUeMsAN/SS0i16tjuba4/mio63MG9khjC1a0JAiPGXAwvwm4UfHJURCN7nyudQg==}
+ engines: {node: '>= 22'}
- agent-base@7.1.4:
- resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
- engines: {node: '>= 14'}
+ '@mapbox/point-geometry@1.1.0':
+ resolution: {integrity: sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==}
- ansi-regex@5.0.1:
- resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
- engines: {node: '>=8'}
+ '@mapbox/tiny-sdf@2.3.0':
+ resolution: {integrity: sha512-gBvcNDBBB66bgQYvnaJ6Jk+VCaMmVq5+IZR2kWPisT88Z8s0kBQt6hfVi8QgRW8Vpg0UWZzBA4ZSyzHHC+VeRA==}
- ansi-styles@4.3.0:
- resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
- engines: {node: '>=8'}
+ '@mapbox/unitbezier@1.0.0':
+ resolution: {integrity: sha512-fqd515fjBmANKGGsQ286E2Wvj/XvDFpGzwJxq4CI6jMQue6Oy04uCKp+JWKF00xRTmk6cEu1jPJ9p3xqH8YWqQ==}
- ast-types@0.13.4:
- resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==}
- engines: {node: '>=4'}
+ '@mapbox/vector-tile@3.0.0':
+ resolution: {integrity: sha512-Qf10S1uIHMk20ri/IVBnpS+esUEkVaR5Hftmz88jTInrpmWgPGJfPe3LVjjlE77trLx8tH6qjTG7uWH9hIq/0Q==}
- b4a@1.9.0:
- resolution: {integrity: sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==}
- peerDependencies:
- react-native-b4a: '*'
- peerDependenciesMeta:
- react-native-b4a:
- optional: true
+ '@maplibre/geojson-vt@6.3.3':
+ resolution: {integrity: sha512-sfftN4326foT7uex0aN0jqr+vq/lfgeTfASOd+kvdUd0uMMIgXZDPdntCazKFKKcxPH002NPCy4j396peanWCg==}
- bare-buffer@3.7.3:
- resolution: {integrity: sha512-77owW16RX6YgdOzddHtM0oGz8wsd0/F9k/0coz6TPmjUHnr/9FwWODVMNKwyYWM/a/ESdTum855nfQxnsKUygA==}
- engines: {bare: '>=1.20.0'}
+ '@maplibre/maplibre-gl-style-spec@26.8.0':
+ resolution: {integrity: sha512-EClj+0m624zGw5gdCOsI5f88bYzkXfgoP2Sj5VGs2AYg9hZaPxvCumX5KDDs6aKFwl2ut+3jAeLhvrSz7hEsBQ==}
+ hasBin: true
- bare-events@2.9.2:
- resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}
+ '@maplibre/mlt@1.3.0':
+ resolution: {integrity: sha512-7M2O7ABM80Oi8XPkfkrjKB8mOBIxGoVgkA52Mu4RMWoBvvMdagQ522+WxVYujZsMpqIr3BpzrTbXrm4k8lCzCQ==}
+
+ '@maplibre/vt-pbf@4.3.3':
+ resolution: {integrity: sha512-dEe5XUd64RQbxNxy2OzIkJnwNDWjVmSXjCd0A7zLirm7QJ/WWbmtDFIkfsiM4yt1cplqzG6oSivRYeWx1SM1yg==}
+
+ '@openuidev/devtools@0.3.1':
+ resolution: {integrity: sha512-kOCCsRGwY0w6xL1rVL1zOa9CO97ZrG6YGasRZyCv7FXaDAzbFkEgFy+FhYx6EP7sPKhkgr/jBqunADzhevpBDw==}
peerDependencies:
- bare-abort-controller: '*'
+ '@openuidev/observability': '>=0.0.4 <0.1.0'
+ '@openuidev/react-lang': '>=1.0.0 <2.0.0'
+ react: ^18.3.1 || ^19.0.0
+ react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
- bare-abort-controller:
+ '@openuidev/react-lang':
optional: true
- bare-fs@4.8.4:
- resolution: {integrity: sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==}
- engines: {bare: '>=1.28.0'}
+ '@openuidev/lang-core@1.0.2':
+ resolution: {integrity: sha512-mxrWXgSmGx9N8ZHFiRgvqCmCH8j3x0PTHJVRvtRPlucxDAihthgMR4W6RXJN5KnCl/5fk1SzcT9JHrvGTKcBFw==}
peerDependencies:
- bare-buffer: '*'
+ '@modelcontextprotocol/sdk': '>=1.0.0'
+ zod: ^3.25.0 || ^4.0.0
peerDependenciesMeta:
- bare-buffer:
+ '@modelcontextprotocol/sdk':
optional: true
- bare-path@3.1.3:
- resolution: {integrity: sha512-8r+FVU/o4zcFmpCDqbqAYhHHbtXPP+cyZKo7DRGRWc7OLlNs4TMaSQEpXL/sIdzyEG0M7RHw4B7xYMGrTc+qrg==}
+ '@openuidev/observability@0.0.4':
+ resolution: {integrity: sha512-4fjIrWu3TqTlfDE/m7cG10CH1vV7wQk5GPwMOmXeF9vJtkg92dg4Bdk3AjKgud7H7Xypwwjgt52VcLGZCE2CJQ==}
- bare-stream@2.13.4:
- resolution: {integrity: sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==}
+ '@openuidev/react-lang@1.0.2':
+ resolution: {integrity: sha512-nCNALKj71GmKo5x0dR10hr3LKf88MHxlkVgnsbYQdJTxBd3TbD9wqlgJkBcAZNFD4kPHINJ0iTdUAbR871XWBw==}
peerDependencies:
- bare-abort-controller: '*'
- bare-buffer: '*'
- bare-events: '*'
+ '@modelcontextprotocol/sdk': '>=1.0.0'
+ react: '*'
+ react-dom: '*'
+ react-native: '*'
+ zod: ^3.25.0 || ^4.0.0
peerDependenciesMeta:
- bare-abort-controller:
+ '@modelcontextprotocol/sdk':
optional: true
- bare-buffer:
+ react-dom:
optional: true
- bare-events:
+ react-native:
optional: true
- bare-url@2.5.8:
- resolution: {integrity: sha512-G5KTe5Bj6z5pqIxcn3lWlIFIv0rkXbccx0T0Xuf7t4RapfSWvFlcVbrwYXxFZ00PC4lp57OCIk6uXP/r3GbpDw==}
+ '@parcel/watcher-android-arm64@2.6.0':
+ resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [android]
- base64-js@1.5.1:
- resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+ '@parcel/watcher-darwin-arm64@2.6.0':
+ resolution: {integrity: sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [darwin]
- basic-ftp@5.3.1:
- resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==}
- engines: {node: '>=10.0.0'}
+ '@parcel/watcher-darwin-x64@2.6.0':
+ resolution: {integrity: sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [darwin]
- buffer-crc32@0.2.13:
- resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
+ '@parcel/watcher-freebsd-x64@2.6.0':
+ resolution: {integrity: sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [freebsd]
- buffer@5.7.1:
- resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
+ '@parcel/watcher-linux-arm-glibc@2.6.0':
+ resolution: {integrity: sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm]
+ os: [linux]
- chromium-bidi@0.5.8:
- resolution: {integrity: sha512-blqh+1cEQbHBKmok3rVJkBlBxt9beKBgOsxbFgs7UJcoVbbeZ+K7+6liAsjgpc8l1Xd55cQUy14fXZdGSb4zIw==}
- peerDependencies:
- devtools-protocol: '*'
+ '@parcel/watcher-linux-arm-musl@2.6.0':
+ resolution: {integrity: sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm]
+ os: [linux]
- cliui@8.0.1:
- resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
- engines: {node: '>=12'}
+ '@parcel/watcher-linux-arm64-glibc@2.6.0':
+ resolution: {integrity: sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [linux]
- color-convert@2.0.1:
- resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
- engines: {node: '>=7.0.0'}
+ '@parcel/watcher-linux-arm64-musl@2.6.0':
+ resolution: {integrity: sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [linux]
- color-name@1.1.4:
- resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
+ '@parcel/watcher-linux-x64-glibc@2.6.0':
+ resolution: {integrity: sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [linux]
- cross-fetch@4.0.0:
- resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==}
+ '@parcel/watcher-linux-x64-musl@2.6.0':
+ resolution: {integrity: sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [linux]
- data-uri-to-buffer@6.0.2:
- resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==}
- engines: {node: '>= 14'}
+ '@parcel/watcher-win32-arm64@2.6.0':
+ resolution: {integrity: sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [arm64]
+ os: [win32]
- debug@4.3.4:
- resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
- engines: {node: '>=6.0'}
- peerDependencies:
- supports-color: '*'
- peerDependenciesMeta:
- supports-color:
- optional: true
+ '@parcel/watcher-win32-x64@2.6.0':
+ resolution: {integrity: sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==}
+ engines: {node: '>= 10.0.0'}
+ cpu: [x64]
+ os: [win32]
- degenerator@5.0.1:
- resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==}
- engines: {node: '>= 14'}
+ '@parcel/watcher@2.6.0':
+ resolution: {integrity: sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==}
+ engines: {node: '>= 10.0.0'}
- detect-libc@2.1.2:
- resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
+ '@puppeteer/browsers@1.9.1':
+ resolution: {integrity: sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==}
+ engines: {node: '>=16.3.0'}
+ hasBin: true
+
+ '@rolldown/pluginutils@1.0.0-beta.27':
+ resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==}
+
+ '@rollup/rollup-android-arm-eabi@4.68.5':
+ resolution: {integrity: sha512-4iPGohjhOlA8ovAwOrHcbsLFw2X0lG49y2iWSlyLrRLJMO47D+XNM930CcGVQKPUpCsDfCdK3BV0y1ki6OBdhw==}
+ cpu: [arm]
+ os: [android]
+
+ '@rollup/rollup-android-arm64@4.68.5':
+ resolution: {integrity: sha512-mBK6NsYThYGRkGy8uX7fODOIT0YHz9UyvtYv/fhqdfEZw8Sg2kPiuUsQ8OmzRfq5ve0nHqZVDz2zLOy1xVaVzQ==}
+ cpu: [arm64]
+ os: [android]
+
+ '@rollup/rollup-android-x64@4.68.5':
+ resolution: {integrity: sha512-8D/A3B5bsLlBcVGsUN+IWcA0wreB+Fvmvs3PLBHyEq3itxGefdPsubG/tPHvezUKPTDAh05YoutzsVFDxkcrJQ==}
+ cpu: [x64]
+ os: [android]
+
+ '@rollup/rollup-darwin-arm64@4.68.5':
+ resolution: {integrity: sha512-xJVTzKZnwwQsQ5WA9cV4Q8l1SVYF9UyVa/3ECoCFfgtow4MUt7HcI3AB8Hwa/4790fimHPXzYfsuyMp67ErQ8w==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@rollup/rollup-darwin-x64@4.68.5':
+ resolution: {integrity: sha512-0Ft351J6xgaXhBtsRtV1qC1iFRSGzOoEpqbfIw5kPA1/R2ldOON8IVHx15XK6X46OI1QvxkETmWT+BIQxfHiOQ==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@rollup/rollup-freebsd-arm64@4.68.5':
+ resolution: {integrity: sha512-crcRf4EJ792/UuuPf8QduPogDOS9t6E7Mlkvgk8KSBQ/r+ZYyL4VKLEg4GmNmz4AUjq/Mr+4fHJ/RqtCFXq47w==}
+ cpu: [arm64]
+ os: [freebsd]
+
+ '@rollup/rollup-freebsd-x64@4.68.5':
+ resolution: {integrity: sha512-6SrbCoHnaFiipnX4TsDnQ74Zd8puOFQma6WdXDvnh0/Oy5Ash2RbNbeOdfbQNQOyNZe65eAg/G/U+EOoaR284w==}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@rollup/rollup-linux-arm-gnueabihf@4.68.5':
+ resolution: {integrity: sha512-Du8EftwTEY5i9H/VmLrvHrv8W4WpnLSvlT4/th5zQR10baXOQM/8Vn+q4MkNZrWwwulUuhuAUItevugalTNCLA==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/rollup-linux-arm-musleabihf@4.68.5':
+ resolution: {integrity: sha512-eT4t5h+qexha98N75YpiKMY1XDfimwkVL4TCHgQXr3JRFEqRacd38ldXB7dAAi5G62Mkuxlvw7VBHe5UXY2UHw==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/rollup-linux-arm64-gnu@4.68.5':
+ resolution: {integrity: sha512-jUsTbXqgd+cJlwgKePc56J8Yie+JZRWl7xiViSR2eQuloZ26PzWCS7ZJrCEZRmY7vrqhnvnbj6fP1ikinE0dfQ==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/rollup-linux-arm64-musl@4.68.5':
+ resolution: {integrity: sha512-HHjSkN3VAI8ZD45xEO4WcV5+yUB04vpR0r5g0ayLX8YfafV61hAIWoh8Qa22HujnxEtOXYDstF4qKbWGicI2RA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/rollup-linux-loong64-gnu@4.68.5':
+ resolution: {integrity: sha512-Y//CvF+v/RiwP6ZscB23xFU+x8BtSbRpwEnVb6140X1TBqSjrZwQwdH/hRCG2FKBaUF2sWsOVjdeZ5UmsF5Cqg==}
+ cpu: [loong64]
+ os: [linux]
+
+ '@rollup/rollup-linux-loong64-musl@4.68.5':
+ resolution: {integrity: sha512-O3fyuDSEV+sXQNTfVfZFPCdc5QymYVxS4PT7YXxsouO/LZhmYy8y6xNZJx9tBQCiR96c2sBfRNLRztkhnvahcg==}
+ cpu: [loong64]
+ os: [linux]
+
+ '@rollup/rollup-linux-ppc64-gnu@4.68.5':
+ resolution: {integrity: sha512-xIzFIoRROEVGJZBc/ljGteOcF/sA6Hjuz+x3zHNdcFc24xlVenPm3RPTOJfNvNVF0MZTyfGq1YYIhG4Tj/nYiA==}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@rollup/rollup-linux-ppc64-musl@4.68.5':
+ resolution: {integrity: sha512-srRfsMFnBDxlmpXwlStiwUSQ/4jCbR4u4i52pZg+bV+Anni0V5EmDeHGZ4YbmTIvM+XhcvEecFcjHmZWFWzVpA==}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@rollup/rollup-linux-riscv64-gnu@4.68.5':
+ resolution: {integrity: sha512-hkrVfI5WMnWaZg0vaM8DlJCRlIUhaRa3Z2BT99AuFl739uIcOnnvpYr7kVhUiPuCvHvWEPgExtXtgNRpBDuxbw==}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@rollup/rollup-linux-riscv64-musl@4.68.5':
+ resolution: {integrity: sha512-ZWDUe13obQhNg0qD1pkft3aWBZgDD26TO3ADvuJ2T9SN/T3h632VRVc+GDCjgRzEnd8a8yCOkl9opkkTPxhF0Q==}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@rollup/rollup-linux-s390x-gnu@4.68.5':
+ resolution: {integrity: sha512-9TsAn9NJQv5NsyGS4yOmJZGlM2ASrzQXC6pc6hrjduk5QwtoapONtooLiDSJlPq6+IAwhS2AdJ9+B8tidcdh5w==}
+ cpu: [s390x]
+ os: [linux]
+
+ '@rollup/rollup-linux-x64-gnu@4.68.5':
+ resolution: {integrity: sha512-JK5S9YhArjVwuetZ9nf6/GdpiXLl7DAVTdRUpF40wVMQNq28hkBrQI1+xy9sqjqtPvW08xagGPfBCBj5wLerZA==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/rollup-linux-x64-musl@4.68.5':
+ resolution: {integrity: sha512-pF0UxfDULcfZhdp5azfIvTW5c++AYjYs0Q8iTCzVCVzVH9+9e0Ah0vIZS3MIZbO7GoyPjTuPjAcUgQQvYbM81A==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/rollup-openbsd-x64@4.68.5':
+ resolution: {integrity: sha512-5bkgrD3xTj4pVAaKZ/D+GBWfWaJtorYRdj8i7nHcCsalDaIgiGVmCb/KucTO8P80UXCcPnqMJGcCS4xM94qsbw==}
+ cpu: [x64]
+ os: [openbsd]
+
+ '@rollup/rollup-openharmony-arm64@4.68.5':
+ resolution: {integrity: sha512-Fu+Jd8JWALOrVQdXTBfqUgkDXqWYqWAfjrpvSuvqYOVaSfwwi2wc9TORUEbbyd/8dsAmHLi04K9FnIwnjvWoJQ==}
+ cpu: [arm64]
+ os: [openharmony]
+
+ '@rollup/rollup-win32-arm64-msvc@4.68.5':
+ resolution: {integrity: sha512-WX+jUzphTWxca8eKMPtNSTW58aW6TxScbKQ3Tc0Nagjwrysy1Bu0Wl7BUt5STCPB+WM0EisGFFAyjfZ952f/JA==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@rollup/rollup-win32-ia32-msvc@4.68.5':
+ resolution: {integrity: sha512-z7EKzmD+jJQ3/ISVQSBkLptuUhtYcPf9Vamg8Ovf2jnZMN/Zvf5xCxHPh+TWPoUx9knc1al4EIOi6c9XayVXyQ==}
+ cpu: [ia32]
+ os: [win32]
+
+ '@rollup/rollup-win32-x64-gnu@4.68.5':
+ resolution: {integrity: sha512-VnHYErHaF8wRwdvq0A92NHmE1/u0sbuSgyTgGyOrH1vO14GWhu9aXERntg9SPnZoyK/LM+X4YawBE4g1FNkLBA==}
+ cpu: [x64]
+ os: [win32]
+
+ '@rollup/rollup-win32-x64-msvc@4.68.5':
+ resolution: {integrity: sha512-gVfBrzSqeYl0/QRJegeK9njmGxojS3oiU9cAHNY0wU22AjS44dGzt4WnnuYsTCNO8P40H4Ulykg8cxq2zWWo9Q==}
+ cpu: [x64]
+ os: [win32]
+
+ '@tootallnate/quickjs-emscripten@0.23.0':
+ resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}
+
+ '@types/babel__core@7.20.5':
+ resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
+
+ '@types/babel__generator@7.27.0':
+ resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==}
+
+ '@types/babel__template@7.4.4':
+ resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==}
+
+ '@types/babel__traverse@7.28.0':
+ resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}
+
+ '@types/debug@4.1.13':
+ resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==}
+
+ '@types/estree-jsx@1.0.5':
+ resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
+
+ '@types/estree@1.0.10':
+ resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==}
+
+ '@types/geojson@7946.0.16':
+ resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==}
+
+ '@types/hast@3.0.5':
+ resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==}
+
+ '@types/mdast@4.0.4':
+ resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
+
+ '@types/ms@2.1.0':
+ resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
+
+ '@types/node@26.6.6':
+ resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==}
+
+ '@types/react@19.3.0':
+ resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==}
+
+ '@types/unist@2.0.11':
+ resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}
+
+ '@types/unist@3.0.3':
+ resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
+
+ '@types/yauzl@2.10.3':
+ resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
+
+ '@ungap/structured-clone@1.4.0':
+ resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==}
+
+ '@vitejs/plugin-react@4.7.0':
+ resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ peerDependencies:
+ vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
+
+ '@xterm/addon-fit@0.12.0-beta.141':
+ resolution: {integrity: sha512-VwmjkK5JxfQOr7RLNKMrJz0j/m3fjW+iqw3/GHqlH0r+rBQUyuBbiV9vuHNfEFtNe6H9DcyjWLwOuyqTN00PJg==}
+ peerDependencies:
+ '@xterm/xterm': ^6.1.0-beta.141
+
+ '@xterm/xterm@6.1.0-beta.141':
+ resolution: {integrity: sha512-dwcmHvdFfekzNkb6lirSZnkSET21LKBwlwyRENTsIeU2U+4u0MFztUjO44e+MpDR0y+Mv/eeQza0mvhnkmC1Mg==}
+
+ agent-base@7.1.4:
+ resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
+ engines: {node: '>= 14'}
+
+ ansi-regex@5.0.1:
+ resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
+ engines: {node: '>=8'}
+
+ ansi-styles@4.3.0:
+ resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
+ engines: {node: '>=8'}
+
+ ast-types@0.13.4:
+ resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==}
+ engines: {node: '>=4'}
+
+ b4a@1.9.0:
+ resolution: {integrity: sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==}
+ peerDependencies:
+ react-native-b4a: '*'
+ peerDependenciesMeta:
+ react-native-b4a:
+ optional: true
+
+ bail@2.0.2:
+ resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
+
+ bare-buffer@3.7.3:
+ resolution: {integrity: sha512-77owW16RX6YgdOzddHtM0oGz8wsd0/F9k/0coz6TPmjUHnr/9FwWODVMNKwyYWM/a/ESdTum855nfQxnsKUygA==}
+ engines: {bare: '>=1.20.0'}
+
+ bare-events@2.9.2:
+ resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}
+ peerDependencies:
+ bare-abort-controller: '*'
+ peerDependenciesMeta:
+ bare-abort-controller:
+ optional: true
+
+ bare-fs@4.8.4:
+ resolution: {integrity: sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==}
+ engines: {bare: '>=1.28.0'}
+ peerDependencies:
+ bare-buffer: '*'
+ peerDependenciesMeta:
+ bare-buffer:
+ optional: true
+
+ bare-path@3.1.3:
+ resolution: {integrity: sha512-8r+FVU/o4zcFmpCDqbqAYhHHbtXPP+cyZKo7DRGRWc7OLlNs4TMaSQEpXL/sIdzyEG0M7RHw4B7xYMGrTc+qrg==}
+
+ bare-stream@2.13.4:
+ resolution: {integrity: sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==}
+ peerDependencies:
+ bare-abort-controller: '*'
+ bare-buffer: '*'
+ bare-events: '*'
+ peerDependenciesMeta:
+ bare-abort-controller:
+ optional: true
+ bare-buffer:
+ optional: true
+ bare-events:
+ optional: true
+
+ bare-url@2.5.8:
+ resolution: {integrity: sha512-G5KTe5Bj6z5pqIxcn3lWlIFIv0rkXbccx0T0Xuf7t4RapfSWvFlcVbrwYXxFZ00PC4lp57OCIk6uXP/r3GbpDw==}
+
+ base64-js@1.5.1:
+ resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+
+ baseline-browser-mapping@2.11.38:
+ resolution: {integrity: sha512-rMgy5YW7x28SMfXHLlVZDBqlWzYZ0x2rVR/6FWrNBF0chjigARK1H6nM0hKA1Um3kPOlkQFVtjJs00d2N1ezuw==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+
+ basic-ftp@5.3.1:
+ resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==}
+ engines: {node: '>=10.0.0'}
+
+ bidi-js@1.1.0:
+ resolution: {integrity: sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==}
+
+ browserslist@4.29.6:
+ resolution: {integrity: sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==}
+ engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
+ hasBin: true
+
+ buffer-crc32@0.2.13:
+ resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
+
+ buffer@5.7.1:
+ resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
+
+ caniuse-lite@1.0.30001826:
+ resolution: {integrity: sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA==}
+
+ ccount@2.0.1:
+ resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
+
+ character-entities-html4@2.1.0:
+ resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
+
+ character-entities-legacy@3.0.0:
+ resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==}
+
+ character-entities@2.0.2:
+ resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==}
+
+ character-reference-invalid@2.0.1:
+ resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==}
+
+ chokidar@5.0.0:
+ resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==}
+ engines: {node: '>= 20.19.0'}
+
+ chromium-bidi@0.5.8:
+ resolution: {integrity: sha512-blqh+1cEQbHBKmok3rVJkBlBxt9beKBgOsxbFgs7UJcoVbbeZ+K7+6liAsjgpc8l1Xd55cQUy14fXZdGSb4zIw==}
+ peerDependencies:
+ devtools-protocol: '*'
+
+ ci-info@4.5.0:
+ resolution: {integrity: sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==}
+ engines: {node: '>=8'}
+
+ cliui@8.0.1:
+ resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
+ engines: {node: '>=12'}
+
+ color-convert@2.0.1:
+ resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
+ engines: {node: '>=7.0.0'}
+
+ color-name@1.1.4:
+ resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
+
+ comma-separated-tokens@2.0.3:
+ resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
+
+ commander@8.3.0:
+ resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
+ engines: {node: '>= 12'}
+
+ convert-source-map@2.0.0:
+ resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
+
+ cross-fetch@4.0.0:
+ resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==}
+
+ csstype@3.2.4:
+ resolution: {integrity: sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==}
+
+ data-uri-to-buffer@6.0.2:
+ resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==}
+ engines: {node: '>= 14'}
+
+ debug@4.3.4:
+ resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
+ engines: {node: '>=6.0'}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+
+ decode-named-character-reference@1.3.0:
+ resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==}
+
+ degenerator@5.0.1:
+ resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==}
+ engines: {node: '>= 14'}
+
+ dequal@2.0.3:
+ resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
+ engines: {node: '>=6'}
+
+ detect-libc@2.1.2:
+ resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
engines: {node: '>=8'}
+ devlop@1.1.0:
+ resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
+
devtools-protocol@0.0.1232444:
resolution: {integrity: sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg==}
+ earcut@3.2.4:
+ resolution: {integrity: sha512-FHc6yNpnTORB0tM5kmZ03iD2mDuNakDE2lvf4Hw1XkfxtEHIGVi01B/GqUSwx+NcC1WGjidAfpTXzeALtPtfpg==}
+
+ electron-to-chromium@1.5.488:
+ resolution: {integrity: sha512-Uox8y5IeRGB/uXNMNSPfWaiI5/8d/2XG125oc+f2C5JniHcoMxsbCXcVFRZnIsdrgPwZQ6/k5SbSxhBirqQPuA==}
+
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -500,10 +1203,19 @@ packages:
engines: {node: '>=18'}
hasBin: true
+ esbuild@0.28.2:
+ resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==}
+ engines: {node: '>=18'}
+ hasBin: true
+
escalade@3.2.0:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
+ escape-string-regexp@5.0.0:
+ resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
+ engines: {node: '>=12'}
+
escodegen@2.1.0:
resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==}
engines: {node: '>=6.0'}
@@ -518,6 +1230,9 @@ packages:
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
engines: {node: '>=4.0'}
+ estree-util-is-identifier-name@3.0.0:
+ resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==}
+
esutils@2.0.3:
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
engines: {node: '>=0.10.0'}
@@ -525,6 +1240,9 @@ packages:
events-universal@1.0.1:
resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==}
+ extend@3.0.2:
+ resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
+
extract-zip@2.0.1:
resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==}
engines: {node: '>= 10.17.0'}
@@ -536,6 +1254,24 @@ packages:
fd-slicer@1.1.0:
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
+ fdir@6.5.0:
+ resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ picomatch: ^3 || ^4
+ peerDependenciesMeta:
+ picomatch:
+ optional: true
+
+ fsevents@2.3.3:
+ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
+ gensync@1.0.0-beta.2:
+ resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
+ engines: {node: '>=6.9.0'}
+
get-caller-file@2.0.5:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
@@ -548,6 +1284,18 @@ packages:
resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==}
engines: {node: '>= 14'}
+ gl-matrix@3.4.4:
+ resolution: {integrity: sha512-latSnyDNt/8zYUB6VIJ6PCh2jBjJX6gnDsoCZ7LyW7GkqrD51EWwa9qCoGixj8YqBtETQK/xY7OmpTF8xz1DdQ==}
+
+ hast-util-to-jsx-runtime@2.3.7:
+ resolution: {integrity: sha512-F7DNV2NMcTxA4GqPVHnXzX+mpoPHAIY9rJAVH3CZ1FdBZOcBUEjUuvMkMpHVs/sicEtznh9tMGj5WUR9S4E2rg==}
+
+ hast-util-whitespace@3.0.0:
+ resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}
+
+ html-url-attributes@3.0.1:
+ resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}
+
http-proxy-agent@7.0.2:
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
engines: {node: '>= 14'}
@@ -559,18 +1307,233 @@ packages:
ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
+ immutable@5.2.1:
+ resolution: {integrity: sha512-CgXNM1BhKqpMjFHTyqQSk09OWqzHNJ/U4BdeBgXoBdR2DdgBdOSv131cO1/YMgzopqnka3B/i949UaMLEKUxOA==}
+
+ inline-style-parser@0.2.9:
+ resolution: {integrity: sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg==}
+
ip-address@10.7.6:
resolution: {integrity: sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==}
engines: {node: '>= 12'}
+ is-alphabetical@2.0.1:
+ resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==}
+
+ is-alphanumerical@2.0.1:
+ resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==}
+
+ is-decimal@2.0.1:
+ resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==}
+
+ is-extglob@2.1.1:
+ resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
+ engines: {node: '>=0.10.0'}
+
is-fullwidth-code-point@3.0.0:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
+ is-glob@4.0.3:
+ resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
+ engines: {node: '>=0.10.0'}
+
+ is-hexadecimal@2.0.1:
+ resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==}
+
+ is-plain-obj@4.1.0:
+ resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}
+ engines: {node: '>=12'}
+
+ js-tokens@4.0.0:
+ resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
+
+ jsesc@3.1.0:
+ resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==}
+ engines: {node: '>=6'}
+ hasBin: true
+
+ json-stringify-pretty-compact@4.0.0:
+ resolution: {integrity: sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==}
+
+ json5@2.2.3:
+ resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
+ engines: {node: '>=6'}
+ hasBin: true
+
+ katex@0.16.47:
+ resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==}
+ hasBin: true
+
+ kdbush@4.1.0:
+ resolution: {integrity: sha512-e9vurzrXJQrFX6ckpHP3bvj5l+9CnYzkxDNnNQ1h2QTqdWsUAJgXiKdGNcOa1EY85dU8KbQ+z/FdQdB7P+9yfQ==}
+
+ longest-streak@3.1.0:
+ resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
+
+ loose-envify@1.4.0:
+ resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
+ hasBin: true
+
+ lru-cache@5.1.1:
+ resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+
lru-cache@7.18.3:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
+ lucide-react@0.560.0:
+ resolution: {integrity: sha512-NwKoUA/aBShsdL8WE5lukV2F/tjHzQRlonQs7fkNGI1sCT0Ay4a9Ap3ST2clUUkcY+9eQ0pBe2hybTQd2fmyDA==}
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+
+ lucide-react@0.575.0:
+ resolution: {integrity: sha512-VuXgKZrk0uiDlWjGGXmKV6MSk9Yy4l10qgVvzGn2AWBx1Ylt0iBexKOAoA6I7JO3m+M9oeovJd3yYENfkUbOeg==}
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+
+ maplibre-gl@6.19.0:
+ resolution: {integrity: sha512-3bOrnfddggUYudLGJFsYFvqulUyvSxy4iQzd/uURI7ZhgYEZifdSrECujRSghaCpc+v/ZsFI0Y6ZsGSilEtE+w==}
+ engines: {node: '>=16.14.0', npm: '>=8.1.0'}
+
+ markdown-table@3.1.0:
+ resolution: {integrity: sha512-xpeSCdM+B+6P3ncfgaB7FoDbtJ30xAe6Z18TGT7AgXJsHqCElCICZovQqdRMm7kHgpTyYv36EupqewoFFSB8vw==}
+
+ mdast-util-find-and-replace@3.0.4:
+ resolution: {integrity: sha512-z4B5c6jrnJ1ltOQemhWYPBSAo6y42Z8Gt2yEgfgNTMcLSU59B8bfj8Z8AnAlJrBGLnqkdAUZ7jdDEqQw3KuipQ==}
+
+ mdast-util-from-markdown@2.1.0:
+ resolution: {integrity: sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A==}
+
+ mdast-util-gfm-autolink-literal@2.1.0:
+ resolution: {integrity: sha512-Jx6QSK8wDo558Bcf7q+1pe0v81g2PVs09Hlvu9xJHmCFRF3sAPW7vXFVIAwBncs3sde92WbsVqNxwdqViA2XnQ==}
+
+ mdast-util-gfm-footnote@2.1.0:
+ resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==}
+
+ mdast-util-gfm-strikethrough@2.0.1:
+ resolution: {integrity: sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw==}
+
+ mdast-util-gfm-table@2.0.1:
+ resolution: {integrity: sha512-fiIjPrAy4kz68/eFbPHhsiWDGHhqUSVoU1XsfLM5DsEPXw7MxgiVVyulUggFRckVWeT1KXQXkg5vm3kv4oMSOA==}
+
+ mdast-util-gfm-task-list-item@2.0.1:
+ resolution: {integrity: sha512-jXVO1hvB2hs82g1esi7I9nIJDqiijbQLIyH2jDUb5s7jIAZMr/79h0VHSq7XHKTqpLARRm+DDNjduB7S9+6XZA==}
+
+ mdast-util-gfm@3.1.0:
+ resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==}
+
+ mdast-util-mdx-expression@2.0.1:
+ resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==}
+
+ mdast-util-mdx-jsx@3.2.1:
+ resolution: {integrity: sha512-oXp1GIa+E9IwIs3a106+tr3Bz2MlTTBvlXjOZMoIat11kk7vjqgmBnksB9WHmWv+gZh7k3IUgpAHlwHB7DH4GQ==}
+
+ mdast-util-mdxjs-esm@2.0.1:
+ resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==}
+
+ mdast-util-phrasing@4.1.0:
+ resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==}
+
+ mdast-util-to-hast@13.2.2:
+ resolution: {integrity: sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==}
+
+ mdast-util-to-markdown@2.2.3:
+ resolution: {integrity: sha512-dImdB6VZRMRac1SwAW6o1c0ESk/7pFFAMCMuKM+9v7LpTSthMM5nzXpqKw4Mjo66aXVKhNkyrP4bMB9MurPyWg==}
+
+ mdast-util-to-string@4.0.0:
+ resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==}
+
+ micromark-core-commonmark@2.0.4:
+ resolution: {integrity: sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==}
+
+ micromark-extension-gfm-autolink-literal@2.1.0:
+ resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==}
+
+ micromark-extension-gfm-footnote@2.1.0:
+ resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==}
+
+ micromark-extension-gfm-strikethrough@2.1.0:
+ resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==}
+
+ micromark-extension-gfm-table@2.1.2:
+ resolution: {integrity: sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==}
+
+ micromark-extension-gfm-tagfilter@2.0.0:
+ resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==}
+
+ micromark-extension-gfm-task-list-item@2.1.0:
+ resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==}
+
+ micromark-extension-gfm@3.0.0:
+ resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==}
+
+ micromark-factory-destination@2.0.1:
+ resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==}
+
+ micromark-factory-label@2.0.1:
+ resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==}
+
+ micromark-factory-space@2.1.0:
+ resolution: {integrity: sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q==}
+
+ micromark-factory-title@2.0.1:
+ resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==}
+
+ micromark-factory-whitespace@2.0.1:
+ resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==}
+
+ micromark-util-character@2.1.1:
+ resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==}
+
+ micromark-util-chunked@2.0.1:
+ resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==}
+
+ micromark-util-classify-character@2.0.1:
+ resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==}
+
+ micromark-util-combine-extensions@2.0.1:
+ resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==}
+
+ micromark-util-decode-numeric-character-reference@2.0.2:
+ resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==}
+
+ micromark-util-decode-string@2.0.1:
+ resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==}
+
+ micromark-util-edit-map@1.0.0:
+ resolution: {integrity: sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==}
+
+ micromark-util-encode@2.0.1:
+ resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==}
+
+ micromark-util-html-tag-name@2.0.1:
+ resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==}
+
+ micromark-util-normalize-identifier@2.0.1:
+ resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==}
+
+ micromark-util-resolve-all@2.0.1:
+ resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==}
+
+ micromark-util-sanitize-uri@2.0.1:
+ resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==}
+
+ micromark-util-subtokenize@2.1.0:
+ resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==}
+
+ micromark-util-symbol@2.0.1:
+ resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==}
+
+ micromark-util-types@2.0.3:
+ resolution: {integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==}
+
+ micromark@4.0.3:
+ resolution: {integrity: sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==}
+
+ minimist@1.2.8:
+ resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
+
mitt@3.0.1:
resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
@@ -580,10 +1543,21 @@ packages:
ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
+ murmurhash-js@1.0.0:
+ resolution: {integrity: sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw==}
+
+ nanoid@3.3.20:
+ resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==}
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
+ hasBin: true
+
netmask@2.1.1:
resolution: {integrity: sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==}
engines: {node: '>= 0.4.0'}
+ node-addon-api@7.1.1:
+ resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
+
node-fetch@2.7.0:
resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
engines: {node: 4.x || >=6.0.0}
@@ -593,6 +1567,10 @@ packages:
encoding:
optional: true
+ node-releases@2.0.65:
+ resolution: {integrity: sha512-PfvofsGQ+MiOQIPkX9fU8ELUWmy5zL74CdQaph/ismKszfFkfwXaw0cGiwbwym2hT9k5+mdyl8O5WQ1MD8EHmA==}
+ engines: {node: '>=18'}
+
once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
@@ -604,13 +1582,40 @@ packages:
resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==}
engines: {node: '>= 14'}
+ parse-entities@4.0.2:
+ resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==}
+
+ pbf@5.1.2:
+ resolution: {integrity: sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w==}
+ hasBin: true
+
pend@1.2.0:
resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}
+ picocolors@1.1.1:
+ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
+
+ picomatch@4.0.7:
+ resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
+ engines: {node: '>=12'}
+
+ postcss@8.5.33:
+ resolution: {integrity: sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==}
+ engines: {node: ^10 || ^12 || >=14}
+
+ potpack@2.1.0:
+ resolution: {integrity: sha512-pcaShQc1Shq0y+E7GqJqvZj8DTthWV1KeHGdi0Z6IAin2Oi3JnLCOfwnCo84qc+HAp52wT9nK9H7FAJp5a44GQ==}
+
progress@2.0.3:
resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
engines: {node: '>=0.4.0'}
+ property-information@7.2.0:
+ resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==}
+
+ protocol-buffers-schema@3.6.1:
+ resolution: {integrity: sha512-VG2K63Igkiv9p76tk1lilczEK1cT+kCjKtkdhw1dQZV3k3IXJbd3o6Ho8b9zJZaHSnT2hKe4I+ObmX9w6m5SmQ==}
+
proxy-agent@6.3.1:
resolution: {integrity: sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==}
engines: {node: '>= 14'}
@@ -625,10 +1630,72 @@ packages:
resolution: {integrity: sha512-ArbnyA3U5SGHokEvkfWjW+O8hOxV1RSJxOgriX/3A4xZRqixt9ZFHD0yPgZQF05Qj0oAqi8H/7stDorjoHY90Q==}
engines: {node: '>=16.13.2'}
+ quickselect@3.0.0:
+ resolution: {integrity: sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==}
+
+ react-dom@18.3.1:
+ resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
+ peerDependencies:
+ react: ^18.3.1
+
+ react-markdown@10.1.0:
+ resolution: {integrity: sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==}
+ peerDependencies:
+ '@types/react': '>=18'
+ react: '>=18'
+
+ react-refresh@0.17.0:
+ resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==}
+ engines: {node: '>=0.10.0'}
+
+ react@18.3.1:
+ resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
+ engines: {node: '>=0.10.0'}
+
+ readdirp@5.1.1:
+ resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==}
+ engines: {node: '>= 20.19.0'}
+
+ remark-gfm@4.0.1:
+ resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==}
+
+ remark-parse@11.0.0:
+ resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==}
+
+ remark-rehype@11.1.2:
+ resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==}
+
+ remark-stringify@11.0.0:
+ resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}
+
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
+ require-from-string@2.0.2:
+ resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
+ engines: {node: '>=0.10.0'}
+
+ resolve-protobuf-schema@2.1.0:
+ resolution: {integrity: sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==}
+
+ rollup@4.68.5:
+ resolution: {integrity: sha512-m6toRYCueVCY+5aEIriX7Dc36g3EHzn3Wk7xCW5aGgCQtTo4uXLZiZPNhDFMmPfVSvC92y3wEwIP2DCUp/ukXg==}
+ engines: {node: '>=18.0.0', npm: '>=8.0.0'}
+ hasBin: true
+
+ sass@1.108.2:
+ resolution: {integrity: sha512-kugK8djotnG9HQRPTOf36asKYlxg8rWWsNLYHOgWDIVOiZQqlRfKBgF4XXM6kfw146kIDMvm57B4GIkvDSyTzA==}
+ engines: {node: '>=20.19.0'}
+ hasBin: true
+
+ scheduler@0.23.2:
+ resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
+
+ semver@6.3.2:
+ resolution: {integrity: sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==}
+ hasBin: true
+
semver@7.8.6:
resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==}
engines: {node: '>=10'}
@@ -650,10 +1717,17 @@ packages:
resolution: {integrity: sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==}
engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
+ source-map-js@1.2.2:
+ resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==}
+ engines: {node: '>=0.10.0'}
+
source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
+ space-separated-tokens@2.0.2:
+ resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
+
streamx@2.28.1:
resolution: {integrity: sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==}
@@ -661,10 +1735,16 @@ packages:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
+ stringify-entities@4.0.4:
+ resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==}
+
strip-ansi@6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
+ style-to-object@2.0.2:
+ resolution: {integrity: sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA==}
+
tar-fs@3.0.4:
resolution: {integrity: sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==}
@@ -680,9 +1760,22 @@ packages:
through@2.3.8:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
+ tinyglobby@0.2.17:
+ resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}
+ engines: {node: '>=12.0.0'}
+
+ tinyqueue@3.0.0:
+ resolution: {integrity: sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==}
+
tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
+ trim-lines@3.0.1:
+ resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
+
+ trough@2.2.0:
+ resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==}
+
tslib@2.9.1:
resolution: {integrity: sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==}
@@ -697,55 +1790,264 @@ packages:
undici-types@8.9.0:
resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
+ unified@11.0.5:
+ resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}
+
+ unist-util-is@6.0.1:
+ resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==}
+
+ unist-util-position@5.0.0:
+ resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}
+
+ unist-util-stringify-position@4.0.0:
+ resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==}
+
+ unist-util-visit-parents@6.1.0:
+ resolution: {integrity: sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==}
+
+ unist-util-visit@5.2.0:
+ resolution: {integrity: sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==}
+
+ update-browserslist-db@1.4.0:
+ resolution: {integrity: sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==}
+ hasBin: true
+ peerDependencies:
+ browserslist: '>= 4.21.0'
+
urlpattern-polyfill@10.0.0:
resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==}
+ vfile-message@4.0.4:
+ resolution: {integrity: sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==}
+
+ vfile@6.0.3:
+ resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
+
+ vite@7.3.8:
+ resolution: {integrity: sha512-3tTi78MAKhVk9h+YZVXMQ8POmneJuE97QUPAWtJghHzhH7BAyiqQOC2KZh1DWOsu/USB2cRXhznPByaabvYXfw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': ^20.19.0 || >=22.12.0
+ jiti: '>=1.21.0'
+ less: ^4.0.0
+ lightningcss: ^1.21.0
+ sass: ^1.70.0
+ sass-embedded: ^1.70.0
+ stylus: '>=0.54.8'
+ sugarss: ^5.0.0
+ terser: ^5.16.0
+ tsx: ^4.8.1
+ yaml: ^2.4.2
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ jiti:
+ optional: true
+ less:
+ optional: true
+ lightningcss:
+ optional: true
+ sass:
+ optional: true
+ sass-embedded:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+ tsx:
+ optional: true
+ yaml:
+ optional: true
+
webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
- whatwg-url@5.0.0:
- resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
+ whatwg-url@5.0.0:
+ resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
+
+ wrap-ansi@7.0.0:
+ resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
+ engines: {node: '>=10'}
+
+ wrappy@1.0.2:
+ resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+
+ ws@8.16.0:
+ resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
+ y18n@5.0.8:
+ resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
+ engines: {node: '>=10'}
+
+ yallist@3.1.1:
+ resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
+
+ yaml@2.8.1:
+ resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
+ engines: {node: '>= 14.6'}
+ hasBin: true
+
+ yargs-parser@21.1.1:
+ resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
+ engines: {node: '>=12'}
+
+ yargs@17.7.2:
+ resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
+ engines: {node: '>=12'}
+
+ yauzl@2.10.0:
+ resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==}
+
+ zod@4.6.7:
+ resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==}
+
+ zustand@5.1.0:
+ resolution: {integrity: sha512-ciJZlP48M1PTQbVQq81CGVFxHTLpZNrFjKqwjtCU34AWuXTZT/jrF3p9+fI84Cf1eSCMLapxqBy/SNTfwOBuqA==}
+ engines: {node: '>=12.20.0'}
+ peerDependencies:
+ '@types/react': '>=18.0.0'
+ immer: '>=9.0.6'
+ react: '>=18.0.0'
+ use-sync-external-store: '>=1.2.0'
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ immer:
+ optional: true
+ react:
+ optional: true
+ use-sync-external-store:
+ optional: true
+
+ zwitch@2.0.4:
+ resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
+
+snapshots:
+
+ '@babel/code-frame@7.29.7':
+ dependencies:
+ '@babel/helper-validator-identifier': 7.29.7
+ js-tokens: 4.0.0
+ picocolors: 1.1.1
+
+ '@babel/compat-data@7.29.7': {}
+
+ '@babel/core@7.29.13':
+ dependencies:
+ '@babel/code-frame': 7.29.7
+ '@babel/generator': 7.29.14
+ '@babel/helper-compilation-targets': 7.29.13
+ '@babel/helper-module-transforms': 7.29.14(@babel/core@7.29.13)
+ '@babel/helpers': 7.29.14
+ '@babel/parser': 7.29.14
+ '@babel/template': 7.29.7
+ '@babel/traverse': 7.29.14
+ '@babel/types': 7.29.14
+ '@jridgewell/remapping': 2.3.5
+ convert-source-map: 2.0.0
+ debug: 4.3.4
+ gensync: 1.0.0-beta.2
+ json5: 2.2.3
+ semver: 6.3.2
+ transitivePeerDependencies:
+ - supports-color
+
+ '@babel/generator@7.29.14':
+ dependencies:
+ '@babel/parser': 7.29.14
+ '@babel/types': 7.29.14
+ '@jridgewell/gen-mapping': 0.3.13
+ '@jridgewell/trace-mapping': 0.3.31
+ jsesc: 3.1.0
+
+ '@babel/helper-compilation-targets@7.29.13':
+ dependencies:
+ '@babel/compat-data': 7.29.7
+ '@babel/helper-validator-option': 7.29.7
+ browserslist: 4.29.6
+ lru-cache: 5.1.1
+ semver: 6.3.2
+
+ '@babel/helper-globals@7.29.7': {}
+
+ '@babel/helper-module-imports@7.29.7':
+ dependencies:
+ '@babel/traverse': 7.29.14
+ '@babel/types': 7.29.14
+ transitivePeerDependencies:
+ - supports-color
+
+ '@babel/helper-module-transforms@7.29.14(@babel/core@7.29.13)':
+ dependencies:
+ '@babel/core': 7.29.13
+ '@babel/helper-module-imports': 7.29.7
+ '@babel/helper-validator-identifier': 7.29.7
+ '@babel/traverse': 7.29.14
+ transitivePeerDependencies:
+ - supports-color
+
+ '@babel/helper-plugin-utils@7.29.7': {}
+
+ '@babel/helper-string-parser@7.29.14': {}
- wrap-ansi@7.0.0:
- resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
- engines: {node: '>=10'}
+ '@babel/helper-validator-identifier@7.29.7': {}
- wrappy@1.0.2:
- resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ '@babel/helper-validator-option@7.29.7': {}
- ws@8.16.0:
- resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==}
- engines: {node: '>=10.0.0'}
- peerDependencies:
- bufferutil: ^4.0.1
- utf-8-validate: '>=5.0.2'
- peerDependenciesMeta:
- bufferutil:
- optional: true
- utf-8-validate:
- optional: true
+ '@babel/helpers@7.29.14':
+ dependencies:
+ '@babel/template': 7.29.7
+ '@babel/types': 7.29.14
- y18n@5.0.8:
- resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
- engines: {node: '>=10'}
+ '@babel/parser@7.29.14':
+ dependencies:
+ '@babel/types': 7.29.14
- yaml@2.8.1:
- resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
- engines: {node: '>= 14.6'}
- hasBin: true
+ '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.13)':
+ dependencies:
+ '@babel/core': 7.29.13
+ '@babel/helper-plugin-utils': 7.29.7
- yargs-parser@21.1.1:
- resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
- engines: {node: '>=12'}
+ '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.13)':
+ dependencies:
+ '@babel/core': 7.29.13
+ '@babel/helper-plugin-utils': 7.29.7
- yargs@17.7.2:
- resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
- engines: {node: '>=12'}
+ '@babel/template@7.29.7':
+ dependencies:
+ '@babel/code-frame': 7.29.7
+ '@babel/parser': 7.29.14
+ '@babel/types': 7.29.14
- yauzl@2.10.0:
- resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==}
+ '@babel/traverse@7.29.14':
+ dependencies:
+ '@babel/code-frame': 7.29.7
+ '@babel/generator': 7.29.14
+ '@babel/helper-globals': 7.29.7
+ '@babel/parser': 7.29.14
+ '@babel/template': 7.29.7
+ '@babel/types': 7.29.14
+ debug: 4.3.4
+ transitivePeerDependencies:
+ - supports-color
-snapshots:
+ '@babel/types@7.29.14':
+ dependencies:
+ '@babel/helper-string-parser': 7.29.14
+ '@babel/helper-validator-identifier': 7.29.7
'@emnapi/runtime@1.11.3':
dependencies:
@@ -755,81 +2057,159 @@ snapshots:
'@esbuild/aix-ppc64@0.25.12':
optional: true
+ '@esbuild/aix-ppc64@0.28.2':
+ optional: true
+
'@esbuild/android-arm64@0.25.12':
optional: true
+ '@esbuild/android-arm64@0.28.2':
+ optional: true
+
'@esbuild/android-arm@0.25.12':
optional: true
+ '@esbuild/android-arm@0.28.2':
+ optional: true
+
'@esbuild/android-x64@0.25.12':
optional: true
+ '@esbuild/android-x64@0.28.2':
+ optional: true
+
'@esbuild/darwin-arm64@0.25.12':
optional: true
+ '@esbuild/darwin-arm64@0.28.2':
+ optional: true
+
'@esbuild/darwin-x64@0.25.12':
optional: true
+ '@esbuild/darwin-x64@0.28.2':
+ optional: true
+
'@esbuild/freebsd-arm64@0.25.12':
optional: true
+ '@esbuild/freebsd-arm64@0.28.2':
+ optional: true
+
'@esbuild/freebsd-x64@0.25.12':
optional: true
+ '@esbuild/freebsd-x64@0.28.2':
+ optional: true
+
'@esbuild/linux-arm64@0.25.12':
optional: true
+ '@esbuild/linux-arm64@0.28.2':
+ optional: true
+
'@esbuild/linux-arm@0.25.12':
optional: true
+ '@esbuild/linux-arm@0.28.2':
+ optional: true
+
'@esbuild/linux-ia32@0.25.12':
optional: true
+ '@esbuild/linux-ia32@0.28.2':
+ optional: true
+
'@esbuild/linux-loong64@0.25.12':
optional: true
+ '@esbuild/linux-loong64@0.28.2':
+ optional: true
+
'@esbuild/linux-mips64el@0.25.12':
optional: true
+ '@esbuild/linux-mips64el@0.28.2':
+ optional: true
+
'@esbuild/linux-ppc64@0.25.12':
optional: true
+ '@esbuild/linux-ppc64@0.28.2':
+ optional: true
+
'@esbuild/linux-riscv64@0.25.12':
optional: true
+ '@esbuild/linux-riscv64@0.28.2':
+ optional: true
+
'@esbuild/linux-s390x@0.25.12':
optional: true
+ '@esbuild/linux-s390x@0.28.2':
+ optional: true
+
'@esbuild/linux-x64@0.25.12':
optional: true
+ '@esbuild/linux-x64@0.28.2':
+ optional: true
+
'@esbuild/netbsd-arm64@0.25.12':
optional: true
+ '@esbuild/netbsd-arm64@0.28.2':
+ optional: true
+
'@esbuild/netbsd-x64@0.25.12':
optional: true
+ '@esbuild/netbsd-x64@0.28.2':
+ optional: true
+
'@esbuild/openbsd-arm64@0.25.12':
optional: true
+ '@esbuild/openbsd-arm64@0.28.2':
+ optional: true
+
'@esbuild/openbsd-x64@0.25.12':
optional: true
+ '@esbuild/openbsd-x64@0.28.2':
+ optional: true
+
'@esbuild/openharmony-arm64@0.25.12':
optional: true
+ '@esbuild/openharmony-arm64@0.28.2':
+ optional: true
+
'@esbuild/sunos-x64@0.25.12':
optional: true
+ '@esbuild/sunos-x64@0.28.2':
+ optional: true
+
'@esbuild/win32-arm64@0.25.12':
optional: true
+ '@esbuild/win32-arm64@0.28.2':
+ optional: true
+
'@esbuild/win32-ia32@0.25.12':
optional: true
+ '@esbuild/win32-ia32@0.28.2':
+ optional: true
+
'@esbuild/win32-x64@0.25.12':
optional: true
+ '@esbuild/win32-x64@0.28.2':
+ optional: true
+
'@img/colour@1.1.0': {}
'@img/sharp-darwin-arm64@0.34.5':
@@ -926,6 +2306,145 @@ snapshots:
'@img/sharp-win32-x64@0.34.5':
optional: true
+ '@jridgewell/gen-mapping@0.3.13':
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.6.0
+ '@jridgewell/trace-mapping': 0.3.31
+
+ '@jridgewell/remapping@2.3.5':
+ dependencies:
+ '@jridgewell/gen-mapping': 0.3.13
+ '@jridgewell/trace-mapping': 0.3.31
+
+ '@jridgewell/resolve-uri@3.1.3': {}
+
+ '@jridgewell/sourcemap-codec@1.6.0': {}
+
+ '@jridgewell/trace-mapping@0.3.31':
+ dependencies:
+ '@jridgewell/resolve-uri': 3.1.3
+ '@jridgewell/sourcemap-codec': 1.6.0
+
+ '@mapbox/jsonlint-lines-primitives@2.0.3': {}
+
+ '@mapbox/point-geometry@1.1.0': {}
+
+ '@mapbox/tiny-sdf@2.3.0': {}
+
+ '@mapbox/unitbezier@1.0.0': {}
+
+ '@mapbox/vector-tile@3.0.0':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@types/geojson': 7946.0.16
+ pbf: 5.1.2
+
+ '@maplibre/geojson-vt@6.3.3':
+ dependencies:
+ kdbush: 4.1.0
+
+ '@maplibre/maplibre-gl-style-spec@26.8.0':
+ dependencies:
+ '@mapbox/jsonlint-lines-primitives': 2.0.3
+ '@mapbox/unitbezier': 1.0.0
+ json-stringify-pretty-compact: 4.0.0
+ minimist: 1.2.8
+ quickselect: 3.0.0
+ tinyqueue: 3.0.0
+
+ '@maplibre/mlt@1.3.0':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+
+ '@maplibre/vt-pbf@4.3.3':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@types/geojson': 7946.0.16
+ pbf: 5.1.2
+
+ '@openuidev/devtools@0.3.1(@openuidev/observability@0.0.4)(@openuidev/react-lang@1.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.6.7))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ dependencies:
+ '@openuidev/observability': 0.0.4
+ lucide-react: 0.575.0(react@18.3.1)
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+ optionalDependencies:
+ '@openuidev/react-lang': 1.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.6.7)
+
+ '@openuidev/lang-core@1.0.2(zod@4.6.7)':
+ dependencies:
+ ci-info: 4.5.0
+ zod: 4.6.7
+
+ '@openuidev/observability@0.0.4': {}
+
+ '@openuidev/react-lang@1.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.6.7)':
+ dependencies:
+ '@openuidev/devtools': 0.3.1(@openuidev/observability@0.0.4)(@openuidev/react-lang@1.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.6.7))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ '@openuidev/lang-core': 1.0.2(zod@4.6.7)
+ '@openuidev/observability': 0.0.4
+ react: 18.3.1
+ zod: 4.6.7
+ optionalDependencies:
+ react-dom: 18.3.1(react@18.3.1)
+
+ '@parcel/watcher-android-arm64@2.6.0':
+ optional: true
+
+ '@parcel/watcher-darwin-arm64@2.6.0':
+ optional: true
+
+ '@parcel/watcher-darwin-x64@2.6.0':
+ optional: true
+
+ '@parcel/watcher-freebsd-x64@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-arm-glibc@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-arm-musl@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-arm64-glibc@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-arm64-musl@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-x64-glibc@2.6.0':
+ optional: true
+
+ '@parcel/watcher-linux-x64-musl@2.6.0':
+ optional: true
+
+ '@parcel/watcher-win32-arm64@2.6.0':
+ optional: true
+
+ '@parcel/watcher-win32-x64@2.6.0':
+ optional: true
+
+ '@parcel/watcher@2.6.0':
+ dependencies:
+ detect-libc: 2.1.2
+ is-glob: 4.0.3
+ node-addon-api: 7.1.1
+ picomatch: 4.0.7
+ optionalDependencies:
+ '@parcel/watcher-android-arm64': 2.6.0
+ '@parcel/watcher-darwin-arm64': 2.6.0
+ '@parcel/watcher-darwin-x64': 2.6.0
+ '@parcel/watcher-freebsd-x64': 2.6.0
+ '@parcel/watcher-linux-arm-glibc': 2.6.0
+ '@parcel/watcher-linux-arm-musl': 2.6.0
+ '@parcel/watcher-linux-arm64-glibc': 2.6.0
+ '@parcel/watcher-linux-arm64-musl': 2.6.0
+ '@parcel/watcher-linux-x64-glibc': 2.6.0
+ '@parcel/watcher-linux-x64-musl': 2.6.0
+ '@parcel/watcher-win32-arm64': 2.6.0
+ '@parcel/watcher-win32-x64': 2.6.0
+ optional: true
+
'@puppeteer/browsers@1.9.1(bare-buffer@3.7.3)':
dependencies:
debug: 4.3.4
@@ -941,18 +2460,163 @@ snapshots:
- react-native-b4a
- supports-color
+ '@rolldown/pluginutils@1.0.0-beta.27': {}
+
+ '@rollup/rollup-android-arm-eabi@4.68.5':
+ optional: true
+
+ '@rollup/rollup-android-arm64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-android-x64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-darwin-arm64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-darwin-x64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-freebsd-arm64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-freebsd-x64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-arm-gnueabihf@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-arm-musleabihf@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-arm64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-arm64-musl@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-loong64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-loong64-musl@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-ppc64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-ppc64-musl@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-riscv64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-riscv64-musl@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-s390x-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-x64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-linux-x64-musl@4.68.5':
+ optional: true
+
+ '@rollup/rollup-openbsd-x64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-openharmony-arm64@4.68.5':
+ optional: true
+
+ '@rollup/rollup-win32-arm64-msvc@4.68.5':
+ optional: true
+
+ '@rollup/rollup-win32-ia32-msvc@4.68.5':
+ optional: true
+
+ '@rollup/rollup-win32-x64-gnu@4.68.5':
+ optional: true
+
+ '@rollup/rollup-win32-x64-msvc@4.68.5':
+ optional: true
+
'@tootallnate/quickjs-emscripten@0.23.0': {}
+ '@types/babel__core@7.20.5':
+ dependencies:
+ '@babel/parser': 7.29.14
+ '@babel/types': 7.29.14
+ '@types/babel__generator': 7.27.0
+ '@types/babel__template': 7.4.4
+ '@types/babel__traverse': 7.28.0
+
+ '@types/babel__generator@7.27.0':
+ dependencies:
+ '@babel/types': 7.29.14
+
+ '@types/babel__template@7.4.4':
+ dependencies:
+ '@babel/parser': 7.29.14
+ '@babel/types': 7.29.14
+
+ '@types/babel__traverse@7.28.0':
+ dependencies:
+ '@babel/types': 7.29.14
+
+ '@types/debug@4.1.13':
+ dependencies:
+ '@types/ms': 2.1.0
+
+ '@types/estree-jsx@1.0.5':
+ dependencies:
+ '@types/estree': 1.0.10
+
+ '@types/estree@1.0.10': {}
+
+ '@types/geojson@7946.0.16': {}
+
+ '@types/hast@3.0.5':
+ dependencies:
+ '@types/unist': 3.0.3
+
+ '@types/mdast@4.0.4':
+ dependencies:
+ '@types/unist': 3.0.3
+
+ '@types/ms@2.1.0': {}
+
'@types/node@26.6.6':
dependencies:
undici-types: 8.9.0
optional: true
+ '@types/react@19.3.0':
+ dependencies:
+ csstype: 3.2.4
+
+ '@types/unist@2.0.11': {}
+
+ '@types/unist@3.0.3': {}
+
'@types/yauzl@2.10.3':
dependencies:
'@types/node': 26.6.6
optional: true
+ '@ungap/structured-clone@1.4.0': {}
+
+ '@vitejs/plugin-react@4.7.0(vite@7.3.8(@types/node@26.6.6)(sass@1.108.2)(yaml@2.8.1))':
+ dependencies:
+ '@babel/core': 7.29.13
+ '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.13)
+ '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.13)
+ '@rolldown/pluginutils': 1.0.0-beta.27
+ '@types/babel__core': 7.20.5
+ react-refresh: 0.17.0
+ vite: 7.3.8(@types/node@26.6.6)(sass@1.108.2)(yaml@2.8.1)
+ transitivePeerDependencies:
+ - supports-color
+
'@xterm/addon-fit@0.12.0-beta.141(@xterm/xterm@6.1.0-beta.141)':
dependencies:
'@xterm/xterm': 6.1.0-beta.141
@@ -973,6 +2637,8 @@ snapshots:
b4a@1.9.0: {}
+ bail@2.0.2: {}
+
bare-buffer@3.7.3: {}
bare-events@2.9.2: {}
@@ -1008,16 +2674,46 @@ snapshots:
bare-buffer: 3.7.3
bare-path: 3.1.3
- base64-js@1.5.1: {}
+ base64-js@1.5.1: {}
+
+ baseline-browser-mapping@2.11.38: {}
+
+ basic-ftp@5.3.1: {}
+
+ bidi-js@1.1.0:
+ dependencies:
+ require-from-string: 2.0.2
+
+ browserslist@4.29.6:
+ dependencies:
+ baseline-browser-mapping: 2.11.38
+ caniuse-lite: 1.0.30001826
+ electron-to-chromium: 1.5.488
+ node-releases: 2.0.65
+ update-browserslist-db: 1.4.0(browserslist@4.29.6)
+
+ buffer-crc32@0.2.13: {}
+
+ buffer@5.7.1:
+ dependencies:
+ base64-js: 1.5.1
+ ieee754: 1.2.1
+
+ caniuse-lite@1.0.30001826: {}
+
+ ccount@2.0.1: {}
+
+ character-entities-html4@2.1.0: {}
+
+ character-entities-legacy@3.0.0: {}
- basic-ftp@5.3.1: {}
+ character-entities@2.0.2: {}
- buffer-crc32@0.2.13: {}
+ character-reference-invalid@2.0.1: {}
- buffer@5.7.1:
+ chokidar@5.0.0:
dependencies:
- base64-js: 1.5.1
- ieee754: 1.2.1
+ readdirp: 5.1.1
chromium-bidi@0.5.8(devtools-protocol@0.0.1232444):
dependencies:
@@ -1025,6 +2721,8 @@ snapshots:
mitt: 3.0.1
urlpattern-polyfill: 10.0.0
+ ci-info@4.5.0: {}
+
cliui@8.0.1:
dependencies:
string-width: 4.2.3
@@ -1037,28 +2735,50 @@ snapshots:
color-name@1.1.4: {}
+ comma-separated-tokens@2.0.3: {}
+
+ commander@8.3.0: {}
+
+ convert-source-map@2.0.0: {}
+
cross-fetch@4.0.0:
dependencies:
node-fetch: 2.7.0
transitivePeerDependencies:
- encoding
+ csstype@3.2.4: {}
+
data-uri-to-buffer@6.0.2: {}
debug@4.3.4:
dependencies:
ms: 2.1.2
+ decode-named-character-reference@1.3.0:
+ dependencies:
+ character-entities: 2.0.2
+
degenerator@5.0.1:
dependencies:
ast-types: 0.13.4
escodegen: 2.1.0
esprima: 4.0.1
+ dequal@2.0.3: {}
+
detect-libc@2.1.2: {}
+ devlop@1.1.0:
+ dependencies:
+ dequal: 2.0.3
+
devtools-protocol@0.0.1232444: {}
+ earcut@3.2.4: {}
+
+ electron-to-chromium@1.5.488: {}
+
emoji-regex@8.0.0: {}
end-of-stream@1.4.5:
@@ -1094,8 +2814,39 @@ snapshots:
'@esbuild/win32-ia32': 0.25.12
'@esbuild/win32-x64': 0.25.12
+ esbuild@0.28.2:
+ optionalDependencies:
+ '@esbuild/aix-ppc64': 0.28.2
+ '@esbuild/android-arm': 0.28.2
+ '@esbuild/android-arm64': 0.28.2
+ '@esbuild/android-x64': 0.28.2
+ '@esbuild/darwin-arm64': 0.28.2
+ '@esbuild/darwin-x64': 0.28.2
+ '@esbuild/freebsd-arm64': 0.28.2
+ '@esbuild/freebsd-x64': 0.28.2
+ '@esbuild/linux-arm': 0.28.2
+ '@esbuild/linux-arm64': 0.28.2
+ '@esbuild/linux-ia32': 0.28.2
+ '@esbuild/linux-loong64': 0.28.2
+ '@esbuild/linux-mips64el': 0.28.2
+ '@esbuild/linux-ppc64': 0.28.2
+ '@esbuild/linux-riscv64': 0.28.2
+ '@esbuild/linux-s390x': 0.28.2
+ '@esbuild/linux-x64': 0.28.2
+ '@esbuild/netbsd-arm64': 0.28.2
+ '@esbuild/netbsd-x64': 0.28.2
+ '@esbuild/openbsd-arm64': 0.28.2
+ '@esbuild/openbsd-x64': 0.28.2
+ '@esbuild/openharmony-arm64': 0.28.2
+ '@esbuild/sunos-x64': 0.28.2
+ '@esbuild/win32-arm64': 0.28.2
+ '@esbuild/win32-ia32': 0.28.2
+ '@esbuild/win32-x64': 0.28.2
+
escalade@3.2.0: {}
+ escape-string-regexp@5.0.0: {}
+
escodegen@2.1.0:
dependencies:
esprima: 4.0.1
@@ -1108,6 +2859,8 @@ snapshots:
estraverse@5.3.0: {}
+ estree-util-is-identifier-name@3.0.0: {}
+
esutils@2.0.3: {}
events-universal@1.0.1:
@@ -1116,6 +2869,8 @@ snapshots:
transitivePeerDependencies:
- bare-abort-controller
+ extend@3.0.2: {}
+
extract-zip@2.0.1:
dependencies:
debug: 4.3.4
@@ -1132,6 +2887,15 @@ snapshots:
dependencies:
pend: 1.2.0
+ fdir@6.5.0(picomatch@4.0.7):
+ optionalDependencies:
+ picomatch: 4.0.7
+
+ fsevents@2.3.3:
+ optional: true
+
+ gensync@1.0.0-beta.2: {}
+
get-caller-file@2.0.5: {}
get-stream@5.2.0:
@@ -1146,6 +2910,34 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ gl-matrix@3.4.4: {}
+
+ hast-util-to-jsx-runtime@2.3.7:
+ dependencies:
+ '@types/estree': 1.0.10
+ '@types/hast': 3.0.5
+ '@types/unist': 3.0.3
+ comma-separated-tokens: 2.0.3
+ devlop: 1.1.0
+ estree-util-is-identifier-name: 3.0.0
+ hast-util-whitespace: 3.0.0
+ mdast-util-mdx-expression: 2.0.1
+ mdast-util-mdx-jsx: 3.2.1
+ mdast-util-mdxjs-esm: 2.0.1
+ property-information: 7.2.0
+ space-separated-tokens: 2.0.2
+ style-to-object: 2.0.2
+ unist-util-position: 5.0.0
+ vfile-message: 4.0.4
+ transitivePeerDependencies:
+ - supports-color
+
+ hast-util-whitespace@3.0.0:
+ dependencies:
+ '@types/hast': 3.0.5
+
+ html-url-attributes@3.0.1: {}
+
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.4
@@ -1162,24 +2954,475 @@ snapshots:
ieee754@1.2.1: {}
+ immutable@5.2.1: {}
+
+ inline-style-parser@0.2.9: {}
+
ip-address@10.7.6: {}
+ is-alphabetical@2.0.1: {}
+
+ is-alphanumerical@2.0.1:
+ dependencies:
+ is-alphabetical: 2.0.1
+ is-decimal: 2.0.1
+
+ is-decimal@2.0.1: {}
+
+ is-extglob@2.1.1:
+ optional: true
+
is-fullwidth-code-point@3.0.0: {}
+ is-glob@4.0.3:
+ dependencies:
+ is-extglob: 2.1.1
+ optional: true
+
+ is-hexadecimal@2.0.1: {}
+
+ is-plain-obj@4.1.0: {}
+
+ js-tokens@4.0.0: {}
+
+ jsesc@3.1.0: {}
+
+ json-stringify-pretty-compact@4.0.0: {}
+
+ json5@2.2.3: {}
+
+ katex@0.16.47:
+ dependencies:
+ commander: 8.3.0
+
+ kdbush@4.1.0: {}
+
+ longest-streak@3.1.0: {}
+
+ loose-envify@1.4.0:
+ dependencies:
+ js-tokens: 4.0.0
+
+ lru-cache@5.1.1:
+ dependencies:
+ yallist: 3.1.1
+
lru-cache@7.18.3: {}
+ lucide-react@0.560.0(react@18.3.1):
+ dependencies:
+ react: 18.3.1
+
+ lucide-react@0.575.0(react@18.3.1):
+ dependencies:
+ react: 18.3.1
+
+ maplibre-gl@6.19.0(@types/react@19.3.0)(react@18.3.1):
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@mapbox/tiny-sdf': 2.3.0
+ '@mapbox/unitbezier': 1.0.0
+ '@mapbox/vector-tile': 3.0.0
+ '@maplibre/geojson-vt': 6.3.3
+ '@maplibre/maplibre-gl-style-spec': 26.8.0
+ '@maplibre/mlt': 1.3.0
+ '@maplibre/vt-pbf': 4.3.3
+ '@types/geojson': 7946.0.16
+ bidi-js: 1.1.0
+ earcut: 3.2.4
+ gl-matrix: 3.4.4
+ kdbush: 4.1.0
+ murmurhash-js: 1.0.0
+ pbf: 5.1.2
+ potpack: 2.1.0
+ quickselect: 3.0.0
+ tinyqueue: 3.0.0
+ zustand: 5.1.0(@types/react@19.3.0)(react@18.3.1)
+ transitivePeerDependencies:
+ - '@types/react'
+ - immer
+ - react
+ - use-sync-external-store
+
+ markdown-table@3.1.0: {}
+
+ mdast-util-find-and-replace@3.0.4:
+ dependencies:
+ '@types/mdast': 4.0.4
+ escape-string-regexp: 5.0.0
+ unist-util-is: 6.0.1
+ unist-util-visit-parents: 6.1.0
+
+ mdast-util-from-markdown@2.1.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ '@types/unist': 3.0.3
+ decode-named-character-reference: 1.3.0
+ devlop: 1.1.0
+ mdast-util-to-string: 4.0.0
+ micromark: 4.0.3
+ micromark-util-decode-numeric-character-reference: 2.0.2
+ micromark-util-decode-string: 2.0.1
+ micromark-util-normalize-identifier: 2.0.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+ unist-util-stringify-position: 4.0.0
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-gfm-autolink-literal@2.1.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ ccount: 2.0.1
+ devlop: 1.1.0
+ mdast-util-find-and-replace: 3.0.4
+ micromark-util-character: 2.1.1
+
+ mdast-util-gfm-footnote@2.1.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ micromark-util-normalize-identifier: 2.0.1
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-gfm-strikethrough@2.0.1:
+ dependencies:
+ '@types/mdast': 4.0.4
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-gfm-table@2.0.1:
+ dependencies:
+ '@types/mdast': 4.0.4
+ devlop: 1.1.0
+ markdown-table: 3.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ mdast-util-to-string: 4.0.0
+ unist-util-visit: 5.2.0
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-gfm-task-list-item@2.0.1:
+ dependencies:
+ '@types/mdast': 4.0.4
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-gfm@3.1.0:
+ dependencies:
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-gfm-autolink-literal: 2.1.0
+ mdast-util-gfm-footnote: 2.1.0
+ mdast-util-gfm-strikethrough: 2.0.1
+ mdast-util-gfm-table: 2.0.1
+ mdast-util-gfm-task-list-item: 2.0.1
+ mdast-util-to-markdown: 2.2.3
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-mdx-expression@2.0.1:
+ dependencies:
+ '@types/estree-jsx': 1.0.5
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-mdx-jsx@3.2.1:
+ dependencies:
+ '@types/estree-jsx': 1.0.5
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ '@types/unist': 3.0.3
+ ccount: 2.0.1
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ parse-entities: 4.0.2
+ stringify-entities: 4.0.4
+ unist-util-stringify-position: 4.0.0
+ vfile-message: 4.0.4
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-mdxjs-esm@2.0.1:
+ dependencies:
+ '@types/estree-jsx': 1.0.5
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ devlop: 1.1.0
+ mdast-util-from-markdown: 2.1.0
+ mdast-util-to-markdown: 2.2.3
+ transitivePeerDependencies:
+ - supports-color
+
+ mdast-util-phrasing@4.1.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ unist-util-is: 6.0.1
+
+ mdast-util-to-hast@13.2.2:
+ dependencies:
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ '@ungap/structured-clone': 1.4.0
+ devlop: 1.1.0
+ micromark-util-sanitize-uri: 2.0.1
+ trim-lines: 3.0.1
+ unist-util-position: 5.0.0
+ unist-util-visit: 5.2.0
+ vfile: 6.0.3
+
+ mdast-util-to-markdown@2.2.3:
+ dependencies:
+ '@types/mdast': 4.0.4
+ '@types/unist': 3.0.3
+ longest-streak: 3.1.0
+ mdast-util-phrasing: 4.1.0
+ mdast-util-to-string: 4.0.0
+ micromark-util-character: 2.1.1
+ micromark-util-classify-character: 2.0.1
+ micromark-util-decode-string: 2.0.1
+ micromark-util-html-tag-name: 2.0.1
+ unist-util-visit: 5.2.0
+ zwitch: 2.0.4
+
+ mdast-util-to-string@4.0.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+
+ micromark-core-commonmark@2.0.4:
+ dependencies:
+ decode-named-character-reference: 1.3.0
+ devlop: 1.1.0
+ micromark-factory-destination: 2.0.1
+ micromark-factory-label: 2.0.1
+ micromark-factory-space: 2.1.0
+ micromark-factory-title: 2.0.1
+ micromark-factory-whitespace: 2.0.1
+ micromark-util-character: 2.1.1
+ micromark-util-chunked: 2.0.1
+ micromark-util-classify-character: 2.0.1
+ micromark-util-edit-map: 1.0.0
+ micromark-util-html-tag-name: 2.0.1
+ micromark-util-normalize-identifier: 2.0.1
+ micromark-util-resolve-all: 2.0.1
+ micromark-util-subtokenize: 2.1.0
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-autolink-literal@2.1.0:
+ dependencies:
+ micromark-util-character: 2.1.1
+ micromark-util-sanitize-uri: 2.0.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-footnote@2.1.0:
+ dependencies:
+ devlop: 1.1.0
+ micromark-core-commonmark: 2.0.4
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-normalize-identifier: 2.0.1
+ micromark-util-sanitize-uri: 2.0.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-strikethrough@2.1.0:
+ dependencies:
+ devlop: 1.1.0
+ micromark-util-chunked: 2.0.1
+ micromark-util-classify-character: 2.0.1
+ micromark-util-resolve-all: 2.0.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-table@2.1.2:
+ dependencies:
+ devlop: 1.1.0
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-tagfilter@2.0.0:
+ dependencies:
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm-task-list-item@2.1.0:
+ dependencies:
+ devlop: 1.1.0
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-extension-gfm@3.0.0:
+ dependencies:
+ micromark-extension-gfm-autolink-literal: 2.1.0
+ micromark-extension-gfm-footnote: 2.1.0
+ micromark-extension-gfm-strikethrough: 2.1.0
+ micromark-extension-gfm-table: 2.1.2
+ micromark-extension-gfm-tagfilter: 2.0.0
+ micromark-extension-gfm-task-list-item: 2.1.0
+ micromark-util-combine-extensions: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-factory-destination@2.0.1:
+ dependencies:
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-factory-label@2.0.1:
+ dependencies:
+ devlop: 1.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-factory-space@2.1.0:
+ dependencies:
+ micromark-util-character: 2.1.1
+ micromark-util-types: 2.0.3
+
+ micromark-factory-title@2.0.1:
+ dependencies:
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-factory-whitespace@2.0.1:
+ dependencies:
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-util-character@2.1.1:
+ dependencies:
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-util-chunked@2.0.1:
+ dependencies:
+ micromark-util-symbol: 2.0.1
+
+ micromark-util-classify-character@2.0.1:
+ dependencies:
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-util-combine-extensions@2.0.1:
+ dependencies:
+ micromark-util-chunked: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-util-decode-numeric-character-reference@2.0.2:
+ dependencies:
+ micromark-util-symbol: 2.0.1
+
+ micromark-util-decode-string@2.0.1:
+ dependencies:
+ decode-named-character-reference: 1.3.0
+ micromark-util-character: 2.1.1
+ micromark-util-decode-numeric-character-reference: 2.0.2
+ micromark-util-symbol: 2.0.1
+
+ micromark-util-edit-map@1.0.0:
+ dependencies:
+ micromark-util-types: 2.0.3
+
+ micromark-util-encode@2.0.1: {}
+
+ micromark-util-html-tag-name@2.0.1: {}
+
+ micromark-util-normalize-identifier@2.0.1:
+ dependencies:
+ micromark-util-symbol: 2.0.1
+
+ micromark-util-resolve-all@2.0.1:
+ dependencies:
+ micromark-util-types: 2.0.3
+
+ micromark-util-sanitize-uri@2.0.1:
+ dependencies:
+ micromark-util-character: 2.1.1
+ micromark-util-encode: 2.0.1
+ micromark-util-symbol: 2.0.1
+
+ micromark-util-subtokenize@2.1.0:
+ dependencies:
+ devlop: 1.1.0
+ micromark-util-chunked: 2.0.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+
+ micromark-util-symbol@2.0.1: {}
+
+ micromark-util-types@2.0.3: {}
+
+ micromark@4.0.3:
+ dependencies:
+ '@types/debug': 4.1.13
+ debug: 4.3.4
+ decode-named-character-reference: 1.3.0
+ devlop: 1.1.0
+ micromark-core-commonmark: 2.0.4
+ micromark-factory-space: 2.1.0
+ micromark-util-character: 2.1.1
+ micromark-util-chunked: 2.0.1
+ micromark-util-combine-extensions: 2.0.1
+ micromark-util-decode-numeric-character-reference: 2.0.2
+ micromark-util-edit-map: 1.0.0
+ micromark-util-encode: 2.0.1
+ micromark-util-normalize-identifier: 2.0.1
+ micromark-util-resolve-all: 2.0.1
+ micromark-util-sanitize-uri: 2.0.1
+ micromark-util-subtokenize: 2.1.0
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.3
+ transitivePeerDependencies:
+ - supports-color
+
+ minimist@1.2.8: {}
+
mitt@3.0.1: {}
mkdirp-classic@0.5.3: {}
ms@2.1.2: {}
+ murmurhash-js@1.0.0: {}
+
+ nanoid@3.3.20: {}
+
netmask@2.1.1: {}
+ node-addon-api@7.1.1:
+ optional: true
+
node-fetch@2.7.0:
dependencies:
whatwg-url: 5.0.0
+ node-releases@2.0.65: {}
+
once@1.4.0:
dependencies:
wrappy: 1.0.2
@@ -1202,10 +3445,40 @@ snapshots:
degenerator: 5.0.1
netmask: 2.1.1
+ parse-entities@4.0.2:
+ dependencies:
+ '@types/unist': 2.0.11
+ character-entities-legacy: 3.0.0
+ character-reference-invalid: 2.0.1
+ decode-named-character-reference: 1.3.0
+ is-alphanumerical: 2.0.1
+ is-decimal: 2.0.1
+ is-hexadecimal: 2.0.1
+
+ pbf@5.1.2:
+ dependencies:
+ resolve-protobuf-schema: 2.1.0
+
pend@1.2.0: {}
+ picocolors@1.1.1: {}
+
+ picomatch@4.0.7: {}
+
+ postcss@8.5.33:
+ dependencies:
+ nanoid: 3.3.20
+ picocolors: 1.1.1
+ source-map-js: 1.2.2
+
+ potpack@2.1.0: {}
+
progress@2.0.3: {}
+ property-information@7.2.0: {}
+
+ protocol-buffers-schema@3.6.1: {}
+
proxy-agent@6.3.1:
dependencies:
agent-base: 7.1.4
@@ -1243,8 +3516,128 @@ snapshots:
- supports-color
- utf-8-validate
+ quickselect@3.0.0: {}
+
+ react-dom@18.3.1(react@18.3.1):
+ dependencies:
+ loose-envify: 1.4.0
+ react: 18.3.1
+ scheduler: 0.23.2
+
+ react-markdown@10.1.0(@types/react@19.3.0)(react@18.3.1):
+ dependencies:
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ '@types/react': 19.3.0
+ devlop: 1.1.0
+ hast-util-to-jsx-runtime: 2.3.7
+ html-url-attributes: 3.0.1
+ mdast-util-to-hast: 13.2.2
+ react: 18.3.1
+ remark-parse: 11.0.0
+ remark-rehype: 11.1.2
+ unified: 11.0.5
+ unist-util-visit: 5.2.0
+ vfile: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+
+ react-refresh@0.17.0: {}
+
+ react@18.3.1:
+ dependencies:
+ loose-envify: 1.4.0
+
+ readdirp@5.1.1: {}
+
+ remark-gfm@4.0.1:
+ dependencies:
+ '@types/mdast': 4.0.4
+ mdast-util-gfm: 3.1.0
+ micromark-extension-gfm: 3.0.0
+ remark-parse: 11.0.0
+ remark-stringify: 11.0.0
+ unified: 11.0.5
+ transitivePeerDependencies:
+ - supports-color
+
+ remark-parse@11.0.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ mdast-util-from-markdown: 2.1.0
+ micromark-util-types: 2.0.3
+ unified: 11.0.5
+ transitivePeerDependencies:
+ - supports-color
+
+ remark-rehype@11.1.2:
+ dependencies:
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
+ mdast-util-to-hast: 13.2.2
+ unified: 11.0.5
+ vfile: 6.0.3
+
+ remark-stringify@11.0.0:
+ dependencies:
+ '@types/mdast': 4.0.4
+ mdast-util-to-markdown: 2.2.3
+ unified: 11.0.5
+
require-directory@2.1.1: {}
+ require-from-string@2.0.2: {}
+
+ resolve-protobuf-schema@2.1.0:
+ dependencies:
+ protocol-buffers-schema: 3.6.1
+
+ rollup@4.68.5:
+ dependencies:
+ '@types/estree': 1.0.10
+ optionalDependencies:
+ '@rollup/rollup-android-arm-eabi': 4.68.5
+ '@rollup/rollup-android-arm64': 4.68.5
+ '@rollup/rollup-android-x64': 4.68.5
+ '@rollup/rollup-darwin-arm64': 4.68.5
+ '@rollup/rollup-darwin-x64': 4.68.5
+ '@rollup/rollup-freebsd-arm64': 4.68.5
+ '@rollup/rollup-freebsd-x64': 4.68.5
+ '@rollup/rollup-linux-arm-gnueabihf': 4.68.5
+ '@rollup/rollup-linux-arm-musleabihf': 4.68.5
+ '@rollup/rollup-linux-arm64-gnu': 4.68.5
+ '@rollup/rollup-linux-arm64-musl': 4.68.5
+ '@rollup/rollup-linux-loong64-gnu': 4.68.5
+ '@rollup/rollup-linux-loong64-musl': 4.68.5
+ '@rollup/rollup-linux-ppc64-gnu': 4.68.5
+ '@rollup/rollup-linux-ppc64-musl': 4.68.5
+ '@rollup/rollup-linux-riscv64-gnu': 4.68.5
+ '@rollup/rollup-linux-riscv64-musl': 4.68.5
+ '@rollup/rollup-linux-s390x-gnu': 4.68.5
+ '@rollup/rollup-linux-x64-gnu': 4.68.5
+ '@rollup/rollup-linux-x64-musl': 4.68.5
+ '@rollup/rollup-openbsd-x64': 4.68.5
+ '@rollup/rollup-openharmony-arm64': 4.68.5
+ '@rollup/rollup-win32-arm64-msvc': 4.68.5
+ '@rollup/rollup-win32-ia32-msvc': 4.68.5
+ '@rollup/rollup-win32-x64-gnu': 4.68.5
+ '@rollup/rollup-win32-x64-msvc': 4.68.5
+ fsevents: 2.3.3
+
+ sass@1.108.2:
+ dependencies:
+ chokidar: 5.0.0
+ immutable: 5.2.1
+ source-map-js: 1.2.2
+ optionalDependencies:
+ '@parcel/watcher': 2.6.0
+
+ scheduler@0.23.2:
+ dependencies:
+ loose-envify: 1.4.0
+
+ semver@6.3.2: {}
+
semver@7.8.6: {}
sharp@0.34.5:
@@ -1293,9 +3686,13 @@ snapshots:
ip-address: 10.7.6
smart-buffer: 4.2.0
+ source-map-js@1.2.2: {}
+
source-map@0.6.1:
optional: true
+ space-separated-tokens@2.0.2: {}
+
streamx@2.28.1:
dependencies:
events-universal: 1.0.1
@@ -1311,10 +3708,19 @@ snapshots:
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
+ stringify-entities@4.0.4:
+ dependencies:
+ character-entities-html4: 2.1.0
+ character-entities-legacy: 3.0.0
+
strip-ansi@6.0.1:
dependencies:
ansi-regex: 5.0.1
+ style-to-object@2.0.2:
+ dependencies:
+ inline-style-parser: 0.2.9
+
tar-fs@3.0.4(bare-buffer@3.7.3):
dependencies:
mkdirp-classic: 0.5.3
@@ -1351,8 +3757,19 @@ snapshots:
through@2.3.8: {}
+ tinyglobby@0.2.17:
+ dependencies:
+ fdir: 6.5.0(picomatch@4.0.7)
+ picomatch: 4.0.7
+
+ tinyqueue@3.0.0: {}
+
tr46@0.0.3: {}
+ trim-lines@3.0.1: {}
+
+ trough@2.2.0: {}
+
tslib@2.9.1: {}
typescript@5.9.3: {}
@@ -1365,8 +3782,71 @@ snapshots:
undici-types@8.9.0:
optional: true
+ unified@11.0.5:
+ dependencies:
+ '@types/unist': 3.0.3
+ bail: 2.0.2
+ devlop: 1.1.0
+ extend: 3.0.2
+ is-plain-obj: 4.1.0
+ trough: 2.2.0
+ vfile: 6.0.3
+
+ unist-util-is@6.0.1:
+ dependencies:
+ '@types/unist': 3.0.3
+
+ unist-util-position@5.0.0:
+ dependencies:
+ '@types/unist': 3.0.3
+
+ unist-util-stringify-position@4.0.0:
+ dependencies:
+ '@types/unist': 3.0.3
+
+ unist-util-visit-parents@6.1.0:
+ dependencies:
+ '@types/unist': 3.0.3
+ unist-util-is: 6.0.1
+
+ unist-util-visit@5.2.0:
+ dependencies:
+ '@types/unist': 3.0.3
+ unist-util-is: 6.0.1
+ unist-util-visit-parents: 6.1.0
+
+ update-browserslist-db@1.4.0(browserslist@4.29.6):
+ dependencies:
+ browserslist: 4.29.6
+ escalade: 3.2.0
+ picocolors: 1.1.1
+
urlpattern-polyfill@10.0.0: {}
+ vfile-message@4.0.4:
+ dependencies:
+ '@types/unist': 3.0.3
+ unist-util-stringify-position: 4.0.0
+
+ vfile@6.0.3:
+ dependencies:
+ '@types/unist': 3.0.3
+ vfile-message: 4.0.4
+
+ vite@7.3.8(@types/node@26.6.6)(sass@1.108.2)(yaml@2.8.1):
+ dependencies:
+ esbuild: 0.28.2
+ fdir: 6.5.0(picomatch@4.0.7)
+ picomatch: 4.0.7
+ postcss: 8.5.33
+ rollup: 4.68.5
+ tinyglobby: 0.2.17
+ optionalDependencies:
+ '@types/node': 26.6.6
+ fsevents: 2.3.3
+ sass: 1.108.2
+ yaml: 2.8.1
+
webidl-conversions@3.0.1: {}
whatwg-url@5.0.0:
@@ -1386,6 +3866,8 @@ snapshots:
y18n@5.0.8: {}
+ yallist@3.1.1: {}
+
yaml@2.8.1: {}
yargs-parser@21.1.1: {}
@@ -1404,3 +3886,12 @@ snapshots:
dependencies:
buffer-crc32: 0.2.13
fd-slicer: 1.1.0
+
+ zod@4.6.7: {}
+
+ zustand@5.1.0(@types/react@19.3.0)(react@18.3.1):
+ optionalDependencies:
+ '@types/react': 19.3.0
+ react: 18.3.1
+
+ zwitch@2.0.4: {}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index a51417c..472296f 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,4 +1,5 @@
packages:
+ - src/apps/mobile/harmonyos/genui-runtime
- design-system/packages/design-tokens
- design-system/packages/theme-openbitfun
- design-system/tooling/token-engine
diff --git a/scripts/build-harmony-genui-runtime.mjs b/scripts/build-harmony-genui-runtime.mjs
new file mode 100644
index 0000000..c253382
--- /dev/null
+++ b/scripts/build-harmony-genui-runtime.mjs
@@ -0,0 +1,57 @@
+#!/usr/bin/env node
+/**
+ * Build the Harmony Local GenUI contract projection and ArkWeb runtime bundle.
+ *
+ * node scripts/build-harmony-genui-runtime.mjs # regenerate + build
+ * node scripts/build-harmony-genui-runtime.mjs --check # verify freshness only
+ *
+ * The contract files under rawfile/genui are checked in; the runtime bundle
+ * under rawfile/genui/runtime is generated and verified by the HAP build.
+ */
+import { execFileSync } from 'node:child_process';
+import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { createRequire } from 'node:module';
+
+const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
+const genuiDir = path.join(root, 'src/apps/mobile/harmonyos/entry/src/main/resources/rawfile/genui');
+const runtimeDir = path.join(genuiDir, 'runtime');
+const manifestPath = path.join(genuiDir, 'runtime-manifest.json');
+const buildInfoPath = path.join(runtimeDir, 'build.json');
+const { runtimeFreshnessError } = createRequire(import.meta.url)('../src/apps/mobile/harmonyos/tools/genui-runtime-freshness.cjs');
+
+function run(command, args, cwd = root) {
+ execFileSync(command, args, { cwd, stdio: 'inherit', windowsHide: true, shell: process.platform === 'win32' && command === 'pnpm', env: process.env });
+}
+
+const HTML = `
+
+
+
+
+
+
+Local GenUI
+
+
+
+`;
+
+if (process.argv.includes('--check')) {
+ run(process.execPath, ['scripts/generate-genui-contract.mjs', '--check']);
+ const error = runtimeFreshnessError();
+ if (error) { console.error(`${error}; run pnpm run harmony:genui-runtime`); process.exit(1); }
+ console.log('Harmony Local GenUI runtime is fresh');
+} else {
+ run(process.execPath, ['scripts/generate-genui-contract.mjs']);
+ run('pnpm', ['exec', 'vite', 'build', '--logLevel', 'warn'], path.join(root, 'src/apps/mobile/harmonyos/genui-runtime'));
+ writeFileSync(path.join(runtimeDir, 'index.html'), HTML);
+ // HM Symbol icons; the license travels with the font.
+ const fontDir = path.join(runtimeDir, 'fonts/hm-symbol');
+ mkdirSync(fontDir, { recursive: true });
+ for (const file of ['HMSymbolVF.ttf', 'LICENSE.txt']) copyFileSync(path.join(root, 'src/apps/mobile/harmonyos/genui-runtime/fonts/hm-symbol', file), path.join(fontDir, file));
+ const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
+ writeFileSync(buildInfoPath, JSON.stringify({ catalogHash: manifest.catalogHash, rendererRevision: manifest.rendererRevision }, null, 2) + '\n');
+ console.log('Built Harmony Local GenUI runtime for ' + manifest.rendererRevision);
+}
diff --git a/scripts/generate-genui-contract.mjs b/scripts/generate-genui-contract.mjs
new file mode 100644
index 0000000..501ee86
--- /dev/null
+++ b/scripts/generate-genui-contract.mjs
@@ -0,0 +1,25 @@
+import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs';
+import { compileCatalog } from '../src/shared/generative-ui/library.mjs';
+import { projectHarmonyLocalContract } from '../src/shared/generative-ui/harmony-local.mjs';
+const path = new URL('../src/shared/generative-ui/', import.meta.url);
+const catalog = compileCatalog(JSON.parse(readFileSync(new URL('library.json', path), 'utf8')));
+const output = JSON.stringify(catalog, null, 2) + '\n';
+const target = new URL('catalog.json', path);
+// Harmony Local GenUI consumes a projection of the same catalog. Keep it next
+// to the HAP resources so the phone never hand-writes prompts or schemas.
+const harmonyDir = new URL('../src/apps/mobile/harmonyos/entry/src/main/resources/rawfile/genui/', import.meta.url);
+const harmony = projectHarmonyLocalContract(catalog).files;
+const check = process.argv.includes('--check');
+const stale = [];
+if (check) {
+ if (readFileSync(target, 'utf8') !== output) stale.push('src/shared/generative-ui/catalog.json');
+ for (const [name, text] of Object.entries(harmony)) {
+ const file = new URL(name, harmonyDir);
+ if (!existsSync(file) || readFileSync(file, 'utf8') !== text) stale.push('rawfile/genui/' + name);
+ }
+ if (stale.length) throw new Error('GenUI contract is stale (' + stale.join(', ') + '); run node scripts/generate-genui-contract.mjs');
+} else {
+ writeFileSync(target, output);
+ mkdirSync(harmonyDir, { recursive: true });
+ for (const [name, text] of Object.entries(harmony)) writeFileSync(new URL(name, harmonyDir), text);
+}
diff --git a/scripts/vendor-fluent-emoji-animated-index.mjs b/scripts/vendor-fluent-emoji-animated-index.mjs
new file mode 100644
index 0000000..51d2eae
--- /dev/null
+++ b/scripts/vendor-fluent-emoji-animated-index.mjs
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+/**
+ * Pin the Microsoft Fluent Emoji animated set (MIT) for Harmony Local GenUI.
+ *
+ * node scripts/vendor-fluent-emoji-animated-index.mjs [commit]
+ *
+ * The animated repository keeps one folder per emoji, named like the static
+ * Fluent Emoji folders. Each animated asset is keyed by the code point key the
+ * static 3D index already uses for that folder, so a cover only animates the
+ * exact emoji it already shows. Skin-tone variants keep the Default tone, as
+ * the static index does. The host fetches these files at the pinned commit.
+ */
+import { readFileSync, writeFileSync } from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
+const vendor = path.join(root, 'src/apps/mobile/harmonyos/genui-runtime/src/components/vendor');
+const staticIndex = JSON.parse(readFileSync(path.join(vendor, 'fluent-emoji-3d-index.json'), 'utf8'));
+const repo = 'microsoft/fluentui-emoji-animated';
+
+async function json(url) {
+ const response = await fetch(url, { headers: { Accept: 'application/vnd.github+json' } });
+ if (!response.ok) throw new Error(`${url}: ${response.status}`);
+ return response.json();
+}
+
+const sha = process.argv[2] ?? (await json(`https://api.github.com/repos/${repo}/commits/main`)).sha;
+const tree = await json(`https://api.github.com/repos/${repo}/git/trees/${sha}?recursive=1`);
+if (tree.truncated) throw new Error('GitHub tree listing was truncated');
+
+const animatedByFolder = new Map();
+for (const entry of tree.tree) {
+ const match = /^assets\/(.+?)\/(Default\/)?animated\/([^/]+_animated(_default)?\.png)$/.exec(entry.path);
+ if (entry.type === 'blob' && match) animatedByFolder.set(match[1], entry.path.slice('assets/'.length));
+}
+
+const icons = {};
+for (const [key, asset] of Object.entries(staticIndex.icons)) {
+ const animated = animatedByFolder.get(asset.split('/')[0]);
+ if (animated) icons[key] = animated;
+}
+const sorted = Object.fromEntries(Object.entries(icons).sort(([a], [b]) => a.localeCompare(b)));
+writeFileSync(path.join(vendor, 'fluent-emoji-animated-index.json'), JSON.stringify({ sha, icons: sorted }) + '\n');
+console.log(`Pinned ${Object.keys(sorted).length} of ${animatedByFolder.size} animated Fluent Emoji at ${sha}`);
diff --git a/src/apps/mobile/AGENTS.md b/src/apps/mobile/AGENTS.md
index f810939..7d53571 100644
--- a/src/apps/mobile/AGENTS.md
+++ b/src/apps/mobile/AGENTS.md
@@ -119,7 +119,7 @@ isolation, run from `shared/` with the Android guide's Java runtime:
`./gradlew :core-feature:jvmTest --tests '*promptSuggestion*' --tests '*SessionRecordReplicaTest*'`.
These are simulated host streams, not evidence of a live remote connection.
-Native mobile surfaces are controllers. Desktop and CLI own execution, files, terminals and SSH credentials. Mobile workspace selection may use only connections already saved on the controlled runtime; it must not create an SSH connection or instantiate another runtime. Carry the selected connection identity through every operation, and report missing identity instead of falling back to local files.
+Native mobile remote surfaces are controllers. Desktop and CLI own remote execution, files, terminals and SSH credentials. Mobile workspace selection may use only connections already saved on the controlled runtime; it must not create an SSH connection or instantiate another runtime. Carry the selected connection identity through every operation, and report missing identity instead of falling back to local files.
## Offline Mini Apps
diff --git a/src/apps/mobile/harmonyos/.gitignore b/src/apps/mobile/harmonyos/.gitignore
index 63b8fc7..eefa650 100644
--- a/src/apps/mobile/harmonyos/.gitignore
+++ b/src/apps/mobile/harmonyos/.gitignore
@@ -35,3 +35,4 @@
# Generated from en_US/zh_CN element string catalogs by entry/hvigorfile.ts
/entry/src/main/resources/rawfile/string.json
+entry/src/main/resources/rawfile/genui/runtime/
diff --git a/src/apps/mobile/harmonyos/AGENTS.md b/src/apps/mobile/harmonyos/AGENTS.md
index 0766797..21ffca5 100644
--- a/src/apps/mobile/harmonyos/AGENTS.md
+++ b/src/apps/mobile/harmonyos/AGENTS.md
@@ -2,14 +2,28 @@
These rules apply to all changes under `src/apps/mobile/harmonyos`.
-## Controller product boundary
-
-Phone, tablet, and foldable entrypoints are remote controllers. They must not
-instantiate a local Agent Runtime, model provider, local chat command owner, or
-model configuration store. OpenBitFun account identity and the authenticated device directory
-are the authority for selection and reconnect; QR data supplies only a device id.
-Keep old persisted records readable and retained without activating legacy room
-credentials or local execution. Compact and wide hosts enforce the same boundary.
+## Product modes
+
+Remote Chat remains a controller in compact and wide layouts. OpenBitFun account
+identity and the authenticated device directory control selection and reconnect.
+QR data supplies only a device ID. Keep legacy records readable and inert.
+
+The sidebar's Create mini apps entry opens Local GenUI. Only `services/local-genui/` owns its session
+controller, model provider, app owner and persistence. Local sessions use
+`local-genui:` IDs and separate storage tables. They use neither remote session
+IDs nor workspace identities, RemoteCommand, HostStream or the remote permission
+mailbox. The retired General Chat routes stay inert. Its saved model
+configuration can be imported into the encrypted Local GenUI model store.
+
+The ArkWeb bundle only parses and renders the pinned local contract. Keep
+calendar, camera gestures, haptics and cross-device images behind the typed
+local action host and platform permission checks. Device preview fixtures do
+not substitute for a real provider or permission test.
+
+From the repository root, run `pnpm run harmony:genui-runtime` before building a
+HAP and `pnpm run harmony:genui-runtime:check` to verify the generated contract.
+Run `node --test src/apps/mobile/harmonyos/tools/tests/local-genui-*.test.cjs`
+for focused host tests.
## MVVM Refactor Boundaries
diff --git a/src/apps/mobile/harmonyos/README.md b/src/apps/mobile/harmonyos/README.md
index 9f5dc6a..6001155 100644
--- a/src/apps/mobile/harmonyos/README.md
+++ b/src/apps/mobile/harmonyos/README.md
@@ -48,6 +48,20 @@ can still produce an unsigned HAP.
The current project targets HarmonyOS `6.1.1(24)` and supports
`6.0.1(21)` or newer on phone and tablet devices.
+## Local GenUI
+
+Open the left sidebar and choose **Create mini apps** to see your saved creation
+sessions. Select a session or start a new one. Back returns to the list.
+The composer includes **Manage
+models** for adding an API endpoint and model. Conversation history, generated
+app source and app state are stored on the phone. Generation uses the selected
+model API directly from the phone and does not require a desktop connection.
+
+Before building the HAP, run `pnpm run harmony:genui-runtime` from the
+repository root. The contract comes from `src/shared/generative-ui/library.json`.
+The source and build configuration for the bundled ArkWeb renderer live in
+`genui-runtime/`.
+
## Built-in MiniApps
Choose **MiniApps** from the sidebar to open Gomoku, Regex Playground,
diff --git a/src/apps/mobile/harmonyos/entry/hvigorfile.ts b/src/apps/mobile/harmonyos/entry/hvigorfile.ts
index 88474b5..afbe5fa 100644
--- a/src/apps/mobile/harmonyos/entry/hvigorfile.ts
+++ b/src/apps/mobile/harmonyos/entry/hvigorfile.ts
@@ -4,8 +4,9 @@ import { hapTasks } from '@ohos/hvigor-ohos-plugin';
require('../miniapps/generate.cjs').generate();
// Regenerate the HostTextRetranslator i18n rawfile catalog on every build.
require('../i18n/generate.cjs').generate();
+require('../tools/genui-runtime-freshness.cjs').assertRuntimeFresh();
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins: [] /* Custom plugin to extend the functionality of Hvigor. */
-}
\ No newline at end of file
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/entryability/EntryAbility.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/entryability/EntryAbility.ets
index aff034e..d120a85 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/entryability/EntryAbility.ets
@@ -3,6 +3,8 @@ import { hilog } from '@kit.PerformanceAnalysisKit';
import { display, window } from '@kit.ArkUI';
import { WindowOrientationService } from '../services/WindowOrientationService';
import { MobileDesignColors, MobileTextScale } from '../generated/MobileDesignTokens';
+import { LocalGenUIDesktopCards } from '../services/local-genui/LocalGenUIDesktopCards';
+import { LocalGenUILaunchInbox } from '../services/local-genui/LocalGenUILaunchInbox';
const DOMAIN = 0x0000;
const TAG = 'OpenBitFunRemote';
@@ -36,7 +38,7 @@ export default class EntryAbility extends UIAbility {
scenarioId === 'copy-rollback-busy' || scenarioId === 'copy-rollback-unsupported' ||
scenarioId === 'interaction-mailbox' || scenarioId === 'interaction-mailbox-dark' ||
scenarioId.startsWith('command-palette') ||
- deviceModelScenario) {
+ scenarioId.startsWith('collaboration') || deviceModelScenario) {
this.initialPage = 'pages/preview/MobileDesignGallery';
this.previewStorage = new LocalStorage();
this.previewStorage.setOrCreate('scenarioId', scenarioId);
@@ -51,10 +53,11 @@ export default class EntryAbility extends UIAbility {
const previewDark = this.previewStorage !== undefined &&
want.parameters?.['openbitfunDesignAppearance'] === 'dark';
const colorMode = previewDark || scenarioId === 'cold-start-home-dark' || scenarioId === 'catalog-refresh-dark' || scenarioId === 'model-role-selector-dark' || scenarioId === 'subagent-process-dark' || scenarioId === 'subagent-swarm-dark' || scenarioId === 'file-visibility-dark' || scenarioId === 'immersive-bottom-dark' || scenarioId === 'immersive-bottom-drawer-dark' || scenarioId === 'immersive-bottom-settings-dark' || scenarioId === 'composer-overflow-dark' || scenarioId === 'composer-overflow-expanded-dark' || scenarioId === 'device-selector-dark' || scenarioId === 'streaming-dark' || scenarioId === 'interaction-mailbox-dark' || scenarioId === 'copy-selection-dark' || scenarioId === 'copy-rollback-dark' || scenarioId === 'copy-rollback-send-dark' || scenarioId === 'copy-rollback-fail-dark' || (scenarioId.startsWith('command-palette') && scenarioId.endsWith('-dark')) ||
- (deviceModelScenario && scenarioId.endsWith('-dark'))
+ (deviceModelScenario && scenarioId.endsWith('-dark')) ||
+ (scenarioId.startsWith('collaboration') && scenarioId.endsWith('-dark'))
? ConfigurationConstant.ColorMode.COLOR_MODE_DARK
: scenarioId === 'cold-start-home' || scenarioId === 'catalog-refresh' || scenarioId === 'model-role-selector' || scenarioId === 'model-role-selector-wide' || scenarioId === 'subagent-process' || scenarioId === 'subagent-swarm' || scenarioId === 'file-visibility' || scenarioId === 'immersive-bottom' || scenarioId === 'immersive-bottom-wide' || scenarioId === 'immersive-bottom-drawer' || scenarioId === 'immersive-bottom-settings' || scenarioId === 'immersive-bottom-cover' || scenarioId === 'immersive-bottom-miniapps' || scenarioId === 'immersive-bottom-wide-shell' || scenarioId === 'immersive-bottom-tools' || scenarioId === 'immersive-bottom-tools-editor' || scenarioId === 'immersive-bottom-tools-file-action' || scenarioId === 'immersive-bottom-view-settings' || scenarioId === 'immersive-bottom-connect' || scenarioId === 'composer-overflow' || scenarioId === 'composer-overflow-empty' || scenarioId === 'composer-overflow-wide' || scenarioId === 'composer-overflow-expanded' || scenarioId === 'device-selector' || scenarioId === 'connected-conversation' || scenarioId === 'reconnecting-wide' || scenarioId === 'copy-selection' || scenarioId === 'copy-selection-nav' || scenarioId === 'copy-selection-wide' || scenarioId === 'copy-rollback' || scenarioId === 'copy-rollback-send' || scenarioId === 'copy-rollback-send-fail' || scenarioId === 'copy-rollback-fail' || scenarioId === 'copy-rollback-stale' || scenarioId === 'copy-rollback-busy' || scenarioId === 'copy-rollback-unsupported' || (scenarioId.startsWith('command-palette') && !scenarioId.endsWith('-dark')) ||
- (deviceModelScenario && !scenarioId.endsWith('-dark'))
+ ((deviceModelScenario || scenarioId.startsWith('collaboration')) && !scenarioId.endsWith('-dark'))
? ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT
: ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET;
this.context.getApplicationContext().setColorMode(colorMode);
@@ -62,9 +65,27 @@ export default class EntryAbility extends UIAbility {
hilog.error(DOMAIN, TAG, 'Failed to set colorMode. Cause: %{public}s', JSON.stringify(err));
}
this.applyTextScale();
+ if (!this.previewStorage) {
+ this.deliverCardLaunch(want);
+ }
hilog.info(DOMAIN, TAG, '%{public}s', 'Ability onCreate');
}
+ onNewWant(want: Want, _launchParam: AbilityConstant.LaunchParam): void {
+ if (!this.previewStorage) {
+ this.deliverCardLaunch(want);
+ }
+ }
+
+ /** A tap on a generated app's home-screen card opens that app. */
+ private deliverCardLaunch(want: Want): void {
+ const appId = LocalGenUIDesktopCards.launchAppId(want.parameters as Record | undefined);
+ if (appId.length > 0) {
+ hilog.info(DOMAIN, TAG, '%{public}s', 'Opening a generated app from its desktop card');
+ LocalGenUILaunchInbox.deliver(appId);
+ }
+ }
+
// The type ramp is read through getters, so this has to land before the first
// page module loads; onCreate runs ahead of loadContent. A fold changing
// screens keeps the same pixel pitch on the devices we ship to, so one read at
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/LocalGenUIFormAbility.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/LocalGenUIFormAbility.ets
new file mode 100644
index 0000000..d68d5da
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/LocalGenUIFormAbility.ets
@@ -0,0 +1,67 @@
+import { Want } from '@kit.AbilityKit';
+import { formBindingData, FormExtensionAbility } from '@kit.FormKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { LocalGenUIDesktopCardStore } from '../services/local-genui/LocalGenUIDesktopCardStore';
+import {
+ FORM_IDENTITY_PARAM,
+ LocalGenUIDesktopCards
+} from '../services/local-genui/LocalGenUIDesktopCards';
+
+const DOMAIN = 0x0000;
+const TAG = 'OpenBitFunGenUICard';
+
+/**
+ * Card host of generated-app desktop cards. It runs in its own process and
+ * only reads and writes the shared card files; it never opens the Local GenUI
+ * database, model provider, or runtime. The UI process owns app content and
+ * pushes it with `formProvider.updateForm`.
+ */
+export default class LocalGenUIFormAbility extends FormExtensionAbility {
+ private store(): LocalGenUIDesktopCardStore {
+ return new LocalGenUIDesktopCardStore(this.context.filesDir);
+ }
+
+ onAddForm(want: Want): formBindingData.FormBindingData {
+ const parameters = want.parameters as Record | undefined;
+ const formIdValue = parameters ? parameters[FORM_IDENTITY_PARAM] : undefined;
+ const formId = typeof formIdValue === 'string' ? formIdValue : '';
+ const store = this.store();
+ // The launcher may forward the app id; otherwise the app staged it when
+ // its "Add to desktop" menu opened. The add callback binds again when the
+ // launcher calls it.
+ const forwarded = LocalGenUIDesktopCards.appIdOfAddWant(parameters);
+ const appId = forwarded.length > 0 ? forwarded : store.claimPendingAdd();
+ if (forwarded.length > 0) {
+ store.claimPendingAdd();
+ }
+ if (formId.length > 0 && appId.length > 0) {
+ store.bind(formId, appId);
+ }
+ hilog.info(DOMAIN, TAG, 'Card added bound=%{public}s source=%{public}s', String(appId.length > 0),
+ forwarded.length > 0 ? 'want' : (appId.length > 0 ? 'pending' : 'none'));
+ if (formId.length > 0) {
+ // The preview needs a file descriptor that must outlive this call.
+ setTimeout(() => { void store.refresh(formId); }, 0);
+ }
+ return formBindingData.createFormBindingData(store.textData(formId));
+ }
+
+ onUpdateForm(formId: string): void {
+ void this.store().refresh(formId);
+ }
+
+ onCastToNormalForm(formId: string): void {
+ void this.store().refresh(formId);
+ }
+
+ onChangeFormVisibility(_newStatus: Record): void {
+ }
+
+ onFormEvent(_formId: string, _message: string): void {
+ }
+
+ onRemoveForm(formId: string): void {
+ this.store().unbind(formId);
+ hilog.info(DOMAIN, TAG, '%{public}s', 'Card removed');
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/pages/LocalGenUIAppCard.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/pages/LocalGenUIAppCard.ets
new file mode 100644
index 0000000..d85d487
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/genuiform/pages/LocalGenUIAppCard.ets
@@ -0,0 +1,71 @@
+/**
+ * 2x2 desktop card of one generated app. Service widgets bind data through
+ * `@LocalStorageProp`, which only V1 `@Entry @Component` pages support, so
+ * this page is V1 by platform requirement; it lives outside `pages/` and holds
+ * no app logic. Keys mirror `LocalGenUIDesktopCardData`.
+ */
+const storage: LocalStorage = new LocalStorage();
+
+@Entry(storage)
+@Component
+struct LocalGenUIAppCard {
+ @LocalStorageProp('appId') appId: string = '';
+ @LocalStorageProp('state') cardState: string = 'pending';
+ @LocalStorageProp('title') title: string = '';
+ @LocalStorageProp('initial') initial: string = 'AI';
+ @LocalStorageProp('imageName') imageName: string = '';
+
+ private open(): void {
+ const params: Record = {};
+ if (this.appId.length > 0) {
+ params['openbitfunLocalGenUIApp'] = this.appId;
+ }
+ postCardAction(this, { action: 'router', abilityName: 'EntryAbility', params: params });
+ }
+
+ build() {
+ Stack({ alignContent: Alignment.BottomStart }) {
+ if (this.cardState === 'ready' && this.imageName.length > 0) {
+ Image(`memory://${this.imageName}`)
+ .width('100%').height('100%').objectFit(ImageFit.Cover)
+ } else {
+ Column({ space: 4 }) {
+ if (this.cardState === 'pending' && this.title.length === 0) {
+ Image($r('app.media.openbitfun_app_icon')).width(40).height(40).borderRadius(10)
+ } else {
+ Text(this.initial)
+ .fontSize(36).fontWeight(FontWeight.Bold)
+ .fontColor($r('app.color.connect_hero_accent'))
+ .opacity(this.cardState === 'missing' ? 0.4 : 1)
+ }
+ }
+ .width('100%').height('100%').justifyContent(FlexAlign.Center)
+ .linearGradient({
+ angle: 145,
+ colors: [[$r('app.color.connect_hero_surface'), 0], [$r('app.color.connect_hero_bg'), 1]]
+ })
+ }
+ Column({ space: 2 }) {
+ Text(this.title.length > 0 ? this.title : $r('app.string.genui_card_name'))
+ .fontSize(13).fontWeight(FontWeight.Medium)
+ .fontColor($r('app.color.content_on_action'))
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ if (this.cardState === 'missing') {
+ Text($r('app.string.genui_card_missing'))
+ .fontSize(10).fontColor($r('app.color.content_on_action')).opacity(0.85)
+ .maxLines(1)
+ } else if (this.cardState === 'pending') {
+ Text($r('app.string.genui_card_pending'))
+ .fontSize(10).fontColor($r('app.color.content_on_action')).opacity(0.85)
+ .maxLines(1)
+ }
+ }
+ .width('100%').alignItems(HorizontalAlign.Start)
+ .padding({ left: 10, right: 10, top: 6, bottom: 8 })
+ .backgroundColor($r('app.color.toast_background'))
+ }
+ .width('100%').height('100%').clip(true)
+ .backgroundColor($r('app.color.card'))
+ .onClick(() => this.open())
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/EnUsMessages.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/EnUsMessages.ets
index ddb6f85..aa7baf9 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/EnUsMessages.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/EnUsMessages.ets
@@ -210,8 +210,7 @@ export const EN_US_MESSAGES: [string, string][] = [
['sidebar.tasks', 'Scheduled'],
['sidebar.tools', 'Apps'],
['sidebar.more', 'More'],
- ['sidebar.bot', 'Bot'],
- ['sidebar.botComingSoon', 'In development. Stay tuned.'],
+ ['localGenui.entry', 'Create mini apps'],
['sidebar.newChat', 'Chat'],
['sidebar.generalChat', 'General chat'],
['sidebar.conversations', 'Recent chats'],
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/ZhCnMessages.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/ZhCnMessages.ets
index 52d47f9..3c92358 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/ZhCnMessages.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/i18n/ZhCnMessages.ets
@@ -210,8 +210,7 @@ export const ZH_CN_MESSAGES: [string, string][] = [
['sidebar.tasks', '已计划'],
['sidebar.tools', '应用'],
['sidebar.more', '更多'],
- ['sidebar.bot', 'Bot'],
- ['sidebar.botComingSoon', '开发中,敬请期待'],
+ ['localGenui.entry', '创建小应用'],
['sidebar.newChat', '聊天'],
['sidebar.generalChat', '普通对话'],
['sidebar.conversations', '最近对话'],
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/model/ChatTimelineModels.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/model/ChatTimelineModels.ets
index c16a4e6..01905ec 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/model/ChatTimelineModels.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/model/ChatTimelineModels.ets
@@ -60,7 +60,8 @@ export class ObservableChatTimelineItem implements ChatTimelineItem {
thinking: message.thinking,
tools: message.tools ? message.tools.slice() : undefined,
items: message.items ? message.items.slice() : undefined,
- images: message.images ? message.images.slice() : undefined
+ images: message.images ? message.images.slice() : undefined,
+ appCard: message.appCard
};
}
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/model/RemoteModels.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/model/RemoteModels.ets
index 15eb301..cfea086 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/model/RemoteModels.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/model/RemoteModels.ets
@@ -70,6 +70,21 @@ export interface RemoteSession {
deviceId?: string;
}
+/**
+ * A generated mini app attached to an assistant message. Only Local GenUI
+ * produces it; remote hosts never send this field.
+ */
+export interface ChatMessageAppCard {
+ appId: string;
+ title: string;
+ /** Localized status line. */
+ status: string;
+ /** Preview image on this phone, or '' for the drawn fallback. */
+ thumbnailPath: string;
+ /** Reference handed back through the existing open-link intent. */
+ link: string;
+}
+
export interface ChatMessage {
id: string;
role: string;
@@ -84,6 +99,7 @@ export interface ChatMessage {
tools?: RemoteToolStatusResponse[];
items?: ChatMessageItemResponse[];
images?: ImageAttachment[];
+ appCard?: ChatMessageAppCard;
}
export interface SessionSummary {
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/AppRoot.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/AppRoot.ets
index 27c1fa9..bc304a3 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/AppRoot.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/AppRoot.ets
@@ -5,6 +5,7 @@ import { ColdStartHomeTransition } from './components/ColdStartHomeTransition';
import { AppRootPresentation } from './components/AppRootPresentation';
import { WatchProvisionCard } from './components/WatchProvisionCard';
import { ArkUiAppRootHostAdapter } from './host/AppRootHostAdapter';
+import { LocalGenUIPresentation } from '../services/local-genui/LocalGenUIModels';
import { AppRootRuntime } from './runtime/AppRootRuntime';
@Entry
@@ -52,6 +53,9 @@ struct AppRoot {
}
onBackPress(): boolean {
+ if (this.runtime.localGenUIViewModel.back()) {
+ return true;
+ }
if (this.runtime.miniAppViewModel.state.visible) {
if (this.runtime.miniAppViewModel.state.appId) this.runtime.miniAppViewModel.actions.back();
else this.runtime.miniAppViewModel.close();
@@ -66,6 +70,10 @@ struct AppRoot {
shellState: this.runtime.appShellState,
miniAppState: this.runtime.miniAppViewModel.state,
miniAppActions: this.runtime.miniAppViewModel.actions,
+ localGenUIState: this.runtime.localGenUIViewModel.state,
+ localGenUIActions: this.runtime.localGenUIViewModel.actions,
+ localGenUIBridge: this.runtime.localGenUIViewModel.bridge,
+ onLocalGenUIPresentation: (report: LocalGenUIPresentation) => this.runtime.localGenUIViewModel.updatePresentation(report),
navigationStack: this.runtime.navigationStack,
remotePageState: this.runtime.remotePageState,
deviceDirectoryState: this.runtime.deviceDirectoryState,
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/actions/ConversationIntent.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/actions/ConversationIntent.ets
index 32b9696..5c4a141 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/actions/ConversationIntent.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/actions/ConversationIntent.ets
@@ -7,6 +7,7 @@ export enum ConversationIntentType {
MessageQueue = 'message_queue',
Mailbox = 'mailbox',
OpenSidebar = 'open_sidebar',
+ OpenBotHistory = 'open_bot_history',
Back = 'back',
NewSession = 'new_session',
TogglePin = 'toggle_pin',
@@ -23,6 +24,7 @@ export enum ConversationIntentType {
CopyMessage = 'copy_message',
RetryMessage = 'retry_message',
SelectModel = 'select_model',
+ ManageModels = 'manage_models',
PickImages = 'pick_images',
RemoveImage = 'remove_image',
OpenFilePreview = 'open_file_preview',
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppRootPresentation.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppRootPresentation.ets
index 53e63cd..e83ace7 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppRootPresentation.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppRootPresentation.ets
@@ -4,6 +4,10 @@ import { RemoteCompactHomePolicy } from '../policy/RemoteCompactHomePolicy';
import { MiniAppActions, emptyMiniAppActions } from '../../model/MiniAppModels';
import { MiniAppState } from '../state/MiniAppState';
import { MiniAppSurface } from './MiniAppSurface';
+import { LocalGenUIActions, LocalGenUIState, emptyLocalGenUIActions } from '../state/LocalGenUIState';
+import { LocalGenUIRuntimeBridge } from '../../services/local-genui/LocalGenUIRuntimeBridge';
+import { LocalGenUISurface } from './LocalGenUISurface';
+import { LocalGenUIPresentation } from '../../services/local-genui/LocalGenUIModels';
import display from '@ohos.display';
import mediaQuery from '@ohos.mediaquery';
import { RemoteUiState } from '../../services/RemoteUiState';
@@ -68,6 +72,10 @@ enum WideWorkspacePresentationMode {
export struct AppRootPresentation {
@Param miniAppState: MiniAppState = new MiniAppState();
@Param miniAppActions: MiniAppActions = emptyMiniAppActions();
+ @Param localGenUIState: LocalGenUIState = new LocalGenUIState();
+ @Param localGenUIActions: LocalGenUIActions = emptyLocalGenUIActions();
+ @Param localGenUIBridge: LocalGenUIRuntimeBridge = new LocalGenUIRuntimeBridge();
+ @Event onLocalGenUIPresentation: (report: LocalGenUIPresentation) => void = () => {};
@Param shellState: AppShellState = new AppShellState();
@Param navigationStack: NavPathStack = new NavPathStack();
@Param remotePageState: RemotePageState = new RemotePageState();
@@ -145,7 +153,7 @@ export struct AppRootPresentation {
AppShell({
shellState: this.shellState,
useWideLayout: this.isWideLayout(),
- allowSidebar: !this.showWelcomeHome(),
+ allowSidebar: true,
settingsPlacement: this.settingsPlacement,
compactAccountLogin: this.shellState.settingsMode === 'account' &&
this.remotePageState.accountUserId.trim().length === 0,
@@ -205,7 +213,26 @@ export struct AppRootPresentation {
// Sidebar destinations belong to the moving content pane. A root-level
// overlay would cover the drawer before its closing animation can run.
if (this.miniAppState.visible) {
- MiniAppSurface({ state: this.miniAppState, actions: this.miniAppActions })
+ MiniAppSurface({
+ state: this.miniAppState,
+ actions: this.miniAppActions,
+ generatedApps: this.localGenUIState.gallery,
+ onOpenGenerated: (appId: string) => this.localGenUIActions.openGalleryApp(appId),
+ onRemoveGenerated: (appId: string) => this.localGenUIActions.removeFromGallery(appId),
+ generatedState: this.localGenUIState,
+ onPrepareDesktopCard: (appId: string) => this.localGenUIActions.prepareDesktopCard(appId),
+ onDesktopCardAdded: (appId: string, formId: string, error: string) =>
+ this.localGenUIActions.desktopCardAdded(appId, formId, error)
+ })
+ }
+ if (this.localGenUIState.visible) {
+ LocalGenUISurface({
+ state: this.localGenUIState,
+ actions: this.localGenUIActions,
+ bridge: this.localGenUIBridge,
+ locale: RemoteI18n.language(),
+ onPresentation: (report: LocalGenUIPresentation) => this.onLocalGenUIPresentation(report)
+ })
}
}
.width('100%')
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppSidebar.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppSidebar.ets
index a983b0f..8249cad 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppSidebar.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/AppSidebar.ets
@@ -126,14 +126,13 @@ export struct AppSidebar {
private EmptySlot() {
}
- /** Reserved for the future on-device assistant, never a remote-session shortcut. */
@Builder
- private BotEntryRow() {
+ private CreateMiniAppEntryRow() {
Button({ type: ButtonType.Normal }) {
Row({ space: SidebarLayoutPolicy.ROW_GAP }) {
- SidebarGlyph({ kind: 'assistant', iconSize: SidebarLayoutPolicy.PROMINENT_ICON_SLOT_SIZE,
+ SidebarGlyph({ kind: 'create_app', iconSize: SidebarLayoutPolicy.PROMINENT_ICON_SLOT_SIZE,
tint: SIDEBAR_MUTED })
- Text(RemoteI18n.t('sidebar.bot'))
+ Text(RemoteI18n.t('localGenui.entry'))
.fontSize(MobileDesignTypography.bodyMedium.size)
.fontWeight(FontWeight.Regular)
.fontColor(SIDEBAR_MUTED)
@@ -141,12 +140,12 @@ export struct AppSidebar {
}.width('100%').alignItems(VerticalAlign.Center)
}
.width('100%')
- .height(40)
+ .height(SidebarLayoutPolicy.ENTRY_ROW_HEIGHT)
.padding({ left: SidebarLayoutPolicy.ROW_HORIZONTAL_PADDING, right: SidebarLayoutPolicy.ROW_HORIZONTAL_PADDING })
.backgroundColor(TRANSPARENT)
.borderRadius(6)
.id('sidebar-local-bot')
- .accessibilityText(RemoteI18n.t('sidebar.bot'))
+ .accessibilityText(RemoteI18n.t('localGenui.entry'))
.onClick(() => this.onOpenBot())
}
@@ -309,7 +308,7 @@ export struct AppSidebar {
private NavigationScroll() {
Scroll() {
Column() {
- this.BotEntryRow()
+ this.CreateMiniAppEntryRow()
this.MiniAppsEntryRow()
if (this.showWorkspaceSection) {
this.contentSlot()
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/BotSessionList.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/BotSessionList.ets
new file mode 100644
index 0000000..1a9c171
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/BotSessionList.ets
@@ -0,0 +1,99 @@
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { LocalGenUISession } from '../../services/local-genui/LocalGenUIModels';
+import { INK, LINE, MUTED, SIDEBAR_SELECTION, TRANSPARENT } from './Theme';
+
+/**
+ * The saved conversations on the Bot sessions page.
+ */
+@ComponentV2
+export struct BotSessionList {
+ @Param sessions: LocalGenUISession[] = [];
+ @Param selectedSessionId: string = '';
+ @Param busy: boolean = false;
+ @Event onOpenSession: (sessionId: string) => void = (_sessionId: string) => {};
+ @Event onDeleteSession: (sessionId: string) => void = (_sessionId: string) => {};
+ @Local actionSessionId: string = '';
+
+ build() {
+ Column() {
+ if (this.sessions.length === 0) {
+ Text(RemoteI18n.t('localGenui.noHistory'))
+ .fontSize(MobileDesignTypography.bodyMedium.size)
+ .fontColor(MUTED)
+ .textAlign(TextAlign.Center)
+ .width('100%').padding({ top: 24, bottom: 24 })
+ }
+ ForEach(this.sessions, (session: LocalGenUISession, index: number) => {
+ if (index > 0) {
+ Divider().strokeWidth(0.5).color(LINE).margin({ left: 12, right: 12 })
+ }
+ this.SessionRow(session)
+ }, (session: LocalGenUISession): string => `${session.id}:${session.title}:${session.updatedAt}`)
+ }.width('100%')
+ }
+
+ @Builder
+ private SessionRow(session: LocalGenUISession) {
+ Row({ space: 10 }) {
+ Column({ space: 3 }) {
+ Text(session.title || RemoteI18n.t('sidebar.untitled'))
+ .fontSize(MobileDesignTypography.bodyMedium.size)
+ .fontWeight(session.id === this.selectedSessionId ? FontWeight.Medium : FontWeight.Regular)
+ .fontColor(INK).maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ if (this.updatedTime(session).length > 0) {
+ Text(this.updatedTime(session)).fontSize(MobileDesignTypography.labelSmall.size).fontColor(MUTED)
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ }
+ }.layoutWeight(1).alignItems(HorizontalAlign.Start)
+ if (this.busy && session.id === this.selectedSessionId) {
+ LoadingProgress().width(16).height(16)
+ } else if (session.id === this.selectedSessionId) {
+ SymbolGlyph($r('sys.symbol.checkmark')).fontSize(16).fontColor([INK])
+ } else {
+ SymbolGlyph($r('sys.symbol.chevron_right')).fontSize(12).fontColor([MUTED])
+ }
+ }
+ .width('100%')
+ .constraintSize({ minHeight: 56 })
+ .padding({ left: 12, right: 12, top: 8, bottom: 8 })
+ .alignItems(VerticalAlign.Center)
+ .backgroundColor(session.id === this.selectedSessionId ? SIDEBAR_SELECTION : TRANSPARENT)
+ .borderRadius(10)
+ .accessibilityText(session.title)
+ .accessibilitySelected(session.id === this.selectedSessionId)
+ .onClick(() => {
+ if (!this.busy || session.id === this.selectedSessionId) this.onOpenSession(session.id);
+ })
+ .bindPopup(this.actionSessionId === session.id, {
+ builder: (): void => this.SessionActions(session),
+ placement: Placement.Bottom,
+ enableArrow: false,
+ onStateChange: (event) => {
+ if (!event.isVisible && this.actionSessionId === session.id) this.actionSessionId = '';
+ }
+ })
+ .gesture(LongPressGesture({ repeat: false }).onAction(() => {
+ this.actionSessionId = session.id;
+ }))
+ }
+
+ private updatedTime(session: LocalGenUISession): string {
+ const timestamp = Date.parse(session.updatedAt || session.createdAt);
+ return Number.isFinite(timestamp) ? RemoteI18n.formatMessageTime(timestamp) : '';
+ }
+
+ @Builder
+ private SessionActions(session: LocalGenUISession) {
+ Column() {
+ Text(RemoteI18n.t('common.delete'))
+ .fontSize(MobileDesignTypography.bodyMedium.size)
+ .fontColor(INK)
+ .padding({ left: 20, right: 20, top: 12, bottom: 12 })
+ .onClick(() => {
+ this.actionSessionId = '';
+ this.onDeleteSession(session.id);
+ })
+ }
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageBubble.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageBubble.ets
index f842939..35c9f1b 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageBubble.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageBubble.ets
@@ -1,4 +1,5 @@
import { InteractionMailboxState } from '../../model/InteractionMailbox';
+import { MessageAppCard } from './MessageAppCard';
import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
import { ConversationUiImage, ConversationUiMessage, ConversationUiMessageItem, ConversationUiQuestionAnswer, ConversationUiToolStatus } from '../state/ConversationUiModels';
import { MessageCopyScope } from '../actions/ConversationIntent';
@@ -160,6 +161,12 @@ export struct ChatMessageBubble {
if (this.item.images && this.item.images.length > 0) {
this.MessageImages(this.item.images)
}
+ if (this.item.appCard) {
+ MessageAppCard({
+ card: this.item.appCard,
+ onOpen: (link: string, title: string) => this.onOpenFilePreview(link, title)
+ })
+ }
if (this.isFailedAssistant(this.item) && (this.item.error || '').trim().length > 0) {
this.AssistantFailure(
this.item.error || '',
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ComposerBar.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ComposerBar.ets
index e5b66eb..46f332d 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ComposerBar.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ComposerBar.ets
@@ -114,6 +114,7 @@ export struct ComposerBar {
@Event onStop: () => void = () => {};
@Event onVoiceInput: () => void = () => {};
@Event onSelectModel: (modelId: string) => void = (_modelId: string) => {};
+ @Event onManageModels: () => void = () => {};
@Event onChatInputChange: (value: string) => void = (_value: string) => {};
aboutToAppear(): void {
@@ -329,6 +330,11 @@ export struct ComposerBar {
}
})
.onClick(() => {
+ // A surface that owns its models opens their manager when none exist yet.
+ if (this.enabledModels().length === 0 && this.capabilities.supportsModelManagement) {
+ this.onManageModels();
+ return;
+ }
this.toggleModelSelectorPopover();
})
}
@@ -361,6 +367,32 @@ export struct ComposerBar {
.scrollBar(BarState.Auto)
.edgeEffect(EdgeEffect.Spring)
.divider(null)
+ if (this.capabilities.supportsModelManagement) {
+ Divider()
+ .strokeWidth(COMPOSER_MODEL_DEFAULTS_DIVIDER_STROKE)
+ .color(LINE)
+ .width('100%')
+ Row({ space: 10 }) {
+ Stack({ alignContent: Alignment.Center }) {
+ SymbolGlyph($r('sys.symbol.gearshape')).fontSize(16).fontColor([INK])
+ }
+ .width(20)
+ .height(20)
+ Text(RemoteI18n.t('localGenui.manageModels'))
+ .fontSize(MobileDesignTypography.bodySmall.size)
+ .fontWeight(FontWeight.Medium)
+ .fontColor(INK)
+ .layoutWeight(1)
+ }
+ .width('100%')
+ .constraintSize({ minHeight: MobileDesignGeometry.composerModelSelectorRowHeight })
+ .padding({ left: 10, right: 10, top: 8, bottom: 8 })
+ .borderRadius(MobileDesignGeometry.composerModelSelectorRowRadius)
+ .onClick(() => {
+ this.closeModelSelector(true);
+ this.onManageModels();
+ })
+ }
}
.width(MobileDesignGeometry.composerModelSelectorWidth)
.padding({ left: 10, right: 10, top: 10, bottom: 10 })
@@ -880,7 +912,7 @@ export struct ComposerBar {
}
private shouldShowModelControl(): boolean {
- return this.enabledModels().length > 0;
+ return this.enabledModels().length > 0 || this.capabilities.supportsModelManagement;
}
private enabledModels(): ConversationUiModel[] {
@@ -922,6 +954,9 @@ export struct ComposerBar {
return RemoteI18n.t(roleKey);
}
const selected = this.selectedModel();
+ if (!selected && this.enabledModels().length === 0 && this.capabilities.supportsModelManagement) {
+ return RemoteI18n.t('localGenui.addModel');
+ }
return selected ? ConversationModelPresentationPolicy.primaryLabel(selected, RemoteI18n.t('chat.model')) :
RemoteI18n.t('chat.model');
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ConversationView.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ConversationView.ets
index fa79790..1bf8044 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ConversationView.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ConversationView.ets
@@ -527,7 +527,7 @@ export struct ConversationView {
subtitle: this.headerSubtitle(),
titleFallback: this.headerFallback(),
allowRename: this.headerAllowRename(),
- showActions: this.headerShowActions(),
+ showActions: this.surface === ChatSurface.Local || this.headerShowActions(),
showSidebarButton: this.showSidebarButton,
showBackButton: this.showBackButton,
showSidebarRestoreButton: this.showSidebarRestoreButton,
@@ -707,6 +707,9 @@ export struct ConversationView {
onVoiceInput: () => {
this.onVoiceInput();
},
+ onManageModels: () => {
+ this.dispatchValue(ConversationIntentType.ManageModels, '');
+ },
onSelectModel: (modelId: string) => {
this.onSelectModel(modelId);
},
@@ -769,15 +772,23 @@ export struct ConversationView {
this.isSessionPinned ? RemoteI18n.t('chat.unpin') : RemoteI18n.t('chat.pin'),
() => this.onTogglePinSession(), this.isSessionPinned)
}
- this.RemoteStyleMenuItem('remote_actions_cloud', RemoteI18n.t('chat.uploadedFiles'),
- () => this.onShowUploadedFiles())
+ if (this.surface === ChatSurface.Local) {
+ this.RemoteStyleMenuItem('remote_actions_folder', RemoteI18n.t('localGenui.history'),
+ () => this.dispatchSimple(ConversationIntentType.OpenBotHistory))
+ if (this.headerShowActions()) {
+ this.RemoteStyleMenuItem('delete', RemoteI18n.t('common.delete'), () => this.onDeleteSession())
+ }
+ } else {
+ this.RemoteStyleMenuItem('remote_actions_cloud', RemoteI18n.t('chat.uploadedFiles'),
+ () => this.onShowUploadedFiles())
+ }
if (this.surface === ChatSurface.General) {
Divider().strokeWidth(1).color(LINE).margin({ top: 8, bottom: 8 })
this.RemoteStyleMenuItem('remote_actions_folder', RemoteI18n.t('sidebar.archive'),
() => this.onArchiveSession())
this.RemoteStyleMenuItem('delete', RemoteI18n.t('common.delete'),
() => this.onDeleteSession())
- } else if (this.canStop && this.connectionState === 'connected') {
+ } else if (this.surface === ChatSurface.Remote && this.canStop && this.connectionState === 'connected') {
Divider().strokeWidth(1).color(LINE).margin({ top: 8, bottom: 8 })
this.RemoteStyleMenuItem('stop', RemoteI18n.t('chat.stop'), () => this.onStop())
}
@@ -1038,7 +1049,8 @@ export struct ConversationView {
}
private headerFallback(): string {
- return RemoteI18n.t(this.headerPresentation().fallbackKey);
+ return RemoteI18n.t(this.surface === ChatSurface.Local ? 'localGenui.entry' :
+ this.headerPresentation().fallbackKey);
}
private headerAllowRename(): boolean {
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICameraPreview.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICameraPreview.ets
new file mode 100644
index 0000000..2b67de4
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICameraPreview.ets
@@ -0,0 +1,70 @@
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import {
+ LOCAL_GESTURE_SURFACE_HEIGHT,
+ LOCAL_GESTURE_SURFACE_WIDTH
+} from '../../services/local-genui/LocalGenUIGestureCamera';
+import { CONTENT_ON_ACTION, LINE, MEDIA_BACKGROUND, TOAST_BACKGROUND } from './Theme';
+
+/**
+ * Small live camera preview shown while a Local GenUI app listens for
+ * gestures, so the person knows the camera is on and can frame themselves.
+ * Platform leaf: it only owns the surface and reports its id.
+ */
+@ComponentV2
+export struct LocalGenUICameraPreview {
+ /** A short (landscape phone) screen gets a smaller preview at the same aspect. */
+ @Param compact: boolean = false;
+ /** Match the floating preview to the current window orientation. */
+ @Param landscape: boolean = false;
+ @Event onSurface: (surfaceId: string) => void = (_surfaceId: string) => {};
+ @Event onSurfaceGone: () => void = () => {};
+ private controller: XComponentController = new XComponentController();
+
+ private previewWidth(): number {
+ return this.landscape ? (this.compact ? 80 : 128) : (this.compact ? 60 : 96);
+ }
+
+ private previewHeight(): number {
+ return this.landscape ? (this.compact ? 60 : 96) : (this.compact ? 80 : 128);
+ }
+
+ aboutToDisappear(): void {
+ this.onSurfaceGone();
+ }
+
+ build() {
+ Stack({ alignContent: Alignment.Bottom }) {
+ XComponent({ type: XComponentType.SURFACE, controller: this.controller })
+ .onLoad(() => {
+ this.controller.setXComponentSurfaceSize({
+ surfaceWidth: LOCAL_GESTURE_SURFACE_WIDTH,
+ surfaceHeight: LOCAL_GESTURE_SURFACE_HEIGHT
+ });
+ this.onSurface(this.controller.getXComponentSurfaceId());
+ })
+ // The front-camera preview arrives rotated in landscape. Rotate the
+ // child counter-clockwise while swapping its layout dimensions so the
+ // person remains upright inside the horizontal preview card.
+ .width(this.landscape ? this.previewHeight() : this.previewWidth())
+ .height(this.landscape ? this.previewWidth() : this.previewHeight())
+ .rotate({ angle: this.landscape ? -90 : 0 })
+ Text(RemoteI18n.t('localGenui.cameraOn'))
+ .fontSize(MobileDesignTypography.labelSmall.size)
+ .fontColor(CONTENT_ON_ACTION)
+ .backgroundColor(TOAST_BACKGROUND)
+ .padding({ left: this.compact ? 4 : 6, right: this.compact ? 4 : 6, top: 2, bottom: 2 })
+ .borderRadius(8)
+ .maxLines(1)
+ .textOverflow({ overflow: TextOverflow.Clip })
+ .margin({ bottom: this.compact ? 4 : 6 })
+ }
+ .width(this.previewWidth())
+ .height(this.previewHeight())
+ .borderRadius(this.compact ? 12 : 16)
+ .clip(true)
+ .backgroundColor(MEDIA_BACKGROUND)
+ .border({ width: 1, color: LINE })
+ .accessibilityText(RemoteI18n.t('localGenui.cameraOn'))
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationPicker.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationPicker.ets
new file mode 100644
index 0000000..1d84ee6
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationPicker.ets
@@ -0,0 +1,114 @@
+import { CollaborationDeviceFilterType, CollaborationServiceFilter, createCollaborationServiceMenuItems,
+ CollaborationServiceStateDialog } from '@kit.ServiceCollaborationKit';
+import { image } from '@kit.ImageKit';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { HarmonyCollaborationService, HarmonyCollaborationEnvironment } from '../../services/local-genui/HarmonyCollaborationService';
+import { LocalCollaborationKind, LocalCollaborationSnapshot } from '../../services/local-genui/LocalCollaborationSession';
+import { INK, MUTED, CARD } from './Theme';
+
+/** Platform leaf: the OS owns device discovery, selection and remote consent. */
+@ComponentV2
+export struct LocalGenUICollaborationPicker {
+ @Param kind: string = '';
+ @Param diagnostic: boolean = true;
+ @Param persist: ((data: ArrayBuffer) => Promise) | undefined = undefined;
+ @Event onResult: (state: LocalCollaborationSnapshot) => void = () => {};
+ @Local environment: HarmonyCollaborationEnvironment = HarmonyCollaborationService.environment();
+ @Local status: LocalCollaborationSnapshot = { phase: 'ready', kind: 'photo', received: 0, code: 0, reason: '' };
+ @Local picture: image.PixelMap | undefined = undefined;
+ private service?: HarmonyCollaborationService;
+
+ aboutToAppear(): void {
+ this.service = new HarmonyCollaborationService((state: LocalCollaborationSnapshot): void => {
+ this.status = state;
+ this.onResult(state);
+ }, (picture: image.PixelMap | undefined): void => { this.picture = picture; }, this.persist);
+ if (this.environment.unavailable.length > 0) {
+ this.service.session.begin('photo', this.environment.unavailable);
+ }
+ }
+
+ aboutToDisappear(): void {
+ this.service?.dispose();
+ this.service = undefined;
+ }
+
+ private begin(kind: LocalCollaborationKind): void {
+ this.service?.session.begin(kind, this.environment.unavailable);
+ }
+
+ @Builder
+ private photoMenu() {
+ Menu() {
+ if (this.environment.api >= 23) {
+ createCollaborationServiceMenuItems([CollaborationServiceFilter.TAKE_PHOTO], 1,
+ [CollaborationDeviceFilterType.PHONE, CollaborationDeviceFilterType.TABLET])
+ }
+ }
+ }
+
+ @Builder
+ private scanMenu() {
+ Menu() {
+ if (this.environment.api >= 23) {
+ createCollaborationServiceMenuItems([CollaborationServiceFilter.SCAN_DOCUMENT], 1,
+ [CollaborationDeviceFilterType.PHONE, CollaborationDeviceFilterType.TABLET])
+ }
+ }
+ }
+
+ @Builder
+ private galleryMenu() {
+ Menu() {
+ if (this.environment.api >= 23) {
+ createCollaborationServiceMenuItems([CollaborationServiceFilter.IMAGE_PICKER], 1,
+ [CollaborationDeviceFilterType.PHONE, CollaborationDeviceFilterType.TABLET, CollaborationDeviceFilterType.PC_2IN1])
+ }
+ }
+ }
+
+ build() {
+ Column({ space: 12 }) {
+ Text(RemoteI18n.t('collaboration.requirements')).fontColor(MUTED)
+ .fontSize(MobileDesignTypography.bodyMedium.size)
+ if (this.diagnostic) {
+ Text(`API ${this.environment.api} · ${this.environment.deviceType} · SysCap ${this.environment.syscap}`)
+ .id('collaboration-environment').fontColor(MUTED).fontSize(MobileDesignTypography.labelSmall.size)
+ }
+ if (this.environment.unavailable.length === 0) {
+ if (this.kind === '' || this.kind === 'photo') {
+ Button(RemoteI18n.t('collaboration.photo')).id('collaboration-photo')
+ .enabled(this.status.phase === 'ready').onClick(() => this.begin('photo')).bindMenu(this.photoMenu)
+ }
+ if (this.kind === '' || this.kind === 'scan') {
+ Button(RemoteI18n.t('collaboration.scan')).id('collaboration-scan')
+ .enabled(this.status.phase === 'ready').onClick(() => this.begin('scan')).bindMenu(this.scanMenu)
+ }
+ if (this.kind === '' || this.kind === 'gallery') {
+ Button(RemoteI18n.t('collaboration.gallery')).id('collaboration-gallery')
+ .enabled(this.status.phase === 'ready').onClick(() => this.begin('gallery')).bindMenu(this.galleryMenu)
+ }
+ CollaborationServiceStateDialog({
+ onState: (code: number, type: string, buffer: ArrayBuffer): void => {
+ void this.service?.session.accept(code, type, buffer);
+ }
+ })
+ }
+ Text(RemoteI18n.t(`collaboration.phase.${this.status.phase}`))
+ .id('collaboration-status').fontColor(INK).fontSize(MobileDesignTypography.bodyMedium.size)
+ if (this.status.reason.length > 0) {
+ Text(RemoteI18n.t(`collaboration.reason.${this.status.reason}`))
+ .id('collaboration-reason').fontColor(MUTED).fontSize(MobileDesignTypography.bodyMedium.size)
+ }
+ if (this.diagnostic) {
+ Text(RemoteI18n.f2('collaboration.result', String(this.status.received), String(this.status.code)))
+ .id('collaboration-result').fontColor(MUTED).fontSize(MobileDesignTypography.labelSmall.size)
+ }
+ if (this.picture) {
+ Image(this.picture).width('100%').height(240).objectFit(ImageFit.Contain)
+ .accessibilityText(RemoteI18n.t('collaboration.receivedImage'))
+ }
+ }.width('100%').padding(16).backgroundColor(CARD).borderRadius(16)
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationSheet.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationSheet.ets
new file mode 100644
index 0000000..7c1fbb6
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUICollaborationSheet.ets
@@ -0,0 +1,29 @@
+import { LocalCollaborationRequest } from '../../services/local-genui/LocalGenUICollaborationHost';
+import { LocalCollaborationSnapshot } from '../../services/local-genui/LocalCollaborationSession';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { LocalGenUICollaborationPicker } from './LocalGenUICollaborationPicker';
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { INK, PAGE_BG } from './Theme';
+
+@ComponentV2
+export struct LocalGenUICollaborationSheet {
+ @Param @Require request: LocalCollaborationRequest;
+ @Event onClose: (token: number) => void = () => {};
+ @Event onResult: (token: number, state: LocalCollaborationSnapshot) => void = () => {};
+ @Param @Require receive: (token: number, data: ArrayBuffer) => Promise;
+
+ aboutToDisappear(): void { this.onClose(this.request.token); }
+
+ build() {
+ Scroll() {
+ Column({ space: 16 }) {
+ Text(RemoteI18n.t('collaboration.inputTitle')).fontColor(INK)
+ .fontSize(MobileDesignTypography.titleLarge.size)
+ LocalGenUICollaborationPicker({ kind: this.request.kind, diagnostic: false,
+ persist: (data: ArrayBuffer): Promise => this.receive(this.request.token, data),
+ onResult: (state: LocalCollaborationSnapshot): void => this.onResult(this.request.token, state) })
+ Button(RemoteI18n.t('collaboration.closeInput')).onClick(() => this.onClose(this.request.token))
+ }.width('100%').constraintSize({ maxWidth: 760 }).padding(20)
+ }.width('100%').height('100%').backgroundColor(PAGE_BG)
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIModelManager.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIModelManager.ets
new file mode 100644
index 0000000..070fe39
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIModelManager.ets
@@ -0,0 +1,191 @@
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { LocalGenUIModelProfile } from '../../services/local-genui/LocalGenUIModelCatalog';
+import { LocalGenUIActions, LocalGenUIState, emptyLocalGenUIActions } from '../state/LocalGenUIState';
+import { CARD, CONTENT_ON_ACTION, INK, LINE, MUTED, PAGE_BG, PRIMARY_ACTION, SHADOW_FAINT, SOFT, STATUS_DANGER, SUBTLE } from './Theme';
+import { SheetCloseHeader } from './SheetCloseHeader';
+import { AppActionButton, AppActionStyle } from './AppActionButton';
+
+/** Same field treatment as the model-service settings panel. */
+class LocalFieldStyle implements AttributeModifier {
+ applyNormalAttribute(instance: TextInputAttribute): void {
+ instance.width('100%')
+ .height(52)
+ .fontSize(MobileDesignTypography.titleSmall.size)
+ .fontColor(INK)
+ .placeholderColor(SUBTLE)
+ .backgroundColor(CARD)
+ .border({ width: 0.5, color: LINE })
+ .borderRadius(12)
+ .shadow({ radius: 12, color: SHADOW_FAINT, offsetY: 4 })
+ .padding({ left: 14, right: 14 });
+ }
+}
+
+/**
+ * Model profiles of Local GenUI Mode: list, add, edit and delete. Keys are
+ * entered here and stored encrypted on the phone; they are never displayed.
+ */
+@ComponentV2
+export struct LocalGenUIModelManager {
+ @Param state: LocalGenUIState = new LocalGenUIState();
+ @Param actions: LocalGenUIActions = emptyLocalGenUIActions();
+ @Local name: string = '';
+ @Local apiUrl: string = '';
+ @Local modelName: string = '';
+ @Local apiKey: string = '';
+
+ @Monitor('state.editorOpen', 'state.editingModelId')
+ onEditorChange(): void {
+ if (!this.state.editorOpen) return;
+ const model = this.state.models.find((item: LocalGenUIModelProfile) => item.id === this.state.editingModelId);
+ this.name = model ? model.name : '';
+ this.apiUrl = model ? model.apiUrl : '';
+ this.modelName = model ? model.modelName : '';
+ this.apiKey = '';
+ }
+
+ build() {
+ Column() {
+ SheetCloseHeader({
+ title: this.state.editorOpen
+ ? RemoteI18n.t(this.state.editingModelId === 'new' ? 'localGenui.addModel' : 'localGenui.editModel')
+ : RemoteI18n.t('localGenui.manageModels'),
+ showDivider: true,
+ isEnabled: !this.state.editorSaving,
+ onClose: (): void => {
+ if (this.state.editorOpen) this.actions.closeEditor();
+ else this.actions.closeModelManager();
+ }
+ })
+
+ if (this.state.editorOpen) {
+ this.Editor()
+ } else {
+ this.ModelList()
+ }
+ }
+ .width('100%').height('100%').backgroundColor(PAGE_BG)
+ }
+
+ @Builder
+ ModelList() {
+ Scroll() {
+ Column({ space: 10 }) {
+ if (this.state.models.length === 0) {
+ Text(RemoteI18n.t('localGenui.noModels'))
+ .fontSize(MobileDesignTypography.bodyMedium.size).fontColor(MUTED).padding({ top: 8, bottom: 8 })
+ }
+ ForEach(this.state.models, (model: LocalGenUIModelProfile) => {
+ Row({ space: 10 }) {
+ Column({ space: 2 }) {
+ Text(model.name.trim().length > 0 ? model.name : model.modelName)
+ .fontSize(MobileDesignTypography.bodyMedium.size).fontWeight(FontWeight.Medium).fontColor(INK)
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ Text(`${model.modelName} · ${this.host(model.apiUrl)}`)
+ .fontSize(MobileDesignTypography.labelSmall.size).fontColor(MUTED)
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ }.layoutWeight(1).alignItems(HorizontalAlign.Start)
+ if (model.id === this.state.currentModelId) {
+ Text(RemoteI18n.t('settings.modelService.currentModel')).fontSize(MobileDesignTypography.labelSmall.size).fontColor(MUTED)
+ }
+ SymbolGlyph($r('sys.symbol.chevron_right')).fontSize(14).fontColor([MUTED])
+ }
+ .width('100%').padding(14).borderRadius(16).backgroundColor(CARD).border({ width: 1, color: LINE })
+ .onClick(() => this.actions.editModel(model.id))
+ }, (model: LocalGenUIModelProfile) => `${model.id}:${model.name}:${model.modelName}:${model.apiUrl}`)
+ AppActionButton({
+ label: RemoteI18n.t('localGenui.addModel'),
+ style: AppActionStyle.Primary,
+ actionHeight: 50,
+ onAction: (): void => this.actions.editModel('new')
+ })
+ }
+ .width('100%').padding({ left: 16, right: 16, bottom: 24 })
+ }
+ .width('100%').layoutWeight(1).align(Alignment.Top)
+ }
+
+ @Builder
+ Editor() {
+ Scroll() {
+ Column({ space: 12 }) {
+ this.Field(RemoteI18n.t('localGenui.modelDisplayName'))
+ TextInput({ text: this.name, placeholder: RemoteI18n.t('localGenui.modelDisplayNameHint') })
+ .attributeModifier(new LocalFieldStyle())
+ .onChange((value: string) => { this.name = value; })
+ this.Field(RemoteI18n.t('settings.modelService.apiUrl'))
+ TextInput({ text: this.apiUrl, placeholder: 'https://api.example.com/v1' })
+ .attributeModifier(new LocalFieldStyle())
+ .type(InputType.URL)
+ .onChange((value: string) => { this.apiUrl = value; })
+ this.Field(RemoteI18n.t('localGenui.apiKey'))
+ TextInput({ text: this.apiKey, placeholder: this.state.editorHasKey ? RemoteI18n.t('localGenui.apiKeyKept') : RemoteI18n.t('localGenui.apiKey') })
+ .attributeModifier(new LocalFieldStyle())
+ .type(InputType.Password)
+ .showPasswordIcon(true)
+ .onChange((value: string) => { this.apiKey = value; })
+ Row({ space: 8 }) {
+ this.Field(RemoteI18n.t('settings.modelService.modelName'))
+ Blank()
+ if (this.state.fetchingModels) {
+ LoadingProgress().width(18).height(18)
+ }
+ Text(RemoteI18n.t('localGenui.fetchModels'))
+ .fontSize(MobileDesignTypography.labelSmall.size).fontColor(INK)
+ .padding({ left: 10, right: 10, top: 5, bottom: 5 }).borderRadius(14).backgroundColor(SOFT)
+ .enabled(!this.state.fetchingModels && this.apiUrl.trim().length > 0)
+ .onClick(() => this.actions.fetchRemoteModels(this.apiUrl, this.apiKey))
+ }.width('100%')
+ TextInput({ text: this.modelName, placeholder: RemoteI18n.t('settings.modelService.modelName') })
+ .attributeModifier(new LocalFieldStyle())
+ .onChange((value: string) => { this.modelName = value; })
+ if (this.state.remoteModelNames.length > 0) {
+ Flex({ wrap: FlexWrap.Wrap }) {
+ ForEach(this.state.remoteModelNames, (name: string) => {
+ Text(name)
+ .fontSize(MobileDesignTypography.labelSmall.size)
+ .fontColor(name === this.modelName ? CONTENT_ON_ACTION : INK)
+ .backgroundColor(name === this.modelName ? PRIMARY_ACTION : SOFT)
+ .padding({ left: 10, right: 10, top: 6, bottom: 6 }).borderRadius(14)
+ .margin({ right: 8, bottom: 8 })
+ .onClick(() => { this.modelName = name; })
+ }, (name: string) => name)
+ }.width('100%')
+ }
+ if (this.state.editorError.length > 0) {
+ Text(this.state.editorError).fontSize(MobileDesignTypography.bodySmall.size).fontColor(STATUS_DANGER)
+ .copyOption(CopyOptions.InApp)
+ }
+ AppActionButton({
+ label: this.state.editorSaving ? RemoteI18n.t('common.loading') : RemoteI18n.t('common.save'),
+ style: AppActionStyle.Primary,
+ actionHeight: 50,
+ isEnabled: !this.state.editorSaving,
+ onAction: (): void => this.actions.saveModel({ name: this.name, apiUrl: this.apiUrl, modelName: this.modelName, apiKey: this.apiKey })
+ })
+ if (this.state.editingModelId !== 'new') {
+ AppActionButton({
+ label: RemoteI18n.t('localGenui.deleteModel'),
+ style: AppActionStyle.Destructive,
+ actionHeight: 50,
+ onAction: (): void => this.actions.removeModel(this.state.editingModelId)
+ })
+ }
+ }
+ .width('100%').padding({ left: 16, right: 16, bottom: 24 }).alignItems(HorizontalAlign.Start)
+ }
+ .width('100%').layoutWeight(1).align(Alignment.Top)
+ }
+
+ @Builder
+ Field(label: string) {
+ Text(label).fontSize(MobileDesignTypography.bodyMedium.size).fontWeight(FontWeight.Medium).fontColor(INK)
+ }
+
+ private host(url: string): string {
+ const withoutScheme = url.replace(/^https?:\/\//, '');
+ const slash = withoutScheme.indexOf('/');
+ return slash >= 0 ? withoutScheme.slice(0, slash) : withoutScheme;
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUISurface.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUISurface.ets
new file mode 100644
index 0000000..b9abeee
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUISurface.ets
@@ -0,0 +1,357 @@
+import { AddFormMenuItem, KeyboardAvoidMode } from '@kit.ArkUI';
+import { BusinessError } from '@kit.BasicServicesKit';
+import { resourceManager } from '@kit.LocalizationKit';
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { LocalGenUIPresentation } from '../../services/local-genui/LocalGenUIModels';
+import { LocalGenUIRuntimeBridge } from '../../services/local-genui/LocalGenUIRuntimeBridge';
+import { WindowInsetsBinding } from '../../services/WindowSystemBarService';
+import { LocalGenUIActions, LocalGenUIState, emptyLocalGenUIActions } from '../state/LocalGenUIState';
+import { ConversationIntent, ConversationIntentType } from '../actions/ConversationIntent';
+import { ConversationViewState } from '../state/ConversationViewState';
+import { ConversationViewHost } from './ConversationViewHost';
+import { BotSessionList } from './BotSessionList';
+import { AppActionButton, AppActionStyle } from './AppActionButton';
+import { LocalGenUICameraPreview } from './LocalGenUICameraPreview';
+import { LocalGenUICollaborationSheet } from './LocalGenUICollaborationSheet';
+import { LocalCollaborationRequest } from '../../services/local-genui/LocalGenUICollaborationHost';
+import { LocalCollaborationSnapshot } from '../../services/local-genui/LocalCollaborationSession';
+import { LocalGenUIModelManager } from './LocalGenUIModelManager';
+import { LocalGenUIWebSurface } from './LocalGenUIWebSurface';
+import { NavigationBackButton } from './NavigationBackButton';
+import { TemplateIcon } from './TemplateIcon';
+import { CONTENT_ON_ACTION, FLOATING_PANEL_BG, INK, PAGE_BG, SHADOW_SUBTLE, TOAST_BACKGROUND } from './Theme';
+
+/** Component the launcher snapshots for the add-to-desktop animation. */
+const APP_BODY_ID: string = 'local-genui-app-body';
+
+const WIDE_BREAKPOINT: number = 600;
+
+/**
+ * Local GenUI page. It lives in the moving content pane like a remote
+ * conversation: the sidebar opens over it, and remote destinations close it.
+ */
+@ComponentV2
+export struct LocalGenUISurface {
+ @Param state: LocalGenUIState = new LocalGenUIState();
+ @Param actions: LocalGenUIActions = emptyLocalGenUIActions();
+ @Param @Require bridge: LocalGenUIRuntimeBridge;
+ @Param locale: string = 'zh-CN';
+ @Event onPresentation: (report: LocalGenUIPresentation) => void = () => {};
+ @Local insets: WindowInsetsBinding = new WindowInsetsBinding();
+ @Local scheme: string = 'light';
+ @Local bodyWidth: number = 0;
+ @Local rootWidth: number = 0;
+ @Local rootHeight: number = 0;
+ private previousKeyboardAvoidMode: KeyboardAvoidMode = KeyboardAvoidMode.OFFSET;
+
+ aboutToAppear(): void {
+ // The composer sits at the bottom; resize so the header stays on screen.
+ this.previousKeyboardAvoidMode = this.getUIContext().getKeyboardAvoidMode();
+ this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE);
+ this.actions.appOnScreen(this.showsApp());
+ const context = this.getUIContext().getHostContext();
+ if (context) {
+ this.insets.bind(this.getUIContext(), context);
+ try {
+ const colorMode = context.resourceManager.getConfigurationSync().colorMode;
+ this.scheme = colorMode === resourceManager.ColorMode.DARK ? 'dark' : 'light';
+ } catch (_err) {
+ this.scheme = 'light';
+ }
+ }
+ }
+
+ aboutToDisappear(): void {
+ this.actions.appOnScreen(false);
+ this.insets.unbind();
+ this.getUIContext().setKeyboardAvoidMode(this.previousKeyboardAvoidMode);
+ }
+
+ private report(): void {
+ this.onPresentation({
+ posture: this.rootWidth >= WIDE_BREAKPOINT ? 'wide' : 'compact',
+ deviceWidth: Math.round(this.rootWidth),
+ deviceHeight: Math.round(this.rootHeight),
+ safeTop: Math.round(this.insets.top),
+ safeBottom: Math.round(this.insets.bottom),
+ // The runtime page fills the device width; it is never scaled.
+ viewportScale: 1
+ });
+ }
+
+ /** Device capabilities run only while the app pane is the visible one. */
+ @Monitor('state.view', 'state.appId')
+ onAppVisibilityChanged(): void {
+ this.actions.appOnScreen(this.showsApp());
+ }
+
+ private statusText(status: string): string {
+ return status.length > 0 ? RemoteI18n.t(`localGenui.status.${status}`) : '';
+ }
+
+ /** A missing app (e.g. opened from a stale desktop card) says so, not "unsupported". */
+ private statusLine(): string {
+ if (this.state.appStreaming) return RemoteI18n.t('localGenui.generating');
+ if (this.state.appStatus === 'unsupported' && this.state.appTitle.length === 0 && this.state.appDetail.length > 0) {
+ return this.state.appDetail;
+ }
+ return this.statusText(this.state.appStatus);
+ }
+
+ private showsApp(): boolean {
+ return this.state.view === 'app' && this.state.appId.length > 0;
+ }
+
+ /** The conversation pane is the shared remote/general ConversationView. */
+ private conversationState(): ConversationViewState {
+ return ConversationViewState.local(this.state.conversation, '');
+ }
+
+ private onConversationIntent(intent: ConversationIntent): void {
+ if (intent.type === ConversationIntentType.OpenBotHistory) {
+ this.actions.showSessions();
+ return;
+ }
+ this.actions.conversation(intent);
+ }
+
+ /** Floating controls reserve this much below the top inset (vp). */
+ private static readonly CONTROL_SIZE: number = 40;
+ private static readonly CONTROL_TOP: number = 8;
+
+ /** The page runs under the floating controls; tell it how much to keep clear. */
+ private syncPageInsets(): void {
+ const chrome = this.showsApp() ? LocalGenUISurface.CONTROL_TOP + LocalGenUISurface.CONTROL_SIZE : 0;
+ this.bridge.setInsets(this.insets.top + chrome, this.insets.left, this.insets.right, this.insets.bottom);
+ }
+
+ @Monitor('insets.top', 'insets.left', 'insets.right', 'insets.bottom', 'state.view', 'state.appId')
+ onInsetsChanged(): void {
+ this.syncPageInsets();
+ }
+
+ private goBack(): void {
+ if (this.state.standalone) this.actions.close();
+ else this.actions.showChat();
+ }
+
+ /** Only states the person must act on or wait for are shown over the app. */
+ private floatingStatus(): string {
+ if (this.state.appStreaming) return RemoteI18n.t('localGenui.generating');
+ if (this.state.appStatus === 'failed' || this.state.appStatus === 'unsupported' || this.state.appStatus === 'state_migration_required') {
+ return this.statusLine();
+ }
+ return '';
+ }
+
+ build() {
+ Stack({ alignContent: Alignment.Top }) {
+ // Each sheet has its own binding node.
+ Column() {}
+ .width(0).height(0)
+ .bindSheet($$this.state.showCollaboration, this.CollaborationSheet(), {
+ height: SheetSize.LARGE, showClose: true, backgroundColor: PAGE_BG
+ })
+ // The runtime stays mounted while the page is open so local acceptance
+ // can probe it even when the conversation is in front. It runs edge to
+ // edge; the page keeps its content clear of the reported insets.
+ LocalGenUIWebSurface({ bridge: this.bridge, scheme: this.scheme, locale: this.locale })
+ .id(APP_BODY_ID)
+ .width('100%')
+ .height('100%')
+ .onAreaChange((_old: Area, next: Area) => {
+ this.bodyWidth = Number(next.width);
+ this.report();
+ this.syncPageInsets();
+ })
+
+ if (this.showsApp()) {
+ this.FloatingControls()
+ }
+
+ if (this.showsApp() && this.state.cameraWanted) {
+ LocalGenUICameraPreview({
+ compact: this.rootHeight > 0 && this.rootHeight < 480,
+ landscape: this.rootWidth > this.rootHeight && this.rootWidth > 0,
+ onSurface: (surfaceId: string) => this.actions.cameraSurface(surfaceId),
+ onSurfaceGone: () => this.actions.cameraSurfaceGone()
+ })
+ .position({ right: this.insets.rightPadding(12), bottom: this.insets.bottom + 16 })
+ }
+
+ if (this.state.view === 'sessions') {
+ this.SessionsPage()
+ } else if (!this.showsApp()) {
+ ConversationViewHost({
+ viewState: this.conversationState(),
+ showSidebarButton: false,
+ showBackButton: true,
+ onIntent: (intent: ConversationIntent) => this.onConversationIntent(intent)
+ })
+ .width('100%').height('100%')
+ }
+ if (this.state.notice.length > 0) {
+ Text(this.state.notice)
+ .fontSize(MobileDesignTypography.bodySmall.size).fontColor(CONTENT_ON_ACTION)
+ .backgroundColor(TOAST_BACKGROUND).borderRadius(16).padding({ left: 14, right: 14, top: 8, bottom: 8 })
+ .margin({ top: 72 + this.insets.top, left: 24, right: 24 })
+ .copyOption(CopyOptions.InApp)
+ }
+ }
+ .width('100%').height('100%').backgroundColor(PAGE_BG)
+ .bindSheet($$this.state.showModelManager, this.ModelManagerSheet(), {
+ height: SheetSize.LARGE, showClose: false, backgroundColor: PAGE_BG,
+ onDisappear: () => this.actions.closeModelManager()
+ })
+ .onAreaChange((_old: Area, next: Area) => {
+ this.rootWidth = Number(next.width);
+ this.rootHeight = Number(next.height);
+ this.report();
+ })
+ }
+
+ @Builder
+ private SessionsPage() {
+ Column() {
+ Row() {
+ NavigationBackButton({ onBack: () => { this.actions.back(); } })
+ Text(RemoteI18n.t('localGenui.entry'))
+ .fontSize(MobileDesignTypography.conversationHeaderTitle.size)
+ .fontWeight(FontWeight.Medium).fontColor(INK).textAlign(TextAlign.Center).layoutWeight(1)
+ Blank().width(48)
+ }.width('100%').height(56)
+ .padding({ left: this.insets.leftPadding(8), right: this.insets.rightPadding(8) })
+ Scroll() {
+ Column() {
+ if (this.state.loading) {
+ LoadingProgress().width(28).height(28).margin(24)
+ } else if (this.state.error.length > 0) {
+ Text(this.state.error).fontSize(MobileDesignTypography.bodyMedium.size).fontColor(INK)
+ .padding(16)
+ } else {
+ BotSessionList({
+ sessions: this.state.localSessions,
+ selectedSessionId: this.state.sessionId,
+ busy: this.state.conversation.isBusy,
+ onOpenSession: (id: string): void => this.actions.openSession(id),
+ onDeleteSession: (id: string): void => this.actions.deleteSession(id)
+ })
+ }
+ }.width('100%').constraintSize({ maxWidth: 560 })
+ }.width('100%').layoutWeight(1).align(Alignment.Top)
+ .padding({ left: this.insets.leftPadding(12), right: this.insets.rightPadding(12), top: 8 })
+ .scrollBar(BarState.Auto)
+ Column() {
+ AppActionButton({
+ label: RemoteI18n.t('localGenui.newSession'),
+ style: AppActionStyle.Primary,
+ elevated: false,
+ isEnabled: !this.state.loading && !this.state.conversation.isBusy,
+ onAction: (): void => this.actions.newSession()
+ })
+ }.width('100%').constraintSize({ maxWidth: 560 })
+ .padding({ left: this.insets.leftPadding(20), right: this.insets.rightPadding(20),
+ top: 16, bottom: this.insets.bottomPadding(16) })
+ }.id('bot-sessions-page').width('100%').height('100%').padding({ top: this.insets.top })
+ .backgroundColor(PAGE_BG)
+ }
+
+ @Builder
+ private CollaborationSheet() {
+ ForEach(this.state.collaborationRequest ? [this.state.collaborationRequest] : [], (request: LocalCollaborationRequest) => {
+ LocalGenUICollaborationSheet({ request,
+ receive: (token: number, data: ArrayBuffer): Promise => this.actions.collaborationReceive(token, data),
+ onClose: (token: number): void => this.actions.collaborationClose(token),
+ onResult: (token: number, result: LocalCollaborationSnapshot): void => this.actions.collaborationResult(token, result) })
+ }, (request: LocalCollaborationRequest): string => String(request.token))
+ }
+
+ /**
+ * The app owns the whole screen: a floating back control at the leading
+ * edge, the app actions behind a floating menu at the trailing edge, and a
+ * status pill only while the app is generating or cannot run.
+ */
+ @Builder
+ FloatingControls() {
+ Row({ space: 8 }) {
+ Stack() {
+ NavigationBackButton({ controlSize: LocalGenUISurface.CONTROL_SIZE, onBack: (): void => this.goBack() })
+ }
+ .width(LocalGenUISurface.CONTROL_SIZE).height(LocalGenUISurface.CONTROL_SIZE)
+ .borderRadius(LocalGenUISurface.CONTROL_SIZE / 2).clip(true)
+ .backgroundColor(FLOATING_PANEL_BG).backgroundBlurStyle(BlurStyle.Thin)
+ .shadow({ radius: 12, color: SHADOW_SUBTLE, offsetY: 2 })
+
+ Blank().layoutWeight(1)
+ if (this.floatingStatus().length > 0) {
+ Row({ space: 6 }) {
+ if (this.state.appStreaming) {
+ LoadingProgress().width(14).height(14)
+ }
+ Text(this.floatingStatus())
+ .fontSize(MobileDesignTypography.labelSmall.size).fontColor(INK)
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ }
+ .height(32).padding({ left: 12, right: 12 }).borderRadius(16)
+ .backgroundColor(FLOATING_PANEL_BG).backgroundBlurStyle(BlurStyle.Thin)
+ .constraintSize({ maxWidth: 240 })
+ }
+ Blank().layoutWeight(1)
+
+ if (!this.state.appStreaming && this.state.appStatus !== 'failed' && this.state.appStatus !== 'unsupported') {
+ Stack({ alignContent: Alignment.Center }) {
+ TemplateIcon({ src: $r('app.media.remote_ref_more'), iconWidth: 18, iconHeight: 6 })
+ }
+ .width(LocalGenUISurface.CONTROL_SIZE).height(LocalGenUISurface.CONTROL_SIZE)
+ .borderRadius(LocalGenUISurface.CONTROL_SIZE / 2)
+ .backgroundColor(FLOATING_PANEL_BG).backgroundBlurStyle(BlurStyle.Thin)
+ .shadow({ radius: 12, color: SHADOW_SUBTLE, offsetY: 2 })
+ .accessibilityText(RemoteI18n.t('localGenui.appActions'))
+ .bindMenu(this.AppActionsMenu(), {
+ onAppear: () => this.actions.prepareDesktopCard(this.state.appId)
+ })
+ } else {
+ Blank().width(LocalGenUISurface.CONTROL_SIZE)
+ }
+ }
+ .width('100%')
+ .padding({
+ left: this.insets.leftPadding(12), right: this.insets.rightPadding(12),
+ top: this.insets.top + LocalGenUISurface.CONTROL_TOP
+ })
+ .hitTestBehavior(HitTestMode.Transparent)
+ }
+
+ /** "Add to desktop" places a home-screen card that opens this app. */
+ @Builder
+ AppActionsMenu() {
+ Menu() {
+ if (this.state.standalone) {
+ MenuItem({ content: RemoteI18n.t('localGenui.backToChat') })
+ .onClick(() => this.actions.showChat())
+ }
+ if (this.state.inGallery(this.state.appId)) {
+ MenuItem({ content: RemoteI18n.t('localGenui.removeFromGallery') })
+ .onClick(() => this.actions.removeFromGallery(this.state.appId))
+ } else {
+ MenuItem({ content: RemoteI18n.t('localGenui.addToGallery') })
+ .onClick(() => this.actions.addToGallery(this.state.appId))
+ }
+ if (this.state.canAddToDesktop(this.state.appId)) {
+ AddFormMenuItem(this.state.desktopCardWant(this.state.appId), APP_BODY_ID, {
+ formBindingData: this.state.desktopCardInitialData(this.state.appId, this.state.appTitle),
+ style: { options: { content: RemoteI18n.t('localGenui.addToDesktop') } },
+ callback: (error: BusinessError, formId: string) => {
+ this.actions.desktopCardAdded(this.state.appId, formId ?? '', error && error.code ? `${error.code}` : '');
+ }
+ })
+ }
+ }
+ }
+
+ @Builder
+ ModelManagerSheet() {
+ LocalGenUIModelManager({ state: this.state, actions: this.actions })
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIWebSurface.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIWebSurface.ets
new file mode 100644
index 0000000..6387ffd
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/LocalGenUIWebSurface.ets
@@ -0,0 +1,155 @@
+import { webview } from '@kit.ArkWeb';
+import { image } from '@kit.ImageKit';
+import BuildProfile from 'BuildProfile';
+import { LocalGenUIRuntimeBridge } from '../../services/local-genui/LocalGenUIRuntimeBridge';
+import { LOCAL_GENUI_ICON3D_ROOT } from '../../services/local-genui/LocalGenUIIcon3DStore';
+import { LOCAL_GENUI_COLLABORATION_ROOT } from '../../services/local-genui/LocalGenUICollaborationAssets';
+import { RemoteLogger } from '../../services/RemoteLogger';
+
+const LOCAL_GENUI_WEB_ID: string = 'local-genui-runtime-web';
+
+/** ArkWeb javaScriptProxy object. Every message is untrusted input. */
+class LocalGenUINativeChannel {
+ private readonly dispatch: (raw: string) => void;
+ constructor(dispatch: (raw: string) => void) { this.dispatch = dispatch; }
+ post(raw: string): void { this.dispatch(raw); }
+}
+
+/**
+ * Platform leaf for the Local GenUI runtime. It owns only the WebView
+ * lifecycle and message transport; parsing and rendering stay in the bundle.
+ */
+@ComponentV2
+export struct LocalGenUIWebSurface {
+ @Param @Require bridge: LocalGenUIRuntimeBridge;
+ @Param scheme: string = 'light';
+ @Param locale: string = 'zh-CN';
+ private controller: webview.WebviewController = new webview.WebviewController();
+ private alive: boolean = true;
+ // Offline documents repeat the same blocked-resource warning on every render.
+ private loggedConsole: Set = new Set();
+ private channel: LocalGenUINativeChannel = new LocalGenUINativeChannel((raw: string): void => {
+ if (this.alive) this.bridge.receive(raw);
+ });
+
+ aboutToAppear(): void {
+ if (BuildProfile.DEBUG) {
+ // Debug builds only: lets native acceptance evidence inspect the real DOM.
+ webview.WebviewController.setWebDebuggingAccess(true);
+ }
+ this.bridge.setAppearance(this.scheme, this.locale);
+ }
+
+ aboutToDisappear(): void {
+ this.alive = false;
+ this.bridge.detach();
+ }
+
+ @Monitor('scheme', 'locale')
+ onAppearanceChange(): void {
+ this.bridge.setAppearance(this.scheme, this.locale);
+ }
+
+ private send(json: string): void {
+ if (!this.alive) return;
+ try {
+ this.controller.runJavaScript(`window.__genuiHost && window.__genuiHost.receive(${JSON.stringify(json)})`)
+ .catch((err: Error) => RemoteLogger.warn(`local genui runtime send failed: ${err.message}`));
+ } catch (err) {
+ RemoteLogger.warn(`local genui runtime send failed: ${String(err)}`);
+ }
+ }
+
+ private async capture(): Promise {
+ // Component snapshot of the Web node: what the runtime actually rendered.
+ try {
+ const pixels = await this.getUIContext().getComponentSnapshot().get(LOCAL_GENUI_WEB_ID);
+ if (pixels) {
+ return pixels;
+ }
+ } catch (err) {
+ RemoteLogger.warn(`local genui component snapshot failed: ${String(err)}`);
+ }
+ return new Promise((resolve: (value: image.PixelMap | undefined) => void) => {
+ try {
+ this.controller.webPageSnapshot({ id: 'local-genui-thumbnail' }, (err, result) => {
+ resolve(!err && result && result.status !== false ? result.imagePixelMap : undefined);
+ });
+ } catch (err) {
+ RemoteLogger.warn(`local genui page snapshot failed: ${String(err)}`);
+ resolve(undefined);
+ }
+ });
+ }
+
+ build() {
+ Web({ src: $rawfile('genui/runtime/index.html'), controller: this.controller })
+ .javaScriptAccess(true)
+ .domStorageAccess(true)
+ .fileAccess(false)
+ .imageAccess(true)
+ // Network images stay closed by the document CSP (img-src data:, blob: and
+ // the host picture address). The host address is answered below and never
+ // reaches the network; this switch only lets those requests be issued.
+ .onlineImageAccess(true)
+ .geolocationAccess(false)
+ .mediaPlayGestureAccess(true)
+ .darkMode(WebDarkMode.Off)
+ .forceDarkAccess(false)
+ .overScrollMode(OverScrollMode.NEVER)
+ .javaScriptProxy({ object: this.channel, name: 'genuiNative', methodList: ['post'], controller: this.controller })
+ .onControllerAttached(() => {
+ this.bridge.attach((json: string): void => this.send(json));
+ this.bridge.attachSnapshot((): Promise => this.capture());
+ })
+ .onInterceptRequest((event: OnInterceptRequestEvent): WebResourceResponse | null => {
+ // Host-served 3D pictures; nothing else is intercepted. Answers are
+ // asynchronous: the picture may need one download before the cache has it.
+ const url = event.request.getRequestUrl();
+ const collaborationImage = url.startsWith(LOCAL_GENUI_COLLABORATION_ROOT);
+ if (!url.startsWith(LOCAL_GENUI_ICON3D_ROOT) && !collaborationImage) {
+ return null;
+ }
+ RemoteLogger.info('local genui host image request');
+ const response = new WebResourceResponse();
+ response.setResponseIsReady(false);
+ response.setResponseHeader([
+ { headerKey: 'Access-Control-Allow-Origin', headerValue: '*' },
+ { headerKey: 'Cache-Control', headerValue: collaborationImage ? 'no-store' : 'max-age=31536000, immutable' }
+ ]);
+ void this.bridge.picture(url).then((bytes: ArrayBuffer | undefined) => {
+ RemoteLogger.info(`local genui host image ${bytes ? `served ${bytes.byteLength} bytes` : 'not found'}`);
+ if (bytes) {
+ response.setResponseData(bytes);
+ response.setResponseMimeType(collaborationImage ? 'image/jpeg' : 'image/png');
+ response.setResponseCode(200);
+ response.setReasonMessage('OK');
+ } else {
+ response.setResponseData('');
+ response.setResponseMimeType('text/plain');
+ response.setResponseCode(404);
+ response.setReasonMessage('Not Found');
+ }
+ response.setResponseIsReady(true);
+ });
+ return response;
+ })
+ .onOverrideUrlLoading((request: WebResourceRequest) => {
+ // The runtime never navigates. Generated content cannot open pages.
+ return request.getRequestUrl().indexOf('genui/runtime/index.html') < 0;
+ })
+ .onConsole((event) => {
+ if (event && event.message.getMessageLevel() === MessageLevel.Error) {
+ const text = event.message.getMessage().slice(0, 300);
+ if (!this.loggedConsole.has(text) && this.loggedConsole.size < 50) {
+ this.loggedConsole.add(text);
+ RemoteLogger.warn(`local genui runtime console: ${text}`);
+ }
+ }
+ return false;
+ })
+ .id(LOCAL_GENUI_WEB_ID)
+ .width('100%')
+ .height('100%')
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MessageAppCard.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MessageAppCard.ets
new file mode 100644
index 0000000..c6d69f5
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MessageAppCard.ets
@@ -0,0 +1,75 @@
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { ChatMessageAppCard } from '../../model/RemoteModels';
+import {
+ CARD, CONNECT_HERO_ACCENT, CONNECT_HERO_BG, CONNECT_HERO_SURFACE, CONTENT_ON_ACTION, INK, LINE, MUTED,
+ PRIMARY_ACTION, SHADOW_FAINT, TOAST_BACKGROUND
+} from './Theme';
+
+const THUMB_SIZE: number = 76;
+
+/**
+ * A generated mini app inside an assistant message: its rendered preview,
+ * name, status and an open action. Same visual language as the MiniApp
+ * gallery tile, so the app looks the same wherever it appears.
+ */
+@ComponentV2
+export struct MessageAppCard {
+ @Param card: ChatMessageAppCard = { appId: '', title: '', status: '', thumbnailPath: '', link: '' };
+ @Event onOpen: (link: string, title: string) => void = (_link: string, _title: string) => {};
+
+ build() {
+ Row({ space: 12 }) {
+ Stack({ alignContent: Alignment.BottomEnd }) {
+ if (this.card.thumbnailPath.length > 0) {
+ Image(`file://${this.card.thumbnailPath}`)
+ .width('100%').height('100%').objectFit(ImageFit.Cover)
+ .draggable(false).accessibilityLevel('no')
+ } else {
+ Text(this.initial())
+ .fontSize(MobileDesignTypography.displayLarge.size).fontWeight(FontWeight.Bold)
+ .fontColor(CONNECT_HERO_ACCENT)
+ .width('100%').height('100%').textAlign(TextAlign.Center)
+ .linearGradient({ angle: 145, colors: [[CONNECT_HERO_SURFACE, 0], [CONNECT_HERO_BG, 1]] })
+ }
+ Stack({ alignContent: Alignment.Center }) {
+ SymbolGlyph($r('sys.symbol.wand_and_stars')).fontSize(11).fontColor([CONTENT_ON_ACTION])
+ }
+ .width(20).height(20).borderRadius(10)
+ .backgroundColor(TOAST_BACKGROUND).backgroundBlurStyle(BlurStyle.Thin).margin(5)
+ }
+ .width(THUMB_SIZE).height(THUMB_SIZE).borderRadius(16).clip(true)
+ .border({ width: 0.5, color: LINE })
+
+ Column({ space: 4 }) {
+ Text(this.card.title)
+ .fontSize(MobileDesignTypography.titleSmall.size).fontWeight(FontWeight.Medium).fontColor(INK)
+ .maxLines(2).textOverflow({ overflow: TextOverflow.Ellipsis })
+ Text(this.card.status)
+ .fontSize(MobileDesignTypography.labelSmall.size).fontColor(MUTED)
+ .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
+ Text(RemoteI18n.t('common.open'))
+ .fontSize(MobileDesignTypography.labelMedium.size).fontWeight(FontWeight.Medium)
+ .fontColor(CONTENT_ON_ACTION).backgroundColor(PRIMARY_ACTION)
+ .padding({ left: 14, right: 14, top: 6, bottom: 6 }).borderRadius(16)
+ .margin({ top: 4 })
+ }
+ .layoutWeight(1)
+ .alignItems(HorizontalAlign.Start)
+ }
+ .width('100%')
+ .padding(12)
+ .backgroundColor(CARD)
+ .borderRadius(20)
+ .border({ width: 0.5, color: LINE })
+ .shadow({ radius: 12, color: SHADOW_FAINT, offsetY: 4 })
+ .alignItems(VerticalAlign.Center)
+ .accessibilityText(`${this.card.title}, ${this.card.status}`)
+ .onClick(() => this.onOpen(this.card.link, this.card.title))
+ }
+
+ private initial(): string {
+ const trimmed = this.card.title.trim();
+ return trimmed.length > 0 ? Array.from(trimmed)[0] : 'AI';
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppGallery.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppGallery.ets
index 20f6c0d..4fa9474 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppGallery.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppGallery.ets
@@ -1,15 +1,32 @@
+import { AddFormMenuItem } from '@kit.ArkUI';
+import { BusinessError } from '@kit.BasicServicesKit';
+import { LocalGenUIState } from '../state/LocalGenUIState';
+import { LocalGenUIGalleryEntry } from '../../services/local-genui/LocalGenUIModels';
import { MobileDesignGeometry, MobileDesignTypography } from '../../generated/MobileDesignTokens';
import { MiniAppSummary } from '../../model/MiniAppModels';
import { RemoteI18n } from '../../i18n/RemoteI18n';
import { MiniAppState } from '../state/MiniAppState';
import { MiniAppGalleryPolicy } from '../policy/MiniAppGalleryPolicy';
-import { CARD, INK, MUTED, LINE, SUBTLE, SHADOW_SUBTLE } from './Theme';
+import { CARD, INK, MUTED, LINE, SUBTLE, SHADOW_SUBTLE, CONNECT_HERO_ACCENT, CONNECT_HERO_SURFACE, TRANSPARENT } from './Theme';
+
+interface MiniAppGalleryItem extends MiniAppSummary {
+ generatedId: string;
+ thumbnailPath: string;
+}
@ComponentV2
export struct MiniAppGallery {
@Require @Param state: MiniAppState;
@Param bottomInset: number = 0;
@Event onSelect: (id: string) => void = (_id: string) => {};
+ @Param generatedApps: LocalGenUIGalleryEntry[] = [];
+ @Param generatedState: LocalGenUIState = new LocalGenUIState();
+ @Event onOpenGenerated: (id: string) => void = (_id: string) => {};
+ @Event onRemoveGenerated: (id: string) => void = (_id: string) => {};
+ @Event onPrepareDesktopCard: (id: string) => void = (_id: string) => {};
+ @Event onDesktopCardAdded: (id: string, formId: string, error: string) => void =
+ (_id: string, _formId: string, _error: string) => {};
+ @Local failedThumbnails: string[] = [];
@Local viewportWidth: number = 360;
@Local stackHeight: number = 480;
@@ -19,23 +36,23 @@ export struct MiniAppGallery {
this.ListView()
} else {
Stack({ alignContent: Alignment.Center }) {
- ForEach(this.state.apps, (app: MiniAppSummary, index: number) => {
+ ForEach(this.items(), (app: MiniAppGalleryItem, index: number) => {
this.SwipeCard(app, index)
- }, (app: MiniAppSummary): string => app.id)
+ }, (app: MiniAppGalleryItem): string => app.id)
}
.width('100%').layoutWeight(1).clip(true)
.onAreaChange((_old: Area, area: Area) => { this.stackHeight = Number(area.height); })
.gesture(PanGesture({ direction: PanDirection.Horizontal, distance: 12 })
.onActionEnd((event: GestureEvent) => {
- const index = MiniAppGalleryPolicy.nextIndex(this.currentIndex(), event.offsetX, this.state.apps.length);
+ const index = MiniAppGalleryPolicy.nextIndex(this.currentIndex(), event.offsetX, this.items().length);
this.focus(index);
}))
Row({ space: 8 }) {
- ForEach(this.state.apps, (app: MiniAppSummary, index: number) => {
+ ForEach(this.items(), (app: MiniAppGalleryItem, index: number) => {
Row().width(index === this.currentIndex() ? 24 : 8).height(8)
.borderRadius(4).backgroundColor(index === this.currentIndex() ? INK : SUBTLE)
.opacity(index === this.currentIndex() ? 1 : 0.4)
- }, (app: MiniAppSummary): string => app.id)
+ }, (app: MiniAppGalleryItem): string => app.id)
}.justifyContent(FlexAlign.Center).padding({ top: 20, bottom: 12 })
.accessibilityLevel('no')
Text(RemoteI18n.t('miniapp.swipeHint')).fontSize(MobileDesignTypography.labelSmall.size)
@@ -46,11 +63,10 @@ export struct MiniAppGallery {
}
@Builder
- private SwipeCard(app: MiniAppSummary, index: number) {
+ private SwipeCard(app: MiniAppGalleryItem, index: number) {
Button({ type: ButtonType.Normal }) {
Column() {
- Image(this.preview(app.id)).width('100%').height('65%').objectFit(ImageFit.Cover)
- .draggable(false).accessibilityLevel('no')
+ this.Cover(app, '100%', '65%')
Column({ space: 8 }) {
Text(app.name).fontSize(MobileDesignTypography.titleSmall.size).fontWeight(FontWeight.Bold)
.fontColor(INK).maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis }).width('100%')
@@ -60,7 +76,7 @@ export struct MiniAppGallery {
.alignItems(HorizontalAlign.Start)
}.width('100%').height('100%')
}
- .id(`miniapp-card-${app.id}`)
+ .id(this.elementId(app, true))
.width(MiniAppGalleryPolicy.cardWidth(this.viewportWidth))
.height(MiniAppGalleryPolicy.cardHeight(this.viewportWidth, this.stackHeight))
.padding(0).backgroundColor(CARD).borderRadius(MobileDesignGeometry.miniappCardRadius).clip(true)
@@ -73,19 +89,23 @@ export struct MiniAppGallery {
.hitTestBehavior(index === this.currentIndex() ? HitTestMode.Default : HitTestMode.None)
.accessibilityLevel(index === this.currentIndex() ? 'yes' : 'no-hide-descendants')
.accessibilityText(`${app.name}, ${app.description}`)
- .onClick(() => { if (index === this.currentIndex()) { this.state.galleryAppId = app.id; this.onSelect(app.id); } })
+ .onClick(() => { if (index === this.currentIndex()) this.select(app); })
+ .bindContextMenu(this.GeneratedActions(app, true), ResponseType.LongPress, {
+ onAppear: () => {
+ if (app.generatedId.length > 0) this.onPrepareDesktopCard(app.generatedId);
+ }
+ })
}
@Builder
private ListView() {
Grid() {
- ForEach(this.state.apps, (app: MiniAppSummary) => {
+ ForEach(this.items(), (app: MiniAppGalleryItem) => {
GridItem() {
Button({ type: ButtonType.Normal }) {
Row() {
- Image(this.preview(app.id)).width(Math.min(MobileDesignGeometry.miniappListCoverSize, this.viewportWidth * 0.36))
- .height(MobileDesignGeometry.miniappListCoverSize).objectFit(ImageFit.Cover).draggable(false)
- .accessibilityLevel('no')
+ this.Cover(app, Math.min(MobileDesignGeometry.miniappListCoverSize, this.viewportWidth * 0.36),
+ MobileDesignGeometry.miniappListCoverSize)
Column({ space: 8 }) {
Text(app.name).fontSize(MobileDesignTypography.titleSmall.size).fontWeight(FontWeight.Bold)
.fontColor(INK).maxLines(2).textOverflow({ overflow: TextOverflow.Ellipsis }).width('100%')
@@ -93,12 +113,17 @@ export struct MiniAppGallery {
.maxLines(3).textOverflow({ overflow: TextOverflow.Ellipsis }).width('100%')
}.layoutWeight(1).padding(16).alignItems(HorizontalAlign.Start)
}.width('100%')
- }.id(`miniapp-list-${app.id}`).width('100%').padding(0).backgroundColor(CARD)
+ }.id(this.elementId(app, false)).width('100%').padding(0).backgroundColor(CARD)
.border({ width: 1, color: LINE, radius: MobileDesignGeometry.miniappListRadius }).clip(true)
.accessibilityText(`${app.name}, ${app.description}`)
- .onClick(() => { this.state.galleryAppId = app.id; this.onSelect(app.id); })
+ .onClick(() => this.select(app))
+ .bindContextMenu(this.GeneratedActions(app, false), ResponseType.LongPress, {
+ onAppear: () => {
+ if (app.generatedId.length > 0) this.onPrepareDesktopCard(app.generatedId);
+ }
+ })
}
- }, (app: MiniAppSummary): string => app.id)
+ }, (app: MiniAppGalleryItem): string => app.id)
GridItem() { Row().height(this.bottomInset + 24).hitTestBehavior(HitTestMode.None) }
.columnStart(0).columnEnd(MiniAppGalleryPolicy.columns(this.viewportWidth) - 1)
}.width('100%').layoutWeight(1).padding({ left: 16, right: 16 })
@@ -107,12 +132,75 @@ export struct MiniAppGallery {
.scrollBar(BarState.Off)
}
+ @Builder
+ private Cover(app: MiniAppGalleryItem, width: Length, height: Length) {
+ Stack() {
+ if (app.generatedId.length === 0) {
+ Image(this.preview(app.id)).width('100%').height('100%').objectFit(ImageFit.Cover)
+ .draggable(false).accessibilityLevel('no')
+ } else if (app.thumbnailPath.length > 0 && !this.failedThumbnails.includes(app.thumbnailPath)) {
+ Image(`file://${app.thumbnailPath}`).width('100%').height('100%').objectFit(ImageFit.Contain)
+ .draggable(false).accessibilityLevel('no')
+ .onError(() => { this.failedThumbnails = this.failedThumbnails.concat([app.thumbnailPath]); })
+ } else {
+ SymbolGlyph($r('sys.symbol.square_grid_2x2'))
+ .fontSize(30).fontColor([CONNECT_HERO_ACCENT]).accessibilityLevel('no')
+ }
+ }
+ .width(width).height(height).clip(true)
+ .backgroundColor(app.generatedId.length > 0 ? CONNECT_HERO_SURFACE : TRANSPARENT)
+ }
+
+ @Builder
+ private GeneratedActions(app: MiniAppGalleryItem, card: boolean) {
+ if (app.generatedId.length > 0) {
+ Menu() {
+ if (this.generatedState.canAddToDesktop(app.generatedId)) {
+ AddFormMenuItem(this.generatedState.desktopCardWant(app.generatedId), this.elementId(app, card), {
+ formBindingData: this.generatedState.desktopCardInitialData(app.generatedId, app.name),
+ style: { options: { content: RemoteI18n.t('localGenui.addToDesktop') } },
+ callback: (error: BusinessError, formId: string) => {
+ this.onDesktopCardAdded(app.generatedId, formId ?? '', error && error.code ? `${error.code}` : '');
+ }
+ })
+ }
+ MenuItem({ content: RemoteI18n.t('localGenui.removeFromGallery') })
+ .onClick(() => this.onRemoveGenerated(app.generatedId))
+ }
+ }
+ }
+
+ private items(): MiniAppGalleryItem[] {
+ const builtins = this.state.apps.map((app: MiniAppSummary): MiniAppGalleryItem => ({
+ id: app.id, name: app.name, description: app.description, generatedId: '', thumbnailPath: ''
+ }));
+ const generated = this.generatedApps.map((entry: LocalGenUIGalleryEntry): MiniAppGalleryItem => ({
+ id: `generated:${entry.appId}`,
+ name: entry.title,
+ description: RemoteI18n.t('localGenui.generatedApps'),
+ generatedId: entry.appId,
+ thumbnailPath: entry.thumbnailPath ?? ''
+ }));
+ return builtins.concat(generated);
+ }
+
+ private elementId(app: MiniAppGalleryItem, card: boolean): string {
+ const id = app.id.replace(/[^A-Za-z0-9_-]/g, '_');
+ return card ? `miniapp-card-${id}` : `miniapp-list-${id}`;
+ }
+
+ private select(app: MiniAppGalleryItem): void {
+ this.state.galleryAppId = app.id;
+ if (app.generatedId.length > 0) this.onOpenGenerated(app.generatedId);
+ else this.onSelect(app.id);
+ }
+
private currentIndex(): number {
- return Math.max(0, this.state.apps.findIndex((app: MiniAppSummary): boolean => app.id === this.state.galleryAppId));
+ return Math.max(0, this.items().findIndex((app: MiniAppGalleryItem): boolean => app.id === this.state.galleryAppId));
}
private focus(index: number): void {
- const app = this.state.apps[index];
+ const app = this.items()[index];
if (!app) return;
this.getUIContext().animateTo({ duration: 240, curve: Curve.EaseOut }, () => { this.state.galleryAppId = app.id; });
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppSurface.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppSurface.ets
index c2a77fb..44d2ee0 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppSurface.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/MiniAppSurface.ets
@@ -2,8 +2,10 @@ import { MobileDesignGeometry, MobileDesignTypography } from '../../generated/Mo
import { MiniAppActions, emptyMiniAppActions } from '../../model/MiniAppModels';
import { RemoteI18n } from '../../i18n/RemoteI18n';
import { MiniAppState } from '../state/MiniAppState';
-import { TemplateIcon } from './TemplateIcon';
+import { LocalGenUIState } from '../state/LocalGenUIState';
+import { LocalGenUIGalleryEntry } from '../../services/local-genui/LocalGenUIModels';
import { MiniAppGallery } from './MiniAppGallery';
+import { TemplateIcon } from './TemplateIcon';
import { MiniAppWebView } from './MiniAppWebView';
import { NavigationBackButton } from './NavigationBackButton';
import { PAGE_BG, INK, MUTED, SOFT, TRANSPARENT } from './Theme';
@@ -13,6 +15,15 @@ import { WindowInsetsBinding } from '../../services/WindowSystemBarService';
export struct MiniAppSurface {
@Param state: MiniAppState = new MiniAppState();
@Param actions: MiniAppActions = emptyMiniAppActions();
+ /** Generated apps the user added to the gallery (Local GenUI Mode). */
+ @Param generatedApps: LocalGenUIGalleryEntry[] = [];
+ @Event onOpenGenerated: (appId: string) => void = (_appId: string) => {};
+ @Event onRemoveGenerated: (appId: string) => void = (_appId: string) => {};
+ /** Local GenUI projection; supplies the add-to-desktop want. */
+ @Param generatedState: LocalGenUIState = new LocalGenUIState();
+ @Event onPrepareDesktopCard: (appId: string) => void = (_appId: string) => {};
+ @Event onDesktopCardAdded: (appId: string, formId: string, error: string) => void =
+ (_appId: string, _formId: string, _error: string) => {};
@Local insets: WindowInsetsBinding = new WindowInsetsBinding();
aboutToAppear(): void {
@@ -47,11 +58,21 @@ export struct MiniAppSurface {
.fontColor(MUTED).padding({ top: 16, bottom: 16 }).copyOption(CopyOptions.InApp)
Button(RemoteI18n.t('miniapp.refresh'))
.fontColor(INK).backgroundColor(SOFT).onClick(() => this.actions.refresh())
- } else if (this.state.apps.length === 0) {
+ } else if (this.state.apps.length === 0 && this.generatedApps.length === 0) {
Text(RemoteI18n.t('miniapp.empty')).fontSize(MobileDesignTypography.bodyMedium.size)
.fontColor(MUTED).padding(24)
} else {
- MiniAppGallery({ state: this.state, bottomInset: this.insets.bottom, onSelect: this.actions.select })
+ MiniAppGallery({
+ state: this.state,
+ bottomInset: this.insets.bottom,
+ onSelect: this.actions.select,
+ generatedApps: this.generatedApps,
+ generatedState: this.generatedState,
+ onOpenGenerated: this.onOpenGenerated,
+ onRemoveGenerated: this.onRemoveGenerated,
+ onPrepareDesktopCard: this.onPrepareDesktopCard,
+ onDesktopCardAdded: this.onDesktopCardAdded
+ })
.layoutWeight(1)
}
}.width('100%').constraintSize({ maxWidth: 1000 }).layoutWeight(1)
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/SidebarGlyphs.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/SidebarGlyphs.ets
index 2d9578e..f68e405 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/SidebarGlyphs.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/SidebarGlyphs.ets
@@ -21,6 +21,12 @@ export struct SidebarGlyph {
this.Clock()
} else if (this.kind === 'apps') {
this.Apps()
+ } else if (this.kind === 'create_app') {
+ Stack({ alignContent: Alignment.Center }) {
+ SymbolGlyph($r('sys.symbol.wand_and_stars'))
+ .fontSize(this.iconSize).fontColor([this.tint])
+ }
+ .width(this.iconSize).height(this.iconSize)
} else if (this.kind === 'assistant') {
this.Assistant()
} else if (this.kind === 'code_flower') {
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/WelcomeHome.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/WelcomeHome.ets
index 21ba58c..f4dc370 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/WelcomeHome.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/WelcomeHome.ets
@@ -1,3 +1,4 @@
+import { SidebarToggleButton } from './SidebarToggleButton';
import { RemoteI18n } from '../../i18n/RemoteI18n';
import { MobileDesignTypography, MobileDesignGeometry as G } from '../../generated/MobileDesignTokens';
import { WelcomePhrase } from './WelcomePhrase';
@@ -18,6 +19,7 @@ import { INK, PAGE_BG, WELCOME_PAGE_BG, MUTED, TRANSPARENT } from './Theme';
export struct WelcomeHome {
@Param signedIn: boolean = false;
@Event onLogin: () => void = () => {};
+ @Event onOpenSidebar: () => void = () => {};
@Event onMiniApps: () => void = () => {};
@Local pageHeight: number = 700;
@Local pageWidth: number = 390;
@@ -52,6 +54,9 @@ export struct WelcomeHome {
Column() {
Row() {
ForEach('OpenBitFun'.split(''), (letter: string) => { this.Glyph(letter, G.welcomeHeaderWordSize); })
+ Blank()
+ SidebarToggleButton({ restore: true, controlSize: G.controlTouchSize,
+ onToggle: () => this.onOpenSidebar() })
}.width('100%').height(G.welcomeHeaderHeight)
.padding({ left: this.wide() ? 40 : G.welcomeGutter, right: G.welcomeGutter })
if (this.landscape()) {
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/remote/RemoteSurfaceHost.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/remote/RemoteSurfaceHost.ets
index 5d0ea5b..8e43626 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/remote/RemoteSurfaceHost.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/remote/RemoteSurfaceHost.ets
@@ -219,7 +219,8 @@ export struct RemoteSurfaceHost {
this.actions.onSettings.openAccount();
}
},
- onMiniApps: this.actions.onRemoteHome.openMiniApps
+ onMiniApps: this.actions.onRemoteHome.openMiniApps,
+ onOpenSidebar: () => this.onOpenSidebar()
})
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/policy/ConversationMessageRenderPolicy.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/policy/ConversationMessageRenderPolicy.ets
index 57d79e5..fc646b9 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/policy/ConversationMessageRenderPolicy.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/policy/ConversationMessageRenderPolicy.ets
@@ -36,6 +36,9 @@ export class ConversationMessageRenderPolicy {
if (item.images && item.images.length > 0) {
return true;
}
+ if (item.appCard) {
+ return true;
+ }
const status = (item.status || '').toLowerCase();
return status === 'active' || status === 'failed';
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/CollaborationPreview.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/CollaborationPreview.ets
new file mode 100644
index 0000000..6223aa9
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/CollaborationPreview.ets
@@ -0,0 +1,32 @@
+import { LocalGenUICollaborationPicker } from '../components/LocalGenUICollaborationPicker';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { MobileDesignTypography } from '../../generated/MobileDesignTokens';
+import { INK, MUTED, PAGE_BG } from '../components/Theme';
+
+/** Real SDK probe, not simulated devices or a fake transfer. */
+@ComponentV2
+export struct CollaborationPreview {
+ @Local generation: number = 0;
+ @Local compact: boolean = false;
+
+ build() {
+ Scroll() {
+ Column({ space: 16 }) {
+ Text(RemoteI18n.t('collaboration.title')).fontColor(INK)
+ .fontSize(MobileDesignTypography.titleLarge.size)
+ Text(RemoteI18n.t('collaboration.emulatorNotice')).fontColor(MUTED)
+ .fontSize(MobileDesignTypography.bodyMedium.size)
+ ForEach([this.generation], (_generation: number) => {
+ LocalGenUICollaborationPicker()
+ }, (generation: number) => String(generation))
+ Button(RemoteI18n.t('collaboration.reset')).id('collaboration-reset')
+ .onClick(() => { this.generation += 1; })
+ Button(RemoteI18n.t('collaboration.resize')).id('collaboration-resize')
+ .onClick(() => { this.compact = !this.compact; })
+ Text(RemoteI18n.t('collaboration.resetNotice')).fontColor(MUTED)
+ .fontSize(MobileDesignTypography.labelSmall.size)
+ }.padding({ top: 64, left: 20, right: 20, bottom: 40 })
+ .width(this.compact ? 340 : '100%').constraintSize({ maxWidth: 840 })
+ }.width('100%').height('100%').backgroundColor(PAGE_BG)
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/MobileDesignGallery.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/MobileDesignGallery.ets
index f44b5e2..67406be 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/MobileDesignGallery.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/preview/MobileDesignGallery.ets
@@ -1,3 +1,4 @@
+import { CollaborationPreview } from './CollaborationPreview';
import { HistoryScrollPreview } from './HistoryScrollPreview';
import { ColdStartHomePreview } from './ColdStartHomePreview';
import { ComposerSubmissionPreview } from './ComposerSubmissionPreview';
@@ -48,7 +49,9 @@ struct MobileDesignGallery {
}
build() {
- if ((AppStorage.get('scenarioId') || '').startsWith('cold-start-home')) {
+ if ((AppStorage.get('scenarioId') || '').startsWith('collaboration')) {
+ CollaborationPreview()
+ } else if ((AppStorage.get('scenarioId') || '').startsWith('cold-start-home')) {
ColdStartHomePreview()
} else if (AppStorage.get('scenarioId') === 'history-scroll') {
HistoryScrollPreview()
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntime.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntime.ets
index 90b4627..ff54033 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntime.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntime.ets
@@ -14,6 +14,7 @@ import {
stampRemoteSessionsDevice
} from '../../services/RemoteSessionIdentity';
import { RemoteUiState } from '../../services/RemoteUiState';
+import { LocalGenUILaunchInbox } from '../../services/local-genui/LocalGenUILaunchInbox';
import { AppRootHostPort } from '../host/AppRootHostAdapter';
import {
AppNavigationBackAction,
@@ -41,6 +42,11 @@ export class AppRootRuntime extends AppRootRuntimeComposition {
}
async aboutToAppear(onAccountRestored?: (signedIn: boolean) => void): Promise {
+ // A generated app opened from its home-screen card is local: it does not
+ // wait for account, device, or remote restoration below.
+ LocalGenUILaunchInbox.subscribe((appId: string): void => {
+ void this.localGenUIViewModel.openGalleryApp(appId);
+ });
// Account login can be tapped while the rest of the cold-start work is
// still running. Initialize its secure store first so the login path never
// races the asynchronous cache and onboarding setup below.
@@ -85,6 +91,11 @@ export class AppRootRuntime extends AppRootRuntimeComposition {
}
onPageShow(): void {
+ this.localGenUIViewModel.setForeground(true);
+ // Wide layouts keep the local session sidebar mounted from the first
+ // frame, so there is no sidebar-open callback to trigger its first load.
+ // Refresh here for both cold starts and returns from the background.
+ void this.localGenUIViewModel.load();
RemoteLogger.info(`page show state=${(this.remotePageState.connectionState as ConnectionState)} route=${this.appShellViewModel.currentRoute()}`);
this.settingsController.setAuthorizationForeground(true);
this.taskCompletionNotificationController.onForeground();
@@ -96,6 +107,8 @@ export class AppRootRuntime extends AppRootRuntimeComposition {
}
onPageHide(): void {
+ // Background: Local GenUI releases the camera immediately.
+ this.localGenUIViewModel.setForeground(false);
RemoteLogger.info(`page hide state=${(this.remotePageState.connectionState as ConnectionState)} route=${this.appShellViewModel.currentRoute()}`);
this.settingsController.setAuthorizationForeground(false);
this.settingsController.stopPresencePolling();
@@ -115,7 +128,9 @@ export class AppRootRuntime extends AppRootRuntimeComposition {
}
aboutToDisappear(): void {
+ LocalGenUILaunchInbox.unsubscribe();
this.miniAppViewModel.close();
+ this.localGenUIViewModel.close();
this.settingsController.stopPresencePolling();
this.watchProvisionController.stop();
this.taskCompletionNotificationController.stop();
@@ -383,6 +398,8 @@ export class AppRootRuntime extends AppRootRuntimeComposition {
this.host.animate(230, () => {
this.appShellState.setSidebarVisible(true);
});
+ // Local sessions are read from this phone's own store; no network.
+ void this.localGenUIViewModel.load();
// The device rows are only on screen from here, and a desktop that came
// online since the last look would otherwise stay grey.
void this.settingsController.refreshAccountDevicesIfStale(DEVICE_PRESENCE_MAX_AGE_MS).then(() =>
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntimeComposition.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntimeComposition.ets
index f49cb8f..85b60d1 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntimeComposition.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/runtime/AppRootRuntimeComposition.ets
@@ -9,6 +9,7 @@ import { WorkspaceToolsViewModel } from '../viewmodel/WorkspaceToolsViewModel';
import { WorkspaceToolsIntent } from '../state/WorkspaceToolsState';
import { BuiltinMiniAppHost } from '../../services/BuiltinMiniAppHost';
import { MiniAppViewModel } from '../viewmodel/MiniAppViewModel';
+import { LocalGenUIViewModel } from '../viewmodel/LocalGenUIViewModel';
import { SidebarConnectionActionPolicy } from '../policy/SidebarConnectionActionPolicy';
import { accountDeviceLink } from '../../services/AccountDeviceLink';
import {
@@ -157,6 +158,8 @@ export abstract class AppRootRuntimeComposition {
readonly sessionManager: RemoteSessionManager = new RemoteSessionManager();
readonly miniAppViewModel: MiniAppViewModel = new MiniAppViewModel(new BuiltinMiniAppHost((): Context => this.host.context()));
+ // Local GenUI Mode: constructs nothing local until the surface is opened.
+ readonly localGenUIViewModel: LocalGenUIViewModel = new LocalGenUIViewModel((): Context => this.host.context());
readonly taskCompletionNotificationPort: HarmonyTaskCompletionNotificationPort =
new HarmonyTaskCompletionNotificationPort((): Context => this.host.context());
readonly taskCompletionNotificationController: TaskCompletionNotificationController =
@@ -978,7 +981,13 @@ export abstract class AppRootRuntimeComposition {
onCompactLayoutEntered: (): void => this.enterCompactLayout(),
onLayoutModeChanged: (wideLayout: boolean): void => this.appShellState.setWideLayout(wideLayout),
onRemoteHome: {
- openMiniApps: (): void => { this.closeAppSidebar(); this.miniAppViewModel.actions.open(); },
+ openMiniApps: (): void => {
+ this.closeAppSidebar();
+ this.localGenUIViewModel.close();
+ this.miniAppViewModel.actions.open();
+ // Generated apps the user added appear in the gallery; local data only.
+ void this.localGenUIViewModel.load();
+ },
openSidebar: (): void => this.openAppSidebar(),
connectWorkspace: (): void => this.openConnectSheet(),
addConnection: (): void => this.openConnectSheet(),
@@ -986,6 +995,7 @@ export abstract class AppRootRuntimeComposition {
showWorkspaces: (): void => { this.remoteWorkspaceViewModel.toggleRecentWorkspaces(); },
showAssistants: (): void => { this.remoteWorkspaceViewModel.toggleAssistants(); },
selectWorkspace: (path: string, deviceId?: string, connectionId?: string, sshHost?: string, workspaceId?: string): void => {
+ this.localGenUIViewModel.close();
void this.selectWorkspaceOnDevice(path, deviceId, connectionId, sshHost, workspaceId);
},
selectAssistant: (path: string, workspaceId?: string): void => { this.selectAssistant(path, workspaceId); },
@@ -997,14 +1007,18 @@ export abstract class AppRootRuntimeComposition {
reconnect: (): void => { this.reconnect(); },
disconnect: (): void => { this.disconnect(false); },
clearPairing: (): void => { this.disconnect(true); },
- create: (agentType: string): void => { this.conversationController.createRemoteSession(agentType); },
+ create: (agentType: string): void => {
+ this.localGenUIViewModel.close(); this.conversationController.createRemoteSession(agentType); },
createInPlace: (agentType: string): void => {
+ this.localGenUIViewModel.close();
this.conversationController.createRemoteSession(agentType, true);
},
createInWorkspace: (path: string, agentType: string, deviceId?: string, connectionId?: string, sshHost?: string, workspaceId?: string): void => {
+ this.localGenUIViewModel.close();
this.conversationController.createRemoteSessionInWorkspace(path, agentType, false, deviceId, connectionId, sshHost, workspaceId);
},
createInWorkspaceInPlace: (path: string, agentType: string, deviceId?: string, connectionId?: string, sshHost?: string, workspaceId?: string): void => {
+ this.localGenUIViewModel.close();
this.conversationController.createRemoteSessionInWorkspace(path, agentType, true, deviceId, connectionId, sshHost, workspaceId);
},
selectDirectoryDevice: (deviceId: string): void => {
@@ -1020,17 +1034,25 @@ export abstract class AppRootRuntimeComposition {
await this.loadWorkspaceSessionsOnDevice(deviceId, path, remoteConnectionId, remoteSshHost, workspaceId);
},
openSession: (session: RemoteSession): void => this.conversationController.openHomeSession(session),
- openSessionInPlace: (session: RemoteSession): void => this.conversationController.openHomeSession(session, true),
+ openSessionInPlace: (session: RemoteSession): void => {
+ this.localGenUIViewModel.close();
+ this.conversationController.openHomeSession(session, true);
+ },
deleteSession: (session: RemoteSession): void => { this.conversationController.deleteHomeSession(session); }
},
onSidebar: {
close: (): void => this.closeAppSidebar(),
openAssistant: (): void => { void this.assistantNavigationController.open(); },
- openBot: (): void => { this.host.showToast(RemoteI18n.t('sidebar.botComingSoon'), 2200); },
+ openBot: (): void => {
+ this.closeAppSidebar();
+ this.miniAppViewModel.actions.close();
+ this.localGenUIViewModel.actions.open();
+ },
newChat: async (agentType: string = 'code'): Promise => {
if (agentType === 'claw') { await this.assistantNavigationController.open(true); return; }
if (!SidebarConnectionActionPolicy.canCreateSession(this.remotePageState.connectionState, this.remotePageState.isBusy)) return;
this.closeAppSidebar();
+ this.localGenUIViewModel.close();
await this.conversationController.createRemoteSession(agentType);
},
enterCode: (): void => { this.closeAppSidebar(); this.enterCodeEntry(); },
@@ -1053,6 +1075,7 @@ export abstract class AppRootRuntimeComposition {
// The shell supplies the horizontal motion; do not stack a second
// NavDestination push animation on top of the closing drawer.
this.closeAppSidebar();
+ this.localGenUIViewModel.close();
this.conversationController.openHomeSession(session, true);
},
deleteSession: (session: RemoteSession): void => { this.conversationController.deleteHomeSession(session); }
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatComposerCapabilities.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatComposerCapabilities.ets
index 911be61..3dec09a 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatComposerCapabilities.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatComposerCapabilities.ets
@@ -11,6 +11,9 @@ export class ChatComposerCapabilities {
// turn yield to it, so on that surface the draft outranks the stop button.
// Where nothing queues, holding the draft back is the honest behaviour.
readonly supportsMidRunSend: boolean;
+ // The surface owns its model profiles and offers a "manage models" entry in
+ // the composer's model selector (Local GenUI). Host-owned catalogs do not.
+ readonly supportsModelManagement: boolean;
constructor(
surface: ChatSurface,
@@ -18,7 +21,8 @@ export class ChatComposerCapabilities {
requiresRemoteConnection: boolean,
showAddButton: boolean = true,
showVoiceInput: boolean = true,
- supportsMidRunSend: boolean = false
+ supportsMidRunSend: boolean = false,
+ supportsModelManagement: boolean = false
) {
this.surface = surface;
this.supportsAttachments = supportsAttachments;
@@ -26,6 +30,7 @@ export class ChatComposerCapabilities {
this.showAddButton = showAddButton;
this.showVoiceInput = showVoiceInput;
this.supportsMidRunSend = supportsMidRunSend;
+ this.supportsModelManagement = supportsModelManagement;
}
}
@@ -34,3 +39,7 @@ export const GENERAL_CHAT_COMPOSER_CAPABILITIES: ChatComposerCapabilities =
export const REMOTE_CHAT_COMPOSER_CAPABILITIES: ChatComposerCapabilities =
new ChatComposerCapabilities(ChatSurface.Remote, true, true, true, true, true);
+
+/** Local GenUI: phone-owned models, no attachments, voice or remote connection. */
+export const LOCAL_GENUI_COMPOSER_CAPABILITIES: ChatComposerCapabilities =
+ new ChatComposerCapabilities(ChatSurface.Local, false, false, false, false, false, true);
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatSurface.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatSurface.ets
index 284d69a..cf1bdbe 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatSurface.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ChatSurface.ets
@@ -1,4 +1,6 @@
export enum ChatSurface {
General = 'general',
- Remote = 'remote'
+ Remote = 'remote',
+ /** Local GenUI Mode: a phone-owned conversation that produces mini apps. */
+ Local = 'local'
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationCoreState.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationCoreState.ets
index c8b4aa8..bcf8a3a 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationCoreState.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationCoreState.ets
@@ -245,7 +245,8 @@ export class ConversationCoreState {
thinking: message.thinking,
tools: message.tools ? message.tools.slice() : undefined,
items: message.items ? message.items.slice() : undefined,
- images: message.images ? message.images.slice() : undefined
+ images: message.images ? message.images.slice() : undefined,
+ appCard: message.appCard
};
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationUiModels.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationUiModels.ets
index 773175e..6dca83b 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationUiModels.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationUiModels.ets
@@ -1,6 +1,7 @@
// Presentation-owned structures. Protocol DTOs are mapped at the boundary and
// never imported by leaf rendering components.
import {
+ ChatMessageAppCard,
ChatMessage,
ChatMessageItemResponse,
ImageAttachment,
@@ -109,6 +110,7 @@ export interface ConversationUiMessage {
tools?: ConversationUiToolStatus[];
items?: ConversationUiMessageItem[];
images?: ConversationUiImage[];
+ appCard?: ChatMessageAppCard;
}
/** Stable observable projection consumed by retained/reused message rows. */
@@ -127,6 +129,7 @@ export class ObservableConversationUiMessage implements ConversationUiMessage {
@Trace tools: ConversationUiToolStatus[] | undefined = undefined;
@Trace items: ConversationUiMessageItem[] | undefined = undefined;
@Trace images: ConversationUiImage[] | undefined = undefined;
+ @Trace appCard: ChatMessageAppCard | undefined = undefined;
updateFrom(source: ConversationUiMessage): void {
this.id = source.id;
@@ -142,6 +145,7 @@ export class ObservableConversationUiMessage implements ConversationUiMessage {
this.tools = source.tools;
this.items = source.items;
this.images = source.images;
+ this.appCard = source.appCard;
}
}
@@ -267,7 +271,8 @@ export function toConversationUiMessage(source: ChatMessage): ConversationUiMess
thinking: source.thinking,
tools: source.tools ? source.tools.map((tool: RemoteToolStatusResponse) => toConversationUiToolStatus(tool)) : undefined,
items: source.items ? source.items.map((item: ChatMessageItemResponse) => toConversationUiMessageItem(item)) : undefined,
- images: source.images ? source.images.map((image: ImageAttachment) => toConversationUiImage(image)) : undefined
+ images: source.images ? source.images.map((image: ImageAttachment) => toConversationUiImage(image)) : undefined,
+ appCard: source.appCard
};
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationViewState.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationViewState.ets
index 59f84d9..5156497 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationViewState.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/ConversationViewState.ets
@@ -10,6 +10,7 @@ import { RemoteUiState } from '../../services/RemoteUiState';
import {
ChatComposerCapabilities,
GENERAL_CHAT_COMPOSER_CAPABILITIES,
+ LOCAL_GENUI_COMPOSER_CAPABILITIES,
REMOTE_CHAT_COMPOSER_CAPABILITIES
} from './ChatComposerCapabilities';
import { ChatSurface } from './ChatSurface';
@@ -146,6 +147,17 @@ export class ConversationViewState {
return state;
}
+ /** Local GenUI conversation: the same view, phone-owned models and sessions. */
+ static local(core: ConversationCoreState, inlineStatus: string): ConversationViewState {
+ const state = ConversationViewState.fromCore(core);
+ state.surface = ChatSurface.Local;
+ state.inlineStatusText = inlineStatus;
+ state.connectionState = 'connected';
+ state.composerCapabilities = LOCAL_GENUI_COMPOSER_CAPABILITIES;
+ state.showSuggestionsWhenEmpty = false;
+ return state;
+ }
+
private static general(general: GeneralChatPageState, inlineStatus: string): ConversationViewState {
const state = ConversationViewState.fromCore(general.conversation);
state.inlineStatusText = inlineStatus;
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/LocalGenUIState.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/LocalGenUIState.ets
new file mode 100644
index 0000000..aa6feae
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/state/LocalGenUIState.ets
@@ -0,0 +1,163 @@
+import { LocalCollaborationRequest } from '../../services/local-genui/LocalGenUICollaborationHost';
+import { LocalCollaborationSnapshot } from '../../services/local-genui/LocalCollaborationSession';
+import { LocalGenUIGalleryEntry, LocalGenUISession } from '../../services/local-genui/LocalGenUIModels';
+import { Want } from '@kit.AbilityKit';
+import { formBindingData } from '@kit.FormKit';
+import { LocalGenUIDesktopCards } from '../../services/local-genui/LocalGenUIDesktopCards';
+import { LocalGenUIModelProfile } from '../../services/local-genui/LocalGenUIModelCatalog';
+import { ConversationCoreState } from './ConversationCoreState';
+import { ConversationIntent } from '../actions/ConversationIntent';
+
+/** Presentation projection of Local GenUI sessions, conversations and apps. */
+@ObservedV2
+export class LocalGenUIState {
+ @Trace visible: boolean = false;
+ /** Opened from the MiniApp gallery: the app alone, without the conversation. */
+ @Trace standalone: boolean = false;
+ /** The conversation pane is the shared ConversationView over this core. */
+ @Trace conversation: ConversationCoreState = new ConversationCoreState('chat');
+ @Trace loading: boolean = false;
+ @Trace error: string = '';
+ @Trace notice: string = '';
+ @Trace localSessions: LocalGenUISession[] = [];
+ @Trace sessionId: string = '';
+ @Trace view: 'sessions' | 'chat' | 'app' = 'sessions';
+ @Trace appId: string = '';
+ @Trace appTitle: string = '';
+ @Trace appStatus: string = '';
+ @Trace appDetail: string = '';
+ @Trace appUnverified: string[] = [];
+ @Trace appStreaming: boolean = false;
+ // Models
+ @Trace models: LocalGenUIModelProfile[] = [];
+ @Trace currentModelId: string = '';
+ @Trace modelMissing: boolean = false;
+ @Trace showModelManager: boolean = false;
+ /** '' = list, 'new' = add form, otherwise the edited model id. */
+ @Trace editingModelId: string = '';
+ @Trace editorOpen: boolean = false;
+ @Trace editorSaving: boolean = false;
+ @Trace editorError: string = '';
+ @Trace editorHasKey: boolean = false;
+ @Trace remoteModelNames: string[] = [];
+ @Trace fetchingModels: boolean = false;
+ /** An app on screen holds a gesture subscription: show the camera preview. */
+ @Trace showCollaboration: boolean = false;
+ @Trace collaborationRequest: LocalCollaborationRequest | undefined = undefined;
+ @Trace cameraWanted: boolean = false;
+ // Gallery
+ @Trace gallery: LocalGenUIGalleryEntry[] = [];
+ /** Bundle of this app; empty until the context is known, which hides "Add to desktop". */
+ @Trace bundleName: string = '';
+
+ currentModelName(): string {
+ const model = this.models.find((item: LocalGenUIModelProfile) => item.id === this.currentModelId);
+ if (!model) return '';
+ return model.name.trim().length > 0 ? model.name.trim() : model.modelName;
+ }
+
+ canAddToDesktop(appId: string): boolean {
+ return this.bundleName.length > 0 && LocalGenUIDesktopCards.isAppId(appId);
+ }
+
+ /** Want of `AddFormMenuItem` for the app's home-screen card. */
+ desktopCardWant(appId: string): Want {
+ return LocalGenUIDesktopCards.addWant(this.bundleName, appId);
+ }
+
+ /**
+ * First content of the new card. It carries the app id itself, so the card
+ * opens its app even before the card host or the add callback binds it.
+ */
+ desktopCardInitialData(appId: string, title: string): formBindingData.FormBindingData {
+ const data: Record = {};
+ data['appId'] = appId;
+ data['state'] = title.length > 0 ? 'ready' : 'pending';
+ data['title'] = title;
+ data['initial'] = LocalGenUIDesktopCards.initial(title);
+ data['imageName'] = '';
+ return formBindingData.createFormBindingData(data);
+ }
+
+ inGallery(appId: string): boolean {
+ return this.gallery.some((entry: LocalGenUIGalleryEntry) => entry.appId === appId);
+ }
+}
+
+export interface LocalGenUIModelEditorInput {
+ name: string;
+ apiUrl: string;
+ modelName: string;
+ apiKey: string;
+}
+
+export interface LocalGenUIActions {
+ open: () => void;
+ close: () => void;
+ back: () => boolean;
+ newSession: () => void;
+ openSession: (sessionId: string) => void;
+ deleteSession: (sessionId: string) => void;
+ openApp: (appId: string) => void;
+ showSessions: () => void;
+ showChat: () => void;
+ /** Intents from the shared ConversationView. */
+ conversation: (intent: ConversationIntent) => void;
+ // Models
+ openModelManager: () => void;
+ closeModelManager: () => void;
+ editModel: (modelId: string) => void;
+ closeEditor: () => void;
+ saveModel: (input: LocalGenUIModelEditorInput) => void;
+ removeModel: (modelId: string) => void;
+ fetchRemoteModels: (apiUrl: string, apiKey: string) => void;
+ // Gallery
+ addToGallery: (appId: string) => void;
+ removeFromGallery: (appId: string) => void;
+ openGalleryApp: (appId: string) => void;
+ // Desktop cards
+ /** The add menu is about to show: make sure the card has content to show. */
+ prepareDesktopCard: (appId: string) => void;
+ /** Result of `AddFormMenuItem`; `error` is empty on success. */
+ desktopCardAdded: (appId: string, formId: string, error: string) => void;
+ // Device capabilities (presentation facts from the surface)
+ appOnScreen: (onScreen: boolean) => void;
+ cameraSurface: (surfaceId: string) => void;
+ cameraSurfaceGone: () => void;
+ collaborationClose: (token: number) => void;
+ collaborationResult: (token: number, result: LocalCollaborationSnapshot) => void;
+ collaborationReceive: (token: number, data: ArrayBuffer) => Promise;
+}
+
+export function emptyLocalGenUIActions(): LocalGenUIActions {
+ return {
+ open: () => {},
+ close: () => {},
+ back: (): boolean => false,
+ newSession: () => {},
+ openSession: (_sessionId: string) => {},
+ deleteSession: (_sessionId: string) => {},
+ openApp: (_appId: string) => {},
+ showSessions: () => {},
+ showChat: () => {},
+ conversation: (_intent: ConversationIntent) => {},
+ openModelManager: () => {},
+ closeModelManager: () => {},
+ editModel: (_modelId: string) => {},
+ closeEditor: () => {},
+ saveModel: (_input: LocalGenUIModelEditorInput) => {},
+ removeModel: (_modelId: string) => {},
+ fetchRemoteModels: (_apiUrl: string, _apiKey: string) => {},
+ addToGallery: (_appId: string) => {},
+ removeFromGallery: (_appId: string) => {},
+ openGalleryApp: (_appId: string) => {},
+ prepareDesktopCard: (_appId: string) => {},
+ desktopCardAdded: (_appId: string, _formId: string, _error: string) => {},
+ appOnScreen: (_onScreen: boolean) => {},
+ cameraSurface: (_surfaceId: string) => {},
+ collaborationClose: (_token: number) => {},
+ collaborationResult: (_token: number, _result: LocalCollaborationSnapshot) => {},
+ collaborationReceive: async (_token: number, _data: ArrayBuffer): Promise => { throw new Error('collaboration unavailable'); },
+ cameraSurfaceGone: () => {}
+ };
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIConversationProjection.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIConversationProjection.ets
new file mode 100644
index 0000000..c8fadfb
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIConversationProjection.ets
@@ -0,0 +1,90 @@
+import { ChatMessage, RemoteModelCatalog, RemoteModelConfig, SessionSummary } from '../../model/RemoteModels';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { LocalGenUIMessage, LocalGenUISession } from '../../services/local-genui/LocalGenUIModels';
+import { LocalGenUIModelProfile } from '../../services/local-genui/LocalGenUIModelCatalog';
+
+/** Link scheme the shared timeline renders for a generated app. */
+export const LOCAL_GENUI_APP_LINK: string = 'openbitfun-genui://app/';
+const ACTIVE_TURN_ID: string = 'local-genui-active-turn';
+
+/**
+ * Projects Local GenUI records onto the shapes the shared ConversationView
+ * already renders, so the local conversation reuses the remote timeline,
+ * composer and model selector instead of a parallel UI.
+ */
+export class LocalGenUIConversationProjection {
+ static session(session: LocalGenUISession): SessionSummary {
+ return { sessionId: session.id, title: session.title, workspacePath: '', agentType: 'chat' };
+ }
+
+ static messages(messages: LocalGenUIMessage[], thumbnailFor: (appId: string) => string): ChatMessage[] {
+ return messages.map((message: LocalGenUIMessage): ChatMessage => {
+ const text = message.text.trim();
+ const failed = message.error.length > 0;
+ const projected: ChatMessage = {
+ id: message.id,
+ role: message.role,
+ text,
+ // The shared bubble draws its own failure block from `error`.
+ status: failed ? 'failed' : 'completed',
+ error: failed ? message.error : undefined,
+ turnId: message.id,
+ timestamp: message.createdAt,
+ items: message.role === 'assistant' && text.length > 0 ? [{ type: 'text', content: text }] : undefined
+ };
+ if (message.appId.length > 0) {
+ projected.appCard = {
+ appId: message.appId,
+ title: message.appTitle,
+ status: message.status.length > 0 ? RemoteI18n.t(`localGenui.status.${message.status}`) : '',
+ thumbnailPath: thumbnailFor(message.appId),
+ link: `${LOCAL_GENUI_APP_LINK}${message.appId}`
+ };
+ }
+ return projected;
+ });
+ }
+
+ static activeTurn(text: string): ChatMessage {
+ return {
+ id: ACTIVE_TURN_ID,
+ role: 'assistant',
+ text,
+ status: 'active',
+ turnId: ACTIVE_TURN_ID,
+ items: text.length > 0 ? [{ type: 'text', content: text }] : []
+ };
+ }
+
+ /** Phone-owned model profiles as the composer's model catalog. */
+ static catalog(models: LocalGenUIModelProfile[], selectedId: string): RemoteModelCatalog {
+ return {
+ version: 1,
+ models: models.map((model: LocalGenUIModelProfile): RemoteModelConfig => ({
+ id: model.id,
+ name: model.name.trim().length > 0 ? model.name.trim() : model.modelName,
+ provider: 'local',
+ base_url: model.apiUrl,
+ model_name: model.modelName,
+ enabled: true,
+ capabilities: ['text_chat']
+ })),
+ // No primary/fast roles: the session pins a concrete model profile.
+ default_models: {},
+ session_model_id: selectedId.length > 0 ? selectedId : undefined
+ };
+ }
+
+ static latestAppId(messages: LocalGenUIMessage[]): string {
+ for (let i = messages.length - 1; i >= 0; i--) {
+ if (messages[i].appId.length > 0) {
+ return messages[i].appId;
+ }
+ }
+ return '';
+ }
+
+ static appIdFromLink(reference: string): string {
+ return reference.startsWith(LOCAL_GENUI_APP_LINK) ? reference.slice(LOCAL_GENUI_APP_LINK.length) : '';
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIViewModel.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIViewModel.ets
new file mode 100644
index 0000000..f4e4d10
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/viewmodel/LocalGenUIViewModel.ets
@@ -0,0 +1,572 @@
+import { LocalGenUICollaborationAssets, LOCAL_GENUI_COLLABORATION_ROOT } from '../../services/local-genui/LocalGenUICollaborationAssets';
+import { LocalGenUICollaborationHost, LocalCollaborationOwner, LocalCollaborationRequest, LocalCollaborationReply } from '../../services/local-genui/LocalGenUICollaborationHost';
+import { LocalCollaborationSnapshot } from '../../services/local-genui/LocalCollaborationSession';
+import { HarmonyCollaborationService } from '../../services/local-genui/HarmonyCollaborationService';
+import { RemoteI18n } from '../../i18n/RemoteI18n';
+import { RemoteLogger } from '../../services/RemoteLogger';
+import { GeneralChatConfigStore } from '../../services/general-chat/GeneralChatConfigStore';
+import { LocalGenUIContractLoader } from '../../services/local-genui/LocalGenUIContract';
+import {
+ HarmonyLocalGenUIStreamTransport,
+ HttpLocalGenUIModelProvider,
+ LocalGenUIStreamTransport
+} from '../../services/local-genui/LocalGenUIModelProvider';
+import {
+ LocalGenUIGalleryEntry,
+ LocalGenUIMessage,
+ LocalGenUIPresentation,
+ LocalGenUISession
+} from '../../services/local-genui/LocalGenUIModels';
+import { LocalGenUIModelProfile } from '../../services/local-genui/LocalGenUIModelCatalog';
+import { LocalGenUIModelStore } from '../../services/local-genui/LocalGenUIModelStore';
+import { LocalGenUIRepository } from '../../services/local-genui/LocalGenUIRepository';
+import { LocalGenUIThumbnailStore } from '../../services/local-genui/LocalGenUIThumbnailStore';
+import { LocalGenUIDesktopCardStore } from '../../services/local-genui/LocalGenUIDesktopCardStore';
+import { LocalGenUIOrientation } from '../../services/local-genui/LocalGenUIOrientation';
+import { LocalGenUIIcon3DStore } from '../../services/local-genui/LocalGenUIIcon3DStore';
+import { LocalGenUIDeviceCapabilityHost } from '../../services/local-genui/LocalGenUIDeviceCapabilityHost';
+import { LocalGenUIRuntimeBridge } from '../../services/local-genui/LocalGenUIRuntimeBridge';
+import { HarmonyCalendarService } from '../../services/local-genui/HarmonyCalendarService';
+import {
+ LocalGenUIAppView,
+ LocalGenUIControllerListener,
+ LocalGenUIPresentationSource,
+ LocalGenUISessionController
+} from '../../services/local-genui/LocalGenUISessionController';
+import { LocalGenUIActions, LocalGenUIModelEditorInput, LocalGenUIState } from '../state/LocalGenUIState';
+import { ConversationIntent, ConversationIntentType, MessageCopyScope } from '../actions/ConversationIntent';
+import { ConversationViewModel } from './ConversationViewModel';
+import { ChatMessage, RemoteModelCatalog, RemoteModelConfig } from '../../model/RemoteModels';
+import { ChatTimelineState } from '../../services/ChatTimelineStore';
+import { RemoteUiState } from '../../services/RemoteUiState';
+import { ClipboardService } from '../../services/ClipboardService';
+import { MarkdownHtmlSerializer } from '../../services/MarkdownHtmlSerializer';
+import { LocalGenUIConversationProjection } from './LocalGenUIConversationProjection';
+
+/**
+ * Local GenUI Mode entry. Local stores are created on first use (surface,
+ * sidebar section or gallery); Remote Mode never constructs them.
+ */
+export class LocalGenUIViewModel implements LocalGenUIControllerListener, LocalGenUIPresentationSource {
+ readonly state: LocalGenUIState = new LocalGenUIState();
+ readonly bridge: LocalGenUIRuntimeBridge = new LocalGenUIRuntimeBridge();
+ private readonly context: () => Context;
+ private readonly transport: () => LocalGenUIStreamTransport;
+ private controller?: LocalGenUISessionController;
+ private initializing?: Promise;
+ private facts: LocalGenUIPresentation = { posture: 'compact', deviceWidth: 0, deviceHeight: 0, safeTop: 0, safeBottom: 0, viewportScale: 1 };
+ private noticeTimer: number = -1;
+ /** The shared timeline store behind ConversationView. */
+ private readonly timeline: ConversationViewModel = new ConversationViewModel();
+ private readonly clipboard: ClipboardService = new ClipboardService();
+ private messages: LocalGenUIMessage[] = [];
+ private devices?: LocalGenUIDeviceCapabilityHost;
+ private collaboration?: LocalGenUICollaborationHost;
+ private foreground: boolean = true;
+ private appOnScreen: boolean = false;
+ private streaming: string = '';
+ private readonly orientation: LocalGenUIOrientation;
+ private preferredOrientation: string = 'auto';
+
+ readonly actions: LocalGenUIActions = {
+ open: (): void => {
+ this.showSessions();
+ void this.open();
+ },
+ close: (): void => this.close(),
+ back: (): boolean => this.back(),
+ newSession: (): void => { void this.newSession(); },
+ openSession: (sessionId: string): void => { void this.openSession(sessionId); },
+ deleteSession: (sessionId: string): void => { void this.withController((c) => c.deleteSession(sessionId)); },
+ openApp: (appId: string): void => {
+ this.state.view = 'app';
+ void this.withController((c) => c.openApp(appId));
+ },
+ showSessions: (): void => this.showSessions(),
+ showChat: (): void => {
+ this.state.standalone = false;
+ this.state.view = 'chat';
+ },
+ conversation: (intent: ConversationIntent): void => this.dispatch(intent),
+ openModelManager: (): void => {
+ this.state.showModelManager = true;
+ this.state.editorOpen = false;
+ },
+ closeModelManager: (): void => {
+ this.state.showModelManager = false;
+ this.state.editorOpen = false;
+ },
+ editModel: (modelId: string): void => this.editModel(modelId),
+ closeEditor: (): void => { this.state.editorOpen = false; },
+ saveModel: (input: LocalGenUIModelEditorInput): void => { void this.saveModel(input); },
+ removeModel: (modelId: string): void => {
+ this.state.editorOpen = false;
+ void this.withController((c) => c.removeModel(modelId));
+ },
+ fetchRemoteModels: (apiUrl: string, apiKey: string): void => { void this.fetchRemoteModels(apiUrl, apiKey); },
+ addToGallery: (appId: string): void => {
+ void this.withController(async (c) => {
+ await c.addToGallery(appId);
+ this.notice(RemoteI18n.t('localGenui.addedToGallery'));
+ });
+ },
+ removeFromGallery: (appId: string): void => { void this.withController((c) => c.removeFromGallery(appId)); },
+ openGalleryApp: (appId: string): void => { void this.openGalleryApp(appId); },
+ prepareDesktopCard: (appId: string): void => {
+ void this.withController((c) => c.prepareDesktopCard(appId));
+ },
+ desktopCardAdded: (appId: string, formId: string, error: string): void => {
+ if (error.length > 0 || formId.length === 0) {
+ RemoteLogger.warn(`local genui desktop card not added: ${error}`);
+ this.notice(RemoteI18n.t('localGenui.addToDesktopFailed'));
+ return;
+ }
+ RemoteLogger.info('local genui desktop card add callback received');
+ void this.withController(async (c) => {
+ await c.desktopCardAdded(appId, formId);
+ this.notice(RemoteI18n.t('localGenui.addedToDesktop'));
+ });
+ },
+ appOnScreen: (onScreen: boolean): void => this.setAppOnScreen(onScreen),
+ cameraSurface: (surfaceId: string): void => this.attachCameraSurface(surfaceId),
+ cameraSurfaceGone: (): void => this.detachCameraSurface(),
+ collaborationClose: (token: number): void => this.collaboration?.close(token),
+ collaborationResult: (token: number, result: LocalCollaborationSnapshot): void => this.collaboration?.result(token, result),
+ collaborationReceive: async (token: number, data: ArrayBuffer): Promise => {
+ if (!this.collaboration) throw new Error('collaboration unavailable');
+ await this.collaboration.receive(token, data);
+ }
+ };
+
+ private showSessions(): void {
+ this.state.standalone = false;
+ this.state.view = 'sessions';
+ }
+
+ constructor(context: () => Context, transport: () => LocalGenUIStreamTransport = () => new HarmonyLocalGenUIStreamTransport()) {
+ this.context = context;
+ this.transport = transport;
+ this.orientation = new LocalGenUIOrientation(context);
+ }
+
+ /** The add-to-desktop want names this app's card host. */
+ private syncBundleName(): void {
+ if (this.state.bundleName.length > 0) return;
+ try {
+ this.state.bundleName = this.context().applicationInfo.name;
+ } catch (err) {
+ RemoteLogger.warn(`local genui bundle name unavailable: ${err instanceof Error ? err.message : String(err)}`);
+ }
+ }
+
+ /** Read-only local data for the sidebar section and the gallery. */
+ async load(): Promise {
+ this.syncBundleName();
+ await this.withController(async (c) => {
+ await c.refreshSessions();
+ await c.refreshGallery();
+ });
+ }
+
+ async open(): Promise {
+ this.syncBundleName();
+ this.state.visible = true;
+ this.state.standalone = false;
+ this.state.error = '';
+ try {
+ await this.ensureController();
+ if (this.controller) {
+ await this.controller.refreshSessions();
+ await this.controller.refreshModels();
+ await this.controller.refreshGallery();
+ }
+ } catch (err) {
+ this.state.error = err instanceof Error ? err.message : String(err);
+ RemoteLogger.warn(`local genui open failed: ${this.state.error}`);
+ }
+ }
+
+ async openSession(sessionId: string): Promise {
+ await this.open();
+ this.state.view = 'chat';
+ // Opening a session shows its conversation; the app opens from its card.
+ if (this.controller) await this.controller.openSession(sessionId);
+ }
+
+ async newSession(): Promise {
+ await this.open();
+ this.state.view = 'chat';
+ if (this.controller) this.controller.newSession();
+ }
+
+ async openGalleryApp(appId: string): Promise {
+ await this.open();
+ this.state.standalone = true;
+ this.state.view = 'app';
+ if (this.controller) await this.controller.openGalleryApp(appId);
+ }
+
+ close(): void {
+ if (this.controller && this.controller.isTurnActive()) {
+ this.controller.cancel();
+ }
+ this.state.visible = false;
+ this.state.standalone = false;
+ this.appOnScreen = false;
+ this.syncDeviceVisibility();
+ this.state.showModelManager = false;
+ }
+
+ /** Returns true when the back gesture was consumed inside the surface. */
+ back(): boolean {
+ if (!this.state.visible) return false;
+ if (this.state.editorOpen) {
+ this.state.editorOpen = false;
+ return true;
+ }
+ if (this.state.showModelManager) {
+ this.state.showModelManager = false;
+ return true;
+ }
+ if (this.state.view === 'app' && !this.state.standalone) {
+ this.state.view = 'chat';
+ return true;
+ }
+ if (this.state.view === 'chat') {
+ this.showSessions();
+ return true;
+ }
+ this.close();
+ return true;
+ }
+
+ /** The page reports whether the app pane is on screen. */
+ setAppOnScreen(onScreen: boolean): void {
+ this.appOnScreen = onScreen;
+ this.syncDeviceVisibility();
+ }
+
+ /** The phone app went to the background or came back. */
+ setForeground(foreground: boolean): void {
+ this.foreground = foreground;
+ this.syncDeviceVisibility();
+ }
+
+ /** Camera surface from the preview leaf; recognition starts once it exists. */
+ attachCameraSurface(surfaceId: string): void {
+ if (this.devices) this.devices.attachSurface(surfaceId);
+ }
+
+ detachCameraSurface(): void {
+ if (this.devices) this.devices.detachSurface();
+ }
+
+ private syncDeviceVisibility(): void {
+ this.collaboration?.setVisible(this.foreground && this.state.visible && this.appOnScreen);
+ void this.orientation.sync(this.foreground && this.state.visible && this.appOnScreen, this.preferredOrientation);
+ if (this.devices) {
+ const wanted = this.foreground && this.state.visible && this.appOnScreen;
+ RemoteLogger.info(`local genui device visibility wanted=${wanted} foreground=${this.foreground} visible=${this.state.visible} appOnScreen=${this.appOnScreen} view=${this.state.view}`);
+ this.devices.setVisible(wanted);
+ }
+ }
+
+ updatePresentation(facts: LocalGenUIPresentation): void {
+ this.facts = facts;
+ }
+
+ presentation(): LocalGenUIPresentation {
+ return this.facts;
+ }
+
+ orientationChanged(orientation: string): void {
+ this.preferredOrientation = orientation;
+ this.syncDeviceVisibility();
+ }
+
+ // LocalGenUIControllerListener
+ sessionsChanged(sessions: LocalGenUISession[], activeId: string): void {
+ this.state.localSessions = sessions;
+ this.state.sessionId = activeId;
+ const active = sessions.find((item: LocalGenUISession) => item.id === activeId);
+ if (active) {
+ this.state.conversation.setActiveSession(LocalGenUIConversationProjection.session(active));
+ } else if (activeId.length === 0) {
+ this.state.conversation.clearActiveSession();
+ }
+ }
+
+ messagesChanged(sessionId: string, messages: LocalGenUIMessage[]): void {
+ const switched = sessionId !== this.state.sessionId;
+ this.state.sessionId = sessionId;
+ this.messages = messages;
+ if (switched) {
+ this.timeline.reset(sessionId);
+ this.streaming = '';
+ }
+ this.timeline.setPersistedMessages(LocalGenUIConversationProjection.messages(messages,
+ (appId: string): string => this.controller ? this.controller.thumbnailFor(appId) : ''));
+ this.syncTimeline();
+ }
+
+ streamingText(_sessionId: string, text: string): void {
+ this.streaming = text;
+ if (this.state.conversation.isBusy) {
+ this.timeline.setActiveTurn(LocalGenUIConversationProjection.activeTurn(text));
+ }
+ this.syncTimeline();
+ }
+
+ appChanged(app: LocalGenUIAppView | undefined): void {
+ this.collaboration?.invalidate(app?.appId || '', app?.sourceRevision || 0, app?.streaming || false);
+ if (!app) {
+ this.state.appId = '';
+ this.state.appTitle = '';
+ this.state.appStatus = '';
+ this.state.appDetail = '';
+ this.state.appUnverified = [];
+ this.state.appStreaming = false;
+ if (this.state.view === 'app' && !this.state.standalone) this.state.view = 'chat';
+ return;
+ }
+ this.state.appId = app.appId;
+ this.state.appTitle = app.title;
+ this.state.appStatus = app.status;
+ this.state.appDetail = app.detail;
+ this.state.appUnverified = app.unverified;
+ this.state.appStreaming = app.streaming;
+ if (app.streaming && this.state.view !== 'sessions') this.state.view = 'app';
+ }
+
+ busyChanged(busy: boolean): void {
+ this.state.conversation.setBusy(busy);
+ if (busy) {
+ this.timeline.setActiveTurn(LocalGenUIConversationProjection.activeTurn(this.streaming));
+ } else {
+ this.streaming = '';
+ this.timeline.clearActiveTurn();
+ }
+ this.syncTimeline();
+ }
+
+ notice(text: string): void {
+ this.state.notice = text;
+ if (this.noticeTimer >= 0) clearTimeout(this.noticeTimer);
+ this.noticeTimer = setTimeout(() => { this.state.notice = ''; this.noticeTimer = -1; }, 5000);
+ }
+
+ modelsChanged(models: LocalGenUIModelProfile[], currentId: string, missing: boolean): void {
+ this.state.models = models;
+ this.state.currentModelId = currentId;
+ this.state.modelMissing = missing;
+ // The shared composer's model selector reads the core catalog.
+ this.state.conversation.setModelCatalog(LocalGenUIConversationProjection.catalog(models, currentId), currentId);
+ this.state.conversation.setStatusText(missing ? RemoteI18n.t('localGenui.modelMissing') : '');
+ }
+
+ galleryChanged(entries: LocalGenUIGalleryEntry[]): void {
+ this.state.gallery = entries;
+ }
+
+ private editModel(modelId: string): void {
+ this.state.editingModelId = modelId;
+ this.state.editorOpen = true;
+ this.state.editorError = '';
+ this.state.remoteModelNames = [];
+ this.state.editorHasKey = modelId.length > 0 && modelId !== 'new' && this.controller !== undefined && this.controller.hasStoredKey(modelId);
+ }
+
+ private async saveModel(input: LocalGenUIModelEditorInput): Promise {
+ if (!this.controller || this.state.editorSaving) return;
+ this.state.editorSaving = true;
+ this.state.editorError = '';
+ try {
+ await this.controller.saveModel({ id: this.state.editingModelId === 'new' ? '' : this.state.editingModelId, name: input.name, apiUrl: input.apiUrl, modelName: input.modelName, apiKey: input.apiKey });
+ this.state.editorOpen = false;
+ this.notice(RemoteI18n.t('localGenui.saved'));
+ } catch (err) {
+ this.state.editorError = err instanceof Error ? err.message : String(err);
+ } finally {
+ this.state.editorSaving = false;
+ }
+ }
+
+ private async fetchRemoteModels(apiUrl: string, apiKey: string): Promise {
+ if (!this.controller || this.state.fetchingModels) return;
+ this.state.fetchingModels = true;
+ this.state.editorError = '';
+ try {
+ const editing = this.state.editingModelId === 'new' ? '' : this.state.editingModelId;
+ const names = await this.controller.listRemoteModels(apiUrl, apiKey, editing);
+ this.state.remoteModelNames = names;
+ if (names.length === 0) this.state.editorError = RemoteI18n.t('localGenui.noRemoteModels');
+ } catch (err) {
+ this.state.editorError = err instanceof Error ? err.message : String(err);
+ } finally {
+ this.state.fetchingModels = false;
+ }
+ }
+
+ /** Intents of the shared ConversationView. Unsupported ones are explicit. */
+ private dispatch(intent: ConversationIntent): void {
+ switch (intent.type) {
+ case ConversationIntentType.ChatInputChanged:
+ this.state.conversation.setChatInput(intent.value);
+ return;
+ case ConversationIntentType.Send:
+ void this.send(this.state.conversation.chatInput);
+ return;
+ case ConversationIntentType.RetryMessage:
+ void this.send(intent.value);
+ return;
+ case ConversationIntentType.Stop:
+ if (this.controller) this.controller.cancel();
+ return;
+ case ConversationIntentType.SelectModel:
+ void this.withController((c) => c.chooseModel(intent.value));
+ return;
+ case ConversationIntentType.ManageModels:
+ this.actions.openModelManager();
+ return;
+ case ConversationIntentType.NewSession:
+ void this.newSession();
+ return;
+ case ConversationIntentType.Back:
+ this.back();
+ return;
+ case ConversationIntentType.Delete:
+ if (this.state.sessionId.length > 0) this.actions.deleteSession(this.state.sessionId);
+ return;
+ case ConversationIntentType.RenameSession:
+ void this.withController((c) => c.renameSession(this.state.sessionId, intent.value));
+ return;
+ case ConversationIntentType.CopyMessage:
+ void this.copy(intent.value, intent.copyScope);
+ return;
+ case ConversationIntentType.OpenFilePreview: {
+ const reference = intent.filePreviewRequest ? intent.filePreviewRequest.reference : '';
+ const appId = LocalGenUIConversationProjection.appIdFromLink(reference);
+ if (appId.length > 0) {
+ this.actions.openApp(appId);
+ } else {
+ this.notice(RemoteI18n.t('localGenui.linkUnsupported'));
+ }
+ return;
+ }
+ default:
+ return;
+ }
+ }
+
+ private async copy(text: string, scope: MessageCopyScope): Promise {
+ if (text.trim().length === 0) return;
+ try {
+ if (scope === MessageCopyScope.Rich) {
+ await this.clipboard.copyRich(text, MarkdownHtmlSerializer.toHtml(text));
+ } else {
+ await this.clipboard.writeText(text);
+ }
+ this.notice(RemoteI18n.t('status.messageCopied'));
+ } catch (err) {
+ this.notice(err instanceof Error ? err.message : String(err));
+ }
+ }
+
+ private syncTimeline(): void {
+ const snapshot: ChatTimelineState = this.timeline.snapshotState();
+ this.state.conversation.setTimelineProjection(
+ snapshot.persistedMessages,
+ snapshot.optimisticMessages,
+ snapshot.activeTurn || RemoteUiState.emptyActiveTurn(),
+ false,
+ this.timeline.viewState(false)
+ );
+ }
+
+ /** Follow-up turns in a session refine its latest app. */
+ private async send(text: string): Promise {
+ const prompt = text.trim();
+ if (prompt.length === 0 || this.state.conversation.isBusy) return;
+ await this.withController(async (c) => {
+ this.state.conversation.setChatInput('');
+ await c.send(prompt, LocalGenUIConversationProjection.latestAppId(this.messages));
+ });
+ }
+
+ private async withController(work: (controller: LocalGenUISessionController) => Promise): Promise {
+ try {
+ await this.ensureController();
+ if (this.controller) await work(this.controller);
+ } catch (err) {
+ this.notice(err instanceof Error ? err.message : String(err));
+ }
+ }
+
+ private async ensureController(): Promise {
+ if (this.controller) return;
+ if (!this.initializing) {
+ this.initializing = this.createController();
+ }
+ try {
+ await this.initializing;
+ } catch (err) {
+ this.initializing = undefined;
+ throw err instanceof Error ? err : new Error(String(err));
+ }
+ }
+
+ private async createController(): Promise {
+ this.state.loading = true;
+ try {
+ const context = this.context();
+ const contract = await LocalGenUIContractLoader.load(context);
+ const repository = new LocalGenUIRepository();
+ await repository.init(context);
+ const legacy = new GeneralChatConfigStore();
+ await legacy.init(context);
+ const models = new LocalGenUIModelStore();
+ await models.init(context, legacy);
+ const provider = new HttpLocalGenUIModelProvider(models, this.transport());
+ const thumbnails = new LocalGenUIThumbnailStore(context.filesDir);
+ const desktopCards = new LocalGenUIDesktopCardStore(context.filesDir);
+ const icons = new LocalGenUIIcon3DStore(context.filesDir);
+ const assets = new LocalGenUICollaborationAssets(context.filesDir);
+ this.bridge.setPictureSource(async (url: string): Promise => {
+ if (!url.startsWith(LOCAL_GENUI_COLLABORATION_ROOT)) return icons.picture(url);
+ const mount = this.bridge.currentMount();
+ if (!mount) return undefined;
+ const bytes = await assets.picture(mount.identity.appId, url);
+ return this.bridge.currentMount()?.identity.appId === mount.identity.appId ? bytes : undefined;
+ });
+ const collaboration = new LocalGenUICollaborationHost({
+ owner: (): LocalCollaborationOwner => {
+ const mount = this.bridge.currentMount();
+ return { appId: mount?.identity.appId || '', sourceRevision: mount?.sourceRevision || 0,
+ live: !!mount && mount.mode === 'live' && !mount.streaming };
+ },
+ unavailable: (): string => HarmonyCollaborationService.environment().unavailable,
+ changed: (request: LocalCollaborationRequest | undefined): void => {
+ this.state.collaborationRequest = request;
+ this.state.showCollaboration = request !== undefined;
+ },
+ send: (reply: LocalCollaborationReply): void => this.bridge.sendCollaboration(reply),
+ save: (appId: string, data: ArrayBuffer): Promise => assets.save(appId, data),
+ discard: (appId: string, asset: string): Promise => assets.discard(appId, asset)
+ });
+ this.collaboration = collaboration;
+ const devices = new LocalGenUIDeviceCapabilityHost(context, {
+ gesture: (subscriptionId: string, gesture: string): void => this.bridge.sendCapabilityEvent(subscriptionId, gesture),
+ status: (subscriptionId: string, status: string): void => this.bridge.sendCapabilityStatus(subscriptionId, status),
+ cameraWanted: (wanted: boolean): void => { this.state.cameraWanted = wanted; }
+ });
+ const calendar = new HarmonyCalendarService((): Context => context);
+ this.devices = devices;
+ this.syncDeviceVisibility();
+ this.controller = new LocalGenUISessionController(repository, provider, contract, this.bridge, this, this, models, thumbnails, devices, desktopCards, calendar, collaboration);
+ await this.controller.refreshModels();
+ RemoteLogger.info(`local genui ready renderer=${contract.manifest.rendererRevision} models=${models.list().length}`);
+ } finally {
+ this.state.loading = false;
+ }
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineProjector.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineProjector.ets
index ef68dca..6aff7f3 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineProjector.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineProjector.ets
@@ -126,7 +126,8 @@ export class ChatTimelineProjector {
thinking: message.thinking,
tools: message.tools,
items: message.items,
- images: message.images
+ images: message.images,
+ appCard: message.appCard
};
}
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineStore.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineStore.ets
index 2b0034e..ca620b6 100644
--- a/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineStore.ets
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/ChatTimelineStore.ets
@@ -159,7 +159,8 @@ export class ChatTimelineStore {
thinking: message.thinking,
tools: message.tools,
items: message.items,
- images: message.images
+ images: message.images,
+ appCard: message.appCard
};
});
this.state = {
@@ -747,7 +748,8 @@ export class ChatTimelineStore {
thinking: message.thinking,
tools: message.tools,
items: ChatTimelineStore.mergeActiveItems(activeTurn.items || [], message.items || []),
- images: message.images
+ images: message.images,
+ appCard: message.appCard
};
});
}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCalendarService.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCalendarService.ets
new file mode 100644
index 0000000..d2bdef4
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCalendarService.ets
@@ -0,0 +1,269 @@
+import { abilityAccessCtrl, Context, Permissions } from '@kit.AbilityKit';
+import { calendarManager } from '@kit.CalendarKit';
+import { MobileDesignColors } from '../../generated/MobileDesignTokens';
+import { RemoteLogger } from '../RemoteLogger';
+
+const READ_CALENDAR: Permissions = 'ohos.permission.READ_CALENDAR';
+const WRITE_CALENDAR: Permissions = 'ohos.permission.WRITE_CALENDAR';
+const CALENDAR_NAME: string = 'OpenBitFun';
+const MAX_TITLE_LENGTH: number = 256;
+const MAX_TEXT_LENGTH: number = 4000;
+const MAX_REMINDERS: number = 5;
+
+export type HarmonyCalendarAction = 'CreateCalendarEvent' | 'UpdateCalendarEvent' | 'DeleteCalendarEvent' | 'ListCalendarEvents';
+
+export interface HarmonyCalendarActionResult {
+ ok: boolean;
+ kind: 'created' | 'updated' | 'deleted' | 'listed' | 'failed';
+ eventId?: number;
+ count?: number;
+ error?: string;
+}
+
+interface CalendarActionParams {
+ id?: Object;
+ title?: Object;
+ startTime?: Object;
+ endTime?: Object;
+ description?: Object;
+ location?: Object;
+ reminderMinutes?: Object;
+ recurrence?: Object;
+}
+
+interface RecurrenceParams {
+ frequency?: Object;
+ interval?: Object;
+ count?: Object;
+ expire?: Object;
+}
+
+/**
+ * Calendar Kit adapter for Local GenUI.
+ *
+ * The adapter owns one application-specific local calendar. It does not use
+ * the Huawei Clock alarm store and it never touches calendars created by other
+ * applications. Permission is requested only after an explicit GenUI action.
+ */
+export class HarmonyCalendarService {
+ private readonly contextProvider: () => Context;
+ private permissionRequest?: Promise;
+ private manager?: calendarManager.CalendarManager;
+ private calendar?: calendarManager.Calendar;
+
+ constructor(contextProvider: () => Context) {
+ this.contextProvider = contextProvider;
+ }
+
+ async execute(action: HarmonyCalendarAction, rawParams: Object): Promise {
+ try {
+ const params = HarmonyCalendarService.params(rawParams);
+ if (action === 'CreateCalendarEvent') {
+ return await this.create(params);
+ }
+ if (action === 'UpdateCalendarEvent') {
+ return await this.update(params);
+ }
+ if (action === 'DeleteCalendarEvent') {
+ return await this.remove(params);
+ }
+ if (action === 'ListCalendarEvents') {
+ return await this.list(params);
+ }
+ return this.failure('unsupported calendar action');
+ } catch (err) {
+ const reason = HarmonyCalendarService.errorText(err);
+ RemoteLogger.warn(`local genui calendar action failed: ${reason}`);
+ return this.failure(reason);
+ }
+ }
+
+ private async create(params: CalendarActionParams): Promise {
+ const event = this.event(params);
+ const id = await (await this.ensureCalendar()).addEvent(event);
+ return { ok: true, kind: 'created', eventId: id };
+ }
+
+ private async update(params: CalendarActionParams): Promise {
+ const id = HarmonyCalendarService.number(params.id, 'id', true);
+ const event = this.event(params);
+ event.id = id;
+ await (await this.ensureCalendar()).updateEvent(event);
+ return { ok: true, kind: 'updated', eventId: id };
+ }
+
+ private async remove(params: CalendarActionParams): Promise {
+ const id = HarmonyCalendarService.number(params.id, 'id', true);
+ await (await this.ensureCalendar()).deleteEvent(id);
+ return { ok: true, kind: 'deleted', eventId: id };
+ }
+
+ private async list(params: CalendarActionParams): Promise {
+ const calendar = await this.ensureCalendar();
+ const start = params.startTime === undefined ? undefined : HarmonyCalendarService.time(params.startTime, 'startTime');
+ const end = params.endTime === undefined ? undefined : HarmonyCalendarService.time(params.endTime, 'endTime');
+ if (start !== undefined && end !== undefined && end <= start) {
+ return this.failure('endTime must be later than startTime');
+ }
+ const filter = start !== undefined && end !== undefined ? calendarManager.EventFilter.filterByTime(start, end) : undefined;
+ const events = await calendar.getEvents(filter);
+ return { ok: true, kind: 'listed', count: events.length };
+ }
+
+ private async ensureCalendar(): Promise {
+ await this.ensurePermission();
+ if (this.calendar) {
+ return this.calendar;
+ }
+ if (!this.manager) {
+ this.manager = calendarManager.getCalendarManager(this.contextProvider());
+ }
+ const account: calendarManager.CalendarAccount = {
+ name: CALENDAR_NAME,
+ type: calendarManager.CalendarType.LOCAL,
+ displayName: CALENDAR_NAME
+ };
+ try {
+ this.calendar = await this.manager.getCalendar(account);
+ } catch (_err) {
+ this.calendar = await this.manager.createCalendar(account);
+ await this.calendar.setConfig({ enableReminder: true, color: MobileDesignColors.brandDot.light });
+ }
+ return this.calendar;
+ }
+
+ private async ensurePermission(): Promise {
+ if (!this.permissionRequest) {
+ this.permissionRequest = this.requestPermission();
+ }
+ if (!(await this.permissionRequest)) {
+ throw new Error('calendar permission denied');
+ }
+ }
+
+ private async requestPermission(): Promise {
+ try {
+ const atManager = abilityAccessCtrl.createAtManager();
+ const result = await atManager.requestPermissionsFromUser(this.contextProvider(), [READ_CALENDAR, WRITE_CALENDAR]);
+ return result.authResults.length === 2 &&
+ result.authResults[0] === abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED &&
+ result.authResults[1] === abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED;
+ } catch (err) {
+ RemoteLogger.warn(`local genui calendar permission request failed: ${HarmonyCalendarService.errorText(err)}`);
+ return false;
+ }
+ }
+
+ private event(params: CalendarActionParams): calendarManager.Event {
+ const title = HarmonyCalendarService.text(params.title, 'title', MAX_TITLE_LENGTH, true);
+ const start = HarmonyCalendarService.time(params.startTime, 'startTime', true) as number;
+ const end = HarmonyCalendarService.time(params.endTime, 'endTime', true) as number;
+ if (start !== undefined && end !== undefined && end <= start) {
+ throw new Error('endTime must be later than startTime');
+ }
+ const event: calendarManager.Event = {
+ title,
+ startTime: start,
+ endTime: end,
+ type: calendarManager.EventType.NORMAL
+ };
+ const description = HarmonyCalendarService.text(params.description, 'description', MAX_TEXT_LENGTH, false);
+ const location = HarmonyCalendarService.text(params.location, 'location', MAX_TEXT_LENGTH, false);
+ if (description) event.description = description;
+ if (location) {
+ const place: calendarManager.Location = { location };
+ event.location = place;
+ }
+ const reminders = HarmonyCalendarService.reminders(params.reminderMinutes);
+ if (reminders.length > 0) event.reminderTime = reminders;
+ const recurrence = HarmonyCalendarService.recurrence(params.recurrence);
+ if (recurrence) event.recurrenceRule = recurrence;
+ return event;
+ }
+
+ private static params(value: Object): CalendarActionParams {
+ const raw = value as Record;
+ if (raw['event'] && typeof raw['event'] === 'object') return raw['event'] as CalendarActionParams;
+ if (raw['filter'] && typeof raw['filter'] === 'object') return raw['filter'] as CalendarActionParams;
+ return value as CalendarActionParams;
+ }
+
+ private static text(value: Object | undefined, name: string, max: number, required: boolean = false): string {
+ if (value === undefined || value === null) {
+ if (required) throw new Error(`${name} is required`);
+ return '';
+ }
+ if (typeof value !== 'string' || value.trim().length === 0) {
+ if (required) throw new Error(`${name} must be a non-empty string`);
+ return '';
+ }
+ const result = value.trim();
+ if (result.length > max) throw new Error(`${name} is too long`);
+ return result;
+ }
+
+ private static number(value: Object | undefined, name: string, required: boolean = false, minimum: number = 1): number {
+ if (value === undefined || value === null || value === '') {
+ if (required) throw new Error(`${name} is required`);
+ return 0;
+ }
+ const result = typeof value === 'number' ? value : Number(value);
+ if (!Number.isInteger(result) || result < minimum) {
+ throw new Error(`${name} must be an integer greater than or equal to ${minimum}`);
+ }
+ return result;
+ }
+
+ private static time(value: Object | undefined, name: string, required: boolean = false): number | undefined {
+ if (value === undefined || value === null || value === '') {
+ if (required) throw new Error(`${name} is required`);
+ return undefined;
+ }
+ const result = typeof value === 'number' ? value : Date.parse(String(value));
+ if (!Number.isFinite(result) || result <= 0) throw new Error(`${name} must be an ISO date or epoch milliseconds`);
+ return Math.trunc(result);
+ }
+
+ private static reminders(value: Object | undefined): number[] {
+ if (value === undefined || value === null || value === '') return [];
+ const raw: Object[] = typeof value === 'object' && value !== null
+ ? (value as Object[])
+ : [value as Object];
+ if (raw.length > MAX_REMINDERS) throw new Error('too many reminders');
+ const reminders: number[] = raw.map((item: Object): number =>
+ HarmonyCalendarService.number(item, 'reminderMinutes', false, 0));
+ if (reminders.some(item => item > 10080)) throw new Error('reminderMinutes is too large');
+ return reminders;
+ }
+
+ private static recurrence(value: Object | undefined): calendarManager.RecurrenceRule | undefined {
+ if (!value || typeof value !== 'object') return undefined;
+ const input = value as RecurrenceParams;
+ const frequency = String(input.frequency || '').toLowerCase();
+ let mapped: calendarManager.RecurrenceFrequency;
+ if (frequency === 'daily') mapped = calendarManager.RecurrenceFrequency.DAILY;
+ else if (frequency === 'weekly') mapped = calendarManager.RecurrenceFrequency.WEEKLY;
+ else if (frequency === 'monthly') mapped = calendarManager.RecurrenceFrequency.MONTHLY;
+ else if (frequency === 'yearly') mapped = calendarManager.RecurrenceFrequency.YEARLY;
+ else throw new Error('recurrence.frequency must be daily, weekly, monthly or yearly');
+ const rule: calendarManager.RecurrenceRule = { recurrenceFrequency: mapped };
+ if (input.interval !== undefined) rule.interval = HarmonyCalendarService.number(input.interval, 'recurrence.interval');
+ if (input.count !== undefined) rule.count = HarmonyCalendarService.number(input.count, 'recurrence.count');
+ if (input.expire !== undefined) rule.expire = HarmonyCalendarService.time(input.expire, 'recurrence.expire', true);
+ return rule;
+ }
+
+ private failure(error: string): HarmonyCalendarActionResult {
+ return { ok: false, kind: 'failed', error };
+ }
+
+ private static errorText(err: Object): string {
+ if (err instanceof Error && err.message.length > 0) return err.message;
+ try {
+ const text = JSON.stringify(err);
+ return text.length > 0 && text !== '{}' ? text : 'unknown error';
+ } catch (_jsonErr) {
+ return `${err}`;
+ }
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCollaborationService.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCollaborationService.ets
new file mode 100644
index 0000000..e417429
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/HarmonyCollaborationService.ets
@@ -0,0 +1,79 @@
+import { deviceInfo } from '@kit.BasicServicesKit';
+import { image } from '@kit.ImageKit';
+import { LocalCollaborationSession, LocalCollaborationSnapshot } from './LocalCollaborationSession';
+
+export interface HarmonyCollaborationEnvironment {
+ api: number;
+ deviceType: string;
+ syscap: boolean;
+ unavailable: string;
+}
+
+/** Native image ownership stays here; no file, account or Remote Mode dependency. */
+export class HarmonyCollaborationService {
+ readonly session: LocalCollaborationSession;
+ private picture?: image.PixelMap;
+ private readonly onPicture: (picture: image.PixelMap | undefined) => void;
+ private readonly onEncoded?: (data: ArrayBuffer) => Promise;
+
+ constructor(onState: (state: LocalCollaborationSnapshot) => void,
+ onPicture: (picture: image.PixelMap | undefined) => void,
+ onEncoded?: (data: ArrayBuffer) => Promise) {
+ this.onPicture = onPicture;
+ this.onEncoded = onEncoded;
+ this.session = new LocalCollaborationSession(onState,
+ (data: ArrayBuffer, generation: number): Promise => this.decode(data, generation));
+ }
+
+ static environment(): HarmonyCollaborationEnvironment {
+ try {
+ const api = deviceInfo.sdkApiVersion;
+ const deviceType = deviceInfo.deviceType;
+ const syscap = canIUse('SystemCapability.Collaboration.Service');
+ return { api, deviceType, syscap,
+ unavailable: LocalCollaborationSession.unavailableReason(api, deviceType, syscap) };
+ } catch (_err) {
+ return { api: 0, deviceType: '', syscap: false, unavailable: 'probeFailed' };
+ }
+ }
+
+ private async decode(data: ArrayBuffer, generation: number): Promise {
+ const source = image.createImageSource(data);
+ let decoded: image.PixelMap | undefined;
+ try {
+ const info = await source.getImageInfo();
+ if (!this.session.isCurrent(generation)) return;
+ const scale = Math.min(1, 1600 / Math.max(info.size.width, info.size.height));
+ decoded = await source.createPixelMap({ desiredSize: {
+ width: Math.max(1, Math.round(info.size.width * scale)),
+ height: Math.max(1, Math.round(info.size.height * scale))
+ } });
+ if (!this.session.isCurrent(generation)) return;
+ if (this.onEncoded) {
+ const packer = image.createImagePacker();
+ try {
+ const bytes = await packer.packToData(decoded, { format: 'image/jpeg', quality: 85 });
+ if (!this.session.isCurrent(generation)) return;
+ await this.onEncoded(bytes);
+ } finally { await packer.release(); }
+ if (!this.session.isCurrent(generation)) return;
+ }
+ const previous = this.picture;
+ this.picture = decoded;
+ decoded = undefined;
+ this.onPicture(this.picture);
+ if (previous) void previous.release();
+ } finally {
+ if (decoded) void decoded.release();
+ await source.release();
+ }
+ }
+
+ dispose(): void {
+ this.session.close();
+ this.onPicture(undefined);
+ const previous = this.picture;
+ this.picture = undefined;
+ if (previous) void previous.release();
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalCollaborationSession.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalCollaborationSession.ets
new file mode 100644
index 0000000..72e89cb
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalCollaborationSession.ets
@@ -0,0 +1,122 @@
+export type LocalCollaborationKind = 'photo' | 'scan' | 'gallery';
+export type LocalCollaborationPhase = 'ready' | 'selecting' | 'active' | 'receiving' |
+ 'completed' | 'cancelled' | 'failed' | 'closed' | 'unavailable';
+
+export interface LocalCollaborationSnapshot {
+ phase: LocalCollaborationPhase;
+ kind: LocalCollaborationKind;
+ received: number;
+ code: number;
+ reason: string;
+}
+
+/** Published by the SDK; a started service is not a completed transfer. */
+export class LocalCollaborationSession {
+ private generation: number = 0;
+ private pending: number = 0;
+ private ended: boolean = false;
+ private state: LocalCollaborationSnapshot = {
+ phase: 'ready', kind: 'photo', received: 0, code: 0, reason: ''
+ };
+ private readonly changed: (state: LocalCollaborationSnapshot) => void;
+ private readonly receiveImage: (data: ArrayBuffer, generation: number) => Promise;
+
+ constructor(changed: (state: LocalCollaborationSnapshot) => void,
+ receiveImage: (data: ArrayBuffer, generation: number) => Promise) {
+ this.changed = changed;
+ this.receiveImage = receiveImage;
+ }
+
+ static unavailableReason(api: number, deviceType: string, syscap: boolean): string {
+ if (!syscap) return 'missingSyscap';
+ // The first adapter uses the API 23 device filters on every form factor.
+ if (api < 23) return 'version';
+ if (!['phone', 'tablet', '2in1', 'tv', 'pc'].includes(deviceType)) return 'deviceType';
+ return '';
+ }
+
+ snapshot(): LocalCollaborationSnapshot {
+ return { phase: this.state.phase, kind: this.state.kind, received: this.state.received,
+ code: this.state.code, reason: this.state.reason };
+ }
+
+ begin(kind: LocalCollaborationKind, unavailable: string): boolean {
+ // One native receiver per mount. Retry remounts it so callbacks cannot cross requests.
+ if (this.state.phase !== 'ready') return false;
+ this.generation += 1;
+ this.state = { phase: unavailable ? 'unavailable' : 'selecting', kind, received: 0,
+ code: 0, reason: unavailable };
+ this.publish();
+ return !unavailable;
+ }
+
+ isCurrent(generation: number): boolean {
+ return generation === this.generation && this.accepting();
+ }
+
+ private accepting(): boolean {
+ return ['selecting', 'active', 'receiving'].includes(this.state.phase);
+ }
+
+ async accept(code: number, type: string, buffer: ArrayBuffer): Promise {
+ if (!this.accepting()) return;
+ this.state.code = code;
+ if (code === 1001202001 || code === 1001202003) {
+ this.finish('cancelled', code === 1001202001 ? 'peerCancelled' : 'localCancelled');
+ } else if (code === 1001202004) {
+ this.state.phase = 'active';
+ this.publish();
+ } else if (code === 1001202006) {
+ this.state.phase = 'receiving';
+ this.publish();
+ } else if (code === 1001202005) {
+ this.ended = true;
+ this.completeIfReady();
+ } else if (code === 0) {
+ // This first adapter asks for one image, and never accepts video URIs as image bytes.
+ if (type !== 'general.image' || !buffer || buffer.byteLength === 0) {
+ this.finish('failed', 'invalidImage');
+ return;
+ }
+ if (buffer.byteLength > 32 * 1024 * 1024 || this.pending + this.state.received >= 1) {
+ this.finish('failed', 'imageLimit');
+ return;
+ }
+ const generation = this.generation;
+ this.pending += 1;
+ this.state.phase = 'receiving';
+ this.publish();
+ try {
+ await this.receiveImage(buffer, generation);
+ if (!this.isCurrent(generation)) return;
+ this.pending -= 1;
+ this.state.received += 1;
+ this.publish();
+ this.completeIfReady();
+ } catch (_err) {
+ if (this.isCurrent(generation)) this.finish('failed', 'decodeFailed');
+ }
+ } else {
+ this.finish('failed', 'platformError');
+ }
+ }
+
+ close(): void {
+ if (this.state.phase === 'closed') return;
+ this.finish('closed', '');
+ }
+
+ private completeIfReady(): void {
+ if (!this.ended || this.pending > 0 || !this.accepting()) return;
+ this.finish(this.state.received > 0 ? 'completed' : 'failed', this.state.received > 0 ? '' : 'emptyResult');
+ }
+
+ private finish(phase: LocalCollaborationPhase, reason: string): void {
+ this.generation += 1;
+ this.state.phase = phase;
+ this.state.reason = reason;
+ this.publish();
+ }
+
+ private publish(): void { this.changed(this.snapshot()); }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIActionHost.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIActionHost.ets
new file mode 100644
index 0000000..05b178b
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIActionHost.ets
@@ -0,0 +1,166 @@
+import { LocalGenUIIds } from './LocalGenUIModels';
+import { LocalRuntimeInbound } from './LocalGenUIRuntimeProtocol';
+
+/**
+ * Capability registry for messages coming out of the Local GenUI runtime.
+ * The document never selects an execution target: the mounted app identity
+ * comes from the host, and only registered capabilities run.
+ */
+export interface LocalGenUICapabilityHandlers {
+ saveState: (appId: string, sourceRevision: number, baseStateRevision: number, stateJson: string) => Promise;
+ modelTurn: (appId: string, message: string) => Promise;
+ isTurnActive: () => boolean;
+ unsupported: (appId: string, capability: string, reason: string) => void;
+ /** Device capabilities; return '' when accepted or a refusal reason. */
+ subscribeGesture: (appId: string, subscriptionId: string, gesture: string) => string;
+ unsubscribeGesture: (subscriptionId: string) => void;
+ haptic: (kind: string) => void;
+ /** Calendar actions; return '' when accepted or a refusal reason. */
+ calendar: (appId: string, action: string, params: Object) => Promise;
+ collaboration?: (message: LocalRuntimeInbound) => string;
+}
+
+interface LocalCapabilityPolicy {
+ maxPayloadChars: number;
+ perMinute: number;
+}
+
+const STATE_SAVE: string = 'state.save';
+const MODEL_TURN: string = 'model.turn';
+const DEVICE_GESTURE: string = 'device.gesture';
+const DEVICE_HAPTIC: string = 'device.haptic';
+const CALENDAR_ACTIONS: string[] = [
+ 'CreateCalendarEvent',
+ 'UpdateCalendarEvent',
+ 'DeleteCalendarEvent',
+ 'ListCalendarEvents'
+];
+const CALENDAR: string = 'calendar.event';
+
+export class LocalGenUIActionHost {
+ private readonly handlers: LocalGenUICapabilityHandlers;
+ private readonly policies: Map = new Map();
+ private readonly usage: Map = new Map();
+ private readonly now: () => number;
+
+ constructor(handlers: LocalGenUICapabilityHandlers, now: () => number = () => Date.now()) {
+ this.handlers = handlers;
+ this.now = now;
+ this.policies.set(STATE_SAVE, { maxPayloadChars: 256 * 1024, perMinute: 240 });
+ this.policies.set(MODEL_TURN, { maxPayloadChars: 2000, perMinute: 6 });
+ this.policies.set(DEVICE_GESTURE, { maxPayloadChars: 64, perMinute: 30 });
+ this.policies.set(DEVICE_HAPTIC, { maxPayloadChars: 16, perMinute: 120 });
+ this.policies.set(CALENDAR, { maxPayloadChars: 16000, perMinute: 30 });
+ this.policies.set('device.collaboration', { maxPayloadChars: 1024, perMinute: 30 });
+ }
+
+ /** Returns a short diagnostic when the message was refused. */
+ async handle(message: LocalRuntimeInbound, mountedAppId: string, mountedSourceRevision: number): Promise {
+ const appId = message.appId || '';
+ if (!LocalGenUIIds.isLocal(appId) || appId !== mountedAppId) {
+ return 'message for an app that is not mounted';
+ }
+ if (message.type === 'state') {
+ const stateJson = JSON.stringify(message.state === undefined ? {} : message.state);
+ const refused = this.admit(appId, STATE_SAVE, stateJson.length);
+ if (refused.length > 0) {
+ return refused;
+ }
+ if (message.sourceRevision !== mountedSourceRevision || typeof message.baseStateRevision !== 'number') {
+ return 'state update for another source revision';
+ }
+ await this.handlers.saveState(appId, mountedSourceRevision, message.baseStateRevision, stateJson);
+ return '';
+ }
+ if (message.type === 'collaboration') {
+ if (message.sourceRevision !== mountedSourceRevision) return 'collaboration for another source revision';
+ if (!this.handlers.collaboration) return 'collaboration is unavailable';
+ if (message.op === 'cancel') return this.handlers.collaboration(message);
+ const refused = this.admit(appId, 'device.collaboration', JSON.stringify(message).length);
+ return refused || this.handlers.collaboration(message);
+ }
+ if (message.type === 'action') {
+ if (message.action === 'continue_conversation') {
+ const text = (message.message || '').trim();
+ if (text.length === 0) {
+ return 'empty model action';
+ }
+ const refused = this.admit(appId, MODEL_TURN, text.length);
+ if (refused.length > 0) {
+ this.handlers.unsupported(appId, MODEL_TURN, refused);
+ return refused;
+ }
+ if (this.handlers.isTurnActive()) {
+ this.handlers.unsupported(appId, MODEL_TURN, 'a local turn is already running');
+ return 'a local turn is already running';
+ }
+ await this.handlers.modelTurn(appId, text);
+ return '';
+ }
+ if (message.sourceRevision !== mountedSourceRevision) return 'action for another source revision';
+ if (CALENDAR_ACTIONS.indexOf(message.action || '') >= 0) {
+ const params: Object = message.params || (JSON.parse('{}') as Object);
+ const refused = this.admit(appId, CALENDAR, JSON.stringify(params).length);
+ if (refused.length > 0) {
+ this.handlers.unsupported(appId, message.action || CALENDAR, refused);
+ return refused;
+ }
+ const result = await this.handlers.calendar(appId, message.action || '', params);
+ if (result.length > 0) {
+ this.handlers.unsupported(appId, message.action || CALENDAR, result);
+ }
+ return result;
+ }
+ const name = message.action || 'unknown';
+ this.handlers.unsupported(appId, name, 'not a local phase 1 capability');
+ return `unsupported action ${name}`;
+ }
+ if (message.type === 'capability') {
+ const subscriptionId = message.subscriptionId || '';
+ if (subscriptionId.length === 0 || subscriptionId.length > 64) {
+ return 'invalid capability subscription';
+ }
+ if (message.op === 'unsubscribe') {
+ this.handlers.unsubscribeGesture(subscriptionId);
+ return '';
+ }
+ const gesture = message.gesture || '';
+ const refused = this.admit(appId, DEVICE_GESTURE, gesture.length);
+ return refused.length > 0 ? refused : this.handlers.subscribeGesture(appId, subscriptionId, gesture);
+ }
+ if (message.type === 'haptic') {
+ const kind = message.kind || '';
+ const refused = this.admit(appId, DEVICE_HAPTIC, kind.length);
+ if (refused.length === 0) {
+ this.handlers.haptic(kind);
+ }
+ return refused;
+ }
+ if (message.type === 'query') {
+ const name = message.capability || 'query';
+ this.handlers.unsupported(appId, name, 'not a local phase 1 capability');
+ return `unsupported query ${name}`;
+ }
+ return '';
+ }
+
+ private admit(appId: string, capability: string, payloadChars: number): string {
+ const policy = this.policies.get(capability);
+ if (!policy) {
+ return `capability ${capability} is not registered`;
+ }
+ if (payloadChars > policy.maxPayloadChars) {
+ return `${capability} payload exceeds ${policy.maxPayloadChars} characters`;
+ }
+ const key = `${appId}|${capability}`;
+ const now = this.now();
+ const recent = (this.usage.get(key) || []).filter((at: number) => now - at < 60000);
+ if (recent.length >= policy.perMinute) {
+ this.usage.set(key, recent);
+ return `${capability} quota of ${policy.perMinute} per minute reached`;
+ }
+ recent.push(now);
+ this.usage.set(key, recent);
+ return '';
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICalendarActions.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICalendarActions.ets
new file mode 100644
index 0000000..2648a66
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICalendarActions.ets
@@ -0,0 +1,39 @@
+export interface LocalGenUICalendarReceiptPort {
+ calendarReceipts(appId: string): Promise;
+ saveCalendarReceipt(appId: string, paramsJson: string): Promise;
+}
+
+/** Successful creates belong to the app and event payload, not a button position. */
+export class LocalGenUICalendarActions {
+ private readonly pending: Map> = new Map>();
+ private readonly completed: Set = new Set();
+ private readonly receipts: LocalGenUICalendarReceiptPort;
+ constructor(receipts: LocalGenUICalendarReceiptPort) {
+ this.receipts = receipts;
+ }
+
+ create(appId: string, params: Object, execute: () => Promise): Promise {
+ const payload = JSON.stringify(params);
+ const key = JSON.stringify([appId, payload]);
+ const existing = this.pending.get(key);
+ if (existing) return existing;
+ const request = this.run(appId, payload, key, execute);
+ this.pending.set(key, request);
+ void request.finally(() => { this.pending.delete(key); });
+ return request;
+ }
+
+ private async run(appId: string, payload: string, key: string, execute: () => Promise): Promise {
+ try {
+ if (this.completed.has(key) || (await this.receipts.calendarReceipts(appId)).indexOf(payload) >= 0) return '';
+ const error = await execute();
+ if (error.length > 0) return error;
+ // Keep the in-process receipt even if durable storage fails after the OS created the event.
+ this.completed.add(key);
+ await this.receipts.saveCalendarReceipt(appId, payload);
+ return '';
+ } catch (error) {
+ return String(error);
+ }
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationAssets.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationAssets.ets
new file mode 100644
index 0000000..a55ed22
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationAssets.ets
@@ -0,0 +1,71 @@
+import { fileIo as fs } from '@kit.CoreFileKit';
+import { util } from '@kit.ArkTS';
+import { LocalGenUIIds } from './LocalGenUIModels';
+
+export const LOCAL_GENUI_COLLABORATION_ROOT: string = 'https://genui-assets.openbitfun.invalid/collaboration/';
+const MAX_BYTES: number = 2 * 1024 * 1024;
+
+/** User media, isolated by generated app. Never treated as a disposable icon cache. */
+export class LocalGenUICollaborationAssets {
+ private readonly root: string;
+ constructor(filesDir: string) { this.root = `${filesDir}/local-genui/collaboration`; }
+
+ static prefix(appId: string): string {
+ LocalGenUIIds.require(appId, 'app');
+ return `${LOCAL_GENUI_COLLABORATION_ROOT}${encodeURIComponent(appId)}/`;
+ }
+
+ static fileName(appId: string, url: string): string {
+ const prefix = LocalGenUICollaborationAssets.prefix(appId);
+ if (!url.startsWith(prefix)) return '';
+ const name = url.substring(prefix.length);
+ return /^[a-f0-9]{32}\.jpg$/.test(name) ? name : '';
+ }
+
+ private directory(appId: string): string {
+ LocalGenUIIds.require(appId, 'app');
+ return `${this.root}/${encodeURIComponent(appId)}`;
+ }
+
+ async save(appId: string, bytes: ArrayBuffer): Promise {
+ if (bytes.byteLength === 0 || bytes.byteLength > MAX_BYTES) throw new Error('collaboration image size unsupported');
+ const dir = this.directory(appId);
+ if (!await fs.access(dir)) await fs.mkdir(dir, true);
+ const name = `${util.generateRandomUUID(false).replace(/-/g, '')}.jpg`;
+ const path = `${dir}/${name}`;
+ const temporary = `${path}.tmp`;
+ const file = await fs.open(temporary, fs.OpenMode.CREATE | fs.OpenMode.WRITE_ONLY | fs.OpenMode.TRUNC);
+ try {
+ const count = await fs.write(file.fd, bytes);
+ if (count !== bytes.byteLength) throw new Error('incomplete collaboration image write');
+ } catch (err) {
+ await fs.close(file);
+ try { await fs.unlink(temporary); } catch (_ignored) { /* incomplete new file only */ }
+ throw new Error(`collaboration image write failed: ${String(err)}`);
+ }
+ await fs.close(file);
+ await fs.rename(temporary, path);
+ return LocalGenUICollaborationAssets.prefix(appId) + name;
+ }
+
+ async picture(appId: string, url: string): Promise {
+ const name = LocalGenUICollaborationAssets.fileName(appId, url);
+ if (!name) return undefined;
+ try {
+ const file = await fs.open(`${this.directory(appId)}/${name}`, fs.OpenMode.READ_ONLY);
+ try {
+ const size = (await fs.stat(file.fd)).size;
+ if (size <= 0 || size > MAX_BYTES) return undefined;
+ const bytes = new ArrayBuffer(size);
+ return await fs.read(file.fd, bytes) === size ? bytes : undefined;
+ } finally { await fs.close(file); }
+ } catch (_err) { return undefined; }
+ }
+
+ /** Only discard a newly received file whose owning request was abandoned. */
+ async discard(appId: string, url: string): Promise {
+ const name = LocalGenUICollaborationAssets.fileName(appId, url);
+ if (!name) return;
+ try { await fs.unlink(`${this.directory(appId)}/${name}`); } catch (_err) { /* retain on failure */ }
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationHost.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationHost.ets
new file mode 100644
index 0000000..4b963d7
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUICollaborationHost.ets
@@ -0,0 +1,126 @@
+import { LocalCollaborationKind, LocalCollaborationSnapshot } from './LocalCollaborationSession';
+import { LocalRuntimeInbound } from './LocalGenUIRuntimeProtocol';
+
+export interface LocalCollaborationRequest {
+ appId: string;
+ sourceRevision: number;
+ requestId: string;
+ token: number;
+ kind: LocalCollaborationKind;
+}
+export interface LocalCollaborationReply {
+ type: string;
+ appId: string;
+ sourceRevision: number;
+ requestId: string;
+ status: string;
+ reason: string;
+ asset: string;
+}
+export interface LocalCollaborationOwner { appId: string; sourceRevision: number; live: boolean; }
+export interface LocalCollaborationHostPorts {
+ owner: () => LocalCollaborationOwner;
+ unavailable: () => string;
+ changed: (request: LocalCollaborationRequest | undefined) => void;
+ send: (reply: LocalCollaborationReply) => void;
+ save: (appId: string, data: ArrayBuffer) => Promise;
+ discard: (appId: string, asset: string) => Promise;
+}
+
+/** One native picker, bound to an accepted app/source revision and a request token. */
+export class LocalGenUICollaborationHost {
+ private active?: LocalCollaborationRequest;
+ private serial: number = 0;
+ private visible: boolean = false;
+ private asset: string = '';
+ private receiving: boolean = false;
+ private readonly ports: LocalCollaborationHostPorts;
+ constructor(ports: LocalCollaborationHostPorts) { this.ports = ports; }
+
+ setVisible(visible: boolean): void {
+ this.visible = visible;
+ if (!visible) this.close();
+ }
+
+ invalidate(appId: string, sourceRevision: number, streaming: boolean): void {
+ if (this.active && (streaming || this.active.appId !== appId || this.active.sourceRevision !== sourceRevision)) this.close();
+ }
+
+ handle(message: LocalRuntimeInbound): string {
+ const owner = this.ports.owner();
+ if (!owner.live || message.appId !== owner.appId || message.sourceRevision !== owner.sourceRevision) return 'stale collaboration owner';
+ if (!message.requestId || !/^[a-zA-Z0-9_-]{1,64}$/.test(message.requestId)) return 'invalid collaboration request';
+ if (message.op === 'cancel') {
+ if (this.active?.requestId === message.requestId) this.close();
+ return '';
+ }
+ if (message.op !== 'start' || !['photo', 'scan', 'gallery'].includes(message.kind || '')) return 'invalid collaboration operation';
+ if (this.active && !this.current(this.active)) this.close();
+ const request: LocalCollaborationRequest = { appId: owner.appId, sourceRevision: owner.sourceRevision,
+ requestId: message.requestId, token: ++this.serial, kind: message.kind as LocalCollaborationKind };
+ if (this.active) {
+ if (this.active.requestId !== request.requestId) this.reply(request, 'failed', 'busy');
+ return '';
+ }
+ const unavailable = this.ports.unavailable();
+ if (!this.visible || unavailable) {
+ this.reply(request, 'unavailable', unavailable || 'notVisible');
+ return '';
+ }
+ this.active = request;
+ this.asset = '';
+ this.receiving = false;
+ this.reply(request, 'pending', '');
+ this.ports.changed(request);
+ return '';
+ }
+
+ async receive(token: number, data: ArrayBuffer): Promise {
+ const request = this.active;
+ if (!request || request.token !== token || !this.current(request) || this.receiving || this.asset) throw new Error('inactive collaboration receiver');
+ this.receiving = true;
+ const asset = await this.ports.save(request.appId, data);
+ if (!this.current(request)) {
+ await this.ports.discard(request.appId, asset);
+ throw new Error('collaboration request closed while saving');
+ }
+ this.asset = asset;
+ }
+
+ result(token: number, snapshot: LocalCollaborationSnapshot): void {
+ const request = this.active;
+ if (!request || request.token !== token || !this.current(request)) return;
+ if (snapshot.phase === 'completed') {
+ const asset = this.asset;
+ this.asset = '';
+ this.reply(request, asset ? 'completed' : 'failed', asset ? '' : 'emptyResult', asset);
+ this.clear();
+ } else if (['cancelled', 'closed', 'failed', 'unavailable'].includes(snapshot.phase)) {
+ this.reply(request, snapshot.phase === 'closed' ? 'cancelled' : snapshot.phase, snapshot.reason);
+ this.clear();
+ }
+ }
+
+ close(token?: number): void {
+ if (!this.active || (token !== undefined && token !== this.active.token)) return;
+ this.reply(this.active, 'cancelled', 'localCancelled');
+ this.clear();
+ }
+
+ private current(request: LocalCollaborationRequest): boolean {
+ const owner = this.ports.owner();
+ return this.visible && this.active?.token === request.token && owner.live && owner.appId === request.appId && owner.sourceRevision === request.sourceRevision;
+ }
+ private clear(): void {
+ const request = this.active;
+ const asset = this.asset;
+ this.active = undefined;
+ this.asset = '';
+ if (request && asset) void this.ports.discard(request.appId, asset);
+ this.ports.changed(undefined);
+ }
+ private reply(request: LocalCollaborationRequest, status: string, reason: string, asset: string = ''): void {
+ this.ports.send({ type: 'collaboration_result', appId: request.appId, sourceRevision: request.sourceRevision,
+ requestId: request.requestId, status, reason, asset });
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIContract.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIContract.ets
new file mode 100644
index 0000000..8d1ae6c
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIContract.ets
@@ -0,0 +1,71 @@
+import { util } from '@kit.ArkTS';
+import { OhosError } from '../OhosError';
+import { LocalGenUIManifest } from './LocalGenUIModels';
+import { LocalCanvasSpec } from './LocalGenUIRuntimeProtocol';
+
+/** Generated Local GenUI contract read from HAP rawfile. Never hand-written. */
+export interface LocalGenUIContract {
+ manifest: LocalGenUIManifest;
+ prompt: string;
+ /** Raw JSON of `{ name, description, input_schema }`. */
+ toolSchemaJson: string;
+ /** Acceptance checks required by the pinned design specification. */
+ requiredChecks: string[];
+ canvas: LocalCanvasSpec;
+}
+
+interface LocalCatalogInsets {
+ left?: number;
+ right?: number;
+}
+
+interface LocalCatalogShell {
+ contentInsets?: LocalCatalogInsets;
+}
+
+interface LocalCatalogViewport {
+ width?: number;
+}
+
+interface LocalCatalogDesignSpec {
+ acceptance?: LocalCatalogAcceptance;
+ viewport?: LocalCatalogViewport;
+ shell?: LocalCatalogShell;
+}
+
+interface LocalCatalogAcceptance {
+ checks?: string[];
+}
+
+interface LocalCatalog {
+ designSpec?: LocalCatalogDesignSpec;
+}
+
+export class LocalGenUIContractLoader {
+ static async load(context: Context): Promise {
+ try {
+ const manifest = JSON.parse(await LocalGenUIContractLoader.read(context, 'genui/runtime-manifest.json')) as LocalGenUIManifest;
+ const catalog = JSON.parse(await LocalGenUIContractLoader.read(context, 'genui/catalog.json')) as LocalCatalog;
+ const prompt = await LocalGenUIContractLoader.read(context, 'genui/harmony-prompt.txt');
+ const toolSchemaJson = await LocalGenUIContractLoader.read(context, 'genui/local-tool-schema.json');
+ const checks = catalog.designSpec && catalog.designSpec.acceptance && catalog.designSpec.acceptance.checks
+ ? catalog.designSpec.acceptance.checks : [];
+ const spec = catalog.designSpec;
+ const width = spec && spec.viewport && spec.viewport.width ? spec.viewport.width : 0;
+ const insets = spec && spec.shell && spec.shell.contentInsets ? spec.shell.contentInsets : undefined;
+ if (!manifest.libraryId || !manifest.catalogHash || prompt.length === 0 || checks.length === 0 || width <= 0 || !insets) {
+ throw new Error('generated Local GenUI contract is incomplete');
+ }
+ const canvas: LocalCanvasSpec = { width, insetLeft: insets.left || 0, insetRight: insets.right || 0 };
+ return { manifest, prompt, toolSchemaJson, requiredChecks: checks, canvas };
+ } catch (err) {
+ throw OhosError.wrap('local genui contract load', err);
+ }
+ }
+
+ private static async read(context: Context, path: string): Promise {
+ const bytes = await context.resourceManager.getRawFileContent(path);
+ const decoder = util.TextDecoder.create('utf-8', { ignoreBOM: true });
+ return decoder.decodeToString(bytes);
+ }
+}
diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIDesktopCardStore.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIDesktopCardStore.ets
new file mode 100644
index 0000000..c7841d1
--- /dev/null
+++ b/src/apps/mobile/harmonyos/entry/src/main/ets/services/local-genui/LocalGenUIDesktopCardStore.ets
@@ -0,0 +1,250 @@
+import { BusinessError } from '@kit.BasicServicesKit';
+import { fileIo as fs } from '@kit.CoreFileKit';
+import { formBindingData, formProvider } from '@kit.FormKit';
+import {
+ LocalGenUIDesktopCardApp,
+ LocalGenUIDesktopCardBinding,
+ LocalGenUIDesktopCardData,
+ LocalGenUIDesktopCards
+} from './LocalGenUIDesktopCards';
+
+const FORM_NOT_EXIST: number = 16501001;
+/**
+ * How long an "Add to desktop" menu stays claimable by the next new card. The
+ * launcher adds the card within seconds of the tap; a short window keeps a
+ * card added later from the system widget picker from taking the app.
+ */
+const PENDING_ADD_TTL_MS: number = 60000;
+
+interface LocalGenUIDesktopCardPendingAdd {
+ appId: string;
+ stagedAt: number;
+}
+
+/**
+ * Desktop card state shared by the UI process and the card host process
+ * (`LocalGenUIFormAbility`). Both run in the same app sandbox, so the state is
+ * small JSON files under `filesDir` instead of the RDB the UI process owns:
+ *
+ * - `bindings/