@owlmeans/web-flow
Web-specific flow service — extends @owlmeans/client-flow with URL query parameter persistence and browser navigation.
Overview
makeFlowService(alias?) — creates a flow service that reads/writes flow state from URL query params
appendFlowService(ctx, alias?) — registers the flow service in the context
- Adds
goHome(alias?, dryRun?) to navigate to the configured home service URL
QUERY_PARAM / SERVICE_PARAM — query parameter names for flow and service routing
Installation
bun add @owlmeans/web-flow@^0.2.3
Usage
Register in context setup:
import { appendFlowService } from '@owlmeans/web-flow'
appendFlowService(context)
Use the flow service in a component:
import type { FlowService } from '@owlmeans/web-flow'
import { STD_OIDC_FLOW } from '@owlmeans/flow'
const flowSrv = context.service<FlowService>('flow')
await flowSrv.ready()
const flow = await flowSrv.begin(STD_OIDC_FLOW)
flow.target(IAM_WL)
flow.entity(entityId)
const transit = flow.serialize()
const url = `${authUrl}?flow=${transit}`
window.open(url, '_blank')
API
makeFlowService(alias?): FlowService
Creates a flow service. On initialization, reads ?flow= and ?service= from the current URL to resume in-progress flows.
appendFlowService<C, T>(ctx, alias?): T
Appends the flow service to the context. Returns the context.
FlowService
Extends ClientFlowService with:
goHome(alias?, dryRun?): Promise<string> — navigate to the home URL for the service
Constants
QUERY_PARAM — 'flow' — URL query parameter carrying serialized flow state
SERVICE_PARAM — 'service' — URL query parameter for service routing
Related Packages
@owlmeans/client-flow — FlowService base and createFlowClient
@owlmeans/flow — STD_OIDC_FLOW, FlowModel, FlowConfig
@owlmeans/web-client — registers this service when makeContext is called with flow support
Agent guidance
This package ships embedded agent skills under agent-meta/. After installing your
@owlmeans/* packages, run the OwlMeans agent-skills installer to place them into
your project's skill store (.agents/skills/):
npx @owlmeans/agent-skills@^0.2.3
The embedded files are version-matched to this package release. Do not edit them
directly — they are regenerated on each publish. To contribute guidance edits,
open a PR against the source monorepo.