Skip to content

Console: create-time "prompt-for-value" picker for bundle ${input} templates (mcp servers + secrets) #2041

Description

@mabry1985

Summary

Build one console "prompt-for-value at create time" picker that collects ${input} values when a new agent is created from a bundle/archetype, and writes the resolved config. It's the shared front-end for two already-designed backend seams (ADR 0083 D5):

Both use the same input contract already established by config/mcp-catalog.json:

inputs: [ { key, label, placeholder?, required?, secret?, default? } ]

and the same ${key} placeholder syntax (graph/mcp_config._PLACEHOLDER / the console's McpCatalogDialog.fillTemplate). Building it once, for both, is the right sequencing.

What to build

  1. Detect when a picked archetype's bundle declares inputs (via mcp: templates and/or a secrets: field). The archetype-preview path (GET /api/archetypes/{id}/preview, ADR 0083 / feat(archetypes): archetype preview — see skills/plugins/SOUL before picking #2016) already peeks the bundle — surface its inputs there.
  2. Prompt in the new-agent flow (NewAgentPanel / SetupWizard) — reuse McpCatalogDialog's inputs→fillTemplate→submit UI: SecretInput for secret: true, required-but-empty gate, etc.
  3. Resolve + write at create:
    • mcp: fill the ${input} templates and union into the workspace mcp.servers (the #2011 seeder path — collected values replace the current env-only resolution / seeded-disabled fallback).
    • secrets: write collected values to the member's <ws>/config/secrets.yaml via graph/config_io.save_secrets (nested {section:{key:val}}, 0600, atomic, merge-not-clobber). This is the missing half of Archetype/bundle seam: env + secrets seeding #2014 — the backend secrets: field + _apply_bundle_secrets seeder land here alongside the picker (they're inert without it).

Security posture (secrets)

  • Values are collected from the operator, never auto-copied from the host os.environ (that would persist a host-scoped credential into a new instance's secrets.yaml, a larger blast radius than the fleet's env-inheritance — flagged against ADR 0080). Any host-env resolution stays explicit opt-in, off by default.
  • secret: true inputs never echo back (redacted from /api/config like model.api_key); the create request carrying them must not be logged.

Acceptance

Refs: ADR 0083 D5, #2011 (PR #2039), #2014, #2016 (archetype preview), ADR 0080 (secrets posture), config/mcp-catalog.json (input contract).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestteam-readyTriaged and approved for autonomous team dispatch — the ONLY intake gate the board pipeline accepts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions