@qa-ai-stlc/schemas 0.0.0 → 0.2.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/dist/artifacts.d.ts +51 -0
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +4 -0
- package/dist/artifacts.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/json-schema/page-models.json +205 -0
- package/dist/json-schema/route-map.json +60 -0
- package/dist/page-model.d.ts +132 -0
- package/dist/page-model.d.ts.map +1 -0
- package/dist/page-model.js +62 -0
- package/dist/page-model.js.map +1 -0
- package/dist/route-map.d.ts +32 -0
- package/dist/route-map.d.ts.map +1 -0
- package/dist/route-map.js +24 -0
- package/dist/route-map.js.map +1 -0
- package/package.json +1 -1
package/dist/artifacts.d.ts
CHANGED
|
@@ -87,6 +87,57 @@ export declare const artifactSchemas: {
|
|
|
87
87
|
inScope: import("zod").ZodBoolean;
|
|
88
88
|
}, import("zod/v4/core").$strip>>;
|
|
89
89
|
}, import("zod/v4/core").$strip>;
|
|
90
|
+
readonly 'route-map': import("zod").ZodObject<{
|
|
91
|
+
schemaVersion: import("zod").ZodDefault<import("zod").ZodLiteral<1>>;
|
|
92
|
+
generatedAt: import("zod").ZodISODateTime;
|
|
93
|
+
startUrl: import("zod").ZodString;
|
|
94
|
+
routes: import("zod").ZodArray<import("zod").ZodObject<{
|
|
95
|
+
url: import("zod").ZodString;
|
|
96
|
+
discoveredVia: import("zod").ZodEnum<{
|
|
97
|
+
link: "link";
|
|
98
|
+
sitemap: "sitemap";
|
|
99
|
+
}>;
|
|
100
|
+
discoveredFrom: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
+
httpStatus: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
102
|
+
}, import("zod/v4/core").$strip>>;
|
|
103
|
+
}, import("zod/v4/core").$strip>;
|
|
104
|
+
readonly 'page-models': import("zod").ZodObject<{
|
|
105
|
+
schemaVersion: import("zod").ZodDefault<import("zod").ZodLiteral<1>>;
|
|
106
|
+
generatedAt: import("zod").ZodISODateTime;
|
|
107
|
+
pages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
108
|
+
url: import("zod").ZodString;
|
|
109
|
+
accessibilityTree: import("zod").ZodType<import("./page-model.js").AccessibilityNode, unknown, import("zod/v4/core").$ZodTypeInternals<import("./page-model.js").AccessibilityNode, unknown>>;
|
|
110
|
+
interactiveElements: import("zod").ZodArray<import("zod").ZodObject<{
|
|
111
|
+
kind: import("zod").ZodEnum<{
|
|
112
|
+
input: "input";
|
|
113
|
+
link: "link";
|
|
114
|
+
button: "button";
|
|
115
|
+
select: "select";
|
|
116
|
+
textarea: "textarea";
|
|
117
|
+
}>;
|
|
118
|
+
accessibleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
testId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
|
+
}, import("zod/v4/core").$strip>>;
|
|
121
|
+
forms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
122
|
+
action: import("zod").ZodOptional<import("zod").ZodString>;
|
|
123
|
+
method: import("zod").ZodString;
|
|
124
|
+
fields: import("zod").ZodArray<import("zod").ZodObject<{
|
|
125
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
126
|
+
type: import("zod").ZodString;
|
|
127
|
+
required: import("zod").ZodBoolean;
|
|
128
|
+
}, import("zod/v4/core").$strip>>;
|
|
129
|
+
}, import("zod/v4/core").$strip>>;
|
|
130
|
+
tables: import("zod").ZodArray<import("zod").ZodObject<{
|
|
131
|
+
columnHeaders: import("zod").ZodArray<import("zod").ZodString>;
|
|
132
|
+
rowCount: import("zod").ZodNumber;
|
|
133
|
+
}, import("zod/v4/core").$strip>>;
|
|
134
|
+
dialogs: import("zod").ZodArray<import("zod").ZodObject<{
|
|
135
|
+
accessibleName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
+
open: import("zod").ZodBoolean;
|
|
137
|
+
}, import("zod/v4/core").$strip>>;
|
|
138
|
+
truncated: import("zod").ZodBoolean;
|
|
139
|
+
}, import("zod/v4/core").$strip>>;
|
|
140
|
+
}, import("zod/v4/core").$strip>;
|
|
90
141
|
readonly 'test-case': import("zod").ZodObject<{
|
|
91
142
|
schemaVersion: import("zod").ZodDefault<import("zod").ZodLiteral<1>>;
|
|
92
143
|
id: import("zod").ZodString;
|
package/dist/artifacts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,eAAe,CAAC"}
|
package/dist/artifacts.js
CHANGED
|
@@ -6,7 +6,9 @@ import { ConfigSchema } from './config.js';
|
|
|
6
6
|
import { DefectDraftSchema } from './defect.js';
|
|
7
7
|
import { EvidenceSchema } from './evidence.js';
|
|
8
8
|
import { ManifestSchema } from './manifest.js';
|
|
9
|
+
import { PageModelSetSchema } from './page-model.js';
|
|
9
10
|
import { RcaSchema } from './rca.js';
|
|
11
|
+
import { RouteMapSchema } from './route-map.js';
|
|
10
12
|
import { RunResultSchema } from './run-result.js';
|
|
11
13
|
import { ScopeSchema } from './scope.js';
|
|
12
14
|
import { SelectorRegistrySchema } from './selector-registry.js';
|
|
@@ -17,6 +19,8 @@ import { TestCaseSchema } from './test-case.js';
|
|
|
17
19
|
export const artifactSchemas = {
|
|
18
20
|
config: ConfigSchema,
|
|
19
21
|
scope: ScopeSchema,
|
|
22
|
+
'route-map': RouteMapSchema,
|
|
23
|
+
'page-models': PageModelSetSchema,
|
|
20
24
|
'test-case': TestCaseSchema,
|
|
21
25
|
'run-result': RunResultSchema,
|
|
22
26
|
evidence: EvidenceSchema,
|
package/dist/artifacts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,8FAA8F;AAC9F,iGAAiG;AACjG,+FAA+F;AAC/F,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,eAAe;IAC7B,QAAQ,EAAE,cAAc;IACxB,cAAc,EAAE,iBAAiB;IACjC,GAAG,EAAE,SAAS;IACd,mBAAmB,EAAE,sBAAsB;IAC3C,aAAa,EAAE,gBAAgB;IAC/B,iBAAiB,EAAE,oBAAoB;IACvC,QAAQ,EAAE,cAAc;CAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,8FAA8F;AAC9F,iGAAiG;AACjG,+FAA+F;AAC/F,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,kBAAkB;IACjC,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,eAAe;IAC7B,QAAQ,EAAE,cAAc;IACxB,cAAc,EAAE,iBAAiB;IACjC,GAAG,EAAE,SAAS;IACd,mBAAmB,EAAE,sBAAsB;IAC3C,aAAa,EAAE,gBAAgB;IAC/B,iBAAiB,EAAE,oBAAoB;IACvC,QAAQ,EAAE,cAAc;CAChB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './primitives.js';
|
|
|
3
3
|
export * from './artifacts.js';
|
|
4
4
|
export * from './config.js';
|
|
5
5
|
export * from './scope.js';
|
|
6
|
+
export * from './route-map.js';
|
|
7
|
+
export * from './page-model.js';
|
|
6
8
|
export * from './test-case.js';
|
|
7
9
|
export * from './evidence.js';
|
|
8
10
|
export * from './run-result.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,8 @@ export * from './primitives.js';
|
|
|
5
5
|
export * from './artifacts.js';
|
|
6
6
|
export * from './config.js';
|
|
7
7
|
export * from './scope.js';
|
|
8
|
+
export * from './route-map.js';
|
|
9
|
+
export * from './page-model.js';
|
|
8
10
|
export * from './test-case.js';
|
|
9
11
|
export * from './evidence.js';
|
|
10
12
|
export * from './run-result.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schemaVersion": {
|
|
6
|
+
"default": 1,
|
|
7
|
+
"type": "number",
|
|
8
|
+
"const": 1
|
|
9
|
+
},
|
|
10
|
+
"generatedAt": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "date-time",
|
|
13
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
14
|
+
},
|
|
15
|
+
"pages": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"url": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
},
|
|
24
|
+
"accessibilityTree": {
|
|
25
|
+
"$ref": "#/$defs/__schema0"
|
|
26
|
+
},
|
|
27
|
+
"interactiveElements": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"kind": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"button",
|
|
36
|
+
"link",
|
|
37
|
+
"input",
|
|
38
|
+
"select",
|
|
39
|
+
"textarea"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"accessibleName": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"testId": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"kind"
|
|
51
|
+
],
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"forms": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"action": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"method": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"fields": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"name": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"type": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"required": {
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"type",
|
|
85
|
+
"required"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"method",
|
|
93
|
+
"fields"
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"tables": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"columnHeaders": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"rowCount": {
|
|
110
|
+
"type": "integer",
|
|
111
|
+
"minimum": 0,
|
|
112
|
+
"maximum": 9007199254740991
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"columnHeaders",
|
|
117
|
+
"rowCount"
|
|
118
|
+
],
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"dialogs": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"accessibleName": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"open": {
|
|
131
|
+
"type": "boolean"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": [
|
|
135
|
+
"open"
|
|
136
|
+
],
|
|
137
|
+
"additionalProperties": false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"truncated": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"url",
|
|
146
|
+
"accessibilityTree",
|
|
147
|
+
"interactiveElements",
|
|
148
|
+
"forms",
|
|
149
|
+
"tables",
|
|
150
|
+
"dialogs",
|
|
151
|
+
"truncated"
|
|
152
|
+
],
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"schemaVersion",
|
|
159
|
+
"generatedAt",
|
|
160
|
+
"pages"
|
|
161
|
+
],
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"$defs": {
|
|
164
|
+
"__schema0": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"properties": {
|
|
167
|
+
"role": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1
|
|
170
|
+
},
|
|
171
|
+
"name": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"text": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"checked": {
|
|
178
|
+
"type": "boolean"
|
|
179
|
+
},
|
|
180
|
+
"disabled": {
|
|
181
|
+
"type": "boolean"
|
|
182
|
+
},
|
|
183
|
+
"expanded": {
|
|
184
|
+
"type": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"pressed": {
|
|
187
|
+
"type": "boolean"
|
|
188
|
+
},
|
|
189
|
+
"selected": {
|
|
190
|
+
"type": "boolean"
|
|
191
|
+
},
|
|
192
|
+
"children": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"items": {
|
|
195
|
+
"$ref": "#/$defs/__schema0"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": [
|
|
200
|
+
"role"
|
|
201
|
+
],
|
|
202
|
+
"additionalProperties": false
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schemaVersion": {
|
|
6
|
+
"default": 1,
|
|
7
|
+
"type": "number",
|
|
8
|
+
"const": 1
|
|
9
|
+
},
|
|
10
|
+
"generatedAt": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "date-time",
|
|
13
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
14
|
+
},
|
|
15
|
+
"startUrl": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"routes": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"url": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
"discoveredVia": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"link",
|
|
32
|
+
"sitemap"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"discoveredFrom": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"httpStatus": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": -9007199254740991,
|
|
42
|
+
"maximum": 9007199254740991
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"url",
|
|
47
|
+
"discoveredVia"
|
|
48
|
+
],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"schemaVersion",
|
|
55
|
+
"generatedAt",
|
|
56
|
+
"startUrl",
|
|
57
|
+
"routes"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AccessibilityNodeSchema: z.ZodType<AccessibilityNode>;
|
|
3
|
+
export interface AccessibilityNode {
|
|
4
|
+
role: string;
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
text?: string | undefined;
|
|
7
|
+
checked?: boolean | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
expanded?: boolean | undefined;
|
|
10
|
+
selected?: boolean | undefined;
|
|
11
|
+
pressed?: boolean | undefined;
|
|
12
|
+
children?: AccessibilityNode[] | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const InteractiveElementKindSchema: z.ZodEnum<{
|
|
15
|
+
input: "input";
|
|
16
|
+
link: "link";
|
|
17
|
+
button: "button";
|
|
18
|
+
select: "select";
|
|
19
|
+
textarea: "textarea";
|
|
20
|
+
}>;
|
|
21
|
+
export type InteractiveElementKind = z.infer<typeof InteractiveElementKindSchema>;
|
|
22
|
+
export declare const InteractiveElementSchema: z.ZodObject<{
|
|
23
|
+
kind: z.ZodEnum<{
|
|
24
|
+
input: "input";
|
|
25
|
+
link: "link";
|
|
26
|
+
button: "button";
|
|
27
|
+
select: "select";
|
|
28
|
+
textarea: "textarea";
|
|
29
|
+
}>;
|
|
30
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
31
|
+
testId: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type InteractiveElement = z.infer<typeof InteractiveElementSchema>;
|
|
34
|
+
export declare const FormFieldSchema: z.ZodObject<{
|
|
35
|
+
name: z.ZodOptional<z.ZodString>;
|
|
36
|
+
type: z.ZodString;
|
|
37
|
+
required: z.ZodBoolean;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type FormField = z.infer<typeof FormFieldSchema>;
|
|
40
|
+
export declare const FormSchema: z.ZodObject<{
|
|
41
|
+
action: z.ZodOptional<z.ZodString>;
|
|
42
|
+
method: z.ZodString;
|
|
43
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
44
|
+
name: z.ZodOptional<z.ZodString>;
|
|
45
|
+
type: z.ZodString;
|
|
46
|
+
required: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type Form = z.infer<typeof FormSchema>;
|
|
50
|
+
export declare const TableSchema: z.ZodObject<{
|
|
51
|
+
columnHeaders: z.ZodArray<z.ZodString>;
|
|
52
|
+
rowCount: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type Table = z.infer<typeof TableSchema>;
|
|
55
|
+
export declare const DialogSchema: z.ZodObject<{
|
|
56
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
57
|
+
open: z.ZodBoolean;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type Dialog = z.infer<typeof DialogSchema>;
|
|
60
|
+
export declare const PageModelSchema: z.ZodObject<{
|
|
61
|
+
url: z.ZodString;
|
|
62
|
+
accessibilityTree: z.ZodType<AccessibilityNode, unknown, z.core.$ZodTypeInternals<AccessibilityNode, unknown>>;
|
|
63
|
+
interactiveElements: z.ZodArray<z.ZodObject<{
|
|
64
|
+
kind: z.ZodEnum<{
|
|
65
|
+
input: "input";
|
|
66
|
+
link: "link";
|
|
67
|
+
button: "button";
|
|
68
|
+
select: "select";
|
|
69
|
+
textarea: "textarea";
|
|
70
|
+
}>;
|
|
71
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
72
|
+
testId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
forms: z.ZodArray<z.ZodObject<{
|
|
75
|
+
action: z.ZodOptional<z.ZodString>;
|
|
76
|
+
method: z.ZodString;
|
|
77
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
type: z.ZodString;
|
|
80
|
+
required: z.ZodBoolean;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
84
|
+
columnHeaders: z.ZodArray<z.ZodString>;
|
|
85
|
+
rowCount: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
dialogs: z.ZodArray<z.ZodObject<{
|
|
88
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
89
|
+
open: z.ZodBoolean;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
truncated: z.ZodBoolean;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type PageModel = z.infer<typeof PageModelSchema>;
|
|
94
|
+
export declare const PageModelSetSchema: z.ZodObject<{
|
|
95
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
96
|
+
generatedAt: z.ZodISODateTime;
|
|
97
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
98
|
+
url: z.ZodString;
|
|
99
|
+
accessibilityTree: z.ZodType<AccessibilityNode, unknown, z.core.$ZodTypeInternals<AccessibilityNode, unknown>>;
|
|
100
|
+
interactiveElements: z.ZodArray<z.ZodObject<{
|
|
101
|
+
kind: z.ZodEnum<{
|
|
102
|
+
input: "input";
|
|
103
|
+
link: "link";
|
|
104
|
+
button: "button";
|
|
105
|
+
select: "select";
|
|
106
|
+
textarea: "textarea";
|
|
107
|
+
}>;
|
|
108
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
109
|
+
testId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
forms: z.ZodArray<z.ZodObject<{
|
|
112
|
+
action: z.ZodOptional<z.ZodString>;
|
|
113
|
+
method: z.ZodString;
|
|
114
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
115
|
+
name: z.ZodOptional<z.ZodString>;
|
|
116
|
+
type: z.ZodString;
|
|
117
|
+
required: z.ZodBoolean;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
121
|
+
columnHeaders: z.ZodArray<z.ZodString>;
|
|
122
|
+
rowCount: z.ZodNumber;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
dialogs: z.ZodArray<z.ZodObject<{
|
|
125
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
126
|
+
open: z.ZodBoolean;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
truncated: z.ZodBoolean;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export type PageModelSet = z.infer<typeof PageModelSetSchema>;
|
|
132
|
+
//# sourceMappingURL=page-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-model.d.ts","sourceRoot":"","sources":["../src/page-model.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAYhE,CAAC;AAIF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;CAC5C;AAED,eAAO,MAAM,4BAA4B;;;;;;EAA4D,CAAC;AACtG,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,wBAAwB;;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;iBAIrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,YAAY;;;iBAGvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Copyright The QA-AI-STLC Authors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { IsoDateTimeSchema } from './primitives.js';
|
|
5
|
+
import { SCHEMA_VERSION, SchemaVersionSchema } from './version.js';
|
|
6
|
+
// Page-derived content is untrusted (development plan section 2.6): every string here has passed
|
|
7
|
+
// through the explorer's length caps before reaching this schema, and the tree itself is capped
|
|
8
|
+
// in node count. This schema records structural signals only — role, name, interactive state —
|
|
9
|
+
// never a "state" judgment like empty/loading/error, which stays an interpretation for the agent
|
|
10
|
+
// layer, not a determinstic classification the engine could get wrong silently.
|
|
11
|
+
export const AccessibilityNodeSchema = z.lazy(() => z.object({
|
|
12
|
+
role: z.string().min(1),
|
|
13
|
+
name: z.string().optional(),
|
|
14
|
+
text: z.string().optional(),
|
|
15
|
+
checked: z.boolean().optional(),
|
|
16
|
+
disabled: z.boolean().optional(),
|
|
17
|
+
expanded: z.boolean().optional(),
|
|
18
|
+
pressed: z.boolean().optional(),
|
|
19
|
+
selected: z.boolean().optional(),
|
|
20
|
+
children: z.array(AccessibilityNodeSchema).optional(),
|
|
21
|
+
}));
|
|
22
|
+
export const InteractiveElementKindSchema = z.enum(['button', 'link', 'input', 'select', 'textarea']);
|
|
23
|
+
export const InteractiveElementSchema = z.object({
|
|
24
|
+
kind: InteractiveElementKindSchema,
|
|
25
|
+
accessibleName: z.string().optional(),
|
|
26
|
+
testId: z.string().optional(),
|
|
27
|
+
});
|
|
28
|
+
export const FormFieldSchema = z.object({
|
|
29
|
+
name: z.string().optional(),
|
|
30
|
+
type: z.string().min(1),
|
|
31
|
+
required: z.boolean(),
|
|
32
|
+
});
|
|
33
|
+
export const FormSchema = z.object({
|
|
34
|
+
action: z.string().optional(),
|
|
35
|
+
method: z.string().min(1),
|
|
36
|
+
fields: z.array(FormFieldSchema),
|
|
37
|
+
});
|
|
38
|
+
export const TableSchema = z.object({
|
|
39
|
+
columnHeaders: z.array(z.string()),
|
|
40
|
+
rowCount: z.number().int().nonnegative(),
|
|
41
|
+
});
|
|
42
|
+
export const DialogSchema = z.object({
|
|
43
|
+
accessibleName: z.string().optional(),
|
|
44
|
+
open: z.boolean(),
|
|
45
|
+
});
|
|
46
|
+
export const PageModelSchema = z.object({
|
|
47
|
+
url: z.string().min(1),
|
|
48
|
+
accessibilityTree: AccessibilityNodeSchema,
|
|
49
|
+
interactiveElements: z.array(InteractiveElementSchema),
|
|
50
|
+
forms: z.array(FormSchema),
|
|
51
|
+
tables: z.array(TableSchema),
|
|
52
|
+
dialogs: z.array(DialogSchema),
|
|
53
|
+
// Set when a length or node-count cap actually cut something, so a caller can tell a complete
|
|
54
|
+
// model from one the untrusted-data caps had to shrink (development plan section 2.6).
|
|
55
|
+
truncated: z.boolean(),
|
|
56
|
+
});
|
|
57
|
+
export const PageModelSetSchema = z.object({
|
|
58
|
+
schemaVersion: SchemaVersionSchema.default(SCHEMA_VERSION),
|
|
59
|
+
generatedAt: IsoDateTimeSchema,
|
|
60
|
+
pages: z.array(PageModelSchema),
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=page-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-model.js","sourceRoot":"","sources":["../src/page-model.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnE,iGAAiG;AACjG,gGAAgG;AAChG,+FAA+F;AAC/F,iGAAiG;AACjG,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAiC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/E,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CACH,CAAC;AAgBF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAGtG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,4BAA4B;IAClC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACjC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACzC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;CAClB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,iBAAiB,EAAE,uBAAuB;IAC1C,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;IAC9B,8FAA8F;IAC9F,uFAAuF;IACvF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,aAAa,EAAE,mBAAmB,CAAC,OAAO,CAAC,cAAc,CAAC;IAC1D,WAAW,EAAE,iBAAiB;IAC9B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RouteDiscoveryMethodSchema: z.ZodEnum<{
|
|
3
|
+
link: "link";
|
|
4
|
+
sitemap: "sitemap";
|
|
5
|
+
}>;
|
|
6
|
+
export type RouteDiscoveryMethod = z.infer<typeof RouteDiscoveryMethodSchema>;
|
|
7
|
+
export declare const DiscoveredRouteSchema: z.ZodObject<{
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
discoveredVia: z.ZodEnum<{
|
|
10
|
+
link: "link";
|
|
11
|
+
sitemap: "sitemap";
|
|
12
|
+
}>;
|
|
13
|
+
discoveredFrom: z.ZodOptional<z.ZodString>;
|
|
14
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type DiscoveredRoute = z.infer<typeof DiscoveredRouteSchema>;
|
|
17
|
+
export declare const RouteMapSchema: z.ZodObject<{
|
|
18
|
+
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
19
|
+
generatedAt: z.ZodISODateTime;
|
|
20
|
+
startUrl: z.ZodString;
|
|
21
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
discoveredVia: z.ZodEnum<{
|
|
24
|
+
link: "link";
|
|
25
|
+
sitemap: "sitemap";
|
|
26
|
+
}>;
|
|
27
|
+
discoveredFrom: z.ZodOptional<z.ZodString>;
|
|
28
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type RouteMap = z.infer<typeof RouteMapSchema>;
|
|
32
|
+
//# sourceMappingURL=route-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-map.d.ts","sourceRoot":"","sources":["../src/route-map.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,0BAA0B;;;EAA8B,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,qBAAqB;;;;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAKpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright The QA-AI-STLC Authors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { IsoDateTimeSchema } from './primitives.js';
|
|
5
|
+
import { SCHEMA_VERSION, SchemaVersionSchema } from './version.js';
|
|
6
|
+
// Sitemap discovery has no referrer inside the crawled page graph; a link click always does
|
|
7
|
+
// (development plan section 6.3 step 2).
|
|
8
|
+
export const RouteDiscoveryMethodSchema = z.enum(['link', 'sitemap']);
|
|
9
|
+
export const DiscoveredRouteSchema = z.object({
|
|
10
|
+
url: z.string().min(1),
|
|
11
|
+
discoveredVia: RouteDiscoveryMethodSchema,
|
|
12
|
+
discoveredFrom: z.string().min(1).optional(),
|
|
13
|
+
httpStatus: z.number().int().optional(),
|
|
14
|
+
});
|
|
15
|
+
// The crawler's own output (development plan section 6.3 step 2): every URL it reached while
|
|
16
|
+
// staying inside the configured domain allowlist. Page analysis (section 6.3 step 3) and the
|
|
17
|
+
// selector registry (step 6) are built from this in later phases, not by the crawler itself.
|
|
18
|
+
export const RouteMapSchema = z.object({
|
|
19
|
+
schemaVersion: SchemaVersionSchema.default(SCHEMA_VERSION),
|
|
20
|
+
generatedAt: IsoDateTimeSchema,
|
|
21
|
+
startUrl: z.string().min(1),
|
|
22
|
+
routes: z.array(DiscoveredRouteSchema),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=route-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-map.js","sourceRoot":"","sources":["../src/route-map.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sCAAsC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnE,4FAA4F;AAC5F,yCAAyC;AACzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAGtE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,aAAa,EAAE,0BAA0B;IACzC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAGH,6FAA6F;AAC7F,6FAA6F;AAC7F,6FAA6F;AAC7F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,aAAa,EAAE,mBAAmB,CAAC,OAAO,CAAC,cAAc,CAAC;IAC1D,WAAW,EAAE,iBAAiB;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC;CACvC,CAAC,CAAC"}
|
package/package.json
CHANGED