@frockbot/plugin-bot-template 0.3.1 → 0.3.3
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 +11 -11
- package/src/backend.ts +14 -0
- package/src/client/index.ts +11 -0
- package/src/user.ts +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-bot-template",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@frockbot/client-core": "0.3.
|
|
28
|
-
"@frockbot/client-ui": "0.3.
|
|
29
|
-
"@frockbot/configuration-core": "0.3.
|
|
30
|
-
"@frockbot/connection-core": "0.3.
|
|
31
|
-
"@frockbot/kernel-agent-loop": "0.3.
|
|
32
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
33
|
-
"@frockbot/plugin-settings": "0.3.
|
|
34
|
-
"@frockbot/plugin-shell": "0.3.
|
|
35
|
-
"@frockbot/template-core": "0.3.
|
|
27
|
+
"@frockbot/client-core": "0.3.3",
|
|
28
|
+
"@frockbot/client-ui": "0.3.3",
|
|
29
|
+
"@frockbot/configuration-core": "0.3.3",
|
|
30
|
+
"@frockbot/connection-core": "0.3.3",
|
|
31
|
+
"@frockbot/kernel-agent-loop": "0.3.3",
|
|
32
|
+
"@frockbot/kernel-contracts": "0.3.3",
|
|
33
|
+
"@frockbot/plugin-settings": "0.3.3",
|
|
34
|
+
"@frockbot/plugin-shell": "0.3.3",
|
|
35
|
+
"@frockbot/template-core": "0.3.3",
|
|
36
36
|
"cordis": "4.0.0-rc.8",
|
|
37
37
|
"vue": "3.5.41"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@frockbot/plugin-tools": "0.3.
|
|
40
|
+
"@frockbot/plugin-tools": "0.3.3",
|
|
41
41
|
"@types/bun": "1.4.0",
|
|
42
42
|
"@vitejs/plugin-vue": "6.0.8",
|
|
43
43
|
"typescript": "5.9.3",
|
package/src/backend.ts
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
type TemplateShareListViewV1,
|
|
34
34
|
type TemplateShareReceiptV1,
|
|
35
35
|
} from "./shared.js";
|
|
36
|
+
import { defineGatewayContribution } from "@frockbot/kernel-contracts/contributions";
|
|
36
37
|
|
|
37
38
|
export interface PublishedTemplateV1 {
|
|
38
39
|
hash: string;
|
|
@@ -260,3 +261,16 @@ export namespace createBotTemplateBackendContribution {
|
|
|
260
261
|
return () => lifecycle.mount(createBotTemplateBackendContribution(host));
|
|
261
262
|
}
|
|
262
263
|
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The manifest's gateway `backend` entry, resolved by specifier. The
|
|
267
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
268
|
+
* branches on which Package it belongs to.
|
|
269
|
+
*/
|
|
270
|
+
export const backendContribution = defineGatewayContribution<
|
|
271
|
+
BotTemplateGatewayHostV1,
|
|
272
|
+
BotTemplateBackendRouteContribution
|
|
273
|
+
>({
|
|
274
|
+
specifier: "@frockbot/plugin-bot-template/backend",
|
|
275
|
+
create: createBotTemplateBackendContribution.plugin,
|
|
276
|
+
});
|
package/src/client/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import BotTemplateImportSection from "./BotTemplateImportSection.vue";
|
|
21
21
|
import BotTemplateSection from "./BotTemplateSection.vue";
|
|
22
22
|
import { botTemplateStateKey, type BotTemplateClientState } from "./state.js";
|
|
23
|
+
import { defineClientContribution } from "@frockbot/kernel-contracts/contributions";
|
|
23
24
|
|
|
24
25
|
const SHARES_PATH = "/api/bot-templates";
|
|
25
26
|
const IMPORTS_PATH = "/api/bot-template-imports";
|
|
@@ -208,3 +209,13 @@ export const botTemplateClientPlugin: ClientPlugin = (ctx) => {
|
|
|
208
209
|
};
|
|
209
210
|
|
|
210
211
|
export default botTemplateClientPlugin;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The manifest's `client` entry, resolved by specifier. The application looks
|
|
215
|
+
* this descriptor up in its Contribution table; it never branches on which
|
|
216
|
+
* Package it belongs to.
|
|
217
|
+
*/
|
|
218
|
+
export const clientContribution = defineClientContribution<ClientPlugin>({
|
|
219
|
+
specifier: "@frockbot/plugin-bot-template/client",
|
|
220
|
+
plugin: botTemplateClientPlugin,
|
|
221
|
+
});
|
package/src/user.ts
CHANGED
|
@@ -63,6 +63,7 @@ import {
|
|
|
63
63
|
type TemplateShareListViewV1,
|
|
64
64
|
type TemplateShareReceiptV1,
|
|
65
65
|
} from "./shared.js";
|
|
66
|
+
import { defineUserBackendContribution } from "@frockbot/kernel-contracts/contributions";
|
|
66
67
|
|
|
67
68
|
export const BOT_TEMPLATE_PACKAGE_ID = "bot-template";
|
|
68
69
|
|
|
@@ -909,3 +910,26 @@ export function createBotTemplateUserBackendPlugin(
|
|
|
909
910
|
): Plugin {
|
|
910
911
|
return () => lifecycle.mount(createBotTemplateUserBackendContribution(host));
|
|
911
912
|
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* What an application hands this Contribution: the Bot Template share ledger, under the
|
|
916
|
+
* Package's own key so one wide host object can satisfy every Package's slice
|
|
917
|
+
* without their fields colliding.
|
|
918
|
+
*/
|
|
919
|
+
export interface BotTemplateUserApplicationHostV1 {
|
|
920
|
+
botTemplate: BotTemplateUserHostV1;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The manifest's `user` entry, resolved by specifier. The
|
|
925
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
926
|
+
* branches on which Package it belongs to.
|
|
927
|
+
*/
|
|
928
|
+
export const userContribution = defineUserBackendContribution<
|
|
929
|
+
BotTemplateUserApplicationHostV1,
|
|
930
|
+
BotTemplateUserBackendContribution
|
|
931
|
+
>({
|
|
932
|
+
specifier: "@frockbot/plugin-bot-template/user",
|
|
933
|
+
create: (host, lifecycle) =>
|
|
934
|
+
createBotTemplateUserBackendPlugin(host.botTemplate, lifecycle),
|
|
935
|
+
});
|