@tuya-sat/microapp-kit 0.0.0-stage → 0.1.26-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUDIT.md +43 -0
- package/CHANGELOG.md +53 -0
- package/MAINTAINING.md +178 -0
- package/README.md +53 -2
- package/START-HERE.md +44 -0
- package/bootstrap/build-install-page.mjs +46 -0
- package/bootstrap/install-node.ps1 +80 -0
- package/bootstrap/install-node.sh +94 -0
- package/bootstrap/install.md.in +29 -0
- package/bundle.json +852 -0
- package/cli.mjs +3 -0
- package/package.json +68 -4
- package/resources/contracts/project-permissions.json +596 -0
- package/resources/contracts/standard-api.catalog.json +5 -0
- package/resources/examples/group-display.mjs +23 -0
- package/resources/preview/README.md +104 -0
- package/resources/preview/agent-open.mjs +1221 -0
- package/resources/preview/application-icon.mjs +27 -0
- package/resources/preview/authorization-panel.js +243 -0
- package/resources/preview/authorization-routes.mjs +634 -0
- package/resources/preview/authorization.mjs +353 -0
- package/resources/preview/backend-entry.mjs +22 -0
- package/resources/preview/backend-process.mjs +26 -0
- package/resources/preview/bridge.js +50 -0
- package/resources/preview/control.mjs +48 -0
- package/resources/preview/device-fixtures.mjs +38 -0
- package/resources/preview/fixtures/context.json +10 -0
- package/resources/preview/fixtures/device-catalog.json +363 -0
- package/resources/preview/host-contract.mjs +104 -0
- package/resources/preview/host.js +841 -0
- package/resources/preview/local-dev-provider.mjs +27 -0
- package/resources/preview/menu-icons.json +82 -0
- package/resources/preview/mock-store.mjs +1147 -0
- package/resources/preview/run.mjs +131 -0
- package/resources/preview/server.mjs +476 -0
- package/resources/preview/theme-tokens.mjs +49 -0
- package/resources/preview/themes.json +1036 -0
- package/resources/resource-manifest.json +210 -0
- package/resources/scripts/backend-build-context.mjs +101 -0
- package/resources/scripts/backend-runtime.mjs +68 -0
- package/resources/scripts/build-backend-image.sh +23 -0
- package/resources/scripts/build-safety.mjs +18 -0
- package/resources/scripts/build.mjs +138 -0
- package/resources/scripts/command-invocation.mjs +10 -0
- package/resources/scripts/diagnostics.mjs +34 -0
- package/resources/scripts/init-project.mjs +62 -0
- package/resources/scripts/package-release.mjs +80 -0
- package/resources/scripts/prepare-locales.mjs +77 -0
- package/resources/scripts/project-identity.mjs +21 -0
- package/resources/scripts/registry-client.mjs +189 -0
- package/resources/scripts/resource-files.mjs +22 -0
- package/resources/scripts/scaffold.mjs +31 -0
- package/resources/scripts/test-backend-image.mjs +162 -0
- package/resources/scripts/update-preview-themes.mjs +26 -0
- package/resources/scripts/update-resource-manifest.mjs +9 -0
- package/resources/scripts/validate-resources.mjs +9 -0
- package/resources/template/_gitignore +5 -0
- package/resources/template/backend/.dockerignore +7 -0
- package/resources/template/backend/.node-version +1 -0
- package/resources/template/backend/Dockerfile +62 -0
- package/resources/template/backend/deploy/README.md +105 -0
- package/resources/template/backend/deploy/data/README.md +3 -0
- package/resources/template/backend/deploy/manifest.json +4 -0
- package/resources/template/backend/deploy/tasks/README.md +3 -0
- package/resources/template/backend/migrations/README.md +5 -0
- package/resources/template/backend/next-env.d.ts +6 -0
- package/resources/template/backend/next.config.ts +19 -0
- package/resources/template/backend/operations.json +4 -0
- package/resources/template/backend/package.json +35 -0
- package/resources/template/backend/pnpm-lock.yaml +775 -0
- package/resources/template/backend/preview-contract.json +4 -0
- package/resources/template/backend/public/.keep +0 -0
- package/resources/template/backend/scripts/check-runtime.mjs +12 -0
- package/resources/template/backend/scripts/dev-deploy-prepare.mjs +362 -0
- package/resources/template/backend/scripts/dev-diagnose-database.mjs +199 -0
- package/resources/template/backend/scripts/dev-start-backend.sh +30 -0
- package/resources/template/backend/src/app/[[...path]]/route.ts +11 -0
- package/resources/template/backend/src/app/api/[...path]/route.ts +11 -0
- package/resources/template/backend/src/app/api/health/route.ts +16 -0
- package/resources/template/backend/src/app/api/preview/context/route.ts +36 -0
- package/resources/template/backend/src/instrumentation.ts +10 -0
- package/resources/template/backend/src/lib/api-response.mjs +119 -0
- package/resources/template/backend/src/lib/business-logger.mjs +29 -0
- package/resources/template/backend/src/lib/database-errors.mjs +15 -0
- package/resources/template/backend/src/lib/dev-authorization.mjs +84 -0
- package/resources/template/backend/src/lib/dev-context.mjs +58 -0
- package/resources/template/backend/src/lib/gateway-ingress.mjs +79 -0
- package/resources/template/backend/src/lib/gateway-nonce-store.mjs +31 -0
- package/resources/template/backend/src/lib/gateway-verification.mjs +197 -0
- package/resources/template/backend/src/lib/request-observability.mjs +93 -0
- package/resources/template/backend/src/lib/standard-api.ts +28 -0
- package/resources/template/backend/src/microapp-identity.json +1 -0
- package/resources/template/backend/src/proxy.ts +40 -0
- package/resources/template/backend/tests/api-response.test.mjs +77 -0
- package/resources/template/backend/tests/database-diagnostics.test.mjs +198 -0
- package/resources/template/backend/tests/deployment-connection.test.mjs +100 -0
- package/resources/template/backend/tests/deployment-postgres.test.mjs +109 -0
- package/resources/template/backend/tests/deployment.test.mjs +196 -0
- package/resources/template/backend/tests/dev-authorization.test.mjs +88 -0
- package/resources/template/backend/tests/dev-context.test.mjs +35 -0
- package/resources/template/backend/tests/gateway-verification.test.mjs +287 -0
- package/resources/template/backend/tests/request-observability.test.mjs +125 -0
- package/resources/template/backend/tests/routes.test.mjs +253 -0
- package/resources/template/backend/tests/startup.test.mjs +147 -0
- package/resources/template/backend/tsconfig.json +34 -0
- package/resources/template/micro-app/.editorconfig +15 -0
- package/resources/template/micro-app/.eslintrc +15 -0
- package/resources/template/micro-app/.prettierignore +4 -0
- package/resources/template/micro-app/.prettierrc +6 -0
- package/resources/template/micro-app/_gitignore +6 -0
- package/resources/template/micro-app/_locales/en.json +5 -0
- package/resources/template/micro-app/_locales/zh-CN.json +5 -0
- package/resources/template/micro-app/antd.less.overwrite.js +4 -0
- package/resources/template/micro-app/babel.config.json +3 -0
- package/resources/template/micro-app/manifest.json +46 -0
- package/resources/template/micro-app/micro.config.js +4 -0
- package/resources/template/micro-app/mock/index.json +4 -0
- package/resources/template/micro-app/package.json +61 -0
- package/resources/template/micro-app/public/favicon.ico +0 -0
- package/resources/template/micro-app/public/index.ejs +13 -0
- package/resources/template/micro-app/src/App.less +0 -0
- package/resources/template/micro-app/src/App.tsx +99 -0
- package/resources/template/micro-app/src/api/api-request.mjs +85 -0
- package/resources/template/micro-app/src/api/custom-api-headers.mjs +55 -0
- package/resources/template/micro-app/src/api/custom-api.ts +10 -0
- package/resources/template/micro-app/src/api/errors.mjs +108 -0
- package/resources/template/micro-app/src/api/index.ts +34 -0
- package/resources/template/micro-app/src/api/presentation.mjs +33 -0
- package/resources/template/micro-app/src/api/req.ts +9 -0
- package/resources/template/micro-app/src/api/request-url.mjs +20 -0
- package/resources/template/micro-app/src/api/res.ts +9 -0
- package/resources/template/micro-app/src/api/submission-errors.mjs +84 -0
- package/resources/template/micro-app/src/components/CapsuleFilters/index.module.less +121 -0
- package/resources/template/micro-app/src/components/CapsuleFilters/index.tsx +100 -0
- package/resources/template/micro-app/src/components/MicroAppUI/DataTable.tsx +48 -0
- package/resources/template/micro-app/src/components/MicroAppUI/EllipsisText.tsx +25 -0
- package/resources/template/micro-app/src/components/MicroAppUI/Layouts.tsx +54 -0
- package/resources/template/micro-app/src/components/MicroAppUI/ModalForm.tsx +230 -0
- package/resources/template/micro-app/src/components/MicroAppUI/StatusBadge.tsx +19 -0
- package/resources/template/micro-app/src/components/MicroAppUI/index.module.less +99 -0
- package/resources/template/micro-app/src/components/MicroAppUI/index.ts +13 -0
- package/resources/template/micro-app/src/index.css +16 -0
- package/resources/template/micro-app/src/index.tsx +66 -0
- package/resources/template/micro-app/src/interfaces.ts +545 -0
- package/resources/template/micro-app/src/lang/en.ts +1 -0
- package/resources/template/micro-app/src/lang/index.ts +31 -0
- package/resources/template/micro-app/src/lang/zh.ts +1 -0
- package/resources/template/micro-app/src/language-codes.mjs +32 -0
- package/resources/template/micro-app/src/language-policy.ts +6 -0
- package/resources/template/micro-app/src/microapp-identity.json +1 -0
- package/resources/template/micro-app/src/pages/index.module.less +3 -0
- package/resources/template/micro-app/src/pages/index.tsx +6 -0
- package/resources/template/micro-app/src/public-path.js +4 -0
- package/resources/template/micro-app/src/utils/antdLang.ts +244 -0
- package/resources/template/micro-app/tests/template.test.cjs +15 -0
- package/resources/template/micro-app/tsconfig.extend.json +8 -0
- package/resources/template/micro-app/tsconfig.json +24 -0
- package/resources/template/micro-app/typings.d.ts +19 -0
- package/resources/template/micro-app/yarn.lock +7491 -0
- package/resources/tests/agent-open-catalog.test.mjs +43 -0
- package/resources/tests/agent-open-preview.test.mjs +878 -0
- package/resources/tests/api-request.test.mjs +121 -0
- package/resources/tests/api-response.test.mjs +2 -0
- package/resources/tests/application-icon-build.test.mjs +34 -0
- package/resources/tests/authorization-proxy.test.mjs +202 -0
- package/resources/tests/authorization.test.mjs +462 -0
- package/resources/tests/backend-context.test.mjs +33 -0
- package/resources/tests/backend-preview.test.mjs +67 -0
- package/resources/tests/backend-request-logging.test.mjs +2 -0
- package/resources/tests/backend-runtime.test.mjs +96 -0
- package/resources/tests/browser-authorization-smoke.mjs +111 -0
- package/resources/tests/browser-design-smoke.mjs +107 -0
- package/resources/tests/browser-language-compat-smoke.mjs +48 -0
- package/resources/tests/browser-preview-smoke.mjs +148 -0
- package/resources/tests/browser-standard-ui-smoke.mjs +331 -0
- package/resources/tests/build-safety.test.mjs +69 -0
- package/resources/tests/business-build.test.mjs +86 -0
- package/resources/tests/command-invocation.test.mjs +35 -0
- package/resources/tests/custom-api-headers.test.mjs +96 -0
- package/resources/tests/custom-route.test.mjs +63 -0
- package/resources/tests/custom-script-policy.test.mjs +34 -0
- package/resources/tests/database-errors.test.mjs +81 -0
- package/resources/tests/deployment-package.test.mjs +45 -0
- package/resources/tests/dockerfile-logging.test.mjs +31 -0
- package/resources/tests/fixtures/capsule-page.tsx +46 -0
- package/resources/tests/fixtures/standard-ui-page.tsx +222 -0
- package/resources/tests/group-display.test.mjs +28 -0
- package/resources/tests/host-contract.test.mjs +84 -0
- package/resources/tests/image-test.test.mjs +110 -0
- package/resources/tests/initialization.test.mjs +98 -0
- package/resources/tests/language-selection.test.mjs +188 -0
- package/resources/tests/locale-keys.test.mjs +88 -0
- package/resources/tests/preview-control.test.mjs +56 -0
- package/resources/tests/preview-icon.test.mjs +117 -0
- package/resources/tests/preview-state.test.mjs +183 -0
- package/resources/tests/preview-theme.test.mjs +17 -0
- package/resources/tests/real-preview-smoke.mjs +34 -0
- package/resources/tests/registry-client.test.mjs +272 -0
- package/resources/tests/request-errors.test.mjs +51 -0
- package/resources/tests/request-method-contract.test.mjs +65 -0
- package/resources/tests/resources.test.mjs +31 -0
- package/resources/tests/saas-presentation.test.mjs +41 -0
- package/resources/tests/sandbox-scripts.test.mjs +144 -0
- package/resources/tests/space-permission-guidance.test.mjs +78 -0
- package/resources/tests/standard-api-preview.test.mjs +55 -0
- package/resources/tests/submission-errors.test.mjs +118 -0
- package/resources/tests/version-description-package.test.mjs +60 -0
- package/resources/ui/component-sources.json +36 -0
- package/runtime/assemble.mjs +66 -0
- package/runtime/auth/hidden-input.mjs +45 -0
- package/runtime/auth/macos-credentials.js +41 -0
- package/runtime/auth/manager.mjs +145 -0
- package/runtime/auth/session.mjs +153 -0
- package/runtime/auth/state.mjs +107 -0
- package/runtime/auth/store.mjs +130 -0
- package/runtime/auth/windows-credentials.ps1 +73 -0
- package/runtime/auth/wizard.mjs +224 -0
- package/runtime/cli.mjs +474 -0
- package/runtime/dev-database.mjs +155 -0
- package/runtime/dev-provider.mjs +41 -0
- package/runtime/errors.mjs +205 -0
- package/runtime/install-receipt.mjs +68 -0
- package/runtime/installation.mjs +92 -0
- package/runtime/integrity.mjs +121 -0
- package/runtime/launcher.mjs +104 -0
- package/runtime/pack-npm.mjs +76 -0
- package/runtime/package-cache.mjs +52 -0
- package/runtime/package-identity.mjs +22 -0
- package/runtime/preview.mjs +157 -0
- package/runtime/project-identity.mjs +57 -0
- package/runtime/publication.mjs +372 -0
- package/runtime/release-content.mjs +159 -0
- package/runtime/release-index.mjs +91 -0
- package/runtime/setup.mjs +223 -0
- package/runtime/tests/agent-entry.test.mjs +79 -0
- package/runtime/tests/auth-wizard.test.mjs +241 -0
- package/runtime/tests/auth.test.mjs +367 -0
- package/runtime/tests/consistency-workflow.test.mjs +84 -0
- package/runtime/tests/dev-provider.test.mjs +27 -0
- package/runtime/tests/diagnostics.test.mjs +66 -0
- package/runtime/tests/helpers/tar-fixture.mjs +25 -0
- package/runtime/tests/install-page.test.mjs +83 -0
- package/runtime/tests/install.test.mjs +432 -0
- package/runtime/tests/node-bootstrap.test.mjs +104 -0
- package/runtime/tests/npm-distribution.test.mjs +130 -0
- package/runtime/tests/npm-release-check.test.mjs +48 -0
- package/runtime/tests/package-cache.test.mjs +108 -0
- package/runtime/tests/package-migration.test.mjs +208 -0
- package/runtime/tests/preview-hosts.test.mjs +66 -0
- package/runtime/tests/preview.test.mjs +304 -0
- package/runtime/tests/project-identity.test.mjs +67 -0
- package/runtime/tests/publication.test.mjs +436 -0
- package/runtime/tests/release-recovery.test.mjs +417 -0
- package/runtime/tests/repository-source.test.mjs +69 -0
- package/runtime/tests/skill-set-update.test.mjs +169 -0
- package/runtime/tests/standalone.test.mjs +46 -0
- package/runtime/tests/update-check.test.mjs +165 -0
- package/runtime/tests/update.test.mjs +292 -0
- package/runtime/tests/workspace.test.mjs +156 -0
- package/runtime/update-check.mjs +160 -0
- package/runtime/update-state.mjs +83 -0
- package/runtime/update.mjs +292 -0
- package/runtime/verify-npm-release.mjs +43 -0
- package/runtime/workspace-migration.mjs +109 -0
- package/runtime/workspace.mjs +101 -0
- package/schemas/toolchain.schema.json +13 -0
- package/setup.mjs +3 -0
- package/skills/micro-app-backend-development/SKILL.md +64 -0
- package/skills/micro-app-backend-development/references/backend-security-workflow.md +77 -0
- package/skills/micro-app-backend-development/references/business-build-helpers.md +11 -0
- package/skills/micro-app-backend-development/references/business-logging.md +56 -0
- package/skills/micro-app-backend-development/references/database-constraints.md +81 -0
- package/skills/micro-app-backend-development/references/database-write-errors.md +29 -0
- package/skills/micro-app-backend-development/references/deployment-bundle.md +65 -0
- package/skills/micro-app-backend-development/references/dev-preview-context.md +23 -0
- package/skills/micro-app-backend-development/references/gateway-verification.md +43 -0
- package/skills/micro-app-backend-development/references/implementation.md +49 -0
- package/skills/micro-app-backend-development/references/local-database-preview.md +100 -0
- package/skills/micro-app-backend-development/references/production-authorization-readiness.md +60 -0
- package/skills/micro-app-backend-development/references/project-data-permissions.md +43 -0
- package/skills/micro-app-backend-development/references/runtime-resources-and-deployment.md +76 -0
- package/skills/micro-app-backend-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-backend-development/tests/behavior-scenarios.md +62 -0
- package/skills/micro-app-cloud-integration/SKILL.md +92 -0
- package/skills/micro-app-cloud-integration/references/api-catalog.json +1315 -0
- package/skills/micro-app-cloud-integration/references/api-catalog.md +59 -0
- package/skills/micro-app-cloud-integration/references/api-device-control.md +67 -0
- package/skills/micro-app-cloud-integration/references/api-device.md +179 -0
- package/skills/micro-app-cloud-integration/references/api-group-ota.md +145 -0
- package/skills/micro-app-cloud-integration/references/api-linkage.md +3 -0
- package/skills/micro-app-cloud-integration/references/api-models.md +584 -0
- package/skills/micro-app-cloud-integration/references/api-project.md +121 -0
- package/skills/micro-app-cloud-integration/references/api-space-home.md +244 -0
- package/skills/micro-app-cloud-integration/references/backend-authorization.md +95 -0
- package/skills/micro-app-cloud-integration/references/calling-conventions.md +118 -0
- package/skills/micro-app-cloud-integration/references/preview-agent-open.md +46 -0
- package/skills/micro-app-cloud-integration/references/server-to-server-integration.md +13 -0
- package/skills/micro-app-cloud-integration/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-cloud-integration/tests/behavior-scenarios.md +20 -0
- package/skills/micro-app-design/SKILL.md +99 -0
- package/skills/micro-app-design/agents/openai.yaml +6 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/README.md +22 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaCapsuleSearch.html +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaCardGrid.html +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaIcon.html +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaPageTitle.html +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaTopNavigation.html +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components.schema.md +154 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/dashboard.html +588 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/dashboard.md +99 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/table-page.html +477 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/table-page.md +77 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/templates/base.html +878 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/accessibility/accessibility.md +39 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/TuyaCapsuleSearch.html +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/arrow-down.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/calendar.svg +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/checkbox-check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/clear.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/search.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/preview.html +3705 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/spec.md +78 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/TuyaCardGrid.html +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/assets/placeholder.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/preview.html +711 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/spec.md +93 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/cascader/spec.md +75 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/checkbox/spec.md +72 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/date-picker/spec.md +81 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/dropdown/spec.md +99 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/icon/examples/TuyaIcon.html +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/icon/spec.md +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/input/spec.md +84 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/modal/spec.md +178 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/page-title/examples/TuyaPageTitle.html +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/page-title/spec.md +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/pagination/spec.md +94 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/radio/spec.md +80 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/search-input/spec.md +101 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/select/spec.md +96 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/slider/spec.md +66 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/switch/spec.md +86 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/table/spec.md +116 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/time-picker/spec.md +75 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tooltip/spec.md +70 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/top-navigation/examples/TuyaTopNavigation.html +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/top-navigation/spec.md +60 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/examples/icons/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/examples/preview.html +974 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/spec.md +118 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/upload/spec.md +86 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/demo-index.md +43 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/design-system.md +116 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/color.md +165 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/elevation.md +21 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/icon.md +78 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/layout.md +103 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/radius.md +22 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/spacing.md +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/typography.md +43 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/behavior.md +30 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/feedback.md +23 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/state.md +28 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/motion/motion.md +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/dashboard.md +34 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/data-page.md +30 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/form-page.md +36 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/monitoring.md +25 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/quality-checklist.md +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/registry.yaml +232 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/tokens.yaml +187 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/README.md +26 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states/README.md +13 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/403.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/404.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/500.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//344/272/213/344/273/266/345/274/202/345/270/270.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/220/234/347/264/242/346/227/240/347/273/223/346/236/234.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/344/275/215/347/275/256/344/277/241/346/201/257.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/210/277/345/261/213.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/225/260/346/215/256.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/266/210/346/201/257.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/347/275/221/347/273/234.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/350/256/276/345/244/207.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/351/241/271/347/233/256.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203.md +159 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/403.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/404.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/500.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/empty.css +106 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/empty.js +49 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/index.html +69 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//344/272/213/344/273/266/345/274/202/345/270/270.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//345/233/276/347/211/207/345/212/240/350/275/275/345/244/261/350/264/245.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/220/234/347/264/242/346/227/240/347/273/223/346/236/234.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/344/275/215/347/275/256/344/277/241/346/201/257.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/210/277/345/261/213.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/225/260/346/215/256.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/266/210/346/201/257.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/347/275/221/347/273/234.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/350/256/276/345/244/207.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/351/241/271/347/233/256.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/README.md +23 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/arrow-down.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/calendar.svg +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/clear.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/search.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/arrow-down-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/check-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/clear-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/search-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/Excel.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/HD.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/PM.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/PPT.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/README.md +14 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/VOC.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/app/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/catalog.md +377 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/folder-closed.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/license/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/nps/351/207/217/350/241/250 /346/224/266/350/227/217.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/sos-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/sos.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/word.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/200/346/260/247/345/214/226/347/242/263-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/200/346/260/247/345/214/226/347/242/263.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/212/344/274/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/214/346/260/247/345/214/226/347/242/263.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/221/347/253/257 /344/270/213/350/275/275.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/256/345/272/246 /345/244/252/351/230/263 /346/227/245/351/227/264.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/344/275/223/344/274/240/346/204/237/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/345/203/217@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/345/221/230/345/244/207/344/273/275@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/346/260/221/345/270/201@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/350/204/270/350/257/206/345/210/253/346/210/220/345/212/237@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/350/241/214/351/227/250/347/246/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/274/230/346/203/240/345/210/270@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/274/232/345/221/230@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/201/234/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/205/347/224/265/346/241/251@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/245/344/276/265/345/221/212/350/255/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/250/347/220/203 /345/234/260/347/220/203 @2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/206/260/347/256/261.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/206/267/346/260/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/210/267/346/274/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/212/240/346/262/271/347/253/231@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/220/210/347/211/251.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/255/246-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/240/346/257/224/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/267/345/256/227.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/267/345/260/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/216/237/345/255/220 /347/211/251/347/220/206 /346/227/213/350/275/254.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/217/221/345/215/241@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/217/260/345/274/217/347/224/265/350/204/221 /346/230/276/347/244/272/345/231/250 /345/261/217/345/271/225.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/220/212/347/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/220/271/351/243/216/346/234/272 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/221/212/350/255/246/344/270/255/345/277/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/221/274/345/220/270/347/216/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/225/206/345/272/227@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/226/234/346/254/242@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/233/276/347/211/207-/346/255/243/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/250/347/272/277/346/234/215/345/212/241/345/217/260@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/260/345/233/276@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/260/351/223/201@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/237/272/345/233/240 DNA.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/237/272/345/233/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/240/206/345/217/240/346/237/261/347/212/266.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/243/260/345/205/211/346/212/245/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/244/232/347/275/221/351/241/265 web /345/244/232/347/252/227/345/217/243.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/244/247/350/204/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/256/236/346/227/266/346/246/202/350/247/210 /351/245/274/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/256/244/345/244/226/346/270/251/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/257/271/346/216/245 /344/272/244/346/215/242.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/260/272/345/255/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/260/272/345/257/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/267/264/345/243/253@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/270/203/345/261/200.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/270/203/351/230/262/346/217/220/351/206/222.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/212 /347/235/241/347/234/240.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/212.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/224/347/224/250/351/205/215/347/275/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/205/263 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 Bug@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 Code@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 js /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 /347/275/221/351/241/265 /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/351/227/250-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/351/227/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/275/225/345/203/217.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/276/252/347/216/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/276/256/346/263/242/347/202/211 /347/203/244/347/256/261 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/216/207 /345/277/203/347/224/265/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/216/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/224/265/345/233/276 /346/201/222/346/265/201/346/263/204/351/234/262/344/270/212/345/221/212.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/350/267/263/346/243/200/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/200/235/350/200/203 /350/201/224/346/203/263.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/200/245/346/225/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/210/277/351/227/264@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/213/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/213/350/241/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/223/345/215/260/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/225/345/275/261/344/273/252 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/230/347/272/277/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/230/347/272/277/351/235/242/347/247/257/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/245/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/213/205/346/236/266/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/213/215/347/205/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/214/207/347/272/271@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/216/210/346/235/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/221/204/345/203/217/345/244/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/224/257/344/273/230@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/224/266/350/227/217/346/266/210/346/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/221/346/212/244/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/243/347/202/271/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256 /345/210/206/346/236/220 /345/276/252/347/216/257.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256 /351/245/274/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256/346/272/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/264/344/275/223/346/246/202/345/206/265-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/264/344/275/223/346/246/202/345/206/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/344/273/266/345/244/271/346/211/223/345/274/200.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/345/255/227.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 amr.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 ara.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 bmp.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 csv.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 doc.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 gif.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 jpeg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 jpg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 json.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 md.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 mp3.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 mp4.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 pdf.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 png.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 ppt.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 psd.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 svg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 txt.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 wav.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 xls.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 zip.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/255/347/272/277 /346/226/255/347/275/221/351/207/215/350/257/225 /350/204/211/345/206/262.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/271/346/241/210/347/256/241/347/220/206@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/275/345/267/245/345/221/230/347/256/241/347/220/206@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/240/344/272/272/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/245/346/234/237@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/245/346/234/237@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/346/210/277/351/227/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/347/233/221/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/351/227/250/347/246/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/233/262/347/272/277/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/211/345/256/263-/346/214/245/345/217/221/346/200/247/346/234/211/346/234/272/347/211/251.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/254/345/234/260/350/247/206/351/242/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/272/345/231/250/344/272/272 /344/272/272/345/267/245/346/231/272/350/203/275 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/237/261/347/212/266/345/233/276-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/237/261/347/212/266/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/207/346/270/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/207/347/255/276 /346/240/207/350/256/260@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/221/346/234/250 /347/216/257/345/242/203.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/221/346/234/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/241/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/242/257/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/250/241/346/235/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/224/346/263/241/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/344/276/265/344/274/240/346/204/237.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/346/265/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/346/265/270/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206_/345/211/257/346/234/254.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/202/346/225/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/241/346/237/223.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/275/350/275/246 /350/277/220/350/276/223 @2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/262/231/345/217/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/264/227/350/241/243/346/234/272 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/265/213/350/257/225 /347/247/222/350/241/250@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/265/264/346/261/240 /346/265/264/347/274/270 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/267/273/345/212/240/351/241/271/347/233/256-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/267/273/345/212/240/351/241/271/347/233/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246/350/277/207/344/275/216.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246/350/277/207/351/253/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/270/346/210/217/344/274/221/351/227/262/345/250/261/344/271/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/271/277/345/272/246/350/277/207/344/275/216.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/271/277/345/272/246/350/277/207/351/253/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/347/201/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/255/347/201/253/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/255/346/260/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/255/346/260/264/345/243/266 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/205/247/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/207/203/346/260/224.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/207/203/346/260/224_/345/211/257/346/234/254.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/212/266/346/200/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203 /346/240/221/345/217/266.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203 /346/240/221/346/234/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203/347/233/221/346/265/213-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203/347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/275/242/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/262/347/203/267/345/274/202/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/262/351/206/233.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/345/212/250/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/345/255/220/345/233/264/346/240/217 /346/241/206/351/200/211.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/346/272/220 /347/224/265/347/223/266.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/350/247/206 /347/233/264/346/222/255 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/350/264/271.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/222/273.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/243/216/346/211/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/245/255/351/224/205 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/273/346/235/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/233/270/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/235/241/347/234/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/244/276/345/214/272/346/231/272/350/203/275-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/244/276/345/214/272/346/231/272/350/203/275.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/246/273/347/272/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/247/237/350/265/201/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/247/257/345/210/206/350/277/220/350/220/245@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/346/260/224/345/207/200/345/214/226/345/231/250 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/350/260/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/351/227/264@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/252/227/345/270/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/254/224/350/256/260/346/234/254/347/224/265/350/204/221-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/254/224/350/256/260/346/234/254/347/224/265/350/204/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/255/211/345/276/205 /345/200/222/350/256/260/346/227/266@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/255/211/345/276/205@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/272/242/347/273/277/347/201/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/273/204/347/273/207/347/256/241/347/220/206@2x-2.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/273/204/347/273/207/347/256/241/347/220/206@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/274/226/350/276/221@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/275/221/351/241/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/276/216/345/205/203@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/201/344/272/272 /350/200/201/345/271/264/344/272/272@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/203/275/345/212/233.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/207/252/350/241/214/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/212/202/350/203/275.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/212/257/347/211/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/241/200/345/216/213/345/274/202/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/241/200/346/260/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/204/350/214/203.md +264 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/345/233/276/346/250/241/345/274/217.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221AI.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221SD.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/242/345/215/225.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-4.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-5.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/344/272/244/344/273/230-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/344/272/244/344/273/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/220/347/273/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/220/350/241/214/347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/236/346/216/245.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/347/275/256@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/347/275/256/350/260/203/350/257/225.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/257/273/345/215/241/345/231/250 /344/277/241/345/217/267.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/246/345/217/267@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/247/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/255/347/211/251/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/255/347/211/251/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/265/204/344/272/247/344/270/255/345/277/203@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234lu zhang-2.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234lu zhang.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/246/350/241/214@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/254/344/272/244/346/235/203/351/231/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/244/205-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/244/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/270/241@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/277/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/277/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/220/350/220/245/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/220/350/276/223/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/233/345/272/246/346/235/241.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/200/232/346/226/255/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/201/245/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/223/201/351/224/271.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/224/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/224/256/347/233/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/250/347/243/201/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/250/351/224/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/256/345/217/267@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/230/266/346/242/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/252/350/212/261 /344/270/213/351/233/252 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/252/350/212/261 /345/210/266/345/206/267.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/267/350/276/276 /346/211/253/346/217/217 /345/217/221/347/216/260 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/235/231/350/204/211/346/263/250/345/260/204.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/237/263/345/223/215.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/241/271/347/233/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/243/236/346/234/272@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/243/236/346/234/272@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/251/254/346/241/266.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/253/230/345/210/206/345/255/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/253/230/346/270/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/274/240/346/240/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/source.json +18 -0
- package/skills/micro-app-design/references/action-outcomes.md +7 -0
- package/skills/micro-app-design/references/adaptive-card-grid.md +25 -0
- package/skills/micro-app-design/references/capsule-fallback.md +36 -0
- package/skills/micro-app-design/references/component-boundaries.md +48 -0
- package/skills/micro-app-design/references/component-catalog.md +69 -0
- package/skills/micro-app-design/references/design-system.md +34 -0
- package/skills/micro-app-design/references/empty-and-error-states.md +27 -0
- package/skills/micro-app-design/references/icons.md +33 -0
- package/skills/micro-app-design/references/implementation-guidance.md +39 -0
- package/skills/micro-app-design/references/modal.md +27 -0
- package/skills/micro-app-design/references/page-patterns.md +55 -0
- package/skills/micro-app-design/references/quality-checklist.md +57 -0
- package/skills/micro-app-design/references/requirements-and-permission-states.md +19 -0
- package/skills/micro-app-design/references/source-and-scope.md +40 -0
- package/skills/micro-app-design/references/tokens.md +23 -0
- package/skills/micro-app-design/references/visual-acceptance.md +51 -0
- package/skills/micro-app-design/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-design/scripts/visual-audit.mjs +197 -0
- package/skills/micro-app-design/tests/behavior-scenarios.md +154 -0
- package/skills/micro-app-design/tests/validate-design-skill.mjs +35 -0
- package/skills/micro-app-design/tests/validate-design-system.mjs +51 -0
- package/skills/micro-app-development/SKILL.md +132 -0
- package/skills/micro-app-development/agents/openai.yaml +6 -0
- package/skills/micro-app-development/references/agent-workflow.md +111 -0
- package/skills/micro-app-development/references/application-icons.md +50 -0
- package/skills/micro-app-development/references/data-change-safety.md +47 -0
- package/skills/micro-app-development/references/delivery-checklist.md +129 -0
- package/skills/micro-app-development/references/design-workflow.md +77 -0
- package/skills/micro-app-development/references/developer-credentials.md +97 -0
- package/skills/micro-app-development/references/development-guide.md +215 -0
- package/skills/micro-app-development/references/environment-progress.md +47 -0
- package/skills/micro-app-development/references/joint-acceptance.md +105 -0
- package/skills/micro-app-development/references/local-development.md +40 -0
- package/skills/micro-app-development/references/manifest-v1.2.md +129 -0
- package/skills/micro-app-development/references/npm-registry.md +50 -0
- package/skills/micro-app-development/references/platform-operations.md +48 -0
- package/skills/micro-app-development/references/project-workflow.md +36 -0
- package/skills/micro-app-development/references/publication-intent.md +34 -0
- package/skills/micro-app-development/references/publication-recovery.md +67 -0
- package/skills/micro-app-development/references/requirement-intake.md +122 -0
- package/skills/micro-app-development/references/runtime-requirements.md +23 -0
- package/skills/micro-app-development/references/space-permission-boundaries.md +46 -0
- package/skills/micro-app-development/references/tool-update.md +62 -0
- package/skills/micro-app-development/references/toolchain-access.md +35 -0
- package/skills/micro-app-development/references/user-journey.md +65 -0
- package/skills/micro-app-development/references/workspace-environments.md +39 -0
- package/skills/micro-app-development/scripts/application-icon.mjs +108 -0
- package/skills/micro-app-development/scripts/install-app-icon.mjs +48 -0
- package/skills/micro-app-development/scripts/install-menu-icon.mjs +27 -0
- package/skills/micro-app-development/scripts/language-policy.mjs +83 -0
- package/skills/micro-app-development/scripts/languages.json +372 -0
- package/skills/micro-app-development/scripts/locale-keys.mjs +26 -0
- package/skills/micro-app-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-development/scripts/project-code.mjs +13 -0
- package/skills/micro-app-development/scripts/review-backend-logging.mjs +27 -0
- package/skills/micro-app-development/scripts/review-production-authorization.mjs +37 -0
- package/skills/micro-app-development/scripts/validate-micro-app-project.mjs +442 -0
- package/skills/micro-app-development/tests/application-icons.test.mjs +131 -0
- package/skills/micro-app-development/tests/backend-logging-review.test.mjs +24 -0
- package/skills/micro-app-development/tests/behavior-scenarios.md +177 -0
- package/skills/micro-app-development/tests/data-change-safety-scenarios.md +25 -0
- package/skills/micro-app-development/tests/design-workflow-scenarios.md +40 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/_locales/en.json +6 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/_locales/zh-CN.json +6 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/manifest.json +59 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/micro.config.js +5 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/mock/index.json +11 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/package.json +4 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/index.tsx +5 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/lang/en.ts +1 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/lang/zh.ts +1 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/public-path.js +3 -0
- package/skills/micro-app-development/tests/production-authorization-review.test.mjs +72 -0
- package/skills/micro-app-development/tests/six-skill-routing-scenarios.md +60 -0
- package/skills/micro-app-development/tests/user-journey-scenarios.md +19 -0
- package/skills/micro-app-development/tests/validate-micro-app-project.test.mjs +428 -0
- package/skills/micro-app-frontend-development/SKILL.md +86 -0
- package/skills/micro-app-frontend-development/agents/openai.yaml +6 -0
- package/skills/micro-app-frontend-development/references/api-and-permissions.md +86 -0
- package/skills/micro-app-frontend-development/references/custom-api-requests.md +52 -0
- package/skills/micro-app-frontend-development/references/debugging.md +36 -0
- package/skills/micro-app-frontend-development/references/i18n-and-theme.md +54 -0
- package/skills/micro-app-frontend-development/references/interaction-completion.md +61 -0
- package/skills/micro-app-frontend-development/references/micro-frontend-runtime.md +33 -0
- package/skills/micro-app-frontend-development/references/routing-and-context.md +96 -0
- package/skills/micro-app-frontend-development/references/saas-failure-and-display.md +45 -0
- package/skills/micro-app-frontend-development/references/standard-api-requests.md +30 -0
- package/skills/micro-app-frontend-development/references/submission-errors.md +51 -0
- package/skills/micro-app-frontend-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-frontend-development/tests/behavior-scenarios.md +36 -0
- package/skills/micro-app-solution-design/SKILL.md +69 -0
- package/skills/micro-app-solution-design/agents/openai.yaml +6 -0
- package/skills/micro-app-solution-design/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-solution-design/tests/behavior-scenarios.md +12 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { sourceUploadErrors } from '../resources/scripts/registry-client.mjs';
|
|
2
|
+
|
|
3
|
+
export const runtimeErrorActions = {
|
|
4
|
+
PACKAGE_IDENTITY_INVALID: "Use a valid package name in the trusted complete distribution metadata and refresh its integrity manifest.",
|
|
5
|
+
WORKSPACE_PROJECT_MISSING: "Determine and create the intended business project directory before configuring its workspace target.",
|
|
6
|
+
WORKSPACE_ENDPOINT_INVALID: "Use a trusted HTTPS service origin without credentials, paths, query parameters or fragments. Preproduction requires an explicit workspace endpoint.",
|
|
7
|
+
WORKSPACE_ENVIRONMENT_INVALID: "Internal setup may configure production or pre. New unconfigured workspaces already use production.",
|
|
8
|
+
WORKSPACE_CONFIG_INVALID: "Preserve and repair the private workspace target configuration. An invalid configuration never falls back to production.",
|
|
9
|
+
WORKSPACE_STATE_INSIDE_PROJECT: "Keep workspace target state in the user tool directory, outside business source and uploaded archives.",
|
|
10
|
+
WORKSPACE_ENVIRONMENT_CONFLICT: "Endpoint environment variables disagree with the workspace target. Internal users must explicitly configure the intended workspace; do not silently override it or send credentials to another origin.",
|
|
11
|
+
WORKSPACE_TARGET_MISMATCH: "This publication or credential session belongs to another workspace target. Use its original workspace/target and original records; do not replace request identifiers or resend it to the current service.",
|
|
12
|
+
WORKSPACE_BUSY: "Another operation, unknown publication, credential worker or unfinished session prevents changing the workspace. Finish it with its original tools and records, or use a separate business workspace.",
|
|
13
|
+
WORKSPACE_CREDENTIALS_CONFLICT: "The workspace has credentials bound to another service. Preserve those profiles; use a separate workspace, or explicitly log out the local binding after resolving all pending operations before configuring a new target.",
|
|
14
|
+
WORKSPACE_LEGACY_TARGET_REQUIRED: "Legacy cloud records do not identify one verifiable service. Preserve the old tools and records. An internal operator must configure the original workspace target explicitly before this migration.",
|
|
15
|
+
SUPPORTED_LANGUAGES_INVALID: "Use the supported language directory codes, keep zh and en selected, add each selected metadata and UI dictionary, and prepare a new release. Keep original accepted packages and requests unchanged.",
|
|
16
|
+
LOCALE_KEY_INVALID: "Use non-empty locale keys without whitespace. Rename the affected keys to lowerCamelCase or dotted lowerCamelCase, update all supported languages and code/manifest references, then prepare a new release. Do not rewrite accepted archives or requests.",
|
|
17
|
+
BUNDLE_PROJECT_OVERLAP: "Choose the business project before setup. Acquire the complete npm package in a separate temporary directory; do not install the kit as a business dependency or copy a parent project lock.",
|
|
18
|
+
CACHE_VERSION_CONFLICT: "Retain the existing cache and its project locks. Use a package supporting version-plus-digest caches for new installations; existing projects must use their exact locked content or an explicit newer-version update. Never delete or overwrite another project's cache.",
|
|
19
|
+
PROJECT_CODE_REQUIRED: "No valid frozen micro-app code is present. For an existing project inspect release history and restore its original code first; use project identity --content-words <2-3-English-words> only when creating a candidate. Then prepare a new output. Old prepared tasks must keep their original package and use their original tool; never fall back to appName or change an existing request.",
|
|
20
|
+
PROJECT_IDENTITY_CONFLICT: "Project code disagrees with retained publication records or multiple codes were found. Restore the trusted application identity and inspect the original tasks; do not generate another code to bypass this conflict.",
|
|
21
|
+
PROJECT_IDENTITY_BUSY: "Another project identity operation is active. Keep the existing configuration; retry after it completes. Preserve a crashed identity lock until its owner is checked.",
|
|
22
|
+
BACKEND_NODE_REQUIRED: "The backend requires Node 24.x. Preserve the user's default Node; locate or install a separate Node 24 and run runtime configure --project <path> --node-path <absolute-node-executable>, then runtime status.",
|
|
23
|
+
BACKEND_RUNTIME_INVALID: "The machine-local backend runtime binding is invalid. Locate a trusted Node 24 executable and bind it again with runtime configure; do not edit project version locks.",
|
|
24
|
+
BACKEND_RUNTIME_CHANGED: "The bound Node executable changed version. Verify the new Node 24 installation and explicitly bind it again; no other runtime was selected.",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const updateErrorActions = {
|
|
28
|
+
UPDATE_PACKAGE_MIGRATION_UNSUPPORTED: "Cross-package migration supports the personal 0.1.24 and 0.1.25 packages to a company @tuya-sat distribution. Other versions must first reach a supported verified baseline with the old tools; do not edit locks or rename caches.",
|
|
29
|
+
UPDATE_TARGET_INVALID: "Run update check first and use its exact newer target version when deferring an update.",
|
|
30
|
+
UPDATE_REGISTRY_INVALID: "Use an explicitly trusted HTTPS registry without credentials, query parameters or fragments.",
|
|
31
|
+
UPDATE_CHECK_UNAVAILABLE: "Continue using the locked version. Check network/cache access and retry update check --force; do not infer that this is the latest version.",
|
|
32
|
+
UPDATE_STATE_INVALID: "Check the project installation or update state; preserve the original files and do not edit version locks by hand.",
|
|
33
|
+
UPDATE_STATE_ROOT_INVALID: "Use an absolute state directory outside the business project.",
|
|
34
|
+
UPDATE_RECEIPT_INVALID: "Restore the original verified package and installation receipt before updating.",
|
|
35
|
+
UPDATE_SKILL_CONFLICT: "Installed Skill files differ from the verified old version or are not managed by this installation. Preserve local edits and resolve the conflict before update.",
|
|
36
|
+
UPDATE_STATE_INCOMPATIBLE: "This package or state format has no verified migration. Keep the current version and use a compatible target package.",
|
|
37
|
+
UPDATE_RUNTIME_UNSUPPORTED: "The target package Node requirement is unsupported or unmet. Use a compatible Node runtime before updating; do not change the project lock by hand.",
|
|
38
|
+
UPDATE_PREVIEW_BUSY: "Stop the original identified preview with its existing tool, then retry update. Do not kill a stored PID blindly.",
|
|
39
|
+
UPDATE_RECOVERY_REQUIRED: "A tool update is incomplete. Run the target package update --recover, then reload and verify the restored Skill.",
|
|
40
|
+
UPDATE_RECOVERY_CONFLICT: "Update recovery found modified or missing files. Preserve the backups and restore the verified installation before retrying; do not overwrite user edits.",
|
|
41
|
+
UPDATE_VERIFICATION_FAILED: "The updated launcher/runtime check failed. The previous tools were restored; reload and verify them before another attempt.",
|
|
42
|
+
UPDATE_ROLLBACK_UNAVAILABLE: "Select a previous tool version recorded by a successful update and retain its verified cache.",
|
|
43
|
+
UPDATE_DOWNGRADE_REFUSED: "Use rollback to select a recorded previous version; update does not silently downgrade.",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const authErrorActions = {
|
|
47
|
+
"AUTH_LABEL_INVALID": "Use a non-secret account alias of 1..64 characters without control characters.",
|
|
48
|
+
"AUTH_WAIT_INVALID": "Use --timeout-seconds 0..60. A timeout does not cancel setup; wait again for the same profile.",
|
|
49
|
+
"AUTH_SETUP_CHANGED": "Setup was cancelled or the project binding changed. Run auth status/configure; do not overwrite the previous binding.",
|
|
50
|
+
"AUTH_STORE_WRITE_FAILED": "Could not save the staged credentials. The previous binding is retained. Retry the user-terminal setup or explicitly select an available fallback.",
|
|
51
|
+
"AUTH_WRITE_VERIFICATION_FAILED": "Readback did not match the staged credentials. The previous binding is retained. Retry setup after checking access to the system store.",
|
|
52
|
+
"AUTH_STATE_INVALID": "Check the private auth state directory; do not edit credential bindings by hand.",
|
|
53
|
+
"AUTH_STATE_PERMISSIONS": "Restrict auth state to the current system user before retrying.",
|
|
54
|
+
"AUTH_STATE_INSIDE_PROJECT": "Use a private auth state directory outside the business project.",
|
|
55
|
+
"AUTH_PROFILE_INVALID": "Run auth configure for this project to obtain a valid profile.",
|
|
56
|
+
"AUTH_PROFILE_MISSING": "Run auth configure and give the returned userCommand to the user; wait for its profile with auth wait.",
|
|
57
|
+
"AUTH_STORE_UNAVAILABLE": "The system store could not be accessed. Run auth guide; use configured host Secret injection or release session if necessary.",
|
|
58
|
+
"AUTH_STORE_LOCKED": "Have the user unlock or authorize the system store, then retry. If unavailable, explicitly choose a hidden-input release session. Environment credentials are an option only when safe injection is already configured.",
|
|
59
|
+
"AUTH_ENTRY_MISSING": "Run auth configure; have the user execute its terminal setup command and enter both keys privately.",
|
|
60
|
+
"AUTH_CREDENTIALS_INCOMPLETE": "Both App Key and Secret Key must be set in the same source. Do not print their values.",
|
|
61
|
+
"AUTH_ACCOUNT_CHANGED": "The stored account changed. Run auth check and keep the original release ownership; do not replace request identifiers.",
|
|
62
|
+
"AUTH_ENDPOINT_CONFLICT": "The selected profile or session uses a different endpoint. Keep the original trusted endpoint; do not send credentials to a new origin.",
|
|
63
|
+
"AUTH_ENDPOINT_INVALID": "Use the built-in China endpoint or an explicitly trusted HTTPS origin without a path or user information.",
|
|
64
|
+
"AUTH_SOURCE_INVALID": "Select auto, system or environment as the credential source.",
|
|
65
|
+
"AUTH_SOURCE_CONFLICT": "The system profile and host injection differ. Explicitly select a complete source; do not combine credentials.",
|
|
66
|
+
"AUTH_BUSY": "Another credential or publication operation is active. Keep its original task and inspect status before retrying.",
|
|
67
|
+
"AUTH_FORGET_CONFIRMATION_REQUIRED": "Explain the local credential deletion and use --confirm-forget only after the user authorizes it.",
|
|
68
|
+
"AUTH_PROFILE_IN_USE": "This profile is used by another project. Keep those bindings; remove only the intended project binding.",
|
|
69
|
+
"AUTH_SESSION_CLOSED": "This local session was closed. Create a new session if needed; query retained publication records without changing request identifiers.",
|
|
70
|
+
"AUTH_SESSION_INVALID": "Use the session identifier returned for this project; do not edit session records.",
|
|
71
|
+
"AUTH_USER_TERMINAL_REQUIRED": "Have the user run the returned auth setup or session-run command in their own interactive terminal. Keys are accepted only by hidden input, never by arguments or piped input.",
|
|
72
|
+
"AUTH_INPUT_CANCELLED": "Input was cancelled. Run the same setup/session command again when the user wants to continue; the previous binding is retained.",
|
|
73
|
+
"AUTH_SESSION_TIMEOUT": "The local monitor stopped after its time limit. Platform work may continue; run the same session again to query the original task.",
|
|
74
|
+
"AUTH_SESSION_INTERRUPTED": "The temporary worker ended. Run the same session worker with hidden input again to resume the original task."
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const codes = new Set([
|
|
78
|
+
...Object.keys(authErrorActions),
|
|
79
|
+
...Object.keys(runtimeErrorActions),
|
|
80
|
+
...Object.keys(updateErrorActions),
|
|
81
|
+
...Object.keys(sourceUploadErrors),
|
|
82
|
+
"BUNDLE_INTEGRITY_MISMATCH",
|
|
83
|
+
"BUNDLE_REQUIRED",
|
|
84
|
+
"CACHE_PROJECT_OVERLAP",
|
|
85
|
+
"CACHE_VERSION_CONFLICT",
|
|
86
|
+
"DATABASE_REQUIRES_BACKEND",
|
|
87
|
+
"DOCKER_UNAVAILABLE",
|
|
88
|
+
"EXPLICIT_DATA_DELETION_REQUIRED",
|
|
89
|
+
"INITIALIZATION_CONFLICT",
|
|
90
|
+
"INVALID_BUNDLE",
|
|
91
|
+
"INVALID_OPERATION",
|
|
92
|
+
"INVALID_OPTION",
|
|
93
|
+
"INVALID_PORT",
|
|
94
|
+
"INVALID_PROJECT",
|
|
95
|
+
"MISSING_OPTION_VALUE",
|
|
96
|
+
"DEVELOPER_CREDENTIALS_REQUIRED",
|
|
97
|
+
"INVALID_RELEASE_ARTIFACTS",
|
|
98
|
+
"RELEASE_ARTIFACT_MISMATCH",
|
|
99
|
+
"PUBLICATION_NOT_STARTED",
|
|
100
|
+
"PUBLICATION_BUSY",
|
|
101
|
+
"PUBLICATION_INDEX_INVALID",
|
|
102
|
+
"PUBLICATION_INPUT_MISSING",
|
|
103
|
+
"PUBLICATION_RETRY_NOT_ALLOWED",
|
|
104
|
+
"RELEASE_CONTENT_INVALID",
|
|
105
|
+
"BUILD_LOGS_QUERY_INVALID",
|
|
106
|
+
"BUILD_LOGS_UNAVAILABLE",
|
|
107
|
+
"REGISTRY_REQUEST_FAILED",
|
|
108
|
+
"REGISTRY_HTTP_FAILED",
|
|
109
|
+
"REGISTRY_INVALID_RESPONSE",
|
|
110
|
+
"REGISTRY_REJECTED",
|
|
111
|
+
"MICRO_APP_VERSION_LIMIT_EXCEEDED",
|
|
112
|
+
"NODE_22_REQUIRED",
|
|
113
|
+
"NODE_VERSION",
|
|
114
|
+
"OUTPUT_EXISTS",
|
|
115
|
+
"OUTPUT_MUST_BE_OUTSIDE_PROJECT",
|
|
116
|
+
"OUTPUT_REQUIRED",
|
|
117
|
+
"PORT_UNAVAILABLE",
|
|
118
|
+
"PREVIEW_BUILD_REQUIRED",
|
|
119
|
+
"PREVIEW_BUSY",
|
|
120
|
+
"PREVIEW_START_FAILED",
|
|
121
|
+
"PREVIEW_START_TIMEOUT",
|
|
122
|
+
"PROJECT_COMMAND_FAILED",
|
|
123
|
+
"PROJECT_NOT_EMPTY",
|
|
124
|
+
"PROJECT_REQUIRED",
|
|
125
|
+
"PROJECT_VERSION_CONFLICT",
|
|
126
|
+
"PROJECT_VERSION_MISMATCH",
|
|
127
|
+
"REQUIRED_FILE_MISSING",
|
|
128
|
+
"SETUP_IN_PROGRESS",
|
|
129
|
+
"SKILL_CONFLICT",
|
|
130
|
+
"SPECIAL_FILE_IN_BUNDLE",
|
|
131
|
+
"STATE_MISMATCH",
|
|
132
|
+
"STOP_PREVIEW_BEFORE_RESET",
|
|
133
|
+
"STOP_REFUSED",
|
|
134
|
+
"STOP_TIMEOUT",
|
|
135
|
+
"SYMLINK_IN_BUNDLE",
|
|
136
|
+
"SYMLINK_PATH_NOT_ALLOWED",
|
|
137
|
+
"UNEXPECTED_ARGUMENT",
|
|
138
|
+
"UNKNOWN_COMMAND",
|
|
139
|
+
"UNSUPPORTED_AGENT",
|
|
140
|
+
"UNSUPPORTED_PLATFORM",
|
|
141
|
+
]);
|
|
142
|
+
|
|
143
|
+
// Exact owned messages retain actionable guidance without echoing arbitrary exceptions.
|
|
144
|
+
const messages = new Map([
|
|
145
|
+
["app-name must use lowercase letters, digits and hyphens, start with a letter or digit, end in -customer and be at most 128 characters", "INVALID_APP_NAME"],
|
|
146
|
+
["Invalid supplied UUID", "INVALID_UUID"],
|
|
147
|
+
["Explicit user upgrade-support-projects choice required", "UPGRADE_CHOICE_REQUIRED"],
|
|
148
|
+
["Agent-derived content-words or explicit app-name required", "CONTENT_WORDS_REQUIRED"],
|
|
149
|
+
["content-words must contain 2\u20133 English words describing the application", "INVALID_CONTENT_WORDS"],
|
|
150
|
+
["Resource digest mismatch", "RESOURCE_DIGEST_MISMATCH"],
|
|
151
|
+
["Native database debugging requires a local Docker socket; remote Docker contexts are not supported", "LOCAL_DOCKER_REQUIRED"],
|
|
152
|
+
["Database resource belongs to another owner; refusing to modify it", "DATABASE_OWNER_MISMATCH"],
|
|
153
|
+
["Unexpected DEV database mounts or port binding", "INVALID_DATABASE_BINDING"],
|
|
154
|
+
["Use --confirm-delete-data to erase this project DEV database", "EXPLICIT_DATA_DELETION_REQUIRED"],
|
|
155
|
+
["Stop the debug environment and database before reset", "STOP_PREVIEW_BEFORE_RESET"],
|
|
156
|
+
["Declare backendIncluded:true and databaseRequired:true before provisioning a DEV database", "DATABASE_DECLARATION_REQUIRED"],
|
|
157
|
+
["DEV database preparation is already running", "DATABASE_BUSY"],
|
|
158
|
+
["DEV PostgreSQL did not become ready", "DATABASE_NOT_READY"],
|
|
159
|
+
["Missing loopback DEV database port", "DATABASE_PORT_MISSING"],
|
|
160
|
+
]);
|
|
161
|
+
|
|
162
|
+
export function safeCliError(error) {
|
|
163
|
+
const knownMessage = messages.get(error?.message);
|
|
164
|
+
if (knownMessage) {
|
|
165
|
+
return { errorCode: knownMessage, nextActions: [error.message] };
|
|
166
|
+
}
|
|
167
|
+
const candidate = error?.code === "ENOENT" ? "REQUIRED_FILE_MISSING" :
|
|
168
|
+
error?.code || error?.message?.split(":")[0];
|
|
169
|
+
const errorCode = codes.has(candidate) ? candidate : "CLI_OPERATION_FAILED";
|
|
170
|
+
|
|
171
|
+
const publicationActions = {
|
|
172
|
+
...sourceUploadErrors,
|
|
173
|
+
...authErrorActions,
|
|
174
|
+
...runtimeErrorActions,
|
|
175
|
+
...updateErrorActions,
|
|
176
|
+
DEVELOPER_CREDENTIALS_REQUIRED: "Run auth guide: prefer the local system store; if unavailable, use release session hidden input. Reuse host Secret injection only when already safely configured. The China endpoint is built in; never put credentials in project files.",
|
|
177
|
+
BUILD_LOGS_QUERY_INVALID: "Use tail-lines 1..2000 and since-seconds 1..86400 for the original publication.",
|
|
178
|
+
BUILD_LOGS_UNAVAILABLE: "Build logs are temporarily unavailable. Query the original task again; do not create a new build.",
|
|
179
|
+
REGISTRY_REQUEST_FAILED: "The response is unknown. Query or resume the same prepared publication directory; do not create new request identifiers.",
|
|
180
|
+
REGISTRY_HTTP_FAILED: "Check publishing service availability, then query the original task using the same prepared directory.",
|
|
181
|
+
REGISTRY_REJECTED: "The publishing service rejected the request. Check developer authorization and the original task; do not bypass ownership or replace an existing release.",
|
|
182
|
+
MICRO_APP_VERSION_LIMIT_EXCEEDED: "The registered version limit has been reached. Delete an unused version, then resume the same prepared publication directory with the original request identifiers.",
|
|
183
|
+
PUBLICATION_NOT_STARTED: "Publish the prepared directory first; status does not create or upload a release.",
|
|
184
|
+
PUBLICATION_BUSY: "Another publication for this project is active. Query the existing session and retry after it finishes; do not create new requests.",
|
|
185
|
+
PUBLICATION_INDEX_INVALID: "Check the private project publication index. Preserve original request identifiers and restore the trusted record; do not delete it to bypass recovery.",
|
|
186
|
+
PUBLICATION_INPUT_MISSING: "Matching content belongs to an earlier publication whose original artifacts are missing. Use release history to locate and restore that output; do not silently create a duplicate version.",
|
|
187
|
+
PUBLICATION_RETRY_NOT_ALLOWED: "A new attempt requires a newly prepared output and a confirmed terminal failure or expired upload. Query the original task first; active, completed or unknown results must be reused.",
|
|
188
|
+
RELEASE_CONTENT_INVALID: "Prepare valid tar.gz artifacts without links, duplicate/unsafe paths or special files. Expanded content must be at most 512 MiB and 100000 entries per archive.",
|
|
189
|
+
RELEASE_ARTIFACT_MISMATCH: "Prepared artifacts changed. Restore the original publication input or prepare a new release; never reuse the original request for different bytes.",
|
|
190
|
+
};
|
|
191
|
+
return {
|
|
192
|
+
errorCode,
|
|
193
|
+
...(['FRONTEND_UPLOAD_TOO_LARGE', 'BACKEND_UPLOAD_TOO_LARGE'].includes(errorCode)
|
|
194
|
+
&& Number.isSafeInteger(error.maxBytes) && error.maxBytes > 0 ? { maxBytes: error.maxBytes } : {}),
|
|
195
|
+
...(errorCode === "UPDATE_SKILL_CONFLICT" && Array.isArray(error.conflicts) ? { conflicts: error.conflicts } : {}),
|
|
196
|
+
...(publicationActions[errorCode] ? { nextActions: [publicationActions[errorCode]] } : {}),
|
|
197
|
+
...(errorCode === "UPDATE_STATE_INCOMPATIBLE" && error.incompatibleState === "preview-mock" ? {
|
|
198
|
+
incompatibleState: "preview-mock",
|
|
199
|
+
nextActions: ["Back up the existing project Mock state. Use a compatible tool version or obtain user authorization for an explicit Mock reset; update will not erase or migrate it automatically."],
|
|
200
|
+
} : {}),
|
|
201
|
+
...(errorCode === "CLI_OPERATION_FAILED" ? {
|
|
202
|
+
nextActions: ["Check project configuration, dependencies and local DEV Docker availability; use doctor and retry the same operation."],
|
|
203
|
+
} : {}),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, mkdtempSync, renameSync, rmSync } from 'node:fs';
|
|
2
|
+
import { join, dirname, relative } from 'node:path';
|
|
3
|
+
import { verifyBundle, tree, digest, realPathOnly, packageSkills } from './integrity.mjs';
|
|
4
|
+
import { readJson, atomicJson, installationError as fail } from './installation.mjs';
|
|
5
|
+
|
|
6
|
+
import { cacheDestination } from './package-cache.mjs';
|
|
7
|
+
|
|
8
|
+
export const HOST_DIRECTORIES = ['.agents', '.codebuddy', '.claude', '.trae', '.traecli'];
|
|
9
|
+
export function toolchain(manifest) {
|
|
10
|
+
return { format: 'tuya-microapp-toolchain-v1', protocolVersion: 1,
|
|
11
|
+
version: manifest.version, bundleSha256: manifest.bundleSha256 };
|
|
12
|
+
}
|
|
13
|
+
export function sameLock(left, right) {
|
|
14
|
+
return left?.format === right?.format && left?.protocolVersion === right?.protocolVersion
|
|
15
|
+
&& left?.version === right?.version && left?.bundleSha256 === right?.bundleSha256;
|
|
16
|
+
}
|
|
17
|
+
export function validateLock(lock) {
|
|
18
|
+
if (lock?.format !== 'tuya-microapp-toolchain-v1' || lock.protocolVersion !== 1
|
|
19
|
+
|| !/^\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?$/.test(lock.version || '')
|
|
20
|
+
|| !/^[a-f0-9]{64}$/.test(lock.bundleSha256 || '')) fail('UPDATE_STATE_INVALID');
|
|
21
|
+
return lock;
|
|
22
|
+
}
|
|
23
|
+
export function skillHashes(bundle) {
|
|
24
|
+
return Object.fromEntries(packageSkills(bundle).map(name => [name, digest(JSON.stringify(tree(join(bundle, 'skills', name))))]));
|
|
25
|
+
}
|
|
26
|
+
export function receiptFor(project, manifest, hosts, bundle) {
|
|
27
|
+
return { format: 'microapp-installation-v1', toolchain: toolchain(manifest),
|
|
28
|
+
hosts: [...new Set(hosts)].sort().map(directory => ({ directory, skillHashes: skillHashes(bundle) })) };
|
|
29
|
+
}
|
|
30
|
+
export function readReceipt(project, lock, skills) {
|
|
31
|
+
const receipt = readJson(join(project, '.tuya-microapp/installation.json'));
|
|
32
|
+
if (!receipt) return undefined;
|
|
33
|
+
if (receipt.format !== 'microapp-installation-v1'
|
|
34
|
+
|| !sameLock(receipt.toolchain, lock) || !Array.isArray(receipt.hosts) || !receipt.hosts.length
|
|
35
|
+
|| new Set(receipt.hosts.map(host => host.directory)).size !== receipt.hosts.length
|
|
36
|
+
|| receipt.hosts.some(host => !HOST_DIRECTORIES.includes(host.directory)
|
|
37
|
+
|| !host.skillHashes || Object.keys(host.skillHashes).length !== skills.length
|
|
38
|
+
|| skills.some(name => !/^[a-f0-9]{64}$/.test(host.skillHashes[name] || '')))) fail('UPDATE_RECEIPT_INVALID');
|
|
39
|
+
return receipt;
|
|
40
|
+
}
|
|
41
|
+
export function recordSetup(project, manifest, host, bundle) {
|
|
42
|
+
const lock = toolchain(manifest), previous = readReceipt(project, lock, packageSkills(bundle));
|
|
43
|
+
const hosts = [...(previous?.hosts.map(item => item.directory) || []), host];
|
|
44
|
+
atomicJson(join(project, '.tuya-microapp/installation.json'), receiptFor(project, manifest, hosts, bundle));
|
|
45
|
+
}
|
|
46
|
+
export function cachePackage(bundle, root, manifest) {
|
|
47
|
+
const cache = cacheDestination(root, manifest);
|
|
48
|
+
if (existsSync(cache)) {
|
|
49
|
+
if (verifyBundle(cache).bundleSha256 !== manifest.bundleSha256) fail('CACHE_VERSION_CONFLICT');
|
|
50
|
+
return cache;
|
|
51
|
+
}
|
|
52
|
+
mkdirSync(dirname(cache), { recursive: true });
|
|
53
|
+
const temporary = mkdtempSync(join(dirname(cache), '.update-'));
|
|
54
|
+
try {
|
|
55
|
+
cpSync(bundle, temporary, { recursive: true,
|
|
56
|
+
filter: path => !['evals', 'node_modules'].includes(relative(bundle, path).split(/[\\/]/)[0]) });
|
|
57
|
+
if (verifyBundle(temporary).bundleSha256 !== manifest.bundleSha256) fail('BUNDLE_INTEGRITY_MISMATCH');
|
|
58
|
+
if (existsSync(cache)) {
|
|
59
|
+
if (verifyBundle(cache).bundleSha256 !== manifest.bundleSha256) fail('CACHE_VERSION_CONFLICT');
|
|
60
|
+
} else {
|
|
61
|
+
try { renameSync(temporary, cache); }
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (!existsSync(cache) || verifyBundle(cache).bundleSha256 !== manifest.bundleSha256) throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return cache;
|
|
67
|
+
} finally { rmSync(temporary, { recursive: true, force: true }); }
|
|
68
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join, isAbsolute, sep } from 'node:path';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { realPathOnly, digest } from './integrity.mjs';
|
|
5
|
+
|
|
6
|
+
export function installationError(code, details = {}) {
|
|
7
|
+
throw Object.assign(new Error(code), { code }, details);
|
|
8
|
+
}
|
|
9
|
+
export function readJson(path) {
|
|
10
|
+
realPathOnly(path);
|
|
11
|
+
let stat;
|
|
12
|
+
try { stat = lstatSync(path); }
|
|
13
|
+
catch (error) { if (error.code === 'ENOENT') return undefined; throw error; }
|
|
14
|
+
if (!stat.isFile() || stat.isSymbolicLink()) installationError('UPDATE_STATE_INVALID');
|
|
15
|
+
try { return JSON.parse(readFileSync(path, 'utf8')); }
|
|
16
|
+
catch { installationError('UPDATE_STATE_INVALID'); }
|
|
17
|
+
}
|
|
18
|
+
export function atomicJson(path, value) {
|
|
19
|
+
realPathOnly(path);
|
|
20
|
+
if (existsSync(path) && !lstatSync(path).isFile()) installationError('UPDATE_STATE_INVALID');
|
|
21
|
+
const temporary = path + '.' + randomUUID();
|
|
22
|
+
try {
|
|
23
|
+
writeFileSync(temporary, JSON.stringify(value, null, 2) + '\n', { flag: 'wx', mode: 0o600 });
|
|
24
|
+
renameSync(temporary, path);
|
|
25
|
+
} finally { rmSync(temporary, { force: true }); }
|
|
26
|
+
}
|
|
27
|
+
export function alive(pid) {
|
|
28
|
+
if (!Number.isInteger(pid) || pid <= 0) installationError('UPDATE_STATE_INVALID');
|
|
29
|
+
try { process.kill(pid, 0); return true; }
|
|
30
|
+
catch (error) { if (error.code === 'ESRCH') return false; return true; }
|
|
31
|
+
}
|
|
32
|
+
export function verifierAllowed(project, operation) {
|
|
33
|
+
if (!['doctor', 'help'].includes(operation)) return false;
|
|
34
|
+
const metadata = join(project, '.tuya-microapp');
|
|
35
|
+
const owner = readJson(join(metadata, 'setup.lock/owner.json'));
|
|
36
|
+
const journal = readJson(join(metadata, 'update.json'));
|
|
37
|
+
return Boolean(owner?.pid === process.ppid && journal?.phase === 'committed'
|
|
38
|
+
&& journal.id === process.env.TUYA_MICROAPP_UPDATE_VERIFIER);
|
|
39
|
+
}
|
|
40
|
+
export function assertInstallationReady(project, operation) {
|
|
41
|
+
if (verifierAllowed(project, operation)) return;
|
|
42
|
+
const metadata = join(project, '.tuya-microapp');
|
|
43
|
+
if (existsSync(join(metadata, 'update.json'))) installationError('UPDATE_RECOVERY_REQUIRED');
|
|
44
|
+
if (existsSync(join(metadata, 'setup.lock'))) installationError('SETUP_IN_PROGRESS');
|
|
45
|
+
}
|
|
46
|
+
export function installerLease(project, { recover = false } = {}) {
|
|
47
|
+
const metadata = realPathOnly(join(project, '.tuya-microapp'));
|
|
48
|
+
const lock = join(metadata, 'setup.lock');
|
|
49
|
+
realPathOnly(lock);
|
|
50
|
+
if (existsSync(lock) && recover) {
|
|
51
|
+
const owner = readJson(join(lock, 'owner.json'));
|
|
52
|
+
if (owner && !alive(owner.pid)) rmSync(lock, { recursive: true });
|
|
53
|
+
}
|
|
54
|
+
try { mkdirSync(lock); }
|
|
55
|
+
catch { installationError('SETUP_IN_PROGRESS'); }
|
|
56
|
+
try { atomicJson(join(lock, 'owner.json'), { pid: process.pid }); }
|
|
57
|
+
catch (error) { rmSync(lock, { recursive: true, force: true }); throw error; }
|
|
58
|
+
return () => rmSync(lock, { recursive: true, force: true });
|
|
59
|
+
}
|
|
60
|
+
export function activeOperations(project) {
|
|
61
|
+
const directory = realPathOnly(join(project, '.tuya-microapp/operations'));
|
|
62
|
+
if (!existsSync(directory)) return [];
|
|
63
|
+
const active = [];
|
|
64
|
+
for (const name of readdirSync(directory)) {
|
|
65
|
+
if (!/^[a-f0-9-]{36}\.json$/.test(name)) installationError('UPDATE_STATE_INVALID');
|
|
66
|
+
const file = join(directory, name), value = readJson(file);
|
|
67
|
+
if (value?.format !== 'microapp-operation-v1') installationError('UPDATE_STATE_INVALID');
|
|
68
|
+
if (alive(value.pid)) active.push({ operation: value.operation, pid: value.pid });
|
|
69
|
+
}
|
|
70
|
+
return active;
|
|
71
|
+
}
|
|
72
|
+
export function operationLease(project, operation, { stateRoot, version } = {}) {
|
|
73
|
+
assertInstallationReady(project, operation);
|
|
74
|
+
if (verifierAllowed(project, operation)) return () => {};
|
|
75
|
+
const directory = realPathOnly(join(project, '.tuya-microapp/operations'));
|
|
76
|
+
mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
77
|
+
const file = join(directory, randomUUID() + '.json');
|
|
78
|
+
atomicJson(file, { format: 'microapp-operation-v1', pid: process.pid, operation, version });
|
|
79
|
+
try {
|
|
80
|
+
// The updater acquires setup.lock first and then inspects operations. This
|
|
81
|
+
// second check closes the race between entering a command and update.
|
|
82
|
+
assertInstallationReady(project, operation);
|
|
83
|
+
if (stateRoot) {
|
|
84
|
+
const root = realPathOnly(stateRoot);
|
|
85
|
+
if (!isAbsolute(stateRoot) || root === project || root.startsWith(project + sep)) installationError('UPDATE_STATE_ROOT_INVALID');
|
|
86
|
+
const roots = realPathOnly(join(project, '.tuya-microapp/state-roots'));
|
|
87
|
+
mkdirSync(roots, { recursive: true, mode: 0o700 });
|
|
88
|
+
atomicJson(join(roots, digest(root) + '.json'), { format: 'microapp-state-root-v1', root });
|
|
89
|
+
}
|
|
90
|
+
return () => rmSync(file, { force: true });
|
|
91
|
+
} catch (error) { rmSync(file, { force: true }); throw error; }
|
|
92
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readdirSync,
|
|
3
|
+
readFileSync,
|
|
4
|
+
lstatSync,
|
|
5
|
+
existsSync,
|
|
6
|
+
realpathSync,
|
|
7
|
+
} from "node:fs";
|
|
8
|
+
import { join, resolve, relative, sep, dirname } from "node:path";
|
|
9
|
+
import { createHash } from "node:crypto";
|
|
10
|
+
export const VERSION = "0.1.26-alpha.1";
|
|
11
|
+
// Repository-only files are not part of an installed, versioned capability bundle.
|
|
12
|
+
export const REPOSITORY_METADATA = new Set([
|
|
13
|
+
".git",
|
|
14
|
+
".gitignore",
|
|
15
|
+
".gitattributes",
|
|
16
|
+
"AGENTS.md",
|
|
17
|
+
]);
|
|
18
|
+
export const SKILLS = [
|
|
19
|
+
"micro-app-development",
|
|
20
|
+
"micro-app-design",
|
|
21
|
+
"micro-app-cloud-integration",
|
|
22
|
+
"micro-app-backend-development",
|
|
23
|
+
"micro-app-frontend-development",
|
|
24
|
+
"micro-app-solution-design",
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
// Each retained, verified package owns its Skill inventory, including older releases.
|
|
28
|
+
export function packageSkills(root) {
|
|
29
|
+
return [...verifyBundle(root).skills].sort();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function validateSkills(manifest) {
|
|
33
|
+
const files = Object.keys(manifest.files || {});
|
|
34
|
+
const names = files
|
|
35
|
+
.map(file => /^skills\/([a-z0-9-]+)\/SKILL\.md$/.exec(file)?.[1])
|
|
36
|
+
.filter(Boolean)
|
|
37
|
+
.sort();
|
|
38
|
+
const expected = (names.length === 4 ? SKILLS.slice(0, 4) : SKILLS).toSorted();
|
|
39
|
+
const directories = [...new Set(files
|
|
40
|
+
.map(file => /^skills\/([^/]+)\//.exec(file)?.[1])
|
|
41
|
+
.filter(Boolean))].sort();
|
|
42
|
+
if (!Array.isArray(manifest.skills)
|
|
43
|
+
|| JSON.stringify(names) !== JSON.stringify(expected)
|
|
44
|
+
|| JSON.stringify(directories) !== JSON.stringify(names)
|
|
45
|
+
|| JSON.stringify([...manifest.skills].sort()) !== JSON.stringify(names))
|
|
46
|
+
throw new Error("INVALID_BUNDLE");
|
|
47
|
+
}
|
|
48
|
+
export function digest(data) {
|
|
49
|
+
return createHash("sha256").update(data).digest("hex");
|
|
50
|
+
}
|
|
51
|
+
export function realPathOnly(path) {
|
|
52
|
+
let current = resolve(path);
|
|
53
|
+
for (;;) {
|
|
54
|
+
if (
|
|
55
|
+
existsSync(current) &&
|
|
56
|
+
lstatSync(current).isSymbolicLink() &&
|
|
57
|
+
!(process.platform === "darwin" && ["/var", "/tmp"].includes(current))
|
|
58
|
+
)
|
|
59
|
+
throw new Error("SYMLINK_PATH_NOT_ALLOWED");
|
|
60
|
+
const next = dirname(current);
|
|
61
|
+
if (next === current) break;
|
|
62
|
+
current = next;
|
|
63
|
+
}
|
|
64
|
+
let existing = resolve(path);
|
|
65
|
+
while (!existsSync(existing)) existing = dirname(existing);
|
|
66
|
+
return resolve(realpathSync(existing), relative(existing, resolve(path)));
|
|
67
|
+
}
|
|
68
|
+
export function tree(root, { exclude = [] } = {}) {
|
|
69
|
+
realPathOnly(root);
|
|
70
|
+
const files = {};
|
|
71
|
+
function walk(dir) {
|
|
72
|
+
for (const item of readdirSync(dir, { withFileTypes: true }).sort((a, b) =>
|
|
73
|
+
a.name.localeCompare(b.name)
|
|
74
|
+
)) {
|
|
75
|
+
const path = join(dir, item.name),
|
|
76
|
+
key = relative(root, path).split(sep).join("/");
|
|
77
|
+
if (item.isSymbolicLink()) throw new Error("SYMLINK_IN_BUNDLE");
|
|
78
|
+
if (dir === root && REPOSITORY_METADATA.has(item.name)) continue;
|
|
79
|
+
if (exclude.includes(key)) continue;
|
|
80
|
+
if (item.isDirectory()) walk(path);
|
|
81
|
+
else if (item.isFile()) files[key] = digest(readFileSync(path));
|
|
82
|
+
else throw new Error("SPECIAL_FILE_IN_BUNDLE");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
walk(root);
|
|
86
|
+
return files;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Exact root paths only: template lockfiles and nested additions stay protected.
|
|
90
|
+
export function bundleFiles(root) {
|
|
91
|
+
return tree(root, {
|
|
92
|
+
exclude: [
|
|
93
|
+
"bundle.json", "evals", "node_modules", "yarn.lock",
|
|
94
|
+
"package-lock.json", "pnpm-lock.yaml",
|
|
95
|
+
],
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function verifyBundle(root) {
|
|
100
|
+
const bytes = readFileSync(join(realPathOnly(root), "bundle.json"));
|
|
101
|
+
const manifest = JSON.parse(bytes);
|
|
102
|
+
if (
|
|
103
|
+
manifest.format !== "tuya-microapp-kit-v1" ||
|
|
104
|
+
manifest.protocolVersion !== 1 ||
|
|
105
|
+
!/^\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?$/.test(manifest.version)
|
|
106
|
+
)
|
|
107
|
+
throw new Error("INVALID_BUNDLE");
|
|
108
|
+
validateSkills(manifest);
|
|
109
|
+
if (manifest.packageName !== undefined
|
|
110
|
+
&& manifest.packageName !== JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')).name)
|
|
111
|
+
throw new Error("INVALID_BUNDLE");
|
|
112
|
+
// Maintainer evaluations and generated reports are never part of the delivered capability package.
|
|
113
|
+
const actual = bundleFiles(root);
|
|
114
|
+
if (
|
|
115
|
+
!manifest.files ||
|
|
116
|
+
Object.keys(actual).length !== Object.keys(manifest.files).length ||
|
|
117
|
+
Object.entries(actual).some(([k, v]) => manifest.files[k] !== v)
|
|
118
|
+
)
|
|
119
|
+
throw new Error("BUNDLE_INTEGRITY_MISMATCH");
|
|
120
|
+
return { ...manifest, bundleSha256: digest(bytes) };
|
|
121
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, lstatSync, existsSync, readdirSync } from "node:fs";
|
|
3
|
+
import { resolve, join, dirname, basename, relative } from "node:path";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
import { pathToFileURL, fileURLToPath } from "node:url";
|
|
7
|
+
try {
|
|
8
|
+
const args = process.argv.slice(2),
|
|
9
|
+
index = args.indexOf("--project");
|
|
10
|
+
if (index < 0 || !args[index + 1] || args[index + 1].startsWith("--"))
|
|
11
|
+
throw new Error("PROJECT_REQUIRED: --project <path>");
|
|
12
|
+
const project = resolve(args[index + 1]);
|
|
13
|
+
const lock = JSON.parse(
|
|
14
|
+
readFileSync(join(project, ".tuya-microapp/toolchain.json"))
|
|
15
|
+
);
|
|
16
|
+
if (
|
|
17
|
+
lock.format !== "tuya-microapp-toolchain-v1" ||
|
|
18
|
+
lock.protocolVersion !== 1 ||
|
|
19
|
+
!/^\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?$/.test(lock.version) ||
|
|
20
|
+
!/^[a-f0-9]{64}$/.test(lock.bundleSha256)
|
|
21
|
+
)
|
|
22
|
+
throw new Error("INVALID_TOOLCHAIN");
|
|
23
|
+
const packages = join(
|
|
24
|
+
process.env.TUYA_MICROAPP_HOME || join(homedir(), ".tuya-microapp"),
|
|
25
|
+
"packages"
|
|
26
|
+
);
|
|
27
|
+
// Do not import cached code before verifying the exact lock identity.
|
|
28
|
+
const precise = join(packages, `${lock.version}-${lock.bundleSha256}`);
|
|
29
|
+
const cache = lstatSync(precise, { throwIfNoEntry: false }) ? precise : join(packages, lock.version);
|
|
30
|
+
for (let p = resolve(cache); ; p = dirname(p)) {
|
|
31
|
+
if (
|
|
32
|
+
lstatSync(p, { throwIfNoEntry: false })?.isSymbolicLink() &&
|
|
33
|
+
!(process.platform === "darwin" && ["/var", "/tmp"].includes(p))
|
|
34
|
+
)
|
|
35
|
+
throw new Error("SYMLINK_CACHE");
|
|
36
|
+
if (dirname(p) === p) break;
|
|
37
|
+
}
|
|
38
|
+
const bytes = readFileSync(join(cache, "bundle.json"));
|
|
39
|
+
if (createHash("sha256").update(bytes).digest("hex") !== lock.bundleSha256)
|
|
40
|
+
throw new Error("BUNDLE_INTEGRITY_MISMATCH");
|
|
41
|
+
// Verify every file before importing any installed executable module.
|
|
42
|
+
const manifest = JSON.parse(bytes);
|
|
43
|
+
for (const [name, hash] of Object.entries(manifest.files || {})) {
|
|
44
|
+
if (
|
|
45
|
+
name.startsWith("/") ||
|
|
46
|
+
name.split("/").some((x) => !x || x === "..") ||
|
|
47
|
+
name.includes("\\")
|
|
48
|
+
)
|
|
49
|
+
throw new Error("INVALID_BUNDLE_PATH");
|
|
50
|
+
const path = join(cache, name);
|
|
51
|
+
for (let p = path; p !== cache; p = dirname(p)) {
|
|
52
|
+
if (lstatSync(p).isSymbolicLink()) throw new Error("SYMLINK_CACHE");
|
|
53
|
+
}
|
|
54
|
+
if (createHash("sha256").update(readFileSync(path)).digest("hex") !== hash)
|
|
55
|
+
throw new Error("BUNDLE_INTEGRITY_MISMATCH");
|
|
56
|
+
}
|
|
57
|
+
const skillRoot = resolve(dirname(fileURLToPath(import.meta.url)), ".."),
|
|
58
|
+
skillName = basename(skillRoot);
|
|
59
|
+
const expected = Object.fromEntries(
|
|
60
|
+
Object.entries(manifest.files)
|
|
61
|
+
.filter(([key]) => key.startsWith("skills/" + skillName + "/"))
|
|
62
|
+
.map(([key, value]) => [
|
|
63
|
+
key.slice(("skills/" + skillName + "/").length),
|
|
64
|
+
value,
|
|
65
|
+
])
|
|
66
|
+
);
|
|
67
|
+
const actual = {};
|
|
68
|
+
function walk(dir) {
|
|
69
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
70
|
+
const path = join(dir, entry.name);
|
|
71
|
+
if (entry.isSymbolicLink()) throw new Error("SKILL_VERSION_MISMATCH");
|
|
72
|
+
if (entry.isDirectory()) walk(path);
|
|
73
|
+
else
|
|
74
|
+
actual[relative(skillRoot, path).split("\\").join("/")] = createHash(
|
|
75
|
+
"sha256"
|
|
76
|
+
)
|
|
77
|
+
.update(readFileSync(path))
|
|
78
|
+
.digest("hex");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
walk(skillRoot);
|
|
82
|
+
if (
|
|
83
|
+
!Object.keys(expected).length ||
|
|
84
|
+
Object.keys(actual).length !== Object.keys(expected).length ||
|
|
85
|
+
Object.entries(actual).some(([k, v]) => expected[k] !== v)
|
|
86
|
+
)
|
|
87
|
+
throw new Error("SKILL_VERSION_MISMATCH");
|
|
88
|
+
const { main } = await import(pathToFileURL(join(cache, "runtime/cli.mjs")));
|
|
89
|
+
await main(args);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
console.log(
|
|
92
|
+
JSON.stringify({
|
|
93
|
+
protocolVersion: 1,
|
|
94
|
+
status: "failed",
|
|
95
|
+
nextActions: ["Use the exact business project directory for setup and subsequent commands. If its lock is missing, run the trusted complete package setup --project <that-directory> --agent <host>; do not copy a parent lock or bypass verification. Preserve existing caches; use the lock's exact version and digest."],
|
|
96
|
+
errorCode:
|
|
97
|
+
e.code === "ENOENT"
|
|
98
|
+
? "TOOLCHAIN_NOT_INSTALLED"
|
|
99
|
+
: /^[A-Z][A-Z0-9_]*(?::|$)/.exec(e.message)?.[0].replace(/:$/, "") ||
|
|
100
|
+
"LAUNCHER_FAILED",
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
process.exitCode = 3;
|
|
104
|
+
}
|