For Devs
Build an applet with the Everywear SDK
The Everywear Applet SDK is a TypeScript kit for creating an applet that uses Everywear capabilities. This walkthrough covers SDK 0.2.0. It uses the SDK package archive and compiles the example in a separate project. Native installation and public submissions require a compatible desktop release that advertises those features.
1. Create a TypeScript project
Download the Everywear Applet SDK 0.2.0 and its SHA-256 checksum. In PowerShell, run Get-FileHash ./everywear-ship-applet-sdk-0.2.0.tgz and compare the result with the checksum before installing. Find other releases in the Everywear Applet SDK repository.
With Node.js and npm installed, put the official SDK archive for your version in an empty project folder. Open a terminal there. The following example assumes the SDK 0.2.0 archive is present alongside your project files.
npm init -y
npm pkg set type=module
npm install ./everywear-ship-applet-sdk-0.2.0.tgz
npm install --save-dev typescript@5.9.3
2. Declare your applet and check what it can do
Save this example as src/applet.ts. It names an applet, asks for access, and renders the result of the desktop's decision.
import { defineApplet, type AppletRuntime } from '@everywear-ship/applet-sdk';
export default defineApplet({
manifest: {
name: 'image-capability-sample',
version: '0.1.0',
sdkProtocolVersion: 'ewops/1',
operationCapabilities: ['image.generate'],
requestedPermissions: ['ewds:read', 'operation:start'],
modelProfiles: ['one_magen_default'],
presentationSurfaces: ['inline'],
},
surface: {
render(runtime: AppletRuntime): string {
if (runtime.admission.status === 'blocked') {
return runtime.admission.reasons.join(', ');
}
return runtime.grants.hasOperationCapability('image.generate')
? 'Image generation is available.'
: 'Image generation is unavailable.';
},
},
});
npx tsc --module NodeNext --moduleResolution NodeNext --target ES2022 --strict --outDir dist src/applet.ts
A successful compile produces dist/applet.js. The sample displays a capability status. It requests image generation access and leaves execution to the host.
To try the sample before installing it in Everywear, save this local check as try-applet.mjs and run node try-applet.mjs.
import assert from 'node:assert/strict';
import applet from './dist/applet.js';
function render(status, granted, reasons = []) {
return applet.surface.render({
admission: { status, reasons },
grants: { hasOperationCapability: () => granted },
});
}
assert.equal(render('admitted', true), 'Image generation is available.');
assert.equal(render('admitted', false), 'Image generation is unavailable.');
assert.equal(render('blocked', false, ['Access blocked.']), 'Access blocked.');
console.log('All three applet states passed.');
This check supplies example grants. In Everywear, the desktop supplies the real grants.
3. Work with the desktop theme and permissions
- Use the Everywear Design System (EWDS) so the user's existing theme is the starting point. Keep new styling and theme settings scoped to your applet.
- Use the documented Everywear operations (EWOPS) to ask the host to perform work. Request only the permissions the feature needs and check the grants before offering the action.
- Test the available, unavailable and blocked states in a local example runner. Explain what the user can do in each case. A compatible Everywear build is required to test an installed applet or real engine work.
4. Prepare an update or a community skin
Version the applet separately from the desktop and the SDK. When your applet is ready, follow the packaging and signature instructions for the compatible desktop release. Test the upgrade and rollback against the same compatible desktop and engine versions before distributing the package.
For a skin, start from the documented theme controls and test with more than one base theme. Check the community forum for the Community Skins submission instructions when submissions open.
Use another applet or engine
Request the capability your applet needs under its own identity. Check the grants before offering the action. Everywear controls model access, scheduling and cancellation. A music editor could request audio and import the result onto its timeline. A video editor could request a clip. A handoff to another applet is a separate action, such as opening the clip in an editing project. External music and video rendering still need a compatible host route and installed verification.