Skip to content

Agent manifest parameters: launchpad UI, parameter substitution, session persistence #72

Closed

Description

@JoshuaRowePhantom

Summary

Agent manifests should be able to declare typed parameters that callers supply at session-creation time. A first-class UI collects those values before creating the session, and the agent-session entity persists them so sessions can be reconstructed correctly after restart.

Motivation

Manifests targeting github-copilot need a working-directory per invocation. In future, every manifest will accept a trust-profile parameter. These values cannot be baked into the manifest file.

Design

See docs/design/agent-manifest-parameters.md for the full design.

Scope

Backend (Phantom.Workspaces.Llm.Core)

  • AgentDefinitionParameterSubstitutor — validates supplied values against AgentManifest.Parameters, applies defaults, substitutes ${name} placeholders in model.options string values.
  • CreateAgentChatRequest.ModelParameters — new IReadOnlyDictionary<string, string>? property; AgentFactory calls the substitutor before CreateChatClient.

Entity schema

  • agent-session.json: add parameter-values (object, string-valued); rename agent-definition-entity-id → agent-source-entity-id.

UI (Phantom.Workspaces)

  • AgentManifestLaunchpadViewModel — shown when opening an agent-manifest or agent-definition entity; parameter-entry form with Start Session and Edit Manifest buttons.
  • AgentManifestParameterRowViewModel — one row per declared parameter; bindable Value; directory-picker affordance for working-directory-style parameters.
  • AgentManifestEditorViewModel — manifest JSON editor; exposes Clone, Save, and Start Session (save-then-open-launchpad) commands; Clone is prominently surfaced.
  • OpenAgentManifestShortcutHandler / OpenAgentDefinitionShortcutHandler — replaced to open the Launchpad tab instead of directly starting a session. If the manifest declares no parameters the Launchpad auto-starts immediately (zero-friction path).
  • EditAgentManifestShortcutHandler — new; handles Shortcut.Edit on agent-manifest.
  • OpenAgentSessionShortcutHandler — reads parameter-values from the session entity on resume.
  • Views: AgentManifestLaunchpadView.axaml, AgentManifestEditorView.axaml.

Tests

  • AgentDefinitionParameterSubstitutorTests — required param missing, default applied, placeholder substitution, unknown param ignored.

Parameters of note

  • working-directory (Copilot) — Launchpad row shows a directory-picker button.
  • trust-profile (future, all manifests) — Launchpad row will be a dropdown bound to available llm-trust-profile entities. Out of scope here; mechanism is intentionally general.

Parameter typing

AgentManifest.Parameters (PropertySchema from AgentSchema) already models parameters with Name, Kind, Description, Required, Default. Deeper type-aware UI (e.g. integer spinners, boolean toggles) is deferred; all values are collected as strings in this iteration.

Activity

  1. added a commit that references this issue on Jun 26, 2026
    c303a06
  2. JoshuaRowePhantom commented on Jun 29, 2026

    @JoshuaRowePhantom
    OwnerAuthor

    ❌ Verification Failed

    Three criteria violations were found during code review of commit c303a06.


    1. Missing test: \Substitute_UnknownParamIgnored\

    The issue scope explicitly requires:

    \AgentDefinitionParameterSubstitutorTests\ — required param missing, default applied, placeholder substitution, unknown param ignored.

    The test file covers the first three cases but there is no test that passes a parameter key not declared in the manifest and verifies it is silently ignored (no exception, resolved dict contains only declared params).


    2. Launchpad does not auto-start for zero-parameter manifests

    The issue design states:

    If the manifest declares no parameters the Launchpad auto-starts immediately (zero-friction path).

    AgentManifestLaunchpadViewModel sets CanStart = true when Parameters.Count == 0, but there is no code that automatically calls StartSessionAsync() on construction/attachment when the parameter list is empty. Users are still presented with a UI form they must manually confirm.


    3. No directory-picker affordance in the Launchpad parameter row

    The issue design states:

    *\AgentManifestParameterRowViewModel* — one row per declared parameter; bindable \Value; directory-picker affordance for \working-directory-style parameters.

    AgentManifestParameterRowViewModel exposes no \Kind/\ParameterKind\ property, and AgentManifestLaunchpadView.axaml renders every parameter as a plain \TextBox\ with no browse button.

  3. JoshuaRowePhantom commented on Jun 29, 2026

    @JoshuaRowePhantom
    OwnerAuthor

    Copilot: Be sure to update this bug with expected tests and designs before implementing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions