@mulmochat-plugin/generate-image 0.1.3 → 0.1.4
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/common/index.d.ts +1 -1
- package/dist/common/types.d.ts +9 -4
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Shared types and utilities for building MulmoChat plugins.
|
|
5
5
|
* Import from "@mulmochat-plugin/generate-image/common" or copy to your plugin.
|
|
6
6
|
*/
|
|
7
|
-
export type { ToolContext, ToolResult, ToolPlugin, ToolDefinition, JsonSchemaProperty, StartApiResponse, FileUploadConfig, ToolPluginConfig, ToolSample, } from "./types";
|
|
7
|
+
export type { ToolContext, ToolContextApp, ToolResult, ToolPlugin, ToolDefinition, JsonSchemaProperty, StartApiResponse, FileUploadConfig, ToolPluginConfig, ToolSample, } from "./types";
|
package/dist/common/types.d.ts
CHANGED
|
@@ -10,15 +10,20 @@ import type { Component } from "vue";
|
|
|
10
10
|
* App layer manages actual provider/model settings for each type.
|
|
11
11
|
*/
|
|
12
12
|
export type BackendType = "textLLM" | "imageGen" | "audio" | "search" | "browse" | "map" | "mulmocast";
|
|
13
|
+
/**
|
|
14
|
+
* App interface provided to plugins via context.app
|
|
15
|
+
* Contains backend functions and config accessors
|
|
16
|
+
*/
|
|
17
|
+
export interface ToolContextApp extends Record<string, (...args: any[]) => any> {
|
|
18
|
+
getConfig: <T = unknown>(key: string) => T | undefined;
|
|
19
|
+
setConfig: (key: string, value: unknown) => void;
|
|
20
|
+
}
|
|
13
21
|
/**
|
|
14
22
|
* Context passed to plugin execute function
|
|
15
23
|
*/
|
|
16
24
|
export interface ToolContext {
|
|
17
25
|
currentResult?: ToolResult<unknown> | null;
|
|
18
|
-
|
|
19
|
-
getPluginConfig?: <T = unknown>(key: string) => T | undefined;
|
|
20
|
-
/** Backend API functions provided by the host app */
|
|
21
|
-
app?: Record<string, (...args: any[]) => any>;
|
|
26
|
+
app?: ToolContextApp;
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* Result returned from plugin execution
|