@frockbot/applet-sdk 0.7.197 → 0.7.199
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 +1 -1
- package/plugin/index.d.ts +17 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/applet-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.199",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Authoring SDK for FrockBot Plugins: the declarations a Plugin is written against, and the build pipeline the cloud build service runs.",
|
package/plugin/index.d.ts
CHANGED
|
@@ -815,12 +815,23 @@ export interface PluginViewDocument {
|
|
|
815
815
|
root: PluginViewNode;
|
|
816
816
|
}
|
|
817
817
|
|
|
818
|
-
/**
|
|
818
|
+
/**
|
|
819
|
+
* What a `conversation.panel` view that names a `page` returns: the state its
|
|
820
|
+
* page is handed, any JSON object of at most 64 KB.
|
|
821
|
+
*/
|
|
822
|
+
export type PluginPageState = { [key: string]: unknown };
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* A view: renders one declared surface with the same `ctx` a tool call gets.
|
|
826
|
+
* It returns the tree the host draws, or — for a view that names a `page` —
|
|
827
|
+
* the page's state.
|
|
828
|
+
*/
|
|
819
829
|
export type PluginView = (
|
|
820
830
|
ctx: PluginContext,
|
|
821
831
|
) =>
|
|
822
|
-
| Promise<PluginViewDocument | undefined | void>
|
|
832
|
+
| Promise<PluginViewDocument | PluginPageState | undefined | void>
|
|
823
833
|
| PluginViewDocument
|
|
834
|
+
| PluginPageState
|
|
824
835
|
| undefined
|
|
825
836
|
| void;
|
|
826
837
|
|
|
@@ -968,8 +979,10 @@ export interface PluginModule {
|
|
|
968
979
|
services?: Record<string, unknown>;
|
|
969
980
|
triggers?: PluginTriggers;
|
|
970
981
|
/**
|
|
971
|
-
* One view per surface id declared under `views` in `plugin.json
|
|
972
|
-
*
|
|
982
|
+
* One view per surface id declared under `views` in `plugin.json`: a
|
|
983
|
+
* `settings.sections` block on this Plugin's card, a `conversation.panel`
|
|
984
|
+
* page beside the conversation, or a `bot.nav` door. A panel view that
|
|
985
|
+
* names a `page` returns that page's state instead of a tree.
|
|
973
986
|
*/
|
|
974
987
|
views?: Record<string, PluginView>;
|
|
975
988
|
/**
|