wu-framework 1.1.14 → 1.1.16

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