@decido/shell 4.0.1 → 4.0.3
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/CenterComposite-RPEGBKQU.mjs +1697 -0
- package/dist/DebugPanel-KEKDMHDN.mjs +14 -0
- package/dist/MorphShell-FKDBB7E5.mjs +14 -0
- package/dist/PlaygroundAppSidebar-ALYJJGAO.mjs +9 -0
- package/dist/PlaygroundChat-MI2KXMK6.mjs +15 -0
- package/dist/PlaygroundTerminal-5AV4BJAI.mjs +7 -0
- package/dist/PluginSandbox-WMNAUQOJ.mjs +188 -0
- package/dist/ReactFlowEditor-RTF2652X.mjs +3574 -0
- package/dist/ReactFlowEditor-ZW5MCN5Y.css +561 -0
- package/dist/TimelineEditor-N4HRMHTB.mjs +226 -0
- package/dist/WidgetSlotPanel-KJI4CHHD.mjs +11 -0
- package/dist/chunk-2YMI4N5I.mjs +2004 -0
- package/dist/chunk-3BZX7LF2.mjs +139 -0
- package/dist/chunk-3P4P3M54.mjs +136 -0
- package/dist/chunk-F3OTFHNO.mjs +40 -0
- package/dist/chunk-IMHORBTL.mjs +48 -0
- package/dist/chunk-JF5QSJYT.mjs +295 -0
- package/dist/chunk-LWMMFTJC.mjs +382 -0
- package/dist/chunk-MSVEFEXE.mjs +179 -0
- package/dist/chunk-OCHGY2MN.mjs +1662 -0
- package/dist/chunk-PMYAM764.mjs +813 -0
- package/dist/chunk-Q64KZXPK.mjs +43 -0
- package/dist/chunk-QHQW2HMU.mjs +155 -0
- package/dist/chunk-RWZ4BOIN.mjs +385 -0
- package/dist/chunk-UHT6FIYF.mjs +195 -0
- package/dist/chunk-UJCSKKID.mjs +30 -0
- package/dist/chunk-V3CYNPGL.mjs +8758 -0
- package/dist/chunk-VBPGEFNM.mjs +2381 -0
- package/dist/chunk-XMSU6UWD.mjs +158 -0
- package/dist/chunk-ZCCCBHE6.mjs +55 -0
- package/dist/index.css +561 -0
- package/dist/index.js +65130 -0
- package/dist/index.mjs +40248 -0
- package/dist/useIntentLens-LEQCAXCK.mjs +13 -0
- package/dist/useSuggestionsStore-4L2AIZ2D.mjs +7 -0
- package/dist/wasm-QFXGEYGP.mjs +81 -0
- package/package.json +27 -22
- package/src/index.ts +0 -97
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
INTENT_PATTERNS,
|
|
3
|
+
getIntentPatterns,
|
|
4
|
+
registerIntentPattern,
|
|
5
|
+
useIntentLens
|
|
6
|
+
} from "./chunk-QHQW2HMU.mjs";
|
|
7
|
+
import "./chunk-UJCSKKID.mjs";
|
|
8
|
+
export {
|
|
9
|
+
INTENT_PATTERNS,
|
|
10
|
+
getIntentPatterns,
|
|
11
|
+
registerIntentPattern,
|
|
12
|
+
useIntentLens
|
|
13
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "./chunk-UJCSKKID.mjs";
|
|
2
|
+
|
|
3
|
+
// ../sdk/src/wasm.ts
|
|
4
|
+
import { useEffect, useState, useCallback, useRef } from "react";
|
|
5
|
+
var tauriInvoke = null;
|
|
6
|
+
async function getInvoke() {
|
|
7
|
+
if (!tauriInvoke) {
|
|
8
|
+
try {
|
|
9
|
+
const mod = await import("@tauri-apps/api/core");
|
|
10
|
+
tauriInvoke = mod.invoke;
|
|
11
|
+
} catch {
|
|
12
|
+
throw new Error(
|
|
13
|
+
"[WASM Bridge] @tauri-apps/api not available. WASM plugins are only supported in the desktop app."
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return tauriInvoke;
|
|
18
|
+
}
|
|
19
|
+
async function runWasmPlugin(name, fn = "run") {
|
|
20
|
+
const invoke = await getInvoke();
|
|
21
|
+
return invoke("run_wasm_plugin", { name, function: fn });
|
|
22
|
+
}
|
|
23
|
+
async function checkWasmPermission(pluginName, permission) {
|
|
24
|
+
const invoke = await getInvoke();
|
|
25
|
+
return invoke("check_plugin_permission", {
|
|
26
|
+
pluginName,
|
|
27
|
+
permission
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async function getWasmManifest(name) {
|
|
31
|
+
const invoke = await getInvoke();
|
|
32
|
+
return invoke("get_wasm_manifest", { name });
|
|
33
|
+
}
|
|
34
|
+
async function onWasmPluginEvent(callback) {
|
|
35
|
+
try {
|
|
36
|
+
const { listen } = await import("@tauri-apps/api/event");
|
|
37
|
+
const unlisten = await listen("wasm-plugin-event", (e) => {
|
|
38
|
+
callback(e.payload);
|
|
39
|
+
});
|
|
40
|
+
return unlisten;
|
|
41
|
+
} catch {
|
|
42
|
+
console.warn("[WASM Bridge] Event listener not available outside Tauri desktop.");
|
|
43
|
+
return () => {
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function useWasmPluginEvents(maxHistory = 50) {
|
|
48
|
+
const [events, setEvents] = useState([]);
|
|
49
|
+
const [lastEvent, setLastEvent] = useState(null);
|
|
50
|
+
const unlistenRef = useRef(null);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
let cancelled = false;
|
|
53
|
+
onWasmPluginEvent((event) => {
|
|
54
|
+
if (cancelled) return;
|
|
55
|
+
setLastEvent(event);
|
|
56
|
+
setEvents((prev) => [...prev.slice(-(maxHistory - 1)), event]);
|
|
57
|
+
}).then((unlisten) => {
|
|
58
|
+
if (cancelled) {
|
|
59
|
+
unlisten();
|
|
60
|
+
} else {
|
|
61
|
+
unlistenRef.current = unlisten;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return () => {
|
|
65
|
+
cancelled = true;
|
|
66
|
+
unlistenRef.current?.();
|
|
67
|
+
};
|
|
68
|
+
}, [maxHistory]);
|
|
69
|
+
const clear = useCallback(() => {
|
|
70
|
+
setEvents([]);
|
|
71
|
+
setLastEvent(null);
|
|
72
|
+
}, []);
|
|
73
|
+
return { events, lastEvent, clear };
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
checkWasmPermission,
|
|
77
|
+
getWasmManifest,
|
|
78
|
+
onWasmPluginEvent,
|
|
79
|
+
runWasmPlugin,
|
|
80
|
+
useWasmPluginEvents
|
|
81
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decido/shell",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Decido OS Shell — Main facade: UI composition, morphology, auth, overlays, adapters",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"development": "./src/index.ts",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
}
|
|
9
15
|
},
|
|
10
16
|
"dependencies": {
|
|
11
17
|
"@noble/curves": "^2.0.1",
|
|
@@ -19,8 +25,6 @@
|
|
|
19
25
|
"idb-keyval": "^6.2.1",
|
|
20
26
|
"lucide-react": "^0.370.0",
|
|
21
27
|
"motion": "^11.16.1",
|
|
22
|
-
"react": "^18.3.1",
|
|
23
|
-
"react-dom": "^18.3.1",
|
|
24
28
|
"react-resizable-panels": "^4.7.2",
|
|
25
29
|
"recharts": "^3.7.0",
|
|
26
30
|
"socket.io-client": "^4.8.3",
|
|
@@ -28,19 +32,19 @@
|
|
|
28
32
|
"y-websocket": "^1.5.4",
|
|
29
33
|
"yjs": "^13.6.29",
|
|
30
34
|
"zustand": "^4.5.2",
|
|
31
|
-
"@decido/canvas-core": "4.0.
|
|
32
|
-
"@decido/chat": "4.0.
|
|
33
|
-
"@decido/
|
|
34
|
-
"@decido/
|
|
35
|
-
"@decido/core": "4.0.
|
|
36
|
-
"@decido/
|
|
37
|
-
"@decido/
|
|
38
|
-
"@decido/
|
|
39
|
-
"@decido/shell-
|
|
40
|
-
"@decido/
|
|
41
|
-
"@decido/
|
|
42
|
-
"@decido/
|
|
43
|
-
"@decido/
|
|
35
|
+
"@decido/canvas-core": "4.0.3",
|
|
36
|
+
"@decido/chat": "4.0.3",
|
|
37
|
+
"@decido/logger": "^4.0.3",
|
|
38
|
+
"@decido/commands": "4.0.3",
|
|
39
|
+
"@decido/core": "4.0.3",
|
|
40
|
+
"@decido/plugin-engine": "4.0.3",
|
|
41
|
+
"@decido/sdk": "4.0.3",
|
|
42
|
+
"@decido/sentinel-browser": "4.0.3",
|
|
43
|
+
"@decido/shell-auth": "4.0.3",
|
|
44
|
+
"@decido/shell-telemetry": "4.0.3",
|
|
45
|
+
"@decido/engine": "4.0.3",
|
|
46
|
+
"@decido/kernel-bridge": "4.0.3",
|
|
47
|
+
"@decido/macia-core": "4.0.3"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"@types/react": "^18.2.0",
|
|
@@ -51,8 +55,8 @@
|
|
|
51
55
|
"typescript": "^5.0.0"
|
|
52
56
|
},
|
|
53
57
|
"peerDependencies": {
|
|
54
|
-
"react": "^18.
|
|
55
|
-
"react-dom": "^18.
|
|
58
|
+
"react": "^18.3.1",
|
|
59
|
+
"react-dom": "^18.3.1"
|
|
56
60
|
},
|
|
57
61
|
"publishConfig": {
|
|
58
62
|
"access": "public"
|
|
@@ -61,8 +65,9 @@
|
|
|
61
65
|
"files": [
|
|
62
66
|
"dist"
|
|
63
67
|
],
|
|
68
|
+
"module": "./dist/index.mjs",
|
|
64
69
|
"scripts": {
|
|
65
70
|
"lint": "eslint \"src/**/*.ts*\"",
|
|
66
|
-
"build": "tsup src/index.ts --format esm
|
|
71
|
+
"build": "tsup src/index.ts --format esm,cjs"
|
|
67
72
|
}
|
|
68
73
|
}
|
package/src/index.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ═══════════════════════════════════════════════════════════════
|
|
3
|
-
* @decido/shell — Decido OS Shell
|
|
4
|
-
* ─────────────────────────────────────────────────────────────
|
|
5
|
-
* Architecture:
|
|
6
|
-
* @decido/sdk → contracts (IShellAdapter, WidgetRegistry)
|
|
7
|
-
* @decido/engine → runtime (blueprints, AI director, router)
|
|
8
|
-
* @decido/shell → THIS PACKAGE: OS-level composition layer
|
|
9
|
-
*
|
|
10
|
-
* Exports are split into two categories:
|
|
11
|
-
* 1. CORE — infrastructure that EVERY host must consume
|
|
12
|
-
* 2. PLUGINS — feature UI that hosts MAY opt-in to
|
|
13
|
-
* ═══════════════════════════════════════════════════════════════
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
// ── 1. CORE: Stores & Contexts ─────────────────────────────────────────
|
|
17
|
-
export * from './contexts/NetworkProvider'; // from migrated studio/lib
|
|
18
|
-
export * from './store/engine'; // useShellStore (layout, plugins, workspaces)
|
|
19
|
-
export * from "@decido/shell-auth"; // useAuthStore
|
|
20
|
-
export * from '@decido/plugin-engine'; // usePluginStore
|
|
21
|
-
export * from './store/McpStore'; // useMcpStore
|
|
22
|
-
export * from './store/UpdaterStore';
|
|
23
|
-
|
|
24
|
-
// ── 2. CORE: Runtime ─────────────────────────────────────────
|
|
25
|
-
export * from './core/PluginContext';
|
|
26
|
-
export * from './core/EventBus';
|
|
27
|
-
export * from './core/AIDirector';
|
|
28
|
-
|
|
29
|
-
// ── 4. CORE: Layout Primitives ───────────────────────────────
|
|
30
|
-
export * from './components/PanelSplitter';
|
|
31
|
-
export * from './components/TransientLayer';
|
|
32
|
-
export * from './components/SafeLiquidUI';
|
|
33
|
-
export * from './components/PluginErrorBoundary';
|
|
34
|
-
|
|
35
|
-
// ── 5. CORE: Hooks ───────────────────────────────────────────
|
|
36
|
-
export * from './hooks/useKeyboardShortcuts';
|
|
37
|
-
export * from './hooks/usePluginEngine';
|
|
38
|
-
export * from './hooks/useSystemBoot';
|
|
39
|
-
export * from './hooks/useAutoUpdater';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// ── 6. CORE: Bridge ──────────────────────────────────────────
|
|
43
|
-
export { initBridgeAgent, registerStore } from './bridge/BridgeAgent';
|
|
44
|
-
|
|
45
|
-
// ── 7. PLUGINS: Feature UI (Extraídos a @decido/shell-features) ─────────
|
|
46
|
-
// Estos componentes ahora viven en @decido/shell-features
|
|
47
|
-
// y son importados y montados por HostOverlays (desktop-host).
|
|
48
|
-
export * from './components/widgets/MarketplaceWidget';
|
|
49
|
-
export * from './components/widgets/OpsDashboard';
|
|
50
|
-
export * from './components/widgets/McpToolsWidget';
|
|
51
|
-
|
|
52
|
-
// ── 8. PLUGINS: Session Recorder (moved to @decido/shell-telemetry) ─────────
|
|
53
|
-
|
|
54
|
-
// ── Re-exports from @decido/ui-kit for backward compat ──────
|
|
55
|
-
// DecidoIcon and JsonTreeEditor moved to @decido/ui-kit
|
|
56
|
-
|
|
57
|
-
// ── 9. MIGRATED FROM STUDIO ─────────────────────────────────
|
|
58
|
-
export { default as DecidoShell } from './components/shells/DecidoShell';
|
|
59
|
-
export { default as DecidoPlayer } from './DecidoPlayer';
|
|
60
|
-
export { default as AgentPlayer } from './AgentPlayer';
|
|
61
|
-
|
|
62
|
-
// Streaming Hook
|
|
63
|
-
export { useGeminiStream } from './hooks/useGeminiStream';
|
|
64
|
-
|
|
65
|
-
// Store & Config
|
|
66
|
-
export * from './store/useMorphologyStore';
|
|
67
|
-
export * from './store/usePlaygroundStore';
|
|
68
|
-
export {
|
|
69
|
-
type BuiltInShellType, type ShellType, type ShellProps, type MorphArtifact, type ShellMeta,
|
|
70
|
-
registerShell, resolveShell, isShellRegistered, getRegisteredShellTypes, getShellMeta,
|
|
71
|
-
registerMorphComponentCompat, getMorphComponentCompat
|
|
72
|
-
} from './store/useShellRegistry';
|
|
73
|
-
export * from './store/useMorphInstanceStore';
|
|
74
|
-
export * from './store/useUIComponentStore';
|
|
75
|
-
export * from './store/useLayoutStore';
|
|
76
|
-
export * from './store/useDebugPanelStore';
|
|
77
|
-
export * from './store/useThemeStore';
|
|
78
|
-
export { resolveIcon, resolveColor, resolveColorClasses } from './config/IconRegistry';
|
|
79
|
-
|
|
80
|
-
// Hooks
|
|
81
|
-
export { bridgeToMorph, detectShellType } from './hooks/morphBridge';
|
|
82
|
-
export { useShellKeyboard } from './hooks/useShellKeyboard';
|
|
83
|
-
export { useIntentLens } from './hooks/useIntentLens';
|
|
84
|
-
export type { IntentType, IntentToken, DetectedIntent } from './hooks/useIntentLens';
|
|
85
|
-
|
|
86
|
-
// UI Components
|
|
87
|
-
export { AppShell } from './components/shell/AppShell';
|
|
88
|
-
export { MorphShell } from './components/shell/MorphShell';
|
|
89
|
-
export { LayoutGrid } from './components/shell/LayoutGrid';
|
|
90
|
-
export { AppHeader } from './components/shell/AppHeader';
|
|
91
|
-
export { TabBar } from './components/shell/TabBar';
|
|
92
|
-
export { GlobalOverlays } from './components/shell/GlobalOverlays';
|
|
93
|
-
export { LayoutConfigurator } from './components/shell/LayoutConfigurator';
|
|
94
|
-
export { SlotRenderer, registerSlotComponent, getAvailableSlotComponents } from './components/shell/SlotRenderer';
|
|
95
|
-
export { ArtifactBar } from './components/shell/ArtifactBar';
|
|
96
|
-
export { DebugPanel } from './components/playground/DebugPanel';
|
|
97
|
-
export * from './types/DecidoStoryDefinition';
|