Skip to content

feat: add Jungle Grid integration#6459

Open
dejaguarkyng wants to merge 5 commits into
FlowiseAI:mainfrom
dejaguarkyng:feature/jungle-grid-integration
Open

feat: add Jungle Grid integration#6459
dejaguarkyng wants to merge 5 commits into
FlowiseAI:mainfrom
dejaguarkyng:feature/jungle-grid-integration

Conversation

@dejaguarkyng
Copy link
Copy Markdown

@dejaguarkyng dejaguarkyng commented Jun 1, 2026

Summary

Production-hardens the Jungle Grid Flowise tool integration against the current Jungle Grid API and MCP documentation.

What Changed

  • Aligns the Flowise tool surface with current Jungle Grid workflows: estimate, submit, list jobs, get job, runtime, stored logs, cancel, list artifacts, and get artifact.
  • Uses the documented stored logs endpoint with tail, limit, cursor, and stream filters.
  • Adds payload normalization for fine_tuning / fine-tuning, routing_mode -> optimize_for, and env -> environment.
  • Adds explicit schema validation before API calls so missing required fields fail before submission.
  • Improves structured API error handling and redacts API keys, bearer tokens, callback tokens, and secret-like fields from tool errors.
  • Keeps Jungle Grid credentials in Flowise credential storage with the API key field typed as password.
  • Expands integration docs with setup, scopes, usage patterns, examples, async polling, logs, artifacts, and live-infrastructure safety notes.
  • Adds focused unit tests for credential loading, request payload construction, estimate/submit flows, status/log/artifact actions, validation, API errors, and secret redaction.

Why This Is Production-Ready

  • Treats Jungle Grid as asynchronous production infrastructure: submit returns a job_id and users are guided to poll status/logs until terminal state.
  • Supports estimate-before-submit for cost/capacity/routing review before spending credits.
  • Uses Flowise's existing component and credential patterns.
  • Does not hardcode or commit secrets.
  • Does not expose live SSE logs as a synchronous Flowise tool; stored log polling is exposed instead.
  • Leaves unrelated Flowise files untouched.

Validation

Local checks:

  • pnpm --filter flowise-components exec eslint credentials/JungleGridApi.credential.ts nodes/tools/JungleGrid/JungleGrid.ts nodes/tools/JungleGrid/JungleGrid.test.ts nodes/tools/JungleGrid/core.ts nodes/tools/JungleGrid/core.test.ts --ext ts --report-unused-disable-directives --max-warnings 0
  • pnpm --filter flowise-components exec jest nodes/tools/JungleGrid/core.test.ts nodes/tools/JungleGrid/JungleGrid.test.ts --runInBand
  • pnpm --filter flowise-components build
  • git diff --check
  • Secret-pattern scan of changed Jungle Grid files

Live Jungle Grid API validation:

  • Authentication/list jobs succeeded.
  • Estimate succeeded for a low-cost python:3.11 batch smoke workload.
  • Job submit succeeded for the approved smoke workload.
  • Status polling observed queued/provisioning/starting/completed.
  • Runtime returned exit code 0 and stdout 42.
  • Stored logs returned 5 log entries, including stdout.
  • Artifact listing succeeded and returned 0 artifacts for the smoke job.
  • Artifact download skipped because the smoke job produced no managed artifact.
  • Cancellation skipped because the smoke job reached completed before cancellation was appropriate.

Maintainer Validation

  1. Create a Jungle Grid API credential in Flowise.
  2. Add the Jungle Grid tool node to an agent.
  3. Run jungle_grid_estimate_job with a small batch/inference payload.
  4. Submit only after reviewing the estimate.
  5. Poll jungle_grid_get_job, jungle_grid_get_job_runtime, and jungle_grid_get_job_logs.
  6. Use jungle_grid_list_artifacts and jungle_grid_get_artifact for workloads that write managed artifacts.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Jungle Grid tool integration, allowing Flowise agents to estimate, submit, monitor, and manage asynchronous workloads. It includes credential configuration, tool definitions, comprehensive documentation, unit tests, and an updated HTTP security agent lookup. The review feedback highlights opportunities to simplify code by making the responseErrorMessage function synchronous, and to make the removeUndefined and redactSensitiveParams utility functions more robust by properly handling arrays and non-plain objects.

Comment thread packages/components/nodes/tools/JungleGrid/core.ts
Comment thread packages/components/nodes/tools/JungleGrid/core.ts Outdated
Comment thread packages/components/nodes/tools/JungleGrid/core.ts
Comment thread packages/components/nodes/tools/JungleGrid/core.ts
dejaguarkyng and others added 4 commits June 1, 2026 01:15
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@dejaguarkyng
Copy link
Copy Markdown
Author

dejaguarkyng commented Jun 6, 2026

Updated this PR with production-readiness changes for the Jungle Grid Flowise integration.

Highlights:

  • Aligned tool actions with the current Jungle Grid API/MCP behavior.
  • Added stored logs polling, cursor support, schema validation, payload normalization, and secret redaction.
  • Expanded focused tests for credentials, payloads, estimate/submit/status/log/artifact flows, validation, API errors, and redaction.
  • Live-validated auth, estimate, submit, status polling, runtime, logs, and artifact listing against Jungle Grid with a low-cost smoke job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant