Skip to content

Commit dee8acb

Browse files
committed
Update conformance tests and catalog schema to use shared v0.9 component type references
1 parent 88ec8fa commit dee8acb

10 files changed

Lines changed: 378 additions & 581 deletions

File tree

agent_sdks/conformance/suites/streaming_parser.yaml

Lines changed: 13 additions & 278 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@
13161316
type: object
13171317
properties:
13181318
component: {const: "Column"}
1319-
children: {type: array, items: {type: string}}
1319+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
13201320
required: ["component"]
13211321
Text:
13221322
type: object
@@ -1328,7 +1328,7 @@
13281328
type: object
13291329
properties:
13301330
component: {const: "Row"}
1331-
children: {type: array, items: {type: string}}
1331+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
13321332
required: ["component"]
13331333
$defs:
13341334
anyComponent:
@@ -1448,7 +1448,7 @@
14481448
type: object
14491449
properties:
14501450
component: {const: "Card"}
1451-
child: {type: string}
1451+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
14521452
required: ["component"]
14531453
$defs:
14541454
anyComponent:
@@ -1523,7 +1523,7 @@
15231523
Card:
15241524
type: object
15251525
properties:
1526-
child: {type: string}
1526+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
15271527
$defs:
15281528
anyComponent:
15291529
oneOf:
@@ -1549,7 +1549,7 @@
15491549
Card:
15501550
type: object
15511551
properties:
1552-
child: {type: string}
1552+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
15531553
$defs:
15541554
anyComponent:
15551555
oneOf:
@@ -1769,7 +1769,7 @@
17691769
type: object
17701770
properties:
17711771
component: {const: "Card"}
1772-
child: {type: string}
1772+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
17731773
required: ["component"]
17741774
$defs:
17751775
anyComponent:
@@ -1821,12 +1821,7 @@
18211821
type: object
18221822
properties:
18231823
component: {const: "List"}
1824-
children:
1825-
type: object
1826-
properties:
1827-
componentId: {type: string}
1828-
path: {type: string}
1829-
required: ["componentId", "path"]
1824+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
18301825
required: ["component"]
18311826
$defs:
18321827
anyComponent:
@@ -2079,7 +2074,7 @@
20792074
type: object
20802075
properties:
20812076
component: {const: "Card"}
2082-
child: {type: string}
2077+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
20832078
required: ["component"]
20842079
$defs:
20852080
anyComponent:
@@ -2209,258 +2204,6 @@
22092204
component: "Text"
22102205
text: "hi"
22112206

2212-
- name: test_data_model_after_components_v09
2213-
description: Tests that data model after components works.
2214-
catalog:
2215-
version: "0.9"
2216-
common_types_schema: "test_data/simplified_common_types_v09.json"
2217-
s2c_schema: "test_data/simplified_s2c_v09.json"
2218-
catalog_schema:
2219-
catalogId: "test_catalog"
2220-
components:
2221-
Text:
2222-
type: object
2223-
properties:
2224-
component: {const: "Text"}
2225-
text:
2226-
oneOf:
2227-
- {type: string}
2228-
- type: object
2229-
properties:
2230-
path: {type: string}
2231-
required: ["component"]
2232-
$defs:
2233-
anyComponent:
2234-
oneOf:
2235-
- {$ref: "#/components/Text"}
2236-
discriminator: {propertyName: "component"}
2237-
action: process_chunk
2238-
steps:
2239-
- input: "<a2ui-json>["
2240-
expect: []
2241-
- input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, '
2242-
expect:
2243-
- a2ui:
2244-
- version: "v0.9"
2245-
createSurface:
2246-
surfaceId: "s1"
2247-
catalogId: "test_catalog"
2248-
- input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": {"path": "/name"}}]}}, '
2249-
expect:
2250-
- a2ui:
2251-
- version: "v0.9"
2252-
updateComponents:
2253-
surfaceId: "s1"
2254-
components:
2255-
- id: "root"
2256-
component: "Text"
2257-
text: {path: "/name"}
2258-
- input: '{"version": "v0.9", "updateDataModel": {"surfaceId": "s1", "value": {"name": "Alice"}}}]</a2ui-json>'
2259-
expect:
2260-
- a2ui:
2261-
- version: "v0.9"
2262-
updateDataModel:
2263-
surfaceId: "s1"
2264-
value: {name: "Alice"}
2265-
2266-
- name: test_partial_paths_v09
2267-
description: Tests that partial paths are handled correctly.
2268-
catalog:
2269-
version: "0.9"
2270-
common_types_schema: "test_data/simplified_common_types_v09.json"
2271-
s2c_schema: "test_data/simplified_s2c_v09.json"
2272-
catalog_schema:
2273-
catalogId: "test_catalog"
2274-
components:
2275-
Text:
2276-
type: object
2277-
properties:
2278-
component: {const: "Text"}
2279-
text:
2280-
oneOf:
2281-
- {type: string}
2282-
- type: object
2283-
properties:
2284-
path: {type: string}
2285-
required: ["component"]
2286-
$defs:
2287-
anyComponent:
2288-
oneOf:
2289-
- {$ref: "#/components/Text"}
2290-
discriminator: {propertyName: "component"}
2291-
action: process_chunk
2292-
steps:
2293-
- input: "<a2ui-json>["
2294-
expect: []
2295-
- input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, '
2296-
expect:
2297-
- a2ui:
2298-
- version: "v0.9"
2299-
createSurface:
2300-
surfaceId: "s1"
2301-
catalogId: "test_catalog"
2302-
- input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": {"path": "/loca'
2303-
expect: []
2304-
- input: 'tion"}]}}]</a2ui-json>'
2305-
expect:
2306-
- a2ui:
2307-
- version: "v0.9"
2308-
updateComponents:
2309-
surfaceId: "s1"
2310-
components:
2311-
- id: "root"
2312-
component: "Text"
2313-
text: {path: "/location"}
2314-
2315-
- name: test_cut_atomic_id_v09
2316-
description: Tests that cutting atomic ID buffers the component.
2317-
catalog:
2318-
version: "0.9"
2319-
common_types_schema: "test_data/simplified_common_types_v09.json"
2320-
s2c_schema: "test_data/simplified_s2c_v09.json"
2321-
catalog_schema:
2322-
catalogId: "test_catalog"
2323-
components:
2324-
Text:
2325-
type: object
2326-
properties:
2327-
component: {const: "Text"}
2328-
text: {type: string}
2329-
required: ["component"]
2330-
Card:
2331-
type: object
2332-
properties:
2333-
component: {const: "Card"}
2334-
child: {type: string}
2335-
required: ["component"]
2336-
$defs:
2337-
anyComponent:
2338-
oneOf:
2339-
- {$ref: "#/components/Text"}
2340-
- {$ref: "#/components/Card"}
2341-
discriminator: {propertyName: "component"}
2342-
action: process_chunk
2343-
steps:
2344-
- input: "<a2ui-json>["
2345-
expect: []
2346-
- input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "contact'
2347-
expect: []
2348-
- input: '-card"}}, {"version": "v0.9", "updateComponents": {"surfaceId": "contact-card", "components": [{"id": "button'
2349-
expect:
2350-
- a2ui:
2351-
- version: "v0.9"
2352-
createSurface:
2353-
surfaceId: "contact-card"
2354-
catalogId: "test_catalog"
2355-
- input: '-text"'
2356-
expect: []
2357-
- input: ', "component": "Text", "text": "hi"}, {"id": "root", "component": "Card", "child": "button-text"}]}}]</a2ui-json>'
2358-
expect:
2359-
- a2ui:
2360-
- version: "v0.9"
2361-
updateComponents:
2362-
surfaceId: "contact-card"
2363-
components:
2364-
- id: "button-text"
2365-
component: "Text"
2366-
text: "hi"
2367-
- id: "root"
2368-
component: "Card"
2369-
child: "button-text"
2370-
2371-
- name: test_cut_cuttable_text_v09
2372-
description: Tests that cutting cuttable text yields partial text.
2373-
catalog:
2374-
version: "0.9"
2375-
common_types_schema: "test_data/simplified_common_types_v09.json"
2376-
s2c_schema: "test_data/simplified_s2c_v09.json"
2377-
catalog_schema:
2378-
catalogId: "test_catalog"
2379-
components:
2380-
Text:
2381-
type: object
2382-
properties:
2383-
component: {const: "Text"}
2384-
text: {type: string}
2385-
required: ["component"]
2386-
$defs:
2387-
anyComponent:
2388-
oneOf:
2389-
- {$ref: "#/components/Text"}
2390-
discriminator: {propertyName: "component"}
2391-
action: process_chunk
2392-
steps:
2393-
- input: "<a2ui-json>["
2394-
expect: []
2395-
- input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, '
2396-
expect:
2397-
- a2ui:
2398-
- version: "v0.9"
2399-
createSurface:
2400-
surfaceId: "s1"
2401-
catalogId: "test_catalog"
2402-
- input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": "Em'
2403-
expect:
2404-
- a2ui:
2405-
- version: "v0.9"
2406-
updateComponents:
2407-
surfaceId: "s1"
2408-
components:
2409-
- id: "root"
2410-
component: "Text"
2411-
text: "Em"
2412-
- input: 'ail"}]}}]</a2ui-json>'
2413-
expect:
2414-
- a2ui:
2415-
- version: "v0.9"
2416-
updateComponents:
2417-
surfaceId: "s1"
2418-
components:
2419-
- id: "root"
2420-
component: "Text"
2421-
text: "Email"
2422-
2423-
- name: test_message_ordering_buffering_v09
2424-
description: Tests that updateComponents before createSurface is buffered.
2425-
catalog:
2426-
version: "0.9"
2427-
common_types_schema: "test_data/simplified_common_types_v09.json"
2428-
s2c_schema: "test_data/simplified_s2c_v09.json"
2429-
catalog_schema:
2430-
catalogId: "test_catalog"
2431-
components:
2432-
Text:
2433-
type: object
2434-
properties:
2435-
component: {const: "Text"}
2436-
text: {type: string}
2437-
required: ["component"]
2438-
$defs:
2439-
anyComponent:
2440-
oneOf:
2441-
- {$ref: "#/components/Text"}
2442-
discriminator: {propertyName: "component"}
2443-
action: process_chunk
2444-
steps:
2445-
- input: "<a2ui-json>["
2446-
expect: []
2447-
- input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": "hi"}]}}, '
2448-
expect: []
2449-
- input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}]</a2ui-json>'
2450-
expect:
2451-
- a2ui:
2452-
- version: "v0.9"
2453-
createSurface:
2454-
surfaceId: "s1"
2455-
catalogId: "test_catalog"
2456-
- version: "v0.9"
2457-
updateComponents:
2458-
surfaceId: "s1"
2459-
components:
2460-
- id: "root"
2461-
component: "Text"
2462-
text: "hi"
2463-
24642207
- name: test_delete_surface_buffering_v09
24652208
description: Tests that deleteSurface before createSurface is ignored.
24662209
catalog:
@@ -2654,7 +2397,7 @@
26542397
type: object
26552398
properties:
26562399
component: {const: "Container"}
2657-
children: {type: array, items: {type: string}}
2400+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
26582401
required: ["component"]
26592402
Text:
26602403
type: object
@@ -2728,11 +2471,7 @@
27282471
type: object
27292472
properties:
27302473
component: {const: "List"}
2731-
children:
2732-
type: object
2733-
properties:
2734-
componentId: {type: string}
2735-
path: {type: string}
2474+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
27362475
required: ["component"]
27372476
Text:
27382477
type: object
@@ -3009,11 +2748,7 @@
30092748
type: object
30102749
properties:
30112750
component: {const: "Column"}
3012-
children:
3013-
type: object
3014-
properties:
3015-
componentId: {type: string}
3016-
path: {type: string}
2751+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
30172752
required: ["component"]
30182753
Text:
30192754
type: object
@@ -3109,7 +2844,7 @@
31092844
type: object
31102845
properties:
31112846
component: {const: "Card"}
3112-
child: {type: string}
2847+
child: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId"}
31132848
required: ["component"]
31142849
Text:
31152850
type: object
@@ -3121,7 +2856,7 @@
31212856
type: object
31222857
properties:
31232858
component: {const: "Row"}
3124-
children: {type: array, items: {type: string}}
2859+
children: {$ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList"}
31252860
required: ["component"]
31262861
$defs:
31272862
anyComponent:

0 commit comments

Comments
 (0)