MCPcopy
hub / github.com/langchain-ai/deepagents / install_extra_command

Function install_extra_command

libs/code/deepagents_code/update_check.py:2408–2444  ·  view source on GitHub ↗

Return the install-script command that adds `extra` to dcode. The promoted install path is the install script (see `scripts/install.sh`). This helper is display-only and avoids uv receipt introspection so unsupported installs can surface method-specific guidance before any uv receip

(
    extra: str,
    *,
    distribution_name: str = "deepagents-code",
)

Source from the content-addressed store, hash-verified

2406
2407
2408def install_extra_command(
2409 extra: str,
2410 *,
2411 distribution_name: str = "deepagents-code",
2412) -> str:
2413 """Return the install-script command that adds `extra` to dcode.
2414
2415 The promoted install path is the install script (see `scripts/install.sh`).
2416 This helper is display-only and avoids uv receipt introspection so
2417 unsupported installs can surface method-specific guidance before any uv
2418 receipt is read. Already-detected extras from distribution metadata are
2419 included when available, so following the command does not drop them.
2420
2421 Args:
2422 extra: The extra name (e.g. `'quickjs'`, `'daytona'`, `'fireworks'`).
2423 Validated internally against PEP 508 grammar before interpolation
2424 into the shell command.
2425 distribution_name: Name of the installed distribution to inspect for
2426 already-installed extras.
2427
2428 Returns:
2429 Shell command string suitable for display in error messages.
2430
2431 Raises:
2432 ValueError: If `extra` fails PEP 508 validation.
2433 """
2434 if not is_valid_extra_name(extra):
2435 msg = (
2436 f"Invalid extra name {extra!r}: must match PEP 508 "
2437 f"({_EXTRA_NAME_RE.pattern})"
2438 )
2439 raise ValueError(msg)
2440 from deepagents_code.extras_info import installed_extra_names
2441
2442 extras = installed_extra_names(distribution_name)
2443 extras.add(extra)
2444 return install_extras_command(extras)
2445
2446
2447def install_extra_recovery_command(extra: str) -> str:

Calls 4

installed_extra_namesFunction · 0.90
is_valid_extra_nameFunction · 0.85
install_extras_commandFunction · 0.85
addMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…