@capybara-hq/plugin-sdk 0.1.0-rc.2 → 0.1.0-rc.4
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/README.md +1 -1
- package/agent-docs/agent-templates.md +47 -0
- package/agent-docs/concepts.md +58 -0
- package/agent-docs/connector-templates.md +47 -0
- package/agent-docs/extension-points/channel.md +15 -0
- package/agent-docs/extension-points/config-source.md +15 -0
- package/agent-docs/extension-points/connector.md +15 -0
- package/agent-docs/extension-points/counter.md +15 -0
- package/agent-docs/extension-points/directory.md +15 -0
- package/agent-docs/extension-points/file-preview.md +15 -0
- package/agent-docs/extension-points/identity-source.md +15 -0
- package/agent-docs/extension-points/model-provider.md +15 -0
- package/agent-docs/extension-points/object-store.md +15 -0
- package/agent-docs/extension-points/sandbox.md +15 -0
- package/agent-docs/extension-points/secret-store.md +15 -0
- package/agent-docs/extension-points/web-fetch.md +15 -0
- package/agent-docs/extension-points/web-search.md +15 -0
- package/agent-docs/extensions.md +63 -0
- package/agent-docs/plugin-format.md +60 -0
- package/agent-docs/skills.md +44 -0
- package/agent-docs/tool-naming.md +21 -0
- package/dist/agent-template.d.ts +85 -0
- package/dist/agent-template.js +361 -2
- package/dist/config-ui.d.ts +2 -1
- package/dist/config-ui.js +25 -7
- package/dist/ctx.d.ts +65 -1
- package/dist/directory.d.ts +11 -2
- package/dist/extension-point.d.ts +4 -0
- package/dist/extension-point.js +16 -14
- package/dist/file-preview.d.ts +8 -0
- package/dist/hooks.d.ts +73 -14
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/marketplace.d.ts +29 -2
- package/dist/marketplace.js +30 -2
- package/dist/model.d.ts +60 -2
- package/dist/model.js +22 -0
- package/dist/org-access.d.ts +27 -0
- package/dist/org-access.js +35 -0
- package/dist/permissions.d.ts +4 -1
- package/dist/plugin-manifest.d.ts +15 -2
- package/dist/plugin-manifest.js +11 -1
- package/dist/sandbox.d.ts +140 -60
- package/dist/sandbox.js +30 -6
- package/dist/skill-invocation.d.ts +8 -5
- package/dist/skill-invocation.js +17 -8
- package/dist/skill.d.ts +20 -3
- package/dist/skill.js +28 -6
- package/dist/tool.d.ts +8 -0
- package/dist/ui.d.ts +8 -0
- package/dist/web.d.ts +30 -5
- package/package.json +4 -2
- package/schemas/marketplace.v1.schema.json +36 -0
- package/schemas/plugin.v1.schema.json +29 -4
package/dist/web.d.ts
CHANGED
|
@@ -12,10 +12,16 @@ export interface WebSearchResult {
|
|
|
12
12
|
/** ISO 8601 date or datetime, when known. */
|
|
13
13
|
publishedAt?: string;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* A web search provider (`web-search@1`). The kernel passes the org's decrypted `orgConfig` and the
|
|
17
|
+
* extension's effective deployment config for the org (`config`).
|
|
18
|
+
*/
|
|
16
19
|
export interface WebSearchProvider {
|
|
17
|
-
/**
|
|
18
|
-
|
|
20
|
+
/**
|
|
21
|
+
* False when this org's config lacks what the provider needs. `config` is the effective
|
|
22
|
+
* deployment config for the org (see `search`'s `config`).
|
|
23
|
+
*/
|
|
24
|
+
configured?(orgConfig: unknown, config?: unknown): boolean;
|
|
19
25
|
search(args: {
|
|
20
26
|
query: string;
|
|
21
27
|
/** Hints only: the kernel filters the results again. */
|
|
@@ -23,6 +29,14 @@ export interface WebSearchProvider {
|
|
|
23
29
|
blockedDomains?: string[];
|
|
24
30
|
maxResults: number;
|
|
25
31
|
orgConfig: unknown;
|
|
32
|
+
/**
|
|
33
|
+
* The extension's effective deployment config for this org: the platform's deployment config
|
|
34
|
+
* with the org's copy applied to the overridable fields (`orgAccess(…, "override")`), or the
|
|
35
|
+
* platform's config (equal to `ctx.config`) while the org follows it. Use it, not `ctx.config`,
|
|
36
|
+
* for work done for this org. Optional in the type so older extensions compile; the kernel
|
|
37
|
+
* always passes it.
|
|
38
|
+
*/
|
|
39
|
+
config?: unknown;
|
|
26
40
|
signal: AbortSignal;
|
|
27
41
|
}): Promise<{
|
|
28
42
|
results: WebSearchResult[];
|
|
@@ -48,12 +62,23 @@ export interface WebFetchPage {
|
|
|
48
62
|
* to (an IPv6 address in brackets, as in a URL).
|
|
49
63
|
*/
|
|
50
64
|
export interface WebFetchProvider {
|
|
51
|
-
/**
|
|
52
|
-
|
|
65
|
+
/**
|
|
66
|
+
* False when this org's config lacks what the provider needs. `config` is the effective
|
|
67
|
+
* deployment config for the org (see `fetch`'s `config`).
|
|
68
|
+
*/
|
|
69
|
+
configured?(orgConfig: unknown, config?: unknown): boolean;
|
|
53
70
|
fetch(args: {
|
|
54
71
|
/** Already validated and upgraded by the kernel. */
|
|
55
72
|
url: string;
|
|
56
73
|
orgConfig: unknown;
|
|
74
|
+
/**
|
|
75
|
+
* The extension's effective deployment config for this org: the platform's deployment config
|
|
76
|
+
* with the org's copy applied to the overridable fields (`orgAccess(…, "override")`), or the
|
|
77
|
+
* platform's config (equal to `ctx.config`) while the org follows it. Use it, not `ctx.config`,
|
|
78
|
+
* for work done for this org. Optional in the type so older extensions compile; the kernel
|
|
79
|
+
* always passes it.
|
|
80
|
+
*/
|
|
81
|
+
config?: unknown;
|
|
57
82
|
signal: AbortSignal;
|
|
58
83
|
}): Promise<WebFetchPage>;
|
|
59
84
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capybara-hq/plugin-sdk",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.4",
|
|
4
4
|
"description": "Capybara plugin SDK: the types and pure functions plugins are written against",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -17,11 +17,13 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js",
|
|
19
19
|
"default": "./dist/index.js"
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
23
24
|
"dist",
|
|
24
25
|
"schemas",
|
|
26
|
+
"agent-docs",
|
|
25
27
|
"README.md",
|
|
26
28
|
"NOTICE"
|
|
27
29
|
],
|
|
@@ -68,6 +68,25 @@
|
|
|
68
68
|
"en"
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
|
+
"displayName": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"zh": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"maxLength": 100
|
|
78
|
+
},
|
|
79
|
+
"en": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 100
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [
|
|
86
|
+
"zh",
|
|
87
|
+
"en"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
71
90
|
"version": {
|
|
72
91
|
"type": "string",
|
|
73
92
|
"maxLength": 256,
|
|
@@ -110,6 +129,23 @@
|
|
|
110
129
|
"maxLength": 2000,
|
|
111
130
|
"pattern": "^https:\\/\\/\\S+$"
|
|
112
131
|
},
|
|
132
|
+
"deprecated": {
|
|
133
|
+
"anyOf": [
|
|
134
|
+
{
|
|
135
|
+
"type": "boolean"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"reason": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"maxLength": 280
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
113
149
|
"source": {
|
|
114
150
|
"anyOf": [
|
|
115
151
|
{
|
|
@@ -28,10 +28,35 @@
|
|
|
28
28
|
"pattern": "\\S"
|
|
29
29
|
},
|
|
30
30
|
"description": {
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 1024,
|
|
36
|
+
"pattern": "\\S"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"en": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 1024,
|
|
45
|
+
"pattern": "\\S"
|
|
46
|
+
},
|
|
47
|
+
"zh": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 1024,
|
|
51
|
+
"pattern": "\\S"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"en"
|
|
56
|
+
],
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
59
|
+
]
|
|
35
60
|
},
|
|
36
61
|
"displayName": {
|
|
37
62
|
"type": "object",
|