@atscript/moost-wf
v0.1.72
Published
Workflow form integration for moost — decorators, interceptors, and serialization driven by atscript type metadata
Maintainers
Readme
@atscript/moost-wf
Documentation: ui.atscript.dev
Server-side workflow integration for Moost — decorators, composables, and serialization that pair with @atscript/vue-wf to drive multi-step forms from atscript-annotated .as types.
Part of the atscript-ui monorepo.
What it provides
useAtscriptWf(Type)composable — schema-awareresolveInput()/resolveAction()/requireInput()for step handlers.@WfInput()/@WfAction()parameter decorators — sugar overuseAtscriptWf()with the full action-vs-input policy matrix.useWfActionSlot()for low-level action context access (transport adapters writing the action; raw read+clear flows). Step handlers should preferuseAtscriptWf(Type).resolveAction().- Schema helpers:
serializeFormSchema,extractPassContext,getFormActions. - HTTP outlet integration:
createAsHttpOutlet,handleAsOutletRequest. - Finish-screen envelope helpers:
finishWf,abortWf,isWfFinished, and theWfFinished/WfNext/WfMessage/WfButton/WfActionRequesttypes rendered by<AsWfFinish>. See Finish Screens. - Opt-in persistent state store
AsWfStore(subpath/store) backed by@atscript/db.
The workflow engine catches StepRetriableError (thrown by requireInput()) natively — no global interceptor wiring required.
Install
pnpm add @atscript/moost-wfPeer requirements: moost, @moostjs/event-wf, @wooksjs/event-core, @wooksjs/event-wf, @atscript/core, @atscript/typescript.
Entry points
| Subpath | What it exports |
| ----------------------------- | ---------------------------------------------------------------------------------- |
| @atscript/moost-wf | Workflow decorators, composables, outlet helpers, finish-screen envelope helpers |
| @atscript/moost-wf/plugin | atscript build-time plugin (registers @wf.* annotations) |
| @atscript/moost-wf/store | AsWfStore runtime + AsWfStateRecord model |
| @atscript/moost-wf/store.as | Raw .as source for the workflow-state record — re-import if you customize fields |
License
MIT © Artem Maltsev
