Two ways to develop
Write the files by hand: Build the directory following the starter example, then install it from App management in gugu. After changing code, reinstall so gugu validates the new manifest and files. Do not copy or symlink files into gugu’s data directory. Have an Agent in gugu build it: First readguide_read apps and the related topics. app_create writes the directory, app_install installs it, and app_check checks loading, errors, page snapshots, and images. Some tools are found through catalog_list. External editors do not have gugu’s install tools; once the package is ready, a person installs it through App management.
A package that requests no permissions installs directly. Reinstalling an App you already installed usually replaces it directly if it adds no permissions. When a package declares permissions for the first time or adds new ones, gugu shows the person a confirmation sheet. Declining, closing, or timing out does not count as a completed install.
What a page can run
Use semantic HTML by default; the page already has gugu’s styles. Custom drawing or editors use variables such as
--em-background, --em-foreground, and --em-border to follow the light and dark themes. Give icon buttons readable names and give inputs a label.
A normal page may stay alive after it is hidden or moved. Do not rely on switching tabs to trigger a reload. Restarting, upgrading, or revoking permissions reloads the entry page. Write real data to a shared file or the App’s private storage, not only to memory.
Check one real operation
- After installing, confirm the page opens, the error area is clear, and every visible control works.
- Enter and save one item of data, quit the App, reopen it, and check that the item is still there. For a shared App, have a second member check the same file.
- Switch between light and dark themes, narrow the page, and check the keyboard, Chinese input, and button labels.
- Revoke one granted permission and check that the feature explains why it failed. Grant it again and retry.
- Simulate having no data and a read failure, and make sure the two cases look different.
app_check, locate controls by the role and name in the snapshot. You can pass steps such as click, fill, press, and waitFor; the returned page can be used for further operations. Check narrow, light, and dark layouts in the screenshots, not just ok.
If a program fails to start, look at its status and last error output in App management. A tool being installed does not mean the program ran successfully. Pages that call a program must also handle errors.
Manifest validation
Installing validates the manifest with the client’s own schema. Developers who work on the product and have its source environment can also follow the repository’sgugu-extension skill to call safeParseExtensionManifest without starting the interface.
With either validation method, first prepare a manifest that should fail, for example with the id written as notes.starter or apiVersion set to 999, and confirm it is rejected. Then confirm the normal example passes.
Before listing in the market, also run the market validation. Market validation checks the source and the release package. It does not replace acceptance testing of the page’s features.