@capybara-hq/plugin-sdk 0.1.0-rc.37 → 0.1.0-rc.39
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/dist/device-protocol.d.ts +77 -46
- package/dist/device-protocol.js +206 -83
- package/dist/index.d.ts +5 -2
- package/dist/index.js +5 -2
- package/dist/network-classes.d.ts +98 -0
- package/dist/network-classes.js +291 -0
- package/dist/permissions.js +3 -1
- package/dist/sandbox-linux-runtime-source.js +460 -28
- package/dist/sandbox-native-runtime-source.js +143 -3
- package/dist/sandbox-operation.d.ts +36 -4
- package/dist/sandbox-operation.js +21 -4
- package/dist/sandbox-runtime-source.js +2 -2
- package/dist/sandbox-write-denies.d.ts +87 -8
- package/dist/sandbox-write-denies.js +249 -10
- package/dist/sandbox.d.ts +11 -22
- package/dist/shell-capabilities.d.ts +80 -0
- package/dist/shell-capabilities.js +13 -0
- package/dist/shell-environment.d.ts +57 -0
- package/dist/shell-environment.js +16 -0
- package/dist/ui-slots.d.ts +12 -0
- package/dist/ui-slots.js +23 -0
- package/dist/ui.d.ts +6 -1
- package/package.json +1 -1
package/dist/ui-slots.js
CHANGED
|
@@ -13,6 +13,17 @@ export const UI_SLOT_IDS = [
|
|
|
13
13
|
"conversation.empty",
|
|
14
14
|
"conversation.composer.frame",
|
|
15
15
|
];
|
|
16
|
+
const COMPACT_ORDER = ["kept", "drawer", "hidden"];
|
|
17
|
+
/** True when `v` is one of the three compact forms (used to validate manifests). */
|
|
18
|
+
export function isCompactForm(v) {
|
|
19
|
+
return typeof v === "string" && COMPACT_ORDER.includes(v);
|
|
20
|
+
}
|
|
21
|
+
/** A contribution may narrow its slot's compact form, never widen it. */
|
|
22
|
+
export function effectiveCompact(slot, contribution) {
|
|
23
|
+
if (contribution === undefined)
|
|
24
|
+
return slot;
|
|
25
|
+
return COMPACT_ORDER.indexOf(contribution) > COMPACT_ORDER.indexOf(slot) ? contribution : slot;
|
|
26
|
+
}
|
|
16
27
|
const SLOT_DATA = [
|
|
17
28
|
{
|
|
18
29
|
id: "conversation.panel",
|
|
@@ -25,6 +36,7 @@ const SLOT_DATA = [
|
|
|
25
36
|
args: ["conversationId", "item"],
|
|
26
37
|
density: "regular",
|
|
27
38
|
icon: "optional",
|
|
39
|
+
compact: "drawer",
|
|
28
40
|
description: {
|
|
29
41
|
en: "A panel beside the conversation, opened from the right area.",
|
|
30
42
|
zh: "对话旁的面板,从右侧区域打开。",
|
|
@@ -41,6 +53,7 @@ const SLOT_DATA = [
|
|
|
41
53
|
args: ["conversationId"],
|
|
42
54
|
density: "dense",
|
|
43
55
|
icon: "optional",
|
|
56
|
+
compact: "kept",
|
|
44
57
|
anchors: ["context", "files", "background"],
|
|
45
58
|
description: {
|
|
46
59
|
en: "A section in the conversation properties list.",
|
|
@@ -58,6 +71,7 @@ const SLOT_DATA = [
|
|
|
58
71
|
args: ["conversationId", "card"],
|
|
59
72
|
density: "regular",
|
|
60
73
|
icon: "optional",
|
|
74
|
+
compact: "kept",
|
|
61
75
|
description: {
|
|
62
76
|
en: "A card a tool result opens in the conversation.",
|
|
63
77
|
zh: "工具结果在对话中打开的卡片。",
|
|
@@ -74,6 +88,7 @@ const SLOT_DATA = [
|
|
|
74
88
|
args: [],
|
|
75
89
|
density: "regular",
|
|
76
90
|
icon: "optional",
|
|
91
|
+
compact: "kept",
|
|
77
92
|
description: {
|
|
78
93
|
en: "A full page in the organization navigation.",
|
|
79
94
|
zh: "组织导航中的完整页面。",
|
|
@@ -90,6 +105,7 @@ const SLOT_DATA = [
|
|
|
90
105
|
args: ["conversationId", "fileId"],
|
|
91
106
|
density: "regular",
|
|
92
107
|
icon: "optional",
|
|
108
|
+
compact: "kept",
|
|
93
109
|
description: {
|
|
94
110
|
en: "A previewer for a file of the conversation.",
|
|
95
111
|
zh: "对话中文件的预览器。",
|
|
@@ -106,6 +122,7 @@ const SLOT_DATA = [
|
|
|
106
122
|
args: ["agentId"],
|
|
107
123
|
density: "regular",
|
|
108
124
|
icon: "optional",
|
|
125
|
+
compact: "kept",
|
|
109
126
|
description: {
|
|
110
127
|
en: "A section on the detail page of an agent.",
|
|
111
128
|
zh: "智能体详情页中的一个分区。",
|
|
@@ -122,6 +139,7 @@ const SLOT_DATA = [
|
|
|
122
139
|
args: [],
|
|
123
140
|
density: "regular",
|
|
124
141
|
icon: "optional",
|
|
142
|
+
compact: "kept",
|
|
125
143
|
description: {
|
|
126
144
|
en: "A section on the organization settings page.",
|
|
127
145
|
zh: "组织设置页中的一个分区。",
|
|
@@ -138,6 +156,7 @@ const SLOT_DATA = [
|
|
|
138
156
|
args: [],
|
|
139
157
|
density: "regular",
|
|
140
158
|
icon: "optional",
|
|
159
|
+
compact: "kept",
|
|
141
160
|
description: {
|
|
142
161
|
en: "A full page in the platform administration.",
|
|
143
162
|
zh: "平台管理中的完整页面。",
|
|
@@ -156,6 +175,7 @@ const SLOT_DATA = [
|
|
|
156
175
|
args: [],
|
|
157
176
|
density: "regular",
|
|
158
177
|
icon: "none",
|
|
178
|
+
compact: "hidden",
|
|
159
179
|
description: {
|
|
160
180
|
en: "The brand row of the sidebar (the mark of the collapsed rail).",
|
|
161
181
|
zh: "侧边栏的品牌行(收起后的窄栏标记)。",
|
|
@@ -172,6 +192,7 @@ const SLOT_DATA = [
|
|
|
172
192
|
args: [],
|
|
173
193
|
density: "regular",
|
|
174
194
|
icon: "none",
|
|
195
|
+
compact: "kept",
|
|
175
196
|
limits: { maxShown: 4 },
|
|
176
197
|
description: {
|
|
177
198
|
en: "A full-viewport layer over the workspace shell.",
|
|
@@ -191,6 +212,7 @@ const SLOT_DATA = [
|
|
|
191
212
|
args: [],
|
|
192
213
|
density: "regular",
|
|
193
214
|
icon: "none",
|
|
215
|
+
compact: "kept",
|
|
194
216
|
description: {
|
|
195
217
|
en: "The hero of the new-conversation page.",
|
|
196
218
|
zh: "新对话页的主视觉区。",
|
|
@@ -209,6 +231,7 @@ const SLOT_DATA = [
|
|
|
209
231
|
args: [],
|
|
210
232
|
density: "regular",
|
|
211
233
|
icon: "none",
|
|
234
|
+
compact: "kept",
|
|
212
235
|
description: {
|
|
213
236
|
en: "The frame around the composer, on the new-conversation and conversation pages.",
|
|
214
237
|
zh: "新对话页与对话页中输入框外的边框。",
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Locale } from "./cards.js";
|
|
2
2
|
import { type FormAnswer, type InputForm } from "./tool.js";
|
|
3
|
-
import type { UiSlotId, UiSlotScope } from "./ui-slots.js";
|
|
3
|
+
import type { CompactForm, UiSlotId, UiSlotScope } from "./ui-slots.js";
|
|
4
4
|
/**
|
|
5
5
|
* Icons a contribution may use (design system icon names; `puzzle` is the default and is drawn as
|
|
6
6
|
* the design `extension` icon). The title-bar button of a panel shows it.
|
|
@@ -50,6 +50,11 @@ export interface UiContribution {
|
|
|
50
50
|
path?: string;
|
|
51
51
|
/** Icon from {@link UI_ICONS}; default `puzzle`. */
|
|
52
52
|
icon?: UiIcon;
|
|
53
|
+
/**
|
|
54
|
+
* The form on a compact screen; may only narrow the slot's own (`kept` -> `drawer` -> `hidden`),
|
|
55
|
+
* see `effectiveCompact`. Omitted = the slot's form.
|
|
56
|
+
*/
|
|
57
|
+
compact?: CompactForm;
|
|
53
58
|
}
|
|
54
59
|
/**
|
|
55
60
|
* Blocks of the render schema. Text is for humans and shown as is (the plugin decides the language
|