wu-framework 1.1.15 → 1.1.17
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/README.md +52 -20
- package/dist/wu-framework.cjs.js +1 -1
- package/dist/wu-framework.cjs.js.map +1 -1
- package/dist/wu-framework.dev.js +15511 -15146
- package/dist/wu-framework.dev.js.map +1 -1
- package/dist/wu-framework.esm.js +1 -1
- package/dist/wu-framework.esm.js.map +1 -1
- package/dist/wu-framework.umd.js +1 -1
- package/dist/wu-framework.umd.js.map +1 -1
- package/package.json +166 -161
- package/src/adapters/angular/ai.js +30 -30
- package/src/adapters/angular/index.d.ts +154 -154
- package/src/adapters/angular/index.js +932 -932
- package/src/adapters/angular.d.ts +3 -3
- package/src/adapters/angular.js +3 -3
- package/src/adapters/index.js +168 -168
- package/src/adapters/lit/ai.js +20 -20
- package/src/adapters/lit/index.d.ts +120 -120
- package/src/adapters/lit/index.js +721 -721
- package/src/adapters/lit.d.ts +3 -3
- package/src/adapters/lit.js +3 -3
- package/src/adapters/preact/ai.js +33 -33
- package/src/adapters/preact/index.d.ts +108 -108
- package/src/adapters/preact/index.js +661 -661
- package/src/adapters/preact.d.ts +3 -3
- package/src/adapters/preact.js +3 -3
- package/src/adapters/react/index.js +48 -54
- package/src/adapters/react.d.ts +3 -3
- package/src/adapters/react.js +3 -3
- package/src/adapters/shared.js +64 -64
- package/src/adapters/solid/ai.js +32 -32
- package/src/adapters/solid/index.d.ts +101 -101
- package/src/adapters/solid/index.js +586 -586
- package/src/adapters/solid.d.ts +3 -3
- package/src/adapters/solid.js +3 -3
- package/src/adapters/svelte/ai.js +31 -31
- package/src/adapters/svelte/index.d.ts +166 -166
- package/src/adapters/svelte/index.js +798 -798
- package/src/adapters/svelte.d.ts +3 -3
- package/src/adapters/svelte.js +3 -3
- package/src/adapters/vanilla/ai.js +30 -30
- package/src/adapters/vanilla/index.d.ts +179 -179
- package/src/adapters/vanilla/index.js +785 -785
- package/src/adapters/vanilla.d.ts +3 -3
- package/src/adapters/vanilla.js +3 -3
- package/src/adapters/vue/ai.js +52 -52
- package/src/adapters/vue/index.d.ts +299 -299
- package/src/adapters/vue/index.js +610 -610
- package/src/adapters/vue.d.ts +3 -3
- package/src/adapters/vue.js +3 -3
- package/src/ai/wu-ai-actions.js +261 -261
- package/src/ai/wu-ai-agent.js +546 -546
- package/src/ai/wu-ai-browser-primitives.js +354 -354
- package/src/ai/wu-ai-browser.js +380 -380
- package/src/ai/wu-ai-context.js +332 -332
- package/src/ai/wu-ai-conversation.js +613 -613
- package/src/ai/wu-ai-orchestrate.js +1021 -1021
- package/src/ai/wu-ai-permissions.js +381 -381
- package/src/ai/wu-ai-provider.js +700 -700
- package/src/ai/wu-ai-schema.js +225 -225
- package/src/ai/wu-ai-triggers.js +396 -396
- package/src/ai/wu-ai.js +804 -804
- package/src/core/wu-app.js +236 -236
- package/src/core/wu-cache.js +498 -477
- package/src/core/wu-core.js +1412 -1398
- package/src/core/wu-error-boundary.js +396 -382
- package/src/core/wu-event-bus.js +390 -348
- package/src/core/wu-hooks.js +350 -350
- package/src/core/wu-html-parser.js +199 -190
- package/src/core/wu-iframe-sandbox.js +328 -328
- package/src/core/wu-loader.js +385 -273
- package/src/core/wu-logger.js +142 -134
- package/src/core/wu-manifest.js +532 -509
- package/src/core/wu-mcp-bridge.js +432 -432
- package/src/core/wu-overrides.js +510 -510
- package/src/core/wu-performance.js +228 -228
- package/src/core/wu-plugin.js +401 -348
- package/src/core/wu-prefetch.js +414 -414
- package/src/core/wu-proxy-sandbox.js +477 -476
- package/src/core/wu-sandbox.js +779 -779
- package/src/core/wu-script-executor.js +161 -113
- package/src/core/wu-snapshot-sandbox.js +227 -227
- package/src/core/wu-store.js +13 -3
- package/src/core/wu-strategies.js +256 -256
- package/src/core/wu-style-bridge.js +477 -477
- package/src/index.d.ts +317 -0
- package/src/index.js +234 -224
- package/src/utils/dependency-resolver.js +327 -327
package/src/index.js
CHANGED
|
@@ -1,224 +1,234 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WU-FRAMEWORK: UNIVERSAL MICROFRONTENDS
|
|
3
|
-
*
|
|
4
|
-
* Framework agnostic microfrontends with Shadow DOM isolation.
|
|
5
|
-
* Supports React, Vue, Angular, Svelte, Solid, Preact, Lit, Vanilla.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import { wu, emit, on } from 'wu-framework';
|
|
9
|
-
*
|
|
10
|
-
* const canvas = wu.app('canvas', { url: 'http://localhost:5178', container: '#canvas' });
|
|
11
|
-
* await canvas.mount();
|
|
12
|
-
*
|
|
13
|
-
* emit('user:login', { userId: 123 });
|
|
14
|
-
* on('user:*', (e) => console.log(e.data));
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { WuCore } from './core/wu-core.js';
|
|
18
|
-
import { WuAI } from './ai/wu-ai.js';
|
|
19
|
-
|
|
20
|
-
// --- Singleton: reuse host instance if it exists ---
|
|
21
|
-
let wu;
|
|
22
|
-
|
|
23
|
-
if (typeof window !== 'undefined' && window.wu && window.wu._isWuFramework) {
|
|
24
|
-
wu = window.wu;
|
|
25
|
-
} else {
|
|
26
|
-
wu = new WuCore();
|
|
27
|
-
wu._isWuFramework = true;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (!wu.
|
|
45
|
-
wu.
|
|
46
|
-
wu.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
export {
|
|
122
|
-
export
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
export {
|
|
126
|
-
export {
|
|
127
|
-
export {
|
|
128
|
-
export {
|
|
129
|
-
export {
|
|
130
|
-
export {
|
|
131
|
-
export {
|
|
132
|
-
export {
|
|
133
|
-
export {
|
|
134
|
-
export {
|
|
135
|
-
export {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
} from './core/wu-
|
|
143
|
-
export {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
export const
|
|
160
|
-
export const
|
|
161
|
-
export const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
export const
|
|
166
|
-
export const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
export const
|
|
171
|
-
export const
|
|
172
|
-
export const
|
|
173
|
-
|
|
174
|
-
//
|
|
175
|
-
export const
|
|
176
|
-
export const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
export const
|
|
181
|
-
export const
|
|
182
|
-
export const
|
|
183
|
-
|
|
184
|
-
//
|
|
185
|
-
export const
|
|
186
|
-
export const
|
|
187
|
-
|
|
188
|
-
//
|
|
189
|
-
export
|
|
190
|
-
export
|
|
191
|
-
export
|
|
192
|
-
export
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
export
|
|
196
|
-
export
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
} from './ai/wu-ai-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
1
|
+
/**
|
|
2
|
+
* WU-FRAMEWORK: UNIVERSAL MICROFRONTENDS
|
|
3
|
+
*
|
|
4
|
+
* Framework agnostic microfrontends with Shadow DOM isolation.
|
|
5
|
+
* Supports React, Vue, Angular, Svelte, Solid, Preact, Lit, Vanilla.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { wu, emit, on } from 'wu-framework';
|
|
9
|
+
*
|
|
10
|
+
* const canvas = wu.app('canvas', { url: 'http://localhost:5178', container: '#canvas' });
|
|
11
|
+
* await canvas.mount();
|
|
12
|
+
*
|
|
13
|
+
* emit('user:login', { userId: 123 });
|
|
14
|
+
* on('user:*', (e) => console.log(e.data));
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { WuCore } from './core/wu-core.js';
|
|
18
|
+
import { WuAI } from './ai/wu-ai.js';
|
|
19
|
+
|
|
20
|
+
// --- Singleton: reuse host instance if it exists ---
|
|
21
|
+
let wu;
|
|
22
|
+
|
|
23
|
+
if (typeof window !== 'undefined' && window.wu && window.wu._isWuFramework) {
|
|
24
|
+
wu = window.wu;
|
|
25
|
+
} else {
|
|
26
|
+
wu = new WuCore();
|
|
27
|
+
wu._isWuFramework = true;
|
|
28
|
+
|
|
29
|
+
// Also store on a Symbol key for collision-safe access
|
|
30
|
+
if (typeof window !== 'undefined') {
|
|
31
|
+
const WU_KEY = Symbol.for('wu-framework');
|
|
32
|
+
window[WU_KEY] = wu;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Expose globally for microfrontends
|
|
37
|
+
if (typeof window !== 'undefined') {
|
|
38
|
+
// Warn if window.wu exists but is not a Wu Framework instance
|
|
39
|
+
if (window.wu && !window.wu._isWuFramework) {
|
|
40
|
+
console.warn('[Wu Framework] window.wu already exists and is not a Wu Framework instance. Overwriting. Use Symbol.for("wu-framework") for collision-safe access.');
|
|
41
|
+
}
|
|
42
|
+
window.wu = wu;
|
|
43
|
+
|
|
44
|
+
if (!wu.version) {
|
|
45
|
+
wu.version = '1.1.17';
|
|
46
|
+
wu.info = {
|
|
47
|
+
name: 'Wu Framework',
|
|
48
|
+
description: 'Universal Microfrontends',
|
|
49
|
+
features: ['Framework Agnostic', 'Zero Config', 'Shadow DOM Isolation', 'Runtime Loading']
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Event Bus shortcuts on window.wu
|
|
54
|
+
if (!wu.emit) {
|
|
55
|
+
wu.emit = (event, data, opts) => wu.eventBus.emit(event, data, opts);
|
|
56
|
+
wu.on = (event, cb) => wu.eventBus.on(event, cb);
|
|
57
|
+
wu.once = (event, cb) => wu.eventBus.once(event, cb);
|
|
58
|
+
wu.off = (event, cb) => wu.eventBus.off(event, cb);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Prefetch shortcuts on window.wu
|
|
62
|
+
if (!wu.prefetch) {
|
|
63
|
+
wu.prefetch = (appNames, opts) => wu.prefetcher.prefetch(appNames, opts);
|
|
64
|
+
wu.prefetchAll = (opts) => wu.prefetcher.prefetchAll(opts);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Override shortcuts on window.wu
|
|
68
|
+
if (!wu.override) {
|
|
69
|
+
wu.override = (name, url, opts) => wu.overrides.set(name, url, opts);
|
|
70
|
+
wu.removeOverride = (name) => wu.overrides.remove(name);
|
|
71
|
+
wu.getOverrides = () => wu.overrides.getAll();
|
|
72
|
+
wu.clearOverrides = () => wu.overrides.clearAll();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Log control: window.wu.silence() / window.wu.verbose()
|
|
76
|
+
if (!wu.silence) {
|
|
77
|
+
wu.silence = async () => { const { silenceAllLogs } = await import('./core/wu-logger.js'); silenceAllLogs(); };
|
|
78
|
+
wu.verbose = async () => { const { enableAllLogs } = await import('./core/wu-logger.js'); enableAllLogs(); };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// AI integration — lazy instantiated on first access
|
|
82
|
+
if (!wu.ai) {
|
|
83
|
+
let _aiInstance = null;
|
|
84
|
+
Object.defineProperty(wu, 'ai', {
|
|
85
|
+
get() {
|
|
86
|
+
if (!_aiInstance) {
|
|
87
|
+
_aiInstance = new WuAI({
|
|
88
|
+
eventBus: wu.eventBus,
|
|
89
|
+
store: wu.store,
|
|
90
|
+
core: wu,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return _aiInstance;
|
|
94
|
+
},
|
|
95
|
+
configurable: true,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// MCP bridge — connects to wu-mcp-server for AI agent control
|
|
100
|
+
if (!wu.mcp) {
|
|
101
|
+
let _mcpBridge = null;
|
|
102
|
+
wu.mcp = {
|
|
103
|
+
async connect(url = 'ws://localhost:19100', options = {}) {
|
|
104
|
+
if (!_mcpBridge) {
|
|
105
|
+
const { createMcpBridge } = await import('./core/wu-mcp-bridge.js');
|
|
106
|
+
_mcpBridge = createMcpBridge(wu);
|
|
107
|
+
}
|
|
108
|
+
_mcpBridge.connect(url, options);
|
|
109
|
+
},
|
|
110
|
+
disconnect() {
|
|
111
|
+
_mcpBridge?.disconnect();
|
|
112
|
+
},
|
|
113
|
+
isConnected() {
|
|
114
|
+
return _mcpBridge?.isConnected() || false;
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// --- Primary exports ---
|
|
121
|
+
export { wu };
|
|
122
|
+
export default wu;
|
|
123
|
+
|
|
124
|
+
// --- Core classes (advanced usage) ---
|
|
125
|
+
export { WuCore } from './core/wu-core.js';
|
|
126
|
+
export { WuLoader } from './core/wu-loader.js';
|
|
127
|
+
export { WuSandbox } from './core/wu-sandbox.js';
|
|
128
|
+
export { WuManifest } from './core/wu-manifest.js';
|
|
129
|
+
export { WuStore, default as store } from './core/wu-store.js';
|
|
130
|
+
export { WuApp } from './core/wu-app.js';
|
|
131
|
+
export { WuStyleBridge } from './core/wu-style-bridge.js';
|
|
132
|
+
export { WuCache } from './core/wu-cache.js';
|
|
133
|
+
export { WuEventBus } from './core/wu-event-bus.js';
|
|
134
|
+
export { WuPerformance } from './core/wu-performance.js';
|
|
135
|
+
export { WuProxySandbox } from './core/wu-proxy-sandbox.js';
|
|
136
|
+
export { WuSnapshotSandbox } from './core/wu-snapshot-sandbox.js';
|
|
137
|
+
export { WuHtmlParser } from './core/wu-html-parser.js';
|
|
138
|
+
export { WuScriptExecutor } from './core/wu-script-executor.js';
|
|
139
|
+
export { WuIframeSandbox } from './core/wu-iframe-sandbox.js';
|
|
140
|
+
export { WuPluginSystem, createPlugin } from './core/wu-plugin.js';
|
|
141
|
+
export { WuLoadingStrategy } from './core/wu-strategies.js';
|
|
142
|
+
export { WuPrefetch } from './core/wu-prefetch.js';
|
|
143
|
+
export { WuOverrides } from './core/wu-overrides.js';
|
|
144
|
+
export { WuErrorBoundary } from './core/wu-error-boundary.js';
|
|
145
|
+
export {
|
|
146
|
+
WuLifecycleHooks,
|
|
147
|
+
createSimpleHook,
|
|
148
|
+
createConditionalHook,
|
|
149
|
+
createGuardHook,
|
|
150
|
+
createTransformHook,
|
|
151
|
+
createTimedHook
|
|
152
|
+
} from './core/wu-hooks.js';
|
|
153
|
+
export { silenceAllLogs, enableAllLogs } from './core/wu-logger.js';
|
|
154
|
+
|
|
155
|
+
// --- Convenience API (most-used shortcuts) ---
|
|
156
|
+
export const init = (apps) => wu.init({ apps });
|
|
157
|
+
export const mount = (name, container) => wu.mount(name, container);
|
|
158
|
+
export const unmount = (name, opts) => wu.unmount(name, opts);
|
|
159
|
+
export const define = (name, lifecycle) => wu.define(name, lifecycle);
|
|
160
|
+
export const app = (name, config) => wu.app(name, config);
|
|
161
|
+
export const destroy = () => wu.destroy();
|
|
162
|
+
|
|
163
|
+
// Keep-alive
|
|
164
|
+
export const hide = (name) => wu.hide(name);
|
|
165
|
+
export const show = (name) => wu.show(name);
|
|
166
|
+
export const isHidden = (name) => wu.isHidden(name);
|
|
167
|
+
|
|
168
|
+
// Event Bus
|
|
169
|
+
export const emit = (event, data, opts) => wu.eventBus.emit(event, data, opts);
|
|
170
|
+
export const on = (event, cb) => wu.eventBus.on(event, cb);
|
|
171
|
+
export const once = (event, cb) => wu.eventBus.once(event, cb);
|
|
172
|
+
export const off = (event, cb) => wu.eventBus.off(event, cb);
|
|
173
|
+
|
|
174
|
+
// Store
|
|
175
|
+
export const getState = (path) => wu.store.get(path);
|
|
176
|
+
export const setState = (path, value) => wu.store.set(path, value);
|
|
177
|
+
export const onStateChange = (pattern, cb) => wu.store.on(pattern, cb);
|
|
178
|
+
|
|
179
|
+
// Performance
|
|
180
|
+
export const startMeasure = (name, app) => wu.performance.startMeasure(name, app);
|
|
181
|
+
export const endMeasure = (name, app) => wu.performance.endMeasure(name, app);
|
|
182
|
+
export const generatePerformanceReport = () => wu.performance.generateReport();
|
|
183
|
+
|
|
184
|
+
// Prefetch
|
|
185
|
+
export const prefetch = (appNames, opts) => wu.prefetch(appNames, opts);
|
|
186
|
+
export const prefetchAll = (opts) => wu.prefetchAll(opts);
|
|
187
|
+
|
|
188
|
+
// Overrides (QA/testing)
|
|
189
|
+
export const override = (name, url, opts) => wu.override(name, url, opts);
|
|
190
|
+
export const removeOverride = (name) => wu.removeOverride(name);
|
|
191
|
+
export const getOverrides = () => wu.getOverrides();
|
|
192
|
+
export const clearOverrides = () => wu.clearOverrides();
|
|
193
|
+
|
|
194
|
+
// Plugins & Hooks
|
|
195
|
+
export const usePlugin = (plugin, opts) => wu.pluginSystem.use(plugin, opts);
|
|
196
|
+
export const useHook = (phase, middleware, opts) => wu.hooks.use(phase, middleware, opts);
|
|
197
|
+
|
|
198
|
+
// --- AI classes (advanced usage) ---
|
|
199
|
+
export { WuAI } from './ai/wu-ai.js';
|
|
200
|
+
export { WuAIProvider } from './ai/wu-ai-provider.js';
|
|
201
|
+
export { WuAIPermissions } from './ai/wu-ai-permissions.js';
|
|
202
|
+
export { WuAIContext } from './ai/wu-ai-context.js';
|
|
203
|
+
export { WuAIActions } from './ai/wu-ai-actions.js';
|
|
204
|
+
export { WuAIConversation } from './ai/wu-ai-conversation.js';
|
|
205
|
+
export { WuAITriggers } from './ai/wu-ai-triggers.js';
|
|
206
|
+
export { WuAIAgent } from './ai/wu-ai-agent.js';
|
|
207
|
+
export { WuAIOrchestrate } from './ai/wu-ai-orchestrate.js';
|
|
208
|
+
export {
|
|
209
|
+
sanitizeForPrompt,
|
|
210
|
+
redactSensitive,
|
|
211
|
+
interpolate,
|
|
212
|
+
buildToolSchemas,
|
|
213
|
+
normalizeParameters,
|
|
214
|
+
validateParams,
|
|
215
|
+
estimateTokens,
|
|
216
|
+
truncateToTokenBudget,
|
|
217
|
+
} from './ai/wu-ai-schema.js';
|
|
218
|
+
|
|
219
|
+
// --- MCP Bridge (browser-side connection to wu-mcp-server) ---
|
|
220
|
+
export { createMcpBridge } from './core/wu-mcp-bridge.js';
|
|
221
|
+
|
|
222
|
+
// --- AI Browser Actions (autonomous agent control) ---
|
|
223
|
+
export { registerBrowserActions } from './ai/wu-ai-browser.js';
|
|
224
|
+
|
|
225
|
+
// --- AI Browser Primitives (shared browser automation functions) ---
|
|
226
|
+
export {
|
|
227
|
+
ensureInterceptors,
|
|
228
|
+
captureScreenshot,
|
|
229
|
+
buildA11yTree,
|
|
230
|
+
clickElement,
|
|
231
|
+
typeIntoElement,
|
|
232
|
+
getFilteredNetwork,
|
|
233
|
+
getFilteredConsole,
|
|
234
|
+
} from './ai/wu-ai-browser-primitives.js';
|