@tuya-sat/microapp-kit 0.0.0-stage → 0.1.26-alpha.0
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 +45 -0
- package/MAINTAINING.md +143 -0
- package/README.md +53 -2
- package/START-HERE.md +40 -0
- package/bootstrap/build-install-page.mjs +44 -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 +64 -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 +110 -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 +41 -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 +98 -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 +38 -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/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 +213 -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 +48 -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 +60 -0
- package/skills/micro-app-development/references/toolchain-access.md +33 -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,367 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import { DEFAULT_REGISTRY_ENDPOINT } from '../../resources/scripts/registry-client.mjs';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync, chmodSync, symlinkSync, realpathSync } from 'node:fs';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { tmpdir } from 'node:os';
|
|
7
|
+
import { randomUUID, createHash, createHmac } from 'node:crypto';
|
|
8
|
+
import { EventEmitter } from 'node:events';
|
|
9
|
+
import { spawnSync } from 'node:child_process';
|
|
10
|
+
import { authOperation, resolveDeveloperCredentials } from '../auth/manager.mjs';
|
|
11
|
+
import { systemStore, targets, runStore } from '../auth/store.mjs';
|
|
12
|
+
import { hiddenInput } from '../auth/hidden-input.mjs';
|
|
13
|
+
import { prepareSession, runSession, sessionStatus } from '../auth/session.mjs';
|
|
14
|
+
import { publishRelease } from '../publication.mjs';
|
|
15
|
+
import { tarFixture } from './helpers/tar-fixture.mjs';
|
|
16
|
+
|
|
17
|
+
const endpoint = DEFAULT_REGISTRY_ENDPOINT;
|
|
18
|
+
const testCredentials = { developerCode: 'fixture-app-key', secret: 'fixture-secret-value' };
|
|
19
|
+
const digest = value => createHash('sha256').update(value).digest('hex');
|
|
20
|
+
function fixture(t) {
|
|
21
|
+
const root = realpathSync(mkdtempSync(join(tmpdir(), 'microapp-auth-')));
|
|
22
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
23
|
+
const project = join(root, 'project'), stateRoot = join(root, 'auth'), output = join(root, 'release');
|
|
24
|
+
mkdirSync(project);
|
|
25
|
+
mkdirSync(join(output, 'build/frontend/package'), { recursive: true });
|
|
26
|
+
mkdirSync(join(output, 'artifacts'));
|
|
27
|
+
writeFileSync(join(output, 'build/frontend/package/manifest.json'), JSON.stringify({ appName: 'auth-demo-123-customer' }));
|
|
28
|
+
const front = tarFixture({ 'package/index.html': 'front-fixture' });
|
|
29
|
+
const back = tarFixture({ 'server.mjs': 'back-fixture' });
|
|
30
|
+
writeFileSync(join(output, 'artifacts/source.tgz'), front);
|
|
31
|
+
writeFileSync(join(output, 'artifacts/backend-context.tgz'), back);
|
|
32
|
+
writeFileSync(join(output, 'artifacts/release-artifacts.json'), JSON.stringify({
|
|
33
|
+
format: 'v6-release-artifacts-v2', build: { microAppCode: 'auth-demo-123-customer', microAppCodeSource: 'publication', backendRequired: true, databaseRequired: false },
|
|
34
|
+
static: { file: 'source.tgz', sha256: digest(front) },
|
|
35
|
+
backend: { file: 'backend-context.tgz', sha256: digest(back) },
|
|
36
|
+
}));
|
|
37
|
+
return { root, project, stateRoot, output, environment: {}, bundleSha256: 'a'.repeat(64) };
|
|
38
|
+
}
|
|
39
|
+
function fakeStore({ available = true, error } = {}) {
|
|
40
|
+
const state = { reads: 0, deletes: 0 };
|
|
41
|
+
return { state, provider: 'macos-keychain', available: async () => available,
|
|
42
|
+
instructions: id => ({ entries: targets(id) }),
|
|
43
|
+
read: async () => { state.reads++; if (error) throw Object.assign(new Error('private-key-provider-error'), { code: error }); return { ...testCredentials }; },
|
|
44
|
+
remove: async () => { state.deletes++; },
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function stateText(root) {
|
|
48
|
+
let result = '';
|
|
49
|
+
for (const name of readdirSync(root, { withFileTypes: true })) {
|
|
50
|
+
const path = join(root, name.name);
|
|
51
|
+
result += name.isDirectory() ? stateText(path) : readFileSync(path, 'utf8');
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
test('priority guidance reuses a configured system store, then host injection, then user-terminal fallback', async t => {
|
|
57
|
+
const f = fixture(t), store = fakeStore();
|
|
58
|
+
let result = await authOperation('guide', { ...f, store });
|
|
59
|
+
assert.deepEqual(result.priority, ['system', 'session']);
|
|
60
|
+
assert.equal(result.providers.find(p => p.source === 'environment').requiresHostSecretInjection, false);
|
|
61
|
+
assert.equal(result.recommended, 'system');
|
|
62
|
+
result = await authOperation('guide', { ...f, store, environment: { SDF_APP_KEY: testCredentials.developerCode, SDF_SECRET_KEY: testCredentials.secret } });
|
|
63
|
+
assert.equal(result.recommended, 'environment');
|
|
64
|
+
assert.deepEqual(result.priority, ['system', 'environment', 'session']);
|
|
65
|
+
result = await authOperation('guide', { ...f, store: fakeStore({ available: false }) });
|
|
66
|
+
assert.equal(result.recommended, 'session');
|
|
67
|
+
assert.match(result.nextActions[0], /Prepare release session/);
|
|
68
|
+
assert.doesNotMatch(result.nextActions[0], /Check whether the host/);
|
|
69
|
+
result = await authOperation('guide', { ...f, store: fakeStore({ available: false }), environment: { SDF_APP_KEY: 'partial' } });
|
|
70
|
+
assert.equal(result.recommended, 'session');
|
|
71
|
+
assert.deepEqual(result.priority, ['system', 'session']);
|
|
72
|
+
const config = await authOperation('configure', { ...f, store });
|
|
73
|
+
assert.equal(config.status, 'needs-user-action');
|
|
74
|
+
assert.equal(store.state.reads, 0);
|
|
75
|
+
assert.doesNotMatch(JSON.stringify(config), /fixture-app-key|fixture-secret/);
|
|
76
|
+
await authOperation('check', { ...f, store });
|
|
77
|
+
result = await authOperation('guide', { ...f, store, environment: { SDF_APP_KEY: 'other', SDF_SECRET_KEY: 'other' } });
|
|
78
|
+
assert.equal(result.recommended, 'system');
|
|
79
|
+
assert.equal(result.authState, 'configured');
|
|
80
|
+
assert.equal(store.state.reads, 1, 'guide does not read or export secrets');
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test('system check binds a profile; a later independent invocation resolves it without environment credentials', async t => {
|
|
84
|
+
const f = fixture(t), store = fakeStore();
|
|
85
|
+
const first = await authOperation('configure', { ...f, store });
|
|
86
|
+
assert.equal((await authOperation('configure', { ...f, store })).profileRef, first.profileRef);
|
|
87
|
+
const checked = await authOperation('check', { ...f, store });
|
|
88
|
+
assert.equal(checked.serverVerification, 'unknown');
|
|
89
|
+
const { workspaceTarget, ...resolved } = await resolveDeveloperCredentials({ ...f, store: fakeStore() });
|
|
90
|
+
assert.equal(workspaceTarget.environment, 'production');
|
|
91
|
+
assert.deepEqual(resolved, { baseUrl: endpoint, ...testCredentials });
|
|
92
|
+
assert.doesNotMatch(stateText(f.stateRoot), /fixture-app-key|fixture-secret-value/);
|
|
93
|
+
assert.doesNotMatch(JSON.stringify(checked), /fixture-app-key|fixture-secret-value/);
|
|
94
|
+
const logout = await authOperation('logout', { ...f, store });
|
|
95
|
+
assert.equal(logout.credentialsRetained, true);
|
|
96
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, store }), { code: 'DEVELOPER_CREDENTIALS_REQUIRED' });
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test('store failure or account/endpoint conflicts never silently selects another credential source', async t => {
|
|
100
|
+
const f = fixture(t), store = fakeStore();
|
|
101
|
+
await authOperation('configure', { ...f, store });
|
|
102
|
+
await authOperation('check', { ...f, store });
|
|
103
|
+
const environment = { SDF_APP_KEY: 'host-key', SDF_SECRET_KEY: 'host-secret' };
|
|
104
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, environment, store: fakeStore({ error: 'AUTH_STORE_LOCKED' }) }), { code: 'AUTH_STORE_LOCKED' });
|
|
105
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, environment, store }), { code: 'AUTH_SOURCE_CONFLICT' });
|
|
106
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, store, environment: { SDF_ENDPOINT: 'https://other.example' } }), { code: 'WORKSPACE_ENVIRONMENT_CONFLICT' });
|
|
107
|
+
const { workspaceTarget, ...injected } = await resolveDeveloperCredentials({ ...f, environment, store, source: 'environment' });
|
|
108
|
+
assert.equal(workspaceTarget.environment, 'production');
|
|
109
|
+
assert.deepEqual(injected, { baseUrl: endpoint, developerCode: 'host-key', secret: 'host-secret' });
|
|
110
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, environment: { SDF_APP_KEY: 'half' }, source: 'environment' }), { code: 'DEVELOPER_CREDENTIALS_REQUIRED' });
|
|
111
|
+
await assert.rejects(resolveDeveloperCredentials({ ...f, store: { ...store, read: async () => ({ developerCode: 'changed', secret: 'new' }) } }), { code: 'AUTH_ACCOUNT_CHANGED' });
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
test('failed checks retain the original binding and local forget requires explicit confirmation', async t => {
|
|
115
|
+
const f = fixture(t), store = fakeStore();
|
|
116
|
+
await authOperation('configure', { ...f, store });
|
|
117
|
+
await authOperation('check', { ...f, store });
|
|
118
|
+
await authOperation('configure', { ...f, store });
|
|
119
|
+
await assert.rejects(authOperation('check', { ...f, store: fakeStore({ error: 'AUTH_ENTRY_MISSING' }) }), { code: 'AUTH_ENTRY_MISSING' });
|
|
120
|
+
assert.equal((await authOperation('status', { ...f, store })).bindingConfigured, true);
|
|
121
|
+
assert.equal((await authOperation('status', { ...f, store })).authState, 'setup_required');
|
|
122
|
+
await assert.rejects(authOperation('forget', { ...f, store }), { code: 'AUTH_FORGET_CONFIRMATION_REQUIRED' });
|
|
123
|
+
assert.equal(store.state.deletes, 0);
|
|
124
|
+
assert.equal((await authOperation('forget', { ...f, store, confirmForget: true })).platformRevoked, false);
|
|
125
|
+
assert.equal(store.state.deletes, 1);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test('private auth state rejects project-local paths, permissive files and symlinks', async t => {
|
|
129
|
+
const f = fixture(t), store = fakeStore();
|
|
130
|
+
await assert.rejects(authOperation('configure', { ...f, stateRoot: join(f.project, 'auth'), store }), { code: 'WORKSPACE_STATE_INSIDE_PROJECT' });
|
|
131
|
+
await authOperation('configure', { ...f, store });
|
|
132
|
+
const pending = join(f.stateRoot, 'pending', digest(f.project) + '.json');
|
|
133
|
+
chmodSync(pending, 0o644);
|
|
134
|
+
if (process.platform !== 'win32') await assert.rejects(authOperation('check', { ...f, store }), { code: 'AUTH_STATE_PERMISSIONS' });
|
|
135
|
+
chmodSync(pending, 0o600);
|
|
136
|
+
rmSync(pending);
|
|
137
|
+
symlinkSync(join(f.root, 'outside'), pending);
|
|
138
|
+
await assert.rejects(authOperation('check', { ...f, store }), /SYMLINK|AUTH_STATE/);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
for (const platform of ['darwin', 'win32', 'linux']) {
|
|
142
|
+
test(platform + ' store adapter uses exact names and private output, never key arguments', async () => {
|
|
143
|
+
const id = randomUUID(), calls = [];
|
|
144
|
+
const store = systemStore({ platform, run: async (command, args) => {
|
|
145
|
+
calls.push({ command, args });
|
|
146
|
+
return { code: 0, output: calls.length === 1 ? '' : (calls.length === 2 ? testCredentials.developerCode : testCredentials.secret) + (platform === 'win32' ? '' : '\n') };
|
|
147
|
+
} });
|
|
148
|
+
assert.equal(await store.available(), true);
|
|
149
|
+
assert.deepEqual(await store.read(id), testCredentials);
|
|
150
|
+
assert.doesNotMatch(JSON.stringify(calls), /fixture-app-key|fixture-secret-value/);
|
|
151
|
+
assert.match(JSON.stringify(calls), new RegExp(id));
|
|
152
|
+
assert.equal(store.instructions(id).entries.length, 2);
|
|
153
|
+
const broken = systemStore({ platform, run: async () => ({ code: 99, output: 'private-key-provider-error' }) });
|
|
154
|
+
await assert.rejects(broken.read(id), error => error.code === 'AUTH_STORE_UNAVAILABLE' && !error.message.includes('private-key'));
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
test('OS helper child environment excludes publishing and model credentials', async () => {
|
|
159
|
+
const result = await runStore(process.execPath, ['-e', "process.stdout.write(JSON.stringify({key:process.env.SDF_SECRET_KEY,model:process.env.OPENAI_API_KEY,bus:process.env.DBUS_SESSION_BUS_ADDRESS,ok:1}))"], {
|
|
160
|
+
environment: { PATH: process.env.PATH, SDF_SECRET_KEY: 'must-not-inherit', OPENAI_API_KEY: 'must-not-inherit', DBUS_SESSION_BUS_ADDRESS: 'unix:path=/fixture/bus' },
|
|
161
|
+
});
|
|
162
|
+
assert.equal(result.code, 0);
|
|
163
|
+
assert.equal(result.output, '{"bus":"unix:path=/fixture/bus","ok":1}');
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test('separate CLI consumers reuse a system binding without exporting credentials or keeping the setup process alive', t => {
|
|
167
|
+
const f = fixture(t);
|
|
168
|
+
const helper = join(f.root, 'fake-secret-tool.mjs');
|
|
169
|
+
writeFileSync(helper, `const args = process.argv.slice(2);
|
|
170
|
+
if (args[0] !== '--help') process.stdout.write(args.at(-1) === 'app-key' ? 'fixture-app-key\\n' : 'fixture-secret-value\\n');`);
|
|
171
|
+
const program = `
|
|
172
|
+
import { authOperation, resolveDeveloperCredentials } from ${JSON.stringify(new URL('../auth/manager.mjs', import.meta.url).href)};
|
|
173
|
+
import { systemStore, runStore } from ${JSON.stringify(new URL('../auth/store.mjs', import.meta.url).href)};
|
|
174
|
+
const [action, project, stateRoot, helper] = process.argv.slice(1);
|
|
175
|
+
const environment = { PATH: process.env.PATH };
|
|
176
|
+
const store = systemStore({ platform: 'linux', environment,
|
|
177
|
+
run: (command, args, options) => runStore(process.execPath, [helper, ...args], options) });
|
|
178
|
+
const options = { project, stateRoot, environment, store };
|
|
179
|
+
if (action === 'setup') {
|
|
180
|
+
await authOperation('configure', options);
|
|
181
|
+
process.stdout.write(JSON.stringify(await authOperation('check', options)));
|
|
182
|
+
} else {
|
|
183
|
+
const value = await resolveDeveloperCredentials(options);
|
|
184
|
+
process.stdout.write(JSON.stringify({ complete: Boolean(value.developerCode && value.secret) }));
|
|
185
|
+
}`;
|
|
186
|
+
for (const action of ['setup', 'read']) {
|
|
187
|
+
const child = spawnSync(process.execPath, ['--input-type=module', '-e', program, action, f.project, f.stateRoot, helper], {
|
|
188
|
+
env: { PATH: process.env.PATH }, encoding: 'utf8', timeout: 10_000,
|
|
189
|
+
});
|
|
190
|
+
assert.equal(child.status, 0, child.stderr);
|
|
191
|
+
assert.doesNotMatch(child.stdout + child.stderr + stateText(f.stateRoot), /fixture-app-key|fixture-secret-value/);
|
|
192
|
+
assert.equal(JSON.parse(child.stdout)[action === 'setup' ? 'authState' : 'complete'], action === 'setup' ? 'configured' : true);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
test('hidden input never echoes typed characters and restores terminal state after input or cancellation', async () => {
|
|
197
|
+
for (const cancel of [false, true]) {
|
|
198
|
+
const input = new EventEmitter(), output = { isTTY: true, value: '', write(text) { this.value += text; } };
|
|
199
|
+
Object.assign(input, { isTTY: true, isRaw: false, setRawMode(value) { this.isRaw = value; }, resume() {}, pause() {} });
|
|
200
|
+
const result = hiddenInput('Secret Key', { input, output });
|
|
201
|
+
input.emit('data', Buffer.from(cancel ? 'private-typed\u0003' : 'private-typed\r'));
|
|
202
|
+
if (cancel) await assert.rejects(result, { code: 'AUTH_INPUT_CANCELLED' });
|
|
203
|
+
else assert.equal(await result, 'private-typed');
|
|
204
|
+
assert.equal(output.value, 'Secret Key: \n');
|
|
205
|
+
assert.equal(input.isRaw, false);
|
|
206
|
+
}
|
|
207
|
+
assert.throws(() => hiddenInput('Secret', { input: { isTTY: false }, output: { isTTY: true } }), { code: 'AUTH_USER_TERMINAL_REQUIRED' });
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
function mockMos() {
|
|
211
|
+
const state = { front: null, backend: null, registrations: 0, uploads: 0, requests: [], lose: false };
|
|
212
|
+
const ok = result => ({ ok: true, status: 200, json: async () => ({ success: true, result }) });
|
|
213
|
+
const missing = code => ({ ok: true, status: 200, json: async () => ({ success: false, code }) });
|
|
214
|
+
async function fetchImpl(url, options) {
|
|
215
|
+
assert.equal(url.origin, endpoint);
|
|
216
|
+
const h = options.headers;
|
|
217
|
+
assert.equal(h.sign, createHmac('sha256', testCredentials.secret).update(h.developerCode + h.t + h.nonce).digest('hex').toUpperCase());
|
|
218
|
+
if (url.pathname.endsWith('registry-smarthome')) {
|
|
219
|
+
if (options.method === 'POST') {
|
|
220
|
+
state.registrations++;
|
|
221
|
+
state.requests.push(options.body.get('requestId'));
|
|
222
|
+
state.front = { taskId: 'front-1', microAppCode: 'auth-demo-123-customer', status: 'ACCEPTED' };
|
|
223
|
+
if (state.lose) { state.lose = false; throw new Error('private-key-provider-error'); }
|
|
224
|
+
return ok(state.front);
|
|
225
|
+
}
|
|
226
|
+
return state.front ? ok({ ...state.front, status: 'SUCCESS', backendRequired: true, databaseRequired: false, releaseId: 'release-1', microAppVersion: '0.0.0-1' }) : missing('SMARTHOME_TASK_NOT_FOUND');
|
|
227
|
+
}
|
|
228
|
+
if (url.pathname.endsWith('backend-build')) {
|
|
229
|
+
if (options.method === 'POST') {
|
|
230
|
+
state.uploads++;
|
|
231
|
+
state.requests.push(options.body.get('requestId'));
|
|
232
|
+
state.backend = { buildTaskId: 'build-1', microAppCode: 'auth-demo-123-customer', releaseId: 'release-1', status: 'QUEUED' };
|
|
233
|
+
return ok(state.backend);
|
|
234
|
+
}
|
|
235
|
+
return state.backend ? ok({ ...state.backend, status: 'COMPLETE', backendRegistered: true, imageTag: 'v-20261020093000123-0123456789abcdef', imageDigest: 'sha256:' + 'a'.repeat(64) }) : missing('1002');
|
|
236
|
+
}
|
|
237
|
+
throw new Error('unexpected-request');
|
|
238
|
+
}
|
|
239
|
+
return { state, fetchImpl };
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
test('temporary worker drives the full real publication core while the Agent observes only sanitized progress', async t => {
|
|
243
|
+
const f = fixture(t), p = mockMos();
|
|
244
|
+
const prepared = prepareSession(f), actions = [], snapshots = [];
|
|
245
|
+
assert.equal(prepared.status, 'needs-user-action');
|
|
246
|
+
assert.ok(prepared.userCommand.args.includes('session-run'));
|
|
247
|
+
const result = await runSession({ ...f, sessionId: prepared.sessionId,
|
|
248
|
+
prompt: async field => field === 'App Key' ? testCredentials.developerCode : testCredentials.secret,
|
|
249
|
+
publish: (action, options) => { actions.push(action); return publishRelease(action, { ...options, fetchImpl: p.fetchImpl }); },
|
|
250
|
+
sleep: async () => { snapshots.push(sessionStatus({ ...f, sessionId: prepared.sessionId })); },
|
|
251
|
+
});
|
|
252
|
+
assert.equal(result.status, 'complete');
|
|
253
|
+
assert.deepEqual(actions, ['publish', 'status', 'resume', 'status']);
|
|
254
|
+
assert.equal(p.state.registrations, 1);
|
|
255
|
+
assert.equal(p.state.uploads, 1);
|
|
256
|
+
assert.equal(sessionStatus({ ...f, sessionId: prepared.sessionId }).artifactsReady, true);
|
|
257
|
+
assert.doesNotMatch(stateText(f.stateRoot) + stateText(f.output) + JSON.stringify([prepared, result, snapshots]), /fixture-app-key|fixture-secret-value|private-key-provider-error/);
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
test('temporary session resumes the same request after unknown upload response and rejects changed input', async t => {
|
|
261
|
+
const f = fixture(t), p = mockMos(), prepared = prepareSession(f);
|
|
262
|
+
p.state.lose = true;
|
|
263
|
+
const options = { ...f, sessionId: prepared.sessionId,
|
|
264
|
+
prompt: async field => field === 'App Key' ? testCredentials.developerCode : testCredentials.secret,
|
|
265
|
+
publish: (action, options) => publishRelease(action, { ...options, fetchImpl: p.fetchImpl }), sleep: async () => {},
|
|
266
|
+
};
|
|
267
|
+
assert.equal((await runSession(options)).status, 'unknown');
|
|
268
|
+
const original = JSON.parse(readFileSync(join(f.output, 'publication.json')));
|
|
269
|
+
assert.equal((await runSession(options)).status, 'complete');
|
|
270
|
+
assert.equal(sessionStatus({ ...f, sessionId: prepared.sessionId }).errorCode, undefined);
|
|
271
|
+
assert.equal(p.state.registrations, 1);
|
|
272
|
+
assert.equal(JSON.parse(readFileSync(join(f.output, 'publication.json'))).frontendRequestId, original.frontendRequestId);
|
|
273
|
+
writeFileSync(join(f.output, 'artifacts/source.tgz'), 'modified');
|
|
274
|
+
await assert.rejects(runSession(options), /RELEASE_ARTIFACT_MISMATCH/);
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test('only one session worker can publish an output at a time and interrupted leases can resume', async t => {
|
|
278
|
+
const f = fixture(t), prepared = prepareSession(f);
|
|
279
|
+
let unblock, entered;
|
|
280
|
+
const waiting = new Promise(resolve => { entered = resolve; });
|
|
281
|
+
const input = new Promise(resolve => { unblock = resolve; });
|
|
282
|
+
const worker = runSession({ ...f, sessionId: prepared.sessionId,
|
|
283
|
+
prompt: async () => { entered(); return input; },
|
|
284
|
+
publish: async () => ({ status: 'complete', stage: 'ARTIFACTS_READY' }),
|
|
285
|
+
});
|
|
286
|
+
await waiting;
|
|
287
|
+
const second = prepareSession(f);
|
|
288
|
+
await assert.rejects(runSession({ ...f, sessionId: second.sessionId,
|
|
289
|
+
prompt: () => assert.fail('second worker must not prompt'),
|
|
290
|
+
}), { code: 'AUTH_BUSY' });
|
|
291
|
+
unblock('synthetic-input');
|
|
292
|
+
assert.equal((await worker).status, 'complete');
|
|
293
|
+
const interrupted = prepareSession(f);
|
|
294
|
+
const lease = join(f.stateRoot, 'leases', digest(realpathSync(f.output)));
|
|
295
|
+
mkdirSync(lease + '.lock', { mode: 0o700 });
|
|
296
|
+
writeFileSync(lease + '.json', JSON.stringify({ pid: 2147483647, sessionId: interrupted.sessionId }), { mode: 0o600 });
|
|
297
|
+
assert.equal(sessionStatus({ ...f, sessionId: interrupted.sessionId }).status, 'interrupted');
|
|
298
|
+
assert.equal((await runSession({ ...f, sessionId: interrupted.sessionId,
|
|
299
|
+
prompt: async () => 'synthetic-input',
|
|
300
|
+
publish: async () => ({ status: 'complete', stage: 'ARTIFACTS_READY' }),
|
|
301
|
+
})).status, 'complete');
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
test('temporary worker rejects wrong bundle and non-TTY input before any platform service request', async t => {
|
|
305
|
+
const f = fixture(t), prepared = prepareSession(f);
|
|
306
|
+
await assert.rejects(runSession({ ...f, sessionId: prepared.sessionId, bundleSha256: 'b'.repeat(64) }), /PROJECT_VERSION_MISMATCH/);
|
|
307
|
+
const result = await runSession({ ...f, sessionId: prepared.sessionId,
|
|
308
|
+
prompt: () => hiddenInput('Secret', { input: { isTTY: false }, output: { isTTY: false } }),
|
|
309
|
+
publish: () => assert.fail('must not call platform service'),
|
|
310
|
+
});
|
|
311
|
+
assert.equal(result.errorCode, 'AUTH_USER_TERMINAL_REQUIRED');
|
|
312
|
+
assert.doesNotMatch(stateText(f.stateRoot), /fixture-secret/);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
test('temporary publication failures preserve only approved actionable reasons', async t => {
|
|
316
|
+
const f = fixture(t);
|
|
317
|
+
for (const reasonCode of ['MICRO_APP_SOURCE_ARCHIVE_UNSAFE', 'private-key-provider-error']) {
|
|
318
|
+
const prepared = prepareSession(f);
|
|
319
|
+
const result = await runSession({ ...f, sessionId: prepared.sessionId,
|
|
320
|
+
prompt: async () => 'synthetic-input',
|
|
321
|
+
publish: async () => ({ status: 'failed', stage: 'FAILED', reasonCode, message: 'private-key-provider-error' }),
|
|
322
|
+
});
|
|
323
|
+
assert.equal(result.status, 'failed');
|
|
324
|
+
assert.ok(result.nextActions.length);
|
|
325
|
+
assert.equal(result.reasonCode, reasonCode.startsWith('MICRO_APP_') ? reasonCode : undefined);
|
|
326
|
+
assert.doesNotMatch(JSON.stringify(result) + stateText(f.stateRoot), /private-key-provider-error/);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
test('temporary session exposes the failed build log tail to the original Agent without credentials', async t => {
|
|
331
|
+
const f = fixture(t), prepared = prepareSession(f);
|
|
332
|
+
const result = await runSession({ ...f, sessionId: prepared.sessionId,
|
|
333
|
+
prompt: async () => 'synthetic-input',
|
|
334
|
+
publish: async () => ({ status: 'failed', stage: 'FAILED', reasonCode: 'INFRA_FAILED', buildTaskId: '10',
|
|
335
|
+
buildLogs: { status: 'complete', text: 'Type error in src/app.ts', available: true, truncated: false } }),
|
|
336
|
+
});
|
|
337
|
+
assert.equal(result.buildTaskId, '10');
|
|
338
|
+
assert.equal(result.buildLogs.text, 'Type error in src/app.ts');
|
|
339
|
+
assert.equal(sessionStatus({ ...f, sessionId: prepared.sessionId }).buildLogs.text, 'Type error in src/app.ts');
|
|
340
|
+
assert.doesNotMatch(JSON.stringify(result) + stateText(f.stateRoot), /synthetic-input/);
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
test('system-store credentials sign log queries and a locked store never silently changes account', async t => {
|
|
344
|
+
const { publicationLogs } = await import('../publication.mjs');
|
|
345
|
+
const f = fixture(t), p = mockMos(), store = fakeStore();
|
|
346
|
+
await authOperation('configure', { ...f, store });
|
|
347
|
+
await authOperation('check', { ...f, store });
|
|
348
|
+
await publishRelease('publish', { ...f, credentialStore: store, fetchImpl: p.fetchImpl });
|
|
349
|
+
await publishRelease('resume', { ...f, credentialStore: store, fetchImpl: p.fetchImpl });
|
|
350
|
+
let queries = 0;
|
|
351
|
+
const fetchImpl = async (url, request) => {
|
|
352
|
+
if (!url.pathname.endsWith('/logs')) return p.fetchImpl(url, request);
|
|
353
|
+
queries++;
|
|
354
|
+
const h = request.headers;
|
|
355
|
+
assert.equal(h.sign, createHmac('sha256', testCredentials.secret)
|
|
356
|
+
.update(h.developerCode + h.t + h.nonce).digest('hex').toUpperCase());
|
|
357
|
+
return { ok: true, json: async () => ({ success: true, result: {
|
|
358
|
+
text: testCredentials.secret + ' Type error', available: true, truncated: false } }) };
|
|
359
|
+
};
|
|
360
|
+
const logs = await publicationLogs({ ...f, credentialStore: store, fetchImpl });
|
|
361
|
+
assert.equal(logs.text, '[REDACTED] Type error');
|
|
362
|
+
assert.equal(queries, 1);
|
|
363
|
+
await assert.rejects(publicationLogs({ ...f, fetchImpl,
|
|
364
|
+
credentialStore: fakeStore({ error: 'AUTH_STORE_LOCKED' }) }), { code: 'AUTH_STORE_LOCKED' });
|
|
365
|
+
assert.equal(queries, 1);
|
|
366
|
+
assert.doesNotMatch(stateText(f.stateRoot) + JSON.stringify(logs), /fixture-secret-value/);
|
|
367
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, mkdirSync, writeFileSync, readFileSync, rmSync, cpSync, existsSync, readdirSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { tmpdir } from 'node:os';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { setup } from '../setup.mjs';
|
|
8
|
+
import { execute } from '../cli.mjs';
|
|
9
|
+
import { initialize } from '../../resources/scripts/init-project.mjs';
|
|
10
|
+
import { validateProject } from '../../skills/micro-app-development/scripts/validate-micro-app-project.mjs';
|
|
11
|
+
|
|
12
|
+
const bundleRoot = fileURLToPath(new URL('../../', import.meta.url));
|
|
13
|
+
const json = path => JSON.parse(readFileSync(path, 'utf8'));
|
|
14
|
+
function fixture(t) {
|
|
15
|
+
const root = mkdtempSync(join(tmpdir(), 'kit-consistency-'));
|
|
16
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
17
|
+
return { root, project: join(root, 'project'), home: join(root, 'home'), state: join(root, 'state') };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
test('initialization preserves design notes and host files without moving them or allowing reinitialization', async t => {
|
|
21
|
+
const f = fixture(t);
|
|
22
|
+
await setup({ bundleRoot, project: f.project, home: f.home, agent: 'workbuddy' });
|
|
23
|
+
mkdirSync(join(f.project, 'docs'));
|
|
24
|
+
mkdirSync(join(f.project, '.workbuddy'));
|
|
25
|
+
writeFileSync(join(f.project, 'docs/design.md'), 'Confirmed business requirements');
|
|
26
|
+
writeFileSync(join(f.project, '.workbuddy/memory.md'), 'Existing agent notes');
|
|
27
|
+
const args = ['project', 'init', '--project', f.project, '--state-root', f.state,
|
|
28
|
+
'--content-words', 'device inspection', '--upgrade-support-projects', 'false'];
|
|
29
|
+
const result = await execute(args);
|
|
30
|
+
assert.equal(result.status, 'complete');
|
|
31
|
+
assert.equal(readFileSync(join(f.project, 'docs/design.md'), 'utf8'), 'Confirmed business requirements');
|
|
32
|
+
assert.equal(readFileSync(join(f.project, '.workbuddy/memory.md'), 'utf8'), 'Existing agent notes');
|
|
33
|
+
const identity = readFileSync(join(f.project, 'resource-project.json'), 'utf8');
|
|
34
|
+
await assert.rejects(execute(args), /PROJECT_NOT_EMPTY/);
|
|
35
|
+
assert.equal(readFileSync(join(f.project, 'resource-project.json'), 'utf8'), identity);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('initialization refuses existing business material even when documentation and host metadata are present', async t => {
|
|
39
|
+
const f = fixture(t);
|
|
40
|
+
await setup({ bundleRoot, project: f.project, home: f.home, agent: 'codex' });
|
|
41
|
+
mkdirSync(join(f.project, 'docs'));
|
|
42
|
+
writeFileSync(join(f.project, 'package.json'), '{"name":"existing-project"}');
|
|
43
|
+
await assert.rejects(execute(['project', 'init', '--project', f.project, '--state-root', f.state,
|
|
44
|
+
'--content-words', 'device inspection', '--upgrade-support-projects', 'false']), /PROJECT_NOT_EMPTY/);
|
|
45
|
+
assert.equal(json(join(f.project, 'package.json')).name, 'existing-project');
|
|
46
|
+
assert.equal(existsSync(join(f.project, 'resource-project.json')), false);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('adding the locked backend template requires syncing the original identity without changing frontend identity', t => {
|
|
50
|
+
const f = fixture(t);
|
|
51
|
+
initialize([f.project, '--content-words', 'device inspection', '--upgrade-support-projects', 'false']);
|
|
52
|
+
const manifestPath = join(f.project, 'micro-app/manifest.json');
|
|
53
|
+
const before = json(manifestPath);
|
|
54
|
+
const identityPath = join(f.project, 'resource-project.json');
|
|
55
|
+
const identity = json(identityPath);
|
|
56
|
+
cpSync(join(bundleRoot, 'resources/template/backend'), join(f.project, 'backend'), { recursive: true });
|
|
57
|
+
writeFileSync(identityPath, JSON.stringify({ ...identity, backendIncluded: true, databaseRequired: true }));
|
|
58
|
+
writeFileSync(manifestPath, JSON.stringify({ ...before, customBackendServer: { required: true },
|
|
59
|
+
apis: [{ type: 'CustomAPI', method: 'GET', path: `/custom-aicoding-api/${identity.microAppCode}/api/records` }] }));
|
|
60
|
+
assert.ok(validateProject(join(f.project, 'micro-app')).some(f => f.code === 'customApi.identity'));
|
|
61
|
+
writeFileSync(join(f.project, 'backend/src/microapp-identity.json'), JSON.stringify({ microAppCode: identity.microAppCode }));
|
|
62
|
+
assert.equal(validateProject(join(f.project, 'micro-app')).some(f => f.code === 'customApi.identity'), false);
|
|
63
|
+
assert.equal(json(join(f.project, 'micro-app/src/microapp-identity.json')).microAppCode, identity.microAppCode);
|
|
64
|
+
assert.equal(json(manifestPath).universalId, before.universalId);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('shared guidance references are self-contained after package installation', async t => {
|
|
68
|
+
const f = fixture(t);
|
|
69
|
+
await setup({ bundleRoot, project: f.project, home: f.home, agent: 'codex' });
|
|
70
|
+
const skills = join(f.project, '.agents/skills');
|
|
71
|
+
function check(directory) {
|
|
72
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
73
|
+
const path = join(directory, entry.name);
|
|
74
|
+
if (entry.isDirectory()) check(path);
|
|
75
|
+
else if (entry.name.endsWith('.md') && (path.endsWith('SKILL.md') || path.includes('/references/'))) {
|
|
76
|
+
for (const [, target] of readFileSync(path, 'utf8').matchAll(/\]\(([^)]+)\)/g)) {
|
|
77
|
+
if (target.includes('://') || target.startsWith('#')) continue;
|
|
78
|
+
assert.ok(existsSync(new URL(target.split('#')[0], 'file://' + path)), `Broken installed link: ${path}: ${target}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
check(skills);
|
|
84
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { prepare } from '../dev-provider.mjs';
|
|
7
|
+
|
|
8
|
+
test('an outdated DEV contract gives an English repair action before preparing services', async t => {
|
|
9
|
+
const root = mkdtempSync(join(tmpdir(), 'dev-provider-output-'));
|
|
10
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
11
|
+
mkdirSync(join(root, 'backend'));
|
|
12
|
+
writeFileSync(join(root, 'resource-project.json'), JSON.stringify({ databaseRequired: false }));
|
|
13
|
+
writeFileSync(join(root, 'backend/preview-contract.json'), JSON.stringify({ version: 'old-contract' }));
|
|
14
|
+
const previous = process.env.MICRO_APP_PREVIEW_STATE_DIR;
|
|
15
|
+
process.env.MICRO_APP_PREVIEW_STATE_DIR = join(root, 'state');
|
|
16
|
+
try {
|
|
17
|
+
await assert.rejects(prepare({ projectDir: root, environment: 'DEV' }), error => {
|
|
18
|
+
assert.match(error.message, /Sync.*backend DEV parser.*authorization.*preview-contract\.json/);
|
|
19
|
+
assert.match(error.message, /rebuild.*preview/i);
|
|
20
|
+
assert.doesNotMatch(error.message, /[\p{Script=Han}]/u);
|
|
21
|
+
return true;
|
|
22
|
+
});
|
|
23
|
+
} finally {
|
|
24
|
+
if (previous === undefined) delete process.env.MICRO_APP_PREVIEW_STATE_DIR;
|
|
25
|
+
else process.env.MICRO_APP_PREVIEW_STATE_DIR = previous;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { diagnosticOperation } from '../../resources/scripts/diagnostics.mjs';
|
|
6
|
+
import { safeCliError } from '../errors.mjs';
|
|
7
|
+
|
|
8
|
+
const cli = fileURLToPath(new URL('../../cli.mjs', import.meta.url));
|
|
9
|
+
|
|
10
|
+
test('CLI success and failure keep stdout as one protocol JSON result', () => {
|
|
11
|
+
for (const args of [['help'], ['--unknown-private-token']]) {
|
|
12
|
+
const result = spawnSync(process.execPath, [cli, ...args], {
|
|
13
|
+
encoding: 'utf8',
|
|
14
|
+
env: { ...process.env, SDF_SECRET_KEY: 'never-emit-this-secret' },
|
|
15
|
+
});
|
|
16
|
+
const payload = JSON.parse(result.stdout);
|
|
17
|
+
assert.equal(payload.protocolVersion, 1);
|
|
18
|
+
assert.equal(payload.status, args[0] === 'help' ? 'complete' : 'failed');
|
|
19
|
+
assert.equal(result.status, args[0] === 'help' ? 0 : 3);
|
|
20
|
+
const events = result.stderr.trim().split('\n').map(line => JSON.parse(line));
|
|
21
|
+
assert.equal(events.length, 2);
|
|
22
|
+
assert.equal(events[0].status, 'started');
|
|
23
|
+
assert.equal(events[1].status, args[0] === 'help' ? 'succeeded' : 'failed');
|
|
24
|
+
assert.equal(events[0].runId, events[1].runId);
|
|
25
|
+
assert.equal(events[1].stage, 'command');
|
|
26
|
+
assert.ok(events[1].durationMs >= 0);
|
|
27
|
+
assert.equal(events[1].errorCode, args[0] === 'help' ? null : 'INVALID_OPTION');
|
|
28
|
+
assert.doesNotMatch(result.stdout + result.stderr, /never-emit-this-secret|unknown-private-token/);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('diagnostics select correlation fields and cannot change operation semantics', () => {
|
|
33
|
+
const lines = [];
|
|
34
|
+
const emit = diagnosticOperation('registry.query', 'registry-request', line => lines.push(line));
|
|
35
|
+
const taskId = 'a6b85581-0b80-4c04-9744-515a6d3dbb1e';
|
|
36
|
+
emit('succeeded', {
|
|
37
|
+
httpStatus: 200,
|
|
38
|
+
taskId,
|
|
39
|
+
requestId: 'secret-token',
|
|
40
|
+
url: 'https://private.example/?secret=token',
|
|
41
|
+
secret: 'never-print',
|
|
42
|
+
});
|
|
43
|
+
const event = JSON.parse(lines[1]);
|
|
44
|
+
assert.equal(event.taskId, taskId);
|
|
45
|
+
assert.equal(event.httpStatus, 200);
|
|
46
|
+
assert.equal(event.requestId, undefined);
|
|
47
|
+
assert.doesNotMatch(lines.join(''), /secret-token|private.example|never-print/);
|
|
48
|
+
assert.doesNotThrow(() => diagnosticOperation('doctor', 'command', () => { throw new Error('closed'); })('succeeded'));
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('unknown errors and details never expose raw exception or remote payload', () => {
|
|
52
|
+
for (const error of [
|
|
53
|
+
new Error('https://internal.example secret=credential'),
|
|
54
|
+
Object.assign(new Error('PRIVATE_SECRET_VALUE'), { code: 'PRIVATE_SECRET_VALUE', details: { secret: 'credential' } }),
|
|
55
|
+
]) {
|
|
56
|
+
const failure = safeCliError(error);
|
|
57
|
+
assert.equal(failure.errorCode, 'CLI_OPERATION_FAILED');
|
|
58
|
+
assert.ok(failure.nextActions.length);
|
|
59
|
+
assert.doesNotMatch(JSON.stringify(failure), /internal.example|credential|PRIVATE_SECRET_VALUE/);
|
|
60
|
+
}
|
|
61
|
+
assert.equal(safeCliError({ code: 'ENOENT' }).errorCode, 'REQUIRED_FILE_MISSING');
|
|
62
|
+
assert.equal(safeCliError(new Error('PROJECT_REQUIRED')).errorCode, 'PROJECT_REQUIRED');
|
|
63
|
+
const choice = safeCliError(new Error('Explicit user upgrade-support-projects choice required'));
|
|
64
|
+
assert.equal(choice.errorCode, 'UPGRADE_CHOICE_REQUIRED');
|
|
65
|
+
assert.match(choice.nextActions[0], /Explicit user/);
|
|
66
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { gzipSync } from 'node:zlib';
|
|
2
|
+
|
|
3
|
+
export function tarFixture(files, { stamp = 1, executable = false } = {}) {
|
|
4
|
+
const blocks = [];
|
|
5
|
+
for (const [name, value] of Object.entries(files)) {
|
|
6
|
+
const data = Buffer.from(value), header = Buffer.alloc(512);
|
|
7
|
+
if (Buffer.byteLength(name) > 100) throw new Error('Fixture path too long');
|
|
8
|
+
header.write(name);
|
|
9
|
+
function octal(offset, length, number) {
|
|
10
|
+
header.write(number.toString(8).padStart(length - 1, '0') + '\0', offset, length, 'ascii');
|
|
11
|
+
}
|
|
12
|
+
octal(100, 8, executable ? 0o755 : 0o644);
|
|
13
|
+
octal(108, 8, 1000);
|
|
14
|
+
octal(116, 8, 1000);
|
|
15
|
+
octal(124, 12, data.length);
|
|
16
|
+
octal(136, 12, stamp);
|
|
17
|
+
header.fill(32, 148, 156);
|
|
18
|
+
header[156] = 48;
|
|
19
|
+
header.write('ustar\0', 257);
|
|
20
|
+
header.write('00', 263);
|
|
21
|
+
octal(148, 8, header.reduce((sum, byte) => sum + byte, 0));
|
|
22
|
+
blocks.push(header, data, Buffer.alloc((512 - data.length % 512) % 512));
|
|
23
|
+
}
|
|
24
|
+
return gzipSync(Buffer.concat([...blocks, Buffer.alloc(1024)]));
|
|
25
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, readdirSync, readFileSync, rmSync, existsSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { buildInstallPage, INSTALL_PAGE } from '../../bootstrap/build-install-page.mjs';
|
|
7
|
+
import { verifyBundle } from '../integrity.mjs';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
const bundle = fileURLToPath(new URL('../../', import.meta.url));
|
|
10
|
+
|
|
11
|
+
test('guide generation produces one versioned instruction page without executable installers or extra state', t => {
|
|
12
|
+
const root = mkdtempSync(join(tmpdir(), 'simple install page '));
|
|
13
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
14
|
+
const directory = join(root, 'guide');
|
|
15
|
+
const result = buildInstallPage(directory);
|
|
16
|
+
assert.deepEqual(readdirSync(directory), [INSTALL_PAGE]);
|
|
17
|
+
assert.equal(result.version, verifyBundle(bundle).version);
|
|
18
|
+
const page = readFileSync(result.file, 'utf8');
|
|
19
|
+
assert.equal(page.includes('{{GUIDE_VERSION}}'), false);
|
|
20
|
+
assert.equal(page.includes('{{PACKAGE_NAME}}'), false);
|
|
21
|
+
assert.ok(page.includes('@tuya-sat/microapp-kit@' + result.version));
|
|
22
|
+
assert.equal(page.includes('@xuqinghua/microapp-kit'), false);
|
|
23
|
+
assert.match(page, /中国网络优先从 https:\/\/registry\.npmmirror\.com\//);
|
|
24
|
+
assert.match(page, /中国以外用 https:\/\/registry\.npmjs\.org\//);
|
|
25
|
+
assert.match(page, /E404\/ETARGET或对应归档404[\s\S]*回退 https:\/\/registry\.npmjs\.org\/ 一次[\s\S]*保持包名、精确版本/);
|
|
26
|
+
assert.match(page, /不改全局\/项目.npmrc/);
|
|
27
|
+
assert.match(page, /已有官方dist.integrity时同时比较/);
|
|
28
|
+
assert.doesNotMatch(page, /registry为https:\/\/registry\.npmjs\.org\/|不换版本或来源/);
|
|
29
|
+
const links = [...page.matchAll(/\]\(([^)]+)\)/g)].map(match => new URL(match[1]));
|
|
30
|
+
assert.ok(links.some(url => url.pathname.endsWith('/SHASUMS256.txt')));
|
|
31
|
+
assert.ok(links.every(url => url.protocol === 'https:' && url.hostname === 'nodejs.org'));
|
|
32
|
+
assert.throws(() => buildInstallPage(directory), /OUTPUT_EXISTS/);
|
|
33
|
+
assert.deepEqual(readdirSync(directory), [INSTALL_PAGE]);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('guide generation refuses output inside its source and missing output without writing', t => {
|
|
37
|
+
assert.throws(() => buildInstallPage(), /OUTPUT_REQUIRED/);
|
|
38
|
+
const directory = join(bundle, 'forbidden-guide-output');
|
|
39
|
+
assert.throws(() => buildInstallPage(directory), /OUTPUT_INSIDE_SOURCE/);
|
|
40
|
+
assert.equal(existsSync(directory), false);
|
|
41
|
+
});
|