Skip to content
Documentation
On this page

App deployment · Local source with the CLI (continued)

App deployment · Local source with the CLI (continued) from the built-in skills in Executor 2.0.0-beta.79.

This page covers Local source with the CLI from the built-in skills shipped with Executor 2.0.0-beta.79. It contains app-authoring/deploy.md.

Previous: App deployment · Next: App deployment · Carry source as data

Local source with the CLI

Executor offers no type check of its own, over MCP or otherwise. Without npm access, check the source against framework.describe signatures, deploy, and tell the user it was not type-checked.

Neither this check nor the build reads tsconfig.json; --ignoreConfig skips it. A tsconfig.json is still useful for editors, but its include does not add files here, so name the declaration file in the command.

Write relative imports as NodeNext requires: import { provider } from "./provider.js" loads provider.ts, in server and UI files alike. The build fails at an import that matches no deployed file. Failed builds report the source file and line when known. node_modules is never uploaded. Keep lockfiles out of the directory. Verify the running behavior as described in SKILL.md. After a deploy, start a new execute to discover the app’s tools.

Deploy through MCP

MCP exposes skills for these docs and execute for programs. Model and browser modes also expose resume for pending approvals and tool input. Both local and hosted expose an Executor management app. First discover its exact signatures with execute:

return await tools.search({ query: "Executor" });

Search returns items with the exact callable path, the first line of the description and the input type on one line. namespaces lists each app, with its linked accounts, once. A page holds at most limit items, 10 by default, and ends sooner at its size budget. remaining counts the matches after it; call tools.search(next), with next as the whole input, for the following page, until next is null. An item with inputTruncated has a longer input type than search shows.

Read the whole signature, with the output type, and the whole description before relying on a result’s shape:

return await tools.search.describe({ paths: ["<path from search>"] });

A path that names no tool is returned in missing with the closest paths. Hosted exposes tools generated from its OpenAPI spec under tools.executor. Self-host serves the same API as Executor Cloud, so follow the hosted examples there; the local examples are for Executor on the user’s own machine. Discover and call context.get({}) to read the organization approved for this MCP connection. Its result has organization, slug and role. Use organization explicitly in management calls. Never guess me or default, and do not search local files for an organization or credentials.

return await tools.executor.apps.deploy({
  path: { organization: "<approved-organization-id>" },
  body: {
    name: "Hello",
    files: [
      { path: "index.ts", content: "<contents of index.ts>" },
      { path: "package.json", content: "<package.json pinning the framework.release version>" },
    ],
  },
});

For an app you will edit, use the create, commit and deploy workflow. Local and hosted management apps generate appManagement.create, appManagement.source, appManagement.commit, appManagement.deploy, and appManagement.copy from the serving OpenAPI contracts. Discover their exact signatures first. They use ordinary app IDs, with route parameters under path and request payloads under body.

Create always takes complete files: index.ts, such as the hello app above, and a package.json that pins the exact apps version framework.release returns:

const executor = tools.executor;
const path = { organization: "<approved-organization-id>" };
const { version } = await executor.framework.release({ path });
const files = [
  { path: "index.ts", content: "<contents of index.ts>" },
  {
    path: "package.json",
    content: JSON.stringify({
      name: "hello",
      private: true,
      type: "module",
      dependencies: { apps: version },
    }),
  },
];
const app = await executor.appManagement.create({ path, body: { name: "Hello", files } });
return await executor.appManagement.deploy({ path: { ...path, app: app.id }, body: { files } });

Local has no organization: omit path for framework.release and create, and pass path: { app: app.id } to deploy.

A new app runs only once deployed; its tools and appUi.location answer only after the first deploy. Deploy the same { files } straight after create, as above, or read appManagement.source and deploy the commit create saved with body: { commit: source.revision.commit }.

To change the app, read its working source and save the complete file list with expected: source.revision.commit and a commit message. Deploy the revision.commit that appManagement.commit returns with body: { commit }, not the expected commit you read before editing, or deploy a complete file list with body: { files }. Supply exactly one. appManagement.deploy takes the app ID in path and does not accept name, expected or expectedVersion. Commits and Git pushes do not change the running version. A copy is another normal app with fresh Git history and no accounts or app data. Running apps copy their deployed source and deploy the copy. Unfinished apps copy their working files and remain undeployed.

Publishing reads a scoped name and optional description from package.json. The scope is the organization’s current one, <slug>.executor.community, such as @acme.executor.community/notes. After the organization is renamed, change the scope to the new slug before publishing again; the listing keeps its label. The public listing points to the selected Git commit. Normal npm dependencies are supported; version is optional author metadata and does not select an Executor release. Apps cannot depend on other Executor apps; include the source an app needs directly.

Copy a public app with appManagement.copy, using from: { package, commit } and a new name. Owned apps use the same operation with from: { app }. This creates an independent app and Git repository with empty account selections. Republishing or unpublishing the original does not change installed copies. A changed listing must be reviewed again before installation. Local and self-host consume the public registry; publish on the cloud host after pushing the source there. Agents edit their owned copy through normal app tools.

Hosted deploy currently creates a new named app and returns the app directly. It rejects an existing name. Use source commits and deploy by app ID for edits. After deploying, start a new execute to discover and call its tools. Other hosted operations include organization.inventory, organization.catalog, apps.install, apps.importCustom, apps.get, appUi.location, appAccounts operations, and apps.remove. Always read their discovered signatures before calling them.

For hosted account setup, request a connection for the requirement. The host derives its owner and subject from the caller, and completing it links the new account to that requirement. Use appAccounts.userConnect for a user requirement, which links it for you, and appAccounts.appConnect for an app requirement, which links it for everyone and needs edit access to the app:

return await tools.executor.appAccounts.userConnect({
  path: { organization: "<approved-organization-id>", app: "<app-id>", requirement: "vercel" },
  body: {}, // required, even when empty
});

To use an account you already have, appAccounts.userGet (or appAccounts.appGet) lists the accounts you could link, and appAccounts.userLink (or appAccounts.appLink) links one.

Give the returned url to the user. It opens Executor’s signed-in browser form; credentials and OAuth are completed there. Check progress with accounts.connection, passing path.organization and path.connection; a failed sign-in leaves its error in state.failure.

Access depends on the app as well as the caller’s role. Any member can deploy a new app; it starts private, with the deployer as its creator. The creator and organization owners and administrators manage it: they rename it, activate a version, change its audience, remove it, and connect or link its app requirements with their own accounts. Using an app (calling its tools, opening its UI, userConnect and userLink) follows its audience: a private app only by its creator, even for administrators; a groups app by members of those groups; an everyone app by every member. Managing an app does not grant its use. Every saved account is personal: only its owner uses or manages it, and an app link is how one account serves every caller. An MCP connection limited to selected apps can only find and run those apps’ tools; deploying and other management calls need a connection to all apps. The server rechecks the caller’s grant, current membership and these rules on every API call. The management app’s caller credential is never saved as an account.

The remaining management examples use the local product’s API, not self-host’s. Both management apps derive operations from their product OpenAPI contracts. Operation names use <group>_<operation>; inputs use path, query, and body. Read discovered signatures because the two products have different routes. Use the returned app ID for API arguments and its name-derived slug for the agent namespace. Send the actual source string in files[].content.

const executor = tools.executor;
return await executor.apps.deploy({
  body: {
    owner: "local",
    name: "Hello",
    files: [
      { path: "index.ts", content: "<contents of index.ts>" },
      { path: "package.json", content: "<package.json pinning the framework.release version>" },
    ],
  },
});

The response contains app and version. Local creates every app under the local owner, whatever owner you send. Creating an app with the same name again fails with AppNameTaken. To deploy an existing app, use body: { owner: app.owner, app: app.id, files } or body: { owner: app.owner, app: app.id, commit }. Deploying activates the new build after it succeeds and does not save working source. Use relative file paths such as index.ts and lib/client.ts.

Discovery is prepared at the start of each execute. In a new execution, call the deployed app using its returned app.slug:

return await tools["<app-slug>"].hello({});

App source and execute code run in different environments. App source can import packages and use fetch. An execute program can call exposed tools and transform data, but has no direct imports, fetch, filesystem or process APIs. Do not place defineApp declarations directly in execute code; deploy them as source strings through apps.deploy.

Was this page helpful?