Skip to content

List type annotations #36

Description

@danielrothmann

Motivation

Currently, lists in entities are allowed to be of any type. Schemas specify "list" as a possible field type, but does not specify the inner type of the list. The only guarantee, as it stands, is that the list items will have homogeneous types.

This reduces predictability of list data in queries and causes friction with non interactive add in the CLI + MCP server.

Proposal

Allow or require schemas to specify list type for fields, for example with a list<type> syntax. This could then be more explicitly validated when parsing DSL or adding entities via other mechanisms.

Backward compatibility

The question would be whether to allow existing non-typed lists. If not, this might break some workspaces (including mine). For backward compatibility, a better option might be to keep untyped lists as "buckets of data" but add support for annotating lists with their inner type as well. This increases complexity, but might be worth it to address migration pains.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    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