Skip to content

[Client] Fill elicitation defaults when accepting (SEP-1034) #328

@soyuka

Description

@soyuka

Context

SEP-1034 adds client-side default handling for elicitation/create. When a client accepts an elicitation request without explicit field values, the response content should be auto-populated from default fields declared in the request's requestedSchema. Schemas already expose default on StringSchemaDefinition, NumberSchemaDefinition, EnumSchemaDefinition, TitledEnumSchemaDefinition, and BooleanSchemaDefinition.

Scope

  • Add helper ElicitationSchema::extractDefaults(): array<string, mixed> returning a field => default map for all properties that declare one.
  • Document the helper as the canonical "accept-with-defaults" path; update the example in tests/Conformance/client.php to use it for elicitation-sep1034-client-defaults.
  • Optional convenience: ElicitResult::accepted(ElicitationSchema $schema) factory that pre-fills defaults.

Conformance scenarios unblocked

elicitation-sep1034-client-defaults.

Dependencies

Independent.

Acceptance

cc @soyuka

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientIssues & PRs related to the Client componentP1Significant bug affecting many users, highly requested featureSchemaIssues & PRs related to the Schema componentenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions