@ai-switch/tauri-plugin-runtime 0.1.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 +327 -0
- package/THIRD_PARTY_NOTICES.md +210 -0
- package/dist/bridge/handshake.d.ts +11 -0
- package/dist/bridge/json-codec.d.ts +4 -0
- package/dist/bridge/rpc-peer.d.ts +7 -0
- package/dist/bridge/rpc-types.d.ts +20 -0
- package/dist/chunk-CFQSUF5W.js +1794 -0
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/chunk-K5YWIJN6.js +389 -0
- package/dist/chunk-PW7XHHWG.js +403 -0
- package/dist/chunk-RKQEK7DY.js +13879 -0
- package/dist/chunk-WT62GTMC.js +18 -0
- package/dist/chunk-YI6NQ6WR.js +513 -0
- package/dist/host/event-router.d.ts +19 -0
- package/dist/host/file-handles.d.ts +15 -0
- package/dist/host/host.d.ts +2 -0
- package/dist/host/index.d.ts +4 -0
- package/dist/host/index.js +791 -0
- package/dist/host/policy.d.ts +7 -0
- package/dist/host/requests.d.ts +13 -0
- package/dist/host/types.d.ts +19 -0
- package/dist/host/view.d.ts +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -0
- package/dist/node/buffer.d.ts +7 -0
- package/dist/node/buffer.js +8 -0
- package/dist/node/events.d.ts +12 -0
- package/dist/node/events.js +458 -0
- package/dist/node/fs/backend.d.ts +8 -0
- package/dist/node/fs/callback-types.d.ts +43 -0
- package/dist/node/fs/callbacks.d.ts +3 -0
- package/dist/node/fs/client.d.ts +3 -0
- package/dist/node/fs/errors.d.ts +5 -0
- package/dist/node/fs/lifecycle.d.ts +11 -0
- package/dist/node/fs/options.d.ts +7 -0
- package/dist/node/fs/promises.d.ts +33 -0
- package/dist/node/fs/promises.js +30 -0
- package/dist/node/fs/transfer.d.ts +7 -0
- package/dist/node/fs/types.d.ts +86 -0
- package/dist/node/fs.d.ts +36 -0
- package/dist/node/fs.js +92 -0
- package/dist/node/path.d.ts +20 -0
- package/dist/node/path.js +434 -0
- package/dist/plugin/client.d.ts +4 -0
- package/dist/plugin/connection.d.ts +6 -0
- package/dist/plugin/errors.d.ts +3 -0
- package/dist/plugin/index.d.ts +6 -0
- package/dist/plugin/index.js +12 -0
- package/dist/plugin/types.d.ts +28 -0
- package/dist/protocol/capabilities.d.ts +8 -0
- package/dist/protocol/errors.d.ts +14 -0
- package/dist/protocol/generated/capabilities.generated.d.ts +56 -0
- package/dist/protocol/generated/fs.generated.d.ts +178 -0
- package/dist/protocol/generated/host-event.generated.d.ts +17 -0
- package/dist/protocol/generated/manifest.generated.d.ts +64 -0
- package/dist/protocol/generated/session.generated.d.ts +93 -0
- package/dist/protocol/generated/types.generated.d.ts +6 -0
- package/dist/protocol/generated/validators.generated.d.mts +24 -0
- package/dist/protocol/generated/wire.generated.d.ts +63 -0
- package/dist/protocol/index.d.ts +18 -0
- package/dist/protocol/index.js +746 -0
- package/dist/protocol/json-safety.d.ts +3 -0
- package/dist/protocol/limits.d.ts +11 -0
- package/dist/protocol/manifest.d.ts +5 -0
- package/dist/protocol/path-policy.d.ts +2 -0
- package/dist/protocol/schema/capabilities.schema.json +301 -0
- package/dist/protocol/schema/fs.schema.json +900 -0
- package/dist/protocol/schema/host-event.schema.json +116 -0
- package/dist/protocol/schema/manifest.schema.json +60 -0
- package/dist/protocol/schema/session.schema.json +145 -0
- package/dist/protocol/schema/wire.schema.json +358 -0
- package/dist/protocol/session.d.ts +3 -0
- package/dist/protocol/types.d.ts +27 -0
- package/dist/protocol/validation.d.ts +2 -0
- package/dist/protocol/wire.d.ts +16 -0
- package/package.json +95 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://ai-switch.github.io/aplg/schema/v1/host-event.schema.json",
|
|
4
|
+
"title": "HostEvent",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"kind",
|
|
11
|
+
"sessionId",
|
|
12
|
+
"subscriptionId",
|
|
13
|
+
"seq",
|
|
14
|
+
"payload"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"kind": {
|
|
18
|
+
"const": "capability.event"
|
|
19
|
+
},
|
|
20
|
+
"sessionId": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 128,
|
|
24
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
25
|
+
},
|
|
26
|
+
"subscriptionId": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 128,
|
|
30
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
31
|
+
},
|
|
32
|
+
"seq": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 1,
|
|
35
|
+
"maximum": 9007199254740991
|
|
36
|
+
},
|
|
37
|
+
"payload": {
|
|
38
|
+
"$ref": "#/definitions/jsonValue"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": [
|
|
46
|
+
"kind",
|
|
47
|
+
"sessionId",
|
|
48
|
+
"reason"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"kind": {
|
|
52
|
+
"const": "session.closed"
|
|
53
|
+
},
|
|
54
|
+
"sessionId": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 128,
|
|
58
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
59
|
+
},
|
|
60
|
+
"reason": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"maxLength": 8192
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": [
|
|
70
|
+
"kind",
|
|
71
|
+
"state"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"kind": {
|
|
75
|
+
"const": "transport.state"
|
|
76
|
+
},
|
|
77
|
+
"state": {
|
|
78
|
+
"enum": [
|
|
79
|
+
"connected",
|
|
80
|
+
"disconnected"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"definitions": {
|
|
87
|
+
"jsonValue": {
|
|
88
|
+
"anyOf": [
|
|
89
|
+
{
|
|
90
|
+
"type": "null"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "number"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "string"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"$ref": "#/definitions/jsonValue"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": {
|
|
110
|
+
"$ref": "#/definitions/jsonValue"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://ai-switch.github.io/aplg/schema/v1/manifest.schema.json",
|
|
4
|
+
"title": "Manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["manifestVersion", "id", "name", "version", "description", "license", "engines", "entry", "activation", "requires", "optional", "permissions", "contributes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"manifestVersion": { "const": 1 },
|
|
10
|
+
"id": { "type": "string", "minLength": 3, "maxLength": 160, "pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)+$" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 160 },
|
|
12
|
+
"version": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
13
|
+
"description": { "type": "string", "maxLength": 8192 },
|
|
14
|
+
"license": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
15
|
+
"engines": { "type": "object", "additionalProperties": false, "required": ["aplg"], "properties": { "aplg": { "$ref": "#/definitions/range" } } },
|
|
16
|
+
"entry": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
17
|
+
"activation": { "const": "view" },
|
|
18
|
+
"requires": { "$ref": "#/definitions/capabilityRanges" },
|
|
19
|
+
"optional": { "$ref": "#/definitions/capabilityRanges" },
|
|
20
|
+
"permissions": {
|
|
21
|
+
"type": "object", "additionalProperties": false,
|
|
22
|
+
"required": ["filesystem", "network", "native"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"filesystem": {
|
|
25
|
+
"type": "array", "maxItems": 2,
|
|
26
|
+
"items": { "type": "object", "additionalProperties": false, "required": ["root", "access"], "properties": {
|
|
27
|
+
"root": { "enum": ["plugin-data", "user-selected"] },
|
|
28
|
+
"access": { "type": "array", "minItems": 1, "maxItems": 2, "uniqueItems": true, "items": { "enum": ["read", "write"] } }
|
|
29
|
+
} }
|
|
30
|
+
},
|
|
31
|
+
"network": {
|
|
32
|
+
"type": "array", "maxItems": 64,
|
|
33
|
+
"items": { "type": "object", "additionalProperties": false, "required": ["origins", "methods"], "properties": {
|
|
34
|
+
"origins": { "type": "array", "minItems": 1, "maxItems": 64, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 2048 } },
|
|
35
|
+
"methods": { "type": "array", "minItems": 1, "maxItems": 9, "uniqueItems": true, "items": { "enum": ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "CONNECT", "TRACE"] } }
|
|
36
|
+
} }
|
|
37
|
+
},
|
|
38
|
+
"native": { "type": "boolean" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"contributes": {
|
|
42
|
+
"type": "object", "additionalProperties": false, "required": ["views"],
|
|
43
|
+
"properties": { "views": { "type": "array", "minItems": 1, "maxItems": 32, "items": {
|
|
44
|
+
"type": "object", "additionalProperties": false, "required": ["id", "title"],
|
|
45
|
+
"properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 160 } }
|
|
46
|
+
} } }
|
|
47
|
+
},
|
|
48
|
+
"extensions": { "type": "object", "maxProperties": 64, "propertyNames": { "$ref": "#/definitions/capabilityName" }, "additionalProperties": { "$ref": "#/definitions/jsonValue" } }
|
|
49
|
+
},
|
|
50
|
+
"definitions": {
|
|
51
|
+
"range": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
52
|
+
"capabilityName": { "type": "string", "minLength": 3, "maxLength": 128, "pattern": "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$" },
|
|
53
|
+
"capabilityRanges": { "type": "object", "maxProperties": 128, "propertyNames": { "$ref": "#/definitions/capabilityName" }, "additionalProperties": { "$ref": "#/definitions/range" } },
|
|
54
|
+
"jsonValue": { "anyOf": [
|
|
55
|
+
{ "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" },
|
|
56
|
+
{ "type": "array", "items": { "$ref": "#/definitions/jsonValue" } },
|
|
57
|
+
{ "type": "object", "additionalProperties": { "$ref": "#/definitions/jsonValue" } }
|
|
58
|
+
] }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://ai-switch.github.io/aplg/schema/v1/session.schema.json",
|
|
4
|
+
"title": "SessionDescriptor",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"sessionId",
|
|
9
|
+
"manifest",
|
|
10
|
+
"assetUrl",
|
|
11
|
+
"info"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"sessionId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"maxLength": 128,
|
|
18
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
19
|
+
},
|
|
20
|
+
"manifest": {
|
|
21
|
+
"$ref": "manifest.schema.json"
|
|
22
|
+
},
|
|
23
|
+
"assetUrl": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 8192
|
|
27
|
+
},
|
|
28
|
+
"info": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": [
|
|
32
|
+
"protocol",
|
|
33
|
+
"apiVersion",
|
|
34
|
+
"plugin",
|
|
35
|
+
"capabilities",
|
|
36
|
+
"limits"
|
|
37
|
+
],
|
|
38
|
+
"properties": {
|
|
39
|
+
"protocol": {
|
|
40
|
+
"const": "aplg/1"
|
|
41
|
+
},
|
|
42
|
+
"apiVersion": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"maxLength": 128
|
|
46
|
+
},
|
|
47
|
+
"plugin": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": [
|
|
51
|
+
"id",
|
|
52
|
+
"version",
|
|
53
|
+
"packageSha256"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"id": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 3,
|
|
59
|
+
"maxLength": 160,
|
|
60
|
+
"pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)+$"
|
|
61
|
+
},
|
|
62
|
+
"version": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1,
|
|
65
|
+
"maxLength": 128
|
|
66
|
+
},
|
|
67
|
+
"packageSha256": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"capabilities": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"maxProperties": 128,
|
|
76
|
+
"propertyNames": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 3,
|
|
79
|
+
"maxLength": 128,
|
|
80
|
+
"pattern": "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": [
|
|
86
|
+
"version",
|
|
87
|
+
"methods"
|
|
88
|
+
],
|
|
89
|
+
"properties": {
|
|
90
|
+
"version": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"maxLength": 128
|
|
94
|
+
},
|
|
95
|
+
"methods": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"maxItems": 128,
|
|
98
|
+
"minItems": 1,
|
|
99
|
+
"uniqueItems": true,
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"maxLength": 128,
|
|
104
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"limits": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"controlBytes",
|
|
115
|
+
"fileChunkBytes",
|
|
116
|
+
"fileBytes",
|
|
117
|
+
"fileTransfers"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"controlBytes": {
|
|
121
|
+
"type": "integer",
|
|
122
|
+
"minimum": 1,
|
|
123
|
+
"maximum": 1048576
|
|
124
|
+
},
|
|
125
|
+
"fileChunkBytes": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"minimum": 1,
|
|
128
|
+
"maximum": 262144
|
|
129
|
+
},
|
|
130
|
+
"fileBytes": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 1,
|
|
133
|
+
"maximum": 8388608
|
|
134
|
+
},
|
|
135
|
+
"fileTransfers": {
|
|
136
|
+
"type": "integer",
|
|
137
|
+
"minimum": 1,
|
|
138
|
+
"maximum": 2
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://ai-switch.github.io/aplg/schema/v1/wire.schema.json",
|
|
4
|
+
"title": "WireMessage",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"protocol",
|
|
11
|
+
"kind",
|
|
12
|
+
"id",
|
|
13
|
+
"operation",
|
|
14
|
+
"args"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"protocol": {
|
|
18
|
+
"const": "aplg/1"
|
|
19
|
+
},
|
|
20
|
+
"kind": {
|
|
21
|
+
"const": "request"
|
|
22
|
+
},
|
|
23
|
+
"id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 128,
|
|
27
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
28
|
+
},
|
|
29
|
+
"operation": {
|
|
30
|
+
"const": "capability.call"
|
|
31
|
+
},
|
|
32
|
+
"args": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": [
|
|
36
|
+
"capability",
|
|
37
|
+
"method",
|
|
38
|
+
"params"
|
|
39
|
+
],
|
|
40
|
+
"properties": {
|
|
41
|
+
"capability": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 3,
|
|
44
|
+
"maxLength": 128,
|
|
45
|
+
"pattern": "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
|
|
46
|
+
},
|
|
47
|
+
"method": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 128,
|
|
51
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
|
|
52
|
+
},
|
|
53
|
+
"params": {
|
|
54
|
+
"$ref": "#/definitions/jsonValue"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": [
|
|
64
|
+
"protocol",
|
|
65
|
+
"kind",
|
|
66
|
+
"id",
|
|
67
|
+
"operation",
|
|
68
|
+
"args"
|
|
69
|
+
],
|
|
70
|
+
"properties": {
|
|
71
|
+
"protocol": {
|
|
72
|
+
"const": "aplg/1"
|
|
73
|
+
},
|
|
74
|
+
"kind": {
|
|
75
|
+
"const": "request"
|
|
76
|
+
},
|
|
77
|
+
"id": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"maxLength": 128,
|
|
81
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
82
|
+
},
|
|
83
|
+
"operation": {
|
|
84
|
+
"const": "subscription.open"
|
|
85
|
+
},
|
|
86
|
+
"args": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"capability",
|
|
91
|
+
"topic"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"capability": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 3,
|
|
97
|
+
"maxLength": 128,
|
|
98
|
+
"pattern": "^[a-z0-9][a-z0-9-]*(?:\\.[a-z0-9][a-z0-9-]*)+$"
|
|
99
|
+
},
|
|
100
|
+
"topic": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"maxLength": 128,
|
|
104
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"protocol",
|
|
115
|
+
"kind",
|
|
116
|
+
"id",
|
|
117
|
+
"operation",
|
|
118
|
+
"args"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"protocol": {
|
|
122
|
+
"const": "aplg/1"
|
|
123
|
+
},
|
|
124
|
+
"kind": {
|
|
125
|
+
"const": "request"
|
|
126
|
+
},
|
|
127
|
+
"id": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"maxLength": 128,
|
|
131
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
132
|
+
},
|
|
133
|
+
"operation": {
|
|
134
|
+
"const": "subscription.close"
|
|
135
|
+
},
|
|
136
|
+
"args": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": [
|
|
140
|
+
"subscriptionId"
|
|
141
|
+
],
|
|
142
|
+
"properties": {
|
|
143
|
+
"subscriptionId": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"maxLength": 128,
|
|
147
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": [
|
|
157
|
+
"protocol",
|
|
158
|
+
"kind",
|
|
159
|
+
"id",
|
|
160
|
+
"operation",
|
|
161
|
+
"args"
|
|
162
|
+
],
|
|
163
|
+
"properties": {
|
|
164
|
+
"protocol": {
|
|
165
|
+
"const": "aplg/1"
|
|
166
|
+
},
|
|
167
|
+
"kind": {
|
|
168
|
+
"const": "request"
|
|
169
|
+
},
|
|
170
|
+
"id": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"minLength": 1,
|
|
173
|
+
"maxLength": 128,
|
|
174
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
175
|
+
},
|
|
176
|
+
"operation": {
|
|
177
|
+
"const": "request.cancel"
|
|
178
|
+
},
|
|
179
|
+
"args": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"required": [
|
|
183
|
+
"requestId"
|
|
184
|
+
],
|
|
185
|
+
"properties": {
|
|
186
|
+
"requestId": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1,
|
|
189
|
+
"maxLength": 128,
|
|
190
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": [
|
|
200
|
+
"protocol",
|
|
201
|
+
"kind",
|
|
202
|
+
"id",
|
|
203
|
+
"value"
|
|
204
|
+
],
|
|
205
|
+
"properties": {
|
|
206
|
+
"protocol": {
|
|
207
|
+
"const": "aplg/1"
|
|
208
|
+
},
|
|
209
|
+
"kind": {
|
|
210
|
+
"const": "result"
|
|
211
|
+
},
|
|
212
|
+
"id": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1,
|
|
215
|
+
"maxLength": 128,
|
|
216
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
217
|
+
},
|
|
218
|
+
"value": {
|
|
219
|
+
"$ref": "#/definitions/jsonValue"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"required": [
|
|
227
|
+
"protocol",
|
|
228
|
+
"kind",
|
|
229
|
+
"id",
|
|
230
|
+
"error"
|
|
231
|
+
],
|
|
232
|
+
"properties": {
|
|
233
|
+
"protocol": {
|
|
234
|
+
"const": "aplg/1"
|
|
235
|
+
},
|
|
236
|
+
"kind": {
|
|
237
|
+
"const": "error"
|
|
238
|
+
},
|
|
239
|
+
"id": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"minLength": 1,
|
|
242
|
+
"maxLength": 128,
|
|
243
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
244
|
+
},
|
|
245
|
+
"error": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": [
|
|
249
|
+
"code",
|
|
250
|
+
"message"
|
|
251
|
+
],
|
|
252
|
+
"properties": {
|
|
253
|
+
"code": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"minLength": 1,
|
|
256
|
+
"maxLength": 128,
|
|
257
|
+
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
258
|
+
},
|
|
259
|
+
"message": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"maxLength": 8192
|
|
262
|
+
},
|
|
263
|
+
"details": {
|
|
264
|
+
"$ref": "#/definitions/jsonValue"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"type": "object",
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"required": [
|
|
274
|
+
"protocol",
|
|
275
|
+
"kind",
|
|
276
|
+
"subscriptionId",
|
|
277
|
+
"seq",
|
|
278
|
+
"payload"
|
|
279
|
+
],
|
|
280
|
+
"properties": {
|
|
281
|
+
"protocol": {
|
|
282
|
+
"const": "aplg/1"
|
|
283
|
+
},
|
|
284
|
+
"kind": {
|
|
285
|
+
"const": "event"
|
|
286
|
+
},
|
|
287
|
+
"subscriptionId": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"minLength": 1,
|
|
290
|
+
"maxLength": 128,
|
|
291
|
+
"pattern": "^[\\x21-\\x7e]+$"
|
|
292
|
+
},
|
|
293
|
+
"seq": {
|
|
294
|
+
"type": "integer",
|
|
295
|
+
"minimum": 1,
|
|
296
|
+
"maximum": 9007199254740991
|
|
297
|
+
},
|
|
298
|
+
"payload": {
|
|
299
|
+
"$ref": "#/definitions/jsonValue"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"type": "object",
|
|
305
|
+
"additionalProperties": false,
|
|
306
|
+
"required": [
|
|
307
|
+
"protocol",
|
|
308
|
+
"kind",
|
|
309
|
+
"state"
|
|
310
|
+
],
|
|
311
|
+
"properties": {
|
|
312
|
+
"protocol": {
|
|
313
|
+
"const": "aplg/1"
|
|
314
|
+
},
|
|
315
|
+
"kind": {
|
|
316
|
+
"const": "connection"
|
|
317
|
+
},
|
|
318
|
+
"state": {
|
|
319
|
+
"enum": [
|
|
320
|
+
"connected",
|
|
321
|
+
"disconnected",
|
|
322
|
+
"closed"
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"definitions": {
|
|
329
|
+
"jsonValue": {
|
|
330
|
+
"anyOf": [
|
|
331
|
+
{
|
|
332
|
+
"type": "null"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"type": "boolean"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"type": "number"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"type": "string"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"type": "array",
|
|
345
|
+
"items": {
|
|
346
|
+
"$ref": "#/definitions/jsonValue"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": {
|
|
352
|
+
"$ref": "#/definitions/jsonValue"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|