foley.requirements#
Onboarding — check what foley needs, tell the user how to get it (accompy-style, #12).
Generalizes WEAVE’s binary-only foley.weave.requirements into a single
capability audit across everything foley can optionally use: system binaries
(ffmpeg / rubberband — reused verbatim from the WEAVE SSOT), API keys
(derived from each source adapter’s declared config['auth'] — one SSOT for the env
var + sign-up URL), and importable extras (py2mcp for the MCP server, the CLAP /
index / provenance stacks). A Requirement carries a
probe discriminator (binary / env / importable) so one dispatch handles
all three. Nothing here runs an installer — it surfaces the exact per-platform command
or sign-up URL so the user (or agent) can opt in. Stdlib-only; keeps import foley
dol-only.
Functions
Assemble the full requirement set: system binaries + API keys + importable extras. |
|
|
A JSON-safe capability + posture snapshot for the CLI, docs, and the MCP tool. |
|
Report which optional foley capabilities are available ( |
Every env var that holds a provider credential (the sources' keys + Anthropic's). |
|
|
Return a per-requirement status + guidance report (never runs an installer). |
- foley.requirements.build_requirements()[source]#
Assemble the full requirement set: system binaries + API keys + importable extras.
- Return type:
- foley.requirements.capability_report(*, runtime=None)[source]#
A JSON-safe capability + posture snapshot for the CLI, docs, and the MCP tool.
Groups requirements into
keys(env),extras(importable),system(binary), adds the current offline posture and the available source list, and listsdegraded_tools— capabilities whose requirement is unmet.- Parameters:
runtime – A
foley.runtime.RuntimeConfig(default: the active one).- Return type:
- Returns:
{keys, extras, system, offline, sources, llm, degraded_tools}— all JSON-safe.llmis the provider the SELECT rungs resolve to right now (seefoley.agent.llm.resolve_llm()), or the reason it cannot resolve.
- foley.requirements.check_requirements(*, names=None, verbose=False)[source]#
Report which optional foley capabilities are available (
{name: is_available}).- Parameters:
- Return type:
- Returns:
{requirement_name: available}. Everything-absent is fine — foley degrades (deterministic fakes, offline mode, in-process DSP); the report just shows what each capability would unlock.
- foley.requirements.provider_key_env_vars()[source]#
Every env var that holds a provider credential (the sources’ keys + Anthropic’s).
Derived from the same SSOT as
check_requirements()(each source’sconfig['auth']), so a newly added paid source is covered automatically — the test suite scrubs exactly these so no test can spend money by accident.