@capybara-hq/plugin-anthropic 0.1.0-rc.0 → 0.1.0-rc.2
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/.capybara-plugin/plugin.json +74 -2
- package/README.md +12 -0
- package/dist/index.mjs +12 -6
- package/icon.svg +1 -0
- package/package.json +1 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "anthropic",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.2",
|
|
5
5
|
"publisher": "Capybara",
|
|
6
6
|
"description": "Anthropic model provider (model-provider@2) using the official SDK and the native Messages API",
|
|
7
|
+
"displayName": {
|
|
8
|
+
"zh": "Anthropic",
|
|
9
|
+
"en": "Anthropic"
|
|
10
|
+
},
|
|
11
|
+
"icon": "./icon.svg",
|
|
7
12
|
"homepage": "https://github.com/capybara-hq/plugins/tree/main/plugins/anthropic#readme",
|
|
8
13
|
"extension": {
|
|
9
14
|
"entry": "./dist/index.mjs",
|
|
10
15
|
"manifest": {
|
|
11
16
|
"name": "anthropic",
|
|
12
|
-
"version": "0.1.0-rc.
|
|
17
|
+
"version": "0.1.0-rc.2",
|
|
13
18
|
"sdk": "^0.1.0-rc.0",
|
|
14
19
|
"provides": [
|
|
15
20
|
"model-provider@2"
|
|
@@ -46,6 +51,73 @@
|
|
|
46
51
|
],
|
|
47
52
|
"org": []
|
|
48
53
|
}
|
|
54
|
+
},
|
|
55
|
+
"configSchemas": {
|
|
56
|
+
"deployment": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"apiKey": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"x-secret": true,
|
|
63
|
+
"x-ui": {
|
|
64
|
+
"label": {
|
|
65
|
+
"zh": "API 密钥",
|
|
66
|
+
"en": "API key"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"title": "API key"
|
|
70
|
+
},
|
|
71
|
+
"baseUrl": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"format": "uri",
|
|
74
|
+
"x-ui": {
|
|
75
|
+
"label": {
|
|
76
|
+
"zh": "接口地址",
|
|
77
|
+
"en": "API URL"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"title": "API URL"
|
|
81
|
+
},
|
|
82
|
+
"models": {
|
|
83
|
+
"default": [
|
|
84
|
+
"claude-opus-5-5",
|
|
85
|
+
"claude-sonnet-5-5",
|
|
86
|
+
"claude-haiku-5-5"
|
|
87
|
+
],
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
},
|
|
93
|
+
"x-ui": {
|
|
94
|
+
"label": {
|
|
95
|
+
"zh": "可用模型",
|
|
96
|
+
"en": "Models"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"title": "Models"
|
|
100
|
+
},
|
|
101
|
+
"serverFallbacks": {
|
|
102
|
+
"default": "default",
|
|
103
|
+
"type": "string",
|
|
104
|
+
"enum": [
|
|
105
|
+
"default",
|
|
106
|
+
"off"
|
|
107
|
+
],
|
|
108
|
+
"x-ui": {
|
|
109
|
+
"label": {
|
|
110
|
+
"zh": "服务端回退",
|
|
111
|
+
"en": "Server fallbacks"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"title": "Server fallbacks"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": [
|
|
118
|
+
"apiKey"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
49
121
|
}
|
|
50
122
|
}
|
|
51
123
|
}
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @capybara-hq/plugin-anthropic
|
|
2
|
+
|
|
3
|
+
Anthropic model provider (model-provider@2) using the official SDK and the native Messages API.
|
|
4
|
+
|
|
5
|
+
## Icon
|
|
6
|
+
|
|
7
|
+
`icon.svg`: the Anthropic symbol (owner: Anthropic), downloaded on 2026-11-08 from the Anthropic press kit,
|
|
8
|
+
https://www.anthropic.com/press-kit (Anthropic media resources, "Anthropic symbol - Slate.svg" and
|
|
9
|
+
"Anthropic symbol - Ivory.svg"). It is a trademark of its owner, used only to identify the service
|
|
10
|
+
this plugin connects to; the plugin is not affiliated with or endorsed by the owner. The artwork is
|
|
11
|
+
unchanged except for removing editor metadata and setting a square viewBox; it shows the Slate
|
|
12
|
+
variant on light backgrounds and the Ivory variant on dark ones.
|
package/dist/index.mjs
CHANGED
|
@@ -25805,7 +25805,8 @@ import {
|
|
|
25805
25805
|
defineExtension,
|
|
25806
25806
|
EFFORT_VALUES,
|
|
25807
25807
|
MODEL_PROVIDER_EXTENSION_POINT_V2,
|
|
25808
|
-
secret
|
|
25808
|
+
secret,
|
|
25809
|
+
ui
|
|
25809
25810
|
} from "@capybara-hq/plugin-sdk";
|
|
25810
25811
|
import { z } from "zod";
|
|
25811
25812
|
|
|
@@ -26358,14 +26359,19 @@ function createAnthropicProvider(opts) {
|
|
|
26358
26359
|
};
|
|
26359
26360
|
}
|
|
26360
26361
|
var DeploymentConfig = z.object({
|
|
26361
|
-
apiKey: secret(z.string().min(1)),
|
|
26362
|
-
baseUrl: z.string().url().optional(),
|
|
26363
|
-
models:
|
|
26364
|
-
|
|
26362
|
+
apiKey: ui(secret(z.string().min(1)), { label: { zh: "API 密钥", en: "API key" } }),
|
|
26363
|
+
baseUrl: ui(z.string().url().optional(), { label: { zh: "接口地址", en: "API URL" } }),
|
|
26364
|
+
models: ui(
|
|
26365
|
+
z.array(z.string().min(1)).default(["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"]),
|
|
26366
|
+
{ label: { zh: "可用模型", en: "Models" } }
|
|
26367
|
+
),
|
|
26368
|
+
serverFallbacks: ui(z.enum(["default", "off"]).default("default"), {
|
|
26369
|
+
label: { zh: "服务端回退", en: "Server fallbacks" }
|
|
26370
|
+
})
|
|
26365
26371
|
});
|
|
26366
26372
|
var index_default = defineExtension({
|
|
26367
26373
|
name: "anthropic",
|
|
26368
|
-
version: "0.1.0-rc.
|
|
26374
|
+
version: "0.1.0-rc.2",
|
|
26369
26375
|
sdk: "^0.1.0-rc.0",
|
|
26370
26376
|
provides: [MODEL_PROVIDER_EXTENSION_POINT_V2],
|
|
26371
26377
|
// 默认端点;部署配置 baseUrl 可改指向代理(只展示,平台不拦截)
|
package/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2.17 -16.46 96.91 96.91"><title>Anthropic</title><style>@media (prefers-color-scheme:dark){path{fill:#FAF9F5}}</style><path d="M66.4915 0H52.5029L78.0115 64H92.0001L66.4915 0Z" fill="#141413"/><path d="M26.08 0L0.571472 64H14.8343L20.0512 50.56H46.7374L51.9543 64H66.2172L40.7086 0H26.08ZM24.6647 38.6743L33.3943 16.1829L42.1239 38.6743H24.6647Z" fill="#141413"/></svg>
|
package/package.json
CHANGED