@delurio/cli 0.17.0 → 0.19.0
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/CHANGELOG.md +24 -0
- package/README.md +10 -10
- package/SPEC.md +58 -20
- package/js/graph.d.ts +50 -2
- package/js/graph.js +55 -3
- package/js/internal.js +2 -2
- package/js/native.d.cts +41 -2
- package/package.json +7 -7
- package/schemas/binding.schema.json +169 -19
- package/schemas/catalog.schema.json +2 -2
- package/schemas/ui.schema.json +78 -7
package/js/graph.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// the readers of its parts. The checker is the Rust one (crates/delurio-core/src/graph.rs), run in the addon.
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { GraphError, Trap, call, json, native, nativeGraph, nativeValue, placed, rememberGraph, warnings } from './internal.js';
|
|
5
|
+
import { GraphError, Trap, call, encode, json, native, nativeExploration, nativeGraph, nativeModel, nativeValue, placed, rememberGraph, warnings } from './internal.js';
|
|
6
6
|
|
|
7
7
|
export { GraphError, placed };
|
|
8
8
|
|
|
@@ -51,8 +51,60 @@ export function maskedNodes(g, mask = ['credential']) {
|
|
|
51
51
|
return native.maskedNodesOf(nativeGraph(g), [...mask]);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// What a catalog key's message shows with the values a walk has (SPEC.md §4, Catalog), for a replay to expect of a node's
|
|
55
|
+
// words and name: a string where every argument it shows has a value, else a RegExp that each form it may take matches
|
|
56
|
+
// (a plural or a select whose value is not given, any of its cases; a number not given, a plural's or a `number`
|
|
57
|
+
// argument's, any number; any other value not given, any text); null where
|
|
58
|
+
// the catalog has no such message. `values` maps an argument's name to its value; `locale`, the catalog's language,
|
|
59
|
+
// whose plural rules it reads, is `g.locale`, else the name of the catalog's file.
|
|
60
|
+
export function catalogWords(g, key, values = {}, locale = undefined) {
|
|
61
|
+
if (values === null || typeof values !== 'object' || Array.isArray(values)) throw new TypeError('catalogWords: values is a map of names to values');
|
|
62
|
+
const out = JSON.parse(native.catalogWordsOf(nativeGraph(g), String(key), json(values), locale === undefined || locale === null ? undefined : String(locale)));
|
|
63
|
+
if (out === null) return null;
|
|
64
|
+
return out.text !== undefined ? out.text : new RegExp(out.pattern);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// A scenario's `then` (SPEC.md §7), as a replay reads it: the entry for the time a walk applies `effect` after it has
|
|
68
|
+
// applied it `before` times (a list's next entry, none once it has run out, or the one entry that holds every time), or
|
|
69
|
+
// null; every entry it gives the effect; and what it names that the graph's flow does not have, each as { path, message }.
|
|
70
|
+
export function thenEntry(then, effect, before) {
|
|
71
|
+
if (!Number.isInteger(before) || before < 0) throw new TypeError('thenEntry: before is how many times the effect was applied before');
|
|
72
|
+
return JSON.parse(native.thenEntryOf(then === undefined || then === null ? undefined : json(then), String(effect), before));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function thenEntries(then, effect) {
|
|
76
|
+
return JSON.parse(native.thenEntriesOf(then === undefined || then === null ? undefined : json(then), String(effect)));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function thenProblems(g, then) {
|
|
80
|
+
return JSON.parse(native.thenProblemsOf(nativeGraph(g), json(then ?? null)));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// a dialog that makes the rest of the page absent while it is shown: every dialog but one that says `modal: false`
|
|
84
|
+
export const isModal = (n) => native.isModalNode(n === undefined ? undefined : JSON.stringify(n));
|
|
85
|
+
|
|
86
|
+
// The modal dialogs of a graph and the nodes outside them (SPEC.md §4, A modal dialog): `dialogs`, in the order of
|
|
87
|
+
// ui.yaml, and `outside`, each node that some situation shows with no modal dialog shown. Read over the situations of
|
|
88
|
+
// `ex`, an exploration of `m` that explore() gave, where it is given; else over every situation the flow reaches, as
|
|
89
|
+
// `check` reads it.
|
|
90
|
+
export function modalDialogs(g, m, ex) {
|
|
91
|
+
const nx = ex === undefined || ex === null ? undefined : nativeExploration(ex);
|
|
92
|
+
return JSON.parse(call(null, () => native.modalDialogsOf(nativeGraph(g), nativeModel(m), nx)));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The modal dialog a situation shows, the first in ui.yaml, and the nodes it makes absent there: those of
|
|
96
|
+
// `modal.outside` (modalDialogs) that the state shows by their `in` and `unless`, read as if the state were not in
|
|
97
|
+
// their `in`. Null where the situation shows no modal dialog.
|
|
98
|
+
export function modalAbsent(g, m, modal, state, ctx) {
|
|
99
|
+
const outside = [...(modal?.outside ?? [])].map(String);
|
|
100
|
+
return JSON.parse(call(null, () => native.modalAbsentOf(nativeGraph(g), nativeModel(m), outside, String(state), encode(m, ctx))));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function focusAfter(ui, from, to, pressed, gone) {
|
|
104
|
+
if (gone !== undefined && gone !== null && !Array.isArray(gone))
|
|
105
|
+
throw new TypeError('focusAfter: gone is a list of nodes');
|
|
106
|
+
const left = gone === undefined || gone === null ? undefined : gone.map(String);
|
|
107
|
+
return JSON.parse(native.focusAfterStep(json(ui), from ?? undefined, String(to), pressed ?? undefined, left));
|
|
56
108
|
}
|
|
57
109
|
|
|
58
110
|
export function alternatives(spec) {
|
package/js/internal.js
CHANGED
|
@@ -206,13 +206,13 @@ function object(v, what) {
|
|
|
206
206
|
const graphs = new WeakMap();
|
|
207
207
|
|
|
208
208
|
export function rememberGraph(g, n) {
|
|
209
|
-
graphs.set(g, { n, dir: g.dir, flow: g.flow, ui: g.ui, catalog: g.catalog });
|
|
209
|
+
graphs.set(g, { n, dir: g.dir, flow: g.flow, ui: g.ui, catalog: g.catalog, locale: g.locale });
|
|
210
210
|
return g;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
export function nativeGraph(g) {
|
|
214
214
|
const hit = graphs.get(object(g, 'the graph'));
|
|
215
|
-
if (hit !== undefined && hit.dir === g.dir && hit.flow === g.flow && hit.ui === g.ui && hit.catalog === g.catalog) return hit.n;
|
|
215
|
+
if (hit !== undefined && hit.dir === g.dir && hit.flow === g.flow && hit.ui === g.ui && hit.catalog === g.catalog && hit.locale === g.locale) return hit.n;
|
|
216
216
|
const n = call(null, () => new native.NativeGraph(JSON.stringify(g)));
|
|
217
217
|
rememberGraph(g, n);
|
|
218
218
|
return n;
|
package/js/native.d.cts
CHANGED
|
@@ -73,6 +73,13 @@ export declare class NativeValue {
|
|
|
73
73
|
/** `alternatives(spec)`, as JSON */
|
|
74
74
|
export declare function alternativesOf(spec?: string | undefined | null): string
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* `catalogWords(g, key, values, locale)`: what a key's message shows with the values a walk has, as JSON:
|
|
78
|
+
* `{ "text": .. }`, `{ "pattern": .. }` (a JavaScript regular expression's source), or null where the catalog has no
|
|
79
|
+
* such message (SPEC.md §4, Catalog)
|
|
80
|
+
*/
|
|
81
|
+
export declare function catalogWordsOf(g: NativeGraph, key: string, values: string, locale?: string | undefined | null): string
|
|
82
|
+
|
|
76
83
|
/** `checkAssertions(m, ex)`, as JSON */
|
|
77
84
|
export declare function checkAssertions(m: NativeModel, ex: NativeExploration): string
|
|
78
85
|
|
|
@@ -127,8 +134,8 @@ export declare function finalPaths(m: NativeModel, ex: NativeExploration): strin
|
|
|
127
134
|
/** `findings(g, views, goals)`, as JSON */
|
|
128
135
|
export declare function findings(g: NativeNav, views: string, goals: string): string
|
|
129
136
|
|
|
130
|
-
/** `focusAfter(ui, from, to, pressed)`, as JSON (null when nothing has the focus) */
|
|
131
|
-
export declare function focusAfterStep(ui: string, from: string | undefined | null, to: string, pressed?: string | undefined | null): string
|
|
137
|
+
/** `focusAfter(ui, from, to, pressed, gone)`, as JSON (null when nothing has the focus) */
|
|
138
|
+
export declare function focusAfterStep(ui: string, from: string | undefined | null, to: string, pressed?: string | undefined | null, gone?: Array<string> | undefined | null): string
|
|
132
139
|
|
|
133
140
|
/** `frameLevel(e)`, the entry as JSON */
|
|
134
141
|
export declare function frameLevel(entry: string): boolean
|
|
@@ -153,6 +160,9 @@ export declare function identifiers(e: string): Array<string>
|
|
|
153
160
|
/** `isDialog(n)` */
|
|
154
161
|
export declare function isDialogNode(node?: string | undefined | null): boolean
|
|
155
162
|
|
|
163
|
+
/** `isModal(n)`: a dialog that makes the rest of the page absent while it is shown */
|
|
164
|
+
export declare function isModalNode(node?: string | undefined | null): boolean
|
|
165
|
+
|
|
156
166
|
/** `keyAt(text, path)`, as JSON */
|
|
157
167
|
export declare function keyAt(text: string, path: Array<string>): string
|
|
158
168
|
|
|
@@ -195,6 +205,20 @@ export declare function maskedNodesOf(g: NativeGraph, mask: Array<string>): Arra
|
|
|
195
205
|
/** `menuRows(g, views)`, as JSON */
|
|
196
206
|
export declare function menuRows(g: NativeNav, views: string): string
|
|
197
207
|
|
|
208
|
+
/**
|
|
209
|
+
* `modalAbsent(g, m, modal, state, ctx)`: the first modal dialog a situation shows and the nodes of `outside` it
|
|
210
|
+
* makes absent there, those the state shows by their `in` and `unless`, as JSON `{ dialog, absent }`; null where the
|
|
211
|
+
* situation shows no modal dialog
|
|
212
|
+
*/
|
|
213
|
+
export declare function modalAbsentOf(g: NativeGraph, m: NativeModel, outside: Array<string>, state: string, ctx: Uint16Array): string
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* `modalDialogs(g, m, ex)`: the graph's modal dialogs and the nodes outside them, as JSON `{ dialogs, outside }`
|
|
217
|
+
* (SPEC.md §4): over the situations of `ex` where it is given, else over every situation the flow reaches, walked as
|
|
218
|
+
* `check` walks it
|
|
219
|
+
*/
|
|
220
|
+
export declare function modalDialogsOf(g: NativeGraph, m: NativeModel, ex?: NativeExploration | undefined | null): string
|
|
221
|
+
|
|
198
222
|
/** `narrate(g, m, steps)`, as JSON */
|
|
199
223
|
export declare function narrate(g: NativeGraph, m: NativeModel, steps: PathSteps): string
|
|
200
224
|
|
|
@@ -309,6 +333,21 @@ export declare function stepsTo(m: NativeModel, ex: NativeExploration, index: nu
|
|
|
309
333
|
/** the warnings the YAML reader met since the last call (the library hands each to `process.emitWarning`), as JSON */
|
|
310
334
|
export declare function takeYamlWarnings(): string
|
|
311
335
|
|
|
336
|
+
/** `thenEntries(then, effect)`: every entry a scenario's `then` gives an effect, as JSON */
|
|
337
|
+
export declare function thenEntriesOf(then: string | undefined | null, effect: string): string
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* `thenEntry(then, effect, before)`: the entry of a scenario's `then` for the time a walk applies `effect` after
|
|
341
|
+
* `before` times, as JSON, or null (SPEC.md §7)
|
|
342
|
+
*/
|
|
343
|
+
export declare function thenEntryOf(then: string | undefined | null, effect: string, before: number): string
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* `thenProblems(g, then)`: what a scenario's `then` names that the graph's flow does not have, as JSON
|
|
347
|
+
* (`[{ path, message }]`, SPEC.md §7)
|
|
348
|
+
*/
|
|
349
|
+
export declare function thenProblemsOf(g: NativeGraph, then: string): string
|
|
350
|
+
|
|
312
351
|
/** `titleOf(flow, state)` */
|
|
313
352
|
export declare function titleOfState(flow: NativeValue, state: string): string
|
|
314
353
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delurio/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "The open checker and page of delurio-graph/0: check every graph in a project's own CI, offline, with GNU error lines and SARIF.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"elkjs": "0.12.1"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@delurio/cli-linux-x64-gnu": "0.
|
|
51
|
-
"@delurio/cli-linux-x64-musl": "0.
|
|
52
|
-
"@delurio/cli-linux-arm64-gnu": "0.
|
|
53
|
-
"@delurio/cli-linux-arm64-musl": "0.
|
|
54
|
-
"@delurio/cli-darwin-arm64": "0.
|
|
55
|
-
"@delurio/cli-win32-x64-msvc": "0.
|
|
50
|
+
"@delurio/cli-linux-x64-gnu": "0.19.0",
|
|
51
|
+
"@delurio/cli-linux-x64-musl": "0.19.0",
|
|
52
|
+
"@delurio/cli-linux-arm64-gnu": "0.19.0",
|
|
53
|
+
"@delurio/cli-linux-arm64-musl": "0.19.0",
|
|
54
|
+
"@delurio/cli-darwin-arm64": "0.19.0",
|
|
55
|
+
"@delurio/cli-win32-x64-msvc": "0.19.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@napi-rs/cli": "3.10.12"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"locale": {
|
|
114
114
|
"$ref": "#/$defs/locale",
|
|
115
|
-
"description": "The BCP 47 tag the browser is set to; every screen is read against the flow's catalog of that language."
|
|
115
|
+
"description": "The BCP 47 tag the browser is set to; every screen is read against the flow's catalog of that language, or, where the flow has none, of the language the page is in (its lang; SPEC.md §7)."
|
|
116
116
|
},
|
|
117
117
|
"timezone": {
|
|
118
118
|
"type": "string",
|
|
@@ -207,9 +207,16 @@
|
|
|
207
207
|
"type": "integer",
|
|
208
208
|
"minimum": 0,
|
|
209
209
|
"description": "How many milliseconds a screen waits for that at most: browser.timeout, which it never passes."
|
|
210
|
+
},
|
|
211
|
+
"time": {
|
|
212
|
+
"enum": [
|
|
213
|
+
"real",
|
|
214
|
+
"virtual"
|
|
215
|
+
],
|
|
216
|
+
"description": "Whose time the page lives in: real (the default), or virtual, the replay's own, which passes the page's idle time at once while it waits for the page."
|
|
210
217
|
}
|
|
211
218
|
},
|
|
212
|
-
"description": "When a screen is read: once the page has been still for `quiet` ms, waiting at most `max` ms."
|
|
219
|
+
"description": "When a screen is read: once the page has been still for `quiet` ms, waiting at most `max` ms, in the page's time (`time`)."
|
|
213
220
|
},
|
|
214
221
|
"parallel": {
|
|
215
222
|
"description": "Walks at once: true (as many as the machine holds), a number from 1 to 16, auto, or { walks, serial }, where each serial group names scenarios or accounts (a navigation graph's personas or accounts) whose walks share something fixed and go one after another. false: one at a time.",
|
|
@@ -416,7 +423,7 @@
|
|
|
416
423
|
},
|
|
417
424
|
"then": {
|
|
418
425
|
"type": "object",
|
|
419
|
-
"description": "How the steps that leave a variable to chance (havoc) come out on this scenario's walks, by the effect: a list read in order, one entry each time the walk takes a transition that applies the effect,
|
|
426
|
+
"description": "How the steps that leave a variable to chance (havoc) come out on this scenario's walks, by the effect: a list read in order, one entry each time the walk takes a transition that applies the effect, or one entry, a map in place of the list, that holds every time it does, however often. Each entry gives a value to some of the variables the effect's havoc lists. A variable an entry leaves out, and every variable once a list has run out, keeps its value (SPEC.md §7).",
|
|
420
427
|
"examples": [
|
|
421
428
|
{
|
|
422
429
|
"next": [
|
|
@@ -427,13 +434,23 @@
|
|
|
427
434
|
"lastStep": true
|
|
428
435
|
}
|
|
429
436
|
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"dialogOpens": {
|
|
440
|
+
"movingOff": false,
|
|
441
|
+
"signInSaved": false
|
|
442
|
+
}
|
|
430
443
|
}
|
|
431
444
|
],
|
|
432
445
|
"propertyNames": {
|
|
433
446
|
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
434
447
|
},
|
|
435
448
|
"additionalProperties": {
|
|
436
|
-
"type":
|
|
449
|
+
"type": [
|
|
450
|
+
"array",
|
|
451
|
+
"object"
|
|
452
|
+
],
|
|
453
|
+
"description": "A list of entries, read in order, one each time a walked transition applies the effect; or one entry, which holds every time it does.",
|
|
437
454
|
"minItems": 1,
|
|
438
455
|
"items": {
|
|
439
456
|
"type": "object",
|
|
@@ -446,6 +463,15 @@
|
|
|
446
463
|
"null"
|
|
447
464
|
]
|
|
448
465
|
}
|
|
466
|
+
},
|
|
467
|
+
"minProperties": 1,
|
|
468
|
+
"additionalProperties": {
|
|
469
|
+
"type": [
|
|
470
|
+
"string",
|
|
471
|
+
"number",
|
|
472
|
+
"boolean",
|
|
473
|
+
"null"
|
|
474
|
+
]
|
|
449
475
|
}
|
|
450
476
|
}
|
|
451
477
|
},
|
|
@@ -1084,7 +1110,7 @@
|
|
|
1084
1110
|
},
|
|
1085
1111
|
"locale": {
|
|
1086
1112
|
"$ref": "#/$defs/locale",
|
|
1087
|
-
"description": "The BCP 47 tag the browser is set to; every
|
|
1113
|
+
"description": "The BCP 47 tag the browser is set to; every page is read against the navigation graph's catalog of that language."
|
|
1088
1114
|
},
|
|
1089
1115
|
"timezone": {
|
|
1090
1116
|
"type": "string",
|
|
@@ -1179,9 +1205,16 @@
|
|
|
1179
1205
|
"type": "integer",
|
|
1180
1206
|
"minimum": 0,
|
|
1181
1207
|
"description": "How many milliseconds a screen waits for that at most: browser.timeout, which it never passes."
|
|
1208
|
+
},
|
|
1209
|
+
"time": {
|
|
1210
|
+
"enum": [
|
|
1211
|
+
"real",
|
|
1212
|
+
"virtual"
|
|
1213
|
+
],
|
|
1214
|
+
"description": "Whose time the page lives in: real (the default), or virtual, the replay's own, which passes the page's idle time at once while it waits for the page."
|
|
1182
1215
|
}
|
|
1183
1216
|
},
|
|
1184
|
-
"description": "When a screen is read: once the page has been still for `quiet` ms, waiting at most `max` ms."
|
|
1217
|
+
"description": "When a screen is read: once the page has been still for `quiet` ms, waiting at most `max` ms, in the page's time (`time`)."
|
|
1185
1218
|
},
|
|
1186
1219
|
"parallel": {
|
|
1187
1220
|
"description": "Walks at once: true (as many as the machine holds), a number from 1 to 16, auto, or { walks, serial }, where each serial group names scenarios or accounts (a navigation graph's personas or accounts) whose walks share something fixed and go one after another. false: one at a time.",
|
|
@@ -1391,6 +1424,14 @@
|
|
|
1391
1424
|
]
|
|
1392
1425
|
},
|
|
1393
1426
|
"description": "The :params of its route for this page, over the binding's own."
|
|
1427
|
+
},
|
|
1428
|
+
"serial": {
|
|
1429
|
+
"type": "array",
|
|
1430
|
+
"minItems": 1,
|
|
1431
|
+
"items": {
|
|
1432
|
+
"type": "string"
|
|
1433
|
+
},
|
|
1434
|
+
"description": "The personas or accounts that open this page one at a time, while their other visits go at once: what the page holds is one person's at a time, such as an editor's lock."
|
|
1394
1435
|
}
|
|
1395
1436
|
}
|
|
1396
1437
|
}
|
|
@@ -2077,6 +2118,86 @@
|
|
|
2077
2118
|
"$ref": "#/$defs/command",
|
|
2078
2119
|
"description": "A command and its arguments, as a list, run with no shell."
|
|
2079
2120
|
},
|
|
2121
|
+
"WebAuthn.addCredential": {
|
|
2122
|
+
"type": "object",
|
|
2123
|
+
"additionalProperties": false,
|
|
2124
|
+
"properties": {
|
|
2125
|
+
"rpId": {
|
|
2126
|
+
"type": "string",
|
|
2127
|
+
"minLength": 1,
|
|
2128
|
+
"pattern": "^[^\\s/:]+$",
|
|
2129
|
+
"description": "The relying party id the passkey is for: a domain (the page's own, or one it ends with), never an address with a scheme or a path.",
|
|
2130
|
+
"examples": [
|
|
2131
|
+
"id.example.test",
|
|
2132
|
+
"{rp}"
|
|
2133
|
+
]
|
|
2134
|
+
},
|
|
2135
|
+
"credentialId": {
|
|
2136
|
+
"type": "string",
|
|
2137
|
+
"minLength": 1,
|
|
2138
|
+
"pattern": "^(?:[A-Za-z0-9_-]+|.*\\{[^{}]+\\}.*)$",
|
|
2139
|
+
"description": "The credential's id, base64url (RFC 4648 §5, without padding), as the app's server keeps it.",
|
|
2140
|
+
"examples": [
|
|
2141
|
+
"{passkeys.owner.id}"
|
|
2142
|
+
]
|
|
2143
|
+
},
|
|
2144
|
+
"privateKey": {
|
|
2145
|
+
"type": "string",
|
|
2146
|
+
"minLength": 1,
|
|
2147
|
+
"pattern": "^(?:[A-Za-z0-9_-]+|.*\\{[^{}]+\\}.*)$",
|
|
2148
|
+
"description": "Its private key: an ECDSA P-256 key in PKCS #8, base64url. A report never shows it.",
|
|
2149
|
+
"examples": [
|
|
2150
|
+
"{passkeys.owner.key}"
|
|
2151
|
+
]
|
|
2152
|
+
},
|
|
2153
|
+
"userHandle": {
|
|
2154
|
+
"type": "string",
|
|
2155
|
+
"minLength": 1,
|
|
2156
|
+
"pattern": "^(?:[A-Za-z0-9_-]{1,86}|.*\\{[^{}]+\\}.*)$",
|
|
2157
|
+
"description": "The user handle it is kept for (WebAuthn's user.id), base64url, at most 64 bytes. A resident passkey has one.",
|
|
2158
|
+
"examples": [
|
|
2159
|
+
"{passkeys.owner.user}"
|
|
2160
|
+
]
|
|
2161
|
+
},
|
|
2162
|
+
"resident": {
|
|
2163
|
+
"type": "boolean",
|
|
2164
|
+
"description": "true, the default: a discoverable credential, found with no user named. false: one the app names (allowCredentials), as a security key's is."
|
|
2165
|
+
},
|
|
2166
|
+
"signCount": {
|
|
2167
|
+
"type": "integer",
|
|
2168
|
+
"minimum": 0,
|
|
2169
|
+
"description": "The signature counter it starts from. Left out, it has none, and every assertion gives 0, as a synced passkey does."
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
"required": [
|
|
2173
|
+
"rpId",
|
|
2174
|
+
"credentialId",
|
|
2175
|
+
"privateKey"
|
|
2176
|
+
],
|
|
2177
|
+
"description": "Gives the browser it is done in a passkey, in a virtual authenticator the replay adds to it the first time: a sign-in by passkey (WebAuthn) then gets it with no prompt. The app's server already holds its public key, such as one the scenario's setup registered. A browser with no virtual authenticator fails the walk at this action (SPEC.md §7).",
|
|
2178
|
+
"allOf": [
|
|
2179
|
+
{
|
|
2180
|
+
"$comment": "a resident passkey has a user handle, as WebAuthn keeps one for every discoverable credential",
|
|
2181
|
+
"if": {
|
|
2182
|
+
"not": {
|
|
2183
|
+
"required": [
|
|
2184
|
+
"resident"
|
|
2185
|
+
],
|
|
2186
|
+
"properties": {
|
|
2187
|
+
"resident": {
|
|
2188
|
+
"const": false
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"then": {
|
|
2194
|
+
"required": [
|
|
2195
|
+
"userHandle"
|
|
2196
|
+
]
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
]
|
|
2200
|
+
},
|
|
2080
2201
|
"expect": {
|
|
2081
2202
|
"type": [
|
|
2082
2203
|
"string",
|
|
@@ -2093,7 +2214,7 @@
|
|
|
2093
2214
|
"description": "On a click, a fill or an attach: one the app may not ask for, such as a notice shown on some visits only. Once the page is still, its element is looked for once: where it is not there, the action is passed over, and the step's report says so. Proposed on 23 Nov 2026."
|
|
2094
2215
|
}
|
|
2095
2216
|
},
|
|
2096
|
-
"description": "One thing the replay does: one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize and
|
|
2217
|
+
"description": "One thing the replay does: one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize, run and WebAuthn.addCredential, which may carry `as`; a click, a fill or an attach may be optional.",
|
|
2097
2218
|
"anyOf": [
|
|
2098
2219
|
{
|
|
2099
2220
|
"required": [
|
|
@@ -2154,9 +2275,14 @@
|
|
|
2154
2275
|
"required": [
|
|
2155
2276
|
"run"
|
|
2156
2277
|
]
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
"required": [
|
|
2281
|
+
"WebAuthn.addCredential"
|
|
2282
|
+
]
|
|
2157
2283
|
}
|
|
2158
2284
|
],
|
|
2159
|
-
"$comment": "an action is one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize, run",
|
|
2285
|
+
"$comment": "an action is one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize, run, WebAuthn.addCredential",
|
|
2160
2286
|
"allOf": [
|
|
2161
2287
|
{
|
|
2162
2288
|
"$comment": "an action does one thing: give each its own item",
|
|
@@ -2177,7 +2303,8 @@
|
|
|
2177
2303
|
"waitResponse": false,
|
|
2178
2304
|
"download": false,
|
|
2179
2305
|
"resize": false,
|
|
2180
|
-
"run": false
|
|
2306
|
+
"run": false,
|
|
2307
|
+
"WebAuthn.addCredential": false
|
|
2181
2308
|
}
|
|
2182
2309
|
}
|
|
2183
2310
|
},
|
|
@@ -2199,7 +2326,8 @@
|
|
|
2199
2326
|
"waitResponse": false,
|
|
2200
2327
|
"download": false,
|
|
2201
2328
|
"resize": false,
|
|
2202
|
-
"run": false
|
|
2329
|
+
"run": false,
|
|
2330
|
+
"WebAuthn.addCredential": false
|
|
2203
2331
|
}
|
|
2204
2332
|
}
|
|
2205
2333
|
},
|
|
@@ -2220,7 +2348,8 @@
|
|
|
2220
2348
|
"waitResponse": false,
|
|
2221
2349
|
"download": false,
|
|
2222
2350
|
"resize": false,
|
|
2223
|
-
"run": false
|
|
2351
|
+
"run": false,
|
|
2352
|
+
"WebAuthn.addCredential": false
|
|
2224
2353
|
}
|
|
2225
2354
|
}
|
|
2226
2355
|
},
|
|
@@ -2240,7 +2369,8 @@
|
|
|
2240
2369
|
"waitResponse": false,
|
|
2241
2370
|
"download": false,
|
|
2242
2371
|
"resize": false,
|
|
2243
|
-
"run": false
|
|
2372
|
+
"run": false,
|
|
2373
|
+
"WebAuthn.addCredential": false
|
|
2244
2374
|
}
|
|
2245
2375
|
}
|
|
2246
2376
|
},
|
|
@@ -2259,7 +2389,8 @@
|
|
|
2259
2389
|
"waitResponse": false,
|
|
2260
2390
|
"download": false,
|
|
2261
2391
|
"resize": false,
|
|
2262
|
-
"run": false
|
|
2392
|
+
"run": false,
|
|
2393
|
+
"WebAuthn.addCredential": false
|
|
2263
2394
|
}
|
|
2264
2395
|
}
|
|
2265
2396
|
},
|
|
@@ -2277,7 +2408,8 @@
|
|
|
2277
2408
|
"waitResponse": false,
|
|
2278
2409
|
"download": false,
|
|
2279
2410
|
"resize": false,
|
|
2280
|
-
"run": false
|
|
2411
|
+
"run": false,
|
|
2412
|
+
"WebAuthn.addCredential": false
|
|
2281
2413
|
}
|
|
2282
2414
|
}
|
|
2283
2415
|
},
|
|
@@ -2294,7 +2426,8 @@
|
|
|
2294
2426
|
"waitResponse": false,
|
|
2295
2427
|
"download": false,
|
|
2296
2428
|
"resize": false,
|
|
2297
|
-
"run": false
|
|
2429
|
+
"run": false,
|
|
2430
|
+
"WebAuthn.addCredential": false
|
|
2298
2431
|
}
|
|
2299
2432
|
}
|
|
2300
2433
|
},
|
|
@@ -2310,7 +2443,8 @@
|
|
|
2310
2443
|
"waitResponse": false,
|
|
2311
2444
|
"download": false,
|
|
2312
2445
|
"resize": false,
|
|
2313
|
-
"run": false
|
|
2446
|
+
"run": false,
|
|
2447
|
+
"WebAuthn.addCredential": false
|
|
2314
2448
|
}
|
|
2315
2449
|
}
|
|
2316
2450
|
},
|
|
@@ -2325,7 +2459,8 @@
|
|
|
2325
2459
|
"properties": {
|
|
2326
2460
|
"download": false,
|
|
2327
2461
|
"resize": false,
|
|
2328
|
-
"run": false
|
|
2462
|
+
"run": false,
|
|
2463
|
+
"WebAuthn.addCredential": false
|
|
2329
2464
|
}
|
|
2330
2465
|
}
|
|
2331
2466
|
},
|
|
@@ -2339,7 +2474,8 @@
|
|
|
2339
2474
|
"then": {
|
|
2340
2475
|
"properties": {
|
|
2341
2476
|
"resize": false,
|
|
2342
|
-
"run": false
|
|
2477
|
+
"run": false,
|
|
2478
|
+
"WebAuthn.addCredential": false
|
|
2343
2479
|
}
|
|
2344
2480
|
}
|
|
2345
2481
|
},
|
|
@@ -2352,7 +2488,21 @@
|
|
|
2352
2488
|
},
|
|
2353
2489
|
"then": {
|
|
2354
2490
|
"properties": {
|
|
2355
|
-
"run": false
|
|
2491
|
+
"run": false,
|
|
2492
|
+
"WebAuthn.addCredential": false
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
"$comment": "an action does one thing: give each its own item",
|
|
2498
|
+
"if": {
|
|
2499
|
+
"required": [
|
|
2500
|
+
"run"
|
|
2501
|
+
]
|
|
2502
|
+
},
|
|
2503
|
+
"then": {
|
|
2504
|
+
"properties": {
|
|
2505
|
+
"WebAuthn.addCredential": false
|
|
2356
2506
|
}
|
|
2357
2507
|
}
|
|
2358
2508
|
},
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"propertyNames": { "minLength": 1 },
|
|
8
8
|
"additionalProperties": {
|
|
9
9
|
"type": "string",
|
|
10
|
-
"description": "An ICU MessageFormat message.
|
|
11
|
-
"examples": ["{client} wants access to your account"]
|
|
10
|
+
"description": "An ICU MessageFormat message (SPEC.md §4): `{param}` is filled from the node's `params`, which name sample or data values; `{count, plural, one {# finding} other {# findings}}` chooses its case by the CLDR plural rules of the catalog's language, `selectordinal` by its ordinal rules, and `{role, select, admin {..} other {..}}` by the value. Every plural and select has an `other`.",
|
|
11
|
+
"examples": ["{client} wants access to your account", "{count, plural, one {# finding} other {# findings}}"]
|
|
12
12
|
}
|
|
13
13
|
}
|