@plurnk/plurnk-contracts 1.4.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/LICENSE +21 -0
- package/README.md +119 -0
- package/SPEC.md +954 -0
- package/bin/plurnk-contracts.js +43 -0
- package/dist/plurnk.gbnf +394 -0
- package/dist/schema/ClientDisplayCapabilities.json +54 -0
- package/dist/schema/ClientStatement.json +68 -0
- package/dist/schema/EntryReadResult.json +101 -0
- package/dist/schema/LineMarker.json +16 -0
- package/dist/schema/LoopFlags.json +16 -0
- package/dist/schema/MatcherBody.json +84 -0
- package/dist/schema/Notice.json +67 -0
- package/dist/schema/OperationResult.json +44 -0
- package/dist/schema/ParsedPath.json +64 -0
- package/dist/schema/PlurnkStatement.json +264 -0
- package/dist/schema/Position.json +20 -0
- package/dist/schema/ProblemDetails.json +51 -0
- package/dist/schema/ProposalDisposition.json +26 -0
- package/dist/schema/ProposalProjection.json +44 -0
- package/dist/schema/ProviderCost.json +69 -0
- package/dist/schema/ResourceSelection.json +20 -0
- package/dist/schema/SendBody.json +13 -0
- package/dist/schema/TextRegion.json +31 -0
- package/dist/src/AstBuilder.d.ts +24 -0
- package/dist/src/AstBuilder.d.ts.map +1 -0
- package/dist/src/AstBuilder.js +609 -0
- package/dist/src/AstBuilder.js.map +1 -0
- package/dist/src/PathSyntax.d.ts +9 -0
- package/dist/src/PathSyntax.d.ts.map +1 -0
- package/dist/src/PathSyntax.js +36 -0
- package/dist/src/PathSyntax.js.map +1 -0
- package/dist/src/PlurnkErrorStrategy.d.ts +10 -0
- package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -0
- package/dist/src/PlurnkErrorStrategy.js +147 -0
- package/dist/src/PlurnkErrorStrategy.js.map +1 -0
- package/dist/src/PlurnkParseError.d.ts +17 -0
- package/dist/src/PlurnkParseError.d.ts.map +1 -0
- package/dist/src/PlurnkParseError.js +24 -0
- package/dist/src/PlurnkParseError.js.map +1 -0
- package/dist/src/PlurnkParser.d.ts +9 -0
- package/dist/src/PlurnkParser.d.ts.map +1 -0
- package/dist/src/PlurnkParser.js +396 -0
- package/dist/src/PlurnkParser.js.map +1 -0
- package/dist/src/Problems.d.ts +8 -0
- package/dist/src/Problems.d.ts.map +1 -0
- package/dist/src/Problems.js +23 -0
- package/dist/src/Problems.js.map +1 -0
- package/dist/src/RecordingListener.d.ts +9 -0
- package/dist/src/RecordingListener.d.ts.map +1 -0
- package/dist/src/RecordingListener.js +19 -0
- package/dist/src/RecordingListener.js.map +1 -0
- package/dist/src/Validator.d.ts +49 -0
- package/dist/src/Validator.d.ts.map +1 -0
- package/dist/src/Validator.js +211 -0
- package/dist/src/Validator.js.map +1 -0
- package/dist/src/generated/plurnkLexer.d.ts +129 -0
- package/dist/src/generated/plurnkLexer.d.ts.map +1 -0
- package/dist/src/generated/plurnkLexer.js +808 -0
- package/dist/src/generated/plurnkLexer.js.map +1 -0
- package/dist/src/generated/plurnkParser.d.ts +525 -0
- package/dist/src/generated/plurnkParser.d.ts.map +1 -0
- package/dist/src/generated/plurnkParser.js +3896 -0
- package/dist/src/generated/plurnkParser.js.map +1 -0
- package/dist/src/generated/plurnkParserVisitor.d.ts +298 -0
- package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -0
- package/dist/src/generated/plurnkParserVisitor.js +257 -0
- package/dist/src/generated/plurnkParserVisitor.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types.d.ts +29 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.generated.d.ts +450 -0
- package/dist/src/types.generated.d.ts.map +1 -0
- package/dist/src/types.generated.js +4 -0
- package/dist/src/types.generated.js.map +1 -0
- package/dist/src/types.js +23 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +87 -0
- package/plurnk.md +220 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/EntryReadResult.json",
|
|
4
|
+
"title": "EntryReadResult",
|
|
5
|
+
"description": "The runtime-neutral result of reading one client-visible entry, either completely or as one channel suffix.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"required": ["status", "entry"],
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": { "const": 200 },
|
|
13
|
+
"entry": { "$ref": "#/$defs/entry" }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["status", "problem", "entry"],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"status": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"minimum": 400,
|
|
24
|
+
"maximum": 599
|
|
25
|
+
},
|
|
26
|
+
"problem": { "$ref": "https://schemas.plurnk.dev/v0/ProblemDetails.json" },
|
|
27
|
+
"entry": { "type": "null" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"$defs": {
|
|
32
|
+
"entry": {
|
|
33
|
+
"title": "ClientEntry",
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["entryId", "target", "channels", "tags"],
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"entryId": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 1,
|
|
41
|
+
"maximum": 9007199254740991
|
|
42
|
+
},
|
|
43
|
+
"target": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"channels": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"propertyNames": { "minLength": 1 },
|
|
50
|
+
"additionalProperties": { "$ref": "#/$defs/channel" }
|
|
51
|
+
},
|
|
52
|
+
"tags": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"uniqueItems": true,
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"channel": {
|
|
63
|
+
"title": "ClientEntryChannel",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": [
|
|
66
|
+
"content",
|
|
67
|
+
"contentOffset",
|
|
68
|
+
"contentLength",
|
|
69
|
+
"mimetype",
|
|
70
|
+
"tokens",
|
|
71
|
+
"state"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"content": { "type": "string" },
|
|
76
|
+
"contentOffset": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 9007199254740991
|
|
80
|
+
},
|
|
81
|
+
"contentLength": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 0,
|
|
84
|
+
"maximum": 9007199254740991
|
|
85
|
+
},
|
|
86
|
+
"mimetype": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1
|
|
89
|
+
},
|
|
90
|
+
"tokens": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"minimum": 0,
|
|
93
|
+
"maximum": 9007199254740991
|
|
94
|
+
},
|
|
95
|
+
"state": {
|
|
96
|
+
"enum": ["static", "active", "closed", "errored"]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/LineMarker.json",
|
|
4
|
+
"title": "LineMarker",
|
|
5
|
+
"description": "The ordered numeric components parsed from a `<scope>` slot. AstBuilder converts each lexical number to a JavaScript number; the operation owner assigns arity and meaning, including text coordinates, result positions, timing, mutation anchors, and an optional leading semantic threshold.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["marks"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"marks": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": { "type": "number" },
|
|
13
|
+
"minItems": 1
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/LoopFlags.json",
|
|
4
|
+
"title": "LoopFlags",
|
|
5
|
+
"description": "The complete effective policy posture of one model loop. Persisted partial objects are expanded to this shape by the runtime owner before use or projection.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["mode", "auto", "noWeb", "noInteraction", "noProposals"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"mode": { "enum": ["ask", "act"] },
|
|
11
|
+
"auto": { "type": "boolean" },
|
|
12
|
+
"noWeb": { "type": "boolean" },
|
|
13
|
+
"noInteraction": { "type": "boolean" },
|
|
14
|
+
"noProposals": { "type": "boolean" }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/MatcherBody.json",
|
|
4
|
+
"title": "MatcherBody",
|
|
5
|
+
"description": "Parsed body of a FIND/READ/OPEN/FOLD statement, discriminated on `dialect`. The dialect is determined by the body's leading characters (`//` xpath, `/` regex, `$` jsonpath, `~` semantic, `@` graph, else glob). The regex variant carries pattern and flags split out of the `/pattern/flags` literal; every variant remains JSON-serializable.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/XPathBody" },
|
|
8
|
+
{ "$ref": "#/$defs/RegexBody" },
|
|
9
|
+
{ "$ref": "#/$defs/JsonPathBody" },
|
|
10
|
+
{ "$ref": "#/$defs/SemanticBody" },
|
|
11
|
+
{ "$ref": "#/$defs/GraphBody" },
|
|
12
|
+
{ "$ref": "#/$defs/GlobBody" }
|
|
13
|
+
],
|
|
14
|
+
"$defs": {
|
|
15
|
+
"XPathBody": {
|
|
16
|
+
"title": "XPathBody",
|
|
17
|
+
"description": "XPath 1.0 expression. Validated at parse time via the xpath library.",
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["dialect", "raw"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"dialect": { "const": "xpath" },
|
|
23
|
+
"raw": { "type": "string", "minLength": 2 }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"RegexBody": {
|
|
27
|
+
"title": "RegexBody",
|
|
28
|
+
"description": "ECMAScript regex literal `/pattern/flags`. Escape a literal delimiter as `\\/`. Pattern and flags are split out for direct use. `raw` preserves the literal form for round-tripping.",
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["dialect", "raw", "pattern", "flags"],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"dialect": { "const": "regex" },
|
|
34
|
+
"raw": { "type": "string", "minLength": 2 },
|
|
35
|
+
"pattern": { "type": "string" },
|
|
36
|
+
"flags": { "type": "string" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"JsonPathBody": {
|
|
40
|
+
"title": "JsonPathBody",
|
|
41
|
+
"description": "RFC 9535 JSONPath expression. Compiled at parse time with json-p3, the same engine used for runtime matching.",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["dialect", "raw"],
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"dialect": { "const": "jsonpath" },
|
|
47
|
+
"raw": { "type": "string", "minLength": 1 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"SemanticBody": {
|
|
51
|
+
"title": "SemanticBody",
|
|
52
|
+
"description": "Semantic similarity query. Body is `~phrase`: natural language after the tilde, with no parse step. Similarity thresholds and result ranges belong to the statement's scope; resolution happens service-side through the configured embedding implementation.",
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": ["dialect", "raw"],
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"dialect": { "const": "semantic" },
|
|
58
|
+
"raw": { "type": "string", "minLength": 1 }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"GraphBody": {
|
|
62
|
+
"title": "GraphBody",
|
|
63
|
+
"description": "Code-graph reference query. Body is `@symbol` for a neighborhood, `@<symbol` for inbound references, or `@>symbol` for outbound references. Resolution happens service-side through the symbol index; no parse step occurs in the language parser.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": ["dialect", "raw"],
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"properties": {
|
|
68
|
+
"dialect": { "const": "graph" },
|
|
69
|
+
"raw": { "type": "string", "minLength": 1 }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"GlobBody": {
|
|
73
|
+
"title": "GlobBody",
|
|
74
|
+
"description": "Pattern with no dialect prefix; treated as a glob/literal match.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": ["dialect", "raw"],
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"dialect": { "const": "glob" },
|
|
80
|
+
"raw": { "type": "string" }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/Notice.json",
|
|
4
|
+
"title": "Notice",
|
|
5
|
+
"description": "A transient, nonterminal observation for clients and the next model packet. A Notice is never operation-failure truth and cannot determine durable history, lifecycle, scheduling, or recovery. Producers use the open `source` + `kind` discriminator; clients render the producer-owned `level` without inferring semantics from kind names.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["source", "kind", "level"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"source": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z]+(:[a-z][a-z0-9-]*)?$",
|
|
13
|
+
"description": "Producer identifier. Top-level for self-contained subsystems; colon-namespaced for parameterized producers such as `provider:openai` or `exec:search`."
|
|
14
|
+
},
|
|
15
|
+
"kind": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"description": "Open discriminator within a source. Examples include `grammar_unenforced`, `embed_progress`, `search_progress`, and `turn_awaiting_model`."
|
|
19
|
+
},
|
|
20
|
+
"level": {
|
|
21
|
+
"enum": ["error", "warn", "info"],
|
|
22
|
+
"description": "Display severity set by the producer. It does not make the Notice a durable operation result."
|
|
23
|
+
},
|
|
24
|
+
"message": {
|
|
25
|
+
"type": ["string", "null"],
|
|
26
|
+
"description": "Optional terse, factual display message."
|
|
27
|
+
},
|
|
28
|
+
"position": {
|
|
29
|
+
"oneOf": [
|
|
30
|
+
{ "$ref": "#/$defs/ContentOffset" },
|
|
31
|
+
{ "$ref": "#/$defs/LogCoordinate" },
|
|
32
|
+
{ "type": "null" }
|
|
33
|
+
],
|
|
34
|
+
"description": "Optional typed position for an observation. ContentOffset points into model output; LogCoordinate points at a durable log row without replacing it."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"$defs": {
|
|
38
|
+
"ContentOffset": {
|
|
39
|
+
"description": "A point in model output using the parser-point convention: 1-based line and 0-based Unicode-code-point column. Absence or a null Notice.position represents an unknown location.",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["type", "line", "column"],
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"properties": {
|
|
44
|
+
"type": { "const": "content-offset" },
|
|
45
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
46
|
+
"column": { "type": "integer", "minimum": 0 }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"LogCoordinate": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["type", "coordinate"],
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"properties": {
|
|
54
|
+
"type": { "const": "log-coordinate" },
|
|
55
|
+
"coordinate": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1,
|
|
58
|
+
"description": "Log row identity, typically `log:///<loop>/<turn>/<sequence>`."
|
|
59
|
+
},
|
|
60
|
+
"op": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Optional op token (FIND/READ/EDIT/...) at the coordinate, for human-readable rendering."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/OperationResult.json",
|
|
4
|
+
"title": "OperationResult",
|
|
5
|
+
"description": "Universal PLURNK operation result. Producer-owned metadata is open, but failures always carry one RFC 9457 Problem Details object and never a parallel error field.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["status"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"status": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 100,
|
|
13
|
+
"maximum": 599
|
|
14
|
+
},
|
|
15
|
+
"problem": {
|
|
16
|
+
"$ref": "https://schemas.plurnk.dev/v0/ProblemDetails.json"
|
|
17
|
+
},
|
|
18
|
+
"error": false
|
|
19
|
+
},
|
|
20
|
+
"oneOf": [
|
|
21
|
+
{
|
|
22
|
+
"properties": {
|
|
23
|
+
"status": {
|
|
24
|
+
"type": "integer",
|
|
25
|
+
"minimum": 100,
|
|
26
|
+
"maximum": 399
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"not": {
|
|
30
|
+
"required": ["problem"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"required": ["problem"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"status": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 400,
|
|
39
|
+
"maximum": 599
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.plurnk.dev/v0/ParsedPath.json",
|
|
4
|
+
"title": "ParsedPath",
|
|
5
|
+
"description": "A parsed target slot from a plurnk statement. Discriminated on `kind`: a bare local path or a WHATWG-decomposed URL. Targets carry an exact address or a path glob; content matching belongs in the statement body.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/LocalPath" },
|
|
8
|
+
{ "$ref": "#/$defs/UrlPath" }
|
|
9
|
+
],
|
|
10
|
+
"$defs": {
|
|
11
|
+
"LocalPath": {
|
|
12
|
+
"title": "LocalPath",
|
|
13
|
+
"description": "A bare local path with no `scheme://` prefix. The raw string is stored verbatim; resolution is the runtime's job.",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["kind", "raw"],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"kind": { "const": "local" },
|
|
19
|
+
"raw": { "type": "string" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"UrlPath": {
|
|
23
|
+
"title": "UrlPath",
|
|
24
|
+
"description": "A path with a `scheme://` prefix, fully decomposed via WHATWG URL.",
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": [
|
|
27
|
+
"kind", "raw", "scheme",
|
|
28
|
+
"username", "password",
|
|
29
|
+
"hostname", "port",
|
|
30
|
+
"pathname", "query", "fragment"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"kind": { "const": "url" },
|
|
35
|
+
"raw": { "type": "string" },
|
|
36
|
+
"scheme": { "type": "string", "minLength": 1 },
|
|
37
|
+
"username": { "type": ["string", "null"] },
|
|
38
|
+
"password": { "type": ["string", "null"] },
|
|
39
|
+
"hostname": { "type": ["string", "null"] },
|
|
40
|
+
"port": {
|
|
41
|
+
"type": ["integer", "null"],
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 65535
|
|
44
|
+
},
|
|
45
|
+
"pathname": { "type": "string" },
|
|
46
|
+
"query": {
|
|
47
|
+
"description": "Canonical serialized WHATWG query component without the leading `?`. Null means no query; the empty string means an explicit empty query (`?`). Ordering, duplicate names, and encoded spelling are preserved.",
|
|
48
|
+
"type": ["string", "null"]
|
|
49
|
+
},
|
|
50
|
+
"fragment": { "type": ["string", "null"] },
|
|
51
|
+
"headers": {
|
|
52
|
+
"description": "Trailing `{key: value}` request-metadata blocks removed before WHATWG decomposition and preserved as ordered pairs. Order and duplicate names survive; the addressed scheme owns their meaning. Absent when no block was supplied.",
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "type": "string" },
|
|
57
|
+
"minItems": 2,
|
|
58
|
+
"maxItems": 2
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|