73 Commits

Author SHA1 Message Date
5992048bd9 Merge branch 'release-1.11.0' into feat/a11y 2026-06-17 10:55:40 -04:00
e5d42e54fc feat: upgrade Firecrawl to v2 SDK and extract into the lfx-firecrawl extension bundle (#13495)
* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Upgrade Firecrawl components to firecrawl-py v2 + add Search component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add Firecrawl Search API to the bundle page

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix(firecrawl): D205 docstring + defensive .get('data') in crawl

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(firecrawl): D205 docstring in scrape

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* perf(firecrawl): use list.extend in map (PERF401)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: add unit tests for Firecrawl v2 components

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* test: align Firecrawl component tests with lfx _attributes pattern

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* refactor(firecrawl): remove deprecated extract endpoint component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(firecrawl): remove deprecated extract endpoint component

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: drop extract component test (extract endpoint removed)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: remove Firecrawl Extract API section (deprecated)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix(firecrawl): map Search component to Firecrawl icon, drop Extract

The frontend icon map in styleUtils.ts still referenced the removed
FirecrawlExtractApi and lacked the new FirecrawlSearchApi, so the Search
node would not render the Firecrawl logo.

* chore: regenerate component index for Firecrawl v2 (Search added, Extract removed)

* refactor(firecrawl): extract components into the lfx-firecrawl extension bundle

Port the firecrawl provider out of lfx.components into a standalone
Extension Bundle at src/bundles/firecrawl (distribution: lfx-firecrawl),
following src/bundles/PORTING.md:

- Move the v2-SDK components (Scrape, Crawl, Map, Search) to
  src/bundles/firecrawl/src/lfx_firecrawl/components/firecrawl/ and
  remove the in-tree provider + its lfx.components registration.
- Own the firecrawl-py>=4,<5 pin in the bundle; drop it from
  langflow-base.
- Wire the workspace (root pyproject deps/sources/members) and uv.lock.
- Append migration-table entries (bare name, both import paths, pre-a
  slot) for the four classes; FirecrawlExtractApi gets no entries since
  the v2 SDK removed the extract endpoint and the component was dropped.
- Regenerate the component index (firecrawl category removed) and
  locales/en.json (54 firecrawl keys move out of core).
- Bundle-local unit tests + test_pilot_firecrawl_upgrade integration
  test; update Dockerfile bundle enumeration comments.

* fix(lfx): repair migration table entry fused during release-1.11.0 merge

The release-1.11.0 back-merge collided the FirecrawlSearchApi legacy_slot
entry with the NextPlaidVectorStoreComponent bare_class_name entry, mashing
both into a single object with duplicate 'target' keys, populating two of
{bare_class_name, import_path, legacy_slot}. That fails the MigrationTable
validator (entries.51) and broke the lfx loader tests.

Split it into the two intended entries so each populates exactly one
key-field. Restores the FirecrawlSearchApi and NextPlaidVectorStoreComponent
quads (60 entries total, +16 vs base). Append-only and bare-name guards pass.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-06-17 12:55:01 +00:00
3c1b2cdba6 test: add component a11y unit tests (jest-axe) (#13613)
* test: add component a11y unit tests (jest-axe)

Cover 14 components in two waves. 16 tests fail by design - each
encodes a known gap from a11y-action-plan (phases 0-3) and flips to
a regression lock once the component fix lands. 23 tests pass as
regression locks for already-correct semantics.

* ci: split a11y unit tests into separate workflow

Main jest CI excludes *.a11y.test.* so known-gap failures don't
block PRs; new a11y-unit-tests.yml runs them as informational check.

* fix(a11y): resolve component gaps flagged by a11y unit tests

Fixes all 16 failing jest-axe gap tests:
- TableHead defaults scope=col
- alert display area gets aria-live region
- app header becomes <header> landmark; bell button labeled
- icon wrapper decorative by default (aria-hidden), ariaLabel opt-in
- Input drops wrapping <label> (name pollution) and hides placeholder span
- password toggle back in tab order with aria-label/aria-pressed
- CheckBoxDiv exposes checkbox role + state
- accordion trigger renders native Radix button
- dialogs focus container on open instead of suppressing autofocus
- full-screen modal exposes dialog role/aria-modal/ariaLabel
- flow list card focusable with keyboard activation

Also wraps test focus calls in act() and mocks the icon loader so
the a11y suite runs without React warnings.

* fix: skip Puppeteer Chrome download in remaining Dockerfiles

frontend and base images still ran bare npm install; puppeteer (via
accessibility-checker, test-only) tried to fetch Chrome and broke the
Docker image build in CI.

* test: extend a11y unit test coverage (jest-axe)

Adds axe + semantics tests for untested primitives (button, alert,
textarea, radio-group, dropdown-menu, tooltip, popover) and two
known-gap tests that fail by design until fixes land:
- copyFieldAreaComponent copy action is a bare div onClick (plan 2.4)
- DialogContentWithouFixed renders an empty fragment (plan 1.6)

* fix: make webhook copy field a real button (a11y)

Copy action was a bare div onClick - no role, name, or keyboard
support (a11y-action-plan 2.4). Drops the no-longer-needed
DialogContentWithouFixed known-gap test.

* feat: update a11y unit tests and improve accessibility semantics in components

* feat: enable pull request trigger for a11y scan workflow
2026-06-15 14:34:42 -04:00
cd9ab691e8 feat: skip Puppeteer download during npm install in Dockerfiles for accessibility testing 2026-06-10 14:46:52 -04:00
a0bb5ab99f fix: add back in the missing npm docker changes (#13501)
add back in the missing npm docker changes from v1.9.5 that fixed npm cves in ducs
2026-06-04 15:25:59 +00:00
cc97a32aee chore: lean langflow-base image without bundles 2026-06-02 20:12:46 -07:00
3e57126b91 fix: remove duplicate uv.lock from workspace member (#13326)
* fix: remove src/backend/base/uv.lock and Dockerfile references

- Deleted src/backend/base/uv.lock (monorepo should have only one uv.lock at root)
- Removed COPY ./src/backend/base/uv.lock lines from all Dockerfiles:
  - docker/build_and_push.Dockerfile
  - docker/build_and_push_base.Dockerfile
  - docker/build_and_push_ep.Dockerfile
  - docker/build_and_push_with_extras.Dockerfile
  - docker/dev.Dockerfile

Fixes LE-1093

* fix: remove stale base uv.lock regeneration paths
2026-05-30 13:05:34 +00:00
599878da1d fix(docker): pre-create LANGFLOW_CONFIG_DIR so named volumes inherit uid=1000 ownership (#13212)
* fix: pre-create LANGFLOW_CONFIG_DIR in docker images to fix named volume permissions

The Langflow runtime stage runs as uid=1000 (non-root user), but the
official docker_example compose file mounts a named volume at
/app/langflow (LANGFLOW_CONFIG_DIR). When Docker creates a fresh named
volume, it copies the ownership and permissions of the mount-point
directory from the image. Because /app/langflow did not exist in the
image, Docker materialized the mount point as root:root, and the
non-root container user could not write secret_key, profile_pictures,
or per-user subfolders. The container crashed during initialization
with PermissionError on /app/langflow/secret_key.

Pre-create /app/langflow in every runtime stage and chown it to 1000:0
so a fresh named volume inherits the correct ownership and the
container starts cleanly on a rootful Docker daemon.

Podman's rootless user-namespace mapping masked this for anyone who
validated the compose file on Podman; on a rootful Docker daemon the
container exits in a restart loop.

Fixes #10437

* revert: drop docker_example/README.md changes

The Troubleshooting note will live in the user-facing docs site
instead of the in-repo README.
2026-05-21 18:14:28 +00:00
cc009c9133 feat(lfx): Bundle Separation and LFX Extension Framework (#13043)
* feat(lfx): installed-package + seed-directory discovery for production install (LE-1022)

Adds the read-only production install path for Modes A, B, and C of the
Bundle Separation iteration. Manifest-shipping pip-installed
distributions and seed-directory subdirectories are discovered at server
startup and registered as Extensions at @official.

* discovery.py: walks importlib.metadata.distributions() + the
  $LANGFLOW_SEED_DIR / /opt/langflow/bundles seed root; produces
  DiscoveredExtension records and typed errors for malformed manifests
  / configured-but-missing seed dirs.
* registry.py: ExtensionRegistry service with the immutability
  invariant for installed and seed entries. Mutation verbs (uninstall,
  disable, enable, install, update_entry) all raise
  ExtensionImmutableError carrying the typed
  installed-extension-immutable / seed-directory-immutable code so the
  invariant is testable today; the CLI uninstall surface ships in B4.
* lfx extension list: read-only inspector with text and JSON output
  for operators inspecting Mode B/C images.
* Errors: four new typed codes
  (installed-extension-immutable, seed-directory-immutable,
  seed-directory-not-found, duplicate-extension-id) plus snapshot
  coverage in tests/unit/extension/test_errors.py.
* Tests: 165 extension tests pass, including the LE-1022 acceptance
  cases -- three pip-installed wheels visible at @official, three seed
  bundles visible at @official, and the parametrized service-layer
  immutability check across every mutation verb.
* Docs: docs/Deployment/deployment-extensions-production.mdx covers
  the Dockerfile template, k8s deployment notes, the bundle packaging
  convention (extension.json shipped via package-data), and
  troubleshooting for the typed error codes.

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (#12967)

* feat(lfx): add extension manifest schema, validate CLI, and error formatter (LE-1014)

Foundation for the Bundle Separation iteration. Defines what a valid
extension.json looks like (Pydantic models + Draft 2020-12 JSON Schema),
ships the offline `lfx extension validate` command, and ships the single
`format_extension_error` function that every other extension-system module
will use to render structured errors.

What's in lfx.extension:

- `ExtensionManifest` / `BundleRef` / `LangflowCompat` Pydantic models with
  `extra="forbid"` so unknown fields fail loudly. Deferred fields (`services`,
  `routes`, `hooks`, `starter_projects`, `userConfig`) are reserved as
  None-only so non-null values produce a dedicated
  `field-deferred-in-this-milestone` error instead of a generic schema wall.
  `bundles` accepts a list but rejects length > 1 with
  `multi-bundle-deferred-in-this-milestone` (validator-enforced; the loader
  re-checks at install time in LE-1015).
- `schema.build_schema()` + `build_schema_json()` produce the publishable
  artifact at schemas.langflow.org/extension/v1.json.
- `ExtensionError` typed envelope and `format_extension_error` -- one branch
  per discriminant. Codes are registered in `ERROR_CODES`; an
  `ExtensionError` constructed with an unknown code raises at construction
  time, preventing producers from shipping without a matching renderer.
- `validate_extension` runs four passes: manifest discovery + schema,
  path-safety (no `..`, no absolute paths, no symlink escape), AST
  inspection of every `.py` (syntax, Component subclass present, build()
  declared, top-level `import *`, top-level I/O primitives), and an opt-in
  `--execute-imports` that runs each module in a subprocess with a
  temporary HOME / TMPDIR / LANGFLOW_CONFIG_DIR and LANGFLOW_*/LFX_* env
  vars stripped.
- `lfx extension validate` and `lfx extension schema` typer subcommands.

Acceptance-criteria coverage in tests/unit/extension/:

- Round-trips every v0 manifest field; deferred fields rejected; multi-bundle
  rejected with the dedicated discriminant.
- JSON Schema validates the v0 example and rejects 12 malformed manifests
  with distinct error paths (>= 10 required by the ticket).
- Median default-validate runtime < 100ms on the basic template.
- Crafted side-effect bundle: default validate does NOT execute it (canary
  file is never written); `--execute-imports` DOES execute it and the canary
  appears, while LANGFLOW_* env vars are NOT inherited by the subprocess.
- Snapshot tests for every code in ERROR_CODES; a guard test verifies
  ERROR_CODES and the snapshot table are in lockstep so future additions
  cannot ship without a format branch and a snapshot.

Wiring: `lfx extension` is a sub-app under the Authoring help panel so
future tickets (LE-1016 init/dev, LE-1018 reload) can attach without
colliding with the existing `lfx validate` (which validates flow JSON, not
extensions).

* fix(lfx): fall back to tomli on Python 3.10 in extension manifest loader

tomllib is stdlib only on 3.11+, but lfx supports 3.10-3.13. Use the
existing tomli runtime dependency as the 3.10 fallback (same API, so the
import alias keeps the rest of the module unchanged).

Fixes ModuleNotFoundError seen in CI on the 3.10 job.

* Update src/lfx/tests/unit/extension/test_schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/cli/_extension_commands.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (LE-1015)

Introduces lfx.extension.loader: the runtime that turns an Extension on disk
into LoadedComponent records keyed by ext:<bundle>:<Class>@<slot>. Two paths in:

  - load_extension(root): one manifest, one Bundle, registered at @official.
    Re-checks multi-bundle at runtime (defense-in-depth vs. the schema).
  - discover_inline_bundles(paths): each subfolder of LANGFLOW_COMPONENTS_PATH
    is a Bundle at @extra. Walk order is platform-independent (sorted dirs,
    user-declared path order). First-wins on duplicate names; second emits
    duplicate-inline-bundle warning that names both paths.

Manifest-first precedence helpers (installed_extension_roots,
manifest_owning_distributions, filter_plugin_entry_points) let callers of
the legacy langflow.plugins entry-point loader skip distributions that ship
a manifest, so component entry-points are not double-registered.

New typed error codes: module-import-failed, duplicate-component-name,
duplicate-distribution, duplicate-inline-bundle, inline-bundle-name-invalid.
Each ships with a format branch and a snapshot test.

Tests cover the AC: single-bundle happy path, multi-bundle rejection,
missing/empty/no-Component bundle, duplicate class names, deterministic
walk order, recursive discovery, inline-bundle first-wins + dot-dir skip
+ bundle.json metadata, manifest-first precedence partition, PEP-503
distribution-name canonicalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1015 review feedback

- Drop the unproduced duplicate-distribution error code; LE-1022 will add
  it once startup-time discovery has a place to surface it.  Restores the
  invariant that every code in ERROR_CODES has a producer.
- Clarify that intra-bundle relative imports are NOT supported in v0; only
  absolute references between bundle modules work in this milestone.
- Use strict=False when re-resolving bundle_root in the walker; the path
  was already existence-checked, and a concurrent removal in the narrow
  window should not raise across the loader's public boundary.
- Hoist the json import out of _read_inline_bundle_json's body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(lfx): split extension loader into a small subpackage (LE-1015)

Addresses the file-size feedback from the LE-1015 review.  The single
870-line loader.py becomes a flat package keyed off the four section
banners that already existed inline:

    loader/
      __init__.py     # re-exports the public surface
      _types.py       # SLOT constants, LoadedComponent, LoadResult
      _discovery.py   # filesystem walk + importlib.util orchestration
      _detection.py   # Component subclass identification (MRO heuristic)
      _orchestrator.py # load_extension, discover_inline_bundles
      _plugins.py     # manifest-first precedence over langflow.plugins

Largest file is now _orchestrator.py at 440 LOC (was 870); every file is
well under the 800-LOC project guideline.  No behavior change: the public
import paths from lfx.extension are unchanged, all 38 loader tests still
pass.  ``_canonicalize_distribution`` is now exported as
``canonicalize_distribution`` from ``loader._plugins`` (it's a stable
PEP-503 helper that downstream modules will reach for, so it loses the
private underscore).

The test suite is split to mirror the package:

    tests/unit/extension/loader/
      conftest.py             # shared fixtures, FakeDist, autouse scrub
      test_load_extension.py  # @official slot, identity, failure modes
      test_inline_bundles.py  # LANGFLOW_COMPONENTS_PATH, @extra slot
      test_plugins.py         # manifest-first precedence helpers
      test_types.py           # LoadedComponent, LoadResult, code parity

Each test file imports its own slice of the public API and pulls fixtures
from conftest, so a reader looking at one banner can read it in isolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: LangflowCompat -> LfxCompat

* fix: Remove references to ticket

* fix: encode maxItems constraint in schema

* fix: deferred fields and schema version

* Fix ruff errors

* fix: align loader tests with renamed manifest API and strip ticket refs

The merge of feat/extension-validate brought in the LfxCompat / compat
rename, but the loader test fixtures still used LangflowCompat / bundle_api
and failed at the manifest layer. Update conftest.py + test_load_extension.py
to the post-rename API.

Strip 17 LE-XXXX ticket references from loader source files, errors.py
loader-specific comments, and the four loader test docstrings, matching the
convention applied to LE-1014. Descriptive prose preserved.

Promote _BUNDLE_NAME_RE to BUNDLE_NAME_RE on the manifest module so the
loader's orchestrator no longer reaches across modules into a private name.

* refactor(lfx): clarify broad except, log malformed bundle.json, expand test docstring

- Document why _discovery.import_bundle_module catches BaseException (startup-time loader, must surface bad bundles as typed errors rather than abort).
- Add debug-level logging when bundle.json is malformed or non-object so a stale-cache footgun is at least observable.
- Expand test_skips_re_imported_class docstring so future maintainers don't accidentally weaken the __module__-equality guard if package-style relative imports get added later.

Also drops the stale duplicate-distribution claim from the PR description; that code is correctly deferred to LE-1022 along with /all integration.

* feat(lfx): wire Extension System into /all, pathsep-split LANGFLOW_COMPONENTS_PATH, emit duplicate-distribution

Closes the four AC gaps the previous reviewer flagged on PR #12967:

1. /all integration: get_and_cache_all_types_dict now also calls a new
   import_extension_components() that loads installed Extensions via
   load_installed_extensions, loads inline bundles via discover_inline_bundles,
   and builds frontend-node templates with extension/bundle/extension_version
   fields stamped on. Failures are logged and skipped per bundle.

2. LANGFLOW_COMPONENTS_PATH is now split on os.pathsep so multi-entry env vars
   (e.g. /a:/b on POSIX) produce multiple components-path entries instead of
   one literal non-existent path. Empty segments and missing paths are skipped.

3. duplicate-distribution is a real producer: load_installed_extensions
   surfaces a typed warning on the winner LoadResult when two distributions
   share a canonical name, naming every involved manifest path.

4. Manifest-first precedence runtime wiring: new filter_component_entry_points
   loads each entry-point and only skips ones that resolve to a Component
   subclass on a manifest-shipping distribution. plugin_routes.load_plugin_routes
   now applies it so non-component entry-points (route registrars) keep
   loading per the AC's 'unaffected' promise. Added the previously-missing
   AC test for same-distribution component+non-component partition.

Also makes _distribution_canonical_name defensive against MagicMock test seams.

* fix(lfx): register extension components under namespaced ID; promote duplicate-distribution to error

Addresses the latest review of PR #12967:

P1: /all integration now keys the cache inner dict by LoadedComponent.namespaced_id
(ext:<bundle>:<Class>@<slot>) rather than the bare class name. Templates also carry
the namespaced_id as an explicit field so consumers that look at the value (not the
key) still see the canonical address. This is the form the LE-1020 migration table
will rewrite legacy class-name references to.

P2: load_installed_extensions now appends duplicate-distribution to result.errors
instead of result.warnings, so LoadResult.ok=False when two distributions share a
canonical name. The winner's components still appear in result.components so flows
already pinned to them keep working; only the conflict status changes. Updated test
to assert errors + ok=False; added explicit assertion that the winner's components
are still present.

* fix(lfx): installed-distribution discovery accepts pyproject.toml manifest form

Closes the latest review finding on PR #12967: the installed-distribution
scan only looked for extension.json, ignoring distributions whose manifest
lives in [tool.langflow.extension] inside pyproject.toml. The AC explicitly
treats both as valid manifest forms.

_distribution_manifest_path now:
- Returns extension.json immediately when present (preserves precedence
  matching load_manifest's discovery order).
- Falls back to pyproject.toml only when extension.json is absent AND the
  pyproject's [tool.langflow.extension] section is parseable.

Validation reuses load_manifest itself so the rule lives in exactly one
place; a stray pyproject.toml without the section is correctly ignored.

Tests cover: pyproject-only discovery, pyproject-without-section ignored,
extension.json wins on collision, end-to-end pyproject load at @official,
and pyproject-form manifest-first entry-point suppression.

* refactor(lfx): tighten loader invariants, surface silent skips, harden tests

Addresses the latest review feedback on PR #12967:

Type-level invariants (_types.py):
- LoadedComponent.__post_init__ enforces that @extra components must NOT
  carry a distribution. The reverse (@official without distribution) is
  permitted because load_extension is also used for dev-mode loads
  against a working tree before pip install.
- LoadResult docstring documents the partial-success contract: components
  may be non-empty when errors is non-empty (some files imported, others
  failed). Callers branching on ok get strict success.

Silent-failure fixes (_orchestrator.py + settings/base.py):
- inline-path-missing: a non-existent / non-dir LANGFLOW_COMPONENTS_PATH
  entry now produces a typed warning per skipped path so a typo no
  longer yields zero diagnostics. Settings-layer skip bumped from debug
  to warning for the same reason.
- bundle-json-invalid: a malformed or non-object bundle.json now surfaces
  a typed warning instead of silently rewriting the user-declared
  id/version to derived values under the same bundle name.
- no-component-subclass gating uses a call-local counter instead of
  result.errors so the diagnostic stays accurate when a future caller
  reuses a LoadResult (multi-bundle / batch wrapper scenarios).

Test hardening:
- test_re_imported_class_is_skipped_via_module_filter rewritten to
  actually exercise the __module__-equality check via sys.modules
  injection; previously passed via module-import-failed (relative-import
  failure), which would silently weaken if package registration changes.
- test_user_declared_path_order_is_preserved: AC #8's multi-path order
  case (distinct bundles in [path_b, path_a]) was unasserted; added.
- test_inline_module_import_failure_attributes_identity: AC #10's
  identity-on-partial-failure was covered for @official but not @extra;
  added.
- test_uses_real_distributions_by_default tightened to assert ep
  placement (in kept, not in skipped) instead of exact-list equality, so
  a future Langflow-shipped manifest doesn't silently flip the assertion.

bumped 64 -> 175 passing extension tests; 20 backend integration tests
still pass.

* fix(lfx): malformed pyproject manifests surface manifest-invalid instead of disappearing

Closes the latest review finding on PR #12967: a pyproject.toml with a
[tool.langflow.extension] section that has missing/invalid required
fields was silently dropped because _pyproject_has_extension_section
ran full schema validation via load_manifest and returned False on
ValueError/TypeError. That conflated 'no section' with 'section
malformed'.

Fix: detect section presence only. _pyproject_has_extension_section now
calls _read_pyproject_extension (TOML parse + key lookup, no schema
check). Behavior:
- Section absent or pyproject TOML unparseable -> False (treat as
  regular non-manifest package).
- Section present and is a table (valid OR schema-invalid) -> True.
- Section present but is not a table -> True; the author intended to
  declare an extension and load_extension will surface the typed error.

This way a typo'd pyproject Extension produces a typed manifest-invalid
LoadResult with extension_id attribution, and manifest-first precedence
still suppresses its legacy component entry-points -- matching the
'typed load results on success/failure' contract for the supported
pyproject manifest form.

Tests: two new cases pin the behavior. test_malformed_pyproject_section_
surfaces_manifest_invalid asserts a typed load-failure result with
distribution attribution; the second test pins manifest-first
suppression for malformed pyproject distributions.

* refactor(lfx): emit inline-path-unreadable, document reload contract, trim rot

Closes the remaining nits on PR #12967:

- inline-path-unreadable (new typed error code): a configured
  LANGFLOW_COMPONENTS_PATH entry that raises OSError on iterdir
  (typically permission-denied) now produces a typed LoadResult error
  carrying str(exc) instead of silently swallowing the message.
- duplicate-inline-bundle hint trimmed: removed forward promise about
  hard-error-in-a-later-release; same actionability, no expiration.
- discover_inline_bundles docstring trimmed from three paragraphs to
  two sentences (per CLAUDE.md anti-multi-paragraph rule).
- _distribution_manifest_path docstring trimmed to one-liner.
- installed_extension_roots dropped Used-by caller-narration list;
  manifest_owning_distributions docstring rewritten to call out the
  shadow-load risk for direct callers and point to load_installed_
  extensions for the typed warning surface.
- _discovery.import_bundle_module: replaced 'until that lands in a
  later milestone' rot with a single line ('Absolute imports only
  between bundle modules; relative imports unsupported.') AND added
  the single-load-per-process contract note documenting why LE-1018
  reload must scrub registry/sys.modules before re-invoking the loader.
- load_extension docstring grew a 'Single-load-per-process contract'
  block telling direct callers not to rely on this function for refresh.

Tests: new test_unreadable_path_emits_inline_path_unreadable pins the
OSError -> typed-error path.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(lfx): atomic-swap Bundle reload pipeline + endpoint + CLI (LE-1018) (#12979)

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (LE-1015)

Introduces lfx.extension.loader: the runtime that turns an Extension on disk
into LoadedComponent records keyed by ext:<bundle>:<Class>@<slot>. Two paths in:

  - load_extension(root): one manifest, one Bundle, registered at @official.
    Re-checks multi-bundle at runtime (defense-in-depth vs. the schema).
  - discover_inline_bundles(paths): each subfolder of LANGFLOW_COMPONENTS_PATH
    is a Bundle at @extra. Walk order is platform-independent (sorted dirs,
    user-declared path order). First-wins on duplicate names; second emits
    duplicate-inline-bundle warning that names both paths.

Manifest-first precedence helpers (installed_extension_roots,
manifest_owning_distributions, filter_plugin_entry_points) let callers of
the legacy langflow.plugins entry-point loader skip distributions that ship
a manifest, so component entry-points are not double-registered.

New typed error codes: module-import-failed, duplicate-component-name,
duplicate-distribution, duplicate-inline-bundle, inline-bundle-name-invalid.
Each ships with a format branch and a snapshot test.

Tests cover the AC: single-bundle happy path, multi-bundle rejection,
missing/empty/no-Component bundle, duplicate class names, deterministic
walk order, recursive discovery, inline-bundle first-wins + dot-dir skip
+ bundle.json metadata, manifest-first precedence partition, PEP-503
distribution-name canonicalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1015 review feedback

- Drop the unproduced duplicate-distribution error code; LE-1022 will add
  it once startup-time discovery has a place to surface it.  Restores the
  invariant that every code in ERROR_CODES has a producer.
- Clarify that intra-bundle relative imports are NOT supported in v0; only
  absolute references between bundle modules work in this milestone.
- Use strict=False when re-resolving bundle_root in the walker; the path
  was already existence-checked, and a concurrent removal in the narrow
  window should not raise across the loader's public boundary.
- Hoist the json import out of _read_inline_bundle_json's body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(lfx): split extension loader into a small subpackage (LE-1015)

Addresses the file-size feedback from the LE-1015 review.  The single
870-line loader.py becomes a flat package keyed off the four section
banners that already existed inline:

    loader/
      __init__.py     # re-exports the public surface
      _types.py       # SLOT constants, LoadedComponent, LoadResult
      _discovery.py   # filesystem walk + importlib.util orchestration
      _detection.py   # Component subclass identification (MRO heuristic)
      _orchestrator.py # load_extension, discover_inline_bundles
      _plugins.py     # manifest-first precedence over langflow.plugins

Largest file is now _orchestrator.py at 440 LOC (was 870); every file is
well under the 800-LOC project guideline.  No behavior change: the public
import paths from lfx.extension are unchanged, all 38 loader tests still
pass.  ``_canonicalize_distribution`` is now exported as
``canonicalize_distribution`` from ``loader._plugins`` (it's a stable
PEP-503 helper that downstream modules will reach for, so it loses the
private underscore).

The test suite is split to mirror the package:

    tests/unit/extension/loader/
      conftest.py             # shared fixtures, FakeDist, autouse scrub
      test_load_extension.py  # @official slot, identity, failure modes
      test_inline_bundles.py  # LANGFLOW_COMPONENTS_PATH, @extra slot
      test_plugins.py         # manifest-first precedence helpers
      test_types.py           # LoadedComponent, LoadResult, code parity

Each test file imports its own slice of the public API and pulls fixtures
from conftest, so a reader looking at one banner can read it in isolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(lfx): atomic-swap Bundle reload pipeline + endpoint + CLI (LE-1018)

Five-stage reload (parallel staging load -> validate -> swap under write
lock -> cleanup -> emit) for installed Bundles in Mode A.  In-flight
flows keep the pre-swap class via existing references; new flows pick up
the post-swap class atomically; concurrent reloads on the same Bundle
are rejected with reload-in-progress.

Adds:

* lfx/extension/registry.py -- BundleRegistry with per-bundle
  reload-in-progress guard and components_index.json writer
* lfx/extension/reload.py -- the five-stage pipeline; events emission
  is stubbed (TODO LE-1017) so the swap mechanics can ship before the
  events service lands
* loader: optional module_namespace param so Stage 1 lands in
  __reload_staging__.<id> instead of the live _lfx_ext.* namespace
* errors: four new typed reload codes (reload-in-progress,
  reload-bundle-not-installed, reload-bundle-name-mismatch,
  reload-source-missing) with branch templates and snapshot tests
* HTTP: POST /api/v1/extensions/{id}/bundles/{name}/reload, gated by
  the existing get_current_active_user dependency, returns 409 with a
  typed body for the in-progress collision case
* CLI: lfx extension reload <id> [--bundle <name>] -- HTTP client
  against the dev server with text/json output and proper exit codes
  (--all is gated until LE-1019 lands the list endpoint)
* tests: 16 reload-pipeline tests covering the AC matrix (rename
  round-trip, broken-bundle isolation, concurrent readers, in-flight
  flow, double-reload guard, bundle-name mismatch) plus 9 CLI client
  tests

Mode A only.  In Mode B/C bundle changes require a Docker image rebuild
and the reload path is not exercised.

The events emission in Stage 5 is intentionally stubbed -- the LE-1017
ticket will swap the body of _emit_bundle_reload_event in one place
without touching the pipeline core.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* feat(lfx): add `extension init` and `extension dev` CLIs (LE-1016) (#12968)

* feat(lfx): add extension manifest schema, validate CLI, and error formatter (LE-1014)

Foundation for the Bundle Separation iteration. Defines what a valid
extension.json looks like (Pydantic models + Draft 2020-12 JSON Schema),
ships the offline `lfx extension validate` command, and ships the single
`format_extension_error` function that every other extension-system module
will use to render structured errors.

What's in lfx.extension:

- `ExtensionManifest` / `BundleRef` / `LangflowCompat` Pydantic models with
  `extra="forbid"` so unknown fields fail loudly. Deferred fields (`services`,
  `routes`, `hooks`, `starter_projects`, `userConfig`) are reserved as
  None-only so non-null values produce a dedicated
  `field-deferred-in-this-milestone` error instead of a generic schema wall.
  `bundles` accepts a list but rejects length > 1 with
  `multi-bundle-deferred-in-this-milestone` (validator-enforced; the loader
  re-checks at install time in LE-1015).
- `schema.build_schema()` + `build_schema_json()` produce the publishable
  artifact at schemas.langflow.org/extension/v1.json.
- `ExtensionError` typed envelope and `format_extension_error` -- one branch
  per discriminant. Codes are registered in `ERROR_CODES`; an
  `ExtensionError` constructed with an unknown code raises at construction
  time, preventing producers from shipping without a matching renderer.
- `validate_extension` runs four passes: manifest discovery + schema,
  path-safety (no `..`, no absolute paths, no symlink escape), AST
  inspection of every `.py` (syntax, Component subclass present, build()
  declared, top-level `import *`, top-level I/O primitives), and an opt-in
  `--execute-imports` that runs each module in a subprocess with a
  temporary HOME / TMPDIR / LANGFLOW_CONFIG_DIR and LANGFLOW_*/LFX_* env
  vars stripped.
- `lfx extension validate` and `lfx extension schema` typer subcommands.

Acceptance-criteria coverage in tests/unit/extension/:

- Round-trips every v0 manifest field; deferred fields rejected; multi-bundle
  rejected with the dedicated discriminant.
- JSON Schema validates the v0 example and rejects 12 malformed manifests
  with distinct error paths (>= 10 required by the ticket).
- Median default-validate runtime < 100ms on the basic template.
- Crafted side-effect bundle: default validate does NOT execute it (canary
  file is never written); `--execute-imports` DOES execute it and the canary
  appears, while LANGFLOW_* env vars are NOT inherited by the subprocess.
- Snapshot tests for every code in ERROR_CODES; a guard test verifies
  ERROR_CODES and the snapshot table are in lockstep so future additions
  cannot ship without a format branch and a snapshot.

Wiring: `lfx extension` is a sub-app under the Authoring help panel so
future tickets (LE-1016 init/dev, LE-1018 reload) can attach without
colliding with the existing `lfx validate` (which validates flow JSON, not
extensions).

* fix(lfx): fall back to tomli on Python 3.10 in extension manifest loader

tomllib is stdlib only on 3.11+, but lfx supports 3.10-3.13. Use the
existing tomli runtime dependency as the 3.10 fallback (same API, so the
import alias keeps the rest of the module unchanged).

Fixes ModuleNotFoundError seen in CI on the 3.10 job.

* Update src/lfx/tests/unit/extension/test_schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/cli/_extension_commands.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (LE-1015)

Introduces lfx.extension.loader: the runtime that turns an Extension on disk
into LoadedComponent records keyed by ext:<bundle>:<Class>@<slot>. Two paths in:

  - load_extension(root): one manifest, one Bundle, registered at @official.
    Re-checks multi-bundle at runtime (defense-in-depth vs. the schema).
  - discover_inline_bundles(paths): each subfolder of LANGFLOW_COMPONENTS_PATH
    is a Bundle at @extra. Walk order is platform-independent (sorted dirs,
    user-declared path order). First-wins on duplicate names; second emits
    duplicate-inline-bundle warning that names both paths.

Manifest-first precedence helpers (installed_extension_roots,
manifest_owning_distributions, filter_plugin_entry_points) let callers of
the legacy langflow.plugins entry-point loader skip distributions that ship
a manifest, so component entry-points are not double-registered.

New typed error codes: module-import-failed, duplicate-component-name,
duplicate-distribution, duplicate-inline-bundle, inline-bundle-name-invalid.
Each ships with a format branch and a snapshot test.

Tests cover the AC: single-bundle happy path, multi-bundle rejection,
missing/empty/no-Component bundle, duplicate class names, deterministic
walk order, recursive discovery, inline-bundle first-wins + dot-dir skip
+ bundle.json metadata, manifest-first precedence partition, PEP-503
distribution-name canonicalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1015 review feedback

- Drop the unproduced duplicate-distribution error code; LE-1022 will add
  it once startup-time discovery has a place to surface it.  Restores the
  invariant that every code in ERROR_CODES has a producer.
- Clarify that intra-bundle relative imports are NOT supported in v0; only
  absolute references between bundle modules work in this milestone.
- Use strict=False when re-resolving bundle_root in the walker; the path
  was already existence-checked, and a concurrent removal in the narrow
  window should not raise across the loader's public boundary.
- Hoist the json import out of _read_inline_bundle_json's body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(lfx): split extension loader into a small subpackage (LE-1015)

Addresses the file-size feedback from the LE-1015 review.  The single
870-line loader.py becomes a flat package keyed off the four section
banners that already existed inline:

    loader/
      __init__.py     # re-exports the public surface
      _types.py       # SLOT constants, LoadedComponent, LoadResult
      _discovery.py   # filesystem walk + importlib.util orchestration
      _detection.py   # Component subclass identification (MRO heuristic)
      _orchestrator.py # load_extension, discover_inline_bundles
      _plugins.py     # manifest-first precedence over langflow.plugins

Largest file is now _orchestrator.py at 440 LOC (was 870); every file is
well under the 800-LOC project guideline.  No behavior change: the public
import paths from lfx.extension are unchanged, all 38 loader tests still
pass.  ``_canonicalize_distribution`` is now exported as
``canonicalize_distribution`` from ``loader._plugins`` (it's a stable
PEP-503 helper that downstream modules will reach for, so it loses the
private underscore).

The test suite is split to mirror the package:

    tests/unit/extension/loader/
      conftest.py             # shared fixtures, FakeDist, autouse scrub
      test_load_extension.py  # @official slot, identity, failure modes
      test_inline_bundles.py  # LANGFLOW_COMPONENTS_PATH, @extra slot
      test_plugins.py         # manifest-first precedence helpers
      test_types.py           # LoadedComponent, LoadResult, code parity

Each test file imports its own slice of the public API and pulls fixtures
from conftest, so a reader looking at one banner can read it in isolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(lfx): add `extension init` and `extension dev` CLIs (LE-1016)

The two scaffolding CLIs an Extension author types:

  - `lfx extension init <target>` writes the basic single-Bundle
    template (manifest with $schema, README, .gitignore, one Component
    subclass + a pytest smoke test).  AC #1: the generated extension
    validates clean against LE-1014.  AC #2: the generated test file is
    a valid pytest module that exercises the component's build() method.
    AC #3: any --template other than 'basic' fails with a typed
    template-deferred-in-this-milestone error and a non-zero exit.
    Refuses to scaffold over a non-empty target dir.

  - `lfx extension dev <target>` validates the local extension, records
    its absolute path in <config_dir>/extensions/dev_extensions.json,
    prints reload instructions, and execs `langflow run` (or
    `python -m langflow` when langflow isn't on PATH).  --skip-launch
    registers without launching (used by tests + external dev-server
    scripts); --skip-validate lets authors register a known-broken
    manifest to debug it under the loader.

Stack:
  - Wave 0: error codes (extension-target-exists,
    extension-target-invalid, local-extension-missing) with format
    branches and snapshot tests.
  - Wave 1: lfx.extension.init_template -- pure-data scaffolder, no
    Typer dependency so the CLI is a thin shell over it.
  - Wave 1: lfx.extension.dev_registry -- atomic JSON state file under
    the langflow user-cache dir; helpers for register / list /
    unregister / load_dev_extensions / dev_extension_component_paths.
  - Wave 2: lfx.cli._extension_commands gains init/dev subcommands.
  - Wave 2: langflow.main lifespan hook reads the dev registry after
    bundle loading and extends components_path with each registered
    bundle dir, so the existing palette discovery picks up dev
    extensions.  Missing paths surface as local-extension-missing
    warnings (AC #5) without aborting startup.

Tests (84 new, 197 total in tests/unit/extension/):
  - test_init_template.py: AC scenarios + identifier derivation +
    deterministic file shape.
  - test_dev_registry.py: register/list/unregister round-trip,
    idempotent re-register refreshes timestamp, malformed state file
    treated as empty, missing-path warning, recovery when path
    reappears, env-var override precedence.
  - test_cli.py: AC #1 init->validate, AC #3 deferred templates,
    --skip-launch registers without launching, --skip-validate
    short-circuits the pre-flight pass.
  - test_errors.py: snapshot rows for all three new codes; the
    every-known-code-has-a-snapshot test enforces parity.

LE-1018 (reload) reuses load_dev_extensions; LE-1022 (installed-pkg
discovery) shares the components_path extension pattern.  AC #4 ("boots
Langflow with the extension visible in the palette within 5s") is
delivered jointly by `extension dev` (registers + execs) and the
lifespan hook (loads on startup).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1016 review feedback

Fixes the four HIGH issues + the elevated LOW from the review pass:

1. dev_extension_component_paths now forwards EVERY warning, not just
   local-extension-missing.  Previously a duplicate-component-name (or
   any future warning code) was silently dropped, hiding real signal
   from the lifespan hook's logs.

2. Defensive emit when a LoadResult has components but source_path is
   None.  The current loader always sets source_path, but a future
   hand-built LoadResult could violate that contract; we now surface a
   typed local-extension-missing error rather than dropping the
   extension silently.

3. Replaced the fragile ``min(len(parts))`` bundle-root selection with
   a relative-to-source-path measurement.  Handles deep-vs-shallow
   sibling extensions correctly without depending on absolute path
   depth.

4. Generated README now documents the langflow/lfx prerequisite under
   the Develop section so authors know `pytest` requires the lfx
   environment, not just Python.

5. Forced LANGFLOW_LAZY_LOAD_COMPONENTS=false unconditionally in the
   `extension dev` exec env (was setdefault, which let a developer's
   global lazy-loading export silently hide their dev components from
   the palette and miss AC #4's 5s budget).

Plus three MEDIUMs:

  - sys.modules cleanup in test_generated_test_file_runs_against_generated_component
    so a later test importing the same dotted path doesn't pick up a
    stale module from a deleted tmp_path.  Component instantiation
    moved inside the try block because Component.__init__ uses
    inspect.getsourcefile against self.__class__'s still-live module.
  - Added regex-drift test that pins the init_template patterns to
    match manifest.py's so a schema regex change can't quietly produce
    invalid scaffolded manifests.
  - Added two new dev_registry tests covering the forward-all-warnings
    contract and the source_path=None defense.

Tests: 201 passing (4 new); ruff check + format clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: LangflowCompat -> LfxCompat

* fix: Remove references to ticket

* fix: encode maxItems constraint in schema

* fix: deferred fields and schema version

* Fix ruff errors

* fix: align loader tests with renamed manifest API and strip ticket refs

The merge of feat/extension-validate brought in the LfxCompat / compat
rename, but the loader test fixtures still used LangflowCompat / bundle_api
and failed at the manifest layer. Update conftest.py + test_load_extension.py
to the post-rename API.

Strip 17 LE-XXXX ticket references from loader source files, errors.py
loader-specific comments, and the four loader test docstrings, matching the
convention applied to LE-1014. Descriptive prose preserved.

Promote _BUNDLE_NAME_RE to BUNDLE_NAME_RE on the manifest module so the
loader's orchestrator no longer reaches across modules into a private name.

* fix(lfx): align init template with renamed manifest API

After merging feat/extension-loader into this branch, two surfaces
fell out of sync with the renamed manifest schema:

- init_template generates extension.json with `lfx: {bundle_api: [1]}`,
  but the validator now requires `lfx: {compat: ["1"]}` per LfxCompat.
  This made `test_basic_template_validates_clean` fail with
  manifest-invalid (`lfx.compat: Field required; lfx.bundle_api: Extra
  inputs are not permitted`).
- test_init_template_regexes_match_manifest_schema reads
  `manifest_mod._BUNDLE_NAME_RE`, but that symbol was promoted to public
  `BUNDLE_NAME_RE` in c63f84a591. Update the test to reference the
  public name; init_template's local copy is still private since it
  also covers `_EXTENSION_ID_RE`, which remains private upstream.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(lfx): append-only migration table + flow deserializer rewrite hook (#13024)

* feat(lfx): add extension manifest schema, validate CLI, and error formatter (LE-1014)

Foundation for the Bundle Separation iteration. Defines what a valid
extension.json looks like (Pydantic models + Draft 2020-12 JSON Schema),
ships the offline `lfx extension validate` command, and ships the single
`format_extension_error` function that every other extension-system module
will use to render structured errors.

What's in lfx.extension:

- `ExtensionManifest` / `BundleRef` / `LangflowCompat` Pydantic models with
  `extra="forbid"` so unknown fields fail loudly. Deferred fields (`services`,
  `routes`, `hooks`, `starter_projects`, `userConfig`) are reserved as
  None-only so non-null values produce a dedicated
  `field-deferred-in-this-milestone` error instead of a generic schema wall.
  `bundles` accepts a list but rejects length > 1 with
  `multi-bundle-deferred-in-this-milestone` (validator-enforced; the loader
  re-checks at install time in LE-1015).
- `schema.build_schema()` + `build_schema_json()` produce the publishable
  artifact at schemas.langflow.org/extension/v1.json.
- `ExtensionError` typed envelope and `format_extension_error` -- one branch
  per discriminant. Codes are registered in `ERROR_CODES`; an
  `ExtensionError` constructed with an unknown code raises at construction
  time, preventing producers from shipping without a matching renderer.
- `validate_extension` runs four passes: manifest discovery + schema,
  path-safety (no `..`, no absolute paths, no symlink escape), AST
  inspection of every `.py` (syntax, Component subclass present, build()
  declared, top-level `import *`, top-level I/O primitives), and an opt-in
  `--execute-imports` that runs each module in a subprocess with a
  temporary HOME / TMPDIR / LANGFLOW_CONFIG_DIR and LANGFLOW_*/LFX_* env
  vars stripped.
- `lfx extension validate` and `lfx extension schema` typer subcommands.

Acceptance-criteria coverage in tests/unit/extension/:

- Round-trips every v0 manifest field; deferred fields rejected; multi-bundle
  rejected with the dedicated discriminant.
- JSON Schema validates the v0 example and rejects 12 malformed manifests
  with distinct error paths (>= 10 required by the ticket).
- Median default-validate runtime < 100ms on the basic template.
- Crafted side-effect bundle: default validate does NOT execute it (canary
  file is never written); `--execute-imports` DOES execute it and the canary
  appears, while LANGFLOW_* env vars are NOT inherited by the subprocess.
- Snapshot tests for every code in ERROR_CODES; a guard test verifies
  ERROR_CODES and the snapshot table are in lockstep so future additions
  cannot ship without a format branch and a snapshot.

Wiring: `lfx extension` is a sub-app under the Authoring help panel so
future tickets (LE-1016 init/dev, LE-1018 reload) can attach without
colliding with the existing `lfx validate` (which validates flow JSON, not
extensions).

* fix(lfx): fall back to tomli on Python 3.10 in extension manifest loader

tomllib is stdlib only on 3.11+, but lfx supports 3.10-3.13. Use the
existing tomli runtime dependency as the 3.10 fallback (same API, so the
import alias keeps the rest of the module unchanged).

Fixes ModuleNotFoundError seen in CI on the 3.10 job.

* Update src/lfx/tests/unit/extension/test_schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/cli/_extension_commands.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (LE-1015)

Introduces lfx.extension.loader: the runtime that turns an Extension on disk
into LoadedComponent records keyed by ext:<bundle>:<Class>@<slot>. Two paths in:

  - load_extension(root): one manifest, one Bundle, registered at @official.
    Re-checks multi-bundle at runtime (defense-in-depth vs. the schema).
  - discover_inline_bundles(paths): each subfolder of LANGFLOW_COMPONENTS_PATH
    is a Bundle at @extra. Walk order is platform-independent (sorted dirs,
    user-declared path order). First-wins on duplicate names; second emits
    duplicate-inline-bundle warning that names both paths.

Manifest-first precedence helpers (installed_extension_roots,
manifest_owning_distributions, filter_plugin_entry_points) let callers of
the legacy langflow.plugins entry-point loader skip distributions that ship
a manifest, so component entry-points are not double-registered.

New typed error codes: module-import-failed, duplicate-component-name,
duplicate-distribution, duplicate-inline-bundle, inline-bundle-name-invalid.
Each ships with a format branch and a snapshot test.

Tests cover the AC: single-bundle happy path, multi-bundle rejection,
missing/empty/no-Component bundle, duplicate class names, deterministic
walk order, recursive discovery, inline-bundle first-wins + dot-dir skip
+ bundle.json metadata, manifest-first precedence partition, PEP-503
distribution-name canonicalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1015 review feedback

- Drop the unproduced duplicate-distribution error code; LE-1022 will add
  it once startup-time discovery has a place to surface it.  Restores the
  invariant that every code in ERROR_CODES has a producer.
- Clarify that intra-bundle relative imports are NOT supported in v0; only
  absolute references between bundle modules work in this milestone.
- Use strict=False when re-resolving bundle_root in the walker; the path
  was already existence-checked, and a concurrent removal in the narrow
  window should not raise across the loader's public boundary.
- Hoist the json import out of _read_inline_bundle_json's body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(lfx): split extension loader into a small subpackage (LE-1015)

Addresses the file-size feedback from the LE-1015 review.  The single
870-line loader.py becomes a flat package keyed off the four section
banners that already existed inline:

    loader/
      __init__.py     # re-exports the public surface
      _types.py       # SLOT constants, LoadedComponent, LoadResult
      _discovery.py   # filesystem walk + importlib.util orchestration
      _detection.py   # Component subclass identification (MRO heuristic)
      _orchestrator.py # load_extension, discover_inline_bundles
      _plugins.py     # manifest-first precedence over langflow.plugins

Largest file is now _orchestrator.py at 440 LOC (was 870); every file is
well under the 800-LOC project guideline.  No behavior change: the public
import paths from lfx.extension are unchanged, all 38 loader tests still
pass.  ``_canonicalize_distribution`` is now exported as
``canonicalize_distribution`` from ``loader._plugins`` (it's a stable
PEP-503 helper that downstream modules will reach for, so it loses the
private underscore).

The test suite is split to mirror the package:

    tests/unit/extension/loader/
      conftest.py             # shared fixtures, FakeDist, autouse scrub
      test_load_extension.py  # @official slot, identity, failure modes
      test_inline_bundles.py  # LANGFLOW_COMPONENTS_PATH, @extra slot
      test_plugins.py         # manifest-first precedence helpers
      test_types.py           # LoadedComponent, LoadResult, code parity

Each test file imports its own slice of the public API and pulls fixtures
from conftest, so a reader looking at one banner can read it in isolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: LangflowCompat -> LfxCompat

* fix: Remove references to ticket

* fix: encode maxItems constraint in schema

* fix: deferred fields and schema version

* Fix ruff errors

* fix: align loader tests with renamed manifest API and strip ticket refs

The merge of feat/extension-validate brought in the LfxCompat / compat
rename, but the loader test fixtures still used LangflowCompat / bundle_api
and failed at the manifest layer. Update conftest.py + test_load_extension.py
to the post-rename API.

Strip 17 LE-XXXX ticket references from loader source files, errors.py
loader-specific comments, and the four loader test docstrings, matching the
convention applied to LE-1014. Descriptive prose preserved.

Promote _BUNDLE_NAME_RE to BUNDLE_NAME_RE on the manifest module so the
loader's orchestrator no longer reaches across modules into a private name.

* feat(lfx): append-only migration table + flow deserializer rewrite hook

Adds the migration layer of the Extension System: an append-only JSON table
that maps three legacy component reference shapes (bare class name, old
import path, pre-Phase-A namespaced slot) to the post-Phase-A canonical
ext:<bundle>:<Class>@<slot> identifier, plus a deserializer hook that
rewrites a saved-flow payload in place against that table on load.

What landed:

  * lfx.extension.migration.schema -- Pydantic models for MigrationEntry +
    MigrationTable with per-entry validators (exactly one of bare/import/slot
    populated; canonical target shape) and table-level uniqueness check.
  * lfx.extension.migration.loader -- canonical in-repo path, threadsafe
    process-lifetime cache, typed errors on every failure mode.
  * lfx.extension.migration.rewrite -- node-by-node rewrite, idempotent on
    canonical refs, difflib-backed closest-match suggestion for unmapped
    references, cross-bucket ambiguity surfaces component-name-ambiguous
    instead of silently loading into the wrong bundle.
  * Wired into Graph.from_payload before validate_flow_for_current_settings
    so every saved-flow load goes through migration first.
  * scripts/migrate/check_migration_append_only.py -- CI guard that diffs
    the working-tree table against origin/main and rejects removals or
    target mutations; reordering and additions are allowed.
  * 34 new unit tests covering rewrite paths, loader failure modes, schema
    invariants, and the CI script behavior.

What is deliberately deferred:

  * flow-migrated event emission. The events pipeline is unavailable in this
    iteration; the wiring point in Graph.from_payload is marked TODO and the
    MigrationReport already carries every field a future emitter needs.

The shipped migration_table.json starts empty; entries land alongside the
pilot bundle extraction in a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(frontend): palette Bundle reload action + loading + toasts (#13025)

* feat(lfx): add extension manifest schema, validate CLI, and error formatter (LE-1014)

Foundation for the Bundle Separation iteration. Defines what a valid
extension.json looks like (Pydantic models + Draft 2020-12 JSON Schema),
ships the offline `lfx extension validate` command, and ships the single
`format_extension_error` function that every other extension-system module
will use to render structured errors.

What's in lfx.extension:

- `ExtensionManifest` / `BundleRef` / `LangflowCompat` Pydantic models with
  `extra="forbid"` so unknown fields fail loudly. Deferred fields (`services`,
  `routes`, `hooks`, `starter_projects`, `userConfig`) are reserved as
  None-only so non-null values produce a dedicated
  `field-deferred-in-this-milestone` error instead of a generic schema wall.
  `bundles` accepts a list but rejects length > 1 with
  `multi-bundle-deferred-in-this-milestone` (validator-enforced; the loader
  re-checks at install time in LE-1015).
- `schema.build_schema()` + `build_schema_json()` produce the publishable
  artifact at schemas.langflow.org/extension/v1.json.
- `ExtensionError` typed envelope and `format_extension_error` -- one branch
  per discriminant. Codes are registered in `ERROR_CODES`; an
  `ExtensionError` constructed with an unknown code raises at construction
  time, preventing producers from shipping without a matching renderer.
- `validate_extension` runs four passes: manifest discovery + schema,
  path-safety (no `..`, no absolute paths, no symlink escape), AST
  inspection of every `.py` (syntax, Component subclass present, build()
  declared, top-level `import *`, top-level I/O primitives), and an opt-in
  `--execute-imports` that runs each module in a subprocess with a
  temporary HOME / TMPDIR / LANGFLOW_CONFIG_DIR and LANGFLOW_*/LFX_* env
  vars stripped.
- `lfx extension validate` and `lfx extension schema` typer subcommands.

Acceptance-criteria coverage in tests/unit/extension/:

- Round-trips every v0 manifest field; deferred fields rejected; multi-bundle
  rejected with the dedicated discriminant.
- JSON Schema validates the v0 example and rejects 12 malformed manifests
  with distinct error paths (>= 10 required by the ticket).
- Median default-validate runtime < 100ms on the basic template.
- Crafted side-effect bundle: default validate does NOT execute it (canary
  file is never written); `--execute-imports` DOES execute it and the canary
  appears, while LANGFLOW_* env vars are NOT inherited by the subprocess.
- Snapshot tests for every code in ERROR_CODES; a guard test verifies
  ERROR_CODES and the snapshot table are in lockstep so future additions
  cannot ship without a format branch and a snapshot.

Wiring: `lfx extension` is a sub-app under the Authoring help panel so
future tickets (LE-1016 init/dev, LE-1018 reload) can attach without
colliding with the existing `lfx validate` (which validates flow JSON, not
extensions).

* fix(lfx): fall back to tomli on Python 3.10 in extension manifest loader

tomllib is stdlib only on 3.11+, but lfx supports 3.10-3.13. Use the
existing tomli runtime dependency as the 3.10 fallback (same API, so the
import alias keeps the rest of the module unchanged).

Fixes ModuleNotFoundError seen in CI on the 3.10 job.

* Update src/lfx/tests/unit/extension/test_schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/schema.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/cli/_extension_commands.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(lfx): add single-Bundle loader and LANGFLOW_COMPONENTS_PATH discovery (LE-1015)

Introduces lfx.extension.loader: the runtime that turns an Extension on disk
into LoadedComponent records keyed by ext:<bundle>:<Class>@<slot>. Two paths in:

  - load_extension(root): one manifest, one Bundle, registered at @official.
    Re-checks multi-bundle at runtime (defense-in-depth vs. the schema).
  - discover_inline_bundles(paths): each subfolder of LANGFLOW_COMPONENTS_PATH
    is a Bundle at @extra. Walk order is platform-independent (sorted dirs,
    user-declared path order). First-wins on duplicate names; second emits
    duplicate-inline-bundle warning that names both paths.

Manifest-first precedence helpers (installed_extension_roots,
manifest_owning_distributions, filter_plugin_entry_points) let callers of
the legacy langflow.plugins entry-point loader skip distributions that ship
a manifest, so component entry-points are not double-registered.

New typed error codes: module-import-failed, duplicate-component-name,
duplicate-distribution, duplicate-inline-bundle, inline-bundle-name-invalid.
Each ships with a format branch and a snapshot test.

Tests cover the AC: single-bundle happy path, multi-bundle rejection,
missing/empty/no-Component bundle, duplicate class names, deterministic
walk order, recursive discovery, inline-bundle first-wins + dot-dir skip
+ bundle.json metadata, manifest-first precedence partition, PEP-503
distribution-name canonicalization.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(lfx): address LE-1015 review feedback

- Drop the unproduced duplicate-distribution error code; LE-1022 will add
  it once startup-time discovery has a place to surface it.  Restores the
  invariant that every code in ERROR_CODES has a producer.
- Clarify that intra-bundle relative imports are NOT supported in v0; only
  absolute references between bundle modules work in this milestone.
- Use strict=False when re-resolving bundle_root in the walker; the path
  was already existence-checked, and a concurrent removal in the narrow
  window should not raise across the loader's public boundary.
- Hoist the json import out of _read_inline_bundle_json's body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(lfx): split extension loader into a small subpackage (LE-1015)

Addresses the file-size feedback from the LE-1015 review.  The single
870-line loader.py becomes a flat package keyed off the four section
banners that already existed inline:

    loader/
      __init__.py     # re-exports the public surface
      _types.py       # SLOT constants, LoadedComponent, LoadResult
      _discovery.py   # filesystem walk + importlib.util orchestration
      _detection.py   # Component subclass identification (MRO heuristic)
      _orchestrator.py # load_extension, discover_inline_bundles
      _plugins.py     # manifest-first precedence over langflow.plugins

Largest file is now _orchestrator.py at 440 LOC (was 870); every file is
well under the 800-LOC project guideline.  No behavior change: the public
import paths from lfx.extension are unchanged, all 38 loader tests still
pass.  ``_canonicalize_distribution`` is now exported as
``canonicalize_distribution`` from ``loader._plugins`` (it's a stable
PEP-503 helper that downstream modules will reach for, so it loses the
private underscore).

The test suite is split to mirror the package:

    tests/unit/extension/loader/
      conftest.py             # shared fixtures, FakeDist, autouse scrub
      test_load_extension.py  # @official slot, identity, failure modes
      test_inline_bundles.py  # LANGFLOW_COMPONENTS_PATH, @extra slot
      test_plugins.py         # manifest-first precedence helpers
      test_types.py           # LoadedComponent, LoadResult, code parity

Each test file imports its own slice of the public API and pulls fixtures
from conftest, so a reader looking at one banner can read it in isolation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(lfx): atomic-swap Bundle reload pipeline + endpoint + CLI (LE-1018)

Five-stage reload (parallel staging load -> validate -> swap under write
lock -> cleanup -> emit) for installed Bundles in Mode A.  In-flight
flows keep the pre-swap class via existing references; new flows pick up
the post-swap class atomically; concurrent reloads on the same Bundle
are rejected with reload-in-progress.

Adds:

* lfx/extension/registry.py -- BundleRegistry with per-bundle
  reload-in-progress guard and components_index.json writer
* lfx/extension/reload.py -- the five-stage pipeline; events emission
  is stubbed (TODO LE-1017) so the swap mechanics can ship before the
  events service lands
* loader: optional module_namespace param so Stage 1 lands in
  __reload_staging__.<id> instead of the live _lfx_ext.* namespace
* errors: four new typed reload codes (reload-in-progress,
  reload-bundle-not-installed, reload-bundle-name-mismatch,
  reload-source-missing) with branch templates and snapshot tests
* HTTP: POST /api/v1/extensions/{id}/bundles/{name}/reload, gated by
  the existing get_current_active_user dependency, returns 409 with a
  typed body for the in-progress collision case
* CLI: lfx extension reload <id> [--bundle <name>] -- HTTP client
  against the dev server with text/json output and proper exit codes
  (--all is gated until LE-1019 lands the list endpoint)
* tests: 16 reload-pipeline tests covering the AC matrix (rename
  round-trip, broken-bundle isolation, concurrent readers, in-flight
  flow, double-reload guard, bundle-name mismatch) plus 9 CLI client
  tests

Mode A only.  In Mode B/C bundle changes require a Docker image rebuild
and the reload path is not exercised.

The events emission in Stage 5 is intentionally stubbed -- the LE-1017
ticket will swap the body of _emit_bundle_reload_event in one place
without touching the pipeline core.

* feat(frontend): palette Bundle reload action + loading + toasts

Adds the frontend half of the bundle reload flow.  When the Bundle
header is right-clicked or its overflow ("⋮") icon clicked, a Reload
action fires POST /api/v1/extensions/{id}/bundles/{name}/reload and
surfaces the result via the existing alert-store toast system.

What landed (frontend only):

  * src/controllers/API/queries/extensions/ -- typed wire-format models
    (ReloadBundleResponse, ExtensionErrorPayload, ReloadInProgressDetail)
    and the useReloadBundle mutation hook.  The hook unwraps the 409
    `reload-in-progress` detail into a stable, parseable Error message so
    the UI can branch without reading status codes.
  * components/bundleHeaderActions.tsx -- new Select-based overflow menu
    next to the Bundle header chevron.  Three toast paths: success
    (green, with components +/- delta), structural failure (red, with
    typed errors and inline hints), reload-in-progress (notice).
    Loading state swaps the kebab icon for a spinning Loader2 while
    the request is in flight.  Renders nothing when no extension_id is
    on the bundle, so the static SIDEBAR_BUNDLES list is unaffected.
  * components/bundleItems.tsx -- wires the new actions in next to the
    chevron, plus a context-menu (right-click) capture that opens the
    same overflow trigger so keyboard / mouse / right-click all share
    one source of truth.
  * types/index.ts -- BundleItemProps.item gains an optional
    extension_id; took the opportunity to extract the SidebarBundle
    interface and tighten three pre-existing `any` types.
  * customization/feature-flags.ts -- ENABLE_EXTENSION_RELOAD gate, off
    by default until the bundle-list endpoint that populates extension_id
    per bundle ships.
  * controllers/API/helpers/constants.ts -- EXTENSIONS URL constant.
  * Tests: 7 component tests + 3 mutation-hook tests, all green.  Total
    sidebar + extensions test count: 479 passing.

Deferred:

  * Event-pipeline subscription is left as an inline TODO.  The mutation
    response carries enough information to drive the toasts on its own
    today; once the events service lands the toast wiring will move to
    a `bundle_reloaded` / `bundle_reload_failed` listener so multi-tab
    and multi-worker swaps surface exactly once.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat: End to end bundle installation

* fix: Review comments addressed

* Update component_index.json

* Update component_index.json

* Update router.py

* fix(docker): copy src/bundles before uv sync so workspace bundles resolve

Each directory under ``src/bundles`` is a uv workspace member referenced by
``langflow-base`` (and the root project) as a path dependency.  The Docker
builders ran ``uv sync --no-install-project`` after copying only the
top-level pyproject.toml files, so resolution failed with
``Distribution not found at: file:///app/src/bundles/<name>``.

Copying the whole ``src/bundles`` tree (rather than enumerating each
bundle) means a new bundle dropped under that dir does not require a
Dockerfile edit.  The full ``./src`` copy a few lines later produces the
same final layer either way; this earlier copy just unblocks the
dependency-resolution sync.

Touched all builders that run a workspace-resolving uv sync:

  * docker/build_and_push.Dockerfile
  * docker/build_and_push_base.Dockerfile
  * docker/build_and_push_ep.Dockerfile
  * docker/build_and_push_with_extras.Dockerfile
  * docker/dev.Dockerfile (bind-mount instead of COPY)

* Revert "fix(docker): copy src/bundles before uv sync so workspace bundles resolve"

This reverts commit 5aa008a3cd.

* feat: DuckDuckGo as Extension in new Bundle System (#13044)

* feat: DuckDuckGo Extension for bundles

* fix ruff errors

* Update test_pilot_duckduckgo_upgrade.py

* test(lfx): handle non-empty canonical migration table + editable installs

- test_path_override_bypasses_cache: mirror the cached canonical table
  into the temp file instead of asserting it's empty.  Drift in
  migration_table.json (the duckduckgo entries shipped with the B1
  pilot) no longer breaks the cache-bypass invariant.

- test_lfx_duckduckgo_ships_manifest: editable installs (pip install -e)
  surface only dist-info entries in dist.files, so we cannot use that
  path to find extension.json in the workspace venv.  Detect editable
  mode via direct_url.json's PEP 660 marker and fall through to walking
  the source tree; non-editable wheel installs still exercise the
  dist.files path the loader uses at runtime.

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* fix(docker): copy src/bundles before uv sync so workspace bundles resolve

Each directory under ``src/bundles`` is a uv workspace member referenced by
``langflow-base`` (and the root project) as a path dependency.  The Docker
builders ran ``uv sync --no-install-project`` after copying only the
top-level pyproject.toml files, so resolution failed with
``Distribution not found at: file:///app/src/bundles/<name>``.

Copying the whole ``src/bundles`` tree (rather than enumerating each
bundle) means a new bundle dropped under that dir does not require a
Dockerfile edit.  The full ``./src`` copy a few lines later produces the
same final layer either way; this earlier copy just unblocks the
dependency-resolution sync.

Touched all builders that run a workspace-resolving uv sync:

  * docker/build_and_push.Dockerfile
  * docker/build_and_push_base.Dockerfile
  * docker/build_and_push_ep.Dockerfile
  * docker/build_and_push_with_extras.Dockerfile
  * docker/dev.Dockerfile (bind-mount instead of COPY)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: Review sweep

* fix: More review comments addressed

* Ruff check

* docs: add bundle porting guide

Step-by-step recipe for extracting a provider package from the in-tree
``src/lfx/src/lfx/components/<provider>/`` directory into a standalone
Extension Bundle distribution under ``src/bundles/<provider>/``.

The DuckDuckGo bundle is the reference; every section maps to a single
copy-pasteable change and a verification command.

Doc surfaces a forthcoming ``scripts/migrate/port_bundle.py`` automation
helper for the mechanical bits; that script lands on the next branch
together with the second-pilot port that validates the recipe end-to-end.

* fix(extension): accept Output(method=...) in build-method validator

The validator's static AST check looked for a literal ``build`` method
on every Component subclass and emitted ``build-method-missing`` when
absent.  Real Langflow components -- including the production
``DuckDuckGoSearchComponent`` and the in-tree ``ArXivComponent`` -- do
not declare a literal ``build``; they declare entry-points
declaratively via ``outputs = [Output(name=..., method=<name>)]`` and
the named method is what gets called.  Result: every clean port hit a
spurious ``build-method-missing`` error from ``lfx extension validate``.

Fix: extend ``_has_build_method`` to also accept any class that names a
method via ``Output(method="X")`` AND defines that method in the class
body.  The negative case ("Output(method=...) without a matching def")
still fires -- a typo'd method name would crash at runtime, so the
static check should keep flagging it.

Two new tests in ``test_validate.py`` lock the contract: positive case
mirroring duckduckgo / arxiv, negative case for typo'd method names.
All 26 validator tests pass.

PORTING.md updates fall out of running the recipe live against the
duckduckgo bundle on this branch:

  * Validate path is ``src/bundles/<bundle>/src/lfx_<bundle>``, not the
    bundle root (the manifest lives next to ``__init__.py``).
  * Index regen needs ``LFX_DEV=1`` to skip the prebuilt-index fast path
    and uses ``scripts/build_component_index.py``.
  * Drop the migration-table JSON from the ruff invocation (ruff treats
    it as Python and complains about the top-level expression).

* fix: Delete outdated components

* fix(palette): wire reload kebab via DropdownMenu, not Select

The reload kebab on the palette Bundle header was using Radix ``Select``
to back its overflow menu.  ``Select`` is for picking a value, not for
firing an action: ``onValueChange`` is gated by value-equality (so a
re-click of the only item is a no-op), and the popover-portal click
semantics interact poorly with the parent disclosure-trigger button.
The combined effect: clicking ⋮ → Reload opened the popover and closed
it, but never fired the network request, with no console error to point
at.

Switch to ``DropdownMenu`` (purpose-built action menu).
``DropdownMenuItem`` exposes ``onSelect`` which fires on every
activation -- the same callback path keyboard navigation uses -- so
clicking Reload reliably invokes the mutation.

Test mocks updated to drive the DropdownMenu primitives instead of
Select; all 8 bundleHeaderActions tests + the broader 437-test sidebar
suite still pass.

* fix(extension): route ddgs through the lockfile + drop bogus list endpoint hint

Two reviewer findings, both about reproducibility / correctness of
operator-facing surfaces.

[P2] ``docker/build_and_push_base.Dockerfile`` previously installed
``ddgs`` via an unpinned ``uv pip install ddgs`` after the workspace
sync.  That made the base image non-reproducible: a future ``ddgs``
release would silently drift from the tested lock state on every
rebuild.

Fix: route ddgs through the locked sync.

  * Restore the ``duckduckgo`` extra in ``src/backend/base/pyproject.toml``
    (``ddgs>=9.0.0``) as an internal "image-build sidecar".  Public
    consumers still install ``lfx-duckduckgo`` directly; the extra
    exists only to keep ``ddgs`` resolved in the lockfile.
  * The Dockerfile now passes ``--extra duckduckgo`` to ``uv sync
    --frozen``, picking up the locked ``ddgs==9.14.1``.
  * The follow-on bundle install keeps ``--no-deps`` so it does not
    duplicate the now-locked ``ddgs`` / ``lfx`` / ``langchain-community``.

[P3] ``langflow/api/v1/extensions.py`` returned a fix hint that pointed
operators at ``GET /api/v1/extensions`` -- a route that does not exist
in this PR (it lands with the LE-1019 list endpoint).  Replaced with a
reference to ``lfx extension list``, which is shipped here.

* fix(compat): bridge langflow.components.* dynamically via meta path finder

Commit 45552cd1df ("fix: Delete outdated components") removed the
physical shim files under ``src/backend/base/langflow/components/``
that forwarded saved-flow imports like
``from langflow.components.processing.converter import convert_to_dataframe``
or ``import langflow.components.knowledge_bases.retrieval`` to their
new ``lfx.components.*`` homes.  Without those shims, dotted imports
into ``langflow.components.<sub>.<leaf>`` failed at flow-load time --
the existing ``LangflowCompatibilityModule`` registers ``langflow.components``
itself in ``sys.modules`` but does not bridge submodules, so Python's
import machinery falls through to the now-empty langflow.components
directory and raises ``ModuleNotFoundError``.

Replace the deleted physical-shim stack with a single ``MetaPathFinder``
in ``langflow/__init__.py`` that dynamically resolves every
``langflow.components.<rest>`` import to ``lfx.components.<rest>`` and
registers the loaded lfx module in ``sys.modules`` under both names.
The langflow- and lfx-prefixed imports share a single underlying module
object, so class identity is preserved across the bridge -- ``isinstance``
checks against types resolved through either path keep working.

The finder also carries a small first-segment override map for the few
subpackages whose name diverged during the move; the only entry today is
``knowledge_bases`` -> ``files_and_knowledge``, matching the deleted
shim's intent.

Why a meta finder instead of restoring the physical shim files (option
1 from the scope analysis): the meta finder scales without per-bundle
maintenance.  Every future bundle extraction landed under ``lfx.components``
becomes reachable via the legacy ``langflow.components.<bundle>`` path
immediately; nobody has to remember to add a parallel langflow shim.

Six new unit tests in ``test_langflow_components_compat_shim.py`` lock
the contract: dotted submodule resolution, helpers re-export, the
``knowledge_bases`` override, class identity preservation, top-level
aliasing, and the "arbitrary extracted bundle" case that prevents
regression for future ports.

Verified pre-existing tests:
  * 17 dynamic-import integration tests pass.
  * The reload-route-guard suite still passes.
  * The Research Translation Loop starter-project test (which loads
    ArXivComponent) passes.

* Update index.tsx

* fix: Review pass on delivery

* fix: Second review sweep, bare names

* fix: Third review sweep

* Resolve dotted imports and attribute chains

Record import shape and flatten attribute chains so router references can be resolved across dotted imports and re-exports. Added ImportTarget dataclass, _attribute_chain helper, and switched IncludeCall/DecoratorRef to store attribute tuples. parse_file now records ImportTarget entries for imports and captures dotted parent/child chains for include_router and decorators. Replaced _resolve_var with _resolve_chain which handles "from" vs "module" imports, various import shapes (including import x.y and aliased imports), and prevents infinite recursion on re-export cycles.

* One more sweep

* Add seed-directory extension loading and docs

Introduce filesystem "seed directory" extension support and authoring docs. Adds three documentation pages (quickstart, manifest reference, author guide) and wires them into the docs sidebar. Implement load_seed_extensions to discover/load bundles from $LANGFLOW_SEED_DIR (default /opt/langflow/bundles), export it from loader/__init__ and extension package, and integrate it into the components import pipeline. Handle installed-vs-seed shadowing by preferring installed distributions and appending a typed seed-bundle-shadowed ExtensionError; add the corresponding error code and message. Update schema doc link and add unit/integration tests to cover seed loading, determinism, shadowing behavior, and migration-target resolution.

* Fix claims

* Fix docasaurus build

* Clean up the manual checklist

* Update test_pilot_duckduckgo_upgrade.py

* fix: Some wording issues with dogfooding

* fix: Comments addressed

* Update port_bundle.py

* Update component_index.json

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* fix: pytest testpaths glob and accurate scaffold output in port_bundle

testpaths now uses ``src/bundles/*/tests`` so future bundle tests are
picked up automatically without hardcoding each bundle at the root.
pytest expands the glob via ``glob.iglob(..., recursive=True)``.

Rewrote port_bundle.py's ``_render_migration_entries`` and
``_render_test_scaffold`` to match the actual conventions:

* Migration entries now use ``bare_class_name``/``import_path``/
  ``legacy_slot`` + ``target`` + ``added_in`` (the keys
  ``lfx.extension.migration.loader`` actually reads) instead of the
  invented ``from``/``to``/``release`` shape.
* Test scaffold now imports ``load_migration_table`` and
  ``migrate_flow_payload`` -- the APIs the real tests use -- instead of
  a fictitious ``resolve_legacy_id``.  Includes the ``migration_table``
  fixture, ``_saved_flow``/``_saved_flow_node`` helpers, and the
  distribution-importable + manifest-shipped checks that mirror
  ``test_pilot_duckduckgo_upgrade.py``.

Verified by rendering the scaffold for duckduckgo with synthetic plan
data, dropping it into ``src/lfx/tests/integration/extension/``, and
running pytest -- ``3 passed, 2 skipped`` (skips are the wheel-only
checks, by design when run inside the lfx isolation venv).

* [autofix.ci] apply automated fixes

* fix: Review comments

* Update test_discovery.py

* feat: Port Arxiv to the Extension Framework (#13047)

* feat(bundles): port arxiv as the second-pilot Bundle + porting helper

Validates ``src/bundles/PORTING.md`` end-to-end by following its recipe
against a clean candidate (``ArXivComponent``: no third-party runtime
deps, no langflow-base extra, no deactivated duplicate).  Touchpoints
exercised:

  * Bundle skeleton at ``src/bundles/arxiv/`` mirroring duckduckgo.
  * In-tree provider directory removed from ``src/lfx/src/lfx/components/``
    along with its three references in ``components/__init__.py``.
  * Workspace wiring: dep, ``[tool.uv.sources]``, ``[tool.uv.workspace]``
    members, lockfile.
  * Migration table: bare-name + two import-path forms + legacy_slot
    entry.
  * Component index regenerated via ``LFX_DEV=1`` (forces dynamic
    discovery; without it the script reproduces stale entries).
  * Integration test ``test_pilot_arxiv_upgrade.py`` mirroring the
    duckduckgo pilot suite; 5 tests pass against the workspace install.

PORTING.md updates fall out of running the recipe live:
  * Validate path is ``src/bundles/<bundle>/src/lfx_<bundle>``, not the
    bundle root (the manifest lives next to ``__init__.py``).
  * Index regen needs ``LFX_DEV=1`` to skip the prebuilt-index fast path.
  * Drop the migration-table JSON from the ruff invocation (ruff treats
    it as Python and complains about the top-level expression).

``scripts/migrate/port_bundle.py`` is the mechanical helper referenced
from § Automation: stdlib-only, dry-run by default, refuses on invalid
input, and intentionally leaves migration-table edits + integration-test
authoring to a human (release version + bare-name uniqueness require
judgement).  Three guard rails verified: invalid bundle name,
existing-target-bundle, missing in-tree provider.

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* Update Research Translation Loop.json

* Update .secrets.baseline

* fix: Move bundle test for arxiv

* Update PORTING.md

* Update component_index.json

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* Update component_index.json

* [autofix.ci] apply automated fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* Update component_index.json

* Update component_index.json

* Update component_index.json

* fix: empty cache dict on reload

* Lint fixes

* Update test_components_cache_integration.py

* Update test_reload.py

* Hardening pass

* Update test_init_template.py

* fix: resolve cross-source bundle-name shadowing before registry population

The reload pipeline reads ``live.source_path`` from the registry on every
call.  Previously, the registry-population loop in
``import_extension_components`` only special-cased installed-shadows-seed;
for every other pair (seed/dev, seed/inline, dev/inline,
installed/dev, installed/inline) it silently overwrote earlier records
via last-wins iteration order.  A stale dev registration whose
``source_path`` pointed at a different filesystem location could clobber
the seed record's ``source_path``; reload would then walk the dev path
while the operator edited the seed copy on disk -- producing 200 OK with
empty deltas on every reload, including for syntactically broken edits.

Generalize the dedup pass to every (earlier, later) pair using the
explicit precedence ``installed > seed > dev > inline``, applied before
both registry population AND palette template construction so the two
read from the same winning source.  Add a new generic ``bundle-shadowed``
typed error code for the pairs the existing ``seed-bundle-shadowed`` did
not cover; keep ``seed-bundle-shadowed`` for the documented installed-
over-seed pair so existing CLI exit-code logic and snapshot tests stay
intact.  Both codes are warn-only in ``lfx extension list``.

Also add an INFO log line in reload Stage 1 with the resolved
``source_path`` so the next "200 OK with empty deltas" repro can be
triaged from the server log alone -- if the path logged is not the path
the operator was editing, this dedup is what to look at.

Includes a regression test
(``test_seed_bundle_shadows_dev_emits_generic_bundle_shadowed``) that
asserts both halves: seed wins in the BundleRegistry AND the registry's
``source_path`` is the seed path, not the stale dev path.

* Update component_index.json

* fix: widen lfx-* bundles' requires-python to <3.15 to match langflow root

The two pilot bundles (``lfx-arxiv``, ``lfx-duckduckgo``) were scaffolded
by ``scripts/migrate/port_bundle.py`` whose template hard-coded
``requires-python = ">=3.10,<3.14"``.  Because both bundles are uv
workspace members of the langflow root, that cap leaked into every
workspace-level resolve: ``cd src/lfx && uv sync`` (the path
``make lfx_tests`` takes) refuses to pick a Python 3.14 interpreter even
though lfx itself, langflow, and langflow-base all advertise
``>=3.10,<3.15``.  Hosts with 3.14 installed see:

    error: The requested interpreter resolved to Python 3.14.5, which
    is incompatible with the project's Python requirement: `>=3.10, <3.14`.

Fix at the source so future ``port_bundle.py`` runs do not regress this:
template emits ``<3.15``, and the two existing emitted pyprojects are
bumped in lockstep.  ``uv.lock`` regenerates with the wider range.

Verified ``make lfx_tests`` resolves cleanly on a host with both 3.13.12
and 3.14.5 installed; the focused extension slice runs to completion.

* Update __init__.py

* Update src/lfx/tests/unit/extension/migration/test_rewrite.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/loader/_plugins.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs/docs/Deployment/deployment-extensions-production.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/lfx/src/lfx/extension/loader/_orchestrator.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs/docs/Develop/extensions-author-guide.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs/docs/Develop/extensions-manifest.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: Coderabbit review suggestions

* Template updates

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Tweaks to bundle hot reload

* [autofix.ci] apply automated fixes

* chore: Address review comments by @Cristhianzl

* [autofix.ci] apply automated fixes

* Update BUNDLE_API.md

* Update component_index.json

* Update component_index.json

* Update Structured Data Analysis Agent.json

* fix: Next round of review comments

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-18 17:36:56 +00:00
a80cf1c649 chore: support Python 3.14 (#13085)
* feat: upgrade Docker images to Python 3.14 (experimental)

- Update pyproject.toml: requires-python from <3.14 to <3.15
- Update all 5 Dockerfiles to use Python 3.14:
  - Builder stage: python3.12-trixie-slim → python3.14-trixie-slim
  - Runtime stage: python:3.12-slim-trixie → python:3.14-slim-trixie

- src/backend/base/pyproject.toml
- docker/build_and_push_base.Dockerfile
- docker/build_and_push.Dockerfile
- docker/build_and_push_backend.Dockerfile
- docker/build_and_push_with_extras.Dockerfile
- docker/build_and_push_ep.Dockerfile

Python 3.14.5 was released on May 10, 2026. Upgrading to the latest
Python version should help reduce CVE vulnerabilities in Docker images.

This is an experimental change to test Python 3.14 compatibility:
- Docker images will use Python 3.14
- CI/CD workflows still test on Python 3.10-3.13
- Nightly build will validate if dependencies work with 3.14
- Can be reverted quickly if issues are found

- Monitor nightly build for failures
- If successful, update CI/CD workflows to add Python 3.14 to test matrix
- If failures occur, revert and investigate compatibility issues

* chore: support Python 3.14

Bump requires-python upper bound to <3.15 across langflow, langflow-base,
lfx, and langflow-sdk, and add 3.14 to CI test matrices so PRs are gated
on 3.14 compatibility.

Conditional pins for transitive deps without 3.14 wheels at the existing
caps:
- onnxruntime: >=1.26 on 3.14 (existing <1.24 cap retained for 3.10)
- faiss-cpu: >=1.13.2 on 3.14 (existing ==1.9.0.post1 retained for <3.14)

* chore: marker-gate IBM watsonx packages for Python 3.14

ibm-watsonx-ai 1.3.x cannot import on Python 3.14: its StrEnum subclasses
override __init__ in a way that conflicts with 3.14's reworked enum
__set_name__ path (TypeError on KnowledgeBaseFieldRole class creation).

Cap ibm-watsonx-ai, langchain-ibm, and the ibm-watsonx-orchestrate-*
extras at python_version<'3.14' until upstream adapts. Watsonx component
imports are already lazy, so this surfaces only at component-access time
on 3.14, where the existing ImportError handler in
lfx.components.ibm.__init__ degrades it gracefully.

test_model_utils.py imports ChatWatsonx at module top to verify
get_model_name resolves model_id; guard that import so the test
module skips on 3.14 instead of breaking collection.

* [autofix.ci] apply automated fixes

* chore: upgrade remaining Docker images to Python 3.14

build_and_push*.Dockerfile already moved to 3.14 in the merge from
feat/upgrade-python-3.14-docker-images. Apply the same bump to the
dev, devcontainer, and lfx Docker images so all in-repo Dockerfiles
share one Python version.

* [autofix.ci] apply automated fixes

* chore: gate 3.14-broken extras to python_version<'3.14'

cuga (and its transitive fastembed -> py-rust-stemmers source build),
altk/agent-lifecycle-toolkit (re-pulls ibm-watsonx-ai which was already
gated), langchain-pinecone, langwatch, ragstack-ai-knowledge-store, and
OpenDsStar all pin themselves below 3.14 upstream. Without a marker
guard, the workspace lock still tries to install them and a Docker
`uv sync` then attempts source builds that require Rust (CI Docker
test failure with py-rust-stemmers 0.1.5).

Add python_version<'3.14' (or <'3.13' for ragstack) to each pin so
those packages are simply omitted from the 3.14 install set until
upstream catches up. uv pip check is now clean on 3.14.2.

* test: skip test_altk_agent on Python 3.14

altk (agent-lifecycle-toolkit) is gated to python_version<'3.14'
upstream and now via the langflow-base [altk] extra marker. The test
imports altk at module top to exercise ALTKAgentComponent; guard the
import so collection skips on 3.14 instead of failing.

* test: skip remaining altk tests on Python 3.14

Three more test modules import lfx.base.agents.altk_* at module top,
which transitively imports altk. Add the same module-level skip guard
as test_altk_agent.py:
- test_altk_agent_logic.py
- test_altk_agent_tool_conversion.py
- test_conversation_context_ordering.py

* fix(calculator): replace removed ast.Num with ast.Constant for Python 3.14

ast.Num was deprecated in Python 3.8 in favor of ast.Constant and
removed entirely in 3.14. The calculator tool and its core walker
crashed on 3.14 with 'module ast has no attribute Num'.

Switch the isinstance checks to ast.Constant + isinstance(node.value,
(int, float)), and drop the now-dead ast.Num backwards-compat branch
in calculator_core.py (the ast.Constant branch already handles every
input it would have matched). Update the parser unit-test fixtures
to construct ast.Constant nodes.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* test: skip LangWatch HTTP instrumentation tests on Python 3.14

langwatch is gated to python_version<'3.14' upstream. The
TestLangWatchHttpInstrumentation class patches langwatch.setup and
langwatch.trace inside a fixture, which requires langwatch to be
importable; on 3.14 the test errors with ModuleNotFoundError.

Guard the class with a skipif on langwatch availability.

* test: allow IBM and altk components to be missing on Python 3.14

test_all_modules_importable enforces that every component in __all__
imports cleanly. On 3.14 the ibm-watsonx-ai, langchain-ibm, and altk
packages are gated upstream and intentionally not installed, so the
WatsonxAI, WatsonxEmbeddings, and ALTKAgent components fail to import
as designed.

- test_all_components_in_categories_importable: accept a known-gated
  deny-list on 3.14 instead of failing.
- test_all_lfx_component_modules_directly_importable: extend the
  existing 'missing optional dependency' allowlist with altk,
  langchain_ibm, and ibm_watsonx_ai.

* fix(lfx): pass ensure_exists to user_cache_dir for Python 3.14

Python 3.14 tightened PurePath.__init__ to reject unknown keyword
arguments. The KeyedWorkerLockManager constructor was passing
ensure_exists=True to Path() instead of user_cache_dir(), which
silently worked on 3.10-3.13 but raises TypeError on 3.14 and also
meant the cache directory was never actually being created.

Move the kwarg to user_cache_dir() where it belongs and update the
two unit tests that asserted the buggy call shape.

* [autofix.ci] apply automated fixes

* test: accept either ZIP or JSON error path on Python 3.14

Python 3.14's zipfile.is_zipfile() now validates the central-directory
signature in addition to EOCD, so the garbage+EOCD payload no longer
passes the is_zipfile() dispatch in the /flows/upload/ route. The
endpoint still returns 400 with a descriptive detail (now from the JSON
branch); only the message wording differs, which the test was asserting
verbatim.

* fix(lfx): normalize cors_origins ['*'] back to '*' on Python 3.14

Pydantic-settings on Python 3.14 parses the env var '*' into ['*']
before the cors_origins field validator runs (the list[str] | str union
resolves differently than on 3.10-3.13). Collapse that back to the
bare-string wildcard so downstream consumers — including
warn_about_future_cors_changes and the test suite — see the same shape
on every supported Python version.

---------

Co-authored-by: vijay kumar katuri <vijay.katuri@ibm.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 1955f8fae5)
2026-05-13 22:23:39 +00:00
0732423f27 chore: security patch (#12725)
* chore: security patch

security patch

* chore: upgrade package-lock.json

* chore: smolagents and transformer update

* chore: redis upgrade

* chore: litellm upgrade

* fix: Pin click to avoid lower versions

## Root cause

**litellm 1.83.5+** introduced an exact pin `click==8.1.8` in its `requires_dist` (upstream bug [BerriAI/litellm#26154](https://github.com/BerriAI/litellm/issues/26154) — "Pinning exact dependency versions breaks downstream consumers"). When this branch bumped litellm to 1.83.11, uv was forced to downgrade click from 8.3.2 → 8.1.8. Click 8.2+ captures stderr separately by default; 8.1 merges it — hence `ValueError: stderr not separately captured`.

## Fix

- [pyproject.toml:155](pyproject.toml:155) — added `"click>=8.3.0"` to `[tool.uv] override-dependencies` with comment linking the upstream issue.
- [src/backend/base/pyproject.toml:112](src/backend/base/pyproject.toml:112) — same override so `langflow-base` Docker builds pick it up too.
- Regenerated `uv.lock` (click: 8.1.8 → 8.3.3).
- Patched the `click` entry in `src/backend/base/uv.lock` to 8.3.3 (that lockfile is used by `docker/build_and_push_base.Dockerfile` via `uv sync --frozen`; uv treats backend/base as a workspace member so I updated its click block directly — no other references to 8.1.8 remain).
- Reverted [src/lfx/tests/unit/cli/test_run_real_flows.py](src/lfx/tests/unit/cli/test_run_real_flows.py) back to its original `result.stderr` usage — now passes cleanly with click 8.3.3.

All 19 tests in the file pass.

* Update build_and_push_backend.Dockerfile

The `uv pip install` command doesn't read `[tool.uv] override-dependencies` from the target packages' pyproject.toml — those overrides only apply during `uv lock`/`uv sync`. The fix is to pass the overrides explicitly via `--overrides`.

Now let me verify it works by running the same install locally.

Resolution succeeded — click==8.3.3, aiohttp==3.13.5, litellm==1.83.11 all coexist. Let me also test without `--overrides` to confirm I reproduce the original failure.

Reproduced the Docker failure locally. Now test with the overrides file:

Fix verified — resolution succeeds with the overrides file, failing without. Let me clean up and show the final Dockerfile change.

## Summary

**Root cause:** The Dockerfile uses `uv pip install ./src/...` which **does not read** `[tool.uv] override-dependencies` from the target packages' `pyproject.toml` — those overrides only apply during `uv lock`/`uv sync`. On Linux, `cuga>=0.2.20` requires `aiohttp>=3.13.5`, but `litellm==1.83.11` exact-pins `aiohttp==3.13.3` (same upstream bug as the click pin, [BerriAI/litellm#26154](https://github.com/BerriAI/litellm/issues/26154)). Without an active override, resolution fails.

**Fix:** Write a `/tmp/uv-overrides.txt` file mirroring the workspace's `override-dependencies` (litellm, python-dotenv, openai, aiohttp, click) and pass `--overrides /tmp/uv-overrides.txt` to `uv pip install`.

Verified locally by reproducing the exact failure in an isolated tmp directory (to escape the workspace's pyproject.toml auto-apply), then confirming the overrides file resolves it:
- aiohttp==3.13.5 ✓
- click==8.3.3 ✓
- litellm==1.83.11 ✓
- cuga==0.2.22 ✓

* Templates version update

* Update .secrets.baseline

* chore: update overrides

* chore: bump version

* chore: bump main version

* chore: bump SDK version to 0.1.1

* chore: run uv lock and uv sync after SDK version bump

* chore: read the overrides from a single source

security patch

* chore: add pip check toggle

add pip check toggle

* chore: litellm base uv.lock update

* fix(chore): Pin litellm back to last working release

* fix(chore): Pin to 1.83 and higher litellm

* Update build_and_push_backend.Dockerfile

* chore: update base uv.lock

* fix: lazyload toolguard since its an optional extra

* Update .secrets.baseline

* Update component_index.json

* Rebuild component index

* Update component_index.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: vijay kumar katuri <vijay.katuri@ibm.com>
(cherry picked from commit 60a8f76c3fde17124057626c671ea8162872837a)
2026-04-23 17:49:53 -07:00
68642a8a86 fix: Properly grep for the langflow version (#12486)
* fix: Properly grep for the langflow version

* Mount the sdk where needed

* Skip the sdk
2026-04-03 15:02:11 +00:00
45325f6376 feat: Langflow SDK and Flow DevOps API Toolkit (#12245)
* feat(sdk): add langflow-sdk Python client package

* feat(lfx): add Flow DevOps CLI toolkit

* feat(api): add flow upsert, export normalization, ZIP upload

* chore: CI coverage merge, Docker fixes, dependency updates

* Address CQ5 review / import bug

* Update test_status_command.py

* Update test_status_command.py

* Fix more tests

* Review edits

* Review edits

* Fix tests

* Follow up review updates

* Refactor common client code

* Update templates and comp index

* [autofix.ci] apply automated fixes

* Update test_database.py

* Updates from review comments

* Fix push interface to match the rest

* Update push.py

* Update push.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-02 16:13:13 +00:00
acc649107c ci: upgrade runtime to python:3.14.3-slim-trixie (#12369)
* ci: upgrade runtime to python:3.14.3-slim-trixie

upgrade our dockerfiles to use LTS runner version python:3.14.3-slim-trixie

* chore: stay with version 3.12

3.12
2026-03-29 20:17:17 +00:00
2473c1bfae fix: replace grep -oP with sed for Node.js version extraction in Docker builds (#12331)
The grep -oP (PCRE regex) command fails in the python:3.12.12-slim-trixie
Docker base image because PCRE support is not available in the slim variant.

This replaces grep -oP with portable sed -nE in all 5 Dockerfiles and adds
an empty version guard to fail fast with a clear error message instead of
producing a broken download URL.
2026-03-27 20:58:06 +00:00
c291ebed4c fix(docker): Remove broken npm self-upgrade from Docker images (#12309) 2026-03-25 09:07:24 -03:00
f553896a1f chore: merge branch release-1.8.1 into main (#12185)
* fix: Fixes Kubernetes deployment crash on runtime_port parsing (#11968) (#11975)

* feat: add runtime port validation for Kubernetes service discovery

* test: add unit tests for runtime port validation in Settings

* fix: improve runtime port validation to handle exceptions and edge cases

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>

* fix(frontend):  show delete option for default session when it has messages (#11969)

* feat: add documentation link to Guardrails component (#11978)

* feat: add documentation link to Guardrails component

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: traces v0 (#11689) (#11983)

* feat: traces v0

v0 for traces includes:
- filters: status, token usage range and datatime
- accordian rows per trace

Could add:
- more filter options. Ecamples: session_id, trace_id and latency range

* fix: token range

* feat: create sidebar buttons for logs and trace

add sidebar buttons for logs and trace
remove lods canvas control

* fix: fix duplicate trace ID insertion

hopefully fix duplicate trace ID insertion on windows

* fix: update tests and alembic tables for uts

update tests and alembic tables for uts

* chore: add session_id

* chore: allo grouping by session_id and flow_id

* chore: update race input output

* chore: change run name to flow_name - flow_id
was flow_name - trace_id
now flow_name - flow_id

* facelift

* clean up and add testcases

* clean up and add testcases

* merge Alembic detected multiple heads

* [autofix.ci] apply automated fixes

* improve testcases

* remodel files

* chore: address gabriel simple changes

address gabriel simple changes in traces.py and native.py

* clean up and testcases

* chore: address OTel and PG status comments

https://github.com/langflow-ai/langflow/pull/11689#discussion_r2854630438
https://github.com/langflow-ai/langflow/pull/11689#discussion_r2854630446

* chore: OTel span naming convention

model name is now set using name = f"{operation} {model_name}" if model_name else operation

* add traces

* feat: use uv sources for CPU-only PyTorch (#11884)

* feat: use uv sources for CPU-only PyTorch

Configure [tool.uv.sources] with pytorch-cpu index to avoid ~6GB CUDA
dependencies in Docker images. This replaces hardcoded wheel URLs with
a cleaner index-based approach.

- Add pytorch-cpu index with explicit = true
- Add torch/torchvision to [tool.uv.sources]
- Add explicit torch/torchvision deps to trigger source override
- Regenerate lockfile without nvidia/cuda/triton packages
- Add required-environments for multi-platform support



* fix: update regex to only replace name in [project] section

The previous regex matched all lines starting with `name = "..."`,
which incorrectly renamed the UV index `pytorch-cpu` to `langflow-nightly`
during nightly builds. This caused `uv lock` to fail with:
"Package torch references an undeclared index: pytorch-cpu"

The new regex specifically targets the name field within the [project]
section only, avoiding unintended replacements in other sections like
[[tool.uv.index]].

* style: fix ruff quote style

* fix: remove required-environments to fix Python 3.13 macOS x86_64 CI

The required-environments setting was causing hard failures when packages
like torch didn't have wheels for specific platform/Python combinations.
Without this setting, uv resolves optimistically and handles missing wheels
gracefully at runtime instead of failing during resolution.



---------



* LE-270: Hydration and Console Log error (#11628)

* LE-270: add fix hydration issues

* LE-270: fix disable field on max token on language model

---------



* test: add wait for selector in mcp server tests (#11883)

* Add wait for selector in mcp server tests

* [autofix.ci] apply automated fixes

* Add more awit for selectors

* [autofix.ci] apply automated fixes

---------



* fix: reduce visual lag in frontend  (#11686)

* Reduce lag in frontend by batching react events and reducing minimval visual build time

* Cleanup

* [autofix.ci] apply automated fixes

* add tests and improve code read

* [autofix.ci] apply automated fixes

* Remove debug log

---------




* feat: lazy load imports for language model component (#11737)

* Lazy load imports for language model component

Ensures that only the necessary dependencies are required.
For example, if OpenAI provider is used, it will now only
import langchain_openai, rather than requiring langchain_anthropic,
langchain_ibm, etc.

* Add backwards-compat functions

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Add exception handling

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* comp index

* docs: azure default temperature (#11829)

* change-azure-openai-default-temperature-to-1.0

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* [autofix.ci] apply automated fixes

---------



* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix unit test?

* add no-group dev to docker builds

* [autofix.ci] apply automated fixes

---------





* feat: generate requirements.txt from dependencies  (#11810)

* Base script to generate requirements

Dymanically picks dependency for LanguageM Comp.
Requires separate change to remove eager loading.

* Lazy load imports for language model component

Ensures that only the necessary dependencies are required.
For example, if OpenAI provider is used, it will now only
import langchain_openai, rather than requiring langchain_anthropic,
langchain_ibm, etc.

* Add backwards-compat functions

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Add exception handling

* Add CLI command to create reqs

* correctly exclude langchain imports

* Add versions to reqs

* dynamically resolve provider imports for language model comp

* Lazy load imports for reqs, some ruff fixes

* Add dynamic resolves for embedding model comp

* Add install hints

* Add missing provider tests; add warnings in reqs script

* Add a few warnings and fix install hint

* update comments add logging

* Package hints, warnings, comments, tests

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* Add alias for watsonx

* Fix anthropic for basic prompt, azure mapping

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* ruff

* [autofix.ci] apply automated fixes

* test formatting

* ruff

* [autofix.ci] apply automated fixes

---------



* fix: add handle to file input to be able to receive text (#11825)

* changed base file and file components to support muitiple files and files from messages

* update component index

* update input file component to clear value and show placeholder

* updated starter projects

* [autofix.ci] apply automated fixes

* updated base file, file and video file to share robust file verification method

* updated component index

* updated templates

* fix whitespaces

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add file upload test for files fed through the handle

* [autofix.ci] apply automated fixes

* added tests and fixed things pointed out by revies

* update component index

* fixed test

* ruff fixes

* Update component_index.json

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* updated component index

* updated component index

* removed handle from file input

* Added functionality to use multiple files on the File Path, and to allow files on the langflow file system.

* [autofix.ci] apply automated fixes

* fixed lfx test

* build component index

---------





* docs: Add AGENTS.md development guide (#11922)

* add AGENTS.md rule to project

* change to agents-example

* remove agents.md

* add example description

* chore: address cris I1 comment

address cris I1 comment

* chore: address cris I5

address cris I5

* chore: address cris I6

address cris I6

* chore: address cris R7

address cris R7

* fix testcase

* chore: address cris R2

address cris R2

* restructure insight page into sidenav

* added header and total run node

* restructing branch

* chore: address gab otel model changes

address gab otel model changes will need no migration tables

* chore: update alembic migration tables

update alembic migration tables after model changes

* add empty state for gropu sessions

* remove invalid mock

* test: update and add backend tests

update and add backend tests

* chore: address backend code rabbit comments

address backend code rabbit comments

* chore: address code rabbit frontend comments

address code rabbit frontend comments

* chore: test_native_tracer minor fix address c1

test_native_tracer minor fix address c1

* chore: address C2 + C3

address C2 + C3

* chore: address H1-H5

address H1-H5

* test: update test_native_tracer

update test_native_tracer

* fixes

* chore: address M2

address m2

* chore: address M1

address M1

* dry changes, factorization

* chore: fix 422 spam and clean comments

fix 422 spam and clean comments

* chore: address M12

address M12

* chore: address M3
 address M3

* chore: address M4

address M4

* chore: address M5

address M5

* chore: clean up for M7, M9, M11

clean up for M7, M9, M11

* chore: address L2,L4,L5,L6 + any test

address L2,L4,L5 and L6 + any test

* chore: alembic + comment clean up

alembic + comment clean up

* chore: remove depricated test_traces file

remove depricated test_traces file. test have all been moved to test_traces_api.py

* fix datetime

* chore: fix test_trace_api ge=0 is allowed now

fix test_trace_api ge=0 is allowed now

* chore: remove unused traces cost flow

remove unused traces cost flow

* fix traces test

* fix traces test

* fix traces test

* fix traces test

* fix traces test

* chore: address gabriels otel coment

address gabriels otel coment latest

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>

* fix(test): Fix superuser timeout test errors by replacing heavy clien… (#11982)

fix(test): Fix superuser timeout test errors by replacing heavy client fixture                                                    (#11972)

* fix super user timeout test error

* fix fixture db test

* remove canary test

* [autofix.ci] apply automated fixes

* flaky test

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* refactor(components): Replace eager import with lazy loading in agentics module  (#11974)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: add ondelete=CASCADE to TraceBase.flow_id to match migration (#12002)

* fix: add ondelete=CASCADE to TraceBase.flow_id to match migration

The migration file creates the trace table's flow_id foreign key with
ondelete="CASCADE", but the model was missing this parameter. This
mismatch caused the migration validator to block startup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add defensive migration to ensure trace.flow_id has CASCADE

Adds a migration that ensures the trace.flow_id foreign key has
ondelete=CASCADE. While the original migration already creates it
with CASCADE, this provides a safety net for any databases that may
have gotten into an inconsistent state.

* fix: dynamically find FK constraint name in migration

The original migration did not name the FK constraint, so it gets an
auto-generated name that varies by database. This fix queries the
database to find the actual constraint name before dropping it.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* fix: LE-456 - Update ButtonSendWrapper to handle building state and improve button functionality (#12000)

* fix: Update ButtonSendWrapper to handle building state and improve button functionality

* fix(frontend): rename stop button title to avoid Playwright selector conflict

The "Stop building" title caused getByRole('button', { name: 'Stop' })
to match two elements, breaking Playwright tests in shards 19, 20, 22, 25.

Renamed to "Cancel" to avoid the collision with the no-input stop button.

* Fix: pydantic fail because output is list, instead of a dict (#11987)

pydantic fail because output is list, instead of a dict

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* refactor: Update guardrails icons (#12016)

* Update guardrails.py

Changing the heuristic threshold icons.

The field was using the default icons. I added icons related to the security theme.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>

* feat(ui): Replace Show column toggle with eye icon in advanced dialog                                  (#12028)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(ui): Prevent auto-focus and tooltip on dialog close button (#12027)

* fix: reset button (#12024)

fix reset button

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix: Handle message inputs when ingesting knowledge (#11988)

* fix: Handle message inputs when ingesting knowledge

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* Update test_ingestion.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(ui): add error handling for invalid JSON uploads via upload button (#11985)

* fix(ui): add error handling for invalid JSON uploads via upload button

* feat(frontend): added new test for file upload

* feat(frontend): added new test for file upload

* fix(ui): Add array validation for provider variables mapping (#12032)

* fix: LM span is now properly parent of ChatOpenAI (#12012)

* fix: LM span is now properly parent of ChatOpenAI

Before LM span and ChatOpenAI span where both considered parents so they where being counted twice in token counts and other sumations
Now LM span is properly the parent of ChatOpenAI span so they are not accidently counted twice

* chore: clean up comments

clean up comments

* chore: incase -> incase

incase -> incase

* fix: Design fix for traces (#12021)

* fix: LM span is now properly parent of ChatOpenAI

Before LM span and ChatOpenAI span where both considered parents so they where being counted twice in token counts and other sumations
Now LM span is properly the parent of ChatOpenAI span so they are not accidently counted twice

* chore: clean up comments

clean up comments

* chore: incase -> incase

incase -> incase

* design fix

* fix testcases

* fix header

* fix testcase

---------

Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>

* fix: Add file upload extension filter for multi-select and folders (#12034)

* fix: plaground - inspection panel feedback (#12013)

* fix: update layout and variant for file previews in chat messages

* fix: update background color to 'bg-muted' in chat header and input wrapper components

* refactor(CanvasControls): remove unused inspection panel logic and clean up code

* fix: remove 'bg-muted' class from chat header and add 'bg-primary-foreground' to chat sidebar

* fix: add Escape key functionality to close sidebar

* fix: playground does not scroll down to the latest user message upon … (#12040)

fix: playground does not scroll down to the latest user message upon sending (Regression) (#12006)

* fixes scroll is on input message

* feat: re-engage Safari sticky scroll mode when user sends message

Add custom event 'langflow-scroll-to-bottom' to force SafariScrollFix back into sticky mode when user sends a new message. This ensures the chat scrolls to bottom even if user had scrolled up, fixing behavior where Safari's scroll fix would remain disengaged after manual scrolling.

Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>

* fix: knowledge Base Table — Row Icon Appears Clipped/Cut for Some Ent… (#12039)

fix: knowledge Base Table — Row Icon Appears Clipped/Cut for Some Entries (#12009)

* removed book and added file. makes more sense

* feat: add accent-blue color to design system and update knowledge base file icon

- Add accent-blue color variables to light and dark themes in CSS
- Register accent-blue in Tailwind config with DEFAULT and foreground variants
- Update knowledge base file icon fallback color from hardcoded text-blue-500 to text-accent-blue-foreground

Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>

* fix: MCP Server Modal Improvements (#12017) (#12038)

* fixes to the mcp modal for style

* style: convert double quotes to single quotes in baseModal component

* style: convert double quotes to single quotes in addMcpServerModal component

Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>

* fix: change loop description (#12018) (#12037)

* fix: change loop description (#12018)

* docs: simplify Loop component description in starter project and component index

* [autofix.ci] apply automated fixes

* style: format Loop component description to comply with line length limits

* fixed component index

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add mutual exclusivity between ChatInput and Webhook components (#12036)

* feat: add mutual exclusivity between ChatInput and Webhook components

* [autofix.ci] apply automated fixes

* refactor: address PR feedback - add comprehensive tests and constants

* [autofix.ci] apply automated fixes

* refactor: address PR feedback - add comprehensive tests and constants

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: mcp config issue (#12045)

* Only process dict template fields

In json_schema_from_flow, guard access to template field properties by checking isinstance(field_data, dict) before calling .get(). This replaces the previous comparison to the string "Component" and prevents attribute errors when template entries are non-dict values, ensuring only dict-type fields with show=True and not advanced are included in the generated schema.

* Check and handle MCP server URL changes

When skipping creation of an existing MCP server for a user's starter projects, first compute the expected project URL and compare it to URLs found in the existing config args. If the URL matches, keep skipping and log that the server is correctly configured; if the URL differs (e.g., port changed on restart), log the difference and allow the flow to update the server configuration. Adds URL extraction and improved debug messages to support automatic updates when server endpoints change.

---------

Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>

* fix: langflow breaks when we click on the last level of the chain (#12044)

Langflow breaks when we click on the last level of the chain.

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>

* fix: standardize "README" title and update API key configuration note… (#12051)

fix: standardize "README" title and update API key configuration notes in 3 main flow templates (#12005)

* updated for README

* chore: update secrets baseline with new line numbers

* fixed test

Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>

* fix: Cherry-pick Knowledge Base Improvements (le-480) into release-1.8.0 (#12052)

* fix: improve knowledge base UI consistency and pagination handling

- Change quote style from double to single quotes throughout knowledge base components
- Update "Hide Sources" button label to "Hide Configuration" for clarity
- Restructure SourceChunksPage layout to use xl:container for consistent spacing
- Add controlled page input state with validation on blur and Enter key
- Synchronize page input field with pagination controls to prevent state drift
- Reset page input to "1" when changing page

* refactor: extract page input commit logic into reusable function

Extract page input validation and commit logic from handlePageInputBlur and handlePageInputKeyDown into a shared commitPageInput function to eliminate code duplication.

* fix(ui): ensure session deletion properly clears backend and cache (#12043)

* fix(ui): ensure session deletion properly clears backend and cache

* fix: resolved PR comments and add new regression test

* fix: resolved PR comments and add new regression test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Check template field is dict before access (#12035)

Only process dict template fields

In json_schema_from_flow, guard access to template field properties by checking isinstance(field_data, dict) before calling .get(). This replaces the previous comparison to the string "Component" and prevents attribute errors when template entries are non-dict values, ensuring only dict-type fields with show=True and not advanced are included in the generated schema.

Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>

* fix: hide Knowledge Ingestion component and rename Retrieval to Knowledge Base (#12054)

* fix: hide Knowledge Ingestion component and rename Retrieval to Knowledge Base

Move ingestion component to deactivated folder so it's excluded from
dynamic discovery. Rename KnowledgeRetrievalComponent to
KnowledgeBaseComponent with display_name "Knowledge Base". Update all
exports, component index, starter project, frontend sidebar filter,
and tests.

* fix: update test_ingestion import to use deactivated module path

* fix: skip deactivated KnowledgeIngestion test suite

* [autofix.ci] apply automated fixes

* fix: standardize formatting and indentation in StepperModal component

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Embedding Model Field Stuck in Infinite Loading When No Model Provider is Configured (release-1.8.0) (#12053)

* fix: add showEmptyState prop to ModelInputComponent for better UX when no models are enabled

* style: convert double quotes to single quotes in modelInputComponent

* fixes refresh and kb blocker

* style: convert double quotes to single quotes in ModelTrigger component

* style: convert double quotes to single quotes in model provider components

- Convert all double quotes to single quotes in use-get-model-providers.ts and ModelProvidersContent.tsx
- Remove try-catch block in getModelProvidersFn to let errors propagate for React Query retry and stale data preservation
- Add flex-shrink-0 to provider list container to prevent layout issues

* fix: Close model dropdown popover before refresh to prevent width glitch (#12067)

fix(test): Reduce response length assertions in flaky integration tests (#12057)

* feat: Add PDF and DOCX ingestion support for Knowledge Bases  (#12064)

* add pdf and docx for knowledge bases

* ruff style checker fix

* fix jest test

* fix: Use global LLM in knowledge retrieval (#11989)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
fix(test): Reduce response length assertions in flaky integration tests (#12057)

* fix: Regenerate the knowledge retrieval template (#12070)

* fix: refactor KnowledgeBaseEmptyState to use optimistic updates hook (#12069)

* fix: refactor KnowledgeBaseEmptyState to use optimistic updates hook

* updated tst

* fix: Apply provider variable config to Agent build_config (#12050)

* Apply provider variable config to Agent build_config

Import and use apply_provider_variable_config_to_build_config in the Agent component so provider-specific variable settings (advanced/required/info/env fallbacks) are applied to the build_config. Provider-specific fields (e.g. base_url_ibm_watsonx, project_id) are hidden/disabled by default before applying the provider config. Updated embedded agent code in starter project JSONs and bumped their code_hashes accordingly.

* [autofix.ci] apply automated fixes

* update tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>

* LE-489: KB Metrics calculation batch caculator (#12049)

Fixed metric calculator to be more robust and scalable.

* fix(ui): Correct AstraDB icon size to use relative units (#12137)

* fix(api): Handle Windows ChromaDB file locks when deleting Knowledge Bases (#12132)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Fix image preview for Windows paths in playground (#12136)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* chore: update fastapi dep (#12141)

update fastapi dependency

* fix: Properly propagate max tokens param to Agent (#12151)

* fix: Properly Propagate max_tokens param

* Update tests and templates

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: include uv/uvx in runtime Docker image (#12127)

* fix: include uv/uvx in runtime Docker image

add uv/uvx to runtime image so uvx is available in container
i did this for all images which might be too much

* chore: address supply chain attack

addres ram's supply chain attack comment

* chore: upgrade pyproject versions

upgrade pyproject versions

* fix: preserve api key configuration on flow export (#12129)

* fix: preserve api key configuration on flow export

Made-with: Cursor

* fix individual component's field

* [autofix.ci] apply automated fixes

* unhide var name

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fetch relevant provider keys

* update starter projects

* update based on env var

* [autofix.ci] apply automated fixes

* fetch only env variables

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update starter projects

* fix ruff errors

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* don't remove api keys if chosen by user

* remove redundant code

* [autofix.ci] apply automated fixes

* fix update build config

* remove api keys refactor

* only load values when exists in db

* modify other components

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Template updates

* [autofix.ci] apply automated fixes

* Component index update

* Fix frontend test

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* preserve var names

* [autofix.ci] apply automated fixes

* update caution for saving api keys

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Fix: Tweaks override ENV VARIABLES (#12152)

Modified tweak behaviour to be overridable if env variable is set on the GUI.

* fix(mcp): Handle missing config file in MCP client availability detection (#12172)

* Handle missing config file in MCP client availability detection

* code improvements

* [autofix.ci] apply automated fixes

* code improvements review

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* chore: clean up after merge

* [autofix.ci] apply automated fixes

* Component index update

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: keval shah <kevalvirat@gmail.com>
Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>
Co-authored-by: Lucas Democh <ldgoularte@gmail.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Debojit Kaushik <Kaushik.debojit@gmail.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: Janardan Singh Kavia <janardankavia@ibm.com>
Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>
2026-03-13 19:42:00 +00:00
86078b23ae feat: lazy load imports for language model component (#11737)
* Lazy load imports for language model component

Ensures that only the necessary dependencies are required.
For example, if OpenAI provider is used, it will now only
import langchain_openai, rather than requiring langchain_anthropic,
langchain_ibm, etc.

* Add backwards-compat functions

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Add exception handling

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* comp index

* docs: azure default temperature (#11829)

* change-azure-openai-default-temperature-to-1.0

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix unit test?

* add no-group dev to docker builds

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2026-02-26 04:07:08 +00:00
a3d74ee4e8 fix: Clear input fields data operations (#11773)
* feat: Pluggable AuthService with abstract base class (#10702) (#11654)

feat(auth): Pluggable AuthService with abstract base class (#10702)

* feat: Introduce service registration decorator and enhance ServiceManager for pluggable service discovery

- Added `register_service` decorator to allow services to self-register with the ServiceManager.
- Enhanced `ServiceManager` to support multiple service discovery mechanisms, including decorator-based registration, config files, and entry points.
- Implemented methods for direct service class registration and plugin discovery from various sources, improving flexibility and extensibility of service management.

* feat: Implement VariableService for managing environment variables

- Introduced VariableService class to handle environment variables with in-memory caching.
- Added methods for getting, setting, deleting, and listing variables.
- Included logging for service initialization and variable operations.
- Created an __init__.py file to expose VariableService in the package namespace.

* feat: Enhance LocalStorageService with Service integration and async teardown

- Updated LocalStorageService to inherit from both StorageService and Service for improved functionality.
- Added a name attribute for service identification.
- Implemented an async teardown method for future extensibility, even though no cleanup is currently needed.
- Refactored the constructor to ensure proper initialization of both parent classes.

* feat: Implement telemetry service with abstract base class and minimal logging functionality

- Added `BaseTelemetryService` as an abstract base class defining the interface for telemetry services.
- Introduced `TelemetryService`, a lightweight implementation that logs telemetry events without sending data.
- Created `__init__.py` to expose the telemetry service in the package namespace.
- Ensured robust async methods for logging various telemetry events and handling exceptions.

* feat: Introduce BaseTracingService and implement minimal TracingService

- Added `BaseTracingService` as an abstract base class defining the interface for tracing services.
- Implemented `TracingService`, a lightweight version that logs trace events without external integrations.
- Included async methods for starting and ending traces, tracing components, and managing logs and outputs.
- Enhanced documentation for clarity on method usage and parameters.

* feat: Add unit tests for service registration decorators

- Introduced a new test suite for validating the functionality of the @register_service decorator.
- Implemented tests for various service types including LocalStorageService, TelemetryService, and TracingService.
- Verified behavior for service registration with and without overrides, ensuring correct service management.
- Included tests for custom service implementations and preservation of class functionality.
- Enhanced overall test coverage for the service registration mechanism.

* feat: Add comprehensive unit and integration tests for ServiceManager

- Introduced a suite of unit tests covering edge cases for service registration, lifecycle management, and dependency resolution.
- Implemented integration tests to validate service loading from configuration files and environment variables.
- Enhanced test coverage for various service types including LocalStorageService, TelemetryService, and VariableService.
- Verified behavior for service registration with and without overrides, ensuring correct service management.
- Ensured robust handling of error conditions and edge cases in service creation and configuration parsing.

* feat: Add unit and integration tests for minimal service implementations

- Introduced comprehensive unit tests for LocalStorageService, TelemetryService, TracingService, and VariableService.
- Implemented integration tests to validate the interaction between minimal services.
- Ensured robust coverage for file operations, service readiness, and exception handling.
- Enhanced documentation within tests for clarity on functionality and expected behavior.

* docs: Add detailed documentation for pluggable services architecture and usage

* feat: Add example configuration file for Langflow services

* docs: Update PLUGGABLE_SERVICES.md to enhance architecture benefits section

- Revised the documentation to highlight the advantages of the pluggable service system.
- Replaced the migration guide with a detailed overview of features such as automatic discovery, lazy instantiation, dependency injection, and lifecycle management.
- Clarified examples of service registration and improved overall documentation for better understanding.

* [autofix.ci] apply automated fixes

* test(services): improve variable service teardown test with public API assertions

* docs(pluggable-service-layer): add docstrings for service manager and implementations

* fix: remove duplicate teardown method from LocalStorageService

During rebase, the teardown method was added in two locations (lines 57 and 220).
Removed the duplicate at line 57, keeping the one at the end of the class (line 220)
which is the more appropriate location for cleanup methods.

* fix(tests): update service tests for LocalStorageService constructor changes

- Add MockSessionService fixtures to test files that use ServiceManager
- Update LocalStorageService test instantiation to use mock session and settings services
- Fix service count assertions to account for MockSessionService in fixtures
- Remove duplicate class-level clean_manager fixtures in test_edge_cases.py

These changes fix test failures caused by LocalStorageService requiring
session_service and settings_service parameters instead of just data_dir.

* fix(services): Harden service lifecycle methods

- Fixed Diamond Inheritance in LocalStorageService
- Added Circular Dependency Detection in _create_service_from_class
- Fixed StorageService.teardown to Have Default Implementation

* docs: Update discovery order for pluggable services

* fix(lfx): replace aiofile with aiofiles for CI compatibility

- The aiofile library uses native async I/O (libaio) which fails with
  EAGAIN (SystemError: 11, 'Resource temporarily unavailable') in
  containerized environments like GitHub Actions runners.
- Switch to aiofiles which uses thread pool executors, providing reliable
  async file I/O across all environments including containers.

* [autofix.ci] apply automated fixes

* fix(lfx): prevent race condition in plugin discovery

  The discover_plugins() method had a TOCTOU (time-of-check to time-of-use)
  race condition. Since get() uses a keyed lock (per service name), multiple
  threads requesting different services could concurrently see
  _plugins_discovered=False and trigger duplicate plugin discovery.

  Wrap discover_plugins() with self._lock to ensure thread-safe access to
  the _plugins_discovered flag and prevent concurrent discovery execution.

* [autofix.ci] apply automated fixes

* feat: Introduce service registration decorator and enhance ServiceManager for pluggable service discovery

- Added `register_service` decorator to allow services to self-register with the ServiceManager.
- Enhanced `ServiceManager` to support multiple service discovery mechanisms, including decorator-based registration, config files, and entry points.
- Implemented methods for direct service class registration and plugin discovery from various sources, improving flexibility and extensibility of service management.

* feat: Enhance LocalStorageService with Service integration and async teardown

- Updated LocalStorageService to inherit from both StorageService and Service for improved functionality.
- Added a name attribute for service identification.
- Implemented an async teardown method for future extensibility, even though no cleanup is currently needed.
- Refactored the constructor to ensure proper initialization of both parent classes.

* docs(pluggable-service-layer): add docstrings for service manager and implementations

* feat(auth): implement abstract base class for authentication services and add auth service retrieval function

* refactor(auth): move authentication logic from utils to AuthService

  Consolidate all authentication methods into the AuthService class to
  enable pluggable authentication implementations. The utils module now
  contains thin wrappers that delegate to the registered auth service.

  This allows alternative auth implementations (e.g., OIDC) to be
  registered via the pluggable services system while maintaining
  backward compatibility with existing code that imports from utils.

  Changes:
  - Move all auth logic (token creation, user validation, API key
    security, password hashing, encryption) to AuthService
  - Refactor utils.py to delegate to get_auth_service()
  - Update function signatures to remove settings_service parameter
    (now obtained from the service internally)

* refactor(auth): update authentication methods and remove settings_service parameter

  - Changed function to retrieve current user from access token instead of JWT.
  - Updated AuthServiceFactory to specify SettingsService type in create method.
  - Removed settings_service dependency from encryption and decryption functions, simplifying the code.

This refactor enhances the clarity and maintainability of the authentication logic.

* test(auth): add unit tests for AuthService and pluggable authentication

- Introduced comprehensive unit tests for AuthService, covering token creation, user validation, and authentication methods.
- Added tests for pluggable authentication, ensuring correct delegation to registered services.
- Enhanced test coverage for user authentication scenarios, including active/inactive user checks and token validation.

These additions improve the reliability and maintainability of the authentication system.

* fix(tests): update test cases to use AuthService and correct user retrieval method

- Replaced the mock for retrieving the current user from JWT to access token in the TestSuperuserCommand.
- Refactored unit tests for MCP encryption to utilize AuthService instead of a mock settings service, enhancing test reliability.
- Updated patch decorators in tests to reflect the new method of obtaining the AuthService, ensuring consistency across test cases.

These changes improve the accuracy and maintainability of the authentication tests.

* docs(pluggable-services): add auth_service to ServiceType enum documentation

* fix(auth): Add missing type hints and abstract methods to AuthServiceBase (#10710)




* [autofix.ci] apply automated fixes

* fix(auth): refactor api_key_security method to accept optional database session and improve error handling

* feat(auth): enhance AuthServiceBase with detailed design principles and JIT provisioning methods

* fix(auth): remove settings_service from encrypt/decrypt_api_key calls

After the pluggable auth refactor, encrypt_api_key and decrypt_api_key
no longer take a settings_service argument - they get it internally.

- Update check_key import path in __main__.py (moved to crud module)
- Remove settings_service argument from calls in:
  - api/v1/api_key.py
  - api/v1/store.py
  - services/variable/service.py
  - services/variable/kubernetes.py
- Fix auth service to use session_scope() instead of non-existent
  get_db_service().with_session()

* fix(auth): resolve type errors and duplicate definitions in pluggable auth branch

  - Add missing imports in auth/utils.py (Final, HTTPException, status,
    logger, SettingsService) that prevented application startup
  - Remove duplicate NoServiceRegisteredError class in lfx/services/manager.py
  - Remove duplicate teardown method in lfx/services/storage/local.py
  - Fix invalid settings_service parameter in encrypt_api_key calls
    in variable/service.py and variable/kubernetes.py
  - Add proper type guards for check_key calls to satisfy mypy
  - Add null checks for password fields in users.py endpoints

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* [autofix.ci] apply automated fixes

* replace jose with pyjwt

* [autofix.ci] apply automated fixes

* starter projects

* fix BE mcp tests

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* remive legacy usage of session

* fix user tests

* [autofix.ci] apply automated fixes

* fix lfx tests

* starter project update

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix mypy errors

* fix mypy errors on tests

* fix tests for decrypt_api_key

* resolve conflicts in auth utils

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Add pluggable authentication factory with provider enum

* Add SSO feature flags to AuthSettings

* Add SSO fields to User model

* Add SSO configuration loader with YAML support

* Add unit tests for SSO configuration loader

* Add SSO configuration database model and CRUD operations

* Add CRUD operations for SSO configuration management

* Add SSO configuration service supporting both file and database configs

* Add example SSO configuration file with W3ID and other providers

* Implement OIDC authentication service with discovery and JIT provisioning

* Update AuthServiceFactory to instantiate OIDC service when SSO enabled

* Improve JWT token validation and API key decryption error handling

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix: resolve ruff linting errors in auth services and add sso-config.yaml to gitignore

* [autofix.ci] apply automated fixes

* fix: use correct function name get_current_user_from_access_token in login endpoint

* fix: remove incorrect settings_service parameter from decrypt_api_key call

* fix: correct encryption logic to properly detect plaintext vs encrypted values

* [autofix.ci] apply automated fixes

* fix tests

* [autofix.ci] apply automated fixes

* fix mypy errors

* fix tests

* [autofix.ci] apply automated fixes

* fix ruff errors

* fix tests in service

* [autofix.ci] apply automated fixes

* fix test security cors

* [autofix.ci] apply automated fixes

* fix webhook issues

* modify component index

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* fix webhook tests

* [autofix.ci] apply automated fixes

* build component index

* remove SSO functionality

* [autofix.ci] apply automated fixes

* fix variable creation

* [autofix.ci] apply automated fixes

* refactor: move MCPServerConfig schema to a separate file and update model_dump usage

* refactor: streamline AuthServiceFactory to use service_class for instance creation

* handle access token type

* [autofix.ci] apply automated fixes

* remove SSO fields from user model

* [autofix.ci] apply automated fixes

* replace is_encrypted back

* fix mypy errors

* remove sso config example

* feat: Refactor framework agnostic auth service (#11565)

* modify auth service layer

* [autofix.ci] apply automated fixes

* fix ruff errorrs

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/services/deps.py



* address review comments

* [autofix.ci] apply automated fixes

* fix ruff errors

* remove cache

---------




* move base to lfx

* [autofix.ci] apply automated fixes

* resolve review comments

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add auth protocol

* [autofix.ci] apply automated fixes

* revert models.py execption handling

* revert wrappers to ensure backwards compatibility

* fix http error code

* fix FE tests

* fix test_variables.py

* [autofix.ci] apply automated fixes

* fix ruff errors

* fix tests

* add wrappers for create token methods

* fix ruff errors

* [autofix.ci] apply automated fixes

* update error message

* modify status code for inactive user

* fix ruff errors

* fix patch for webhook tests

* fix error message when getting active users

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Pawlowski <mike.pawlowski@datastax.com>
Co-authored-by: Mike Pawlowski <mpawlow@ca.ibm.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>

* fix: adjusted textarea and playground paddings and design (#11635)

* revert textarea to old classes

* fixed text-area-wrapper to handle initial height when value is calculated

* fixed playground padding

* fixed no input text size

* [autofix.ci] apply automated fixes

* fixed flaky test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: create guardrails component (#11451) (#11671)

* Create guardrails.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update guardrails.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* tests: add unit tests for GuardrailsComponent functionality

* [autofix.ci] apply automated fixes

* fix: resolve linting errors in GuardrailsComponent and tests

- Fix line length issues (E501) by breaking long strings
- Fix docstring formatting (D205, D415) in _check_guardrail
- Use ternary operator for response content extraction (SIM108)
- Replace magic value with named constant (PLR2004)
- Move return to else block per try/except best practices (TRY300)
- Catch specific exceptions instead of blind Exception (BLE001)
- Use list comprehension for checks_to_run (PERF401)
- Mark unused variables with underscore prefix (RUF059, F841)
- Add noqa comment for intentionally unused mock argument (ARG002)

* [autofix.ci] apply automated fixes

* refactor: address pr comments

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* feat: enhance heuristic detection with configurable threshold and scoring system

* refactor: simplify heuristic test assertions by removing unused variable

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* feat: enhance guardrail validation logic and input handling

* refactor: streamline import statements and clean up whitespace in guardrails component

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Fix: update empty input handling tests to raise ValueError and refactor related assertions

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* feat: add Guardrails component with unit tests

Add LLM-based guardrails component for detecting PII, tokens/passwords,
jailbreak attempts, and custom guardrail rules, along with comprehensive
unit tests.

* [autofix.ci] apply automated fixes

* fix: try removing logs

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Lucas Democh <ldgoularte@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: added remove file from file input (#11667)

* Implemented dismiss file functionality on input file component

* fixed hover behavior

* added test for removing file from input

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: make connected inputs not hideable (#11672)

* fixed react flow utils to clean advanced edges

* Make connected handles not be able to be hidden

* Added test for hiding connected handles

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: make tooltip not appear when closing SessionMore (#11703)

fix tooltip showing up when closing select

* fix(frontend): prevent multiple session menus from stacking in fullscreen mode

* [autofix.ci] apply automated fixes

* fix(frontend): prevent crash when renaming empty sessions (#11712)

* fix(frontend): prevent crash when renaming empty sessions

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(ci): handle PEP 440 normalized versions in pre-release tag script (#11722)

The regex in langflow_pre_release_tag.py expected a dot before `rc`
(e.g. `1.8.0.rc0`), but PyPI returns PEP 440-normalized versions
without the dot (e.g. `1.8.0rc0`). This caused the script to recompute
the same version instead of incrementing, and `uv publish` silently
skipped the duplicate upload.

Update the regex to accept both formats with `\.?rc`.

* fix: align chat history with input field in fullscreen playground (#11725)

* fix: align chat history with input field in fullscreen playground

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Enforce Webhook singleton rule on paste and duplicate                                                                         (#11692)

* fix singleton webhook on flow

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(frontend): generate unique variable names in Prompt Template Add Variable button (#11723)

* fix: generate unique variable names in Prompt Template Add Variable button

Previously, clicking the Add Variable button always inserted {variable_name},
causing duplicate text without creating new input fields. Now the button
generates incremental names (variable_name, variable_name_1, variable_name_2)
by checking existing variables in the template.

* refactor: extract generateUniqueVariableName and import in tests

Extract the variable name generation logic into an exported function
so tests can import and validate the actual production code instead
of testing a duplicated copy of the logic.

* FIX: Broken Connection Edge Rendering in YouTube Analysis Template (#11709)

add edge between components

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix: synchronize prompt state, add new mustache prompt component (#11702)

* Update state when exiting modal on accordion prompt component

* Added isDoubleBrackets and show correct modal and use correct brackets when mustache is enabled

* [autofix.ci] apply automated fixes

* added test to see if state is synchronized and mustache is enabled

* [autofix.ci] apply automated fixes

* updated mustache id and removed extra prompt call

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix(frontend): add Safari-specific padding for playground chat messages (#11720)

* fix(frontend): add Safari-specific padding for playground chat messages

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: correctly pass headers in mcp stdio connections (#11746)

* fix: parse dicts from tweaks (#11753)

* Correctly parse dicts from tweaks

* Add test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: sessions overflow issue (#11739)

fix: sessions overflow issue

* feat: playground UI fixes, inspector improvements & canvas reorganization (#11751)

* merge fix

* code improvements

* [autofix.ci] apply automated fixes

* add stop button and fix scroll on message

* [autofix.ci] apply automated fixes

* add new message content for sharable pg

* fix tests until shard 43

* [autofix.ci] apply automated fixes

* fix(frontend): clean up MemoizedSidebarTrigger imports and transition classes

Sort imports, add type modifier to AllNodeType import, and split long transition class string for readability.

* fix tests

* [autofix.ci] apply automated fixes

* fix mr test

* fix jest tests

* fix sidebar jest tes

* [autofix.ci] apply automated fixes

* fix sharable playground

* [autofix.ci] apply automated fixes

* remove rename from sharable pg

* [autofix.ci] apply automated fixes

* add new message content for sharable pg

* fix: synchronize prompt state, add new mustache prompt component (#11702)

* Update state when exiting modal on accordion prompt component

* Added isDoubleBrackets and show correct modal and use correct brackets when mustache is enabled

* [autofix.ci] apply automated fixes

* added test to see if state is synchronized and mustache is enabled

* [autofix.ci] apply automated fixes

* updated mustache id and removed extra prompt call

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix(frontend): add Safari-specific padding for playground chat messages (#11720)

* fix(frontend): add Safari-specific padding for playground chat messages

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: correctly pass headers in mcp stdio connections (#11746)

* fix sharable playground

* [autofix.ci] apply automated fixes

* remove rename from sharable pg

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix sharable playground

* fix mcp server to use shell lexer

* [autofix.ci] apply automated fixes

* fix tests

* fix outaded component tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: keval shah <kevalvirat@gmail.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: correct field_order in all starter project JSON templates (#11727)

* fix: correct field_order in all starter project JSON templates

The field_order arrays in starter project nodes were out of sync with
the actual input definitions in the Python component source files,
causing parameters to display in the wrong order in the UI.

Fixed 136 nodes across 32 starter project files including Chat Input,
Chat Output, Language Model, Agent, Prompt Template, Text Input,
Tavily AI Search, Read File, Embedding Model, and others.

* test: add field_order validation test for starter projects

Verifies that field_order arrays in starter project JSONs match the
actual component input order by importing each component and comparing
the relative ordering of fields.

* fix mcp server to use shell lexer

* [autofix.ci] apply automated fixes

* fix: enforce full field_order in starter projects and add node overlap test

Update all starter project JSONs to include the complete component
field_order instead of a subset, preventing layout inconsistency
between template and sidebar. Strengthen the field_order test to
require an exact match and add a new test that verifies no two
generic nodes overlap on the canvas.

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: dict tweak parsing (#11756)

* Fix dict handling of different formats

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* cmp index

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Fix: The Prompt component has responsiveness issues (#11713)

improve styling of templete input

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* clear session on delete chat

* fix(api): prevent users from deactivating their own account (#11736)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Fix:  UI Overlay: Chat Input Component Overlapping README Note (#11710)

* move chat input arround for travel json starter template

* improve the layout of the component

* fix layout

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix: Google Generative AI model catalog update (#11735)

* fix: Filter out MCP and models_and_agents categories and MCPTools component from sidebar (#11513)

* fix: hide MCP tool from model & agent

* fix: removing mcp searching

* fix testcases

* fix testcases

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>

* fix: Fix flaky Market Research test timeout on CI  (#11665)

* add wait for statement to prevent race condition

* fix flaky global variable

* add input selection

* [autofix.ci] apply automated fixes

* add disable inspect panel util

* [autofix.ci] apply automated fixes

* fix vector store test

* [autofix.ci] apply automated fixes

* use disable inspect pannel utils

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* ci: make docs deployment manual-only (#11602)

feat: update GitHub Actions workflow to allow manual branch selection for docs deployment

* fix: handle missing capabilities in Ollama API response (#11603)

* fix: handle missing capabilities in Ollama API response

Older Ollama versions don't return the `capabilities` field from
`/api/show`. The previous code defaulted to an empty list and required
"completion" capability, filtering out all models.

Now we treat missing capabilities as backwards-compatible: assume the
model supports completion unless tool_model_enabled is True (where we
can't verify tool support without the capabilities field).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* test: add test cases for Ollama backwards compatibility fix

Add tests for get_models handling of missing capabilities field:
- test_get_models_missing_capabilities_without_tool_model
- test_get_models_missing_capabilities_with_tool_model
- test_get_models_mixed_capabilities_response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: wrap long docstring line to satisfy ruff E501

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* docs: draft hide internal endpoints in spec (#11469)

* test-hide-internal-endpoints

* hide-more-endpoints

* display-mcp-endpoints

* display-mcp-projects

* add-back-health-check

---------

Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>

* feat: update opensearch component with raw search component (#11491)

* Update opensearch_multimodal.py

* [autofix.ci] apply automated fixes

* Update opensearch_multimodal.py

* Skip existing knn_vector mapping & handle errors

Before adding a knn_vector field mapping, check the index properties and skip updating if the field already exists (and warn if dimensions differ). Attempt to add the mapping only when missing, and catch failures from the OpenSearch k-NN plugin (e.g. NullPointerException); in that known case log a warning and skip the mapping update instead of failing hard. After adding, verify the field is mapped as knn_vector and raise an error if it is not. Also adjusts logging messages to be clearer.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(test): Skip Tavily API key fill when global variable is loaded                                                          (#11733)

* update Google models

* [autofix.ci] apply automated fixes

* update tests

* mark deprecated

* build component index

* [autofix.ci] apply automated fixes

---------

Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: mock clearSessionMessages (#11776)

* fix: mock clearSessionMessages to prevent flowStore.getState error in test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* update build config

* [autofix.ci] apply automated fixes

* fix ruff errors

* [autofix.ci] apply automated fixes

* address review comments

* feat: create guardrails component (#11451)

* Create guardrails.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update guardrails.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* tests: add unit tests for GuardrailsComponent functionality

* [autofix.ci] apply automated fixes

* fix: resolve linting errors in GuardrailsComponent and tests

- Fix line length issues (E501) by breaking long strings
- Fix docstring formatting (D205, D415) in _check_guardrail
- Use ternary operator for response content extraction (SIM108)
- Replace magic value with named constant (PLR2004)
- Move return to else block per try/except best practices (TRY300)
- Catch specific exceptions instead of blind Exception (BLE001)
- Use list comprehension for checks_to_run (PERF401)
- Mark unused variables with underscore prefix (RUF059, F841)
- Add noqa comment for intentionally unused mock argument (ARG002)

* [autofix.ci] apply automated fixes

* refactor: address pr comments

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* feat: enhance heuristic detection with configurable threshold and scoring system

* refactor: simplify heuristic test assertions by removing unused variable

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* feat: enhance guardrail validation logic and input handling

* refactor: streamline import statements and clean up whitespace in guardrails component

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Fix: update empty input handling tests to raise ValueError and refactor related assertions

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* feat: add Guardrails component with unit tests

Add LLM-based guardrails component for detecting PII, tokens/passwords,
jailbreak attempts, and custom guardrail rules, along with comprehensive
unit tests.

* [autofix.ci] apply automated fixes

* fix: try removing logs

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>

* fix: Filter out MCP and models_and_agents categories and MCPTools component from sidebar (#11513)

* fix: hide MCP tool from model & agent

* fix: removing mcp searching

* fix testcases

* fix testcases

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>

* fix: Fix flaky Market Research test timeout on CI  (#11665)

* add wait for statement to prevent race condition

* fix flaky global variable

* add input selection

* [autofix.ci] apply automated fixes

* add disable inspect panel util

* [autofix.ci] apply automated fixes

* fix vector store test

* [autofix.ci] apply automated fixes

* use disable inspect pannel utils

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* ci: make docs deployment manual-only (#11602)

feat: update GitHub Actions workflow to allow manual branch selection for docs deployment

* fix: handle missing capabilities in Ollama API response (#11603)

* fix: handle missing capabilities in Ollama API response

Older Ollama versions don't return the `capabilities` field from
`/api/show`. The previous code defaulted to an empty list and required
"completion" capability, filtering out all models.

Now we treat missing capabilities as backwards-compatible: assume the
model supports completion unless tool_model_enabled is True (where we
can't verify tool support without the capabilities field).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* test: add test cases for Ollama backwards compatibility fix

Add tests for get_models handling of missing capabilities field:
- test_get_models_missing_capabilities_without_tool_model
- test_get_models_missing_capabilities_with_tool_model
- test_get_models_mixed_capabilities_response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* fix: wrap long docstring line to satisfy ruff E501

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* docs: draft hide internal endpoints in spec (#11469)

* test-hide-internal-endpoints

* hide-more-endpoints

* display-mcp-endpoints

* display-mcp-projects

* add-back-health-check

---------

Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>

* feat: update opensearch component with raw search component (#11491)

* Update opensearch_multimodal.py

* [autofix.ci] apply automated fixes

* Update opensearch_multimodal.py

* Skip existing knn_vector mapping & handle errors

Before adding a knn_vector field mapping, check the index properties and skip updating if the field already exists (and warn if dimensions differ). Attempt to add the mapping only when missing, and catch failures from the OpenSearch k-NN plugin (e.g. NullPointerException); in that known case log a warning and skip the mapping update instead of failing hard. After adding, verify the field is mapped as knn_vector and raise an error if it is not. Also adjusts logging messages to be clearer.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(test): Skip Tavily API key fill when global variable is loaded                                                          (#11733)

* feat: add smart column ordering and clean output toggle to Split Text component (#11626)

* feat: add smart column ordering and clean output toggle to Split Text component

Add smart_column_order() method to DataFrame that prioritizes content columns
(text, content, output, etc.) and de-prioritizes system metadata columns
(timestamp, sender, session_id, etc.). Add Clean Output boolean input to
Split Text component that strips metadata columns by default.

* fix: update code_hash for Knowledge Ingestion and Vector Store RAG components

* test: update split text tests for clean_output toggle

* [autofix.ci] apply automated fixes

* fix: change default value of clean_output toggle to False in Split Text component

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: update code_hash for Knowledge Ingestion and Vector Store RAG components

* fix: add clean_output option to Knowledge Ingestion and Vector Store RAG components

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* [autofix.ci] apply automated fixes

* fix: Add missing get_current_active_user_mcp to lfx AuthService

The base class declares get_current_active_user_mcp as abstract but the
default lfx AuthService did not implement it, causing instantiation to
fail in tests.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: add iter method to noopresult (#11517)

* fix: Misleading Empty State when no Folders (#11728)

* fix: Misleading Empty State when no Folders

now once all folders are deleted we show the default create first flow state

* [autofix.ci] apply automated fixes

* fix(api): prevent users from deactivating their own account (#11736)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Fix:  UI Overlay: Chat Input Component Overlapping README Note (#11710)

* move chat input arround for travel json starter template

* improve the layout of the component

* fix layout

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* chore: align Market Research spec with release-v1.8.0

* fix: Resolve Windows PostgreSQL event loop incompatibility (#11767)

* fix windows integrations with postgres

* add documentation

* cross platform validation

* [autofix.ci] apply automated fixes

* ruff style and checker

* fix import ruff

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* fix: Legacy "Store" Reference in Flows Empty State (#11721)

* fix: Legacy "Store" Reference in Flows Empty State

on delete propigate changes to useFlowsManagerStore to cause re-render in HomePage

* test: fix shard 45 flaky mcp test

Hopefully fix [WebServer] bash: line 1: exec: uvx mcp-server-fetch: not found

* [autofix.ci] apply automated fixes

* fix(api): prevent users from deactivating their own account (#11736)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Fix:  UI Overlay: Chat Input Component Overlapping README Note (#11710)

* move chat input arround for travel json starter template

* improve the layout of the component

* fix layout

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Fix: UI Bug: "Lock Flow" Toggle in Export Modal is Non-Functional (#11724)

* fix locked component during export

* added locked flag to flow doc

* new testcases

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix tests

* [autofix.ci] apply automated fixes

* fix: dropdown delete icon hover visibility (#11774)

fix hidden delete button

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix: resolve Safari scroll jitter in playground chat views (#11769)

* fix: resolve Safari scroll jitter in playground chat views

Switch StickToBottom resize mode to instant and add a Safari-specific
scroll fix that prevents unnatural jumps while preserving stick-to-bottom
behavior.

* [autofix.ci] apply automated fixes

* fix: add useStickToBottomContext mock to shareable playground tests

* refactor: improve SafariScrollFix reliability and maintainability

- Split into guard/inner components to avoid hooks on non-Safari browsers
- Extract magic numbers into named constants with documentation
- Convert touchStartY closure variable to useRef for proper session scoping
- Remove stopScrollRef indirection, use stopScroll directly in effect deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: mock clearSessionMessages to prevent flowStore.getState error in test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Obsolete "Component Share" shortcut listed in Shortcuts menu (#11775)

remove component share from doc

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix(frontend): add UI feedback for self-deactivation prevention (#11772)

* fix(frontend): add UI feedback for self-deactivation prevention

Disable the Active checkbox with a tooltip when users try to deactivate
their own account. This provides clear UI feedback instead of relying
solely on the backend 403 error. Protection is added in both the Admin
page table view and the user edit modal.

* [autofix.ci] apply automated fixes

* fix: mock clearSessionMessages to prevent flowStore.getState error in test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>

* fix(frontend): preserve sticky note dimensions when importing via canvas drop (#11770)

* fix(frontend): preserve sticky note dimensions when importing via canvas drop

When dragging a JSON file onto the canvas, the paste function now
preserves width and height properties from the original nodes,
ensuring sticky notes retain their custom dimensions.

* [autofix.ci] apply automated fixes

* fix: mock clearSessionMessages to prevent flowStore.getState error in test


---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>

* rollback playground, inspection panel and shareable playground

* build_component_index

* fix starter templates

* fix: Close button auto-focus creates visual distraction in SaveChanges and FlowLogs modal (#11763)

fix autofocus on close button

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>

* fix: Outdated Instructional Notes and Provider-Specific Branding (#11680)

* fix: improved note guide for language models nots and Need search

* missing starter projects added

* ensured main flows fit are of standard

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* fix(frontend): synchronize Prompt Template input fields on bracket mode toggle (#11777)

* fix(frontend): synchronize Prompt Template input fields on bracket mode toggle

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* build component index

* chore: align component_index.json with main

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix: reduce Node.js heap size to 4GB in Docker builds to prevent OOM

The Vite frontend build was configured with --max-old-space-size=12288
(12GB), which exceeds available RAM on ARM64 CI runners, causing the
build process to be OOM-killed during the transform phase.

Reduced to 4GB (4096MB) which is sufficient for the Vite build and
prevents OOM kills in memory-constrained Docker BuildKit environments.

* fix: avoid redundant recursive chown on /app in backend Dockerfile

The recursive chown -R on /app was re-owning the entire .venv (~2.6GB,
40k+ files) which was already correctly owned via COPY --chown=1000:0.
This was causing the build to be killed on ARM64 runners.

Changed to non-recursive chown on /app since only the directory itself
needs ownership set. /app/data still gets recursive chown (it's empty).

* fix: add Docker cleanup between image builds to prevent disk full

The 40GB ARM64 runner runs out of disk when building 3 Docker images
sequentially. Each image (main ~8GB layers, backend ~5GB, frontend)
accumulates build cache and layers that exhaust the disk.

Added cleanup steps between builds that:
- Remove the tested image (no longer needed)
- Prune all unused Docker data and buildx cache
- Log disk usage before/after for debugging

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Pawlowski <mike.pawlowski@datastax.com>
Co-authored-by: Mike Pawlowski <mpawlow@ca.ibm.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ogabrielluiz <24829397+ogabrielluiz@users.noreply.github.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>
Co-authored-by: Lucas Democh <ldgoularte@gmail.com>
Co-authored-by: Keval718 <kevalvirat@gmail.com>
Co-authored-by: vjgit96 <vijay.katuri@ibm.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Ram Gopal Srikar Katakam <44802869+RamGopalSrikar@users.noreply.github.com>
Co-authored-by: olayinkaadelakun <olayinka.adelakun@ibm.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: Viktor Avelino <viktor.avelino@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Hamza Rashid <74062092+HzaRashid@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Adam-Aghili <149833988+Adam-Aghili@users.noreply.github.com>
2026-02-24 03:55:27 +00:00
66f851c0d9 fix: remove fe from backend image build (#11579)
* asdf

* build langflow-backend image correctly with no frontend

* Update docker/build_and_push_backend.Dockerfile

Co-authored-by: Adam-Aghili <149833988+Adam-Aghili@users.noreply.github.com>

* Fix version check for backend image

* Add data dir

* Add npm back for mcp support

---------

Co-authored-by: Adam-Aghili <149833988+Adam-Aghili@users.noreply.github.com>
2026-02-06 15:47:48 +00:00
b757c303ce fix: 1.8.0 security fixes (#11449)
* fix: 1.7.3 vulnerability patch for main

Steps
1. supposedely non-breaking pypi and dockerfile changes for many security vulnerabilities
3. npm audit fix --force
4. install offical nodejs tarball
5. update playwright version
6. dynamically set latest node 22 version
7. dynamically set arch
8. add glob and tar overrides
9. "setuptools>=80.0.0,<81.0.0"
10. jaraco-context specifier = ">=6.1.0"
11. "test-exclude": "^7.0.0"
12. pin wheel version

* fix: update locks after porting changes from 1.7.3

update locks after porting changes from 1.7.3

* chore: upgrade package-lock

* chore: upgrade uv.lock files

* fix: upgrade to fastmcp 2.14.4

* fix: update tar to 7.5.7
2026-01-28 18:17:10 +00:00
1d82026c60 chore(docker): Upgrade Node.js from 18 to 20 LTS (#11442) 2026-01-26 11:47:28 -03:00
1dc81ebe24 build: remove shell access from -ep images (#11192)
build: remove shell access from -ep images (#11191)

* Disable shell access in langflow-ep

* re-add git back

* re-add npx

* remove uvx explicit install
2026-01-05 17:36:53 +00:00
732ec1e273 ci: publish v2 docker images (#10350)
* ci: publish v2 docker images

since or transition to v2 in 1.6.x we have not been publishing any of our docker images.

* chore: try fixing lfx cleanup error

lfx cleanup error

* chore: address rabbitcode comments

* chore: address rabit uv comment

* chore: remove build-args to see if it passes

* chore: skip ci

* chore: add back in LANGFLOW_IMAGE

* chore: debug inputs.ref and matrix.langflow_image

* chore: add {} to fix InvalidDefaultArgInForm

* chore: try adding  quotes

* chore: try ENV LANGFLOW_IMAGE=${LANGFLOW_IMAGE}

* chore: add build args to GitHub Container Registry

* chore: clean up

* chore: seperate out frontend and backend images

* chore: update create-manifest

* chore: remove ci step

* chore: update release

* chore: clean up

* chore: clean up langflow-image

* chore: revert ci removal

* fix: add back in main logic update back/frontend

add main back in
update back/frontend to match orginal man logic more

* chore: more clean up to match main

* chore: remove arch from lagnflowimage for backend

* chore: add misisng - for ghcr.io

* chore: skip ci

* chore: build_main and build_and_push_backend fixes

* chore: seperate ghcr and docker publishing with if

* chore: add back CI step

---------

Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
2025-11-03 18:00:58 +00:00
6ce943e0b3 ci: allow releasing from branch (#9988)
* Try skipping gha cache

* simplify docker builds

* remove workflow dispatch options from workflows that shouldn't be run manually

* Update nightly docker build and add option to skip testing for nightly releases

* simplify version fetching for both release workflows

* revert docker-build v1 to original

* remove removed input

* Add push to registry flag for full workflow and add warning in old docker build workflow

* Add uv setup

* Add uv setup again

* Try esbuild js native build

* require a valid tag for release

* Echo inputs

* Reference inputs correctly

* Try updating conditional

* removes lfx temporarily for the 1.6 release

* Fix boolean comparison

* Add flag to allow creation of github release after pypi already exists

* Add always to make it run

* Use correct tag and remove commit since it's the tag for release

* allow updates

* Revert the lfx removals and flags to allow building without releasing

* standardize conditional inputs

* clean version check

* temporary skip of jobs in release; revert me

* Add arm64 to options

* Try rustflags env var

* echo the should_run_ci as well
2025-09-30 20:58:02 +00:00
bb098a509e release: merge release-v1.6.0 into main (#9889)
* Update pyproject versions

* fix: Avoid namespace collision for Astra (#9544)

* fix: Avoid namespace collision for Astra

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Revert to a working composio release for module import (#9569)

fix: revert to stable composio version

* fix: Knowledge base component refactor (#9543)

* fix: Knowledge base component refactor

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update styleUtils.ts

* Update ingestion.py

* [autofix.ci] apply automated fixes

* Fix ingestion of df

* [autofix.ci] apply automated fixes

* Update Knowledge Ingestion.json

* Fix one failing test

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Revert composio versions for CI

* Revert "Revert composio versions for CI"

This reverts commit 9bcb694ea1.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: Fix env file handling in Windows build scripts (#9414)

fix .env load on windows script

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>

* fix: update agent_llm display name to "Model Provider" in AgentComponent (#9564)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: use custom file handler on chat view, disable mcp_composer by default (#9550)

* Use custom voice assistant on chat input

* Changed mcp composer to default disabled

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: Use the newest file component in Vector Store RAG Template (#9571)

fix: Use newest file component in RAG

* fix: AI/ML icon is missing (#9553)

* refactor: clean up imports and improve code readability in AIML and FlowSidebar components

- Organized import statements in aiml.py and index.tsx for better structure.
- Enhanced formatting in aiml.py for the update_build_config method.
- Updated nodeIconToDisplayIconMap in styleUtils.ts for consistency in AIML label.
- Removed unnecessary console log in FlowSidebarComponent for cleaner code.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: Allow updates to the file component in templates using it (#9572)

fix: Allow updates to file component in templates

* fix: Fixes filtering so legacy components aren't shown by default (#9575)

fix filtering so legacy components aren't shown by default

* fix: changed name on tool mode to slug, added close button to sidebar (#9589)

* Changed Name to Slug, added Close button

* Updated data test id

* Tested closing the sidebar

* fixed test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: enhance scroll behavior on playground (#9586)

* Added stick to bottom dependency

* Removed scroll direction dependency

* Added scroll to bottom action in voice assistant and chat input

* Made messages occupy full width

* Changed chat view to use StickToBottom instead of previous scroll handling mechanism

* Delete unused chat scroll anchor

* Set initial as instant

* Update session name styling

* fix: delete duplicate Serper api from google bundle (#9601)

Deleted google serper api core

* fix: allow deletion of mcp servers, add tests for mcp sidebar (#9587)

* Added onDelete prop to sidebarDraggableComponent

* Removed unused props

* Added handleDeleteMcpServer

* Add tests for on delete functionality, fixed linting errors

* Format

* Add test on mcp-server to test adding and deleting mcp server from sidebar

* Adds data test id to delete select item

* Changed data test id to not be mcp related

* Added delete confirmation modal to mcp sidebar group

* Changed test to contain modal

* fix: change zoom in and out limit, create tests for zooming in and out, change zoom out logic in canvasControls (#9595)

* Fix zoom out to 0.6 instead of 1.0

* remove min zoom on canvascontrolsdropdown, since it's enforced by reactflow

* Changed min zoom to 0.25 and max zoom to 2.0

* Added tests for zoom in and zoom out in canvas controls dropdown

* fix: Add localStorage persistence for feature toggles (#9597)

* fix: Add help text to Lock Flow option (#9600)

* fix: Add comprehensive tests and improve minimal condition logic (#9611)

* fix: change icon color for mcp, remove color setting of icons (#9594)

* Changed node icon to not have icon color

* Added portion of test that checks if color is right for mcp component

* Refactor nodeIcon

* removed lucideIcon check for performance

* Changed the test to evaluate color from computed style

* fix: remove unsupported styling options from chats components (#9610)

* fix: disable mcp auto install for not installed applications, refactor mcp-projects logic (#9599)

* Add new available field to installed mcps

* Disable auto install field when program not present

* Refactor logic and get back the Available field for the installed

* Added tooltip

* Fixed linting

* fix: Properly allow the non-specification of an OCR Engine (#9617)

* fix: Properly allow no OCR engine

* [autofix.ci] apply automated fixes

* Set default to easyocr

* Update docling_inline.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Support objects with data attribute in body processing (#9644)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Add comprehensive message sorting + tests (#9641)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Fix audio recording resource cleanup (#9623)

* fix: Add voice mode availability detection (#9621)

* fix: Remove formatting from agent input text content (#9638)

* fix: added most important types at the beginning of the extensions array on File component (#9639)

* Changed file type order

* Changed starter projects that had the file component

* order tooltip types alphabetically

* changed order of text_file_types

* Removed duplicate types

* Changed starter projects that used past types

* changed test

* Fixed data test id

* Changed test to expect correct types

* fix: Include flow ID in webhook URLs (#9624)

* fix(logger): add optional cache to configure; update caching behavior (#9532)

* fix: update logger configuration to use environment variable for log level

* fix: remove default log level configuration and set logger initialization

* fix: enhance logger configuration to prevent redundant setup and improve cache handling

* fix: improve cache handling in logger configuration to prevent unintended defaults

* fix: enhance logger configuration to prevent redundant setup and improve early-exit logic

* fix: remove defensive comment in logger configuration for clarity

---------

Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: Update sidebar border styles (#9625)

style fix

* fix: Remove top padding from sidebar groups (#9636)

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: disable message editing on playground, fix new session not persisting after message is sent (#9662)

* update session storage in the same useeffect as the refetchSessions

* updated to send just the chat id

* added useGetFlowId custom hook

* updated places to use new currentFlowId hook

* updated to use new id, to edit the message in the api and to set the flowId in the message

* Restore current flow id from chat view

* put on cell value changed only if it exists to enable read-only tables

* removed call  to backend when updating messages on playground

* disable editing session view when on playground page

* delete unused props, show edit only when not in playground

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: disable elevate edges on node select (#9658)

disable elevate edges on select

* fix: Properly respect the order parameter for Message History (#9605)

* fix: Respect the order parameter for Message History

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Return multi-row dataframe when Structured Output data supports it (#9659)

* fix: Return multi-row dataframe output in SO

* [autofix.ci] apply automated fixes

* Tool support in message schema

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: apply to fields in settings page  (#9602)

* fix: Segmented Sidebar switch to search on value change (#9615)

* search icon selection behavior

* switch to search on input change

* unit test fix

* test fix

* update test

*  (frontend): add mock modules for @jsonquerylang/jsonquery and vanilla-jsoneditor packages
📝 (frontend): update test file to improve robustness and add debugging information for CI environment

* [autofix.ci] apply automated fixes

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: deprecate claude 3 sonnet model (#9622)

* fix: Properly import Langchain ToolMessage for Message options (#9675)

* fix: Properly import the ToolMessage from langchain

* Update logger.py

* Fix one line output

* fix: fixed user settings test (#9690)

Fixed userSettings test

* fix: Remove warning log for unset TRACELOOP_API_KEY in configuration validation (#9536)

fix: remove warning log for unset TRACELOOP_API_KEY in configuration validation

* fix: knowledge base fixes for 1.6 pointing to release branch (#9683)

* refactor: Improve code readability and organization in Knowledge Ingestion component

- Reorganized import statements for better clarity.
- Enhanced formatting of lists and function parameters for improved readability.
- Removed unused parameters and streamlined the column configuration in the Knowledge Bases tab.
- Updated JSON configuration for Knowledge Ingestion to reflect changes in code structure.

These changes aim to enhance maintainability and readability of the codebase.

* fix: Remove extraneous flag from package-lock and update column configuration in knowledge base

- Removed the extraneous flag from the `@clack/prompts` dependency in `package-lock.json`.
- Updated the `editable` property in the knowledge base columns configuration to `false`, enhancing the integrity of the data structure.

* refactor: Update FlowToolbar and related components for improved API modal handling

- Refactored FlowToolbar to replace openCodeModal with openApiModal for better clarity in modal management.
- Updated FlowToolbarOptions to accept openApiModal and setOpenApiModal props, enhancing the component's flexibility.
- Adjusted PublishDropdown to utilize the new API modal state, ensuring consistent behavior across the toolbar.
- Cleaned up import statements for better organization and readability.

* refactor: Clean up imports and streamline knowledge base column configuration

- Reorganized import statements in KnowledgeBasesTab and knowledgeBaseColumns for improved clarity and consistency.
- Removed unused parameters from the createKnowledgeBaseColumns function, simplifying its signature.
- Adjusted column flex properties for better layout in the knowledge base table.
- Enhanced overall readability and maintainability of the codebase.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: remove github link on discord button (#9655)

* Fixed discord opening github

* [autofix.ci] apply automated fixes

* fixed mcp server tab test

* Fixed flakyness on files test

* fixed flaky file upload

* Try to fix file upload component test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: remove python code component, fix placeholder not appearing (#9660)

* remove python code component and experimental category

* Refactor code area modal test to use custom component

* fixed placeholder not returning default value

* fix: add margins to <p> tag in markdown (#9656)

* Added margins to message paragraph

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: delete unused components, delete [deprecated] tag on the component title, add Replace and legacy tag functionality to components (#9645)

* Remove deprecated components

* Removed deprecated tags

* removed mcp deprecated components

* Add new applyComponentFilter

* add replacement to node parameters

* added filtercomponent to flow store

* Added replacement to api class type

* Made sidebar filter component more modular

* remove unused props and pass props to filtercomponent

* Apply component filters and get name and description for filter

* Add resetting to handle and page

* Added types to sidebar header

* Added legacy and replacement to node description, activate component filter on click

* updated sidebar header test

* format test

* update sidebar filter component test to match current behavior

* Refactor to allow multiple replacements

* removed legacy from node description

* added dismissed legacy nodes

* removed unused props

* add node legacy component

* changed replacement type to list

* Instantiate nodelegacycomponent on generic node when component is legacy

* Add components filtering in nodelegacycomponent

* added replacement instead of display name

* Added legacy tag to component name

* Add replacement to some components

* Added replacements to majority of legacy components

* Made component name not be capitalized

* fixed bundles not appearing at component filter

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* added replacement for crew ai

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: Ensure correct Docling Remote URL for API (#9708)

fix: Correct url for docling remote

* feat: remove agent dual output (#9700)

* remove agent dual output

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* refactor: Agent component enhancements for release v1.6 (#9685)

* refactor: improve code structure and add NodeDrawer component

- Refactored import statements for better organization in agent.py and dropdownComponent.
- Enhanced the AgentComponent's description and memory_inputs formatting for clarity.
- Introduced a new NodeDrawer component for improved UI handling in the dropdown.
- Updated Dropdown component to integrate NodeDrawer functionality, allowing for side panel interactions.

* refactor: simplify NodeDrawer component and enhance Dropdown integration

- Removed unnecessary props from NodeDrawer, streamlining its interface.
- Updated the Dropdown component to improve the integration of NodeDrawer, ensuring better handling of side panel interactions.
- Refactored the NodeDrawer's structure for improved readability and maintainability.

* fix

* refactor: enhance Dropdown and input components with externalOptions support

- Updated Dropdown and related components to incorporate externalOptions for improved flexibility.
- Refactored input classes to maintain consistent formatting and readability.
- Removed deprecated dialogInputs functionality in favor of the new externalOptions structure.

* fix: reorganize imports after cherry-pick resolution

* refactor: enhance Dropdown component with loading state and source options

- Introduced a loading state to the Dropdown component to indicate when a response is awaited.
- Updated the logic to utilize sourceOptions instead of dialogInputs for better clarity and maintainability.
- Refactored the rendering of options and associated UI elements to improve user experience.

* refactor: improve Dropdown component structure and styling

- Cleaned up import statements for better organization.
- Enhanced the loading state display and adjusted the layout for better user experience.
- Updated styling for CommandItem components to ensure consistent padding and font weight.
- Refactored option rendering logic for improved clarity and maintainability.

* refactor: reorganize imports and adjust Dropdown component behavior

- Moved import statements for better clarity and organization.
- Commented out the setOpen function call to modify Dropdown behavior when dialog inputs are present.

* refactor: enhance Dropdown component functionality and logging

- Removed unnecessary console log for source options.
- Introduced handleSourceOptions function to streamline value handling and state management.
- Updated onSelect logic to utilize handleSourceOptions for improved clarity and functionality.

* refactor: enhance Dropdown component with flow store integration

- Added useFlowStore to manage node state within the Dropdown component.
- Introduced a new handleSourceOptions function to streamline value handling and API interaction.
- Updated onSelect logic to ensure proper value handling when selecting options.

* refactor: Update agent component to support custom model connections

- Changed the agent component's dropdown input to allow selection of "connect_other_models" for custom model integration.
- Enhanced the dropdown options and metadata for better user guidance.
- Updated the build configuration to reflect these changes and ensure proper input handling.

* refactor: Reorganize imports and enhance dropdown component logic

- Moved and re-imported necessary dependencies for clarity.
- Updated dropdown rendering logic to improve handling of selected values and loading states.
- Ensured compatibility with agent component requirements by refining option checks.

* small fix and revert

* refactor: Clean up imports and improve dropdown component styling

- Removed duplicate imports for PopoverAnchor and Fuse.
- Simplified class names in the dropdown component for better readability.
- Adjusted layout properties for improved visual consistency.

* refactor: Enhance dropdown component functionality and clean up imports

- Reorganized imports for better clarity and removed duplicates.
- Implemented a new feature to handle "connect_other_models" option, improving the dropdown's interaction with flow store and types store.
- Added logic to manage input types and display compatible handles, enhancing user experience.
- Updated utility functions for better integration with the dropdown component.

* style: format options_metadata in agent component

* refactor: Update import statements in starter project JSON files and adjust proxy settings in frontend configuration

- Refactored import statements in multiple starter project JSON files to improve readability by breaking long lines.
- Changed proxy settings from "http://localhost:7860" to "http://127.0.0.1:7860" in frontend configuration files for consistency and to avoid potential issues with localhost resolution.

* [autofix.ci] apply automated fixes

* revert and fix

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fixed dropdown

* [autofix.ci] apply automated fixes

* kb clean up

* [autofix.ci] apply automated fixes (attempt 2/3)

* update to templates with display name change

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: mcp composer integration (#9506)

* encrypt oauth auth settings at rest

* [autofix.ci] apply automated fixes

* Fix rebase changes and add env to env server config

* Correctly unmask secretstr before encryption

* update mcp-composer args

* [autofix.ci] apply automated fixes

* ruff

* ruff

* ruff

* [autofix.ci] apply automated fixes

* ruff

* catch invalidtoken error

* ruff

* [autofix.ci] apply automated fixes

* ruff

* [autofix.ci] apply automated fixes

* ruff

* ruff

* [autofix.ci] apply automated fixes

* ruff

* [autofix.ci] apply automated fixes

* fix test

* Add initial mcp composer service and startup

* remove token url

* Register server on project creation

* WARN: fall back to superuser on no auth params, to allow mcp-composer to connect. also fixes race condition in server creatoin

* update sse url args

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Add langflow api keys to the server configs

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add port searching

* [autofix.ci] apply automated fixes

* Fix for dead servers - use devnull on subprocess to avoid pipe from filling up

* uvlock

* [autofix.ci] apply automated fixes

* Update composer startup behavior re: auth settings

* [autofix.ci] apply automated fixes

* fix some auth logic, add dynamic fetch of new url

* Clean up sse-url parameters

* [autofix.ci] apply automated fixes

* Only call composer url when composer is enabled

* [autofix.ci] apply automated fixes

* improve shutdown

* starter projects update

* [autofix.ci] apply automated fixes

* update logging
git push

* revert hack to auth mcp composer

* [autofix.ci] apply automated fixes

* Fix 500 on composer-url query

* [autofix.ci] apply automated fixes

* Update feature flag; update api key addition to aut-install

* [autofix.ci] apply automated fixes

* Fix composer url and re-add auth

* Changed needs_api_key logic

* Refactor use-get-composer-url

* remove python fallback for now, then pipe stderr to pipe

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Changed api key logic to allow connection if not api key and auto login is off

* fix oauth addition to cmd

* restart server when auth values change

* Restart server on oauth values changes

* [autofix.ci] apply automated fixes

* Changed project port to be the same as OAuth port

* Changed endpoint to provide port_available

* add is_port_available prop

* Added port_available to request

* Edit mutation to not have linting errors

* Added port not available state to authentication

* [autofix.ci] apply automated fixes

* Added port and host to get composer url

* Invalidate project composer url queries

* Changed to display port and host that is not running

* Cleanup old port finding and some mypy fixes

* Add print, remove unused env var

* Use mcp-composer directly in client and a lot of fixes

* changed starter projects

* refactor mcp_projects to use always IP generated for WSL

* changed to check args -4 too on installed servers

* changed to just check if sse url is in args

* added member servers in gitignore

* add check for ff

* Handle secret request response cycle securely and add better logging

* Use asycn logger

* Add decorator to check if composer is enabled in settings

* more logging changes

* Much better handling of existing oauth servers when the flag is disabled on restart

* Reset oauth projects to apikey or none when composer flag is disabled

* fix url for api key auth

* Fix auth check; set project auth to api key when auto login disabled

* Ruff, comments, cleanup

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Consolidate the auth handling since its used in two endpoints

* [autofix.ci] apply automated fixes

* Ruff

* [autofix.ci] apply automated fixes

* last ruff

* Update FE env var naming and dont unnecessarily decrypt auth settings at times

* update feature flag usage - remove mcp composer

* [autofix.ci] apply automated fixes

* Update timeout methods to have more reliable startup

* more feature flag changes

* Attempt to extract helpful user messages

* [autofix.ci] apply automated fixes

* Added loading on mcp server tab auth

* Changed to load on start too

* cleanup mcp composer on project deletion

* [autofix.ci] apply automated fixes

* remove nested retry mech

* Ruff

* lint

* Fix unit tests

* [autofix.ci] apply automated fixes

* ruff

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>

* fix: Adjust padding and layout for improved spacing (#9711)

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: remove Groq from Agents model provider list (#9616)

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>

* fix: conditional scheduling logic to not run branch (#9722)

* Use separate conditional router flag to check if-else branch execution

* clean comments

* [autofix.ci] apply automated fixes

* Ruff

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: disable keys when flow is locked (#9726)

* Disable keys when isLocked

* Disabled adding and deleting nodes when flow is locked

* fix: superuser credential handling and AUTO_LOGIN security (#9542)

* Refactor superuser credential handling for security

* [autofix.ci] apply automated fixes

* refactor: enhance superuser credential handling in setup process (#9574)

* [autofix.ci] apply automated fixes

* refactor: streamline superuser flow tests and enhance error handling (#9577)

* [autofix.ci] apply automated fixes

* None Super user is not allowed hence for a valid string resetting it to

* None Super user is not allowed hence for a valid string resetting it to ""

* use secret str for password everywhere

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>

* chore: Update version to 1.6.0 in package files (#9746)

fix: update version to 1.6.0 in package.json and package-lock.json

* fix: update logs position to be absolute (#9724)

* removed left auto from log canvas controls

* made initial position be fetched from event for notes

* added relative class and put shadow box outside of the div that contains reactflow

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>

* fix: make entire playground chat area be clickable (#9721)

* Add stop propagation to chat input buttons

* Made entire area focus chat when clicked

* fix: Restore old description from file description. (#9752)

fix: Restore file component description

* fix: Preserve flows and components during project updates (#9750)

* 📝 (projects.py): add logic to separate flows and components from a single query result for better organization and readability
🐛 (projects.py): fix logic to correctly exclude project flows from the list of excluded flows

*  (test_projects.py): add tests to ensure project renaming preserves associated flows and components

* 📝 (projects.py): remove unnecessary comment to improve code readability and maintainability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix(langwatch): prevent trace errors with proper API key validation (#9720)

* fix(URLComponent): filter out `None` in headers to avoid silent serialization errors (#9596)

fix: Filter out None values from headers in URLComponent

* fix: put knowledge bases under feature flag (#9749)

Added enable_knowledge_bases feature flag everywhere it's been used

* refactor: Padding misaligned for sidebar icons and other issues fix for 1.6 (#9713)

* sidebar fixes

* [autofix.ci] apply automated fixes

* refactor: update FlowMenu and CanvasControlsDropdown styles, enhance MemoizedCanvasControls with flow lock status

* feat: add 'Sticky Notes' functionality to sidebar and enhance note handling

- Introduced a new 'add_note' section in the sidebar for adding sticky notes.
- Implemented event listeners to manage the add-note flow, allowing for better integration with the sidebar.
- Updated styles and structure in various components to accommodate the new feature.
- Refactored existing components for improved organization and readability.

* fix: adjust button height in FlowSidebarComponent for improved UI consistency

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Updated Agent Starter Projects with new Templates (#9772)

* updates templates

* fix formating

* fix: remove agents from skipped components list in setup (#9785)

* fix: improve error handling for missing OCR dependencies (#9753)

* fix(docling): improve error handling for missing OCR dependencies

- Add DoclingDependencyError custom exception
- Detect specific OCR engine installation issues
- Provide clear installation instructions to users
- Suggest OCR disable as alternative solution
- Fail fast when dependencies are missing

Fixes issue where users received unclear error messages when OCR engines
like ocrmac, easyocr, tesserocr, or rapidocr were not properly installed.

* fix: prevent missing clean_data attribute error

* chore: update starter_projects

* [autofix.ci] apply automated fixes

* refactor(docling): update dependency error messages to use uv and suggest complete install

Address code review feedback by using 'uv pip install' and offering langflow[docling] as alternative

* refactor(docling): simplify worker error handling per code review

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: adjust casing on Add MCP Server buttons (#9774)

* Added span to buttons to not remove casing

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: set gpt4.1 as default model (#9780)

* feat: double clicking a component will add it to the canvas (#9730)

* fix

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: release branch tests (#9820)

* Fix auth tests

* [autofix.ci] apply automated fixes

* Modularized lock flow

* Added more assertions

* t Fixed flow lock test

* Fixed sticky notes test

* Removed warning on mcpsidebargroup test

* fixed warnings on sidebar footer buttons

* fixed sidebar footer buttons and test

* Re-added padding

* Fixed sidebar segmented nav test

* fixed searchconfigtrigger

* Fixed sidebar header test

* fixed sidebar items list test

* Fixed flow lock test

* fixed sticky notes test

* Fixed sidebarfooterbuttons test

* Revert fix

* Fixed test_refresh_starter_projects

* attempt to fix fe merge conflicts

* [autofix.ci] apply automated fixes

* lint

* [autofix.ci] apply automated fixes

* mypy

* Improve sorting of sender messages

* ruff

* starter projects

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>

* fix: Properly serialize documents for Graph RAG in Astra (#9777)

fix: Serialize documents for graph RAG

* fix: Standardize content dict format for LLM provider compatibility (#9745)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

* fix: make components added with filter come with the output pre-selected, fix Agent filtering (#9787)

* Added output selection if there is a filter and the output exists

* Fixed wrong pseudo source handle

* Removed handle dragging

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: make mcp tools refresh when changing server with the same name (#9778)

* Delete cache when editing servers

* Add check to refresh tools if the cache is changed from the current tools

* Updated mcp to only delete from cache if it exists there

* Added test to tools refresh functionality

* remove tools count from updated server

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: remove extra spaces from playground, added separator (#9779)

Adjusted margins for items in playground

* fix: Update message schema tests for image_url structure (#9823)

* 📝 (test_schema_message.py): update image content type to "image_url" for consistency and clarity in message schema
♻️ (test_schema_message.py): refactor image URL handling to improve readability and maintainability of the code

* [autofix.ci] apply automated fixes

* fixed mcp sidebar

* revert sidebar change

* Fixed test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>

* fix: Restore Embedding Model Connections in Vector Store RAG (#9776)

fix: Restore Embedding model connections

* fix: update CORS configuration and add env vars to allow for user control (#9744)

* Update CORS configuration and add env vars to allow for user control

* Add unit test

* fix: add noqa comment for linting in create_refresh_token function

Added a noqa comment to suppress linting warnings for the token type check in the create_refresh_token function, ensuring code clarity while maintaining compliance with linting standards.

* refactor: enhance CORS tests with temporary directory usage and improve exception handling

Updated unit tests for CORS configuration to utilize a temporary directory for environment variables, ensuring isolation during tests. Improved exception handling in refresh token tests to raise HTTPException with appropriate status codes and messages. This enhances test reliability and clarity.

* fix: enhance CORS origin validation to ensure consistent list output

Updated the validate_cors_origins method to convert a single origin string into a list for consistency, in addition to handling comma-separated strings. This change improves the robustness of CORS configuration handling.

* refactor: update CORS test cases to ensure single origin is consistently treated as a list

Modified unit tests for CORS configuration to assert that single origin strings are converted to lists, enhancing consistency in CORS origin handling. This change aligns with recent updates to the CORS validation logic.

* re-add uvlock

* [autofix.ci] apply automated fixes

* feat: revert CORS changes and add deprecation warnings for v1.7

- Revert CORS behavior to maintain backward compatibility until v1.7
- Add CORS configuration fields with current defaults (*, True, *, *)
- Implement deprecation warnings for upcoming v1.7 security changes
- Preserve existing behavior while enabling early configuration adoption

* [autofix.ci] apply automated fixes

* Add back imports

* Fix tests

* [autofix.ci] apply automated fixes

* Rt;uff

* Ruff

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

* fix: handle pandas Series in get_message boolean evaluation (#9765)

* fix: handle pandas Series in get_message boolean evaluation

Resolves ValueError when message is pandas Series by checking .empty
instead of relying on ambiguous truth value evaluation.

* fix: mypy error

* fix: mypy error

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Add VLM support for Docling and improve deps (#9757)

* fix: Support the VLM pipeline in docling

* fix: Add VLM support and opencv dep

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update comments and fix ruff errors

* [autofix.ci] apply automated fixes

* Hide OCR engine when VLM selected

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Fix VLM pipeline

* [autofix.ci] apply automated fixes

* Add type annotation for visited and excluded

* [autofix.ci] apply automated fixes

* Small fix for the templates

* Update Vector Store RAG.json

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: make cursor position not go to end on input list component (#9782)

* added new cursor input with cursor handling to input list component

* Change to use cursor input on input list component

* Test cursor position preservation on inputlistcomponent

---------

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>

* fix: remove metadata building to speed up load times (#9819)

Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: turn mcp composer feature on by default on frontend (#9831)

fix mcp composer not on by default

* fix: make astra db component not disconnect, fix handle color when type is undefined (#9829)

* remove hidden from vector store

* Added vector store color

* Added fallback for when the connected color is not found

* Changed starter projects

* fixed null check

* fix: Handle ImportError for parse_api_endpoint and remove debug logging (#9830)

* fix: remove debug logging for processed modules in _process_single_module

* fix: move parse_api_endpoint import inside try-except block to handle ImportError gracefully

* fix: make session_id visible in Message History Retrieve mode (#9557)

* fix: make session_id visible in Message History Retrieve mode

- Added session_id to default_keys to make it visible by default
- Added session_id to Retrieve mode config to show it when mode is selected
- Kept advanced=True as requested to maintain field categorization
- Fixes issue where session_id input was hidden preventing dynamic session retrieval

Fixes #9464

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Fix api key detection for skip test

* Oops. Remove print

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>

* feat: Enhance logging configuration with caller information and conditional callsite data (#9747)

* fix: enhance logging configuration to include caller information and improve log level handling

* fix: add caller information to logging configuration

* fix: conditionally add callsite information to logging configuration based on DEV environment

* fix: update DEV variable initialization to use environment variable

* fix: update logging configuration to include callsite fields in DEV environment

* mypy

* [autofix.ci] apply automated fixes

* mypy

---------

Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* ref: update auto login behavior to use secure defaults (#9825)

* Update auto login behavior to use secure defaults; remove skip auth option

* Add warning back

* ordering of params

* skip unimplemented cors tests

* fix: make mcp tools update when auth settings is null (#9844)

* allow trailing and starting _

* Fixed selection

* fixed auth settings being called when it's null

* fix: adjust tools title and description padding (#9847)

* Fixed padding on tools table

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Apply a per-user uniqueness for mcp (#9840)

* fix: Apply a per-user uniqueness for mcp

* Test updates

* [autofix.ci] apply automated fixes

* Fix tests

* Update mcp.py

* Update 1cb603706752_modify_uniqueness_constraint_on_file_.py

* Update 1cb603706752_modify_uniqueness_constraint_on_file_.py

* Update 1cb603706752_modify_uniqueness_constraint_on_file_.py

* Update 1cb603706752_modify_uniqueness_constraint_on_file_.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: make file button clickable after focusing on chat (#9863)

Fixed file button unclickable

* fix: make input clickable on chat  (#9864)

Fixed not able to select text

* test: Increase loading performance test timeout (#9873)

* Revert "ref: update auto login behavior to use secure defaults (#9825)"

This reverts commit 567d0fa91a.

* refactor: update skip_auth_auto_login behavior and update messaging timelines for removal (#9874)

* Update auto login warnings to reflect new timelines

* Add regex match to test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: Remove the uniqueness constraint on file names (#9872)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Move mcp composer service to lfx

* MCP Composer service factory fixes

* Add back script changes for lfx

* Clean up mcp project imports

* Update d37bc4322900_drop_single_constraint_on_files_name_.py

* Fix mcp imports

* Update CORS deprecation notice

* Add back the external options in dropdown input

* Add back starter projects

* Remove old components/data init file and update starter projects

* remove todo

* Re-adds the clean_data param for chat output

* [autofix.ci] apply automated fixes

* Update starter projects with clean_data

* Update oauth timeouts and fix socket binding check

* Fix import and main duplicate code

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Import and test fixes

* [autofix.ci] apply automated fixes

* Temporarily skipping knowledge bases import issue to allow other CI tests to run

* Add python function to lfx test

* fixed typesStore test

* Ruff and image unit test fixes

* [autofix.ci] apply automated fixes

* 📝 (image.py): Update function documentation to reflect changes in the content dictionary structure
♻️ (test_schema_data.py): Refactor tests to use "image" type instead of "image_url" and remove unnecessary checks for "source_type" in the content dictionary

* Knowledge bases update for merge

* Update __init__.py

* Revert the changes to package lock

* Fix kb tests to use client fixture instead of mocks

* Clean up mcp init task

* Fix other kb tests

* fixed text file typs with repeated data

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: VICTOR CORREA GOMES <112295415+Vigtu@users.noreply.github.com>
2025-09-18 21:23:08 +00:00
974cbe099a ci: Increase memory limit and disable concurrent builds for esbuild in docker (#9862) 2025-09-15 09:57:13 -03:00
dfa4f98c21 ci: Add missing lfx metadata files to Docker build context (#9845) 2025-09-12 15:50:57 -03:00
801b280113 ci: fix dockerfile and update docker_test trigger (#9839) 2025-09-12 12:20:56 -03:00
8e18fd973f ci: Update Docker commands to use Podman and add missing bindings for LFX (#9838) 2025-09-12 11:44:41 -03:00
aaaaed1e59 feat: introduce lfx package (#9133)
* docs: add README for lfx CLI tool

- Created a comprehensive README for the lfx command-line tool, detailing installation instructions, command usage, and examples for both `serve` and `execute` commands.
- Included sections on input sources and development setup to enhance user understanding and facilitate contributions.

* fix: update import paths and test assertions in queryInputComponent.spec.ts

- Modified import statements to reflect the new module structure, changing `langflow` to `lfx` for consistency.
- Adjusted test assertions to ensure proper syntax and functionality, enhancing the reliability of the test suite.

* fix: streamline test assertions and update import paths in tabComponent.spec.ts

- Refactored test assertions for tab visibility to improve readability and maintainability.
- Updated import paths from `langflow` to `lfx` for consistency with the new module structure.
- Ensured proper syntax in test cases to enhance the reliability of the test suite.

* fix: skip table input component test due to UI event conflicts

- Marked the test for user interaction with the table input component as skipped due to conflicts between double-click and single-click events.
- Added a comment to indicate the need for further investigation into event handling issues affecting this branch.

* fix: update CLI test cases to include 'serve' command

- Modified test cases in `test_serve_simple.py` to include the 'serve' command in the CLI invocation, ensuring accurate testing of command behavior.
- Adjusted assertions to maintain consistency and reliability in test outcomes when handling various scenarios, such as missing API keys and invalid JSON inputs.

* feat: implement LFX nightly release workflow in GitHub Actions

- Added a new job for releasing LFX nightly builds, including steps for checking out code, setting up the environment, installing dependencies, verifying versioning, building the package, testing the CLI, publishing to PyPI, and uploading artifacts.
- Introduced a wait step for PyPI propagation to ensure successful package availability post-release.
- Refactored existing release job structure to accommodate the new LFX workflow while maintaining the Langflow nightly base release process.

* refactor: Simplify flow execution validation by removing unnecessary asyncio.wait_for calls

Updated the validate_flow_execution function to directly use the client.post and client.get methods with a timeout parameter, improving code readability and maintainability. This change eliminates redundant timeout handling while ensuring consistent timeout values across API calls.

* refactor: Enhance template tests for improved structure and validation

Refactored the template tests in `test_starter_projects.py` to utilize parameterization for better readability and maintainability. Introduced helper functions to retrieve template files and disabled tracing for all tests. Updated individual test methods to validate JSON structure, flow execution, and endpoint validation, ensuring comprehensive coverage of template functionality. This change streamlines the testing process and enhances the robustness of the test suite.

* refactor: Update project metadata and import paths in starter project JSON files

Modified the metadata section in multiple starter project JSON files to reflect updated code hashes and module paths, transitioning from 'lfx' to 'langflow' components. This change enhances consistency across the codebase and ensures that the correct modules are referenced for improved maintainability and clarity.

* chore: Update template test commands to utilize parallel execution

Modified the commands in the Makefile and CI workflows to include the `-n auto` option for pytest, enabling parallel test execution for the starter project template tests. This change enhances test performance and efficiency across the codebase.

* chore: Remove  news-aggregated.json file

Deleted the news-aggregated.json file

* chore: Update .gitignore to include new files

Added entries for *.mcp.json, news-aggregated.json, and CLAUDE.md to the .gitignore file to prevent these files from being tracked in the repository.

* refactor: Update module paths and code hashes in starter project JSON files

Modified the metadata section in multiple starter project JSON files to transition module paths from 'langflow' to 'lfx' components and updated code hashes accordingly. This change enhances consistency and maintainability across the codebase, ensuring that the correct modules are referenced.

* refactor: Remove debug logging from module processing function

Eliminated the debug log statement in the _process_single_module function to streamline logging output. This change enhances code clarity and reduces unnecessary log clutter during module processing.

* refactor: Update import paths and clean up component exports

Modified import statements to transition from 'langflow' to 'lfx' in the field_typing module and adjusted component exports in various modules by removing unused components. This change enhances code organization and maintainability across the codebase.

* fix: Add timeout header to flow execution validation test

Updated the headers in the flow execution validation test to include a timeout value. This change ensures that the test accurately reflects the expected behavior of the validate_flow_execution function when handling timeouts, enhancing the robustness of the test suite.

* fix: Add timeout to mock client delete assertion in flow execution validation test

Updated the mock client delete assertion in the flow execution validation test to include a timeout value. This change ensures that the test accurately reflects the expected behavior when handling timeouts, contributing to the robustness of the test suite.

* refactor: Update Dockerfile to use Alpine-based Python image and install build dependencies

Changed the base image in the Dockerfile to an Alpine-based Python image for a smaller footprint. Added installation of necessary build dependencies for Python packages on Alpine. Updated user creation to follow best practices for non-root users. This change enhances the efficiency and security of the Docker build process.

* refactor: move development mode toggle functions in settings to lfx

Introduced `_set_dev` and `set_dev` functions in `settings.py` to manage the development mode flag. Updated import path in `base.py` to reflect the new function location. This change enhances the configurability of the development environment.

* feat: Register SettingsServiceFactory in service manager

Added registration of the SettingsServiceFactory in the service manager if it is not already present. This change ensures that the settings service is available for retrieval, enhancing the functionality of the service management system.

* feat: Add global variable validation option to serve and execute commands

Introduced a new option to the serve and execute commands to check global variables for environment compatibility. This enhancement allows users to validate their configurations before execution, improving robustness and error handling in the application. Validation errors are reported clearly, and users can choose to skip this check if desired.

* refactor: Remove unused development mode functions from settings

Eliminated the `_set_dev` and `set_dev` functions from `settings.py` and their associated validator in `base.py`. This change simplifies the code by removing unnecessary functions, enhancing maintainability and clarity in the settings management.

* fix: Update load_graph_from_path to include verbose parameter in JSON handling

Modified the `load_graph_from_path` function to accept the file suffix as an argument when loading JSON graphs. Updated related tests to ensure correct behavior with the new parameter, including assertions for verbose logging. This change enhances error handling and logging clarity during graph loading operations.

* [autofix.ci] apply automated fixes

* refactor: Update import paths for version utilities in settings

Changed the import statements in `base.py` to source version utility functions from `lfx.utils.version` instead of `langflow.utils.version`. Additionally, added the `is_pre_release` function to `version.py` to check for pre-release indicators in version strings. This refactor improves code organization and aligns with the updated module structure.

* feat: Add BuildStatus schema for API compatibility

Introduced a new BuildStatus class in the schema module to define the structure for build status responses. This addition enhances API compatibility by providing a standardized way to convey build status, including optional message and progress fields. Updated import paths in the cache utility to reflect the new schema location.

* refactor: Update import path for EventManager in component_tool.py

Changed the import statement for EventManager to reflect its new location in the lfx.events module. This update improves code organization and maintains consistency with the updated module structure.

* refactor: Improve file upload handling in SaveToFileComponent

Updated the _upload_file method to dynamically import necessary functions for file upload, enhancing error handling for missing Langflow functionality. Refactored session management to use async context with session_scope, improving code clarity and maintainability.

* refactor: Enhance import handling in MCPToolsComponent for Langflow dependencies

Updated the MCPToolsComponent to dynamically import Langflow-related functions within a try-except block, improving error handling for missing functionality. This change ensures that users receive a clear message when the Langflow MCP server features are unavailable, enhancing robustness and maintainability of the code.

* refactor: Update JSON handling in JSONDocumentBuilder to use orjson directly

Replaced the use of orjson_dumps with orjson.dumps for serializing documents in the JSONDocumentBuilder class. This change improves performance and simplifies the code by directly utilizing orjson for JSON serialization, enhancing overall code clarity and maintainability.

* refactor: Improve error handling for Langflow Flow model import in get_flow_snake_case

Updated the get_flow_snake_case function to dynamically import the Flow model within a try-except block. This change enhances error handling by providing a clear message when the Langflow installation is missing, improving the robustness and maintainability of the code.

* chore: Add orjson as a dependency in project configuration

Included orjson in both the uv.lock and pyproject.toml files to ensure proper JSON handling and serialization capabilities. This addition enhances the project's performance and maintains consistency in dependency management.

* [autofix.ci] apply automated fixes

* refactor: Convert execute function to async and update JSON flow loading

Refactored the execute function to be asynchronous using syncify, allowing for non-blocking execution. Updated the JSON flow loading to utilize aload_flow_from_json for improved performance. Adjusted the results handling to support asynchronous graph execution, enhancing overall code efficiency and maintainability.

* refactor: Enhance import handling for Langchain dependencies in validate.py and constants.py

Updated the validate.py file to suppress LangChainDeprecationWarning during dynamic imports. In constants.py, renamed DEFAULT_IMPORT_STRING for clarity and added a conditional import string based on the presence of the Langchain module. These changes improve error handling and maintainability of the code.

* refactor: Improve error handling and output formatting in execute function

Enhanced the execute function by introducing a dedicated output_error function for consistent error messaging in both JSON and verbose formats. Updated error handling throughout the function to utilize this new method, improving clarity and maintainability. Adjusted the handling of input sources and validation errors to provide more informative feedback to users.

* feat: Add simple chat flow example with JSON and Python integration

Introduced a new simple chat flow example demonstrating the use of ChatInput and ChatOutput components. This includes a JSON configuration file and a Python script that sets up a basic conversational flow, enhancing the documentation and usability of Langflow for users. Additionally, integration tests have been added to validate the execution of the flow, ensuring robust functionality.

* refactor: Update message extraction to use json.dumps for improved serialization

Modified the extract_message_from_result function to utilize json.dumps with ensure_ascii=False for better JSON serialization of message content. This change enhances the output formatting and maintains consistency in handling message data.

* feat: Add initial graph module with core components

Introduced a new graph module in Langflow, including essential classes such as Edge, Graph, Vertex, and specific vertex types (CustomComponentVertex, InterfaceVertex, StateVertex). This addition enhances the modularity and functionality of the codebase, laying the groundwork for future graph-related features.

* feat: Add pytest collection modification for automatic test markers

Implemented a new function to automatically add markers to test items based on their file location. This enhancement categorizes tests into unit, integration, and slow tests, improving test organization and clarity in both the backend and lfx test suites.

* chore: Update test configuration for improved organization and clarity

Modified the test paths and markers in both the main and lfx pyproject.toml files. Added new markers for unit, integration, and slow tests, enhancing test categorization. Removed the redundant pytest.ini file to streamline configuration management.

* chore: Update project description in pyproject.toml

Revised the project description to provide a clearer overview of LFX (Langflow Executor) as a lightweight CLI tool for executing and serving Langflow AI flows. This change enhances the documentation and helps users better understand the project's purpose.

* [autofix.ci] apply automated fixes

* chore: Remove redundant per-file ignores from pyproject.toml

Eliminated unnecessary linting ignores for scripts and backend tests in the pyproject.toml file. This streamlines the configuration and improves clarity in the project's linting setup.

* chore: Update Dockerfile project description for clarity

Revised the project description in the Dockerfile to reflect the correct name of the CLI tool as "LFX - Langflow Executor CLI Tool." This change improves clarity and aligns with the project's branding.

* feat: Introduce 'run' command for executing Langflow workflows

Renamed the 'execute' command to 'run' in the lfx CLI for consistency and clarity. Updated the README documentation to reflect this change, including command usage examples. Added a new run.py module that implements the run command functionality, allowing users to execute Langflow workflows from Python scripts or JSON files. Comprehensive unit and integration tests have been added to ensure robust functionality and error handling for the new command.

* fix: Update test command in Makefile to include all tests

Modified the test command in the Makefile to run all tests located in the 'tests' directory instead of just the 'unit' tests. This change ensures comprehensive test coverage during the testing process.

* chore: Clean up pyproject.toml formatting and linting ignores

Adjusted the formatting of the members list in the [tool.uv.workspace] section for improved readability. Removed a redundant linting ignore from the ignore list, streamlining the configuration and enhancing clarity in the project's linting setup.

* docs: Update README.md with environment variable requirement and command examples

Added a note about the necessity of setting the `LANGFLOW_API_KEY` environment variable before running the server. Updated command examples to reflect the correct flow ID display and included additional options for the `uv run lfx` commands, enhancing clarity and usability for users.

* feat: Add LFX release workflow and release script

Introduced a comprehensive GitHub Actions workflow for managing LFX releases, including version validation, testing across multiple Python versions, building and publishing to PyPI, and creating Docker images. Additionally, added a Bash script for local release preparation, which updates versioning in relevant files, runs tests, and facilitates the release process with dry-run capabilities. This enhancement streamlines the release workflow and ensures robust version management.

* feat: Add hypothesis to development dependencies

Included the 'hypothesis' library in both the uv.lock and pyproject.toml files to enhance testing capabilities with property-based testing. This addition supports more robust test coverage and improves the overall quality of the codebase.

* feat: Enhance Makefile with release operations and version bumping

Added new targets to the Makefile for checking the current version, preparing for releases, and bumping the version. The `prepare_release` target outlines next steps for the release process, while `bump_version` allows for version updates directly from the Makefile, improving the release workflow and version management.

* Temporarily modify nightly build to publish release lfx

* fix version

* fix versions

* skip tests

* Revert changes to run release lfx

* refactor: Change logger warning to trace for environment variable loading

Updated the logging level from warning to trace in the `update_params_with_load_from_db_fields` function to provide more granular logging when loading variables from environment variables due to the unavailability of the database. This change enhances the debugging capabilities without altering the functionality.

* chore: Update project description in pyproject.toml

Modified the project description in the pyproject.toml file for clarity, removing the acronym "LFX" to enhance understanding of the Langflow Executor's purpose as a CLI tool for executing and serving Langflow AI flows.

* docs: Update README for inline JSON format clarification

Revised the README to reflect changes in the inline JSON format for commands, ensuring consistency in the structure by including "data" as a key for nodes and edges. This update enhances clarity for users on how to properly format their JSON input when using the CLI.

* fix: Update message extraction logic in script_loader.py

Refactored the `extract_message_from_result` and `extract_text_from_result` functions to improve message handling. The changes include parsing JSON directly from the message's model dump and adding type checks to handle both dictionary and Message object types. This enhances robustness and ensures proper extraction of text content.

* feat: Add complex chat flow example and enhance test coverage

Introduced a new script `complex_chat_flow.py` demonstrating a multi-component chat flow, showcasing the integration of `ChatInput`, `TextInput`, `TextOutput`, and `ChatOutput`. Enhanced unit tests in `test_script_loader.py` to validate loading and execution of real scripts, ensuring proper graph structure and result extraction. This improves the robustness of the testing framework and provides a practical example for users.

* refactor: Enhance unit tests for FastAPI serve app with real graph data

Updated unit tests in `test_serve_app.py` to utilize real graph data from JSON files, improving test accuracy and coverage. Replaced mock graph instances with real graphs created from payloads, ensuring better alignment with actual application behavior. This change enhances the robustness of the testing framework and prepares for future feature expansions.

* refactor: Update unit tests to utilize real graph data and improve structure

Refactored unit tests in `test_serve_components.py` to replace mock graph instances with real graphs created from JSON data. This change enhances the accuracy and robustness of the tests, ensuring better alignment with actual application behavior. Additionally, removed the `create_mock_graph` function in favor of a new `create_real_graph` function, streamlining the test setup process.

* test: Increase timeout for selector in Prompt Chaining tests

Updated the timeout for the selector waiting for "built successfully" in the Prompt Chaining integration tests from 30 seconds to 60 seconds. This change aims to enhance test reliability by allowing more time for the expected output to appear, particularly in environments with variable performance.

* feat: Add nightly build and publish workflow for LFX

Implemented a new GitHub Actions workflow for building and publishing the LFX package nightly. This includes steps for checking out the code, setting up the environment, installing dependencies, verifying the package name and version, building the distribution, testing the CLI, and publishing to PyPI. The workflow is designed to run conditionally based on input parameters, enhancing the CI/CD process for LFX.

* refactor: Remove redundant re-export comments across multiple modules

* fix: Update __all__ to include Component in custom_component module

* Move all of message_original to lfx

* refactor: Update component module to improve imports and maintain backward compatibility

* refactor: Clean up imports and remove unnecessary TYPE_CHECKING block

* refactor: Remove enhanced Data class and update imports for backward compatibility

* refactor: Enhance pytest configuration to check for langflow installation and update error handling

* Refactor import statements in component modules to use new import structure

- Updated import paths in various component  files to reflect the new structure under .
- Ensured all components are correctly importing their respective modules.
- Added unit tests for dynamic imports and import utilities to validate the new import system.

* [autofix.ci] apply automated fixes

* fix: update import paths to use the new lfx structure across multiple components

* style: run pre-commit on all files

* fix: move dotdict import inside TYPE_CHECKING block for better performance

* feat: add MCP session management settings and update knowledge bases directory

* fix: update module paths and code hashes in Knowledge Ingestion and Retrieval JSON files

* fix: reorder imports for better organization and readability

* fix: update KBRetrievalComponent module path and code hash

- Changed module path from `langflow.components.data.kb_retrieval.KBRetrievalComponent` to `lfx.components.data.kb_retrieval.KBRetrievalComponent`.
- Updated code hash to reflect recent changes in the KBRetrievalComponent implementation.
- Refactored import statements and adjusted the logic for handling knowledge bases and embeddings.

* fix: move parse_api_endpoint import inside try block for better error handling

* refactor: clean up base.py by removing unused imports and code

* fix: update version and revision in pyproject.toml and uv.lock files

* refactor: remove unused validation functions and imports from validate.py

* fix: handle langflow import conditionally and adjust code references

* fix: update version to 0.1.3 in pyproject.toml and uv.lock files

* refactor: update code handling in utils.py for custom components

- Refactored the _generate_code_hash function to remove the class_name parameter, simplifying its signature and improving clarity.
- Introduced a new function, get_module_name_from_display_name, to convert display names into valid module names.
- Updated references to custom_component.code to custom_component._code for consistency across the codebase.
- Enhanced error handling during code hash generation to log exceptions, improving debugging capabilities.
- Adjusted metadata handling in build_custom_component_template functions to derive module names when not provided, ensuring accurate metadata generation.

* [autofix.ci] apply automated fixes

* refactor: update type hinting for Graph in load.py

* refactor: implement lazy initialization for storage service in ParameterHandler

* feat: add timing option to run function for performance measurement

* refactor: implement lazy initialization for tracing service in Graph class

* feat: add lazy initialization for tracing service in CustomComponent

* refactor: implement lazy initialization for storage service in Vertex and loading functions

* bump: update version to 0.1.4 in pyproject.toml and uv.lock

* feat: add UUID generation for session_id in LCAgentComponent

* fix: import sqlmodel conditionally in get_flow_snake_case to avoid ImportError

* feat: conditionally import model components to enhance modularity and avoid ImportError

* feat: implement lazy loading for agent and data components to enhance modularity

* fix: conditionally filter OpenAI inputs and handle empty case in AgentComponent

* refactor: enhance verbose logging and error handling in run function

* fix: update USER_AGENT assignment to use importlib for better compatibility

* fix: change async methods to synchronous in Component class for toolkit conversion

* feat: add complete agent example with setup instructions and dependencies in README

* [autofix.ci] apply automated fixes

* fix: update import paths from langflow to lfx for consistency across test files

* fix: bump version to 0.1.5 in pyproject.toml and uv.lock

* fix: enhance _get_tools method to handle both sync and async calls

* fix: bump version to 0.1.6 in pyproject.toml and uv.lock

* fix: streamline _get_tools method to handle sync and async calls more efficiently

* feat: implement lazy loading for searchapi components

* feat: add dynamic imports and lazy loading for component modules

* feat: implement lazy loading for NotDiamondComponent

* fix: add type check for source_code in _generate_code_hash function

* test: add error handling for missing langchain-openai dependency in class import

* fix: update error handling for None source in _generate_code_hash function and correct import paths

* fix: improve error handling for dynamic imports and update import paths in tests

* fix: enhance error handling for dynamic imports and ensure proper caching behavior

* fix: improve error handling for missing modules in import_mod function

* fix: enhance dynamic imports with on-demand discovery and improved error handling

* fix: update error handling in tests to raise ModuleNotFoundError for missing dependencies

* fix: update version to 0.1.7 in pyproject.toml and uv.lock

* fix: update version to 0.1.8 in pyproject.toml and uv.lock; enhance README with flattened component access examples

* [autofix.ci] apply automated fixes

* fix: update import path for Graph in composio_base.py

* merge the createl-lfx changes into the Component

* update code in templates

* feat: Add simple agent flow example in test data

* feat: Add LFX commands as a sub-application in the main app

* feat: Add tests for simple agent workflow execution via lfx run

* fix: update import for KeyedMemoryLockManager to maintain consistency

* refactor: remove unused imports from various modules for cleaner code

* refactor: remove unused import of aget_messages for cleaner code

* update manager in lfx

* update logger to use lfx

* rename lfx_logging to logs

* refactor: remove loguru dependency and add structlog

* chore: update starter project files for consistency

* refactor: update logger calls to use exc_info for better error reporting

* refactor: update import paths to use lfx module instead of langflow

* move vector store components for various databases

- Implement PGVector store component for PostgreSQL with search capabilities.
- Implement Pinecone store component with support for various distance strategies.
- Implement Qdrant store component with customizable server settings.
- Implement Supabase store component for vector storage and retrieval.
- Implement Upstash store component with metadata filtering options.
- Implement Vectara store component with RAG capabilities and document management.
- Implement Weaviate store component with support for API key authentication and capitalized index names.
- Add dynamic imports for all new components to facilitate lazy loading.

* refactor: reorder import statements for better organization

* refactor: improve dynamic import handling for Chroma components

* refactor: update test for ChromaVectorStoreComponent to check for import errors

* refactor: update __init__.py to import all components from lfx and improve attribute forwarding

* refactor: add forwarding for langflow components to lfx counterparts

* refactor: simplify mock setup in component_setup method

* refactor: update module references from langflow.logging to lfx.logs in test_logger.py

* refactor: enhance test structure for simple agent workflow in lfx run

* Refactor logging imports and update code snippets in JSON configuration files

- Changed logger import from `lfx.lfx_logging.logger` to `lfx.logs.logger` in multiple components.
- Updated code snippets in Travel Planning Agents, ChatInputTest, LoopTest, and TwoOutputsTest JSON files to reflect the new logger import.
- Ensured consistency in code formatting and structure across the affected files.

* docs: update README to clarify installation and usage instructions

* refactor: update import paths from langflow to lfx in multiple component __init__.py files

* refactor: improve test structure and organization in test_run_command.py

* refactor: clean up unused imports and improve code organization in kb_ingest.py

* refactor: update test data structure in ChatInputTest.json, LoopTest.json, and TwoOutputsTest.json

* refactor: update dynamic imports and __all__ exports in vectorstores __init__.py

* refactor: clean up and organize test files for MCP and KB components

* refactor: update import paths in test_kb_ingest.py and test_kb_retrieval.py to use lfx namespace

* refactor: update structure and organization of Knowledge Ingestion JSON file

* [autofix.ci] apply automated fixes

* rename lfx.logs to lfx.log to avoid gitignore

* refactor: alias run command in LFX app to lfx_run for clarity

* refactor: update import path for validate_code to improve clarity

* [autofix.ci] apply automated fixes

* revert docs changes for now

* [autofix.ci] apply automated fixes

* fix: mark DataFrame as unhashable due to mutability

* refactor: update function signatures to use keyword-only arguments for clarity

* fix: update import paths from langflow to lfx for consistency

* refactor: reorganize imports and ensure create_input_schema_from_json_schema is consistently defined

* fix: update import statement for Action to use the correct path

* refactor: remove TYPE_CHECKING import for DataFrame to streamline code

* refactor: clean up import statements for improved readability

* refactor: remove unused imports and enhance code clarity

* refactor: improve test structure and organization in test_import_utils.py

* fix: update logger configuration to use environment variable for log level

* fix: remove default log level configuration and set logger initialization

* fix: enhance logger configuration to prevent redundant setup and improve cache handling

* fix: improve cache handling in logger configuration to prevent unintended defaults

* fix: enhance logger configuration to prevent redundant setup and improve early-exit logic

* fix: remove defensive comment in logger configuration for clarity

* fix: update project templates for consistency and clarity

* fix: refactor field handling in set_multiple_field_advanced and set_current_fields for improved clarity and consistency

* fix: update error message in import_mod test for clarity and specificity

* fix: change _get_tools method from async to synchronous for consistency

* fix: update error handling in test_module_not_found_error_handling for clarity

* fix: update import statements in test_custom_component for consistency

* fix: update import statements in test_custom_component_endpoint for consistency

* fix: remove SupabaseComposioComponent from dynamic imports and __all__ for consistency

* fix: mock log method in component_setup to avoid tracing service context issues

* fix: adjust uniqueness threshold for code hashes to account for legitimate sharing

* fix: update test for structured output to support NVIDIA models and handle errors appropriately

* fix: update logger patches and modify pandas inclusion test in validate.py

* fix: update import path for langflow module in get_default_imports function

* fix: replace hard assertions with informative prints in performance tests to avoid CI failures

* fix: ensure all component modules are importable after dynamic import refactor

* fix: enhance composio compatibility checks and improve import handling for Action enum

* fix: remove compatibility check for composio components and always expose all components

* fix: update Slack component documentation link to ensure accuracy

* fix: remove 'Agent' from skipped components list in constants

* fix: remove await from CurrentDateComponent instantiation in AgentComponent

* fix: Filter out None values from headers in URLComponent

* update starter projects hat use url compoennt

* feat: add processing components and converter utilities

* fix: add OpenAI constants forward import

* chore: update Knowledge Ingestion starter project structure

* fix: correct parameter usage in set_multiple_field_display function

* fix: update set_field_display function signature to remove unnecessary keyword argument

* feat: implement backwards compatibility layer and add OpenAI response schemas

* fix: update version to 0.1.9 in pyproject.toml and uv.lock

* feat: add compatibility for langflow.components and related helper modules

* fix: update version to 0.1.10 in pyproject.toml and uv.lock

* fix: remove unnecessary import and update message type check in convert_message_to_data method

* fix: enhance attribute access in LangflowCompatibilityModule with caching

* fix: update import paths in Data class to use lfx module

* fix: add comment to clarify import and re-export purpose in message.py

* fix: remove unused code and improve flow data checks in openai_responses.py

* fix: update LoopTest.json structure for improved data representation

* fix: update test_api_schemas.py for improved hypothesis testing configurations

* fix: update hypothesis strategies for improved test coverage in test_api_schemas.py

* fix: remove unused code and improve structure in __init__.py

* refactor: add knowledge base components for ingestion and retrieval in lfx

- Implemented KnowledgeIngestionComponent for creating and updating knowledge bases from DataFrames.
- Added KnowledgeRetrievalComponent for searching and retrieving data from knowledge bases.
- Introduced dynamic imports for knowledge base components in the main module.
- Created utility functions for managing knowledge base metadata and embeddings.
- Enhanced error handling and logging for better debugging and user feedback.

* fix: enhance convert_to_dataframe function to handle pandas DataFrame and improve type conversion

* refactor: remove knowledge base components and related imports for cleanup

* fix: update TypeConverterComponent to include pandas as a dependency and enhance convert_to_dataframe function for better DataFrame handling

* fix: update imports for knowledge_bases module and enhance compatibility in langflow.base

* refactor: remove unused imports and simplify backwards compatibility module in langflow.base.data

* refactor: streamline inputs module by removing unused code and maintaining compatibility layer

* refactor: remove unused classes and streamline input handling in inputs.py

* Update language model components across multiple starter projects to include new dependencies and model options

- Standardized description format for language model components.
- Added metadata for dependencies including langchain packages and lfx.
- Updated model options to include new versions such as gpt-5 and its variants.
- Ensured consistency in the structure of JSON files for various starter projects including Market Research, Meeting Summary, Memory Chatbot, Portfolio Website Code Generator, Research Agent, and others.

* fix: update import path for custom component

- Changed the import path for the `Component` class from `lfx.custom.custom_component.component` to `langflow.custom.custom_component.component` in the `Youtube Analysis.json` file.

* refactor: update component IDs and streamline connections in Custom Component Generator

* refactor: standardize formatting of source and target handles in Custom Component Generator

* refactor: update component IDs and streamline connections in Custom Component Generator

* [autofix.ci] apply automated fixes

* fix: revert name change in Custom Component Generator

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
2025-09-02 17:45:53 +00:00
654154ebbe refactor(docker): remove --extra deploy flag from uv sync commands (#8485)
🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-11 14:39:53 +00:00
9191773957 fix: Allow upload limit increase in kubernetes deployment (#7664)
* Add nginx body size upload limit config

* Add nginx body size upload limit config

* Rename env variable to match existing max upload

* Rename env variable to match existing max upload

* Add export of Max_file_size_upload variable

* Add unit to max body size

* Remove unit from default assignment

* Apply comments and move config to default nginx conf template

---------

Co-authored-by: daniel.kaestner <daniel.kaestner@cas.de>
Co-authored-by: Dexter192 <DanielKaestner@otlook.de>
2025-06-03 11:53:08 +00:00
409146151c build: add build for docker image with all optional deps (#7957)
* Add build for docker image with all optional deps

* Add to release workflows
2025-05-12 16:26:58 +00:00
674cee0906 build: add event-delivery polling for cloud image (#7911)
Add event-delivery polling for cloud image
2025-05-05 21:28:17 -07:00
34ad59533b fix: Adding Node to Dockerfile (#7735)
adding node to dockerfile
2025-04-22 21:32:27 +00:00
6dccb22e38 Fix: add missing curl to dockerfile langflow-ai/langflow-helm-charts#40 (#6971)
* add missing curl and remove empty continuation line

* add missing curl

* Update docker/build_and_push.Dockerfile

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Update docker/build_and_push_base.Dockerfile

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-04-17 14:16:21 +00:00
3fccfd75ed feat: frontend docker nginx configuration add brower cache accelerated pages access (#7125)
* Update py_autofix.yml

* feat: frontend docker nginx  add brower cache accelerate page access

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e986.

* revert py_autofix.yml

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e986.

* add: remove blank line

* fix: update Nginx configuration to prevent caching for index.html

---------

Co-authored-by: tianzhipeng <tzpabc@gmail.com>
Co-authored-by: caojianwei-jk <caojianwei-jk@360shuke.com>
2025-04-10 17:57:41 +00:00
ee43c51297 fix: Add libpq-dev and gcc dependencies to backend Dockerfile (#7136)
* 🔧 (Dockerfile): update Dockerfile to install additional dependencies (libpq-dev, gcc) required for the application to run successfully

* add libpq5 to docker ffile nightly

* 🔧 (docker-compose.yml): add docker-compose configuration for langflow and postgres services
♻️ (add_column_access_type_to_flow.py): refactor to use uppercase for access type enum values for consistency
♻️ (model.py): refactor to use uppercase for access type enum values for consistency

* 🔧 (docker-compose.yml): remove docker-compose file as it is no longer needed for the project

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-03-18 18:50:59 +00:00
c41eaf0071 build: add postgresql client library libpq5 (#6964)
Add postgresql client library libpq5
2025-03-07 21:44:05 +00:00
84aa1d63b3 fix: update sqlalchemy dependencies in pyproject.toml (#6854) 2025-02-26 19:27:19 -03:00
400572342f feat: add nvidia ingest component (#6333)
* initial

* cleanup

* [autofix.ci] apply automated fixes

* ruff

* add else

* update deps

* uv lock

* Make nv-ingest an optional dep

* revert change to validate

* rebase fixes

* [autofix.ci] apply automated fixes

* Update language

* add extra args to make target

* [autofix.ci] apply automated fixes

* update error language

* lockfile update

* rebase lockfile:

* [autofix.ci] apply automated fixes

* Adds nv-ingest by default to -ep docker image

* caps fixes

* update uv lock

* revert ruff upgrade

* ruff

* Fix lint

* [autofix.ci] apply automated fixes

* No code changes made.

* fix: update ruff configuration to ignore additional linting rule and allow built-in modules

* fix: update ruff command to ignore linting rule A005 during autofix

* fix: update Ruff check command to ignore linting rule A005

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-20 19:26:03 +00:00
cdf85e55de fix: add the git binary to the final step of the container images (#5863)
Add the git binary to the runtime images
2025-01-22 15:07:34 +00:00
8ea4405010 refactor: run upgrade in dockerfiles to update dependencies (#5508)
chore: Update Dockerfiles to use COPY instead of ADD run apt-get upgrade

- Replaced ADD commands with COPY for better clarity and consistency across Dockerfiles.
- Added apt-get upgrade and clean commands to reduce image size and ensure packages are up to date.
- Updated user creation commands to include necessary cleanup steps.
- Ensured all Dockerfiles follow a similar structure for maintainability.
2025-01-02 15:49:41 +00:00
ba6f5183be ci: update docker image configuration for secure deployments (#5259)
* changes required for openshift to work with read-only dirs
2024-12-13 22:38:55 +00:00
267c08bc07 fix(Dockerfile): standardize casing for 'FROM' and 'AS' keywords (#5159)
- Updated the Dockerfile to use consistent uppercase casing for 'FROM' and 'AS'.
- Resolved 'FromAsCasing' warnings that were flagged during the Docker build.
- Improves readability and adheres to Dockerfile best practices.

This change ensures a cleaner build process with no warnings.
2024-12-09 04:47:59 -08:00
44a3e7643a fix: adjust GitLoader to work in a hosted environment (#5040)
* fix: add git installation to dockerfile dependencies

* chore: make input optional
2024-12-04 14:58:31 +00:00
3a1c0301cd buid: reduce number of layers in runtime env for langflow-ep build (#4457)
Reduce number of layers in runtime env
2024-11-07 12:33:46 -08:00
18d08413ce build: add curl to ep image (#4456)
Add curl to ep image
2024-11-07 12:29:26 -08:00
c1097d2dde chore: update dockerfiles and docker-build workflows to fix releases (#4317)
* bash -x

* bash verbose

* combine bash calls in uv run

* combined python script

* relative dir

* pass args correctly

* pass args correctly

* function name

* fix arg order

* merge base and main

* remove nightly -ep docker image for now

* set up uv in the get-version job in docker-build.yml

* v prefix for version in build job

* use inputs.nightly_tag_main for checkout actions

* mount root project metadata for base build

* fix comment

* continued dockerfile fixes for workspaces setup

* fix path

* ruff check fix
2024-10-31 11:16:26 +00:00