lietzsche;noether
Pages

updated 2026-11-26·3 min read

Managing Your Extension

Semantic and four-part versioning, non-destructive SQLite table migrations via defineTable, graceful unload cleanup, and the 5-tier extension updater pipeline.

1. Semantic Versioning & Release Formats

Noether supports standard Semantic Versioning (MAJOR.MINOR.PATCH / x.y.z) as well as four-part dot-separated versioning (MAJOR.MINOR.PATCH.BUILD / x.y.z.w) for granular sub-patch releases:

  • MAJOR (1.0.0 → 2.0.0): Incompatible changes, breaking API removals, or substantial SQLite schema revisions.
  • MINOR (1.0.0 → 1.1.0): Backwards-compatible new features, newly added commands, or additional MCP tools.
  • PATCH (1.0.0 → 1.0.1): Backwards-compatible bug fixes and performance optimizations.
  • BUILD / REVISION (1.0.1.1 → 1.0.1.2): Minor build revisions, hotfixes, or packaging updates.

2. Managing Database Migrations

If your extension stores relational data as described in Events & Relational Storage, declare tables and versioned migrations through this.defineTable() (ExtensionDatabaseManager):

async onload() {
  this.bookmarksTable = await this.defineTable<BookmarkRow>({
    tableName: 'bookmarks',
    version: 2,
    columns: {
      id: { type: 'text', primaryKey: true },
      url: { type: 'text', nullable: false },
      title: { type: 'text' },
      favorite: { type: 'boolean', default: 0 },
    },
    migrations: {
      2: async (db) => {
        await db.addColumn('bookmarks', 'favorite', {
          type: 'boolean',
          default: 0,
        });
      },
    },
  });
}

defineTable() tracks the active schema version in noether_extension_tables and executes incremental migrations inside a transaction when version increases.

3. Graceful Cleanups on Unload

Whenever an extension is disabled or updated, Noether runs unload(), which invokes onunload() and disposes all tracked resources:

  • Commands, Action Rail icons, status bar items, event listeners (this.onEvent()), and interval timers (this.registerInterval()) clean up automatically.
  • Use onunload() for any custom non-disposable handles (such as manual WebSockets or raw setInterval handles).
export default class SyncExtension extends Extension {
  async onload() {
    // Automatically cancelled when the extension unloads
    this.registerInterval(() => this.runSync(), 60000);
  }

  async onunload() {
    // Release any custom manual handles here if needed
  }
}

4. Native Extension Updates & Automatic Synchronisation

Noether features a multi-tier update manager (app.extensions.updater) that keeps community extensions synchronized with remote repositories and registries:

  • Resilient 5-Tier Fallback Pipeline: Noether queries distribution bundles in deterministic order: (1) Official registry endpoints, (2) Turso edge replicas, (3) GitHub Releases (releases/latest/download/main.js), (4) Raw GitHub CDNs, and (5) Local Vault caches.
  • In-App Checking & Updates: Users can trigger “Check for updates” or “Update all” from Settings → Community Extensions, or upgrade directly via the Community Marketplace.
  • Zero Restart Required: Noether invokes the extension unload lifecycle, writes the updated bundle to .noether/extensions/<id>/, evaluates the new bundle in memory, and re-enables the extension immediately.

For more lifecycle details, read Noether SDK API Reference and Developer Policies & Guidelines.

Search wiki and portfolio

type to search across all entries.