@owlmeans/client-flow 0.1.18-rc.52 → 0.1.18-rc.53
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/client-flow/SKILL.md +1 -1
- package/build/consts.d.ts +3 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +3 -0
- package/build/consts.js.map +1 -1
- package/build/landing.d.ts +2 -16
- package/build/landing.d.ts.map +1 -1
- package/build/landing.js +1 -4
- package/build/landing.js.map +1 -1
- package/build/types.d.ts +12 -1
- package/build/types.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/consts.ts +4 -0
- package/src/landing.ts +3 -20
- package/src/types.ts +14 -1
- package/tests/context.ts +2 -3
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Client-side flow orchestration service for managing multi-step workflows in brow
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/client-flow@^0.1.18-rc.
|
|
15
|
+
bun add @owlmeans/client-flow@^0.1.18-rc.53
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -75,7 +75,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
75
75
|
your project's skill store (`.agents/skills/`):
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
78
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/client-flow",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.53",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.086Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/client-flow
|
|
9
9
|
|
|
10
10
|
**Layer:** Client
|
|
11
|
-
**Install:** `"@owlmeans/client-flow": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/client-flow": "^0.1.18-rc.53"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Two objects, with different lifetimes. The **service** lives on the context and owns the flow
|
|
14
14
|
definitions and the one live `FlowModel`. The **client** is built per screen, wraps that model with
|
package/build/consts.d.ts
CHANGED
|
@@ -2,4 +2,7 @@ export declare const DEFAULT_ALIAS = "flow";
|
|
|
2
2
|
export declare const FLOW_STATE = "state:flow";
|
|
3
3
|
export declare const EXTRA_FLOW = "extra-flow";
|
|
4
4
|
export declare const REHACK_MOD = "__redirect";
|
|
5
|
+
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
6
|
+
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
7
|
+
export declare const RESUME_FLOW = "resume-flow";
|
|
5
8
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,SAAS,CAAA;AAEnC,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,eAAO,MAAM,UAAU,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,SAAS,CAAA;AAEnC,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC;iGACiG;AACjG,eAAO,MAAM,WAAW,gBAAgB,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -2,4 +2,7 @@ export const DEFAULT_ALIAS = 'flow';
|
|
|
2
2
|
export const FLOW_STATE = 'state:flow';
|
|
3
3
|
export const EXTRA_FLOW = 'extra-flow';
|
|
4
4
|
export const REHACK_MOD = '__redirect';
|
|
5
|
+
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
6
|
+
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
7
|
+
export const RESUME_FLOW = 'resume-flow';
|
|
5
8
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAA;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAA;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAA;AAEtC;iGACiG;AACjG,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA"}
|
package/build/landing.d.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import type { ClientContext } from '@owlmeans/client';
|
|
2
2
|
import type { ClientConfig } from '@owlmeans/client-context';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
6
|
-
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
7
|
-
export declare const RESUME_FLOW = "resume-flow";
|
|
8
|
-
export interface SuspendedLandingRecord extends ResourceRecord {
|
|
9
|
-
/** The entrypoint alias to navigate to once sign-in completes. */
|
|
10
|
-
entrypoint: string;
|
|
11
|
-
/** The flow's payload at the moment it was suspended — carried along as the destination's query. */
|
|
12
|
-
query: FlowPayload;
|
|
13
|
-
expiresAt: number;
|
|
14
|
-
}
|
|
15
|
-
export interface SuspendedLanding {
|
|
16
|
-
entrypoint: string;
|
|
17
|
-
query: FlowPayload;
|
|
18
|
-
}
|
|
3
|
+
import type { FlowModel } from '@owlmeans/flow';
|
|
4
|
+
import type { SuspendedLanding } from './types.js';
|
|
19
5
|
/**
|
|
20
6
|
* Suspend a flow that is about to leave for the platform's own sign-in dispatcher, so whichever
|
|
21
7
|
* sign-in method completes can send the person back to where they started instead of `HOME`.
|
package/build/landing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing.d.ts","sourceRoot":"","sources":["../src/landing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"landing.d.ts","sourceRoot":"","sources":["../src/landing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,YAAY,CAAA;AAO1E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GAAU,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,WACzE,CAAC,SAAS,SAAS,QAAQ;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,KACxD,OAAO,CAAC,OAAO,CAkBjB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAU,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,WACjF,CAAC,KACT,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAgBjC,CAAA"}
|
package/build/landing.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { FLOW_STATE } from './consts.js';
|
|
2
|
-
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
3
|
-
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
4
|
-
export const RESUME_FLOW = 'resume-flow';
|
|
1
|
+
import { FLOW_STATE, RESUME_FLOW } from './consts.js';
|
|
5
2
|
const landingResource = (context) => context.hasResource(FLOW_STATE) ? context.resource(FLOW_STATE) : null;
|
|
6
3
|
/**
|
|
7
4
|
* Suspend a flow that is about to leave for the platform's own sign-in dispatcher, so whichever
|
package/build/landing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing.js","sourceRoot":"","sources":["../src/landing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"landing.js","sourceRoot":"","sources":["../src/landing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGrD,MAAM,eAAe,GAAG,CACtB,OAAU,EACqC,EAAE,CACjD,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ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AAI,CAAA;IAE/B,MAAM,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IACzD,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,IAAI,CAAA;IAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAA;AAC/D,CAAC,CAAA"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LazyService } from '@owlmeans/context';
|
|
2
|
-
import type { FlowConfig, FlowModel, FlowProvider, FlowState, FlowTransition } from '@owlmeans/flow';
|
|
2
|
+
import type { FlowConfig, FlowModel, FlowProvider, FlowState, FlowTransition, FlowPayload } from '@owlmeans/flow';
|
|
3
3
|
import type { AbstractRequest } from '@owlmeans/entrypoint';
|
|
4
4
|
import type { ResourceRecord } from '@owlmeans/resource';
|
|
5
5
|
import type { ResolvedServiceRoute } from '@owlmeans/route';
|
|
@@ -31,4 +31,15 @@ export interface StateRecord extends ResourceRecord, FlowState {
|
|
|
31
31
|
}
|
|
32
32
|
export interface StateResource extends ClientResource<StateRecord> {
|
|
33
33
|
}
|
|
34
|
+
export interface SuspendedLandingRecord extends ResourceRecord {
|
|
35
|
+
/** The entrypoint alias to navigate to once sign-in completes. */
|
|
36
|
+
entrypoint: string;
|
|
37
|
+
/** The flow's payload at the moment it was suspended — carried along as the destination's query. */
|
|
38
|
+
query: FlowPayload;
|
|
39
|
+
expiresAt: number;
|
|
40
|
+
}
|
|
41
|
+
export interface SuspendedLanding {
|
|
42
|
+
entrypoint: string;
|
|
43
|
+
query: FlowPayload;
|
|
44
|
+
}
|
|
34
45
|
//# sourceMappingURL=types.d.ts.map
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"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"MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,26 +22,26 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/client": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/client-context": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
29
|
-
"@owlmeans/client-resource": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/error": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/flow": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
25
|
+
"@owlmeans/auth-common": "^0.1.18-rc.46",
|
|
26
|
+
"@owlmeans/client": "^0.1.18-rc.50",
|
|
27
|
+
"@owlmeans/client-context": "^0.1.18-rc.47",
|
|
28
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.46",
|
|
29
|
+
"@owlmeans/client-resource": "^0.1.18-rc.46",
|
|
30
|
+
"@owlmeans/config": "^0.1.18-rc.43",
|
|
31
|
+
"@owlmeans/context": "^0.1.18-rc.33",
|
|
32
|
+
"@owlmeans/error": "^0.1.18-rc.37",
|
|
33
|
+
"@owlmeans/flow": "^0.1.18-rc.44",
|
|
34
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.40",
|
|
35
|
+
"@owlmeans/resource": "^0.1.18-rc.39",
|
|
36
|
+
"@owlmeans/route": "^0.1.18-rc.34"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@owlmeans/dep-config": "workspace:*",
|
|
43
|
-
"@owlmeans/static-resource": "^0.1.18-rc.
|
|
44
|
-
"@types/bun": "^1.4.
|
|
43
|
+
"@owlmeans/static-resource": "^0.1.18-rc.38",
|
|
44
|
+
"@types/bun": "^1.4.2",
|
|
45
45
|
"nodemon": "^3.1.14",
|
|
46
46
|
"typescript": "^7.0.2"
|
|
47
47
|
},
|
package/src/consts.ts
CHANGED
|
@@ -6,3 +6,7 @@ export const FLOW_STATE = 'state:flow'
|
|
|
6
6
|
export const EXTRA_FLOW = 'extra-flow'
|
|
7
7
|
|
|
8
8
|
export const REHACK_MOD = '__redirect'
|
|
9
|
+
|
|
10
|
+
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
11
|
+
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
12
|
+
export const RESUME_FLOW = 'resume-flow'
|
package/src/landing.ts
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
import type { ClientContext } from '@owlmeans/client'
|
|
2
2
|
import type { ClientConfig } from '@owlmeans/client-context'
|
|
3
3
|
import type { ClientResource } from '@owlmeans/client-resource'
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
/** The record id a suspended landing is stored under, in the SAME resource `EXTRA_FLOW` uses —
|
|
9
|
-
* a side-band slot, never the live `FlowService.flow` and never the `?flow=` query parameter. */
|
|
10
|
-
export const RESUME_FLOW = 'resume-flow'
|
|
11
|
-
|
|
12
|
-
export interface SuspendedLandingRecord extends ResourceRecord {
|
|
13
|
-
/** The entrypoint alias to navigate to once sign-in completes. */
|
|
14
|
-
entrypoint: string
|
|
15
|
-
/** The flow's payload at the moment it was suspended — carried along as the destination's query. */
|
|
16
|
-
query: FlowPayload
|
|
17
|
-
expiresAt: number
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface SuspendedLanding {
|
|
21
|
-
entrypoint: string
|
|
22
|
-
query: FlowPayload
|
|
23
|
-
}
|
|
4
|
+
import type { FlowModel } from '@owlmeans/flow'
|
|
5
|
+
import { FLOW_STATE, RESUME_FLOW } from './consts.js'
|
|
6
|
+
import type { SuspendedLanding, SuspendedLandingRecord } from './types.js'
|
|
24
7
|
|
|
25
8
|
const landingResource = <C extends ClientConfig, T extends ClientContext<C>>(
|
|
26
9
|
context: T
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import type { LazyService } from '@owlmeans/context'
|
|
3
|
-
import type { FlowConfig, FlowModel, FlowProvider, FlowState, FlowTransition } from '@owlmeans/flow'
|
|
3
|
+
import type { FlowConfig, FlowModel, FlowProvider, FlowState, FlowTransition, FlowPayload } from '@owlmeans/flow'
|
|
4
4
|
import type { AbstractRequest } from '@owlmeans/entrypoint'
|
|
5
5
|
import type { ResourceRecord } from '@owlmeans/resource'
|
|
6
6
|
import type { ResolvedServiceRoute } from '@owlmeans/route'
|
|
@@ -43,3 +43,16 @@ export interface FlowClient {
|
|
|
43
43
|
export interface StateRecord extends ResourceRecord, FlowState {}
|
|
44
44
|
|
|
45
45
|
export interface StateResource extends ClientResource<StateRecord> {}
|
|
46
|
+
|
|
47
|
+
export interface SuspendedLandingRecord extends ResourceRecord {
|
|
48
|
+
/** The entrypoint alias to navigate to once sign-in completes. */
|
|
49
|
+
entrypoint: string
|
|
50
|
+
/** The flow's payload at the moment it was suspended — carried along as the destination's query. */
|
|
51
|
+
query: FlowPayload
|
|
52
|
+
expiresAt: number
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SuspendedLanding {
|
|
56
|
+
entrypoint: string
|
|
57
|
+
query: FlowPayload
|
|
58
|
+
}
|
package/tests/context.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AppType, makeBasicContext } from '@owlmeans/context'
|
|
2
|
-
import type { BasicConfig, BasicContext } from '@owlmeans/context'
|
|
1
|
+
import { AppType, makeBasicContext, type BasicConfig, type BasicContext } from '@owlmeans/context'
|
|
3
2
|
import { createStaticResource } from '@owlmeans/static-resource'
|
|
4
3
|
import type { ClientContext } from '@owlmeans/client'
|
|
5
4
|
import type { ClientConfig } from '@owlmeans/client-context'
|
|
6
5
|
import { FLOW_STATE } from '../src/consts.js'
|
|
7
|
-
import type { SuspendedLandingRecord } from '../src/
|
|
6
|
+
import type { SuspendedLandingRecord } from '../src/types.js'
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* The smallest context `suspendFlow`/`resumeSuspendedFlow` need: a `FLOW_STATE` resource and
|