machinaos 0.0.1 → 0.0.7
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/.env.template +71 -71
- package/LICENSE +21 -21
- package/README.md +163 -87
- package/bin/cli.js +62 -106
- package/client/.dockerignore +45 -45
- package/client/Dockerfile +68 -68
- package/client/dist/assets/index-DFSC53FP.css +1 -0
- package/client/dist/assets/index-fJ-1gTf5.js +613 -0
- package/client/dist/index.html +14 -0
- package/client/eslint.config.js +34 -16
- package/client/nginx.conf +66 -66
- package/client/package.json +61 -48
- package/client/src/App.tsx +27 -27
- package/client/src/Dashboard.tsx +1200 -1172
- package/client/src/ParameterPanel.tsx +302 -300
- package/client/src/components/AIAgentNode.tsx +315 -321
- package/client/src/components/APIKeyValidator.tsx +117 -117
- package/client/src/components/ClaudeChatModelNode.tsx +17 -17
- package/client/src/components/CredentialsModal.tsx +1200 -306
- package/client/src/components/GeminiChatModelNode.tsx +17 -17
- package/client/src/components/GenericNode.tsx +356 -356
- package/client/src/components/LocationParameterPanel.tsx +153 -153
- package/client/src/components/ModelNode.tsx +285 -285
- package/client/src/components/OpenAIChatModelNode.tsx +17 -17
- package/client/src/components/OutputPanel.tsx +470 -470
- package/client/src/components/ParameterRenderer.tsx +1873 -1873
- package/client/src/components/SkillEditorModal.tsx +3 -3
- package/client/src/components/SquareNode.tsx +812 -796
- package/client/src/components/ToolkitNode.tsx +365 -365
- package/client/src/components/auth/LoginPage.tsx +247 -247
- package/client/src/components/auth/ProtectedRoute.tsx +59 -59
- package/client/src/components/base/BaseChatModelNode.tsx +270 -270
- package/client/src/components/icons/AIProviderIcons.tsx +50 -50
- package/client/src/components/maps/GoogleMapsPicker.tsx +136 -136
- package/client/src/components/maps/MapsPreviewPanel.tsx +109 -109
- package/client/src/components/maps/index.ts +25 -25
- package/client/src/components/parameterPanel/InputSection.tsx +1094 -1094
- package/client/src/components/parameterPanel/LocationPanelLayout.tsx +64 -64
- package/client/src/components/parameterPanel/MapsSection.tsx +91 -91
- package/client/src/components/parameterPanel/MiddleSection.tsx +867 -571
- package/client/src/components/parameterPanel/OutputSection.tsx +80 -80
- package/client/src/components/parameterPanel/ParameterPanelLayout.tsx +81 -81
- package/client/src/components/parameterPanel/ToolSchemaEditor.tsx +436 -436
- package/client/src/components/parameterPanel/index.ts +41 -41
- package/client/src/components/shared/DataPanel.tsx +142 -142
- package/client/src/components/shared/JSONTreeRenderer.tsx +105 -105
- package/client/src/components/ui/AIResultModal.tsx +203 -203
- package/client/src/components/ui/ApiKeyInput.tsx +93 -0
- package/client/src/components/ui/CodeEditor.tsx +81 -81
- package/client/src/components/ui/CollapsibleSection.tsx +87 -87
- package/client/src/components/ui/ComponentItem.tsx +153 -153
- package/client/src/components/ui/ComponentPalette.tsx +320 -320
- package/client/src/components/ui/ConsolePanel.tsx +151 -43
- package/client/src/components/ui/ErrorBoundary.tsx +195 -195
- package/client/src/components/ui/InputNodesPanel.tsx +203 -203
- package/client/src/components/ui/MapSelector.tsx +313 -313
- package/client/src/components/ui/Modal.tsx +151 -148
- package/client/src/components/ui/NodeOutputPanel.tsx +1150 -1150
- package/client/src/components/ui/OutputDisplayPanel.tsx +381 -381
- package/client/src/components/ui/QRCodeDisplay.tsx +182 -0
- package/client/src/components/ui/TopToolbar.tsx +736 -736
- package/client/src/components/ui/WorkflowSidebar.tsx +293 -293
- package/client/src/config/antdTheme.ts +186 -186
- package/client/src/contexts/AuthContext.tsx +221 -221
- package/client/src/contexts/ThemeContext.tsx +42 -42
- package/client/src/contexts/WebSocketContext.tsx +2144 -1971
- package/client/src/factories/baseChatModelFactory.ts +255 -255
- package/client/src/hooks/useAndroidOperations.ts +118 -164
- package/client/src/hooks/useApiKeyValidation.ts +106 -106
- package/client/src/hooks/useApiKeys.ts +238 -238
- package/client/src/hooks/useAppTheme.ts +17 -17
- package/client/src/hooks/useComponentPalette.ts +50 -50
- package/client/src/hooks/useDragAndDrop.ts +123 -123
- package/client/src/hooks/useDragVariable.ts +88 -88
- package/client/src/hooks/useExecution.ts +319 -313
- package/client/src/hooks/useParameterPanel.ts +176 -176
- package/client/src/hooks/useReactFlowNodes.ts +188 -188
- package/client/src/hooks/useToolSchema.ts +209 -209
- package/client/src/hooks/useWhatsApp.ts +196 -196
- package/client/src/hooks/useWorkflowManagement.ts +45 -45
- package/client/src/index.css +314 -314
- package/client/src/nodeDefinitions/aiAgentNodes.ts +335 -335
- package/client/src/nodeDefinitions/aiModelNodes.ts +340 -340
- package/client/src/nodeDefinitions/androidServiceNodes.ts +383 -383
- package/client/src/nodeDefinitions/chatNodes.ts +135 -135
- package/client/src/nodeDefinitions/codeNodes.ts +54 -54
- package/client/src/nodeDefinitions/index.ts +14 -14
- package/client/src/nodeDefinitions/locationNodes.ts +462 -462
- package/client/src/nodeDefinitions/schedulerNodes.ts +220 -220
- package/client/src/nodeDefinitions/skillNodes.ts +17 -5
- package/client/src/nodeDefinitions/utilityNodes.ts +284 -284
- package/client/src/nodeDefinitions/whatsappNodes.ts +821 -865
- package/client/src/nodeDefinitions.ts +101 -103
- package/client/src/services/dynamicParameterService.ts +95 -95
- package/client/src/services/execution/aiAgentExecutionService.ts +34 -34
- package/client/src/services/executionService.ts +227 -231
- package/client/src/services/workflowApi.ts +91 -91
- package/client/src/store/useAppStore.ts +578 -581
- package/client/src/styles/theme.ts +513 -508
- package/client/src/styles/zIndex.ts +16 -16
- package/client/src/types/ComponentTypes.ts +38 -38
- package/client/src/types/INodeProperties.ts +287 -287
- package/client/src/types/NodeTypes.ts +27 -27
- package/client/src/utils/formatters.ts +32 -32
- package/client/src/utils/googleMapsLoader.ts +139 -139
- package/client/src/utils/locationUtils.ts +84 -84
- package/client/src/utils/nodeUtils.ts +30 -30
- package/client/src/utils/workflow.ts +29 -29
- package/client/src/vite-env.d.ts +12 -12
- package/client/tailwind.config.js +59 -59
- package/client/tsconfig.json +25 -25
- package/client/vite.config.js +35 -35
- package/install.ps1 +308 -0
- package/install.sh +343 -0
- package/package.json +81 -70
- package/scripts/build.js +174 -51
- package/scripts/clean.js +40 -40
- package/scripts/start.js +234 -210
- package/scripts/stop.js +301 -325
- package/server/.dockerignore +44 -44
- package/server/Dockerfile +45 -45
- package/server/constants.py +244 -249
- package/server/core/cache.py +460 -460
- package/server/core/config.py +127 -127
- package/server/core/container.py +98 -98
- package/server/core/database.py +1296 -1210
- package/server/core/logging.py +313 -313
- package/server/main.py +288 -288
- package/server/middleware/__init__.py +5 -5
- package/server/middleware/auth.py +89 -89
- package/server/models/auth.py +52 -52
- package/server/models/cache.py +24 -24
- package/server/models/database.py +235 -210
- package/server/models/nodes.py +435 -455
- package/server/pyproject.toml +75 -72
- package/server/requirements.txt +83 -83
- package/server/routers/android.py +294 -294
- package/server/routers/auth.py +203 -203
- package/server/routers/database.py +150 -150
- package/server/routers/maps.py +141 -141
- package/server/routers/nodejs_compat.py +288 -288
- package/server/routers/webhook.py +90 -90
- package/server/routers/websocket.py +2239 -2127
- package/server/routers/whatsapp.py +761 -761
- package/server/routers/workflow.py +199 -199
- package/server/services/ai.py +2444 -2414
- package/server/services/android_service.py +588 -588
- package/server/services/auth.py +130 -130
- package/server/services/chat_client.py +160 -160
- package/server/services/deployment/manager.py +706 -706
- package/server/services/event_waiter.py +675 -785
- package/server/services/execution/executor.py +1351 -1351
- package/server/services/execution/models.py +1 -1
- package/server/services/handlers/__init__.py +122 -126
- package/server/services/handlers/ai.py +390 -355
- package/server/services/handlers/android.py +69 -260
- package/server/services/handlers/code.py +278 -278
- package/server/services/handlers/http.py +193 -193
- package/server/services/handlers/tools.py +146 -32
- package/server/services/handlers/triggers.py +107 -107
- package/server/services/handlers/utility.py +822 -822
- package/server/services/handlers/whatsapp.py +423 -476
- package/server/services/maps.py +288 -288
- package/server/services/memory_store.py +103 -103
- package/server/services/node_executor.py +372 -375
- package/server/services/scheduler.py +155 -155
- package/server/services/skill_loader.py +1 -1
- package/server/services/status_broadcaster.py +834 -826
- package/server/services/temporal/__init__.py +23 -23
- package/server/services/temporal/activities.py +344 -344
- package/server/services/temporal/client.py +76 -76
- package/server/services/temporal/executor.py +147 -147
- package/server/services/temporal/worker.py +251 -251
- package/server/services/temporal/workflow.py +355 -355
- package/server/services/temporal/ws_client.py +236 -236
- package/server/services/text.py +110 -110
- package/server/services/user_auth.py +172 -172
- package/server/services/websocket_client.py +29 -29
- package/server/services/workflow.py +597 -597
- package/server/skills/android-skill/SKILL.md +4 -4
- package/server/skills/code-skill/SKILL.md +123 -89
- package/server/skills/maps-skill/SKILL.md +3 -3
- package/server/skills/memory-skill/SKILL.md +1 -1
- package/server/skills/web-search-skill/SKILL.md +154 -0
- package/server/skills/whatsapp-skill/SKILL.md +3 -3
- package/server/uv.lock +461 -100
- package/server/whatsapp-rpc/.dockerignore +30 -30
- package/server/whatsapp-rpc/Dockerfile +44 -44
- package/server/whatsapp-rpc/Dockerfile.web +17 -17
- package/server/whatsapp-rpc/README.md +139 -139
- package/server/whatsapp-rpc/bin/whatsapp-rpc-server +0 -0
- package/server/whatsapp-rpc/cli.js +95 -95
- package/server/whatsapp-rpc/configs/config.yaml +6 -6
- package/server/whatsapp-rpc/docker-compose.yml +35 -35
- package/server/whatsapp-rpc/docs/API.md +410 -410
- package/server/whatsapp-rpc/node_modules/.package-lock.json +259 -0
- package/server/whatsapp-rpc/node_modules/chalk/license +9 -0
- package/server/whatsapp-rpc/node_modules/chalk/package.json +83 -0
- package/server/whatsapp-rpc/node_modules/chalk/readme.md +297 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/index.d.ts +325 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/index.js +225 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/utilities.js +33 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/server/whatsapp-rpc/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/server/whatsapp-rpc/node_modules/commander/LICENSE +22 -0
- package/server/whatsapp-rpc/node_modules/commander/Readme.md +1148 -0
- package/server/whatsapp-rpc/node_modules/commander/esm.mjs +16 -0
- package/server/whatsapp-rpc/node_modules/commander/index.js +26 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/argument.js +145 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/command.js +2179 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/error.js +43 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/help.js +462 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/option.js +329 -0
- package/server/whatsapp-rpc/node_modules/commander/lib/suggestSimilar.js +100 -0
- package/server/whatsapp-rpc/node_modules/commander/package-support.json +16 -0
- package/server/whatsapp-rpc/node_modules/commander/package.json +80 -0
- package/server/whatsapp-rpc/node_modules/commander/typings/esm.d.mts +3 -0
- package/server/whatsapp-rpc/node_modules/commander/typings/index.d.ts +884 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/README.md +89 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/index.js +39 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/parse.js +91 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/server/whatsapp-rpc/node_modules/cross-spawn/package.json +73 -0
- package/server/whatsapp-rpc/node_modules/execa/index.d.ts +955 -0
- package/server/whatsapp-rpc/node_modules/execa/index.js +309 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/command.js +119 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/error.js +87 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/kill.js +102 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/pipe.js +42 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/promise.js +36 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/stdio.js +49 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/stream.js +133 -0
- package/server/whatsapp-rpc/node_modules/execa/lib/verbose.js +19 -0
- package/server/whatsapp-rpc/node_modules/execa/license +9 -0
- package/server/whatsapp-rpc/node_modules/execa/package.json +90 -0
- package/server/whatsapp-rpc/node_modules/execa/readme.md +822 -0
- package/server/whatsapp-rpc/node_modules/get-stream/license +9 -0
- package/server/whatsapp-rpc/node_modules/get-stream/package.json +53 -0
- package/server/whatsapp-rpc/node_modules/get-stream/readme.md +291 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/array-buffer.js +84 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/array.js +32 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/buffer.js +20 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/contents.js +101 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/index.d.ts +119 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/index.js +5 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/string.js +36 -0
- package/server/whatsapp-rpc/node_modules/get-stream/source/utils.js +11 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/README.md +95 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/index.js +97 -0
- package/server/whatsapp-rpc/node_modules/get-them-args/package.json +36 -0
- package/server/whatsapp-rpc/node_modules/human-signals/LICENSE +201 -0
- package/server/whatsapp-rpc/node_modules/human-signals/README.md +168 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/core.js +273 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/main.d.ts +73 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/main.js +70 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/realtime.js +16 -0
- package/server/whatsapp-rpc/node_modules/human-signals/build/src/signals.js +34 -0
- package/server/whatsapp-rpc/node_modules/human-signals/package.json +61 -0
- package/server/whatsapp-rpc/node_modules/is-stream/index.d.ts +81 -0
- package/server/whatsapp-rpc/node_modules/is-stream/index.js +29 -0
- package/server/whatsapp-rpc/node_modules/is-stream/license +9 -0
- package/server/whatsapp-rpc/node_modules/is-stream/package.json +44 -0
- package/server/whatsapp-rpc/node_modules/is-stream/readme.md +60 -0
- package/server/whatsapp-rpc/node_modules/isexe/LICENSE +15 -0
- package/server/whatsapp-rpc/node_modules/isexe/README.md +51 -0
- package/server/whatsapp-rpc/node_modules/isexe/index.js +57 -0
- package/server/whatsapp-rpc/node_modules/isexe/mode.js +41 -0
- package/server/whatsapp-rpc/node_modules/isexe/package.json +31 -0
- package/server/whatsapp-rpc/node_modules/isexe/test/basic.js +221 -0
- package/server/whatsapp-rpc/node_modules/isexe/windows.js +42 -0
- package/server/whatsapp-rpc/node_modules/kill-port/.editorconfig +12 -0
- package/server/whatsapp-rpc/node_modules/kill-port/.gitattributes +1 -0
- package/server/whatsapp-rpc/node_modules/kill-port/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/kill-port/README.md +140 -0
- package/server/whatsapp-rpc/node_modules/kill-port/cli.js +25 -0
- package/server/whatsapp-rpc/node_modules/kill-port/example.js +21 -0
- package/server/whatsapp-rpc/node_modules/kill-port/index.js +46 -0
- package/server/whatsapp-rpc/node_modules/kill-port/logo.png +0 -0
- package/server/whatsapp-rpc/node_modules/kill-port/package.json +41 -0
- package/server/whatsapp-rpc/node_modules/kill-port/pnpm-lock.yaml +4606 -0
- package/server/whatsapp-rpc/node_modules/kill-port/test.js +16 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/README.md +78 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/index.js +41 -0
- package/server/whatsapp-rpc/node_modules/merge-stream/package.json +19 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/index.d.ts +52 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/index.js +71 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/license +9 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/package.json +45 -0
- package/server/whatsapp-rpc/node_modules/mimic-fn/readme.md +90 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/index.d.ts +90 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/index.js +52 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/license +9 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/index.d.ts +31 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/index.js +12 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/license +9 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/package.json +41 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/node_modules/path-key/readme.md +57 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/package.json +49 -0
- package/server/whatsapp-rpc/node_modules/npm-run-path/readme.md +104 -0
- package/server/whatsapp-rpc/node_modules/onetime/index.d.ts +59 -0
- package/server/whatsapp-rpc/node_modules/onetime/index.js +41 -0
- package/server/whatsapp-rpc/node_modules/onetime/license +9 -0
- package/server/whatsapp-rpc/node_modules/onetime/package.json +45 -0
- package/server/whatsapp-rpc/node_modules/onetime/readme.md +94 -0
- package/server/whatsapp-rpc/node_modules/path-key/index.d.ts +40 -0
- package/server/whatsapp-rpc/node_modules/path-key/index.js +16 -0
- package/server/whatsapp-rpc/node_modules/path-key/license +9 -0
- package/server/whatsapp-rpc/node_modules/path-key/package.json +39 -0
- package/server/whatsapp-rpc/node_modules/path-key/readme.md +61 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/index.js +19 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/license +9 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/package.json +34 -0
- package/server/whatsapp-rpc/node_modules/shebang-command/readme.md +34 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/index.d.ts +22 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/index.js +2 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/license +9 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/package.json +35 -0
- package/server/whatsapp-rpc/node_modules/shebang-regex/readme.md +33 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/LICENSE +21 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/README.md +60 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/index.js +47 -0
- package/server/whatsapp-rpc/node_modules/shell-exec/package.json +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/LICENSE.txt +16 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/README.md +74 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/server/whatsapp-rpc/node_modules/signal-exit/package.json +106 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/index.js +14 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/license +9 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/package.json +43 -0
- package/server/whatsapp-rpc/node_modules/strip-final-newline/readme.md +35 -0
- package/server/whatsapp-rpc/node_modules/which/CHANGELOG.md +166 -0
- package/server/whatsapp-rpc/node_modules/which/LICENSE +15 -0
- package/server/whatsapp-rpc/node_modules/which/README.md +54 -0
- package/server/whatsapp-rpc/node_modules/which/bin/node-which +52 -0
- package/server/whatsapp-rpc/node_modules/which/package.json +43 -0
- package/server/whatsapp-rpc/node_modules/which/which.js +125 -0
- package/server/whatsapp-rpc/package-lock.json +272 -0
- package/server/whatsapp-rpc/package.json +30 -30
- package/server/whatsapp-rpc/schema.json +1294 -1294
- package/server/whatsapp-rpc/scripts/clean.cjs +66 -66
- package/server/whatsapp-rpc/scripts/cli.js +162 -162
- package/server/whatsapp-rpc/src/go/whatsapp/history.go +166 -166
- package/server/whatsapp-rpc/src/python/pyproject.toml +15 -15
- package/server/whatsapp-rpc/src/python/whatsapp_rpc/__init__.py +4 -4
- package/server/whatsapp-rpc/src/python/whatsapp_rpc/client.py +427 -427
- package/server/whatsapp-rpc/web/app.py +609 -609
- package/server/whatsapp-rpc/web/requirements.txt +6 -6
- package/server/whatsapp-rpc/web/rpc_client.py +427 -427
- package/server/whatsapp-rpc/web/static/openapi.yaml +59 -59
- package/server/whatsapp-rpc/web/templates/base.html +149 -149
- package/server/whatsapp-rpc/web/templates/contacts.html +240 -240
- package/server/whatsapp-rpc/web/templates/dashboard.html +319 -319
- package/server/whatsapp-rpc/web/templates/groups.html +328 -328
- package/server/whatsapp-rpc/web/templates/messages.html +465 -465
- package/server/whatsapp-rpc/web/templates/messaging.html +680 -680
- package/server/whatsapp-rpc/web/templates/send.html +258 -258
- package/server/whatsapp-rpc/web/templates/settings.html +459 -459
- package/client/src/components/ui/AndroidSettingsPanel.tsx +0 -401
- package/client/src/components/ui/WhatsAppSettingsPanel.tsx +0 -345
- package/client/src/nodeDefinitions/androidDeviceNodes.ts +0 -140
- package/docker-compose.prod.yml +0 -107
- package/docker-compose.yml +0 -104
- package/docs-MachinaOs/README.md +0 -85
- package/docs-MachinaOs/deployment/docker.mdx +0 -228
- package/docs-MachinaOs/deployment/production.mdx +0 -345
- package/docs-MachinaOs/docs.json +0 -75
- package/docs-MachinaOs/faq.mdx +0 -309
- package/docs-MachinaOs/favicon.svg +0 -5
- package/docs-MachinaOs/installation.mdx +0 -160
- package/docs-MachinaOs/introduction.mdx +0 -114
- package/docs-MachinaOs/logo/dark.svg +0 -6
- package/docs-MachinaOs/logo/light.svg +0 -6
- package/docs-MachinaOs/nodes/ai-agent.mdx +0 -216
- package/docs-MachinaOs/nodes/ai-models.mdx +0 -240
- package/docs-MachinaOs/nodes/android.mdx +0 -411
- package/docs-MachinaOs/nodes/overview.mdx +0 -181
- package/docs-MachinaOs/nodes/schedulers.mdx +0 -316
- package/docs-MachinaOs/nodes/webhooks.mdx +0 -330
- package/docs-MachinaOs/nodes/whatsapp.mdx +0 -305
- package/docs-MachinaOs/quickstart.mdx +0 -119
- package/docs-MachinaOs/tutorials/ai-agent-workflow.mdx +0 -177
- package/docs-MachinaOs/tutorials/android-automation.mdx +0 -242
- package/docs-MachinaOs/tutorials/first-workflow.mdx +0 -134
- package/docs-MachinaOs/tutorials/whatsapp-automation.mdx +0 -185
- package/nul +0 -0
- package/scripts/check-ports.ps1 +0 -33
- package/scripts/kill-port.ps1 +0 -154
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { useWhatsApp } from '../../hooks/useWhatsApp';
|
|
3
|
-
import { useWhatsAppStatus } from '../../contexts/WebSocketContext';
|
|
4
|
-
import { useAppTheme } from '../../hooks/useAppTheme';
|
|
5
|
-
|
|
6
|
-
interface WhatsAppSettingsPanelProps {
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const WhatsAppSettingsPanel: React.FC<WhatsAppSettingsPanelProps> = ({ isOpen, onClose }) => {
|
|
12
|
-
const theme = useAppTheme();
|
|
13
|
-
const { getStatus, startConnection, restartConnection } = useWhatsApp();
|
|
14
|
-
const whatsappStatus = useWhatsAppStatus();
|
|
15
|
-
|
|
16
|
-
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
17
|
-
const [actionLoading, setActionLoading] = useState<'restart' | 'start' | 'refresh' | null>(null);
|
|
18
|
-
|
|
19
|
-
// Derive status from reactive WebSocket state
|
|
20
|
-
const status = whatsappStatus.connected ? 'connected' : 'disconnected';
|
|
21
|
-
|
|
22
|
-
// QR data comes from WebSocket status when pairing
|
|
23
|
-
const qrData = whatsappStatus.qr
|
|
24
|
-
? { qr: whatsappStatus.qr, connected: false }
|
|
25
|
-
: whatsappStatus.connected
|
|
26
|
-
? { connected: true }
|
|
27
|
-
: { connected: false, message: whatsappStatus.running ? 'Waiting for QR code...' : 'Service not running' };
|
|
28
|
-
|
|
29
|
-
// Fetch initial status when panel opens
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (isOpen) {
|
|
32
|
-
setErrorMessage(null);
|
|
33
|
-
getStatus().catch(err => console.error('[WhatsAppSettings] Initial status failed:', err));
|
|
34
|
-
}
|
|
35
|
-
}, [isOpen, getStatus]);
|
|
36
|
-
|
|
37
|
-
const handleRefreshStatus = async () => {
|
|
38
|
-
console.log('[WhatsAppSettings] Refresh status clicked');
|
|
39
|
-
setActionLoading('refresh');
|
|
40
|
-
setErrorMessage(null);
|
|
41
|
-
try {
|
|
42
|
-
await getStatus();
|
|
43
|
-
console.log('[WhatsAppSettings] Refresh status complete');
|
|
44
|
-
} catch (error: any) {
|
|
45
|
-
console.error('[WhatsAppSettings] Refresh status failed:', error);
|
|
46
|
-
setErrorMessage(error.message || 'Failed to refresh status');
|
|
47
|
-
} finally {
|
|
48
|
-
setActionLoading(null);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const handleRestart = async () => {
|
|
53
|
-
setActionLoading('restart');
|
|
54
|
-
setErrorMessage(null);
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
const result = await restartConnection();
|
|
58
|
-
if (!result.success && result.message) {
|
|
59
|
-
setErrorMessage(result.message);
|
|
60
|
-
}
|
|
61
|
-
} catch (error: any) {
|
|
62
|
-
setErrorMessage(error.message || 'Failed to restart service');
|
|
63
|
-
} finally {
|
|
64
|
-
setActionLoading(null);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const handleStart = async () => {
|
|
69
|
-
setActionLoading('start');
|
|
70
|
-
setErrorMessage(null);
|
|
71
|
-
|
|
72
|
-
try {
|
|
73
|
-
const result = await startConnection();
|
|
74
|
-
if (!result.success && result.message) {
|
|
75
|
-
setErrorMessage(result.message);
|
|
76
|
-
}
|
|
77
|
-
} catch (error: any) {
|
|
78
|
-
setErrorMessage(error.message || 'Failed to start service');
|
|
79
|
-
} finally {
|
|
80
|
-
setActionLoading(null);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
if (!isOpen) return null;
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<div
|
|
88
|
-
style={{
|
|
89
|
-
position: 'fixed',
|
|
90
|
-
top: 0,
|
|
91
|
-
left: 0,
|
|
92
|
-
right: 0,
|
|
93
|
-
bottom: 0,
|
|
94
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
95
|
-
display: 'flex',
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
justifyContent: 'center',
|
|
98
|
-
zIndex: 1000,
|
|
99
|
-
}}
|
|
100
|
-
onClick={onClose}
|
|
101
|
-
>
|
|
102
|
-
<div
|
|
103
|
-
style={{
|
|
104
|
-
background: theme.colors.background,
|
|
105
|
-
borderRadius: '12px',
|
|
106
|
-
padding: '24px',
|
|
107
|
-
boxShadow: '0 10px 40px rgba(0, 0, 0, 0.4)',
|
|
108
|
-
minWidth: '400px',
|
|
109
|
-
maxWidth: '500px',
|
|
110
|
-
border: `1px solid ${theme.colors.border}`,
|
|
111
|
-
}}
|
|
112
|
-
onClick={(e) => e.stopPropagation()}
|
|
113
|
-
>
|
|
114
|
-
{/* Header */}
|
|
115
|
-
<div
|
|
116
|
-
style={{
|
|
117
|
-
marginBottom: '20px',
|
|
118
|
-
paddingBottom: '16px',
|
|
119
|
-
borderBottom: `2px solid ${theme.colors.border}`,
|
|
120
|
-
display: 'flex',
|
|
121
|
-
alignItems: 'center',
|
|
122
|
-
justifyContent: 'space-between',
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
126
|
-
<span style={{ fontSize: '24px' }}>
|
|
127
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="#25D366">
|
|
128
|
-
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
|
|
129
|
-
</svg>
|
|
130
|
-
</span>
|
|
131
|
-
<span style={{ fontWeight: '600', color: theme.colors.text, fontSize: '18px' }}>
|
|
132
|
-
WhatsApp Settings
|
|
133
|
-
</span>
|
|
134
|
-
</div>
|
|
135
|
-
<button
|
|
136
|
-
onClick={onClose}
|
|
137
|
-
style={{
|
|
138
|
-
background: 'none',
|
|
139
|
-
border: 'none',
|
|
140
|
-
fontSize: '20px',
|
|
141
|
-
cursor: 'pointer',
|
|
142
|
-
color: theme.colors.textSecondary,
|
|
143
|
-
padding: '4px 8px',
|
|
144
|
-
}}
|
|
145
|
-
>
|
|
146
|
-
x
|
|
147
|
-
</button>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
{/* Connection Details */}
|
|
151
|
-
<div style={{
|
|
152
|
-
background: theme.colors.backgroundAlt,
|
|
153
|
-
padding: '16px',
|
|
154
|
-
borderRadius: '8px',
|
|
155
|
-
fontSize: '13px',
|
|
156
|
-
marginBottom: '16px'
|
|
157
|
-
}}>
|
|
158
|
-
<div style={{ fontWeight: '600', marginBottom: '12px', color: theme.colors.text, fontSize: '14px' }}>
|
|
159
|
-
Connection Status
|
|
160
|
-
</div>
|
|
161
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
162
|
-
{whatsappStatus.device_id && (
|
|
163
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
164
|
-
<span style={{ color: theme.colors.textSecondary }}>Device ID:</span>
|
|
165
|
-
<span style={{ color: theme.colors.text, fontWeight: '500', fontSize: '11px', maxWidth: '200px', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
166
|
-
{whatsappStatus.device_id}
|
|
167
|
-
</span>
|
|
168
|
-
</div>
|
|
169
|
-
)}
|
|
170
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
171
|
-
<span style={{ color: theme.colors.textSecondary }}>Status:</span>
|
|
172
|
-
<span style={{ color: status === 'connected' ? '#25D366' : '#ef4444', fontWeight: '500' }}>
|
|
173
|
-
{status === 'connected' ? 'Connected' : 'Disconnected'}
|
|
174
|
-
</span>
|
|
175
|
-
</div>
|
|
176
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
177
|
-
<span style={{ color: theme.colors.textSecondary }}>Session:</span>
|
|
178
|
-
<span style={{ color: whatsappStatus.has_session ? '#25D366' : '#ef4444', fontWeight: '500' }}>
|
|
179
|
-
{whatsappStatus.has_session ? 'Active' : 'Inactive'}
|
|
180
|
-
</span>
|
|
181
|
-
</div>
|
|
182
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
183
|
-
<span style={{ color: theme.colors.textSecondary }}>Service:</span>
|
|
184
|
-
<span style={{ color: whatsappStatus.running ? '#25D366' : '#ef4444', fontWeight: '500' }}>
|
|
185
|
-
{whatsappStatus.running ? 'Running' : 'Stopped'}
|
|
186
|
-
</span>
|
|
187
|
-
</div>
|
|
188
|
-
{whatsappStatus.pairing !== undefined && (
|
|
189
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
190
|
-
<span style={{ color: theme.colors.textSecondary }}>Pairing:</span>
|
|
191
|
-
<span style={{ color: whatsappStatus.pairing ? '#f59e0b' : theme.colors.textSecondary, fontWeight: '500' }}>
|
|
192
|
-
{whatsappStatus.pairing ? 'In Progress' : 'Complete'}
|
|
193
|
-
</span>
|
|
194
|
-
</div>
|
|
195
|
-
)}
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
{/* QR Code Section */}
|
|
200
|
-
<div style={{
|
|
201
|
-
background: theme.colors.backgroundAlt,
|
|
202
|
-
padding: '16px',
|
|
203
|
-
borderRadius: '8px',
|
|
204
|
-
marginBottom: '16px'
|
|
205
|
-
}}>
|
|
206
|
-
<div style={{ fontWeight: '600', marginBottom: '12px', color: theme.colors.text, fontSize: '14px', textAlign: 'center' }}>
|
|
207
|
-
QR Code Authentication
|
|
208
|
-
</div>
|
|
209
|
-
<div style={{
|
|
210
|
-
background: theme.colors.background,
|
|
211
|
-
padding: '20px',
|
|
212
|
-
borderRadius: '8px',
|
|
213
|
-
textAlign: 'center',
|
|
214
|
-
minHeight: '220px',
|
|
215
|
-
display: 'flex',
|
|
216
|
-
alignItems: 'center',
|
|
217
|
-
justifyContent: 'center',
|
|
218
|
-
flexDirection: 'column',
|
|
219
|
-
gap: '12px'
|
|
220
|
-
}}>
|
|
221
|
-
{qrData.connected ? (
|
|
222
|
-
<div style={{ color: '#25D366', fontSize: '14px' }}>
|
|
223
|
-
<div style={{ fontSize: '56px', marginBottom: '12px' }}>OK</div>
|
|
224
|
-
<div style={{ fontWeight: '600' }}>Already Connected!</div>
|
|
225
|
-
<div style={{ color: theme.colors.textSecondary, fontSize: '12px', marginTop: '4px' }}>No QR code needed</div>
|
|
226
|
-
</div>
|
|
227
|
-
) : qrData.qr ? (
|
|
228
|
-
<div style={{ width: '100%' }}>
|
|
229
|
-
<img
|
|
230
|
-
src={`data:image/png;base64,${qrData.qr}`}
|
|
231
|
-
alt="WhatsApp QR Code"
|
|
232
|
-
style={{ maxWidth: '200px', margin: '0 auto', display: 'block' }}
|
|
233
|
-
/>
|
|
234
|
-
<div style={{ color: theme.colors.textSecondary, fontSize: '12px', marginTop: '12px' }}>
|
|
235
|
-
Scan with WhatsApp mobile app
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
) : (
|
|
239
|
-
<div style={{ color: theme.colors.textSecondary, fontSize: '14px' }}>
|
|
240
|
-
<div style={{ fontSize: '40px', marginBottom: '12px' }}>[]</div>
|
|
241
|
-
<div>{qrData.message || 'QR code not available'}</div>
|
|
242
|
-
<a
|
|
243
|
-
href="http://localhost:5000"
|
|
244
|
-
target="_blank"
|
|
245
|
-
rel="noopener noreferrer"
|
|
246
|
-
style={{
|
|
247
|
-
color: '#3b82f6',
|
|
248
|
-
textDecoration: 'underline',
|
|
249
|
-
fontSize: '12px',
|
|
250
|
-
marginTop: '8px',
|
|
251
|
-
display: 'block'
|
|
252
|
-
}}
|
|
253
|
-
>
|
|
254
|
-
Open WhatsApp Dashboard
|
|
255
|
-
</a>
|
|
256
|
-
</div>
|
|
257
|
-
)}
|
|
258
|
-
</div>
|
|
259
|
-
</div>
|
|
260
|
-
|
|
261
|
-
{/* Error Message */}
|
|
262
|
-
{errorMessage && (
|
|
263
|
-
<div style={{
|
|
264
|
-
background: '#fef2f2',
|
|
265
|
-
border: '1px solid #fecaca',
|
|
266
|
-
padding: '12px',
|
|
267
|
-
borderRadius: '8px',
|
|
268
|
-
fontSize: '12px',
|
|
269
|
-
color: '#991b1b',
|
|
270
|
-
lineHeight: '1.5',
|
|
271
|
-
marginBottom: '16px'
|
|
272
|
-
}}>
|
|
273
|
-
<div style={{ fontWeight: '600', marginBottom: '4px' }}>Error:</div>
|
|
274
|
-
<div>{errorMessage}</div>
|
|
275
|
-
</div>
|
|
276
|
-
)}
|
|
277
|
-
|
|
278
|
-
{/* Action Buttons */}
|
|
279
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
|
280
|
-
<div style={{ display: 'flex', gap: '10px' }}>
|
|
281
|
-
<button
|
|
282
|
-
onClick={handleStart}
|
|
283
|
-
disabled={actionLoading !== null}
|
|
284
|
-
style={{
|
|
285
|
-
flex: 1,
|
|
286
|
-
padding: '12px 16px',
|
|
287
|
-
background: actionLoading === 'start' ? '#9ca3af' : '#16a34a',
|
|
288
|
-
color: 'white',
|
|
289
|
-
border: 'none',
|
|
290
|
-
borderRadius: '8px',
|
|
291
|
-
cursor: actionLoading !== null ? 'wait' : 'pointer',
|
|
292
|
-
fontSize: '14px',
|
|
293
|
-
fontWeight: '500',
|
|
294
|
-
transition: 'background 0.2s ease',
|
|
295
|
-
}}
|
|
296
|
-
>
|
|
297
|
-
{actionLoading === 'start' ? 'Starting...' : 'Start'}
|
|
298
|
-
</button>
|
|
299
|
-
|
|
300
|
-
<button
|
|
301
|
-
onClick={handleRestart}
|
|
302
|
-
disabled={actionLoading !== null}
|
|
303
|
-
style={{
|
|
304
|
-
flex: 1,
|
|
305
|
-
padding: '12px 16px',
|
|
306
|
-
background: actionLoading === 'restart' ? '#9ca3af' : '#f59e0b',
|
|
307
|
-
color: 'white',
|
|
308
|
-
border: 'none',
|
|
309
|
-
borderRadius: '8px',
|
|
310
|
-
cursor: actionLoading !== null ? 'wait' : 'pointer',
|
|
311
|
-
fontSize: '14px',
|
|
312
|
-
fontWeight: '500',
|
|
313
|
-
transition: 'background 0.2s ease',
|
|
314
|
-
}}
|
|
315
|
-
>
|
|
316
|
-
{actionLoading === 'restart' ? 'Restarting...' : 'Restart'}
|
|
317
|
-
</button>
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
<button
|
|
321
|
-
onClick={handleRefreshStatus}
|
|
322
|
-
disabled={actionLoading !== null}
|
|
323
|
-
style={{
|
|
324
|
-
width: '100%',
|
|
325
|
-
padding: '12px 16px',
|
|
326
|
-
background: actionLoading === 'refresh' ? '#60a5fa' : actionLoading !== null ? '#9ca3af' : '#3b82f6',
|
|
327
|
-
color: 'white',
|
|
328
|
-
border: 'none',
|
|
329
|
-
borderRadius: '8px',
|
|
330
|
-
cursor: actionLoading !== null ? 'wait' : 'pointer',
|
|
331
|
-
fontSize: '14px',
|
|
332
|
-
fontWeight: '500',
|
|
333
|
-
transition: 'background 0.2s ease',
|
|
334
|
-
pointerEvents: 'auto',
|
|
335
|
-
}}
|
|
336
|
-
>
|
|
337
|
-
{actionLoading === 'refresh' ? 'Refreshing...' : 'Refresh Status'}
|
|
338
|
-
</button>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
</div>
|
|
342
|
-
);
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export default WhatsAppSettingsPanel;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// Android Device Management Nodes
|
|
2
|
-
import {
|
|
3
|
-
INodeTypeDescription,
|
|
4
|
-
NodeConnectionType
|
|
5
|
-
} from '../types/INodeProperties';
|
|
6
|
-
import { API_CONFIG } from '../config/api';
|
|
7
|
-
|
|
8
|
-
export const androidDeviceNodes: Record<string, INodeTypeDescription> = {
|
|
9
|
-
androidDeviceSetup: {
|
|
10
|
-
displayName: 'Android Device Setup',
|
|
11
|
-
name: 'androidDeviceSetup',
|
|
12
|
-
icon: '🔌',
|
|
13
|
-
group: ['android', 'setup'],
|
|
14
|
-
version: 1,
|
|
15
|
-
subtitle: 'Connect Android Device',
|
|
16
|
-
description: 'Setup Android device connection via local ADB or remote relay with QR code pairing',
|
|
17
|
-
defaults: { name: 'Android Device Setup', color: '#3DDC84' },
|
|
18
|
-
inputs: [{
|
|
19
|
-
name: 'main',
|
|
20
|
-
displayName: 'Input',
|
|
21
|
-
type: 'main' as NodeConnectionType,
|
|
22
|
-
description: 'Trigger device setup',
|
|
23
|
-
required: false
|
|
24
|
-
}],
|
|
25
|
-
outputs: [{
|
|
26
|
-
name: 'main',
|
|
27
|
-
displayName: 'Output',
|
|
28
|
-
type: 'main' as NodeConnectionType,
|
|
29
|
-
description: 'Device connection status'
|
|
30
|
-
}],
|
|
31
|
-
properties: [
|
|
32
|
-
{
|
|
33
|
-
displayName: 'Connection Type',
|
|
34
|
-
name: 'connection_type',
|
|
35
|
-
type: 'options',
|
|
36
|
-
options: [
|
|
37
|
-
{
|
|
38
|
-
name: 'Local ADB Device',
|
|
39
|
-
value: 'local',
|
|
40
|
-
description: 'Connect to Android device via USB/ADB with port forwarding'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'Remote Relay (QR Pairing)',
|
|
44
|
-
value: 'remote',
|
|
45
|
-
description: 'Connect via relay server with QR code pairing'
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
default: 'remote',
|
|
49
|
-
required: true,
|
|
50
|
-
description: 'Choose connection method: local ADB or remote relay'
|
|
51
|
-
},
|
|
52
|
-
// Local ADB options
|
|
53
|
-
{
|
|
54
|
-
displayName: 'Android Device',
|
|
55
|
-
name: 'device_id',
|
|
56
|
-
type: 'options',
|
|
57
|
-
typeOptions: {
|
|
58
|
-
loadOptionsMethod: 'getAndroidDevices'
|
|
59
|
-
},
|
|
60
|
-
displayOptions: {
|
|
61
|
-
show: {
|
|
62
|
-
connection_type: ['local']
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
options: [],
|
|
66
|
-
default: '',
|
|
67
|
-
required: true,
|
|
68
|
-
description: 'Select connected Android device (from adb devices)'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
displayName: 'Auto Setup Port Forwarding',
|
|
72
|
-
name: 'auto_forward',
|
|
73
|
-
type: 'boolean',
|
|
74
|
-
displayOptions: {
|
|
75
|
-
show: {
|
|
76
|
-
connection_type: ['local']
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
default: true,
|
|
80
|
-
required: false,
|
|
81
|
-
description: 'Automatically setup ADB port forwarding when node executes'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
displayName: 'Port',
|
|
85
|
-
name: 'port',
|
|
86
|
-
type: 'number',
|
|
87
|
-
displayOptions: {
|
|
88
|
-
show: {
|
|
89
|
-
connection_type: ['local']
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
default: 8888,
|
|
93
|
-
required: true,
|
|
94
|
-
description: 'Port number for local ADB port forwarding'
|
|
95
|
-
},
|
|
96
|
-
// Remote relay options
|
|
97
|
-
{
|
|
98
|
-
displayName: 'Relay URL',
|
|
99
|
-
name: 'websocket_url',
|
|
100
|
-
type: 'string',
|
|
101
|
-
displayOptions: {
|
|
102
|
-
show: {
|
|
103
|
-
connection_type: ['remote']
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
default: '',
|
|
107
|
-
required: true,
|
|
108
|
-
placeholder: 'wss://your-relay-server.com/ws',
|
|
109
|
-
description: 'Relay server URL for QR code pairing with Android device'
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
methods: {
|
|
113
|
-
loadOptions: {
|
|
114
|
-
async getAndroidDevices(this: any): Promise<Array<{name: string, value: string, description?: string}>> {
|
|
115
|
-
try {
|
|
116
|
-
const response = await fetch(`${API_CONFIG.PYTHON_BASE_URL}/api/android/devices`, {
|
|
117
|
-
credentials: 'include'
|
|
118
|
-
});
|
|
119
|
-
const data = await response.json();
|
|
120
|
-
|
|
121
|
-
if (data.success && data.devices) {
|
|
122
|
-
return data.devices.map((device: any) => ({
|
|
123
|
-
name: `${device.model || device.id} (${device.id})`,
|
|
124
|
-
value: device.id,
|
|
125
|
-
description: `${device.state} - Android ${device.android_version || 'Unknown'}`
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return [];
|
|
130
|
-
} catch (error) {
|
|
131
|
-
console.error('Failed to load Android devices:', error);
|
|
132
|
-
return [];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export const ANDROID_DEVICE_NODE_TYPES = ['androidDeviceSetup'];
|
package/docker-compose.prod.yml
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
services:
|
|
2
|
-
# Redis Cache (production performance)
|
|
3
|
-
redis:
|
|
4
|
-
image: redis:7-alpine
|
|
5
|
-
container_name: machina-redis
|
|
6
|
-
volumes:
|
|
7
|
-
- redis-data:/data
|
|
8
|
-
networks:
|
|
9
|
-
- app-network
|
|
10
|
-
restart: always
|
|
11
|
-
healthcheck:
|
|
12
|
-
test: ["CMD", "redis-cli", "ping"]
|
|
13
|
-
interval: 10s
|
|
14
|
-
timeout: 5s
|
|
15
|
-
retries: 3
|
|
16
|
-
command: redis-server --appendonly yes
|
|
17
|
-
|
|
18
|
-
# Python FastAPI Backend
|
|
19
|
-
backend:
|
|
20
|
-
build:
|
|
21
|
-
context: ./server
|
|
22
|
-
dockerfile: Dockerfile
|
|
23
|
-
container_name: machina-backend
|
|
24
|
-
ports:
|
|
25
|
-
- "${PYTHON_BACKEND_PORT:-3010}:${PYTHON_BACKEND_PORT:-3010}"
|
|
26
|
-
volumes:
|
|
27
|
-
- backend-data:/app/data
|
|
28
|
-
networks:
|
|
29
|
-
- app-network
|
|
30
|
-
restart: always
|
|
31
|
-
healthcheck:
|
|
32
|
-
test: ["CMD", "curl", "-f", "http://localhost:${PYTHON_BACKEND_PORT:-3010}/health"]
|
|
33
|
-
interval: 30s
|
|
34
|
-
timeout: 10s
|
|
35
|
-
retries: 3
|
|
36
|
-
start_period: 30s
|
|
37
|
-
env_file:
|
|
38
|
-
- path: ./.env
|
|
39
|
-
required: false
|
|
40
|
-
environment:
|
|
41
|
-
# Production overrides
|
|
42
|
-
- PORT=${PYTHON_BACKEND_PORT:-3010}
|
|
43
|
-
- ENV=production
|
|
44
|
-
- REDIS_ENABLED=true
|
|
45
|
-
- REDIS_URL=redis://redis:6379
|
|
46
|
-
- WHATSAPP_RPC_URL=ws://whatsapp:${WHATSAPP_RPC_PORT:-9400}/ws/rpc
|
|
47
|
-
- TZ=UTC
|
|
48
|
-
depends_on:
|
|
49
|
-
redis:
|
|
50
|
-
condition: service_healthy
|
|
51
|
-
whatsapp:
|
|
52
|
-
condition: service_healthy
|
|
53
|
-
|
|
54
|
-
# React Frontend (Production - Nginx)
|
|
55
|
-
frontend:
|
|
56
|
-
build:
|
|
57
|
-
context: ./client
|
|
58
|
-
dockerfile: Dockerfile
|
|
59
|
-
target: production
|
|
60
|
-
args:
|
|
61
|
-
# Pass env vars to frontend build (baked into static JS at build time)
|
|
62
|
-
VITE_AUTH_ENABLED: ${VITE_AUTH_ENABLED:-true}
|
|
63
|
-
VITE_PYTHON_SERVICE_URL: ${VITE_PYTHON_SERVICE_URL:-}
|
|
64
|
-
VITE_WHATSAPP_SERVICE_URL: ${VITE_WHATSAPP_SERVICE_URL:-}
|
|
65
|
-
VITE_ANDROID_RELAY_URL: ${VITE_ANDROID_RELAY_URL:-}
|
|
66
|
-
container_name: machina-frontend
|
|
67
|
-
ports:
|
|
68
|
-
- "${VITE_CLIENT_PORT:-3000}:80"
|
|
69
|
-
networks:
|
|
70
|
-
- app-network
|
|
71
|
-
restart: always
|
|
72
|
-
depends_on:
|
|
73
|
-
- backend
|
|
74
|
-
|
|
75
|
-
# WhatsApp RPC Service (Go API only)
|
|
76
|
-
whatsapp:
|
|
77
|
-
build:
|
|
78
|
-
context: ./server/whatsapp-rpc
|
|
79
|
-
dockerfile: Dockerfile
|
|
80
|
-
container_name: machina-whatsapp
|
|
81
|
-
volumes:
|
|
82
|
-
- whatsapp-data:/app/data
|
|
83
|
-
networks:
|
|
84
|
-
- app-network
|
|
85
|
-
restart: always
|
|
86
|
-
# Privileged mode for proper SQLite WAL mmap support
|
|
87
|
-
privileged: true
|
|
88
|
-
healthcheck:
|
|
89
|
-
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9400/health"]
|
|
90
|
-
interval: 30s
|
|
91
|
-
timeout: 10s
|
|
92
|
-
retries: 3
|
|
93
|
-
start_period: 15s
|
|
94
|
-
environment:
|
|
95
|
-
- TZ=UTC
|
|
96
|
-
|
|
97
|
-
networks:
|
|
98
|
-
app-network:
|
|
99
|
-
driver: bridge
|
|
100
|
-
|
|
101
|
-
volumes:
|
|
102
|
-
redis-data:
|
|
103
|
-
driver: local
|
|
104
|
-
backend-data:
|
|
105
|
-
driver: local
|
|
106
|
-
whatsapp-data:
|
|
107
|
-
driver: local
|
package/docker-compose.yml
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
services:
|
|
2
|
-
# Redis Cache (only starts with --profile redis or COMPOSE_PROFILES=redis)
|
|
3
|
-
redis:
|
|
4
|
-
image: redis:7-alpine
|
|
5
|
-
container_name: machina-redis
|
|
6
|
-
profiles:
|
|
7
|
-
- redis
|
|
8
|
-
ports:
|
|
9
|
-
- "${REDIS_PORT:-6379}:6379"
|
|
10
|
-
volumes:
|
|
11
|
-
- redis-data:/data
|
|
12
|
-
networks:
|
|
13
|
-
- app-network
|
|
14
|
-
restart: unless-stopped
|
|
15
|
-
healthcheck:
|
|
16
|
-
test: ["CMD", "redis-cli", "ping"]
|
|
17
|
-
interval: 10s
|
|
18
|
-
timeout: 5s
|
|
19
|
-
retries: 3
|
|
20
|
-
command: redis-server --appendonly yes
|
|
21
|
-
|
|
22
|
-
# Python FastAPI Backend
|
|
23
|
-
backend:
|
|
24
|
-
build:
|
|
25
|
-
context: ./server
|
|
26
|
-
dockerfile: Dockerfile
|
|
27
|
-
container_name: machina-backend
|
|
28
|
-
ports:
|
|
29
|
-
- "${PYTHON_BACKEND_PORT:-3010}:${PYTHON_BACKEND_PORT:-3010}"
|
|
30
|
-
volumes:
|
|
31
|
-
- ./server:/app
|
|
32
|
-
- backend-data:/app/data
|
|
33
|
-
networks:
|
|
34
|
-
- app-network
|
|
35
|
-
restart: unless-stopped
|
|
36
|
-
healthcheck:
|
|
37
|
-
test: ["CMD", "curl", "-f", "http://localhost:${PYTHON_BACKEND_PORT:-3010}/health"]
|
|
38
|
-
interval: 30s
|
|
39
|
-
timeout: 10s
|
|
40
|
-
retries: 3
|
|
41
|
-
start_period: 30s
|
|
42
|
-
env_file:
|
|
43
|
-
- .env
|
|
44
|
-
environment:
|
|
45
|
-
# Override specific vars for Docker networking
|
|
46
|
-
- PORT=${PYTHON_BACKEND_PORT:-3010}
|
|
47
|
-
- REDIS_URL=redis://redis:6379
|
|
48
|
-
- WHATSAPP_RPC_URL=ws://whatsapp:${WHATSAPP_RPC_PORT:-9400}/ws/rpc
|
|
49
|
-
- TZ=UTC
|
|
50
|
-
depends_on:
|
|
51
|
-
whatsapp:
|
|
52
|
-
condition: service_healthy
|
|
53
|
-
|
|
54
|
-
# React Frontend (Vite) - Production build served via nginx
|
|
55
|
-
frontend:
|
|
56
|
-
build:
|
|
57
|
-
context: ./client
|
|
58
|
-
dockerfile: Dockerfile
|
|
59
|
-
target: production
|
|
60
|
-
args:
|
|
61
|
-
- VITE_AUTH_ENABLED=${VITE_AUTH_ENABLED:-true}
|
|
62
|
-
container_name: machina-frontend
|
|
63
|
-
ports:
|
|
64
|
-
- "${VITE_CLIENT_PORT:-3000}:80"
|
|
65
|
-
networks:
|
|
66
|
-
- app-network
|
|
67
|
-
restart: unless-stopped
|
|
68
|
-
depends_on:
|
|
69
|
-
- backend
|
|
70
|
-
|
|
71
|
-
# WhatsApp RPC Service (Go API)
|
|
72
|
-
whatsapp:
|
|
73
|
-
build:
|
|
74
|
-
context: ./server/whatsapp-rpc
|
|
75
|
-
dockerfile: Dockerfile
|
|
76
|
-
container_name: machina-whatsapp
|
|
77
|
-
ports:
|
|
78
|
-
- "${WHATSAPP_RPC_PORT:-9400}:${WHATSAPP_RPC_PORT:-9400}"
|
|
79
|
-
volumes:
|
|
80
|
-
- whatsapp-data:/app/data
|
|
81
|
-
networks:
|
|
82
|
-
- app-network
|
|
83
|
-
restart: unless-stopped
|
|
84
|
-
healthcheck:
|
|
85
|
-
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:${WHATSAPP_RPC_PORT:-9400}/health"]
|
|
86
|
-
interval: 30s
|
|
87
|
-
timeout: 10s
|
|
88
|
-
retries: 3
|
|
89
|
-
start_period: 15s
|
|
90
|
-
environment:
|
|
91
|
-
- TZ=UTC
|
|
92
|
-
- PORT=${WHATSAPP_RPC_PORT:-9400}
|
|
93
|
-
|
|
94
|
-
networks:
|
|
95
|
-
app-network:
|
|
96
|
-
driver: bridge
|
|
97
|
-
|
|
98
|
-
volumes:
|
|
99
|
-
redis-data:
|
|
100
|
-
driver: local
|
|
101
|
-
backend-data:
|
|
102
|
-
driver: local
|
|
103
|
-
whatsapp-data:
|
|
104
|
-
driver: local
|