@frockbot/applet-sdk 0.7.263 → 0.7.265
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 +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/applet-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.265",
|
|
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
|
@@ -517,6 +517,27 @@ export interface PluginContext {
|
|
|
517
517
|
>;
|
|
518
518
|
/** The `storage` grant. */
|
|
519
519
|
readonly storage?: PluginStorage;
|
|
520
|
+
/**
|
|
521
|
+
* The `device` grant: one call to one of this Plugin's own device modules
|
|
522
|
+
* on the person's computer, from inside a tool call. Only a module and a
|
|
523
|
+
* call `plugin.json` declares are reached; `deviceId` names the computer
|
|
524
|
+
* when more than one runs the module. The answer comes within about ten
|
|
525
|
+
* seconds. `failed` means it did not run, or ran and threw. `unknown`
|
|
526
|
+
* means it started and did not answer in time: it may have taken effect,
|
|
527
|
+
* so check before trying again. A tool call replayed after an interruption
|
|
528
|
+
* is told the first answer, and the module is never asked twice.
|
|
529
|
+
*/
|
|
530
|
+
readonly device?: {
|
|
531
|
+
call(
|
|
532
|
+
moduleId: string,
|
|
533
|
+
call: string,
|
|
534
|
+
input?: unknown,
|
|
535
|
+
options?: { deviceId?: string },
|
|
536
|
+
): Promise<
|
|
537
|
+
| { ok: true; value: unknown }
|
|
538
|
+
| { ok: false; outcome: "failed" | "unknown"; error: string }
|
|
539
|
+
>;
|
|
540
|
+
};
|
|
520
541
|
}
|
|
521
542
|
|
|
522
543
|
/** `ctx` inside `execute`: the tool is named, no event is. */
|