@capybara-hq/plugin-sdk 0.1.0-rc.64 → 0.1.0-rc.65
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/agent-docs/connector-templates.md +5 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-manifest.d.ts +5 -1
- package/dist/plugin-manifest.js +9 -1
- package/dist/plugin-package.d.ts +1 -1
- package/dist/plugin-package.js +1 -1
- package/package.json +1 -1
- package/schemas/connector-template.v1.schema.json +30 -4
|
@@ -9,7 +9,7 @@ the file's base name.
|
|
|
9
9
|
{
|
|
10
10
|
"$schema": "https://capybarahq.com/schemas/connector-template.v1.schema.json",
|
|
11
11
|
"displayName": { "zh": "Acme CRM", "en": "Acme CRM" },
|
|
12
|
-
"description": "Acme CRM over MCP",
|
|
12
|
+
"description": { "zh": "通过 MCP 访问 Acme CRM", "en": "Acme CRM over MCP" },
|
|
13
13
|
"template": {
|
|
14
14
|
"plugin": "connector-mcp",
|
|
15
15
|
"pluginVersion": "^0.1.0-rc.0",
|
|
@@ -28,12 +28,15 @@ The file is strict. Top-level fields:
|
|
|
28
28
|
| Field | Type | Required |
|
|
29
29
|
|---|---|---|
|
|
30
30
|
| `displayName` | object | yes |
|
|
31
|
-
| `description` | string | no |
|
|
31
|
+
| `description` | string or object | no |
|
|
32
32
|
| `icon` | string | no |
|
|
33
33
|
| `defaultEnabled` | boolean | no |
|
|
34
34
|
| `template` | object | yes |
|
|
35
35
|
<!-- /generated -->
|
|
36
36
|
|
|
37
|
+
`description` is a string (shown in every language) or `{ "zh", "en" }`, each text at most 1024
|
|
38
|
+
characters; the UI shows the text for its language.
|
|
39
|
+
|
|
37
40
|
Fields of `template`:
|
|
38
41
|
|
|
39
42
|
- `plugin`, `connector`: the connector extension and its kind; `pluginVersion` is a semver range.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -156,7 +156,11 @@ export interface PluginManifest {
|
|
|
156
156
|
/** A connector template file `connectors/<id>.json`; the template id is the file's base name. */
|
|
157
157
|
export interface ConnectorTemplateFile {
|
|
158
158
|
displayName: LocalizedName;
|
|
159
|
-
|
|
159
|
+
/**
|
|
160
|
+
* A string (shown in both languages) or `{ zh, en }`; each text ≤
|
|
161
|
+
* {@link CONNECTOR_TEMPLATE_LIMITS}`.descriptionChars` characters.
|
|
162
|
+
*/
|
|
163
|
+
description?: string | LocalizedName;
|
|
160
164
|
/** Safe path relative to the plugin root (an optional leading `./`), .svg / .png. */
|
|
161
165
|
icon?: string;
|
|
162
166
|
/**
|
package/dist/plugin-manifest.js
CHANGED
|
@@ -453,7 +453,15 @@ const template = z.strictObject({
|
|
|
453
453
|
const templateFile = z
|
|
454
454
|
.strictObject({
|
|
455
455
|
displayName: localized,
|
|
456
|
-
description:
|
|
456
|
+
description: z
|
|
457
|
+
.union([
|
|
458
|
+
text(CONNECTOR_TEMPLATE_LIMITS.descriptionChars, "description"),
|
|
459
|
+
z.strictObject({
|
|
460
|
+
zh: text(CONNECTOR_TEMPLATE_LIMITS.descriptionChars, "description.zh"),
|
|
461
|
+
en: text(CONNECTOR_TEMPLATE_LIMITS.descriptionChars, "description.en"),
|
|
462
|
+
}),
|
|
463
|
+
])
|
|
464
|
+
.optional(),
|
|
457
465
|
icon: z
|
|
458
466
|
.string()
|
|
459
467
|
.max(L.pathChars)
|
package/dist/plugin-package.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ export declare const CONNECTOR_TEMPLATE_LIMITS: {
|
|
|
153
153
|
readonly toolPolicies: 1000;
|
|
154
154
|
/** Upper bound on the characters of publisher. */
|
|
155
155
|
readonly publisherChars: 100;
|
|
156
|
-
/** Upper bound on the characters of description. */
|
|
156
|
+
/** Upper bound on the characters of description (per language when it is `{ zh, en }`). */
|
|
157
157
|
readonly descriptionChars: 1024;
|
|
158
158
|
/** Upper bound on the characters of displayName per language. */
|
|
159
159
|
readonly displayNameChars: 100;
|
package/dist/plugin-package.js
CHANGED
|
@@ -280,7 +280,7 @@ export const CONNECTOR_TEMPLATE_LIMITS = {
|
|
|
280
280
|
toolPolicies: 1000,
|
|
281
281
|
/** Upper bound on the characters of publisher. */
|
|
282
282
|
publisherChars: 100,
|
|
283
|
-
/** Upper bound on the characters of description. */
|
|
283
|
+
/** Upper bound on the characters of description (per language when it is `{ zh, en }`). */
|
|
284
284
|
descriptionChars: 1024,
|
|
285
285
|
/** Upper bound on the characters of displayName per language. */
|
|
286
286
|
displayNameChars: 100,
|
package/package.json
CHANGED
|
@@ -27,10 +27,36 @@
|
|
|
27
27
|
"additionalProperties": false
|
|
28
28
|
},
|
|
29
29
|
"description": {
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
"anyOf": [
|
|
31
|
+
{
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"maxLength": 1024,
|
|
35
|
+
"pattern": "\\S"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"zh": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 1024,
|
|
44
|
+
"pattern": "\\S"
|
|
45
|
+
},
|
|
46
|
+
"en": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1,
|
|
49
|
+
"maxLength": 1024,
|
|
50
|
+
"pattern": "\\S"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"zh",
|
|
55
|
+
"en"
|
|
56
|
+
],
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
59
|
+
]
|
|
34
60
|
},
|
|
35
61
|
"icon": {
|
|
36
62
|
"type": "string",
|