@ossy/automation
v3.8.0
Published
Workspace automation observability — task topology and run history (ADR 0011)
Readme
@ossy/automation
Workspace automation observability UI for the Ossy platform. Read-only views over the build-time task catalog, trigger graph, and workspace task run history — not a workflow designer.
Normative direction: ADR 0011.
Core concepts
| Term | Role in this package |
|------|----------------------|
| Task | Runtime primitive (@ossy/{feature}/tasks/{intent}). Listed as tiles, topology, and run history. |
| Pipeline | Derived graph over task triggers and optional outputs — shown as read-only edges in the catalog UI. |
| Automation | This module: observe topology + runs; manual invoke may come later. |
| Flow | Playwright journey tests only (*.flow.js) — not shown here. |
The home page reads manifest.taskCatalog from app bootstrap (useApp()). Run history reads the workspace projection @ossy/platform/actions/list-task-runs via @ossy/sdk-react.
Pages
| Page | Path | Audience |
|------|------|----------|
| automation/home | /automation | Workspace members (service enabled) |
Enable the module per workspace via the automation service flag (same pattern as booking, calendar, …).
UI surfaces
| Export | File | Description |
|--------|------|-------------|
| AutomationPage | automation.page.jsx | Shell page: catalog tiles, topology, run history |
| TaskCatalogTiles | TaskCatalogTiles.jsx | Cards for event- and schedule-triggered tasks from the catalog |
| TaskCatalogGraph | TaskCatalogGraph.jsx | Read-only trigger → task graph |
| TaskRunList | TaskRunList.jsx | Selectable list of workspace task runs |
| TaskRunDetail | TaskRunDetail.jsx | Side panel for a selected run |
| TaskRunStatusBadge | TaskRunStatusBadge.jsx | Status chip for run list / detail |
Tiles and topology share backgroundAutomations() — invoke-only action tasks belong on the packages catalog, not this page. Translation, transcription, and embeddings are not shown until they exist as *.task.js files.
Task catalog data
Build exports normalized entries via @ossy/schema (extractTaskCatalogEntry, buildTaskCatalogEdges). Each catalog row includes:
id,moduleId,package,triggers,primaryActionId,inputSchemaIds,outputs
Task run projection
// taskRuns.js — action id only; workspace scope from SDK config
export const ListTaskRuns = { id: '@ossy/platform/actions/list-task-runs' }TaskRunList calls read(ListTaskRuns) once; the page owns selection state and passes selectedRun to TaskRunDetail.
Package exports
import { Definition, location } from '@ossy/automation'| Export | Description |
|--------|-------------|
| Definition | Feature metadata (id: 'automation', title, icon, status) |
| location | Resource location prefix for job resources (/@ossy/jobs/) |
React pages and components are loaded by the app manifest — not re-exported from the package entry.
Peer dependencies
| Package | Used for |
|---------|----------|
| @ossy/app | useApp() — task catalog from SSR bootstrap |
| @ossy/design-system | Layout, Page, List, forms |
| @ossy/sdk-react | useSdk, read, run list |
| @ossy/router-react | Page routing (via app shell) |
| react | UI |
Storybook
Generated story: Automation → Pages → Automation. Requires global Storybook bootstrap (.storybook/storybook-bootstrap.js, mock SDK) so useApp() and list-task-runs resolve without a live server.
Discover JSON seeds task ids only; full trigger metadata appears after app build in a real app manifest.
Related packages
| Package | Role |
|---------|------|
| @ossy/schema | Task id grammar, buildTaskCatalogEdges |
| @ossy/platform | Task run projection, MCP task-topology resource |
| @ossy/observability | Structured logging inside task run() handlers |
| @ossy/media-tasks | Example tasks surfaced in the catalog |
Status
v1 is observe-only: catalog tiles, topology, and run history. No workflow designer and no “add task” UI.
