Skip to content
Documentation
On this page

Framework versions and upgrades

Pin dependencies.apps with executor apps framework, understand how hosts build pinned versions, and upgrade apps past 0.0.1-beta.38 and 0.0.1-beta.90.

Every Executor app pins an exact apps framework version in package.json under dependencies.apps. Check the version your host runs with executor apps framework (or tools.executor.framework.release over MCP), keep existing deployed versions running without interruption, and apply breaking-change upgrade notes when bumping dependencies.apps. Framework pinning and upgrades work on Local, Self-host, and Cloud.

The command that matters most: run executor apps framework against your target host and copy the returned version (for example 0.0.1-beta.148) verbatim into dependencies.apps in package.json.

Prerequisites and permissions: an existing app and edit/deploy permission (Local owner, or app creator / organization admin or owner on Cloud and Self-host; see Build an app).

You’ll know it worked when… executor apps deploy builds cleanly against the pinned apps version, activates the new version, and the app’s tools load without protocol or declaration errors.

How to use it

1. Check your host’s apps version

  • Local: run executor apps framework (starts the local background Executor if needed).
  • Cloud: run executor apps login if you have not already, then executor apps framework.
  • Self-host: run executor apps framework --host https://executor.example.com (after executor apps login --host https://executor.example.com).

When dependencies.apps matches the host’s own version, the host supplies its bundled apps package directly during build. When dependencies.apps pins a different exact version, the host installs that version from npm during build. Already-deployed versions continue running on the framework build they were deployed with until you deploy a new version.

2. Upgrade across breaking framework changes

If you are updating an older app to your host’s current apps version, check whether its previous dependencies.apps predates either of these breaking releases and apply the changes below before deploying.

Upgrading from before 0.0.1-beta.90 (account and schedule scopes)

  1. Bump dependencies.apps in package.json to the version printed by executor apps framework.
  2. Move account requirements from { accounts: { github } } to { user: { accounts: { github } } } (or {} when an app has no accounts).
  3. Update handlers from ctx.accounts.github to ctx.user.accounts.github (and workflow steps from step.accounts to step.user.accounts). Inside a defineApp factory, guard ctx.user (ctx.user?.accounts.service ?? []) because the factory also runs without a caller for app-scope work.
  4. Scope webhook accounts from account: "github" to account: { user: "github" } (or { app: "service" } for an app-scoped account).
  5. Replace cron and interval with userCron and userInterval for per-member schedules, or appCron and appInterval for single app-wide schedules without user requirements. App-wide schedule mutations cannot declare approval, and their handler context must be typed MutationContext<typeof requirements, "app">. Converting an existing user schedule to an app schedule deletes existing members’ schedule copies, history, and pending approvals when deployed, and the app schedule starts paused.
  6. Optionally move shared team credentials to app: { accounts: { ... } } and read them from ctx.app.accounts. Existing member links do not carry over; an app manager links the shared account on the app’s Accounts tab after deploying.

Upgrading from before 0.0.1-beta.38 (document database to SQLite)

  1. Bump dependencies.apps in package.json to the version printed by executor apps framework.
  2. Remove database: defineDatabase(...) from requirements and drop defineDatabase, table, id, and userId imports.
  3. Add migrations/0001_init.sql creating your tables and copying any existing rows from _executor_legacy_rows (table_name, id, body) using json_extract(body, '$.field'). _executor_legacy_rows exists in every app database (empty on fresh apps), so the same migration works for both upgraded and newly copied apps. Legacy tables are not deleted.
  4. Rewrite ctx.db calls to synchronous ctx.sql.exec(...) and ctx.sql.transaction(...) (see App storage and SQLite). Drop await on SQL statements, alias snake_case columns if callers expect camelCase, and ensure workflow step mutations perform writes inside a single ctx.sql.transaction(...).

Example

Checking the host’s version and updating package.json and index.ts from pre-beta.90 requirements:

executor apps framework
# { "version": "0.0.1-beta.148" }
{
  "name": "github-issues-app",
  "private": true,
  "dependencies": {
    "apps": "0.0.1-beta.148"
  }
}
import { defineApp, object, query, router, string } from "apps";
import { github } from "./provider.ts";

const requirements = { user: { accounts: { github } } };

const whoami = query(
  {
    description: "Return the connected GitHub account ID",
    input: object({}),
    output: object({ accountId: string() }),
  },
  async ({ user }) => ({ accountId: user.accounts.github.id }),
);

export default defineApp(requirements, { tools: router({ whoami }) });

Deploy with executor apps deploy --app <app-id> --files ./my-app and confirm the build passes without removed-API errors.

Limits

  • Exact version required: dependencies.apps must be an exact version string; omitting it fails the build with the host’s version to add.
  • No automatic migration of running versions: upgrading your CLI or Executor server does not rebuild already-deployed app versions. Each app stays on its deployed build until you deploy again.
  • Protocol drift on very old pins: an app pinned to a much older apps version can fail with host protocol errors or spend extra work listing large APIs; bump dependencies.apps to executor apps framework and redeploy.
  • Legacy schedule conversion is destructive: changing a user schedule declaration to appCron or appInterval removes members’ saved schedule copies, run history, and pending approvals on deploy.

Was this page helpful?