Skip to content

Discussion: Shortcuts on OpenStation, abilities as actions #915

Open

Description

@juanlentino

This is a discussion issue, not a request to build anything yet. It sketches what an Apple Shortcuts-style layer could look like on OpenStation, because most of the pieces already exist.

It also takes #73 into account: automations were kept out of the foundation to keep the desktop thin. Everything below can live in a separate app or plugin. The only core question is at the end.

The seminal ideas

1. Abilities are the actions. A Shortcuts action is a typed step with inputs, outputs, and a permission. That is exactly what a WordPress ability is (wp_register_ability(), with input and output schemas and a permission callback). Any plugin that registers abilities would contribute actions for free, the way iOS apps expose App Intents. No new action API.

2. A shortcut is data. An ordered list of ability calls, where a step's input can reference an earlier step's output. It stores as JSON, exports and imports, diffs, and reviews like any other content.

3. The agent writes them. The agent runner already chains abilities and records every tool call in order. "Save this run as a shortcut" turns a one-off conversation into a repeatable, deterministic routine the user can inspect and edit. Describe it once, run it forever.

4. Deterministic runs cost no tokens. A shortcut replays ability calls directly on the server, with no model in the loop. Only steps that are themselves AI abilities (summarize, draft) spend tokens, and only for that step. Moving repeated agent tasks into shortcuts is a cost reduction, not an increase.

5. The desktop is the launcher. A shortcut can live where the user already works: a dock item, a desktop icon, a widget button, a keyboard binding, the command palette.

6. WordPress is the trigger system. Beyond manual runs, a shortcut can run on a schedule (WP-Cron) or on an event the site already emits (a post is published, a comment arrives, an order is placed). That is Shortcuts' Automation tab, with hooks WordPress has had for years.

The hard parts

  • Trust. A shared shortcut runs with the permissions of whoever runs it. Before the first run, show what it will do, and confirm any step that writes. Each ability's own permission callback still applies at run time.
  • Failure. When step 3 of 5 fails, stop, show every step's result, and leave recovery to the user rather than attempting a rollback.
  • Unattended AI. An AI step on a schedule or a busy event keeps spending with nobody watching. Mark AI steps, give each shortcut a daily cap (in the spirit of the existing per-agent limit), and require a confirmation before an AI shortcut can be attached to a trigger.
  • The editor. A visual builder is most of the work. A first version can store and run JSON with a read-only step view, and grow an editor later.

The core question

If this lives outside the foundation, what is the smallest seam the desktop would need to host it well? For example: a way for an app to add launchable entries to the dock and command palette, and a documented way to run an ability chain on behalf of the current user. Is that something the desktop should offer, or should it all stay in the app?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions