@frockbot/plugin-settings 0.3.5 → 0.3.6
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/package.json +10 -10
- package/src/client/BotSettingsSurface.vue +7 -3
- package/src/client/ConnectionsSurface.vue +5 -17
- package/src/client/ModelsSurface.vue +2 -2
- package/src/client/PackageCatalogSurface.vue +13 -13
- package/src/client/PackageSettingsForm.vue +2 -4
- package/src/client/PackageSettingsSection.vue +1 -1
- package/src/client/PluginsSurface.vue +25 -10
- package/src/client/UserProfileTrigger.vue +1 -1
- package/src/client/UserSettingsSurface.vue +4 -4
- package/src/client/index.ts +2 -2
- package/src/client/package-surfaces.test.ts +1 -3
- package/src/client/package-surfaces.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-settings",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@frockbot/catalog-core": "0.3.
|
|
25
|
-
"@frockbot/client-core": "0.3.
|
|
26
|
-
"@frockbot/client-ui": "0.3.
|
|
27
|
-
"@frockbot/configuration-core": "0.3.
|
|
28
|
-
"@frockbot/connection-core": "0.3.
|
|
29
|
-
"@frockbot/kernel-composition": "0.3.
|
|
30
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
31
|
-
"@frockbot/plugin-auth": "0.3.
|
|
32
|
-
"@frockbot/plugin-shell": "0.3.
|
|
24
|
+
"@frockbot/catalog-core": "0.3.6",
|
|
25
|
+
"@frockbot/client-core": "0.3.6",
|
|
26
|
+
"@frockbot/client-ui": "0.3.6",
|
|
27
|
+
"@frockbot/configuration-core": "0.3.6",
|
|
28
|
+
"@frockbot/connection-core": "0.3.6",
|
|
29
|
+
"@frockbot/kernel-composition": "0.3.6",
|
|
30
|
+
"@frockbot/kernel-contracts": "0.3.6",
|
|
31
|
+
"@frockbot/plugin-auth": "0.3.6",
|
|
32
|
+
"@frockbot/plugin-shell": "0.3.6",
|
|
33
33
|
"cordis": "4.0.0-rc.8",
|
|
34
34
|
"vue": "3.5.41"
|
|
35
35
|
},
|
|
@@ -266,9 +266,13 @@ async function save(): Promise<void> {
|
|
|
266
266
|
>
|
|
267
267
|
<div>
|
|
268
268
|
<strong>Identity</strong>
|
|
269
|
-
<p>{{ name || "This Bot" }}
|
|
269
|
+
<p>{{ name || "This Bot" }}</p>
|
|
270
270
|
</div>
|
|
271
|
-
<span>
|
|
271
|
+
<span>{{
|
|
272
|
+
web.botSettings?.profile.namedBy === "bot"
|
|
273
|
+
? "Named by this Bot"
|
|
274
|
+
: "Named by you"
|
|
275
|
+
}}</span>
|
|
272
276
|
</UiAnchor>
|
|
273
277
|
<UiAnchor
|
|
274
278
|
anchor="bot-info-members"
|
|
@@ -280,7 +284,7 @@ async function save(): Promise<void> {
|
|
|
280
284
|
<strong>Members</strong>
|
|
281
285
|
<p>This Bot uses what you enable for all of your Bots.</p>
|
|
282
286
|
</div>
|
|
283
|
-
<span>
|
|
287
|
+
<span>Plugins and connected accounts are shared</span>
|
|
284
288
|
</UiAnchor>
|
|
285
289
|
<k-slot name="frockbot.bot-settings-sections" />
|
|
286
290
|
</div>
|
|
@@ -254,7 +254,7 @@ async function addMcpServer(): Promise<void> {
|
|
|
254
254
|
} catch (error) {
|
|
255
255
|
mcpApiKey.value = "";
|
|
256
256
|
web.value.settingsError =
|
|
257
|
-
error instanceof Error ? error.message : "
|
|
257
|
+
error instanceof Error ? error.message : "Couldn't add that server.";
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -343,11 +343,7 @@ async function connect(
|
|
|
343
343
|
>
|
|
344
344
|
<div class="connect-card-copy">
|
|
345
345
|
<strong>{{ connection.pendingAuthorization?.label }}</strong>
|
|
346
|
-
<span>
|
|
347
|
-
Needs your authorization. Only you can complete it — FrockBot
|
|
348
|
-
creates the sign-in link when you press Reconnect, and nothing is
|
|
349
|
-
stored waiting for it.
|
|
350
|
-
</span>
|
|
346
|
+
<span> Needs you to sign in again. </span>
|
|
351
347
|
</div>
|
|
352
348
|
<UiButton
|
|
353
349
|
variant="primary"
|
|
@@ -376,11 +372,7 @@ async function connect(
|
|
|
376
372
|
<span class="connector-copy">
|
|
377
373
|
<strong>{{ item.displayName }}</strong>
|
|
378
374
|
<small>
|
|
379
|
-
{{
|
|
380
|
-
item.connectionTypes
|
|
381
|
-
.map((connection) => connection.displayName)
|
|
382
|
-
.join(", ")
|
|
383
|
-
}}
|
|
375
|
+
{{ item.connectionTypes[0]?.displayName }}
|
|
384
376
|
</small>
|
|
385
377
|
</span>
|
|
386
378
|
<UiButton
|
|
@@ -548,12 +540,8 @@ async function connect(
|
|
|
548
540
|
/>
|
|
549
541
|
</label>
|
|
550
542
|
<p class="field-hint">
|
|
551
|
-
Leave both empty
|
|
552
|
-
|
|
553
|
-
server that issues a client secret is refused, because a secret
|
|
554
|
-
would have to live in this Connection's settings. You will be
|
|
555
|
-
sent to the server to sign in, and no token ever reaches this
|
|
556
|
-
page.
|
|
543
|
+
Leave both empty unless the server gave you specific values.
|
|
544
|
+
You'll sign in on the server's own site.
|
|
557
545
|
</p>
|
|
558
546
|
</template>
|
|
559
547
|
<div class="api-key-actions">
|
|
@@ -32,8 +32,8 @@ onMounted(() => void web.value.loadPluginCatalog());
|
|
|
32
32
|
class="models-anchor"
|
|
33
33
|
/>
|
|
34
34
|
<p class="models-empty">
|
|
35
|
-
FrockBot
|
|
36
|
-
|
|
35
|
+
FrockBot picks a model for you. Turn on Custom models in Plugins to choose
|
|
36
|
+
your own.
|
|
37
37
|
</p>
|
|
38
38
|
<p v-if="web.settingsError" class="settings-error" role="alert">
|
|
39
39
|
{{ web.settingsError }}
|
|
@@ -152,20 +152,17 @@ function isPackageInstalled(packageId: string): boolean {
|
|
|
152
152
|
<template>
|
|
153
153
|
<div class="package-catalog-surface">
|
|
154
154
|
<p class="catalog-intro">
|
|
155
|
-
Browse published
|
|
156
|
-
you own
|
|
155
|
+
Browse published plugins. Installing one makes it available to every Bot
|
|
156
|
+
you own, once it's turned on.
|
|
157
157
|
</p>
|
|
158
158
|
<label class="catalog-search">
|
|
159
159
|
<UiIcon name="search" />
|
|
160
160
|
<input
|
|
161
161
|
v-model="search"
|
|
162
|
-
placeholder="Search
|
|
163
|
-
aria-label="Search
|
|
162
|
+
placeholder="Search plugins"
|
|
163
|
+
aria-label="Search plugins"
|
|
164
164
|
/>
|
|
165
165
|
</label>
|
|
166
|
-
<p v-if="web.packageCatalogGeneration" class="catalog-generation">
|
|
167
|
-
Generation {{ web.packageCatalogGeneration }}
|
|
168
|
-
</p>
|
|
169
166
|
<div class="catalog-grid">
|
|
170
167
|
<article
|
|
171
168
|
v-for="entry in filteredCatalog"
|
|
@@ -211,7 +208,7 @@ function isPackageInstalled(packageId: string): boolean {
|
|
|
211
208
|
<p class="catalog-note">{{ openCatalogEntry.description }}</p>
|
|
212
209
|
<dl class="catalog-facts">
|
|
213
210
|
<div>
|
|
214
|
-
<dt>
|
|
211
|
+
<dt>Plugin</dt>
|
|
215
212
|
<dd>{{ openCatalogEntry.packageId }}</dd>
|
|
216
213
|
</div>
|
|
217
214
|
<div>
|
|
@@ -239,8 +236,8 @@ function isPackageInstalled(packageId: string): boolean {
|
|
|
239
236
|
>
|
|
240
237
|
<p>
|
|
241
238
|
Uninstalling {{ entry.displayName }} removes it from every
|
|
242
|
-
Bot.
|
|
243
|
-
|
|
239
|
+
Bot. Your connected accounts stay, so reinstalling picks up
|
|
240
|
+
where you left off.
|
|
244
241
|
</p>
|
|
245
242
|
<div class="catalog-actions">
|
|
246
243
|
<UiButton @click="uninstallingPackageId = undefined">
|
|
@@ -330,10 +327,13 @@ function isPackageInstalled(packageId: string): boolean {
|
|
|
330
327
|
v-if="web.packageCatalog.length === 0 && !web.settingsError"
|
|
331
328
|
class="catalog-empty"
|
|
332
329
|
>
|
|
333
|
-
|
|
330
|
+
No plugins are published yet.
|
|
334
331
|
</p>
|
|
335
|
-
<p
|
|
336
|
-
|
|
332
|
+
<p
|
|
333
|
+
v-else-if="filteredCatalog.length === 0 && !web.settingsError"
|
|
334
|
+
class="catalog-empty"
|
|
335
|
+
>
|
|
336
|
+
No plugin matches that search.
|
|
337
337
|
</p>
|
|
338
338
|
<p v-if="web.settingsError" class="settings-error" role="alert">
|
|
339
339
|
{{ web.settingsError }}
|
|
@@ -54,9 +54,7 @@ async function save(): Promise<void> {
|
|
|
54
54
|
await web.value.savePackageSettings(props.item.packageId, values);
|
|
55
55
|
} catch (error) {
|
|
56
56
|
web.value.settingsError =
|
|
57
|
-
error instanceof Error
|
|
58
|
-
? error.message
|
|
59
|
-
: "Could not save the Package settings";
|
|
57
|
+
error instanceof Error ? error.message : "Couldn't save those settings.";
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
</script>
|
|
@@ -73,7 +71,7 @@ async function save(): Promise<void> {
|
|
|
73
71
|
v-if="settingFieldKind(definition.schema) === 'enum'"
|
|
74
72
|
v-model="draft[definition.id]"
|
|
75
73
|
>
|
|
76
|
-
<option value="">
|
|
74
|
+
<option value="">Default</option>
|
|
77
75
|
<option
|
|
78
76
|
v-for="choice in definition.schema.enum ?? []"
|
|
79
77
|
:key="String(choice)"
|
|
@@ -60,11 +60,26 @@ onMounted(() => {
|
|
|
60
60
|
void web.value.loadPluginCatalog();
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
/**
|
|
63
|
+
/** Plain nouns for the manifest's capability kinds. */
|
|
64
|
+
const CAPABILITY_NOUNS: Record<string, string> = {
|
|
65
|
+
tool: "Tools",
|
|
66
|
+
model: "Models",
|
|
67
|
+
memory: "Memory",
|
|
68
|
+
notification: "Notifications",
|
|
69
|
+
computer: "Computer",
|
|
70
|
+
ui: "Pages",
|
|
71
|
+
storage: "Storage",
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
function capabilityNoun(kind: string): string {
|
|
75
|
+
return CAPABILITY_NOUNS[kind] ?? kind;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** What a plugin offers, in plain words. */
|
|
64
79
|
function capabilitySummary(item: PluginCatalogItem): string {
|
|
65
80
|
const kinds = [...new Set(item.capabilities.map((entry) => entry.kind))];
|
|
66
|
-
if (kinds.length === 0) return "No
|
|
67
|
-
return kinds.join(", ");
|
|
81
|
+
if (kinds.length === 0) return "No features yet";
|
|
82
|
+
return kinds.map(capabilityNoun).join(", ");
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
function installed(packageId: string): boolean {
|
|
@@ -117,7 +132,7 @@ async function install(item: PluginCatalogItem): Promise<void> {
|
|
|
117
132
|
await web.value.installPackage(item.packageId, item.version);
|
|
118
133
|
} catch (error) {
|
|
119
134
|
web.value.settingsError =
|
|
120
|
-
error instanceof Error ? error.message : "
|
|
135
|
+
error instanceof Error ? error.message : "Couldn't add that plugin.";
|
|
121
136
|
} finally {
|
|
122
137
|
busyPackageId.value = undefined;
|
|
123
138
|
}
|
|
@@ -131,7 +146,7 @@ async function setEnabled(packageId: string, next: boolean): Promise<void> {
|
|
|
131
146
|
web.value.settingsError =
|
|
132
147
|
error instanceof Error
|
|
133
148
|
? error.message
|
|
134
|
-
: "
|
|
149
|
+
: "Couldn't turn that plugin on or off.";
|
|
135
150
|
} finally {
|
|
136
151
|
busyPackageId.value = undefined;
|
|
137
152
|
}
|
|
@@ -164,17 +179,17 @@ async function setEnabled(packageId: string, next: boolean): Promise<void> {
|
|
|
164
179
|
</label>
|
|
165
180
|
<UiAnchor
|
|
166
181
|
anchor="user-packages"
|
|
167
|
-
label="
|
|
182
|
+
label="Plugins"
|
|
168
183
|
:href="packagesLink"
|
|
169
184
|
class="plugin-anchor"
|
|
170
185
|
>
|
|
171
186
|
<p class="plugin-intro">
|
|
172
|
-
Turn
|
|
187
|
+
Turn plugins on and off for your Bots. Set one up where it belongs:
|
|
173
188
|
model providers in Models, accounts in Connectors.
|
|
174
189
|
</p>
|
|
175
190
|
<div class="plugin-catalog-link">
|
|
176
191
|
<UiButton type="button" @click="openPackageCatalog">
|
|
177
|
-
Browse
|
|
192
|
+
Browse all plugins
|
|
178
193
|
</UiButton>
|
|
179
194
|
</div>
|
|
180
195
|
</UiAnchor>
|
|
@@ -237,10 +252,10 @@ async function setEnabled(packageId: string, next: boolean): Promise<void> {
|
|
|
237
252
|
v-if="userPackages.length === 0 && !web.settingsError"
|
|
238
253
|
class="plugin-empty"
|
|
239
254
|
>
|
|
240
|
-
This
|
|
255
|
+
This deployment ships no plugins.
|
|
241
256
|
</p>
|
|
242
257
|
<p v-else-if="filteredCatalog.length === 0" class="plugin-empty">
|
|
243
|
-
No
|
|
258
|
+
No plugin matches that search.
|
|
244
259
|
</p>
|
|
245
260
|
</div>
|
|
246
261
|
</template>
|
|
@@ -120,7 +120,7 @@ onBeforeUnmount(() => window.removeEventListener("pointerdown", closeMenu));
|
|
|
120
120
|
{{ auth.signingOut.value ? "Signing out…" : "Sign out" }}
|
|
121
121
|
</button>
|
|
122
122
|
<p v-if="developmentIdentity" class="profile-menu-hint">
|
|
123
|
-
|
|
123
|
+
You're signed in as a local developer.
|
|
124
124
|
</p>
|
|
125
125
|
<p v-if="signOutError" class="profile-menu-error" role="alert">
|
|
126
126
|
{{ signOutError }}
|
|
@@ -70,7 +70,7 @@ async function save(): Promise<void> {
|
|
|
70
70
|
<span class="profile-face" aria-hidden="true" />
|
|
71
71
|
<div>
|
|
72
72
|
<strong>Your profile</strong>
|
|
73
|
-
<p>
|
|
73
|
+
<p>How your Bots refer to you.</p>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
76
76
|
<UiField label="Name">
|
|
@@ -82,13 +82,13 @@ async function save(): Promise<void> {
|
|
|
82
82
|
</UiAnchor>
|
|
83
83
|
<UiAnchor
|
|
84
84
|
anchor="user-package-settings"
|
|
85
|
-
label="
|
|
85
|
+
label="Plugin settings"
|
|
86
86
|
:href="packageSettingsLink"
|
|
87
87
|
class="settings-row"
|
|
88
88
|
>
|
|
89
89
|
<p class="field-hint">
|
|
90
|
-
Settings
|
|
91
|
-
|
|
90
|
+
Settings for the plugins you've turned on. Model providers are set up in
|
|
91
|
+
Models, and accounts in Connectors.
|
|
92
92
|
</p>
|
|
93
93
|
<PackageSettingsSection />
|
|
94
94
|
<UiButton type="button" @click="surfaces.open('plugins')">
|
package/src/client/index.ts
CHANGED
|
@@ -45,12 +45,12 @@ export const settingsClientPlugin: ClientPlugin = (ctx) => {
|
|
|
45
45
|
}),
|
|
46
46
|
surfaces.register({
|
|
47
47
|
id: "package-catalog",
|
|
48
|
-
title: "
|
|
48
|
+
title: "All plugins",
|
|
49
49
|
component: PackageCatalogSurface,
|
|
50
50
|
}),
|
|
51
51
|
surfaces.register({
|
|
52
52
|
id: "user-settings",
|
|
53
|
-
title: "
|
|
53
|
+
title: "Settings",
|
|
54
54
|
component: UserSettingsSurface,
|
|
55
55
|
}),
|
|
56
56
|
ctx.slot({
|
|
@@ -165,9 +165,7 @@ describe("Package configuration homes", () => {
|
|
|
165
165
|
test("names the surface a Plugins row points at", () => {
|
|
166
166
|
expect(configurationHomeLabel("models")).toBe("Models");
|
|
167
167
|
expect(configurationHomeLabel("connections")).toBe("Connectors");
|
|
168
|
-
expect(configurationHomeLabel("user-settings")).toBe(
|
|
169
|
-
"Application settings",
|
|
170
|
-
);
|
|
168
|
+
expect(configurationHomeLabel("user-settings")).toBe("Settings");
|
|
171
169
|
expect(configurationHomeLabel("none")).toBeUndefined();
|
|
172
170
|
});
|
|
173
171
|
});
|
|
@@ -97,6 +97,6 @@ export function configurationHomeLabel(
|
|
|
97
97
|
): string | undefined {
|
|
98
98
|
if (home === "models") return "Models";
|
|
99
99
|
if (home === "connections") return "Connectors";
|
|
100
|
-
if (home === "user-settings") return "
|
|
100
|
+
if (home === "user-settings") return "Settings";
|
|
101
101
|
return undefined;
|
|
102
102
|
}
|