@mulmochat-plugin/summarize-pdf 0.1.1 → 0.1.2
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 +16 -4
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/tools.d.ts +19 -0
- package/dist/plugin/types.d.ts +1 -17
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types and utilities for building MulmoChat plugins.
|
|
5
5
|
*/
|
|
6
|
-
export type { ToolContext, ToolResult, ToolPlugin, ToolDefinition, JsonSchemaProperty, StartApiResponse, FileUploadConfig, ToolPluginConfig, ToolSample, } from "./types";
|
|
6
|
+
export type { ToolContext, ToolContextApp, ToolResult, ToolPlugin, ToolDefinition, JsonSchemaProperty, StartApiResponse, FileUploadConfig, ToolPluginConfig, ToolSample, } from "./types";
|
package/dist/common/types.d.ts
CHANGED
|
@@ -5,15 +5,25 @@
|
|
|
5
5
|
* These types are plugin-agnostic and can be used by any plugin implementation.
|
|
6
6
|
*/
|
|
7
7
|
import type { Component } from "vue";
|
|
8
|
+
/**
|
|
9
|
+
* Backend types that plugins can declare they use.
|
|
10
|
+
* App layer manages actual provider/model settings for each type.
|
|
11
|
+
*/
|
|
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
|
+
}
|
|
8
21
|
/**
|
|
9
22
|
* Context passed to plugin execute function
|
|
10
23
|
*/
|
|
11
24
|
export interface ToolContext {
|
|
12
25
|
currentResult?: ToolResult<unknown> | null;
|
|
13
|
-
|
|
14
|
-
getPluginConfig?: <T = unknown>(key: string) => T | undefined;
|
|
15
|
-
/** Backend API functions provided by the host app */
|
|
16
|
-
app?: Record<string, (...args: any[]) => any>;
|
|
26
|
+
app?: ToolContextApp;
|
|
17
27
|
}
|
|
18
28
|
/**
|
|
19
29
|
* Result returned from plugin execution
|
|
@@ -127,4 +137,6 @@ export interface ToolPlugin<T = unknown, J = unknown, A extends object = object>
|
|
|
127
137
|
config?: ToolPluginConfig;
|
|
128
138
|
/** Optional sample arguments for testing */
|
|
129
139
|
samples?: ToolSample[];
|
|
140
|
+
/** Backend types this plugin uses (e.g., ["textLLM", "imageGen"]) */
|
|
141
|
+
backends?: BackendType[];
|
|
130
142
|
}
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
import type { ToolPlugin, ToolResult } from "../common";
|
|
14
|
-
import {
|
|
14
|
+
import type { PdfToolData, PdfArgs, PdfJsonData } from "./types";
|
|
15
15
|
/**
|
|
16
16
|
* Create a ToolResult for an uploaded PDF file
|
|
17
17
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SummarizePdf Tool Definition
|
|
3
|
+
*/
|
|
4
|
+
export declare const TOOL_NAME = "summarizePDF";
|
|
5
|
+
export declare const TOOL_DEFINITION: {
|
|
6
|
+
type: "function";
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
parameters: {
|
|
10
|
+
type: "object";
|
|
11
|
+
properties: {
|
|
12
|
+
prompt: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
required: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SummarizePdf
|
|
2
|
+
* SummarizePdf Types
|
|
3
3
|
*/
|
|
4
4
|
/** PDF tool data stored in result.data */
|
|
5
5
|
export interface PdfToolData {
|
|
@@ -16,19 +16,3 @@ export interface PdfJsonData {
|
|
|
16
16
|
fileName: string;
|
|
17
17
|
summary: string;
|
|
18
18
|
}
|
|
19
|
-
export declare const TOOL_NAME = "summarizePDF";
|
|
20
|
-
export declare const TOOL_DEFINITION: {
|
|
21
|
-
type: "function";
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
parameters: {
|
|
25
|
-
type: "object";
|
|
26
|
-
properties: {
|
|
27
|
-
prompt: {
|
|
28
|
-
type: string;
|
|
29
|
-
description: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
required: string[];
|
|
33
|
-
};
|
|
34
|
-
};
|