MYTOOLBOX · DEVELOPER PLATFORM

Third-party module developer guide

Build Work Mode cards with HTML, CSS, and JavaScript, then connect to MyToolbox through a host-managed Bridge, on-demand authorization, isolated encryption, and seven-day audits.

Current protocolSchema 12 · Compatible with Schema 1–11

12current schema
3runtime surfaces
100 MBpackage limit
512files per package
QUICK START

Start with a card that works offline.

The smallest module is a folder ending in .mytoolbox-workmodule. Its first screen must remain understandable without a network connection, cookies, or granted permissions.

01

Create the package

Add manifest.json and index.html. settings.json and assets are optional.

02

Declare a stable identity

Use a permanent reverse-domain identifier, semantic version, bilingual names, an SF Symbol, and a safe relative entry point.

03

Build an offline first screen

Show meaningful text, controls, images, SVG, or Canvas within four seconds instead of waiting on authorization.

04

Call the public Bridge

Use window.mytoolbox.request. Permissions are determined by operation; manifest self-declarations do not grant capabilities.

05

Verify lifecycle behavior

Handle denial, offline mode, stop, reload, and mytoolbox-plugin-stop while cancelling timers and requests.

06

Import and inspect

Use Plugin Center to verify detected permissions, supported surfaces, audits, encrypted data, and signing identity.

PACKAGE

Minimum package structure

Runtime Cache and Data are created by the host and must not ship in the package. Absolute paths, symbolic links, and .. traversal are rejected.

Example.mytoolbox-workmodule/
├── manifest.json
├── index.html
├── settings.json          # optional native settings
└── assets/                # optional bundled assets
MANIFEST

Schema 12 manifest

The manifest describes identity, surfaces, entry point, size, presentation, commands, and controlled host capabilities. A third-party permissions claim does not authorize access by itself.

{
  "schemaVersion": 12,
  "identifier": "dev.example.weather",
  "version": "1.0.0",
  "runtime": "web",
  "names": {"zh-Hans": "城市天气", "en": "City Weather"},
  "summaries": {"zh-Hans": "当前天气", "en": "Current weather"},
  "symbol": "cloud.sun",
  "entryPoint": "index.html",
  "preferredHeight": 220,
  "supportedSurfaces": ["floatingWindow", "menuBar", "horizontalStrip"],
  "cardSizing": {"mode": "content", "minHeight": 120, "maxHeight": 520},
  "minimumAppVersion": "0.4.0"
}

Identity and entry point

  • identifier is permanent and must not collide with built-in or installed modules
  • version uses semantic versioning
  • runtime is fixed to web for third-party modules
  • entryPoint must be a safe relative path inside the package
  • names and summaries should provide both zh-Hans and en

Surfaces and responsive layout

  • supportedSurfaces accepts floatingWindow, menuBar, and horizontalStrip
  • horizontalLayout can define a dedicated entry point and width/height boundaries
  • adaptiveLayout allows constrained host scaling after responsive reflow
  • cardSizing.content lets the host ResizeObserver measure semantic content

Platform capabilities

  • presentation supplies an introduction, gallery, contact, and copyright
  • commandCenter declares up to 24 structured commands
  • services declares controlled macOS services
  • dataTransfer manages encrypted portable data
  • updateActions supports declarative Data/Cache migration only