@owlmeans/web-flow 0.1.18-rc.2 → 0.1.18-rc.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ Web-specific flow service — extends `@owlmeans/client-flow` with URL query par
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- bun add @owlmeans/web-flow
15
+ bun add @owlmeans/web-flow@^0.1.18-rc.16
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -77,7 +77,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
77
77
  your project's skill store (`.agents/skills/`):
78
78
 
79
79
  ```sh
80
- npx @owlmeans/agent-skills
80
+ npx @owlmeans/agent-skills@^0.1.18-rc.15
81
81
  ```
82
82
 
83
83
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-flow",
4
- "version": "0.1.18-rc.0",
5
- "generatedAt": "2026-08-16T22:20:50.516Z",
4
+ "version": "0.1.18-rc.20",
5
+ "generatedAt": "2026-09-12T08:39:52.737Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: web-flow
3
- description: How to use @owlmeans/web-flow — web-specific flow execution and UI state management built on @owlmeans/client-flow. Auto-invoked when importing web flow primitives.
3
+ description: How to use @owlmeans/web-flow — the browser flow service (makeFlowService, appendFlowService) that rehydrates a flow from the URL and redirects between steps, plus useFlow() for the screen currently rendering. Auto-invoked when importing web flow primitives, wiring a flow into a browser app, or carrying flow state across a redirect.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,23 +8,90 @@ user-invocable: false
8
8
  # @owlmeans/web-flow
9
9
 
10
10
  **Layer:** Web (React)
11
- **Install:** `"@owlmeans/web-flow": "^0.1.18-rc.0"` in `dependencies`
11
+ **Install:** `"@owlmeans/web-flow": "^0.1.18-rc.20"` in `dependencies`
12
+
13
+ The browser half of the flow stack: it supplies the `proceed` that `@owlmeans/client-flow` refuses,
14
+ and it reads and writes the query parameter that carries the state.
12
15
 
13
16
  ## Key Exports
14
17
 
15
18
  | Export | Description |
16
19
  |--------|-------------|
17
- | `makeWebFlowService()` | Web flow service factory |
18
- | Helpers | URL/query-string flow state helpers |
19
- | Constants | Flow service aliases |
20
+ | `makeFlowService(alias?)` | The web flow service the basic one plus browser `proceed` and `goHome`, and a `lazyInit` that rehydrates from the URL |
21
+ | `appendFlowService(ctx, alias?)` | Register it together with the `FLOW_STATE` client resource the state persists in |
22
+ | `useFlow(target?)` | The `FlowClient` for the screen currently rendering; `null` until it resolves |
23
+ | `FlowService` | The `client-flow` service plus `goHome(alias?, dryRun?)` |
24
+ | `QUERY_PARAM` (`flow`) · `SERVICE_PARAM` (`service`) | The default state parameter, and the parameter naming the target service |
25
+
26
+ The alias both factories default to is `DEFAULT_ALIAS` (`flow`) from `@owlmeans/client-flow` — this
27
+ package does not re-export it. **Keep that alias.** `useFlow` resolves the service as
28
+ `context.service(DEFAULT_ALIAS)` and `createFlowClient` does the same, both hardcoded, so a service
29
+ registered under any other name is never found and the first `useFlow` throws
30
+ `SyntaxError('Service <alias> not found')`. The `alias` argument builds a second instance for a
31
+ caller that addresses it by hand; nothing on the hook path can reach one.
20
32
 
21
- ## Usage
33
+ ## Wiring
22
34
 
23
35
  ```typescript
24
- import { makeWebFlowService } from '@owlmeans/web-flow'
25
- context.registerService(makeWebFlowService())
36
+ import { appendFlowService } from '@owlmeans/web-flow'
37
+ appendFlowService(context)
26
38
  ```
27
39
 
40
+ ## Reading the flow from the URL
41
+
42
+ `lazyInit` runs after the basic service has loaded its definitions: it reads
43
+ `FlowConfig.queryParam` (defaulting to `QUERY_PARAM`) off `window.location`, restores the model from
44
+ it, and resolves `supplied` — `true` when there was a state, `false` when there was not, and
45
+ rejected with a `ResilientError` when the token was there but unreadable. A screen that awaits
46
+ `state()` therefore learns which of the three happened instead of hanging.
47
+
48
+ ```typescript
49
+ import { useFlow } from '@owlmeans/web-flow'
50
+
51
+ const flow = useFlow()
52
+ if (flow == null) return <Spinner /> // still resolving
53
+ await flow.proceed(flow.flow().next())
54
+ ```
55
+
56
+ `useFlow` prefers an explicit state: when the rendering entrypoint has a `flow` **path parameter**
57
+ it loads that token directly. Otherwise it boots a client against the target named by the `service`
58
+ query parameter, falling back to the argument. It re-resolves when any of those inputs change.
59
+
60
+ ## Two different `proceed`s
61
+
62
+ The `flow.proceed(...)` above is **not** this package's. They are separate methods with separate
63
+ signatures, and only one of them takes `dryRun`:
64
+
65
+ | Call | Whose | What it does |
66
+ |---|---|---|
67
+ | `FlowClient.proceed(transition, req?)` | `@owlmeans/client-flow`, what `useFlow()` hands back | Checks the destination step, transits the model, resolves that step's URL. A **relative** URL is an in-app `nav.navigate` and the document stays; only an `http…` URL is passed down to the service below. It has no `dryRun` — a second argument that is not a request is ignored. |
68
+ | `FlowService.proceed(req?, dryRun?)` | this package, reached through `context.service(...)` | The browser redirect, for the step the model is standing on |
69
+
70
+ `FlowService.proceed` addresses the **current** step's entrypoint with
71
+ `url(request, { absolute: true })`, sets the serialized flow on the result's query string, and
72
+ assigns `document.location.href` — so the receiving app rehydrates from the URL. It returns that
73
+ URL either way, and `dryRun` gets it without leaving the page. A service holding no live model
74
+ raises `UnknownTransition('service.proceed')`, and a current step with no `module` raises
75
+ `FlowStepMissconfigured`.
76
+
77
+ So a step inside the same app is reached without leaving the document; only a step in another
78
+ service becomes a page load.
79
+
80
+ ## Ending a flow
81
+
82
+ `goHome(alias?, dryRun?)` ends a flow by leaving for a service's own home: the alias given, else the
83
+ service route marked default, else this app's. The address is the route's `home`, then
84
+ `cfg.brand.home` — and a hard-coded public address as the last resort, so a service route without a
85
+ `home` sends the user off the application rather than nowhere.
86
+
28
87
  ## Depends On
29
88
 
30
- - `@owlmeans/flow`, `@owlmeans/client-flow`, `@owlmeans/web-client`
89
+ - `@owlmeans/client-flow` (the service and runner this extends), `@owlmeans/flow`
90
+ - `@owlmeans/client`, `@owlmeans/client-context`, `@owlmeans/client-entrypoint`,
91
+ `@owlmeans/client-resource`, `@owlmeans/context`, `@owlmeans/error`
92
+ - `react` (peer)
93
+
94
+ ## Related
95
+
96
+ - [[flow]] — the definition and serialization contract
97
+ - [[client-flow]] — the service and the `FlowClient` this builds on
package/build/helper.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useContext, useModule, useNavigate, useValue } from '@owlmeans/client';
1
+ import { useContext, useEntrypoint, useNavigate, useValue } from '@owlmeans/client';
2
2
  import { createFlowClient } from '@owlmeans/client-flow';
3
3
  import { DEFAULT_ALIAS as FLOW_ALIAS } from '@owlmeans/client-flow';
4
4
  import { QUERY_PARAM, SERVICE_PARAM } from './consts.js';
@@ -6,7 +6,7 @@ export const useFlow = (target = null) => {
6
6
  const context = useContext();
7
7
  const nav = useNavigate();
8
8
  const [query] = context.router().useSearchParams();
9
- const { params } = useModule();
9
+ const { params } = useEntrypoint();
10
10
  const client = useValue(async () => {
11
11
  if (QUERY_PARAM in params && params[QUERY_PARAM] != null) {
12
12
  const service = context.service(FLOW_ALIAS);
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAM,GAAkB,IAAI,EAAqB,EAAE;IACzE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,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AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAQ7C,eAAO,MAAM,eAAe,WAAW,MAAM,KAAmB,WA4E/D,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAC7C,CAAC,UAAS,MAAM,KAAmB,CAQzC,CAAA"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAQ7C,eAAO,MAAM,eAAe,WAAW,MAAM,KAAmB,WA2E/D,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAC7C,CAAC,UAAS,MAAM,KAAmB,CAQzC,CAAA"}
package/build/service.js CHANGED
@@ -21,11 +21,10 @@ export const makeFlowService = (alias = DEFAULT_ALIAS) => {
21
21
  const cfg = service.config();
22
22
  const param = cfg.queryParam ?? QUERY_PARAM;
23
23
  const module = ctx.entrypoint(step.module);
24
- const [url] = await module.call({
24
+ const url = await module.url({
25
25
  ...req,
26
- params: { ...req?.params, [param]: flow.serialize() },
27
- full: true
28
- });
26
+ params: { ...req?.params, [param]: flow.serialize() }
27
+ }, { absolute: true });
29
28
  // const params = new URLSearchParams(req?.query ?? {})
30
29
  // params.set(param, flow.serialize())
31
30
  const redirectUrl = new URL(url);
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,E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,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAE/B,GAAM,EAAE,KAAK,GAAW,aAAa,EAAK,EAAE;IAC5C,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAEtC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAE5B,oBAAoB,CAAO,GAAG,EAAE,UAAU,CAAC,CAAA;IAE3C,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/web-flow",
3
- "version": "0.1.18-rc.2",
3
+ "version": "0.1.18-rc.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,14 +21,14 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/client": "^0.1.18-rc.2",
25
- "@owlmeans/client-context": "^0.1.18-rc.2",
26
- "@owlmeans/client-flow": "^0.1.18-rc.2",
27
- "@owlmeans/client-entrypoint": "^0.1.18-rc.2",
28
- "@owlmeans/client-resource": "^0.1.18-rc.2",
29
- "@owlmeans/context": "^0.1.18-rc.2",
30
- "@owlmeans/error": "^0.1.18-rc.2",
31
- "@owlmeans/flow": "^0.1.18-rc.2"
24
+ "@owlmeans/client": "^0.1.18-rc.19",
25
+ "@owlmeans/client-context": "^0.1.18-rc.16",
26
+ "@owlmeans/client-flow": "^0.1.18-rc.20",
27
+ "@owlmeans/client-entrypoint": "^0.1.18-rc.16",
28
+ "@owlmeans/client-resource": "^0.1.18-rc.16",
29
+ "@owlmeans/context": "^0.1.18-rc.11",
30
+ "@owlmeans/error": "^0.1.18-rc.11",
31
+ "@owlmeans/flow": "^0.1.18-rc.17"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "*"
package/src/helper.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { useContext, useModule, useNavigate, useValue } from '@owlmeans/client'
1
+ import { useContext, useEntrypoint, useNavigate, useValue } from '@owlmeans/client'
2
2
  import { createFlowClient } from '@owlmeans/client-flow'
3
3
  import type { FlowClient, FlowService } from '@owlmeans/client-flow'
4
4
  import { DEFAULT_ALIAS as FLOW_ALIAS } from '@owlmeans/client-flow'
@@ -8,7 +8,7 @@ export const useFlow = (target: string | null = null): FlowClient | null => {
8
8
  const context = useContext()
9
9
  const nav = useNavigate()
10
10
  const [query] = context.router().useSearchParams()
11
- const { params } = useModule()
11
+ const { params } = useEntrypoint()
12
12
  const client = useValue(async () => {
13
13
  if (QUERY_PARAM in params && params[QUERY_PARAM] != null) {
14
14
  const service = context.service<FlowService>(FLOW_ALIAS)
package/src/service.ts CHANGED
@@ -28,11 +28,10 @@ export const makeFlowService = (alias: string = DEFAULT_ALIAS): FlowService => {
28
28
  const param = cfg.queryParam ?? QUERY_PARAM
29
29
 
30
30
  const module = ctx.entrypoint<ClientEntrypoint<string>>(step.module)
31
- const [url] = await module.call<string>({
31
+ const url = await module.url({
32
32
  ...req,
33
- params: { ...req?.params, [param]: flow.serialize() },
34
- full: true
35
- })
33
+ params: { ...req?.params, [param]: flow.serialize() }
34
+ }, { absolute: true })
36
35
 
37
36
  // const params = new URLSearchParams(req?.query ?? {})
38
37
  // params.set(param, flow.serialize())
package/build/.gitkeep DELETED
File without changes