@weavetab/mcp 2.5.0-beta.1 → 2.5.0-beta.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/AGENTS.md +2 -1
- package/ARCHITECTURE.md +6 -6
- package/LICENSE +1 -1
- package/README.md +164 -802
- package/SECURITY.md +33 -22
- package/TROUBLESHOOTING.md +3 -3
- package/dist/cdp/bridge.d.ts +10 -0
- package/dist/cdp/bridge.js +285 -78
- package/dist/cdp/connector.d.ts +7 -3
- package/dist/cdp/connector.js +196 -75
- package/dist/cdp/helpers.d.ts +4 -0
- package/dist/cdp/helpers.js +181 -0
- package/dist/cdp/lock.d.ts +9 -6
- package/dist/cdp/lock.js +72 -59
- package/dist/cdp/omni_broker.d.ts +2 -1
- package/dist/cdp/omni_broker.js +13 -7
- package/dist/cdp/profiles.d.ts +10 -0
- package/dist/cdp/profiles.js +65 -0
- package/dist/cdp/walker.d.ts +25 -1
- package/dist/cdp/walker.js +354 -7
- package/dist/cli/plugin.d.ts +0 -2
- package/dist/cli/plugin.js +51 -696
- package/dist/cli/updater.d.ts +1 -1
- package/dist/cli/updater.js +27 -7
- package/dist/config/loader.d.ts +33 -6
- package/dist/config/loader.js +174 -22
- package/dist/desktop/discovery.d.ts +44 -0
- package/dist/desktop/discovery.js +364 -0
- package/dist/index.js +140 -64
- package/dist/intelligence/marks.d.ts +36 -0
- package/dist/intelligence/marks.js +30 -0
- package/dist/intelligence/patternCompiler.d.ts +118 -0
- package/dist/intelligence/patternCompiler.js +259 -0
- package/dist/intelligence/sessionMemory.d.ts +2 -0
- package/dist/intelligence/sessionMemory.js +18 -8
- package/dist/overlay/ghost.js +2 -2
- package/dist/overlay/injector.js +3 -5
- package/dist/plugin/extension_bridge.d.ts +40 -0
- package/dist/plugin/extension_bridge.js +158 -0
- package/dist/plugin/interface.d.ts +151 -15
- package/dist/plugin/loader.d.ts +19 -1
- package/dist/plugin/loader.js +331 -63
- package/dist/plugin/pipeline.d.ts +75 -0
- package/dist/plugin/pipeline.js +183 -0
- package/dist/plugin/registry.js +12 -1
- package/dist/plugin/storage.d.ts +51 -0
- package/dist/plugin/storage.js +164 -0
- package/dist/security/secrets.d.ts +1 -0
- package/dist/security/secrets.js +13 -0
- package/dist/sensors/actionability.js +1 -2
- package/dist/sensors/guard.js +4 -10
- package/dist/sensors/mutations.js +12 -0
- package/dist/sensors/operation_monitor.js +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +600 -236
- package/dist/state/agent.d.ts +1 -0
- package/dist/state/agent.js +3 -0
- package/dist/state/delta.d.ts +12 -4
- package/dist/state/delta.js +67 -14
- package/dist/state/session.d.ts +8 -2
- package/dist/state/session.js +60 -13
- package/dist/tools/browser_detect.d.ts +16 -2
- package/dist/tools/browser_detect.js +54 -6
- package/dist/tools/burst.d.ts +17 -7
- package/dist/tools/burst.js +240 -83
- package/dist/tools/checkpoint.d.ts +38 -0
- package/dist/tools/checkpoint.js +271 -0
- package/dist/tools/click.d.ts +1 -0
- package/dist/tools/click.js +97 -98
- package/dist/tools/clipboard.js +31 -24
- package/dist/tools/design_extract.js +1 -1
- package/dist/tools/eval.js +1 -1
- package/dist/tools/fill.d.ts +20 -1
- package/dist/tools/fill.js +199 -40
- package/dist/tools/find.d.ts +16 -0
- package/dist/tools/find.js +67 -44
- package/dist/tools/github/index.d.ts +19 -4
- package/dist/tools/github/index.js +40 -4
- package/dist/tools/highlight.d.ts +6 -2
- package/dist/tools/highlight.js +158 -72
- package/dist/tools/inspect.js +1 -1
- package/dist/tools/key.js +65 -56
- package/dist/tools/navigate.d.ts +1 -1
- package/dist/tools/navigate.js +57 -44
- package/dist/tools/pdf.js +21 -13
- package/dist/tools/pointer.d.ts +18 -3
- package/dist/tools/pointer.js +89 -1
- package/dist/tools/read.d.ts +28 -8
- package/dist/tools/read.js +230 -56
- package/dist/tools/scrape.js +67 -13
- package/dist/tools/screenshot.js +21 -16
- package/dist/tools/scroll.js +6 -11
- package/dist/tools/select.js +8 -2
- package/dist/tools/snapshot.js +3 -34
- package/dist/tools/tabs.d.ts +10 -10
- package/dist/tools/tabs.js +55 -39
- package/dist/tools/thought.d.ts +2 -0
- package/dist/tools/thought.js +13 -14
- package/dist/tools/type.d.ts +2 -0
- package/dist/tools/type.js +109 -60
- package/dist/tools/type_secret.js +42 -76
- package/dist/tools/upload.js +1 -1
- package/dist/tools/video_compiler.d.ts +1 -1
- package/dist/tools/video_compiler.js +11 -12
- package/dist/version.d.ts +5 -0
- package/dist/version.js +5 -0
- package/docs/DOCUMENTATION.md +82 -36
- package/docs/PLUGINS.md +82 -499
- package/docs/TOOLS.md +51 -99
- package/docs/architecture/blind-injection.md +83 -0
- package/docs/architecture/dual-injection.md +32 -0
- package/docs/architecture/overview.md +49 -0
- package/docs/architecture/security.md +35 -0
- package/docs/architecture/transport.md +37 -0
- package/docs/captcha-stealth/captcha-solver.md +75 -0
- package/docs/captcha-stealth/stealth-physics.md +60 -0
- package/docs/cli/cli-commands.md +44 -0
- package/docs/cli/cli-flags.md +20 -0
- package/docs/cli/cli-introduction.md +20 -0
- package/docs/cli/cli-scripting.md +32 -0
- package/docs/cli/g-ide/ide-antigravity.md +24 -0
- package/docs/cli/g-ide/ide-claude-code.md +24 -0
- package/docs/cli/g-ide/ide-claude-desktop.md +32 -0
- package/docs/cli/g-ide/ide-cursor.md +31 -0
- package/docs/cli/g-ide/ide-generic.md +34 -0
- package/docs/cli/g-ide/ide-opencode.md +24 -0
- package/docs/cli/g-ide/ide-vscode-copilot.md +24 -0
- package/docs/cli/g-ide/ide-windsurf.md +24 -0
- package/docs/configuration/config-locations.md +24 -0
- package/docs/configuration/configuration.md +73 -0
- package/docs/configuration/env-variables.md +19 -0
- package/docs/configuration/folders.md +55 -0
- package/docs/desktop-automation/electron-apps.md +217 -0
- package/docs/get-started/installation.md +47 -0
- package/docs/get-started/introduction.md +60 -0
- package/docs/get-started/quickstart.md +54 -0
- package/docs/get-started/setup-wizard.md +26 -0
- package/docs/intelligence/site-profiles.md +151 -0
- package/docs/skills-ecosystem/skills-overview.md +35 -0
- package/docs/skills-ecosystem/skills-recipes.md +36 -0
- package/docs/tools/tools.md +631 -0
- package/docs/troubleshooting/trouble-browser.md +27 -0
- package/docs/troubleshooting/trouble-config.md +20 -0
- package/docs/troubleshooting/trouble-loop.md +31 -0
- package/ext-dist/background.js +10 -62
- package/ext-dist/content.js +333 -921
- package/ext-dist/hud/hud.js +9 -9
- package/ext-dist/manifest.json +2 -6
- package/ext-dist/styles.css +6 -1
- package/mcp.json +108 -72
- package/package.json +14 -9
- package/server.json +3 -3
- package/docs/DEV_MODE.md +0 -68
- package/docs/dev_plugin.md +0 -310
- package/ext-dist/sidepanel/sidepanel.js +0 -25
- package/ext-dist/sidepanel.html +0 -547
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import type CDP from "chrome-remote-interface";
|
|
3
3
|
import type { Config } from "../config/loader.js";
|
|
4
|
+
import type { IPluginStorage } from "./storage.js";
|
|
5
|
+
import type { IPluginExtensionBridge } from "./extension_bridge.js";
|
|
4
6
|
export interface WeavetabToolDefinition {
|
|
5
7
|
name: string;
|
|
6
8
|
description: string;
|
|
@@ -23,10 +25,25 @@ export interface WeavetabManifestTool {
|
|
|
23
25
|
name: string;
|
|
24
26
|
description: string;
|
|
25
27
|
inputSchema?: Record<string, any>;
|
|
28
|
+
parameters?: Record<string, any>;
|
|
26
29
|
}
|
|
27
|
-
export interface
|
|
30
|
+
export interface WeavetabPermissions {
|
|
31
|
+
config?: {
|
|
32
|
+
read?: boolean;
|
|
33
|
+
write?: boolean;
|
|
34
|
+
default?: Record<string, any>;
|
|
35
|
+
reason?: string;
|
|
36
|
+
};
|
|
37
|
+
extension?: {
|
|
38
|
+
hud?: boolean;
|
|
39
|
+
overlay?: boolean;
|
|
40
|
+
styles?: boolean;
|
|
41
|
+
scripts?: boolean;
|
|
42
|
+
reason?: string;
|
|
43
|
+
};
|
|
28
44
|
network?: {
|
|
29
45
|
domains?: string[];
|
|
46
|
+
hosts?: string[];
|
|
30
47
|
intercept?: boolean;
|
|
31
48
|
reason?: string;
|
|
32
49
|
};
|
|
@@ -36,6 +53,7 @@ export interface WeavetabManifestPermissions {
|
|
|
36
53
|
click?: boolean;
|
|
37
54
|
input?: boolean;
|
|
38
55
|
screenshot?: boolean;
|
|
56
|
+
dom?: boolean;
|
|
39
57
|
reason?: string;
|
|
40
58
|
[key: string]: any;
|
|
41
59
|
};
|
|
@@ -44,19 +62,28 @@ export interface WeavetabManifestPermissions {
|
|
|
44
62
|
write?: string[];
|
|
45
63
|
reason?: string;
|
|
46
64
|
};
|
|
65
|
+
filesystem?: {
|
|
66
|
+
read?: string[];
|
|
67
|
+
write?: string[];
|
|
68
|
+
reason?: string;
|
|
69
|
+
};
|
|
47
70
|
tools?: {
|
|
48
71
|
/** List of built-in tool names this plugin is permitted to override */
|
|
49
72
|
override?: string[];
|
|
50
73
|
/** List of built-in tool names this plugin is permitted to remove */
|
|
51
74
|
remove?: string[];
|
|
75
|
+
hooks?: boolean;
|
|
52
76
|
reason?: string;
|
|
53
77
|
};
|
|
78
|
+
[key: string]: any;
|
|
54
79
|
}
|
|
80
|
+
export type WeavetabManifestPermissions = WeavetabPermissions | string[];
|
|
55
81
|
export interface WeavetabManifestAuthor {
|
|
56
82
|
name: string;
|
|
57
83
|
role?: string;
|
|
58
84
|
avatar?: string;
|
|
59
85
|
url?: string;
|
|
86
|
+
email?: string;
|
|
60
87
|
}
|
|
61
88
|
export interface WeavetabManifestLinks {
|
|
62
89
|
github?: string;
|
|
@@ -65,10 +92,6 @@ export interface WeavetabManifestLinks {
|
|
|
65
92
|
issues?: string;
|
|
66
93
|
homepage?: string;
|
|
67
94
|
}
|
|
68
|
-
export interface WeavetabCompatibility {
|
|
69
|
-
weavetab?: string;
|
|
70
|
-
node?: string;
|
|
71
|
-
}
|
|
72
95
|
export interface WeavetabManifest {
|
|
73
96
|
/** Schema identifier */
|
|
74
97
|
$schema?: string;
|
|
@@ -78,13 +101,15 @@ export interface WeavetabManifest {
|
|
|
78
101
|
version: string;
|
|
79
102
|
/** Short summary of what this plugin provides */
|
|
80
103
|
description?: string;
|
|
104
|
+
/** Entry point file relative to the plugin root (e.g., 'dist/index.js') */
|
|
105
|
+
entry?: string;
|
|
81
106
|
/** Single author or multiple authors with roles */
|
|
82
107
|
author?: string | WeavetabManifestAuthor | (string | WeavetabManifestAuthor)[];
|
|
83
108
|
/** Array of authors */
|
|
84
109
|
authors?: (string | WeavetabManifestAuthor)[];
|
|
85
|
-
/** Path to plugin logo
|
|
110
|
+
/** Path to plugin logo */
|
|
86
111
|
logo?: string;
|
|
87
|
-
/** Path to plugin header banner
|
|
112
|
+
/** Path to plugin header banner */
|
|
88
113
|
banner?: string;
|
|
89
114
|
/** Path to README markdown file (default: "README.md") */
|
|
90
115
|
readme?: string;
|
|
@@ -92,43 +117,154 @@ export interface WeavetabManifest {
|
|
|
92
117
|
tags?: string[];
|
|
93
118
|
/** External links */
|
|
94
119
|
links?: WeavetabManifestLinks;
|
|
95
|
-
/**
|
|
96
|
-
|
|
120
|
+
/** Engine dependencies */
|
|
121
|
+
engines?: Record<string, string>;
|
|
122
|
+
/** Supported environments */
|
|
123
|
+
environments?: string[];
|
|
124
|
+
/** Whether the plugin should be lazy-loaded on demand */
|
|
125
|
+
lazy?: boolean;
|
|
97
126
|
/** Tools exposed by this plugin to the MCP server */
|
|
98
127
|
tools?: WeavetabManifestTool[];
|
|
128
|
+
/** Default configuration template */
|
|
129
|
+
defaultConfig?: Record<string, any>;
|
|
99
130
|
/** Required permissions with security rationale */
|
|
100
131
|
permissions?: WeavetabManifestPermissions;
|
|
101
132
|
/** Open source license */
|
|
102
133
|
license?: string;
|
|
134
|
+
[key: string]: any;
|
|
103
135
|
}
|
|
104
136
|
export interface WeavetabPluginTool<TArgs = any> {
|
|
105
137
|
name: string;
|
|
106
138
|
description: string;
|
|
107
139
|
schema?: Record<string, any> | Record<string, z.ZodType<any>>;
|
|
108
140
|
inputSchema?: Record<string, any>;
|
|
141
|
+
parameters?: Record<string, any>;
|
|
109
142
|
handler: (args: TArgs, session?: any, config?: any) => Promise<any>;
|
|
110
143
|
}
|
|
144
|
+
export interface DOMMutationDelta {
|
|
145
|
+
type?: "cdp_mutation" | "action_delta" | "page_update" | "dom_diff" | "rich_delta" | string;
|
|
146
|
+
timestamp?: number;
|
|
147
|
+
url?: string;
|
|
148
|
+
added?: Array<{
|
|
149
|
+
id?: string;
|
|
150
|
+
role?: string;
|
|
151
|
+
label?: string;
|
|
152
|
+
tag?: string;
|
|
153
|
+
text?: string;
|
|
154
|
+
backendNodeId?: number;
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
}>;
|
|
157
|
+
removed?: Array<string | {
|
|
158
|
+
backendNodeId?: number;
|
|
159
|
+
tag?: string;
|
|
160
|
+
text?: string;
|
|
161
|
+
[key: string]: any;
|
|
162
|
+
}>;
|
|
163
|
+
changed?: Array<{
|
|
164
|
+
ref?: string;
|
|
165
|
+
role?: string;
|
|
166
|
+
label?: string;
|
|
167
|
+
attribute?: string;
|
|
168
|
+
oldValue?: any;
|
|
169
|
+
newValue?: any;
|
|
170
|
+
changes?: Record<string, {
|
|
171
|
+
from: any;
|
|
172
|
+
to: any;
|
|
173
|
+
}>;
|
|
174
|
+
actionable?: boolean;
|
|
175
|
+
[key: string]: any;
|
|
176
|
+
}>;
|
|
177
|
+
significantChange?: boolean;
|
|
178
|
+
stable_count?: number;
|
|
179
|
+
iframes?: any[];
|
|
180
|
+
[key: string]: any;
|
|
181
|
+
}
|
|
182
|
+
export type BeforeActionHook = (tool: string, args: Record<string, any>, session?: any) => Promise<Record<string, any> | {
|
|
183
|
+
__blocked: boolean;
|
|
184
|
+
reason?: string;
|
|
185
|
+
} | void> | Record<string, any> | {
|
|
186
|
+
__blocked: boolean;
|
|
187
|
+
reason?: string;
|
|
188
|
+
} | void;
|
|
189
|
+
export type AfterActionHook = (tool: string, result: any, session?: any, args?: Record<string, any>) => Promise<any> | any;
|
|
190
|
+
export type DOMMutationHook = (delta: DOMMutationDelta, session?: any) => Promise<void> | void;
|
|
191
|
+
export interface PluginHooksContext {
|
|
192
|
+
onBeforeAction: (handler: BeforeActionHook) => void;
|
|
193
|
+
onAfterAction: (handler: AfterActionHook) => void;
|
|
194
|
+
onDOMMutation: (handler: DOMMutationHook) => void;
|
|
195
|
+
beforeToolCall: (handler: (toolName: string, args: Record<string, any>, session?: any) => Promise<any> | void) => void;
|
|
196
|
+
afterToolCall: (handler: (toolName: string, args: Record<string, any>, result: any, session?: any) => Promise<any> | void) => void;
|
|
197
|
+
onPageNavigate?: (handler: (url: string, session?: any) => Promise<void> | void) => void;
|
|
198
|
+
}
|
|
199
|
+
export interface PluginMcpContext {
|
|
200
|
+
registerTool: (tool: WeavetabPluginTool | any) => void;
|
|
201
|
+
overrideTool?: (toolName: string, overrideHandler: any) => void;
|
|
202
|
+
removeTool?: (toolName: string) => void;
|
|
203
|
+
unregisterTool?: (toolName: string) => void;
|
|
204
|
+
[key: string]: any;
|
|
205
|
+
}
|
|
206
|
+
export interface PluginMemoryContext {
|
|
207
|
+
getSiteProfile(origin: string): Promise<any>;
|
|
208
|
+
learnPattern(origin: string, name: string, pattern: any): Promise<any>;
|
|
209
|
+
recordExecution(origin: string, name: string, success: boolean, durationMs?: number): Promise<any>;
|
|
210
|
+
getReliability(origin: string, patternName: string): Promise<number>;
|
|
211
|
+
recordQuirk(origin: string, quirkKey: string, quirkData: any): Promise<void>;
|
|
212
|
+
}
|
|
213
|
+
export interface PluginContext {
|
|
214
|
+
name: string;
|
|
215
|
+
version?: string;
|
|
216
|
+
pluginDir: string;
|
|
217
|
+
config: Record<string, any>;
|
|
218
|
+
storage: IPluginStorage;
|
|
219
|
+
extension: IPluginExtensionBridge;
|
|
220
|
+
mcp: PluginMcpContext;
|
|
221
|
+
hooks: PluginHooksContext;
|
|
222
|
+
memory?: PluginMemoryContext;
|
|
223
|
+
logger: {
|
|
224
|
+
info: (...args: any[]) => void;
|
|
225
|
+
warn: (...args: any[]) => void;
|
|
226
|
+
error: (...args: any[]) => void;
|
|
227
|
+
debug: (...args: any[]) => void;
|
|
228
|
+
};
|
|
229
|
+
[key: string]: any;
|
|
230
|
+
}
|
|
111
231
|
export interface WeavetabPluginDefinition {
|
|
112
232
|
name: string;
|
|
113
|
-
version
|
|
233
|
+
version?: string;
|
|
114
234
|
description?: string;
|
|
115
235
|
tools?: WeavetabPluginTool[];
|
|
116
236
|
overrides?: WeavetabToolOverride[];
|
|
117
237
|
removeTools?: string[];
|
|
118
|
-
|
|
119
|
-
|
|
238
|
+
defaultConfig?: Record<string, any>;
|
|
239
|
+
onBeforeAction?: BeforeActionHook;
|
|
240
|
+
onAfterAction?: AfterActionHook;
|
|
241
|
+
onDOMMutation?: DOMMutationHook;
|
|
242
|
+
onLoad?: (ctx: PluginContext) => Promise<void> | void;
|
|
243
|
+
onUnload?: (ctx: PluginContext) => Promise<void> | void;
|
|
120
244
|
}
|
|
121
245
|
export interface WeavetabPlugin {
|
|
122
246
|
name: string;
|
|
123
247
|
version: string;
|
|
124
248
|
description?: string;
|
|
125
249
|
/** Add new tools */
|
|
126
|
-
tools?: WeavetabToolDefinition[];
|
|
250
|
+
tools?: WeavetabToolDefinition[] | WeavetabPluginTool[];
|
|
127
251
|
/** Override or wrap existing tools */
|
|
128
252
|
overrides?: WeavetabToolOverride[];
|
|
129
253
|
/** Built-in tools to remove or disable */
|
|
130
254
|
removeTools?: string[];
|
|
255
|
+
defaultConfig?: Record<string, any>;
|
|
131
256
|
manifest?: WeavetabManifest;
|
|
132
|
-
|
|
133
|
-
|
|
257
|
+
storage?: IPluginStorage;
|
|
258
|
+
extension?: IPluginExtensionBridge;
|
|
259
|
+
hooks?: {
|
|
260
|
+
beforeToolCall: Array<(toolName: string, args: Record<string, any>, session?: any) => Promise<any> | void>;
|
|
261
|
+
afterToolCall: Array<(toolName: string, args: Record<string, any>, result: any, session?: any) => Promise<any> | void>;
|
|
262
|
+
onDOMMutation: Array<DOMMutationHook>;
|
|
263
|
+
onPageNavigate: Array<(url: string, session?: any) => Promise<void> | void>;
|
|
264
|
+
};
|
|
265
|
+
onBeforeAction?: BeforeActionHook;
|
|
266
|
+
onAfterAction?: AfterActionHook;
|
|
267
|
+
onDOMMutation?: DOMMutationHook;
|
|
268
|
+
onLoad?: (ctx: PluginContext) => Promise<void> | void;
|
|
269
|
+
onUnload?: (ctx: PluginContext) => Promise<void> | void;
|
|
134
270
|
}
|
package/dist/plugin/loader.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { WeavetabPlugin, WeavetabManifest } from "./interface.js";
|
|
1
|
+
import type { WeavetabPlugin, WeavetabManifest, WeavetabPermissions, PluginContext } from "./interface.js";
|
|
2
|
+
import { PluginStorageManager } from "./storage.js";
|
|
3
|
+
import { PluginExtensionBridge } from "./extension_bridge.js";
|
|
2
4
|
export interface InstalledPluginInfo {
|
|
3
5
|
packageName: string;
|
|
4
6
|
dir: string;
|
|
@@ -6,6 +8,10 @@ export interface InstalledPluginInfo {
|
|
|
6
8
|
pkgJson?: Record<string, any>;
|
|
7
9
|
hasValidManifest: boolean;
|
|
8
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes permissions format across legacy arrays and object aliases (filesystem vs fs).
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizePermissions(perms?: any): WeavetabPermissions;
|
|
9
15
|
/**
|
|
10
16
|
* Reads the manifest (weavetab.json) and package.json for an installed package
|
|
11
17
|
* without executing its runtime code (safe for listing/inspection).
|
|
@@ -15,4 +21,16 @@ export declare function inspectInstalledPackage(pkgDir: string): InstalledPlugin
|
|
|
15
21
|
* Scan node_modules and return metadata for all installed Weavetab plugins.
|
|
16
22
|
*/
|
|
17
23
|
export declare function listInstalledPlugins(pluginDir?: string): InstalledPluginInfo[];
|
|
24
|
+
/**
|
|
25
|
+
* Builds the canonical rich PluginContext for a loaded plugin.
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildPluginContext(plugin: WeavetabPlugin, storageManager: PluginStorageManager, extensionBridge: PluginExtensionBridge, pluginConfig: Record<string, any>, hooks: {
|
|
28
|
+
beforeToolCall: Array<(toolName: string, args: Record<string, any>, session?: any) => Promise<any> | void>;
|
|
29
|
+
afterToolCall: Array<(toolName: string, args: Record<string, any>, result: any, session?: any) => Promise<any> | void>;
|
|
30
|
+
onPageNavigate: Array<(url: string, session?: any) => Promise<void> | void>;
|
|
31
|
+
}): PluginContext;
|
|
18
32
|
export declare function discoverPlugins(pluginDir?: string): WeavetabPlugin[];
|
|
33
|
+
/**
|
|
34
|
+
* Loads a specific plugin by name from node_modules.
|
|
35
|
+
*/
|
|
36
|
+
export declare function loadPluginByName(name: string, pluginDir?: string): WeavetabPlugin | null;
|