flujo-ai 3.38.0 → 3.40.0
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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +617 -433
- package/.next/app-path-routes-manifest.json +42 -26
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +90 -18
- package/.next/react-loadable-manifest.json +40 -47
- package/.next/routes-manifest.json +34 -0
- package/.next/server/app/_not-found/page.js +3 -4
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +5 -5
- package/.next/server/app/api/approvals/[id]/route.js +1 -1
- package/.next/server/app/api/approvals/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/approvals/route.js +2 -2
- package/.next/server/app/api/approvals/route.js.nft.json +1 -1
- package/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/backup/route.js +1 -1
- package/.next/server/app/api/backup/route.js.nft.json +1 -1
- package/.next/server/app/api/backup/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/bugs/enhance/route.js +2 -2
- package/.next/server/app/api/bugs/enhance/route.js.nft.json +1 -1
- package/.next/server/app/api/bugs/enhance/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cwd/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/encryption/secure/route.js +1 -1
- package/.next/server/app/api/encryption/secure/route.js.nft.json +1 -1
- package/.next/server/app/api/encryption/secure/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/env/route.js +2 -2
- package/.next/server/app/api/env/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route.js +1 -0
- package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route.js.nft.json +1 -0
- package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/flow/[id]/route.js +1 -1
- package/.next/server/app/api/flow/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/[id]/versions/[versionId]/route.js +1 -1
- package/.next/server/app/api/flow/[id]/versions/[versionId]/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/[id]/versions/[versionId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/[id]/versions/route.js +1 -1
- package/.next/server/app/api/flow/[id]/versions/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/[id]/versions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/assist/route.js +1 -0
- package/.next/server/app/api/flow/assist/route.js.nft.json +1 -0
- package/.next/server/app/api/flow/assist/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/flow/compile/route.js +1 -1
- package/.next/server/app/api/flow/compile/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/compile/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/generate/route.js +1 -1
- package/.next/server/app/api/flow/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/generate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/generator/route.js +2 -2
- package/.next/server/app/api/flow/generator/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/generator/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/improve/route.js +1 -1
- package/.next/server/app/api/flow/improve/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/improve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/prompt-renderer/route.js +2 -2
- package/.next/server/app/api/flow/prompt-renderer/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/prompt-renderer/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/quick-chat/route.js +1 -1
- package/.next/server/app/api/flow/quick-chat/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/quick-chat/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/repair/route.js +1 -1
- package/.next/server/app/api/flow/repair/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/repair/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/flow/route.js +1 -1
- package/.next/server/app/api/flow/route.js.nft.json +1 -1
- package/.next/server/app/api/flow/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/route.js +6 -6
- package/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/init/route.js +1 -1
- package/.next/server/app/api/init/route.js.nft.json +1 -1
- package/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/local-models/capability/route.js +1 -1
- package/.next/server/app/api/local-models/capability/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/local-models/pull/route.js +1 -1
- package/.next/server/app/api/local-models/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/local-models/suggest/route.js +1 -1
- package/.next/server/app/api/local-models/suggest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/app-sandbox/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/cancel/route.js +2 -2
- package/.next/server/app/api/mcp/cancel/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/flujo/authoring/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/authoring/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/authoring/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/automation/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/automation/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/automation/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/flows/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/flows/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/flows/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/resources/read/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/resources/read/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/resources/read/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/resources/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/resources/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/resources/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/servers/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/servers/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/servers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/state/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/state/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/state/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/flujo/tools/route.js +1 -0
- package/.next/server/app/api/mcp/flujo/tools/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/flujo/tools/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/oauth-capability/route.js +1 -1
- package/.next/server/app/api/mcp/oauth-capability/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth-capability/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/get/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/get/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/get/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/prompts/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/read/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/read/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/read/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/resources/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/status/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/status/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/route.js +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/[name]/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/servers/route.js +1 -1
- package/.next/server/app/api/mcp/servers/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/servers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/test-connection/route.js +1 -1
- package/.next/server/app/api/mcp/test-connection/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/test-connection/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp/test-connection/stream/route.js +1 -1
- package/.next/server/app/api/mcp/test-connection/stream/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/test-connection/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp-registry/route.js +2 -2
- package/.next/server/app/api/mcp-registry/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp-registry/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/mcp-registry/spotlight/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/model/[id]/route.js +1 -1
- package/.next/server/app/api/model/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/model/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/model/provider/route.js +2 -2
- package/.next/server/app/api/model/provider/route.js.nft.json +1 -1
- package/.next/server/app/api/model/provider/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/model/route.js +1 -1
- package/.next/server/app/api/model/route.js.nft.json +1 -1
- package/.next/server/app/api/model/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/model/test/route.js +2 -2
- package/.next/server/app/api/model/test/route.js.nft.json +1 -1
- package/.next/server/app/api/model/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route.js +1 -1
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/initiate/route.js +1 -1
- package/.next/server/app/api/oauth/initiate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/reset/route.js +2 -2
- package/.next/server/app/api/oauth/reset/route.js.nft.json +1 -1
- package/.next/server/app/api/oauth/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/build/route.js +1 -1
- package/.next/server/app/api/packages/build/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/build/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/derive-secrets/route.js +1 -1
- package/.next/server/app/api/packages/derive-secrets/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/derive-secrets/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/install/route.js +1 -1
- package/.next/server/app/api/packages/install/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/install/status/route.js +1 -1
- package/.next/server/app/api/packages/install/status/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/install/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/installed/route.js +1 -1
- package/.next/server/app/api/packages/installed/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/installed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/resolve/route.js +1 -1
- package/.next/server/app/api/packages/resolve/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/resolve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/scan-targets/route.js +1 -1
- package/.next/server/app/api/packages/scan-targets/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/scan-targets/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/packages/uninstall/route.js +1 -1
- package/.next/server/app/api/packages/uninstall/route.js.nft.json +1 -1
- package/.next/server/app/api/packages/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/[id]/route.js +2 -2
- package/.next/server/app/api/planned-executions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/planned-executions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/[id]/run/route.js +2 -2
- package/.next/server/app/api/planned-executions/[id]/run/route.js.nft.json +1 -1
- package/.next/server/app/api/planned-executions/[id]/run/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/[id]/runs/route.js +2 -2
- package/.next/server/app/api/planned-executions/[id]/runs/route.js.nft.json +1 -1
- package/.next/server/app/api/planned-executions/[id]/runs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/preview-schedule/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/reconcile/route.js +1 -1
- package/.next/server/app/api/planned-executions/reconcile/route.js.nft.json +1 -1
- package/.next/server/app/api/planned-executions/reconcile/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/planned-executions/route.js +1 -1
- package/.next/server/app/api/planned-executions/route.js.nft.json +1 -1
- package/.next/server/app/api/planned-executions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/auth/resend/route.js +1 -1
- package/.next/server/app/api/registry/auth/resend/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/auth/reset/route.js +1 -1
- package/.next/server/app/api/registry/auth/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/auth/route.js +1 -1
- package/.next/server/app/api/registry/auth/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/feedback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/oauth/callback/route.js +1 -1
- package/.next/server/app/api/registry/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/oauth/initiate/route.js +1 -1
- package/.next/server/app/api/registry/oauth/initiate/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/packages/route.js +1 -1
- package/.next/server/app/api/registry/packages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/publish/route.js +1 -1
- package/.next/server/app/api/registry/publish/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/registry/settings/route.js +1 -1
- package/.next/server/app/api/registry/settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/restore/route.js +1 -1
- package/.next/server/app/api/restore/route.js.nft.json +1 -1
- package/.next/server/app/api/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/runs/active/route.js +2 -2
- package/.next/server/app/api/runs/active/route.js.nft.json +1 -1
- package/.next/server/app/api/runs/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/setup/ai-cli/route.js +3 -0
- package/.next/server/app/api/setup/ai-cli/route.js.nft.json +1 -0
- package/.next/server/app/api/setup/ai-cli/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/statistics/route.js +2 -0
- package/.next/server/app/api/statistics/route.js.nft.json +1 -0
- package/.next/server/app/api/statistics/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/storage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/telemetry/daily-active/route.js +1 -1
- package/.next/server/app/api/telemetry/daily-active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/waves/route.js +1 -1
- package/.next/server/app/api/waves/route.js.nft.json +1 -1
- package/.next/server/app/api/waves/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/webhooks/[id]/route.js +1 -1
- package/.next/server/app/api/webhooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/webhooks/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/automation/triggers/page.js +2 -0
- package/.next/server/app/automation/triggers/page.js.nft.json +1 -0
- package/.next/server/app/automation/triggers/page_client-reference-manifest.js +1 -0
- package/.next/server/app/automation/triggers.html +1 -0
- package/.next/server/app/automation/triggers.meta +7 -0
- package/.next/server/app/automation/triggers.rsc +23 -0
- package/.next/server/app/automation/waves/page.js +2 -0
- package/.next/server/app/automation/waves/page.js.nft.json +1 -0
- package/.next/server/app/automation/waves/page_client-reference-manifest.js +1 -0
- package/.next/server/app/automation/waves.html +1 -0
- package/.next/server/app/automation/waves.meta +7 -0
- package/.next/server/app/automation/waves.rsc +22 -0
- package/.next/server/app/chat/page.js +6 -58
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/chat.html +1 -1
- package/.next/server/app/chat.rsc +7 -6
- package/.next/server/app/docs/page.js +3 -4
- package/.next/server/app/docs/page.js.nft.json +1 -1
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +6 -6
- package/.next/server/app/executions/page.js +2 -3
- package/.next/server/app/executions/page.js.nft.json +1 -1
- package/.next/server/app/executions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/executions.html +1 -1
- package/.next/server/app/executions.rsc +7 -6
- package/.next/server/app/flows/page.js +3 -3
- package/.next/server/app/flows/page.js.nft.json +1 -1
- package/.next/server/app/flows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/flows.html +1 -1
- package/.next/server/app/flows.rsc +7 -7
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/mcp/page.js +6 -57
- package/.next/server/app/mcp/page.js.nft.json +1 -1
- package/.next/server/app/mcp/page_client-reference-manifest.js +1 -1
- package/.next/server/app/mcp-flows/route.js +2 -1
- package/.next/server/app/mcp-flows/route.js.nft.json +1 -1
- package/.next/server/app/mcp-flows/route_client-reference-manifest.js +1 -1
- package/.next/server/app/mcp-proxy/[server]/route.js +2 -1
- package/.next/server/app/mcp-proxy/[server]/route.js.nft.json +1 -1
- package/.next/server/app/mcp-proxy/[server]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/mcp.html +1 -1
- package/.next/server/app/mcp.rsc +7 -6
- package/.next/server/app/models/page.js +64 -2
- package/.next/server/app/models/page.js.nft.json +1 -1
- package/.next/server/app/models/page_client-reference-manifest.js +1 -1
- package/.next/server/app/packages/page.js +2 -2
- package/.next/server/app/packages/page.js.nft.json +1 -1
- package/.next/server/app/packages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/packages.html +1 -1
- package/.next/server/app/packages.rsc +6 -6
- package/.next/server/app/page.js +3 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +2 -2
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +6 -6
- package/.next/server/app/statistics/page.js +54 -0
- package/.next/server/app/statistics/page.js.nft.json +1 -0
- package/.next/server/app/statistics/page_client-reference-manifest.js +1 -0
- package/.next/server/app/statistics.html +1 -0
- package/.next/server/app/statistics.meta +7 -0
- package/.next/server/app/statistics.rsc +22 -0
- package/.next/server/app/v1/chat/completions/route.js +1 -1
- package/.next/server/app/v1/chat/completions/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/events/route.js +3 -3
- package/.next/server/app/v1/chat/conversations/[conversationId]/events/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route.js +2 -0
- package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route.js.nft.json +1 -0
- package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route_client-reference-manifest.js +1 -0
- package/.next/server/app/v1/chat/conversations/[conversationId]/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/[conversationId]/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/conversations/route.js +2 -2
- package/.next/server/app/v1/chat/conversations/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/conversations/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/chat/events/route.js +6 -6
- package/.next/server/app/v1/chat/events/route.js.nft.json +1 -1
- package/.next/server/app/v1/chat/events/route_client-reference-manifest.js +1 -1
- package/.next/server/app/v1/models/route.js +2 -2
- package/.next/server/app/v1/models/route.js.nft.json +1 -1
- package/.next/server/app/v1/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/waves/page.js +2 -4
- package/.next/server/app/waves/page.js.nft.json +1 -1
- package/.next/server/app/waves/page_client-reference-manifest.js +1 -1
- package/.next/server/app/waves.html +1 -1
- package/.next/server/app/waves.rsc +6 -6
- package/.next/server/app-paths-manifest.json +42 -26
- package/.next/server/chunks/1227.js +1 -1
- package/.next/server/chunks/1314.js +1 -1
- package/.next/server/chunks/1403.js +3 -0
- package/.next/server/chunks/{180.js → 1532.js} +1 -1
- package/.next/server/chunks/1539.js +1 -0
- package/.next/server/chunks/1662.js +2 -0
- package/.next/server/chunks/1805.js +1 -1
- package/.next/server/chunks/1925.js +1 -1
- package/.next/server/chunks/2069.js +1 -0
- package/.next/server/chunks/227.js +1 -1
- package/.next/server/chunks/2372.js +2 -2
- package/.next/server/chunks/2446.js +1 -0
- package/.next/server/chunks/2828.js +2 -0
- package/.next/server/chunks/2949.js +1 -0
- package/.next/server/chunks/{6034.js → 300.js} +15 -15
- package/.next/server/chunks/3032.js +29 -0
- package/.next/server/chunks/3206.js +2 -0
- package/.next/server/chunks/3262.js +90 -0
- package/.next/server/chunks/3418.js +1 -0
- package/.next/server/chunks/3945.js +10 -0
- package/.next/server/chunks/{6967.js → 3954.js} +3 -3
- package/.next/server/chunks/3963.js +6 -0
- package/.next/server/chunks/3991.js +2 -0
- package/.next/server/chunks/4265.js +1 -1
- package/.next/server/chunks/4306.js +1 -1
- package/.next/server/chunks/4671.js +1 -1
- package/.next/server/chunks/4681.js +1 -1
- package/.next/server/chunks/4771.js +2 -2
- package/.next/server/chunks/5096.js +1 -1
- package/.next/server/chunks/5141.js +2 -0
- package/.next/server/chunks/519.js +2 -2
- package/.next/server/chunks/5444.js +2 -0
- package/.next/server/chunks/5446.js +1 -0
- package/.next/server/chunks/{7058.js → 5494.js} +2 -2
- package/.next/server/chunks/558.js +1 -1
- package/.next/server/chunks/5591.js +1 -0
- package/.next/server/chunks/{3312.js → 5642.js} +1 -1
- package/.next/server/chunks/566.js +2 -0
- package/.next/server/chunks/5750.js +1 -0
- package/.next/server/chunks/{7519.js → 5807.js} +1 -1
- package/.next/server/chunks/5858.js +1 -0
- package/.next/server/chunks/5918.js +436 -0
- package/.next/server/chunks/5936.js +1 -0
- package/.next/server/chunks/6033.js +1 -0
- package/.next/server/chunks/6226.js +4 -4
- package/.next/server/chunks/6607.js +1 -0
- package/.next/server/chunks/6687.js +1 -0
- package/.next/server/chunks/701.js +2 -2
- package/.next/server/chunks/7031.js +1 -0
- package/.next/server/chunks/7147.js +1 -0
- package/.next/server/chunks/7480.js +2 -0
- package/.next/server/chunks/{8284.js → 7498.js} +2 -2
- package/.next/server/chunks/7506.js +2 -2
- package/.next/server/chunks/7508.js +5 -0
- package/.next/server/chunks/7628.js +1 -1
- package/.next/server/chunks/7630.js +1 -1
- package/.next/server/chunks/773.js +9 -0
- package/.next/server/chunks/7821.js +1 -1
- package/.next/server/chunks/7883.js +1 -0
- package/.next/server/chunks/7969.js +1 -1
- package/.next/server/chunks/8001.js +1 -1
- package/.next/server/chunks/8092.js +1 -1
- package/.next/server/chunks/8291.js +1 -0
- package/.next/server/chunks/8598.js +1 -0
- package/.next/server/chunks/8645.js +1 -1
- package/.next/server/chunks/{3489.js → 8730.js} +1 -1
- package/.next/server/chunks/8897.js +1 -0
- package/.next/server/chunks/8903.js +4 -0
- package/.next/server/chunks/8940.js +1 -0
- package/.next/server/chunks/9088.js +6 -0
- package/.next/server/chunks/9543.js +8 -0
- package/.next/server/chunks/9624.js +136 -0
- package/.next/server/functions-config-manifest.json +4 -3
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/b1aMk0634gkkiunttd1SQ/_buildManifest.js +1 -0
- package/.next/static/chunks/1161-19176c3e7c655121.js +1 -0
- package/.next/static/chunks/1521-1c98c9a56726e053.js +1 -0
- package/.next/static/chunks/155-12f2a537db5dacec.js +1 -0
- package/.next/static/chunks/1576.bc6ae6c9e6d939d8.js +1 -0
- package/.next/static/chunks/1871-dd8c10ed9d37100b.js +1 -0
- package/.next/static/chunks/1983-242862b3dc022a26.js +1 -0
- package/.next/static/chunks/2005.300528b5119c2d38.js +1 -0
- package/.next/static/chunks/2141-dba0d13715fe1a28.js +1 -0
- package/.next/static/chunks/2498-4f7f5de1cac6feba.js +1 -0
- package/.next/static/chunks/2499-92cd97ce4993999f.js +1 -0
- package/.next/static/chunks/3272-42d1acae08d1ef0a.js +1 -0
- package/.next/static/chunks/3303-febfba58226aebed.js +1 -0
- package/.next/static/chunks/{361.bb75b03b740930cd.js → 361.51d642c530c84295.js} +1 -1
- package/.next/static/chunks/3731-64070760ae44448f.js +1 -0
- package/.next/static/chunks/3776.72638b35ce9bb874.js +1 -0
- package/.next/static/chunks/3816-807978463638bb71.js +1 -0
- package/.next/static/chunks/4122-d82fad8d1fca26d6.js +1 -0
- package/.next/static/chunks/4123-906362aeb986d6db.js +1 -0
- package/.next/static/chunks/4156-3823d1c89c4a7e3d.js +1 -0
- package/.next/static/chunks/{4555-c9070f8c79bccfad.js → 4483-00dc5c1b601ec898.js} +3 -3
- package/.next/static/chunks/4755-83df83d0dbd97483.js +1 -0
- package/.next/static/chunks/4814-31eb5f3b10c651c1.js +1 -0
- package/.next/static/chunks/4965.39e24b54c3c6ca58.js +1 -0
- package/.next/static/chunks/57-64bab7d5db89c9cc.js +1 -0
- package/.next/static/chunks/5954-dd2b25224f389fc0.js +1 -0
- package/.next/static/chunks/5962-8c59d06b3ee1c42a.js +1 -0
- package/.next/static/chunks/5967-59fde8c214c9ca9f.js +1 -0
- package/.next/static/chunks/6417.70056fe81ca21682.js +1 -0
- package/.next/static/chunks/6420-25dd04f98f3b34b8.js +1 -0
- package/.next/static/chunks/6547-2adc20e1ace927fc.js +1 -0
- package/.next/static/chunks/684-289a73150568def2.js +1 -0
- package/.next/static/chunks/7203-2704865539fa551d.js +1 -0
- package/.next/static/chunks/760-2ad13a61701630da.js +1 -0
- package/.next/static/chunks/7711-4b017720ec49c96d.js +1 -0
- package/.next/static/chunks/7758-42ab0b9cce1dc0e3.js +1 -0
- package/.next/static/chunks/8124-94140ee1dd8ed87c.js +1 -0
- package/.next/static/chunks/8135-5b975b9014f8920b.js +1 -0
- package/.next/static/chunks/{8198.cd0d3f8429c02862.js → 8198.a9cc35771b354b03.js} +1 -1
- package/.next/static/chunks/8326-4915403bc93459d2.js +1 -0
- package/.next/static/chunks/8529.b5a43e728bb5bb8a.js +1 -0
- package/.next/static/chunks/{6428-951188daa6f74b86.js → 8620-c9fa9d75cdc18a5e.js} +3 -3
- package/.next/static/chunks/8853-b80e50cbec6fd13c.js +1 -0
- package/.next/static/chunks/8862-0e37dd5488b21c77.js +1 -0
- package/.next/static/chunks/889-e64385ddb2259b1b.js +1 -0
- package/.next/static/chunks/9001-4c27a608feddb878.js +1 -0
- package/.next/static/chunks/9050-fcb7a0c89314acb4.js +1 -0
- package/.next/static/chunks/9053-283dd8d615f904a5.js +8 -0
- package/.next/static/chunks/9136-9c415453ec02519c.js +1 -0
- package/.next/static/chunks/9140.6502327a2c098d33.js +1 -0
- package/.next/static/chunks/9195-3c9c4300e7505d9e.js +1 -0
- package/.next/static/chunks/9524-b9d2c7e4426edd07.js +1 -0
- package/.next/static/chunks/9562-5494feecd8c6f7a3.js +1 -0
- package/.next/static/chunks/9611-190b55ade8b3af3c.js +1 -0
- package/.next/static/chunks/app/api/approvals/[id]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/approvals/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/backup/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/browse/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/bugs/enhance/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/cwd/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/encryption/secure/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/env/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/[id]/convert-process-to-subflow/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/[id]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/[id]/versions/[versionId]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/[id]/versions/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/assist/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/compile/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/generate/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/generator/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/improve/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/prompt-renderer/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/quick-chat/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/repair/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/flow/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/git/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/init/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/local-models/capability/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/local-models/pull/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/local-models/suggest/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/app-sandbox/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/cancel/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/authoring/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/automation/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/flows/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/resources/read/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/resources/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/servers/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/state/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/flujo/tools/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/oauth-capability/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/get/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/resources/read/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/resources/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/status/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/tools/[toolName]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/[name]/tools/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/servers/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/test-connection/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp/test-connection/stream/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp-registry/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/mcp-registry/spotlight/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/model/[id]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/model/provider/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/model/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/model/test/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/oauth/callback/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/oauth/initiate/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/oauth/reset/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/build/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/derive-secrets/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/install/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/install/status/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/installed/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/resolve/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/scan-targets/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/search/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/packages/uninstall/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/[id]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/[id]/run/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/[id]/runs/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/preview-schedule/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/reconcile/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/planned-executions/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/auth/resend/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/auth/reset/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/auth/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/feedback/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/oauth/callback/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/oauth/initiate/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/packages/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/publish/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/registry/settings/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/restore/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/runs/active/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/setup/ai-cli/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/statistics/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/storage/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/telemetry/daily-active/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/update/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/waves/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/api/webhooks/[id]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/automation/triggers/page-594a6294c58344bf.js +1 -0
- package/.next/static/chunks/app/automation/waves/page-ce2fef4996cad8e6.js +1 -0
- package/.next/static/chunks/app/chat/page-203cb7bf21638ada.js +1 -0
- package/.next/static/chunks/app/docs/page-c466a58caf5e3336.js +1 -0
- package/.next/static/chunks/app/executions/page-fcc848de86714386.js +1 -0
- package/.next/static/chunks/app/flows/page-172c759ca81ba02f.js +1 -0
- package/.next/static/chunks/app/layout-a6ca531683a518a7.js +1 -0
- package/.next/static/chunks/app/mcp/page-0a96e6b30e45b1e6.js +1 -0
- package/.next/static/chunks/app/mcp-flows/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/mcp-proxy/[server]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/models/error-1964203c5c6e7d0e.js +1 -0
- package/.next/static/chunks/app/models/{loading-1687ae86584f5b1b.js → loading-0cdcf9bae7d3b8f3.js} +1 -1
- package/.next/static/chunks/app/models/page-ad1cbea6d3324966.js +1 -0
- package/.next/static/chunks/app/packages/page-dda48425be9fc137.js +1 -0
- package/.next/static/chunks/app/page-04189aa1b1318c2d.js +1 -0
- package/.next/static/chunks/app/settings/page-906c229c87011ead.js +1 -0
- package/.next/static/chunks/app/statistics/page-9b13a95549f438c0.js +1 -0
- package/.next/static/chunks/app/v1/chat/completions/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/breakpoints/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/cancel/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/continue/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/step/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/edit-state/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/events/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/inject/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/respond/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/revert/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/conversations/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/chat/events/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/v1/models/route-e70b5e2b4e09002b.js +1 -0
- package/.next/static/chunks/app/waves/page-5b53af3eb9409414.js +1 -0
- package/.next/static/chunks/webpack-9fbd3587b9ef4dca.js +1 -0
- package/.next/static/css/400b1b927c3ffaf6.css +1 -0
- package/.next/static/css/82efa7d39b03a714.css +1 -0
- package/.next/trace +11 -10
- package/.next/types/app/api/flow/[id]/convert-process-to-subflow/route.ts +347 -0
- package/.next/types/app/api/flow/assist/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/authoring/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/automation/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/flows/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/resources/read/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/resources/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/servers/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/state/route.ts +347 -0
- package/.next/types/app/api/mcp/flujo/tools/route.ts +347 -0
- package/.next/types/app/api/setup/ai-cli/route.ts +347 -0
- package/.next/types/app/api/statistics/route.ts +347 -0
- package/.next/types/app/{layout.ts → automation/triggers/page.ts} +6 -6
- package/.next/types/app/{waves → automation/waves}/page.ts +3 -3
- package/.next/types/app/{executions → statistics}/page.ts +3 -3
- package/.next/types/app/v1/chat/conversations/[conversationId]/revert/route.ts +347 -0
- package/.next/types/routes.d.ts +18 -2
- package/.next/types/validator.ts +144 -0
- package/README.md +79 -52
- package/bin/flujo.mjs +42 -5
- package/mcp-servers/README.md +94 -0
- package/mcp-servers/bash/dist/index.d.ts +3 -0
- package/mcp-servers/bash/dist/index.js +85 -0
- package/mcp-servers/bash/dist/index.js.map +1 -0
- package/mcp-servers/bash/dist/resources.d.ts +13 -0
- package/mcp-servers/bash/dist/resources.js +298 -0
- package/mcp-servers/bash/dist/resources.js.map +1 -0
- package/mcp-servers/bash/dist/shared.d.ts +24 -0
- package/mcp-servers/bash/dist/shared.js +161 -0
- package/mcp-servers/bash/dist/shared.js.map +1 -0
- package/mcp-servers/bash/dist/tools.d.ts +59 -0
- package/mcp-servers/bash/dist/tools.js +1493 -0
- package/mcp-servers/bash/dist/tools.js.map +1 -0
- package/mcp-servers/bash/package.json +33 -0
- package/mcp-servers/browser/dist/index.d.ts +4 -0
- package/mcp-servers/browser/dist/index.js +34 -0
- package/mcp-servers/browser/dist/index.js.map +1 -0
- package/mcp-servers/browser/dist/resources.d.ts +6 -0
- package/mcp-servers/browser/dist/resources.js +78 -0
- package/mcp-servers/browser/dist/resources.js.map +1 -0
- package/mcp-servers/browser/dist/runtime.d.ts +26 -0
- package/mcp-servers/browser/dist/runtime.js +343 -0
- package/mcp-servers/browser/dist/runtime.js.map +1 -0
- package/mcp-servers/browser/dist/tools.d.ts +3 -0
- package/mcp-servers/browser/dist/tools.js +283 -0
- package/mcp-servers/browser/dist/tools.js.map +1 -0
- package/mcp-servers/browser/package.json +31 -0
- package/mcp-servers/filesystem/dist/index.d.ts +3 -0
- package/mcp-servers/filesystem/dist/index.js +56 -0
- package/mcp-servers/filesystem/dist/index.js.map +1 -0
- package/mcp-servers/filesystem/dist/resources.d.ts +49 -0
- package/{.next/server/chunks/9724.js → mcp-servers/filesystem/dist/resources.js} +592 -391
- package/mcp-servers/filesystem/dist/resources.js.map +1 -0
- package/mcp-servers/filesystem/dist/shared.d.ts +24 -0
- package/mcp-servers/filesystem/dist/shared.js +161 -0
- package/mcp-servers/filesystem/dist/shared.js.map +1 -0
- package/mcp-servers/filesystem/dist/tools.d.ts +3 -0
- package/mcp-servers/filesystem/dist/tools.js +1229 -0
- package/mcp-servers/filesystem/dist/tools.js.map +1 -0
- package/mcp-servers/filesystem/package.json +30 -0
- package/mcp-servers/flujo/dist/client.d.ts +12 -0
- package/mcp-servers/flujo/dist/client.js +144 -0
- package/mcp-servers/flujo/dist/client.js.map +1 -0
- package/mcp-servers/flujo/dist/index.d.ts +2 -0
- package/mcp-servers/flujo/dist/index.js +31 -0
- package/mcp-servers/flujo/dist/index.js.map +1 -0
- package/mcp-servers/flujo/package.json +29 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.d.ts +11 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.js +161 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.d.ts +53 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.js +206 -0
- package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/index.d.ts +2 -0
- package/mcp-servers/mcp-whatsapp-web/dist/index.js +128 -0
- package/mcp-servers/mcp-whatsapp-web/dist/index.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/server.d.ts +28 -0
- package/mcp-servers/mcp-whatsapp-web/dist/server.js +268 -0
- package/mcp-servers/mcp-whatsapp-web/dist/server.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.d.ts +149 -0
- package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.js +818 -0
- package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.d.ts +8 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.js +232 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.d.ts +3 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.js +90 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.d.ts +3 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.js +65 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/media.d.ts +3 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/media.js +245 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/media.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.d.ts +3 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.js +141 -0
- package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/index.d.ts +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/index.js +3 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/index.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.d.ts +16 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.js +5 -0
- package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.d.ts +23 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.js +99 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.d.ts +12 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.js +72 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.d.ts +84 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.js +297 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.d.ts +12 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.js +141 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.d.ts +2 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.js +69 -0
- package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.js.map +1 -0
- package/mcp-servers/mcp-whatsapp-web/package.json +75 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/index.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/index.js +95 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/index.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.js +195 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.js +214 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.d.ts +21 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.js +108 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.js +301 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.js +22 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.js +146 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.js +179 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.js +236 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.d.ts +8 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.js +300 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.d.ts +50 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.js +78 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.d.ts +51 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.js +61 -0
- package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.js.map +1 -0
- package/mcp-servers/mcp-windows-desktop-automation/package.json +38 -0
- package/mcp-servers/patchright-mcp/package.json +32 -0
- package/mcp-servers/reddit-mcp-server/package.json +88 -0
- package/mcp-servers/servers/package.json +31 -0
- package/mcp-servers/shared/dist/index.d.ts +24 -0
- package/mcp-servers/shared/dist/index.js +161 -0
- package/mcp-servers/shared/dist/index.js.map +1 -0
- package/mcp-servers/shared/package.json +26 -0
- package/package.json +119 -99
- package/scripts/launch-next.mjs +13 -1
- package/.next/server/chunks/1114.js +0 -1
- package/.next/server/chunks/1439.js +0 -1
- package/.next/server/chunks/1578.js +0 -5
- package/.next/server/chunks/1634.js +0 -1
- package/.next/server/chunks/166.js +0 -5
- package/.next/server/chunks/1664.js +0 -2
- package/.next/server/chunks/1690.js +0 -1
- package/.next/server/chunks/2859.js +0 -1
- package/.next/server/chunks/3629.js +0 -1
- package/.next/server/chunks/3653.js +0 -2
- package/.next/server/chunks/366.js +0 -2
- package/.next/server/chunks/3717.js +0 -1
- package/.next/server/chunks/3935.js +0 -4
- package/.next/server/chunks/3984.js +0 -9
- package/.next/server/chunks/4013.js +0 -1
- package/.next/server/chunks/4436.js +0 -1
- package/.next/server/chunks/4466.js +0 -1
- package/.next/server/chunks/4551.js +0 -6
- package/.next/server/chunks/4663.js +0 -1
- package/.next/server/chunks/4822.js +0 -1
- package/.next/server/chunks/5200.js +0 -1
- package/.next/server/chunks/5285.js +0 -1
- package/.next/server/chunks/5309.js +0 -78
- package/.next/server/chunks/544.js +0 -136
- package/.next/server/chunks/5463.js +0 -1
- package/.next/server/chunks/5544.js +0 -5
- package/.next/server/chunks/5880.js +0 -1
- package/.next/server/chunks/6747.js +0 -435
- package/.next/server/chunks/6793.js +0 -1
- package/.next/server/chunks/7069.js +0 -6
- package/.next/server/chunks/7104.js +0 -1
- package/.next/server/chunks/7634.js +0 -4
- package/.next/server/chunks/793.js +0 -403
- package/.next/server/chunks/7965.js +0 -39
- package/.next/server/chunks/7993.js +0 -2
- package/.next/server/chunks/8356.js +0 -1
- package/.next/server/chunks/8387.js +0 -1
- package/.next/server/chunks/87.js +0 -1
- package/.next/server/chunks/9085.js +0 -2
- package/.next/server/chunks/9174.js +0 -1
- package/.next/server/chunks/9235.js +0 -29
- package/.next/server/chunks/94.js +0 -1
- package/.next/server/chunks/9983.js +0 -2
- package/.next/static/chunks/1871-14c3e63ca865d85e.js +0 -1
- package/.next/static/chunks/2003-f826c607d609d1fa.js +0 -1
- package/.next/static/chunks/2005.4eea65c00d9a29cd.js +0 -1
- package/.next/static/chunks/2318-13ef0d3048e97834.js +0 -1
- package/.next/static/chunks/3077-565833c67440a7fa.js +0 -1
- package/.next/static/chunks/3217.260785c2198d1e9d.js +0 -1
- package/.next/static/chunks/3272-fd8d59523f61da96.js +0 -1
- package/.next/static/chunks/3429-34fb1a84aed96703.js +0 -1
- package/.next/static/chunks/3545.353a62a68d3b7fd1.js +0 -1
- package/.next/static/chunks/3659-0ab9580d5ee5deea.js +0 -1
- package/.next/static/chunks/3772-20197853c04a6993.js +0 -1
- package/.next/static/chunks/422-61b173ba64cf0c94.js +0 -1
- package/.next/static/chunks/4523-a540747aa2ed34e8.js +0 -1
- package/.next/static/chunks/454.5fc2f8eef98483e3.js +0 -1
- package/.next/static/chunks/488-7ab54d8ae2b4b550.js +0 -1
- package/.next/static/chunks/4919-6c8a48e3cc642349.js +0 -1
- package/.next/static/chunks/4929-150b03595474c9d8.js +0 -1
- package/.next/static/chunks/5733-1419095a28c1ddc3.js +0 -1
- package/.next/static/chunks/639-90ed75d402dc872b.js +0 -1
- package/.next/static/chunks/6404-86615a5f5ce5c00f.js +0 -1
- package/.next/static/chunks/6430-8c6dac4a758119f2.js +0 -1
- package/.next/static/chunks/6539-118a0084e0bfae34.js +0 -1
- package/.next/static/chunks/7264-91d1fa99abcd91ad.js +0 -1
- package/.next/static/chunks/7328-c8a51bb8c7470d77.js +0 -1
- package/.next/static/chunks/7391-5a0abd837ba241f5.js +0 -1
- package/.next/static/chunks/7445-d8a8be6e451c522e.js +0 -1
- package/.next/static/chunks/7561-2b366ddcbc3cc0ec.js +0 -1
- package/.next/static/chunks/8124-4a80e3201b8e51b0.js +0 -1
- package/.next/static/chunks/8345.bc5534ec13abc9ee.js +0 -1
- package/.next/static/chunks/8404-5aa8ea49197b98b8.js +0 -1
- package/.next/static/chunks/8405.a425f94b6b13d2be.js +0 -1
- package/.next/static/chunks/8470-72cf748472d4d501.js +0 -1
- package/.next/static/chunks/8551-a28272acfda62ac9.js +0 -1
- package/.next/static/chunks/8650-f879564a0ed89bc3.js +0 -1
- package/.next/static/chunks/8989-5fa9c7c670eb9a1a.js +0 -1
- package/.next/static/chunks/9164-de1d167d87614a6d.js +0 -1
- package/.next/static/chunks/9195.294887f083b1a11b.js +0 -1
- package/.next/static/chunks/9203-786f457ecf60b49c.js +0 -1
- package/.next/static/chunks/9244-3281f7fd02003a2c.js +0 -1
- package/.next/static/chunks/9345-11d6e48d892b1862.js +0 -8
- package/.next/static/chunks/9562-f8371be653010627.js +0 -1
- package/.next/static/chunks/9581-6d2523fd68a5e3c4.js +0 -1
- package/.next/static/chunks/9611-9867e6e8e65172ec.js +0 -1
- package/.next/static/chunks/9951-566fc6b05c12209e.js +0 -1
- package/.next/static/chunks/app/api/approvals/[id]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/approvals/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/backup/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/browse/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/bugs/enhance/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/cwd/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/encryption/secure/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/env/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/[id]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/[id]/versions/[versionId]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/[id]/versions/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/compile/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/generate/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/generator/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/improve/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/prompt-renderer/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/quick-chat/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/repair/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/flow/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/git/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/init/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/local-models/capability/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/local-models/pull/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/local-models/suggest/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/app-sandbox/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/cancel/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/oauth-capability/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/get/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/resources/read/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/resources/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/status/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/tools/[toolName]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/[name]/tools/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/servers/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/test-connection/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp/test-connection/stream/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp-registry/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/mcp-registry/spotlight/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/model/[id]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/model/provider/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/model/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/model/test/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/oauth/callback/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/oauth/initiate/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/oauth/reset/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/build/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/derive-secrets/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/install/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/install/status/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/installed/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/resolve/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/scan-targets/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/search/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/packages/uninstall/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/[id]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/[id]/run/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/[id]/runs/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/preview-schedule/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/reconcile/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/planned-executions/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/auth/resend/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/auth/reset/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/auth/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/feedback/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/oauth/callback/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/oauth/initiate/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/packages/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/publish/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/registry/settings/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/restore/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/runs/active/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/storage/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/telemetry/daily-active/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/update/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/waves/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/api/webhooks/[id]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/chat/page-e37bbc561f40ce60.js +0 -1
- package/.next/static/chunks/app/docs/page-3b9ce48854b2147d.js +0 -1
- package/.next/static/chunks/app/executions/page-8296fd69c439ccee.js +0 -1
- package/.next/static/chunks/app/flows/page-e52c8943555e38dd.js +0 -1
- package/.next/static/chunks/app/layout-abed1f211e03152f.js +0 -1
- package/.next/static/chunks/app/mcp/page-4a3e5a643d84ee89.js +0 -1
- package/.next/static/chunks/app/mcp-flows/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/mcp-proxy/[server]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/models/error-1718b538d6967e56.js +0 -1
- package/.next/static/chunks/app/models/page-595597042e227970.js +0 -1
- package/.next/static/chunks/app/packages/page-2f2d29c17841b3cf.js +0 -1
- package/.next/static/chunks/app/page-2f9da78a4891731a.js +0 -1
- package/.next/static/chunks/app/settings/page-f35e939032b0277d.js +0 -1
- package/.next/static/chunks/app/v1/chat/completions/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/breakpoints/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/cancel/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/continue/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/step/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/edit-state/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/events/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/inject/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/respond/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/conversations/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/chat/events/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/v1/models/route-b9c783850b4c2acf.js +0 -1
- package/.next/static/chunks/app/waves/page-dc99a16141dd902b.js +0 -1
- package/.next/static/chunks/webpack-9d09d53b271f49e2.js +0 -1
- package/.next/static/css/30253fcfa8035221.css +0 -1
- package/.next/static/css/69ab44eb350e0b6c.css +0 -1
- package/.next/static/kIFnN4S0HHOnvpPGsSzi9/_buildManifest.js +0 -1
- /package/.next/static/{kIFnN4S0HHOnvpPGsSzi9 → b1aMk0634gkkiunttd1SQ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { log } from '../utils/logger.js';
|
|
3
|
+
// Import the CommonJS module
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const { MessageMedia } = require('whatsapp-web.js');
|
|
7
|
+
// Using WAWebJS.Message directly instead of alias
|
|
8
|
+
import { AudioUtils } from '../utils/audio.js'; // To be created
|
|
9
|
+
import fs from 'fs';
|
|
10
|
+
import path from 'path';
|
|
11
|
+
import os from 'os';
|
|
12
|
+
import { fileTypeFromBuffer } from 'file-type'; // Need to install file-type
|
|
13
|
+
export function registerMediaTools(server, whatsappService) {
|
|
14
|
+
log.info('Registering media tools...');
|
|
15
|
+
// Combined tool for sending various media types
|
|
16
|
+
server.tool('send_media', 'Send media (image, video, document, audio) via WhatsApp.', {
|
|
17
|
+
recipient_jid: z.string().describe('The recipient JID (e.g., 123456789@c.us or 123456789-12345678@g.us)'),
|
|
18
|
+
media_path: z.string().optional().describe('Absolute path to the local media file'),
|
|
19
|
+
media_url: z.string().url().optional().describe('URL of the media file'),
|
|
20
|
+
media_content: z.string().optional().describe('Base64 encoded media content'),
|
|
21
|
+
mime_type: z.string().optional().describe('MIME type of the media_content (required if using media_content)'),
|
|
22
|
+
filename: z.string().optional().describe('Filename for the media (recommended if using media_content)'),
|
|
23
|
+
caption: z.string().optional().describe('Optional caption for the media'),
|
|
24
|
+
as_audio_message: z.boolean().optional().default(false).describe('Send audio specifically as a voice note (requires ffmpeg for conversion if not opus/ogg)'),
|
|
25
|
+
include_full_data: z.boolean().optional().default(false).describe('Whether to include the full base64 data in the response')
|
|
26
|
+
}, async ({ recipient_jid, media_path, media_url, media_content, mime_type, filename, caption, as_audio_message, include_full_data = false, }) => {
|
|
27
|
+
let mediaInput = null;
|
|
28
|
+
let inputType = null;
|
|
29
|
+
if (media_path) {
|
|
30
|
+
mediaInput = media_path;
|
|
31
|
+
inputType = 'path';
|
|
32
|
+
}
|
|
33
|
+
else if (media_url) {
|
|
34
|
+
mediaInput = media_url;
|
|
35
|
+
inputType = 'url';
|
|
36
|
+
}
|
|
37
|
+
else if (media_content) {
|
|
38
|
+
if (!mime_type) {
|
|
39
|
+
return { content: [{ type: 'text', text: 'mime_type is required when using media_content' }], isError: true };
|
|
40
|
+
}
|
|
41
|
+
mediaInput = media_content;
|
|
42
|
+
inputType = 'base64';
|
|
43
|
+
}
|
|
44
|
+
if (!mediaInput || !inputType) {
|
|
45
|
+
return { content: [{ type: 'text', text: 'One of media_path, media_url, or media_content must be provided' }], isError: true };
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
let sentMessage;
|
|
49
|
+
let finalMediaPath = media_path; // Keep track of the path used, especially for temp files
|
|
50
|
+
if (as_audio_message) {
|
|
51
|
+
// Handle sending as audio message (voice note)
|
|
52
|
+
log.info(`Attempting to send audio message to ${recipient_jid}`);
|
|
53
|
+
let audioPath = '';
|
|
54
|
+
let tempFilePath = null;
|
|
55
|
+
let needsCleanup = false;
|
|
56
|
+
if (inputType === 'path') {
|
|
57
|
+
audioPath = mediaInput;
|
|
58
|
+
}
|
|
59
|
+
else if (inputType === 'url') {
|
|
60
|
+
return { content: [{ type: 'text', text: 'Sending audio message directly from URL is not yet supported. Download first.' }], isError: true };
|
|
61
|
+
// TODO: Implement download from URL first if needed
|
|
62
|
+
}
|
|
63
|
+
else { // base64
|
|
64
|
+
const buffer = Buffer.from(mediaInput, 'base64');
|
|
65
|
+
const detectedType = await fileTypeFromBuffer(buffer);
|
|
66
|
+
const ext = detectedType?.ext || 'bin'; // Fallback extension
|
|
67
|
+
tempFilePath = path.join(os.tmpdir(), `whatsapp_audio_${Date.now()}.${ext}`);
|
|
68
|
+
fs.writeFileSync(tempFilePath, buffer);
|
|
69
|
+
audioPath = tempFilePath;
|
|
70
|
+
needsCleanup = true;
|
|
71
|
+
mime_type = detectedType?.mime || mime_type || 'application/octet-stream'; // Use detected type if available
|
|
72
|
+
filename = filename || `audio.${ext}`;
|
|
73
|
+
}
|
|
74
|
+
if (!audioPath.endsWith('.ogg')) {
|
|
75
|
+
log.info(`Audio file ${audioPath} is not ogg, attempting conversion...`);
|
|
76
|
+
try {
|
|
77
|
+
const convertedPath = await AudioUtils.convertToOpusOggTemp(audioPath);
|
|
78
|
+
log.info(`Audio converted to ${convertedPath}`);
|
|
79
|
+
// If original was temp, clean it up now
|
|
80
|
+
if (needsCleanup && tempFilePath && fs.existsSync(tempFilePath)) {
|
|
81
|
+
fs.unlinkSync(tempFilePath);
|
|
82
|
+
}
|
|
83
|
+
tempFilePath = convertedPath; // Now the converted file is the temp file
|
|
84
|
+
needsCleanup = true; // Mark the converted file for cleanup
|
|
85
|
+
audioPath = convertedPath;
|
|
86
|
+
finalMediaPath = audioPath; // Update final path
|
|
87
|
+
}
|
|
88
|
+
catch (conversionError) {
|
|
89
|
+
log.warn(`Audio conversion failed: ${conversionError.message}. Sending as regular document/audio file.`);
|
|
90
|
+
// Fallback: Send as regular media without 'ptt' flag
|
|
91
|
+
const media = inputType === 'base64'
|
|
92
|
+
? new MessageMedia(mime_type, mediaInput, filename)
|
|
93
|
+
: (inputType === 'path' ? MessageMedia.fromFilePath(mediaInput) : await MessageMedia.fromUrl(mediaInput, { unsafeMime: true })); // Corrected logic: check path or assume URL
|
|
94
|
+
sentMessage = await whatsappService.getClient().sendMessage(recipient_jid, media, { caption });
|
|
95
|
+
// Cleanup temp file if created from base64
|
|
96
|
+
if (needsCleanup && tempFilePath && fs.existsSync(tempFilePath)) {
|
|
97
|
+
fs.unlinkSync(tempFilePath);
|
|
98
|
+
}
|
|
99
|
+
// Return result for regular media sending
|
|
100
|
+
const result = { success: true, message: 'Audio sent as regular file (conversion failed).', messageId: sentMessage.id._serialized };
|
|
101
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// Send the (potentially converted) ogg file as a voice note
|
|
105
|
+
const media = MessageMedia.fromFilePath(audioPath);
|
|
106
|
+
sentMessage = await whatsappService.getClient().sendMessage(recipient_jid, media, { sendAudioAsVoice: true }); // Key option!
|
|
107
|
+
// Cleanup temp file if created
|
|
108
|
+
if (needsCleanup && tempFilePath && fs.existsSync(tempFilePath)) {
|
|
109
|
+
fs.unlinkSync(tempFilePath);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// Handle sending regular media (image, video, document)
|
|
114
|
+
log.info(`Sending regular media to ${recipient_jid}`);
|
|
115
|
+
// Determine finalMediaPath based on inputType
|
|
116
|
+
if (inputType === 'path') {
|
|
117
|
+
finalMediaPath = mediaInput;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
finalMediaPath = undefined; // URL or base64 doesn't have a local path
|
|
121
|
+
}
|
|
122
|
+
// The sendMedia method in WhatsAppService handles the different input types (path/url)
|
|
123
|
+
// For base64, we need to call a different service method
|
|
124
|
+
if (inputType === 'base64') {
|
|
125
|
+
sentMessage = await whatsappService.sendMediaFromBase64(recipient_jid, mediaInput, mime_type, filename, caption);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
sentMessage = await whatsappService.sendMedia(recipient_jid, mediaInput, caption);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Create result object with basic info
|
|
132
|
+
const result = {
|
|
133
|
+
success: true,
|
|
134
|
+
message: `Media (${as_audio_message ? 'audio message' : 'file'}) sent successfully.`,
|
|
135
|
+
messageId: sentMessage.id._serialized,
|
|
136
|
+
timestamp: sentMessage.timestamp,
|
|
137
|
+
filePathUsed: finalMediaPath // Include the path if a local file was ultimately sent
|
|
138
|
+
};
|
|
139
|
+
// If include_full_data is true, include the media content in the result
|
|
140
|
+
if (include_full_data && mediaInput) {
|
|
141
|
+
// For base64 input, we already have the data
|
|
142
|
+
if (inputType === 'base64') {
|
|
143
|
+
result.mediaData = media_content;
|
|
144
|
+
result.mimeType = mime_type;
|
|
145
|
+
}
|
|
146
|
+
// For path or URL, we need to get the data
|
|
147
|
+
else if (inputType === 'path' && fs.existsSync(mediaInput)) {
|
|
148
|
+
try {
|
|
149
|
+
const buffer = fs.readFileSync(mediaInput);
|
|
150
|
+
result.mediaData = buffer.toString('base64');
|
|
151
|
+
// Try to determine mime type
|
|
152
|
+
const detectedType = await fileTypeFromBuffer(buffer);
|
|
153
|
+
result.mimeType = detectedType?.mime || 'application/octet-stream';
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
log.warn(`Could not read file for include_full_data: ${err}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// For URL, we don't re-download it to include in the response
|
|
160
|
+
}
|
|
161
|
+
log.debug('Send media result', JSON.stringify(result));
|
|
162
|
+
return {
|
|
163
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
log.error(`Error in send_media tool to ${recipient_jid}:`, error);
|
|
168
|
+
return {
|
|
169
|
+
content: [{ type: 'text', text: `Error sending media to ${recipient_jid}: ${error.message}` }],
|
|
170
|
+
isError: true,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
server.tool('download_media', 'Download media from a WhatsApp message and return its content.', {
|
|
175
|
+
message_id: z.string().describe('The serialized ID of the message containing the media'),
|
|
176
|
+
include_full_data: z.boolean().optional().default(false).describe('Whether to include the full base64 data in the response')
|
|
177
|
+
}, async ({ message_id, include_full_data = false }) => {
|
|
178
|
+
try {
|
|
179
|
+
const media = await whatsappService.downloadMedia(message_id);
|
|
180
|
+
if (!media) {
|
|
181
|
+
return {
|
|
182
|
+
content: [{ type: 'text', text: `Media not found or failed to download for message: ${message_id}` }],
|
|
183
|
+
isError: true,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// Extract metadata
|
|
187
|
+
const metadata = {
|
|
188
|
+
filename: media.filename || 'unknown',
|
|
189
|
+
mimetype: media.mimetype,
|
|
190
|
+
filesize: media.filesize || 'unknown'
|
|
191
|
+
};
|
|
192
|
+
log.debug('Media metadata', JSON.stringify(metadata));
|
|
193
|
+
// Create a TextContent with metadata as the first item in the content array
|
|
194
|
+
const metadataContent = {
|
|
195
|
+
type: 'text',
|
|
196
|
+
text: JSON.stringify(metadata, null, 2)
|
|
197
|
+
};
|
|
198
|
+
// Prepare the array for the response content
|
|
199
|
+
const contentArray = [metadataContent];
|
|
200
|
+
// If include_full_data is true, add a second content object with the actual media data
|
|
201
|
+
if (include_full_data) {
|
|
202
|
+
if (media.mimetype.startsWith('image/')) {
|
|
203
|
+
// For images, add an ImageContent
|
|
204
|
+
contentArray.push({
|
|
205
|
+
type: 'image',
|
|
206
|
+
data: media.data,
|
|
207
|
+
mimeType: media.mimetype,
|
|
208
|
+
}); // Type assertion to satisfy TypeScript
|
|
209
|
+
}
|
|
210
|
+
else if (media.mimetype.startsWith('audio/')) {
|
|
211
|
+
// For audio, add an AudioContent
|
|
212
|
+
contentArray.push({
|
|
213
|
+
type: 'audio',
|
|
214
|
+
data: media.data,
|
|
215
|
+
mimeType: media.mimetype,
|
|
216
|
+
}); // Type assertion to satisfy TypeScript
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
// For videos, documents, etc., add as TextContent
|
|
220
|
+
contentArray.push({
|
|
221
|
+
type: 'text',
|
|
222
|
+
text: `Base64 Data: ${media.data}`
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
log.debug('Download media result', JSON.stringify({
|
|
227
|
+
metadata,
|
|
228
|
+
hasFullData: include_full_data,
|
|
229
|
+
mediaType: media.mimetype
|
|
230
|
+
}));
|
|
231
|
+
return {
|
|
232
|
+
content: contentArray,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
log.error(`Error in download_media tool for message ${message_id}:`, error);
|
|
237
|
+
return {
|
|
238
|
+
content: [{ type: 'text', text: `Error downloading media for message ${message_id}: ${error.message}` }],
|
|
239
|
+
isError: true,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
log.info('Media tools registered.');
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/tools/media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGzC,6BAA6B;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAIpD,kDAAkD;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC,CAAC,gBAAgB;AAChE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC,CAAC,4BAA4B;AAE5E,MAAM,UAAU,kBA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OAAO,KAAU,EAAE,CAAC;YACpB,GAAG,CAAC,KAAK,CAAC,4CAA4C,UAAU,GAAG,EAAE,KAAK,CAAC,CAAC;YAC5E,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uCAAuC,UAAU,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;gBACxG,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;IAEF,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { log } from '../utils/logger.js';
|
|
3
|
+
export function registerMessageTools(server, whatsappService) {
|
|
4
|
+
log.info('Registering message tools...');
|
|
5
|
+
server.tool('list_messages', 'Get WhatsApp messages from a specific chat. This is the source of truth for actual message content: use it whenever the question is about what someone said/wrote. Entries include non-text events too (check the "type" field: "chat" = text message, "call_log" = call, "ptt" = voice note, "image"/"video" = media; non-text entries may have an empty "body").', {
|
|
6
|
+
chat_id: z.string().describe('The JID of the chat to retrieve messages from (e.g., 123456789@c.us or 123456789-12345678@g.us)'),
|
|
7
|
+
limit: z.number().int().positive().optional().default(50).describe('Maximum number of messages to return'),
|
|
8
|
+
// Note: whatsapp-web.js fetchMessages doesn't support date/sender/query filtering directly.
|
|
9
|
+
// Filtering would need to be done after fetching.
|
|
10
|
+
}, async ({ chat_id, limit }) => {
|
|
11
|
+
try {
|
|
12
|
+
const messages = await whatsappService.getMessages(chat_id, limit);
|
|
13
|
+
// Return the simplified message structure
|
|
14
|
+
return {
|
|
15
|
+
content: [{ type: 'text', text: JSON.stringify(messages, null, 2) }],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
log.error(`Error in list_messages tool for chat ${chat_id}:`, error);
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: 'text', text: `Error listing messages for chat ${chat_id}: ${error.message}` }],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
server.tool('get_message_by_id', 'Get a specific WhatsApp message by its ID.', {
|
|
27
|
+
message_id: z.string().describe('The serialized ID of the message (e.g., true_123456789@c.us_ABCDEFGHIJKL)'),
|
|
28
|
+
}, async ({ message_id }) => {
|
|
29
|
+
try {
|
|
30
|
+
const message = await whatsappService.getMessageById(message_id);
|
|
31
|
+
if (!message) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: 'text', text: `Message not found for ID: ${message_id}` }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
content: [{ type: 'text', text: JSON.stringify(message, null, 2) }],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
log.error(`Error in get_message_by_id tool for ID ${message_id}:`, error);
|
|
43
|
+
return {
|
|
44
|
+
content: [{ type: 'text', text: `Error getting message ${message_id}: ${error.message}` }],
|
|
45
|
+
isError: true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
// get_message_context is complex with whatsapp-web.js as it requires fetching messages around a specific one.
|
|
50
|
+
// A simple implementation might fetch N messages before/after based on timestamp, but exact context is hard.
|
|
51
|
+
// Let's implement a version that fetches recent messages and identifies the target.
|
|
52
|
+
server.tool('get_message_context', 'Get recent messages around a specific message ID within its chat (context accuracy depends on fetch limit).', {
|
|
53
|
+
message_id: z.string().describe('The serialized ID of the target message'),
|
|
54
|
+
limit: z.number().int().positive().optional().default(20).describe('Number of recent messages to fetch for context'),
|
|
55
|
+
}, async ({ message_id, limit }) => {
|
|
56
|
+
try {
|
|
57
|
+
// First, get the target message to find its chat ID
|
|
58
|
+
const targetMessage = await whatsappService.getMessageById(message_id);
|
|
59
|
+
if (!targetMessage) {
|
|
60
|
+
return {
|
|
61
|
+
content: [{ type: 'text', text: `Target message not found: ${message_id}` }],
|
|
62
|
+
isError: true,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
// Fetch recent messages from the same chat
|
|
66
|
+
const recentMessages = await whatsappService.getMessages(targetMessage.to, limit);
|
|
67
|
+
// Find the index of the target message
|
|
68
|
+
const targetIndex = recentMessages.findIndex(msg => msg.id === message_id);
|
|
69
|
+
// Structure the context (this is approximate)
|
|
70
|
+
const context = {
|
|
71
|
+
targetMessage: targetMessage,
|
|
72
|
+
// Note: 'before' and 'after' here are just messages fetched chronologically,
|
|
73
|
+
// not necessarily the exact messages before/after in the full history.
|
|
74
|
+
contextMessages: recentMessages,
|
|
75
|
+
targetIndex: targetIndex, // Index within the fetched contextMessages array
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
content: [{ type: 'text', text: JSON.stringify(context, null, 2) }],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
log.error(`Error in get_message_context tool for message ${message_id}:`, error);
|
|
83
|
+
return {
|
|
84
|
+
content: [{ type: 'text', text: `Error getting context for message ${message_id}: ${error.message}` }],
|
|
85
|
+
isError: true,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// get_last_interaction is similar to list_chats with limit 1
|
|
90
|
+
server.tool('get_last_interaction', 'Get the most recent event involving a specific contact or group JID. IMPORTANT: this returns the newest event of ANY type - including call logs, media, and system notifications, which have an empty "body" - NOT necessarily the last text message. To read what was actually said, use list_messages instead.', {
|
|
91
|
+
jid: z.string().describe('The JID of the contact or group (e.g., 123456789@c.us or 123456789-12345678@g.us)'),
|
|
92
|
+
}, async ({ jid }) => {
|
|
93
|
+
try {
|
|
94
|
+
// Fetch the chat to get the last message
|
|
95
|
+
const chat = await whatsappService.getChatById(jid);
|
|
96
|
+
if (!chat || !chat.lastMessage) {
|
|
97
|
+
return {
|
|
98
|
+
content: [{ type: 'text', text: `No recent interaction found for JID: ${jid}` }],
|
|
99
|
+
isError: true, // Consider if this should be an error or just empty result
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
content: [{ type: 'text', text: JSON.stringify(chat.lastMessage, null, 2) }],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
log.error(`Error in get_last_interaction tool for JID ${jid}:`, error);
|
|
108
|
+
return {
|
|
109
|
+
content: [{ type: 'text', text: `Error getting last interaction for ${jid}: ${error.message}` }],
|
|
110
|
+
isError: true,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
server.tool('send_message', 'Send a WhatsApp text message to a person or group.', {
|
|
115
|
+
recipient_jid: z.string().describe('The recipient JID (e.g., 123456789@c.us or 123456789-12345678@g.us)'),
|
|
116
|
+
message: z.string().describe('The message text to send'),
|
|
117
|
+
}, async ({ recipient_jid, message }) => {
|
|
118
|
+
try {
|
|
119
|
+
const sentMessage = await whatsappService.sendMessage(recipient_jid, message);
|
|
120
|
+
// Return confirmation or details of the sent message
|
|
121
|
+
const result = {
|
|
122
|
+
success: true,
|
|
123
|
+
message: 'Message sent successfully.',
|
|
124
|
+
messageId: sentMessage.id._serialized,
|
|
125
|
+
timestamp: sentMessage.timestamp,
|
|
126
|
+
};
|
|
127
|
+
return {
|
|
128
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
log.error(`Error in send_message tool to ${recipient_jid}:`, error);
|
|
133
|
+
return {
|
|
134
|
+
content: [{ type: 'text', text: `Error sending message to ${recipient_jid}: ${error.message}` }],
|
|
135
|
+
isError: true,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
log.info('Message tools registered.');
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","s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}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { SimpleChat, SimpleContact, SimpleMessage, } from '../services/whatsapp.js';
|
|
2
|
+
export interface MediaDownloadResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
base64Data?: string;
|
|
7
|
+
filename?: string;
|
|
8
|
+
tempPath?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SendMediaResult {
|
|
11
|
+
success: boolean;
|
|
12
|
+
message: string;
|
|
13
|
+
messageId?: string;
|
|
14
|
+
timestamp?: number;
|
|
15
|
+
filePathUsed?: string | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp.js","sourceRoot":"","sources":["../../src/types/whatsapp.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wDAAwD;;AA0BxD,4EAA4E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class AudioUtils {
|
|
2
|
+
/**
|
|
3
|
+
* Convert an audio file to Opus format in an Ogg container using ffmpeg.
|
|
4
|
+
* Throws an error if ffmpeg is not found or conversion fails.
|
|
5
|
+
*
|
|
6
|
+
* @param inputPath Path to the input audio file.
|
|
7
|
+
* @param outputPath Optional path for the output file. Defaults to input path with .ogg extension.
|
|
8
|
+
* @param bitrate Target bitrate (e.g., "32k").
|
|
9
|
+
* @param sampleRate Target sample rate (e.g., 24000).
|
|
10
|
+
* @returns Path to the converted file.
|
|
11
|
+
*/
|
|
12
|
+
static convertToOpusOgg(inputPath: string, outputPath?: string, bitrate?: string, sampleRate?: number): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Converts an audio file to Opus/Ogg and saves it to a temporary file.
|
|
15
|
+
* Useful when you need a temporary .ogg file for sending.
|
|
16
|
+
*
|
|
17
|
+
* @param inputPath Path to the input audio file.
|
|
18
|
+
* @param bitrate Target bitrate.
|
|
19
|
+
* @param sampleRate Target sample rate.
|
|
20
|
+
* @returns Path to the temporary converted file.
|
|
21
|
+
*/
|
|
22
|
+
static convertToOpusOggTemp(inputPath: string, bitrate?: string, sampleRate?: number): Promise<string>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import ffmpeg from 'fluent-ffmpeg';
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import os from 'os';
|
|
6
|
+
import { log } from './logger.js';
|
|
7
|
+
// ffmpeg-static is CommonJS (module.exports = <path string>), so load it via
|
|
8
|
+
// require to get correct typings under NodeNext module resolution.
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
const ffmpegStatic = require('ffmpeg-static');
|
|
11
|
+
// Resolution order: FFMPEG_PATH env var (manual override) -> binary bundled
|
|
12
|
+
// by ffmpeg-static (installed automatically with npm install) -> system PATH.
|
|
13
|
+
const FFMPEG_PATH = process.env.FFMPEG_PATH || ffmpegStatic || null;
|
|
14
|
+
if (FFMPEG_PATH) {
|
|
15
|
+
ffmpeg.setFfmpegPath(FFMPEG_PATH);
|
|
16
|
+
// Expose the resolved path so fluent-ffmpeg usages inside whatsapp-web.js
|
|
17
|
+
// (video/sticker conversion) pick up the same binary.
|
|
18
|
+
process.env.FFMPEG_PATH = FFMPEG_PATH;
|
|
19
|
+
log.info(`Using ffmpeg at: ${FFMPEG_PATH}`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
log.warn('No ffmpeg binary found. Audio conversion will rely on ffmpeg being in the system PATH.');
|
|
23
|
+
}
|
|
24
|
+
export class AudioUtils {
|
|
25
|
+
/**
|
|
26
|
+
* Convert an audio file to Opus format in an Ogg container using ffmpeg.
|
|
27
|
+
* Throws an error if ffmpeg is not found or conversion fails.
|
|
28
|
+
*
|
|
29
|
+
* @param inputPath Path to the input audio file.
|
|
30
|
+
* @param outputPath Optional path for the output file. Defaults to input path with .ogg extension.
|
|
31
|
+
* @param bitrate Target bitrate (e.g., "32k").
|
|
32
|
+
* @param sampleRate Target sample rate (e.g., 24000).
|
|
33
|
+
* @returns Path to the converted file.
|
|
34
|
+
*/
|
|
35
|
+
static convertToOpusOgg(inputPath, outputPath, bitrate = '32k', sampleRate = 24000) {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
if (!fs.existsSync(inputPath)) {
|
|
38
|
+
return reject(new Error(`Input file not found: ${inputPath}`));
|
|
39
|
+
}
|
|
40
|
+
const finalOutputPath = outputPath || `${path.parse(inputPath).name}.ogg`;
|
|
41
|
+
const outputDir = path.dirname(finalOutputPath);
|
|
42
|
+
if (!fs.existsSync(outputDir)) {
|
|
43
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
log.debug(`Starting ffmpeg conversion: ${inputPath} -> ${finalOutputPath}`);
|
|
46
|
+
ffmpeg(inputPath)
|
|
47
|
+
.audioCodec('libopus')
|
|
48
|
+
.audioBitrate(bitrate)
|
|
49
|
+
.audioFrequency(sampleRate)
|
|
50
|
+
.outputOptions([
|
|
51
|
+
'-application voip', // Optimize for voice
|
|
52
|
+
'-vbr on', // Variable bitrate
|
|
53
|
+
'-compression_level 10', // Max compression
|
|
54
|
+
'-frame_duration 60', // Good frame duration for voice
|
|
55
|
+
])
|
|
56
|
+
.output(finalOutputPath)
|
|
57
|
+
.on('end', () => {
|
|
58
|
+
log.debug(`ffmpeg conversion finished: ${finalOutputPath}`);
|
|
59
|
+
resolve(finalOutputPath);
|
|
60
|
+
})
|
|
61
|
+
.on('error', (err) => {
|
|
62
|
+
log.error(`ffmpeg conversion error for ${inputPath}:`, err);
|
|
63
|
+
reject(new Error(`ffmpeg conversion failed: ${err.message}`));
|
|
64
|
+
})
|
|
65
|
+
.run();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Converts an audio file to Opus/Ogg and saves it to a temporary file.
|
|
70
|
+
* Useful when you need a temporary .ogg file for sending.
|
|
71
|
+
*
|
|
72
|
+
* @param inputPath Path to the input audio file.
|
|
73
|
+
* @param bitrate Target bitrate.
|
|
74
|
+
* @param sampleRate Target sample rate.
|
|
75
|
+
* @returns Path to the temporary converted file.
|
|
76
|
+
*/
|
|
77
|
+
static async convertToOpusOggTemp(inputPath, bitrate = '32k', sampleRate = 24000) {
|
|
78
|
+
const tempFileName = `whatsapp_audio_converted_${Date.now()}.ogg`;
|
|
79
|
+
const tempOutputPath = path.join(os.tmpdir(), tempFileName);
|
|
80
|
+
log.debug(`Converting ${inputPath} to temporary file: ${tempOutputPath}`);
|
|
81
|
+
try {
|
|
82
|
+
const convertedPath = await this.convertToOpusOgg(inputPath, tempOutputPath, bitrate, sampleRate);
|
|
83
|
+
return convertedPath;
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
// Clean up temp file if conversion failed partway
|
|
87
|
+
if (fs.existsSync(tempOutputPath)) {
|
|
88
|
+
try {
|
|
89
|
+
fs.unlinkSync(tempOutputPath);
|
|
90
|
+
}
|
|
91
|
+
catch (cleanupError) {
|
|
92
|
+
log.warn(`Failed to clean up temporary file ${tempOutputPath}:`, cleanupError);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
throw error; // Re-throw the original conversion error
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=audio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/utils/audio.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,6EAA6E;AAC7E,mEAAmE;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;QAC1E,IAAI,CAAC;YACD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YAClG,OAAO,aAAa,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,kDAAkD;YAClD,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;gBAChC,IAAI,CAAC;oBACD,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;gBAClC,CAAC;gBAAC,OAAO,YAAY,EAAE,CAAC;oBACpB,GAAG,CAAC,IAAI,CAAC,qCAAqC,cAAc,GAAG,EAAE,YAAY,CAAC,CAAC;gBACnF,CAAC;YACL,CAAC;YACD,MAAM,KAAK,CAAC,CAAC,yCAAyC;QAC1D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the browser executable to use for whatsapp-web.js.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. BROWSER_EXECUTABLE_PATH env var (or legacy CHROME_EXECUTABLE_PATH)
|
|
6
|
+
* 2. Auto-detected Chrome or Edge in standard install locations
|
|
7
|
+
* 3. undefined - puppeteer falls back to its bundled Chromium
|
|
8
|
+
* (video/GIF sending will not work: bundled Chromium lacks H.264/AAC)
|
|
9
|
+
*
|
|
10
|
+
* @returns Absolute path to a browser executable, or undefined if none found.
|
|
11
|
+
*/
|
|
12
|
+
export declare function findBrowserExecutable(): string | undefined;
|