Orchestration HTTP API
@lastshotlabs/slingshot-orchestration can mount a Hono router that exposes task and
workflow execution over HTTP.
Enabling routes
Section titled “Enabling routes”createOrchestrationPackage({ adapter, tasks, workflows, routes: true, routePrefix: '/orchestration', routeMiddleware: [requireAdmin],});Typical middleware looks exactly like any other Hono middleware:
import type { MiddlewareHandler } from 'hono';
export const requireAdmin: MiddlewareHandler = async (c, next) => { const user = c.get('user'); if (!user || !user.roles?.includes('admin')) { return c.json({ error: 'forbidden' }, 403); } await next();};When routes are enabled, routeMiddleware must be non-empty. That is enforced as a hard setup
error so orchestration endpoints are never accidentally exposed without a guard.
Handlers note
Section titled “Handlers note”Orchestration route setup is direct: import middleware and pass it directly.
Routes
Section titled “Routes”Start a task
Section titled “Start a task”POST /orchestration/tasks/:name/runs
{ "input": { "email": "user@example.com" }, "idempotencyKey": "signup-123", "priority": 10, "tags": { "domain": "signup" }, "metadata": { "source": "admin-ui" }}Start a workflow
Section titled “Start a workflow”POST /orchestration/workflows/:name/runs
Fetch a run
Section titled “Fetch a run”GET /orchestration/runs/:id
Cancel a run
Section titled “Cancel a run”DELETE /orchestration/runs/:id
List runs
Section titled “List runs”GET /orchestration/runs
Supported query filters currently include:
typenamestatuslimitoffset
Send a signal
Section titled “Send a signal”POST /orchestration/runs/:id/signal/:signalName
Adapters without signal support return 501 Not Implemented.
Tenant propagation
Section titled “Tenant propagation”If the request context already carries tenantId, the route layer forwards that into the
orchestration run options automatically. That keeps runs scoped consistently with the rest of the
app surface.