Ada Extensions
Concepts

Manifest

The manifest.json fields; identity, permissions, refresh rate and settings.

Every extension has a manifest.json at its root. adanotch init writes it together with the adanotch/manifest.schema.json schema, so your editor completes the fields and flags mistakes.

manifest.json
{
  "$schema": "./adanotch/manifest.schema.json",
  "id": "local.you.weather",
  "name": "Weather",
  "version": "0.1.0",
  "adanotchVersion": ">=0.1.0",
  "main": "dist/index.js",
  "description": "Your city's temperature in the island.",
  "slots": ["compact", "expanded"],
  "permissions": ["network:api.open-meteo.com"],
  "refresh": "10m",
  "settings": [
    { "key": "city", "type": "text", "label": "City", "default": "Istanbul" },
    { "key": "unit", "type": "select", "label": "Unit", "default": "c",
      "options": [{ "value": "c", "label": "°C" }, { "value": "f", "label": "°F" }] }
  ]
}

Fields

Prop

Type

triggers is no longer used

The old triggers field is ignored. Subscribe to events in code with AdanotchKit.events.on(...). Events and timers

Settings

Each item in settings becomes a control on your extension's page in Settings › Extensions. Its value arrives in code as ctx.settings.<key>.

typeControlValueNote
toggleSwitchboolean
numberNumber fieldnumberunit shows a unit ("min")
textText fieldstring
selectPop-up menustringoptions required
secretSecure field—Not in ctx.settings; read it with secrets.get(key). Can't have a default

Describe the same shape with an interface in code:

interface Settings {
  city: string;
  unit: "c" | "f";
}

AdanotchKit.activity<Settings>({
  async update(ctx) {
    ctx.settings.city; // string
  },
});

For secrets, see Network and secrets.

On this page