Expand description
Auto-derive the credential setup form (assets/setup.yaml) and
assets/secret-requirements.json for an application pack from its
agents[].llm and the secret requirements of the tool extensions the
agents use. Pure logic; all I/O (resolving describe.json) lives in the
caller (cli::ext_resolver).
Structs§
- Generated
Setup - The two generated asset bodies, ready to write into the pack.
- Provider
Overlay - Display metadata for an LLM provider’s API-key question. Keyed by the
provider id used in
pack.yaml agents[].llm.provider(matchesgreentic_llm::ProviderKind::as_str()). - Secret
Requirement Out - One entry of
secret-requirements.json.requiredis omitted whentrue(the reader defaults it to true), matching hand-authored files. - Setup
Question Out - One credential question. Field set/names match greentic-setup’s
SetupQuestionreader;Noneoptionals are omitted (the reader defaults them), so output stays close to a hand-authored file. - Setup
Spec Out - Tool
Secret Req - One secret a tool needs, as declared in the extension’s
describe.jsoncontributions.tools[].secret_requirements.
Functions§
- extract_
tool_ secret_ requirements - Collect the secret requirements of the named tools from a
describe.jsonbody, deduped bykey(first occurrence wins), preserving discovery order. - generate
- Build setup.yaml + secret-requirements.json from a pack’s agents and the
resolved tool secret requirements. Returns
Nonewhen there is nothing to emit. Component requirements are merged into secret-requirements.json. - llm_
overlay - Polished display metadata for the popular providers. Returns
Nonefor providers without a curated entry (the caller emits a minimal question). Task 5’s drift-test asserts everygreentic_llm::ProviderKindis either covered here or in that test’s explicit minimal allow-list.