@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.
Files changed (50) hide show
  1. package/CHANGELOG.en.md +120 -0
  2. package/CHANGELOG.md +120 -0
  3. package/LICENSE +21 -0
  4. package/README.en.md +184 -0
  5. package/README.md +143 -0
  6. package/THIRD_PARTY_NOTICES.en.md +51 -0
  7. package/THIRD_PARTY_NOTICES.md +53 -0
  8. package/cordis.patch.yml +8 -0
  9. package/docs/EDUWORK-MIGRATION.en.md +23 -0
  10. package/docs/EDUWORK-MIGRATION.md +23 -0
  11. package/docs/architecture.en.md +125 -0
  12. package/docs/architecture.md +125 -0
  13. package/docs/compatibility.en.md +61 -0
  14. package/docs/compatibility.md +61 -0
  15. package/docs/decisions/0001-one-plugin-composition-boundary.en.md +34 -0
  16. package/docs/decisions/0001-one-plugin-composition-boundary.md +34 -0
  17. package/docs/dsh-integration.en.md +171 -0
  18. package/docs/dsh-integration.md +171 -0
  19. package/docs/ecnu-reference.en.md +66 -0
  20. package/docs/ecnu-reference.md +66 -0
  21. package/docs/enterprise-profile.en.md +159 -0
  22. package/docs/enterprise-profile.md +159 -0
  23. package/docs/getting-started.en.md +137 -0
  24. package/docs/getting-started.md +239 -0
  25. package/docs/key-binding-protocol.en.md +227 -0
  26. package/docs/key-binding-protocol.md +227 -0
  27. package/docs/oidc-interoperability.en.md +100 -0
  28. package/docs/oidc-interoperability.md +100 -0
  29. package/docs/release-checklist.en.md +60 -0
  30. package/docs/release-checklist.md +60 -0
  31. package/docs/security-model.en.md +138 -0
  32. package/docs/security-model.md +138 -0
  33. package/docs/server-integration-contract.en.md +706 -0
  34. package/docs/server-integration-contract.md +706 -0
  35. package/examples/ecnu.enterprise-profile.example.json +81 -0
  36. package/examples/enterprise-profile.example.json +77 -0
  37. package/lib/client.js +5855 -0
  38. package/lib/index.js +59 -0
  39. package/lib/oidc.js +649 -0
  40. package/lib/profile.js +371 -0
  41. package/lib/provider/core.js +138 -0
  42. package/lib/provider/index.js +156 -0
  43. package/lib/provider/transform-adapter.js +65 -0
  44. package/lib/provider/transforms.js +59 -0
  45. package/lib/typert-schemas.js +84 -0
  46. package/lib/typert.host.js +38 -0
  47. package/lib/typert.remote-client.js +37 -0
  48. package/package.json +120 -0
  49. package/protocol/openapi.yaml +257 -0
  50. package/schema/enterprise-profile.v1alpha1.schema.json +174 -0
@@ -0,0 +1,81 @@
1
+ {
2
+ "schemaVersion": "dsh-oidc/v1alpha1",
3
+ "id": "ecnu",
4
+ "displayName": "华东师范大学 ChatECNU",
5
+ "organization": "华东师范大学",
6
+ "brand": {
7
+ "productName": "ChatECNU Work",
8
+ "organizationName": "华东师范大学",
9
+ "mark": "华",
10
+ "primaryColor": "#9f2636",
11
+ "loginTitle": "使用华东师范大学统一身份认证",
12
+ "loginDescription": "登录后由学校企业服务为当前用户绑定 ChatECNU 运行凭据;学校密码不会进入 DSH。",
13
+ "supportURL": "https://support.example.edu/replace-me"
14
+ },
15
+ "oidc": {
16
+ "issuer": "https://oidc.example.edu/replace-me",
17
+ "clientId": "replace-with-public-client-id",
18
+ "scopes": [
19
+ "openid",
20
+ "profile",
21
+ "offline_access",
22
+ "worker.bootstrap.read",
23
+ "worker.credential.provision",
24
+ "worker.credential.read",
25
+ "worker.credential.renew"
26
+ ]
27
+ },
28
+ "keyBinding": {
29
+ "baseURL": "https://worker.example.edu/api/worker/v1",
30
+ "credentialRef": "CHATECNU_API_KEY"
31
+ },
32
+ "provider": {
33
+ "id": "chatecnu",
34
+ "displayName": "ChatECNU",
35
+ "adapter": "openai-compatible",
36
+ "baseURL": "https://models.example.edu/open/api/v1",
37
+ "reasoning": "high",
38
+ "defaultContextWindow": 1000000,
39
+ "defaultMaxTokens": 393216,
40
+ "streamIdleTimeoutMs": 300000,
41
+ "retryPolicy": {
42
+ "mode": "normal",
43
+ "maxRetries": 2
44
+ },
45
+ "compat": {
46
+ "supportsDeveloperRole": false,
47
+ "supportsStore": false,
48
+ "supportsReasoningEffort": true,
49
+ "supportsUsageInStreaming": true,
50
+ "maxTokensField": "max_tokens",
51
+ "supportsStrictMode": false,
52
+ "supportsLongCacheRetention": false,
53
+ "thinkingFormat": "deepseek",
54
+ "requiresReasoningContentOnAssistantMessages": true
55
+ },
56
+ "models": [
57
+ {
58
+ "id": "ecnu-max",
59
+ "name": "ecnu-max",
60
+ "contextWindow": 1000000,
61
+ "maxTokens": 393216,
62
+ "input": ["text"],
63
+ "reasoningEfforts": {
64
+ "max": "max",
65
+ "high": "high",
66
+ "low": "low"
67
+ }
68
+ },
69
+ {
70
+ "id": "ecnu-plus",
71
+ "name": "ecnu-plus",
72
+ "contextWindow": 262144,
73
+ "maxTokens": 65536,
74
+ "input": ["text", "image"],
75
+ "compat": {
76
+ "supportsReasoningEffort": false
77
+ }
78
+ }
79
+ ]
80
+ }
81
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "schemaVersion": "dsh-oidc/v1alpha1",
3
+ "id": "example-university",
4
+ "displayName": "Example University AI",
5
+ "organization": "Example University",
6
+ "brand": {
7
+ "productName": "Example AI Work",
8
+ "organizationName": "Example University",
9
+ "mark": "E",
10
+ "primaryColor": "#5157af",
11
+ "loginTitle": "Sign in with Example University",
12
+ "loginDescription": "Authenticate with the university identity provider and bind a model runtime credential. Your password never enters DSH.",
13
+ "supportURL": "https://support.example.edu/ai"
14
+ },
15
+ "oidc": {
16
+ "issuer": "https://id.example.edu/oidc",
17
+ "clientId": "dsh-web-public-client",
18
+ "scopes": [
19
+ "openid",
20
+ "profile",
21
+ "offline_access",
22
+ "worker.bootstrap.read",
23
+ "worker.credential.provision",
24
+ "worker.credential.read",
25
+ "worker.credential.renew"
26
+ ]
27
+ },
28
+ "keyBinding": {
29
+ "baseURL": "https://ai.example.edu/api/worker/v1"
30
+ },
31
+ "provider": {
32
+ "id": "example-ai",
33
+ "displayName": "Example AI",
34
+ "adapter": "openai-compatible",
35
+ "baseURL": "https://ai.example.edu/open/api/v1",
36
+ "reasoning": "high",
37
+ "defaultContextWindow": 262144,
38
+ "defaultMaxTokens": 32768,
39
+ "streamIdleTimeoutMs": 300000,
40
+ "retryPolicy": {
41
+ "mode": "normal",
42
+ "maxRetries": 2
43
+ },
44
+ "compat": {
45
+ "supportsDeveloperRole": false,
46
+ "supportsStore": false,
47
+ "supportsReasoningEffort": true,
48
+ "supportsUsageInStreaming": true,
49
+ "maxTokensField": "max_tokens",
50
+ "supportsStrictMode": false,
51
+ "supportsLongCacheRetention": false,
52
+ "thinkingFormat": "deepseek",
53
+ "requiresReasoningContentOnAssistantMessages": true
54
+ },
55
+ "models": [
56
+ {
57
+ "id": "example-max",
58
+ "name": "Example Max",
59
+ "input": ["text"],
60
+ "reasoningEfforts": {
61
+ "max": "max",
62
+ "high": "high",
63
+ "low": "low"
64
+ }
65
+ },
66
+ {
67
+ "id": "example-plus",
68
+ "name": "Example Plus",
69
+ "input": ["text", "image"],
70
+ "compat": {
71
+ "supportsReasoningEffort": false
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ }
77
+