a2ui-project / a2ui-project/a2ui

Reinstate template examples

オープン 初心者向け
#2,402 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
component: specification P3 type: feature/enhancement
主要言語
TypeScript
スター
16.4k
フォーク
1.3k
平均マージ
3日 15時間
マージ済み PR(30日)
134

説明

### Overview

As the A2UI template feature graduates from experimental to a stable feature across client and agent SDKs, reinstate or graduate the language-agnostic template reference examples into the central `conformance/test_data/templates/` directory (or a dedicated specification gallery).

### Background

In PR #2380 and #2381, the A2UI template specification was formalized as a Spec-Driven Development Feature Blueprint (`blueprints/features/templates.blueprint.md`), and the data-driven test suites are currently maintained within the Python SDK (`agent_sdks/python/a2ui_agent/tests/inference_formats/experimental/template/conformance/suites/`).

To keep the initial blueprint PR tight and focused on architectural and schema contracts, the 14 standalone reference template YAML files were removed from `specification/proposals/templates/examples/`. They are stashed below in full for future reference when cross-language test suites (Swift, Kotlin, TypeScript, Dart) are ready to consume them.

Click to expand: 14 Stashed Reference Template Definitions (YAML)

#### `basic_cards.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: SimpleCard
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
title:
type: string
description: Primary card title
subtitle:
type: string
required: false
layout:
component: Card
child:
component: Column
children:
- component: Text
text: ${title}
variant: h2
---
version: "0.1"
name: ProfileHeader
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
name:
type: string
avatarUrl:
type: string
layout:
component: Row
align: center
children:
- component: Image
url: ${avatarUrl}
variant: avatar
- component: Text
text: ${name}
variant: h3
```

#### `slot_composition.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: ContainerSlot
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
title:
type: string
contentSlot:
type: child
layout:
component: Card
child:
component: Column
children:
- component: Text
text: ${title}
- component: ${contentSlot}
---
version: "0.1"
name: ActionButton
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
label:
type: string
onPress:
type: action
layout:
component: Button
text: ${label}
action: ${onPress}
```

#### `nested_lists.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: MemberList
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
teamName:
type: string
members:
type: array
layout:
component: Card
child:
component: Column
children:
- component: Text
text: ${teamName}
variant: h2
- component: Column
children:
loop:
param: members
as: member
item:
component: Row
children:
- component: Text
text: ${member.name}
- component: Text
text: ${member.role}
variant: caption
```

#### `salary_card.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: SalaryCard
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
employeeId:
type: string
employeeName:
type: string
role:
type: string
baseSalary:
type: string
annualBonus:
type: string
layout:
component: Card
child:
component: Column
children:
- component: Row
justify: spaceBetween
align: center
children:
- component: Text
text: ${employeeName}
variant: h3
- component: Text
text: ${role}
variant: caption
- component: Divider
axis: horizontal
- component: Row
justify: spaceBetween
children:
- component: Text
text: "Base Salary"
variant: caption
- component: Text
text: ${baseSalary}
variant: body
- component: Row
justify: spaceBetween
children:
- component: Text
text: "Annual Bonus"
variant: caption
- component: Text
text: ${annualBonus}
variant: body
```

#### `user_profile.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: UserProfile
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
userId:
type: string
userName:
type: string
role:
type: string
default: Member
layout:
component: Card
child:
component: Column
align: center
children:
- component: Icon
name: account_circle
- component: Text
text: ${userName}
variant: h2
- component: Text
text: ${role}
variant: caption
```

#### `feedback_item.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: FeedbackItem
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
author:
type: string
category:
type: string
text:
type: string
status:
type: string
default: "New"
layout:
component: Card
child:
component: Column
children:
- component: Row
justify: spaceBetween
children:
- component: Text
text: ${author}
variant: h4
- component: Text
text: ${category}
variant: caption
- component: Text
text: ${text}
variant: body
- component: Text
text: "Status: ${status}"
variant: caption
```

#### `goal_item.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: GoalItem
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
title:
type: string
priority:
type: string
default: Medium
targetDate:
type: string
layout:
component: Card
child:
component: Row
justify: spaceBetween
align: center
children:
- component: Column
children:
- component: Text
text: ${title}
variant: body
- component: Text
text: "Target: ${targetDate}"
variant: caption
- component: Text
text: ${priority}
variant: caption
```

#### `section_card.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: SectionCard
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
title:
type: string
description:
type: string
required: false
headerAction:
type: child
required: false
children:
type: children
layout:
component: Card
child:
component: Column
children:
- component: Row
justify: spaceBetween
align: center
children:
- component: Column
children:
- component: Text
text: ${title}
variant: h3
- component: Text
text: ${description}
variant: caption
- component: ${headerAction}
- component: Divider
axis: horizontal
- component: Column
children: ${children}
```

#### `team_card.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TeamCard
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
teamName:
type: string
leadName:
type: string
memberCount:
type: integer
default: 1
layout:
component: Card
child:
component: Column
children:
- component: Text
text: ${teamName}
variant: h2
- component: Row
justify: spaceBetween
children:
- component: Text
text: "Lead: ${leadName}"
variant: body
- component: Text
text: "${memberCount} Members"
variant: caption
```

#### `team_feedback_board.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TeamFeedbackBoard
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
teamName:
type: string
items:
type: array
layout:
component: Card
child:
component: Column
children:
- component: Text
text: "Feedback Board: ${teamName}"
variant: h2
- component: Column
children:
loop:
param: items
as: item
item:
component: Row
justify: spaceBetween
children:
- component: Text
text: ${item.text}
- component: Text
text: ${item.author}
variant: caption
```

#### `team_goal_list.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TeamGoalList
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
teamName:
type: string
goals:
type: array
layout:
component: Card
child:
component: Column
children:
- component: Text
text: "${teamName} OKRs"
variant: h2
- component: Column
children:
loop:
param: goals
as: goal
item:
component: Row
justify: spaceBetween
children:
- component: Text
text: ${goal.title}
- component: Text
text: ${goal.targetDate}
variant: caption
```

#### `team_member_knowledge_panel.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TeamMemberKnowledgePanel
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
memberName:
type: string
role:
type: string
department:
type: string
skills:
type: array
layout:
component: Card
child:
component: Column
children:
- component: Text
text: ${memberName}
variant: h2
- component: Text
text: "${role} • ${department}"
variant: caption
- component: Divider
axis: horizontal
- component: Text
text: "Skills & Expertise"
variant: h4
- component: Row
children:
loop:
param: skills
as: skill
item:
component: Text
text: "${skill} "
variant: caption
```

#### `team_roster.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TeamRoster
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
teamName:
type: string
members:
type: array
layout:
component: Card
child:
component: Column
children:
- component: Text
text: "Team Roster: ${teamName}"
variant: h2
- component: Column
children:
loop:
param: members
as: member
item:
component: Text
text: "• ${member}"
variant: body
```

#### `two_column_layout.yaml`
```yaml
# Copyright 2024 Google LLC
# Apache-2.0
version: "0.1"
name: TwoColumnLayout
catalogs:
- "https://a2ui.org/specification/v0_9_1/catalogs/basic/catalog.json"
parameters:
leftSlot:
type: child
rightSlot:
type: child
layout:
component: Row
children:
- component: ${leftSlot}
- component: ${rightSlot}
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

このタスクは、issue 本文に置かれている 14 個の YAML テンプレート例を、中央の `conformance/test_data/templates/` ディレクトリまたは専用の仕様ギャラリーに移動することです。まず、リポジトリ内の対象ディレクトリを特定します。次に、提供された内容を一字一句そのまま使って各 YAML ファイルを作成し、copyright ヘッダーが含まれていることを確認します。ファイルが正しく配置され、既存の命名規則と構造規則に従っていることを確認します。既存のテストがこれらの例を参照しているか確認し、統合されていることを確かめます。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript, yaml
領域
documentation, testing
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
70/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。