@eduwork/dsh-oidc 0.1.0-alpha.11
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.en.md +120 -0
- package/CHANGELOG.md +120 -0
- package/LICENSE +21 -0
- package/README.en.md +184 -0
- package/README.md +143 -0
- package/THIRD_PARTY_NOTICES.en.md +51 -0
- package/THIRD_PARTY_NOTICES.md +53 -0
- package/cordis.patch.yml +8 -0
- package/docs/EDUWORK-MIGRATION.en.md +23 -0
- package/docs/EDUWORK-MIGRATION.md +23 -0
- package/docs/architecture.en.md +125 -0
- package/docs/architecture.md +125 -0
- package/docs/compatibility.en.md +61 -0
- package/docs/compatibility.md +61 -0
- package/docs/decisions/0001-one-plugin-composition-boundary.en.md +34 -0
- package/docs/decisions/0001-one-plugin-composition-boundary.md +34 -0
- package/docs/dsh-integration.en.md +171 -0
- package/docs/dsh-integration.md +171 -0
- package/docs/ecnu-reference.en.md +66 -0
- package/docs/ecnu-reference.md +66 -0
- package/docs/enterprise-profile.en.md +159 -0
- package/docs/enterprise-profile.md +159 -0
- package/docs/getting-started.en.md +137 -0
- package/docs/getting-started.md +239 -0
- package/docs/key-binding-protocol.en.md +227 -0
- package/docs/key-binding-protocol.md +227 -0
- package/docs/oidc-interoperability.en.md +100 -0
- package/docs/oidc-interoperability.md +100 -0
- package/docs/release-checklist.en.md +60 -0
- package/docs/release-checklist.md +60 -0
- package/docs/security-model.en.md +138 -0
- package/docs/security-model.md +138 -0
- package/docs/server-integration-contract.en.md +706 -0
- package/docs/server-integration-contract.md +706 -0
- package/examples/ecnu.enterprise-profile.example.json +81 -0
- package/examples/enterprise-profile.example.json +77 -0
- package/lib/client.js +5855 -0
- package/lib/index.js +59 -0
- package/lib/oidc.js +649 -0
- package/lib/profile.js +371 -0
- package/lib/provider/core.js +138 -0
- package/lib/provider/index.js +156 -0
- package/lib/provider/transform-adapter.js +65 -0
- package/lib/provider/transforms.js +59 -0
- package/lib/typert-schemas.js +84 -0
- package/lib/typert.host.js +38 -0
- package/lib/typert.remote-client.js +37 -0
- package/package.json +120 -0
- package/protocol/openapi.yaml +257 -0
- package/schema/enterprise-profile.v1alpha1.schema.json +174 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/freedomkk-qfeng/dsh-oidc/schema/enterprise-profile.v1alpha1.schema.json",
|
|
4
|
+
"title": "dsh-oidc Enterprise Profile v1alpha1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "id", "displayName", "brand", "oidc", "keyBinding", "provider"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "dsh-oidc/v1alpha1" },
|
|
10
|
+
"id": { "$ref": "#/$defs/id" },
|
|
11
|
+
"displayName": { "$ref": "#/$defs/nonEmpty120" },
|
|
12
|
+
"organization": { "$ref": "#/$defs/nonEmpty120" },
|
|
13
|
+
"nativeInstitutionID": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
14
|
+
"allowInsecureDevelopment": { "type": "boolean", "default": false },
|
|
15
|
+
"insecureDevelopmentOrigin": { "type": "string", "minLength": 8, "maxLength": 2048, "pattern": "^http://" },
|
|
16
|
+
"brand": { "$ref": "#/$defs/brand" },
|
|
17
|
+
"oidc": { "$ref": "#/$defs/oidc" },
|
|
18
|
+
"keyBinding": { "$ref": "#/$defs/keyBinding" },
|
|
19
|
+
"provider": { "$ref": "#/$defs/provider" }
|
|
20
|
+
},
|
|
21
|
+
"allOf": [
|
|
22
|
+
{
|
|
23
|
+
"if": {
|
|
24
|
+
"not": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": { "insecureDevelopmentOrigin": {} },
|
|
27
|
+
"required": ["insecureDevelopmentOrigin"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"then": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"oidc": { "type": "object", "properties": { "issuer": { "$ref": "#/$defs/secureEndpointURL" } } },
|
|
34
|
+
"keyBinding": { "type": "object", "properties": { "baseURL": { "$ref": "#/$defs/secureEndpointURL" } } },
|
|
35
|
+
"provider": { "type": "object", "properties": { "baseURL": { "$ref": "#/$defs/secureEndpointURL" } } }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": { "insecureDevelopmentOrigin": {} },
|
|
43
|
+
"required": ["insecureDevelopmentOrigin"]
|
|
44
|
+
},
|
|
45
|
+
"then": { "type": "object", "properties": { "allowInsecureDevelopment": { "const": true } } }
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"$defs": {
|
|
49
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
|
|
50
|
+
"nonEmpty120": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^\\S(?:.*\\S)?$" },
|
|
51
|
+
"positiveInteger": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
|
|
52
|
+
"httpsURL": { "type": "string", "minLength": 9, "maxLength": 2048, "pattern": "^https://" },
|
|
53
|
+
"secureEndpointURL": { "type": "string", "minLength": 9, "maxLength": 2048, "pattern": "^(https://|http://(localhost|127\\.0\\.0\\.1|\\[::1\\])(?=[:/]))" },
|
|
54
|
+
"endpointURL": { "type": "string", "minLength": 8, "maxLength": 2048, "pattern": "^(https://|http://)" },
|
|
55
|
+
"brand": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"productName": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
60
|
+
"organizationName": { "$ref": "#/$defs/nonEmpty120" },
|
|
61
|
+
"mark": { "type": "string", "minLength": 1, "maxLength": 4 },
|
|
62
|
+
"logoURL": { "type": "string", "minLength": 9, "maxLength": 131072, "pattern": "^(https://|data:image/(png|webp);base64,)" },
|
|
63
|
+
"primaryColor": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
|
|
64
|
+
"loginTitle": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
65
|
+
"loginDescription": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
66
|
+
"supportURL": { "$ref": "#/$defs/httpsURL" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"oidc": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["issuer", "clientId", "scopes"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"issuer": { "$ref": "#/$defs/endpointURL" },
|
|
75
|
+
"clientId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
76
|
+
"scopes": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"minItems": 2,
|
|
79
|
+
"maxItems": 64,
|
|
80
|
+
"uniqueItems": true,
|
|
81
|
+
"allOf": [
|
|
82
|
+
{ "contains": { "const": "openid" } },
|
|
83
|
+
{ "contains": { "const": "profile" } }
|
|
84
|
+
],
|
|
85
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^\\S+$" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"keyBinding": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": ["baseURL"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"baseURL": { "$ref": "#/$defs/endpointURL" },
|
|
95
|
+
"credentialRef": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "maxLength": 128 }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"compat": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"properties": {
|
|
102
|
+
"supportsDeveloperRole": { "type": "boolean" },
|
|
103
|
+
"supportsStore": { "type": "boolean" },
|
|
104
|
+
"supportsReasoningEffort": { "type": "boolean" },
|
|
105
|
+
"supportsUsageInStreaming": { "type": "boolean" },
|
|
106
|
+
"maxTokensField": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
107
|
+
"supportsStrictMode": { "type": "boolean" },
|
|
108
|
+
"supportsLongCacheRetention": { "type": "boolean" },
|
|
109
|
+
"thinkingFormat": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
110
|
+
"requiresReasoningContentOnAssistantMessages": { "type": "boolean" }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"retryPolicy": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["mode"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"mode": { "enum": ["normal", "always"] },
|
|
119
|
+
"maxRetries": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
120
|
+
"retryableCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 } },
|
|
121
|
+
"backoff": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"properties": {
|
|
125
|
+
"initialDelayMs": { "type": "number", "exclusiveMinimum": 0, "maximum": 2147483647 },
|
|
126
|
+
"maxDelayMs": { "type": "number", "exclusiveMinimum": 0, "maximum": 2147483647 },
|
|
127
|
+
"jitterRatio": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"model": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": false,
|
|
135
|
+
"required": ["id"],
|
|
136
|
+
"properties": {
|
|
137
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
138
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
139
|
+
"input": { "type": "array", "minItems": 1, "maxItems": 2, "uniqueItems": true, "items": { "enum": ["text", "image"] } },
|
|
140
|
+
"contextWindow": { "$ref": "#/$defs/positiveInteger" },
|
|
141
|
+
"maxTokens": { "$ref": "#/$defs/positiveInteger" },
|
|
142
|
+
"reasoning": { "type": "boolean" },
|
|
143
|
+
"reasoningEfforts": {
|
|
144
|
+
"oneOf": [
|
|
145
|
+
{ "const": false },
|
|
146
|
+
{ "type": "object", "minProperties": 1, "maxProperties": 16, "additionalProperties": { "type": ["string", "null"], "maxLength": 32 } }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"compat": { "$ref": "#/$defs/compat" }
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"provider": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["id", "adapter", "baseURL", "models"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"id": { "$ref": "#/$defs/id" },
|
|
158
|
+
"displayName": { "$ref": "#/$defs/nonEmpty120" },
|
|
159
|
+
"adapter": { "const": "openai-compatible" },
|
|
160
|
+
"baseURL": { "$ref": "#/$defs/endpointURL" },
|
|
161
|
+
"reasoning": { "type": "string", "minLength": 1, "maxLength": 32 },
|
|
162
|
+
"defaultContextWindow": { "$ref": "#/$defs/positiveInteger" },
|
|
163
|
+
"defaultMaxTokens": { "$ref": "#/$defs/positiveInteger" },
|
|
164
|
+
"maxRequestImageBytes": { "$ref": "#/$defs/positiveInteger" },
|
|
165
|
+
"requestImagePixelBudget": { "$ref": "#/$defs/positiveInteger" },
|
|
166
|
+
"requestImageMaxBytes": { "$ref": "#/$defs/positiveInteger" },
|
|
167
|
+
"streamIdleTimeoutMs": { "$ref": "#/$defs/positiveInteger" },
|
|
168
|
+
"retryPolicy": { "$ref": "#/$defs/retryPolicy" },
|
|
169
|
+
"compat": { "$ref": "#/$defs/compat" },
|
|
170
|
+
"models": { "type": "array", "minItems": 1, "maxItems": 128, "items": { "$ref": "#/$defs/model" } }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|